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KAAYwtD,MAAoBxuE,MAAK8mH,EAAY76G,GAUvD,MAR4B,CAC1BovF,UAAWr6E,EAAUqmG,WACrB/rB,UAAWt6E,EAAUsmG,WACrB/rB,YAAav6E,EAAUumG,aACvB/rB,QAASx6E,EAAUwmG,SACnB/rB,WAAYz6E,EAAUymG,eAM9B,CAOQK,cACN,IAEE,MAAMO,EADe1Y,SAAS2Y,QACAzyE,MAAM,MAEpC,OAAKwyE,GAASl2G,OAGPk2G,EAAQn6C,OAAO,CAAC+jC,EAAGqW,KACxB,MAAMC,EAAcD,EAAOzyE,MAAM,KACjC,OAAI0yE,GAAap2G,QAA6B,QAAnBo2G,EAAY,GAC9BA,EAAY,GAEdtW,QACNnpG,QARD,CASJ,OACE,MAAO,EACT,CACF,CAACzI,SAAAL,KAAA,mBAAAM,iBAhHU+E,EAAU,EAAAhF,SAAAL,KAAA,WAAA+lB,EAAAvlB,IAAA,OAAV6E,EAAU5E,QAAV4E,EAAU3E,UAAAC,WAFT,gBAED0E,CAAU,yCCPhB,MAAM6b,EAAa,YAAI4L,KAA2B,kDCAlD,MAAM7L,EAAa,YAAI6L,KAA6B","names":["GtmAdapterCardService","GtmAdapterService","constructor","super","this","funnelStepGetter","computed","cardName$$","funnelEndGetter","static","t","core","Yz7","factory","ɵfac","providedIn","GtmAdapterLoanService","amountRequested$$","numPayments$$","loanReason$$","loanAmount$$","amount_requested","_amountStore","model$$","requestedLoanAmount","num_payments","_simulatorStore","numOfPayments","loanReasonCode","_purposeStore","loan_reason","_shellStore","loanReasons$$","filter","item","value","map","key","at","loan_amount","data$$","GtmAdapterModule","forRoot","gtmConfig","ngModule","providers","importProvidersFrom","CalGtmModule","provideGtmAdapterService","provide","useFactory","shellStore","inject","ShellStore","canMatchCard$$","matchCard$$","canMatchLoan$$","matchLoan$$","oAB","cJS","AppCloseDirective","onClick","event","headerCloseAction","viewSettings$$","_navAdapter","toConfirm","moveBack","_profileService","terminateProcess","NavigationAdapter","ProfileService","closeAction","lG2","selectors","hostBindings","rf","ctx","$event","AppInitializerDirective","_appTemplate","TemplateRef","_containerRef","ViewContainerRef","_navigationService","NavigationService","_catalogService","CatalogService","_utmService","UtmService","_subscription","Subscription","ngOnInit","create$","change$","addProfileCreatedListener","addProfileChangedListener","createAppProfile$","pipe","takeOnce","subscribe","loadUtmParams$","ngOnDestroy","unsubscribe","changeSub","profile","isNotEmpty","partner","tap","resolveView","resolveCatalog","add","createSub","path","SettingsMap","get","params","view","moveAny","clear","createEmbeddedView","context","ContextBuilder","disableLoader","addUrlModifiers","omitProcess","build","loadAll$","standalone","ProgressTrackerDirective","currentStage$","stage","ApplicationHeaderComponent","Xpm","hostAttrs","features","i0","decls","vars","consts","template","ThemeAssetComponent","PartnerLogoComponent","SecondaryLogoComponent","encapsulation","changeDetection","undefined","ctx_r0","headerCaption$$","value$$","ApplicationProgressComponent","_globalConfig","GlobalConfig","fromText$$","isHidden$$","isProgressHidden","total","totalStages$$","totalComplete","totalCompleteStages$$","calcPercent","ApplicationProgressComponent_ng_container_0_Template","NgIf","ProgressBarComponent","data","animation","FADE_IN_OUT_ANIMATION","ApplicationFooterComponent","ngContentSelectors","_c0","ApplicationViewComponent","_loaderService","LoaderService","_changeDetector","ChangeDetectorRef","showLoader$$","loaderState$$","toggle","isProgressRendered$$","markForCheck","isProgressRendered","routeState","outlet","isActivated","activatedRoute","ApplicationViewComponent_Conditional_1_Template","ApplicationViewComponent_Conditional_6_Template","_r1","RouterModule","i1","LoaderComponent","ROUTE_ANIMATION","partner_r9","lob_r10","brand_r11","partner_r12","route_r14","url","title","_r16","ctx_r15","navigate","DebuggerComponent_ng_container_5_ng_container_28_ng_container_7_Template","ctx_r8","debugForm","invalid","router$","_r18","ctx_r17","launchApp","DebuggerComponent_ng_container_5_ng_container_8_Template","DebuggerComponent_ng_container_5_ng_container_13_Template","DebuggerComponent_ng_container_5_ng_container_18_Template","DebuggerComponent_ng_container_5_ng_container_23_Template","_r7","select","DebuggerComponent_ng_container_5_ng_container_28_Template","ctx_r20","resetMockProcess","_c3","ctx_r1","isCollapsed","partnersList","lobList","brandList","DebuggerComponent","debuggerState","sessionStorage","getItem","_sessionKey","activate","setItem","removeItem","formValue","getRawValue","#rootStore","#router","#changeDetector","#changeEffectRef","#shellStore","#profileService","#formBuilder","#change","#urlFormat","#envService","partnersDic","cal","card","saleOfferCode","salePointCode","loan","flycard","htzone","hashkal","wix","carrefour","bit","payme","bttr","mami","yenotbitan","idf","students","Process","bnpl","signal","RootStore","Router","FormBuilder","EnvironmentService","initialState","lobCode","brandCode","token","triggerCode","uid","acMan","group","FormControl","Validators","required","router","theme","isWebMode","toSignal","valueChanges","startWith","pairwise","prev","next","effect","#buildUrl","allowSignalWrites","flatStages$","stages","length","name","shouldReset","profile$$","storedParams","params$$","hasStoredParams","initParams","isMockMode$$","Object","assign","patchValue","dispatchUpdateProfileParams","toggleView","nextState","set","togglePermanentView","ngAfterViewInit","updateValueAndValidity","destroy","dispatchResetState","window","location","href","navigateByUrl","ngForm","resetForm","URL","queryString","#buildUrlQuery","fullUrl","recommenderId","viewQuery","ElementRef","DebuggerComponent_ng_container_5_Template","NgFor","AsyncPipe","DragDropModule","BrowserModule","i2","MatButtonToggleModule","ReactiveFormsModule","i3","MatSelectModule","i4","i5","i6","MatButtonModule","i7","MatCheckboxModule","i8","MatFormFieldModule","MatSlideToggleModule","styles","SLIDE_UP_DOWN_ANIMATION","ShellErrorsConfig","RootErrorsConfig","localErrors","formatPrefix","formatSuffix","reportLog","remoteErrors","client","scope","min","max","server","ShellMockConfig","MockConfig","_shellConfig","GLOBAL_SETTINGS","environment","isDevMode","isMockMode","ShellThemeConfig","ThemeConfig","themeRoot","themeIconSet","themeSuffix","themeName","themeSource","themeFileId","ErrorsModule","rootErrorsProvider","FeatureShellModule","shellSettings","registerLocaleData","localeHe","provideShellSettings","provideHttpClient","withInterceptors","remoteErrorInterceptor","endpointInterceptor","loaderInterceptor","ErrorHandler","useClass","DefaultErrorHandler","LOCALE_ID","useValue","imports","UiModule","StateModule","ShellStateModule","HttpCommonModule","DateUtilModule","format","locale","ERRORS_CONFIG","MockModule","MOCK_CONFIG","ThemesModule","THEMES_CONFIG","UtmModule","utmConfigProviders","provideUtmService","CommonModule","production","apiUrl","calEdaUri","isSecured","isProxy","rootEndpoint","scanOcrUrl","maxScanOcrAttempts","isScanOcrDisabled","trackingCode","gtmAuth","gtmPreview","gtmCookiesWin","applicationName","configRoute","featureSettings","routes","canActivateChild","navigationGuard","children","amount","loadChildren","__webpack_require__","e","then","bind","m","AmountFeatureModule","agreementIndication","CreditAgreementIndicationFeatureModule","agreementConsent","CreditAgreementConsentFeatureModule","marital","MaritalFeatureModule","expense","ExpenseFeatureModule","income","IncomeFeatureModule","refused","RefusedFeatureModule","country","CountryFeatureModule","introduction","IntroductionFeatureModule","welcome","WelcomeFeatureModule","authGuide","AuthGuideFeatureModule","authOtp","AuthOtpFeatureModule","authLogin","AuthLoginFeatureModule","scanIntro","ScanIntroFeatureModule","scanGender","Promise","all","ScanGenderFeatureModule","scanDocument","ScanDocumentFeatureModule","scanDetails","ScanDetailsFeatureModule","classify","ClassifyFeatureModule","offer","OfferFeatureModule","identity","IdentityFeatureModule","contact","ContactFeatureModule","account","AccountFeatureModule","proposal","ProposalFeatureModule","address","AddressFeatureModule","privacy","PrivacyFeatureModule","CardFeatureModule","employment","EmploymentFeatureModule","purpose","PurposeFeatureModule","debits","DebitsFeatureModule","persona","PersonaFeatureModule","signature","SignatureFeatureModule","onlineUse","OnlineUseFeatureModule","beneficiaries","BeneficiariesFeatureModule","disclosure","DisclosureFeatureModule","delivery","DeliveryFeatureModule","summary","SummaryFeatureModule","demography","DemographyFeatureModule","lead","LeadFeatureModule","simulator","SimulatorFeatureModule","MessageFeatureModule","AppRouterModule","bindToComponentInputs","canceledNavigationResolution","AppHostComponent","mem","injectMemScripts","AppHostComponent_application_view_0_Template","AppHostComponent_ng_container_1_Template","AppModule","bootstrap","provideLottieOptions","player","CalScanModule","ScanConfig","config","urlParams","UTM_PARAMS","UTM_CONFIG","calEdaUri$$","BrowserAnimationsModule","StoreDevtoolsModule","instrument","enableProdMode","__NgCli_bootstrap_1","bootstrapModule","catch","err","console","error","ApiModule","getProcessId","processCode","keys","values","indexOf","coerceNumber","employer","upsell","acfl","CatalogQuery","findResidence","residenceCode","fromResidence","find","findBank","bankCode","fromFinance","findBranchesForBank","branch","findBankBranch","branchCode","filterStreetsByName$","streetQuery","options","of","distinctUntilChanged","switchMap","requestCatalog$","_angular_core__WEBPACK_IMPORTED_MODULE_0__","metadata$$","finance$$","residence$$","isMetadataInProgress","isFinanceInProgress","isResidenceInProgress","_httpService","HttpService","loadMetadata","loadFinance","loadResidence","isMetaDataEmpty","metadataPromise","metadataCatalog","finalize","lastValueFrom","isFinanceEmpty","financePromise","financeCatalog","isResidenceEmpty","residencePromise","residenceCatalog","fromMetadata","endPoint","fetch","catchError","throwError","take","result","isEmptyList","isEmptyCollection","collection","isEmptyObject","list","isEmptyArray","_angular_core__WEBPACK_IMPORTED_MODULE_2__","debitDayCatalog$$","refusedCatalog$$","maritalStatusCatalog$$","MaritalStatusEnum","married","single","leadStatusCatalog$$","LeadStatusEnum","interested","notInterested","onlineUseStatusCatalog$$","genderCatalog$$","icon","yesNoCatalog$$","beneficiaryYesNo$$","locationCatalog$$","CountryEnum","israel","abroad","LocalCatalog","maritalStatusList$$","leadStatusList$$","onlineUseStatusList$$","genderList$$","refusedList$$","InterestTypeEnum","variable","fixed","fixedLinked","SingleBeneficiaryEnum","yes","no","ChannelStatusEnum","accepted","rejected","CreditAgreementStatusEnum","approve","decline","indication","LanguageEnum","Hebrew","Arabic","Russian","Amharic","French","English","BeneficiariesOptionEnum","SpecificBeneficiaries","UnknownBeneficiaries","CommunalAccount","OwnerManagedAccount","LimitedCreditAccount","StateManagedAccount","DelegateManagedAccount","CreditAgreementExpirationYearsPeriodEnum","extendedPeriod","defaultPeriod","IMAGE_STREAM_PREFIX","BaseError","Error","message","stack","output","abort","generateGuid","RemoteError","severityCode","severity","code","safeStatus","response","status","origin","request","headlineMessage","messageCode","Severity","isCodeOfType","char","startsWith","toGenericCodeType","charAt","isWarning","isError","isFatal","isInformation","isSuccess","isUndefined","_angular_core__WEBPACK_IMPORTED_MODULE_1__","SeverityHandler","inspect","remoteError","handler","handlers","isFunction","call","matchSeverity","severityType","firstChar","tapSuccess","callback","tapSeverity","tapInformation","response$","shouldCallback","ErrorsService","_errorsConfig","throwRemoteError","throwLocalError","formatLocalErrorMessage","InjectionToken","FeatureFormComponent","formFactory","form","formName","formGroup","formConfig","locals","sendFn","input","pendingInd","submitted$$","_clientErrors","_submitService","AsyncFnService","send","EventEmitter","complete","overrideSubmit","findFieldConfig","fieldName","theForm","formHandler","onSubmit","stopPropagation","preventDefault","markAllAsTouched","onlySelf","emitEvent","detectChanges","valid","runAsyncMethod","emit","contentQueries","dirIndex","MAT_FORM_FIELD_DEFAULT_OPTIONS","hideRequiredMarker","_c1","FeatureFormComponent_ng_container_0_Template","FormsModule","FieldErrorComponent","#localInjector","Injector","#addStateListeners","control","validation","fieldConfig","targetControl","runInInjectionContext","statusChanges","errors","rawErrors","firstKey","firstError","j","validationHandlers","validationHandler","v","Array","isArray","type","toLowerCase","includes","buildMessage","errorText","inputs","exportAs","FieldErrorComponent_Conditional_0_Template","FIELD_ERROR_ANIMATION","hint","FieldHintComponent","remainingKeys","pristine","touched","isObservable","hintText","FieldHintComponent_Conditional_0_Template","FieldProgressBarComponent","fieldAccessor","FieldProgressBarComponent_Conditional_0_Template","isPending$$","MatProgressBar","_r2","resetValue","FieldResetComponent","formField","#control","#controlValue$$","debounceTime","enableReset$$","disabled","isEmpty","enabled","hostClass","reset","setValue","hostVars","FieldResetComponent_Conditional_0_Template","SubmitButtonComponent","#renderer","#element","Renderer2","nativeButton","nativeElement","querySelector","setAttribute","SignalBased","FilledButtonComponent","composeValidators","validationStates","vfn","forEach","vldHandler","validators","coerceArray","validatorType","concat","composeAsyncValidators","avfn","asyncValidators","shouldUpdateControlState","member","args","defaultControlSettings","updateOn","ExtendedFormControl","formState","markAsTouched$$","markAsTouched","FormField","label","minorLabel","mask","masking","index","elementType","inputType","inputMode","bidi","inputMethod","debounceInterval","throttleInterval","keyProp","valueProp","errorMatcher","hidden","extraData","changeTrigger","maxOptions","detectChangeAt","isPending","valueChange","beforeChange","onInit","onReset","onSelect","onDestroy","updateState","state","stateMember","state$$","findLastNotation","update","setValidators","setAsyncValidators","setValidationLabel","memberValue","y","BooleanField","DateField","MobilePhoneField","NumericField","nextValue","prevValue","SelectField","TextField","EMPTY_FIELD_STATE_ARGS","ValidationPatterns","hebrewChars","hebrewName","hebrewAlphabetical","hebrewAlphaNumeric","englishName","englishVowels","email","mobilePhone","mobileAreaCode","numeric","decimal","formattedDecimal","idNumber","nonZeroDigits","hebConsecutive3","hebConsecutive2","engConsecutive3","engConsecutive2","localeDate","hebSuffixLetters","hebrewPhrase","CustomValidators","idNumberValidator","modulu10Validation","incNum","mone","toString","test","padStart","charCount","i","Number","creditCard","creditCardValidator","creditCardValidation","luhnChk","luhn","len","mul","prodArr","sum","parseInt","count","trimComplete","CustomRangeValidators","minLength","minLengthValidator","isString","isNumber","valueLength","maxLength","maxLengthValidator","FieldValidation","ValidationHandler","hasRequiredValidator","requiredValidator","pattern","formatMessage","coerceObservable","RangeValidationHandler","isMinMaxEqual","specific","ListValidationHandler","options$$","query$$","RequiredValidation","push","RequiredTrueValidation","requiredTrue","PatternValidation","patternValidator","match","M","NumericValidation","numericValidator","MinLengthValidation","MaxLengthValidation","MultiplierValidation","multiplier","multiplierValidator","numericValue","numericMultiplier","NumericRangeValidation","minValueF","numericFormat","maxValueF","minNumber","minNumericValidator","validNumber","maxNumber","maxNumericValidator","DateRangeValidation","minDateF","maxDateF","dateRange","dateRangeValidator","baseYear","DateUtil","isDateInRange","CustomDateValidators","LengthValidation","SpecificLengthValidation","lengthValues","specificLength","specificLengthValidator","matchedLength","join","HebrewNameValidation","hebrewNameValidator","vldResponse","EnglishNameValidation","englishNameValidator","toUpperCase","EmailValidation","emailValidator","IdNumberValidation","SeverityValidation","severityValidator","severities","CustomServerValidators","MobilePhoneValidation","mobilePhoneValidator","MaskValidation","CreditCardValidation","AutoCompleteValidation","emptyList","emptyListValidator","query","option","isKeyInList","CustomListValidators","HebrewConsecutiveCharsValidation","hebrewConsecutiveChars","hebrewConsecutiveCharsValidator","SimpleErrorStateMatcher","isErrorState","isSubmitted","submitted","isInValid","dirty","SimpleErrorMatcherDirective","ErrorStateMatcher","ctx_r6","queryText","AutoCompleteComponent_Conditional_11_Conditional_1_Template","ctx_r3","tmp_1_0","option_r7","_r0","AutoCompleteComponent_mat_option_12_Conditional_3_Template","ctx_r4","queryScope","autoCompleteScrollFactory","overlay","scrollStrategies","close","AutoCompleteComponent","dependantOn","dependencyCtrl","takeUntilDestroyed","#destroyRef","onManualQueryReset","#submittedRef","getFieldLocals","filterElement","inputElement","#lastOption","#onChange","#onTouched","blur","fieldError","markFilterControlDirty","DestroyRef","mirrorControl","applyCustomChangeHandler","addOnResetLocalHandler","applyFilteringBehavior","markAsPristine","markAsUntouched","writeFilterValue","selectedOption","filterControl","writeQueryText","writeValue","registerOnChange","fn","registerOnTouched","setDisabledState","isDisabled","disable","enable","displayFn","onOptionClick","selectOption","onFilterBlur","markValueControlDirty","autoSelectOnBlur","resetValueAndOptions","launchResetCallback","trackByValue","selectedValue","triggerSelectCallback","markAsDirty","resetHandler","localsHandler","resetOptions","cancelValueChangeHandler","queryValidators","filterValidators","valuePair","fromEvent","prevEvent","nextEvent","target","notifyQueryChange","autoSelectedOption","matchOptionForQuery","hasUserSelectedOption","matchKey","fieldState$","MatAutocomplete","MAT_AUTOCOMPLETE_SCROLL_STRATEGY","deps","Overlay","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","AutoCompleteComponent_Conditional_10_Template","AutoCompleteComponent_Conditional_11_Template","AutoCompleteComponent_mat_option_12_Template","tmp_9_0","MatAutocompleteModule","i9","MarkPipe","ScrollingModule","MatProgressBarModule","i10","ButtonToggleGapDirective","tpl","ButtonToggleIconDirective","ButtonToggleItemDirective","ButtonToggleLabelDirective","ButtonToggleTextComponent","ButtonStateDirective","selected","_selected","_pristine","_touched","_dirty","context$","_state","asObservable","buttonState","changeDetector","BehaviorSubject","triggerChange","BaseCustomControl","controlName","model","onChange","onTouched","ButtonToggleComponent_For_2_Conditional_0_ng_template_3_Conditional_0_ng_container_1_Template","ctx_r11","iconTemplate","option_r1","ButtonToggleComponent_For_2_Conditional_0_ng_template_3_Conditional_2_ng_container_1_Template","ctx_r13","buttonTemplate","ctx_r14","buttonSize","ButtonToggleComponent_For_2_Conditional_0_ng_template_3_Conditional_0_Template","ButtonToggleComponent_For_2_Conditional_0_ng_template_3_Conditional_1_Template","ButtonToggleComponent_For_2_Conditional_0_ng_template_3_Conditional_2_Template","ButtonToggleComponent_For_2_Conditional_0_ng_template_3_Conditional_3_Template","_r24","$implicit","ctx_r22","onLabelClick","ButtonToggleComponent_For_2_Conditional_0_Conditional_4_ng_container_1_Template","ctx_r9","labelTemplate","ButtonToggleComponent_For_2_Conditional_0_Conditional_5_ng_container_1_Template","ctx_r10","gap","gapTemplate","_r30","ctx_r28","onButtonClick","ButtonToggleComponent_For_2_Conditional_0_ng_template_3_Template","ButtonToggleComponent_For_2_Conditional_0_Conditional_4_Template","ButtonToggleComponent_For_2_Conditional_0_Conditional_5_Template","childSize","ɵ$index_1_r3","ɵ$count_1_r5","ButtonToggleComponent_For_2_Conditional_0_Template","ButtonToggleComponent","isGraphicButton","allowToggling","allowWrap","itemsPerRow","alignItems","justifyGroup","isWordBreakMode","buttonsGap","change","#selectDefaultValue","#initializeView","timer","buttons","b","selectedButton","#hasRenderedButtons","#resetButtons","#selectButtons","button","isSelectedButton","ButtonToggleComponent_For_2_Template","_c2","NgStyle","NgTemplateOutlet","CheckIndicatorComponent","ButtonContentSlotDirective","RoundedButtonComponent","IconComponent","InputModeDirective","element","ctx_r2","DualNumericInputComponent","minValue","maxValue","step","inputSize","inputWidth","inputValue","showError","#effectRef","isNullOrUndefined","addValueChangeListener","onSliderChange","provideMasking","DualNumericInputComponent_Defer_2_Template","DualNumericInputComponent_Defer_3_DepsFn","DualNumericInputComponent_Conditional_9_Template","showMaskPattern","delimiterChar","prefix","clearForModel","maskPattern","NumericSliderComponent","SelectOnFocusDirective","PanelGroupItemComponent","isOpen","panel","content","enableToggle","bubbleClick","_click","click$","onPanelClick","open","radioButton","checked","ExpansionPanelComponent","MatRadioButton","PanelGroupItemComponent_ng_template_2_Template","PanelGroupItemComponent_ng_template_3_Template","MatExpansionModule","MatRadioModule","PanelGroupComponent","_onChange","_onTouched","_destroyRef","addChangeListener","openAll","accordion","panelClicks$","panels","merge","closeSiblingPanels","updateValueAndState","p","MatAccordion","ErrorDisplayDirective","builder","el","errorDisplay","isVisibleEffect","metadata","enter","leave","create","play","style","transform","opacity","animate","SimpleFieldDirective","_elementRef","hasErrors$","_featureForm","isReady$$","_localInjector","_errorsService","_renderer","initializeField","simpleField","_focusEventRef","_stateEffectRef","field","_valueChangeSubscription","parseOptionValue","addStateListener","applyFieldConfig","applySelectOnFocus","listen","applyBlurOnFocusOut","_blurEventRef","updateExtraDataState","updateLabelState","updateOptionsState","updateDisabledState","updateValidationState","updateHiddenState","updateValue","updatePending","updatePristineState","injector","clearValidators","clearAsyncValidators","isBoolean","isHidden","bidiClass","addInitListener","initCallback","changesCallback","changeCallback","beforeChangeCallback","preferThrottleInterval","source$","throttleTime","leading","trailing","FormConfig","tokens","from","_config","Map","addField","addGroup","addArray","addArrayGroup","fields","f","endGroup","FeatureForm","formBuilder","generate","FormGroup","iterate","isFormValid","formFactory$","resetFactory","factory$","shift","descendants","nextCtrl","addFormCtrl","FormArray","prepareArrayGroups","formArray","flatEntries","k","groupEntries","arrayGroupsIndex","Set","entryKey","split","size","formRef","addControl","array","SimulatorStore","PurposeStore","AmountStore","_identityStore","IdentityStore","_contactStore","ContactStore","baseEventGetter","processType$$","partnerName$$","clientType$$","clientSubType$$","isCardProcess$$","card_name","isLoanProcess$$","partner$$","process_type","partner_name","getCustomerTypeData","customerType","client_sub_type","isNewOrUnknownCustomerType","client_type","isExistCustomerType","isVerifiedCustomer","identityData","contactData","GtmPartnersService","CalGtmService","baseEvent","funnelClick","funnelStep","questionFilled","questionValidation","checkboxClick","funnelEnd","formSent","gtmAdapter","baseEvent$$","baseFunnelStep$$","baseFunnelEnd$$","getBaseEvent","HttpModule","httpConfigProvider","HttpClientModule","HTTP_CONFIG","_http","HttpClient","buildApiUrl","endpoint","buildRequestEndpoint","getOptions","post","put","delete","getHeaders","headers","httpHeaders","append","getParams","HttpParams","fromObject","HttpConfig","tapResult","filterResult","filterStatus","tapStatus","financeCatalogGuard","_ref","_asyncToGenerator","apply","arguments","provideFinanceCatalogGuard","metadataCatalogGuard","provideMetadataCatalogGuard","residenceCatalogGuard","provideResidenceCatalogGuard","DebitsFacade","accountFormat$$","debitsModel","_debitsStore","accountNumber","bankName","branchName","accountOwnerName","DebitsStore","bankNameIntroText$$","bankName$$","accountIntroText","branchWithAccount$$","accountOwnerIntroText$$","accountOwner$$","AccountLabelComponent","branchCode$$","accountNumber$$","accountData$$","dataScope","branchName$$","isInlineDisplay","alias","_debitsFacade","AccountLabelComponent_Conditional_0_Template","AccountLabelComponent_Conditional_1_Template","AccountLabelComponent_Conditional_2_Template","AddressFacade","_catalogQuery","_addressStore","AddressStore","_loginStore","AuthLoginStore","addressFormat$$","addressModel","houseNumber","entrance","appartmentNum","zipCode","zipCode7","residenceName","streetName","addressModel$$","authCustomerData","customerData","customerData$$","updateAddressModel","hasValidAddress$$","streetCode","residence","getResidenceByCode","isContainSt","_effectRef","filterStreets","streets","filterObjects","props","maxResults","filterResidences","residenceQuery","residenceList","getZipCode","street","zipCodeQuery","toUrlParams","includeNulls","updateResidenceName","createEmptyAddressModel","dispatchUpdateModel","updateStreetName","AddressLabelComponent","hasResidence$$","hasStreet$$","hasZipCode$$","_addressFacade","ResidenceComponent","residenceName$$","StreetComponent","streetName$$","houseNumber$$","ZipCodeComponent","zipCode$$","AlertIconComponent","CardFacade","cardFormat","cardData","#cardStore","issuerCardExpirationDate","issuerCardLast4Digits","issuerCardBrandName","CardStore","CardLabelComponent","#cardFacade","#cardData","brandName","last4Digits","expirationDate","ToDatePipe","clubLabel$$","ClubLabelComponent","ClubLabelComponent_Conditional_0_Template","GenderOptionComponent","InfoIconComponent","GtmOtpWarningService","step_title","step_number","sub_process_type","error_type","wrongDetailsPage","GtmOtpWarningCardService","funnelStepEvent","guideClickEvent","component_type","click_text","question_text","submitClickEvent","provideOtpWarningServiceProvider","SCAN_RELATED_FEATURE_NAMES","navigationService","_router","_ngZone","NgZone","_subscriptions","syncNavSub","policy$","policy","withLatestFrom","flatStages","syncRouter","syncWithAnonymousStages","dispatchUpdateFlatStages","shareReplayLast","updateNavSub","events","navEndEvent","NavigationEnd","routeState$","currentRoute","id","dispatchUpdateRouteNavigation","dispatchUpdateAnonymousStages","findStageByCurrentUrl","hasStage","#updateNavigationState","dispatchCreateAnonymousStages","anonymousStages$","nextStage","anonymousStages","matchAnonymous","anonymousStage","editStageNode","isComplete","isPristine","isCurrent","canNavigateTo","combineLatest","canLoadAnonymousRoute","canLoadRoute","navigation$","previousRoute","moveNext","currentStage","screenCode","moveTo","featureName","#navigate","toAlert","nameOrError","settings","toMessage","toGuide","toScanDocument","selectedDocId","navigateAfterScan","#resetScanRelatedStages","toSimulator","cloneImmutableArray","has","stageCode","lastStage","findStageById","nextPossibleStage","dispatchUpdateStageNavigation","updatedFlatStages","updateStagesState","uri","navOutsideZone","run","NavigationDirective","_navigationAdapter","navigator","GtmGenericDialogsService","_dialogConfig","popupPage","okClickEvent","ok","cancelClickEvent","cancel","confirmClickEvent","confirm","setDialogConfig","dialogConfig","provideGtmGenericDialogsService","ctx_r5","dialogContainer","iconName","AlertComponent_ng_template_2_Conditional_0_Template","AlertComponent_ng_template_2_Conditional_1_Template","context_r7","context_r8","_r11","dismissAlert","context_r9","AlertComponent","_gtmService","setGtmDialogConfig","dismissDialog","DialogContainerComponent","DialogIconDirective","AlertComponent_ng_template_2_Template","AlertComponent_ng_template_3_Template","AlertComponent_ng_template_4_Template","AlertComponent_ng_template_5_Template","context_r5","context_r6","_r10","dismissConfirm","ConfirmComponent_ng_template_5_div_1_Template","_r13","ctx_r12","ConfirmComponent","ConfirmComponent_ng_template_2_Template","ConfirmComponent_ng_template_3_Template","ConfirmComponent_ng_template_4_Template","ConfirmComponent_ng_template_5_Template","LinkButtonComponent","_r9","dismissGuide","GuideComponent","GuideComponent_ng_template_2_Template","GuideComponent_ng_template_3_Template","GuideComponent_ng_template_4_Template","GuideComponent_ng_template_5_Template","context_r2","TooltipComponent","TooltipComponent_ng_template_2_Template","DIALOG_DEFAULT_CONFIG","backdropClass","panelClass","TIP_DEFAULT_CONFIG","maxWidth","minHeight","hideCloseIcon","hideIcon","ALERT_DEFAULT_CONFIG","GUIDE_DEFAULT_CONFIG","CONFIRM_DEFAULT_CONFIG","DialogAdapter","#dialogRef","_dialogService","DialogService","component","openAlert","alertConfig","openGuide","guideConfig","openTooltip","tipConfig","openConfirm","confirmConfig","openIllegalNavigationAlert","dismiss","isDevMode$$","route","navService","dialogAdapter","canNavigate","_r8","ctx_r7","moveToCardOwnerGuide","hideDialog","OtpWarningComponent","cardTypeGuide","OtpWarningComponent_ng_template_2_Template","OtpWarningComponent_ng_template_3_Template","OtpWarningComponent_ng_template_4_Template","OtpWarningComponent_ng_template_5_Template","logoAsset","defaultLogoName","logoSettings","isSignal","themeSettings","hasPrimaryLogo","isPrimaryLogoVisible","processName","processId$$","logoSource","logoSourceMatch","PartnerLogoComponent_Conditional_0_Template","productLabel$$","ProductLabelComponent","ProductLabelComponent_Conditional_0_Template","AuthOtpSeverities","_dialogAdapter","showInputErrorDialog","showCancelErrorDialog","onDismiss$","EMPTY","AuthFacade","_authOtpStore","AuthOtpStore","_otpSeverityHandler","isAuthenticated$$","isLoggedIn$$","isNotAuthenticated$$","otpToken$$","isVoiceOtp$$","isVoiceOtp","otpPhoneNumber$$","phone","isMultipleOtpSendAttempts$$","reSendOtp","sendOtp","isRetryOrDirect","showReSendOtpErrorDialog","dispatchUpdateOtpAttemptsCount","sendFirstOtp","dispatchOtpLoadSuccess","screenName","ChannelsFacade","_channelsStore","ChannelsStore","channels357Model$$","spamModel$$","upSaleModel$$","isUpSaleMail$$","isUpSaleMail","isUpSaleSms$$","isUpSaleSms","isRegisteredBanking$$","bankingChannels","every","isClientRegistered","isRegisteredInternet$$","internet","isRegisteredTelephony$$","telephony","isRegisteredSpam$$","spamChannels","isClientRegisteredService","isRegisteredSpamMail$$","spamMail","isRegisteredSpamSms$$","spamSms","isRegisteredUpSale$$","upSaleChannels","isRegisteredAll$$","loadChannels","createModelFromData","dispatchChannelsLoadSuccess","channelsData","channel357","upsales","spam","calMail","banking","word","calSms","ContactFacade","_policyService","PolicyService","contactModel$$","resolveClubMembershipState","membershipState","businessPartner$$","isClubMemRequired","isClubMemberMustField","isVisibleAndRequired","dispatchUpdateClubMembershipState","DisclosureFacade","_disclosureStore","DisclosureStore","disclosureModel$$","simulatorModel","loanProfile","loanProfile$$","loanProfileOption","currentOption$$","loanAmount","reqProfileCode","loanProfileCode","reqAmount","reqPaymentsNum","reqInterest","interest","interestType","gapRate","isVariableInterest$$","createDisclosureModel","CardLeadFacade","isCardLeadFormPresented$$","findFeatureConfig$$","isLeadFormPresented","maxScanAttempts","maxAttemptsViolationLevel","scanCustomization","classNames","iframeFolder","appName","processConfigName","displayTextFileName","ScanSeverities","_scanDocumentStore","ScanDocumentStore","_navService","scanErrorHandlers","failedScanAttemptAlert","oldIdentificationCardAlert","genericAlert","cardQuotaAlert","ScanFacade","#scanSeverities","#httpService","#scanDocumentStore","#navAdapter","#shellConfig","genderName$$","gender","calScanService","CalScanService","documentToScanOptions$$","isOcrFailed$$","error$$","selectedDocToScan$$","updateDocNameForDisplay","documentToScanOptions","reverse","updateGender","dispatchSubmitScanDocument","isMaxAttemptsExceeded$$","isMaxAttemptsExceeded","scan$","dispatchLoadScanDocument","scanSelectedDocument$","dispatchSubmitScanDocumentFailure","handleScanError","scannerResponse","hasMaxAttemptsWarning","dispatchUpdateMaxAttemptsError","handleDisabledOcr","token$$","createScanOfDocByCode$","resolveType","serverUrl","listenToScanMessages","handleScanSuccess","knownErrorCodeHandler","knownErrorNameHandler","convertScanDataToModel","sendScanDocument","images","documents","dispatchSubmitScanDocumentSuccess","date_of_birth","id_number","first_name_hebrew","last_name_hebrew","first_name_english","last_name_english","date_of_issue","date_of_expiry","birthDate","castDate","engFirstName","engLastName","expiryDate","firstName","idIssueDate","idNum","lastName","calculateGenderCode","replace","SimulatorFacade","#policyService","#simulatorConfig$$","isLoanAmountReadonly$$","isLoanAmountReadonly","approvedLoanAmount$$","approvedLoanAmount","text","maxLoanAmount","updateLoanAmount","BaseFeatureView","isPendingSubmit","navigateBack","openDialog","ScanComponent","renderer","elementRef","scanFacade","iframeOrError","scanMethod","scanIframe","iframeOrSrc","HTMLIFrameElement","appendChild","removeIframe","removeChild","hasSecondaryLogo","isSecondaryLogoVisible","SecondaryLogoComponent_Conditional_0_Template","ConfigFacade","text$$","configDictionary$$","indication$$","links$$","links","fromConfig","fromIndication$$","ind","fromParams$$","fromLinks$$","dictionary","FeatureConfig","_featureSettings","featuresConfig$$","FEATURE_SETTINGS","globalConfig$$","provideFeatureConfig","ExitButtonDirective","addClickListener","_clickEventRef","exitButton","GuideLinkDirective","guideLink","TemplateAssertDirective","_templateRef","_injector","_toggleRef","isMatch$$","isMatch","IsUnVerifiedCustomerDirective","_customerFacade","isVerifiedCustomer$$","CustomerFacade","IsVariableInterestDirective","_disclosureFacade","MultiAssertionDirective","multiAssertionProcess","_process$$","multiAssertionAccount","_account$$","multiAssertionScope","_scope$$","IS_CARD_PROCESS","IS_LOAN_PROCESS","isNewAccount$$","isExistentAccount$$","isMatchProcess","isMatchAccount","multiAssertion","IsCardProcessDirective","IsLoanProcessDirective","GlobalSeverities","invalidIssueDateAlert","feature","_globalSeverityHandlers","handleError","anyError","handleRemoteError","handleLocalError","formattedMessage","Console","logError","localError","globalErrorHandler","#getGlobalErrorHandler","httpError","continueProcess","dispatchSaveError","FeatureConfigDirective","currentConfig$$","_featureConfig","fromIndications$$","featureConfig","IndicationConfigDirective","addChangeEffect","IndFalseConfigDirective","indFalseConfig","IndTrueConfigDirective","indTrueConfig","TextConfigDirective","textConfig","FeatureSettingsDirective","hasStickyFooter","isFooterFixed","dispatchUpdateShellView","FeatureIconDirective","FeatureTitleDirective","FeatureIntroDirective","FeatureBodyDirective","FeatureFooterDirective","FixedFooterToggleDirective","fixedFooterToggle","FeatureViewComponent_ng_container_0_ng_container_2_Template","FeatureViewComponent_ng_container_1_ng_container_3_Template","titleTemplate","FeatureViewComponent_ng_container_2_ng_container_3_Template","introTemplate","FeatureViewComponent_ng_container_3_ng_container_2_Template","bodyTemplate","FeatureViewComponent_ng_container_4_ng_container_2_Template","footerTemplate","FeatureViewComponent","FeatureViewComponent_ng_container_0_Template","FeatureViewComponent_ng_container_1_Template","FeatureViewComponent_ng_container_2_Template","FeatureViewComponent_ng_container_3_Template","FeatureViewComponent_ng_container_4_Template","FeatureService","configText$$","featureConfig$$","configIndication$$","configLink$$","configParams$$","fromFinanceCatalog","fromMetadataCatalog","coerceDictionary","fromLink$$","findConfig$$","getBirthDateValidationRange","dateDiff","unit","validatorTypeComparer","a","createHebrewNameField","mergeArrays","createEnglishNameField","createEmailField","createMobilePhoneField","mobilePhoneMask","createIdNumberField","numericMask","numOfDigits","createBirthDateField","dateMask","createGenderField","#loaderMap","isLoaderOn","loader","loader$$","LoaderComponent_Defer_0_Conditional_1_Template","LoaderComponent_Defer_0_Conditional_2_Template","LoaderComponent_Defer_0_Conditional_3_Template","tmp_0_0","#loaderEffectRef","#animInterval","#spoolAnimations","animations","nextAnimation","duration","setTimeout","log","clearTimeout","#loaderService","hostAnimation","LoaderComponent_Defer_0_Template","LoaderComponent_Defer_1_DepsFn","MatProgressSpinnerModule","loaderService","isLoaderDisabled","getLoaderContext","delay","resolveLoaderToken","bllContext","HTTP_CONTEXT","THEME_CONTEXT","httpContext","urlWithParams","method","updateFeatureConfig","isDefined","PartnerUpdatesService","#partnerName","updatePartnerHistory","partnerSettings","useHistoryForPartnerUpdates","history","replaceState","#catalogQuery","#debitsStore","#identityStore","#contactStore","#addressStore","#loginStore","#classifyStore","#errorsService","#customerStore","loadCustomer","dispatchCustomerLoad","customer","dispatchCustomerLoadSuccess","distributeLoginData","#updateContactModel","displayPhoneNumber","firstNameEng","lastNameEng","#updateAddressModel","updateIdentityModel","firstNameHeb","lastNameHeb","#updateDebitsModel","bank","ClassifyStore","CustomerStore","hasCustomerResponse$$","idNumber$$","hasPolicy$$","policy$$","classifyModel","isNewCustomer$$","customer$$","isNewCustomer","isNotNewCustomer$$","isUnVerifiedCustomer$$","HttpContextToken","mock","resolvers","CommonHttpConfig","_globalSettings","useProxy","HttpHeaders","buildRootEndpoint","action","urlModifier","requestContext","urlModifiers","processKey","coerceString","baseUrl","overrideUrl","urlBuilder","authKey","authToken","clone","_defaultContext","_context","getContext","newContext","HttpContext","enableLoader","addMockArgs","mockArgs","withLoaderAnimation","MockService","attachMockArgs","processId","JSON","stringify","mockInterceptor","mockConfig","mockService","defaultLoanProfile$$","customerId$$","agreementConfig","isNewAccount","dispatchUpdateFeatureConfig","loadPolicy","dispatchLoadPolicy","resolve","policyParams","excludeEmptyValues","dispatchLoadPolicyFailure","dispatchUpdateProcessProfile","dispatchUpdateStages","changeEmitter","createEmitter","isProfileCreated","productName","matchCard","matchAcfl","matchAcfl$$","matchBnpl","matchBnpl$$","matchLoan","_themeService","ThemeService","_rootStore","compareParams","nextParams","currentParams","exitReason","exitUrl","isValidUrl","defaultUrl","customerExitUrl","errorUrl","rawUrl","_this","parseProfileParams","isValidParams","shouldCreateNewProfile","createProfile","reloadProfile","_x","_this2","loadTheme","profileParams","_this3","createWebProfile","createDefaultProfile","_this4","nextProfile","initializeProfile","finalizeProfile","sanitizeParams","obj","ff","entries","reduce","acc","_this5","description","_this6","hasQueryString","queryStringToObject","extendDefaultParams","params$","hasNextParams","hasCurrentParams","updateUrlParams","targetObject","policyGuard","policyService","customerFacade","isLoan$$","catalogService","policyResult","IS_BNPL_PROCESS","canMatchBnpl$$","canMatchAnyLoan$$","DEFAULT_NAVIGATION_OPTIONS","isExplicitNavigation","currentStageId","filterParamsFromUrl","findStageByFullUrl","throwStageNotFoundError","throwNavigationNotAllowedError","targetUrl","anonymous","targetStage","preMandatoryStage","stageId","sourceStages","mapStage","findStageIndex","searchCriteria","isActive","findIndex","flatStage","updateOptions","currentIndex","updatedStage","updateStageState","targetNode","pathArray","parentStage","child","concatPathFromArray","nextStageParent","findSourceStage","nextFlatStage","pathString","_angular_core__WEBPACK_IMPORTED_MODULE_3__","DEFAULT_FEATURE_SETTINGS","#features","loaderOptions","load","#theme","iconSet","#partner","partnerName","agreementConsentConfirm","alert","guide","cvvGuide","creditLineGuide","personaGuide","bdiAlert","identityValidationAlert","accountVerificationAlert","exitConfirm","optOutOtpConfirm","noDocumentToScanAlert","cardIdentificationAlert","debitCardAlertComponent","cardVerificationAlert","partnerSummaryAlert","loanAmountRefused","addCardToWalletAlert","provideFeatureSettings","AccountActions","createAction","loadSuccess","loadFailure","submit","submitSuccess","submitFailure","AccountEffects","actions$","sendAccountEffect$","createEffect","ofType","dispatch","StateBuilder","mutation","_mutation","toError","mutateError","toLoading","toLoaded","initialAccountState","uiState","accountReducerFn","createReducer","on","accountReducer","AccountSelectors","accountState","createSelector","AccountStateModule","EffectsModule","forFeature","StoreModule","StateFacade","selectSignal$","selector","store","selectSignal","select$","StateAccessService","stateFacade","_facade","AccountStore","state$","dispatchAccountReset","dispatchAccountLoad","dispatchAccountLoadSuccess","AddressActions","updateModel","AddressEffects","sendAddressEffect$","initialAddressState","addressReducerFn","addressReducer","AddressSelectors","addressState","AddressStateModule","dispatchAddressReset","dispatchAddressLoad","dispatchAddressLoadSuccess","dispatchAddressSubmit","dispatchAddressSubmitSuccess","AmountActions","AmountEffects","sendAmountEffect$","initialAmountState","amountReducerFn","amountReducer","AmountSelectors","amountState","AmountStateModule","minLoanAmount$$","minLoanAmount","maxLoanAmount$$","dispatchAmountReset","dispatchAmountSubmit","dispatchAmountSubmitSuccess","dispatchAmountLoad","dispatchAmountLoadSuccess","AuthActions","resetGuide","loadGuide","loadGuideSuccess","loadGuideFailure","submitGuide","submitGuideSuccess","submitGuideFailure","resetOtp","incOtpSendAttemptCount","updateOtpModel","loadOtp","loadOtpSuccess","loadOtpFailure","submitOtp","submitOtpSuccess","submitOtpFailure","resetLogin","loadLogin","loadLoginSuccess","loadLoginFailure","submitLogin","submitLoginSuccess","submitLoginFailure","AuthEffects","sendOtpSuccessEffect$","sendLoginSuccessEffect$","initialAuthGuideState","authGuideReducerFn","initialAuthOtpState","otpSendAttemptsCount","authOtpReducerFn","loginAttemptCount","authOtpReducer","initialAuthLoginState","authLoginReducerFn","authLoginReducer","AuthSelectors","authOtpState","otp","authLoginState","login","otpModel","otpState","otpData","loginModel","loginState","loginData","customerLoginData","accountLoginData","isLoggedIn","AuthLoginStateModule","AuthOtpStateModule","AuthGuideStore","dispatchAuthGuideReset","dispatchGuideLoad","dispatchGuideLoadSuccess","dispatchGuideLoadFailure","dispatchGuideSubmit","dispatchGuideSubmitSuccess","dispatchGuideSubmitFailure","dispatchLoginReset","dispatchLoginLoad","dispatchLoginLoadSuccess","dispatchLoginLoadFailure","dispatchLoginSubmit","dispatchLoginSubmitSuccess","dispatchLoginSubmitFailure","sendOtpAttemptsCount$$","dispatchAuthOtpReset","dispatchOtpLoad","dispatchOtpUpdateModel","dispatchOtpLoadFailure","dispatchOtpSubmit","dispatchOtpSubmitSuccess","dispatchOtpSubmitFailure","BeneficiariesActions","addBeneficiary","removeBeneficiary","updateBeneficiaryFormMode","removeAllBeneficiaries","updateBeneficiary","selectBeneficiary","resetBeneficiary","BeneficiariesEffects","sendBeneficiariesEffect$","initialBeneficiariesState","beneficiaryFormMode","addedBeneficiaries","selectedBeneficiary","beneficiariesReducerFn","beneficiary","beneficiaryIndex","splice","beneficiariesReducer","BeneficiariesSelectors","beneficiariesState","BeneficiariesStateModule","BeneficiariesStore","addedBeneficiaries$$","selectedBeneficiary$$","beneficiaryFormMode$$","dispatchBeneficiariesReset","dispatchAddBeneficiary","dispatchRemoveBeneficiary","dispatchRemoveAllBeneficiaries","dispatchUpdateBeneficiaryFormMode","dispatchUpdateBeneficiary","dispatchBeneficiariesLoad","dispatchBeneficiariesLoadSuccess","dispatchBeneficiariesSubmitSuccess","dispatchBeneficiariesSubmit","dispatchSelectBeneficiary","dispatchResetSelectedBeneficiary","CardActions","CardEffects","sendCardEffect$","initialCardState","cardReducerFn","cardReducer","CardSelectors","cardState","CardStateModule","dispatchCardReset","dispatchCardLoad","dispatchCardLoadSuccess","dispatchCardSubmit","dispatchCardSubmitSuccess","ChannelsActions","ChannelsEffects","sendChannelsEffect$","initialChannelsState","channelsReducerFn","channelsReducer","ChannelsSelectors","channelsState","channels","channels357Model","channelsModel","spamModel","upSaleModel","ChannelsStateModule","dispatchChannelsReset","dispatchChannelsLoad","ClassifyActions","classifyReducerFn","initialClassifyState","ClassifySelectors","classifyState","dispatchClassifySubmit","dispatchClassifySubmitSuccess","ContactActions","updateClubMembership","ContactEffects","sendContactEffect$","initialContactState","clubMembership","contactReducerFn","modelState","contactReducer","ContactSelectors","contactState","ContactStateModule","clubMembershipState$$","dispatchContactReset","clubMembershipState","dispatchContactLoad","dispatchContactLoadSuccess","dispatchContactSubmit","dispatchContactSubmitSuccess","CountryActions","initialCountryState","countryReducerFn","CountrySelectors","countryState","CountryStore","dispatchCountryReset","dispatchCountryLoad","dispatchCountryLoadSuccess","CreditAgreementActions","CreditAgreementEffects","sendCreditAgreementEffect$","initialCreditAgreementState","creditAgreementReducerFn","creditAgreementReducer","CreditAgreementSelectors","creditAgreementState","creditAgreement","CreditAgreementStateModule","CreditAgreementStore","dispatchCreditAgreementReset","dispatchUpdateCreditAgreementModel","dispatchCreditAgreementLoad","dispatchCreditAgreementLoadSuccess","dispatchCreditAgreementSubmit","dispatchCreditAgreementSubmitSuccess","CustomerActions","initialCustomerState","hasCustomerResponse","customerReducerFn","CustomerSelectors","customerState","dispatchCustomerReset","DebitsActions","DebitsEffects","sendDebitsEffect$","initialDebitsState","debitsReducerFn","debitsReducer","DebitsSelectors","debitsState","DebitsStateModule","dispatchDebitsReset","dispatchDebitsLoad","dispatchDebitsLoadSuccess","dispatchDebitsSubmit","dispatchDebitsSubmitSuccess","dispatchDebitsLoadFailure","DeliveryActions","loadTimeTable","loadTimeTableSuccess","loadTimeTableFailure","DeliveryEffects","sendDeliveryEffect$","initialDeliveryState","deliveryReducerFn","deliveryTimetable","formsKitDelivery","deliveryReducer","DeliverySelectors","deliveryState","timeTable","DeliveryStateModule","DeliveryStore","timetable$$","dispatchDeliveryReset","dispatchDeliveryLoad","dispatchDeliveryLoadSuccess","dispatchDeliverySubmit","dispatchDeliverySubmitSuccess","dispatchLoadTimeTable","dispatchLoadTimeTableSuccess","dispatchLoadTimeTableFailure","DemographyActions","initialDemographyState","demographyReducerFn","DemographySelectors","demographyState","DemographyStore","dispatchDemographySubmit","dispatchDemographySubmitSuccess","DisclosureActions","DisclosureEffects","sendDisclosureEffect$","initialDisclosureState","disclosureReducerFn","disclosureReducer","DisclosureSelectors","disclosureState","DisclosureStateModule","dispatchDisclosureReset","dispatchDisclosureLoad","dispatchDisclosureLoadSuccess","dispatchDisclosureSubmit","dispatchDisclosureSubmitSuccess","EmploymentActions","EmploymentEffects","sendEmploymentEffect$","initialEmploymentState","employmentReducerFn","employmentReducer","EmploymentSelectors","employmentState","EmploymentStateModule","EmploymentStore","dispatchEmploymentReset","dispatchEmploymentLoad","dispatchEmploymentLoadSuccess","dispatchEmploymentSubmit","dispatchEmploymentSubmitSuccess","ExpenseActions","ExpenseEffects","sendExpenseEffect$","initialExpenseState","expenseReducerFn","expenseReducer","ExpenseSelectors","expenseState","ExpenseStateModule","ExpenseStore","dispatchExpenseReset","dispatchExpenseLoad","dispatchExpenseLoadSuccess","IdentityActions","IdentityEffects","sendIdentityEffect$","initialIdentityState","identityReducerFn","identityReducer","IdentitySelectors","identityState","IdentityStateModule","dispatchIdentityReset","dispatchIdentitySubmit","dispatchIdentitySubmitSuccess","dispatchIdentityLoadSuccess","IncomeActions","IncomeEffects","sendIncomeEffect$","initialIncomeState","incomeReducerFn","incomeReducer","IncomeSelectors","incomeState","IncomeStateModule","IncomeStore","dispatchIncomeReset","dispatchSubmitLoad","dispatchIncomeLoadSuccess","dispatchSubmitSubmit","dispatchIncomeSubmitSuccess","IntroductionActions","initialIntroductionState","introductionReducerFn","IntroductionSelectors","introductionState","IntroductionStore","dispatchIntroductionReset","dispatchIntroductionLoad","dispatchIntroductionLoadSuccess","dispatchIntroductionSubmit","dispatchIntroductionSubmitSuccess","LeadActions","LeadEffects","sendLeadEffect$","initialLeadState","LeadReducerFn","leadReducer","LeadSelectors","leadState","LeadStateModule","LeadStore","dispatchLeadReset","dispatchLeadLoad","dispatchLeadLoadSuccess","dispatchLeadSubmit","dispatchLeadSubmitSuccess","MaritalActions","MaritalEffects","sendMaritalEffect$","initialMaritalState","maritalReducerFn","maritalReducer","MaritalSelectors","maritalState","MaritalStateModule","MaritalStore","dispatchMaritalReset","dispatchMaritalLoad","dispatchMaritalLoadSuccess","dispatchMaritalSubmit","dispatchMaritalSubmitSuccess","OfferActions","offerReducerFn","initialOfferState","OfferSelectors","offerState","OfferStore","dispatchOfferLoad","dispatchOfferSubmit","dispatchOfferLoadSuccess","dispatchOfferSubmitSuccess","OnlineUseActions","OnlineUseEffects","sendOnlineUseEffect$","initialOnlineUseState","onlineUseReducerFn","onlineUseReducer","OnlineUseSelectors","onlineUseState","OnlineUseStateModule","OnlineUseStore","dispatchOnlineUseReset","dispatchOnlineUseLoad","dispatchOnlineUseLoadSuccess","PersonaActions","PersonaEffects","sendPersonaEffect$","initialPersonaState","personaReducerFn","personaReducer","PersonaSelectors","personaState","PersonaStateModule","PersonaStore","dispatchPersonaReset","dispatchPersonaLoad","dispatchPersonaLoadSuccess","dispatchPersonaSubmit","dispatchPersonaSubmitSuccess","PrivacyActions","PrivacyEffects","sendPrivacyEffect$","initialPrivacyState","privacyReducerFn","privacyReducer","PrivacySelectors","privacyState","PrivacyStateModule","PrivacyStore","dispatchPrivacyReset","dispatchPrivacyLoad","dispatchPrivacyLoadSuccess","dispatchPrivacySubmit","dispatchPrivacySubmitSuccess","ProposalActions","ProposalEffects","sendProposalEffect$","initialProposalState","proposalReducerFn","proposalReducer","ProposalSelectors","proposalState","ProposalStateModule","ProposalStore","dispatchProposalReset","dispatchProposalLoad","dispatchProposalLoadSuccess","dispatchProposalSubmit","dispatchProposalSubmitSuccess","PurposeActions","PurposeEffects","sendPurposeEffect$","initialPurposeState","purposeReducerFn","purposeReducer","PurposeSelectors","purposeState","PurposeStateModule","dispatchPurposeReset","dispatchPurposeLoad","dispatchPurposeSubmit","dispatchPurposeLoadSuccess","dispatchPurposeSubmitSuccess","RefusedActions","RefusedEffects","sendRefusedEffect$","initialRefusedState","refusedReducerFn","refusedReducer","RefusedSelectors","refusedState","RefusedStateModule","RefusedStore","dispatchRefusedReset","dispatchRefusedLoad","dispatchRefusedLoadSuccess","dispatchRefusedSubmit","dispatchRefusedSubmitSuccess","ScanActions","resetScanDocument","loadScanDocument","submitScanDocument","submitScanDocumentSuccess","submitScanDocumentFailure","updateMaxAttemptsError","ScanEffects","sendScanDocumentEffect$","initialScanDocumentState","scanDocumentReducerFn","completeModel","completeData","scanDocumentReducer","ScanSelectors","ScanDocumentState","scanDocumentStateModel","scanDocumentStateError","scanDocumentStateData","ScanStateModule","dispatchScanReset","SignatureActions","loadFormContent","loadFormContentSuccess","loadFormContentFailure","loadFormsPreview","loadFormsPreviewSuccess","loadFormsPreviewFailure","updateFormStatus","updateFormStatusSuccess","updateFormStatusFailure","initialSignatureState","signatureReducerFn","groupPreview","formGroups","slice","targetGroup","targetForms","forms","signed","groupIndex","SignatureSelectors","signatureState","formPreviewGroups","SignatureStore","previewGroups$$","dispatchSignatureReset","dispatchUpdateFormState","dispatchUpdateFormStateSuccess","dispatchUpdateFormStateFailure","dispatchLoadFormsPreview","dispatchSignatureLoadSuccess","dispatchSignatureLoadFailure","dispatchFormContentLoad","fileId","dispatchFormContentLoadSuccess","formContent","dispatchFormContentLoadFailure","dispatchSignatureSubmitSuccess","SimulatorActions","selectProfileOption","unSelectProfileOption","initialSimulatorState","profileOption","simulatorReducerFn","SimulatorSelectors","simulatorState","loanProfiles","frameReduction","_allLoanProfiles$$","loanProfileOptions$$","loanProposalOptions","frameReduction$$","defaultProfileOption$$","profiles","dispatchSimulatorReset","dispatchUnSelectProfileOption","dispatchSelectProfileOption","dispatchSimulatorLoad","dispatchSimulatorLoadSuccess","dispatchSimulatorLoadFailure","dispatchSimulatorSubmit","dispatchSimulatorSubmitSuccess","dispatchSimulatorSubmitFailure","SummaryActions","sendAuthLink","SummaryEffects","sendSummaryEffect$","initialSummaryState","summaryReducerFn","summaryReducer","SummarySelectors","summaryState","loanData","SummaryStore","loadDetails$$","dispatchSummaryReset","dispatchSummaryLoad","dispatchSummaryLoadSuccess","SummaryStateModule","UtmActions","loadParams","initialUtmState","utmSource","utmMedium","utmCampaign","utmTerm","utmContent","utmReducerFn","UtmSelectors","utmState","utm","UtmStore","utmParams$$","dispatchUtmReset","dispatchUtmLoad","RootActions","rootMetaReducers","persistStateReducer","reducer","storageKey","persisted","parse","newState","clearStateReducer","ShellActions","updateProfileParams","updateProcessProfile","updateShellView","saveAppError","loadPolicyFailure","updateProgressValue","updateAnonymousStage","createAnonymousStage","updateStages","updateFlatStages","updateRouteNavigation","updateStageNavigation","initialShellState","navigation","progressValue","loaded","loading","shellReducerFn","viewState","modules","moduleIndex","moduleData","cloned","navigationState","targetStages","totalsState","completeCount","pristineCount","totalPristine","previousStage","currentProfile","errorsState","shellReducer","ShellSelectors","shellState","shell","appState","mode","profileState","process","loanReasons","globalConfig","global","featuresConfig","businessPartner","navState","nextRoute","totalPristineStages","totalCompleteStages","initialRootState","root","rootReducerFn","rootReducers","introductionReducer","customerReducer","classifyReducer","offerReducer","countryReducer","simulatorReducer","signatureReducer","demographyReducer","utmReducer","rootReducer","_store","Store","selectDomain$","domain","matchProcess","processQuery","errors$","errors$$","partner$","uiState$","stages$","previousStage$","nextStage$$","previousRoute$","currentRoute$","nextRoute$","totalPristineStages$$","processMode$$","loanProfiles$$","progress$$","selectError$","errorDictionary","dispatchShellReset","ShellEffects","dispatchLoadPolicySuccess$","metaReducers","runtimeChecks","strictStateImmutability","strictActionImmutability","themeConfigProvider","APP_BASE_HREF","platform","getBaseHrefFromDOM","PlatformLocation","#document","#config","rootElement","DOCUMENT","loadThemeFile","getFullThemeName","themeConfig","fileName","extendTheme","themePromise","createDomHeadEl","replaceThemeClass","fullThemeName","themeLink","getElementById","head","getElementsByTagName","createElement","rel","themeClass","classList","themeClassesToRemove","remove","SanitizePipe","assetContent$$","ThemeAssetComponent_Conditional_0_Defer_0_Template","ThemeAssetComponent_Conditional_0_Defer_1_DepsFn","responsiveSize","autoSize","maxWidthValue","#themeConfig","themeIcons","#themeService","asset","exactPath","partition","extension","source","loadViaHttp","flow","#loadDynamically","assetPath","responseType","ThemeAssetComponent_Conditional_0_Template","ThemeAssetComponent_Conditional_1_Template","trigger","transition","TOGGLE_CHECK_ANIMATION","optional","DIALOG_ANIMATION","SLIDE_LEFT_RIGHT_ANIMATION","SLIDE_LEFT_ANIMATION","RESET_ROUTE_ANIMATION","FLIP_ANIMATION","position","top","left","width","height","transformOrigin","BaseButtonComponent","inlineClass","inlineBlockClass","blockClass","sizeClass","buttonEl","clickFnTrailTime","iconSize","hasRootTemplate","pending","clickFn","_asyncClickService","click","ButtonLabelSlotDirective","CardFooterDirective","CardBodyDirective","CardTitleDirective","CardContainerComponent_ng_container_0_ng_container_2_Template","CardContainerComponent_ng_container_1_ng_container_2_Template","CardContainerComponent_ng_container_2_ng_container_2_Template","CardContainerComponent","justifyContent","CardContainerComponent_ng_container_0_Template","CardContainerComponent_ng_container_1_Template","CardContainerComponent_ng_container_2_Template","FlexElementDirective","renderer2","setStyle","FlexLayoutAlignDirective","layoutAlign","boxAxes","matchAlignmentPattern","mainAxis","crossAxis","FlexLayoutDirective","flexDisplay","setLayout","CardIllustrationComponent","imageExtension","_imageId","cardImageId","ownerName","toggleCheckAnimation","show","confirmIconName","ConfirmButtonComponent","isConfirmed","ConfirmButtonComponent_ng_container_1_Template","ConfirmButtonComponent_ng_container_2_Template","PanelTitleDirective","PanelBodyDirective","ExpansionPanelComponent_ng_container_3_ng_container_2_Template","panelTitle","ExpansionPanelComponent_ng_container_4_ng_container_1_Template","panelBody","headerMode","hasToggle","headerClass","expanded","MatExpansionPanel","ExpansionPanelComponent_ng_container_3_Template","ExpansionPanelComponent_ng_container_4_Template","FabButtonComponent","FabButtonComponent_Conditional_1_Template","iconPlacement","selfPosition","trailTime","FilledButtonComponent_Conditional_1_Template","widthHeight","responsiveWidth","responsiveHeight","iconVariant","hostClassList","defaultClasses","format_r1","fractions","suffix","NumericLabelComponent_ng_container_0_span_1_Template","NumericLabelComponent_ng_container_0_span_4_Template","NumericLabelComponent_ng_container_0_span_5_Template","NumericLabelComponent","format$","_readyEmitter","currencySymbol","percentSymbol","fractionDigits","fractionsIndex","formatPattern","fractionsParts","decimalPipe","presetFormat","isUnifiedSize","ngOnChanges","changes","currentValue","previousValue","formatNumericValue","formattedValue","getPrefixValue","getSuffixValue","getFractionsValue","getNumericValue","trim","isAbsoluteMode","parseFloat","negativeIndex","fractionIndex","DecimalPipe","ToDecimalPipe","NumericLabelComponent_ng_container_0_Template","interestClass","interestValue","interestPattern","InterestLabelComponent_Case_1_span_9_Template","InterestLabelComponent_Case_1_span_10_Template","primeGapClass","primeGapValue","primeGapPattern","isNegativeGap","InterestLabelComponent","interestTypeEnum","InterestLabelComponent_Case_0_Template","InterestLabelComponent_Case_1_Template","InterestLabelComponent_contFlowTmp","decoration","LinkButtonComponent_Conditional_1_Template","LinkButtonComponent_Conditional_4_Template","MatRippleModule","initialValue","trackSize","val","_value","Math","recalcProgress","ProgressSpinnerComponent","thickness","diameter","_r4","RoundedButtonComponent_Conditional_0_ng_container_1_Template","buttonContent","RoundedButtonComponent_Conditional_1_ng_container_1_Template","RoundedButtonComponent_Conditional_0_Template","RoundedButtonComponent_Conditional_1_Template","SignaturePadComponent","_defaultSignatureConfig","signaturePadConfig","document","drawEnd","offsetWidthEmitter","offsetHeightEmitter","signatureSubs","isMouseDownOrTouchedEmitter","isDrawingInterrupted","signatureColor","signatureLineWidth","isEditEnabled","resizeThrottle","drawThrottle","minSignatureLengthToRatio","isSaveEnabled","offsetWidth$","offsetHeight$","signatureSize","createOnDrawingStartPipe","createOnDrawingPipe","createOnDrawingEndPipe","createOnWindowResizePipe","createOnMouseOutPipe","onChangeCallbackFunction","validate","isSignatureValid","onSignatureEnd","onClear","signatureCanvas","clearRect","scrollWidth","scrollHeight","touchStart$","mouseDown$","touchOrMouseStartSubscription","raceWith","touchDrawing$","mouseDrawing$","drawingSubscription","_","isDrawing","getCoordinateFromEvent$","previousCoordinate","currentCoordinate","drawToCanvas","calculateCoordinatesDistance","isOutOfCanvasBoundingBox","signatureAsDataUrl","touchEnd$","mouseUp$","touchOrMouseEndSubscription","windowResizeSubscription","defaultView","mouseOutSubscription","getMousePosition","X","clientX","getClientRects","x","Y","clientY","getTouchPosition","changedTouches","beginPath","lineTo","strokeStyle","lineWidth","stroke","closePath","isNaN","coordinate","offsetWidth","offsetHeight","coordinate1","coordinate2","sqrt","pow","toDataURL","NG_VALIDATORS","MatIconModule","#moneyPipe","showTicks","debounce","showLabels","valueChangeEnd","hideTickLabels","floor","ceil","showSelectionBar","hidePointerLabels","showTicksValues","showSelectionBarFromValue","translate","#bindChangeEvent","userChange","sliderInstance","fromChangeEvent","SliderComponent","NgxSliderModule","NumericPipesModule","FlexChildDirective","flex","maxWidthPct","flexChild","flexArgs","matchFlexChildPattern","grow","flexLiteralToCssRule","flexExpression","shrink","basis","literal","FlexSelfAlignDirective","selfAlign","#elementRef","#destroyFocusListener","OverlayAccessor","backdropClick$","overlayRef","backdropClick","_dismissEmitter","Subject","dispose","DialogRef","OVERLAY_DEFAULT_CONFIG","isModal","hasBackdrop","OverlayService","getScrollStrategy","reposition","getPosition","flexibleConnectedTo","withPositions","getPositionAnchors","withFlexibleDimensions","withPush","centerHorizontally","centerVertically","extendConfig","overlayAccessor","createInjector","portal","ComponentPortal","attach","scrollStrategy","autoClose","scrollThrottle","positionStrategy","originX","originY","overlayX","overlayY","offsetX","offsetY","DIALOG_CONFIG","DIALOG_FULL_SCREEN_CONFIG","isFullScreen","overlayConfig","parent","DialogTitleDirective","DialogBodyDirective","DialogFooterDirective","_r6","DialogContainerComponent_ng_container_1_ng_container_2_Template","DialogContainerComponent_ng_container_2_ng_container_3_Template","DialogContainerComponent_ng_container_3_ng_container_2_Template","preventScroll","DialogContainerComponent_ng_container_4_ng_container_3_Template","hasCloseButton","hasIcon","dialogRef","_actionResponse","animationBegin","animationComplete","DialogContainerComponent_ng_container_0_Template","DialogContainerComponent_ng_container_1_Template","DialogContainerComponent_ng_container_2_Template","DialogContainerComponent_ng_container_3_Template","DialogContainerComponent_ng_container_4_Template","MaskToggleDirective","#sourceElement","maskOnFocus","isApplied","shouldApply","formControl","maskOptions","NUMERIC_CHAR","partialMask","repeat","placeHolderChar","decimalMarker","allowNegativeNumbers","specialCharacters","currencyMask","shortDateMask","phoneMask","provideNgxMask","MemService","#injectMemScriptsHead","#injectMemScriptBody","locMemScriptElement","#createLOCMemScript","sbMemScriptElement","#createSBScriptToHead","body","script","#createMemBodyScript","scriptElement","src","defer","referrerPolicy","imgElement","display","pointerEvents","sourceArray","shareReplay","refCount","bufferSize","Yjl","pure","sanitizer","strValue","re","RegExp","replacedValue","sanitize","SecurityContext","HTML","ToMoneyPipe","bypassSecurityTrustHtml","bypassSecurityTrustStyle","bypassSecurityTrustScript","bypassSecurityTrustUrl","bypassSecurityTrustResourceUrl","asyncFn","asyncOptions","fnResponse","setPending","isPromise","finally","DEFAULT_OPTIONS","dateOptions","dateServiceFactory","DATE_CONFIG","ToTimePipe","formatDate","formatTime","SHORT_DATE_PATTERN","EXTRA_SHORT_DATE_PATTERN","HEBREW_DATE_PATTERN","DEFAULT_DATE_PATTERN","ISO_DATE_PATTERN","ISO_TIME_PATTERN","date","dateValue","stringToDate","minDateValue","maxDateValue","isStringDate","isNativeDate","Date","stringDateForDiff","autoDayOptions","adjustDate","getDay","getFullYear","getMonth","diffOptions","anchorDate","autoDay","originalDate","diffDate","setFullYear","setMonth","setDate","getDate","dateToString","periodDiff","startDate","endDate","round","decimals","start","end","daysDiff","getTime","avgDaysInMonth","rawPeriod","truncateNumber","toDigits","factor","dateObject","timeToString","day","month","year","shortYear","time","hours","getHours","minutes","getMinutes","seconds","getSeconds","dateFromTimeString","defDate","timeParts","setHours","setMinutes","setSeconds","timestamp","getToday","getYear","service","dateFormatter","Intl","DateTimeFormat","lowercaseValue","String","isObject","withFormat","pct","coerceBoolean","numValue","DEFAULT_FILTER_OPTIONS","filterMode","emptyQueryMode","filterPredicate","results","prop","some","comparer","merged","existingIndex","#baseStyle","#logStyle","logInfo","info","#infoStyle","logWarning","warn","#warnStyle","#errorStyle","DEFAULT_FORMAT_OPTIONS","preset","formatNumber","randomNumber","minRange","maxRange","random","uuid","newObj","delimiter","lastPos","lastIndexOf","maskChars","inputString","startPosition","maskCharacter","totalChars","endPosition","substring","visibleCharsBefore","maskSigns","paramNames","param","valueFromQueryString","exec","decodeURIComponent","userAgent","search","#utmConfig","#utmParams","#utmStoreFacade","buildUtmModel","getEdaUtmUrl","buildDigitalClientData","barcode","opportunidyId","utm_source","utm_medium","utm_campaign","utm_term","utm_content","opportunidyID","eventdate","toJSON","googleClientId","getClientId","processType","userId","parseUtmParams$","utmParams","addUtmToUrl","modifiedUrl","cookies","cookie","cookieArray"],"sourceRoot":"webpack:///","sources":["./libs/gtm/src/lib/services/gtm-adapter-card.service.ts","./libs/gtm/src/lib/services/gtm-adapter-loan.service.ts","./libs/gtm/src/lib/gtm-adapter.module.ts","./libs/gtm/src/lib/services/gtm-adapter.provider.ts","./libs/shell/src/lib/directives/app-close/app-close.directive.ts","./libs/shell/src/lib/directives/app-initializer/app-initializer.directive.ts","./libs/shell/src/lib/directives/progress-tracker/progress-tracker.directive.ts","./libs/shell/src/lib/components/application-header/application-header.component.ts","./libs/shell/src/lib/components/application-progress/application-progress.component.ts","./libs/shell/src/lib/components/application-footer/application-footer.component.ts","./libs/shell/src/lib/components/application-view/application-view.component.ts","./libs/shell/src/lib/components/debugger/debugger.component.html","./libs/shell/src/lib/components/debugger/debugger.component.ts","./libs/shell/src/lib/config/errors.config.ts","./libs/shell/src/lib/config/mock.config.ts","./libs/shell/src/lib/config/theme.config.ts","./libs/errors/src/lib/errors.module.ts","./libs/shell/src/lib/shell.module.ts","./libs/utm/src/lib/utm.module.ts","./libs/utm/src/lib/providers/utm-service.provider.ts","./apps/wallet/src/environments/environment.prod.ts","./apps/wallet/src/app/app-router.module.ts","./apps/wallet/src/app/app.component.ts","./apps/wallet/src/app/app.module.ts","./apps/wallet/src/main.ts","./libs/api/src/lib/api.module.ts","./libs/api/src/lib/functions/process.functions.ts","./libs/catalog/src/lib/services/catalog-query.service.ts","./libs/catalog/src/lib/services/catalog.service.ts","./libs/catalog/src/lib/lists/debit-day.catalog.ts","./libs/catalog/src/lib/lists/refused.catalog.ts","./libs/catalog/src/lib/lists/marital-status.catalog.ts","./libs/catalog/src/lib/lists/lead.catalog.ts","./libs/catalog/src/lib/lists/online-status.catalog.ts","./libs/catalog/src/lib/lists/gender.catalog.ts","./libs/catalog/src/lib/lists/yes-no.catalog.ts","./libs/catalog/src/lib/lists/beneficiaries.catalog.ts","./libs/catalog/src/lib/lists/location.catalog.ts","./libs/catalog/src/lib/services/local-catalog.service.ts","./libs/constants/src/lib/enums.ts","./libs/constants/src/lib/image.ts","./libs/errors/src/lib/model/errors.model.ts","./libs/errors/src/lib/operators/severity.operators.ts","./libs/errors/src/lib/services/errors.service.ts","./libs/errors/src/lib/tokens/errors.tokens.ts","./libs/forms/src/lib/components/feature-form/feature-form.component.ts","./libs/forms/src/lib/components/field-error/field-error.component.ts","./libs/forms/src/lib/components/field-hint/field-hint.component.ts","./libs/forms/src/lib/components/field-progress-bar/field-progress-bar.component.ts","./libs/forms/src/lib/components/field-reset/field-reset.component.ts","./libs/forms/src/lib/components/submit-button/submit-button.component.ts","./libs/forms/src/lib/functions/compose-validators.ts","./libs/forms/src/lib/functions/form-utils.ts","./libs/forms/src/lib/controls/control.ts","./libs/forms/src/lib/model/form.field.ts","./libs/forms/src/lib/model/field-types/boolean.field.ts","./libs/forms/src/lib/model/field-types/date.field.ts","./libs/forms/src/lib/model/field-types/mobile-phone.field.ts","./libs/forms/src/lib/model/field-types/numeric.field.ts","./libs/forms/src/lib/model/field-types/select.field.ts","./libs/forms/src/lib/model/field-types/text.field.ts","./libs/forms/src/lib/model/form.consts.ts","./libs/forms/src/lib/validators/validation-patterns.ts","./libs/forms/src/lib/validators/validators-registry.ts","./libs/forms/src/lib/validators/id-number/id-number.validator.ts","./libs/forms/src/lib/functions/modulu10-validation.ts","./libs/forms/src/lib/validators/credit-card/credit-card.validator.ts","./libs/forms/src/lib/functions/credit-card-validation.ts","./libs/forms/src/lib/validators/min-max-length/min-length.validator.ts","./libs/forms/src/lib/validators/min-max-length/max-length.validator.ts","./libs/forms/src/lib/model/form.validation.ts","./libs/forms/src/lib/validators/pattern/pattern.validator.ts","./libs/forms/src/lib/validators/numeric/numeric.validator.ts","./libs/forms/src/lib/validators/numeric/multiplier.validator.ts","./libs/forms/src/lib/validators/numeric/min-numeric.validator.ts","./libs/forms/src/lib/validators/numeric/max-numeric.validator.ts","./libs/forms/src/lib/validators/dates/date-range.validator.ts","./libs/forms/src/lib/validators/specific-length/specific-length.validator.ts","./libs/forms/src/lib/validators/hebrew-name/hebname.validator.ts","./libs/forms/src/lib/validators/english-name/engname.validator.ts","./libs/forms/src/lib/validators/email/email.validator.ts","./libs/forms/src/lib/validators/severity/severity.validator.ts","./libs/forms/src/lib/validators/mobile-phone/mobile-phone.validator.ts","./libs/forms/src/lib/validators/empty-list/empty-list.validator.ts","./libs/forms/src/lib/validators/hebrew-consecutive-chars/hebrewconsecutivechars.validator.ts","./libs/forms/src/lib/errors/simple-error-matcher.ts","./libs/forms/src/lib/directives/error-matcher/error-matcher.directive.ts","./libs/forms/src/lib/controls/auto-complete/auto-complete.component.ts","./libs/forms/src/lib/controls/button-toggle/button-toggle-gap/button-toggle-gap.directive.ts","./libs/forms/src/lib/controls/button-toggle/button-toggle-icon/button-toggle-icon.directive.ts","./libs/forms/src/lib/controls/button-toggle/button-toggle-item/button-toggle-item.directive.ts","./libs/forms/src/lib/controls/button-toggle/button-toggle-label/button-toggle-label.directive.ts","./libs/forms/src/lib/controls/button-toggle/button-toggle-text/button-toggle-text.component.ts","./libs/forms/src/lib/controls/buttons/button-state/button-state.directive.ts","./libs/forms/src/lib/controls/custom-control.ts","./libs/forms/src/lib/controls/button-toggle/button-toggle.component.ts","./libs/forms/src/lib/directives/input-mode/input-mode.directive.ts","./libs/forms/src/lib/controls/dual-numeric-input/dual-numeric-input.component.ts","./libs/forms/src/lib/controls/panels/panel-group/panel-group-item/panel-group-item.component.ts","./libs/forms/src/lib/controls/panels/panel-group/panel-group.component.ts","./libs/forms/src/lib/controls/panels/panel-group/panel-group.component.html","./libs/forms/src/lib/directives/error-display/error-display.directive.ts","./libs/forms/src/lib/directives/simple-field/simple-field.directive.ts","./libs/forms/src/lib/operators/field.operators.ts","./libs/forms/src/lib/services/form.config.ts","./libs/forms/src/lib/services/form.service.ts","./libs/gtm/src/lib/services/gtm-adapter.service.ts","./libs/gtm/src/lib/services/gtm-partners.service.ts","./libs/http/src/lib/http.module.ts","./libs/http/src/lib/tokens/http.tokens.ts","./libs/http/src/lib/services/http.service.ts","./libs/http/src/lib/model/http.model.ts","./libs/http/src/lib/operators/response.operators.ts","./libs/catalog/src/lib/guards/finance.guard.ts","./libs/kernel/src/lib/catalog/finance-guard.provider.ts","./libs/catalog/src/lib/guards/metadata.guard.ts","./libs/kernel/src/lib/catalog/metadata-guard.provider.ts","./libs/catalog/src/lib/guards/residence.guard.ts","./libs/kernel/src/lib/catalog/residence-guard.provider.ts","./libs/kernel/src/lib/facades/debits/debits.facade.ts","./libs/kernel/src/lib/components/account-label/account-label.component.ts","./libs/kernel/src/lib/facades/address/address.facade.ts","./libs/kernel/src/lib/components/address-label/address-label.component.ts","./libs/kernel/src/lib/components/address-label/address-label-components/residence/residence.component.ts","./libs/kernel/src/lib/components/address-label/address-label-components/street/street.component.ts","./libs/kernel/src/lib/components/address-label/address-label-components/zipcode/zipcode.component.ts","./libs/kernel/src/lib/components/alert-icon/alert-icon.component.ts","./libs/kernel/src/lib/facades/card/card.facade.ts","./libs/kernel/src/lib/components/card-label/card-label.component.ts","./libs/kernel/src/lib/components/club-label/club-label.component.ts","./libs/kernel/src/lib/components/gender-option/gender-option.component.ts","./libs/kernel/src/lib/components/info-icon/info-icon.component.ts","./libs/gtm/src/lib/features/message/alert/otp-warning/gtm-otp-warning.service.ts","./libs/gtm/src/lib/features/message/alert/otp-warning/gtm-otp-warning-card.service.ts","./libs/gtm/src/lib/features/message/alert/otp-warning/gtm-otp-warning.provider.ts","./libs/kernel/src/lib/navigation/consts/consts.ts","./libs/kernel/src/lib/navigation/services/navigation-adapter.service.ts","./libs/kernel/src/lib/navigation/directives/navigator.directive.ts","./libs/gtm/src/lib/features/generic-dialogs/gtm-generic-dialogs.service.ts","./libs/gtm/src/lib/features/generic-dialogs/gtm-generic-dialogs.provider.ts","./libs/kernel/src/lib/dialogs/alert/alert.component.ts","./libs/kernel/src/lib/dialogs/confirm/confirm.component.ts","./libs/kernel/src/lib/dialogs/guide/guide.component.ts","./libs/kernel/src/lib/dialogs/tooltip/tooltip.component.ts","./libs/kernel/src/lib/dialogs/services/dialog-adapter.service.ts","./libs/kernel/src/lib/environment/services/environment.service.ts","./libs/kernel/src/lib/navigation/guards/navigation.guard.ts","./libs/kernel/src/lib/components/otp-warning/otp-warning.component.ts","./libs/kernel/src/lib/components/partner-logo/partner-logo.component.ts","./libs/kernel/src/lib/components/product-label/product-label.component.ts","./libs/kernel/src/lib/facades/auth/errors/auth-otp.errors.ts","./libs/kernel/src/lib/facades/auth/auth.facade.ts","./libs/kernel/src/lib/facades/channels/channels.facade.ts","./libs/kernel/src/lib/facades/contact/contact.facade.ts","./libs/kernel/src/lib/facades/disclosure/disclosure.facade.ts","./libs/kernel/src/lib/facades/lead/card-lead.facade.ts","./libs/kernel/src/lib/facades/scan/config/scan.config.ts","./libs/kernel/src/lib/facades/scan/errors/scan-ocr.errors.ts","./libs/kernel/src/lib/facades/scan/services/scan.facade.ts","./libs/kernel/src/lib/facades/simulator/simulator.facade.ts","./libs/kernel/src/lib/feature/components/base-feature-view/base-feature-view.component.ts","./libs/kernel/src/lib/components/scan/components/scan.component.ts","./libs/kernel/src/lib/components/secondary-logo/secondary-logo.component.ts","./libs/kernel/src/lib/config/facades/config.facade.ts","./libs/kernel/src/lib/config/facades/feature-config.facade.ts","./libs/kernel/src/lib/config/facades/global-config.facade.ts","./libs/kernel/src/lib/config/interceptors/config.interceptor.ts","./libs/kernel/src/lib/config/providers/config.providers.ts","./libs/kernel/src/lib/directives/exit-button/exit-button.directive.ts","./libs/kernel/src/lib/directives/message-link/guide-link.directive.ts","./libs/kernel/src/lib/directives/template-assertion/template-assert.directive.ts","./libs/kernel/src/lib/directives/template-assertion/customer-assertion/is-unverified-customer.directive.ts","./libs/kernel/src/lib/directives/template-assertion/interest-type-assertion/is-variable-interest.directive.ts","./libs/kernel/src/lib/directives/template-assertion/multi-assertion/multi-assertion.directive.ts","./libs/kernel/src/lib/directives/template-assertion/process-assertion/is-card-process.directive.ts","./libs/kernel/src/lib/directives/template-assertion/process-assertion/is-loan-process.directive.ts","./libs/kernel/src/lib/errors/model/global-errors.config.ts","./libs/kernel/src/lib/errors/services/error.handler.ts","./libs/kernel/src/lib/errors/interceptors/remote-error.interceptor.ts","./libs/kernel/src/lib/feature/directives/feature-config/feature-config.directive.ts","./libs/kernel/src/lib/feature/directives/feature-config/indication-config.directive.ts","./libs/kernel/src/lib/feature/directives/feature-config/ind-false-config.directive.ts","./libs/kernel/src/lib/feature/directives/feature-config/ind-true-config.directive.ts","./libs/kernel/src/lib/feature/directives/feature-config/text-config.directive.ts","./libs/kernel/src/lib/feature/directives/feature-settings/feature-settings.directive.ts","./libs/kernel/src/lib/feature/directives/feature-slots/feature-slots.directive.ts","./libs/kernel/src/lib/feature/directives/fixed-footer-toggle/fixed-footer-toggle.directive.ts","./libs/kernel/src/lib/feature/components/feature-view/feature-view.component.ts","./libs/kernel/src/lib/feature/services/feature.service.ts","./libs/kernel/src/lib/forms/functions/validation.functions.ts","./libs/kernel/src/lib/forms/functions/field.functions.ts","./libs/kernel/src/lib/loader/services/loader.service.ts","./libs/kernel/src/lib/loader/components/loader.component.ts","./libs/kernel/src/lib/loader/interceptors/loader.interceptor.ts","./libs/kernel/src/lib/mock/model/mock.model.ts","./libs/kernel/src/lib/operators/feature-config.operator.ts","./libs/kernel/src/lib/partner-updates/partner-update.service.ts","./libs/kernel/src/lib/facades/customer/customer.facade.ts","./libs/kernel/src/lib/http/tokens/http.tokens.ts","./libs/kernel/src/lib/http/config/http.config.ts","./libs/kernel/src/lib/http/http-common.module.ts","./libs/kernel/src/lib/http/interceptors/endpoint.interceptor.ts","./libs/kernel/src/lib/http/services/context-builder.service.ts","./libs/kernel/src/lib/mock/services/mock.service.ts","./libs/kernel/src/lib/mock/mock.Interceptor.ts","./libs/kernel/src/lib/mock/mock.module.ts","./libs/kernel/src/lib/mock/tokens/mock.tokens.ts","./libs/kernel/src/lib/process/services/policy.service.ts","./libs/kernel/src/lib/process/services/profile.service.ts","./libs/kernel/src/lib/process/guards/policy.guard.ts","./libs/kernel/src/lib/process/guards/process.guard.ts","./libs/navigation/src/lib/services/navigation.service.ts","./libs/settings/src/lib/settings-map.ts","./libs/settings/src/lib/tokens/settings.providers.ts","./libs/state/src/lib/features-stores/account/store/account.actions.ts","./libs/state/src/lib/features-stores/account/store/account.effects.ts","./libs/state/src/lib/model/state.builder.ts","./libs/state/src/lib/features-stores/account/store/account.reducers.ts","./libs/state/src/lib/features-stores/account/store/account.selectors.ts","./libs/state/src/lib/features-stores/account/account-state.module.ts","./libs/state/src/lib/services/state.facade.ts","./libs/state/src/lib/services/state-access.service.ts","./libs/state/src/lib/features-stores/account/services/account-store.facade.ts","./libs/state/src/lib/features-stores/address/store/address.actions.ts","./libs/state/src/lib/features-stores/address/store/address.effects.ts","./libs/state/src/lib/features-stores/address/store/address.reducers.ts","./libs/state/src/lib/features-stores/address/store/address.selectors.ts","./libs/state/src/lib/features-stores/address/address-state.module.ts","./libs/state/src/lib/features-stores/address/services/address-store.facade.ts","./libs/state/src/lib/features-stores/amount/store/amount.actions.ts","./libs/state/src/lib/features-stores/amount/store/amount.effects.ts","./libs/state/src/lib/features-stores/amount/store/amount.reducers.ts","./libs/state/src/lib/features-stores/amount/store/amount.selectors.ts","./libs/state/src/lib/features-stores/amount/amount-state.module.ts","./libs/state/src/lib/features-stores/amount/services/amount-store.facade.ts","./libs/state/src/lib/features-stores/authentication/store/auth.actions.ts","./libs/state/src/lib/features-stores/authentication/store/auth.effects.ts","./libs/state/src/lib/features-stores/authentication/store/auth.reducers.ts","./libs/state/src/lib/features-stores/authentication/store/auth.selectors.ts","./libs/state/src/lib/features-stores/authentication/auth-guide-state.module.ts","./libs/state/src/lib/features-stores/authentication/auth-login-state.module.ts","./libs/state/src/lib/features-stores/authentication/auth-otp-state.module.ts","./libs/state/src/lib/features-stores/authentication/services/auth-guide-store.facade.ts","./libs/state/src/lib/features-stores/authentication/services/auth-login-store.facade.ts","./libs/state/src/lib/features-stores/authentication/services/auth-otp-store.facade.ts","./libs/state/src/lib/features-stores/beneficiaries/store/beneficiaries.actions.ts","./libs/state/src/lib/features-stores/beneficiaries/store/beneficiaries.effects.ts","./libs/state/src/lib/features-stores/beneficiaries/store/beneficiaries.reducers.ts","./libs/state/src/lib/features-stores/beneficiaries/store/beneficiaries.selectors.ts","./libs/state/src/lib/features-stores/beneficiaries/beneficiaries-state.module.ts","./libs/state/src/lib/features-stores/beneficiaries/services/beneficiaries-store.facade.ts","./libs/state/src/lib/features-stores/card/store/card.actions.ts","./libs/state/src/lib/features-stores/card/store/card.effects.ts","./libs/state/src/lib/features-stores/card/store/card.reducers.ts","./libs/state/src/lib/features-stores/card/store/card.selectors.ts","./libs/state/src/lib/features-stores/card/card-state.module.ts","./libs/state/src/lib/features-stores/card/services/card-store.facade.ts","./libs/state/src/lib/features-stores/channels/store/channels.actions.ts","./libs/state/src/lib/features-stores/channels/store/channels.effects.ts","./libs/state/src/lib/features-stores/channels/store/channels.reducers.ts","./libs/state/src/lib/features-stores/channels/store/channels.selectors.ts","./libs/state/src/lib/features-stores/channels/channels-state.module.ts","./libs/state/src/lib/features-stores/channels/services/channels-store.facade.ts","./libs/state/src/lib/features-stores/classify/store/classify.actions.ts","./libs/state/src/lib/features-stores/classify/store/classify.reducers.ts","./libs/state/src/lib/features-stores/classify/store/classify.selectors.ts","./libs/state/src/lib/features-stores/classify/classify-state.module.ts","./libs/state/src/lib/features-stores/classify/services/classify-store.facade.ts","./libs/state/src/lib/features-stores/contact/store/contact.actions.ts","./libs/state/src/lib/features-stores/contact/store/contact.effects.ts","./libs/state/src/lib/features-stores/contact/store/contact.reducers.ts","./libs/state/src/lib/features-stores/contact/store/contact.selectors.ts","./libs/state/src/lib/features-stores/contact/contact-state.module.ts","./libs/state/src/lib/features-stores/contact/services/contact-store.facade.ts","./libs/state/src/lib/features-stores/country/store/country.actions.ts","./libs/state/src/lib/features-stores/country/store/country.reducers.ts","./libs/state/src/lib/features-stores/country/store/country.selectors.ts","./libs/state/src/lib/features-stores/country/country-state.module.ts","./libs/state/src/lib/features-stores/country/services/country-store.facade.ts","./libs/state/src/lib/features-stores/credit-agreement/store/credit-agreement.actions.ts","./libs/state/src/lib/features-stores/credit-agreement/store/credit-agreement.effects.ts","./libs/state/src/lib/features-stores/credit-agreement/store/credit-agreement.reducers.ts","./libs/state/src/lib/features-stores/credit-agreement/store/credit-agreement.selectors.ts","./libs/state/src/lib/features-stores/credit-agreement/credit-agreement-state.module.ts","./libs/state/src/lib/features-stores/credit-agreement/services/credit-agreement-store.facade.ts","./libs/state/src/lib/features-stores/customer/store/customer.actions.ts","./libs/state/src/lib/features-stores/customer/store/customer.reducers.ts","./libs/state/src/lib/features-stores/customer/store/customer.selectors.ts","./libs/state/src/lib/features-stores/customer/customer-state.module.ts","./libs/state/src/lib/features-stores/customer/services/customer-store.facade.ts","./libs/state/src/lib/features-stores/debits/store/debits.actions.ts","./libs/state/src/lib/features-stores/debits/store/debits.effects.ts","./libs/state/src/lib/features-stores/debits/store/debits.reducers.ts","./libs/state/src/lib/features-stores/debits/store/debits.selectors.ts","./libs/state/src/lib/features-stores/debits/debits-state.module.ts","./libs/state/src/lib/features-stores/debits/services/debits-store.facade.ts","./libs/state/src/lib/features-stores/delivery/store/delivery.actions.ts","./libs/state/src/lib/features-stores/delivery/store/delivery.effects.ts","./libs/state/src/lib/features-stores/delivery/store/delivery.reducers.ts","./libs/state/src/lib/features-stores/delivery/store/delivery.selectors.ts","./libs/state/src/lib/features-stores/delivery/delivery-state.module.ts","./libs/state/src/lib/features-stores/delivery/services/delivery-store.facade.ts","./libs/state/src/lib/features-stores/demography/store/demography.actions.ts","./libs/state/src/lib/features-stores/demography/store/demography.reducers.ts","./libs/state/src/lib/features-stores/demography/store/demography.selectors.ts","./libs/state/src/lib/features-stores/demography/demography-state.module.ts","./libs/state/src/lib/features-stores/demography/services/demography-store.facade.ts","./libs/state/src/lib/features-stores/disclosure/store/disclosure.actions.ts","./libs/state/src/lib/features-stores/disclosure/store/disclosure.effects.ts","./libs/state/src/lib/features-stores/disclosure/store/disclosure.reducers.ts","./libs/state/src/lib/features-stores/disclosure/store/disclosure.selectors.ts","./libs/state/src/lib/features-stores/disclosure/disclosure-state.module.ts","./libs/state/src/lib/features-stores/disclosure/services/disclosure-store.facade.ts","./libs/state/src/lib/features-stores/employment/store/employment.actions.ts","./libs/state/src/lib/features-stores/employment/store/employment.effects.ts","./libs/state/src/lib/features-stores/employment/store/employment.reducers.ts","./libs/state/src/lib/features-stores/employment/store/employment.selectors.ts","./libs/state/src/lib/features-stores/employment/employment-state.module.ts","./libs/state/src/lib/features-stores/employment/services/employment-store.facade.ts","./libs/state/src/lib/features-stores/expense/store/expense.actions.ts","./libs/state/src/lib/features-stores/expense/store/expense.effects.ts","./libs/state/src/lib/features-stores/expense/store/expense.reducers.ts","./libs/state/src/lib/features-stores/expense/store/expense.selectors.ts","./libs/state/src/lib/features-stores/expense/expense-state.module.ts","./libs/state/src/lib/features-stores/expense/services/expense-store.facade.ts","./libs/state/src/lib/features-stores/identity/store/identity.actions.ts","./libs/state/src/lib/features-stores/identity/store/identity.effects.ts","./libs/state/src/lib/features-stores/identity/store/identity.reducers.ts","./libs/state/src/lib/features-stores/identity/store/identity.selectors.ts","./libs/state/src/lib/features-stores/identity/identity-state.module.ts","./libs/state/src/lib/features-stores/identity/services/identity-store.facade.ts","./libs/state/src/lib/features-stores/income/store/income.actions.ts","./libs/state/src/lib/features-stores/income/store/income.effects.ts","./libs/state/src/lib/features-stores/income/store/income.reducers.ts","./libs/state/src/lib/features-stores/income/store/income.selectors.ts","./libs/state/src/lib/features-stores/income/income-state.module.ts","./libs/state/src/lib/features-stores/income/services/income-store.facade.ts","./libs/state/src/lib/features-stores/introduction/store/introduction.actions.ts","./libs/state/src/lib/features-stores/introduction/store/introduction.reducers.ts","./libs/state/src/lib/features-stores/introduction/store/introduction.selectors.ts","./libs/state/src/lib/features-stores/introduction/introduction-state.module.ts","./libs/state/src/lib/features-stores/introduction/services/introduction-store.facade.ts","./libs/state/src/lib/features-stores/lead/store/lead.actions.ts","./libs/state/src/lib/features-stores/lead/store/lead.effects.ts","./libs/state/src/lib/features-stores/lead/store/lead.reducers.ts","./libs/state/src/lib/features-stores/lead/store/lead.selectors.ts","./libs/state/src/lib/features-stores/lead/lead-state.module.ts","./libs/state/src/lib/features-stores/lead/services/lead-store.facade.ts","./libs/state/src/lib/features-stores/marital/store/marital.actions.ts","./libs/state/src/lib/features-stores/marital/store/marital.effects.ts","./libs/state/src/lib/features-stores/marital/store/marital.reducers.ts","./libs/state/src/lib/features-stores/marital/store/marital.selectors.ts","./libs/state/src/lib/features-stores/marital/marital-state.module.ts","./libs/state/src/lib/features-stores/marital/services/marital-store.facade.ts","./libs/state/src/lib/features-stores/offer/store/offer.actions.ts","./libs/state/src/lib/features-stores/offer/store/offer.reducers.ts","./libs/state/src/lib/features-stores/offer/store/offer.selectors.ts","./libs/state/src/lib/features-stores/offer/offer-state.module.ts","./libs/state/src/lib/features-stores/offer/services/offer-store.facade.ts","./libs/state/src/lib/features-stores/online-use/store/online-use.actions.ts","./libs/state/src/lib/features-stores/online-use/store/online-use.effects.ts","./libs/state/src/lib/features-stores/online-use/store/online-use.reducers.ts","./libs/state/src/lib/features-stores/online-use/store/online-use.selectors.ts","./libs/state/src/lib/features-stores/online-use/online-use-state.module.ts","./libs/state/src/lib/features-stores/online-use/services/online-use-store.facade.ts","./libs/state/src/lib/features-stores/persona/store/persona.actions.ts","./libs/state/src/lib/features-stores/persona/store/persona.effects.ts","./libs/state/src/lib/features-stores/persona/store/persona.reducers.ts","./libs/state/src/lib/features-stores/persona/store/persona.selectors.ts","./libs/state/src/lib/features-stores/persona/persona-state.module.ts","./libs/state/src/lib/features-stores/persona/services/persona-store.facade.ts","./libs/state/src/lib/features-stores/privacy/store/privacy.actions.ts","./libs/state/src/lib/features-stores/privacy/store/privacy.effects.ts","./libs/state/src/lib/features-stores/privacy/store/privacy.reducers.ts","./libs/state/src/lib/features-stores/privacy/store/privacy.selectors.ts","./libs/state/src/lib/features-stores/privacy/privacy-state.module.ts","./libs/state/src/lib/features-stores/privacy/services/privacy-store.facade.ts","./libs/state/src/lib/features-stores/proposal/store/proposal.actions.ts","./libs/state/src/lib/features-stores/proposal/store/proposal.effects.ts","./libs/state/src/lib/features-stores/proposal/store/proposal.reducers.ts","./libs/state/src/lib/features-stores/proposal/store/proposal.selectors.ts","./libs/state/src/lib/features-stores/proposal/proposal-state.module.ts","./libs/state/src/lib/features-stores/proposal/services/proposal-store.facade.ts","./libs/state/src/lib/features-stores/purpose/store/purpose.actions.ts","./libs/state/src/lib/features-stores/purpose/store/purpose.effects.ts","./libs/state/src/lib/features-stores/purpose/store/purpose.reducers.ts","./libs/state/src/lib/features-stores/purpose/store/purpose.selectors.ts","./libs/state/src/lib/features-stores/purpose/purpose-state.module.ts","./libs/state/src/lib/features-stores/purpose/services/purpose-store.facade.ts","./libs/state/src/lib/features-stores/refused/store/refused.actions.ts","./libs/state/src/lib/features-stores/refused/store/refused.effects.ts","./libs/state/src/lib/features-stores/refused/store/refused.reducers.ts","./libs/state/src/lib/features-stores/refused/store/refused.selectors.ts","./libs/state/src/lib/features-stores/refused/refused-state.module.ts","./libs/state/src/lib/features-stores/refused/services/refused-store.facade.ts","./libs/state/src/lib/features-stores/scan/store/scan.actions.ts","./libs/state/src/lib/features-stores/scan/store/scan.effects.ts","./libs/state/src/lib/features-stores/scan/store/scan.reducers.ts","./libs/state/src/lib/features-stores/scan/store/scan.selectors.ts","./libs/state/src/lib/features-stores/scan/scan-state.module.ts","./libs/state/src/lib/features-stores/scan/services/scan-document-store.facade.ts","./libs/state/src/lib/features-stores/signature/store/signature.actions.ts","./libs/state/src/lib/features-stores/signature/store/signature.reducers.ts","./libs/state/src/lib/features-stores/signature/store/signature.selectors.ts","./libs/state/src/lib/features-stores/signature/signature-state.module.ts","./libs/state/src/lib/features-stores/signature/services/signature-store.facade.ts","./libs/state/src/lib/features-stores/simulator/store/simulator.actions.ts","./libs/state/src/lib/features-stores/simulator/store/simulator.reducers.ts","./libs/state/src/lib/features-stores/simulator/store/simulator.selectors.ts","./libs/state/src/lib/features-stores/simulator/services/simulator-store.facade.ts","./libs/state/src/lib/features-stores/summary/store/summary.actions.ts","./libs/state/src/lib/features-stores/summary/store/summary.effects.ts","./libs/state/src/lib/features-stores/summary/store/summary.reducers.ts","./libs/state/src/lib/features-stores/summary/store/summary.selectors.ts","./libs/state/src/lib/features-stores/summary/services/summary-store.facade.ts","./libs/state/src/lib/features-stores/summary/summary-state.module.ts","./libs/state/src/lib/features-stores/utm/store/utm.actions.ts","./libs/state/src/lib/features-stores/utm/store/utm.reducers.ts","./libs/state/src/lib/features-stores/utm/store/utm.selectors.ts","./libs/state/src/lib/features-stores/utm/services/utm-store.facade.ts","./libs/state/src/lib/root/store/root.actions.ts","./libs/state/src/lib/root/store/root-meta.reducers.ts","./libs/state/src/lib/shell/store/shell.actions.ts","./libs/state/src/lib/shell/store/shell.reducers.ts","./libs/state/src/lib/shell/store/shell.selectors.ts","./libs/state/src/lib/root/store/root.reducers.ts","./libs/state/src/lib/root/services/root-store.facade.ts","./libs/state/src/lib/shell/services/shell-store.facade.ts","./libs/state/src/lib/shell/store/shell.effects.ts","./libs/state/src/lib/shell/shell-state.module.ts","./libs/state/src/lib/state.module.ts","./libs/themes/src/lib/themes.module.ts","./libs/themes/src/lib/model/theme.config.ts","./libs/themes/src/lib/tokens/theme.tokens.ts","./libs/themes/src/lib/services/theme.service.ts","./libs/themes/src/lib/components/theme-asset/theme-asset.component.ts","./libs/ui/src/lib/animations/button.animation.ts","./libs/ui/src/lib/animations/dialog.animation.ts","./libs/ui/src/lib/animations/enter-leave.animations.ts","./libs/ui/src/lib/animations/field.animation.ts","./libs/ui/src/lib/animations/route.animation.ts","./libs/ui/src/lib/animations/flip.animation.ts","./libs/ui/src/lib/animations/micro-animations.ts","./libs/ui/src/lib/components/button-content/button-content-slot.directive.ts","./libs/ui/src/lib/components/base-button/base-button.component.ts","./libs/ui/src/lib/components/button-label/button-label-slot.directive.ts","./libs/ui/src/lib/components/card-container/card-slots/card-footer.directive.ts","./libs/ui/src/lib/components/card-container/card-slots/card-body.directive.ts","./libs/ui/src/lib/components/card-container/card-slots/card-title.directive.ts","./libs/ui/src/lib/components/card-container/card-container.component.ts","./libs/ui/src/lib/directives/flex-utils/flex-element.directive.ts","./libs/ui/src/lib/directives/flex-utils/layout-align.directive.ts","./libs/ui/src/lib/directives/flex-utils/layout.directive.ts","./libs/ui/src/lib/components/card-illustration/card-illustration.component.ts","./libs/ui/src/lib/components/check-indicator/animations/button.animation.ts","./libs/ui/src/lib/components/check-indicator/check-indicator.component.ts","./libs/ui/src/lib/components/confirm-button/confirm-button.component.ts","./libs/ui/src/lib/components/expansion-panel/panel-slots/panel-title.directive.ts","./libs/ui/src/lib/components/expansion-panel/panel-slots/panel-body.directive.ts","./libs/ui/src/lib/components/expansion-panel/expansion-panel.component.ts","./libs/ui/src/lib/components/fab-button/fab-button.component.ts","./libs/ui/src/lib/components/filled-button/filled-button.component.ts","./libs/ui/src/lib/components/icon/icon.component.ts","./libs/ui/src/lib/components/numeric-label/numeric-label.component.ts","./libs/ui/src/lib/components/interest-label/interest-label.component.ts","./libs/ui/src/lib/components/link-button/link-button.component.ts","./libs/ui/src/lib/components/progress-bar/progress-bar.component.ts","./libs/ui/src/lib/components/progress-spinner/progress-spinner.component.ts","./libs/ui/src/lib/components/rounded-button/rounded-button.component.ts","./libs/ui/src/lib/components/signature-pad/component/signature-pad.component.ts","./libs/ui/src/lib/components/slider/numeric-slider.component.ts","./libs/ui/src/lib/directives/flex-utils/flex-child.directive.ts","./libs/ui/src/lib/directives/flex-utils/self-align.directive.ts","./libs/ui/src/lib/directives/select-on-focus/select-on-focus.directive.ts","./libs/ui/src/lib/overlay/services/overlay-accessor.ts","./libs/ui/src/lib/overlay/dialog/services/dialog-ref.ts","./libs/ui/src/lib/overlay/services/overlay.service.ts","./libs/ui/src/lib/overlay/dialog/tokens/dialog.token.ts","./libs/ui/src/lib/overlay/dialog/services/dialog.service.ts","./libs/ui/src/lib/overlay/dialog/components/dialog-slots/dialog-icon.directive.ts","./libs/ui/src/lib/overlay/dialog/components/dialog-slots/dialog-title.directive.ts","./libs/ui/src/lib/overlay/dialog/components/dialog-slots/dialog-body.directive.ts","./libs/ui/src/lib/overlay/dialog/components/dialog-slots/dialog-footer.directive.ts","./libs/ui/src/lib/overlay/dialog/components/dialog-container/dialog-container.component.ts","./libs/ui/src/lib/ui.module.ts","./libs/utils/src/lib/mask/directives/mask-toggle.directive.ts","./libs/utils/src/lib/mask/functions/ngx-input.mask.ts","./libs/utils/src/lib/mem/mem.service.ts","./libs/utils/src/lib/mem/constants.ts","./libs/utils/src/lib/operators/clone-array.operator.ts","./libs/utils/src/lib/operators/share-last.operator.ts","./libs/utils/src/lib/operators/take-one.operator.ts","./libs/utils/src/lib/pipes/decimal-pipe/decimal.pipe.ts","./libs/utils/src/lib/pipes/mark-pipe/mark.pipe.ts","./libs/utils/src/lib/pipes/money-pipe/money.pipe.ts","./libs/utils/src/lib/pipes/numeric-pipes.module.ts","./libs/utils/src/lib/pipes/sanitize-pipe/sanitize-pipe.ts","./libs/utils/src/lib/services/async-fn/async-fn.service.ts","./libs/utils/src/lib/date/date-util.module.ts","./libs/utils/src/lib/date/pipes/date.pipe.ts","./libs/utils/src/lib/date/pipes/time.pipe.ts","./libs/utils/src/lib/date/constants/date.patterns.ts","./libs/utils/src/lib/date/services/date.util.ts","./libs/utils/src/lib/date/tokens/date.token.ts","./libs/utils/src/lib/functions/assertion.utils.ts","./libs/utils/src/lib/functions/calc.utils.ts","./libs/utils/src/lib/functions/coercion.utils.ts","./libs/utils/src/lib/functions/collection.utils.ts","./libs/utils/src/lib/functions/console.utils.ts","./libs/utils/src/lib/functions/format.utils.ts","./libs/utils/src/lib/functions/generators.utils.ts","./libs/utils/src/lib/functions/object.utils.ts","./libs/utils/src/lib/functions/string.utils.ts","./libs/utils/src/lib/functions/url.utils.ts","./libs/utm/src/lib/services/utm.service.ts","./libs/utm/src/lib/tokens/utm-config.token.ts","./libs/utm/src/lib/tokens/utm-params.token.ts"],"sourcesContent":["import { computed, Injectable, Signal } from '@angular/core';\nimport { TCalGtmFunnelStepEvent } from '@cal-analytics/gtm';\nimport { GtmAdapterService } from './gtm-adapter.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GtmAdapterCardService extends GtmAdapterService {\n constructor() {\n super();\n }\n\n override funnelStepGetter: Signal> = computed(() => ({\n ...this.cardName$$()\n }));\n\n override funnelEndGetter: Signal> = computed(() => ({\n ...this.cardName$$()\n }));\n}\n","import { computed, Injectable, Signal } from '@angular/core';\nimport { TCalGtmFunnelStepEvent } from '@cal-analytics/gtm';\nimport { GtmAdapterService } from './gtm-adapter.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GtmAdapterLoanService extends GtmAdapterService {\n private readonly amountRequested$$: Signal<{ amount_requested: number }>;\n private readonly numPayments$$: Signal<{ num_payments: number }>;\n private readonly loanReason$$: Signal<{ loan_reason: string }>;\n private readonly loanAmount$$: Signal<{ loan_amount: number }>;\n\n constructor() {\n super();\n this.amountRequested$$ = computed(() => ({\n amount_requested: this._amountStore.model$$()?.requestedLoanAmount ?? null\n }));\n this.numPayments$$ = computed(() => ({\n num_payments: this._simulatorStore.model$$()?.numOfPayments ?? null\n }));\n\n this.loanReason$$ = computed(() => {\n let loanReasonCode = this._purposeStore.model$$()?.loanReasonCode;\n if (loanReasonCode != null) {\n return {\n loan_reason: this._shellStore\n .loanReasons$$()\n .filter((item) => item.value == loanReasonCode)\n .map((item) => item.key)\n .at(0)\n };\n } else {\n return { loan_reason: 'NA' };\n }\n });\n this.loanAmount$$ = computed(() => ({ loan_amount: this._simulatorStore.data$$()?.requestedLoanAmount ?? null }));\n }\n\n override funnelStepGetter: Signal> = computed(() => ({\n ...this.amountRequested$$(),\n ...this.numPayments$$(),\n ...this.loanReason$$(),\n ...this.loanAmount$$()\n }));\n\n override funnelEndGetter: Signal> = computed(() => ({\n ...this.amountRequested$$(),\n ...this.numPayments$$(),\n ...this.loanReason$$(),\n ...this.loanAmount$$()\n }));\n}\n","import { importProvidersFrom, ModuleWithProviders, NgModule } from '@angular/core';\nimport { CalGtmModule, ICalGtmConfig } from '@cal-analytics/gtm';\nimport { provideGtmAdapterService } from './services/gtm-adapter.provider';\n\n@NgModule({\n providers: [],\n imports: []\n})\nexport class GtmAdapterModule {\n public static forRoot(gtmConfig: ICalGtmConfig): ModuleWithProviders {\n return {\n ngModule: GtmAdapterModule,\n providers: [importProvidersFrom(CalGtmModule.forRoot(gtmConfig)), provideGtmAdapterService()]\n };\n }\n}\n","import { Provider, inject } from '@angular/core';\nimport { ShellStore } from '@partners/state';\nimport { GtmAdapterCardService } from './gtm-adapter-card.service';\nimport { GtmAdapterLoanService } from './gtm-adapter-loan.service';\nimport { GtmAdapterService } from './gtm-adapter.service';\n\nexport const provideGtmAdapterService = (): Provider => {\n return {\n provide: GtmAdapterService,\n useFactory: () => {\n const shellStore = inject(ShellStore);\n\n const canMatchLoan$$ = shellStore.matchLoan$$;\n const canMatchCard$$ = shellStore.matchCard$$;\n\n if (canMatchLoan$$()) {\n return new GtmAdapterLoanService();\n }\n if (canMatchCard$$()) {\n return new GtmAdapterCardService();\n }\n\n return new GtmAdapterService();\n }\n };\n};\n","import { Directive, HostListener, computed, inject } from '@angular/core';\nimport { NavigationAdapter, ProfileService } from '@partners/kernel';\nimport { TCloseAction } from '@partners/settings';\nimport { ShellStore } from '@partners/state';\n\n@Directive({\n selector: '[applicationClose]',\n standalone: true\n})\nexport class AppCloseDirective {\n private _shellStore = inject(ShellStore);\n private _navAdapter = inject(NavigationAdapter);\n private _profileService = inject(ProfileService);\n\n closeAction = computed(() => {\n const viewSettings = this._shellStore.viewSettings$$();\n return viewSettings?.headerCloseAction;\n });\n\n @HostListener('click', ['$event'])\n public onClick(event: MouseEvent | TouchEvent): void {\n const { headerCloseAction } = this._shellStore.viewSettings$$();\n switch (headerCloseAction) {\n case 'confirm-exit':\n this._navAdapter.toConfirm('exit-confirm');\n break;\n case 'move-previous':\n this._navAdapter.moveBack();\n break;\n default:\n this._profileService.terminateProcess('customer-opt-out');\n break;\n }\n }\n\n constructor() {}\n}\n","import { Directive, inject, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { IProcessProfile } from '@partners/api';\nimport { CatalogService } from '@partners/catalog';\nimport { ContextBuilder, ProfileService } from '@partners/kernel';\nimport { NavigationService } from '@partners/navigation';\nimport { SettingsMap, TFeature } from '@partners/settings';\nimport { isNotEmpty, takeOnce } from '@partners/utils';\nimport { UtmService } from '@partners/utm';\nimport { Observable, Subscription } from 'rxjs';\nimport { filter, tap } from 'rxjs/operators';\n\n@Directive({\n selector: '[appInitializer]',\n standalone: true\n})\nexport class AppInitializerDirective implements OnInit, OnDestroy {\n private _appTemplate = inject(TemplateRef);\n private _containerRef = inject(ViewContainerRef);\n private _profileService = inject(ProfileService);\n private _navigationService = inject(NavigationService);\n private _catalogService = inject(CatalogService);\n private _utmService = inject(UtmService);\n private _subscription: Subscription;\n\n constructor() {\n this._subscription = new Subscription();\n }\n\n ngOnInit(): void {\n const { create$, change$ } = this._profileService;\n\n /** add a listener to a new profile creation event */\n this.addProfileCreatedListener(create$);\n\n /** add a listener to current profile update event */\n this.addProfileChangedListener(change$);\n\n /** create the app profile from url query params on first page load */\n this._profileService.createAppProfile$().pipe(takeOnce()).subscribe();\n\n /** loads teh utm params from url quety on first page load */\n this._utmService.loadUtmParams$().pipe(takeOnce()).subscribe();\n }\n\n ngOnDestroy(): void {\n this._subscription.unsubscribe();\n }\n\n /**\n * @description\n * subscribe to profile \"change\" event. this event emits in two cases:\n * (1) on browser's refresh event\n * (2) in dev mode, when using our custom debugger layer we can change profile to debug the different\n * profiles & processes (by partner | by product). after resolving the profile from cache (store) we\n * then allow the content template to be loaded\n * @param change$ the profile \"create\" event stream\n * */\n private addProfileChangedListener(change$: Observable) {\n const changeSub = change$\n .pipe(\n filter((profile: IProcessProfile) => isNotEmpty(profile?.partner)),\n tap((profile) => {\n this.resolveView(profile);\n this.resolveCatalog();\n })\n )\n .subscribe();\n this._subscription.add(changeSub);\n }\n\n /**\n * @description\n * subscribe to profile \"create\" event. the event emits once the new profile is created from url\n * params, this happens on the app's initialization (first load). the event output bring us the new\n * profile and we then navigate to the default view as defined in the profile. the content template\n * is suspended until the profile is resolved\n * @param created$ the profile \"create\" event stream\n * */\n private addProfileCreatedListener(create$: Observable) {\n const createSub = create$\n .pipe(\n filter((profile: IProcessProfile) => isNotEmpty(profile?.partner)),\n tap((profile) => {\n this.resolveCatalog();\n this.resolveView(profile);\n const { path } = SettingsMap.get(profile.params.view as TFeature);\n this._navigationService.moveAny(path);\n })\n )\n .subscribe();\n\n this._subscription.add(createSub);\n }\n\n /**\n * @description\n * dynamically clear and then add the host's template, in this case - the root of the application\n * this means that until this method is called - no content is rendered to the screen. this method\n * is called when the app's page is loaded, either on first load or br refreshing the browser\n * @param profile\n */\n private resolveView(profile: IProcessProfile) {\n this._containerRef.clear();\n this._containerRef.createEmbeddedView(this._appTemplate);\n }\n\n /**\n * @description\n * once the app is initialized, and the profile was created, we can immediately launch an async http\n * request to get catalog collections, this operation runs async in the background and does not delay\n * the app view.\n */\n private resolveCatalog() {\n const context = new ContextBuilder().disableLoader().addUrlModifiers({ omitProcess: true }).build();\n this._catalogService.loadAll$({ context });\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { ShellStore } from '@partners/state';\nimport { tap } from 'rxjs';\n\n@Directive({\n selector: '[progressTracker]',\n standalone: true\n})\nexport class ProgressTrackerDirective {\n private _shellStore = inject(ShellStore);\n\n constructor() {\n this._shellStore.currentStage$\n .pipe(\n tap((stage) => {\n // console.log(`current stage`, stage);\n })\n )\n .subscribe();\n }\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { PartnerLogoComponent, SecondaryLogoComponent } from '@partners/kernel';\nimport { ThemeAssetComponent } from '@partners/themes';\nimport { AppCloseDirective } from '../../directives';\n\n@Component({\n selector: 'application-header',\n standalone: true,\n imports: [ThemeAssetComponent, AppCloseDirective, PartnerLogoComponent, SecondaryLogoComponent],\n template: `\n \n \n \n \n \n
\n \n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'application-header'\n }\n})\nexport class ApplicationHeaderComponent {}\n","import { NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, inject } from '@angular/core';\nimport { GlobalConfig } from '@partners/kernel';\nimport { ShellStore } from '@partners/state';\nimport { FADE_IN_OUT_ANIMATION, ProgressBarComponent } from '@partners/ui';\nimport { calcPercent } from '@partners/utils';\n\n@Component({\n selector: 'application-progress',\n standalone: true,\n imports: [NgIf, ProgressBarComponent],\n template: `\n
{{ headerCaption$$() }}
\n
`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n animations: [FADE_IN_OUT_ANIMATION]\n})\nexport class ApplicationProgressComponent {\n private _shellStore = inject(ShellStore);\n private _globalConfig = inject(GlobalConfig);\n\n /** header caption placed above progress bar */\n headerCaption$$ = this._globalConfig.fromText$$('headerCaption');\n\n /**\n * in some cases, as the main content changes, we want to hide the progress bar. for example -\n * in screens which are loaded and displayed but are not part of the sale process, such as\n * error pages, guide pages, summary page etc', we use isHidden to toggle the display of the\n * app progress bar as specified in the current view's settings\n */\n isHidden$$ = computed(() => {\n const { isProgressHidden } = this._shellStore.viewSettings$$();\n return isProgressHidden;\n });\n\n value$$ = computed(() => {\n const total = this._shellStore.totalStages$$();\n const totalComplete = this._shellStore.totalCompleteStages$$();\n const percentValue = calcPercent(totalComplete, total);\n return percentValue;\n });\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'application-footer',\n standalone: true,\n imports: [],\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class ApplicationFooterComponent {}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n inject,\n ViewEncapsulation\n} from '@angular/core';\nimport { RouterModule, RouterOutlet } from '@angular/router';\nimport { LoaderComponent, LoaderService } from '@partners/kernel';\nimport { ShellStore } from '@partners/state';\nimport { ROUTE_ANIMATION } from '@partners/ui';\nimport { ApplicationFooterComponent } from '../application-footer/application-footer.component';\nimport { ApplicationHeaderComponent } from '../application-header/application-header.component';\nimport { ApplicationProgressComponent } from '../application-progress/application-progress.component';\nimport { DebuggerComponent } from '../debugger/debugger.component';\n\n@Component({\n selector: 'application-view',\n standalone: true,\n imports: [\n RouterModule,\n DebuggerComponent,\n ApplicationHeaderComponent,\n ApplicationProgressComponent,\n ApplicationFooterComponent,\n LoaderComponent\n ],\n template: `\n \n @if(isProgressRendered$$()){\n \n }\n\n
\n \n
\n\n \n @if(showLoader$$()){\n \n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n animations: [ROUTE_ANIMATION]\n})\nexport class ApplicationViewComponent {\n private _shellStore = inject(ShellStore);\n private _loaderService = inject(LoaderService);\n private _changeDetector = inject(ChangeDetectorRef);\n\n readonly showLoader$$ = computed(() => this._loaderService.loaderState$$()?.toggle);\n\n // showLoader$$ = signal(true);\n\n isProgressRendered$$ = computed(() => {\n this._changeDetector.markForCheck();\n const { isProgressRendered } = this._shellStore.viewSettings$$();\n // console.log(`is progress rendered ${isProgressRendered}`);\n return isProgressRendered;\n });\n\n routeState(outlet: RouterOutlet) {\n return outlet.isActivated ? outlet.activatedRoute : '';\n }\n}\n","
\n
\n --\n
\n\n
\n\n\n
\n
\n \n שותף\n \n \n \n {{ partner }}\n \n \n \n \n\n \n מוצר\n \n \n {{ lob.key }} | {{ lob.value }}\n \n \n \n\n \n מותג\n \n \n {{ brand.key }} | {{ brand.value }}\n \n \n \n\n \n תימה\n \n \n \n {{ partner }}\n \n \n \n \n\n \n\n \n סיגמה ווב?\n \n\n \n \n לאן לנווט?\n \n\n \n על כמה חשבת?\n \n \n \n {{ route.title }}\n \n \n \n \n \n\n
\n
\n \n
\n\n
\n \n
\n
\n
\n
\n
","import { CdkDrag, DragDropModule } from '@angular/cdk/drag-drop';\nimport { AsyncPipe, NgFor, NgIf } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n effect,\n EffectRef,\n ElementRef,\n inject,\n OnDestroy,\n OnInit,\n Signal,\n signal,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { FormBuilder, FormControl, FormGroup, NgForm, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectChange, MatSelectModule } from '@angular/material/select';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { Router, RouterModule } from '@angular/router';\nimport { IProcessProfile, IProfileParams, Process } from '@partners/api';\nimport { EnvironmentService, ProfileService } from '@partners/kernel';\nimport { IFlatStage } from '@partners/navigation';\nimport { SettingsMap, TFeature } from '@partners/settings';\nimport { RootStore, ShellStore } from '@partners/state';\nimport { TProcessId } from '@partners/types';\nimport { SLIDE_UP_DOWN_ANIMATION } from '@partners/ui';\nimport { isNotEmpty } from '@partners/utils';\nimport { Observable } from 'rxjs';\nimport { filter, map, pairwise, startWith } from 'rxjs/operators';\n\ntype TPartnerName =\n | 'cal'\n | 'cal-loan'\n | 'becal'\n | 'bit'\n | 'wix'\n | 'cibus'\n | 'bttr'\n | 'flycard'\n | 'yellow'\n | 'payme'\n | 'matalon'\n | 'carrefour'\n | 'htzone'\n | 'mami'\n | 'yenotbitan'\n | 'hashkal'\n | 'shufersal'\n | 'family365'\n | 'idf'\n | 'students';\ntype TPartnersDic = { [key in TPartnerName]?: TPartnerByProcess };\n\ntype TPartnerByProcess = {\n [key in TProcessId]?: {\n saleOfferCode: number;\n salePointCode: number;\n };\n};\n\ninterface IDebuggerModel {\n lobCode: number;\n brandCode: number;\n router: string;\n partner: string;\n token: string;\n isWebMode: boolean;\n saleOfferCode: number;\n salePointCode: number;\n triggerCode: number;\n view: string;\n}\n\ninterface IModelChange {\n prev: IDebuggerModel;\n next: IDebuggerModel;\n}\n\n// type PartnersCollection = typeof TPartnerName[number];\n\n// export const Partners = Array;\n\n@Component({\n standalone: true,\n selector: 'partners-debugger',\n imports: [\n NgIf,\n NgFor,\n AsyncPipe,\n DragDropModule,\n RouterModule,\n BrowserModule,\n MatButtonToggleModule,\n ReactiveFormsModule,\n MatSelectModule,\n DragDropModule,\n MatButtonModule,\n MatCheckboxModule,\n MatSelectModule,\n MatFormFieldModule,\n MatSlideToggleModule\n ],\n templateUrl: './debugger.component.html',\n styles: [\n `\n @use 'mixins' as mix;\n\n body .debugger,\n body[class$='-theme'] .debugger {\n display: grid;\n max-width: 23rem;\n padding: 8px;\n min-width: 20rem;\n font-size: 14px;\n position: fixed;\n z-index: 1;\n right: 1rem;\n top: 1rem;\n border-radius: 25px;\n background-color: rgba(0, 0, 0, 0.23);\n margin: 0;\n min-height: 40px;\n overflow: hidden;\n z-index: 10;\n color: #fff;\n letter-spacing: 0.0125rem;\n .mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label,\n .mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label--float-above {\n --mdc-filled-text-field-label-text-color: #fff;\n color: var(--mdc-filled-text-field-label-text-color);\n }\n .mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after {\n --mdc-filled-text-field-focus-active-indicator-color: #fff;\n border-bottom-color: var(--mdc-filled-text-field-focus-active-indicator-color);\n }\n .mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before {\n --mdc-filled-text-field-active-indicator-color: #fff;\n border-bottom-color: var(--mdc-filled-text-field-active-indicator-color);\n }\n .mdc-text-field--filled:not(.mdc-text-field--disabled) {\n background-color: transparent;\n }\n .mat-mdc-form-field-flex {\n background-color: transparent;\n }\n .mat-mdc-select-value,\n .mat-mdc-select-value-text {\n color: #fff;\n display: block;\n }\n .mat-button-toggle {\n flex: 1;\n }\n .mat-mdc-form-field-subscript-wrapper {\n min-height: 0;\n height: 0;\n }\n .mdc-label,\n .mat-mdc-select-arrow {\n color: #fff;\n }\n .mat-mdc-select-value {\n display: flex;\n }\n .mat-mdc-outlined-button,\n .mat-mdc-raised-button {\n width: 6.25rem;\n border-radius: 2rem;\n font-size: 1.2rem;\n\n letter-spacing: 0.01rem;\n &[disabled][disabled] {\n color: rgba(255, 255, 255, 0.45);\n border: 2px dashed rgba(255, 255, 255, 0.45);\n --mdc-protected-button-disabled-container-color: transparent;\n --mdc-protected-button-disabled-label-text-color: #fff;\n }\n }\n .mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label {\n font-size: 1.2rem;\n }\n .mat-mdc-outlined-button {\n border: 1px solid #fff;\n color: #fff;\n }\n section.toggler-container {\n div {\n width: fit-content;\n }\n div.dev-artistry-mode {\n background: teal;\n border-radius: 6px;\n padding: 1px;\n border: 2.5px solid;\n }\n .dev-view {\n font-size: 1.25rem;\n cursor: pointer;\n }\n }\n .view-toggler {\n display: grid;\n place-content: center;\n cursor: pointer;\n height: 20px;\n width: 25px;\n padding: 0;\n position: absolute;\n left: 19px;\n top: 9px;\n span {\n display: inline-block;\n font-size: 25px;\n padding: 0;\n line-height: 0.3;\n white-space: nowrap;\n }\n }\n .reset,\n .submit {\n overflow: hidden;\n display: grid;\n place-items: center;\n margin: 1.25rem 0;\n }\n form {\n max-height: 80dvh;\n height: 100%;\n overflow-y: auto;\n padding: 15px 15px 15px 10px;\n display: grid;\n grid-auto-flow: row;\n grid-template-columns: 1fr;\n grid-template-rows: auto;\n grid-gap: 0.5rem 0;\n justify-content: center;\n align-items: start;\n color: #fff;\n }\n textarea {\n height: 4rem;\n width: 100%;\n padding: 0.25rem;\n border-radius: 5px;\n background-color: #ffffff25;\n border: none;\n color: #fff;\n direction: ltr;\n text-align: left;\n &.url-textbox {\n height: 6rem;\n }\n }\n }\n `\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [CdkDrag],\n host: {\n class: 'debugger'\n },\n animations: [SLIDE_UP_DOWN_ANIMATION]\n})\nexport class DebuggerComponent implements OnInit, OnDestroy, AfterViewInit {\n private readonly _sessionKey = 'DEBUGGER_MODE';\n\n get debuggerState() {\n return !!sessionStorage.getItem(this._sessionKey);\n }\n\n set debuggerState(activate: boolean) {\n if (activate) {\n sessionStorage.setItem(this._sessionKey, 'COLLAPSE');\n } else {\n sessionStorage.removeItem(this._sessionKey);\n }\n }\n\n readonly partnersDic: TPartnersDic = {\n cal: {\n card: { saleOfferCode: 42, salePointCode: 206 },\n loan: { saleOfferCode: 0, salePointCode: 0 }\n },\n flycard: {\n card: { saleOfferCode: 47, salePointCode: 206 },\n loan: { saleOfferCode: 0, salePointCode: 0 }\n },\n htzone: {\n card: { saleOfferCode: 83, salePointCode: 4797 },\n loan: { saleOfferCode: 0, salePointCode: 0 }\n },\n hashkal: {\n card: { saleOfferCode: 83, salePointCode: 4797 },\n loan: { saleOfferCode: 0, salePointCode: 0 }\n },\n wix: {\n card: { saleOfferCode: 7, salePointCode: 4797 },\n loan: { saleOfferCode: 0, salePointCode: 0 }\n },\n carrefour: {\n card: { saleOfferCode: 84, salePointCode: 177 },\n loan: { saleOfferCode: 0, salePointCode: 0 }\n },\n bit: {\n card: { saleOfferCode: 84, salePointCode: 177 },\n loan: { saleOfferCode: 0, salePointCode: 0 }\n },\n payme: {\n card: { saleOfferCode: 84, salePointCode: 177 },\n loan: { saleOfferCode: 0, salePointCode: 0 }\n },\n bttr: {\n card: { saleOfferCode: 80, salePointCode: 4795 },\n loan: { saleOfferCode: 0, salePointCode: 0 }\n },\n mami: {\n card: { saleOfferCode: 107, salePointCode: 0 },\n loan: { saleOfferCode: 107, salePointCode: 0 }\n },\n yenotbitan: {\n card: { saleOfferCode: 64, salePointCode: 94 },\n loan: { saleOfferCode: 64, salePointCode: 94 }\n },\n idf: {\n card: { saleOfferCode: 64, salePointCode: 94 },\n loan: { saleOfferCode: 64, salePointCode: 94 }\n },\n students: {\n card: { saleOfferCode: 33, salePointCode: 94 },\n loan: { saleOfferCode: 33, salePointCode: 94 }\n }\n };\n\n readonly lobList = [\n { key: 'כרטיס', value: Process.card as number },\n { key: 'הלוואה', value: Process.loan as number },\n { key: 'BNPL', value: Process.bnpl as number }\n ];\n\n readonly brandList = [\n { key: 'ויזה', value: 1 },\n { key: 'דיינרס', value: 3 },\n { key: 'מסטרכארד', value: 6 },\n { key: 'דיינרס בינ\"ל', value: 9 }\n ];\n readonly partnersList = [\n 'bit',\n 'bttr',\n 'becal',\n 'cal',\n 'cal-loan',\n 'carrefour',\n 'cibus',\n 'default',\n 'family365',\n 'flycard',\n 'hando',\n 'hashkal',\n 'htzone',\n 'idf',\n 'mami',\n 'matalon',\n 'paybox',\n 'paylease',\n 'payme',\n 'powercard',\n 'shufersal',\n 'wix',\n 'yellow',\n 'yenotbitan',\n 'students'\n ];\n\n readonly debugForm: FormGroup;\n\n profile$$: Signal;\n router$: Observable[]>;\n\n get formValue(): IDebuggerModel {\n return this.debugForm.getRawValue();\n }\n\n @ViewChild('autoUrlTextBox', { static: false, read: ElementRef })\n urlTextBox: ElementRef;\n\n @ViewChild('toggleButton', { static: false, read: ElementRef })\n toggleButton: ElementRef;\n\n @ViewChild('debuggerForm', { static: false })\n ngForm: NgForm;\n\n isCollapsed = signal(this.debuggerState);\n\n #rootStore = inject(RootStore);\n #router = inject(Router);\n #changeDetector = inject(ChangeDetectorRef);\n #changeEffectRef: EffectRef;\n #shellStore = inject(ShellStore);\n #profileService = inject(ProfileService);\n #formBuilder = inject(FormBuilder);\n #change: Signal;\n #urlFormat = signal('');\n #envService = inject(EnvironmentService);\n\n readonly initialState: IProfileParams = {\n lobCode: 1,\n brandCode: 1,\n partner: 'cal',\n token: 'TOKEN',\n saleOfferCode: this.partnersDic['cal'].card.saleOfferCode,\n salePointCode: this.partnersDic['cal'].card.salePointCode,\n triggerCode: 0,\n view: 'auth-guide',\n uid: undefined,\n acMan: null\n };\n\n constructor() {\n // this.partnersList: ToArray;\n\n this.debugForm = this.#formBuilder.group({\n lobCode: new FormControl(undefined, [Validators.required]),\n brandCode: new FormControl(undefined, [Validators.required]),\n router: new FormControl(undefined),\n partner: new FormControl(undefined, [Validators.required]),\n theme: new FormControl(undefined),\n token: new FormControl(undefined, [Validators.required]),\n isWebMode: new FormControl(undefined),\n saleOfferCode: new FormControl(undefined),\n salePointCode: new FormControl(undefined),\n triggerCode: new FormControl(undefined)\n });\n\n this.#change = toSignal(\n this.debugForm.valueChanges.pipe(\n startWith(null),\n pairwise(),\n map(([prev, next]) => ({ prev, next }))\n )\n );\n\n this.#changeEffectRef = effect(\n () => {\n const modelValue = this.#change();\n\n if (!modelValue?.next) {\n return;\n }\n\n const { next }: IModelChange = this.#change();\n\n this.#buildUrl();\n\n // if (this.shouldReset()) {\n // this.ngOnDestroy();\n // this.resetMockProcess();\n // }\n },\n { allowSignalWrites: true }\n );\n\n this.router$ = this.#shellStore.flatStages$.pipe(\n filter((stages: IFlatStage[]) => !!stages?.length),\n map((stages: IFlatStage[]) => {\n const activeStages: IFlatStage[] = stages.filter((stage) => !!SettingsMap.get(stage.name as TFeature));\n return activeStages;\n }),\n map((stages: IFlatStage[]) => {\n return stages.map((stage) => ({\n name: stage.name,\n title: stage.title,\n url: SettingsMap.get(stage.name as TFeature).path\n }));\n })\n );\n }\n\n shouldReset(): boolean {\n const { partner, lobCode, brandCode } = this.formValue;\n\n const profile = this.#profileService.profile$$();\n\n const lostIntegrity =\n partner !== profile?.params.partner ||\n lobCode !== profile?.params.lobCode ||\n brandCode !== profile?.params.brandCode;\n\n return lostIntegrity;\n }\n\n ngOnInit(): void {\n const storedParams = this.#profileService.params$$();\n const hasStoredParams = isNotEmpty(storedParams?.lobCode);\n\n const initParams = hasStoredParams\n ? storedParams\n : this.#envService.isMockMode$$()\n ? this.initialState\n : Object.assign(this.initialState, { token: null });\n\n this.debugForm.patchValue(initParams);\n\n !hasStoredParams && this.#shellStore.dispatchUpdateProfileParams(this.initialState);\n }\n\n toggleView() {\n const nextState = !this.isCollapsed();\n this.isCollapsed.set(nextState);\n }\n\n togglePermanentView() {\n this.toggleView();\n this.debuggerState = this.isCollapsed();\n }\n\n ngAfterViewInit(): void {\n this.debugForm.updateValueAndValidity();\n this.#changeDetector.markForCheck();\n }\n\n ngOnDestroy(): void {\n this.#changeEffectRef.destroy();\n }\n\n launchApp() {\n this.#rootStore.dispatchResetState();\n const url = this.#urlFormat();\n window.location.href = url;\n\n // this.#profileService\n // .createAppProfile$(url)\n // .pipe(\n // takeOnce(),\n // tap(() => this.#changeDetector.detectChanges())\n // )\n // .subscribe();\n }\n\n navigate({ value }: MatSelectChange) {\n this.#router.navigateByUrl(value);\n }\n\n resetMockProcess() {\n this.ngForm.resetForm();\n this.#rootStore.dispatchResetState();\n const url = new URL(window.location.href);\n // window.location.href = url.origin;\n this.#router.navigateByUrl('');\n }\n\n #buildUrl() {\n const queryString = this.#buildUrlQuery();\n\n const fullUrl = `${window.location.href}?${queryString}`;\n\n this.#urlFormat.set(fullUrl);\n }\n\n #buildUrlQuery(): string {\n const { lobCode, partner, theme, isWebMode, token, brandCode, saleOfferCode, salePointCode, recommenderId } =\n this.debugForm.getRawValue();\n\n const mode = isWebMode ? `uid=${token}` : `token=${token}`;\n //const view = isWebMode ? 'introduction' : 'auth-guide';\n const isLoan = lobCode === 2;\n let view = null;\n if (isWebMode) {\n view = isLoan ? 'classify' : 'introduction';\n } else {\n view = 'auth-guide';\n }\n\n // return `${mode}&saleOfferCode=${saleOfferCode}&salePointCode=${salePointCode}&brandCode=${brandCode}&partner=${partner}&lobCode=${lobCode}&view=${view}&triggerCode=0`;\n return `${mode}&partner=${partner}&theme=${theme}&saleOfferCode=${saleOfferCode}&salePointCode=${salePointCode}&brandCode=${brandCode}&lobCode=${lobCode}&view=${view}&recommenderId=${recommenderId}`;\n }\n}\n","import { ILocalErrorsConfig, IRemoteErrorsConfig, RootErrorsConfig } from '@partners/errors';\nexport class ShellErrorsConfig extends RootErrorsConfig {\n override localErrors: ILocalErrorsConfig = {\n formatPrefix: `*****************`,\n formatSuffix: `*****************`,\n reportLog: false\n };\n override remoteErrors: IRemoteErrorsConfig = {\n client: {\n scope: {\n min: 400,\n max: 499\n }\n },\n server: {\n scope: {\n min: 500,\n max: 599\n }\n }\n };\n\n constructor() {\n super();\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { MockConfig } from '@partners/kernel';\nimport { GLOBAL_SETTINGS, IEnvironmentSettings } from '@partners/settings';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ShellMockConfig extends MockConfig {\n get environment(): IEnvironmentSettings {\n const { environment } = this._shellConfig;\n return environment;\n }\n get isDevMode(): boolean {\n return this.environment.isMockMode;\n }\n\n private readonly _shellConfig = inject(GLOBAL_SETTINGS);\n}\n","import { inject, Injectable } from '@angular/core';\nimport { ShellStore } from '@partners/state';\nimport { ThemeConfig } from '@partners/themes';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ShellThemeConfig extends ThemeConfig {\n #shellStore = inject(ShellStore);\n\n get themeRoot(): string {\n return './themes';\n }\n\n get themeIconSet(): string {\n return 'icon-sets';\n }\n\n get themeSuffix(): string {\n return 'theme';\n }\n\n get themeName(): string {\n return this.#shellStore.params$$().theme;\n }\n\n /** the custom theme's assets path name */\n get themeSource(): string {\n return this.#shellStore.params$$().partner;\n }\n\n get themeFileId(): string {\n return 'partner';\n }\n}\n","import { ModuleWithProviders, NgModule, Provider } from '@angular/core';\n\n@NgModule({\n imports: []\n})\nexport class ErrorsModule {\n static forRoot(rootErrorsProvider?: Provider): ModuleWithProviders {\n return {\n ngModule: ErrorsModule,\n providers: [rootErrorsProvider]\n };\n }\n}\n","import { registerLocaleData } from '@angular/common';\nimport { provideHttpClient, withInterceptors } from '@angular/common/http';\nimport localeHe from '@angular/common/locales/he';\nimport { ErrorHandler, LOCALE_ID, ModuleWithProviders, NgModule } from '@angular/core';\nimport { ERRORS_CONFIG, ErrorsModule } from '@partners/errors';\nimport {\n DefaultErrorHandler,\n HttpCommonModule,\n MOCK_CONFIG,\n MockModule,\n endpointInterceptor,\n loaderInterceptor,\n remoteErrorInterceptor\n} from '@partners/kernel';\nimport { IGlobalSettings, provideShellSettings } from '@partners/settings';\nimport { ShellStateModule, StateModule } from '@partners/state';\nimport { THEMES_CONFIG, ThemesModule } from '@partners/themes';\nimport { UiModule } from '@partners/ui';\nimport { DateUtilModule } from '@partners/utils';\nimport { ShellErrorsConfig, ShellMockConfig, ShellThemeConfig } from './config';\n\n@NgModule({\n providers: [\n { provide: ErrorHandler, useClass: DefaultErrorHandler },\n { provide: LOCALE_ID, useValue: 'he' }\n ],\n imports: [\n UiModule,\n StateModule,\n ShellStateModule,\n HttpCommonModule,\n DateUtilModule.forRoot({\n format: 'DD/MM/YYYY',\n locale: 'he-IL'\n }),\n ErrorsModule.forRoot({\n provide: ERRORS_CONFIG,\n useClass: ShellErrorsConfig\n }),\n MockModule.forRoot({\n provide: MOCK_CONFIG,\n useClass: ShellMockConfig\n }),\n ThemesModule.forRoot({\n provide: THEMES_CONFIG,\n useClass: ShellThemeConfig\n })\n ]\n})\nexport class FeatureShellModule {\n public static forRoot(shellSettings: IGlobalSettings): ModuleWithProviders {\n registerLocaleData(localeHe);\n return {\n ngModule: FeatureShellModule,\n providers: [\n provideShellSettings(shellSettings),\n provideHttpClient(withInterceptors([remoteErrorInterceptor, endpointInterceptor, loaderInterceptor]))\n ]\n };\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule, Provider } from '@angular/core';\nimport { provideUtmService } from './providers';\n\n@NgModule({\n imports: [CommonModule]\n})\nexport class UtmModule {\n static forRoot(utmConfigProviders: Provider[]): ModuleWithProviders {\n return {\n ngModule: UtmModule,\n providers: [...utmConfigProviders, provideUtmService()]\n };\n }\n}\n","import { UtmService } from '../services';\n\nexport const provideUtmService = () => {\n return {\n provide: UtmService,\n useFactory: () => {\n return new UtmService();\n }\n };\n};\n","import { IEnvironmentSettings } from '@partners/settings';\n\nexport const environment: IEnvironmentSettings = {\n production: true,\n apiUrl: 'https://partners-cal.cal-online.co.il/CalsaleWS/api',\n calEdaUri: 'https://api.cal-online.co.il/CalEda',\n isSecured: true,\n isProxy: true,\n isMockMode: false,\n isDevMode: false,\n rootEndpoint: 'digitalwallet',\n scanOcrUrl: 'https://scanvc.cal-online.co.il',\n maxScanOcrAttempts: 4,\n isScanOcrDisabled: false,\n gtmConfig: {\n trackingCode: 'GTM-WCP67H3',\n gtmAuth: '',\n gtmPreview: '',\n gtmCookiesWin: '',\n applicationName: 'partners'\n }\n};\n","import { NgModule } from '@angular/core';\nimport { Route, RouterModule, Routes } from '@angular/router';\nimport { navigationGuard } from '@partners/kernel';\nimport { IFeatureSettings, SettingsMap } from '@partners/settings';\n\nconst configFeature = (featureModule: any): any => {\n return featureModule;\n};\n\nconst configRoute = (featureSettings: IFeatureSettings): Partial => {\n const { path } = featureSettings;\n return { path };\n};\n\nexport const routes: Routes = [\n {\n path: '',\n canActivateChild: [navigationGuard],\n children: [\n {\n ...configRoute(SettingsMap.amount()),\n\n loadChildren: () => import('@partners/features/amount').then((m) => configFeature(m.AmountFeatureModule))\n },\n {\n ...configRoute(SettingsMap.agreementIndication()),\n\n loadChildren: () =>\n import('@partners/features/agreement-indication').then((m) =>\n configFeature(m.CreditAgreementIndicationFeatureModule)\n )\n },\n {\n ...configRoute(SettingsMap.agreementConsent()),\n\n loadChildren: () =>\n import('@partners/features/agreement-consent').then((m) =>\n configFeature(m.CreditAgreementConsentFeatureModule)\n )\n },\n {\n ...configRoute(SettingsMap.marital()),\n\n loadChildren: () => import('@partners/features/marital').then((m) => configFeature(m.MaritalFeatureModule))\n },\n {\n ...configRoute(SettingsMap.expense()),\n\n loadChildren: () => import('@partners/features/expense').then((m) => configFeature(m.ExpenseFeatureModule))\n },\n {\n ...configRoute(SettingsMap.income()),\n\n loadChildren: () => import('@partners/features/income').then((m) => configFeature(m.IncomeFeatureModule))\n },\n {\n ...configRoute(SettingsMap.refused()),\n\n loadChildren: () => import('@partners/features/refused').then((m) => configFeature(m.RefusedFeatureModule))\n },\n {\n ...configRoute(SettingsMap.country()),\n\n loadChildren: () => import('@partners/features/country').then((m) => configFeature(m.CountryFeatureModule))\n },\n {\n ...configRoute(SettingsMap.introduction()),\n loadChildren: () =>\n import('@partners/features/introduction').then((m) => configFeature(m.IntroductionFeatureModule))\n },\n {\n ...configRoute(SettingsMap.welcome()),\n\n loadChildren: () => import('@partners/features/welcome').then((m) => configFeature(m.WelcomeFeatureModule))\n },\n {\n ...configRoute(SettingsMap.authGuide()),\n\n loadChildren: () => import('@partners/features/auth-guide').then((m) => configFeature(m.AuthGuideFeatureModule))\n },\n {\n ...configRoute(SettingsMap.authOtp()),\n\n loadChildren: () => import('@partners/features/auth-otp').then((m) => configFeature(m.AuthOtpFeatureModule))\n },\n {\n ...configRoute(SettingsMap.authLogin()),\n\n loadChildren: () => import('@partners/features/auth-login').then((m) => configFeature(m.AuthLoginFeatureModule))\n },\n {\n ...configRoute(SettingsMap.scanIntro()),\n loadChildren: () => import('@partners/features/scan-intro').then((m) => configFeature(m.ScanIntroFeatureModule))\n },\n {\n ...configRoute(SettingsMap.scanGender()),\n loadChildren: () =>\n import('@partners/features/scan-gender').then((m) => configFeature(m.ScanGenderFeatureModule))\n },\n {\n ...configRoute(SettingsMap.scanDocument()),\n loadChildren: () =>\n import('@partners/features/scan-document').then((m) => configFeature(m.ScanDocumentFeatureModule))\n },\n {\n ...configRoute(SettingsMap.scanDetails()),\n loadChildren: () =>\n import('@partners/features/scan-details').then((m) => configFeature(m.ScanDetailsFeatureModule))\n },\n {\n ...configRoute(SettingsMap.classify()),\n loadChildren: () => import('@partners/features/classify').then((m) => configFeature(m.ClassifyFeatureModule))\n },\n {\n ...configRoute(SettingsMap.offer()),\n\n loadChildren: () => import('@partners/features/offer').then((m) => configFeature(m.OfferFeatureModule))\n },\n {\n ...configRoute(SettingsMap.identity()),\n\n loadChildren: () => import('@partners/features/identity').then((m) => configFeature(m.IdentityFeatureModule))\n },\n {\n ...configRoute(SettingsMap.contact()),\n\n loadChildren: () => import('@partners/features/contact').then((m) => configFeature(m.ContactFeatureModule))\n },\n {\n ...configRoute(SettingsMap.account()),\n\n loadChildren: () => import('@partners/features/account').then((m) => configFeature(m.AccountFeatureModule))\n },\n {\n ...configRoute(SettingsMap.proposal()),\n\n loadChildren: () => import('@partners/features/proposal').then((m) => configFeature(m.ProposalFeatureModule))\n },\n {\n ...configRoute(SettingsMap.address()),\n\n loadChildren: () => import('@partners/features/address').then((m) => configFeature(m.AddressFeatureModule))\n },\n {\n ...configRoute(SettingsMap.privacy()),\n\n loadChildren: () => import('@partners/features/privacy').then((m) => configFeature(m.PrivacyFeatureModule))\n },\n {\n ...configRoute(SettingsMap.card()),\n\n loadChildren: () => import('@partners/features/card').then((m) => configFeature(m.CardFeatureModule))\n },\n {\n ...configRoute(SettingsMap.employment()),\n\n loadChildren: () =>\n import('@partners/features/employment').then((m) => configFeature(m.EmploymentFeatureModule))\n },\n {\n ...configRoute(SettingsMap.purpose()),\n\n loadChildren: () => import('@partners/features/purpose').then((m) => configFeature(m.PurposeFeatureModule))\n },\n {\n ...configRoute(SettingsMap.debits()),\n\n loadChildren: () => import('@partners/features/debits').then((m) => configFeature(m.DebitsFeatureModule))\n },\n {\n ...configRoute(SettingsMap.persona()),\n\n loadChildren: () => import('@partners/features/persona').then((m) => configFeature(m.PersonaFeatureModule))\n },\n {\n ...configRoute(SettingsMap.signature()),\n\n loadChildren: () => import('@partners/features/signature').then((m) => configFeature(m.SignatureFeatureModule))\n },\n {\n ...configRoute(SettingsMap.onlineUse()),\n\n loadChildren: () => import('@partners/features/online-use').then((m) => configFeature(m.OnlineUseFeatureModule))\n },\n {\n ...configRoute(SettingsMap.beneficiaries()),\n\n loadChildren: () =>\n import('@partners/features/beneficiaries').then((m) => configFeature(m.BeneficiariesFeatureModule))\n },\n {\n ...configRoute(SettingsMap.disclosure()),\n\n loadChildren: () =>\n import('@partners/features/disclosure').then((m) => configFeature(m.DisclosureFeatureModule))\n },\n {\n ...configRoute(SettingsMap.delivery()),\n\n loadChildren: () => import('@partners/features/delivery').then((m) => configFeature(m.DeliveryFeatureModule))\n },\n {\n ...configRoute(SettingsMap.summary()),\n\n loadChildren: () => import('@partners/features/summary').then((m) => configFeature(m.SummaryFeatureModule))\n },\n {\n ...configRoute(SettingsMap.demography()),\n\n loadChildren: () =>\n import('@partners/features/demography').then((m) => configFeature(m.DemographyFeatureModule))\n },\n {\n ...configRoute(SettingsMap.lead()),\n\n loadChildren: () => import('@partners/features/lead').then((m) => configFeature(m.LeadFeatureModule))\n },\n {\n ...configRoute(SettingsMap.simulator()),\n loadChildren: () => import('@partners/features/simulator').then((m) => configFeature(m.SimulatorFeatureModule))\n }\n ]\n },\n {\n path: 'message',\n loadChildren: () => import('@partners/features/message').then((m) => configFeature(m.MessageFeatureModule))\n }\n];\n\n@NgModule({\n imports: [\n RouterModule.forRoot(routes, {\n bindToComponentInputs: true,\n canceledNavigationResolution: 'computed'\n })\n ]\n})\nexport class AppRouterModule {}\n","import { Component, OnInit } from '@angular/core';\nimport { MemService } from '@partners/utils';\nimport { environment } from '../environments/environment';\n\n@Component({\n selector: 'partners-root',\n template: `\n \n \n \n \n `,\n host: {\n class: 'partners-root'\n }\n})\nexport class AppHostComponent implements OnInit {\n title = 'wallet';\n\n isDevMode: boolean = false;\n\n constructor(private mem: MemService) {\n this.isDevMode = environment.isDevMode;\n // if (environment) {\n // this.isDevMode = environment.isDevMode;\n // }\n }\n\n ngOnInit(): void {\n this.mem.injectMemScripts();\n }\n}\n","import { inject, LOCALE_ID, NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { GtmInjectScriptsDirective } from '@cal-analytics/gtm';\nimport { CalScanModule } from '@calsale/scanovate';\nimport { StoreDevtoolsModule } from '@ngrx/store-devtools';\nimport { GtmAdapterModule } from '@partners/gtm';\nimport { EnvironmentService, ScanConfig } from '@partners/kernel';\nimport {\n AppInitializerDirective,\n ApplicationViewComponent,\n DebuggerComponent,\n FeatureShellModule,\n ProgressTrackerDirective\n} from '@partners/shell';\nimport { StateModule } from '@partners/state';\nimport { UtmModule, UTM_CONFIG, UTM_PARAMS } from '@partners/utm';\nimport player from 'lottie-web';\nimport { provideLottieOptions } from 'ngx-lottie';\nimport { environment } from '../environments/environment';\nimport { AppRouterModule } from './app-router.module';\nimport { AppHostComponent } from './app.component';\n\n@NgModule({\n providers: [\n { provide: LOCALE_ID, useValue: 'he' },\n provideLottieOptions({\n player: () => player\n })\n ],\n declarations: [AppHostComponent],\n imports: [\n BrowserModule,\n AppRouterModule,\n ProgressTrackerDirective,\n GtmInjectScriptsDirective,\n StateModule,\n GtmAdapterModule.forRoot(environment.gtmConfig),\n CalScanModule.forRoot({\n ...ScanConfig.config\n }),\n FeatureShellModule.forRoot({\n environment: environment,\n urlParams: [\n 'token',\n 'uid',\n 'partner',\n 'brandCode',\n 'lobCode',\n 'saleOfferCode',\n 'salePointCode',\n 'view',\n 'recommenderId',\n 'profileCode',\n 'triggerCode',\n 'theme',\n 'acMan'\n ]\n }),\n UtmModule.forRoot([\n {\n provide: UTM_PARAMS,\n useValue: ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content']\n },\n {\n provide: UTM_CONFIG,\n useFactory: () => ({ calEdaUri: inject(EnvironmentService).calEdaUri$$() })\n }\n ]),\n AppInitializerDirective,\n ApplicationViewComponent,\n BrowserAnimationsModule,\n StoreDevtoolsModule.instrument(),\n DebuggerComponent\n ],\n bootstrap: [AppHostComponent]\n})\nexport class AppModule {}\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic()\n .bootstrapModule(AppModule)\n .catch((err) => console.error(err));\n","import { NgModule } from '@angular/core';\n\n@NgModule({\n imports: []\n})\nexport class ApiModule {}\n","import { TProcessId } from '@partners/types';\nimport { coerceNumber } from '@partners/utils';\n\n/** converts process CODE to process NAME */\nexport function getProcessCode(processId: TProcessId): number {\n const pKeys = Object.keys(Process);\n const pValues = Object.values(Process);\n\n const index = pKeys.indexOf(processId);\n\n const code = pValues[index];\n\n return code;\n}\n\n/** converts process NAME to process CODE */\nexport function getProcessId(processCode: number): TProcessId {\n const pKeys = Object.keys(Process);\n const pValues = Object.values(Process);\n\n const index = pValues.indexOf(coerceNumber(processCode));\n\n const id = pKeys[index];\n\n return id as TProcessId;\n}\n\nexport const Process: { [key in TProcessId]: number } = {\n card: 1 /* כרטיס אשראי */,\n loan: 2 /* הלוואה לפרטיים */,\n employer: 3 /* כרטיס מעסיק */,\n upsell: 4 /* מסגרת אפס */,\n bnpl: 5 /* הלוואה קנה עכשיו שלם אחר כך */,\n acfl: 2 /* הלוואה ללא כרטיס */\n} as const;\n","import { Injectable, inject } from '@angular/core';\nimport { IHttpOptions } from '@partners/http';\nimport { Observable, distinctUntilChanged, of, startWith, switchMap } from 'rxjs';\nimport { TBankBranchOption, TCatalogOption, TResidenceOption } from '../model';\nimport { CatalogService } from './catalog.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CatalogQuery {\n private _catalogService = inject(CatalogService);\n\n constructor() {}\n\n findResidence(residenceCode: number): TResidenceOption {\n const residenceList: TResidenceOption[] = this._catalogService.fromResidence();\n const residence = residenceList.find(({ value }) => value === residenceCode);\n return residence;\n }\n\n findBank(bankCode: number): TCatalogOption {\n const bankList: TCatalogOption[] = this._catalogService.fromFinance('bank');\n const bank = bankList.find(({ value }) => value === bankCode);\n return bank;\n }\n\n findBranchesForBank(bankCode: number): TBankBranchOption[] {\n const branchList: TBankBranchOption[] = this._catalogService.fromFinance('bankBranch');\n const bankBranches = branchList.filter((branch) => branch.bankCode === bankCode);\n return bankBranches;\n }\n\n findBankBranch(branchCode: number, bankCode: number): TBankBranchOption {\n const bankBranches = this.findBranchesForBank(bankCode);\n const branch = bankBranches.find(({ value }) => value === branchCode);\n return branch;\n }\n\n filterStreetsByName$(\n streetQuery: string,\n residenceCode: string | number,\n options: IHttpOptions = {}\n ): Observable {\n return of(streetQuery).pipe(\n startWith(null),\n distinctUntilChanged(),\n switchMap(() => {\n options = { ...options, params: { residenceCode, streetQuery } };\n\n return this._catalogService.requestCatalog$('streets', options);\n })\n );\n }\n}\n","import { Injectable, inject, signal } from '@angular/core';\n\nimport { HttpService, IHttpOptions } from '@partners/http';\nimport { isEmptyArray, isEmptyObject } from '@partners/utils';\nimport { Observable, lastValueFrom, throwError } from 'rxjs';\nimport { catchError, finalize, map, take, tap } from 'rxjs/operators';\nimport {\n TCatalogCollection,\n TCatalogEndPoint,\n TCatalogList,\n TCatalogOption,\n TCatalogResidenceList,\n TResidenceOption\n} from '../model/catalog.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CatalogService {\n metadata$$ = signal({});\n finance$$ = signal({});\n residence$$ = signal([]);\n\n isMetadataInProgress = signal(false);\n isFinanceInProgress = signal(false);\n isResidenceInProgress = signal(false);\n\n metadataPromise: Promise;\n financePromise: Promise;\n residencePromise: Promise;\n\n private _httpService = inject(HttpService);\n\n constructor() {}\n\n loadAll$(options: IHttpOptions = {}) {\n this.loadMetadata(options);\n this.loadFinance(options);\n this.loadResidence(options);\n }\n\n loadMetadata(options: IHttpOptions = {}): Promise {\n if (this.isMetaDataEmpty() && !this.metadataPromise) {\n this.isMetadataInProgress.set(true);\n const metadataCatalog = this.requestCatalog$('metadata', options).pipe(\n tap((data) => this.metadata$$.set(data)),\n finalize(() => this.isMetadataInProgress.set(false))\n );\n this.metadataPromise = lastValueFrom(metadataCatalog);\n }\n return this.metadataPromise;\n }\n\n loadFinance(options: IHttpOptions = {}): Promise {\n if (this.isFinanceEmpty() && !this.financePromise) {\n this.isFinanceInProgress.set(true);\n const financeCatalog = this.requestCatalog$('finance', options).pipe(\n tap((data) => this.finance$$.set(data)),\n finalize(() => this.isFinanceInProgress.set(false))\n );\n this.financePromise = lastValueFrom(financeCatalog);\n }\n return this.financePromise;\n }\n\n loadResidence(options: IHttpOptions = {}): Promise {\n if (this.isResidenceEmpty() && !this.residencePromise) {\n this.isResidenceInProgress.set(true);\n const residenceCatalog = this.requestCatalog$('residence', options).pipe(\n tap((data) => this.residence$$.set(data)),\n finalize(() => this.isResidenceInProgress.set(false))\n );\n\n this.residencePromise = lastValueFrom(residenceCatalog);\n }\n return this.residencePromise;\n }\n\n fromFinance(key: string): T[] {\n const financeCatalog: TCatalogCollection = this.finance$$();\n return financeCatalog[key] as T[];\n }\n\n fromMetadata(key: string): T[] {\n const metadataCatalog: TCatalogCollection = this.metadata$$();\n return metadataCatalog[key] as T[];\n }\n\n fromResidence(): TResidenceOption[] {\n const residenceCatalog: TCatalogResidenceList = this.residence$$();\n return residenceCatalog;\n }\n\n\n requestCatalog$(endPoint: TCatalogEndPoint, options: IHttpOptions = {}): Observable {\n // const context = new ContextBuilder().disableLoader().build();\n // options = { ...options, ...{ context } };\n\n return this._httpService.fetch(`catalog/${endPoint}`, options).pipe(\n catchError((error) => {\n console.error(`\\nFailed to load \"${endPoint}\" catalog\\n`);\n return throwError(() => error);\n }),\n take(1),\n map(({ result }) => {\n return result;\n })\n );\n }\n\n private isResidenceEmpty(): boolean {\n return this.isEmptyList(this.residence$$());\n }\n\n private isFinanceEmpty(): boolean {\n return this.isEmptyCollection(this.finance$$());\n }\n\n private isMetaDataEmpty(): boolean {\n return this.isEmptyCollection(this.metadata$$());\n }\n\n private isEmptyCollection(collection: TCatalogCollection) {\n return isEmptyObject(collection);\n }\n\n private isEmptyList(list: TCatalogList) {\n return isEmptyArray(list);\n }\n}\n","import { signal } from '@angular/core';\nimport { TCatalogOption } from '../model';\n\nexport const debitDayCatalog$$ = signal([\n { key: '2 בחודש', value: 2 },\n { key: '10 בחודש', value: 10 }\n]);\n","import { signal } from '@angular/core';\nimport { TCatalogOption } from '../model';\n\nexport const refusedCatalog$$ = signal([\n { key: 'כן', value: 1 },\n { key: 'לא', value: 2 },\n { key: 'לא ידוע לי', value: 3 }\n]);\n","import { signal } from '@angular/core';\nimport { MaritalStatusEnum } from '@partners/constants';\nimport { TCatalogOption } from '../model';\n\nexport const maritalStatusCatalog$$ = signal([\n { key: 'כן', value: MaritalStatusEnum.married },\n { key: 'לא', value: MaritalStatusEnum.single }\n]);\n","import { signal } from '@angular/core';\nimport { LeadStatusEnum } from '@partners/constants';\nimport { TCatalogOption } from '../model';\n\nexport const leadStatusCatalog$$ = signal([\n { key: 'תחזרו אליי', value: LeadStatusEnum.interested },\n { key: 'לא כרגע', value: LeadStatusEnum.notInterested }\n]);\n","import { signal } from '@angular/core';\nimport { TCatalogOption } from '../model';\n\nexport const onlineUseStatusCatalog$$ = signal([\n { key: 'כן', value: 1 },\n { key: 'לא', value: 0 }\n]);\n","import { signal } from '@angular/core';\nimport { TCatalogGraphicOption } from '../model';\n\nexport const genderCatalog$$ = signal([\n { key: 'זכר', value: 1, icon: 'gender-male-icon' },\n { key: 'נקבה', value: 2, icon: 'gender-female-icon' }\n]);\n","import { signal } from '@angular/core';\nimport { TCatalogOption } from '../model';\n\nexport const yesNoCatalog$$ = signal([\n { key: 'כן', value: true },\n { key: 'לא', value: false }\n]);\n","import { signal } from '@angular/core';\nimport { TCatalogOption } from '../model';\n\nexport const beneficiaryYesNo$$ = signal([\n { key: 'כן', value: 3 }, // is single beneficiary = 2\n { key: 'לא', value: 2 }\n]);\n","import { signal } from '@angular/core';\nimport { CountryEnum } from '@partners/constants';\nimport { TCatalogGraphicOption } from '../model';\n\nexport const locationCatalog$$ = signal([\n { key: 'ישראל', value: CountryEnum.israel, icon: 'ico-rounded--cacti' },\n { key: 'אחר', value: CountryEnum.abroad, icon: 'ico-rounded--globe' }\n]);\n","import { Injectable, Signal } from '@angular/core';\nimport { debitDayCatalog$$ } from '../lists/debit-day.catalog';\nimport { refusedCatalog$$ } from '../lists/refused.catalog';\nimport { TCatalogGraphicOption, TCatalogOption } from '../model';\nimport {\n beneficiaryYesNo$$,\n genderCatalog$$,\n leadStatusCatalog$$,\n locationCatalog$$,\n maritalStatusCatalog$$,\n onlineUseStatusCatalog$$,\n yesNoCatalog$$\n} from './../lists';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LocalCatalog {\n static get maritalStatusList$$(): Signal {\n return maritalStatusCatalog$$;\n }\n static get leadStatusList$$(): Signal {\n return leadStatusCatalog$$;\n }\n static get onlineUseStatusList$$(): Signal {\n return onlineUseStatusCatalog$$;\n }\n static get genderList$$(): Signal {\n return genderCatalog$$;\n }\n static get refusedList$$(): Signal {\n return refusedCatalog$$;\n }\n static get yesNoCatalog$$(): Signal {\n return yesNoCatalog$$;\n }\n\n static get beneficiaryYesNo$$(): Signal {\n return beneficiaryYesNo$$;\n }\n \n static get locationCatalog$$(): Signal {\n return locationCatalog$$;\n }\n static get debitDayCatalog$$(): Signal {\n return debitDayCatalog$$;\n }\n constructor() {}\n}\n","// export enum ProcessCodeEnum {\n// card = 1 /* כרטיס אשראי */,\n// loan = 2 /* הלוואה לפרטיים */,\n// employer = 3 /* כרטיס מעסיק */,\n// upsell = 4 /* מסגרת אפס */,\n// bnpl = 5 /* הלוואה קנה עכשיו שלם אחר כך */\n// }\n\n// export enum ProcessIdEnum {\n// card = 'card' /* כרטיס אשראי */,\n// loan = 'loan' /* הלוואה לפרטיים */,\n// employer = 'employer' /* כרטיס מעסיק */,\n// upsell = 'upsell' /* מסגרת אפס */,\n// bnpl = 'bnpl' /* הלוואה קנה עכשיו שלם אחר כך */\n// }\n\nexport enum CustomerStatusEnum {\n none = null,\n new = 1,\n existent = 2\n}\nexport enum AccountStatusEnum {\n none = null,\n new = 1,\n existent = 2\n}\n\nexport enum InterestTypeEnum {\n variable = 0,\n fixed = 1,\n fixedLinked = 2\n}\n\nexport enum MaritalStatusEnum {\n married = 1,\n single = 0\n}\n\nexport enum LeadStatusEnum {\n notInterested = 0,\n interested = 1\n}\n\nexport enum SingleBeneficiaryEnum {\n yes = 3,\n no = 2\n}\n\nexport enum CountryEnum {\n israel = 0,\n abroad = 1\n}\n\nexport enum ChannelStatusEnum {\n accepted = 3,\n rejected = 1\n}\n\nexport enum CreditAgreementStatusEnum {\n approve = 1,\n decline = 2,\n indication = 3\n}\n\nexport enum LanguageEnum {\n Hebrew = 1,\n Arabic = 2,\n Russian = 3,\n Amharic = 4,\n French = 5,\n English = 6\n}\n\nexport enum BeneficiariesOptionEnum {\n SpecificBeneficiaries = 1,\n UnknownBeneficiaries = 2,\n CommunalAccount = 3,\n OwnerManagedAccount = 4,\n LimitedCreditAccount = 5,\n StateManagedAccount = 6,\n DelegateManagedAccount = 7\n}\n\nexport enum CreditAgreementExpirationYearsPeriodEnum {\n extendedPeriod = 100,\n defaultPeriod = 10\n}\n\nexport const ClubMembershipConfig = {\n options: {\n mandatory: [2, 4],\n visible: [1, 2, 3, 4],\n postEligibility: [3, 4]\n },\n '0': {\n default: true,\n value: 0,\n mandatory: false,\n visible: false,\n description: \"לא נדרש מס' חבר מועדון\"\n },\n '1': {\n value: 1,\n mandatory: false,\n visible: true,\n description: 'השדה יוצג ויהיה רשות'\n },\n '2': {\n value: 2,\n mandatory: true,\n visible: true,\n description: 'השדה יוצג ויהיה חובה'\n },\n '3': {\n value: 3,\n mandatory: false,\n visible: false,\n description: 'השדה יוצג רק לאחר קבלת שגיאה מבדיקת זכאות (לפי השגיאות הקיימות) ויהיה רשות'\n },\n '4': {\n value: 4,\n mandatory: true,\n visible: false,\n description: 'השדה יוצג רק לאחר קבלת שגיאה מבדיקת זכאות (לפי השגיאות הקיימות) ויהיה חובה'\n }\n} as const;\n","export const IMAGE_STREAM_PREFIX = 'data:image/jpg;base64,';\n","import { HttpRequest } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { IHttpResponse, IHttpStatus } from '@partners/api';\nimport { generateGuid, Guid, isFunction } from '@partners/utils';\nimport { Observable, throwError } from 'rxjs';\nimport {\n IError,\n IErrorsConfig,\n ILocalError,\n ILocalErrorsConfig,\n IRemoteError,\n IRemoteErrorsConfig,\n ISeverityHandler\n} from './errors.interface';\nimport { TErrorOrigin, TErrorOutput, TSeverityCallback, TSeverityCode, TSeveritySymbol } from './errors.types';\n\nexport abstract class BaseError extends Error implements IError {\n title: string;\n origin: TErrorOrigin;\n output: TErrorOutput;\n abort: boolean;\n code: string | number;\n token: Guid;\n\n constructor({ token, title, message, stack, output, abort }: IError) {\n super();\n this.token = token || generateGuid();\n this.title = title;\n this.message = message;\n this.stack = stack;\n this.output = output;\n this.abort = abort;\n }\n}\n\nexport class RemoteError extends BaseError implements IRemoteError {\n request?: HttpRequest;\n response: IHttpResponse;\n severity?: Severity;\n\n get severityCode(): TSeverityCode {\n return this.severity.code as TSeverityCode;\n }\n\n get safeStatus(): IHttpStatus {\n return this.response?.status;\n }\n\n constructor(error: IRemoteError) {\n super(error);\n\n this.origin = 'remote';\n this.output = error.output || 'dialog';\n this.response = error.response;\n this.request = error?.request;\n \n const { headlineMessage, messageCode, message } = this.safeStatus;\n this.title = headlineMessage;\n this.message = message;\n this.severity = new Severity(messageCode as TSeverityCode);\n }\n}\n\nexport class LocalError extends BaseError {\n constructor(error: ILocalError) {\n super(error);\n this.origin = 'local';\n this.output = error.output || 'console';\n }\n}\n\nexport class Severity {\n readonly code: TSeverityCode;\n\n constructor(private severityCode: TSeverityCode) {\n this.code = severityCode;\n }\n\n isCodeOfType(char: TSeveritySymbol): boolean {\n return this.code.startsWith(char);\n }\n\n // replace code to \"_*\"\" for handling any codes number\n toGenericCodeType(code: TSeverityCode): TSeverityCode {\n return `${code.charAt(0)}_*` as TSeverityCode;\n }\n\n isWarning(): boolean {\n return this.isCodeOfType('W');\n }\n isError(): boolean {\n return this.isCodeOfType('E');\n }\n isFatal(): boolean {\n return this.isCodeOfType('F');\n }\n isInformation(): boolean {\n return this.isCodeOfType('I');\n }\n isSuccess(): boolean {\n return this.isCodeOfType('S');\n }\n isUndefined(): boolean {\n return !this.isWarning() && !this.isError() && !this.isInformation() && !this.isFatal() && !this.isSuccess();\n }\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport abstract class RootErrorsConfig implements IErrorsConfig {\n abstract localErrors: ILocalErrorsConfig;\n abstract remoteErrors: IRemoteErrorsConfig;\n\n constructor() {}\n}\n\n@Injectable()\nexport abstract class SeverityHandler implements ISeverityHandler {\n abstract handlers: Map;\n constructor() {}\n // abstract readonly handlers: Map;\n\n inspect(remoteError: IRemoteError): Observable {\n if (!remoteError?.severity) {\n /** error is valid, but not of a recognized type. this should not happen its just for safety */\n return throwError(() => remoteError);\n }\n\n const { severity } = remoteError;\n const { code } = severity;\n\n /** for specific error like W_0002 */\n /** try find a custom handler function for the severity */\n let handler = this.handlers.get(code);\n if (isFunction(handler)) {\n /**\n * if we got to this point we know that a custom error handler was provided for this error, activate the\n * custom error handler to handle this error\n */\n return handler.call(null, remoteError) as Observable;\n }\n\n /** for general error like F_*, E_*, W_* who has custom handler(like simulator) */\n handler = this.handlers.get(severity.toGenericCodeType(code));\n if (isFunction(handler)) {\n return handler.call(null, remoteError) as Observable;\n }\n\n /** no custom handler was provided for this error, rethrow it to let the default handler pick it up */\n return throwError(() => remoteError);\n }\n}\nfunction TSeverityOverride(TSeverityOverride: any) {\n throw new Error('Function not implemented.');\n}\n","import { IHttpResponse, IHttpStatus } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { tap } from 'rxjs/operators';\nimport { TSeverityName } from '../model';\n\n\ntype TSeverityCallback = (result: T, status: IHttpStatus) => void;\n\nexport const matchSeverity = (response: IHttpResponse, severityType: TSeverityName, code?: string | string[]) => {\n const { status } = response;\n const { messageCode } = status;\n\n if (code) {\n return messageCode === code;\n }\n\n // if a specific severity code was not passed in via \"code\" arg, then we match\n // the severity type instead of a specific severity code\n const firstChar = messageCode.charAt(0);\n switch (severityType) {\n case 'success': {\n return firstChar === 'S';\n }\n case 'warning': {\n return firstChar === 'W';\n }\n case 'information': {\n return firstChar === 'I';\n }\n case 'error': {\n return firstChar === 'E';\n }\n case 'fatal': {\n return firstChar === 'F';\n }\n default: {\n return false;\n }\n }\n};\n\nexport function tapSuccess(callback?: TSeverityCallback, code?: string) {\n return tapSeverity('success', code, callback);\n}\n\nexport function tapInformation(callback?: TSeverityCallback, code?: string) {\n return tapSeverity('information', code, callback);\n}\n\nexport function tapWarning(callback?: TSeverityCallback, code?: string) {\n return tapSeverity('warning', code, callback);\n}\n\nexport function tapError(callback?: TSeverityCallback, code?: string) {\n return tapSeverity('error', code, callback);\n}\n\nexport function tapFatal(callback?: TSeverityCallback, code?: string) {\n return tapSeverity('fatal', code, callback);\n}\n\nexport function tapSeverity(severityType: TSeverityName, code?: string, callback?: TSeverityCallback) {\n return (response$: Observable>): Observable> => {\n return response$.pipe(\n tap((response: IHttpResponse) => {\n const shouldCallback = matchSeverity(response, severityType, code);\n if (callback && shouldCallback) {\n callback.call(null, response.result, response.status);\n }\n })\n );\n };\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { ILocalError, IRemoteError } from '../model/errors.interface';\nimport { ERRORS_CONFIG } from '../tokens';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ErrorsService {\n private _errorsConfig = inject(ERRORS_CONFIG);\n\n constructor() {}\n\n throwRemoteError(error: IRemoteError): Observable {\n error = {\n ...error,\n ...{\n origin: 'remote'\n }\n };\n return this.throwError(error);\n }\n\n throwLocalError(error: ILocalError): Observable {\n const { message } = error;\n\n error = {\n ...error,\n ...{\n origin: 'local',\n message: this.formatLocalErrorMessage(message)\n }\n };\n\n return this.throwError(error);\n }\n\n formatLocalErrorMessage(message: string) {\n const { localErrors } = this._errorsConfig;\n const { formatPrefix, formatSuffix } = localErrors;\n return `\\n${formatPrefix}\\n${message}\\n${formatSuffix}\\n\\n`;\n }\n\n private throwError(error: T): Observable {\n throw error;\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { RootErrorsConfig } from '../model';\n\nexport const ERRORS_CONFIG = new InjectionToken('ERRORS_CONFIG');\n","import { NgIf } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n EventEmitter,\n inject,\n input,\n Input,\n OnDestroy,\n Output,\n signal,\n ViewEncapsulation\n} from '@angular/core';\nimport { FormGroup, FormsModule, NgForm } from '@angular/forms';\nimport { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';\nimport { ErrorsService } from '@partners/errors';\nimport { AsyncFnService, isFunction, TAsyncFnPendingInd, TAsyncFnWrapper } from '@partners/utils';\nimport { IFormConfig, IFormFactory, IFormField } from '../../model';\n\n@Component({\n standalone: true,\n selector: 'feature-form',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgIf, FormsModule],\n template: `\n \n \n \n `,\n host: {\n class: 'feature-form'\n },\n providers: [\n {\n provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,\n useValue: {\n hideRequiredMarker: true\n }\n }\n ]\n})\nexport class FeatureFormComponent implements OnDestroy {\n @Input()\n set formFactory(value: IFormFactory) {\n const { name, form, config } = value;\n this.formName = name || config.name;\n this.formGroup = form;\n this.formConfig = config;\n }\n\n sendFn = input(undefined);\n pendingInd = input(signal(false));\n\n @Output()\n send: EventEmitter;\n\n get formValue(): any {\n return this.formGroup.getRawValue();\n }\n\n get locals(): IFormFactory {\n return { form: this.formGroup, config: this.formConfig };\n }\n\n submitted$$ = signal(false);\n\n @ContentChild('formHandler')\n formHandler!: NgForm;\n\n formName: string;\n formGroup: FormGroup;\n formConfig: IFormConfig;\n\n private _changeDetector = inject(ChangeDetectorRef);\n private _clientErrors = inject(ErrorsService);\n private _submitService = inject(AsyncFnService);\n\n constructor() {\n this.send = new EventEmitter();\n }\n\n ngOnDestroy(): void {\n this.send.complete();\n }\n\n ngAfterViewInit(): void {\n this.overrideSubmit();\n }\n\n findFieldConfig(fieldName: string): IFormField {\n return this.formConfig.find(fieldName);\n }\n\n private overrideSubmit() {\n const theForm = this.formHandler;\n\n if (!theForm) {\n this._clientErrors.throwLocalError({ message: 'Form handler not found' });\n }\n\n theForm.onSubmit = (event: any): boolean => {\n this.submitted$$.set(true);\n\n event.stopPropagation();\n event.preventDefault();\n\n this.formGroup.markAllAsTouched();\n this.formGroup.updateValueAndValidity({ onlySelf: false, emitEvent: true });\n this._changeDetector.detectChanges();\n\n const { valid } = this.formGroup;\n\n if (!valid) {\n return false;\n }\n\n const value = this.formValue;\n\n /** use sendFn to pass async submit method callback and receive pending status indications in your consumer */\n if (isFunction(this.sendFn())) {\n this._submitService.runAsyncMethod(this.sendFn(), { pendingInd: this.pendingInd() });\n } else {\n this.send.emit(value);\n }\n\n this._changeDetector.detectChanges();\n\n return false;\n };\n }\n}\n","import { AsyncPipe, NgIf } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Injector,\n Input,\n OnInit,\n ViewEncapsulation,\n inject,\n runInInjectionContext,\n signal\n} from '@angular/core';\nimport { FormControl, FormControlStatus, ValidationErrors } from '@angular/forms';\nimport { ThemeAssetComponent } from '@partners/themes';\nimport { filter, map, startWith, switchMap, tap } from 'rxjs/operators';\n\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { MatProgressBar } from '@angular/material/progress-bar';\nimport { FIELD_ERROR_ANIMATION } from '@partners/ui';\nimport { of } from 'rxjs';\nimport { IFormField, IValidationHandler, TValidator } from '../../model';\n\n/**\n * @description\n * wrapper for the form field error messages.\n *\n * purpose of this component:\n * 1). it toggles the display of errors containers (only one of them is displays any given moment)\n * 2). it filters error messages to show only first one (todo: add sorting?)\n */\n\n@Component({\n standalone: true,\n selector: 'field-error',\n template: `\n @if(error()) {\n \n {{ error() }}\n }\n `,\n animations: [FIELD_ERROR_ANIMATION],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgIf, AsyncPipe, ThemeAssetComponent, MatProgressBar],\n host: {\n class: 'field-subscript'\n },\n exportAs: 'error'\n})\nexport class FieldErrorComponent implements OnInit {\n @Input()\n fieldConfig: IFormField;\n\n @Input()\n control: FormControl;\n\n error = signal(undefined);\n\n #changeDetector = inject(ChangeDetectorRef);\n #localInjector = inject(Injector);\n\n ngOnInit(): void {\n this.#addStateListeners();\n }\n\n #addStateListeners() {\n const { control, validation } = this.fieldConfig;\n\n const targetControl = this.control || control;\n\n runInInjectionContext(this.#localInjector, () => {\n toSignal(\n targetControl.statusChanges.pipe(\n startWith(null),\n filter((status: FormControlStatus) => {\n return status !== 'PENDING';\n }),\n map((status) => {\n if (status !== 'VALID') {\n return targetControl?.errors;\n }\n return null;\n }),\n switchMap((rawErrors: ValidationErrors) => {\n const [firstKey] = Object.keys(rawErrors || []);\n\n if (!firstKey) return of(undefined);\n\n const firstError = { [firstKey]: rawErrors[firstKey] };\n\n const { validationHandlers } = validation;\n\n /** find the validator handler which matches the error's name (validator name) */\n const validationHandler: IValidationHandler = validationHandlers.find((v) => {\n if (Array.isArray(v.type)) {\n return v.type.map((t) => t.toLowerCase()).includes(firstKey.toLowerCase());\n }\n return v.type === firstKey;\n });\n this.#changeDetector.markForCheck();\n\n if (!validationHandler?.buildMessage) {\n return of(undefined);\n }\n\n /** dynamically build the error message for this error */\n return validationHandler.buildMessage(firstKey as TValidator, firstError);\n }),\n tap((errorText: string | undefined) => {\n this.error.set(errorText);\n // Console.logInfo(`FieldErrorComponent: errorText: ${errorText}`);\n this.#changeDetector.detectChanges();\n })\n )\n );\n });\n }\n}\n","import { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Injector,\n Input,\n OnInit,\n ViewEncapsulation,\n inject,\n runInInjectionContext,\n signal\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { FormControl, FormControlStatus, ValidationErrors } from '@angular/forms';\nimport { ThemeAssetComponent } from '@partners/themes';\nimport { FIELD_ERROR_ANIMATION } from '@partners/ui';\nimport { filter, isObservable, map, of, startWith, switchMap, tap } from 'rxjs';\nimport { IFormField } from '../../model';\n\n/**\n * @description\n * wrapper for the form field hint messages.\n *\n * purpose of this component:\n * 1). it toggles the display of hints containers (only one of them is displays any given moment)\n */\n\n@Component({\n standalone: true,\n selector: 'field-hint',\n template: `\n @if (hint()) {\n {{ hint() }}\n }\n `,\n animations: [FIELD_ERROR_ANIMATION],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AsyncPipe, ThemeAssetComponent],\n host: {\n class: 'field-subscript'\n }\n})\nexport class FieldHintComponent implements OnInit {\n @Input()\n fieldConfig: IFormField;\n\n @Input()\n control: FormControl;\n\n hint = signal(undefined);\n\n #changeDetector = inject(ChangeDetectorRef);\n #localInjector = inject(Injector);\n\n ngOnInit(): void {\n this.#addStateListeners();\n }\n\n #addStateListeners() {\n const { control, hint } = this.fieldConfig;\n\n const targetControl = this.control || control;\n\n runInInjectionContext(this.#localInjector, () => {\n toSignal(\n targetControl.statusChanges.pipe(\n startWith(null),\n filter((status: FormControlStatus) => {\n return status !== 'PENDING';\n }),\n map((status) => {\n if (status !== 'VALID') {\n return targetControl?.errors;\n }\n return null;\n }),\n switchMap((rawErrors: ValidationErrors) => {\n const [firstKey, ...remainingKeys] = Object.keys(rawErrors || []);\n const { pristine, touched } = targetControl;\n\n /** while the field is untouched, and has no errors, we show the hint text */\n if (!firstKey || (pristine && !touched)) {\n return isObservable(hint) ? hint : of(hint);\n }\n\n return of(undefined);\n }),\n tap((hintText: string | undefined) => {\n this.hint.set(hintText);\n this.#changeDetector.detectChanges();\n })\n )\n );\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\nimport { MatProgressBar } from '@angular/material/progress-bar';\nimport { FADE_IN_OUT_ANIMATION } from '@partners/ui';\nimport { SimpleFieldDirective } from '../../directives';\n\n@Component({\n standalone: true,\n selector: 'field-progress-bar',\n template: `\n @if (fieldAccessor.isPending$$()) {\n \n }\n `,\n animations: [FADE_IN_OUT_ANIMATION],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [MatProgressBar],\n host: {\n class: 'field-progress-bar'\n }\n})\nexport class FieldProgressBarComponent {\n @Input()\n fieldAccessor: SimpleFieldDirective;\n}\n","import { AsyncPipe, NgIf } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n HostBinding,\n Injector,\n Input,\n Output,\n Signal,\n ViewEncapsulation,\n computed,\n inject,\n runInInjectionContext\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { ThemeAssetComponent } from '@partners/themes';\nimport { isEmpty } from '@partners/utils';\nimport { debounceTime, startWith } from 'rxjs/operators';\nimport { ExtendedFormControl } from '../../controls/control';\nimport { IFormField } from '../../model';\n\n/**\n * @description\n * a wrapper component which toggles a form field's reset button\n */\n\n@Component({\n standalone: true,\n selector: 'field-reset',\n template: `\n @if(enableReset$$()) {\n \n \n \n }\n `,\n imports: [NgIf, AsyncPipe, ThemeAssetComponent, MatFormFieldModule],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FieldResetComponent implements AfterViewInit {\n @Input()\n set fieldConfig(formField: IFormField) {\n /** we need access to the form control's instance in order to reset its value (see resetValue() below) */\n this.#control = formField.control;\n\n runInInjectionContext(this.#localInjector, () => {\n this.#controlValue$$ = toSignal(this.#control.valueChanges.pipe(startWith(undefined), debounceTime(150)));\n\n /** detect when the reset functionality is accessible to the user */\n this.enableReset$$ = computed(() => {\n /**\n * running out of context makes angular miss control's value on load event\n * to compensate for a control with value on load - we also check the value\n * of the formField.control\n */\n const value = this.#controlValue$$() || this.#control.value;\n const { control } = formField;\n const { disabled } = control;\n\n if (isEmpty(value) && !disabled) {\n return false;\n }\n return control.enabled;\n });\n });\n }\n\n @Output()\n reset = new EventEmitter();\n\n @HostBinding('class')\n get hostClass() {\n return 'field-reset';\n }\n\n enableReset$$: Signal;\n\n #localInjector = inject(Injector);\n #controlValue$$: Signal;\n #changeDetector = inject(ChangeDetectorRef);\n #control: ExtendedFormControl;\n\n constructor() {}\n ngAfterViewInit(): void {\n this.#changeDetector.detectChanges();\n }\n\n /**\n * @description\n * reset the form control by deleting its value\n * @param event a click event handler\n */\n resetValue(event: MouseEvent) {\n event.stopPropagation();\n event.preventDefault();\n this.#control.setValue(undefined, { onlySelf: true, emitEvent: true });\n this.#control.updateValueAndValidity({ onlySelf: true, emitEvent: true });\n this.#changeDetector.markForCheck();\n this.reset.emit(true);\n }\n}\n","import { AfterViewInit, Component, ElementRef, Renderer2, inject, input } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { FilledButtonComponent } from '@partners/ui';\n\n@Component({\n standalone: true,\n selector: 'submit-button',\n template: `\n \n \n \n `,\n imports: [FilledButtonComponent, MatButtonModule],\n host: {\n class: 'submit-button'\n }\n})\nexport class SubmitButtonComponent implements AfterViewInit {\n formName = input();\n\n #renderer = inject(Renderer2);\n #element = inject(ElementRef);\n\n disabled = input(false);\n\n constructor() {}\n\n ngAfterViewInit(): void {\n const nativeButton = this.#element.nativeElement.querySelector('button');\n this.#renderer.setAttribute(nativeButton, 'form', this.formName());\n }\n}\n","import { AsyncValidatorFn, ValidatorFn } from '@angular/forms';\nimport { coerceArray } from '@partners/utils';\nimport { IValidationHandler, IValidatorState } from '../model';\n\n/**\n * @description\n * Rebuild an array of ValidatorFn to reflect each validator's disabled | active state.\n *\n * When a state indicates a validatorFn is disabled it is removed off the control's validators\n * array and vice versa. this is how a validator is toggled on|off. Each validation handler\n * contains a single or multiple type|s of the custom ValidatorFn\n *\n * For Examples:\n * 1. LengthRangeValidation handler contains both (a) minLength (b) maxLength types\n * 2. HebrewNameValidation handler contains both (a) pattern (b) minLength (c) maxLength types\n *\n * Each validator state relates to a specific custom validator (not to the wrapper class!), so -\n * in example 2 we can disable \"minLength\" validator solely by passing { type: \"minLength\", disabled: true }\n *\n * @param validationHandlers a wrapper class for single or multiple custom ValidatorFn|s\n * @param validationState an array of validators' state\n * @returns a new array of ValidatorFn\n */\nexport function composeValidators(\n validationHandlers: IValidationHandler[] = [],\n validationStates: IValidatorState[] = []\n): ValidatorFn[] {\n let vfn = new Array();\n\n /** iterate the validation handlers collection */\n validationHandlers.forEach((vldHandler: IValidationHandler) => {\n let { type, validators } = vldHandler;\n if (!validators?.length) {\n return;\n }\n\n type = coerceArray(type);\n\n type.forEach((validatorType) => {\n const modifiedValidator = validationStates.find(({ type }) => validatorType === type);\n\n if (modifiedValidator?.disabled) {\n return;\n }\n\n vfn = vfn.concat(vldHandler.validators as ValidatorFn[]);\n });\n });\n\n return vfn;\n}\n\n/**\n * @description\n * Same as \"composeValidators() above, but works on the asyncValidatorFn\" collection of\n * the form control\n */\nexport function composeAsyncValidators(\n validationHandlers: IValidationHandler[] = [],\n validationStates: IValidatorState[] = []\n): AsyncValidatorFn[] {\n let avfn = new Array();\n\n /** iterate the validation handlers collection */\n validationHandlers.forEach((vldHandler: IValidationHandler) => {\n let { type, asyncValidators } = vldHandler;\n if (!asyncValidators?.length) {\n return;\n }\n\n type = coerceArray(type);\n\n type.forEach((validatorType) => {\n const modifiedValidator = validationStates.find(({ type }) => validatorType === type);\n\n if (modifiedValidator?.disabled) {\n return;\n }\n\n avfn = avfn.concat(vldHandler.asyncValidators as AsyncValidatorFn[]);\n });\n });\n\n return avfn;\n}\n","import { TFieldStateArgs } from '../model';\n\nexport function shouldUpdateControlState(\n member: keyof TFieldStateArgs,\n args: Partial>\n): boolean {\n const isMemberInArgs = member in args;\n\n if (!isMemberInArgs) {\n return false;\n }\n\n return true;\n}\n","import { coerceArray } from '@angular/cdk/coercion';\nimport { EventEmitter, signal } from '@angular/core';\nimport { AbstractControlOptions, FormControl, FormControlState } from '@angular/forms';\n\nconst defaultControlSettings: AbstractControlOptions = { updateOn: 'change', asyncValidators: [], validators: [] };\n\n/**\n * @description\n * an extension (inheritance) of the FormControl, to allow emission of the \"statusChange\" event\n * when \"touched\" status changes (by default \"touched\" changes dose not trigger status changes)\n */\nexport class ExtendedFormControl extends FormControl {\n // private _touchedEmitter: Subject = new Subject();\n // touchedChanges: Observable = this._touchedEmitter.asObservable();\n\n markAsTouched$$ = signal(false);\n\n constructor(formState: FormControlState, options: AbstractControlOptions = defaultControlSettings) {\n options = {\n updateOn: options.updateOn || defaultControlSettings.updateOn,\n validators: [...coerceArray(defaultControlSettings.validators)],\n asyncValidators: [...coerceArray(defaultControlSettings.asyncValidators)]\n };\n\n super(formState, options);\n }\n\n override markAsTouched({ onlySelf }: { onlySelf?: boolean } = {}): void {\n super.markAsTouched({ onlySelf });\n\n this.markAsTouched$$.set(true);\n // this._touchedEmitter.next(true);\n (>this.statusChanges).emit(this.status);\n }\n}\n","import { WritableSignal, signal } from '@angular/core';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { IInputMask, IMaskOptions, INumericInputMask, findLastNotation } from '@partners/utils';\nimport { ExtendedFormControl } from '../controls/control';\nimport { composeAsyncValidators, composeValidators } from '../functions';\nimport { IFieldAsserts, IFieldValidation, IFormField } from './form.interface';\nimport {\n TControlChangeTrigger,\n TFieldBeforeValueChange,\n TFieldDestroy,\n TFieldHint,\n TFieldInitialize,\n TFieldInputMethod,\n TFieldInputMode,\n TFieldReset,\n TFieldSelect,\n TFieldSelector,\n TFieldStateArgs,\n TFieldType,\n TFieldValueChange,\n TFormElement,\n TIterableOption\n} from './form.types';\n\n/**\n * @description\n * a helper base class to all form field types.\n *\n * the class encapsulates all the field's config (hint | errors | placeholder | mask | events.. etc')\n * including life cycle hooks method implementation and validators.\n *\n * it also creates an instance of a local FormControl to accept the validation and other config data\n * this control will be binded to the ng form\n */\nexport class FormField implements IFormField {\n name?: string;\n path?: string;\n index?: number;\n value?: T = null;\n mask?: IMaskOptions;\n masking?: IInputMask | INumericInputMask;\n label?: string;\n minorLabel?: string;\n inputType?: TFieldType;\n inputMode?: TFieldInputMode;\n inputMethod?: TFieldInputMethod;\n hint?: TFieldHint;\n placeholder?: string;\n elementType?: TFormElement;\n extraData: { [key: string]: any };\n validation?: IFieldValidation;\n inputSelector?: TFieldSelector;\n transformation?: IFieldAsserts;\n debounceInterval?: number;\n throttleInterval?: number;\n disabled?: boolean;\n hidden?: boolean;\n changeTrigger: TControlChangeTrigger;\n bidi?: boolean;\n isPending?: boolean;\n control?: ExtendedFormControl;\n updateOn?: 'change';\n errorMatcher?: ErrorStateMatcher;\n valueChange?: TFieldValueChange;\n beforeChange?: TFieldBeforeValueChange;\n onDestroy?: TFieldDestroy;\n onInit?: TFieldInitialize;\n onReset?: TFieldReset;\n onSelect?: TFieldSelect;\n keyProp?: string;\n valueProp?: string;\n options$$?: TIterableOption[];\n maxOptions?: number;\n detectChangeAt?: number;\n\n update: (args: TFieldStateArgs) => void;\n state$$: WritableSignal>;\n\n constructor({\n path,\n label,\n minorLabel,\n mask,\n masking,\n hint,\n value,\n index,\n validation,\n elementType,\n inputType,\n inputMode,\n updateOn,\n bidi,\n inputMethod,\n debounceInterval,\n throttleInterval,\n keyProp,\n valueProp,\n errorMatcher,\n disabled,\n hidden,\n extraData,\n changeTrigger,\n maxOptions,\n detectChangeAt,\n isPending,\n valueChange,\n beforeChange,\n onInit,\n onReset,\n onSelect,\n onDestroy\n }: IFormField) {\n this.state$$ = signal>(null);\n\n /**\n * name is a computed value. its source is the path property, its value is the last annotation of the\n * fields's complete path (example: if path is \"residence.zipCode\" then name is \"zipCode\". if path is\n * \"firstName\" then name is \"firstName\"\n **/\n this.name = findLastNotation(path);\n\n /** the string dot annotated path representing the hierarchial placement of the field (\"residence.zipCode\") */\n this.path = path;\n\n /** the label (placeholder) text of the form control */\n this.label = label;\n\n /** a sub label text displayed right next to the label (in smaller font) */\n this.minorLabel = minorLabel;\n\n /** a hint text displayed below the control */\n this.hint = hint;\n\n /** the initialized control's value */\n this.value = value;\n this.index = index;\n\n /** a mask pattern config object (IMaskOptions) */\n this.mask = mask;\n this.masking = masking;\n\n /** a boolean indicator of an RTL input */\n this.bidi = bidi;\n\n /** any data a custom control might need */\n this.extraData = extraData;\n\n /** a validation object holds collections of sync | async validators config objects */\n this.validation = validation;\n\n /** a custom error matcher */\n this.errorMatcher = errorMatcher;\n\n /** ng abstract form control type 'control' | 'group' | 'array' */\n this.elementType = elementType ?? 'control';\n\n /** a DOM input type ('text' | 'tel' | 'email' | 'date' | 'number') */\n this.inputType = inputType ?? 'text';\n this.inputMode = inputMode ?? 'text';\n\n /** how the input gets its value ('typing' | 'selecting' | 'checking') */\n this.inputMethod = inputMethod ?? 'typing';\n\n this.changeTrigger = changeTrigger ?? 'always';\n\n /** debounce interval time to be used when debouncing control valueChange callbacks */\n this.debounceInterval = debounceInterval ?? 0;\n this.throttleInterval = throttleInterval ?? 0;\n\n /** form control's disabled state */\n this.disabled = disabled;\n\n /** form control's hidden state */\n this.hidden = hidden;\n\n this.maxOptions = maxOptions;\n this.isPending = isPending;\n this.detectChangeAt = detectChangeAt;\n\n /** form control value change callback */\n this.valueChange = valueChange;\n this.beforeChange = beforeChange;\n\n /** form control value init callback */\n this.onInit = onInit;\n this.onReset = onReset;\n\n this.onSelect = onSelect;\n\n /** destroy callback for cleanup */\n this.onDestroy = onDestroy;\n\n this.update = this.updateState;\n\n /**\n * for an iterable control (i.e: dropdown, tiles, table, radio, etc') - we need to init\n * the required props to handle a selection functionality\n */\n if (this.inputMethod === 'selecting') {\n this.keyProp = keyProp ?? 'key';\n this.valueProp = valueProp ?? 'value';\n }\n\n /** create the actual ng form control & set its validators */\n\n this.control = new ExtendedFormControl({ disabled: this.disabled, value }, { updateOn });\n\n this.control.setValidators(composeValidators(this.validation?.validationHandlers));\n this.control.setAsyncValidators(composeAsyncValidators(this.validation?.validationHandlers));\n\n this.setValidationLabel(validation);\n }\n\n /**\n * @description\n * each field has a label which functions as a floating placeholder. in the validation messages we often\n * need to use the value of the placeholder, for example: if { field: { label: 'שם פרטי' } } is required -\n * then the required error message will read: 'נראה שחסר כאן ' + field.label, this works fine in 95% cases\n * however sometimes a custom label is needed spcifically for validation message, for example:\n * { field: { label: 'באיזה יום בחודש יהיה לך נוח לשלם את ההחזר החודשי?' } } - in this case we cant\n * error message: 'נראה שחסר כאן ' + 'באיזה יום בחודש יהיה לך נוח לשלם את ההחזר החודשי' - so we would\n * declare a label on the *validation object* (field.validation: { label: '', validators[] }) to override\n * the default (field) label\n *\n * the mapping below copies the field label onto the validation label, in case no validation label was provided.\n * @param validation the field's validation object. it holds the validators collection\n **/\n private setValidationLabel(validation: IFieldValidation): void {\n validation?.validationHandlers.map((v) => {\n v.label = validation?.label ?? this.label;\n });\n }\n\n /**\n * @description\n * inject updated values to the field's properties. this is helpful when we want to\n * change the options[] collection of a dropdown or toggle a control's disabled state\n * or any other update that is required to reflect in the field\n * @param a destructed object that contains props of the field which can be updated\n * (type of destructed object is: TFieldStateArgs)\n */\n private updateState = (args: Partial>) => {\n let state: Partial> = {};\n\n state = this.stateMember('value', args, state);\n state = this.stateMember('disabled', args, state);\n state = this.stateMember('hidden', args, state);\n state = this.stateMember('required', args, state);\n state = this.stateMember('hint', args, state);\n state = this.stateMember('label', args, state);\n state = this.stateMember('minorLabel', args, state);\n state = this.stateMember('mask', args, state);\n state = this.stateMember('extraData', args, state);\n state = this.stateMember('options', args, state);\n state = this.stateMember('isPending', args, state);\n state = this.stateMember('validation', args, state);\n\n this.state$$.set({ ...state });\n };\n\n private stateMember(\n member: keyof TFieldStateArgs,\n args: Partial>,\n state: Partial>\n ): Partial> {\n const isMemberInArgs = member in args;\n\n if (!isMemberInArgs) {\n return state;\n }\n\n const memberValue = args[member] as S;\n return { ...state, ...{ [member]: memberValue } };\n }\n}\n","import { FormField } from '../form.field';\nimport { IFormField } from '../form.interface';\n\nexport class BooleanField extends FormField {\n constructor(args?: IFormField) {\n super({\n ...args,\n ...{ inputMethod: 'checking' }\n });\n }\n}\n","import { FormField } from '../form.field';\nimport { IFormField } from '../form.interface';\n\nexport class DateField extends FormField {\n constructor(args?: IFormField) {\n super({ ...args, ...{ bidi: true, inputType: 'tel', inputMode: 'numeric', inputMethod: 'typing' } });\n }\n}\n","import { FormField } from '../form.field';\nimport { IFormField } from '../form.interface';\n\nexport class MobilePhoneField extends FormField {\n constructor(args?: IFormField) {\n super({\n ...args,\n ...{ inputType: 'tel', bidi: true, inputMode: 'numeric', inputMethod: 'typing' }\n });\n }\n}\n","import { coerceNumber } from '@partners/utils';\nimport { FormField } from '../form.field';\nimport { IFormField } from '../form.interface';\n\nexport class NumericField extends FormField {\n constructor(args?: IFormField) {\n super({\n ...args,\n ...{\n bidi: true,\n inputType: 'tel',\n inputMode: 'numeric',\n beforeChange: ({ nextValue, prevValue }) => {\n return {\n nextValue: coerceNumber(nextValue) as T,\n prevValue: coerceNumber(prevValue) as T\n };\n }\n }\n });\n\n // this.control.valueChanges.pipe(\n // map((value) => coerceNumber(value)),\n // tap((value) => console.log(`>>>>>>>>>>>> ${value}`))\n // );\n }\n}\n","import { FormField } from '../form.field';\nimport { IFormField } from '../form.interface';\n\nexport class SelectField extends FormField {\n constructor(args?: IFormField) {\n super({\n ...args,\n ...{\n inputMethod: 'selecting'\n }\n });\n }\n}\n","import { FormField } from '../form.field';\nimport { IFormField } from '../form.interface';\n\nexport class TextField extends FormField {\n constructor(args?: IFormField) {\n super({\n ...{ inputType: 'text', inputMethod: 'typing' },\n ...args\n });\n }\n}\n","import { of } from 'rxjs';\n\nexport const EMPTY_FIELD_STATE_ARGS = of({});\n","export type TValidationPatterns =\n | 'hebrewChars'\n | 'hebrewName'\n | 'englishName'\n | 'englishVowels'\n | 'mobilePhone'\n | 'mobileAreaCode'\n | 'hebrewAlphabetical'\n | 'hebrewAlphaNumeric'\n | 'email'\n | 'idNumber'\n | 'numeric'\n | 'decimal'\n | 'formattedDecimal'\n | 'nonZeroDigits'\n | 'hebConsecutive3'\n | 'hebConsecutive2'\n | 'engConsecutive3'\n | 'engConsecutive2'\n | 'hebrewPhrase'\n | 'hebSuffixLetters'\n | 'localeDate';\n\nexport const ValidationPatterns: { [key in TValidationPatterns]: RegExp } = {\n hebrewChars: /^[א-ת]*$/,\n hebrewName: /^[א-ת-\\'\" ]*$/,\n hebrewAlphabetical: /^[א-ת-\\'" ]*$/,\n hebrewAlphaNumeric: /^[A-Za-z0-9א-ת-()\\n:.,/' ]*$/,\n englishName: /^[a-zA-Z-_\\' ]*$/,\n englishVowels: /[AOUIEUY]{1,}/,\n email: /^$|^([0-9a-zA-Z_]([-.\\w]*[0-9a-zA-Z_])*@(([0-9a-zA-Z])+([-\\w]*[0-9a-zA-Z])*\\.)+[a-zA-Z]{2,9})$/,\n mobilePhone: /^[0][5][0|1|2|3|4|5|7|8]{1}[-]{0,1}[1-9]{1}[0-9]{6}$/,\n mobileAreaCode: /^[0][5][0|1|2|3|4|5|7|8]{1}/,\n numeric: /^\\d*$/,\n decimal: /^[+-]?([0-9]*[.])?[0-9]+$/,\n formattedDecimal: /^(\\d*\\.?\\d+|\\d{1,3}(,\\d{3})*(\\.\\d+)?)$/,\n idNumber: /^\\d{9}$/,\n nonZeroDigits: /^[1-9]*$/,\n hebConsecutive3: /([א-ת])\\1\\1/,\n hebConsecutive2: /([א-ת])\\1/,\n engConsecutive3: /([A-Za-z])\\1\\1/,\n engConsecutive2: /([A-Za-z])\\1/,\n localeDate: /\\d{2}\\/\\d{2}\\/\\d{4}?/,\n hebSuffixLetters: /(^[םןץףך]|.(ם|ן|ץ|ף|ך)(?=[א-ת]))/,\n hebrewPhrase: /^[א-ת-\\'\" ]*$/\n};\n","import { ValidatorFn } from '@angular/forms';\nimport {\n IDateRangeValidationHandler,\n IListValidationHandler,\n INumericValidationHandler,\n IRangeValidationHandler,\n IServerValidationHandler,\n IValidationHandler,\n TValidator\n} from '../model';\nimport { creditCardValidator } from './credit-card/credit-card.validator';\nimport { dateRangeValidator } from './dates';\nimport { emailValidator } from './email/email.validator';\nimport { emptyListValidator } from './empty-list';\nimport { englishNameValidator } from './english-name/engname.validator';\nimport { hebrewConsecutiveCharsValidator } from './hebrew-consecutive-chars/hebrewconsecutivechars.validator';\nimport { hebrewNameValidator } from './hebrew-name/hebname.validator';\nimport { idNumberValidator } from './id-number/id-number.validator';\nimport { maxLengthValidator } from './min-max-length/max-length.validator';\nimport { minLengthValidator } from './min-max-length/min-length.validator';\nimport { mobilePhoneValidator } from './mobile-phone/mobile-phone.validator';\nimport { maxNumericValidator, minNumericValidator, multiplierValidator } from './numeric';\nimport { numericValidator } from './numeric/numeric.validator';\nimport { patternValidator } from './pattern/pattern.validator';\nimport { severityValidator } from './severity/severity.validator';\nimport { specificLengthValidator } from './specific-length';\n\nexport type TCustomValidator =\n | 'idNumber'\n | 'creditCard'\n | 'hebrewName'\n | 'englishName'\n | 'hebrewConsecutiveChars'\n | 'numeric'\n | 'email'\n | 'mobilePhone'\n | 'pattern'\n | 'numeric'\n | 'minNumeric'\n | 'maxNumeric'\n | 'minLength'\n | 'maxLength'\n | 'emptyList'\n | 'dateRange'\n | 'severity';\n\nexport const CustomValidators: { [key in TValidator]?: ({ ...args }: IValidationHandler) => ValidatorFn } = {\n idNumber: ({ ...args }: IValidationHandler) => idNumberValidator(args),\n creditCard: ({ ...args }: IValidationHandler) => creditCardValidator(args),\n hebrewName: ({ ...args }: IValidationHandler) => hebrewNameValidator(args),\n englishName: ({ ...args }: IValidationHandler) => englishNameValidator(args),\n numeric: ({ ...args }: INumericValidationHandler) => numericValidator(args),\n multiplier: ({ ...args }: INumericValidationHandler) => multiplierValidator(args),\n email: ({ ...args }: IValidationHandler) => emailValidator(args),\n mobilePhone: ({ ...args }: IValidationHandler) => mobilePhoneValidator(args),\n pattern: ({ ...args }: IValidationHandler) => patternValidator(args),\n hebrewConsecutiveChars: ({ ...args }: IValidationHandler) => hebrewConsecutiveCharsValidator(args)\n};\n\nexport const CustomServerValidators: { [key in TValidator]?: ({ ...args }: IServerValidationHandler) => ValidatorFn } =\n {\n severity: ({ ...args }: IServerValidationHandler) => severityValidator(args)\n };\n\nexport const CustomRangeValidators: {\n [key in TValidator]?: ({ ...args }: Partial>) => ValidatorFn;\n} = {\n minNumber: ({ ...args }: Partial>) => minNumericValidator(args),\n maxNumber: ({ ...args }: Partial>) => maxNumericValidator(args),\n minLength: ({ ...args }: Partial>) => minLengthValidator(args),\n maxLength: ({ ...args }: Partial>) => maxLengthValidator(args),\n specificLength: ({ ...args }: Partial>) => specificLengthValidator(args)\n};\n\nexport const CustomDateValidators: {\n [key in TValidator]?: ({ ...args }: IRangeValidationHandler) => ValidatorFn;\n} = {\n dateRange: ({ ...args }: IDateRangeValidationHandler) => dateRangeValidator(args)\n};\n\nexport const CustomListValidators: {\n [key in TCustomValidator]?: ({ ...args }: IListValidationHandler) => ValidatorFn;\n} = {\n emptyList: ({ ...args }: IListValidationHandler) => emptyListValidator(args)\n};\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { modulu10Validation } from '../../functions';\nimport { IValidationHandler, TValidatorError } from '../../model';\n\nexport function idNumberValidator(args: IValidationHandler): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n\n if (invalid) return null;\n\n if (!value) return null;\n\n const isValid = modulu10Validation(control.value);\n\n if (!isValid) {\n const vldResponse: TValidatorError = { idNumber: value };\n return vldResponse;\n }\n\n return null;\n };\n}\n","export function modulu10Validation(value: string | number) {\n const charCount = 9;\n let mone: number = 0;\n let incNum: number;\n\n value = value.toString();\n\n if (/^[0]*$/.test(value)) {\n return false;\n }\n\n value = value.toString().padStart(charCount, '0');\n\n for (var i = 0; i < charCount; i++) {\n incNum = Number(value.charAt(i));\n incNum *= (i % 2) + 1;\n if (incNum > charCount) incNum -= charCount;\n mone += incNum;\n }\n\n return mone % 10 === 0;\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { creditCardValidation } from '../../functions/credit-card-validation';\nimport { IValidationHandler, TValidatorError } from '../../model';\nimport { trimComplete } from '@partners/utils';\n\nexport function creditCardValidator(args: IValidationHandler): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n\n if (invalid) return null;\n\n if (!value) return null;\n\n const isValid = creditCardValidation(trimComplete(value?.toString()));\n\n if (!isValid) {\n const vldResponse: TValidatorError = { creditCard: value };\n return vldResponse;\n }\n\n return null;\n };\n}\n","export function creditCardValidation(value: any): boolean {\n let mone: number = 0;\n let incNum: number;\n\n let luhnChk;\n\n value = value.toString();\n\n if (value.length > 13) {\n luhnChk = (luhn: any) => {\n var len = luhn.length,\n mul = 0,\n prodArr = [\n [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],\n [0, 2, 4, 6, 8, 1, 3, 5, 7, 9]\n ],\n sum = 0;\n\n while (len--) {\n sum += prodArr[mul][parseInt(luhn.charAt(len), 10)];\n\n mul ^= 1;\n }\n\n return sum % 10 === 0 && sum > 0;\n };\n } else {\n // 8 or 9 digits, isracard only\n\n if (value.length == 8) {\n value = '0' + value;\n }\n\n luhnChk = (luhn: any) => {\n var len = luhn.length,\n prodArr = [1, 2, 3, 4, 5, 6, 7, 8, 9],\n sum = 0,\n count = 0;\n\n while (len--) {\n sum += prodArr[count] * parseInt(luhn.charAt(len), 10);\n\n count++;\n }\n\n return sum % 11 === 0 && sum > 0;\n };\n }\n\n if (/[^0-9-]+/.test(value)) {\n return false;\n }\n\n return luhnChk(value);\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { isNumber, isString } from '@partners/utils';\nimport { IRangeValidationHandler, TValidatorError } from '../../model';\n\nexport function minLengthValidator(args: Partial>): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n const { min } = args;\n if (invalid) return null;\n\n if (!isString(value) || !isNumber(value?.length)) return null;\n const valueLength = value.toString().length;\n const isLowerThenMin = valueLength && valueLength < min;\n\n if (isLowerThenMin) {\n const vldResponse: TValidatorError = { minLength: value };\n return vldResponse;\n }\n\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { isNumber, isString } from '@partners/utils';\nimport { IRangeValidationHandler, TValidatorError } from '../../model';\n\nexport function maxLengthValidator(args: Partial>): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n const { max } = args;\n\n if (invalid) return null;\n\n if (!isString(value) || !isNumber(value?.length)) return null;\n\n const isHigherThenMax = value.toString().length > max;\n\n if (isHigherThenMax) {\n const vldResponse: TValidatorError = { maxLength: value };\n return vldResponse;\n }\n\n return null;\n };\n}\n","import { computed, Signal } from '@angular/core';\nimport { AsyncValidatorFn, ValidatorFn, Validators } from '@angular/forms';\nimport { coerceObservable, isNotEmpty, numericFormat } from '@partners/utils';\nimport { Observable, of } from 'rxjs';\nimport { ValidationPatterns } from '../validators';\nimport {\n CustomDateValidators,\n CustomListValidators,\n CustomRangeValidators,\n CustomServerValidators,\n CustomValidators\n} from '../validators/validators-registry';\nimport {\n IDateRangeValidationHandler,\n IFieldValidation,\n IListValidationHandler,\n INumericValidationHandler,\n IRangeValidationHandler,\n IServerValidationHandler,\n IValidationHandler\n} from './form.interface';\nimport { TIterableOption, TValidator, TValidatorError } from './form.types';\n\nexport class FieldValidation implements IFieldValidation {\n label?: string;\n validationHandlers?: IValidationHandler[];\n\n constructor({ validationHandlers: validators = [], label = undefined }: IFieldValidation) {\n this.label = label;\n this.validationHandlers = validators;\n\n /**\n * the validation label is common to all field's validators, it's used to format an informative\n * error messages with the field's name or caption form extra specificity. here, we copy to root\n * label of the field's validation to all validators\n */\n validators.map((v) => {\n v.label = label;\n });\n }\n}\n\nexport abstract class ValidationHandler implements IValidationHandler {\n value?: unknown = null;\n label?: string;\n type?: TValidator | TValidator[];\n pattern?: RegExp;\n message?: string | Observable;\n isAsync?: boolean;\n priority?: number;\n validators?: ValidatorFn[];\n asyncValidators?: AsyncValidatorFn[];\n\n get hasRequiredValidator(): boolean {\n const requiredValidator = this.validators.find((v) => v === Validators.required);\n return isNotEmpty(requiredValidator);\n }\n\n constructor({ label, message, validators, type, pattern, asyncValidators }: IValidationHandler) {\n this.label = label;\n this.type = type;\n this.pattern = pattern;\n this.message = message;\n this.validators = validators;\n this.asyncValidators = asyncValidators;\n\n if (!Array.isArray(this.validators)) {\n this.validators = new Array();\n }\n if (!Array.isArray(this.asyncValidators)) {\n this.validators = new Array();\n }\n }\n\n /**\n * create an validation error message on demand (see field-subscript directive)\n * @param message\n * @returns a stream of the error message string value\n */\n abstract buildMessage(validatorType: TValidator, error?: TValidatorError): Observable;\n\n protected formatMessage(message?: string | Observable) {\n if (!message) {\n return of('אירעה שגיאה');\n }\n return coerceObservable(message);\n }\n}\nexport abstract class RangeValidationHandler extends ValidationHandler implements IRangeValidationHandler {\n max: T;\n min: T;\n specific: T[];\n\n get isMinMaxEqual(): boolean {\n return this.max === this.min;\n }\n\n constructor(args: IRangeValidationHandler) {\n super(args);\n const { min, max, specific } = args;\n this.max = max;\n this.min = min;\n this.specific = specific;\n }\n}\nexport abstract class ListValidationHandler extends ValidationHandler implements IListValidationHandler {\n options$$: Signal;\n query$$: Signal;\n keyProp: string;\n\n constructor(args?: IListValidationHandler) {\n super(args);\n const { options$$, query$$ } = args;\n this.options$$ = computed(() => options$$());\n this.query$$ = computed(() => query$$());\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `יש לבחור ערך מהרשימה`);\n }\n}\nexport class RequiredValidation extends ValidationHandler {\n constructor(args?: IValidationHandler) {\n args = { ...args, ...{ type: 'required' } };\n\n super({ ...args });\n\n this.validators?.push(Validators.required);\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `נראה שחסר כאן ${this.label || 'ערך'}`);\n }\n}\n\nexport class RequiredTrueValidation extends ValidationHandler {\n constructor(args?: IValidationHandler) {\n args = { ...args, ...{ type: 'required' } };\n\n super({ ...args });\n\n this.validators?.push(Validators.requiredTrue);\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `נראה שחסר כאן ${this.label || 'ערך'}`);\n }\n}\nexport class PatternValidation extends ValidationHandler {\n constructor(args?: IValidationHandler) {\n args = { ...args, ...{ type: 'pattern' } };\n super({ ...args });\n this.validators?.push(CustomValidators.pattern(args));\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `נראה שיש טעות ב${this.label}`);\n }\n}\nexport class NumericValidation extends ValidationHandler {\n constructor(args?: INumericValidationHandler) {\n args = { ...args, ...{ type: 'numeric', pattern: ValidationPatterns.numeric } };\n\n super({ ...args });\n this.validators?.push(CustomValidators.numeric(args));\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `יש להקליד ספרות בלבד`);\n }\n}\n\nexport class MinLengthValidation extends ValidationHandler {\n constructor(private args: Partial>) {\n super({ ...args, ...{ type: 'minLength' } });\n this.validators?.push(CustomRangeValidators.minLength(args));\n }\n override buildMessage(validatorType: TValidator, error?: TValidatorError): Observable {\n return this.formatMessage(this.message || `יש להזין לפחות ${this.args.min} תווים.`);\n }\n}\n\nexport class MaxLengthValidation extends ValidationHandler {\n constructor(private args: Partial>) {\n super({ ...args, ...{ type: 'maxLength' } });\n this.validators?.push(CustomRangeValidators.maxLength(args));\n }\n override buildMessage(validatorType: TValidator, error?: TValidatorError): Observable {\n return this.formatMessage(this.message || `יש להזין עד ${this.args.max} תווים`);\n }\n}\n\nexport class MultiplierValidation extends ValidationHandler {\n constructor(args?: INumericValidationHandler) {\n args = { ...args, ...{ type: 'multiplier' } };\n\n super({ ...args });\n\n // this.validators?.push(CustomValidators.numeric(args));\n this.validators?.push(CustomValidators.multiplier(args));\n }\n\n override buildMessage(validatorType: TValidator, error: any): Observable {\n return this.formatMessage(this.message || `יש להזין סכום בכפולות של ${error['multiplier']}`);\n }\n}\n\nexport class MinNumberValidation extends RangeValidationHandler {\n get minNumberF(): string {\n return numericFormat(this.min);\n }\n\n constructor(private args: IRangeValidationHandler) {\n super({ ...args, ...{ type: 'minNumber' } });\n this.validators?.push(CustomRangeValidators.minNumber(args));\n }\n override buildMessage(validatorType: TValidator, error?: TValidatorError): Observable {\n return this.formatMessage(this.message || `יש להזין ערך גבוה מ-${this.minNumberF}`);\n }\n}\n\nexport class MaxNumberValidation extends RangeValidationHandler {\n get maxNumberF(): string {\n return numericFormat(this.max);\n }\n constructor(private args: IRangeValidationHandler) {\n super({ ...args, ...{ type: 'maxNumber' } });\n this.validators?.push(CustomRangeValidators.maxNumber(args));\n }\n override buildMessage(validatorType: TValidator, error?: TValidatorError): Observable {\n return this.formatMessage(this.message || `יש להזין ערך נמוך מ-${this.maxNumberF}`);\n }\n}\nexport class NumericRangeValidation extends RangeValidationHandler {\n get minValueF(): string {\n return numericFormat(this.min);\n }\n\n get maxValueF(): string {\n return numericFormat(this.max);\n }\n\n constructor(args?: IRangeValidationHandler) {\n args = { ...args, ...{ type: ['minNumber', 'maxNumber'] } };\n\n super({ ...args });\n\n this.validators.push(CustomRangeValidators.minNumber(args));\n this.validators.push(CustomRangeValidators.maxNumber(args));\n }\n\n override buildMessage(validatorType: TValidator): Observable {\n if (this.isMinMaxEqual) {\n return this.formatMessage(this.message || `יש להזין ערך מדויק ${this.min}`);\n }\n if (validatorType === 'minNumber') {\n return this.formatMessage(this.message || `יש להזין ערך גבוה מ ${this.minValueF}`);\n }\n if (validatorType === 'maxNumber') {\n return this.formatMessage(this.message || `יש להזין ערך נמוך מ ${this.maxValueF}`);\n }\n\n return this.formatMessage(this.message || `יש להזין ערך בין ${this.minValueF} ל ${this.maxValueF}`);\n }\n}\nexport class DateRangeValidation extends RangeValidationHandler {\n get minDateF(): string {\n return this.min;\n }\n\n get maxDateF(): string {\n return this.max;\n }\n\n constructor(args?: IDateRangeValidationHandler) {\n super({ ...args, ...{ type: 'dateRange' } });\n\n // this.validators = this.validators.concat([...args.validators]);\n this.validators.push(CustomDateValidators.dateRange(args));\n }\n\n override buildMessage(validatorType: TValidator): Observable {\n return this.formatMessage(this.message || `יש להזין ערך בין ${this.minDateF} ל ${this.maxDateF}`);\n }\n}\nexport class LengthValidation extends RangeValidationHandler {\n get minLength(): number {\n return this.min;\n }\n\n get maxLength(): number {\n return this.max;\n }\n\n constructor(args?: IRangeValidationHandler) {\n args = { ...args, ...{ type: ['minLength', 'maxLength'] } };\n\n super({ ...args });\n\n this.validators?.push(CustomRangeValidators.minLength(args));\n this.validators?.push(CustomRangeValidators.maxLength(args));\n }\n\n override buildMessage(validatorType: TValidator): Observable {\n if (this.isMinMaxEqual) {\n return this.formatMessage(this.message || `יש להזין בדיוק ${this.minLength} תווים`);\n }\n if (validatorType === 'minLength') {\n return this.formatMessage(this.message || `יש להזין לפחות ${this.minLength} תווים`);\n }\n if (validatorType === 'maxLength') {\n return this.formatMessage(this.message || `יש להזין עד ${this.maxLength} תווים`);\n }\n\n return this.formatMessage(this.message || `יש להזין בין ${this.minLength} ל ${this.maxLength} תווים`);\n }\n}\n\nexport class SpecificLengthValidation extends RangeValidationHandler {\n get lengthValues(): number[] {\n return this.specific;\n }\n\n constructor(args?: IRangeValidationHandler) {\n args = { ...args, ...{ type: ['specificLength'] } };\n\n super({ ...args });\n\n this.validators?.push(CustomRangeValidators.specificLength(args));\n }\n\n override buildMessage(validatorType: TValidator): Observable {\n const options = this.lengthValues.map((v) => ` ${v} `).join('או');\n\n return this.formatMessage(this.message || `יש להזין ערך באורך ${options} תווים`);\n }\n}\n\nexport class HebrewCharsValidation extends ValidationHandler {\n constructor(args?: IValidationHandler) {\n args = { ...args, ...{ type: 'hebrewChars', pattern: ValidationPatterns.hebrewChars } };\n\n super({ ...args });\n\n this.validators.push(CustomValidators.pattern(args));\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `נראה שיש טעות ב${this.label}`);\n }\n}\nexport class HebrewNameValidation extends ValidationHandler {\n constructor(args?: IValidationHandler) {\n args = { ...args, ...{ type: 'hebrewName', pattern: ValidationPatterns.hebrewName } };\n\n super({ ...args });\n\n this.validators.push(CustomValidators.hebrewName(args));\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `נראה שיש טעות ב${this.label}, כדאי לבדוק מול תעודת הזהות`);\n }\n}\nexport class EnglishNameValidation extends ValidationHandler {\n constructor(args?: IValidationHandler) {\n args = { ...args, ...{ type: 'englishName', pattern: ValidationPatterns.englishName } };\n\n super({ ...args });\n\n this.validators.push(CustomValidators.englishName(args));\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `נראה שיש טעות ב${this.label}`);\n }\n}\nexport class EmailValidation extends ValidationHandler {\n constructor(args?: IValidationHandler) {\n args = { ...args, ...{ type: 'email', pattern: ValidationPatterns.email } };\n\n super({ ...args });\n\n this.validators.push(CustomValidators.email(args));\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `נראה שיש טעות ב${this.label}`);\n }\n}\nexport class IdNumberValidation extends ValidationHandler {\n constructor(args?: IValidationHandler) {\n args = { ...args, ...{ type: 'idNumber', pattern: ValidationPatterns.idNumber } };\n\n super({ ...args });\n\n this.validators.push(CustomValidators.idNumber(args));\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `נראה שיש טעות ב${this.label}`);\n }\n}\nexport class SeverityValidation extends ValidationHandler {\n constructor(args?: IServerValidationHandler) {\n args = { ...args, ...{ type: 'severity' } };\n\n super({ ...args });\n\n this.validators.push(CustomServerValidators.severity(args));\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `נראה שיש טעות ב${this.label}`);\n }\n}\nexport class MobilePhoneValidation extends ValidationHandler {\n constructor(args?: IValidationHandler) {\n args = { ...args, ...{ type: 'mobilePhone', pattern: ValidationPatterns.mobilePhone } };\n\n super({ ...args });\n\n this.validators.push(CustomValidators.mobilePhone(args));\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `נראה שיש טעות ב${this.label}`);\n }\n}\nexport class MaskValidation extends ValidationHandler {\n constructor(args?: IValidationHandler) {\n args = { ...args, ...{ type: 'inputMask' } };\n\n super({ ...args });\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `נראה שיש טעות ב${this.label}`);\n }\n}\nexport class CreditCardValidation extends ValidationHandler {\n constructor(args?: IValidationHandler) {\n args = { ...args, ...{ type: 'creditCard' } };\n\n super({ ...args });\n\n this.validators?.push(CustomValidators.creditCard(args));\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `${this.label || 'לא תקין'}`);\n }\n}\nexport class AutoCompleteValidation extends ListValidationHandler {\n constructor(args?: IListValidationHandler) {\n args = { ...args, ...{ type: 'emptyList' } };\n\n super({ ...args });\n\n this.validators?.push(CustomListValidators.emptyList(args));\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `יש לבחור ערך מהרשימה`);\n }\n}\n\nexport class HebrewConsecutiveCharsValidation extends ValidationHandler {\n constructor(args?: IValidationHandler) {\n args = { ...args, ...{ type: 'hebrewConsecutiveChars', pattern: ValidationPatterns.hebrewPhrase } };\n\n super({ ...args });\n\n this.validators.push(CustomValidators.hebrewConsecutiveChars(args));\n }\n\n override buildMessage(): Observable {\n return this.formatMessage(this.message || `נראה שיש טעות ב${this.label} שהזנת, כדאי לבדוק שוב`);\n }\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { IValidationHandler, TValidator } from '../../model';\n\nexport function patternValidator(args: IValidationHandler): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n\n if (invalid) return null;\n\n if (!value) return null;\n\n const matchPattern = value.match(args.pattern);\n\n if (!matchPattern?.length) {\n const { type } = args;\n return {\n [type as TValidator]: value\n };\n // const vldResponse: TValidatorError = { pattern: value };\n // return vldResponse;\n }\n\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { INumericValidationHandler, TValidatorError } from '../../model';\nimport { ValidationPatterns } from '../validation-patterns';\n\nexport function numericValidator(args: INumericValidationHandler): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n\n if (invalid) return null;\n\n if (!value) return null;\n\n const matchNumeric = value.toString().match(ValidationPatterns.numeric);\n\n if (!matchNumeric?.length) {\n const vldResponse: TValidatorError = { numeric: value };\n return vldResponse;\n }\n\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { coerceNumber } from '@partners/utils';\nimport { INumericValidationHandler, TValidatorError } from '../../model';\n\nexport function multiplierValidator(args: INumericValidationHandler): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n\n if (invalid) return null;\n\n if (!value) return null;\n\n const numericValue = coerceNumber(value);\n const numericMultiplier = coerceNumber(args?.multiplier);\n const isValidArgs = numericMultiplier && numericMultiplier != 0 && numericMultiplier && numericMultiplier !== 0;\n\n let matchMultiplier = isValidArgs && numericValue % numericMultiplier === 0;\n\n if (!matchMultiplier) {\n const vldResponse: TValidatorError = { multiplier: args?.multiplier };\n return vldResponse;\n }\n\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { coerceNumber } from '@partners/utils';\nimport { IRangeValidationHandler, TValidatorError } from '../../model';\n\nexport function minNumericValidator(args: Partial>): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n const { min } = args;\n\n if (invalid) return null;\n\n const validNumber = coerceNumber(value);\n if (!validNumber && validNumber !== 0) {\n return null;\n }\n\n if (validNumber < min) {\n const vldResponse: TValidatorError = { minNumber: value };\n return vldResponse;\n }\n\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { coerceNumber } from '@partners/utils';\nimport { IRangeValidationHandler, TValidatorError } from '../../model';\n\nexport function maxNumericValidator(args: Partial>): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n const { max } = args;\n\n if (invalid) return null;\n\n const validNumber = coerceNumber(value);\n if (!validNumber) {\n return null;\n }\n\n if (validNumber > max) {\n const vldResponse: TValidatorError = { maxNumber: value };\n return vldResponse;\n }\n\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { DateUtil } from '@partners/utils';\nimport { IDateRangeValidationHandler, TValidatorError } from '../../model';\n\nexport function dateRangeValidator(args: IDateRangeValidationHandler): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n const { min, max, baseYear } = args;\n\n if (!value) return null;\n if (invalid) return null;\n\n const isValid = DateUtil.isDateInRange(value, { min, max, baseYear });\n\n if (!isValid) {\n const vldResponse: TValidatorError = { dateRange: value };\n return vldResponse;\n }\n\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { isEmpty } from '@partners/utils';\nimport { IRangeValidationHandler, TValidatorError } from '../../model';\n\nexport function specificLengthValidator(args: Partial>): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n const { specific } = args;\n\n if (invalid) return null;\n if (isEmpty(value)) return null;\n\n const matchedLength = specific.find((length) => length === value.toString().length);\n\n const isOutOfRange = isEmpty(matchedLength);\n\n if (isOutOfRange) {\n const vldResponse: TValidatorError = { specificLength: value };\n return vldResponse;\n }\n\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { IValidationHandler, TValidatorError } from '../../model';\nimport { ValidationPatterns } from '../validation-patterns';\n\nexport function hebrewNameValidator(args: IValidationHandler): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n\n if (invalid) return null;\n\n if (!value) return null;\n\n const vldResponse: TValidatorError = { hebrewName: value };\n\n /** check control's value against whitelist chars */\n const matchHebName = value.match(ValidationPatterns.hebrewName);\n\n if (!matchHebName?.length) {\n return vldResponse;\n }\n\n /** disallow 3 or more consecutive identical hebrew chars */\n const matchConsecutive3 = value.match(ValidationPatterns.hebConsecutive3);\n\n if (matchConsecutive3?.length) {\n return vldResponse;\n }\n\n /** disallow 2 consecutive identical hebrew chars when value is only 2 chars long */\n if (value?.length === 2) {\n const matchConsecutive2 = value.match(ValidationPatterns.hebConsecutive2);\n\n if (matchConsecutive2?.length) {\n return vldResponse;\n }\n }\n\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { IValidationHandler, TValidatorError } from '../../model';\nimport { ValidationPatterns } from '../validation-patterns';\n\nexport function englishNameValidator(args: IValidationHandler): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n\n if (invalid) return null;\n\n if (!value) return null;\n\n const vldResponse: TValidatorError = { englishName: value };\n\n /** whitelist validation */\n const matchEngName = value.match(ValidationPatterns.englishName);\n\n if (!matchEngName?.length) {\n return vldResponse;\n }\n\n /** disallow 3 or more consecutive identical english chars */\n const matchConsecutive3 = value.match(ValidationPatterns.engConsecutive3);\n\n if (matchConsecutive3?.length) {\n return vldResponse;\n }\n\n /** disallow 2 consecutive identical english chars when value is only 2 chars long */\n if (value?.length === 2) {\n const matchConsecutive2 = value.match(ValidationPatterns.engConsecutive2);\n\n if (matchConsecutive2?.length) {\n return vldResponse;\n }\n }\n\n /** disallow entire value without vowels */\n const matchVowels = value.toUpperCase().match(ValidationPatterns.englishVowels);\n\n if (!matchVowels?.length) {\n return vldResponse;\n }\n\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { ValidationPatterns } from '../validation-patterns';\nimport { IValidationHandler, TValidatorError } from '../../model';\n\nexport function emailValidator(args: IValidationHandler): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n\n if (invalid) return null;\n\n if (!value) return null;\n\n const matchEmail = value.match(ValidationPatterns.email);\n\n if (!matchEmail?.length) {\n const vldResponse: TValidatorError = { email: value };\n return vldResponse;\n }\n\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { IServerValidationHandler, TValidatorError } from '../../model';\n\nexport function severityValidator(args: IServerValidationHandler): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { invalid } = control;\n const { severities, value } = args;\n\n if (invalid) return null;\n\n const isInValid = severities.includes(value);\n\n if (isInValid) {\n const vldResponse: TValidatorError = { severity: value };\n return vldResponse;\n }\n\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { ValidationPatterns } from '../validation-patterns';\nimport { IValidationHandler, TValidatorError } from '../../model';\n\nexport function mobilePhoneValidator(args: IValidationHandler): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n\n if (invalid) return null;\n\n if (!value) return null;\n\n const matchMobilePhone = value.match(ValidationPatterns.mobilePhone);\n\n if (!matchMobilePhone?.length) {\n const vldResponse: TValidatorError = { mobilePhone: value };\n return vldResponse;\n }\n\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { isArray, isEmpty, isNotEmpty } from '@partners/utils';\nimport { IListValidationHandler, TValidatorError } from '../../model';\n\nexport function emptyListValidator(args: IListValidationHandler): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n const { options$$, query$$, valueProp, keyProp } = args;\n\n if (invalid) return null;\n\n const options = options$$();\n const query = query$$();\n\n if (!isArray(options) || isEmpty(query)) {\n return null;\n }\n\n const isValid = options?.find((option) => {\n const isKeyInList = option[keyProp] == query;\n\n if (isNotEmpty(valueProp)) {\n const isValueInList = option[valueProp] == query;\n return isKeyInList || isValueInList;\n }\n return isKeyInList;\n });\n\n if (!isValid) {\n // Console.logError(`>>>>>>>> empty list validator - INVALID! value: ${value}`);\n const vldResponse: TValidatorError = { emptyList: value };\n return vldResponse;\n }\n\n // Console.logInfo(`>>>>>>>> empty list validator - VALID! value: ${value}`);\n return null;\n };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { IValidationHandler, TValidatorError } from '../../model';\nimport { ValidationPatterns } from '../validation-patterns';\n\nexport function hebrewConsecutiveCharsValidator(args: IValidationHandler): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const { value, invalid } = control;\n\n if (invalid) return null;\n\n if (!value) return null;\n\n const vldResponse: TValidatorError = { hebrewConsecutiveChars: value };\n\n /** check control's value against whitelist chars */\n const matchHebName = value.match(ValidationPatterns.hebrewPhrase);\n\n if (!matchHebName?.length) {\n return vldResponse;\n }\n\n /** disallow 3 or more consecutive identical hebrew chars */\n const matchConsecutive3 = value.match(ValidationPatterns.hebConsecutive3);\n\n if (matchConsecutive3?.length) {\n return vldResponse;\n }\n\n /** disallow 2 consecutive identical hebrew chars when value is only 2 chars long */\n if (value?.length === 2) {\n const matchConsecutive2 = value.match(ValidationPatterns.hebConsecutive2);\n\n if (matchConsecutive2?.length) {\n return vldResponse;\n }\n }\n\n /** disallow final letters in the middle or at the start of the word */\n const matchHebSuffixLetters = value.match(ValidationPatterns.hebSuffixLetters);\n\n if (matchHebSuffixLetters?.length) {\n return vldResponse;\n }\n\n return null;\n };\n}\n","import { FormControl, FormGroupDirective, NgForm } from '@angular/forms';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { Console } from '@partners/utils';\n\nexport class SimpleErrorStateMatcher implements ErrorStateMatcher {\n isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {\n const isSubmitted = form && form.submitted;\n\n const { errors } = control;\n\n let isInValid;\n\n if (errors && errors['required']) {\n isInValid = control?.invalid && (control.dirty || control.touched || isSubmitted);\n // Console.logWarning(\n // `invalid: ${control?.invalid} | dirty: ${control.dirty} | touched: ${control.touched} | submitted: ${isSubmitted} | has error: ${isInValid}`\n // );\n return isInValid;\n }\n\n isInValid = control?.invalid && (control.dirty || control.touched);\n // Console.logInfo(\n // `invalid: ${control?.invalid} | dirty: ${control.dirty} | touched: ${control.touched} | submitted: ${isSubmitted} | has error: ${isInValid}`\n // );\n return isInValid;\n }\n}\n","import { Directive } from '@angular/core';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { SimpleErrorStateMatcher } from '../../errors/simple-error-matcher';\n\n@Directive({\n standalone: true,\n selector: '[simpleErrorMatcher]',\n providers: [{ provide: ErrorStateMatcher, useClass: SimpleErrorStateMatcher }]\n})\nexport class SimpleErrorMatcherDirective {\n constructor() {}\n}\n","import { NgFor } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n signal\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {\n MAT_AUTOCOMPLETE_SCROLL_STRATEGY,\n MatAutocomplete,\n MatAutocompleteModule,\n MatAutocompleteSelectedEvent\n} from '@angular/material/autocomplete';\nimport { MarkPipe, isFunction, isString, isUndefined } from '@partners/utils';\nimport { Observable, fromEvent, isObservable, of, pairwise, tap } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, filter, finalize, map, startWith, switchMap } from 'rxjs/operators';\nimport { SimpleFieldDirective } from '../../directives';\nimport { composeValidators } from '../../functions';\n\nimport { CloseScrollStrategy, Overlay } from '@angular/cdk/overlay';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { FieldErrorComponent } from '../../components';\nimport { FormDefaultImportPack } from '../../import-pack';\nimport {\n AutoCompleteValidation,\n IFieldValidation,\n IFormConfig,\n IFormField,\n IFormFieldValueChange,\n TControlChangeTrigger,\n TFieldStateArgs,\n TIterableOption\n} from '../../model';\nimport { ExtendedFormControl } from '../control';\n\nfunction autoCompleteScrollFactory(overlay: Overlay): () => CloseScrollStrategy {\n return () => overlay.scrollStrategies.close();\n}\n\n@Component({\n selector: 'auto-complete',\n standalone: true,\n imports: [NgFor, FormDefaultImportPack, MatAutocompleteModule, MarkPipe, ScrollingModule, MatProgressBarModule],\n template: `\n \n \n \n {{ fieldAccessor.label }}\n \n {{ fieldAccessor.minorLabel }}\n \n \n\n \n\n \n @if (isPending$$()) {\n \n } @if (!fieldAccessor?.options$$()?.length && queryText()?.length) {\n \n @if(!isPending$$() && queryText()?.length) {\n \n לא מצאנו תוצאות ל\n \"{{ queryText() }}\"\n \n }\n \n }\n \n \n\n @if(queryScope() === 'keys-values') {\n \n }\n \n \n \n \n \n \n \n \n \n \n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'autoComplete',\n providers: [\n {\n provide: MAT_AUTOCOMPLETE_SCROLL_STRATEGY,\n useFactory: autoCompleteScrollFactory,\n deps: [Overlay]\n },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AutoCompleteComponent),\n multi: true\n }\n ],\n host: {\n class: 'auto-complete'\n }\n})\nexport class AutoCompleteComponent implements OnInit, OnDestroy, AfterViewInit, ControlValueAccessor {\n @Output()\n blur = new EventEmitter();\n\n @Input()\n fieldAccessor: SimpleFieldDirective;\n\n /**\n * allow resetting this control by listening to changes to another control. we subscribe to\n * the dependency control's value changes and reset this control whenever the dependency control's\n * value is reset. example: residence & street controls where street is dependant on residence.\n * we want to reset street code & query off the auto complete when residence is reset\n */\n @Input()\n set dependantOn(dependencyCtrl: SimpleFieldDirective) {\n if (!dependencyCtrl) {\n return;\n }\n const { control } = dependencyCtrl;\n control.valueChanges.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {\n this.onManualQueryReset();\n });\n }\n\n @ViewChild('inputElement', { read: ElementRef, static: true })\n inputElement: ElementRef;\n\n @ViewChild(FieldErrorComponent, { read: FieldErrorComponent, static: true })\n fieldError: FieldErrorComponent;\n\n @ViewChild('ngAutoComplete', { read: MatAutocomplete, static: true })\n ngAutoComplete: MatAutocomplete;\n\n error = computed(() => {\n const err = this.fieldError?.error();\n return err;\n });\n\n #submittedRef = effect(\n () => {\n const isSubmitted = this.fieldAccessor.submitted$$();\n\n if (!isSubmitted) {\n return;\n }\n\n this.markFilterControlDirty();\n },\n { allowSignalWrites: true }\n );\n\n get fieldConfig(): IFormField {\n return this.fieldAccessor?.fieldConfig;\n }\n\n get formConfig(): IFormConfig {\n return this.fieldAccessor?.getFieldLocals().config;\n }\n\n get validation(): IFieldValidation {\n return this.fieldConfig.validation;\n }\n\n get keyProp(): string {\n return this.fieldConfig.keyProp;\n }\n\n get valueProp(): string {\n return this.fieldConfig.valueProp;\n }\n\n get debounceTime(): number {\n return this.fieldConfig.debounceInterval;\n }\n\n get changeTrigger(): TControlChangeTrigger {\n return this.fieldConfig.changeTrigger;\n }\n\n get filterElement(): HTMLInputElement {\n const { nativeElement } = this.inputElement;\n return nativeElement;\n }\n\n get control(): ExtendedFormControl {\n if (!this.fieldConfig) {\n return undefined;\n }\n const { control } = this.fieldConfig;\n return control;\n }\n\n value: T;\n disabled: boolean = false;\n\n /** indicates an on-going active live options filter search (example: http) */\n isPending$$ = signal(false);\n\n /** the value the user types in the filter textbox */\n queryText = signal('');\n\n /** the options search source: just keys, or keys & values */\n queryScope = input<'keys' | 'values' | 'keys-values'>('keys');\n\n /** a local copy of the last (current) selected option */\n #lastOption: TIterableOption;\n\n #onChange: (value: T | undefined) => T;\n #onTouched: () => T;\n\n #destroyRef = inject(DestroyRef);\n #changeDetector = inject(ChangeDetectorRef);\n\n /** the text input control where the user types his search query */\n filterControl: ExtendedFormControl;\n\n constructor() {}\n\n ngOnDestroy(): void {\n this.#submittedRef && this.#submittedRef.destroy();\n }\n\n ngOnInit(): void {\n this.mirrorControl();\n this.applyCustomChangeHandler();\n this.addOnResetLocalHandler();\n }\n\n /**\n * @description a wrapper function to add a *local* handler to the field's \"onReset\" hook (config)\n * this gives us a chance to reset and initialize local elements and members, for example: clear the\n * query text and the last selected option when the user resets the field's value\n */\n private addOnResetLocalHandler(): void {\n if (!isFunction(this.fieldConfig?.onReset)) {\n return;\n }\n\n this.fieldConfig.onReset = () => {\n this.onManualQueryReset();\n };\n }\n\n ngAfterViewInit(): void {\n this.applyFilteringBehavior();\n\n this.fieldAccessor.control.markAsPristine();\n this.fieldAccessor.control.markAsUntouched();\n this.#changeDetector.detectChanges();\n }\n\n /** writes a value to the form control attached to the filter's query textbox */\n writeFilterValue(selectedOption: TIterableOption | undefined): void {\n this.filterControl.setValue(selectedOption);\n this.filterControl.updateValueAndValidity();\n }\n\n writeQueryText(selectedOption: TIterableOption | string | undefined): void {\n let query;\n\n if (isUndefined(selectedOption)) {\n query = undefined;\n } else if (isString(selectedOption)) {\n query = selectedOption;\n } else if (this.keyProp in selectedOption) {\n query = selectedOption[this.keyProp];\n }\n\n this.queryText.set(query);\n this.filterControl.updateValueAndValidity();\n }\n\n /** inform angular the control's new value */\n writeValue(value: T | undefined): void {\n this.value = value;\n\n if (this.value !== this.control?.value) {\n this.control.setValue(value);\n }\n }\n\n registerOnChange(fn: (value: T | undefined) => T): void {\n this.#onChange = fn;\n }\n\n registerOnTouched(fn: () => T): void {\n this.#onTouched = fn;\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n isDisabled ? this.filterControl.disable() : this.filterControl.enable();\n }\n\n displayFn(option: TIterableOption): string {\n return option ? (option[this.keyProp] as string) : '';\n }\n\n /**\n * @description\n * user's manual option selection via tap | click event. (this is different from autoSelectOnBlur)\n * @param option deconstruction of MatAutocompleteSelectedEvent which holds the selected MatOption\n */\n onOptionClick({ option }: MatAutocompleteSelectedEvent): void {\n const selectedOption = option.value;\n\n if (this.#lastOption === selectedOption) {\n return;\n }\n\n this.selectOption(selectedOption);\n }\n\n /**\n * @description\n * executes when the user blurs the query textbox.\n * @param event the blur event object\n */\n onFilterBlur(event: Event) {\n this.markValueControlDirty();\n\n this.markFilterControlDirty();\n\n this.autoSelectOnBlur(this.fieldAccessor.options$$());\n\n this.#changeDetector.detectChanges();\n\n this.blur.emit();\n }\n\n /**\n * @description\n * perform a reset of the entire control and trigger a callback to owner. this method executes\n * when the user presses the X button of the filter input in order to clear the current query\n * value. We trigger the field's onReset hook, (if the user defined one) on the field's config.\n * Since this autocomplete does not manage the options list's source - it is the user's responsibility\n * to implement an onReset handler to synchronize the options list to [] (empty array) when the query\n * filter text is reset.\n */\n onManualQueryReset(): void {\n /** clear the query control (where the user types) */\n this.writeFilterValue(undefined);\n\n this.writeQueryText(undefined);\n\n /** clear value control (and local value) */\n this.resetValueAndOptions();\n\n this.launchResetCallback();\n }\n\n trackByValue(index: number, data: any): T {\n return data[this.valueProp];\n }\n\n // /**\n // * @description\n // * adds a local handler to the field's \"onReset\" hook (config). we need this to reset local values\n // * like the query text & last selected option when the reset event is triggered outside the auto complete\n // */\n // private addOnResetLocalHandler(): void {\n // if (!isFunction(this.fieldAccessor.onReset)) {\n // return;\n // }\n\n // const originalReset = this.fieldAccessor.onReset;\n\n // const locals = {\n // ...this.fieldAccessor.getFieldLocals(),\n // ...{ option: this.#lastOption }\n // };\n\n // this.fieldAccessor.onReset = () => {\n // originalReset({ ...locals });\n // this.#lastOption = undefined;\n // this.writeFilterValue(undefined);\n // this.writeQueryText(undefined);\n // };\n // }\n\n private selectOption(option: TIterableOption): void {\n if (!option) {\n this.resetValueAndOptions();\n return;\n }\n\n const selectedValue = option[this.valueProp];\n\n this.writeValue(selectedValue);\n\n this.writeQueryText(option);\n\n this.#onChange(selectedValue);\n\n this.#onTouched();\n\n this.triggerSelectCallback(option);\n\n this.#lastOption = option;\n\n this.#changeDetector.markForCheck();\n }\n\n private markFilterControlDirty() {\n this.filterControl?.markAsDirty();\n this.filterControl?.markAsTouched();\n this.filterControl?.updateValueAndValidity();\n }\n\n private markValueControlDirty() {\n this.control?.markAsDirty();\n this.control?.markAsTouched();\n this.control?.updateValueAndValidity();\n }\n\n /**\n * @description\n * access & launch the field's config \"onReset\" callback from inside the auto complete\n */\n private launchResetCallback() {\n /** check if user defined an onReset hook */\n if (!this.fieldAccessor?.onReset) {\n return;\n }\n\n /** prepare to run onReset hook */\n const { onReset, getFieldLocals } = this.fieldAccessor;\n\n /**\n * bind onReset hook, make the form field directive reference \"this\" instance inside callbacks\n * so that we gain its context and be able to finish the callbacks successfully\n * */\n const resetHandler = onReset.bind(this.fieldAccessor);\n\n /** get the form field's event hook default locals */\n const localsHandler = getFieldLocals.bind(this.fieldAccessor);\n\n /** run event handler for reset hook, pass field's locals as args, in case we need them in handler */\n resetHandler(localsHandler());\n\n this.#changeDetector.detectChanges();\n }\n\n private resetValueAndOptions(): void {\n this.writeValue(undefined);\n this.resetOptions();\n this.#lastOption = null;\n }\n\n private resetOptions(): void {\n this.fieldAccessor.options$$.set([]);\n }\n\n /**\n * @description\n * each form field potentially include a control.valueChange subscription to alert\n * consumers of its changing value, however in the auto complete context we use the\n * valueChange handler to filter the list results, and the onSelect method to alert\n * consumer of the selected value change. if we wont cancel the form control's\n * valueChange handler it will fire on select & on change.\n */\n private applyCustomChangeHandler(): void {\n this.fieldAccessor.cancelValueChangeHandler();\n }\n\n /**\n * @description\n * there are two controls in this component, the original form control - the one\n * stored inside this.fieldConfig.control - which value's binded to the form, and\n * the other one is the control where the user types his search query. we need to\n * validate both of them in order to implement the desired user experience. here\n * we copy the original field's validators and apply them to the filter query control\n */\n private mirrorControl(): void {\n const { validationHandlers } = this.validation;\n\n const queryValidators = validationHandlers;\n\n /** this validator will make sure the query typed in the filter input IS included in the options list */\n queryValidators.push(\n new AutoCompleteValidation({\n query$$: this.queryText,\n options$$: this.fieldAccessor?.options$$,\n keyProp: this.keyProp,\n valueProp: this.valueProp\n })\n );\n\n const filterValidators = [...composeValidators(queryValidators)];\n\n this.filterControl = new ExtendedFormControl({ disabled: this.disabled, value: '' }, { updateOn: 'blur' });\n\n this.filterControl.setValidators(filterValidators);\n\n this.filterControl.updateValueAndValidity();\n }\n\n /**\n * @description\n * when an option is selected - we inform consumers of this control about the change.\n * if an \"onSelect\" callback as provided by consumer we trigger it and pass the option\n * an an arg\n * @param selectedOption\n */\n private triggerSelectCallback(selectedOption: TIterableOption): void {\n /**\n * prepare the args for the \"onSelect\" callback. the args are typed as is every\n * field.update call, we need to pass prev & next values, and other local useful\n * data such as the config scheme and the entire form\n */\n const locals = {\n ...this.fieldAccessor.getFieldLocals(),\n ...{ option: selectedOption }\n };\n\n const valuePair: IFormFieldValueChange = {\n prevValue: (this.#lastOption && this.#lastOption[this.valueProp]) || undefined,\n nextValue: selectedOption[this.valueProp]\n };\n\n const { onSelect } = this.fieldAccessor;\n\n if (!isFunction(onSelect)) {\n return;\n }\n\n this.fieldAccessor.onSelect({ ...valuePair }, { ...locals });\n }\n\n private applyFilteringBehavior(): void {\n fromEvent(this.filterElement, 'input')\n .pipe(\n startWith(null),\n debounceTime(this.debounceTime),\n takeUntilDestroyed(this.#destroyRef),\n distinctUntilChanged((prevValue, nextValue) => {\n return prevValue === nextValue;\n }),\n /** pick up the previous value and pair with current value */\n pairwise(),\n map(([prevEvent, nextEvent]: [InputEvent, InputEvent]) => {\n return {\n prevValue: (prevEvent?.target as any)?.value,\n nextValue: (nextEvent?.target as any)?.value\n };\n }),\n /** apply the custom callback function */\n filter(() => {\n if (this.changeTrigger === 'valid-only') {\n return this.control.valid;\n }\n return this.changeTrigger === 'always';\n }),\n /**\n * we switch from query typing event stream to triggering getting new data\n * its important to switch map to cover cases of getting data asynchronously\n * via http\n */\n tap(({ prevValue, nextValue }: IFormFieldValueChange) => {\n this.writeQueryText(nextValue as string);\n this.isPending$$.set(true);\n }),\n switchMap(({ prevValue, nextValue }: IFormFieldValueChange) => {\n return this.notifyQueryChange({ prevValue, nextValue });\n }),\n tap(({ options }: TFieldStateArgs) => {\n this.control.updateValueAndValidity();\n this.filterControl.updateValueAndValidity();\n }),\n tap(() => this.isPending$$.set(false)),\n finalize(() => this.isPending$$.set(false))\n )\n .subscribe();\n }\n\n /**\n * @description\n * Auto selects an option on blur when blur event is NOT triggered via selecting an option.\n * in this scenario we auto select an option in the following cases:\n * (1) options.length === 1\n * (2) options.length > 1 & options contains an exact match to the current query\n * @param options an array of latest options collection\n */\n private autoSelectOnBlur(options: TIterableOption[] = []): void {\n const { length } = options;\n\n let autoSelectedOption;\n\n if (length === 1) {\n autoSelectedOption = options[0];\n } else if (length > 1) {\n autoSelectedOption = this.matchOptionForQuery(options);\n } else {\n return;\n }\n\n if (isUndefined(autoSelectedOption)) {\n return;\n }\n\n this.selectOption(autoSelectedOption);\n\n this.writeFilterValue(autoSelectedOption);\n\n this.writeQueryText(autoSelectedOption);\n\n this.#changeDetector.detectChanges();\n }\n\n /**\n * @description\n * try to find a match between the current query and the options list. if the query is an exact match\n * return it, otherwise return undefined\n * @param options latest options array\n * @param query query text value\n * @returns option which matches query\n */\n private matchOptionForQuery(options: TIterableOption[], query = this.queryText()): TIterableOption | undefined {\n if (this.hasUserSelectedOption()) {\n return undefined;\n }\n\n const exactMatchOption = options.find((option) => {\n const matchKey = option[this.keyProp] === query;\n if (this.queryScope() === 'keys-values') {\n const matchValue = option[this.valueProp] == query;\n return matchKey || matchValue;\n }\n return matchKey;\n });\n\n return exactMatchOption;\n }\n\n /**\n * @description\n * while typing (and not yet selecting) - filter control's value is a string(!).\n * once selected - it becomes the selected option(!) we use this difference to identify\n * if a user blurred the filter control without selecting an option\n */\n private hasUserSelectedOption(): boolean {\n return !isString(this.filterControl.value);\n }\n\n /**\n * @description\n * this method is called whenever the user types a query - thus triggering the need to update\n * the options. if the options source is an http call its important that this method will return\n * an observable, which we pipe to the key press event stream, allowing us to cancel on-going\n * http calls whenever a new key press event arrives before previous http call is complete.\n *\n * @param { prevValue, nextValue } - a deconstruction of a field's value change callback\n * @returns as observable of field state\n */\n private notifyQueryChange({ prevValue, nextValue }: IFormFieldValueChange): Observable> {\n const locals = {\n ...this.fieldAccessor.getFieldLocals()\n };\n\n /** request more options from consumer */\n const fieldState$ = this.fieldAccessor.fieldConfig.valueChange({ prevValue, nextValue }, { ...locals });\n\n /** the value change usually won't return a value if the options are updated locally */\n if (!isObservable(fieldState$)) {\n const { options } = this.fieldAccessor.fieldConfig.state$$();\n return of({ options });\n }\n\n this.#changeDetector.markForCheck();\n\n /** here we know we have new options which came from an http call */\n return fieldState$ as Observable>;\n }\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n standalone: true,\n selector: '[buttonToggleGap]'\n})\nexport class ButtonToggleGapDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[buttonToggleIcon]',\n standalone: true\n})\nexport class ButtonToggleIconDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n standalone: true,\n selector: '[buttonToggleItem]'\n})\nexport class ButtonToggleItemDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[buttonToggleLabel]',\n standalone: true\n})\nexport class ButtonToggleLabelDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'button-toggle-text',\n standalone: true,\n template: `\n \n `,\n styles: ``,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'button-toggle-text'\n }\n})\nexport class ButtonToggleTextComponent {}\n","import { ChangeDetectorRef, Directive, HostBinding, Input } from '@angular/core';\nimport { IButtonState } from '@partners/ui';\nimport { BehaviorSubject, Observable, Subscription } from 'rxjs';\n\n@Directive({\n standalone: true,\n selector: '[buttonState]',\n exportAs: 'btnState'\n})\nexport class ButtonStateDirective {\n @Input()\n value: string | number;\n\n @Input()\n buttonState: any;\n\n @Input()\n @HostBinding('class.selected')\n set selected(value: boolean) {\n this._selected = value;\n\n if (value === true) {\n this.dirty = true;\n this.pristine = false;\n }\n }\n get selected(): boolean {\n return this._selected;\n }\n\n @Input()\n @HostBinding('class.pristine')\n set pristine(value: boolean) {\n this._pristine = value;\n\n if (value) {\n this._touched = false;\n this._dirty = false;\n }\n this.updateState();\n }\n get pristine(): boolean {\n return this._pristine;\n }\n\n @Input()\n @HostBinding('class.dirty')\n set dirty(value: boolean) {\n this._dirty = value;\n this._dirty && (this._pristine = false);\n this.updateState();\n }\n get dirty(): boolean {\n return this._dirty;\n }\n\n @Input()\n @HostBinding('class.touched')\n set touched(value: boolean) {\n this._touched = value;\n // this._touched; /* && (this._pristine = false);*/\n this.updateState();\n }\n get touched(): boolean {\n return this._touched;\n }\n\n /** global properties */\n /** streams the current state properties of this button */\n get context$(): Observable {\n return this._state.asObservable();\n }\n\n get data(): any {\n return this.buttonState;\n }\n\n get context(): IButtonState {\n return {\n selected: this.selected,\n dirty: this.dirty,\n touched: this.touched,\n pristine: this.pristine\n } as IButtonState;\n }\n\n /** local state properties */\n private _dirty: boolean;\n private _touched: boolean;\n private _selected: boolean;\n private _pristine: boolean;\n\n /** a local state-snapshot emitter */\n private _state: BehaviorSubject;\n\n /** subs manager */\n private _subscription: Subscription;\n\n constructor(protected changeDetector: ChangeDetectorRef) {\n this._subscription = new Subscription();\n\n /** update the button state on initialization to reflect latest state values */\n this._state = new BehaviorSubject({\n touched: this.touched,\n pristine: this.pristine,\n selected: this.selected,\n dirty: this.dirty\n });\n\n this.changeDetector.markForCheck();\n }\n\n /**\n * house keeping\n */\n ngOnDestroy(): void {\n this._subscription.unsubscribe();\n this._state.complete();\n }\n\n ngOnInit(): void {\n this.updateState({\n dirty: false,\n touched: false,\n selected: false,\n pristine: true\n });\n this.changeDetector.detectChanges();\n }\n\n /**\n * @description\n * updates the state properties of the button, then emit those values to any subscribers\n *\n * state is comprised of these properties: selected, dirty, pristine, touched - all boolean.\n * if no args are passed in, the updater will only emit the current state without updating\n *\n * @param state an anonymous object with the state properties { dirty: true... etc' }\n */\n updateState(state: Partial = undefined) {\n if (state) {\n 'selected' in state && (this._selected = state.selected);\n 'touched' in state && (this._touched = state.touched);\n\n if ('dirty' in state) {\n this._dirty = state.dirty;\n this._pristine = !this._dirty;\n }\n\n if ('pristine' in state) {\n this._pristine = state.pristine;\n this._dirty = !this._pristine;\n }\n }\n this.triggerChange();\n }\n\n /**\n * @description\n * emits a stream of button's state properties (Partial)\n */\n private triggerChange() {\n /** create the new state snapshot */\n const newState = {\n ...{\n selected: this._selected,\n dirty: this._dirty,\n touched: this._touched,\n pristine: this._pristine\n }\n } as IButtonState;\n\n /** emit the new state to any consumers */\n this._state.next(newState);\n\n this.changeDetector.detectChanges();\n }\n}\n","import { ChangeDetectorRef, Component, computed, inject, input, model } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { SimpleFieldDirective } from '../directives';\n\n@Component({ template: '' })\nexport class BaseCustomControl implements ControlValueAccessor {\n fieldAccessor = input();\n // #fieldConfig = computed(() => this.fieldAccessor()?.fieldConfig);\n options$$ = computed(() => this.fieldAccessor()?.options$$());\n keyProp = computed(() => this.fieldAccessor()?.keyProp);\n valueProp = computed(() => this.fieldAccessor()?.valueProp);\n control = computed(() => this.fieldAccessor()?.control);\n name = computed(() => this.fieldAccessor()?.name);\n\n controlName = computed(() => this.fieldAccessor()?.name);\n\n disabled = model(false);\n value = model(undefined);\n\n #changeDetector = inject(ChangeDetectorRef);\n\n protected onChange: (value: T | undefined) => T;\n protected onTouched: () => T;\n\n writeValue(value: T | undefined): void {\n this.value.set(value);\n const hasValueChanged = this.value() != this.control()?.value;\n if (hasValueChanged) {\n this.control().setValue(value);\n }\n this.#changeDetector.markForCheck();\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n registerOnChange(fn: (value: T | undefined) => T): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => T): void {\n this.onTouched = fn;\n }\n}\n","import { NgStyle, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n HostBinding,\n QueryList,\n ViewChildren,\n ViewEncapsulation,\n computed,\n forwardRef,\n inject,\n input,\n output\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport {\n ButtonContentSlotDirective,\n ButtonLabelSlotDirective,\n CheckIndicatorComponent,\n IconComponent,\n RoundedButtonComponent,\n TCssUnitExpression,\n TResponsiveSize\n} from '@partners/ui';\nimport { isEmpty, isNotEmpty, takeOnce } from '@partners/utils';\n\nimport { ThemeAssetComponent } from '@partners/themes';\nimport { filter, map, tap, timer } from 'rxjs';\nimport { ButtonStateDirective } from '../buttons';\nimport { BaseCustomControl } from '../custom-control';\nimport { ButtonToggleGapDirective } from './button-toggle-gap/button-toggle-gap.directive';\nimport { ButtonToggleIconDirective } from './button-toggle-icon/button-toggle-icon.directive';\nimport { ButtonToggleItemDirective } from './button-toggle-item/button-toggle-item.directive';\nimport { ButtonToggleLabelDirective } from './button-toggle-label/button-toggle-label.directive';\n\n@Component({\n selector: 'button-toggle',\n standalone: true,\n imports: [\n NgStyle,\n ReactiveFormsModule,\n NgTemplateOutlet,\n MatButtonToggleModule,\n CheckIndicatorComponent,\n ButtonContentSlotDirective,\n ButtonLabelSlotDirective,\n ButtonToggleItemDirective,\n ButtonToggleGapDirective,\n ButtonStateDirective,\n RoundedButtonComponent,\n ThemeAssetComponent,\n IconComponent\n ],\n template: `\n \n @for (option of options$$(); track option; let first = $first, last = $last) {\n\n @if (option) {\n\n
\n \n\n \n @if (iconTemplate?.tpl) {\n \n \n \n }\n @else if(option?.['icon']){\n \n \n \n }\n @if (buttonTemplate?.tpl) {\n \n \n \n }\n @if(currentButton.selected){\n \n } \n\n \n\n \n\n @if (labelTemplate?.tpl) {\n \n \n \n }\n
\n\n @if (!last && gapTemplate?.tpl) {\n \n \n \n } }}\n \n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ButtonToggleComponent),\n multi: true\n }\n ],\n host: {\n class: 'button-toggle',\n '[class.button-toggle--wrap]': 'allowWrap()'\n }\n})\nexport class ButtonToggleComponent extends BaseCustomControl implements AfterViewInit {\n /** buttons scale size */\n isGraphicButton = input(false);\n\n /** buttons scale size */\n buttonSize = input('md');\n\n /** gap scale size */\n gap = input();\n\n allowToggling = input(false);\n allowWrap = input(false);\n\n /** limit items per row. otherwise - auto fit the children into a wrapping flex row */\n itemsPerRow = input(undefined);\n\n /** vertically align items together inside their container */\n alignItems = input<'center' | 'start' | 'stretch'>('center');\n\n /** horizontally align items together inside their container */\n justifyGroup = input<'center' | 'start' | 'space-between'>('center');\n\n /** when true text inside button should break after each word (word per row) */\n isWordBreakMode = input(false);\n\n buttonsGap = computed(() => {\n const gap = this.gap();\n let value = 1;\n switch (gap) {\n case 'lg': {\n value *= 4;\n break;\n }\n case 'md': {\n value *= 2;\n break;\n }\n case 'sm': {\n value *= 1;\n break;\n }\n case 'xs': {\n value *= 0.35;\n break;\n }\n case 'auto': {\n value *= 0;\n break;\n }\n default: {\n value *= 2;\n break;\n }\n }\n return `${value}rem`;\n });\n\n childSize = computed(() => {\n if (this.itemsPerRow()) {\n return `0 0 calc(${100 / this.itemsPerRow()}% - ${this.buttonsGap()})`;\n }\n return `0 0 auto`;\n });\n\n /**\n * outputs\n */\n change = output();\n\n /**\n * template accessors\n */\n @ContentChild(ButtonToggleLabelDirective, { static: true })\n labelTemplate: ButtonToggleLabelDirective;\n\n @ContentChild(ButtonToggleGapDirective, { static: true })\n gapTemplate: ButtonToggleGapDirective;\n\n @ContentChild(ButtonToggleIconDirective, { static: true })\n iconTemplate: ButtonToggleIconDirective;\n\n @ContentChild(ButtonToggleItemDirective, { static: true })\n buttonTemplate: ButtonToggleItemDirective;\n\n @ViewChildren(ButtonStateDirective)\n buttons: QueryList;\n\n /**\n * host bindings\n */\n @HostBinding('class.button-toggle')\n hostClass = true;\n\n /**\n * private members\n */\n #changeDetector = inject(ChangeDetectorRef);\n\n constructor() {\n super();\n }\n\n ngAfterViewInit(): void {\n // this.#initializeView();\n this.#selectDefaultValue();\n }\n\n /**\n * initializes the control's once on load. if control is loaded with a valid value -\n * simulate a button click to select the button with the matching value\n */\n #initializeView() {\n // this.onButtonClick(this.control().value as T);\n // /** on load, initiate the control as pristine, so that required validation remain hidden by default */\n // this.control().markAsPristine();\n // this.control().markAsUntouched();\n // this.control().updateValueAndValidity({ emitEvent: true, onlySelf: true });\n // this.#changeDetector.detectChanges();\n // this.#selectDefaultValue();\n }\n\n /**\n * an initialization (will only run once, on load) function responsible to selecting an option on load.\n * when this control is loaded with a value (not empty) this method will mark the button with that value\n * as selected\n */\n #selectDefaultValue() {\n /**\n * for some strange reason, the \"this.buttons\" collection remains empty (length: 0) EVEN ON AfterViewInit\n * (this behavior contradicts angular's documentation). to remedy that bug we use timer function to cause\n * a negligible amount of delay in reading the buttons collection (for now - DO NOT REMOVE timer(0))\n */\n timer(0)\n .pipe(\n takeOnce(),\n map(() => {\n // Console.logInfo(`found ${this.buttons?.length} buttons in \"${this.name()}\" toggle group`);\n return this.buttons.find((b) => b.value == this.value());\n }),\n filter((selectedButton: ButtonStateDirective) => isNotEmpty(selectedButton)),\n tap((selectedButton) => this.onButtonClick(selectedButton.value as T))\n )\n .subscribe();\n }\n\n override writeValue(value: T | undefined): void {\n super.writeValue(value);\n\n if (!this.#hasRenderedButtons()) {\n return;\n }\n\n isEmpty(value) ? this.#resetButtons() : this.#selectButtons(value);\n }\n\n onLabelClick(value: T = this.value()) {\n this.onButtonClick(value);\n }\n\n onButtonClick(value: T = this.value()) {\n this.writeValue(value);\n this.onTouched();\n this.onChange(value);\n this.#selectButtons(value);\n\n this.change.emit(value);\n\n this.#changeDetector.detectChanges();\n }\n\n #hasRenderedButtons() {\n return this.buttons?.length > 0;\n }\n\n /**\n * @description\n * control the buttons as a group, meaning, once a single button's state changes -\n * the button's siblings' state are affected two, example: if a button is selected\n * and the group is in a single selection mode, we need to unselect the previous\n * selection\n *\n * the clicked button changes its own state (selected, touched etc')\n *\n * we need to iterate its siblings and manually change their state\n *\n * @param option the value entry attached to the button (likely to be {key... value...})\n */\n #selectButtons(value: T) {\n this.buttons.forEach((button) => {\n /** for single selection mode we need to unselect every sibling of the selected button */\n const isSelectedButton = button.data[this.valueProp()] == value;\n button.updateState({\n selected: isSelectedButton,\n touched: button.touched || isSelectedButton,\n dirty: button.dirty || (!isSelectedButton && isNotEmpty(value))\n });\n });\n\n this.#changeDetector.detectChanges();\n }\n\n /**\n * reset all buttons in the collection to a non-selected + pristine state\n */\n #resetButtons() {\n this.buttons.forEach((button) => {\n button.updateState({\n selected: false,\n touched: false,\n dirty: false\n });\n });\n\n this.#changeDetector.detectChanges();\n }\n}\n","import { Directive, ElementRef, inject, input, OnInit, Renderer2 } from '@angular/core';\nimport { TFieldInputMode } from '../../model';\n\n@Directive({\n selector: '[inputMode]',\n standalone: true\n})\nexport class InputModeDirective implements OnInit {\n element = inject(ElementRef).nativeElement;\n\n inputMode = input();\n\n #renderer = inject(Renderer2);\n\n constructor() {}\n\n ngOnInit(): void {\n if (!this.inputMode()) {\n return;\n }\n\n /** render a native DOM \"inputmode\" attr on the input element to control type of\n * virtual keyboard layout ('numeric', 'tel', 'url' etc') */\n this.#renderer.setAttribute(this.element, 'inputmode', this.inputMode());\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n OnInit,\n ViewEncapsulation,\n computed,\n effect,\n input,\n signal,\n inject,\n DestroyRef\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormControlStatus, FormGroup } from '@angular/forms';\nimport { FIELD_ERROR_ANIMATION, NumericSliderComponent, SelectOnFocusDirective, TResponsiveSize } from '@partners/ui';\nimport { MaskingImportPack, coerceNumber, isNullOrUndefined, provideMasking } from '@partners/utils';\nimport { tap } from 'rxjs';\nimport { FormDefaultImportPack } from '../../import-pack';\nimport { BaseCustomControl } from '../custom-control';\n\n/**\n * a custom composite control with (1) mat-form-field numeric input and (2) numeric slider\n * the form control is binded only to mar-form-field, the slider is a helper control providing\n * another way to feed the form control its value.\n *\n * changes to the slider updates the input field and vice versa\n *\n * inherits base custom control which provides basic value accessor requirements\n *\n * fieldAccessor (member in parent) is being used to access the form field config and events\n * (see valueChange event below)\n */\n\n@Component({\n selector: 'dual-numeric-input',\n standalone: true,\n imports: [FormDefaultImportPack, NumericSliderComponent, SelectOnFocusDirective, MaskingImportPack],\n providers: [provideMasking()],\n template: `\n \n \n\n \n @defer() {\n {{ fieldAccessor().label }}\n }\n \n \n\n\n
\n\n \n\n @if(showError()){\n\n \n \n \n }\n
\n
\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [FIELD_ERROR_ANIMATION]\n})\nexport class DualNumericInputComponent extends BaseCustomControl implements OnInit {\n /** min value - overflow shows min invalid error */\n minValue = input(0);\n\n /** max value - overflow shows max invalid error */\n maxValue = input(100);\n\n /** data intervals for the slider */\n step = input(1);\n\n inputSize = input('md');\n\n /** ui requirements demands different length of input field */\n inputWidth = computed(() => `width--${this.inputSize()}`);\n\n /** we must bind the parent form group of the custom control to please angular's demands */\n formGroup = input();\n\n /** signal that changes each time the user types amount in textbox */\n inputValue = signal(0);\n showError = signal(false);\n\n masking = computed(() => this.fieldAccessor().masking);\n\n #effectRef = effect(() => {\n const fieldAccessor = this.fieldAccessor();\n if (isNullOrUndefined(fieldAccessor)) {\n return;\n }\n\n fieldAccessor.addValueChangeListener(({ nextValue }, { field }) => {\n this.inputValue.set(coerceNumber(nextValue));\n\n // /** toggle subscript display between error & slider labels, when on is shown - the other is hidden */\n // const { invalid, dirty, touched } = field.control;\n // const isErrored = invalid && (dirty || touched);\n // this.showError.set(isErrored);\n });\n\n this.#effectRef.destroy();\n });\n\n /**\n * captures the value change event of the slider. we update the binded form control via control\n * value accessor's \"writeValue\" method implemented in the extended component\n **/\n onSliderChange(value: number) {\n this.writeValue(value);\n }\n\n #destroyRef = inject(DestroyRef);\n\n ngOnInit(): void {\n /**\n * listen to changes made in the input textbox, inform the local signal of the updated value\n * which will update the slider\n */\n // this.fieldAccessor().addValueChangeListener(({ nextValue, prevValue }, { field, config, form }) => {\n // this.inputValue.set(coerceNumber(nextValue));\n // });\n\n this.inputValue.set(this.fieldAccessor().control.value as number);\n\n this.fieldAccessor().control.statusChanges.pipe(\n takeUntilDestroyed(this.#destroyRef),\n tap((status: FormControlStatus) => {\n this.showError.set(status === 'INVALID');\n })).subscribe();\n }\n}\n","import { NgIf } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatRadioButton, MatRadioModule } from '@angular/material/radio';\nimport { ExpansionPanelComponent, ExpansionPanelImportPack } from '@partners/ui';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\n@Component({\n standalone: true,\n imports: [NgIf, ExpansionPanelImportPack, MatExpansionModule, MatRadioModule],\n selector: 'panel-group-item',\n template: `\n \n \n
\n \n \n \n
\n
\n\n \n
\n \n
\n
\n
\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PanelGroupItemComponent {\n @Input()\n context: T;\n\n @Input()\n enableToggle: boolean = false;\n\n @Input()\n bubbleClick: boolean = false;\n\n @ViewChild(ExpansionPanelComponent)\n panel: ExpansionPanelComponent;\n\n @ViewChild(MatRadioButton)\n radioButton: MatRadioButton;\n\n @HostBinding('class.accordion-item--open')\n get isOpen() {\n return this.panel?.isOpen;\n }\n\n click$: Observable;\n\n private _click: BehaviorSubject;\n\n constructor(public content: ViewContainerRef) {\n this._click = new BehaviorSubject(undefined);\n this.click$ = this._click.asObservable();\n }\n\n onPanelClick(event: MouseEvent | TouchEvent) {\n // event.preventDefault();\n // event.stopPropagation();\n this.panel.open();\n this.radioButton.checked = true;\n this._click.next(this.context);\n }\n\n close() {\n this.panel.close();\n this.radioButton.checked = false;\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n EventEmitter,\n Input,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n inject\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { MatAccordion, MatExpansionModule } from '@angular/material/expansion';\nimport { Observable, merge, tap } from 'rxjs';\nimport { PanelGroupItemComponent } from './panel-group-item/panel-group-item.component';\n\n@Component({\n selector: 'panel-group',\n standalone: true,\n imports: [MatExpansionModule],\n templateUrl: './panel-group.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => PanelGroupComponent),\n multi: true\n }\n ],\n host: {\n class: 'panel-group'\n }\n})\nexport class PanelGroupComponent implements AfterViewInit {\n @Input()\n value: T;\n\n @Input()\n disabled: boolean;\n\n @Output()\n change: EventEmitter;\n\n @ContentChildren(PanelGroupItemComponent)\n panels: QueryList>;\n\n @ViewChild(MatAccordion)\n accordion: MatAccordion;\n\n @Input()\n openAll: boolean;\n\n private _onChange = (value: T) => {};\n private _onTouched = () => {};\n private _changeDetector = inject(ChangeDetectorRef);\n private _destroyRef = inject(DestroyRef);\n\n constructor() {\n this.change = new EventEmitter();\n }\n\n ngAfterViewInit(): void {\n this.addChangeListener();\n\n if (this.openAll) {\n this.accordion.openAll();\n }\n }\n\n private addChangeListener() {\n const panelClicks$ = this.panels.map((panel) => panel.click$ as Observable);\n\n /** we merge all the items' click events into a singular handler */\n merge(...panelClicks$)\n .pipe(\n takeUntilDestroyed(this._destroyRef),\n tap((value: T) => {\n this.closeSiblingPanels(value);\n this.updateValueAndState(value);\n })\n )\n .subscribe();\n\n // this.panels.forEach((panel) => panel.panel.panel.);\n }\n\n /**\n * @description\n * close all sibling panels of selected panel\n * @param value the value of the current opened panel\n */\n private closeSiblingPanels(value: T) {\n this.panels.map((p) => {\n if (p.context !== value) {\n p.close();\n }\n });\n }\n\n updateValueAndState(value: T = this.value) {\n this.writeValue(value);\n this._onTouched();\n this._onChange(value);\n this.change.emit(value);\n this._changeDetector.detectChanges();\n }\n\n writeValue(value: T): void {\n this.value = value;\n }\n registerOnChange(onChange: any): void {\n this._onChange = onChange;\n }\n registerOnTouched(onTouched: any): void {\n this._onTouched = onTouched;\n }\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n}\n","\n \n","import { AnimationBuilder, AnimationMetadata, animate, style } from '@angular/animations';\nimport { Directive, ElementRef, OnDestroy, effect, input } from '@angular/core';\n\n@Directive({\n standalone: true,\n selector: '[errorDisplay]'\n})\nexport class ErrorDisplayDirective implements OnDestroy {\n errorDisplay = input.required();\n\n private isVisibleEffect = effect(() => {\n const metadata = this.errorDisplay() ? this.enter() : this.leave();\n\n const factory = this.builder.build(metadata);\n const player = factory.create(this.el.nativeElement);\n\n player.play();\n });\n\n constructor(private builder: AnimationBuilder, private el: ElementRef) {}\n\n ngOnDestroy(): void {\n this.isVisibleEffect.destroy();\n }\n\n private enter(): AnimationMetadata[] {\n return [\n style({ transform: 'translateY(-75%)', opacity: '0' }),\n animate('.6s cubic-bezier(0.55, 0.31, 0.15, 0.93)', style({ transform: 'translateY(0%)', opacity: '1' }))\n ];\n }\n\n private leave(): AnimationMetadata[] {\n return [\n animate('0.3s cubic-bezier(0.55, 0.31, 0.15, 0.93)', style({ transform: 'translateY(50%)', opacity: '0' }))\n ];\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n computed,\n DestroyRef,\n Directive,\n effect,\n EffectRef,\n ElementRef,\n HostBinding,\n inject,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Renderer2,\n signal\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { ErrorsService } from '@partners/errors';\nimport { IInputMask, IMaskOptions, INumericInputMask, isArray, isBoolean, isEmpty, isFunction } from '@partners/utils';\nimport { isObservable, Observable, of, pairwise, Subscription } from 'rxjs';\nimport { distinctUntilChanged, filter, map, startWith, switchMap } from 'rxjs/operators';\nimport { FeatureFormComponent } from '../../components';\nimport { ExtendedFormControl } from '../../controls/control';\nimport { composeAsyncValidators, composeValidators, shouldUpdateControlState } from '../../functions';\nimport {\n IFieldValidation,\n IFormField,\n IValidatorState,\n TControlChangeTrigger,\n TFieldBeforeValueChange,\n TFieldDestroy,\n TFieldHint,\n TFieldInitialize,\n TFieldInputMode,\n TFieldLocals,\n TFieldReset,\n TFieldSelect,\n TFieldStateArgs,\n TFieldType,\n TFieldValueChange,\n TFormElement,\n TIterableOption\n} from '../../model';\nimport { preferThrottleInterval } from '../../operators';\n\n@Directive({\n standalone: true,\n selector: '[simpleField]',\n exportAs: 'field'\n})\nexport class SimpleFieldDirective implements OnInit, OnDestroy, AfterViewInit {\n @Input()\n simpleField: string;\n\n @HostBinding('class.bidi')\n bidiClass: boolean;\n\n fieldConfig: IFormField;\n\n isReady$$ = signal(false);\n\n // #region members\n name?: string;\n value?: T;\n path?: string;\n label?: string;\n minorLabel: string;\n mask?: IMaskOptions;\n masking?: IInputMask | INumericInputMask;\n hint?: TFieldHint;\n validation?: IFieldValidation;\n disabled?: boolean;\n hidden?: boolean;\n errorMatcher?: ErrorStateMatcher;\n elementType?: TFormElement;\n inputType?: TFieldType;\n inputMode?: TFieldInputMode;\n extraData?: { [key: string]: any };\n debounceInterval?: number;\n throttleInterval?: number;\n changeTrigger?: TControlChangeTrigger;\n keyProp: string;\n valueProp: string;\n maxOptions?: number;\n pattern?: string;\n isPending$$ = signal(false);\n options$$? = signal([]);\n\n onReset: TFieldReset;\n onInit: TFieldInitialize;\n onSelect: TFieldSelect;\n onDestroy: TFieldDestroy;\n valueChange: TFieldValueChange;\n beforeChange: TFieldBeforeValueChange;\n\n // #endregion\n\n get control(): ExtendedFormControl {\n return this.fieldConfig?.control;\n }\n get nativeElement(): HTMLElement {\n return this._elementRef.nativeElement;\n }\n\n /**\n * TODO: a temporary solution:\n * Form controls without mat-form-field (checkbox | custom controls etc'), do not display errors synchronously\n * (i.e. required on submit), so we use this to reflect their current valid state to the view\n */\n get hasErrors$(): Observable {\n if (!this.control) {\n return of(false);\n }\n if (this.errorMatcher) {\n return of(this.errorMatcher?.isErrorState(this.control, this._featureForm.formHandler));\n }\n return of(this.control.touched && this.control.invalid);\n }\n\n submitted$$ = computed(() => this._featureForm.submitted$$());\n\n private _valueChangeSubscription: Subscription;\n\n private _subscription: Subscription;\n private _stateEffectRef: EffectRef;\n private _focusEventRef: () => void;\n private _blurEventRef: () => void;\n\n private _localInjector = inject(Injector);\n private _errorsService = inject(ErrorsService);\n private _featureForm = inject(FeatureFormComponent);\n private _elementRef = inject(ElementRef);\n private _renderer = inject(Renderer2);\n private _destroyRef = inject(DestroyRef);\n private _changeDetector = inject(ChangeDetectorRef);\n\n constructor() {\n this._subscription = new Subscription();\n }\n\n ngAfterViewInit(): void {\n // this.applySelectOnFocus();\n // this.applyBlurOnFocusOut();\n }\n\n ngOnInit(): void {\n /** extract all props values from the field's config object and apply them to the field's ui */\n this.initializeField(this.simpleField);\n this.isReady$$.set(true);\n }\n\n ngOnDestroy(): void {\n this._focusEventRef && this._focusEventRef();\n this._stateEffectRef && this._stateEffectRef.destroy();\n this._subscription && this._subscription.unsubscribe();\n }\n\n getFieldLocals(): TFieldLocals {\n return { ...this._featureForm.locals, field: this.fieldConfig };\n }\n\n /**\n * @description\n * in rare cases we would need to declare value change to detect changes in the model, but we would\n * have a private change handler, so we don't want to subscribe to the default one\n */\n cancelValueChangeHandler() {\n this._valueChangeSubscription && this._valueChangeSubscription.unsubscribe();\n }\n\n parseOptionValue({ source, option }: MatAutocompleteSelectedEvent) {\n const iterableOption = option.value;\n this.control.setValue(iterableOption[this.valueProp]);\n }\n\n protected initializeField(fieldName: string) {\n /** locate the field's config class in the parent form's fields collection */\n this.fieldConfig = this._featureForm.findFieldConfig(fieldName);\n\n if (!this.fieldConfig) {\n this._errorsService.throwLocalError({ message: `Failed to initialize \"${fieldName}\" field handler` });\n }\n\n /** add an effect to capture and respond to field's state updates */\n this.addStateListener();\n\n /** extract and apply the values of the state to the fields properties & ui elements */\n this.applyFieldConfig(this.fieldConfig);\n }\n\n /**\n * @description\n * attach a handler to a \"focus\" event on an input element, to allow selection (of its content)\n * on focus as a default behavior\n */\n private applySelectOnFocus(): void {\n if (!isFunction(this.nativeElement.querySelector)) {\n return;\n }\n const input = this.nativeElement.querySelector('input');\n if (!input) {\n return;\n }\n /** apply select-on-focus behavior for the form control's input element */\n this._focusEventRef = this._renderer.listen(input, 'focus', () => {\n input.select();\n });\n }\n\n /**\n * @description\n * attach a handler to a \"focusout\" event on an input element.\n * this comes to answer a refocus happening twice when clicking outside app, triggering\n * mask on the focused-out empty input and focusing on another input\n * Currently not used and marked at ngAfterViewInit as this is unlikely to happen to a user\n */\n private applyBlurOnFocusOut(): void {\n if (!isFunction(this.nativeElement.querySelector)) {\n return;\n }\n const input = this.nativeElement.querySelector('input');\n if (!input) {\n return;\n }\n /** apply focus out behavior for the form control's input element */\n this._blurEventRef = this._renderer.listen(input, 'focusout', () => {\n input.blur();\n });\n }\n\n /**\n * @description\n * Track changes made by the state emitter (signal). This effect will trigger every time one of the state args\n * of the field changes: (1) The options[] list of a dropdown (2) The disable state (3) The control's value.. etc'\n * (see TFieldStateArgs for all)\n */\n private addStateListener() {\n this._stateEffectRef = effect(\n () => {\n const isReady = this.isReady$$();\n if (!isReady) {\n return;\n }\n /** get a state object from the field with a snapshot of the \"fieldConfig\" latest values **/\n const state = this.fieldConfig.state$$();\n if (!state) {\n return;\n }\n\n /** extract latest state values */\n const { disabled, options, value, label, hidden, validation, extraData, isPending, pristine } = state;\n\n /** apply state changes to the view */\n shouldUpdateControlState('extraData', state) && this.updateExtraDataState(extraData);\n shouldUpdateControlState('label', state) && this.updateLabelState(label);\n shouldUpdateControlState('options', state) && this.updateOptionsState(options);\n shouldUpdateControlState('disabled', state) && this.updateDisabledState(disabled);\n shouldUpdateControlState('validation', state) && this.updateValidationState(validation);\n shouldUpdateControlState('hidden', state) && this.updateHiddenState(hidden);\n shouldUpdateControlState('value', state) && this.updateValue(value);\n shouldUpdateControlState('isPending', state) && this.updatePending(isPending);\n shouldUpdateControlState('pristine', state) && this.updatePristineState(pristine);\n\n this._changeDetector.markForCheck();\n },\n /** provide injector to satisfy requirement for consuming signal's effect outside injection context */\n { injector: this._localInjector, allowSignalWrites: true }\n );\n }\n updatePristineState(pristine: boolean) {\n if (pristine) {\n this.control.markAsPristine();\n this.control.markAsUntouched();\n this.control.updateValueAndValidity();\n }\n }\n\n updatePending(value: boolean) {\n this.isPending$$.set(value);\n // this._changeDetector.markForCheck();\n }\n\n private updateExtraDataState(extraData: { [key: string]: any }) {\n if (isEmpty(extraData)) {\n return;\n }\n\n this.fieldConfig.extraData = extraData;\n }\n\n private updateValidationState(validationStates: IValidatorState[] | boolean | IFieldValidation) {\n if (isEmpty(validationStates)) {\n return;\n }\n\n const { validationHandlers } = this.validation;\n\n /** cherry pick and edit specific validators' state (disabled | enabled) */\n if (isArray(validationStates)) {\n this.control.setValidators(composeValidators(validationHandlers, validationStates));\n this.control.setAsyncValidators(composeAsyncValidators(validationHandlers, validationStates));\n } else if (validationStates === false) {\n /** remove all validators */\n this.control.clearValidators();\n this.control.clearAsyncValidators();\n } else if (validationStates === true) {\n /** restore all validators */\n this.control.setValidators(composeValidators(validationHandlers));\n this.control.setAsyncValidators(composeAsyncValidators(validationHandlers));\n } else if (validationStates?.validationHandlers?.length) {\n this.validation.validationHandlers = validationStates?.validationHandlers;\n this.control.setValidators(composeValidators(validationStates?.validationHandlers));\n this.control.setAsyncValidators(composeAsyncValidators(validationStates?.validationHandlers));\n }\n this.control.updateValueAndValidity({ emitEvent: true, onlySelf: false });\n }\n\n private updateLabelState(value: string) {\n if (isEmpty(value)) {\n return;\n }\n this.label = value;\n }\n\n private updateValue(value: T) {\n this.control.setValue(value as T);\n }\n\n private updateOptionsState(options: TIterableOption[]): void {\n if (!isArray(options)) {\n return;\n }\n this.options$$.set(options);\n }\n\n private updateDisabledState(isDisabled: boolean): void {\n if (!isBoolean(isDisabled)) {\n return;\n }\n if (isDisabled) {\n this.control.disable();\n } else {\n this.control.enable();\n }\n }\n\n private updateHiddenState(isHidden: boolean): void {\n if (!isBoolean(isHidden)) {\n return;\n }\n this.hidden = isHidden;\n }\n\n private applyFieldConfig(fieldConfig: IFormField): void {\n const {\n name,\n path,\n value,\n label,\n minorLabel,\n mask,\n masking,\n hint,\n inputType,\n inputMode,\n validation,\n bidi,\n errorMatcher,\n debounceInterval,\n throttleInterval,\n keyProp,\n valueProp,\n disabled,\n changeTrigger,\n maxOptions,\n isPending,\n pattern,\n onInit,\n onReset,\n onSelect,\n onDestroy,\n valueChange,\n beforeChange\n } = fieldConfig;\n\n this.name = name;\n this.path = path;\n this.value = value;\n this.label = label;\n this.minorLabel = minorLabel;\n this.mask = mask;\n this.masking = masking;\n this.hint = hint;\n this.inputType = inputType;\n this.inputMode = inputMode;\n this.validation = validation;\n this.debounceInterval = debounceInterval;\n this.throttleInterval = throttleInterval;\n this.errorMatcher = errorMatcher;\n this.bidiClass = bidi;\n this.keyProp = keyProp;\n this.valueProp = valueProp;\n this.disabled = disabled;\n this.changeTrigger = changeTrigger;\n this.maxOptions = maxOptions;\n this.pattern = pattern;\n\n this.onInit = onInit;\n this.onReset = onReset;\n this.onSelect = onSelect;\n this.onDestroy = onDestroy;\n this.beforeChange = beforeChange;\n\n this.isPending$$.set(isPending);\n\n if (this.onInit) {\n /** bind & trigger an init event callback - this happens only once per field on ng's OnInit hook */\n this.addInitListener(onInit);\n }\n\n if (valueChange) {\n /** bind a change event to the form control's valueChanges stream */\n this.addValueChangeListener(valueChange);\n }\n }\n\n private addInitListener(initCallback: TFieldInitialize) {\n const callback = initCallback.bind(this.fieldConfig);\n callback(this.getFieldLocals());\n }\n\n /**\n * @description\n * Subscribe to the value changes of the form control, on each tick of the control's value stream -\n * trigger a callback function which was passed in to handle the change by consumer.\n *\n * @param changesCallback a callback function to call when the form control's value changes\n */\n addValueChangeListener(changesCallback: TFieldValueChange) {\n /**\n * allow this field class to be referenced in the callback scope as \"this\" NOTE: this behavior is NOT\n * applicable in arrow function syntax (in arrow function \"this\" always refer to the context of the\n * class where the callback is declared)\n * */\n const changeCallback = changesCallback.bind(this.fieldConfig);\n\n /**\n * we can also attach a \"before change callback\" function which will execute just before the\n * main valueChange callback. this can be useful if we want to manipulate the values been emitted\n * from the main change event before it triggers, for example we can use it to convert visualized\n * values such as stringified number (1,000) to model numeric values (1000)\n * */\n let beforeChangeCallback: Function;\n if (isFunction(this.beforeChange)) {\n beforeChangeCallback = this.beforeChange.bind(this.fieldConfig);\n }\n\n this._valueChangeSubscription = this.control.valueChanges\n .pipe(\n takeUntilDestroyed(this._destroyRef),\n distinctUntilChanged((prevValue, nextValue) => {\n return prevValue === nextValue;\n }),\n /**\n * seeds the pairwise with initial default value, in order to make it trigger on first value change\n * (and not after 2 changes as pairwise default behavior)\n **/\n startWith(undefined),\n /** pick up the previous value and pair with current value */\n pairwise(),\n /** avoid latency in case changes requires costly computing time or to numerous */\n preferThrottleInterval(this.throttleInterval, this.debounceInterval),\n map(([prevValue, nextValue]) => ({ prevValue, nextValue })),\n /** apply the custom callback function */\n filter(() => {\n if (this.changeTrigger === 'valid-only') {\n return this.control.valid;\n }\n return this.changeTrigger === 'always';\n }),\n switchMap((valuePair) => {\n // if (beforeChangeCallback) {\n // valuePair = beforeChangeCallback(valuePair);\n // }\n\n // console.log(`\"${this.name}\" value change callback(${valuePair.nextValue})`);\n const result = changeCallback({ ...valuePair }, this.getFieldLocals());\n\n if (isObservable(result)) {\n return result as Observable>;\n }\n\n return of(result);\n })\n )\n .subscribe();\n }\n}\n","import { debounceTime, Observable, throttleTime } from 'rxjs';\n\n/**\n *@description\n * decides witch delaying method should be used according to parameters supplied\n * by simpleField directive consumer.\n * if throttleInterval parameter has value, we will invoke throttleTime operator\n * else we will call debounceTime with debounceInterval value or zero.\n * @returns OperatorFunction<[T, T], [any, any]>\n */\n\nexport function preferThrottleInterval(throttleInterval: number, debounceInterval: number = 0) {\n return (source$: Observable) =>\n source$.pipe(\n !!throttleInterval ? throttleTime(throttleInterval, null, { leading: false, trailing: true }) : debounceTime(debounceInterval)\n );\n}\n","import { IFormConfig, IFormField } from '../model';\nimport { TFormConfig } from '../model/form.types';\n\n/**\n * @description\n * a form generator helper class, which holds an instance of a flat map of all the form's\n * config nodes (\"fields\"). each field is a wrapper node of an angular form control and its\n * configuration, config data helps us perform manipulation on the control itself its value\n * & events\n *\n * in order to use this helper class we simply create a new instance on the class and call\n * its functions while chaining those calls, for example:\n * new FormConfig()\n * .addField({...field args})\n * .addField({...field args})\n * .addGroup({...group args})\n * .addField({...field args})\n * etc...\n */\n\nexport class FormConfig implements IFormConfig {\n get name(): string {\n return this.formName;\n }\n\n /** return all the local map object's keys */\n get tokens(): string[] {\n return Array.from(this._config.keys());\n }\n\n /** local instance of flat map field */\n private _config: TFormConfig = null;\n\n constructor(private formName?: string) {\n this._config = new Map | IFormField>();\n return this;\n }\n\n /**\n * @description\n * add a form ** control ** to the config scheme\n * @param field a form field config node (see IFormField)\n * @returns self reference to allow function chaining\n */\n addField(field: IFormField, index?: undefined): FormConfig {\n this.add({ ...field, elementType: 'control' });\n return this;\n }\n\n /**\n * @description\n * add a form ** group ** to the config scheme\n * @param field a form field config node (see IFormField)\n * @returns self reference to allow function chaining\n */\n addGroup(field: IFormField): FormConfig {\n this.add({ ...field, elementType: 'group' });\n return this;\n }\n\n /**\n * @description\n * add a form ** group ** to the config scheme\n * @param field a form field config node (see IFormField)\n * @returns self reference to allow function chaining\n */\n addArray(field: IFormField): FormConfig {\n this.add({ ...field, elementType: 'array' });\n return this;\n }\n\n addArrayGroup(fields: IFormField[]): FormConfig {\n fields.forEach((f) => {\n this.addField(f);\n });\n\n return this;\n }\n\n endGroup() {\n /** this code might need to be change and return the current group's parent */\n return this;\n }\n\n map() {\n return this._config;\n }\n\n /**\n * finds a single instance of a form field config node stored in the flat map\n * @param key the name of the target entry to find in the flat map\n * @returns a form field config node\n */\n find(key: string): IFormField {\n return this._config.get(key);\n }\n\n /**\n * @description\n * finds multiple instances of a form field config node in the flat map that matches\n * the query expression. this can be useful when we want to find a group's nested elements.\n * for example:\n * below - \"A\" & \"B\" are form controls, \"C\" is a form group with two controls:\n * \"C1\" & \"C2\", the flat map will look like this:\n * \"A\", FormControl\n * \"B\", FormControl\n * \"C\", \"FormGroup\"\n * \"C.C1\" \"FormControl\"\n * \"C.C2\" \"FormControl\"\n * @param query a string value to match against all keys, to filter all children\n * of \"C\" group we use query: \"C.\"\n * @returns\n */\n filter(query: string): string[] {\n return this.tokens.filter((token) => token.startsWith(`${query}.`));\n }\n\n private add(field: IFormField): IFormConfig {\n this._config.set(field.path, field);\n return this;\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { AbstractControl, FormArray, FormBuilder, FormGroup } from '@angular/forms';\nimport { ErrorsService } from '@partners/errors';\nimport { takeOnce } from '@partners/utils';\nimport { map, Observable, tap } from 'rxjs';\nimport { IFormConfig, IFormFactory, IFormField, IFormResetOptions } from '../model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport abstract class FeatureForm {\n private _errorsService = inject(ErrorsService);\n\n protected formBuilder: FormBuilder;\n\n abstract createForm(model: unknown): Observable;\n\n constructor() {\n this.formBuilder = inject(FormBuilder);\n }\n\n /**\n * @description\n * build an ng reactive form using a custom config scheme as blueprint. the config scheme (TFormConfig)\n * contains the flattened representations of the final nested ng form. the key of the map is a string\n * annotation representing a nested form control's path, while the value of the map is the config node\n * of that control (or group or array);\n *\n * @param formConfig a config class instance, containing flattened map of fields & groups config nodes\n * @param formGroup an empty (new) or existing form group ref to which we add the nested controls\n * @returns a fully formed angular form\n */\n generate(formConfig: IFormConfig, formGroup: FormGroup<{}> = new FormGroup({})): FormGroup<{}> {\n try {\n /** get a string array of all the keys in the flattened config map */\n const { tokens } = formConfig;\n /** recursively build the nested ng reactive form */\n this.iterate(formGroup, tokens, formConfig);\n } catch (e) {\n this._errorsService.throwLocalError({ message: `Failed to generate form \"${formConfig.name}\" from config` });\n }\n return formGroup;\n }\n\n isFormValid(formFactory$: Observable): Observable {\n return formFactory$.pipe(\n takeOnce(),\n tap(({ form }) => {\n form.markAllAsTouched();\n }),\n map(({ form }) => form.valid)\n );\n }\n\n resetForm(form: FormGroup, options?: IFormResetOptions): void {\n form.reset();\n form.markAsPristine();\n form.markAsUntouched();\n form.updateValueAndValidity(); \n }\n\n resetFactory(factory$: Observable): void {\n factory$.pipe(\n takeOnce(),\n tap(({ form, config }) => {\n this.resetForm(form);\n }))\n .subscribe();\n }\n \n /**\n * @description\n * recursively generate an ng reactive form\n * @param form the root|current form element (the parent of the next control)\n * @param tokens a string array of ALL the form controls' names (dot annotated forma [\"firstName\", \"address.residence\")\n * @param config a config map containing metadata for each form control\n */\n private iterate(form: AbstractControl, tokens: string[], config: IFormConfig) {\n while (tokens.length) {\n const token = tokens.shift();\n /** abstract ctrl might be: group | array | control */\n const abstractCtrl = form.get(token);\n\n if (abstractCtrl) {\n /** exit point for the prev recursion iteration */\n continue;\n }\n\n /** add a form control */\n const field = config.find(token);\n const descendants = config.filter(token);\n let nextCtrl = this.addFormCtrl(field, form, config);\n\n if (nextCtrl instanceof FormArray) {\n this.prepareArrayGroups(field.path, nextCtrl, config);\n // nextCtrl = (form as FormArray).at(field.index);\n }\n\n if (descendants?.length) {\n this.iterate(nextCtrl, descendants, config);\n }\n }\n }\n\n private prepareArrayGroups(formName: string, formArray: FormArray, formConfig: IFormConfig) {\n const { tokens } = formConfig;\n const flatEntries = tokens.filter((k) => k.startsWith(`${formName}`));\n /**\n * take all array's entry keys except the first entry key, since its the array's name\n * and we need its children. we transform this {\n * \"a\",\n * \"a.0.fieldA\",\n * \"a.0.fieldB\",\n * \"a.1.fieldA\",\n * \"a.1.fieldB\"\n * }\n *\n * into this: {\n * \"a.0.fieldA\",\n * \"a.0.fieldB\",\n * \"a.1.fieldA\",\n * \"a.1.fieldB\"\n * }\n *\n * */\n const [, ...groupEntries] = flatEntries;\n\n /**\n * aggregate the array entries into unique index array. meaning we transform this: {\n * \"a.0.fieldA\",\n * \"a.0.fieldB\",\n * \"a.1.fieldA\",\n * \"a.1.fieldB\"\n * }\n *\n * into this: [0, 1]\n * */\n const arrayGroupsIndex = new Set([...groupEntries].map((entryKey) => entryKey.split('.')[1]));\n\n for (let i = 0; i < arrayGroupsIndex.size; i++) {\n /** create an empty form group for each array entry */\n formArray.push(this.formBuilder.group({}));\n }\n }\n\n private addFormCtrl(field: IFormField, form: AbstractControl<{}>, config?: IFormConfig): AbstractControl<{}> {\n const formRef = form as FormGroup;\n switch (field.elementType) {\n case 'group': {\n const group = this.formBuilder.group({});\n formRef.addControl(field.path, group);\n return group;\n }\n case 'array': {\n const array = this.formBuilder.array([]);\n formRef.addControl(field.path, array);\n return array;\n }\n default: {\n const isArray = form instanceof FormArray;\n /**\n * if the parent of the next control is an array - we cant add a control directly at it,\n * we need to get the control's group and add the control to it, we get the correct group\n * using the field's index value\n */\n if (isArray) {\n const arrayGroup = form.at(field.index) as FormGroup;\n arrayGroup.addControl(field.name, field.control);\n } else {\n formRef.addControl(field.name, field.control);\n }\n return field.control;\n }\n }\n }\n}\n","import { computed, inject, Injectable, Signal } from '@angular/core';\nimport {\n ICalGtmBaseEvent,\n IGtmAdapter,\n TCalGtmAuditRequestEvent,\n TCalGtmCheckboxClickEvent,\n TCalGtmFormSentEvent,\n TCalGtmFunnelClickEvent,\n TCalGtmFunnelEndEvent,\n TCalGtmFunnelStepEvent,\n TCalGtmQuestionFilledEvent,\n TCalGtmQuestionValidationEvent\n} from '@cal-analytics/gtm';\nimport { IPartner } from '@partners/api';\nimport { AmountStore, ContactStore, IdentityStore, PurposeStore, ShellStore, SimulatorStore } from '@partners/state';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GtmAdapterService implements IGtmAdapter {\n readonly partner$$: Signal;\n readonly isLoanProcess$$: Signal;\n readonly isCardProcess$$: Signal;\n\n protected readonly _simulatorStore = inject(SimulatorStore);\n protected readonly _purposeStore = inject(PurposeStore);\n protected readonly _shellStore = inject(ShellStore);\n protected readonly _amountStore = inject(AmountStore);\n protected readonly _identityStore = inject(IdentityStore);\n protected readonly _contactStore = inject(ContactStore);\n\n funnelClickGetter: Signal>;\n questionFilledGetter: Signal>;\n checkboxClickGetter: Signal>;\n questionValidationGetter: Signal>;\n calculateProposalGetter?: Signal>;\n formSentGetter: Signal>;\n\n private readonly processType$$: Signal<{ process_type: string }>;\n private readonly partnerName$$: Signal<{ partner_name: string }>;\n private readonly clientType$$: Signal<{ client_type: string }>;\n private readonly clientSubType$$: Signal<{ client_sub_type: string }>;\n protected readonly cardName$$: Signal<{ card_name: string }>;\n\n constructor() {\n this.isLoanProcess$$ = this._shellStore.matchLoan$$;\n this.isCardProcess$$ = this._shellStore.matchCard$$;\n\n this.partner$$ = computed(() => this._shellStore.profile$$()?.partner);\n\n this.processType$$ = computed(() => {\n if (this.isCardProcess$$()) {\n return {\n process_type: 'sigma card order'\n };\n }\n\n if (this.isLoanProcess$$()) {\n return {\n process_type: 'sigma loan'\n };\n }\n\n return { process_type: 'NA' };\n });\n\n this.partnerName$$ = computed(() => ({ partner_name: this.partner$$().name }));\n\n this.clientSubType$$ = computed(() => {\n const data = this.getCustomerTypeData();\n\n if (data?.customerType == 2) {\n return { client_sub_type: 'בנקאי' };\n } else if (data?.customerType == 3) {\n return { client_sub_type: 'דואלי' };\n } else if (data?.customerType == 4) {\n return { client_sub_type: 'מנפיק' };\n }\n\n return { client_sub_type: 'NA' };\n });\n\n this.clientType$$ = computed(() => {\n const data = this.getCustomerTypeData();\n\n if (this.isNewOrUnknownCustomerType(data?.customerType)) {\n return { client_type: 'new' };\n } else if (this.isExistCustomerType(data?.customerType)) {\n if (data?.isVerifiedCustomer) {\n return { client_type: 'existing identified' };\n } else {\n return { client_type: 'existing unidentified' };\n }\n }\n\n return { client_type: 'NA' };\n });\n\n this.cardName$$ = computed(() => {\n if (this.isCardProcess$$()) {\n return { card_name: this._shellStore.profile$$()?.partner.name };\n } else {\n return { card_name: 'NA' };\n }\n });\n }\n\n funnelStepGetter: Signal>;\n funnelEndGetter: Signal>;\n auditRequestGetter?: Signal>;\n\n baseEventGetter: Signal> = computed(() => ({\n ...this.processType$$(),\n ...this.partnerName$$(),\n ...this.clientType$$(),\n ...this.clientSubType$$(),\n ...(this.isCardProcess$$() ? { card_name: this.cardName$$().card_name } : {})\n }));\n\n isNewOrUnknownCustomerType(customerType?: number): boolean {\n return customerType == 0 || customerType == 1;\n }\n\n isExistCustomerType(customerType?: number): boolean {\n return customerType == 2 || customerType == 3 || customerType == 4;\n }\n\n getCustomerTypeData(): { customerType?: number; isVerifiedCustomer: boolean } {\n const identityData = this._identityStore.data$$();\n const contactData = this._contactStore.data$$();\n\n if (identityData?.customerType != null) {\n return {\n customerType: identityData.customerType,\n isVerifiedCustomer: identityData.isVerifiedCustomer\n };\n } else if (contactData?.customerType != null) {\n return {\n customerType: contactData.customerType,\n isVerifiedCustomer: contactData.isVerifiedCustomer\n };\n } else {\n return {\n customerType: null,\n isVerifiedCustomer: false\n };\n }\n }\n}\n","import { Injectable, Signal, computed, inject } from '@angular/core';\nimport { CalGtmService, ICalGtmBaseEvent, ICalGtmEventDictionary, TCalGtmAuditRequestEvent } from '@cal-analytics/gtm';\nimport { GtmAdapterService } from './gtm-adapter.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GtmPartnersService extends CalGtmService {\n override auditRequest: Signal>>;\n override baseEvent = computed(() => ({}));\n override funnelClick = computed(() => ({}));\n override funnelStep = computed(() => ({}));\n override questionFilled = computed(() => ({}));\n override questionValidation = computed(() => ({}));\n override checkboxClick = computed(() => ({}));\n override funnelEnd = computed(() => ({}));\n override formSent = computed(() => ({}));\n\n override getBaseEvent(): ICalGtmBaseEvent {\n throw new Error('Method not implemented.');\n }\n\n private gtmAdapter = inject(GtmAdapterService);\n\n baseEvent$$ = computed(() => {\n return this.gtmAdapter.baseEventGetter();\n });\n\n baseFunnelStep$$ = computed(() => {\n return this.gtmAdapter.funnelStepGetter();\n });\n\n baseFunnelEnd$$ = computed(() => {\n return this.gtmAdapter.funnelEndGetter();\n });\n\n isNewOrUnknownCustomerType(customerType?: number): boolean {\n return this.gtmAdapter.isNewOrUnknownCustomerType(customerType);\n }\n\n isExistCustomerType(customerType?: number): boolean {\n return this.gtmAdapter.isExistCustomerType(customerType);\n }\n isVerifiedCustomer() {\n return this.gtmAdapter.getCustomerTypeData().isVerifiedCustomer;\n }\n}\n","import { HttpClientModule } from '@angular/common/http';\nimport { ModuleWithProviders, NgModule, Provider } from '@angular/core';\n\n@NgModule({\n imports: [HttpClientModule]\n})\nexport class HttpModule {\n static forRoot(httpConfigProvider: Provider): ModuleWithProviders {\n return {\n ngModule: HttpModule,\n providers: [httpConfigProvider]\n };\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { HttpConfig } from '../model/http.model';\n\nexport const HTTP_CONFIG = new InjectionToken('HTTP_CONFIG');\n","import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { IHttpResponse } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { IHttpAction, IHttpOptions } from '../model';\nimport { HTTP_CONFIG } from '../tokens/http.tokens';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class HttpService {\n private _http = inject(HttpClient);\n private _config = inject(HTTP_CONFIG);\n\n constructor() {}\n\n private buildApiUrl({ endpoint, options }: IHttpAction): URL {\n return this._config.buildRequestEndpoint({ endpoint, options });\n }\n\n /**\n * a socialized variation of http \"get\" method. it only loads textual resources over\n * using http calls, meaning the response is free text (i.e - not of type IHttpResponse)\n * it also accepts partial url, generally we want to use it for dynamically loading any\n * string resource (such as svg content or dynamic texts from config file)\n * @param endpoint a partial url of the (local) resource\n * @param options headers, context etc'\n * @returns an observable of text (string) type\n */\n // fetchText(endpoint: string, options?: IHttpOptions): Observable {\n // options = this.getOptions(options);\n // const url = options?.useRelativeUrl ? endpoint : this.buildApiUrl({ endpoint, options }).href;\n // return this._http.get(url, { responseType: 'text' }) as Observable;\n // }\n\n fetch(endpoint: string, options?: IHttpOptions): Observable> {\n options = this.getOptions(options);\n const { href } = this.buildApiUrl({ endpoint, options });\n return this._http.get(href, options) as Observable>;\n }\n\n post(endpoint: string, model?: T, options?: IHttpOptions): Observable> {\n options = this.getOptions(options);\n const { href } = this.buildApiUrl({ endpoint, options });\n return this._http.post(href, model, options) as Observable>;\n }\n\n put(endpoint: string, model?: T, options?: IHttpOptions): Observable> {\n options = this.getOptions(options);\n const { href } = this.buildApiUrl({ endpoint, options });\n return this._http.put(href, model, options) as Observable>;\n }\n\n delete(endpoint: string, options?: IHttpOptions): Observable> {\n options = this.getOptions(options);\n const { href } = this.buildApiUrl({ endpoint, options });\n return this._http.delete(href, options) as Observable>;\n }\n\n /**\n * @description if headers param has value, we will override the current header property or add a new one. return the updated headers collection.\n * @param headers\n * @returns new HttpHeaders\n */\n private getHeaders(headers?: HttpHeaders): HttpHeaders {\n let httpHeaders: HttpHeaders = this._config.httpHeaders;\n const hasHeaders = headers?.keys()?.length;\n // TODO: replace this with something like => httpHeaders.set(headers)\n if (hasHeaders > 0) {\n headers.keys().forEach((key) => {\n httpHeaders = httpHeaders.append(key, headers.get(key));\n });\n }\n\n return httpHeaders;\n }\n\n private getParams(params: any) {\n return new HttpParams({ fromObject: params });\n }\n\n /**\n * @description get optional parameters such as params, headers and context and return HTTP options\n * @param options\n * @returns http options or {}\n */\n private getOptions(options: IHttpOptions = {}) {\n return {\n ...options,\n ...{\n params: this.getParams(options?.params),\n headers: this.getHeaders(options?.headers),\n context: options?.context\n }\n };\n }\n}\n","import { HttpHeaders } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { IHttpAction, IHttpConfig } from './http.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport abstract class HttpConfig implements IHttpConfig {\n abstract apiUrl: string;\n abstract useProxy: boolean;\n abstract httpHeaders: HttpHeaders;\n\n abstract buildRootEndpoint(): string;\n abstract buildRequestEndpoint(httpAction: IHttpAction): URL;\n\n constructor() {}\n}\n","import { IHttpResponse, IHttpStatus } from '@partners/api';\nimport { Observable, throwError } from 'rxjs';\nimport { catchError, map, tap } from 'rxjs/operators';\n\ntype TResultCallback = (data: T) => R;\ntype TStatusCallback = (status: IHttpStatus) => void;\n\nexport const tapResult = (callback: TResultCallback) => {\n return (response$: Observable>): Observable> => {\n return response$.pipe(\n tap((response: IHttpResponse) => {\n const result: T = response.result as T;\n callback.call(null, result as T);\n })\n );\n };\n};\n\nexport const filterResult = () => {\n return (response$: Observable>): Observable => {\n return response$.pipe(\n catchError((error: any) => {\n return throwError(() => error);\n }),\n map((response: IHttpResponse) => {\n return response.result as R;\n })\n );\n };\n};\n\nexport function filterStatus() {\n return (response$: Observable>): Observable => {\n return response$.pipe(\n catchError((error: any) => {\n return throwError(() => error);\n }),\n map((data: IHttpResponse) => {\n return data.status;\n })\n );\n };\n}\n\nexport const tapStatus = (callback: TStatusCallback) => {\n return (response$: Observable>): Observable> => {\n return response$.pipe(\n tap((response: IHttpResponse) => {\n callback.call(null, response.status as IHttpStatus);\n }),\n map((response: IHttpResponse) => response)\n );\n };\n};\n","import { inject } from '@angular/core';\nimport { IHttpOptions } from '@partners/http';\nimport { isEmptyObject } from '@partners/utils';\nimport { CatalogService } from '../services/catalog.service';\n\nexport const financeCatalogGuard = async (options: IHttpOptions = {}): Promise => {\n const catalogService = inject(CatalogService);\n const financeCatalog = await catalogService.loadFinance(options);\n return !isEmptyObject(financeCatalog);\n};\n","import { financeCatalogGuard } from '@partners/catalog';\nimport { ContextBuilder } from '../http';\n\nexport const provideFinanceCatalogGuard = (): (() => Promise) => {\n return async () => {\n const context = new ContextBuilder().addUrlModifiers({ omitProcess: true }).build();\n return await financeCatalogGuard({ context });\n };\n};\n","import { inject } from '@angular/core';\nimport { IHttpOptions } from '@partners/http';\nimport { isEmptyObject } from '@partners/utils';\nimport { CatalogService } from '../services/catalog.service';\n\nexport const metadataCatalogGuard = async (options: IHttpOptions = {}): Promise => {\n const catalogService = inject(CatalogService);\n const metadataCatalog = await catalogService.loadMetadata(options);\n return !isEmptyObject(metadataCatalog);\n};\n","import { metadataCatalogGuard } from '@partners/catalog';\nimport { ContextBuilder } from '../http';\n\nexport const provideMetadataCatalogGuard = (): (() => Promise) => {\n return async () => {\n const context = new ContextBuilder().addUrlModifiers({ omitProcess: true }).build();\n return await metadataCatalogGuard({ context });\n };\n};\n","import { inject } from '@angular/core';\nimport { IHttpOptions } from '@partners/http';\nimport { isEmptyObject } from '@partners/utils';\nimport { CatalogService } from '../services/catalog.service';\n\nexport const residenceCatalogGuard = async (options: IHttpOptions = {}): Promise => {\n const catalogService = inject(CatalogService);\n const residenceCatalog = await catalogService.loadResidence(options);\n return !isEmptyObject(residenceCatalog);\n};\n","import { residenceCatalogGuard } from '@partners/catalog';\nimport { ContextBuilder } from '../http';\n\nexport const provideResidenceCatalogGuard = (): (() => Promise) => {\n return async () => {\n const context = new ContextBuilder().addUrlModifiers({ omitProcess: true }).build();\n return await residenceCatalogGuard({ context });\n };\n};\n","import { Injectable, computed, inject } from '@angular/core';\nimport { IAccountFormat, IDebitsModel } from '@partners/api';\nimport { DebitsStore } from '@partners/state';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DebitsFacade {\n /** a signal holding bank account details (used to display on account-label component) */\n accountFormat$$ = computed(() => {\n const debitsModel: IDebitsModel = this._debitsStore.model$$();\n\n if (!debitsModel) {\n return undefined;\n }\n const { accountNumber, bankName, branchName, accountOwnerName, branchCode } = debitsModel;\n\n return {\n accountNumber: accountNumber,\n bankName: bankName,\n branchName: branchName,\n accountOwnerName: accountOwnerName,\n branchCode: branchCode\n };\n });\n\n private _debitsStore = inject(DebitsStore);\n\n constructor() {}\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input, ViewEncapsulation } from '@angular/core';\nimport { IAccountFormat } from '@partners/api';\nimport { DebitsFacade } from '../../facades/debits';\n\n@Component({\n selector: 'account-label',\n standalone: true,\n\n template: `\n @if(bankName$$()) {\n
\n {{ bankNameIntroText$$() }}\n {{ bankName$$() }}\n
\n } @if(accountNumber$$()) {\n\n
\n {{ accountIntroText() }}\n \n {{ branchWithAccount$$() }}\n \n
\n } @if (accountOwner$$()) {\n
\n {{ accountOwnerIntroText$$() }}\n {{ accountOwner$$() }}\n
\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'account-label',\n '[class.inline]': 'isInlineDisplay()'\n }\n})\nexport class AccountLabelComponent {\n branchWithAccount$$ = computed(() => {\n if (this.branchCode$$()) {\n return `${this.branchCode$$()}-${this.accountNumber$$()}`;\n }\n return `${this.accountNumber$$()}`;\n });\n\n accountNumber$$ = computed(() => {\n return this.accountData$$()?.accountNumber;\n });\n branchCode$$ = computed(() => {\n if (this.dataScope() === 'full') {\n return this.accountData$$()?.branchCode;\n }\n return undefined;\n });\n bankName$$ = computed(() => {\n if (this.dataScope() === 'full') {\n return this.accountData$$()?.bankName;\n }\n return undefined;\n });\n branchName$$ = computed(() => {\n if (this.dataScope() === 'full') {\n return this.accountData$$()?.branchName;\n }\n return undefined;\n });\n accountOwner$$ = computed(() => {\n if (this.dataScope() === 'full') {\n return this.accountData$$()?.accountOwnerName;\n }\n return undefined;\n });\n\n dataScope = input<'full' | 'account-number'>('full');\n\n isInlineDisplay = computed(() => this.dataScope() === 'account-number');\n\n accountIntroText = input('חשבון', {\n alias: 'accountIntroText'\n });\n bankNameIntroText$$ = input('בנק', {\n alias: 'bankNameIntroText'\n });\n accountOwnerIntroText$$ = input('על שם', {\n alias: 'accountOwnerIntroText'\n });\n\n private _debitsFacade = inject(DebitsFacade);\n\n private accountData$$ = computed(() => {\n return this._debitsFacade.accountFormat$$();\n });\n}\n","import { EffectRef, Injectable, OnDestroy, computed, effect, inject } from '@angular/core';\nimport { IAddressFormat, IAddressModel, ICustomer, IZipCodeModel } from '@partners/api';\nimport { CatalogQuery, CatalogService, TCatalogOption, TResidenceOption } from '@partners/catalog';\nimport { HttpService, IHttpOptions, filterResult } from '@partners/http';\nimport { AddressStore, AuthLoginStore } from '@partners/state';\nimport { filterObjects, isEmpty, isNotEmpty, takeOnce, toUrlParams } from '@partners/utils';\nimport { Observable, distinctUntilChanged, map, of, startWith, switchMap } from 'rxjs';\nimport { ContextBuilder } from '../../http';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AddressFacade implements OnDestroy {\n private _catalogService = inject(CatalogService);\n private _httpService = inject(HttpService);\n private _catalogQuery = inject(CatalogQuery);\n private _addressStore = inject(AddressStore);\n private _loginStore = inject(AuthLoginStore);\n private _effectRef: EffectRef;\n\n readonly addressFormat$$ = computed(() => {\n const addressModel: IAddressModel = this._addressStore.model$$();\n if (!addressModel) {\n return undefined;\n }\n\n const { houseNumber, entrance, appartmentNum, zipCode, zipCode7, residenceName, streetName, residenceCode } =\n addressModel;\n\n const addressFormat: IAddressFormat = {\n appartmentNum,\n houseNumber,\n entrance,\n residenceName,\n streetName,\n zipCode: zipCode7 || zipCode\n };\n return addressFormat;\n });\n readonly addressModel$$ = computed(() => this._addressStore.model$$());\n\n /**\n * @description\n * when user successfully logs in, we get his full data back from the server, including address,\n * bank & debits etc'. for each of those domains, we need to copy their data from the auth store\n * into their own stores. this is due to stupid server architecture\n */\n readonly authCustomerData = effect(\n () => {\n const customerData = this._loginStore.customerData$$();\n\n if (!customerData) {\n return;\n }\n\n this.updateAddressModel(customerData);\n\n this.authCustomerData.destroy();\n },\n { allowSignalWrites: true }\n );\n\n constructor() {}\n\n hasValidAddress$$ = computed(() => {\n \n const addressModel: IAddressModel = this._addressStore.model$$();\n if (!addressModel) {\n return undefined;\n }\n const { residenceCode, streetCode, houseNumber } = addressModel;\n\n const residence: TResidenceOption = this.getResidenceByCode(residenceCode);\n\n if (!residence) {\n return false;\n }\n\n const { isContainSt } = residence;\n\n if (isContainSt) {\n return isNotEmpty(residenceCode) && isNotEmpty(streetCode) && isNotEmpty(houseNumber);\n }\n\n return isNotEmpty(residenceCode) && isNotEmpty(houseNumber);\n });\n\n ngOnDestroy(): void {\n this._effectRef && this._effectRef.destroy();\n }\n\n getResidenceByCode(residenceCode: number): TResidenceOption {\n return this._catalogQuery.findResidence(residenceCode);\n }\n\n filterStreets(streetQuery: string, residenceCode: string | number): Observable {\n const context = new ContextBuilder().disableLoader().addUrlModifiers({ omitProcess: true }).build();\n return this._catalogQuery.filterStreetsByName$(streetQuery, residenceCode, { context }).pipe(\n map((streets) => {\n return filterObjects(streets, '', {\n props: ['key'],\n maxResults: 50\n });\n })\n );\n }\n\n filterResidences(residenceQuery: string = null): TResidenceOption[] {\n const residenceList: TResidenceOption[] = this._catalogService.fromResidence();\n if (!residenceQuery) {\n return residenceList;\n }\n\n const filteredList = filterObjects(residenceList, residenceQuery, {\n props: ['key'],\n maxResults: 50\n });\n\n return filteredList;\n }\n\n findResidence(residenceCode: number): TResidenceOption | undefined {\n const residenceList: TResidenceOption[] = this._catalogService.fromResidence();\n\n const residenceOption = residenceList.find(({ value }) => value === residenceCode);\n\n return residenceOption;\n }\n\n getZipCode(residenceCode: number, street: number | null, houseNumber: number): Observable {\n let zipCodeQuery = 'catalog/zipcode';\n zipCodeQuery += toUrlParams([residenceCode, street, houseNumber], { includeNulls: true });\n\n const context = new ContextBuilder().addUrlModifiers({ omitProcess: true }).disableLoader().build();\n const options: IHttpOptions = { context };\n\n return of(zipCodeQuery).pipe(\n takeOnce(),\n startWith(null),\n distinctUntilChanged(),\n switchMap(() => {\n return this._httpService.fetch(zipCodeQuery, options);\n }),\n filterResult()\n );\n }\n\n updateResidenceName(residenceName: string) {\n let model = this._addressStore.model$$();\n isEmpty(model) && (model = this.createEmptyAddressModel());\n model = { ...model, residenceName };\n this._addressStore.dispatchUpdateModel({ model });\n }\n\n updateStreetName(streetName: string) {\n let model = this._addressStore.model$$();\n isEmpty(model) && (model = this.createEmptyAddressModel());\n model = { ...model, streetName };\n this._addressStore.dispatchUpdateModel({ model });\n }\n\n createEmptyAddressModel(): IAddressModel {\n return {\n residenceCode: null,\n streetCode: null,\n zipCode: null,\n appartmentNum: null,\n entrance: null,\n streetName: null,\n residenceName: null,\n houseNumber: null,\n email: null\n } as IAddressModel;\n }\n\n private updateAddressModel({\n residence,\n residenceName,\n street,\n streetName,\n houseNumber,\n zipCode,\n entrance,\n appartmentNum,\n email\n }: ICustomer) {\n const addressModel: IAddressModel = {\n residenceCode: residence,\n streetCode: street,\n zipCode,\n appartmentNum,\n entrance,\n streetName,\n residenceName,\n houseNumber,\n email\n };\n\n addressModel.zipCode7 = zipCode;\n\n /** update the address store */\n this._addressStore.dispatchUpdateModel({ model: addressModel });\n }\n}\n","import { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation, computed, inject } from '@angular/core';\nimport { IAddressFormat } from '@partners/api';\nimport { isEmpty } from '@partners/utils';\nimport { AddressFacade } from '../../facades/address';\n\n@Component({\n selector: 'address-label',\n standalone: true,\n template: `\n \n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'address'\n})\nexport class AddressLabelComponent {\n @HostBinding('class.address-label')\n hasResidence$$ = computed(() => !isEmpty(this.addressFormat$$()?.residenceName));\n hasStreet$$ = computed(() => !isEmpty(this.addressFormat$$()?.streetName));\n hasZipCode$$ = computed(() => !isEmpty(this.addressFormat$$()?.zipCode));\n\n protected addressFormat$$ = computed(() => {\n return this._addressFacade.addressFormat$$();\n });\n\n private _addressFacade = inject(AddressFacade);\n}\n","import { Component, HostBinding, computed } from '@angular/core';\nimport { AddressLabelComponent } from '../../address-label.component';\n\n@Component({\n selector: 'residence',\n standalone: true,\n template: `\n {{ residenceName$$() }}\n `\n})\nexport class ResidenceComponent extends AddressLabelComponent {\n @HostBinding('class.residence-label')\n residenceName$$ = computed(() => this.addressFormat$$()?.residenceName);\n}","import { Component, HostBinding, computed } from '@angular/core';\nimport { AddressLabelComponent } from '../../address-label.component';\n\n@Component({\n selector: 'street',\n standalone: true,\n template: `\n {{ streetName$$() }} \n {{ houseNumber$$() }}\n `\n})\nexport class StreetComponent extends AddressLabelComponent {\n @HostBinding('class.street-label')\n streetName$$ = computed(() => this.addressFormat$$()?.streetName);\n houseNumber$$ = computed(() => this.addressFormat$$()?.houseNumber);\n}\n","import { Component, HostBinding, computed } from '@angular/core';\nimport { AddressLabelComponent } from '../../address-label.component';\n\n@Component({\n selector: 'zipcode',\n standalone: true,\n template: `\n מיקוד\n {{ zipCode$$() }}\n `\n})\nexport class ZipCodeComponent extends AddressLabelComponent {\n @HostBinding('class.zipcode-label')\n zipCode$$ = computed(() => this.addressFormat$$()?.zipCode);\n}\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { IconComponent } from '@partners/ui';\n\n@Component({\n selector: 'alert-icon',\n standalone: true,\n imports: [IconComponent],\n template: `\n \n `,\n styles: ``,\n encapsulation: ViewEncapsulation.None\n})\nexport class AlertIconComponent {}\n","import { Injectable, computed, inject } from '@angular/core';\nimport { ICardData } from '@partners/api';\nimport { CardStore } from '@partners/state';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CardFacade {\n /** a signal holding card details (used to display on card-label component) */\n cardFormat = computed(() => {\n const cardData: ICardData = this.#cardStore.data$$();\n\n if (!cardData) {\n return undefined;\n }\n const { issuerCardExpirationDate, issuerCardLast4Digits, issuerCardBrandName } = cardData;\n\n return {\n issuerCardExpirationDate,\n issuerCardLast4Digits,\n issuerCardBrandName\n };\n });\n\n #cardStore = inject(CardStore);\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, computed, inject } from '@angular/core';\nimport { ICardData } from '@partners/api';\nimport { ToDatePipe } from '@partners/utils';\nimport { CardFacade } from '../../facades/card';\n\n@Component({\n selector: 'card-label',\n standalone: true,\n imports: [CommonModule, ToDatePipe],\n providers: [ToDatePipe],\n template: `\n
\n {{ brandName() }}\n\n \n {{ last4Digits() }}\n \n
\n
\n תוקף\n \n {{ expirationDate() | toDate: 'MM/YY' }}\n \n
\n `\n})\nexport class CardLabelComponent {\n #cardFacade = inject(CardFacade);\n #cardData = computed(() => this.#cardFacade.cardFormat());\n\n brandName = computed(() => this.#cardData().issuerCardBrandName);\n last4Digits = computed(() => this.#cardData().issuerCardLast4Digits);\n expirationDate = computed(() => this.#cardData().issuerCardExpirationDate);\n}\n","import { ChangeDetectionStrategy, Component, Signal, ViewEncapsulation, computed, inject } from '@angular/core';\nimport { ProfileService } from '../../process';\n\n@Component({\n selector: 'club-label',\n standalone: true,\n template: `\n @if(clubLabel$$()) {\n {{ clubLabel$$() }}\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ClubLabelComponent {\n private _profileService = inject(ProfileService);\n\n get clubLabel$$(): Signal {\n return computed(() => this._profileService.clubLabel$$());\n }\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, input } from '@angular/core';\nimport { TCatalogGraphicOption } from '@partners/catalog';\nimport { ThemeAssetComponent } from '@partners/themes';\n\n@Component({\n selector: 'gender-option',\n standalone: true,\n imports: [ThemeAssetComponent],\n template: `\n \n {{ option().key }}\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [\n `\n .icon {\n display: grid;\n place-content: center;\n }\n .label {\n position: absolute;\n }\n .theme-asset {\n width: 100%;\n position: absolute;\n left: 0;\n top: 0px;\n transform: scale(1.5);\n }\n `\n ]\n})\nexport class GenderOptionComponent {\n option = input.required();\n}\n","import { Component, ViewEncapsulation } from '@angular/core';\nimport { IconComponent } from '@partners/ui';\n\n@Component({\n selector: 'info-icon',\n standalone: true,\n imports: [IconComponent],\n template: `\n \n \n `,\n styles: ``,\n encapsulation: ViewEncapsulation.None\n})\nexport class InfoIconComponent {}\n","import { Injectable, computed } from '@angular/core';\nimport { ICalGtmBaseEvent } from '@cal-analytics/gtm';\nimport { GtmPartnersService } from '../../../../services/gtm-partners.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GtmOtpWarningService extends GtmPartnersService {\n protected step_title = 'wrong details';\n protected step_number = 3.3;\n protected sub_process_type = 'NA';\n protected error_type = 'מזכירים שצריך למלא את הפרטים של כרטיס כאל או דיינרס שלך';\n\n override getBaseEvent(): ICalGtmBaseEvent {\n return this.baseEvent()?.['wrongDetailsPage'];\n }\n\n override baseEvent = computed(() => ({\n wrongDetailsPage: {\n ...this.baseEvent$$(),\n step_title: this.step_title,\n step_number: this.step_number,\n sub_process_type: this.sub_process_type\n }\n }));\n}\n","import { Injectable, computed } from '@angular/core';\nimport { GtmOtpWarningService } from './gtm-otp-warning.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GtmOtpWarningCardService extends GtmOtpWarningService {\n override funnelStep = computed(() => ({\n funnelStepEvent: {\n ...this.baseFunnelStep$$(),\n error_type: this.error_type\n }\n }));\n\n override funnelClick = computed(() => ({\n guideClickEvent: {\n component_type: 'text',\n click_text: 'כך נראה כרטיס כאל או דיינרס',\n question_text: 'NA'\n },\n submitClickEvent: {\n component_type: 'button',\n click_text: 'הבנתי, תודה',\n question_text: 'NA'\n }\n }));\n}\n","import { Provider, inject } from '@angular/core';\nimport { CalGtmService } from '@cal-analytics/gtm';\nimport { ShellStore } from '@partners/state';\nimport { GtmOtpWarningCardService } from './gtm-otp-warning-card.service';\nimport { GtmOtpWarningService } from './gtm-otp-warning.service';\n\nexport const provideOtpWarningServiceProvider = (): Provider => {\n return {\n provide: CalGtmService,\n useFactory: () => {\n const shellStore = inject(ShellStore);\n\n const canMatchCard$$ = shellStore.matchCard$$;\n\n if (canMatchCard$$()) {\n return new GtmOtpWarningCardService();\n }\n\n return new GtmOtpWarningService();\n }\n };\n};\n","import { TFeature } from '@partners/settings';\nexport const SCAN_RELATED_FEATURE_NAMES = new Set(['scan-details', 'scan-document', 'scan-gender']);\n","import { Injectable, NgZone, OnDestroy, inject } from '@angular/core';\nimport { NavigationEnd, Params, Router } from '@angular/router';\n\nimport { IRemoteError } from '@partners/errors';\nimport { IFlatStage, INavigationOptions, NavigationService } from '@partners/navigation';\nimport { SettingsMap, TAlertFeature, TConfirmFeature, TFeature, TGuideFeature } from '@partners/settings';\nimport { ShellStore } from '@partners/state';\nimport { cloneImmutableArray, isEmptyArray, isNotEmpty, shareReplayLast, takeOnce } from '@partners/utils';\nimport { Observable, Subscription, combineLatest, from } from 'rxjs';\nimport { filter, map, switchMap, tap, withLatestFrom } from 'rxjs/operators';\nimport { SCAN_RELATED_FEATURE_NAMES } from '../consts/consts';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NavigationAdapter implements OnDestroy {\n private _router = inject(Router);\n private _shellStore = inject(ShellStore);\n private _ngZone = inject(NgZone);\n\n private _subscriptions = new Subscription();\n\n constructor(private navigationService: NavigationService) {\n /** listens to stages state on store, and updates the flatStages state if changes. */\n\n const syncNavSub = this._shellStore.policy$\n .pipe(\n /** check if we have raw stages */\n filter((policy) => !!policy?.stages?.length),\n map(({ stages }) => stages),\n /** get current flat stages collection */\n withLatestFrom(this._shellStore.flatStages$),\n /** continue to create flat stages only if not created yet */\n filter(([stages, flatStages]) => !flatStages?.length),\n /** we don't have flat stages yet, map to stages to create flat collection */\n map(([stages, flatStages]) => stages),\n /** create flat stages collection from stages collection */\n tap((stages) => {\n const flatStages = this.navigationService.syncRouter(stages);\n this.syncWithAnonymousStages(flatStages);\n this._shellStore.dispatchUpdateFlatStages(flatStages);\n }),\n shareReplayLast()\n )\n .subscribe();\n\n /**\n * on each navigation end event - update the shell store navigation state. the update\n * syncs the stages to the route, state and marks their state as complete | current | pristine\n **/\n const updateNavSub = this._router.events\n .pipe(\n filter((navEndEvent) => navEndEvent instanceof NavigationEnd),\n map((navEndEvent) => navEndEvent as NavigationEnd),\n withLatestFrom(this._shellStore.routeState$),\n /** avoid updates on browser refresh event */\n filter(([{ url }, { previousRoute, currentRoute }]) => {\n return url !== currentRoute?.url;\n }),\n /** update route snapshot (current & next routes) */\n tap(([{ id, url }, { previousRoute, currentRoute }]) => {\n this._shellStore.dispatchUpdateRouteNavigation({ ...currentRoute }, { id, url });\n }),\n withLatestFrom(this._shellStore.flatStages$),\n tap(([[{ id, url }, { previousRoute, currentRoute }], flatStages]) => {\n if (isEmptyArray(flatStages) && url !== '/') {\n this._shellStore.dispatchUpdateAnonymousStages({ url });\n }\n }),\n filter(([, flatStages]) => Boolean(flatStages?.length)),\n /** find a matching stage to current route */\n map(([, flatStages]) => {\n const currentStage: IFlatStage = this.navigationService.findStageByCurrentUrl(flatStages);\n return Boolean(currentStage?.name);\n }),\n filter((hasStage) => hasStage),\n /** update stages snapshot (current & next stages) */\n switchMap(() => {\n return this.#updateNavigationState();\n }),\n shareReplayLast()\n )\n .subscribe();\n\n this._subscriptions.add(syncNavSub);\n this._subscriptions.add(updateNavSub);\n\n this._shellStore.dispatchCreateAnonymousStages([]);\n }\n\n syncWithAnonymousStages(flatStages: IFlatStage[]) {\n from(flatStages)\n .pipe(\n takeOnce(),\n withLatestFrom(this._shellStore.anonymousStages$),\n filter(([nextStage, anonymousStages]) => !isEmptyArray(anonymousStages)),\n filter(([nextStage, anonymousStages]) => {\n const matchAnonymous = anonymousStages.find((anonymousStage) => anonymousStage.url == nextStage.url);\n return isNotEmpty(matchAnonymous);\n }),\n tap(([nextStage, anonymousStages]) => {\n this.navigationService.editStageNode(\n flatStages,\n { path: nextStage.url },\n {\n isComplete: true,\n isPristine: false,\n isCurrent: false\n }\n );\n })\n )\n .subscribe();\n }\n\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n\n /**\n * this function denies navigation to already completed stages. it covers two scenarios:\n * (1) navigating by stages map - thats default behavior and mainly manages restricted\n * navigation by comparing screenCode against nextPossibleStage (2) navigating anonymously\n * by skipping from stage to stage in this case - there is no stages map and we keep track\n * after the completed routes by storing them in anonymousStages store collection, any\n * attempt to navigate to an existing route already contained in anonymousStages - is denied\n *\n * @param url the target route's url attempting to load\n * @param params any params the route carries\n * @returns a boolean value indicating if access to the route is allowed\n */\n canNavigateTo(url: string, params: Params): Observable {\n return combineLatest([this._shellStore.flatStages$, this._shellStore.anonymousStages$]).pipe(\n takeOnce(),\n map(([flatStages, anonymousStages]) => {\n if (isEmptyArray(flatStages)) {\n /** there are no policy stages yet, validate url only against anonymous stages */\n return this.navigationService.canLoadAnonymousRoute(url, anonymousStages, params);\n }\n\n if (!isEmptyArray(anonymousStages)) {\n /**\n * in some cases - we might have mixed stages (both from policy and anonymous) in which case\n * we must validate the requested url against both in case we are currently on the first stage\n * from policy\n */\n const canLoadStage = this.navigationService.canLoadAnonymousRoute(url, anonymousStages, params);\n if (!canLoadStage) {\n return false;\n }\n }\n /**\n * finally - if we got here - there are no matching anonymous stage to current url AND we\n * do have policy stages\n */\n return this.navigationService.canLoadRoute(url, flatStages, params);\n })\n );\n }\n\n moveBack() {\n this._shellStore.navigation$\n .pipe(\n takeOnce(),\n tap(({ previousRoute, currentRoute, nextRoute }) => {\n this.navigationService.moveAny(previousRoute.url);\n })\n )\n .subscribe();\n }\n\n moveNext(options?: INavigationOptions) {\n this._shellStore.flatStages$\n .pipe(\n takeOnce(),\n withLatestFrom(this._shellStore.currentStage$),\n tap(([flatStages, currentStage]) => {\n this.navigationService.moveNext(currentStage.screenCode, flatStages, options);\n })\n )\n .subscribe();\n }\n\n moveTo(featureName: TFeature) {\n this._shellStore.flatStages$\n .pipe(\n takeOnce(),\n tap((flatStages: IFlatStage[]) => {\n const { path, name } = SettingsMap.get(featureName);\n this.#navigate(`/${path}`);\n })\n )\n .subscribe();\n }\n\n toAlert(key: TAlertFeature, options?: INavigationOptions): void;\n\n toAlert(error: IRemoteError, options?: INavigationOptions): void;\n\n toAlert(nameOrError: TAlertFeature | IRemoteError, options?: any): void {\n const error = nameOrError as IRemoteError;\n if (error?.token) {\n /** go to default remote error page */\n const settings = SettingsMap.get('generic-alert');\n return this.navigationService.moveAny(`/${settings.path}/${error.token}`);\n }\n\n /** go to specific (named) remote error page */\n this.toMessage(nameOrError as TAlertFeature, options);\n }\n\n toGuide(key: TGuideFeature, options?: INavigationOptions) {\n this.toMessage(key, options);\n }\n\n toConfirm(key: TConfirmFeature, options?: INavigationOptions) {\n this.toMessage(key, options);\n }\n\n /**\n * @description\n * navigate to scan document page with the selected document id\n * selected document id\n */\n toScanDocument(selectedDocId: number): void {\n const { path } = SettingsMap.scanDocument();\n this.navigationService.moveAny(`/${path}/${selectedDocId}`);\n }\n navigateAfterScan(featureName: TFeature): Observable {\n return this.#resetScanRelatedStages().pipe(\n takeOnce(),\n tap(() => {\n const { name } = SettingsMap.get(featureName);\n this.moveTo(name);\n }),\n map(() => true)\n );\n }\n\n toSimulator(): void {\n const { path } = SettingsMap.simulator();\n return this.navigationService.moveAny(`/${path}`);\n }\n private toMessage(key: TFeature, options?: INavigationOptions) {\n const settings = SettingsMap.get(key);\n this.navigationService.moveAny(`/${settings.path}`);\n }\n /**\n * @description\n * Scan process contains more than four several routes\n * and unlike other processes it is not linear and the process might\n * navigate from one route to another and backwards.\n * therefore we must reset the state of every scan process routes in every\n * navigation after a scan was made.\n */\n #resetScanRelatedStages(): Observable {\n return this._shellStore.flatStages$.pipe(\n cloneImmutableArray(),\n takeOnce(),\n filter((flatStages: IFlatStage[]) => !!flatStages?.length),\n tap((flatStages: IFlatStage[]) => {\n flatStages.forEach((stage: IFlatStage) => {\n if (SCAN_RELATED_FEATURE_NAMES.has(stage.name as TFeature)) {\n this.navigationService.editStageNode(\n flatStages,\n { code: stage.stageCode },\n { isComplete: false, isPristine: true, isCurrent: false }\n );\n }\n });\n this._shellStore.dispatchUpdateFlatStages(flatStages);\n })\n );\n }\n /**\n * @description\n * creates an observable that emits each time a navigate end event happens. on each emission, we want\n * to update the stages' status, namely: isCurrent, isPristine, isComplete\n *\n * First it will update the stage status on the flatStages state in the navigation store,\n * and then it will update previousStage, currentStage, and nextStage states in the navigation store.\n * @returns An observable that performs navigation state update due to stages logic.\n */\n #updateNavigationState() {\n return this._shellStore.flatStages$.pipe(\n takeOnce(),\n /**\n * we have to create an immutable clone the flat stages array, otherwise we wont be able to partially\n * update it (the store locks its value)\n */\n cloneImmutableArray(),\n withLatestFrom(this._shellStore.currentStage$),\n tap(([flatStages, lastStage]) => {\n const currentStage = this.navigationService.findStageByCurrentUrl(flatStages);\n const nextStage = this.navigationService.findStageById(flatStages, currentStage.nextPossibleStage);\n\n this._shellStore.dispatchUpdateStageNavigation(lastStage, currentStage, nextStage);\n const updatedFlatStages = this.navigationService.updateStagesState(flatStages);\n this._shellStore.dispatchUpdateFlatStages(updatedFlatStages);\n })\n );\n }\n\n #navigate(uri: string, options: INavigationOptions = { navOutsideZone: false }) {\n const { navOutsideZone, state } = options;\n if (navOutsideZone) {\n this._ngZone.run(() => this._router.navigateByUrl(uri, { state }));\n return;\n }\n\n this._router.navigateByUrl(uri, { state });\n }\n}\n","import { Directive, HostListener, Input, inject } from '@angular/core';\nimport { IButtonAction } from '@partners/ui';\nimport { ProfileService } from '../../process';\nimport { TNavAction } from '../model';\nimport { NavigationAdapter } from '../services';\n\n@Directive({\n selector: '[navigator]',\n standalone: true\n})\nexport class NavigationDirective {\n @Input()\n navigator: TNavAction;\n\n private _navigationAdapter = inject(NavigationAdapter);\n private _profileService = inject(ProfileService);\n @HostListener('click', ['$event'])\n public onClick({ event, context }: IButtonAction): void {\n event.preventDefault();\n this.navigate();\n }\n\n constructor() {}\n\n private navigate() {\n if (this.navigator === 'move-previous') {\n this._navigationAdapter.moveBack();\n } else if (this.navigator === 'move-next') {\n this._navigationAdapter.moveNext();\n } else if (this.navigator === 'exit-failure') {\n this._profileService.terminateProcess('error');\n } else if (this.navigator === 'exit-success') {\n this._profileService.terminateProcess('success');\n } else if (this.navigator === 'exit-opt-out') {\n this._profileService.terminateProcess('customer-opt-out');\n }\n }\n}\n","import { Injectable, computed, signal } from '@angular/core';\nimport { ICalGtmBaseEvent } from '@cal-analytics/gtm';\nimport { IAlertConfig, IConfirmConfig, ITooltipConfig } from '@partners/ui';\nimport { IGtmDialogConfig } from '../../models';\nimport { GtmPartnersService } from '../../services';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GtmGenericDialogsService extends GtmPartnersService {\n protected step_title = 'popup';\n protected step_number = 100;\n protected error_type = 'NA';\n protected sub_process_type = 'NA';\n\n protected readonly _dialogConfig = signal(undefined);\n\n override getBaseEvent(): ICalGtmBaseEvent {\n return this.baseEvent()?.['popupPage'];\n }\n\n override baseEvent = computed(() => ({\n popupPage: {\n ...this.baseEvent$$(),\n step_title: `${this.step_title}: ${\n this._dialogConfig()?.message ? this._dialogConfig()?.message : this._dialogConfig()?.title\n }`,\n step_number: this.step_number,\n sub_process_type: this.sub_process_type\n }\n }));\n\n override funnelStep = computed(() => ({\n funnelStepEvent: {\n ...this.baseFunnelStep$$(),\n error_type: this.error_type\n }\n }));\n\n override funnelClick = computed(() => ({\n okClickEvent: {\n component_type: 'button',\n click_text: (<{ ok?: string }>this._dialogConfig()?.buttons)?.ok || 'המשך',\n question_text: 'NA'\n },\n cancelClickEvent: {\n component_type: 'text',\n click_text: (<{ confirm: string; cancel: string }>this._dialogConfig()?.buttons)?.cancel || 'ביטול',\n question_text: 'NA'\n },\n confirmClickEvent: {\n component_type: 'button',\n click_text: (<{ confirm: string; cancel: string }>this._dialogConfig()?.buttons)?.confirm || 'אישור',\n question_text: 'NA'\n }\n }));\n\n setDialogConfig(dialogConfig: IGtmDialogConfig) {\n this._dialogConfig.set(dialogConfig);\n }\n}\n","import { Provider } from '@angular/core';\nimport { CalGtmService } from '@cal-analytics/gtm';\nimport { GtmGenericDialogsService } from './gtm-generic-dialogs.service';\n\nexport const provideGtmGenericDialogsService = (): Provider[] => {\n return [\n {\n provide: GtmGenericDialogsService,\n useFactory: () => {\n return new GtmGenericDialogsService();\n }\n },\n {\n provide: CalGtmService,\n useExisting: GtmGenericDialogsService // Use the same instance as GtmGenericDialogsService\n }\n ];\n};\n","import { ChangeDetectionStrategy, Component, OnInit, ViewChild, ViewEncapsulation, inject } from '@angular/core';\nimport { GtmGenericDialogsService, GtmImportPack, provideGtmGenericDialogsService } from '@partners/gtm';\nimport {\n DialogContainerComponent,\n DialogIconDirective,\n DialogImportPack,\n FilledButtonComponent,\n IAlertConfig,\n IconComponent\n} from '@partners/ui';\nimport { AlertIconComponent } from '../../components';\n\n/**\n * @description\n * a default alert dialog ui, contained within a dialog-container component. the container provides\n * a consistent dialog template structure with the following template slots: icon, title, body, footer\n * as well as close button, it also provides centralized access to basic common dialog behavior such\n * as dismiss function, dialog button behaviors, dialog animations etc'\n */\n\n@Component({\n standalone: true,\n providers: [provideGtmGenericDialogsService()],\n imports: [FilledButtonComponent, DialogImportPack, IconComponent, AlertIconComponent, GtmImportPack],\n template: `\n \n \n\n @if(dialogContainer.iconName()){\n \n }\n @else {\n \n }\n\n \n\n \n {{ context.title }}\n \n \n {{ context.message }}\n \n \n
\n {{ context.buttons.ok }}\n
\n
\n
\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'alert-dialog'\n }\n})\nexport class AlertComponent implements OnInit {\n private readonly _gtmService = inject(GtmGenericDialogsService);\n\n @ViewChild('container', { static: true, read: DialogContainerComponent })\n dialogContainer: DialogContainerComponent;\n\n @ViewChild('dialogIcon', { static: true, read: DialogIconDirective })\n iconTemplate: DialogIconDirective;\n\n ngOnInit() {\n this.setGtmDialogConfig();\n }\n\n setGtmDialogConfig() {\n const dialogConfig = this.dialogContainer.dialogConfig as IAlertConfig;\n\n const gtmDialogConfig = {\n message: dialogConfig.message,\n buttons: {\n ok: dialogConfig.buttons?.ok\n }\n };\n\n this._gtmService.setDialogConfig(gtmDialogConfig);\n }\n\n dismissAlert() {\n this.dialogContainer.dismissDialog(undefined);\n }\n}\n","import { NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, OnInit, ViewChild, ViewEncapsulation, inject } from '@angular/core';\nimport { GtmGenericDialogsService, GtmImportPack, provideGtmGenericDialogsService } from '@partners/gtm';\nimport {\n DialogContainerComponent,\n DialogImportPack,\n FilledButtonComponent,\n FlexUtilsImportPack,\n IConfirmConfig,\n LinkButtonComponent\n} from '@partners/ui';\nimport { InfoIconComponent } from '../../components';\n\n/**\n * @description\n * a default confirm dialog ui. (read more documentation in file ../alert.component.ts)\n */\n\n@Component({\n standalone: true,\n providers: [provideGtmGenericDialogsService()],\n imports: [\n FilledButtonComponent,\n LinkButtonComponent,\n FlexUtilsImportPack,\n DialogImportPack,\n InfoIconComponent,\n NgIf,\n GtmImportPack\n ],\n template: `\n \n \n \n \n \n {{ context.title }}\n \n \n {{ context.message }}\n \n \n
\n
\n \n {{ context.buttons.cancel }}\n \n
\n
\n \n {{ context.buttons.confirm }}\n \n
\n
\n
\n
\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'confirm-dialog'\n }\n})\nexport class ConfirmComponent implements OnInit {\n private readonly _gtmService = inject(GtmGenericDialogsService);\n\n @ViewChild('container', { static: true, read: DialogContainerComponent })\n dialogContainer: DialogContainerComponent;\n\n ngOnInit() {\n this.setGtmDialogConfig();\n }\n\n setGtmDialogConfig() {\n const dialogConfig = this.dialogContainer.dialogConfig as IConfirmConfig;\n\n const gtmDialogConfig = {\n message: dialogConfig.message,\n buttons: {\n confirm: dialogConfig.buttons?.confirm,\n cancel: dialogConfig.buttons?.cancel\n }\n };\n\n this._gtmService.setDialogConfig(gtmDialogConfig);\n }\n\n dismissConfirm(response: boolean) {\n this.dialogContainer.dismissDialog(response);\n }\n}\n","import { ChangeDetectionStrategy, Component, OnInit, ViewChild, ViewEncapsulation, inject } from '@angular/core';\nimport { GtmGenericDialogsService, GtmImportPack, provideGtmGenericDialogsService } from '@partners/gtm';\nimport { DialogContainerComponent, DialogImportPack, FilledButtonComponent, IGuideConfig } from '@partners/ui';\nimport { InfoIconComponent } from '../../components';\n\n/**\n * @description\n * a default guide dialog ui, contained within a dialog-container component. the container provides\n * a consistent dialog template structure with the following template slots: icon, title, body, footer\n * as well as close button, it also provides centralized access to basic common dialog behavior such\n * as dismiss function, dialog button behaviors, dialog animations etc'\n */\n\n@Component({\n standalone: true,\n providers: [provideGtmGenericDialogsService()],\n imports: [FilledButtonComponent, DialogImportPack, InfoIconComponent, GtmImportPack],\n template: `\n\n \n \n \n \n\n\n {{ context?.title }}\n\n {{ context.message }}\n \n
\n {{ context.buttons.ok }} \n
\n
\n
\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'guide-dialog'\n }\n})\nexport class GuideComponent implements OnInit {\n private readonly _gtmService = inject(GtmGenericDialogsService);\n\n @ViewChild('container', { static: true, read: DialogContainerComponent })\n dialogContainer: DialogContainerComponent;\n\n ngOnInit() {\n this.setGtmDialogConfig();\n }\n\n setGtmDialogConfig() {\n const dialogConfig = this.dialogContainer.dialogConfig as IGuideConfig;\n\n const gtmDialogConfig = {\n message: dialogConfig.message,\n buttons: {\n ok: dialogConfig.buttons?.ok\n }\n };\n\n this._gtmService.setDialogConfig(gtmDialogConfig);\n }\n\n dismissGuide() {\n this.dialogContainer.dismissDialog(undefined);\n }\n}\n","import { ChangeDetectionStrategy, Component, OnInit, ViewChild, ViewEncapsulation, inject } from '@angular/core';\nimport { GtmGenericDialogsService, GtmImportPack, provideGtmGenericDialogsService } from '@partners/gtm';\nimport { DialogContainerComponent, DialogImportPack, IDialogConfig } from '@partners/ui';\n\n@Component({\n standalone: true,\n providers: [provideGtmGenericDialogsService()],\n imports: [DialogImportPack, GtmImportPack],\n template: `\n \n \n {{ context.message }}\n \n \n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tooltip-dialog'\n }\n})\nexport class TooltipComponent implements OnInit {\n private readonly _gtmService = inject(GtmGenericDialogsService);\n\n @ViewChild('container', { static: true, read: DialogContainerComponent })\n dialogContainer: DialogContainerComponent;\n\n ngOnInit() {\n this.setGtmDialogConfig();\n }\n\n setGtmDialogConfig() {\n const dialogConfig = this.dialogContainer.dialogConfig as IDialogConfig;\n\n const gtmDialogConfig = {\n message: dialogConfig.message\n };\n\n this._gtmService.setDialogConfig(gtmDialogConfig);\n }\n}\n","import { ComponentType } from '@angular/cdk/portal';\nimport { inject, Injectable } from '@angular/core';\nimport {\n DialogRef,\n DialogService,\n IAlertConfig,\n IConfirmConfig,\n IDialogConfig,\n IGuideConfig,\n ITooltipConfig\n} from '@partners/ui';\nimport { AlertComponent } from '../alert/alert.component';\nimport { ConfirmComponent } from '../confirm/confirm.component';\nimport { GuideComponent } from '../guide/guide.component';\nimport { TooltipComponent } from '../tooltip/tooltip.component';\n\nconst DIALOG_DEFAULT_CONFIG = {\n backdropClass: 'dialog-backdrop',\n panelClass: 'dialog-panel'\n};\n\nconst TIP_DEFAULT_CONFIG = {\n backdropClass: 'tooltip-backdrop',\n panelClass: 'tooltip-panel',\n maxWidth: '15rem',\n minHeight: '3rem',\n hideCloseIcon: true,\n hideIcon: false\n};\n\nconst ALERT_DEFAULT_CONFIG = {\n panelClass: 'alert-panel',\n buttons: {\n ok: 'אישור'\n }\n};\n\nconst GUIDE_DEFAULT_CONFIG = {\n panelClass: 'guide-panel',\n buttons: {\n ok: 'אישור'\n }\n};\n\nconst CONFIRM_DEFAULT_CONFIG = {\n panelClass: 'confirm-panel',\n buttons: {\n confirm: 'אישור',\n cancel: 'ביטול'\n }\n};\n\n/**\n * @description\n * an adapter to dialog library interface, this service provides \"shortcuts\" to common dialog behavior\n * from here we can directly load a typed dialog, such as alert | confirm with their common configuration\n * without specifying again and again their basic requirements & configuration\n */\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DialogAdapter {\n private _dialogService = inject(DialogService);\n\n #dialogRef: DialogRef = undefined;\n\n constructor() {}\n\n open(component: ComponentType, dialogConfig?: IDialogConfig): DialogRef {\n return this._dialogService.open(component, dialogConfig);\n }\n\n /**\n * @description\n * show a common alert dialog, extends alert's common configuration with custom args from the consumer\n * @param alertConfig partial or full alert config to override default\n * @returns a common dialog ref with access to its closing method and data\n */\n openAlert(alertConfig?: IAlertConfig): DialogRef {\n alertConfig = Object.assign({ ...DIALOG_DEFAULT_CONFIG }, { ...ALERT_DEFAULT_CONFIG }, { ...alertConfig });\n return this._dialogService.open(AlertComponent, alertConfig);\n }\n\n openGuide(guideConfig: IGuideConfig): DialogRef {\n guideConfig = Object.assign({ ...DIALOG_DEFAULT_CONFIG }, { ...GUIDE_DEFAULT_CONFIG }, { ...guideConfig });\n return this._dialogService.open(GuideComponent, guideConfig);\n }\n\n openTooltip(tipConfig?: ITooltipConfig): DialogRef {\n tipConfig = Object.assign({ ...DIALOG_DEFAULT_CONFIG }, { ...TIP_DEFAULT_CONFIG }, { ...tipConfig });\n return this._dialogService.open(TooltipComponent, tipConfig);\n }\n\n /**\n * @description\n * show a common confirm dialog, extends confirm's common configuration with custom args from the consumer\n * @param confirmConfig partial or full confirm config to override default\n * @returns a common dialog ref with access to its closing method and data\n */\n openConfirm(confirmConfig?: IConfirmConfig): DialogRef {\n confirmConfig = Object.assign({ ...CONFIRM_DEFAULT_CONFIG }, { ...confirmConfig });\n return this._dialogService.open(ConfirmComponent, confirmConfig);\n }\n /**\n * @description\n * Notify the user about unauthorized back navigation attempt.\n * for example by pressing the back navigation arrow of the browser.\n */\n openIllegalNavigationAlert() {\n //prevent popups duplication\n if (this.#dialogRef) {\n this.#dialogRef.dismiss();\n }\n //\n this.#dialogRef = this.openAlert({ title: 'לתשומת ליבך', message: 'אי אפשר לחזור ולערוך פרטים שכבר הזנת' });\n }\n}\n","import { Injectable, computed, inject, signal } from '@angular/core';\nimport { GLOBAL_SETTINGS, IGlobalSettings } from '@partners/settings';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EnvironmentService {\n private _shellConfig = signal(inject(GLOBAL_SETTINGS));\n\n isDevMode$$ = computed(() => {\n const { environment } = this._shellConfig();\n const { isDevMode } = environment;\n return isDevMode;\n });\n\n isMockMode$$ = computed(() => {\n const { environment } = this._shellConfig();\n const { isMockMode } = environment;\n return isMockMode;\n });\n\n calEdaUri$$ = computed(() => {\n const { environment } = this._shellConfig();\n const { calEdaUri } = environment;\n return calEdaUri;\n });\n\n constructor() {}\n}\n","import { inject } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivateFn, RouterStateSnapshot } from '@angular/router';\n\nimport { takeOnce } from '@partners/utils';\nimport { Observable, tap } from 'rxjs';\nimport { DialogAdapter } from '../../dialogs';\nimport { EnvironmentService } from '../../environment';\nimport { NavigationAdapter } from '../services';\n\n/**\n * this guard's main function is to prevent navigating back using the browser's \"back\" button\n * or by hitting the \"backspace\" key on the keyboard. in case navigation is denied - a we pop\n * a dialog specifying the restriction that \"...navigating backward is not allowed\"\n */\nexport const navigationGuard: CanActivateFn = (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {\n const navService = inject(NavigationAdapter);\n const dialogAdapter = inject(DialogAdapter);\n\n if (inject(EnvironmentService).isDevMode$$()) {\n return true;\n }\n\n const canNavigate$: Observable = navService.canNavigateTo(state.url, route.params).pipe(\n takeOnce(),\n tap((canNavigate: boolean) => {\n !canNavigate && dialogAdapter.openIllegalNavigationAlert();\n })\n );\n\n return canNavigate$;\n};\n","import { ChangeDetectionStrategy, Component, inject, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { GtmImportPack, provideOtpWarningServiceProvider } from '@partners/gtm';\nimport { SettingsMap } from '@partners/settings';\nimport {\n DialogContainerComponent,\n DialogIconDirective,\n DialogImportPack,\n FilledButtonComponent,\n LinkButtonComponent\n} from '@partners/ui';\nimport { NavigationAdapter } from '../../navigation';\nimport { AlertIconComponent } from '../alert-icon/alert-icon.component';\n\n@Component({\n standalone: true,\n imports: [FilledButtonComponent, DialogImportPack, LinkButtonComponent, AlertIconComponent, GtmImportPack],\n providers: [provideOtpWarningServiceProvider()],\n template: `\n \n \n \n \n\n\n בטוח שהקלדת נכון?\n \n
\n מזכירים שצריך למלא את הפרטים של כרטיס\n כאל\n או\n דיינרס\n שלך\n
\n
\n \n כך נראה כרטיס כאל או דיינרס\n \n
\n
\n \n
\n הבנתי, תודה\n
\n
\n
\n `,\n styles: [],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class OtpWarningComponent {\n @ViewChild('container', { static: true, read: DialogContainerComponent })\n dialogContainer: DialogContainerComponent;\n\n @ViewChild('dialogIcon', { static: true, read: DialogIconDirective })\n iconTemplate: DialogIconDirective;\n\n private _navAdapter = inject(NavigationAdapter);\n\n moveToCardOwnerGuide() {\n this.hideDialog();\n const { name } = SettingsMap.cardTypeGuide();\n this._navAdapter.moveTo(name);\n }\n\n hideDialog() {\n this.dialogContainer.dismissDialog(undefined);\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, isSignal, ViewEncapsulation } from '@angular/core';\nimport { IThemeSettings, SettingsMap } from '@partners/settings';\nimport { ShellStore } from '@partners/state';\nimport { ThemeAssetComponent } from '@partners/themes';\nimport { isUndefined } from '@partners/utils';\n\n@Component({\n selector: 'partner-logo',\n standalone: true,\n imports: [ThemeAssetComponent],\n template: `\n @if(hasPrimaryLogo()) {\n \n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'primary-logo'\n }\n})\nexport class PartnerLogoComponent {\n #shellStore = inject(ShellStore);\n\n readonly defaultLogoName = 'partner-logo';\n\n logoSettings = computed(() => {\n if (!isSignal(this.#shellStore.params$$)) {\n return undefined;\n }\n\n if (isUndefined(this.#shellStore.params$$())) {\n return undefined;\n }\n const { partner } = this.#shellStore.params$$();\n return SettingsMap.themeSettings(partner);\n });\n\n /** resolve visibility of the primary logo either default (show) or as defined by logo settings */\n hasPrimaryLogo = computed(() => {\n const logoSettings = this.logoSettings();\n\n /** if no settings are found for this partner's primary logo - we apply the default: visible */\n if (isUndefined(logoSettings?.isPrimaryLogoVisible)) {\n return true;\n }\n\n const { isPrimaryLogoVisible } = logoSettings;\n\n return isPrimaryLogoVisible;\n });\n\n /** dynamically resolve the partner's logo based on the logo settings map - if settings exist */\n logoAsset = computed(() => {\n const logoSettings = this.logoSettings();\n\n /** no settings found - resolve the default */\n if (isUndefined(logoSettings)) {\n return this.defaultLogoName;\n }\n\n const { partner, theme } = this.#shellStore.params$$();\n const processName = this.#shellStore.processId$$();\n const { logoSource, logoSourceMatch } = logoSettings;\n\n /** no special logo settings found to match the current process - resolve the default */\n if (processName !== logoSourceMatch) {\n return this.defaultLogoName;\n }\n\n /** no alternative theme found which requires an alternative logo - resolve the default */\n if (theme === partner) {\n return this.defaultLogoName;\n }\n\n /** if we got here it means terms to resolve an alternative logo have been met, so we render alt logo */\n return `${this.defaultLogoName}-${logoSource}`;\n });\n}\n","import { ChangeDetectionStrategy, Component, Signal, ViewEncapsulation, computed, inject } from '@angular/core';\nimport { ProfileService } from '../../process';\n\n@Component({\n selector: 'product-label',\n standalone: true,\n template: `\n @if(productLabel$$()) {\n {{ productLabel$$() }}\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ProductLabelComponent {\n private _profileService = inject(ProfileService);\n\n get productLabel$$(): Signal {\n return computed(() => this._profileService.productLabel$$());\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { IRemoteError, ISeverityHandler, SeverityHandler, TSeverityCallback, TSeverityCode } from '@partners/errors';\n\nimport { SettingsMap } from '@partners/settings';\nimport { takeOnce } from '@partners/utils';\nimport { EMPTY, tap } from 'rxjs';\nimport { OtpWarningComponent } from '../../../components';\nimport { DialogAdapter } from '../../../dialogs';\nimport { NavigationAdapter } from '../../../navigation';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthOtpSeverities extends SeverityHandler implements ISeverityHandler {\n override handlers: Map;\n private _navAdapter = inject(NavigationAdapter);\n private _dialogAdapter = inject(DialogAdapter);\n\n constructor() {\n super();\n\n this.handlers = new Map()\n\n .set('W_0086', (error: IRemoteError) => {\n this.showInputErrorDialog();\n return EMPTY;\n })\n .set('W_0544', (error: IRemoteError) => {\n this.showInputErrorDialog();\n return EMPTY;\n })\n .set('W_0545', (error: IRemoteError) => {\n this.showCancelErrorDialog(error);\n return EMPTY;\n })\n .set('W_0087', (error: IRemoteError) => {\n this.showCancelErrorDialog(error);\n return EMPTY;\n });\n }\n\n private showInputErrorDialog = () => {\n this._dialogAdapter.open(OtpWarningComponent);\n };\n\n private showCancelErrorDialog = ({ message, title }: IRemoteError) => {\n const cancelDialogRef = this._dialogAdapter.openAlert({ message, title });\n\n cancelDialogRef.onDismiss$\n .pipe(\n takeOnce(),\n tap((result) => {\n const { name } = SettingsMap.scanIntro();\n this._navAdapter.moveTo(name);\n })\n )\n .subscribe();\n };\n}\n","import { computed, EffectRef, inject, Injectable, Signal } from '@angular/core';\nimport { IHttpResponse, IOtpData, IOtpModel } from '@partners/api';\nimport { IRemoteError } from '@partners/errors';\nimport { HttpService, tapResult, tapStatus } from '@partners/http';\nimport { SettingsMap, TFeature } from '@partners/settings';\nimport { AuthLoginStore, AuthOtpStore } from '@partners/state';\nimport { takeOnce } from '@partners/utils';\nimport { catchError, EMPTY, Observable, tap } from 'rxjs';\nimport { DialogAdapter } from '../../dialogs';\nimport { NavigationAdapter } from '../../navigation';\nimport { AuthOtpSeverities } from './errors';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthFacade {\n isAuthenticated$$: Signal;\n isNotAuthenticated$$: Signal;\n\n otpToken$$: Signal;\n isVoiceOtp$$: Signal;\n otpPhoneNumber$$: Signal;\n isMultipleOtpSendAttempts$$: Signal;\n\n private _httpService = inject(HttpService);\n private _authOtpStore = inject(AuthOtpStore);\n private _navAdapter = inject(NavigationAdapter);\n private _loginStore = inject(AuthLoginStore);\n private _dialogAdapter = inject(DialogAdapter);\n\n private _otpSeverityHandler = inject(AuthOtpSeverities);\n private _effectRef: EffectRef;\n\n constructor() {\n this.isAuthenticated$$ = computed(() => this._loginStore.isLoggedIn$$());\n this.isNotAuthenticated$$ = computed(() => !this.isAuthenticated$$());\n\n this.otpToken$$ = computed(() => this._authOtpStore.data$$()?.token);\n this.isVoiceOtp$$ = computed(() => this._authOtpStore.model$$()?.isVoiceOtp);\n this.otpPhoneNumber$$ = computed(() => this._authOtpStore.data$$()?.phone);\n this.isMultipleOtpSendAttempts$$ = this._authOtpStore.isMultipleOtpSendAttempts$$;\n }\n\n ngOnDestroy(): void {\n this._effectRef && this._effectRef.destroy();\n }\n\n reSendOtp(model?: IOtpModel): Observable> {\n //send isRetryOrDirect indication to stay on page\n return this.sendOtp({ ...this._authOtpStore.model$$(), ...model }, { isRetryOrDirect: true }).pipe(\n catchError((error: IRemoteError) => {\n this.showReSendOtpErrorDialog(error);\n return EMPTY;\n }),\n tapResult((data: IOtpData) => {\n this._authOtpStore.dispatchUpdateOtpAttemptsCount();\n })\n );\n }\n\n sendFirstOtp(model: IOtpModel): Observable> {\n return this.sendOtp(model).pipe(\n catchError((error: IRemoteError) => {\n return this._otpSeverityHandler.inspect(error);\n }),\n tapResult((data: IOtpData) => {\n this._authOtpStore.dispatchUpdateOtpAttemptsCount();\n this._navAdapter.moveNext();\n })\n );\n }\n\n /**\n * @description\n * sends an otp password to the server for verification\n * @param model and object with the otp value\n * @param options isRetryOrDirect - indication weather this is a recurring attempt to login - or -\n * a direct attempt to login (sms send directly from server to user on load)\n * @returns an observable with the response data\n */\n sendOtp(model: IOtpModel, options?: { isRetryOrDirect?: boolean }): Observable> {\n return this._httpService.post('auth-otp', model).pipe(\n tapResult((data: IOtpData) => {\n this._authOtpStore.dispatchOtpLoadSuccess({ model, data });\n }),\n tapStatus(({ screenName }) => {\n if (screenName) {\n this._navAdapter.moveTo(screenName as TFeature);\n return;\n }\n if (!options?.isRetryOrDirect) {\n this._navAdapter.moveNext();\n }\n })\n );\n }\n\n private showReSendOtpErrorDialog({ title, message }: IRemoteError) {\n const dialogRef = this._dialogAdapter.openAlert({ title, message });\n\n dialogRef.onDismiss$\n .pipe(\n takeOnce(),\n tap(() => {\n const { name } = SettingsMap.identity();\n this._navAdapter.moveTo(name);\n })\n )\n .subscribe();\n }\n}\n","import { Injectable, computed, inject } from '@angular/core';\nimport {\n IChannel357,\n IChannel357Collection,\n IChannelSpam,\n IChannelSpamCollection,\n IChannelUpSale,\n IChannelsData,\n IChannelsModel,\n IHttpResponse\n} from '@partners/api';\nimport { HttpService, tapResult } from '@partners/http';\nimport { ChannelsStore } from '@partners/state';\nimport { isNotEmpty } from '@partners/utils';\nimport { Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ChannelsFacade {\n private _httpService = inject(HttpService);\n private _channelsStore = inject(ChannelsStore);\n\n readonly model$$ = computed(() => this._channelsStore.model$$());\n readonly data$$ = computed(() => this._channelsStore.data$$());\n\n readonly channels357Model$$ = computed(() => this._channelsStore.channels357Model$$());\n readonly spamModel$$ = computed(() => this._channelsStore.spamModel$$());\n readonly upSaleModel$$ = computed(() => this._channelsStore.upSaleModel$$());\n\n readonly isUpSaleMail$$ = computed(() => this.data$$()?.isUpSaleMail);\n readonly isUpSaleSms$$ = computed(() => this.data$$()?.isUpSaleSms);\n\n readonly isRegisteredBanking$$ = computed(() => {\n const bankingChannels: IChannel357Collection = this.channels357Model$$();\n const isAllReg = Object.values(bankingChannels).every((value: IChannel357) => value.isClientRegistered);\n return isAllReg;\n });\n\n readonly isRegisteredInternet$$ = computed(() => {\n const { internet } = this.channels357Model$$();\n return internet.isClientRegistered;\n });\n\n readonly isRegisteredTelephony$$ = computed(() => {\n const { telephony } = this.channels357Model$$();\n return telephony.isClientRegistered;\n });\n\n readonly isRegisteredSpam$$ = computed(() => {\n const spamChannels: IChannelSpamCollection = this.spamModel$$();\n const isAllReg = Object.values(spamChannels).every((value: IChannelSpam) => value.isClientRegisteredService);\n return isAllReg;\n });\n\n readonly isRegisteredSpamMail$$ = computed(() => {\n const { spamMail } = this.spamModel$$();\n return spamMail.isClientRegisteredService;\n });\n\n readonly isRegisteredSpamSms$$ = computed(() => {\n const { spamSms } = this.spamModel$$();\n return spamSms.isClientRegisteredService;\n });\n\n readonly isRegisteredUpSale$$ = computed(() => {\n const upSaleChannels: IChannelSpamCollection = this.spamModel$$();\n const isAllReg = Object.values(upSaleChannels).every((value: IChannelUpSale) => value.isClientRegisteredService);\n return isAllReg;\n });\n\n readonly isRegisteredAll$$ = computed(() => {\n return this.isRegisteredBanking$$() && this.isRegisteredSpam$$() && this.isRegisteredUpSale$$();\n });\n\n constructor() {}\n\n loadChannels(model?: IChannelsModel): Observable> {\n return this._httpService.fetch('banking').pipe(\n tapResult((data: IChannelsData) => {\n const model = this.createModelFromData(data);\n this._channelsStore.dispatchChannelsLoadSuccess({ model, data });\n })\n );\n }\n\n /**\n * @description\n * we need to copy the model data from the http response's data object into the model\n * object, this is far from optimal architecture, however we are plagued by a diseased\n * server architecture, until it is refactored - we suffer in silence.\n *\n * @param { channel357, upsales, spam } a destruction of a channels data object\n * @returns a model object with data from the server\n */\n private createModelFromData(channelsData: IChannelsData): IChannelsModel {\n const { channel357, upsales, spam } = channelsData;\n\n channelsData.isUpSaleMail = isNotEmpty(upsales?.calMail);\n channelsData.isUpSaleSms = isNotEmpty(upsales?.calMail);\n\n let model: IChannelsModel = {\n banking: {\n word: null,\n channel357: {\n internet: undefined,\n telephony: undefined\n },\n spam: {\n spamMail: undefined,\n spamSms: undefined\n },\n upsales: {\n calMail: undefined,\n calSms: undefined\n }\n }\n };\n if (channel357?.internet) {\n model.banking.channel357.internet = {\n ...model.banking.channel357.internet,\n ...channel357.internet\n };\n }\n if (channel357?.telephony) {\n model.banking.channel357.telephony = {\n ...model.banking.channel357.telephony,\n ...channel357.telephony\n };\n }\n\n if (spam?.spamMail) {\n model.banking.spam.spamMail = {\n ...model.banking.spam.spamMail,\n ...spam.spamMail\n };\n }\n if (spam?.spamSms) {\n model.banking.spam.spamSms = {\n ...model.banking.spam.spamSms,\n ...spam.spamSms\n };\n }\n\n if (upsales?.calMail) {\n model.banking.upsales.calMail = {\n ...model.banking.upsales.calMail,\n ...upsales.calMail\n };\n }\n if (upsales?.calSms) {\n model.banking.upsales.calSms = {\n ...model.banking.upsales?.calSms,\n ...upsales?.calSms\n };\n }\n\n return model;\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { IModelState } from '@partners/api';\nimport { IRemoteError } from '@partners/errors';\nimport { ContactStore } from '@partners/state';\nimport { isNotEmpty } from '@partners/utils';\nimport { PolicyService } from '../../process';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ContactFacade {\n private _policyService = inject(PolicyService);\n private _contactStore = inject(ContactStore);\n\n contactModel$$ = this._contactStore.model$$;\n\n constructor() {}\n\n /**\n * @description\n * there are some scenarios where contact form should display a club membership input field. the field's\n * state (hidden | required) is resolved here and registered into the contact store. these scenarios are\n * exclusive to the card process. the membership field's state should to be resolved in the following cases:\n * scenario 1: on contact form first load\n * scenario 2: on contact form submit failure with severities (W_0024 | W_0038 | W_0039)\n *\n * @param error an http remote error will be passed in on scenario 2 only\n */\n resolveClubMembershipState = (error?: IRemoteError): void => {\n const membershipState: IModelState = {\n hidden: true,\n required: false\n };\n\n const severityCode = error?.severity?.code;\n\n if (!this._policyService.businessPartner$$()) {\n return;\n }\n\n const { isClubMemRequired, isClubMemberMustField } = this._policyService.businessPartner$$();\n\n if (severityCode) {\n const isVisibleAndOptional =\n isClubMemRequired === 3 &&\n isNotEmpty(isClubMemberMustField) &&\n !isClubMemberMustField &&\n severityCode &&\n ['W_0038', 'W_0039'].indexOf(severityCode) != -1;\n\n const isVisibleAndRequired = isClubMemRequired === 4 && isClubMemberMustField && severityCode === 'W_0024';\n\n if (isVisibleAndOptional || isVisibleAndRequired) {\n Object.assign(membershipState, { hidden: false, required: isVisibleAndRequired });\n }\n } else {\n const isVisible = isClubMemRequired === 2 && isNotEmpty(isClubMemberMustField) && !isClubMemberMustField;\n if (isVisible) {\n Object.assign(membershipState, { hidden: false });\n }\n }\n\n this._contactStore.dispatchUpdateClubMembershipState(membershipState);\n };\n}\n","import { Injectable, computed, inject } from '@angular/core';\nimport { IDisclosureModel } from '@partners/api';\nimport { DisclosureStore, SimulatorStore } from '@partners/state';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DisclosureFacade {\n private _simulatorStore = inject(SimulatorStore);\n private _disclosureStore = inject(DisclosureStore);\n\n disclosureModel$$ = computed(() => {\n const simulatorModel = this._simulatorStore.model$$();\n const loanProfile = this._simulatorStore.loanProfile$$();\n const loanProfileOption = this._simulatorStore.currentOption$$();\n const { loanAmount, numOfPayments } = simulatorModel;\n\n const disclosureModel: IDisclosureModel = {\n reqProfileCode: loanProfile.loanProfileCode,\n reqAmount: loanAmount,\n reqPaymentsNum: numOfPayments,\n reqInterest: loanProfileOption.interest,\n interestType: loanProfile.interestType,\n gapRate: loanProfileOption.gapRate\n };\n\n return disclosureModel;\n });\n\n loanProfile$$ = this._simulatorStore.loanProfile$$;\n isVariableInterest$$ = this._simulatorStore.isVariableInterest$$;\n\n constructor() {}\n\n /**\n * @description\n * a bridge method to allow sibling domains (loan simulator & loan disclosure) cross-access\n * to each other's model & data. before loading disclosure domain, we need to create & init\n * its model from the simulator data\n */\n createDisclosureModel() {\n const model = this.disclosureModel$$();\n this._disclosureStore.dispatchUpdateModel(model);\n }\n}\n","import { Injectable, Signal, computed, inject } from '@angular/core';\nimport { PolicyService } from '../../process';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CardLeadFacade {\n readonly isCardLeadFormPresented$$: Signal = computed(() => {\n const leadConfig = this._policyService.findFeatureConfig$$('lead');\n return leadConfig()?.indication['isLeadFormPresented'];\n });\n private _policyService = inject(PolicyService);\n\n constructor() {}\n}\n","import { Injectable } from '@angular/core';\nimport { ICalScanConfig } from '@calsale/scanovate';\n@Injectable()\nexport class ScanConfig {\n static get config(): ICalScanConfig {\n return {\n maxScanAttempts: 5,\n maxAttemptsViolationLevel: 'warning',\n scanCustomization: {\n classNames: 'scan-iframe'\n },\n iframeFolder: '/demo',\n extraData: {\n appName: 'demo',\n processConfigName: 'mathilda.json',\n displayTextFileName: 'hebrew_client_config.json'\n }\n };\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { TCalConsumerError } from '@calsale/scanovate';\nimport { IRemoteError, ISeverityHandler, SeverityHandler, TSeverityCallback, TSeverityCode } from '@partners/errors';\nimport { NavigationService } from '@partners/navigation';\nimport { SettingsMap, TAlertFeature } from '@partners/settings';\nimport { ScanDocumentStore } from '@partners/state';\nimport { EMPTY } from 'rxjs';\nimport { NavigationAdapter } from '../../../navigation/services/navigation-adapter.service';\nimport { TScanProcessError } from './scan-errors.types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ScanSeverities extends SeverityHandler implements ISeverityHandler {\n override handlers: Map;\n /**An errors from the actual scan process returned to us from scanovate iframe. */\n scanErrorHandlers: Map {}>;\n private _scanDocumentStore = inject(ScanDocumentStore);\n private _navAdapter = inject(NavigationAdapter);\n private _navService = inject(NavigationService);\n\n constructor() {\n super();\n this.scanErrorHandlers = new Map {}>()\n //*Token not provided\n .set(1005, () => {\n const { name } = SettingsMap.identity();\n this._navAdapter.moveTo(name);\n return EMPTY;\n })\n //*Invalid token\n .set(1006, () => {\n const { name } = SettingsMap.identity();\n this._navAdapter.moveTo(name);\n return EMPTY;\n })\n //* 'CameraNoRelevantDeviceFound' 1108\n .set(1108, () => {\n //should navigate to identity.\n const { name } = SettingsMap.identity();\n this._navAdapter.moveTo(name);\n return EMPTY;\n })\n .set('unsupportedDocument', () => {\n this._navAdapter.moveBack();\n return EMPTY;\n })\n //*timeout\n .set(2009, () => {\n const { name } = SettingsMap.failedScanAttemptAlert();\n this._navAdapter.toAlert(name as TAlertFeature);\n return EMPTY;\n })\n //*timeout\n .set(1110, () => {\n const { name } = SettingsMap.failedScanAttemptAlert();\n this._navAdapter.toAlert(name as TAlertFeature);\n return EMPTY;\n })\n //*\"UserCanceled\"\n .set(1105, () => {\n this._navAdapter.moveBack();\n return EMPTY;\n })\n\n //*an unknown error from scan process.\n .set('unknown', () => {\n const { name } = SettingsMap.failedScanAttemptAlert();\n this._navAdapter.toAlert(name as TAlertFeature);\n return EMPTY;\n });\n\n this.handlers = new Map()\n .set('W_0711', (error: IRemoteError) => {\n const { name } = SettingsMap.failedScanAttemptAlert();\n this._navAdapter.toAlert(name as TAlertFeature);\n return EMPTY;\n })\n .set('W_0712', (error: IRemoteError) => {\n //navigate to message/202\n const { name } = SettingsMap.oldIdentificationCardAlert();\n this._navAdapter.toAlert(name as TAlertFeature);\n return EMPTY;\n })\n .set('W_0563', (error: IRemoteError) => {\n //navigate to message/0 in sigma legacy\n const { path } = SettingsMap.genericAlert();\n this._navService.moveAny(`/${path}/${error.token}`);\n return EMPTY;\n })\n .set('W_0241', (error: IRemoteError) => {\n //navigate to message/110\n const { name } = SettingsMap.cardQuotaAlert();\n this._navAdapter.toAlert(name as TAlertFeature);\n return EMPTY;\n })\n .set('W_0028', (error: IRemoteError) => {\n //navigate to message/204 in old sigma\n const { name } = SettingsMap.oldIdentificationCardAlert();\n this._navAdapter.toAlert(name as TAlertFeature);\n return EMPTY;\n });\n }\n}\n","import { Injectable, Signal, computed, inject, isSignal, signal } from '@angular/core';\nimport {\n CalScanService,\n ICalScanAttemptFailure,\n ICalScanData,\n ICalScanError,\n TCalConsumerError,\n TCalScanInitialization,\n TCalScanProcessResponse\n} from '@calsale/scanovate';\nimport { IHttpResponse, IHttpStatus, IScanDocumentData, IScanDocumentModel } from '@partners/api';\nimport { IOcrScanDocsOption, LocalCatalog } from '@partners/catalog';\nimport { IRemoteError } from '@partners/errors';\nimport { HttpService, filterStatus, tapResult } from '@partners/http';\nimport { GLOBAL_SETTINGS, SettingsMap } from '@partners/settings';\nimport { ScanDocumentStore, ShellStore } from '@partners/state';\nimport { coerceArray, coerceNumber, takeOnce } from '@partners/utils';\nimport { Observable, catchError, switchMap, tap, throwError } from 'rxjs';\nimport { NavigationAdapter } from '../../../navigation';\nimport { ScanSeverities, TScanProcessError } from '../errors';\n@Injectable({ providedIn: 'root' })\nexport class ScanFacade {\n genderName$$: Signal = computed(() => {\n if (!isSignal(this.#scanDocumentStore.model$$)) {\n return '';\n }\n const { gender } = this.#scanDocumentStore.model$$();\n return LocalCatalog.genderList$$()?.find((item) => item.value === gender)?.key;\n });\n calScanService = inject(CalScanService);\n #scanSeverities = inject(ScanSeverities);\n #shellStore = inject(ShellStore);\n #httpService = inject(HttpService);\n #scanDocumentStore = inject(ScanDocumentStore);\n #navAdapter = inject(NavigationAdapter);\n #shellConfig = inject(GLOBAL_SETTINGS);\n\n readonly documentToScanOptions$$ = signal([]);\n readonly selectedDocToScan$$: Signal;\n\n constructor() {\n this.selectedDocToScan$$ = computed(() => this.#scanDocumentStore.model$$()?.selectedDocId);\n }\n updateDocNameForDisplay(documentToScanOptions: IOcrScanDocsOption[]): IOcrScanDocsOption[] {\n return documentToScanOptions\n ?.map(({ key, value }) => {\n return { key: 'צילום '.concat(key), value };\n })\n .reverse();\n }\n updateGender(gender: number): void {\n this.#scanDocumentStore.dispatchSubmitScanDocument({ gender });\n const { name } = SettingsMap.scanDetails();\n this.#navAdapter.moveTo(name);\n }\n isMaxAttemptsExceeded$$(): Signal {\n return computed(() => {\n return this.#scanDocumentStore.data$$()?.isMaxAttemptsExceeded;\n });\n }\n isOcrFailed$$ = computed(() => this.#scanDocumentStore.error$$());\n\n /**\n * @description\n * starts the actual scan process\n * @param selectedDocId\n * @returns Observable\n */\n scan$(selectedDocId: number): Observable {\n this.#scanDocumentStore.dispatchLoadScanDocument(selectedDocId);\n return this.scanSelectedDocument$(selectedDocId).pipe(\n catchError((error: ICalScanError) => {\n this.#scanDocumentStore.dispatchSubmitScanDocumentFailure({ error });\n if (error?.code || error?.name) {\n this.handleScanError(error);\n }\n return throwError(() => error);\n }),\n tap((scannerResponse: TCalScanInitialization | ICalScanAttemptFailure) => {\n const hasMaxAttemptsWarning = (scannerResponse as TCalScanInitialization)?.hasMaxAttemptsWarning;\n this.#scanDocumentStore.dispatchUpdateMaxAttemptsError(hasMaxAttemptsWarning);\n })\n );\n }\n\n /**\n * @description create scan process\n * first by extending the scan configuration with more necessary data like auth token, the selected document code and how we want to create the scan process.\n * in our case we ask the library for an iframe.\n * than we will use the library api to create the actual scan iframe.\n * @param selectedDocId - the document code the user choose to scan.\n * @returns iframe$ - an observable of an iframe html element\n */\n scanSelectedDocument$(selectedDocId: number): Observable {\n //if the scan process disabled in dev environment for example, we will handle it here\n this.handleDisabledOcr();\n\n this.#scanDocumentStore.dispatchSubmitScanDocument({ selectedDocId });\n const token = this.#shellStore.token$$();\n const { environment } = this.#shellConfig;\n const iframe$ = this.calScanService.createScanOfDocByCode$(\n coerceNumber(selectedDocId),\n { resolveType: 'iframe' },\n {\n serverUrl: environment.scanOcrUrl,\n extraData: {\n token\n }\n }\n );\n return iframe$;\n }\n\n /**\n * @description here we will listen to the scan iframe event.\n * handle a success scan or a failed one.\n * @param responseType - the type of response we want to receive (just the data or the complete scan resp).\n * @returns Observable\n */\n listenToScanMessages(): Observable {\n return this.calScanService.listenToScanMessages().pipe(\n takeOnce(),\n catchError((error: ICalScanError) => {\n this.#scanDocumentStore.dispatchSubmitScanDocumentFailure({ error });\n //handle errors from the scan process.\n if (error?.code || error?.name) {\n this.handleScanError(error);\n }\n return throwError(() => error);\n }),\n switchMap((response: TCalScanProcessResponse) => {\n return this.handleScanSuccess(response as unknown as ICalScanData);\n }),\n filterStatus()\n );\n }\n /**\n * @description in here we will handle errors from the scan process itself.\n * first we will take the error code thrown to us by the scan iframe.\n * than extract how to handle it from scanErrorHandlers.\n * if the error code is unknown we will extract from scanErrorHandlers by code equals to 0\n * @param error\n */\n private handleScanError({ code, name }: ICalScanError): void {\n const knownErrorCodeHandler = this.#scanSeverities.scanErrorHandlers.get(code as TScanProcessError);\n const knownErrorNameHandler = this.#scanSeverities.scanErrorHandlers.get(name as TCalConsumerError);\n if (knownErrorCodeHandler) {\n knownErrorCodeHandler.call(this);\n } else if (knownErrorNameHandler) {\n knownErrorNameHandler.call(this);\n } else {\n //handle an unknown error code.\n this.#scanSeverities.scanErrorHandlers.get('unknown').call(this);\n }\n }\n /**\n * @description\n * handle a success scan by:\n * updating the store\n * create the right model for and invoke scanDocument http call\n * navigate to the right page according to scanDocument response and the document selected to scan.\n * if the document has gender field we will navigate to scan-details page. else to gender page.\n * @param response\n * @returns Observable>\n */\n private handleScanSuccess(response: ICalScanData): Observable> {\n const model = this.convertScanDataToModel(response);\n return this.sendScanDocument(model as IScanDocumentModel, coerceArray(response.images));\n }\n private sendScanDocument(model: IScanDocumentModel, documents: string[]) {\n this.#scanDocumentStore.dispatchSubmitScanDocument(model);\n return this.#httpService.put('scan-document', model).pipe(\n catchError((error: IRemoteError) => {\n this.#scanDocumentStore.dispatchSubmitScanDocumentFailure({ error });\n return this.#scanSeverities.inspect(error);\n }),\n tapResult((data: IScanDocumentData) => {\n this.#scanDocumentStore.dispatchSubmitScanDocument({ documents });\n this.#scanDocumentStore.dispatchSubmitScanDocumentSuccess({ data });\n })\n );\n }\n /**\n * @description\n * in some cases we will want to turn off the scan process.\n * for example in development mode or testers without scanner.\n * the flag for that is isScanOcrDisabled from our environment file.\n * if the scan process is turned off, we will navigate directly to identity page.\n */\n private handleDisabledOcr() {\n const { environment } = this.#shellConfig;\n if (environment.isScanOcrDisabled) {\n const { name } = SettingsMap.identity();\n this.#navAdapter.moveTo(name);\n }\n }\n /**\n * @description\n * here we will get the data from the actual scan process and convert it\n * to the request object needed for scan document http call.\n * @param response response from scan iframe response\n * @returns\n */\n private convertScanDataToModel(response: ICalScanData) {\n if (!response?.fields || !response?.images?.length) {\n return null;\n }\n const {\n date_of_birth,\n id_number,\n first_name_hebrew,\n last_name_hebrew,\n first_name_english,\n last_name_english,\n date_of_issue,\n date_of_expiry,\n gender\n } = response?.fields;\n const model: IScanDocumentModel = {\n birthDate: this.castDate(date_of_birth),\n engFirstName: first_name_english,\n engLastName: last_name_english,\n expiryDate: this.castDate(date_of_expiry),\n firstName: first_name_hebrew,\n idIssueDate: this.castDate(date_of_issue),\n idNum: id_number,\n lastName: last_name_hebrew,\n gender: this.calculateGenderCode(gender)\n };\n return model;\n }\n /**\n * @description\n * after a successful scan, if the documents that was scan is a regular or biometric id,\n * the scanner might return a gender value of type string.\n * as a responsible developers we have no choice but convert it into a code of type number.\n * @param gender string value from scanner.\n * @returns gender code in cal convection of type number\n */\n\n private calculateGenderCode(gender: string): number {\n if (!gender) {\n return undefined;\n }\n return LocalCatalog.genderList$$()?.find((item) => item.key === gender)?.value;\n }\n /**\n * @description\n * cast dates specificity from scanovate date format convection into calsale api requirements\n * @param value\n * @returns fixed date\n */\n private castDate(value: string) {\n return value?.replace(/\\./g, '/');\n }\n}\n","import { computed, inject, Injectable } from '@angular/core';\nimport { tapSuccess } from '@partners/errors';\nimport { HttpService } from '@partners/http';\nimport { coerceNumber, takeOnce } from '@partners/utils';\nimport { NavigationAdapter } from '../../navigation';\nimport { PolicyService } from '../../process';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SimulatorFacade {\n #httpService = inject(HttpService);\n #navAdapter = inject(NavigationAdapter);\n #policyService = inject(PolicyService);\n\n readonly #simulatorConfig$$ = this.#policyService.findFeatureConfig$$('simulator');\n\n readonly isLoanAmountReadonly$$ = computed(() => {\n const isLoanAmountReadonly = this.#simulatorConfig$$()?.indication['isLoanAmountReadonly'];\n return isLoanAmountReadonly;\n });\n readonly approvedLoanAmount$$ = computed(() => {\n const approvedLoanAmount = this.#simulatorConfig$$()?.text['maxLoanAmount'];\n return coerceNumber(approvedLoanAmount);\n });\n updateLoanAmount({ loanAmount }: { loanAmount: number }) {\n return this.#httpService.post('simulator', { loanAmount }).pipe(\n takeOnce(),\n tapSuccess(() => {\n this.#navAdapter.toSimulator();\n })\n );\n }\n}\n","import { Component, OnDestroy, inject, signal } from '@angular/core';\n\nimport { ComponentType } from '@angular/cdk/portal';\nimport { CdkScrollable } from '@angular/cdk/scrolling';\nimport { DialogRef, IAlertConfig, IConfirmConfig, IDialogConfig, IGuideConfig, ITooltipConfig } from '@partners/ui';\nimport { DialogAdapter } from '../../../dialogs';\nimport { NavigationAdapter } from '../../../navigation';\n\n/**\n * @description\n * a base feature-view component, this component meant to be inherited by each features' main view.\n * it provides shortcuts access to common view behaviors, such as dialog type launch methods etc'\n */\n\n@Component({\n standalone: true,\n template: '',\n hostDirectives: [CdkScrollable]\n})\nexport class BaseFeatureView implements OnDestroy {\n protected _navAdapter = inject(NavigationAdapter);\n protected _dialogAdapter = inject(DialogAdapter);\n\n readonly isPendingSubmit = signal(false);\n\n constructor() {}\n\n ngOnDestroy(): void {}\n\n protected navigateBack() {\n this._navAdapter.moveBack();\n }\n\n protected openDialog(component: ComponentType, dialogConfig?: IDialogConfig): DialogRef {\n return this._dialogAdapter.open(component, dialogConfig);\n }\n\n protected openTooltip(tipConfig: ITooltipConfig): DialogRef {\n return this._dialogAdapter.openTooltip(tipConfig);\n }\n\n protected openAlert(alertConfig: IAlertConfig): DialogRef {\n return this._dialogAdapter.openAlert(alertConfig);\n }\n\n protected openGuide(guideConfig: IGuideConfig): DialogRef {\n return this._dialogAdapter.openGuide(guideConfig);\n }\n\n protected openConfirm(confirmConfig: IConfirmConfig): DialogRef {\n return this._dialogAdapter.openConfirm(confirmConfig);\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n Renderer2,\n ViewEncapsulation,\n inject\n} from '@angular/core';\nimport { ICalScanAttemptFailure, ICalScanError, TCalScanInitialization } from '@calsale/scanovate';\nimport { IHttpStatus } from '@partners/api';\nimport { TFeature } from '@partners/settings';\nimport { takeOnce } from '@partners/utils';\nimport { catchError, filter, switchMap, tap, throwError } from 'rxjs';\nimport { ScanFacade } from '../../../facades';\nimport { BaseFeatureView } from '../../../feature/components/base-feature-view/base-feature-view.component';\n\n@Component({\n selector: 'scan',\n standalone: true,\n template: ``,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ScanComponent extends BaseFeatureView implements AfterViewInit {\n @Input()\n selectedDocId: number;\n private renderer: Renderer2 = inject(Renderer2);\n private elementRef: ElementRef = inject(ElementRef);\n private scanFacade = inject(ScanFacade);\n\n ngAfterViewInit(): void {\n this.scanDocument();\n }\n /**\n * @description\n * create the actual scan process and handling errors and success according to\n * the selected document.\n */\n private scanDocument() {\n this.scanFacade\n //invoke scan process\n .scan$(this.selectedDocId)\n .pipe(\n takeOnce(),\n //filter out iframeOrError equals to null or undefined.\n filter((iframeOrError: TCalScanInitialization | ICalScanAttemptFailure) => !!iframeOrError),\n tap((scanMethod) => {\n const scanIframe = (scanMethod as TCalScanInitialization)?.iframeOrSrc;\n if (scanIframe instanceof HTMLIFrameElement) {\n this.renderer.appendChild(this.elementRef.nativeElement, scanIframe);\n }\n }),\n //return new observable of events from the scan process like an error or success scan.\n switchMap(() => {\n return this.scanFacade.listenToScanMessages();\n }),\n\n switchMap(({ screenName }: IHttpStatus) => {\n const screen = screenName || 'scan-details';\n return this._navAdapter.navigateAfterScan(screen as TFeature);\n }),\n //in any error appears we will clear the scan iframe from our dom.\n catchError((error: ICalScanError) => {\n this.removeIframe();\n return throwError(() => error);\n })\n )\n //after a scan process was ended (success or error) we always wants to delete it from the dom.\n .subscribe(() => {\n this.removeIframe();\n });\n }\n /**\n * @description remove scan iframe from window.\n */\n private removeIframe() {\n this.renderer.removeChild(this.elementRef.nativeElement, this.elementRef.nativeElement);\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, isSignal, ViewEncapsulation } from '@angular/core';\nimport { SettingsMap } from '@partners/settings';\nimport { ShellStore } from '@partners/state';\nimport { ThemeAssetComponent } from '@partners/themes';\nimport { isUndefined } from '@partners/utils';\n\n@Component({\n selector: 'secondary-logo',\n standalone: true,\n imports: [ThemeAssetComponent],\n template: `\n @if(hasSecondaryLogo()) {\n \n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'secondary-logo'\n }\n})\nexport class SecondaryLogoComponent {\n #shellStore = inject(ShellStore);\n\n readonly defaultLogoName = 'cal-logo';\n\n hasSecondaryLogo = computed(() => {\n if (!isSignal(this.#shellStore.params$$)) {\n return false;\n }\n\n if (isUndefined(this.#shellStore.params$$())) {\n return false;\n }\n\n const { partner } = this.#shellStore.params$$();\n const themeSettings = SettingsMap.themeSettings(partner);\n\n /** if no settings are found for this partner's secondary logo - we apply the default: visible */\n if (isUndefined(themeSettings?.isSecondaryLogoVisible)) {\n return true;\n }\n\n const { isSecondaryLogoVisible } = themeSettings;\n\n return isSecondaryLogoVisible;\n });\n}\n","import { Injectable, Signal, computed, inject } from '@angular/core';\nimport { IConfigDictionary } from '@partners/api';\nimport { ShellStore } from '@partners/state';\nimport { TConfigPartition, TLink } from '@partners/types';\nimport { PolicyService } from '../../process';\nimport { IConfigFacade } from '../model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport abstract class ConfigFacade implements IConfigFacade {\n protected readonly _policyService = inject(PolicyService);\n protected readonly _shellStore = inject(ShellStore);\n\n abstract readonly configDictionary$$: Signal;\n\n text$$ = computed>(() => this.configDictionary$$()?.text);\n indication$$ = computed>(() => this.configDictionary$$()?.indication);\n params$$ = computed>(() => this.configDictionary$$()?.params);\n links$$ = computed>(() => this.configDictionary$$()?.links);\n\n constructor() {}\n\n fromText$$(key: string): Signal {\n return computed(() => {\n const text: TConfigPartition = this.text$$();\n return this.fromConfig(text, key);\n });\n }\n\n fromIndication$$(key: string): Signal {\n return computed(() => {\n const ind: TConfigPartition = this.indication$$();\n return this.fromConfig(ind, key);\n });\n }\n\n fromParams$$(key: string): Signal {\n return computed(() => {\n const params: TConfigPartition = this.params$$();\n return this.fromConfig(params, key);\n });\n }\n\n fromLinks$$(key: string): Signal {\n return computed(() => {\n const links: TConfigPartition = this.links$$();\n return this.fromConfig(links, key);\n });\n }\n\n private fromConfig(dictionary: TConfigPartition, key: string): T {\n if (dictionary && key in dictionary) {\n return dictionary[key] as T;\n }\n return null;\n }\n}\n","import { Injectable, Signal, computed, inject } from '@angular/core';\nimport { IFeatureConfig } from '@partners/api';\nimport { FEATURE_SETTINGS } from '@partners/settings';\nimport { ConfigFacade } from './config.facade';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class FeatureConfig extends ConfigFacade {\n private _featureSettings = inject(FEATURE_SETTINGS);\n\n get featureName(): string {\n return this._featureSettings.name;\n }\n\n get configDictionary$$(): Signal {\n return computed(() => {\n const featuresConfig = this._policyService.featuresConfig$$();\n /** when features config array changes read the new values to keep ui current */\n return featuresConfig?.find((f) => f.name === this.featureName);\n });\n }\n\n constructor() {\n super();\n }\n}\n","import { Injectable, Signal } from '@angular/core';\nimport { IGlobalConfig } from '@partners/api';\nimport { ConfigFacade } from './config.facade';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GlobalConfig extends ConfigFacade {\n get configDictionary$$(): Signal {\n return this._shellStore.globalConfig$$;\n }\n\n constructor() {\n super();\n }\n}\n","import { HttpInterceptorFn, HttpResponse } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { IHttpResponse } from '@partners/api';\n\nimport { filter, map, tap } from 'rxjs/operators';\nimport { PolicyService } from '../../process';\n\n/**\n * @description\n * catches all remote (http) errors, which means all server responses with http erroneous status\n * (status > 299 or status < 200).\n * the erroneous status values indicates either:\n * (1) a technical error (server unavailable | page not found | no internet connection etc')\n * (2) business logic error (missing data | miscalculation | refusal to service etc')\n *\n * @param request the current http request\n * @param next a method of propagating the request forward to allow interception\n * @returns the next tick in the request process\n */\n\nexport const featureConfigInterceptor: HttpInterceptorFn = (request, next) => {\n const policyService = inject(PolicyService);\n // const featureSettings = inject(FEATURE_SETTINGS);\n\n return next(request).pipe(\n filter((event) => event instanceof HttpResponse),\n map((event) => event as HttpResponse),\n tap((response: HttpResponse) => {\n const { body } = response;\n const { result } = body as IHttpResponse;\n if (result?.config) {\n // policyService.updateFeatureConfig();\n }\n })\n );\n};\n\n// const context: IHttpContext = ContextBuilder.getContext(request);\n// const { resolvers } = context;\n","import { FeatureConfig } from '../facades';\n\nexport const provideFeatureConfig = () => {\n return [FeatureConfig];\n};\n","import { AfterViewInit, Directive, ElementRef, Input, OnDestroy, Renderer2, inject } from '@angular/core';\nimport { TTerminationReason } from '@partners/types';\nimport { ProfileService } from '../../process';\n\n@Directive({\n selector: '[exitButton]',\n standalone: true\n})\nexport class ExitButtonDirective implements AfterViewInit, OnDestroy {\n @Input()\n exitButton: TTerminationReason;\n\n get nativeElement(): HTMLElement {\n return this._elementRef.nativeElement;\n }\n\n private _clickEventRef: () => void;\n private _renderer = inject(Renderer2);\n private _elementRef = inject(ElementRef);\n private _profileService = inject(ProfileService);\n\n constructor() {}\n\n ngAfterViewInit(): void {\n this.addClickListener();\n }\n\n ngOnDestroy(): void {\n this._clickEventRef && this._clickEventRef();\n }\n\n private addClickListener(): void {\n const button = this.nativeElement.querySelector('button');\n if (!button) {\n return;\n }\n this._clickEventRef = this._renderer.listen(button, 'click', () => {\n this._profileService.terminateProcess(this.exitButton);\n });\n }\n}\n","import { Directive, HostListener, Input, inject } from '@angular/core';\nimport { TGuideFeature } from '@partners/settings';\nimport { NavigationAdapter } from '../../navigation';\n\n/**\n * @description\n * this directive to simplify and encapsulate direct navigation to a \"guide\" type message page\n * (see domain message/guide/...)\n * to use this directive place it on any html element, and give it the name of the guide page\n * component (see TGuideFeature)\n * example:\n * מהו CVV?\n */\n@Directive({\n selector: '[guideLink]',\n standalone: true\n})\nexport class GuideLinkDirective {\n @Input()\n guideLink: TGuideFeature;\n\n private _navAdapter = inject(NavigationAdapter);\n\n @HostListener('click', ['$event'])\n public onClick(event: MouseEvent | TouchEvent): void {\n this._navAdapter.toGuide(this.guideLink);\n }\n\n constructor() {}\n}\n","import {\n Directive,\n EffectRef,\n Injector,\n OnDestroy,\n Signal,\n TemplateRef,\n ViewContainerRef,\n effect,\n inject\n} from '@angular/core';\n\n/**\n * @description\n * a base structural directive, it will allows the rendering of its template only if the \"isMatch$$\"\n * predicate is true. when the isMatch$$ IS true, content will be injected into the DOM, if false -\n * content will be removed from the DOM.\n *\n * this directive is meant to be consumed by inheritance (only) by other structural directives - all\n * of which implements the \"isMatch$$\" property requirement. this directive is not to be used directly\n * (note - there is no selector),\n */\n\n@Directive({\n standalone: true\n})\nexport abstract class TemplateAssertDirective implements OnDestroy {\n /** an abstract boolean predicate resolver - must be implemented in each inheritor of this directive */\n abstract readonly isMatch$$: Signal;\n\n private _containerRef = inject(ViewContainerRef);\n private _templateRef = inject(TemplateRef);\n private _injector = inject(Injector);\n\n private _toggleRef: EffectRef;\n\n constructor() {\n this._toggleRef = effect(\n () => {\n if (!this.isMatch$$) {\n return;\n }\n /** resolve the isMatch predicate */\n const isMatch = this.isMatch$$();\n /** clear previous or existing content */\n this._containerRef.clear();\n if (isMatch) {\n /** render the new content */\n this._containerRef.createEmbeddedView(this._templateRef);\n }\n },\n { injector: this._injector, allowSignalWrites: true }\n );\n }\n\n ngOnDestroy(): void {\n this._toggleRef.destroy();\n }\n}\n","import { Directive, computed, inject } from '@angular/core';\nimport { CustomerFacade } from '../../../facades';\nimport { TemplateAssertDirective } from '../template-assert.directive';\n\n/**\n * @description\n * this is a structural directive, it will render its guarded context only if the\n * authentication state allows it, meaning: if user IS authenticated\n */\n\n@Directive({\n standalone: true,\n selector: '[isUnVerifiedCustomer]'\n})\nexport class IsUnVerifiedCustomerDirective extends TemplateAssertDirective {\n override readonly isMatch$$ = computed(() => this._customerFacade.isVerifiedCustomer$$() !== true);\n\n private _customerFacade = inject(CustomerFacade);\n\n constructor() {\n super();\n }\n}\n","import { Directive, computed, inject } from '@angular/core';\nimport { DisclosureFacade } from '../../../facades';\nimport { TemplateAssertDirective } from '../template-assert.directive';\n\n@Directive({\n standalone: true,\n selector: '[isVariableInterest]'\n})\nexport class IsVariableInterestDirective extends TemplateAssertDirective {\n override readonly isMatch$$ = computed(() => this._disclosureFacade.isVariableInterest$$());\n\n private _disclosureFacade = inject(DisclosureFacade);\n\n constructor() {\n super();\n }\n}\n","import { Directive, Input, computed, inject, signal } from '@angular/core';\nimport { Process } from '@partners/api';\nimport { AccountStatusEnum } from '@partners/constants';\nimport { IS_CARD_PROCESS, IS_LOAN_PROCESS, PolicyService } from '../../../process';\nimport { TemplateAssertDirective } from '../template-assert.directive';\n\ntype TMultiAssertScope = 'all' | 'atLeastOne' | 'none';\n\n/**\n * @description\n * this is a structural directive, it will render its guarded context only if the\n * authentication state allows it, meaning: if user IS authenticated\n */\n\n@Directive({\n standalone: true,\n selector: '[multiAssertion]'\n})\nexport class MultiAssertionDirective extends TemplateAssertDirective {\n private _process$$ = signal(undefined);\n private _account$$ = signal(undefined);\n private _scope$$ = signal('all');\n\n @Input()\n multiAssertion: null;\n\n @Input()\n set multiAssertionProcess(value: keyof typeof Process) {\n this._process$$.set(value);\n }\n\n @Input()\n set multiAssertionAccount(value: keyof typeof AccountStatusEnum) {\n this._account$$.set(value);\n }\n\n @Input()\n set multiAssertionScope(value: TMultiAssertScope) {\n this._scope$$.set(value);\n }\n\n readonly isCardProcess$$ = inject(IS_CARD_PROCESS);\n readonly isLoanProcess$$ = inject(IS_LOAN_PROCESS);\n readonly isNewAccount$$ = computed(() => this._policyService.isNewAccount$$());\n readonly isExistentAccount$$ = computed(() => !this.isNewAccount$$());\n\n readonly _policyService = inject(PolicyService);\n\n override readonly isMatch$$ = computed(() => {\n let isMatchProcess = undefined;\n let isMatchAccount = undefined;\n\n switch (this._process$$()) {\n case 'card': {\n isMatchProcess = this.isCardProcess$$();\n break;\n }\n case 'loan': {\n isMatchProcess = this.isLoanProcess$$();\n break;\n }\n default: {\n isMatchProcess = false;\n }\n }\n\n switch (this._account$$()) {\n case 'new': {\n isMatchAccount = this.isNewAccount$$();\n break;\n }\n case 'existent': {\n isMatchAccount = this.isExistentAccount$$();\n break;\n }\n default: {\n isMatchAccount = false;\n }\n }\n\n if (this._scope$$() === 'all') {\n return isMatchAccount && isMatchProcess;\n }\n\n if (this._scope$$() === 'atLeastOne') {\n return isMatchAccount || isMatchProcess;\n }\n\n return !isMatchAccount && !isMatchProcess;\n });\n\n constructor() {\n super();\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { IS_CARD_PROCESS } from '../../../process';\nimport { TemplateAssertDirective } from '../template-assert.directive';\n\n/**\n * @description\n * a structural directive used to assert a template unique to CARD process. it implements\n * a boolean \"isMatch\" method to assert the match to the specific product (card), when a match\n * is made, the template will be rendered, otherwise - no content is rendered\n */\n\n@Directive({\n standalone: true,\n selector: '[isCardProcess]'\n})\nexport class IsCardProcessDirective extends TemplateAssertDirective {\n override readonly isMatch$$ = inject(IS_CARD_PROCESS);\n}\n","import { Directive, inject } from '@angular/core';\nimport { IS_LOAN_PROCESS } from '../../../process';\nimport { TemplateAssertDirective } from '../template-assert.directive';\n\n/**\n * @description\n * a structural directive used to assert a template unique to LOAN process. it implements\n * a boolean \"isMatch\" method to assert the match to the specific product (loan), when a match\n * is made, the template will be rendered, otherwise - no content is rendered\n */\n\n@Directive({\n standalone: true,\n selector: '[isLoanProcess]'\n})\nexport class IsLoanProcessDirective extends TemplateAssertDirective {\n override readonly isMatch$$ = inject(IS_LOAN_PROCESS);\n}\n","import { inject, Injectable } from '@angular/core';\nimport { IRemoteError, ISeverityHandler, SeverityHandler, TSeverityCallback } from '@partners/errors';\nimport { NavigationService } from '@partners/navigation';\nimport { SettingsMap } from '@partners/settings';\nimport { EMPTY } from 'rxjs';\nimport { TGlobalRemoteError } from './global-errors.types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GlobalSeverities extends SeverityHandler implements ISeverityHandler {\n override handlers: Map;\n private _navService = inject(NavigationService);\n\n constructor() {\n super();\n\n this.handlers = new Map().set('W_0775', (error: IRemoteError) => {\n const { name } = SettingsMap.invalidIssueDateAlert();\n const feature = SettingsMap.get(name);\n this._navService.moveAny(`/${feature.path}`);\n return EMPTY;\n });\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { ErrorHandler, Injectable, NgZone, inject } from '@angular/core';\nimport { ErrorsService, IError, IRemoteError, LocalError, TSeverityCallback, TSeverityCode } from '@partners/errors';\nimport { NavigationService } from '@partners/navigation';\nimport { SettingsMap } from '@partners/settings';\nimport { Console, isFunction } from '@partners/utils';\nimport { DialogAdapter } from '../../dialogs';\nimport { GlobalSeverities } from '../model/global-errors.config';\nimport { TGlobalRemoteError } from '../model/global-errors.types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DefaultErrorHandler implements ErrorHandler {\n private _navService = inject(NavigationService);\n private _dialogAdapter = inject(DialogAdapter);\n private _errorsService = inject(ErrorsService);\n private _globalSeverityHandlers = inject(GlobalSeverities);\n\n // private _shellStore = inject(ShellStore);\n private _ngZone = inject(NgZone);\n\n constructor() {}\n\n handleError(error: IError | Error | HttpErrorResponse) {\n let anyError = error as any;\n\n /**\n * \"origin\" property on the error object indicates a managed error meaning WE threw the error\n * from somewhere within our code. if there is not an origin prop on the error it means its uncaught,\n * unexpected and native js error\n */\n const isTypedError = 'origin' in anyError;\n\n if (!isTypedError) {\n /** unhandled | uncaught js error */\n const formattedMessage = this._errorsService.formatLocalErrorMessage(\n `partners app ** unhandled error **\\n${error?.message}\\n`\n );\n Console.logError(formattedMessage);\n return;\n }\n\n /** handled, typed errors */\n switch (anyError.origin) {\n case 'remote': {\n /** remote means originated in the server */\n this.handleRemoteError(anyError as IRemoteError);\n break;\n }\n\n default: {\n /** local means originated in the browser */\n this.handleLocalError(anyError as Partial);\n }\n }\n }\n\n private handleLocalError(localError: Partial): void {\n Console.logError(`partners handled error:\\n${localError.message}\\n\\n`);\n }\n\n /**\n * @description\n * default handling of remote (server originated) errors\n * ---------------------------------------------------------------------------------------------\n * handles errors which originated in the server resulting in an erroneous http status. there are 2\n * default ways to handle these errors:\n * (1) show error dialog (while keeping current feature context, allow retry submitting the http call)\n * (2) navigate to an error page (immediately exiting the feature context, terminate the app process)\n * @param remoteError a remote error object containing all data relevant to the http error\n */\n handleRemoteError(remoteError: IRemoteError): void {\n const { abort, title, message, severity } = remoteError;\n\n const globalErrorHandler = this.#getGlobalErrorHandler(severity?.code as unknown as TGlobalRemoteError);\n if (isFunction(globalErrorHandler)) {\n globalErrorHandler.call(this, remoteError);\n return;\n }\n if (abort) {\n /** api error handling - scenario (1): navigate to error page to show error details */\n const feature = SettingsMap.get('generic-alert');\n this._ngZone.run(() => {\n this._navService.moveAny(`/${feature.path}/${remoteError.token}`);\n });\n return;\n }\n\n this._ngZone.run(() => {\n // if (isNotEmpty(this._shellStore.policy$$())) {\n /** api error handling - scenario (2): pop a dialog over current page to show error details */\n this._dialogAdapter.openAlert({ title, message });\n // }\n\n // this.handleLocalError({ title, message });\n });\n }\n /**\n * @description\n * Some errors like w_0775 (aml error) for example, needs to be handled globally and does not have special\n * handling method for different rest api call.\n * in this method, first we will check if the remote error should be handled globally.\n * if it does, we will extract it's handle method.\n * @param severityCode\n * @returns global error handler\n */\n #getGlobalErrorHandler(severityCode: TSeverityCode): TSeverityCallback | undefined {\n return this._globalSeverityHandlers.handlers.get(severityCode as unknown as TGlobalRemoteError);\n }\n}\n","import { HttpErrorResponse, HttpInterceptorFn } from '@angular/common/http';\nimport { inject } from '@angular/core';\n\nimport { IHttpResponse, IHttpStatus } from '@partners/api';\nimport { ErrorsService, RemoteError } from '@partners/errors';\nimport { catchError } from 'rxjs/operators';\n\nimport { ShellStore } from '@partners/state';\n\n/**\n * @description\n * catches all remote (http) errors, which means all server responses with http erroneous status\n * (status > 299 or status < 200).\n * the erroneous status values indicates either:\n * (1) a technical error (server unavailable | page not found | no internet connection etc')\n * (2) business logic error (missing data | miscalculation | refusal to service etc')\n *\n * @param request the current http request\n * @param next a method of propagating the request forward to allow interception\n * @returns the next tick in the request process\n */\n\nexport const remoteErrorInterceptor: HttpInterceptorFn = (request, next) => {\n const _errorsService = inject(ErrorsService);\n const _shellStore = inject(ShellStore);\n\n return next(request).pipe(\n /** catch any http errors */\n catchError((httpError: HttpErrorResponse) => {\n const { error } = httpError;\n const { status } = error as IHttpResponse;\n\n if (!status) {\n return _errorsService.throwRemoteError({\n code: '',\n message: error?.message,\n abort: true,\n response: error,\n request\n });\n }\n\n const { message, messageCode, headlineMessage, continueProcess } = status as IHttpStatus;\n // const severity = new Severity(messageCode as TSeverityCode);\n\n const remoteError = new RemoteError({\n code: error.status,\n message: message,\n title: headlineMessage,\n abort: !continueProcess,\n response: error,\n request\n });\n\n if (remoteError.abort) {\n _shellStore.dispatchSaveError(remoteError);\n }\n\n return _errorsService.throwRemoteError(remoteError);\n })\n );\n};\n\n// const context: IHttpContext = ContextBuilder.getContext(request);\n// const { resolvers } = context;\n","import { Directive, Input, Signal, computed, inject } from '@angular/core';\nimport { IConfigDictionary } from '@partners/api';\nimport { TConfigPartition } from '@partners/types';\nimport { FeatureConfig } from '../../../config';\n\n/**\n * @description\n * This directive is a BASE directive (i.e. meant to be inherited only). It provides an api to read feature's config values,\n * such as texts, indications, links & params. All that data comes from the server and saved in the store. The directive's\n * inheritors are specialized directives (see IndicationConfigDirective, TextConfigDirective) which consume indications and\n * texts data and provides it to the template.\n */\n\n@Directive({\n standalone: true\n})\nexport class FeatureConfigDirective {\n @Input()\n featureConfig: string;\n\n @Input()\n dictionary: 'feature' | 'global' = 'feature';\n\n /** we need the feature's name to read config data from the store */\n get currentConfig$$(): Signal {\n return this._featureConfig.configDictionary$$;\n }\n\n private _featureConfig = inject(FeatureConfig);\n\n constructor() {}\n\n /** read a boolean indication from config node */\n protected fromIndications$$(key: string, value: boolean = true): Signal {\n return computed(() => {\n const { indication } = { ...this.currentConfig$$() };\n /** Added specific scenario for checking false indications,\n * if the key is absent indFalseConfig should returns true.*/\n if (value === false && !(key in indication)) {\n return true;\n }\n return this.fromConfig(indication, key) === value;\n });\n }\n /** read text from config node */\n protected fromText$$(key: string): Signal {\n const { text } = { ...this.currentConfig$$() };\n return computed(() => this.fromConfig(text, key));\n }\n /** read a link from config node */\n protected fromLinks$$(key: string): Signal {\n const { links } = { ...this.currentConfig$$() };\n return computed(() => this.fromConfig(links, key));\n }\n /** read param object from config node */\n protected fromParams$$(key: string): Signal {\n const { params } = { ...this.currentConfig$$() };\n return computed(() => this.fromConfig(params, key));\n }\n\n private fromConfig(dictionary: TConfigPartition, key: string): T {\n if (dictionary && key in dictionary) {\n return dictionary[key] as T;\n }\n return null;\n }\n}\n","import {\n Directive,\n EffectRef,\n Injector,\n OnDestroy,\n Signal,\n TemplateRef,\n ViewContainerRef,\n effect,\n inject\n} from '@angular/core';\nimport { FeatureConfigDirective } from './feature-config.directive';\n\n/**\n * @description\n * Toggle show | hide templated content according to a specific boolean flag value which\n * is part of a feature's configuration > indication flags collection\n */\n@Directive({\n standalone: true,\n exportAs: 'indTrue'\n})\nexport abstract class IndicationConfigDirective extends FeatureConfigDirective implements OnDestroy {\n protected _containerRef = inject(ViewContainerRef);\n protected _templateRef = inject(TemplateRef);\n protected _localInjector = inject(Injector);\n protected _toggleRef: EffectRef;\n\n abstract value$$: Signal;\n\n constructor() {\n super();\n }\n\n /**\n * @description\n * Monitor the boolean indication's value to reflect changes to the ui the boolean indication\n * is used to hide | show a template in the page.\n * When indication value is true - insert the template to the dom\n * when indication value is false - remove template from the dom\n */\n protected addChangeEffect() {\n this._toggleRef = effect(\n () => {\n if (!this.value$$) {\n return;\n }\n const isMatch = this.value$$();\n\n /** clear existing content */\n this._containerRef.clear();\n\n if (isMatch) {\n /** render the content */\n this._containerRef.createEmbeddedView(this._templateRef).detectChanges();\n }\n },\n { injector: this._localInjector }\n );\n }\n\n ngOnDestroy() {\n this._toggleRef && this._toggleRef.destroy();\n }\n}\n","import { Directive, Input, OnDestroy, Signal } from '@angular/core';\nimport { IndicationConfigDirective } from './indication-config.directive';\n\n/**\n * @description\n * Toggle show | hide templated content according to a specific boolean flag value which\n * is part of a feature's configuration > indication flags collection\n */\n@Directive({\n standalone: true,\n selector: '[indFalseConfig]',\n exportAs: 'indFalse'\n})\nexport class IndFalseConfigDirective extends IndicationConfigDirective implements OnDestroy {\n @Input()\n set indFalseConfig(key: string) {\n /**\n * \"value\" is the name of a specific config (boolean) flag. once received - the flag's value\n * is read and the effect is being triggered to match behavior to the value (show | hide template)\n **/\n this.value$$ = this.fromIndications$$(key, false);\n this.addChangeEffect();\n }\n\n override value$$: Signal;\n\n constructor() {\n super();\n }\n}\n","import { Directive, Input, OnDestroy, Signal } from '@angular/core';\nimport { IndicationConfigDirective } from './indication-config.directive';\n\n/**\n * @description\n * Toggle show | hide templated content according to a specific boolean flag value which\n * is part of a feature's configuration > indication flags collection\n */\n@Directive({\n standalone: true,\n selector: '[indTrueConfig]',\n exportAs: 'indTrue'\n})\nexport class IndTrueConfigDirective extends IndicationConfigDirective implements OnDestroy {\n @Input()\n set indTrueConfig(key: string) {\n /**\n * \"value\" is the name of a specific config (boolean) flag. once received - the flag's value\n * is read and the effect is being triggered to match behavior to the value (show | hide template)\n **/\n this.value$$ = this.fromIndications$$(key, true);\n this.addChangeEffect();\n }\n\n override value$$: Signal;\n\n constructor() {\n super();\n }\n}\n","import { Directive, Input, OnInit, Signal, computed } from '@angular/core';\nimport { FeatureConfigDirective } from './feature-config.directive';\n\n/**\n * @description\n * Read textual content of a specific text variable which is part of a feature's configuration > text collection.\n */\n\n@Directive({\n selector: '[textConfig]',\n standalone: true,\n exportAs: 'text'\n})\nexport class TextConfigDirective extends FeatureConfigDirective implements OnInit {\n @Input()\n textConfig: string;\n\n value$$: Signal;\n\n ngOnInit(): void {\n /** translate the variable name to its value */\n this.value$$ = computed(() => {\n const value = this.fromText$$(this.textConfig);\n return value();\n });\n }\n}\n","import { Directive, EffectRef, HostBinding, OnDestroy, effect, inject, signal } from '@angular/core';\nimport { FEATURE_SETTINGS, IFeatureSettings } from '@partners/settings';\nimport { ShellStore } from '@partners/state';\n\n@Directive({\n selector: '[featureSettings]',\n standalone: true\n})\nexport class FeatureSettingsDirective implements OnDestroy {\n @HostBinding('class.fixed-footer')\n get hasStickyFooter() {\n // return this._featureSettings().isFooterFixed;\n const viewSettings = this._shellStore.viewSettings$$();\n return viewSettings?.isFooterFixed;\n }\n\n private _effectRef: EffectRef;\n private _shellStore = inject(ShellStore);\n private _featureSettings = signal(inject(FEATURE_SETTINGS));\n\n constructor() {\n this._effectRef = effect(\n () => {\n const { isFooterFixed, isProgressHidden, isProgressRendered, headerCloseAction } = this._featureSettings();\n\n this._shellStore.dispatchUpdateShellView({\n isFooterFixed,\n isProgressHidden,\n isProgressRendered,\n headerCloseAction\n });\n },\n { allowSignalWrites: true }\n );\n }\n\n ngOnDestroy(): void {\n this._effectRef && this._effectRef.destroy();\n }\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n standalone: true,\n selector: '[featureContainerSlot]'\n})\nexport class FeatureContainerDirective {\n constructor(public tpl: TemplateRef) {}\n}\n\n@Directive({\n standalone: true,\n selector: '[featureIcon]'\n})\nexport class FeatureIconDirective {\n constructor(public tpl: TemplateRef) {}\n}\n\n@Directive({\n standalone: true,\n selector: '[featureTitle]'\n})\nexport class FeatureTitleDirective {\n constructor(public tpl: TemplateRef) {}\n}\n\n@Directive({\n standalone: true,\n selector: '[featureIntro]'\n})\nexport class FeatureIntroDirective {\n constructor(public tpl: TemplateRef) {}\n}\n\n@Directive({\n standalone: true,\n selector: '[featureBody]'\n})\nexport class FeatureBodyDirective {\n constructor(public tpl: TemplateRef) {}\n}\n\n@Directive({\n standalone: true,\n selector: '[featureFooter]'\n})\nexport class FeatureFooterDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import { Directive, Input, inject } from '@angular/core';\nimport { ShellStore } from '@partners/state';\n\n@Directive({\n selector: '[fixedFooterToggle]',\n standalone: true\n})\nexport class FixedFooterToggleDirective {\n @Input()\n set fixedFooterToggle(isFooterFixed: boolean) {\n this._shellStore.dispatchUpdateShellView({ isFooterFixed });\n }\n\n private _shellStore = inject(ShellStore);\n\n constructor() {}\n}\n","import { NgIf, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n FeatureBodyDirective,\n FeatureFooterDirective,\n FeatureIconDirective,\n FeatureIntroDirective,\n FeatureTitleDirective\n} from '../../directives';\nimport { IFeatureView } from '../../model';\n\n/**\n * @description\n * a container skeleton template for any feature's main (page-level) view. in hosts 5 different (optional)\n * templates:\n * 1.iconTemplate (feature view's top icon)\n * 2.titleTemplate (feature view's main title)\n * 3.introTemplate (feature view's sub title)\n * 4.bodyTemplate (feature view's body)\n * 5.footerTemplate (feature view's footer)\n *\n * all templates are optional, meaning the container will only render template instances supplied by the\n * consumer and ignore all others template-containers, if a consumer don't need to display \"top icon\" - it\n * should not provide a template for it\n */\n\n@Component({\n standalone: true,\n selector: 'feature-view',\n template: `\n \n
\n \n
\n
\n \n
\n

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

\n
\n
\n\n \n
\n \n
\n
\n\n \n
\n \n
\n
\n `,\n imports: [NgIf, NgTemplateOutlet],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'feature-view'\n }\n})\nexport abstract class FeatureViewComponent implements IFeatureView, AfterViewInit {\n @ContentChild(FeatureIconDirective, { static: true })\n iconTemplate: FeatureIconDirective;\n\n @ContentChild(FeatureTitleDirective, { static: true })\n titleTemplate: FeatureTitleDirective;\n\n @ContentChild(FeatureIntroDirective, { static: true })\n introTemplate: FeatureIntroDirective;\n\n @ContentChild(FeatureBodyDirective, { static: true })\n bodyTemplate: FeatureBodyDirective;\n\n @ContentChild(FeatureFooterDirective, { static: true })\n footerTemplate: FeatureFooterDirective;\n\n constructor(private changeDetector: ChangeDetectorRef) {}\n\n ngAfterViewInit(): void {\n this.changeDetector.detectChanges();\n }\n}\n","import { Injectable, Signal, computed, inject } from '@angular/core';\nimport { IFeatureConfig } from '@partners/api';\nimport { CatalogService, TCatalogOption } from '@partners/catalog';\nimport { HttpService } from '@partners/http';\nimport { TFeature } from '@partners/settings';\nimport { TConfigPartition, TLink } from '@partners/types';\nimport { coerceDictionary } from '@partners/utils';\nimport { NavigationAdapter } from '../../navigation';\nimport { PolicyService } from '../../process';\n\n/**\n * @description\n * this is the base class of a domain's business logic service. all features\n * which inherits this base class will gain:\n * 1. generic load & send methods interfaces\n * 2. access to the feature's state data (- see StateAccessService)\n * 3. >> TBD: access to the feature's static config data <<\n */\n\n@Injectable({\n providedIn: 'root'\n})\nexport abstract class FeatureService /*extends StateAccessService*/ {\n /**\n * each inheritor is responsible to override this property and init it's own config map\n * (see findConfig$$ method down below which each inheritor should call in constructor)\n */\n abstract readonly featureConfig$$: Signal;\n\n /** accessor to config text dictionary */\n readonly configText$$ = computed>(() => this.featureConfig$$()?.text);\n\n /** accessor to config boolean indications dictionary */\n readonly configIndication$$ = computed>(() => this.featureConfig$$()?.indication);\n\n /** accessor to config links dictionary */\n readonly configLink$$ = computed>(() => this.featureConfig$$()?.links);\n\n /** accessor to config params dictionary */\n readonly configParams$$ = computed>(() => this.featureConfig$$()?.params);\n\n protected _httpService = inject(HttpService);\n protected _policyService = inject(PolicyService);\n protected _catalogService = inject(CatalogService);\n protected _navAdapter = inject(NavigationAdapter);\n\n constructor() {\n // super();\n }\n\n protected fromFinanceCatalog(key: string): T[] {\n return this._catalogService.fromFinance(key);\n }\n\n protected fromMetadataCatalog(key: string): T[] {\n return this._catalogService.fromMetadata(key);\n }\n\n /**\n * @description\n * read a specific value from the feature's config text dictionary\n *\n * @param key the name of the dictionary record to read\n * @returns a string corresponding to key\n */\n fromText$$(key: string): string {\n const textDictionary = coerceDictionary>(this.configText$$());\n return textDictionary[key];\n }\n fromLink$$(key: string): TLink {\n const linkDictionary = coerceDictionary>(this.configLink$$());\n return linkDictionary[key];\n }\n fromParams$$(key: string): T {\n const paramDictionary = coerceDictionary>(this.configParams$$());\n return paramDictionary[key];\n }\n fromIndication$$(key: string): boolean {\n const indicationDictionary = coerceDictionary>(this.configIndication$$());\n return indicationDictionary[key];\n }\n /**\n * @description\n * this is an initialization method. every inheritor of this class which is required to\n * read its policy's config node must call this method to initialize the feature's config\n * data for reading texts | indications | links etc' on demand\n *\n * @param featureName the name of the feature (domain) which config node we want to read\n * @returns a signal of feature config node (texts | indications | links)\n */\n protected findConfig$$(featureName: TFeature): Signal {\n return this._policyService.findFeatureConfig$$(featureName);\n }\n}\n","import { IRangeValidationHandler, IValidationHandler } from '@partners/forms';\nimport { DateUtil } from '@partners/utils';\n\nexport const getBirthDateValidationRange = (): IRangeValidationHandler => {\n return {\n min: DateUtil.dateDiff({ value: -99, unit: 'years' }),\n max: DateUtil.dateDiff({ value: -18, unit: 'years' })\n };\n};\nexport const validatorTypeComparer = (a: IValidationHandler, b: IValidationHandler): boolean => {\n return a.type === b.type;\n};\n","import {\n DateField,\n DateRangeValidation,\n EmailField,\n EmailValidation,\n EnglishNameValidation,\n FieldValidation,\n HebrewNameValidation,\n IdNumberValidation,\n IFormField,\n IValidationHandler,\n LengthValidation,\n MaskValidation,\n MaxLengthValidation,\n MinLengthValidation,\n MobilePhoneField,\n MobilePhoneValidation,\n NumericField,\n RequiredValidation,\n SelectField,\n TextField\n} from '@partners/forms';\nimport { dateMask, DateUtil, mergeArrays, mobilePhoneMask, numericMask } from '@partners/utils';\nimport { validatorTypeComparer } from './validation.functions';\n\nexport const createHebrewNameField = (args: IFormField): TextField => {\n let validators: IValidationHandler[] = [\n new RequiredValidation(),\n new HebrewNameValidation(),\n new MinLengthValidation({ min: 2, message: 'בטוח שהקלדת נכון? צריך להקליד בדיוק כמו שמופיע בתעודת הזהות' }),\n new MaxLengthValidation({ max: 25, message: 'בטוח שהקלדת נכון? צריך להקליד בדיוק כמו שמופיע בתעודת הזהות' })\n ];\n\n /** check if an overriding defs were passed in args */\n const { validation } = args;\n\n if (validation?.validationHandlers.length) {\n /** extend the default \"hebrewName\" validation with custom validation */\n validators = mergeArrays(validators, validation.validationHandlers, validatorTypeComparer);\n }\n\n args = Object.assign(\n {},\n { ...args },\n { validation: new FieldValidation({ validationHandlers: validators, label: validation?.label }) }\n );\n\n return new TextField({ ...args });\n};\n\nexport const createEnglishNameField = (args: IFormField): TextField => {\n let validators: IValidationHandler[] = [\n new RequiredValidation(),\n new EnglishNameValidation({ message: 'שם פרטי צריך להכיל לפחות 2 אותיות באנגלית בלבד, ובלי 3 אותיות זהות ברצף' }),\n new MinLengthValidation({ min: 2 }),\n new MaxLengthValidation({ max: 25 })\n ];\n\n /** check if an overriding defs were passed in args */\n const { validation } = args;\n\n if (validation?.validationHandlers.length) {\n /** extend the default \"hebrewName\" validation with custom validation */\n validators = mergeArrays(validators, validation.validationHandlers, validatorTypeComparer);\n }\n\n args = Object.assign({}, { ...args }, { validation: new FieldValidation({ validationHandlers: validators }) });\n\n return new TextField({ ...args });\n};\n\nexport const createEmailField = (args: IFormField): EmailField => {\n let validators: IValidationHandler[] = [\n new RequiredValidation({ message: 'נראה שחסרה כאן כתובת מייל' }),\n new LengthValidation({ min: 7, max: 50 }),\n new EmailValidation({ message: 'נראה שיש טעות במייל, כדאי לבדוק שוב' })\n ];\n\n /** check if an overriding defs were passed in args */\n const { validation } = args;\n\n if (validation?.validationHandlers.length) {\n /** extend the default \"hebrewName\" validation with custom validation */\n validators = mergeArrays(validators, validation.validationHandlers, validatorTypeComparer);\n }\n\n args = Object.assign(\n {},\n {\n inputType: 'email',\n bidi: true,\n label: 'כתובת מייל'\n },\n { ...args },\n { validation: new FieldValidation({ validationHandlers: validators }) }\n );\n\n return new TextField({ ...args });\n};\n\nexport const createMobilePhoneField = (args: IFormField): TextField => {\n let validators: IValidationHandler[] = [\n new RequiredValidation(),\n new MaskValidation(),\n new MobilePhoneValidation({ message: 'בטוח שהקלדת נכון? צריך להקליד 10 ספרות בדיוק' })\n ];\n /** check if an overriding defs were passed in args */\n const { validation } = args;\n\n if (validation?.validationHandlers.length) {\n /** extend the default \"hebrewName\" validation with custom validation */\n validators = mergeArrays(validators, validation.validationHandlers, validatorTypeComparer);\n }\n\n args = Object.assign(\n {},\n {\n inputType: 'tel',\n pattern: '[0-9]*',\n path: 'phoneNumber',\n inputMode: 'numeric',\n masking: { ...mobilePhoneMask() },\n updateOn: 'blur',\n label: 'מספר טלפון'\n },\n { ...args },\n { validation: new FieldValidation({ validationHandlers: validators }) }\n );\n return new MobilePhoneField({ ...args });\n};\n\nexport const createIdNumberField = (args: IFormField): NumericField => {\n let validators: IValidationHandler[] = [\n new RequiredValidation(),\n new LengthValidation({ min: 9, max: 9, message: 'בטוח שהקלדת נכון? צריך להקליד 9 ספרות בדיוק' }),\n new MaskValidation({ message: 'בטוח שהקלדת נכון? צריך להקליד בדיוק כפי שמופיע בתעודת הזהות' }),\n new IdNumberValidation({ message: 'בטוח שהקלדת נכון? צריך להקליד בדיוק כפי שמופיע בתעודת הזהות' })\n ];\n\n /** check if an overriding defs were passed in args */\n const { validation } = args;\n\n if (validation?.validationHandlers.length) {\n /** extend the default \"hebrewName\" validation with custom validation */\n validators = mergeArrays(validators, validation.validationHandlers, validatorTypeComparer);\n }\n\n args = Object.assign(\n {},\n {\n masking: { ...numericMask({ numOfDigits: 9 }) },\n // updateOn: 'blur',\n label: 'מספר תעודת זהות',\n bidi: true\n },\n { ...args },\n { validation: new FieldValidation({ validationHandlers: validators }) }\n );\n\n return new NumericField({ ...args });\n};\n\nexport const createBirthDateField = (args: IFormField): DateField => {\n let validators: IValidationHandler[] = [\n new DateRangeValidation({\n min: DateUtil.dateDiff({ value: -99, unit: 'years' }),\n max: DateUtil.dateDiff({ value: -18, unit: 'years' })\n }),\n new RequiredValidation(),\n new MaskValidation()\n ];\n\n /** check if an overriding defs were passed in args */\n const { validation } = args;\n\n if (validation?.validationHandlers.length > 0) {\n /** extend the default \"birthDate\" validation with custom validation\n * note that any handlers provided in args will be replaced in validators at the same index! */\n validators = mergeArrays(validators, validation.validationHandlers, validatorTypeComparer);\n }\n\n args = Object.assign(\n {},\n {\n masking: { ...dateMask() },\n pattern: '[0-9]*',\n path: 'birthDate',\n inputType: 'date',\n inputMode: 'numeric',\n bidi: true,\n updateOn: 'blur',\n label: 'תאריך לידה',\n minorLabel: 'לדוגמא: 10/04/1985'\n },\n { ...args },\n { validation: new FieldValidation({ validationHandlers: validators }) }\n );\n\n return new DateField({ ...args });\n};\n\nexport const createGenderField = (args: IFormField): SelectField => {\n args = Object.assign(\n {},\n {\n keyProp: 'key',\n valueProp: 'value',\n path: 'gender',\n label: 'מה כתוב לך בתעודת הזהות?',\n validation: new FieldValidation({\n validationHandlers: [new RequiredValidation({ message: 'יש לבחור מין' })]\n })\n },\n { ...args }\n );\n\n return new SelectField({ ...args });\n};\n","import { Injectable, signal } from '@angular/core';\nimport { isNotEmpty } from '@partners/utils';\nimport { IHttpLoader } from '../../http';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LoaderService {\n loaderState$$ = signal(null);\n #loaderMap = new Map();\n\n constructor() {}\n\n /**\n * toggle loader's state (on/off)\n * @param nextState a boolean indication wether to show or hide the loader\n * @param options\n * (1) token: unique id for current loader state\n * (2) method: http method ('get' | 'post'..) in case we want to change loader behavior\n * per http verb (we do, we display messages mainly in put methods)\n * (3) on: is the loader on or off indication\n */\n updateState(state: IHttpLoader) {\n /** add|update current loader's state */\n this.#loaderMap.set(state.token, state);\n\n /** find any loaders with \"on\" indication set to true (means loader is still showing) */\n const isLoaderOn = isNotEmpty(Array.from(this.#loaderMap.values()).find((loader: IHttpLoader) => loader?.toggle));\n\n /** override default loader behavior (on=true), in case we don't want to show loader on http call */\n const shouldUpdateLoader = state?.toggle || (!state?.toggle && !isLoaderOn);\n\n if (shouldUpdateLoader) {\n this.loaderState$$.set(state);\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n OnDestroy,\n ViewEncapsulation,\n effect,\n inject,\n signal\n} from '@angular/core';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { FADE_IN_OUT_ANIMATION, SLIDE_UP_DOWN_ANIMATION } from '@partners/ui';\nimport { LottieComponent } from 'ngx-lottie';\nimport { IHttpLoaderOptions } from '../../http';\nimport { LoaderService } from '../services';\n\n@Component({\n selector: 'application-loader',\n standalone: true,\n imports: [MatProgressSpinnerModule, LottieComponent],\n template: `\n @defer(when loader$$()?.animation) {\n
\n @if(loader$$()?.animation === 'default') {\n \n } @else {\n \n } @if(loader$$()?.message) {\n
\n {{ loader$$().message }}\n
\n }\n
\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [FADE_IN_OUT_ANIMATION, SLIDE_UP_DOWN_ANIMATION]\n})\nexport class LoaderComponent implements OnDestroy {\n loader$$ = signal(undefined);\n\n /**\n * whenever a new http loader configuration is announced, we trigger the loader spooling to\n * reflect the changes in animation (spinner|lottie) and messages. this effect will trigger\n * on every http call which requires a loading animation\n */\n #loaderEffectRef = effect(\n () => {\n /** read the most current loader configuration */\n const { options } = this.#loaderService.loaderState$$();\n\n /** trigger animation & message update */\n this.#spoolAnimations(options);\n },\n { allowSignalWrites: true }\n );\n\n #animInterval: number | undefined = undefined;\n\n /**\n * display a single or sequenced loader animation. \"animations\" arg always received\n * as an array. if it contains more then a single node - we have a sequence. in a sequence\n * each animation (and/or message) has a fixed amount of time (duration) to run - after\n * which the next animation is loaded (recursively)\n * @param animations an array of loader animation configuration\n */\n #spoolAnimations(animations: IHttpLoaderOptions[]): void {\n /** extract next animation config node */\n const nextAnimation = animations.shift();\n\n /**\n * duration is the primary arg for a sequence, omitted duration means no sequence!\n * just show animation spinner */\n if (!nextAnimation?.duration) {\n this.loader$$.set(nextAnimation);\n return;\n }\n\n /**\n * if we got here we are in the middle of sequence spooling. we first need to check\n * weather the recursive spooling needs to terminate\n */\n if (!animations?.length) {\n clearTimeout(this.#animInterval);\n return;\n }\n\n /** show next loaded animation */\n this.loader$$.set(nextAnimation);\n\n /** set a timer to load after current animation interval ends */\n this.#animInterval = setTimeout(() => {\n console.log(`spooling next animation...`);\n this.#spoolAnimations(animations);\n }, nextAnimation.duration);\n }\n\n @HostBinding('class.application-loader')\n hostClass = true;\n\n @HostBinding('[@fadeInOut]')\n hostAnimation = true;\n\n #loaderService = inject(LoaderService);\n\n constructor() {}\n\n ngOnDestroy(): void {\n this.#loaderEffectRef.destroy();\n /** clean house - again. just in case */\n clearTimeout(this.#animInterval);\n }\n}\n","import { HttpInterceptorFn, HttpRequest } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { THttpVerb } from '@partners/http';\nimport { THEME_CONTEXT } from '@partners/themes';\nimport { isEmptyArray } from '@partners/utils';\nimport { delay, finalize } from 'rxjs';\nimport { HTTP_CONTEXT, IHttpContext, IHttpLoader } from '../../http';\nimport { LoaderService } from '../services';\n\nexport const loaderInterceptor: HttpInterceptorFn = (request, next) => {\n const loaderService = inject(LoaderService);\n\n const isDisabled = isLoaderDisabled(request);\n\n if (!isDisabled) {\n loaderService.updateState(getLoaderContext(true, request));\n }\n\n return next(request).pipe(\n delay(500),\n finalize(() => {\n const isDisabled = isLoaderDisabled(request);\n\n if (!isDisabled /*&& request.method.toLocaleLowerCase() !== 'get'*/) {\n loaderService.updateState(getLoaderContext(false, request));\n }\n })\n );\n};\n\n/**\n * there are 2(!) tokens which may affect the loader: (1) HTTP_CONTEXT serves as the bll\n * request (covers get/put business logic requests), (2) THEME_CONTEXT serves as the theme\n * request (covers get of assets loaded via http requests)\n * @param request\n * @returns\n */\nconst resolveLoaderToken = (request: HttpRequest): IHttpContext => {\n const bllContext: IHttpContext = request.context.get(HTTP_CONTEXT);\n const themeContext = request.context.get(THEME_CONTEXT);\n\n if (themeContext) {\n /** for asset load request - the requst should run ini the background, without a loader animation */\n return themeContext as IHttpContext;\n }\n\n return bllContext;\n};\n\nconst isLoaderDisabled = (request: HttpRequest) => {\n const httpContext: IHttpContext = resolveLoaderToken(request);\n return httpContext?.loader?.toggle === false;\n};\n\n/**\n * function to build the loader context and decide its show status by the 'toggle' param\n * other fields of IHttpLoader are being spread-added from the given context. ( and are being specifically added before api call)\n * @param toggle whether loader state on/off.\n * @param request http request containing the context .\n * @returns IHttpLoader.\n */\nconst getLoaderContext = (toggle: boolean, request: HttpRequest): IHttpLoader => {\n const httpContext: IHttpContext = resolveLoaderToken(request);\n const { urlWithParams, method } = request;\n\n if (isEmptyArray(httpContext.loader?.options)) {\n httpContext.loader.options = [{ animation: 'default' }];\n }\n return { token: urlWithParams, method: method as THttpVerb, ...httpContext.loader, toggle };\n};\n","import { Injectable } from '@angular/core';\nimport { IMockConfig } from './mock.interface';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport abstract class MockConfig implements IMockConfig {\n\n abstract readonly isDevMode: boolean;\n\n constructor() {\n \n }\n}\n","import { IFeatureConfig, IHttpResponse } from '@partners/api';\nimport { isDefined, isUndefined } from '@partners/utils';\nimport { Observable, of, tap } from 'rxjs';\n\nexport function updateFeatureConfig>(callback?: (config: IFeatureConfig) => void) {\n return (response$: Observable>): Observable> => {\n return response$.pipe(\n tap((response: IHttpResponse) => {\n const { result } = response;\n if (isDefined(result?.config)) {\n const { config } = result;\n callback && callback.call(null, config);\n }\n })\n );\n };\n}\n","import { inject, Injectable } from '@angular/core';\nimport { TPartnerName } from '@partners/api';\nimport { SettingsMap } from '@partners/settings';\nimport { ShellStore } from '@partners/state';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PartnerUpdatesService {\n #shellStore = inject(ShellStore);\n #partnerName: TPartnerName;\n constructor() {\n const { partner } = this.#shellStore.params$$();\n this.#partnerName = partner;\n }\n /**\n@description\n* When hosted inside a webview the only way to inform the host app of anything from the html is by performing a (full) url update.\n* Normally we only do that in the event of exiting partners (and returning to host app),\n* in that scenario - the host app listens to our redirect (window.location.href), catches it and closes partners.\n* HOWEVER - to inform the host app in other scenarios which does not require exiting the app - we cant do that.\n* The only option to inform the host app of a url change from the html without existing partners via widow.location.href is to manipulate the browser's history stack, by \"pushing\" a url change event which the host app can detect.\n* We use HTML5 location & history api to do that\n*/\n updatePartnerHistory() {\n debugger;\n if (!this.#partnerName) {\n return;\n }\n const partnerSettings = SettingsMap.partnerSettings(this.#partnerName);\n if (partnerSettings?.useHistoryForPartnerUpdates) {\n history.replaceState(null, window.location.href);\n }\n }\n}\n","import { computed, inject, Injectable, Signal } from '@angular/core';\nimport { IAddressModel, IContactModel, ICustomer, IDebitsModel, IIdentityModel, ILoginData } from '@partners/api';\nimport { CatalogQuery, TBankBranchOption, TCatalogOption } from '@partners/catalog';\nimport { ErrorsService, tapSuccess } from '@partners/errors';\nimport { HttpService } from '@partners/http';\nimport {\n AddressStore,\n AuthLoginStore,\n ClassifyStore,\n ContactStore,\n CustomerStore,\n DebitsStore,\n IdentityStore,\n ShellStore\n} from '@partners/state';\nimport { isNotEmpty, takeOnce } from '@partners/utils';\nimport { lastValueFrom } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CustomerFacade {\n readonly customer$$: Signal;\n #catalogQuery = inject(CatalogQuery);\n #debitsStore = inject(DebitsStore);\n #identityStore = inject(IdentityStore);\n #contactStore = inject(ContactStore);\n #addressStore = inject(AddressStore);\n #loginStore = inject(AuthLoginStore);\n #shellStore = inject(ShellStore);\n #classifyStore = inject(ClassifyStore);\n #httpService = inject(HttpService);\n #errorsService = inject(ErrorsService);\n #customerStore = inject(CustomerStore);\n\n readonly hasCustomerResponse$$ = computed(() => this.#customerStore.hasCustomerResponse$$());\n\n /**\n * this should be the single source of truth to the latest value of customer's idNumber.\n * do not read it or expose it to the bll via any other interface\n */\n readonly idNumber$$ = computed(() => {\n const hasPolicy = this.#shellStore.hasPolicy$$();\n\n if (hasPolicy) {\n /** the default source of the idNumber is policy data */\n return this.#shellStore.policy$$().idNum;\n }\n\n const classifyModel = this.#classifyStore.model$$();\n\n if (isNotEmpty(classifyModel.idNumber)) {\n /**\n * in case policy has not yet been acquired, we are likely running a loan process in web mode -\n * in which case we assume the classify's domain model in initialized and use it as secondary\n * optional source of the idNumber\n */\n return classifyModel.idNumber;\n }\n\n this.#errorsService.throwLocalError({ message: `Could not find idNumber value in the store` });\n\n return '';\n });\n\n readonly isNewCustomer$$ = computed(() => {\n const customerData = this.customer$$();\n if (!customerData) {\n return undefined;\n }\n const { isNewCustomer } = customerData;\n return isNewCustomer;\n });\n\n readonly isNotNewCustomer$$ = computed(() => {\n return this.isNewCustomer$$() !== true;\n });\n\n readonly isVerifiedCustomer$$ = computed(() => {\n const customerData = this.customer$$();\n if (!customerData) {\n return undefined;\n }\n const { isVerifiedCustomer } = customerData;\n return isVerifiedCustomer;\n });\n\n readonly isUnVerifiedCustomer$$ = computed(() => {\n return this.isVerifiedCustomer$$() !== true;\n });\n\n // #updateEmploymentModel({ employmentType }: ICustomer) {\n // const employmentModel: IEmploymentModel = {\n // employmentType: employmentType\n // };\n\n // /** update the contact store */\n // this.#employmentStore.dispatchUpdateModel({ model: employmentModel });\n // }\n\n loadCustomer(): Promise {\n this.#customerStore.dispatchCustomerLoad();\n const customer = this.#httpService.fetch('customer').pipe(\n takeOnce(),\n tapSuccess((data: ILoginData) => {\n this.#customerStore.dispatchCustomerLoadSuccess({ model: null, data });\n this.distributeLoginData(data);\n })\n );\n\n return lastValueFrom(customer);\n }\n\n #updateContactModel({ displayPhoneNumber, email, firstNameEng, lastNameEng }: ICustomer) {\n const contactModel: IContactModel = {\n displayPhoneNumber,\n lastNameEng,\n firstNameEng,\n email\n };\n\n /** update the contact store */\n this.#contactStore.dispatchUpdateModel({ model: contactModel });\n }\n\n #updateAddressModel({\n residence,\n residenceName,\n street,\n streetName,\n houseNumber,\n zipCode,\n entrance,\n appartmentNum,\n email\n }: ICustomer) {\n const addressModel: IAddressModel = {\n residenceCode: residence,\n streetCode: street,\n zipCode,\n zipCode7: zipCode,\n appartmentNum,\n entrance,\n streetName,\n residenceName,\n houseNumber,\n email\n };\n\n /** update the address store */\n this.#addressStore.dispatchUpdateModel({ model: addressModel });\n }\n\n updateIdentityModel({ firstNameHeb, lastNameHeb, birthDate, gender, idIssueDate }: ICustomer) {\n const identityModel: IIdentityModel = {\n firstName: firstNameHeb,\n lastName: lastNameHeb,\n idIssueDate,\n birthDate,\n gender\n };\n\n this.#identityStore.dispatchUpdateModel({ model: identityModel });\n }\n\n #updateDebitsModel({ accountNumber, accountOwnerName, bankCode, branchCode }: IDebitsModel) {\n if (!bankCode) {\n return;\n }\n\n /** server only gives us bank & branch codes, we need to find the bank & branch names to display */\n const bank: TCatalogOption = this.#catalogQuery.findBank(bankCode);\n const branch: TBankBranchOption = this.#catalogQuery.findBankBranch(branchCode, bankCode);\n\n /** this data is meant for the debits model store */\n const debitsModel: IDebitsModel = {\n accountNumber,\n accountOwnerName,\n bankCode,\n branchCode,\n bankName: bank.key,\n branchName: branch.key\n };\n\n /** update the debits store */\n this.#debitsStore.dispatchUpdateModel({ model: debitsModel });\n }\n\n constructor() {\n this.customer$$ = computed(() => this.#loginStore.customerData$$());\n }\n\n ngOnDestroy(): void {}\n\n distributeLoginData({ customer, debits }: { customer?: ICustomer; debits?: IDebitsModel }) {\n if (!customer && !debits) {\n return;\n }\n\n // this.#updateEmploymentModel(customer);\n this.#updateContactModel(customer);\n this.#updateAddressModel(customer);\n this.updateIdentityModel(customer);\n this.#updateDebitsModel(debits);\n }\n}\n","import { HttpContextToken } from '@angular/common/http';\nimport { IHttpContext } from '../model';\n\nexport const HTTP_CONTEXT = new HttpContextToken(() => ({\n loader: { toggle: undefined },\n mock: { args: undefined },\n resolvers: { severities: undefined }\n}));\n","import { HttpHeaders } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { HttpConfig, IHttpAction } from '@partners/http';\nimport { GLOBAL_SETTINGS, IEnvironmentSettings } from '@partners/settings';\nimport { ShellStore } from '@partners/state';\nimport { coerceString, isEmpty } from '@partners/utils';\nimport { IHttpContext } from '../model';\nimport { HTTP_CONTEXT } from '../tokens';\n\nexport class CommonHttpConfig extends HttpConfig {\n private _shellStore = inject(ShellStore);\n\n get environment(): IEnvironmentSettings {\n const { environment } = this._globalSettings;\n return environment;\n }\n get rootEndpoint(): string {\n return this.environment.rootEndpoint;\n }\n get apiUrl(): string {\n return this.environment.apiUrl;\n }\n get useProxy(): boolean {\n return this.environment.isProxy;\n }\n\n get httpHeaders(): HttpHeaders {\n return (\n new HttpHeaders()\n .set('Access-Control-Allow-Headers', 'Content-Type')\n .set('Access-Control-Allow-Methods', 'GET, PUT, POST, DELETE, HEAD, OPTIONS')\n .set('Content-Type', 'application/json; charset=utf-8')\n // .set('Access-Control-Allow-Origin', '*')\n .set('Cache-Control', 'no-store, no-cache, max-age=0')\n .set('Accept', 'application/json')\n );\n }\n\n override buildRootEndpoint(): string {\n return this.rootEndpoint;\n }\n\n override buildRequestEndpoint(action: IHttpAction): URL {\n const { endpoint, options } = { ...action };\n\n let urlModifier;\n\n const requestContext = options?.context?.get(HTTP_CONTEXT);\n\n if (options?.context) {\n urlModifier = requestContext?.urlModifiers;\n }\n\n const rootEndpoint = this.buildRootEndpoint();\n const processKey = coerceString(this._shellStore.processId$$());\n\n const { apiUrl, isProxy, isMockMode } = this.environment;\n\n let baseUrl: string;\n\n if (urlModifier?.overrideUrl) {\n baseUrl = urlModifier?.overrideUrl;\n } else {\n baseUrl = apiUrl;\n }\n\n let urlBuilder = `${rootEndpoint}`;\n\n if (isMockMode || urlModifier?.overrideUrl) {\n urlBuilder = `${baseUrl}/${endpoint}`;\n } else {\n if (!urlModifier?.omitProcess && !isEmpty(processKey)) {\n urlBuilder += `/${processKey}`;\n }\n\n urlBuilder += `/${endpoint}`;\n\n urlBuilder = isProxy ? `${urlBuilder}` : `${rootEndpoint}/${urlBuilder}`;\n\n urlBuilder = `${baseUrl}/${urlBuilder}`;\n }\n\n // Console.logInfo(`http request url: ${urlBuilder}`);\n\n return new URL(urlBuilder);\n }\n\n private readonly _globalSettings = inject(GLOBAL_SETTINGS);\n\n constructor() {\n super();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { HTTP_CONFIG, HttpModule } from '@partners/http';\nimport { CommonHttpConfig } from './config/http.config';\n\n@NgModule({\n imports: [\n HttpModule.forRoot({\n provide: HTTP_CONFIG,\n useClass: CommonHttpConfig\n })\n ]\n})\nexport class HttpCommonModule {}\n","import { HttpInterceptorFn } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { ProfileService } from '../../process';\nimport { IHttpContext } from '../model';\nimport { HTTP_CONTEXT } from '../tokens';\n\nexport const endpointInterceptor: HttpInterceptorFn = (request, next) => {\n const { params$$ } = inject(ProfileService);\n\n let { url, headers } = request;\n\n if (params$$()?.token) {\n const authKey = `OpportunityAuthorization`;\n\n const authToken = `CalSale ${params$$().token}`;\n\n const hasHeaders = request?.headers?.keys()?.length;\n\n headers = hasHeaders ? headers.append(authKey, authToken) : headers.set(authKey, authToken);\n }\n\n const httpContext: IHttpContext = request.context.get(HTTP_CONTEXT);\n\n // if (httpContext?.urlModifiers) {\n // const { urlModifiers } = httpContext;\n\n // if (!urlModifiers.omitProcess) {\n // const endpoint = findLastNotation(request.url, '/');\n // url = `${processId$$()}/${findLastNotation(request.url, '/')}`;\n // Console.logInfo(`not omitting process`);\n // }\n // }\n\n return next(request.clone({ url, headers }));\n};\n","import { HttpContext, HttpRequest } from '@angular/common/http';\nimport { ILoaderOptions } from '@partners/api';\nimport { IMockArgs } from '../../mock';\nimport { IHttpContext, IUrlModifiers } from '../model';\nimport { HTTP_CONTEXT } from '../tokens';\n\nexport class ContextBuilder {\n private readonly _defaultContext: IHttpContext = {\n loader: { toggle: true, options: [{ animation: 'default' }] },\n mock: { args: undefined },\n resolvers: { severities: [] },\n urlModifiers: {\n omitProcess: false\n }\n };\n\n private _context: IHttpContext;\n\n constructor() {\n this._context = { ...this._defaultContext };\n return this;\n }\n\n static getContext(request: HttpRequest): IHttpContext {\n return request.context.get(HTTP_CONTEXT);\n }\n\n build(): HttpContext {\n const newContext = new HttpContext();\n newContext.set(HTTP_CONTEXT, this._context);\n return newContext;\n }\n\n append>(context: T): ContextBuilder {\n this._context = { ...this._context, ...context };\n return this;\n }\n\n /**\n * preset contexts\n **/\n disableLoader(): ContextBuilder {\n return this.append({ loader: { toggle: false } });\n }\n enableLoader(): ContextBuilder {\n return this.append({ loader: { toggle: true } });\n }\n addMockArgs(mockArgs: IMockArgs): ContextBuilder {\n return this.append({ mock: { args: { ...mockArgs } } });\n }\n\n addUrlModifiers(urlModifiers: IUrlModifiers): ContextBuilder {\n return this.append({ urlModifiers: { ...urlModifiers } });\n }\n\n withLoaderAnimation(options: ILoaderOptions[]) {\n options.forEach((option) => {\n if (!option.animation) {\n option.animation = 'default';\n }\n });\n return this.append({ loader: { options } });\n }\n}\n","import { HttpRequest } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { ShellStore } from '@partners/state';\nimport { HTTP_CONTEXT, IHttpContext } from '../../http';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MockService {\n private _shellStore = inject(ShellStore);\n\n constructor() {}\n\n /**\n * @description\n * add a custom header(s) to an http request to allow passing key values of the bll state to\n * the mock server api, this gives us the option to customize the mock response in the server\n *\n * @param request the http request to add mock header to its headers collection\n * @returns an http request, clone of original with added mock headers\n */\n attachMockArgs(request: HttpRequest): HttpRequest {\n /** check for request's custom context */\n const httpContext: IHttpContext = request.context.get(HTTP_CONTEXT);\n\n const { mock } = httpContext;\n const { processId$$ } = this._shellStore;\n\n /** add custom context to default context params */\n mock.args = {\n ...mock.args,\n ...{\n processId: processId$$()\n }\n };\n\n const { args } = mock;\n\n /** add the custom params mock header to the request's headers collection */\n const headers = request.headers.set('context', JSON.stringify(args));\n\n return request.clone({ headers });\n }\n}\n","import { HttpInterceptorFn } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { MockConfig } from './model/mock.model';\nimport { MockService } from './services/mock.service';\n\nimport { MOCK_CONFIG } from './tokens';\n\nexport const mockInterceptor: HttpInterceptorFn = (request, next) => {\n const mockConfig: MockConfig = inject(MOCK_CONFIG);\n const mockService: MockService = inject(MockService);\n\n // if dev, set mock data in header\n if (mockConfig.isDevMode) {\n request = mockService.attachMockArgs(request);\n }\n\n return next(request);\n};\n","import { provideHttpClient, withInterceptors } from '@angular/common/http';\nimport { ModuleWithProviders, NgModule, Provider } from '@angular/core';\nimport { mockInterceptor } from './mock.Interceptor';\n\n@NgModule({\n declarations: [],\n imports: []\n})\nexport class MockModule {\n static forRoot(mockConfig: Provider): ModuleWithProviders {\n return {\n ngModule: MockModule,\n providers: [mockConfig, provideHttpClient(withInterceptors([mockInterceptor]))]\n };\n }\n}\n","import { HttpContextToken } from '@angular/common/http';\nimport { InjectionToken } from '@angular/core';\nimport { IMockArgs } from '../model';\nimport { MockConfig } from '../model/mock.model';\n\nexport const MOCK_CONFIG = new InjectionToken('MOCK_CONFIG');\nexport const MOCK_CONTEXT = new HttpContextToken(() => ({}));\n","import { computed, inject, Injectable, Signal } from '@angular/core';\nimport { IBusinessPartner, IFeatureConfig, IGlobalConfig, ILoanProfile, IPolicy, IProfileParams } from '@partners/api';\nimport { TCatalogOption } from '@partners/catalog';\nimport { filterResult, HttpService, tapResult } from '@partners/http';\nimport { TFeature } from '@partners/settings';\nimport { ShellStore } from '@partners/state';\nimport { excludeEmptyValues } from '@partners/utils';\nimport { lastValueFrom, Observable, throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PolicyService {\n get globalConfig$$(): Signal {\n return this._shellStore.globalConfig$$;\n }\n\n get featuresConfig$$(): Signal {\n return this._shellStore.featuresConfig$$;\n }\n\n get policy$(): Observable {\n return this._shellStore.policy$;\n }\n\n get policy$$(): Signal {\n return this._shellStore.policy$$;\n }\n\n get businessPartner$$(): Signal {\n return this._shellStore.businessPartner$$;\n }\n\n get loanReasons$$(): Signal {\n return this._shellStore.loanReasons$$;\n }\n\n get loanProfile$$(): Signal {\n return this._shellStore.defaultLoanProfile$$;\n }\n\n get customerId$$(): Signal {\n return computed(() => {\n return this._shellStore.policy$$().idNum;\n });\n }\n\n get isNewAccount$$(): Signal {\n return computed(() => {\n const agreementConfig = this.findFeatureConfig$$('agreement-concent');\n if (!agreementConfig()?.indication) {\n return false;\n }\n return agreementConfig().indication['isNewAccount'];\n });\n }\n\n private readonly _shellStore = inject(ShellStore);\n private readonly _httpService = inject(HttpService);\n\n constructor() {}\n\n updateFeatureConfig(featureName: TFeature, featureConfig: IFeatureConfig = undefined): void {\n this._shellStore.dispatchUpdateFeatureConfig(featureName, featureConfig);\n }\n\n findFeatureConfig$$(featureName: TFeature): Signal {\n return this._shellStore.findFeatureConfig$$(featureName);\n }\n\n loadPolicy(params: IProfileParams = this._shellStore.params$$()): Promise {\n this._shellStore.dispatchLoadPolicy();\n\n /** check if there is already policy repository in the store */\n const hasPolicyInStore = this._shellStore.hasPolicy$$();\n\n if (hasPolicyInStore) {\n return new Promise((resolve) => {\n resolve(this._shellStore.policy$$());\n });\n }\n\n const policyParams: IProfileParams = excludeEmptyValues(params);\n\n const policy = this._httpService\n .fetch<{}, IPolicy>(`policy`, {\n params: { ...policyParams }\n })\n .pipe(\n catchError((error: any) => {\n this._shellStore.dispatchLoadPolicyFailure(error);\n return throwError(() => error);\n }),\n tapResult((policy: IPolicy) => {\n const { stages } = policy;\n // this._shellStore.dispatchLoadPolicySuccess(policy);\n this._shellStore.dispatchUpdateProcessProfile({ policy });\n this._shellStore.dispatchUpdateStages(stages);\n }),\n filterResult()\n );\n\n return lastValueFrom(policy);\n }\n}\n","import { computed, inject, Injectable, Signal } from '@angular/core';\nimport { IPolicy, IProcessProfile, IProfileParams } from '@partners/api';\nimport { ErrorsService } from '@partners/errors';\nimport { GLOBAL_SETTINGS } from '@partners/settings';\nimport { RootStore, ShellStore } from '@partners/state';\nimport { ThemeService } from '@partners/themes';\nimport { TConfigPartition, TLink, TProcessId, TTerminationReason } from '@partners/types';\nimport { hasQueryString, isEmpty, isNotEmpty, isValidUrl, queryStringToObject } from '@partners/utils';\nimport { BehaviorSubject, Observable, of, throwError } from 'rxjs';\nimport { filter, map, switchMap, withLatestFrom } from 'rxjs/operators';\nimport { PolicyService } from './policy.service';\n\nexport type IProfileSanitizer = {\n [key in keyof IProfileParams as string]: string | number | boolean | null | undefined;\n};\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ProfileService {\n private createEmitter: BehaviorSubject;\n private changeEmitter: BehaviorSubject;\n\n //#region public properties\n get change$(): Observable {\n return this.changeEmitter.asObservable();\n }\n\n get create$(): Observable {\n return this.createEmitter.asObservable();\n }\n\n get processId$$(): Signal {\n return this._shellStore.processId$$;\n }\n\n get isProfileCreated(): boolean {\n return isNotEmpty(this._shellStore.profile$$()?.policy);\n }\n\n get profile$$(): Signal {\n return this._shellStore.profile$$;\n }\n\n get params$$(): Signal {\n return computed(() => {\n const profile = this._shellStore.profile$$();\n if (!profile) {\n return undefined;\n }\n const { params } = profile;\n return params;\n });\n }\n\n get clubLabel$$(): Signal {\n return computed(() => {\n const { name } = this.profile$$().partner;\n return name;\n });\n }\n\n get productLabel$$(): Signal {\n return computed(() => {\n const { productName } = this._shellStore.globalConfig$$().text;\n return productName;\n });\n }\n\n matchCard = computed(() => this._shellStore.matchCard$$());\n /** match Account Frame Loan (הלוואה ממסגרת החשבון === הלוואה ללא כרטיס) */\n matchAcfl = computed(() => this._shellStore.matchAcfl$$());\n /** match any By Now Pay Later loan */\n matchBnpl = computed(() => this._shellStore.matchBnpl$$());\n /** match any loan */\n matchLoan = computed(() => this._shellStore.matchLoan$$());\n\n //#endregion\n\n private readonly _shellStore = inject(ShellStore);\n private readonly _themeService = inject(ThemeService);\n private readonly _policyService = inject(PolicyService);\n private readonly _shellConfig = inject(GLOBAL_SETTINGS);\n private readonly _errorsService = inject(ErrorsService);\n private _rootStore = inject(RootStore);\n\n constructor() {\n this.createEmitter = new BehaviorSubject(null);\n this.changeEmitter = new BehaviorSubject(null);\n }\n\n terminateProcess(exitReason: TTerminationReason) {\n let exitUrl: TTerminationReason;\n\n // support redirect url like introduction & offer\n if (exitReason && isValidUrl(exitReason)) {\n exitUrl = exitReason;\n } else {\n let links = {} as TConfigPartition;\n //const { links } = this._policyService.globalConfig$$();\n\n // A temporary solution until a mini policy will implemented\n /** check if there is already policy repository in the store */\n const hasPolicyInStore = this._shellStore.hasPolicy$$();\n if (hasPolicyInStore) {\n links = this._policyService.globalConfig$$().links;\n } else {\n const defaultUrl = 'https://www.cal-online.co.il/ecredit/loan-without-credit-card/' as TLink;\n links = { customerExitUrl: defaultUrl, errorUrl: defaultUrl, exitUrl: defaultUrl };\n }\n\n switch (exitReason) {\n case 'customer-opt-out': {\n exitUrl = links['customerExitUrl'];\n break;\n }\n case 'error': {\n exitUrl = links['errorUrl'];\n break;\n }\n case 'success': {\n exitUrl = links['exitUrl'];\n break;\n }\n }\n }\n if (exitUrl && isValidUrl(exitUrl)) {\n // reset store\n this._rootStore.dispatchResetState();\n // setTimeout in order to completed load summary call in case of I_0261\n setTimeout(() => {\n window.location.href = exitUrl;\n }, 100)\n return;\n }\n console.log(`terminating process... reason: ${exitReason}, url: ${exitUrl}`);\n this._errorsService.throwLocalError({ message: `terminate process ${exitReason} url was not found` });\n }\n\n /**\n * @description\n * creates an application profile for the current session. the profile is built from:\n * 1. the raw url params received as query string and parsed here\n * 2. a policy http response with baseline config & data for the specified process\n * 3. a custom theme css file downloaded asynchronously and inserted into the DOM\n *\n * the profile holds all the global application level data, and api which controls that\n * data. after a profile is created the app can be launched, not before.\n *\n * @param url the current browser's url\n * @returns an initialized new process profile stream\n */\n createAppProfile$(rawUrl: string = window.location.href): Observable {\n return this.parseProfileParams(rawUrl).pipe(\n /** initialize the application with the url params received & parsed */\n filter((params: IProfileParams) => this.isValidParams(params)),\n switchMap(async (params: IProfileParams) => {\n let profile;\n if (!this.shouldCreateNewProfile(rawUrl, params)) {\n profile = await this.reloadProfile();\n this.changeEmitter.next(profile as IProcessProfile);\n } else {\n profile = await this.createProfile(params);\n this.createEmitter.next(profile as IProcessProfile);\n }\n\n return profile;\n })\n );\n }\n\n /**\n * @description\n * to survive a simple browser reload of the app, we can rely on session storage & our store\n * data to rehydrate the profile state, however to complete restoring the profile look |& feel\n * ui - we must pull the css file again each time the app reloads\n *\n * @returns a promise resolved with updated profile\n */\n private async reloadProfile(): Promise {\n const profile = this.profile$$();\n await this.loadTheme(profile.params);\n return new Promise((resolve) => {\n resolve(profile as IProcessProfile);\n });\n }\n\n /**\n * create and store a new profile data\n * @param profileParams the basic profile params (from browser url query string)\n * @returns a promise resolved with created profile\n */\n private async createProfile(profileParams: IProfileParams): Promise {\n const { uid } = profileParams;\n\n this._shellStore.dispatchUpdateProfileParams(profileParams);\n\n if (uid) {\n return this.createWebProfile(profileParams);\n }\n\n return this.createDefaultProfile(profileParams);\n }\n\n private async createWebProfile(profileParams: IProfileParams): Promise {\n if (!profileParams?.uid) {\n throwError(() => {\n message: `Can't create partner's profile without a uid`;\n });\n }\n\n /** load theme the new web profile */\n const theme = await this.loadTheme(profileParams);\n\n let nextProfile: Partial = this.initializeProfile(profileParams);\n\n return this.finalizeProfile(nextProfile);\n }\n\n private sanitizeParams(obj: IProfileParams): IProfileParams {\n const ff: IProfileSanitizer = {};\n\n const result = Object.entries(obj).reduce((acc, [key, value]) => {\n ff[key] = value === 'null' || value === 'undefined' ? undefined : value;\n return ff;\n }, {} as IProfileSanitizer);\n\n return result as unknown as IProfileParams;\n }\n\n private async createDefaultProfile(profileParams: IProfileParams): Promise {\n if (!profileParams?.token) {\n throwError(() => {\n message: `Can't create partner's profile without a token`;\n });\n }\n /** load policy data for the new profile */\n const policy = await this._policyService.loadPolicy(profileParams);\n\n /** load theme the new default profile */\n const theme = await this.loadTheme(profileParams);\n\n let nextProfile: Partial = this.initializeProfile(profileParams, policy);\n\n return this.finalizeProfile(nextProfile);\n }\n\n private finalizeProfile(profile: Partial): Promise {\n /** save the new profile data to the store */\n this._shellStore.dispatchUpdateProcessProfile(profile as IProcessProfile);\n\n return new Promise((resolve) => {\n resolve(profile as IProcessProfile);\n });\n }\n\n private initializeProfile(profileParams: IProfileParams, policy?: IPolicy): Partial {\n return {\n partner: {\n name: profileParams.partner,\n description: profileParams.partner\n },\n params: profileParams,\n policy\n } as Partial;\n }\n\n private async loadTheme({ theme }: IProfileParams) {\n return await this._themeService.loadTheme(theme);\n }\n \n /** profile should be created if:\n * first lunch\n * run new full url(with querystring) on current tab\n * also fix issue when user exit app and lunch again in order to override the old session store\n * \"params\" can comes from store in case of refresh, therefore we check queryparams via rawUrl\n */\n private shouldCreateNewProfile(rawUrl: string, params: IProfileParams): boolean {\n /** get current stored profile */\n const profile = this.profile$$();\n if (isEmpty(profile?.partner) || hasQueryString(rawUrl)) {\n return true;\n }\n /** check if new params requires updating the existing profile */\n return this.compareParams(params, profile?.params);\n }\n\n /**\n * @description\n * get the latest profile query string params either from url or store.\n * two events triggers this method:\n * 1. when the application is first loaded - its url contains query parameters from which we create a new\n * process profile\n * 2. when the application reloads - on browser refresh event the existing profile needs to be restored!\n * to do that - we read the profile query params from the store and recreate the latest profile\n *\n * @param url the current url of the app\n * @returns a stream of the profile query params\n */\n private parseProfileParams(url: string): Observable {\n return of(url).pipe(\n map((url) => {\n /** read whatever params are in the querystring */\n let urlParams = queryStringToObject(this._shellConfig.urlParams, url) as IProfileParams;\n\n /** just in case - eliminate ill-formed params (example: ...&theme=\"null\" | &theme=\"undefined\") */\n urlParams = { ...this.sanitizeParams(urlParams) };\n\n /** supplement url params with missing mandatory params (logic should be applied in server not client!) */\n return this.extendDefaultParams(urlParams);\n }),\n withLatestFrom(this._shellStore.params$),\n map(([nextParams, currentParams]: [IProfileParams, IProfileParams]) => {\n /** we have \"next\" params if this method is called on app first load */\n let hasNextParams = this.isValidParams(nextParams);\n /** we have \"current\" params if this method is called on browser refresh */\n let hasCurrentParams = this.isValidParams(currentParams);\n if (hasNextParams && !hasCurrentParams) {\n return nextParams;\n }\n if (!hasNextParams && hasCurrentParams) {\n return currentParams;\n }\n /** if we have both current & next - its time to update to next profile */\n if (this.compareParams(nextParams, currentParams)) {\n return nextParams;\n }\n return currentParams;\n })\n );\n }\n\n updateUrlParams(params: IProfileParams) {\n this._shellStore.dispatchUpdateProfileParams(params);\n }\n\n private isValidParams(params: IProfileParams): boolean {\n return Boolean(params?.token?.length || params?.uid?.length);\n }\n\n private compareParams = (nextParams: IProfileParams, currentParams: IProfileParams): boolean => {\n if (nextParams?.uid) {\n return nextParams?.uid !== currentParams?.uid;\n }\n\n return nextParams?.token !== currentParams?.token;\n };\n\n /**\n * @description\n * append some default constant params & values to the query string, these params are required\n * by the policy service to complete\n * @param targetObject the newly created profile object\n * @param extensionNode the data node representing key+value\n */\n private extendDefaultParams(targetObject: Partial): IProfileParams {\n /** by default, set trigger code 0 (not null) */\n const triggerCode = targetObject?.triggerCode ? targetObject.triggerCode : 0;\n\n /**\n * as default - we use the \"partner\" url param value as the theme name. however - if the \"theme\"\n * url param has a value - we prefer that value as the theme name. to keep \"theme\" as the SSR of\n * the app's theme name - we match the \"partner\" value as the theme name if \"theme\" is empty.\n **/\n const theme = isEmpty(targetObject?.theme) ? targetObject?.partner : targetObject?.theme;\n\n return Object.assign({}, { ...targetObject }, { theme, triggerCode }) as IProfileParams;\n }\n}\n","import { inject } from '@angular/core';\nimport { CatalogService } from '@partners/catalog';\nimport { IHttpOptions } from '@partners/http';\nimport { isEmptyObject } from '@partners/utils';\nimport { CustomerFacade } from '../../facades/customer';\nimport { PolicyService, ProfileService } from '../services';\n\nexport const policyGuard = async (options: IHttpOptions = {}): Promise => {\n const policyService = inject(PolicyService);\n const customerFacade = inject(CustomerFacade);\n const isLoan$$ = inject(ProfileService).matchLoan;\n const catalogService = inject(CatalogService);\n\n const policyResult = await policyService.loadPolicy();\n\n // call customer \"once\" if loan\n if (isLoan$$() && !customerFacade.hasCustomerResponse$$()) {\n // loadCustomer uses loadFinance data - its for synchronized.\n await catalogService.loadFinance(options);\n\n await customerFacade.loadCustomer();\n }\n\n return !isEmptyObject(policyResult);\n};\n","import { InjectionToken, Signal, computed, inject } from '@angular/core';\nimport { ProfileService } from '../services';\n\n/**\n * @description\n * match a specific process identifier to an existing (stored) value in session. for example:\n * query literal might be \"card\" | \"loan\" | \"upsell\". these predefined values are checked against\n * the current process id stored in session value to resolve a match.\n *\n * this is a factory function! which means it (or its consumer functions below) cannot be called\n * out of injection context. if we do need to resolve a match to process outside injection context\n * we can use these functions be injecting the data with injection token and provide a factory\n *\n * @param processId a process literal to query against the stored value\n * @returns an async boolean. true - if query value matches the stored value\n */\n\nexport const IS_CARD_PROCESS = new InjectionToken>('isCardProcess', {\n providedIn: 'root',\n factory: () => {\n const isCardMatch = inject(ProfileService).matchCard;\n // Console.logWarning(`IS_CARD_PROCESS: ${isCardMatch()}`);\n return isCardMatch;\n }\n});\n\n/** any loan process (currently can match either BNPL | ACFL loans - see below) */\nexport const IS_LOAN_PROCESS = new InjectionToken>('isLoanProcess', {\n providedIn: 'root',\n factory: () => {\n const isLoanMatch = inject(ProfileService).matchLoan;\n // Console.logWarning(`IS_LOAN_P ROCESS: ${isLoanMatch()}`);\n return isLoanMatch;\n }\n});\n\n/** A.C.F.L means \"Account Frame Loan\" => (הלוואה ממסגרת החשבון) הלוואה ללא כרטיס */\nexport const IS_ACFL_PROCESS = new InjectionToken>('isAcflProcess', {\n providedIn: 'root',\n factory: () => {\n const isAcflMatch = inject(ProfileService).matchAcfl;\n // Console.logWarning(`IS_ACFL_PROCESS: ${isAcflMatch()}`);\n return isAcflMatch;\n }\n});\n\n/** B.N.P.L => \"Buy Now Pay Later\" Loan */\nexport const IS_BNPL_PROCESS = new InjectionToken>('isBnplProcess', {\n providedIn: 'root',\n factory: () => {\n const isBnplMatch = inject(ProfileService).matchBnpl;\n // Console.logWarning(`IS_BNPL_PROCESS: ${isBnplMatch()}`);\n return isBnplMatch;\n }\n});\n\nexport const canMatchCard$$ = computed(() => inject(IS_CARD_PROCESS)());\n\nexport const canMatchLoan$$ = computed(() => inject(IS_LOAN_PROCESS)());\n\nexport const canMatchBnpl$$ = computed(() => inject(IS_BNPL_PROCESS)());\n\nexport const canMatchAnyLoan$$ = computed(() => inject(IS_LOAN_PROCESS)());\n","import { Injectable } from '@angular/core';\nimport { ActivatedRoute, Params, Router } from '@angular/router';\nimport { isEmpty, takeOnce } from '@partners/utils';\nimport { map, tap } from 'rxjs';\nimport { IFlatStage, INavigationOptions, IStage, IStageQueryCriteria, IStageState } from '../models';\n\nexport const DEFAULT_NAVIGATION_OPTIONS: INavigationOptions = {\n isExplicitNavigation: false,\n navOutsideZone: false\n};\n\n/**\n * @description\n * A stateless navigation service. it enables strict (limited) navigation privileges in the app.\n * the service relies on an array of stage data nodes which dictates the navigation restrictions.\n * when a navigation event triggers, the service searches the target route's identifier (id|path)\n * in the given stages collection, if a match is found - permission to navigate is given according\n * to a linear navigation restriction, meaning: navigation to target is allowed only if the target\n * is specified as a target stage of the current stage.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class NavigationService {\n constructor(private router: Router, private activatedRoute: ActivatedRoute) {}\n\n /**\n * @description Gets the flat stages collection and routeId, checks if the requested stage navigation is allowed,\n * and navigates to the the next stage feature.\n * Emits error if the stage wasn't found, or if it is not allowed to navigate to the requested stage.\n * @param flatStages The flat stages collection.\n * @param currentStageId The route id of the requested stage.\n */\n moveNext(currentStageId: number, flatStages: IFlatStage[], options?: INavigationOptions) {\n options = { ...DEFAULT_NAVIGATION_OPTIONS, ...options };\n\n this.activatedRoute.url,\n this.activatedRoute.params\n .pipe(\n takeOnce(),\n map((params) => this.filterParamsFromUrl(this.router.url, params)),\n tap((url) => {\n const currentStage = this.findStageByFullUrl(flatStages, url);\n\n if (!currentStage) {\n this.throwStageNotFoundError();\n }\n\n /** route is reloaded (possibly browser refresh) */\n if (currentStage.nextPossibleStage === currentStageId) {\n return;\n }\n\n let nextStage = this.findStageById(flatStages, currentStage.nextPossibleStage);\n\n if (!nextStage) {\n /**\n * when navigating implicitly via \"moveNext\" we assume there is a matching stage for\n * current & next route. otherwise implicit navigation cant be completed and so - we\n * throw an error\n **/\n this.throwStageNotFoundError();\n }\n\n /** when navigating explicitly we ignore the isCompleted state of the stage */\n if (options.isExplicitNavigation) {\n nextStage = { ...nextStage, ...{ isComplete: false } };\n }\n\n if (nextStage.isComplete) {\n /**\n * restricted navigation disallow to navigate to a stage marked as completed, meaning -\n * the user cant navigate back\n */\n this.throwNavigationNotAllowedError();\n }\n\n this.router.navigateByUrl(nextStage.url);\n })\n )\n .subscribe();\n }\n\n /**\n * in skip stages navigation mode (where we are navigating actual sale screens without\n * stages map) - we still need to manage a strict navigation (currently - this means\n * preventing backward navigation). since there are no stage or flatStages maps - we\n * keep track of the navigation routes by storing their urls in anonymousStages array\n * in the shell store. on each NavigationEnd we store the anonymous stage in the array,\n * navigating backward will fail if target url exist inside anonymousStages array\n * @param targetUrl the url we want to navigate to\n * @param anonymousStages a collection of stages url (when there is no stages map)\n * @param params any params exist on the route\n * @returns boolean indication: true - navigation is allowed. false - url already visited -\n * navigation nis denied\n */\n canLoadAnonymousRoute(targetUrl: string, anonymousStages: Partial[], params?: Params): boolean {\n targetUrl = this.filterParamsFromUrl(targetUrl, params);\n\n const anonymous = anonymousStages.find(({ url }) => url === targetUrl);\n\n return isEmpty(anonymous);\n }\n\n canLoadRoute(targetUrl: string, flatStages: IFlatStage[], params?: Params): boolean {\n targetUrl = this.filterParamsFromUrl(targetUrl, params);\n\n const targetStage: IFlatStage = this.findStageByFullUrl(flatStages, targetUrl);\n\n if (isEmpty(targetStage)) {\n /** current route has no matching stage, therefore we don not restrict navigating to it */\n return true;\n }\n\n if (targetStage.isComplete) {\n return false;\n }\n\n const isFirstStage = !!!targetStage.preMandatoryStage;\n\n if (isFirstStage) {\n return true;\n }\n\n // const previousStage: IFlatStage = this.findStageById(flatStages, targetStage.preMandatoryStage);\n\n // if (isEmpty(previousStage)) {\n // /** target route has no matching stage, therefore we cant restrict navigating to it */\n // return true;\n // }\n\n /** both source and target are part of the stages map - restrict navigation to map rules */\n return !targetStage.isComplete;\n }\n\n /**\n * @description Receives a flat stages collection and routeId, checks if the requested stage navigation is exist,\n * and navigates to the the next stage feature.\n * Emits error if the stage wasn't found.\n * @param flatStages The flat stages collection.\n * @param stageId The route id of the requested stage.\n */\n moveTo(flatStages: IFlatStage[], stageId: number, options?: any) {\n const nextStage = this.findStageById(flatStages, stageId);\n if (!nextStage) {\n this.throwStageNotFoundError();\n }\n\n this.router.navigateByUrl(nextStage.name);\n }\n\n moveAny(url: string, options?: INavigationOptions) {\n this.router.navigateByUrl(url, options);\n }\n\n /**\n * @description Receives a nested (non flattened) stages input, and maps the stages to flat stages hierarchy.\n * @param sourceStages A nested stages hierarchy array.\n * @returns A flat stages hierarchy array.\n */\n syncRouter(sourceStages: IStage[]) {\n const flatStages: IFlatStage[] = [];\n\n for (const stage of sourceStages) {\n this.mapStage(sourceStages, flatStages, stage, [stage.name]);\n }\n\n return flatStages;\n }\n\n /**\n * @description Receives a flat stages hierarchy input, and updates the stages status.\n * @param flatStages A flat stages hierarchy array.\n * @returns An status updated flat stages hierarchy array.\n */\n updateStagesState(flatStages: IFlatStage[]) {\n /**\n * update current stage (current stage becomes \"complete\" stage):\n * take the complete flat stages array, a search query object and a state object, then -\n * find the target stage using the search query and update the stage's state flags\n */\n this.editStageNode(\n flatStages,\n { isCurrent: true },\n {\n isCurrent: false,\n isPristine: false,\n isComplete: true\n }\n );\n\n /**\n * * update next stage (next stage becomes \"current\" stage):\n * take the complete flat stages array, a search query object and a state object, then -\n * find the target stage using the search query and update the stage's state flags\n */\n this.editStageNode(\n flatStages,\n { path: this.router.url },\n {\n isCurrent: true,\n isPristine: false,\n isComplete: false\n }\n );\n\n return flatStages;\n }\n\n /**\n * @description Receives a flat stages array, and finds the stage by comparing its path to current url.\n * @param flatStages Flat stages array.\n * @returns Current stage.\n */\n findStageByCurrentUrl(flatStages: IFlatStage[]): IFlatStage {\n return this.findStageByFullUrl(flatStages, this.router.url);\n }\n\n findStageIndex(flatStages: IFlatStage[], searchCriteria: Partial): number {\n const { path, id, code, isCurrent: isActive } = searchCriteria;\n\n const searchPredicate = (flatStage: IFlatStage) => {\n if (isActive) {\n return flatStage.isCurrent === isActive;\n }\n if (path) {\n return flatStage.url === path;\n }\n if (id) {\n return flatStage.screenCode === id;\n }\n if (code) {\n return flatStage.stageCode === code;\n }\n return false;\n };\n\n return flatStages.findIndex(searchPredicate);\n }\n\n /**\n * @description Receives a flat stages hierarchy input, and find the stage by route id.\n * @param flatStages A flat stages hierarchy array.\n * @param stageId Stage route id.\n * @returns Requested stage.\n */\n findStageById(flatStages: IStage[], stageId: number) {\n return flatStages.find((flatStage) => flatStage.screenCode === stageId);\n }\n\n editStageNode(\n flatStages: IFlatStage[],\n searchCriteria: IStageQueryCriteria,\n updateOptions: Partial = {}\n ): IFlatStage[] {\n const currentIndex = this.findStageIndex(flatStages, searchCriteria);\n /**\n * target index not found - we assume the target route does not require\n * authorization or other privileges to load (such are the message pages)\n */\n if (!~currentIndex) {\n return flatStages;\n }\n\n /**\n * is target route has corresponding stage the it needs to follow the\n * strict rule of linear navigation\n */\n const currentStage = flatStages[currentIndex];\n\n const updatedStage = this.updateStageState(currentStage, updateOptions);\n\n flatStages[currentIndex] = { ...updatedStage };\n\n return flatStages;\n }\n\n private updateStageState(targetNode: IStage | IFlatStage, updateOptions: Partial = {}): IFlatStage {\n targetNode = Object.assign({ ...targetNode }, { ...updateOptions });\n return targetNode as IFlatStage;\n }\n\n /**\n * @description Receives a flat stages hierarchy input, and find the stage by path.\n * @param flatStages A flat stages hierarchy array.\n * @param url The path to search the stage by.\n * @returns Current stage.\n */\n private findStageByFullUrl(flatStages: IFlatStage[], url: string): IFlatStage {\n return flatStages.find((flatStage) => flatStage.url === url);\n }\n\n /**\n * @description A recursive function which fills a flat stage hierarchy, due to the stages logic.\n * @param flatStages An array which the function fills flat stage hierarchy into.\n * @param stage The current stage in the recursive process.\n * @param pathArray An array which includes the hierarchical names of the stage parents.\n * @param parentStage The parent stage in a recursive case, Optional (received when the stage isa child of another stage).\n */\n private mapStage(\n sourceStages: IStage[],\n flatStages: IFlatStage[],\n stage: IStage,\n pathArray: string[],\n parentStage?: IStage\n ) {\n if (!stage.children) {\n // Create a full string path, which contains all accentors' names\n const url = this.concatPathFromArray(pathArray);\n\n /**\n * In case the stage is a child, and it has No nextPossibleStage (=0), then the nextPossibleStage\n * will be the parent's nextPossibleStage.\n */\n const isLastChild = parentStage && !stage.nextPossibleStage;\n let nextPossibleStage = isLastChild ? parentStage.nextPossibleStage : stage.nextPossibleStage;\n\n const nextStageParent = this.findSourceStage(nextPossibleStage, sourceStages);\n if (nextStageParent?.children?.length) {\n nextPossibleStage = nextStageParent.children[0].screenCode;\n }\n\n /**\n * In case the stage is a child, and it has NO preMandatoryStage (=0), then the preMandatoryStage\n * will be the parent's preMandatoryStage.\n */\n const isFirstChild = parentStage && !stage.preMandatoryStage;\n let preMandatoryStage = isFirstChild ? parentStage.preMandatoryStage : stage.preMandatoryStage;\n\n const nextFlatStage = this.updateStageState(\n {\n ...stage,\n url,\n nextPossibleStage,\n preMandatoryStage\n },\n { isPristine: true, isCurrent: false, isComplete: false }\n );\n\n flatStages.push(nextFlatStage);\n } else {\n stage.children.forEach((child) =>\n this.mapStage(sourceStages, flatStages, child, [...pathArray, child.name], stage)\n );\n }\n }\n\n private findSourceStage(screenCode: number, stages: IStage[]): IStage | undefined {\n let found;\n for (let i = 0; i < stages.length; i++) {\n if (stages[i].children?.length) {\n let found = this.findSourceStage(screenCode, stages[i].children);\n }\n if (stages[i].screenCode === screenCode) {\n let found = stages[i];\n return found;\n }\n }\n return found;\n }\n\n /**\n * @description Create a path from array of strings.\n * @param pathArray An array of string.\n * @returns A result path.\n */\n private concatPathFromArray(pathArray: string[]) {\n return pathArray.reduce((pathString, name) => pathString.concat('/' + name), '');\n }\n\n private throwStageNotFoundError() {\n throw new Error('Stage not found');\n }\n\n private throwNavigationNotAllowedError() {\n throw new Error('Cannot navigate to requested page');\n }\n\n /**\n * @description Filters the params substrings from the url.\n * @param url The url to filter.\n * @param params The url params object.\n * @returns A filtered url string with no params.\n */\n private filterParamsFromUrl(url: string, params: Params) {\n // Used to remove query params.\n url = url.split('?')[0];\n\n url = Object.keys(params).reduce((url, key) => {\n return url.replace('/' + params[key], '');\n }, url);\n\n return url;\n }\n}\n","import { TPartnerName } from '@partners/api';\nimport { IFeatureSettings, IPartnerSettings, IThemeSettings, TFeature } from './model';\n\nconst DEFAULT_FEATURE_SETTINGS: Partial = {\n isFooterFixed: false,\n isProgressHidden: false,\n isProgressRendered: true,\n headerCloseAction: 'confirm-exit'\n};\n\nexport class SettingsMap {\n //#region features-map\n static #features = new Map>()\n .set('introduction', SettingsMap.create('introduction', { isFooterFixed: true, isProgressRendered: false }))\n .set('welcome', SettingsMap.create('welcome', { isFooterFixed: true, isProgressRendered: false }))\n .set('amount', SettingsMap.create('amount'))\n .set(\n 'agreement-indication',\n SettingsMap.create('agreement-indication', {\n path: 'agreement/agreement-indication',\n isFooterFixed: true\n })\n )\n .set(\n 'agreement-concent',\n SettingsMap.create('agreement-concent', {\n path: 'agreement/agreement-concent',\n isFooterFixed: true,\n loaderOptions: { send: [{ message: 'אנחנו מסכמים את כל הפרטים שמילאת' }] }\n })\n )\n .set('scan-intro', SettingsMap.create('scan-intro', { path: 'scan/scan-intro' }))\n .set(\n 'scan-details',\n SettingsMap.create('scan-details', {\n path: 'scan/scan-details',\n isFooterFixed: true\n })\n )\n .set('scan-document', SettingsMap.create('scan-document', { path: 'scan/scan-document', isFooterFixed: true }))\n .set('scan-gender', SettingsMap.create('scan-gender', { path: 'scan/scan-gender', isFooterFixed: true }))\n .set('classify', SettingsMap.create('classify', { isProgressRendered: false }))\n .set('offer', SettingsMap.create('offer', { isProgressRendered: false }))\n .set(\n 'identity',\n SettingsMap.create('identity', {\n loaderOptions: { send: [{ message: 'כמה רגעים, אנחנו רק בודקים את הפרטים' }] }\n })\n )\n .set('auth-guide', SettingsMap.create('auth-guide', { isProgressRendered: false }))\n .set('auth-otp', SettingsMap.create('auth-otp', { path: 'authentication/auth-otp', isProgressRendered: false }))\n .set(\n 'auth-login',\n SettingsMap.create('auth-login', { path: 'authentication/auth-login', isProgressRendered: false })\n )\n .set('contact', SettingsMap.create('contact'))\n .set(\n 'debits',\n SettingsMap.create('debits', {\n loaderOptions: { send: [{ message: 'מצוין, מיד נמשיך' }] }\n })\n )\n .set(\n 'card',\n SettingsMap.create('card', {\n loaderOptions: {\n send: [{ message: 'אנחנו מסכמים את כל הפרטים שמילאת' }]\n }\n })\n )\n .set('delivery', SettingsMap.create('delivery'))\n .set(\n 'privacy',\n SettingsMap.create('privacy', {\n isFooterFixed: true\n })\n )\n .set(\n 'proposal',\n SettingsMap.create('proposal', {\n loaderOptions: {\n load: [\n {\n duration: 6000,\n message: 'אנחנו מסכמים את כל הפרטים שמילאת',\n animation: 'assets/animations/loader_white_01.json'\n },\n {\n message: 'לא לסגור, אנחנו תיכף מסיימים',\n animation: 'assets/animations/loader_white_02.json'\n }\n ]\n }\n })\n )\n .set('address', SettingsMap.create('address'))\n .set('persona', SettingsMap.create('persona'))\n .set('purpose', SettingsMap.create('purpose'))\n .set('simulator', SettingsMap.create('simulator'))\n .set('employment', SettingsMap.create('employment'))\n .set('marital', SettingsMap.create('marital'))\n .set('online-use', SettingsMap.create('online-use'))\n .set('refused', SettingsMap.create('refused'))\n .set('expense', SettingsMap.create('expense'))\n .set('income', SettingsMap.create('income'))\n .set('country', SettingsMap.create('country'))\n .set('account', SettingsMap.create('account'))\n .set(\n 'signature',\n SettingsMap.create('signature', {\n loaderOptions: {\n send: [{ message: 'אנחנו שומרים את המסמכים, כמה שניות וזהו' }],\n load: [{ message: 'נהדר! אנחנו מתקרבים לסיום' }]\n }\n })\n )\n .set('beneficiaries', SettingsMap.create('beneficiaries'))\n .set('demography', SettingsMap.create('demography'))\n .set('disclosure', SettingsMap.create('disclosure', { isFooterFixed: true }))\n .set('lead', SettingsMap.create('lead', { isFooterFixed: true }))\n .set(\n 'summary',\n SettingsMap.create('summary', {\n isFooterFixed: true,\n isProgressRendered: false\n })\n )\n .set(\n 'alert',\n SettingsMap.create('alert', {\n path: 'message/alert',\n isFooterFixed: true,\n isProgressRendered: false\n })\n )\n .set(\n 'guide',\n SettingsMap.create('guide', {\n path: 'message/guide',\n headerCloseAction: 'move-previous',\n isFooterFixed: true,\n isProgressRendered: false\n })\n )\n .set(\n 'confirm',\n SettingsMap.create('confirm', {\n path: 'message/confirm',\n isFooterFixed: true,\n isProgressRendered: false\n })\n )\n .set(\n 'cvv-guide',\n SettingsMap.create('cvv-guide', {\n path: 'message/guide/cvv',\n headerCloseAction: 'move-previous',\n isFooterFixed: true,\n isProgressRendered: false\n })\n )\n .set(\n 'persona-guide',\n SettingsMap.create('persona-guide', {\n path: 'message/guide/persona',\n headerCloseAction: 'move-previous',\n isFooterFixed: true,\n isProgressRendered: false\n })\n )\n .set(\n 'card-type-guide',\n SettingsMap.create('card-type-guide', {\n path: 'message/guide/card-type',\n headerCloseAction: 'move-previous',\n isFooterFixed: true,\n isProgressRendered: false\n })\n )\n .set(\n 'credit-line-guide',\n SettingsMap.create('credit-line-guide', {\n path: 'message/guide/credit-line',\n headerCloseAction: 'move-previous',\n isFooterFixed: true,\n isProgressRendered: false\n })\n )\n .set(\n 'partner-summary-alert',\n SettingsMap.create('partner-summary-alert', {\n path: 'message/alert/partner-summary',\n headerCloseAction: 'direct-exit',\n isFooterFixed: true,\n isProgressRendered: false\n })\n )\n .set(\n 'generic-alert',\n SettingsMap.create('generic-alert', {\n path: 'message/alert/generic',\n headerCloseAction: 'move-previous',\n isFooterFixed: true,\n isProgressRendered: false\n })\n )\n .set(\n 'bdi-alert',\n SettingsMap.create('bdi-alert', {\n path: 'message/alert/bdi',\n headerCloseAction: 'direct-exit',\n isFooterFixed: true,\n isProgressRendered: false\n })\n )\n .set(\n 'loan-amount-refused-alert',\n SettingsMap.create('loan-amount-refused-alert', {\n path: 'message/alert/loan-amount-refused-alert',\n headerCloseAction: 'direct-exit',\n isFooterFixed: true,\n isProgressRendered: false\n })\n )\n .set(\n 'add-card-to-wallet-alert',\n SettingsMap.create('add-card-to-wallet-alert', {\n path: 'message/alert/add-card-to-wallet',\n headerCloseAction: 'direct-exit',\n isFooterFixed: true,\n isProgressRendered: false\n })\n )\n .set(\n 'identity-validation-alert',\n SettingsMap.create('identity-validation-alert', {\n path: 'message/alert/identity-validation',\n headerCloseAction: 'move-previous',\n isFooterFixed: true,\n isProgressRendered: false\n })\n )\n .set(\n 'card-quota-alert',\n SettingsMap.create('card-quota-alert', {\n path: 'message/alert/card-quota',\n isFooterFixed: true,\n isProgressRendered: false,\n headerCloseAction: 'direct-exit'\n })\n )\n .set(\n 'account-verification-alert',\n SettingsMap.create('account-verification-alert', {\n path: 'message/alert/account-verification',\n isFooterFixed: true,\n isProgressRendered: false,\n headerCloseAction: 'direct-exit'\n })\n )\n .set(\n 'exit-confirm',\n SettingsMap.create('exit-confirm', {\n path: 'message/confirm/exit',\n headerCloseAction: 'move-previous',\n isFooterFixed: true,\n isProgressRendered: false\n })\n )\n .set(\n 'opt-out-otp-confirm',\n SettingsMap.create('opt-out-otp-confirm', {\n path: 'message/confirm/opt-out-otp',\n isFooterFixed: true,\n isProgressRendered: false,\n headerCloseAction: 'confirm-exit'\n })\n )\n\n .set(\n 'failed-scan-attempt-alert',\n SettingsMap.create('failed-scan-attempt-alert', {\n path: 'message/alert/failed-scan-attempt',\n isFooterFixed: true,\n isProgressRendered: false,\n headerCloseAction: 'direct-exit'\n })\n )\n .set(\n 'no-document-to-scan-alert',\n SettingsMap.create('no-document-to-scan-alert', {\n path: 'message/alert/no-document-to-scan',\n isFooterFixed: true,\n isProgressRendered: false,\n headerCloseAction: 'move-previous'\n })\n )\n .set(\n 'old-identification-card-alert',\n SettingsMap.create('old-identification-card-alert', {\n path: 'message/alert/old-identification-card',\n isFooterFixed: true,\n isProgressRendered: false,\n headerCloseAction: 'direct-exit'\n })\n )\n .set(\n 'card-identification-alert',\n SettingsMap.create('card-identification-alert', {\n path: 'message/alert/card-identification-alert',\n isFooterFixed: true,\n isProgressRendered: false,\n headerCloseAction: 'direct-exit'\n })\n )\n .set(\n 'invalid-issue-date-alert',\n SettingsMap.create('invalid-issue-date-alert', {\n path: 'message/alert/invalid-issue-date-alert',\n isFooterFixed: true,\n isProgressRendered: false,\n headerCloseAction: 'direct-exit'\n })\n )\n .set(\n 'debit-card-alert',\n SettingsMap.create('debit-card-alert', {\n path: 'message/alert/debit-card-alert',\n isFooterFixed: true,\n isProgressRendered: false,\n headerCloseAction: 'direct-exit'\n })\n )\n .set(\n 'card-verification-alert',\n SettingsMap.create('card-verification-alert', {\n path: 'message/alert/card-verification-alert',\n isFooterFixed: true,\n isProgressRendered: false,\n headerCloseAction: 'direct-exit'\n })\n )\n .set(\n 'agreement-consent-confirm',\n SettingsMap.create('agreement-consent-confirm', {\n path: 'message/confirm/agreement-consent-confirm',\n isFooterFixed: true,\n isProgressRendered: false,\n headerCloseAction: 'direct-exit'\n })\n );\n //#endregion\n\n /**\n * @description\n * creates a settings node for a feature. requires a feature name & feature's path as minimum\n * arguments\n * @param name feature's name\n * @param options feature's settings options\n * @returns a full feature settings node\n */\n static create(name: TFeature, options: Partial = null): IFeatureSettings {\n options = { ...DEFAULT_FEATURE_SETTINGS, ...options };\n return Object.assign(\n {\n name: name,\n path: options?.path ?? `${name}`\n },\n { ...options }\n );\n }\n\n /**\n * a local map of logo settings for each partner. settings can dictate the logo's mode (default|alt)\n * or hide|show the primary|secondary logo.\n * (1) primary: visibility of primary logo (the centered header logo). omitted means visible.\n * (2) secondary: visibility of secondary logo (the right-aligned header logo - usually cal logo). omitted means visible.\n * (3) mode + process: source oof the asset match logo source logo to the process identity name\n */\n static #theme = new Map()\n .set('cal', { isPrimaryLogoVisible: false })\n .set('cal-loan', { isPrimaryLogoVisible: false })\n .set('hashkal', { isPrimaryLogoVisible: false })\n .set('becal', { isPrimaryLogoVisible: false })\n .set('family365', { logoSource: 'alt', logoSourceMatch: 'loan', iconSet: 'outlined' })\n .set('flycard', { logoSource: 'alt', logoSourceMatch: 'loan', iconSet: 'outlined' })\n .set('powercard', { logoSource: 'alt', logoSourceMatch: 'loan', iconSet: 'outlined' })\n .set('shufersal', { logoSource: 'alt', logoSourceMatch: 'loan', iconSet: 'outlined' })\n .set('mami', { iconSet: 'outlined' })\n .set('htzone', { iconSet: 'outlined' })\n .set('students', { iconSet: 'outlined' })\n .set('idf', { iconSet: 'outlined' })\n .set('cibus', { iconSet: 'outlined', isPrimaryLogoVisible: false })\n .set('payme', { iconSet: 'outlined' })\n .set('yenotbitan', { iconSet: 'outlined' })\n .set('wix', { iconSet: 'outlined' })\n .set('carrefour', { iconSet: 'custom' })\n .set('matalon', { isPrimaryLogoVisible: false })\n .set('paylease', { isPrimaryLogoVisible: false })\n .set('hando', { iconSet: 'outlined' })\n .set('bttr', { iconSet: 'outlined' });\n\n static themeSettings(partner: TPartnerName): IThemeSettings | undefined {\n return {\n iconSet: 'filled',\n ...SettingsMap.#theme.get(partner)\n };\n }\n static #partner = new Map().set('paybox', { useHistoryForPartnerUpdates: true });\n\n static partnerSettings(partnerName: TPartnerName): IPartnerSettings {\n return SettingsMap.#partner.get(partnerName);\n }\n /**\n * @description\n * implicitly get a feature's settings via feature's name\n * @param name feature's name\n * @returns feature's settings node\n */\n static get(name: TFeature): IFeatureSettings {\n return SettingsMap.#features.get(name) as IFeatureSettings;\n }\n static introduction(): IFeatureSettings {\n return SettingsMap.get('introduction');\n }\n static welcome(): IFeatureSettings {\n return SettingsMap.get('welcome');\n }\n static simulator(): IFeatureSettings {\n return SettingsMap.get('simulator');\n }\n static identity(): IFeatureSettings {\n return SettingsMap.get('identity');\n }\n static classify(): IFeatureSettings {\n return SettingsMap.get('classify');\n }\n static offer(): IFeatureSettings {\n return SettingsMap.get('offer');\n }\n static scanIntro(): IFeatureSettings {\n return SettingsMap.get('scan-intro');\n }\n static scanGender(): IFeatureSettings {\n return SettingsMap.get('scan-gender');\n }\n static scanDocument(): IFeatureSettings {\n return SettingsMap.get('scan-document');\n }\n static scanDetails(): IFeatureSettings {\n return SettingsMap.get('scan-details');\n }\n static contact(): IFeatureSettings {\n return SettingsMap.get('contact');\n }\n static card(): IFeatureSettings {\n return SettingsMap.get('card');\n }\n static privacy(): IFeatureSettings {\n return SettingsMap.get('privacy');\n }\n static address(): IFeatureSettings {\n return SettingsMap.get('address');\n }\n static employment(): IFeatureSettings {\n return SettingsMap.get('employment');\n }\n static purpose(): IFeatureSettings {\n return SettingsMap.get('purpose');\n }\n static authGuide(): IFeatureSettings {\n return SettingsMap.get('auth-guide');\n }\n static authOtp(): IFeatureSettings {\n return SettingsMap.get('auth-otp');\n }\n static authLogin(): IFeatureSettings {\n return SettingsMap.get('auth-login');\n }\n static persona(): IFeatureSettings {\n return SettingsMap.get('persona');\n }\n static beneficiaries(): IFeatureSettings {\n return SettingsMap.get('beneficiaries');\n }\n static signature(): IFeatureSettings {\n return SettingsMap.get('signature');\n }\n static debits(): IFeatureSettings {\n return SettingsMap.get('debits');\n }\n static income(): IFeatureSettings {\n return SettingsMap.get('income');\n }\n static country(): IFeatureSettings {\n return SettingsMap.get('country');\n }\n static amount(): IFeatureSettings {\n return SettingsMap.get('amount');\n }\n static account(): IFeatureSettings {\n return SettingsMap.get('account');\n }\n static disclosure(): IFeatureSettings {\n return SettingsMap.get('disclosure');\n }\n static proposal(): IFeatureSettings {\n return SettingsMap.get('proposal');\n }\n static agreementIndication(): IFeatureSettings {\n return SettingsMap.get('agreement-indication');\n }\n static agreementConsent(): IFeatureSettings {\n return SettingsMap.get('agreement-concent');\n }\n static agreementConsentConfirm(): IFeatureSettings {\n return SettingsMap.get('agreement-consent-confirm');\n }\n static alert(): IFeatureSettings {\n return SettingsMap.get('alert');\n }\n static guide(): IFeatureSettings {\n return SettingsMap.get('guide');\n }\n static confirm(): IFeatureSettings {\n return SettingsMap.get('confirm');\n }\n static cvvGuide(): IFeatureSettings {\n return SettingsMap.get('cvv-guide');\n }\n static cardTypeGuide(): IFeatureSettings {\n return SettingsMap.get('card-type-guide');\n }\n static creditLineGuide(): IFeatureSettings {\n return SettingsMap.get('credit-line-guide');\n }\n static personaGuide(): IFeatureSettings {\n return SettingsMap.get('persona-guide');\n }\n static bdiAlert(): IFeatureSettings {\n return SettingsMap.get('bdi-alert');\n }\n static identityValidationAlert(): IFeatureSettings {\n return SettingsMap.get('identity-validation-alert');\n }\n static cardQuotaAlert(): IFeatureSettings {\n return SettingsMap.get('card-quota-alert');\n }\n static accountVerificationAlert(): IFeatureSettings {\n return SettingsMap.get('account-verification-alert');\n }\n static exitConfirm(): IFeatureSettings {\n return SettingsMap.get('exit-confirm');\n }\n static optOutOtpConfirm(): IFeatureSettings {\n return SettingsMap.get('opt-out-otp-confirm');\n }\n static expense(): IFeatureSettings {\n return SettingsMap.get('expense');\n }\n static marital(): IFeatureSettings {\n return SettingsMap.get('marital');\n }\n static lead(): IFeatureSettings {\n return SettingsMap.get('lead');\n }\n static delivery(): IFeatureSettings {\n return SettingsMap.get('delivery');\n }\n static summary(): IFeatureSettings {\n return SettingsMap.get('summary');\n }\n static demography(): IFeatureSettings {\n return SettingsMap.get('demography');\n }\n static onlineUse(): IFeatureSettings {\n return SettingsMap.get('online-use');\n }\n static refused(): IFeatureSettings {\n return SettingsMap.get('refused');\n }\n static failedScanAttemptAlert(): IFeatureSettings {\n return SettingsMap.get('failed-scan-attempt-alert');\n }\n static noDocumentToScanAlert(): IFeatureSettings {\n return SettingsMap.get('no-document-to-scan-alert');\n }\n static oldIdentificationCardAlert(): IFeatureSettings {\n return SettingsMap.get('old-identification-card-alert');\n }\n static cardIdentificationAlert(): IFeatureSettings {\n return SettingsMap.get('card-identification-alert');\n }\n static invalidIssueDateAlert(): IFeatureSettings {\n return SettingsMap.get('invalid-issue-date-alert');\n }\n static debitCardAlertComponent(): IFeatureSettings {\n return SettingsMap.get('debit-card-alert');\n }\n static cardVerificationAlert(): IFeatureSettings {\n return SettingsMap.get('card-verification-alert');\n }\n static genericAlert(): IFeatureSettings {\n return SettingsMap.get('generic-alert');\n }\n static partnerSummaryAlert(): IFeatureSettings {\n return SettingsMap.get('partner-summary-alert');\n }\n static loanAmountRefused(): IFeatureSettings {\n return SettingsMap.get('loan-amount-refused-alert');\n }\n static addCardToWalletAlert(): IFeatureSettings {\n return SettingsMap.get('add-card-to-wallet-alert');\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { IEnvironmentSettings, IFeatureSettings, IGlobalSettings, TFeature } from '../model';\n\nexport const FEATURE_NAME = new InjectionToken('FEATURE_NAME');\nexport const FEATURE_SETTINGS = new InjectionToken('FEATURE_SETTINGS');\n\nexport const provideFeatureName = (featureName: TFeature) => {\n return [\n {\n provide: FEATURE_NAME,\n useValue: featureName\n }\n ];\n};\n\nexport const provideFeatureSettings = (featureSettings: IFeatureSettings) => {\n return [\n {\n provide: FEATURE_SETTINGS,\n useValue: featureSettings\n }\n ];\n};\n\nexport const GLOBAL_SETTINGS = new InjectionToken('GLOBAL_SETTINGS');\nexport const ENV_SETTINGS = new InjectionToken('ENV_SETTINGS');\n\nexport const provideShellSettings = (shellSettings: IGlobalSettings) => {\n return [\n {\n provide: GLOBAL_SETTINGS,\n useValue: shellSettings\n }\n ];\n};\n","import { createAction, props } from '@ngrx/store';\nimport { IAccountData, IAccountModel } from '@partners/api';\n\nexport class AccountActions {\n static reset = createAction('[Account] Reset State');\n static load = createAction('[Account] Load');\n static loadSuccess = createAction('[Account] Load Success', props<{ model: IAccountModel; data: IAccountData }>());\n static loadFailure = createAction('[Account] Load Failure', props<{ error: any }>());\n static submit = createAction('[Account] Submit', props<{ model: IAccountModel }>());\n static submitSuccess = createAction('[Account] Submit Success', props<{ data: IAccountData }>());\n static submitFailure = createAction('[Account] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { AccountActions } from './account.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AccountEffects {\n sendAccountEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendAccountEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(AccountActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { IFeatureState } from './state.interface';\n\n// type TStateMutation = Pick, 'model' | 'data'>;\n\ntype TStateMutation = {\n [Property in keyof IFeatureState]: any;\n};\n\nexport class StateBuilder> {\n private _mutation: Partial;\n private _state: T;\n\n constructor(state: T, mutation?: Partial) {\n this._state = { ...state };\n this._mutation = { ...mutation };\n return this;\n }\n\n build(): T {\n return {\n ...this._state,\n ...this._mutation\n };\n }\n\n toError(error: any = {}) {\n this.mutateError(error);\n return this;\n }\n\n toLoading() {\n // this.mutateUiState({\n // loading: true,\n // loaded: false\n // });\n return this;\n }\n toLoaded() {\n // this.mutateUiState({\n // loading: false,\n // loaded: true\n // });\n return this;\n }\n\n private mutateError(mutation: any) {\n const { error } = this._state as IFeatureState;\n this._state = {\n ...this._state,\n ...{ error: { ...mutation } }\n };\n }\n\n // private mutateUiState(mutation: Partial) {\n // const { uiState } = this._state as IFeatureState;\n // this._state = {\n // ...this._state,\n // ...{\n // uiState: {\n // ...uiState,\n // ...mutation\n // }\n // }\n // };\n // }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { AccountActions } from './account.actions';\nimport { IAccountState } from './account.state';\n\nexport const initialAccountState: IAccountState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst accountReducerFn = createReducer(\n initialAccountState,\n on(AccountActions.reset, (state: IAccountState, action) => {\n return new StateBuilder(initialAccountState).build();\n }),\n on(AccountActions.load, (state: IAccountState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(AccountActions.loadSuccess, (state: IAccountState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(AccountActions.submit, (state: IAccountState, action) => {\n return new StateBuilder(state, action).toLoading().build();\n }),\n on(AccountActions.submitSuccess, (state: IAccountState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function accountReducer(state: IAccountState | undefined, action: Action) {\n return accountReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IAccountState } from './account.state';\n\nexport class AccountSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly accountState = (state: IRootState): IAccountState => {\n return state.account as IAccountState;\n };\n\n static readonly model = createSelector(AccountSelectors.accountState, (account: IAccountState) => {\n return account.model;\n });\n\n static readonly data = createSelector(AccountSelectors.accountState, (account: IAccountState) => {\n return account.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { AccountEffects, accountReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([AccountEffects]), StoreModule.forFeature(`account`, accountReducer)]\n})\nexport class AccountStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { Observable } from 'rxjs';\nimport { IRootState } from '../root';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class StateFacade {\n // static readonly rootState = (state: IRootState): IRootState => {\n // return state;\n // };\n // static readonly rootSelector = createSelector(StateFacade.rootState, (rootState: IRootState) => {\n // return rootState;\n // });\n\n // selectRootState(): Observable {\n // return this.store.select(StateFacade.rootSelector);\n // }\n\n selectSignal$(selector: (state: IRootState) => T): Signal {\n const featureState$ = this.store.selectSignal(selector);\n return featureState$;\n }\n\n select$(selector: (state: IRootState) => T): Observable {\n const featureState$ = this.store.select(selector);\n return featureState$;\n }\n\n dispatch(action: any): void {\n this.store.dispatch(action);\n }\n\n constructor(private store: Store) {}\n}\n","import { inject, Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { StateFacade } from './state.facade';\n\n/**\n * @description\n * this service is the base class for store data access. feature services which inherits this service\n * can access stored their own specific data by providing a customized implementation for this method\n */\n\n@Injectable({\n providedIn: 'root'\n})\nexport abstract class StateAccessService {\n /** data access abstraction to be implemented by heirs */\n abstract readonly state$: Observable;\n\n /** a shortcut to the base store facade */\n protected get stateFacade(): StateFacade {\n return this._facade;\n }\n\n private _facade: StateFacade;\n\n constructor() {\n this._facade = inject(StateFacade);\n }\n}\n","import { Injectable, Signal } from '@angular/core';\nimport { IAccountData, IAccountModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { AccountActions, AccountSelectors, IAccountState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AccountStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.state$ = this.stateFacade.select$(AccountSelectors.accountState);\n\n this.model$$ = this.stateFacade.selectSignal$(AccountSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(AccountSelectors.data);\n }\n\n dispatchAccountReset() {\n this.stateFacade.dispatch(AccountActions.reset());\n }\n dispatchAccountLoad() {\n this.stateFacade.dispatch(AccountActions.load());\n }\n dispatchAccountLoadSuccess({ model, data }: { model: IAccountModel; data: IAccountData }) {\n this.stateFacade.dispatch(AccountActions.loadSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IAddressData, IAddressModel } from '@partners/api';\n\nexport class AddressActions {\n static reset = createAction('[Address] Reset State');\n static updateModel = createAction('[Address] Update Model', props<{ model: IAddressModel }>());\n static load = createAction('[Address] Load');\n static loadSuccess = createAction('[Address] Load Success', props<{ model: IAddressModel; data: IAddressData }>());\n static loadFailure = createAction('[Address] Load Failure', props<{ error: any }>());\n static submit = createAction('[Address] Submit');\n static submitSuccess = createAction(\n '[Address] Submit Success',\n props<{ model: IAddressModel; data: IAddressData }>()\n );\n static submitFailure = createAction('[Address] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { AddressActions } from './address.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AddressEffects {\n sendAddressEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendAddressEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(AddressActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { AddressActions } from './address.actions';\nimport { IAddressState } from './address.state';\n\nexport const initialAddressState: IAddressState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst addressReducerFn = createReducer(\n initialAddressState,\n on(AddressActions.reset, (state: IAddressState, action) => {\n return new StateBuilder(initialAddressState).build();\n }),\n on(AddressActions.updateModel, (state: IAddressState, action) => {\n return new StateBuilder(state, action).build();\n }),\n on(AddressActions.load, (state: IAddressState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(AddressActions.loadSuccess, (state: IAddressState, action) => {\n return new StateBuilder(state /*, action - there is no data in this action*/).toLoaded().build();\n }),\n on(AddressActions.submit, (state: IAddressState) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(AddressActions.submitSuccess, (state: IAddressState, action) => {\n return {\n ...state,\n ...{\n model: {\n ...state.model,\n ...action.model\n }\n },\n ...{\n data: {\n ...state.data,\n ...action.data\n }\n }\n };\n\n // return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function addressReducer(state: IAddressState | undefined, action: Action) {\n return addressReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IAddressState } from './address.state';\n\nexport class AddressSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly addressState = (state: IRootState): IAddressState => {\n return state.address as IAddressState;\n };\n\n static readonly model = createSelector(AddressSelectors.addressState, (address: IAddressState) => {\n return address.model;\n });\n\n static readonly data = createSelector(AddressSelectors.addressState, (address: IAddressState) => {\n return address.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { AddressEffects, addressReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([AddressEffects]), StoreModule.forFeature(`address`, addressReducer)]\n})\nexport class AddressStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IAddressData, IAddressModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { AddressActions, AddressSelectors, IAddressState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AddressStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(AddressSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(AddressSelectors.data);\n }\n\n dispatchAddressReset() {\n this.stateFacade.dispatch(AddressActions.reset());\n }\n dispatchUpdateModel({ model }: { model: IAddressModel }) {\n this.stateFacade.dispatch(AddressActions.updateModel({ model }));\n }\n\n dispatchAddressLoad() {\n this.stateFacade.dispatch(AddressActions.load());\n }\n dispatchAddressLoadSuccess({ model, data }: { model: IAddressModel; data: IAddressData }) {\n this.stateFacade.dispatch(AddressActions.loadSuccess({ model, data }));\n }\n dispatchAddressSubmit() {\n this.stateFacade.dispatch(AddressActions.submit());\n }\n dispatchAddressSubmitSuccess({ model, data }: { model: IAddressModel; data: IAddressData }) {\n this.stateFacade.dispatch(AddressActions.submitSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IAmountData, IAmountModel } from '@partners/api';\n\nexport class AmountActions {\n static reset = createAction('[Amount] Reset State');\n static load = createAction('[Amount] Load');\n static loadSuccess = createAction('[Amount] Load Success', props<{ model: IAmountModel; data: IAmountData }>());\n static loadFailure = createAction('[Amount] Load Failure', props<{ error: any }>());\n static submit = createAction('[Amount] Submit');\n static submitSuccess = createAction('[Amount] Submit Success', props<{ model: IAmountModel }>());\n static submitFailure = createAction('[Amount] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { AmountActions } from './amount.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AmountEffects {\n sendAmountEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendAmountEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(AmountActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { AmountActions } from './amount.actions';\nimport { IAmountState } from './amount.state';\n\nexport const initialAmountState: IAmountState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst amountReducerFn = createReducer(\n initialAmountState,\n on(AmountActions.reset, (state: IAmountState, action) => {\n return new StateBuilder(initialAmountState).build();\n }),\n on(AmountActions.load, (state: IAmountState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(AmountActions.loadSuccess, (state: IAmountState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(AmountActions.submit, (state: IAmountState) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(AmountActions.submitSuccess, (state: IAmountState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function amountReducer(state: IAmountState | undefined, action: Action) {\n return amountReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IAmountState } from './amount.state';\n\nexport class AmountSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly amountState = (state: IRootState): IAmountState => {\n return state.amount as IAmountState;\n };\n\n static readonly model = createSelector(AmountSelectors.amountState, (amount: IAmountState) => {\n return amount.model;\n });\n\n static readonly data = createSelector(AmountSelectors.amountState, (amount: IAmountState) => {\n return amount.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { AmountEffects, amountReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([AmountEffects]), StoreModule.forFeature(`amount`, amountReducer)]\n})\nexport class AmountStateModule {}\n","import { Injectable, Signal, computed } from '@angular/core';\nimport { IAmountData, IAmountModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { AmountActions, AmountSelectors, IAmountState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AmountStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n minLoanAmount$$ = computed(() => {\n return this.data$$().minLoanAmount;\n });\n maxLoanAmount$$ = computed(() => {\n return this.data$$().maxLoanAmount;\n });\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(AmountSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(AmountSelectors.data);\n }\n\n dispatchAmountReset() {\n this.stateFacade.dispatch(AmountActions.reset());\n }\n dispatchAmountSubmit() {\n this.stateFacade.dispatch(AmountActions.submit());\n }\n dispatchAmountSubmitSuccess({ model }: { model: IAmountModel }) {\n this.stateFacade.dispatch(AmountActions.submitSuccess({ model }));\n }\n dispatchAmountLoad() {\n this.stateFacade.dispatch(AmountActions.load());\n }\n dispatchAmountLoadSuccess({ model, data }: { model: IAmountModel; data: IAmountData }) {\n this.stateFacade.dispatch(AmountActions.loadSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { ILoginData, ILoginModel, IOtpData, IOtpModel } from '@partners/api';\n\nexport class AuthActions {\n static resetGuide = createAction('[Auth][Guide] Reset State');\n static loadGuide = createAction('[Auth][Guide] Load');\n static loadGuideSuccess = createAction('[Auth][Guide] Load Success');\n static loadGuideFailure = createAction('[Auth][Guide] Load Failure', props<{ error: any }>());\n static submitGuide = createAction('[Auth][Guide] Submit');\n static submitGuideSuccess = createAction('[Auth][Guide] Submit Success');\n static submitGuideFailure = createAction('[Auth][Guide] Submit Failure', props<{ error: any }>());\n\n static resetOtp = createAction('[Auth][Otp] Reset State');\n static incOtpSendAttemptCount = createAction('[Auth][Login] Increment Otp Send Attempt Count');\n static updateOtpModel = createAction('[Auth][Otp] Update Model', props<{ model: IOtpModel }>());\n static loadOtp = createAction('[Auth][Otp] Load');\n static loadOtpSuccess = createAction('[Auth][Otp] Load Success', props<{ model: IOtpModel; data: IOtpData }>());\n static loadOtpFailure = createAction('[Auth][Otp] Load Failure', props<{ error: any }>());\n\n static submitOtp = createAction('[Auth][Otp] Submit', props<{ model: IOtpModel }>());\n static submitOtpSuccess = createAction('[Auth][Otp] Submit Success', props<{ data: IOtpData }>());\n static submitOtpFailure = createAction('[Auth][Otp] Submit Failure', props<{ error: any }>());\n\n static resetLogin = createAction('[Auth][Login] Reset State');\n\n static loadLogin = createAction('[Auth][Login] Load');\n static loadLoginSuccess = createAction(\n '[Auth][Login] Load Success',\n props<{ model: ILoginModel; data: ILoginData }>()\n );\n static loadLoginFailure = createAction('[Auth][Login] Load Failure', props<{ error: any }>());\n static submitLogin = createAction('[Auth][Login] Submit', props<{ model: ILoginModel }>());\n static submitLoginSuccess = createAction('[Auth][Login] Submit Success', props<{ data: ILoginData }>());\n static submitLoginFailure = createAction('[Auth][Otp] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { createEffect, ofType, Actions } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { AuthActions } from './auth.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthEffects {\n sendOtpSuccessEffect$: Observable = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(AuthActions.submitOtpSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n\n sendLoginSuccessEffect$: Observable = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(AuthActions.submitLoginSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n\n constructor(private actions$: Actions) {}\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { AuthActions } from './auth.actions';\nimport { IAuthGuideState, IAuthLoginState, IAuthOtpState } from './auth.state';\n\n/**\n * auth guide\n */\n\nexport const initialAuthGuideState: IAuthGuideState = {\n model: undefined,\n data: undefined\n};\n\nconst authGuideReducerFn = createReducer(\n initialAuthGuideState,\n on(AuthActions.resetGuide, (state: IAuthGuideState, action) => {\n return new StateBuilder(initialAuthGuideState).build();\n }),\n on(AuthActions.loadGuide, (state: IAuthGuideState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(AuthActions.loadGuideSuccess, (state: IAuthGuideState, action) => {\n return new StateBuilder(state).toLoaded().build();\n }),\n on(AuthActions.submitGuide, (state: IAuthGuideState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(AuthActions.submitGuideSuccess, (state: IAuthGuideState, action) => {\n return new StateBuilder(state).toLoaded().build();\n })\n);\n\nexport function authGuideReducer(state: IAuthGuideState | undefined, action: Action) {\n return authGuideReducerFn(state, action);\n}\n\n/**\n * auth otp\n */\n\nexport const initialAuthOtpState: IAuthOtpState = {\n model: undefined,\n data: undefined,\n otpSendAttemptsCount: 0\n};\n\nconst authOtpReducerFn = createReducer(\n initialAuthOtpState,\n on(AuthActions.resetOtp, (state: IAuthOtpState, action) => {\n return new StateBuilder(initialAuthOtpState).build();\n }),\n on(AuthActions.updateOtpModel, (state: IAuthGuideState, action) => {\n return new StateBuilder(state, action).build();\n }),\n on(AuthActions.incOtpSendAttemptCount, (state: IAuthOtpState, action) => {\n let { otpSendAttemptsCount: loginAttemptCount } = state;\n loginAttemptCount++;\n return new StateBuilder(state, { otpSendAttemptsCount: loginAttemptCount }).build();\n }),\n on(AuthActions.loadOtp, (state: IAuthOtpState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(AuthActions.loadOtpSuccess, (state: IAuthOtpState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(AuthActions.submitOtp, (state: IAuthOtpState, action) => {\n return new StateBuilder(state, action).toLoading().build();\n }),\n on(AuthActions.submitOtpSuccess, (state: IAuthOtpState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function authOtpReducer(state: IAuthOtpState | undefined, action: Action) {\n return authOtpReducerFn(state, action);\n}\n\n/**\n * auth login\n */\n\nexport const initialAuthLoginState: IAuthLoginState = {\n model: undefined,\n data: undefined\n};\n\nconst authLoginReducerFn = createReducer(\n initialAuthLoginState,\n on(AuthActions.resetLogin, (state: IAuthLoginState, action) => {\n return new StateBuilder(initialAuthLoginState).build();\n }),\n on(AuthActions.loadLogin, (state: IAuthLoginState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(AuthActions.loadLoginSuccess, (state: IAuthLoginState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(AuthActions.submitLogin, (state: IAuthLoginState, action) => {\n return new StateBuilder(state, action).toLoading().build();\n }),\n on(AuthActions.submitLoginSuccess, (state: IAuthLoginState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function authLoginReducer(state: IAuthLoginState | undefined, action: Action) {\n return authLoginReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { ILoginData, IOtpData } from '@partners/api';\nimport { IRootState } from '../../../root';\nimport { IAuthLoginState, IAuthOtpState } from './auth.state';\n\nexport class AuthSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly authOtpState = (state: IRootState): IAuthOtpState => {\n return state.otp as IAuthOtpState;\n };\n\n static readonly authLoginState = (state: IRootState): IAuthLoginState => {\n return state.login as IAuthLoginState;\n };\n\n static readonly otpModel = createSelector(AuthSelectors.authOtpState, (otpState: IAuthOtpState) => {\n return otpState.model;\n });\n\n static readonly otpData = createSelector(AuthSelectors.authOtpState, (otpState: IAuthOtpState) => {\n return otpState.data;\n });\n\n static readonly otpSendAttemptsCount = createSelector(AuthSelectors.authOtpState, (otpState: IAuthOtpState) => {\n return otpState.otpSendAttemptsCount || 0;\n });\n\n static readonly loginModel = createSelector(AuthSelectors.authLoginState, (loginState: IAuthLoginState) => {\n return loginState.model;\n });\n\n static readonly loginData = createSelector(AuthSelectors.authLoginState, (loginState: IAuthLoginState) => {\n return loginState.data;\n });\n\n static readonly customerLoginData = createSelector(AuthSelectors.loginData, (loginData: ILoginData) => {\n return loginData?.customer;\n });\n\n static readonly accountLoginData = createSelector(AuthSelectors.loginData, (loginData: ILoginData) => {\n return loginData?.debits;\n });\n\n static readonly isLoggedIn = createSelector(AuthSelectors.loginData, (loginData: ILoginData) => {\n return Boolean(loginData?.customer);\n });\n static readonly token = createSelector(AuthSelectors.otpData, (otpData: IOtpData) => {\n return otpData?.token;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { AuthEffects, authGuideReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([AuthEffects]), StoreModule.forFeature(`guide`, authGuideReducer)]\n})\nexport class AuthGuideStateModule {}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { AuthEffects, authLoginReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([AuthEffects]), StoreModule.forFeature(`login`, authLoginReducer)]\n})\nexport class AuthLoginStateModule {}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { AuthEffects, authOtpReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([AuthEffects]), StoreModule.forFeature(`otp`, authOtpReducer)]\n})\nexport class AuthOtpStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IGuideData, IGuideModel } from '@partners/api';\nimport { StateAccessService } from '../../../services';\n\nimport { Observable } from 'rxjs';\nimport { AuthActions, AuthSelectors, IAuthGuideState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthGuideStore extends StateAccessService {\n state$: Observable>;\n\n readonly model$$: Signal;\n readonly data$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(AuthSelectors.otpModel);\n this.data$$ = this.stateFacade.selectSignal$(AuthSelectors.otpData);\n }\n\n dispatchAuthGuideReset() {\n this.stateFacade.dispatch(AuthActions.resetGuide());\n }\n\n /**\n * auth otp dispatches\n */\n dispatchGuideLoad() {\n this.stateFacade.dispatch(AuthActions.loadGuide());\n }\n dispatchGuideLoadSuccess() {\n this.stateFacade.dispatch(AuthActions.loadGuideSuccess());\n }\n dispatchGuideLoadFailure(error: any) {\n this.stateFacade.dispatch(AuthActions.loadGuideFailure(error));\n }\n dispatchGuideSubmit() {\n this.stateFacade.dispatch(AuthActions.submitGuide());\n }\n dispatchGuideSubmitSuccess() {\n this.stateFacade.dispatch(AuthActions.submitGuideSuccess());\n }\n dispatchGuideSubmitFailure(error: any) {\n this.stateFacade.dispatch(AuthActions.submitGuideFailure(error));\n }\n}\n","import { Injectable, Signal } from '@angular/core';\nimport { StateAccessService } from '../../../services';\n\nimport { IAccountData, ICustomer, ILoginData, ILoginModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { AuthActions, AuthSelectors, IAuthLoginState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthLoginStore extends StateAccessService {\n state$: Observable>;\n\n readonly model$$: Signal;\n readonly data$$: Signal;\n\n readonly isLoggedIn$$: Signal;\n readonly customerData$$: Signal;\n readonly accountData$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(AuthSelectors.loginModel);\n this.data$$ = this.stateFacade.selectSignal$(AuthSelectors.loginData);\n this.isLoggedIn$$ = super.stateFacade.selectSignal$(AuthSelectors.isLoggedIn);\n this.customerData$$ = super.stateFacade.selectSignal$(AuthSelectors.customerLoginData);\n this.accountData$$ = super.stateFacade.selectSignal$(AuthSelectors.accountLoginData);\n }\n\n dispatchLoginReset() {\n this.stateFacade.dispatch(AuthActions.resetLogin());\n }\n\n /**\n * auth login dispatches\n */\n dispatchLoginLoad() {\n this.stateFacade.dispatch(AuthActions.loadLogin());\n }\n dispatchLoginLoadSuccess({ model, data }: { model: ILoginModel; data: ILoginData }) {\n this.stateFacade.dispatch(AuthActions.loadLoginSuccess({ model, data }));\n }\n dispatchLoginLoadFailure(error: any) {\n this.stateFacade.dispatch(AuthActions.loadLoginFailure(error));\n }\n dispatchLoginSubmit({ model }: { model: ILoginModel }) {\n this.stateFacade.dispatch(AuthActions.submitLogin({ model }));\n }\n dispatchLoginSubmitSuccess({ data }: { data: ILoginData }) {\n this.stateFacade.dispatch(AuthActions.submitLoginSuccess({ data }));\n }\n dispatchLoginSubmitFailure(error: any) {\n this.stateFacade.dispatch(AuthActions.submitLoginFailure(error));\n }\n}\n","import { Injectable, Signal, computed } from '@angular/core';\nimport { IOtpData, IOtpModel } from '@partners/api';\nimport { StateAccessService } from '../../../services';\n\nimport { Observable } from 'rxjs';\nimport { AuthActions, AuthSelectors, IAuthOtpState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthOtpStore extends StateAccessService {\n state$: Observable>;\n\n readonly model$$: Signal;\n readonly data$$: Signal;\n readonly token$$: Signal;\n readonly sendOtpAttemptsCount$$: Signal;\n readonly isMultipleOtpSendAttempts$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(AuthSelectors.otpModel);\n this.data$$ = this.stateFacade.selectSignal$(AuthSelectors.otpData);\n this.sendOtpAttemptsCount$$ = this.stateFacade.selectSignal$(AuthSelectors.otpSendAttemptsCount);\n this.isMultipleOtpSendAttempts$$ = computed(() => this.sendOtpAttemptsCount$$() > 1);\n this.token$$ = super.stateFacade.selectSignal$(AuthSelectors.token);\n }\n\n dispatchAuthOtpReset() {\n this.stateFacade.dispatch(AuthActions.resetOtp());\n }\n\n /**\n * auth otp dispatches\n */\n dispatchOtpLoad() {\n this.stateFacade.dispatch(AuthActions.loadOtp());\n }\n\n dispatchUpdateOtpAttemptsCount() {\n this.stateFacade.dispatch(AuthActions.incOtpSendAttemptCount());\n }\n dispatchOtpUpdateModel({ model }: { model: IOtpModel }) {\n this.stateFacade.dispatch(AuthActions.updateOtpModel({ model }));\n }\n dispatchOtpLoadSuccess({ model, data }: { model: IOtpModel; data: IOtpData }) {\n this.stateFacade.dispatch(AuthActions.loadOtpSuccess({ model, data }));\n }\n dispatchOtpLoadFailure(error: any) {\n this.stateFacade.dispatch(AuthActions.loadOtpFailure(error));\n }\n dispatchOtpSubmit({ model }: { model: IOtpModel }) {\n this.stateFacade.dispatch(AuthActions.submitOtp({ model }));\n }\n dispatchOtpSubmitSuccess({ data }: { data: IOtpData }) {\n this.stateFacade.dispatch(AuthActions.submitOtpSuccess({ data }));\n }\n dispatchOtpSubmitFailure(error: any) {\n this.stateFacade.dispatch(AuthActions.submitOtpFailure(error));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IBeneficiariesData, IBeneficiariesModel, IBeneficiaryDetails } from '@partners/api';\nimport { IBeneficiaryFormMode } from './beneficiaries.state';\n\nexport class BeneficiariesActions {\n static reset = createAction('[Beneficiaries] Reset State');\n static addBeneficiary = createAction(\n '[Beneficiaries] Add Beneficiary State',\n props<{ beneficiary: IBeneficiaryDetails }>()\n );\n static removeBeneficiary = createAction(\n '[Beneficiaries] Remove Beneficiary State',\n props<{ beneficiary: IBeneficiaryDetails }>()\n );\n static updateBeneficiaryFormMode = createAction(\n '[Beneficiaries] Update Beneficiary Form mode',\n props<{ beneficiaryFormMode: IBeneficiaryFormMode }>()\n );\n static removeAllBeneficiaries = createAction('[Beneficiaries] Remove All Beneficiaries State');\n static updateBeneficiary = createAction(\n '[Beneficiaries] Update Beneficiary State',\n props<{ beneficiary: IBeneficiaryDetails }>()\n );\n static load = createAction('[Beneficiaries] Load');\n static loadSuccess = createAction(\n '[Beneficiaries] Load Success',\n props<{ model: IBeneficiariesModel; data: IBeneficiariesData }>()\n );\n static loadFailure = createAction('[Beneficiaries] Load Failure', props<{ error: any }>());\n static submit = createAction('[Beneficiaries] Submit');\n static submitSuccess = createAction(\n '[Beneficiaries] Submit Success',\n props<{ model: IBeneficiariesModel; data: IBeneficiariesData }>()\n );\n static submitFailure = createAction('[Beneficiaries] Submit Failure', props<{ error: any }>());\n static selectBeneficiary = createAction(\n '[Beneficiaries] Select Beneficiary State',\n props<{ beneficiary: IBeneficiaryDetails }>()\n );\n static resetBeneficiary = createAction('[Beneficiaries] Reset Beneficiary State');\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { BeneficiariesActions } from './beneficiaries.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BeneficiariesEffects {\n sendBeneficiariesEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendBeneficiariesEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(BeneficiariesActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { BeneficiariesActions } from './beneficiaries.actions';\nimport { IBeneficiariesState } from './beneficiaries.state';\n\nexport const initialBeneficiariesState: IBeneficiariesState = {\n uiState: undefined,\n model: undefined,\n data: undefined,\n beneficiaryFormMode: 'none',\n addedBeneficiaries: [],\n selectedBeneficiary: undefined\n};\n\nconst beneficiariesReducerFn = createReducer(\n initialBeneficiariesState,\n on(BeneficiariesActions.reset, (state: IBeneficiariesState, action) => {\n return new StateBuilder(initialBeneficiariesState).build();\n }),\n on(BeneficiariesActions.addBeneficiary, (state: IBeneficiariesState, action) => {\n const { beneficiary } = action;\n\n const addedBeneficiaries = [...(state.addedBeneficiaries || [])];\n\n addedBeneficiaries.push(beneficiary);\n\n const mutation = { addedBeneficiaries };\n\n return new StateBuilder(state, mutation).toLoading().build();\n }),\n on(BeneficiariesActions.removeBeneficiary, (state: IBeneficiariesState, action) => {\n const { beneficiary } = action;\n let addedBeneficiaries = [...state.addedBeneficiaries];\n if (!addedBeneficiaries?.length) {\n return { ...state };\n }\n const beneficiaryIndex = addedBeneficiaries.findIndex((b) => b.idNum == beneficiary.idNum);\n addedBeneficiaries.splice(beneficiaryIndex, 1);\n\n const mutation = { addedBeneficiaries };\n\n return new StateBuilder(state, mutation).toLoading().build();\n }),\n on(BeneficiariesActions.removeAllBeneficiaries, (state: IBeneficiariesState) => {\n const mutation: Partial = { addedBeneficiaries: [] };\n return new StateBuilder(state, mutation).toLoading().build();\n }),\n on(BeneficiariesActions.updateBeneficiary, (state: IBeneficiariesState, action) => {\n const { beneficiary } = action;\n let addedBeneficiaries = [...(state.addedBeneficiaries ?? [])];\n if (!addedBeneficiaries?.length) {\n return { ...state };\n }\n const beneficiaryIndex = addedBeneficiaries.findIndex((b) => b.idNum == beneficiary.idNum);\n addedBeneficiaries.splice(beneficiaryIndex, 1, beneficiary);\n\n const mutation = { addedBeneficiaries };\n\n return new StateBuilder(state, mutation).toLoading().build();\n }),\n on(BeneficiariesActions.selectBeneficiary, (state: IBeneficiariesState, action) => {\n const { beneficiary } = action;\n\n const mutation = { selectedBeneficiary: { ...beneficiary } };\n\n return new StateBuilder(state, mutation).toLoading().build();\n }),\n on(BeneficiariesActions.updateBeneficiaryFormMode, (state: IBeneficiariesState, action) => {\n return new StateBuilder(state, action).toLoading().build();\n }),\n on(BeneficiariesActions.resetBeneficiary, (state: IBeneficiariesState) => {\n state = {\n ...state,\n selectedBeneficiary: undefined\n };\n return new StateBuilder(state).toLoading().build();\n }),\n on(BeneficiariesActions.load, (state: IBeneficiariesState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(BeneficiariesActions.loadSuccess, (state: IBeneficiariesState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(BeneficiariesActions.submit, (state: IBeneficiariesState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(BeneficiariesActions.submitSuccess, (state: IBeneficiariesState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\nexport function beneficiariesReducer(state: IBeneficiariesState | undefined, action: Action) {\n return beneficiariesReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IBeneficiariesState } from './beneficiaries.state';\n\nexport class BeneficiariesSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly beneficiariesState = (state: IRootState): IBeneficiariesState => {\n return state.beneficiaries as IBeneficiariesState;\n };\n\n static readonly model = createSelector(\n BeneficiariesSelectors.beneficiariesState,\n (beneficiaries: IBeneficiariesState) => {\n return beneficiaries.model;\n }\n );\n\n static readonly data = createSelector(\n BeneficiariesSelectors.beneficiariesState,\n (beneficiaries: IBeneficiariesState) => {\n return beneficiaries.data;\n }\n );\n\n static readonly addedBeneficiaries = createSelector(\n BeneficiariesSelectors.beneficiariesState,\n (beneficiaries: IBeneficiariesState) => {\n return beneficiaries.addedBeneficiaries;\n }\n );\n\n static readonly selectedBeneficiary = createSelector(\n BeneficiariesSelectors.beneficiariesState,\n (beneficiaries: IBeneficiariesState) => {\n return beneficiaries.selectedBeneficiary;\n }\n );\n\n static readonly beneficiaryFormMode = createSelector(\n BeneficiariesSelectors.beneficiariesState,\n (beneficiaries: IBeneficiariesState) => {\n return beneficiaries.beneficiaryFormMode;\n }\n );\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { BeneficiariesEffects, beneficiariesReducer } from './store';\n\n@NgModule({\n imports: [\n EffectsModule.forFeature([BeneficiariesEffects]),\n StoreModule.forFeature(`beneficiaries`, beneficiariesReducer)\n ]\n})\nexport class BeneficiariesStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IBeneficiariesData, IBeneficiariesModel, IBeneficiaryDetails } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { BeneficiariesActions, BeneficiariesSelectors, IBeneficiariesState, IBeneficiaryFormMode } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BeneficiariesStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n readonly addedBeneficiaries$$: Signal;\n readonly selectedBeneficiary$$: Signal;\n readonly beneficiaryFormMode$$: Signal;\n\n constructor() {\n super();\n this.model$$ = this.stateFacade.selectSignal$(BeneficiariesSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(BeneficiariesSelectors.data);\n this.addedBeneficiaries$$ = this.stateFacade.selectSignal$(BeneficiariesSelectors.addedBeneficiaries);\n this.selectedBeneficiary$$ = this.stateFacade.selectSignal$(BeneficiariesSelectors.selectedBeneficiary);\n this.beneficiaryFormMode$$ = this.stateFacade.selectSignal$(BeneficiariesSelectors.beneficiaryFormMode);\n }\n\n dispatchBeneficiariesReset() {\n this.stateFacade.dispatch(BeneficiariesActions.reset());\n }\n dispatchAddBeneficiary(beneficiary: IBeneficiaryDetails) {\n this.stateFacade.dispatch(BeneficiariesActions.addBeneficiary({ beneficiary }));\n }\n dispatchRemoveBeneficiary(beneficiary: IBeneficiaryDetails) {\n this.stateFacade.dispatch(BeneficiariesActions.removeBeneficiary({ beneficiary }));\n }\n dispatchRemoveAllBeneficiaries() {\n this.stateFacade.dispatch(BeneficiariesActions.removeAllBeneficiaries());\n }\n dispatchUpdateBeneficiaryFormMode(beneficiaryFormMode: IBeneficiaryFormMode) {\n this.stateFacade.dispatch(BeneficiariesActions.updateBeneficiaryFormMode({ beneficiaryFormMode }));\n }\n dispatchUpdateBeneficiary(beneficiary: IBeneficiaryDetails) {\n this.stateFacade.dispatch(BeneficiariesActions.updateBeneficiary({ beneficiary }));\n }\n dispatchBeneficiariesLoad() {\n this.stateFacade.dispatch(BeneficiariesActions.load());\n }\n dispatchBeneficiariesLoadSuccess({ model, data }: { model: IBeneficiariesModel; data: IBeneficiariesData }) {\n this.stateFacade.dispatch(BeneficiariesActions.loadSuccess({ model, data }));\n }\n dispatchBeneficiariesSubmitSuccess({ model, data }: { model: IBeneficiariesModel; data: IBeneficiariesData }) {\n this.stateFacade.dispatch(BeneficiariesActions.submitSuccess({ model, data }));\n }\n dispatchBeneficiariesSubmit() {\n this.stateFacade.dispatch(BeneficiariesActions.submit());\n }\n dispatchSelectBeneficiary(beneficiary: IBeneficiaryDetails) {\n this.stateFacade.dispatch(BeneficiariesActions.selectBeneficiary({ beneficiary }));\n }\n dispatchResetSelectedBeneficiary() {\n this.stateFacade.dispatch(BeneficiariesActions.resetBeneficiary());\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { ICardData, ICardModel } from '@partners/api';\n\nexport class CardActions {\n static reset = createAction('[Card] Reset State');\n static load = createAction('[Card] Load');\n static loadSuccess = createAction('[Card] Load Success', props<{ model: ICardModel; data: ICardData }>());\n static loadFailure = createAction('[Card] Load Failure', props<{ error: any }>());\n static submit = createAction('[Card] Submit');\n static submitSuccess = createAction('[Card] Submit Success', props<{ model: ICardModel }>());\n static submitFailure = createAction('[Card] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { createEffect, ofType, Actions } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { CardActions } from './card.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CardEffects {\n sendCardEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendCardEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(CardActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { CardActions } from './card.actions';\nimport { ICardState } from './card.state';\nimport { StateBuilder } from '../../../model/state.builder';\n\nexport const initialCardState: ICardState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst cardReducerFn = createReducer(\n initialCardState,\n on(CardActions.reset, (state: ICardState, action) => {\n return new StateBuilder(initialCardState).build();\n }),\n on(CardActions.load, (state: ICardState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(CardActions.loadSuccess, (state: ICardState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(CardActions.submit, (state: ICardState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(CardActions.submitSuccess, (state: ICardState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function cardReducer(state: ICardState | undefined, action: Action) {\n return cardReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { ICardState } from './card.state';\n\nexport class CardSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly cardState = (state: IRootState): ICardState => {\n return state.card as ICardState;\n };\n\n static readonly model = createSelector(CardSelectors.cardState, (card: ICardState) => {\n return card.model;\n });\n\n static readonly data = createSelector(CardSelectors.cardState, (card: ICardState) => {\n return card.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { CardEffects, cardReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([CardEffects]), StoreModule.forFeature(`card`, cardReducer)]\n})\nexport class CardStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { ICardData, ICardModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { CardActions, CardSelectors, ICardState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CardStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n this.model$$ = this.stateFacade.selectSignal$(CardSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(CardSelectors.data);\n }\n\n dispatchCardReset() {\n this.stateFacade.dispatch(CardActions.reset());\n }\n dispatchCardLoad() {\n this.stateFacade.dispatch(CardActions.load());\n }\n dispatchCardLoadSuccess({ model, data }: { model: ICardModel; data: ICardData }) {\n this.stateFacade.dispatch(CardActions.loadSuccess({ model, data }));\n }\n dispatchCardSubmit() {\n this.stateFacade.dispatch(CardActions.submit());\n }\n dispatchCardSubmitSuccess({ model }: { model: ICardModel }) {\n this.stateFacade.dispatch(CardActions.submitSuccess({ model }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IChannelsData, IChannelsModel } from '@partners/api';\n\nexport class ChannelsActions {\n static reset = createAction('[Channels] Reset State');\n static load = createAction('[Channels] Load');\n static loadSuccess = createAction('[Channels] Load Success', props<{ model: IChannelsModel; data: IChannelsData }>());\n static loadFailure = createAction('[Channels] Load Failure', props<{ error: any }>());\n static submit = createAction('[Channels] Submit', props<{ model: IChannelsModel }>());\n static submitSuccess = createAction('[Channels] Submit Success', props<{ data: IChannelsData }>());\n static submitFailure = createAction('[Channels] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { ChannelsActions } from './channels.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ChannelsEffects {\n sendChannelsEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendChannelsEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(ChannelsActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { ChannelsActions } from './channels.actions';\nimport { IChannelsState } from './channels.state';\n\nexport const initialChannelsState: IChannelsState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst channelsReducerFn = createReducer(\n initialChannelsState,\n on(ChannelsActions.reset, (state: IChannelsState, action) => {\n return new StateBuilder(initialChannelsState).build();\n }),\n on(ChannelsActions.load, (state: IChannelsState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(ChannelsActions.loadSuccess, (state: IChannelsState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(ChannelsActions.submit, (state: IChannelsState, action) => {\n return new StateBuilder(state, action).toLoading().build();\n }),\n on(ChannelsActions.submitSuccess, (state: IChannelsState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function channelsReducer(state: IChannelsState | undefined, action: Action) {\n return channelsReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IChannelsModel } from '@partners/api';\nimport { IRootState } from '../../../root';\nimport { IChannelsState } from './channels.state';\n\nexport class ChannelsSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly channelsState = (state: IRootState): IChannelsState => {\n return state.channels as IChannelsState;\n };\n\n static readonly model = createSelector(ChannelsSelectors.channelsState, (channels: IChannelsState) => {\n return channels.model;\n });\n\n static readonly channels357Model = createSelector(ChannelsSelectors.model, (channelsModel: IChannelsModel) => {\n return channelsModel.banking?.channel357;\n });\n\n static readonly spamModel = createSelector(ChannelsSelectors.model, (channelsModel: IChannelsModel) => {\n return channelsModel.banking?.spam;\n });\n\n static readonly upSaleModel = createSelector(ChannelsSelectors.model, (channelsModel: IChannelsModel) => {\n return channelsModel.banking?.upsales;\n });\n\n static readonly data = createSelector(ChannelsSelectors.channelsState, (channels: IChannelsState) => {\n return channels.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { ChannelsEffects, channelsReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([ChannelsEffects]), StoreModule.forFeature(`channels`, channelsReducer)]\n})\nexport class ChannelsStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport {\n IChannel357Collection,\n IChannelSpamCollection,\n IChannelUpSaleCollection,\n IChannelsData,\n IChannelsModel\n} from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { ChannelsActions, ChannelsSelectors, IChannelsState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ChannelsStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n readonly channels357Model$$: Signal;\n readonly spamModel$$: Signal;\n readonly upSaleModel$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(ChannelsSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(ChannelsSelectors.data);\n\n this.channels357Model$$ = this.stateFacade.selectSignal$(ChannelsSelectors.channels357Model);\n this.spamModel$$ = this.stateFacade.selectSignal$(ChannelsSelectors.spamModel);\n this.upSaleModel$$ = this.stateFacade.selectSignal$(ChannelsSelectors.upSaleModel);\n }\n\n dispatchChannelsReset() {\n this.stateFacade.dispatch(ChannelsActions.reset());\n }\n dispatchChannelsLoad() {\n this.stateFacade.dispatch(ChannelsActions.load());\n }\n dispatchChannelsLoadSuccess({ model, data }: { model: IChannelsModel; data: IChannelsData }) {\n this.stateFacade.dispatch(ChannelsActions.loadSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IClassifyData, IClassifyModel } from '@partners/api';\n\nexport class ClassifyActions {\n static submit = createAction('[classify] Submit');\n static submitSuccess = createAction('[classify] Submit Success', props<{ model: IClassifyModel; data: IClassifyData }>());\n static submitFailure = createAction('[classify] Submit Failure', props<{ error: any }>());\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { ClassifyActions } from '.';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { IClassifyState } from './classify.state';\n\nexport const initialClassifyState: IClassifyState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst classifyReducerFn = createReducer(\n initialClassifyState,\n on(ClassifyActions.submit, (state: IClassifyState) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(ClassifyActions.submitSuccess, (state: IClassifyState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function classifyReducer(state: IClassifyState | undefined, action: Action) {\n return classifyReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IClassifyState } from './classify.state';\n\nexport class ClassifySelectors {\n // todo: replace any type state with root state (once defined)\n static readonly classifyState = (state: IRootState): IClassifyState => {\n return state.classify as IClassifyState;\n };\n\n static readonly model = createSelector(ClassifySelectors.classifyState, (classify: IClassifyState) => {\n return classify.model;\n });\n\n static readonly data = createSelector(ClassifySelectors.classifyState, (classify: IClassifyState) => {\n return classify.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { ClassifyEffects, classifyReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([ClassifyEffects]), StoreModule.forFeature(`classify`, classifyReducer)]\n})\nexport class ClassifyStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IClassifyData, IClassifyModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { ClassifyActions, ClassifySelectors, IClassifyState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ClassifyStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(ClassifySelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(ClassifySelectors.data);\n }\n\n dispatchClassifySubmit() {\n this.stateFacade.dispatch(ClassifyActions.submit());\n }\n\n dispatchClassifySubmitSuccess({ model, data }: { model: IClassifyModel; data: IClassifyData }) {\n this.stateFacade.dispatch(ClassifyActions.submitSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IContactData, IContactModel, IModelState } from '@partners/api';\n\nexport class ContactActions {\n static reset = createAction('[Contact] Reset State');\n static updateModel = createAction('[Contact] Update Model', props<{ model: IContactModel }>());\n static updateClubMembership = createAction('[Contact] Update Club Membership', props<{ modelState: IModelState }>());\n static load = createAction('[Contact] Load');\n static loadSuccess = createAction('[Contact] Load Success', props<{ data: IContactData }>());\n static loadFailure = createAction('[Contact] Load Failure', props<{ error: any }>());\n static submit = createAction('[Contact] Submit');\n static submitSuccess = createAction('[Contact] Submit Success', props<{ model: IContactModel }>());\n static submitFailure = createAction('[Contact] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { ContactActions } from './contact.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ContactEffects {\n sendContactEffect$: Observable = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(ContactActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n\n constructor(private actions$: Actions) {}\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { ContactActions } from './contact.actions';\nimport { IContactState } from './contact.state';\n\nexport const initialContactState: IContactState = {\n model: undefined,\n data: undefined,\n clubMembership: undefined,\n uiState: undefined\n};\n\nconst actions = new ContactActions();\n\nconst contactReducerFn = createReducer(\n initialContactState,\n on(ContactActions.reset, (state: IContactState, action) => {\n return new StateBuilder(initialContactState).build();\n }),\n on(ContactActions.updateModel, (state: IContactState, action) => {\n return new StateBuilder(state, action).build();\n }),\n on(ContactActions.updateClubMembership, (state: IContactState, action) => {\n const { hidden, required } = action.modelState;\n\n return new StateBuilder(state, {\n clubMembership: { hidden, required }\n })\n .toLoading()\n .build();\n }),\n on(ContactActions.load, (state: IContactState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(ContactActions.loadSuccess, (state: IContactState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(ContactActions.loadFailure, (state: IContactState, error) => {\n return new StateBuilder(state).toError(error).build();\n }),\n on(ContactActions.submit, (state: IContactState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(ContactActions.submitSuccess, (state: IContactState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function contactReducer(state: IContactState | undefined, action: Action) {\n return contactReducerFn(state, action);\n}\n\n// export const makeReducer = >(initiateState: T, actions: ReducerActions) => {\n// return createReducer(\n// initiateState,\n// on(actions.reset, (state: T, {...action }) => {\n// // state = { ...state , ...initiateState };\n// return new StateBuilder(state).build();\n// }),\n// on(actions.load, (state: E, {...action }) => {\n// return new StateBuilder(state).toLoading().build();\n// }),\n// on(actions.loadSuccess, (state: T, {...action }) => {\n// return new StateBuilder(state, action).toLoading().build();\n// }),\n// on(actions.loadFailure, (state: T, {...error }) => {\n// return new StateBuilder(state).toError(error).build();\n// }),\n// on(actions.submit, (state: T, {...action }) => {\n// return new StateBuilder(state).toLoading().build();\n// }),\n// on(actions.submitSuccess, (state: T, {...action }) => {\n// return new StateBuilder(state, action).toLoading().build();\n// }),\n// on(actions.submitFailure, (state: T, {...error }) => {\n// return new StateBuilder(state).toError(error).build();\n// })\n// )\n// }\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IContactState } from './contact.state';\n\nexport class ContactSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly contactState = (state: IRootState): IContactState => {\n return state.contact as IContactState;\n };\n\n static readonly model = createSelector(ContactSelectors.contactState, (contact: IContactState) => {\n return contact.model;\n });\n\n static readonly data = createSelector(ContactSelectors.contactState, (contact: IContactState) => {\n return contact.data;\n });\n\n static readonly clubMembership = createSelector(ContactSelectors.contactState, (contact: IContactState) => {\n return contact.clubMembership;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { ContactEffects, contactReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([ContactEffects]), StoreModule.forFeature(`contact`, contactReducer)]\n})\nexport class ContactStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IContactData, IContactModel, IModelState } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { ContactActions, ContactSelectors, IContactState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ContactStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n readonly clubMembershipState$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(ContactSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(ContactSelectors.data);\n this.clubMembershipState$$ = this.stateFacade.selectSignal$(ContactSelectors.clubMembership);\n }\n\n dispatchContactReset() {\n this.stateFacade.dispatch(ContactActions.reset());\n }\n dispatchUpdateModel({ model }: { model: IContactModel }) {\n this.stateFacade.dispatch(ContactActions.updateModel({ model }));\n }\n dispatchUpdateClubMembershipState(clubMembershipState: IModelState) {\n this.stateFacade.dispatch(ContactActions.updateClubMembership({ modelState: clubMembershipState }));\n }\n\n dispatchContactLoad() {\n this.stateFacade.dispatch(ContactActions.load());\n }\n dispatchContactLoadSuccess({ data }: { data: IContactData }) {\n this.stateFacade.dispatch(ContactActions.loadSuccess({ data }));\n }\n\n dispatchContactSubmit() {\n this.stateFacade.dispatch(ContactActions.submit());\n }\n\n dispatchContactSubmitSuccess({ model }: { model: IContactModel }) {\n this.stateFacade.dispatch(ContactActions.submitSuccess({ model }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { ICountryData, ICountryModel } from '@partners/api';\n\nexport class CountryActions {\n static reset = createAction('[Country] Reset State');\n static load = createAction('[Country] Load');\n static loadSuccess = createAction('[Country] Load Success', props<{ model: ICountryModel; data: ICountryData }>());\n static loadFailure = createAction('[Country] Load Failure', props<{ error: any }>());\n static submit = createAction('[Country] Submit', props<{ model: ICountryModel }>());\n static submitSuccess = createAction('[Country] Submit Success', props<{ data: ICountryData }>());\n static submitFailure = createAction('[Country] Submit Failure', props<{ error: any }>());\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { CountryActions } from './country.actions';\nimport { ICountryState } from './country.state';\n\nexport const initialCountryState: ICountryState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst countryReducerFn = createReducer(\n initialCountryState,\n on(CountryActions.reset, (state: ICountryState, action) => {\n return new StateBuilder(initialCountryState).build();\n }),\n on(CountryActions.load, (state: ICountryState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(CountryActions.loadSuccess, (state: ICountryState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(CountryActions.submit, (state: ICountryState, action) => {\n return new StateBuilder(state, action).toLoading().build();\n }),\n on(CountryActions.submitSuccess, (state: ICountryState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function countryReducer(state: ICountryState | undefined, action: Action) {\n return countryReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { ICountryState } from './country.state';\n\nexport class CountrySelectors {\n // todo: replace any type state with root state (once defined)\n static readonly countryState = (state: IRootState): ICountryState => {\n return state.country as ICountryState;\n };\n\n static readonly model = createSelector(CountrySelectors.countryState, (country: ICountryState) => {\n return country.model;\n });\n\n static readonly data = createSelector(CountrySelectors.countryState, (country: ICountryState) => {\n return country.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { CountryEffects, countryReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([CountryEffects]), StoreModule.forFeature(`country`, countryReducer)]\n})\nexport class CountryStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { ICountryData, ICountryModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { CountryActions, CountrySelectors, ICountryState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CountryStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.state$ = this.stateFacade.select$(CountrySelectors.countryState);\n\n this.model$$ = this.stateFacade.selectSignal$(CountrySelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(CountrySelectors.data);\n }\n\n dispatchCountryReset() {\n this.stateFacade.dispatch(CountryActions.reset());\n }\n dispatchCountryLoad() {\n this.stateFacade.dispatch(CountryActions.load());\n }\n dispatchCountryLoadSuccess({ model, data }: { model: ICountryModel; data: ICountryData }) {\n this.stateFacade.dispatch(CountryActions.loadSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { ICreditAgreementData, ICreditAgreementModel } from '@partners/api';\n\nexport class CreditAgreementActions {\n static reset = createAction('[Credit Agreement] Reset State');\n static updateModel = createAction('[Credit Agreement] Update Model', props<{ model: ICreditAgreementModel }>());\n static load = createAction('[Credit Agreement] Load');\n static loadSuccess = createAction(\n '[Credit Agreement] Load Success',\n props<{ model: ICreditAgreementModel; data: ICreditAgreementData }>()\n );\n static loadFailure = createAction('[Credit Agreement] Load Failure', props<{ error: any }>());\n static submit = createAction('[Credit Agreement] Submit');\n static submitSuccess = createAction('[Credit Agreement] Submit Success', props<{ model: ICreditAgreementModel; data: ICreditAgreementData }>());\n static submitFailure = createAction('[Credit Agreement] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { CreditAgreementActions } from './credit-agreement.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CreditAgreementEffects {\n sendCreditAgreementEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendCreditAgreementEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(CreditAgreementActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { CreditAgreementActions } from './credit-agreement.actions';\nimport { ICreditAgreementState } from './credit-agreement.state';\n\nexport const initialCreditAgreementState: ICreditAgreementState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst creditAgreementReducerFn = createReducer(\n initialCreditAgreementState,\n on(CreditAgreementActions.reset, (state: ICreditAgreementState, action) => {\n return new StateBuilder(initialCreditAgreementState).build();\n }),\n on(CreditAgreementActions.updateModel, (state: ICreditAgreementState, action) => {\n return new StateBuilder(state, action).build();\n }),\n on(CreditAgreementActions.load, (state: ICreditAgreementState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(CreditAgreementActions.loadSuccess, (state: ICreditAgreementState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(CreditAgreementActions.submit, (state: ICreditAgreementState) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(CreditAgreementActions.submitSuccess, (state: ICreditAgreementState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function creditAgreementReducer(state: ICreditAgreementState | undefined, action: Action) {\n return creditAgreementReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { ICreditAgreementState } from './credit-agreement.state';\n\nexport class CreditAgreementSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly creditAgreementState = (state: IRootState): ICreditAgreementState => {\n return state.creditAgreement as ICreditAgreementState;\n };\n\n static readonly model = createSelector(\n CreditAgreementSelectors.creditAgreementState,\n (creditAgreement: ICreditAgreementState) => {\n return creditAgreement.model;\n }\n );\n\n static readonly data = createSelector(\n CreditAgreementSelectors.creditAgreementState,\n (creditAgreement: ICreditAgreementState) => {\n return creditAgreement.data;\n }\n );\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { CreditAgreementEffects, creditAgreementReducer } from './store';\n\n@NgModule({\n imports: [\n EffectsModule.forFeature([CreditAgreementEffects]),\n StoreModule.forFeature(`creditAgreement`, creditAgreementReducer)\n ]\n})\nexport class CreditAgreementStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { ICreditAgreementData, ICreditAgreementModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { CreditAgreementActions, CreditAgreementSelectors, ICreditAgreementState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CreditAgreementStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n this.model$$ = this.stateFacade.selectSignal$(CreditAgreementSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(CreditAgreementSelectors.data);\n }\n\n dispatchCreditAgreementReset() {\n this.stateFacade.dispatch(CreditAgreementActions.reset());\n }\n dispatchUpdateCreditAgreementModel({ model }: { model: ICreditAgreementModel }) {\n this.stateFacade.dispatch(CreditAgreementActions.updateModel({ model }));\n }\n dispatchCreditAgreementLoad() {\n this.stateFacade.dispatch(CreditAgreementActions.load());\n }\n dispatchCreditAgreementLoadSuccess({ model, data }: { model: ICreditAgreementModel; data: ICreditAgreementData }) {\n this.stateFacade.dispatch(CreditAgreementActions.loadSuccess({ model, data }));\n }\n dispatchCreditAgreementSubmit() {\n this.stateFacade.dispatch(CreditAgreementActions.submit());\n }\n dispatchCreditAgreementSubmitSuccess({ model, data }: { model: ICreditAgreementModel; data: ICreditAgreementData }) {\n this.stateFacade.dispatch(CreditAgreementActions.submitSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { ICustomerData, ICustomerModel } from '@partners/api';\n\nexport class CustomerActions {\n static reset = createAction('[Customer] Reset State');\n static load = createAction('[Customer] Load');\n static loadSuccess = createAction('[Customer] Load Success', props<{ model: ICustomerModel; data: ICustomerData }>());\n static loadFailure = createAction('[Customer] Load Failure', props<{ error: any }>());\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { CustomerActions } from './customer.actions';\nimport { ICustomerState } from './customer.state';\n\nexport const initialCustomerState: ICustomerState = {\n model: undefined,\n data: undefined,\n uiState: undefined,\n hasCustomerResponse: false\n};\n\nconst customerReducerFn = createReducer(\n initialCustomerState,\n on(CustomerActions.reset, (state: ICustomerState, action) => {\n return new StateBuilder(initialCustomerState).build();\n }),\n on(CustomerActions.load, (state: ICustomerState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(CustomerActions.loadSuccess, (state: ICustomerState, action) => {\n return new StateBuilder(state, { ...action, ...{ hasCustomerResponse: true } }).toLoaded().build();\n })\n);\n\nexport function customerReducer(state: ICustomerState | undefined, action: Action) {\n return customerReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { ICustomerState } from './customer.state';\n\nexport class CustomerSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly customerState = (state: IRootState): ICustomerState => {\n return state.customer as ICustomerState;\n };\n\n static readonly model = createSelector(CustomerSelectors.customerState, (customer: ICustomerState) => {\n return customer.model;\n });\n\n static readonly data = createSelector(CustomerSelectors.customerState, (customer: ICustomerState) => {\n return customer.data;\n });\n\n static readonly hasCustomerResponse = createSelector(CustomerSelectors.customerState, (customer: ICustomerState) => {\n return customer.hasCustomerResponse;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { CustomerEffects, customerReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([CustomerEffects]), StoreModule.forFeature(`customer`, customerReducer)]\n})\nexport class CustomerStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { ICustomerData, ICustomerModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { CustomerActions, CustomerSelectors, ICustomerState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CustomerStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n readonly hasCustomerResponse$$: Signal;\n\n constructor() {\n super();\n\n this.state$ = this.stateFacade.select$(CustomerSelectors.customerState);\n\n this.model$$ = this.stateFacade.selectSignal$(CustomerSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(CustomerSelectors.data);\n\n this.hasCustomerResponse$$ = this.stateFacade.selectSignal$(CustomerSelectors.hasCustomerResponse);\n }\n\n dispatchCustomerReset() {\n this.stateFacade.dispatch(CustomerActions.reset());\n }\n dispatchCustomerLoad() {\n this.stateFacade.dispatch(CustomerActions.load());\n }\n dispatchCustomerLoadSuccess({ model, data }: { model: ICustomerModel; data: ICustomerData }) {\n this.stateFacade.dispatch(CustomerActions.loadSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IDebitsData, IDebitsModel } from '@partners/api';\n\nexport class DebitsActions {\n static reset = createAction('[Debits] Reset State');\n static updateModel = createAction('[Debits] Update Model', props<{ model: IDebitsModel }>());\n static load = createAction('[Debits] Load');\n static loadSuccess = createAction('[Debits] Load Success', props<{ model: IDebitsModel; data: IDebitsData }>());\n static loadFailure = createAction('[Debits] Load Failure', props<{ error: any }>());\n static submit = createAction('[Debits] Submit');\n static submitSuccess = createAction('[Debits] Submit Success', props<{ model: IDebitsModel; data: IDebitsData }>());\n static submitFailure = createAction('[Debits] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { DebitsActions } from './debits.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DebitsEffects {\n sendDebitsEffect$: Observable = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(DebitsActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n\n constructor(private actions$: Actions) {}\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { DebitsActions } from './debits.actions';\nimport { IDebitsState } from './debits.state';\n\nexport const initialDebitsState: IDebitsState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst debitsReducerFn = createReducer(\n initialDebitsState,\n on(DebitsActions.reset, (state: IDebitsState, action) => {\n return new StateBuilder(initialDebitsState).build();\n }),\n on(DebitsActions.updateModel, (state: IDebitsState, action) => {\n return new StateBuilder(state, action).toLoading().build();\n }),\n on(DebitsActions.load, (state: IDebitsState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(DebitsActions.loadSuccess, (state: IDebitsState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(DebitsActions.submit, (state: IDebitsState) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(DebitsActions.submitSuccess, (state: IDebitsState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function debitsReducer(state: IDebitsState | undefined, action: Action) {\n return debitsReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IDebitsState } from './debits.state';\n\nexport class DebitsSelectors {\n static readonly debitsState = (state: IRootState): IDebitsState => {\n return state.debits as IDebitsState;\n };\n\n static readonly model = createSelector(DebitsSelectors.debitsState, (debits: IDebitsState) => {\n return debits.model;\n });\n\n static readonly data = createSelector(DebitsSelectors.debitsState, (debits: IDebitsState) => {\n return debits.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { DebitsEffects, debitsReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([DebitsEffects]), StoreModule.forFeature(`debits`, debitsReducer)]\n})\nexport class DebitsStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IDebitsData, IDebitsModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { DebitsActions, DebitsSelectors, IDebitsState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DebitsStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(DebitsSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(DebitsSelectors.data);\n }\n\n dispatchDebitsReset() {\n this.stateFacade.dispatch(DebitsActions.reset());\n }\n dispatchUpdateModel({ model }: { model: IDebitsModel }) {\n this.stateFacade.dispatch(DebitsActions.updateModel({ model }));\n }\n dispatchDebitsLoad() {\n this.stateFacade.dispatch(DebitsActions.load());\n }\n dispatchDebitsLoadSuccess({ model, data }: { model: IDebitsModel; data: IDebitsData }) {\n this.stateFacade.dispatch(DebitsActions.loadSuccess({ model, data }));\n }\n dispatchDebitsSubmit() {\n this.stateFacade.dispatch(DebitsActions.submit());\n }\n dispatchDebitsSubmitSuccess({ model, data }: { model: IDebitsModel; data: IDebitsData }) {\n this.stateFacade.dispatch(DebitsActions.submitSuccess({ model, data }));\n }\n dispatchDebitsLoadFailure(error: any) {\n this.stateFacade.dispatch(DebitsActions.loadFailure({ error }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IDeliveryAddressModel, IDeliveryData, IDeliveryModel } from '@partners/api';\n\nexport class DeliveryActions {\n static reset = createAction('[Delivery] Reset State');\n\n static loadTimeTable = createAction('[Delivery] Load Time Table');\n static loadTimeTableSuccess = createAction(\n '[Delivery] Load Time Table Success',\n props<{ model: IDeliveryAddressModel; data: IDeliveryData }>()\n );\n static loadTimeTableFailure = createAction('[Delivery] Load Time Table Failure', props<{ error: any }>());\n static load = createAction('[Delivery] Load');\n static loadSuccess = createAction('[Delivery] Load Success', props<{ model: IDeliveryModel; data: IDeliveryData }>());\n static loadFailure = createAction('[Delivery] Load Failure', props<{ error: any }>());\n static submit = createAction('[Delivery] Submit');\n static submitSuccess = createAction(\n '[Delivery] Submit Success',\n props<{ model: IDeliveryModel; data: IDeliveryData }>()\n );\n static submitFailure = createAction('[Delivery] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { DeliveryActions } from './delivery.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DeliveryEffects {\n sendDeliveryEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendDeliveryEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(DeliveryActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { DeliveryActions } from './delivery.actions';\nimport { IDeliveryState } from './delivery.state';\n\nexport const initialDeliveryState: IDeliveryState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst deliveryReducerFn = createReducer(\n initialDeliveryState,\n on(DeliveryActions.reset, (state: IDeliveryState, action) => {\n return new StateBuilder(initialDeliveryState).build();\n }),\n on(DeliveryActions.load, (state: IDeliveryState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(DeliveryActions.loadTimeTable, (state: IDeliveryState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(DeliveryActions.loadSuccess, (state: IDeliveryState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(DeliveryActions.loadTimeTableSuccess, (state: IDeliveryState, action) => {\n\n const newState = new StateBuilder(state, {\n model: { ...state.model, ...action.model },\n data: { \n ...state.data, \n ...{\n ...action.data,\n ...{\n deliveryTimetable: action.data.deliveryTimetable,\n formsKitDelivery: action.data.formsKitDelivery\n }\n }\n } \n })\n .toLoaded()\n .build();\n\n return { ...newState };\n }),\n on(DeliveryActions.submit, (state: IDeliveryState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(DeliveryActions.submitSuccess, (state: IDeliveryState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function deliveryReducer(state: IDeliveryState | undefined, action: Action) {\n return deliveryReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IDeliveryData } from '@partners/api';\nimport { IRootState } from '../../../root';\nimport { IDeliveryState } from './delivery.state';\n\nexport class DeliverySelectors {\n // todo: replace any type state with root state (once defined)\n static readonly deliveryState = (state: IRootState): IDeliveryState => {\n return state.delivery as IDeliveryState;\n };\n\n static readonly model = createSelector(DeliverySelectors.deliveryState, (delivery: IDeliveryState) => {\n return delivery.model;\n });\n\n static readonly data = createSelector(DeliverySelectors.deliveryState, (delivery: IDeliveryState) => {\n return delivery.data;\n });\n\n static readonly timeTable = createSelector(DeliverySelectors.data, (delivery: IDeliveryData) => {\n return delivery?.deliveryTimetable;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { DeliveryEffects, deliveryReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([DeliveryEffects]), StoreModule.forFeature(`delivery`, deliveryReducer)]\n})\nexport class DeliveryStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IDeliveryAddressModel, IDeliveryData, IDeliveryModel, IHttpResponse, ITimeTableItem } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { DeliveryActions, DeliverySelectors, IDeliveryState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DeliveryStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n readonly timetable$$: Signal;\n\n constructor() {\n super();\n this.model$$ = this.stateFacade.selectSignal$(DeliverySelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(DeliverySelectors.data);\n this.timetable$$ = this.stateFacade.selectSignal$(DeliverySelectors.timeTable);\n }\n\n dispatchDeliveryReset() {\n this.stateFacade.dispatch(DeliveryActions.reset());\n }\n dispatchDeliveryLoad() {\n this.stateFacade.dispatch(DeliveryActions.load());\n }\n dispatchDeliveryLoadSuccess({ model, data }: { model: IDeliveryModel; data: IDeliveryData }) {\n this.stateFacade.dispatch(DeliveryActions.loadSuccess({ model, data }));\n }\n dispatchDeliverySubmit() {\n this.stateFacade.dispatch(DeliveryActions.submit());\n }\n dispatchDeliverySubmitSuccess({ model, data }: { model: IDeliveryModel; data: IDeliveryData }) {\n this.stateFacade.dispatch(DeliveryActions.submitSuccess({ model, data }));\n }\n dispatchLoadTimeTable() {\n this.stateFacade.dispatch(DeliveryActions.loadTimeTable());\n }\n dispatchLoadTimeTableSuccess({ model, data }: { model: IDeliveryAddressModel; data: IDeliveryData }) {\n this.stateFacade.dispatch(DeliveryActions.loadTimeTableSuccess({ model, data }));\n }\n dispatchLoadTimeTableFailure(error: IHttpResponse) {\n this.stateFacade.dispatch(DeliveryActions.loadTimeTableFailure({ error }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IDemographyData, IDemographyModel } from '@partners/api';\n\nexport class DemographyActions {\n static reset = createAction('[Demography] Reset State');\n\n static load = createAction('[Demography] Load');\n static loadSuccess = createAction(\n '[Demography] Load Success',\n props<{ model: IDemographyModel; data: IDemographyData }>()\n );\n static loadFailure = createAction('[Demography] Load Failure', props<{ error: any }>());\n static submit = createAction('[Demography] Submit');\n static submitSuccess = createAction(\n '[Demography] Submit Success',\n props<{ model: IDemographyModel; data: IDemographyData }>()\n );\n static submitFailure = createAction('[Demography] Submit Failure', props<{ error: any }>());\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { DemographyActions } from './demography.actions';\nimport { IDemographyState } from './demography.state';\n\nexport const initialDemographyState: IDemographyState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst demographyReducerFn = createReducer(\n initialDemographyState,\n on(DemographyActions.reset, (state: IDemographyState, action) => {\n return new StateBuilder(initialDemographyState).build();\n }),\n on(DemographyActions.load, (state: IDemographyState) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(DemographyActions.loadSuccess, (state: IDemographyState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(DemographyActions.submit, (state: IDemographyState) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(DemographyActions.submitSuccess, (state: IDemographyState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function demographyReducer(state: IDemographyState | undefined, action: Action) {\n return demographyReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IDemographyState } from './demography.state';\n\nexport class DemographySelectors {\n static readonly demographyState = (state: IRootState): IDemographyState => {\n return state.demography as IDemographyState;\n };\n\n static readonly model = createSelector(DemographySelectors.demographyState, (demography: IDemographyState) => {\n return demography.model;\n });\n\n static readonly data = createSelector(DemographySelectors.demographyState, (demography: IDemographyState) => {\n return demography.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { DemographyEffects, demographyReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([DemographyEffects]), StoreModule.forFeature(`demography`, demographyReducer)]\n})\nexport class DemographyStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IDemographyData, IDemographyModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { DemographyActions, DemographySelectors, IDemographyState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DemographyStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n constructor() {\n super();\n this.model$$ = this.stateFacade.selectSignal$(DemographySelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(DemographySelectors.data);\n }\n\n dispatchDemographySubmit() {\n this.stateFacade.dispatch(DemographyActions.submit());\n }\n dispatchDemographySubmitSuccess({ model, data }: { model: IDemographyModel; data: IDemographyData }) {\n this.stateFacade.dispatch(DemographyActions.submitSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IDisclosureData, IDisclosureModel } from '@partners/api';\n\nexport class DisclosureActions {\n static reset = createAction('[Disclosure] Reset State');\n static updateModel = createAction('[Disclosure] Update Model', props<{ model: IDisclosureModel }>());\n\n static load = createAction('[Disclosure] Load');\n static loadSuccess = createAction(\n '[Disclosure] Load Success',\n props<{ model: IDisclosureModel; data: IDisclosureData }>()\n );\n static loadFailure = createAction('[Disclosure] Load Failure', props<{ error: any }>());\n static submit = createAction('[Disclosure] Submit');\n static submitSuccess = createAction(\n '[Disclosure] Submit Success',\n props<{ model: IDisclosureModel; data: IDisclosureData }>()\n );\n static submitFailure = createAction('[Disclosure] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { DisclosureActions } from './disclosure.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DisclosureEffects {\n sendDisclosureEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendDisclosureEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(DisclosureActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { DisclosureActions } from './disclosure.actions';\nimport { IDisclosureState } from './disclosure.state';\n\nexport const initialDisclosureState: IDisclosureState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst disclosureReducerFn = createReducer(\n initialDisclosureState,\n on(DisclosureActions.reset, (state: IDisclosureState, action) => {\n return new StateBuilder(initialDisclosureState).build();\n }),\n on(DisclosureActions.updateModel, (state: IDisclosureState, action) => {\n const { model } = action;\n return new StateBuilder(state, { model }).toLoading().build();\n }),\n on(DisclosureActions.load, (state: IDisclosureState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(DisclosureActions.loadSuccess, (state: IDisclosureState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(DisclosureActions.submit, (state: IDisclosureState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(DisclosureActions.submitSuccess, (state: IDisclosureState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function disclosureReducer(state: IDisclosureState | undefined, action: Action) {\n return disclosureReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IDisclosureState } from './disclosure.state';\n\nexport class DisclosureSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly disclosureState = (state: IRootState): IDisclosureState => {\n return state.disclosure as IDisclosureState;\n };\n\n static readonly model = createSelector(DisclosureSelectors.disclosureState, (disclosure: IDisclosureState) => {\n return disclosure.model;\n });\n\n static readonly data = createSelector(DisclosureSelectors.disclosureState, (disclosure: IDisclosureState) => {\n return disclosure.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { DisclosureEffects, disclosureReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([DisclosureEffects]), StoreModule.forFeature(`disclosure`, disclosureReducer)]\n})\nexport class DisclosureStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IDisclosureData, IDisclosureModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { DisclosureActions, DisclosureSelectors, IDisclosureState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DisclosureStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n this.state$ = this.stateFacade.select$(DisclosureSelectors.disclosureState);\n this.model$$ = this.stateFacade.selectSignal$(DisclosureSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(DisclosureSelectors.data);\n }\n\n dispatchUpdateModel(model: IDisclosureModel) {\n this.stateFacade.dispatch(DisclosureActions.updateModel({ model }));\n }\n\n dispatchDisclosureReset() {\n this.stateFacade.dispatch(DisclosureActions.reset());\n }\n dispatchDisclosureLoad() {\n this.stateFacade.dispatch(DisclosureActions.load());\n }\n dispatchDisclosureLoadSuccess({ model, data }: { model: IDisclosureModel; data: IDisclosureData }) {\n this.stateFacade.dispatch(DisclosureActions.loadSuccess({ model, data }));\n }\n dispatchDisclosureSubmit() {\n this.stateFacade.dispatch(DisclosureActions.submit());\n }\n dispatchDisclosureSubmitSuccess({ model, data }: { model: IDisclosureModel; data: IDisclosureData }) {\n this.stateFacade.dispatch(DisclosureActions.submitSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IEmploymentData, IEmploymentModel } from '@partners/api';\n\nexport class EmploymentActions {\n static reset = createAction('[Employment] Reset State');\n static updateModel = createAction('[Employment] Update Model', props<{ model: IEmploymentModel }>());\n static load = createAction('[Employment] Load');\n static loadSuccess = createAction(\n '[Employment] Load Success',\n props<{ model: IEmploymentModel; data: IEmploymentData }>()\n );\n static loadFailure = createAction('[Employment] Load Failure', props<{ error: any }>());\n static submit = createAction('[Employment] Submit');\n static submitSuccess = createAction('[Employment] Submit Success', props<{ model: IEmploymentModel, data: IEmploymentData }>());\n static submitFailure = createAction('[Employment] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { createEffect, ofType, Actions } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { EmploymentActions } from './employment.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EmploymentEffects {\n sendEmploymentEffect$: Observable = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(EmploymentActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n\n constructor(private actions$: Actions) {}\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { EmploymentActions } from './employment.actions';\nimport { IEmploymentState } from './employment.state';\n\nexport const initialEmploymentState: IEmploymentState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst employmentReducerFn = createReducer(\n initialEmploymentState,\n on(EmploymentActions.reset, (state: IEmploymentState, action) => {\n return new StateBuilder(initialEmploymentState).build();\n }),\n on(EmploymentActions.updateModel, (state: IEmploymentState, action) => {\n return new StateBuilder(state, action).build();\n }),\n on(EmploymentActions.load, (state: IEmploymentState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(EmploymentActions.loadSuccess, (state: IEmploymentState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(EmploymentActions.submit, (state: IEmploymentState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(EmploymentActions.submitSuccess, (state: IEmploymentState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function employmentReducer(state: IEmploymentState | undefined, action: Action) {\n return employmentReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IEmploymentState } from './employment.state';\n\nexport class EmploymentSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly employmentState = (state: IRootState): IEmploymentState => {\n return state.employment as IEmploymentState;\n };\n\n static readonly model = createSelector(EmploymentSelectors.employmentState, (employment: IEmploymentState) => {\n return employment.model;\n });\n\n static readonly data = createSelector(EmploymentSelectors.employmentState, (employment: IEmploymentState) => {\n return employment.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { EmploymentEffects, employmentReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([EmploymentEffects]), StoreModule.forFeature(`employment`, employmentReducer)]\n})\nexport class EmploymentStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IEmploymentData, IEmploymentModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { EmploymentActions, EmploymentSelectors, IEmploymentState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EmploymentStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n this.model$$ = this.stateFacade.selectSignal$(EmploymentSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(EmploymentSelectors.data);\n }\n\n dispatchEmploymentReset() {\n this.stateFacade.dispatch(EmploymentActions.reset());\n }\n dispatchUpdateModel({ model }: { model: IEmploymentModel }) {\n this.stateFacade.dispatch(EmploymentActions.updateModel({ model }));\n }\n dispatchEmploymentLoad() {\n this.stateFacade.dispatch(EmploymentActions.load());\n }\n dispatchEmploymentLoadSuccess({ model, data }: { model: IEmploymentModel; data: IEmploymentData }) {\n this.stateFacade.dispatch(EmploymentActions.loadSuccess({ model, data }));\n }\n dispatchEmploymentSubmit() {\n this.stateFacade.dispatch(EmploymentActions.submit());\n }\n dispatchEmploymentSubmitSuccess({ model, data }: { model: IEmploymentModel; data: IEmploymentData }) {\n this.stateFacade.dispatch(EmploymentActions.submitSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IExpenseData, IExpenseModel } from '@partners/api';\n\nexport class ExpenseActions {\n static reset = createAction('[Expense] Reset State');\n static load = createAction('[Expense] Load');\n static loadSuccess = createAction('[Expense] Load Success', props<{ model: IExpenseModel; data: IExpenseData }>());\n static loadFailure = createAction('[Expense] Load Failure', props<{ error: any }>());\n static submit = createAction('[Expense] Submit', props<{ model: IExpenseModel }>());\n static submitSuccess = createAction('[Expense] Submit Success', props<{ data: IExpenseData }>());\n static submitFailure = createAction('[Expense] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { ExpenseActions } from './expense.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ExpenseEffects {\n sendExpenseEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendExpenseEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(ExpenseActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { ExpenseActions } from './expense.actions';\nimport { IExpenseState } from './expense.state';\n\nexport const initialExpenseState: IExpenseState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst expenseReducerFn = createReducer(\n initialExpenseState,\n on(ExpenseActions.reset, (state: IExpenseState, action) => {\n return new StateBuilder(initialExpenseState).build();\n }),\n on(ExpenseActions.load, (state: IExpenseState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(ExpenseActions.loadSuccess, (state: IExpenseState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(ExpenseActions.submit, (state: IExpenseState, action) => {\n return new StateBuilder(state, action).toLoading().build();\n }),\n on(ExpenseActions.submitSuccess, (state: IExpenseState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function expenseReducer(state: IExpenseState | undefined, action: Action) {\n return expenseReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IExpenseState } from './expense.state';\n\nexport class ExpenseSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly expenseState = (state: IRootState): IExpenseState => {\n return state.expense as IExpenseState;\n };\n\n static readonly model = createSelector(ExpenseSelectors.expenseState, (expense: IExpenseState) => {\n return expense.model;\n });\n\n static readonly data = createSelector(ExpenseSelectors.expenseState, (expense: IExpenseState) => {\n return expense.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { ExpenseEffects, expenseReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([ExpenseEffects]), StoreModule.forFeature(`expense`, expenseReducer)]\n})\nexport class ExpenseStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IExpenseData, IExpenseModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { ExpenseActions, ExpenseSelectors, IExpenseState } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ExpenseStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.state$ = this.stateFacade.select$(ExpenseSelectors.expenseState);\n\n this.model$$ = this.stateFacade.selectSignal$(ExpenseSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(ExpenseSelectors.data);\n }\n\n dispatchExpenseReset() {\n this.stateFacade.dispatch(ExpenseActions.reset());\n }\n dispatchExpenseLoad() {\n this.stateFacade.dispatch(ExpenseActions.load());\n }\n dispatchExpenseLoadSuccess({ model, data }: { model: IExpenseModel; data: IExpenseData }) {\n this.stateFacade.dispatch(ExpenseActions.loadSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IIdentityData, IIdentityModel } from '@partners/api';\n\nexport class IdentityActions {\n static reset = createAction('[Identity] Reset State');\n static updateModel = createAction('[Identity] Update Model', props<{ model: IIdentityModel }>());\n static loadFailure = createAction('[Identity] Load Failure', props<{ error: any }>());\n static submit = createAction('[Identity] Submit', props<{ model: IIdentityModel }>());\n static submitSuccess = createAction(\n '[Identity] Submit Success',\n props<{ model: IIdentityModel; data: IIdentityData }>()\n );\n static submitFailure = createAction('[Identity] Submit Failure', props<{ error: any }>());\n static loadSuccess = createAction('[Identity] Load Success', props<{ data: IIdentityData }>());\n}\n","import { Injectable } from '@angular/core';\nimport { createEffect, ofType, Actions } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { IdentityActions } from './identity.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class IdentityEffects {\n sendIdentityEffect$: Observable = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(IdentityActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n\n constructor(private actions$: Actions) {}\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { IdentityActions } from './identity.actions';\nimport { IIdentityState } from './identity.state';\n\nexport const initialIdentityState: IIdentityState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst identityReducerFn = createReducer(\n initialIdentityState,\n on(IdentityActions.reset, (state: IIdentityState, action) => {\n return new StateBuilder(initialIdentityState).build();\n }),\n on(IdentityActions.updateModel, (state: IIdentityState, action) => {\n return new StateBuilder(state, action).build();\n }),\n on(IdentityActions.submit, (state: IIdentityState, action) => {\n return new StateBuilder(state, action).toLoading().build();\n }),\n on(IdentityActions.submitSuccess, (state: IIdentityState, action) => {\n return {\n ...state,\n ...{ model: { ...state.model }, ...{ data: { ...state.data, ...action.data } } }\n };\n }),\n on(IdentityActions.loadSuccess, (state: IIdentityState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function identityReducer(state: IIdentityState | undefined, action: Action) {\n return identityReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IIdentityState } from './identity.state';\n\nexport class IdentitySelectors {\n // todo: replace any type state with root state (once defined)\n static readonly identityState = (state: IRootState): IIdentityState => {\n return state.identity as IIdentityState;\n };\n\n static readonly model = createSelector(IdentitySelectors.identityState, (identity: IIdentityState) => {\n return identity.model;\n });\n\n static readonly data = createSelector(IdentitySelectors.identityState, (identity: IIdentityState) => {\n return identity.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { IdentityEffects, identityReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([IdentityEffects]), StoreModule.forFeature(`identity`, identityReducer)]\n})\nexport class IdentityStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IIdentityData, IIdentityModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { IIdentityState, IdentityActions, IdentitySelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class IdentityStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(IdentitySelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(IdentitySelectors.data);\n }\n\n dispatchIdentityReset() {\n this.stateFacade.dispatch(IdentityActions.reset());\n }\n dispatchUpdateModel({ model }: { model: IIdentityModel }) {\n this.stateFacade.dispatch(IdentityActions.updateModel({ model }));\n }\n dispatchIdentitySubmit({ model }: { model: IIdentityModel }) {\n this.stateFacade.dispatch(IdentityActions.submit({ model }));\n }\n dispatchIdentitySubmitSuccess({ model, data }: { model: IIdentityModel; data: IIdentityData }) {\n this.stateFacade.dispatch(IdentityActions.submitSuccess({ model, data }));\n }\n dispatchIdentityLoadSuccess({ data }: { data: IIdentityData }) {\n this.stateFacade.dispatch(IdentityActions.loadSuccess({ data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IIncomeData, IIncomeModel } from '@partners/api';\n\nexport class IncomeActions {\n static reset = createAction('[Income] Reset State');\n static load = createAction('[Income] Load');\n static loadSuccess = createAction('[Income] Load Success', props<{ model: IIncomeModel; data: IIncomeData }>());\n static loadFailure = createAction('[Income] Load Failure', props<{ error: any }>());\n static submit = createAction('[Income] Submit');\n static submitSuccess = createAction('[Income] Submit Success', props<{ model: IIncomeModel; data: IIncomeData }>());\n static submitFailure = createAction('[Income] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { IncomeActions } from './income.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class IncomeEffects {\n sendIncomeEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendIncomeEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(IncomeActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { IncomeActions } from './income.actions';\nimport { IIncomeState } from './income.state';\n\nexport const initialIncomeState: IIncomeState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst incomeReducerFn = createReducer(\n initialIncomeState,\n on(IncomeActions.reset, (state: IIncomeState, action) => {\n return new StateBuilder(initialIncomeState).build();\n }),\n on(IncomeActions.load, (state: IIncomeState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(IncomeActions.loadSuccess, (state: IIncomeState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(IncomeActions.submit, (state: IIncomeState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(IncomeActions.submitSuccess, (state: IIncomeState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function incomeReducer(state: IIncomeState | undefined, action: Action) {\n return incomeReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IIncomeState } from './income.state';\n\nexport class IncomeSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly incomeState = (state: IRootState): IIncomeState => {\n return state.income as IIncomeState;\n };\n\n static readonly model = createSelector(IncomeSelectors.incomeState, (income: IIncomeState) => {\n return income.model;\n });\n\n static readonly data = createSelector(IncomeSelectors.incomeState, (income: IIncomeState) => {\n return income.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { IncomeEffects, incomeReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([IncomeEffects]), StoreModule.forFeature(`income`, incomeReducer)]\n})\nexport class IncomeStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IIncomeData, IIncomeModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { IIncomeState, IncomeActions, IncomeSelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class IncomeStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.state$ = this.stateFacade.select$(IncomeSelectors.incomeState);\n\n this.model$$ = this.stateFacade.selectSignal$(IncomeSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(IncomeSelectors.data);\n }\n\n dispatchIncomeReset() {\n this.stateFacade.dispatch(IncomeActions.reset());\n }\n dispatchSubmitLoad() {\n this.stateFacade.dispatch(IncomeActions.load());\n }\n dispatchIncomeLoadSuccess({ model, data }: { model: IIncomeModel; data: IIncomeData }) {\n this.stateFacade.dispatch(IncomeActions.loadSuccess({ model, data }));\n }\n\n dispatchSubmitSubmit() {\n this.stateFacade.dispatch(IncomeActions.submit());\n }\n dispatchIncomeSubmitSuccess({ model, data }: { model: IIncomeModel; data: IIncomeData }) {\n this.stateFacade.dispatch(IncomeActions.submitSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IIntroductionData, IIntroductionModel } from '@partners/api';\n\nexport class IntroductionActions {\n static reset = createAction('[Introduction] Reset State');\n static load = createAction('[Introduction] Load');\n static loadSuccess = createAction(\n '[Introduction] Load Success',\n props<{ model: IIntroductionModel; data: IIntroductionData }>()\n );\n static loadFailure = createAction('[Introduction] Load Failure', props<{ error: any }>());\n static submit = createAction('[Introduction] Submit');\n static submitSuccess = createAction('[Introduction] Submit Success', props<{model: IIntroductionModel; data: IIntroductionData }>());\n static submitFailure = createAction('[Introduction] Submit Failure', props<{ error: any }>());\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { IntroductionActions } from './introduction.actions';\nimport { IIntroductionState } from './introduction.state';\n\nexport const initialIntroductionState: IIntroductionState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst introductionReducerFn = createReducer(\n initialIntroductionState,\n on(IntroductionActions.reset, (state: IIntroductionState, action) => {\n return new StateBuilder(initialIntroductionState).build();\n }),\n on(IntroductionActions.load, (state: IIntroductionState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(IntroductionActions.loadSuccess, (state: IIntroductionState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(IntroductionActions.submit, (state: IIntroductionState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(IntroductionActions.submitSuccess, (state: IIntroductionState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function introductionReducer(state: IIntroductionState | undefined, action: Action) {\n return introductionReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IIntroductionState } from './introduction.state';\n\nexport class IntroductionSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly introductionState = (state: IRootState): IIntroductionState => {\n return state.introduction as IIntroductionState;\n };\n\n static readonly model = createSelector(\n IntroductionSelectors.introductionState,\n (introduction: IIntroductionState) => {\n return introduction.model;\n }\n );\n\n static readonly data = createSelector(IntroductionSelectors.introductionState, (introduction: IIntroductionState) => {\n return introduction.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { IntroductionEffects, introductionReducer } from './store';\n\n@NgModule({\n imports: [\n EffectsModule.forFeature([IntroductionEffects]),\n StoreModule.forFeature(`introduction`, introductionReducer)\n ]\n})\nexport class IntroductionStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IIntroductionData, IIntroductionModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { IIntroductionState, IntroductionActions, IntroductionSelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class IntroductionStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(IntroductionSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(IntroductionSelectors.data);\n }\n\n dispatchIntroductionReset() {\n this.stateFacade.dispatch(IntroductionActions.reset());\n }\n dispatchIntroductionLoad() {\n this.stateFacade.dispatch(IntroductionActions.load());\n }\n dispatchIntroductionLoadSuccess({ model, data }: { model: IIntroductionModel; data: IIntroductionData }) {\n this.stateFacade.dispatch(IntroductionActions.loadSuccess({ model, data }));\n }\n dispatchIntroductionSubmit() {\n this.stateFacade.dispatch(IntroductionActions.submit());\n }\n dispatchIntroductionSubmitSuccess({ model, data }: { model: IIntroductionModel; data: IIntroductionData }) {\n this.stateFacade.dispatch(IntroductionActions.submitSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { ILeadData, ILeadModel } from '@partners/api';\n\nexport class LeadActions {\n static reset = createAction('[Lead] Reset State');\n static load = createAction('[Lead] Load');\n static loadSuccess = createAction('[Lead] Load Success', props<{ model: ILeadModel; data: ILeadData }>());\n static loadFailure = createAction('[Lead] Load Failure', props<{ error: any }>());\n static submit = createAction('[Lead] Submit', props<{ model: ILeadModel }>());\n static submitSuccess = createAction('[Lead] Submit Success', props<{ model: ILeadModel; data: ILeadData }>());\n static submitFailure = createAction('[Lead] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { LeadActions } from './lead.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LeadEffects {\n sendLeadEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendLeadEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(LeadActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { LeadActions } from './lead.actions';\nimport { ILeadState } from './lead.state';\n\nexport const initialLeadState: ILeadState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst LeadReducerFn = createReducer(\n initialLeadState,\n on(LeadActions.reset, (state: ILeadState, action) => {\n return new StateBuilder(initialLeadState).build();\n }),\n on(LeadActions.load, (state: ILeadState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(LeadActions.loadSuccess, (state: ILeadState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(LeadActions.submit, (state: ILeadState, action) => {\n return new StateBuilder(state, action).toLoading().build();\n }),\n on(LeadActions.submitSuccess, (state: ILeadState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function leadReducer(state: ILeadState | undefined, action: Action) {\n return LeadReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { ILeadState } from './lead.state';\n\nexport class LeadSelectors {\n static readonly leadState = (state: IRootState): ILeadState => {\n return state.lead as ILeadState;\n };\n\n static readonly model = createSelector(LeadSelectors.leadState, (lead: ILeadState) => {\n return lead.model;\n });\n\n static readonly data = createSelector(LeadSelectors.leadState, (lead: ILeadState) => {\n return lead.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { LeadEffects, leadReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([LeadEffects]), StoreModule.forFeature(`lead`, leadReducer)]\n})\nexport class LeadStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { ILeadData, ILeadModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { ILeadState, LeadActions, LeadSelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LeadStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(LeadSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(LeadSelectors.data);\n }\n\n dispatchLeadReset() {\n this.stateFacade.dispatch(LeadActions.reset());\n }\n dispatchLeadLoad() {\n this.stateFacade.dispatch(LeadActions.load());\n }\n dispatchLeadLoadSuccess({ model, data }: { model: ILeadModel; data: ILeadData }) {\n this.stateFacade.dispatch(LeadActions.loadSuccess({ model, data }));\n }\n dispatchLeadSubmit(model: ILeadModel) {\n this.stateFacade.dispatch(LeadActions.submit({ model }));\n }\n dispatchLeadSubmitSuccess({ model, data }: { model: ILeadModel; data: ILeadData }) {\n this.stateFacade.dispatch(LeadActions.submitSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IMaritalData, IMaritalModel } from '@partners/api';\n\nexport class MaritalActions {\n static reset = createAction('[Marital] Reset State');\n static load = createAction('[Marital] Load');\n static loadSuccess = createAction('[Marital] Load Success', props<{ model: IMaritalModel; data: IMaritalData }>());\n static loadFailure = createAction('[Marital] Load Failure', props<{ error: any }>());\n static submit = createAction('[Marital] Submit');\n static submitSuccess = createAction(\n '[Marital] Submit Success',\n props<{ model: IMaritalModel; data: IMaritalData }>()\n );\n static submitFailure = createAction('[Marital] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { MaritalActions } from './marital.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MaritalEffects {\n sendMaritalEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendMaritalEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(MaritalActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { MaritalActions } from './marital.actions';\nimport { IMaritalState } from './marital.state';\n\nexport const initialMaritalState: IMaritalState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst maritalReducerFn = createReducer(\n initialMaritalState,\n on(MaritalActions.reset, (state: IMaritalState, action) => {\n return new StateBuilder(initialMaritalState).build();\n }),\n on(MaritalActions.load, (state: IMaritalState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(MaritalActions.loadSuccess, (state: IMaritalState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(MaritalActions.submit, (state: IMaritalState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(MaritalActions.submitSuccess, (state: IMaritalState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function maritalReducer(state: IMaritalState | undefined, action: Action) {\n return maritalReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IMaritalState } from './marital.state';\n\nexport class MaritalSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly maritalState = (state: IRootState): IMaritalState => {\n return state.marital as IMaritalState;\n };\n\n static readonly model = createSelector(MaritalSelectors.maritalState, (marital: IMaritalState) => {\n return marital.model;\n });\n\n static readonly data = createSelector(MaritalSelectors.maritalState, (marital: IMaritalState) => {\n return marital.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { MaritalEffects, maritalReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([MaritalEffects]), StoreModule.forFeature(`marital`, maritalReducer)]\n})\nexport class MaritalStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IMaritalData, IMaritalModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { IMaritalState, MaritalActions, MaritalSelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MaritalStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(MaritalSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(MaritalSelectors.data);\n }\n\n dispatchMaritalReset() {\n this.stateFacade.dispatch(MaritalActions.reset());\n }\n dispatchMaritalLoad() {\n this.stateFacade.dispatch(MaritalActions.load());\n }\n dispatchMaritalLoadSuccess({ model, data }: { model: IMaritalModel; data: IMaritalData }) {\n this.stateFacade.dispatch(MaritalActions.loadSuccess({ model, data }));\n }\n dispatchMaritalSubmit() {\n this.stateFacade.dispatch(MaritalActions.submit());\n }\n dispatchMaritalSubmitSuccess({ model, data }: { model: IMaritalModel; data: IMaritalData }) {\n this.stateFacade.dispatch(MaritalActions.submitSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IOfferData } from '@partners/api';\n\nexport class OfferActions {\n static load = createAction('[offer] Load');\n static submit = createAction('[offer] Submit');\n static loadSuccess = createAction('[offer] Load Success', props<{ data: IOfferData }>());\n static submitSuccess = createAction('[offer] Submit Success', props<{ data: IOfferData }>());\n static submitFailure = createAction('[offer] Submit Failure', props<{ error: any }>());\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { IOfferState, OfferActions } from '.';\nimport { StateBuilder } from '../../../model/state.builder';\n\nexport const initialOfferState: IOfferState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst offerReducerFn = createReducer(\n initialOfferState,\n on(OfferActions.load, (state: IOfferState) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(OfferActions.loadSuccess, (state: IOfferState, action) => {\n return {\n ...state,\n ...{\n data: { ...state.data, ...action.data }\n }\n };\n }),\n on(OfferActions.submit, (state: IOfferState) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(OfferActions.submitSuccess, (state: IOfferState, action) => {\n return {\n ...state,\n ...{\n data: { ...state.data, ...action.data }\n }\n };\n })\n);\n\nexport function offerReducer(state: IOfferState | undefined, action: Action) {\n return offerReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IOfferState } from './offer.state';\n\nexport class OfferSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly offerState = (state: IRootState): IOfferState => {\n return state.offer as IOfferState;\n };\n\n static readonly model = createSelector(OfferSelectors.offerState, (offer: IOfferState) => {\n return offer.model;\n });\n\n static readonly data = createSelector(OfferSelectors.offerState, (offer: IOfferState) => {\n return offer.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { OfferEffects, offerReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([OfferEffects]), StoreModule.forFeature(`offer`, offerReducer)]\n})\nexport class OfferStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IOfferData, IOfferModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { IOfferState, OfferActions, OfferSelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OfferStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(OfferSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(OfferSelectors.data);\n }\n\n dispatchOfferLoad() {\n this.stateFacade.dispatch(OfferActions.load());\n }\n\n dispatchOfferSubmit() {\n this.stateFacade.dispatch(OfferActions.submit());\n }\n\n dispatchOfferLoadSuccess({ data }: { data: IOfferData }) {\n this.stateFacade.dispatch(OfferActions.loadSuccess({ data }));\n }\n\n dispatchOfferSubmitSuccess({ data }: { data: IOfferData }) {\n this.stateFacade.dispatch(OfferActions.submitSuccess({ data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IOnlineUseData, IOnlineUseModel } from '@partners/api';\n\nexport class OnlineUseActions {\n static reset = createAction('[OnlineUse] Reset State');\n static load = createAction('[OnlineUse] Load');\n static loadSuccess = createAction(\n '[OnlineUse] Load Success',\n props<{ model: IOnlineUseModel; data: IOnlineUseData }>()\n );\n static loadFailure = createAction('[OnlineUse] Load Failure', props<{ error: any }>());\n static submit = createAction('[OnlineUse] Submit', props<{ model: IOnlineUseModel }>());\n static submitSuccess = createAction('[OnlineUse] Submit Success', props<{ data: IOnlineUseData }>());\n static submitFailure = createAction('[OnlineUse] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { OnlineUseActions } from './online-use.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OnlineUseEffects {\n sendOnlineUseEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendOnlineUseEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(OnlineUseActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { OnlineUseActions } from './online-use.actions';\nimport { IOnlineUseState } from './online-use.state';\n\nexport const initialOnlineUseState: IOnlineUseState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst onlineUseReducerFn = createReducer(\n initialOnlineUseState,\n on(OnlineUseActions.reset, (state: IOnlineUseState, action) => {\n return new StateBuilder(initialOnlineUseState).build();\n }),\n on(OnlineUseActions.load, (state: IOnlineUseState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(OnlineUseActions.loadSuccess, (state: IOnlineUseState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(OnlineUseActions.submit, (state: IOnlineUseState, action) => {\n return new StateBuilder(state, action).toLoading().build();\n }),\n on(OnlineUseActions.submitSuccess, (state: IOnlineUseState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function onlineUseReducer(state: IOnlineUseState | undefined, action: Action) {\n return onlineUseReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IOnlineUseState } from './online-use.state';\n\nexport class OnlineUseSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly onlineUseState = (state: IRootState): IOnlineUseState => {\n return state.onlineUse as IOnlineUseState;\n };\n\n static readonly model = createSelector(OnlineUseSelectors.onlineUseState, (onlineUse: IOnlineUseState) => {\n return onlineUse.model;\n });\n\n static readonly data = createSelector(OnlineUseSelectors.onlineUseState, (onlineUse: IOnlineUseState) => {\n return onlineUse.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { OnlineUseEffects, onlineUseReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([OnlineUseEffects]), StoreModule.forFeature(`onlineUse`, onlineUseReducer)]\n})\nexport class OnlineUseStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IOnlineUseData, IOnlineUseModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { IOnlineUseState, OnlineUseActions, OnlineUseSelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OnlineUseStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(OnlineUseSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(OnlineUseSelectors.data);\n }\n\n dispatchOnlineUseReset() {\n this.stateFacade.dispatch(OnlineUseActions.reset());\n }\n dispatchOnlineUseLoad() {\n this.stateFacade.dispatch(OnlineUseActions.load());\n }\n dispatchOnlineUseLoadSuccess({ model, data }: { model: IOnlineUseModel; data: IOnlineUseData }) {\n this.stateFacade.dispatch(OnlineUseActions.loadSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IPersonaData, IPersonaModel } from '@partners/api';\n\nexport class PersonaActions {\n static reset = createAction('[Persona] Reset State');\n static load = createAction('[Persona] Load');\n static loadSuccess = createAction('[Persona] Load Success', props<{ model: IPersonaModel; data: IPersonaData }>());\n static loadFailure = createAction('[Persona] Load Failure', props<{ error: any }>());\n static submit = createAction('[Persona] Submit');\n static submitSuccess = createAction(\n '[Persona] Submit Success',\n props<{ model: IPersonaModel; data: IPersonaData }>()\n );\n static submitFailure = createAction('[Persona] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { PersonaActions } from './persona.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PersonaEffects {\n sendPersonaEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendPersonaEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(PersonaActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { PersonaActions } from './persona.actions';\nimport { IPersonaState } from './persona.state';\n\nexport const initialPersonaState: IPersonaState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst personaReducerFn = createReducer(\n initialPersonaState,\n on(PersonaActions.reset, (state: IPersonaState, action) => {\n return new StateBuilder(initialPersonaState).build();\n }),\n on(PersonaActions.load, (state: IPersonaState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(PersonaActions.loadSuccess, (state: IPersonaState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(PersonaActions.submit, (state: IPersonaState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(PersonaActions.submitSuccess, (state: IPersonaState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function personaReducer(state: IPersonaState | undefined, action: Action) {\n return personaReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IPersonaState } from './persona.state';\n\nexport class PersonaSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly personaState = (state: IRootState): IPersonaState => {\n return state.persona as IPersonaState;\n };\n\n static readonly model = createSelector(PersonaSelectors.personaState, (persona: IPersonaState) => {\n return persona.model;\n });\n\n static readonly data = createSelector(PersonaSelectors.personaState, (persona: IPersonaState) => {\n return persona.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { PersonaEffects, personaReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([PersonaEffects]), StoreModule.forFeature(`persona`, personaReducer)]\n})\nexport class PersonaStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IPersonaData, IPersonaModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { IPersonaState, PersonaActions, PersonaSelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PersonaStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(PersonaSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(PersonaSelectors.data);\n }\n\n dispatchPersonaReset() {\n this.stateFacade.dispatch(PersonaActions.reset());\n }\n dispatchPersonaLoad() {\n this.stateFacade.dispatch(PersonaActions.load());\n }\n dispatchPersonaLoadSuccess({ model, data }: { model: IPersonaModel; data: IPersonaData }) {\n this.stateFacade.dispatch(PersonaActions.loadSuccess({ model, data }));\n }\n dispatchPersonaSubmit() {\n this.stateFacade.dispatch(PersonaActions.submit());\n }\n dispatchPersonaSubmitSuccess({ model, data }: { model: IPersonaModel; data: IPersonaData }) {\n this.stateFacade.dispatch(PersonaActions.submitSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IPrivacyData, IPrivacyModel } from '@partners/api';\n\nexport class PrivacyActions {\n static reset = createAction('[Privacy] Reset State');\n static load = createAction('[Privacy] Load');\n static loadSuccess = createAction('[Privacy] Load Success', props<{ model: IPrivacyModel; data: IPrivacyData }>());\n static loadFailure = createAction('[Privacy] Load Failure', props<{ error: any }>());\n static submit = createAction('[Privacy] Submit');\n static submitSuccess = createAction(\n '[Privacy] Submit Success',\n props<{ model: IPrivacyModel; data: IPrivacyData }>()\n );\n static submitFailure = createAction('[Privacy] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { PrivacyActions } from './privacy.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PrivacyEffects {\n sendPrivacyEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendPrivacyEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(PrivacyActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { PrivacyActions } from './privacy.actions';\nimport { IPrivacyState } from './privacy.state';\n\nexport const initialPrivacyState: IPrivacyState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst privacyReducerFn = createReducer(\n initialPrivacyState,\n on(PrivacyActions.reset, (state: IPrivacyState, action) => {\n return new StateBuilder(initialPrivacyState).build();\n }),\n on(PrivacyActions.load, (state: IPrivacyState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(PrivacyActions.loadSuccess, (state: IPrivacyState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(PrivacyActions.submit, (state: IPrivacyState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(PrivacyActions.submitSuccess, (state: IPrivacyState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function privacyReducer(state: IPrivacyState | undefined, action: Action) {\n return privacyReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IPrivacyState } from './privacy.state';\n\nexport class PrivacySelectors {\n // todo: replace any type state with root state (once defined)\n static readonly privacyState = (state: IRootState): IPrivacyState => {\n return state.privacy as IPrivacyState;\n };\n\n static readonly model = createSelector(PrivacySelectors.privacyState, (privacy: IPrivacyState) => {\n return privacy.model;\n });\n\n static readonly data = createSelector(PrivacySelectors.privacyState, (privacy: IPrivacyState) => {\n return privacy.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { PrivacyEffects, privacyReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([PrivacyEffects]), StoreModule.forFeature(`privacy`, privacyReducer)]\n})\nexport class PrivacyStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IPrivacyData, IPrivacyModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { IPrivacyState, PrivacyActions, PrivacySelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PrivacyStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n this.model$$ = this.stateFacade.selectSignal$(PrivacySelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(PrivacySelectors.data);\n }\n\n dispatchPrivacyReset() {\n this.stateFacade.dispatch(PrivacyActions.reset());\n }\n dispatchPrivacyLoad() {\n this.stateFacade.dispatch(PrivacyActions.load());\n }\n dispatchPrivacyLoadSuccess({ model, data }: { model: IPrivacyModel; data: IPrivacyData }) {\n this.stateFacade.dispatch(PrivacyActions.loadSuccess({ model, data }));\n }\n\n dispatchPrivacySubmit() {\n this.stateFacade.dispatch(PrivacyActions.submit());\n }\n dispatchPrivacySubmitSuccess({ model, data }: { model: IPrivacyModel; data: IPrivacyData }) {\n this.stateFacade.dispatch(PrivacyActions.submitSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IProposalData, IProposalModel } from '@partners/api';\n\nexport class ProposalActions {\n static reset = createAction('[Proposal] Reset State');\n static load = createAction('[Proposal] Load');\n static loadSuccess = createAction('[Proposal] Load Success', props<{ model: IProposalModel; data: IProposalData }>());\n static loadFailure = createAction('[Proposal] Load Failure', props<{ error: any }>());\n static submit = createAction('[Proposal] Submit');\n static submitSuccess = createAction('[Proposal] Submit Success', props<{ model: IProposalModel; data: IProposalData }>());\n static submitFailure = createAction('[Proposal] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { ProposalActions } from './proposal.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ProposalEffects {\n sendProposalEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendProposalEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(ProposalActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { ProposalActions } from './proposal.actions';\nimport { IProposalState } from './proposal.state';\n\nexport const initialProposalState: IProposalState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst proposalReducerFn = createReducer(\n initialProposalState,\n on(ProposalActions.reset, (state: IProposalState, action) => {\n return new StateBuilder(initialProposalState).build();\n }),\n on(ProposalActions.load, (state: IProposalState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(ProposalActions.loadSuccess, (state: IProposalState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(ProposalActions.submit, (state: IProposalState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(ProposalActions.submitSuccess, (state: IProposalState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function proposalReducer(state: IProposalState | undefined, action: Action) {\n return proposalReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IProposalState } from './proposal.state';\n\nexport class ProposalSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly proposalState = (state: IRootState): IProposalState => {\n return state.proposal as IProposalState;\n };\n\n static readonly model = createSelector(ProposalSelectors.proposalState, (proposal: IProposalState) => {\n return proposal.model;\n });\n\n static readonly data = createSelector(ProposalSelectors.proposalState, (proposal: IProposalState) => {\n return proposal.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { ProposalEffects, proposalReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([ProposalEffects]), StoreModule.forFeature(`proposal`, proposalReducer)]\n})\nexport class ProposalStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IProposalData, IProposalModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { IProposalState, ProposalActions, ProposalSelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ProposalStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n this.model$$ = this.stateFacade.selectSignal$(ProposalSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(ProposalSelectors.data);\n }\n\n dispatchProposalReset() {\n this.stateFacade.dispatch(ProposalActions.reset());\n }\n dispatchProposalLoad() {\n this.stateFacade.dispatch(ProposalActions.load());\n }\n dispatchProposalLoadSuccess({ model, data }: { model: IProposalModel; data: IProposalData }) {\n this.stateFacade.dispatch(ProposalActions.loadSuccess({ model, data }));\n }\n dispatchProposalSubmit() {\n this.stateFacade.dispatch(ProposalActions.submit());\n }\n dispatchProposalSubmitSuccess({ model, data }: { model: IProposalModel; data: IProposalData }) {\n this.stateFacade.dispatch(ProposalActions.submitSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IPurposeData, IPurposeModel } from '@partners/api';\n\nexport class PurposeActions {\n static reset = createAction('[Purpose] Reset State');\n static load = createAction('[Purpose] Load');\n static loadSuccess = createAction('[Purpose] Load Success', props<{ model: IPurposeModel; data: IPurposeData }>());\n static loadFailure = createAction('[Purpose] Load Failure', props<{ error: any }>());\n static submit = createAction('[Purpose] Submit');\n static submitSuccess = createAction(\n '[Purpose] Submit Success',\n props<{ model: IPurposeModel; data: IPurposeData }>()\n );\n static submitFailure = createAction('[Purpose] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { createEffect, ofType, Actions } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { PurposeActions } from './purpose.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PurposeEffects {\n sendPurposeEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendPurposeEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(PurposeActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { PurposeActions } from './purpose.actions';\nimport { IPurposeState } from './purpose.state';\n\nexport const initialPurposeState: IPurposeState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst purposeReducerFn = createReducer(\n initialPurposeState,\n on(PurposeActions.reset, (state: IPurposeState, action) => {\n return new StateBuilder(initialPurposeState).build();\n }),\n on(PurposeActions.load, (state: IPurposeState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(PurposeActions.loadSuccess, (state: IPurposeState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(PurposeActions.submit, (state: IPurposeState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(PurposeActions.submitSuccess, (state: IPurposeState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function purposeReducer(state: IPurposeState | undefined, action: Action) {\n return purposeReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IPurposeState } from './purpose.state';\n\nexport class PurposeSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly purposeState = (state: IRootState): IPurposeState => {\n return state.purpose as IPurposeState;\n };\n\n static readonly model = createSelector(PurposeSelectors.purposeState, (purpose: IPurposeState) => {\n return purpose.model;\n });\n\n static readonly data = createSelector(PurposeSelectors.purposeState, (purpose: IPurposeState) => {\n return purpose.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { PurposeEffects, purposeReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([PurposeEffects]), StoreModule.forFeature(`purpose`, purposeReducer)]\n})\nexport class PurposeStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IPurposeData, IPurposeModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { IPurposeState, PurposeActions, PurposeSelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PurposeStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(PurposeSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(PurposeSelectors.data);\n }\n\n dispatchPurposeReset() {\n this.stateFacade.dispatch(PurposeActions.reset());\n }\n dispatchPurposeLoad() {\n this.stateFacade.dispatch(PurposeActions.load());\n }\n dispatchPurposeSubmit() {\n this.stateFacade.dispatch(PurposeActions.submit());\n }\n dispatchPurposeLoadSuccess({ model, data }: { model: IPurposeModel; data: IPurposeData }) {\n this.stateFacade.dispatch(PurposeActions.loadSuccess({ model, data }));\n }\n dispatchPurposeSubmitSuccess({ model, data }: { model: IPurposeModel; data: IPurposeData }) {\n this.stateFacade.dispatch(PurposeActions.submitSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IRefusedData, IRefusedModel } from '@partners/api';\n\nexport class RefusedActions {\n static reset = createAction('[Refused] Reset State');\n static load = createAction('[Refused] Load');\n static loadSuccess = createAction('[Refused] Load Success', props<{ model: IRefusedModel; data: IRefusedData }>());\n static loadFailure = createAction('[Refused] Load Failure', props<{ error: any }>());\n static submit = createAction('[Refused] Submit');\n static submitSuccess = createAction(\n '[Refused] Submit Success',\n props<{ model: IRefusedModel; data: IRefusedData }>()\n );\n static submitFailure = createAction('[Refused] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { RefusedActions } from './refused.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RefusedEffects {\n sendRefusedEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendRefusedEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(RefusedActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { RefusedActions } from './refused.actions';\nimport { IRefusedState } from './refused.state';\n\nexport const initialRefusedState: IRefusedState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst refusedReducerFn = createReducer(\n initialRefusedState,\n on(RefusedActions.reset, (state: IRefusedState, action) => {\n return new StateBuilder(initialRefusedState).build();\n }),\n on(RefusedActions.load, (state: IRefusedState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(RefusedActions.loadSuccess, (state: IRefusedState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(RefusedActions.submit, (state: IRefusedState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(RefusedActions.submitSuccess, (state: IRefusedState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function refusedReducer(state: IRefusedState | undefined, action: Action) {\n return refusedReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IRefusedState } from './refused.state';\n\nexport class RefusedSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly refusedState = (state: IRootState): IRefusedState => {\n return state.refused as IRefusedState;\n };\n\n static readonly model = createSelector(RefusedSelectors.refusedState, (refused: IRefusedState) => {\n return refused.model;\n });\n\n static readonly data = createSelector(RefusedSelectors.refusedState, (refused: IRefusedState) => {\n return refused.data;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { RefusedEffects, refusedReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([RefusedEffects]), StoreModule.forFeature(`refused`, refusedReducer)]\n})\nexport class RefusedStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IRefusedData, IRefusedModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { IRefusedState, RefusedActions, RefusedSelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RefusedStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(RefusedSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(RefusedSelectors.data);\n }\n\n dispatchRefusedReset() {\n this.stateFacade.dispatch(RefusedActions.reset());\n }\n dispatchRefusedLoad() {\n this.stateFacade.dispatch(RefusedActions.load());\n }\n dispatchRefusedLoadSuccess({ model, data }: { model: IRefusedModel; data: IRefusedData }) {\n this.stateFacade.dispatch(RefusedActions.loadSuccess({ model, data }));\n }\n dispatchRefusedSubmit() {\n this.stateFacade.dispatch(RefusedActions.submit());\n }\n dispatchRefusedSubmitSuccess({ model, data }: { model: IRefusedModel; data: IRefusedData }) {\n this.stateFacade.dispatch(RefusedActions.submitSuccess({ model, data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IScanDocumentData, IScanDocumentModel } from '@partners/api';\n\nexport class ScanActions {\n //-----Scan Document------//\n static resetScanDocument = createAction('[Scan Document] Reset State');\n\n static loadScanDocument = createAction('[Scan Document] Load', props<{ selectedDocId: number }>());\n\n static submitScanDocument = createAction('[Scan Document] Submit', props<{ model: IScanDocumentModel }>());\n\n static submitScanDocumentSuccess = createAction(\n '[Scan Document] Submit Success',\n props<{ data: IScanDocumentData }>()\n );\n\n static submitScanDocumentFailure = createAction('[Scan Document] Submit Failure', props<{ error: any }>());\n\n static updateMaxAttemptsError = createAction(\n '[Scan Document] update max attempts error status',\n props<{ isMaxAttemptsExceeded: boolean }>()\n );\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { ScanActions } from './scan.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ScanEffects {\n sendScanDocumentEffect$: Observable = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(ScanActions.submitScanDocumentSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n constructor(private actions$: Actions) {}\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { ScanActions } from './scan.actions';\nimport { IScanDocumentState } from './scan.state';\n\nexport const initialScanDocumentState: IScanDocumentState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst scanDocumentReducerFn = createReducer(\n initialScanDocumentState,\n on(ScanActions.resetScanDocument, (state: IScanDocumentState, action) => {\n return new StateBuilder(initialScanDocumentState).build();\n }),\n //mainly for saving the selected document code to scan\n on(ScanActions.loadScanDocument, (state: IScanDocumentState, action) => {\n const { selectedDocId } = action;\n const completeModel = {\n ...state,\n model: { ...state.model, selectedDocId }\n };\n\n return new StateBuilder(state, { ...completeModel }).toLoaded().build();\n }),\n //save all models for scanDocument, scanDetails and saveDocument http calls\n on(ScanActions.submitScanDocument, (state: IScanDocumentState, action) => {\n const completeModel = {\n ...state,\n model: { ...state.model, ...action.model }\n };\n\n return new StateBuilder(state, { ...completeModel }).toLoaded().build();\n }),\n //save all responses of scanDocument, scanDetails and saveDocument http calls\n on(ScanActions.submitScanDocumentSuccess, (state: IScanDocumentState, action) => {\n const completeData = {\n ...state,\n data: { ...state.data, ...action.data }\n };\n\n return new StateBuilder(state, { ...completeData }).toLoaded().build();\n }),\n\n on(ScanActions.submitScanDocumentFailure, (state: IScanDocumentState, error) => {\n return new StateBuilder(state).toError(error).build();\n }),\n on(ScanActions.updateMaxAttemptsError, (state: IScanDocumentState, action) => {\n const { isMaxAttemptsExceeded } = action;\n const completeData = {\n ...state,\n data: { ...state.data, isMaxAttemptsExceeded }\n };\n return new StateBuilder(state, completeData).toLoaded().build();\n })\n);\n\nexport function scanDocumentReducer(state: IScanDocumentState | undefined, action: Action) {\n return scanDocumentReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IRootState } from '../../../root';\nimport { IScanDocumentState } from './scan.state';\n\nexport class ScanSelectors {\n static readonly ScanDocumentState = (state: IRootState): IScanDocumentState => {\n return state.scanDocument as IScanDocumentState;\n };\n\n static readonly scanDocumentStateModel = createSelector(\n ScanSelectors.ScanDocumentState,\n (scanDocument: IScanDocumentState) => {\n return scanDocument.model;\n }\n );\n static readonly scanDocumentStateError = createSelector(\n ScanSelectors.ScanDocumentState,\n (scanDocument: IScanDocumentState) => {\n return scanDocument.error;\n }\n );\n static readonly scanDocumentStateData = createSelector(\n ScanSelectors.ScanDocumentState,\n (scanDocument: IScanDocumentState) => {\n return scanDocument.data;\n }\n );\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { ScanEffects, scanDocumentReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([ScanEffects]), StoreModule.forFeature('scanDocument', scanDocumentReducer)]\n})\nexport class ScanStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IScanDocumentData, IScanDocumentModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { IScanDocumentState, ScanActions, ScanSelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ScanDocumentStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n readonly error$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(ScanSelectors.scanDocumentStateModel);\n this.data$$ = this.stateFacade.selectSignal$(ScanSelectors.scanDocumentStateData);\n this.error$$ = this.stateFacade.selectSignal$(ScanSelectors.scanDocumentStateError);\n }\n\n dispatchScanReset() {\n this.stateFacade.dispatch(ScanActions.resetScanDocument());\n }\n dispatchLoadScanDocument(selectedDocId: number) {\n this.stateFacade.dispatch(ScanActions.loadScanDocument({ selectedDocId }));\n }\n dispatchSubmitScanDocumentFailure(error: any) {\n this.stateFacade.dispatch(ScanActions.submitScanDocumentFailure(error));\n }\n\n dispatchSubmitScanDocument(model: IScanDocumentModel) {\n this.stateFacade.dispatch(ScanActions.submitScanDocument({ model }));\n }\n\n dispatchSubmitScanDocumentSuccess({ data }: { data: IScanDocumentData }) {\n this.stateFacade.dispatch(ScanActions.submitScanDocumentSuccess({ data }));\n }\n\n dispatchUpdateMaxAttemptsError(isMaxAttemptsExceeded: boolean) {\n this.stateFacade.dispatch(ScanActions.updateMaxAttemptsError({ isMaxAttemptsExceeded }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IFormContentData, IFormPreviewGroup, ISignatureData, ISignatureModel } from '@partners/api';\nimport { IRemoteError } from '@partners/errors';\n\nexport class SignatureActions {\n static reset = createAction('[Signature] Reset State');\n\n static loadFormContent = createAction('[Signature] Load Form Content', props<{ fileId: number }>());\n static loadFormContentSuccess = createAction(\n '[Signature] Load Form Content Success',\n props<{ formContent: IFormContentData }>()\n );\n static loadFormContentFailure = createAction(\n '[Signature] Load Form Content Failure',\n props<{ error: IRemoteError }>()\n );\n\n static loadFormsPreview = createAction('[Signature] Load Forms Preview');\n static loadFormsPreviewSuccess = createAction(\n '[Signature] Load Forms Preview Success',\n props<{ model: ISignatureModel; data: ISignatureData }>()\n );\n static loadFormsPreviewFailure = createAction(\n '[Signature] Load Forms Preview Failure',\n props<{ error: IRemoteError }>()\n );\n\n static updateFormStatus = createAction('[Signature] Update Form Status');\n static updateFormStatusSuccess = createAction(\n '[Signature] Update Form Status Success',\n props<{ groupPreview: IFormPreviewGroup }>()\n );\n static updateFormStatusFailure = createAction(\n '[Signature] Update Form Status Failure',\n props<{ error: IRemoteError }>()\n );\n\n static submit = createAction('[Signature] Submit', props<{ model: ISignatureModel }>());\n static submitSuccess = createAction('[Signature] Submit Success', props<{ data: ISignatureData }>());\n static submitFailure = createAction('[Signature] Submit Failure', props<{ error: IRemoteError }>());\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { SignatureActions } from './signature.actions';\nimport { ISignatureState } from './signature.state';\n\nexport const initialSignatureState: ISignatureState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst signatureReducerFn = createReducer(\n initialSignatureState,\n on(SignatureActions.reset, (state: ISignatureState, action) => {\n return new StateBuilder(initialSignatureState).build();\n }),\n\n on(SignatureActions.updateFormStatus, (state: ISignatureState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(SignatureActions.updateFormStatusSuccess, (state: ISignatureState, action) => {\n const { groupPreview } = action;\n const { data } = state;\n const formGroups = data.formGroups.slice();\n\n let targetGroup = formGroups.find((group) => group.code == groupPreview.code);\n const targetForms = targetGroup.forms.slice().map((form) => {\n const signedState = {\n ...form,\n ...{ signed: true }\n };\n return signedState;\n });\n\n targetGroup = {\n ...targetGroup,\n ...{ signed: true },\n ...{ forms: [...targetForms] }\n };\n\n const groupIndex = formGroups.findIndex((group) => group.code == groupPreview.code);\n formGroups.splice(groupIndex, 1, targetGroup);\n\n return {\n ...state,\n ...{\n data: {\n ...data,\n ...{ formGroups: [...formGroups] }\n }\n }\n };\n\n // const clonedGroups = formGroups.slice();\n // const groupIndex = clonedGroups.findIndex((group) => group.code == groupPreview.code);\n // clonedGroups.splice(groupIndex, 1, moduleData);\n\n // return new StateBuilder(state, action).toLoaded().build();\n }),\n on(SignatureActions.updateFormStatusFailure, (state: ISignatureState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n\n on(SignatureActions.loadFormsPreview, (state: ISignatureState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(SignatureActions.loadFormsPreviewSuccess, (state: ISignatureState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(SignatureActions.loadFormsPreviewFailure, (state: ISignatureState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(SignatureActions.submit, (state: ISignatureState, action) => {\n return new StateBuilder(state, action).toLoading().build();\n }),\n on(SignatureActions.submitSuccess, (state: ISignatureState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function signatureReducer(state: ISignatureState | undefined, action: Action) {\n return signatureReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { ISignatureData } from '@partners/api';\nimport { IRootState } from '../../../root';\nimport { ISignatureState } from './signature.state';\n\nexport class SignatureSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly signatureState = (state: IRootState): ISignatureState => {\n return state.signature as ISignatureState;\n };\n\n static readonly model = createSelector(SignatureSelectors.signatureState, (signature: ISignatureState) => {\n return signature.model;\n });\n\n static readonly data = createSelector(SignatureSelectors.signatureState, (signature: ISignatureState) => {\n return signature.data;\n });\n\n static readonly formPreviewGroups = createSelector(SignatureSelectors.data, (data: ISignatureData) => {\n return data?.formGroups;\n });\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { SignatureEffects, signatureReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([SignatureEffects]), StoreModule.forFeature(`signature`, signatureReducer)]\n})\nexport class SignatureStateModule {}\n","import { Injectable, Signal } from '@angular/core';\nimport { IFormContentData, IFormPreviewGroup, ISignatureData, ISignatureModel } from '@partners/api';\nimport { IRemoteError } from '@partners/errors';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { ISignatureState, SignatureActions, SignatureSelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SignatureStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n readonly previewGroups$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(SignatureSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(SignatureSelectors.data);\n this.previewGroups$$ = this.stateFacade.selectSignal$(SignatureSelectors.formPreviewGroups);\n }\n\n dispatchSignatureReset() {\n this.stateFacade.dispatch(SignatureActions.reset());\n }\n\n dispatchUpdateFormState() {\n this.stateFacade.dispatch(SignatureActions.updateFormStatus());\n }\n\n dispatchUpdateFormStateSuccess(groupPreview: IFormPreviewGroup) {\n this.stateFacade.dispatch(SignatureActions.updateFormStatusSuccess({ groupPreview }));\n }\n dispatchUpdateFormStateFailure(error: IRemoteError) {\n this.stateFacade.dispatch(SignatureActions.updateFormStatusFailure({ error }));\n }\n\n dispatchLoadFormsPreview() {\n this.stateFacade.dispatch(SignatureActions.loadFormsPreview());\n }\n dispatchSignatureLoadSuccess({ model, data }: { model: ISignatureModel; data: ISignatureData }) {\n this.stateFacade.dispatch(SignatureActions.loadFormsPreviewSuccess({ model, data }));\n }\n dispatchSignatureLoadFailure(error: IRemoteError) {\n this.stateFacade.dispatch(SignatureActions.loadFormsPreviewFailure({ error }));\n }\n\n dispatchFormContentLoad(fileId: number) {\n this.stateFacade.dispatch(SignatureActions.loadFormContent({ fileId }));\n }\n dispatchFormContentLoadSuccess(formContent: IFormContentData) {\n this.stateFacade.dispatch(SignatureActions.loadFormContentSuccess({ formContent }));\n }\n dispatchFormContentLoadFailure(error: IRemoteError) {\n this.stateFacade.dispatch(SignatureActions.loadFormsPreviewFailure({ error }));\n }\n dispatchSignatureSubmitSuccess({ data }: { data: ISignatureData }) {\n this.stateFacade.dispatch(SignatureActions.submitSuccess({ data }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { ILoanProfileOption, ISimulatorData, ISimulatorModel } from '@partners/api';\nimport { IRemoteError } from '@partners/errors';\n\nexport class SimulatorActions {\n static reset = createAction('[Simulator] Reset State');\n\n static selectProfileOption = createAction(\n '[Simulator] Select Profile Option',\n props<{ profileOption: ILoanProfileOption }>()\n );\n\n static unSelectProfileOption = createAction('[Simulator] UnSelect Profile Option');\n\n static load = createAction('[Simulator] Load');\n static loadSuccess = createAction(\n '[Simulator] Load Success',\n props<{ model: ISimulatorModel; data: ISimulatorData }>()\n );\n static loadFailure = createAction('[Simulator] Load Failure', props<{ error: IRemoteError }>());\n static submit = createAction('[Simulator] Submit');\n static submitSuccess = createAction('[Simulator] Submit Success', props<{ model: ISimulatorModel }>());\n static submitFailure = createAction('[Simulator] Submit Failure', props<{ error: any }>());\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { ILoanProfileOption } from '@partners/api';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { SimulatorActions } from './simulator.actions';\nimport { ISimulatorState } from './simulator.state';\n\nexport const initialSimulatorState: ISimulatorState = {\n model: undefined,\n data: undefined,\n profileOption: undefined,\n uiState: undefined\n};\n\nconst simulatorReducerFn = createReducer(\n initialSimulatorState,\n on(SimulatorActions.reset, (state: ISimulatorState, action) => {\n return new StateBuilder(initialSimulatorState).build();\n }),\n on(SimulatorActions.unSelectProfileOption, (state: ISimulatorState, action) => {\n // const mutation = { profileOption: {} as ILoanProfileOption };\n return new StateBuilder(state, /*mutation*/).toLoading().build();\n }),\n on(SimulatorActions.selectProfileOption, (state: ISimulatorState, action) => {\n const { profileOption } = action;\n const mutation = { profileOption: { ...profileOption } };\n return new StateBuilder(state, mutation).toLoading().build();\n }),\n on(SimulatorActions.load, (state: ISimulatorState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(SimulatorActions.loadFailure, (state: ISimulatorState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(SimulatorActions.loadSuccess, (state: ISimulatorState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(SimulatorActions.submit, (state: ISimulatorState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(SimulatorActions.submitSuccess, (state: ISimulatorState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function simulatorReducer(state: ISimulatorState | undefined, action: Action) {\n return simulatorReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { IFrameReduction, ILoanProfile, ILoanProfileOption, ISimulatorData, ISimulatorModel } from '@partners/api';\nimport { IRemoteError } from '@partners/errors';\nimport { IRootState } from '../../../root';\nimport { ISimulatorState } from './simulator.state';\n\nexport class SimulatorSelectors {\n // todo: replace any type state with root state (once defined)\n static readonly simulatorState = (state: IRootState): ISimulatorState => {\n return state.simulator as ISimulatorState;\n };\n\n static readonly model = createSelector(SimulatorSelectors.simulatorState, (simulator: ISimulatorState) => {\n return simulator.model as ISimulatorModel;\n });\n\n static readonly data = createSelector(SimulatorSelectors.simulatorState, (simulator: ISimulatorState) => {\n return simulator.data as ISimulatorData;\n });\n static readonly error = createSelector(SimulatorSelectors.simulatorState, (simulator: ISimulatorState) => {\n return simulator?.error as IRemoteError;\n });\n static readonly option = createSelector(SimulatorSelectors.simulatorState, (simulator: ISimulatorState) => {\n return simulator?.profileOption as ILoanProfileOption;\n });\n static readonly loanProfiles = createSelector(SimulatorSelectors.data, (data: ISimulatorData) => {\n return data?.loanProfiles as ILoanProfile[];\n });\n\n static readonly frameReduction = createSelector(SimulatorSelectors.data, (data: ISimulatorData) => {\n return data.frameReduction as IFrameReduction;\n });\n}\n","import { Injectable, Signal, computed } from '@angular/core';\nimport { IFrameReduction, ILoanProfile, ILoanProfileOption, ISimulatorData, ISimulatorModel } from '@partners/api';\nimport { InterestTypeEnum } from '@partners/constants';\nimport { IRemoteError } from '@partners/errors';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { ISimulatorState, SimulatorActions, SimulatorSelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SimulatorStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n readonly error$$: Signal;\n readonly loanProfile$$: Signal;\n readonly loanProfileOptions$$: Signal;\n readonly frameReduction$$: Signal;\n readonly currentOption$$: Signal;\n readonly defaultProfileOption$$: Signal;\n readonly isVariableInterest$$: Signal;\n\n private readonly _allLoanProfiles$$: Signal;\n\n constructor() {\n super();\n\n this.model$$ = this.stateFacade.selectSignal$(SimulatorSelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(SimulatorSelectors.data);\n this.error$$ = this.stateFacade.selectSignal$(SimulatorSelectors.error);\n this.currentOption$$ = this.stateFacade.selectSignal$(SimulatorSelectors.option);\n\n this._allLoanProfiles$$ = this.stateFacade.selectSignal$(SimulatorSelectors.loanProfiles);\n\n this.loanProfileOptions$$ = computed(() => this.loanProfile$$().loanProposalOptions);\n this.frameReduction$$ = computed(() => this.data$$().frameReduction);\n this.defaultProfileOption$$ = computed(() => {\n const options = this.loanProfileOptions$$();\n return options?.length ? options[0] : undefined;\n });\n this.loanProfile$$ = computed(() => {\n const profiles = this._allLoanProfiles$$();\n if (profiles?.length > 0) {\n return profiles[0];\n }\n return undefined;\n });\n this.isVariableInterest$$ = computed(() => {\n const profile = this.loanProfile$$();\n if (profile) {\n return profile.interestType === InterestTypeEnum.variable;\n }\n return false;\n });\n }\n\n dispatchSimulatorReset() {\n this.stateFacade.dispatch(SimulatorActions.reset());\n }\n\n dispatchUnSelectProfileOption() {\n this.stateFacade.dispatch(SimulatorActions.unSelectProfileOption());\n }\n\n dispatchSelectProfileOption(profileOption: ILoanProfileOption = this.currentOption$$()) {\n this.stateFacade.dispatch(SimulatorActions.selectProfileOption({ profileOption }));\n }\n\n dispatchSimulatorLoad() {\n this.stateFacade.dispatch(SimulatorActions.load());\n }\n dispatchSimulatorLoadSuccess({ model, data }: { model: ISimulatorModel; data: ISimulatorData }) {\n this.stateFacade.dispatch(SimulatorActions.loadSuccess({ model, data }));\n }\n dispatchSimulatorLoadFailure(error: IRemoteError) {\n this.stateFacade.dispatch(SimulatorActions.loadFailure({ error }));\n }\n\n dispatchSimulatorSubmit() {\n this.stateFacade.dispatch(SimulatorActions.submit());\n }\n dispatchSimulatorSubmitSuccess({ model }: { model: ISimulatorModel }) {\n this.stateFacade.dispatch(SimulatorActions.submitSuccess({ model }));\n }\n dispatchSimulatorSubmitFailure(error: IRemoteError) {\n this.stateFacade.dispatch(SimulatorActions.submitFailure({ error }));\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { ISummaryData, ISummaryModel } from '@partners/api';\n\nexport class SummaryActions {\n static reset = createAction('[Summary] Reset State');\n static sendAuthLink = createAction('[Summary] Send Auth Link');\n static load = createAction('[Summary] Load');\n static loadSuccess = createAction('[Summary] Load Success', props<{ model: ISummaryModel; data: ISummaryData }>());\n static loadFailure = createAction('[Summary] Load Failure', props<{ error: any }>());\n static submit = createAction('[Summary] Submit', props<{ model: ISummaryModel }>());\n static submitSuccess = createAction('[Summary] Submit Success', props<{ data: ISummaryData }>());\n static submitFailure = createAction('[Summary] Submit Failure', props<{ error: any }>());\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable, tap } from 'rxjs';\nimport { SummaryActions } from './summary.actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SummaryEffects {\n sendSummaryEffect$: Observable;\n\n constructor(private actions$: Actions) {\n this.sendSummaryEffect$ = createEffect(\n (): any =>\n this.actions$.pipe(\n ofType(SummaryActions.submitSuccess),\n tap(() => {})\n ),\n { dispatch: false }\n );\n }\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { StateBuilder } from '../../../model/state.builder';\nimport { SummaryActions } from './summary.actions';\nimport { ISummaryState } from './summary.state';\n\nexport const initialSummaryState: ISummaryState = {\n model: undefined,\n data: undefined,\n uiState: undefined\n};\n\nconst summaryReducerFn = createReducer(\n initialSummaryState,\n on(SummaryActions.reset, (state: ISummaryState, action) => {\n return new StateBuilder(initialSummaryState).build();\n }),\n on(SummaryActions.load, (state: ISummaryState, action) => {\n return new StateBuilder(state).toLoading().build();\n }),\n on(SummaryActions.loadSuccess, (state: ISummaryState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n }),\n on(SummaryActions.submit, (state: ISummaryState, action) => {\n return new StateBuilder(state, action).toLoading().build();\n }),\n on(SummaryActions.submitSuccess, (state: ISummaryState, action) => {\n return new StateBuilder(state, action).toLoaded().build();\n })\n);\n\nexport function summaryReducer(state: ISummaryState | undefined, action: Action) {\n return summaryReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport { ISummaryData } from '@partners/api';\nimport { IRootState } from '../../../root';\nimport { ISummaryState } from './summary.state';\n\nexport class SummarySelectors {\n // todo: replace any type state with root state (once defined)\n static readonly summaryState = (state: IRootState): ISummaryState => {\n return state.summary as ISummaryState;\n };\n\n static readonly model = createSelector(SummarySelectors.summaryState, (summary: ISummaryState) => {\n return summary.model;\n });\n\n static readonly data = createSelector(SummarySelectors.summaryState, (summary: ISummaryState) => {\n return summary.data;\n });\n\n static readonly loanData = createSelector(SummarySelectors.data, (data: ISummaryData) => {\n return data?.loanData;\n });\n}\n","import { Injectable, Signal } from '@angular/core';\nimport { ISummaryData, ISummaryLoanDetails, ISummaryModel } from '@partners/api';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { ISummaryState, SummaryActions, SummarySelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SummaryStore extends StateAccessService {\n readonly state$: Observable;\n\n readonly data$$: Signal;\n readonly model$$: Signal;\n\n readonly loadDetails$$: Signal;\n\n constructor() {\n super();\n this.model$$ = this.stateFacade.selectSignal$(SummarySelectors.model);\n this.data$$ = this.stateFacade.selectSignal$(SummarySelectors.data);\n this.loadDetails$$ = this.stateFacade.selectSignal$(SummarySelectors.loanData);\n }\n\n dispatchSummaryReset() {\n this.stateFacade.dispatch(SummaryActions.reset());\n }\n dispatchSummaryLoad() {\n this.stateFacade.dispatch(SummaryActions.load());\n }\n dispatchSummaryLoadSuccess({ model, data }: { model: ISummaryModel; data: ISummaryData }) {\n this.stateFacade.dispatch(SummaryActions.loadSuccess({ model, data }));\n }\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { SummaryEffects, summaryReducer } from './store';\n\n@NgModule({\n imports: [EffectsModule.forFeature([SummaryEffects]), StoreModule.forFeature(`summary`, summaryReducer)]\n})\nexport class SummaryStateModule {}\n","import { createAction, props } from '@ngrx/store';\nimport { IUtmState } from './utm.state';\n// import { IUtmModel } from '@partners/utm';\n\nexport class UtmActions {\n static reset = createAction('[Utm] Reset State');\n static loadParams = createAction('[Utm] Load Url Params', props<{ model: IUtmState }>());\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { UtmActions } from './utm.actions';\nimport { IUtmState } from './utm.state';\n\nexport const initialUtmState: IUtmState = {\n utmSource: undefined,\n utmMedium: undefined,\n utmCampaign: undefined,\n utmTerm: undefined,\n utmContent: undefined\n};\n\nconst utmReducerFn = createReducer(\n { ...initialUtmState },\n on(UtmActions.reset, () => {\n return { ...initialUtmState };\n }),\n on(UtmActions.loadParams, (state: IUtmState, action) => action.model)\n);\n\nexport function utmReducer(state: IUtmState | undefined, action: Action) {\n return utmReducerFn(state, action);\n}\n","import { IRootState } from '../../../root';\nimport { IUtmState } from './utm.state';\n\nexport class UtmSelectors {\n static readonly utmState = (state: IRootState): IUtmState => {\n return state.utm as IUtmState;\n };\n}\n","import { Injectable, Signal } from '@angular/core';\n// import { IUtmModel } from '@partners/utm';\nimport { Observable } from 'rxjs';\nimport { StateAccessService } from '../../../services';\nimport { IUtmState, UtmActions, UtmSelectors } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UtmStore extends StateAccessService {\n readonly state$: Observable;\n\n // readonly utmParams$$: Signal;\n readonly utmParams$$: Signal;\n\n constructor() {\n super();\n\n this.utmParams$$ = this.stateFacade.selectSignal$(UtmSelectors.utmState);\n }\n\n dispatchUtmReset() {\n this.stateFacade.dispatch(UtmActions.reset());\n }\n\n dispatchUtmLoad(model: IUtmState) {\n this.stateFacade.dispatch(UtmActions.loadParams({ model }));\n }\n}\n","import { createAction } from '@ngrx/store';\n\nexport const ROOT_ACTIONS = {\n reset: '[Root] Reset State'\n};\n\nexport class RootActions {\n static reset = createAction(ROOT_ACTIONS.reset);\n}\n","import { Action, ActionReducer, MetaReducer } from '@ngrx/store';\nimport { ROOT_ACTIONS } from './root.actions';\nimport { IRootState } from './root.state';\n\nexport const rootMetaReducers: MetaReducer[] = [persistStateReducer, clearStateReducer];\n\nexport function persistStateReducer(reducer: ActionReducer) {\n const storageKey: string = 'calsale';\n\n // console.log(`persist meta reduicer outer fn`);\n\n return (state: IRootState | undefined, action: Action) => {\n // console.group('metareducer');\n // console.log(`action: ${action.type}`)\n\n // on state initialization the state is undefined, we want to retrieve the state from local storage now\n if (state === undefined) {\n const persisted = sessionStorage.getItem(storageKey);\n // if we got something from local storage - return it, otherwise - use the reducer to instantiate the state\n return persisted ? JSON.parse(persisted) : reducer(state, action);\n }\n // on every action we call the \"normal\" reducer\n const newState = reducer(state, action);\n // update local storage with the new state\n sessionStorage.setItem(storageKey, JSON.stringify(newState));\n\n // console.groupEnd();\n\n return newState;\n };\n}\n\nexport function clearStateReducer(reducer: any) {\n return function (state: IRootState | undefined, action: Action) {\n if (action.type === ROOT_ACTIONS.reset) {\n state = undefined;\n }\n\n const nextState = reducer(state, action);\n\n return nextState;\n };\n}\n","import { createAction, props } from '@ngrx/store';\nimport { IFeatureConfig, IProcessProfile, IProfileParams } from '@partners/api';\nimport { IError } from '@partners/errors';\nimport { IFlatStage, IRoute, IStage } from '@partners/navigation';\nimport { TFeature } from '@partners/settings';\nimport { IShellViewState } from './shell.state';\n\nexport class ShellActions {\n static reset = createAction('[Shell] Reset State');\n\n static updateFeatureConfig = createAction(\n '[Shell] Update Feature Config',\n props<{ featureName: TFeature; featureConfig: IFeatureConfig }>()\n );\n\n static updateProfileParams = createAction(\n '[Shell] Update Profile Params',\n props<{ params: Partial }>()\n );\n\n static updateProcessProfile = createAction('[Shell] Update Profile', props<{ profile: IProcessProfile }>());\n\n static updateShellView = createAction('[Shell] Update Shell View', props<{ viewState: IShellViewState }>());\n\n static saveAppError = createAction('[Shell] Save Application Error', props<{ error: IError }>());\n\n static loadPolicy = createAction('[Shell] Load Policy');\n // static loadPolicySuccess = createAction('[Shell] Load Policy Success', props<{ policy: IPolicy }>());\n static loadPolicyFailure = createAction('[Shell] Load Policy Failure', props<{ error: any }>());\n\n static updateProgressValue = createAction('[Shell] Update Progress value', props<{ value: number }>());\n\n static updateAnonymousStage = createAction('[Shell] Update Anonymous Stage', props<{ stage: Partial }>());\n static createAnonymousStage = createAction('[Shell] Create Anonymous Stage', props<{ stages?: Partial[] }>());\n\n static updateStages = createAction('[Shell] Update Stages Collection', props<{ stages: IStage[] }>());\n static updateFlatStages = createAction(\n '[Shell] Update Flat Stages Collection',\n props<{ flatStages: IFlatStage[] }>()\n );\n\n static updateRouteNavigation = createAction(\n '[Shell] Update Navigation Route',\n props<{ previousRoute?: IRoute; currentRoute?: IRoute }>()\n );\n static updateStageNavigation = createAction(\n '[Shell] Update Navigation Stage',\n props<{ previousStage?: IStage; currentStage?: IStage; nextStage?: IStage }>()\n );\n}\n","import { Action, createReducer, on } from '@ngrx/store';\nimport { IFeatureConfig, IProfileParams } from '@partners/api';\nimport { ShellActions } from './shell.actions';\nimport { IShellState } from './shell.state';\n\nexport const initialShellState: IShellState = {\n errors: undefined,\n navigation: undefined,\n profile: undefined,\n uiState: {\n progressValue: 0,\n loaded: false,\n loading: false,\n isFooterFixed: false,\n isProgressHidden: true\n }\n};\n\nconst shellReducerFn = createReducer(\n initialShellState,\n on(ShellActions.reset, (state: IShellState, action) => {\n return {\n ...initialShellState\n };\n }),\n on(ShellActions.updateProfileParams, (state: IShellState, action): IShellState => {\n let { params } = action;\n\n params = {\n ...params,\n saleOfferCode: Number(params.saleOfferCode),\n salePointCode: Number(params.salePointCode),\n brandCode: Number(params.brandCode),\n lobCode: Number(params.lobCode),\n triggerCode: Number(params.triggerCode)\n } as Partial;\n\n return {\n ...state,\n ...{\n profile: { ...state.profile, ...{ params: { ...(params as IProfileParams) } } }\n }\n };\n }),\n on(ShellActions.updateShellView, (state: IShellState, action): IShellState => {\n const { viewState } = action;\n\n const uiState = { ...state.uiState, ...viewState };\n\n return {\n ...state,\n ...{ uiState }\n };\n }),\n on(ShellActions.updateFeatureConfig, (state: IShellState, action): IShellState => {\n const { featureName, featureConfig } = action;\n\n let { profile } = state;\n let { policy } = profile;\n let { config } = policy;\n let { modules } = config;\n\n let moduleIndex = modules.findIndex((m) => m.name === featureName);\n let moduleData: IFeatureConfig = modules.find((m) => m.name === featureName);\n\n if (!moduleData) {\n moduleData = featureConfig;\n }\n\n moduleData = {\n name: featureName,\n params: { ...moduleData?.params, ...featureConfig?.params },\n links: { ...moduleData?.links, ...featureConfig?.links },\n indication: { ...moduleData?.indication, ...featureConfig?.indication },\n text: { ...moduleData?.text, ...featureConfig?.text }\n };\n\n let cloned = modules.slice();\n\n if (moduleIndex < 0) {\n cloned.push(moduleData);\n } else cloned.splice(moduleIndex, 1, moduleData);\n\n config = { ...config, ...{ modules: [...cloned.slice()] } };\n policy = { ...policy, ...{ config: { ...config } } };\n profile = { ...profile, ...{ policy: { ...policy } } };\n\n return {\n ...state,\n ...{ profile: { ...profile } }\n };\n }),\n on(ShellActions.updateProgressValue, (state: IShellState, action): IShellState => {\n const { value } = action;\n\n const uiState = { ...state.uiState, progressValue: value };\n\n return {\n ...state,\n ...{ uiState }\n };\n }),\n on(ShellActions.updateStages, (state: IShellState, action): IShellState => {\n const { stages } = action;\n\n const navigationState = { ...state.navigation, stages: [...stages] };\n\n return {\n ...state,\n ...{ navigation: { ...navigationState } }\n };\n }),\n on(ShellActions.createAnonymousStage, (state: IShellState, action): IShellState => {\n const targetStages = action.stages;\n\n return {\n ...state,\n navigation: { ...state.navigation, ...{ anonymousStages: [...targetStages] } }\n };\n }),\n on(ShellActions.updateAnonymousStage, (state: IShellState, action): IShellState => {\n const targetStage = action.stage;\n\n const hasStage = state.navigation.anonymousStages.find(({ url }) => url === targetStage.url);\n\n let navigation = { ...state.navigation };\n\n if (!hasStage) {\n navigation = { ...navigation, ...{ anonymousStages: [...navigation.anonymousStages, targetStage] } };\n }\n\n return {\n ...state,\n navigation: { ...navigation }\n };\n }),\n on(ShellActions.updateFlatStages, (state: IShellState, action): IShellState => {\n const { flatStages } = action;\n\n const totalsState = flatStages.reduce(\n (acc, stage) => {\n if (stage.isComplete) {\n acc.completeCount++;\n }\n if (stage.isPristine) {\n acc.pristineCount++;\n }\n return acc;\n },\n { completeCount: 0, pristineCount: 0 }\n );\n\n const navigationState = {\n ...state.navigation,\n flatStages: [...flatStages],\n totalComplete: totalsState.completeCount,\n totalPristine: totalsState.pristineCount\n };\n return {\n ...state,\n ...{ navigation: { ...navigationState } }\n };\n }),\n on(ShellActions.updateRouteNavigation, (state: IShellState, action): IShellState => {\n const { previousRoute, currentRoute } = action;\n\n const navigationState = {\n ...state.navigation,\n ...{\n previousRoute: { ...previousRoute },\n currentRoute: { ...currentRoute }\n }\n };\n return {\n ...state,\n ...{ navigation: { ...navigationState } }\n };\n }),\n on(ShellActions.updateStageNavigation, (state: IShellState, action): IShellState => {\n const { previousStage, currentStage, nextStage } = action;\n\n const navigationState = {\n ...state.navigation,\n ...{\n previousStage: { ...previousStage },\n currentStage: { ...currentStage },\n nextStage: { ...nextStage }\n }\n };\n\n return {\n ...state,\n ...{ navigation: { ...navigationState } }\n };\n }),\n on(ShellActions.updateProcessProfile, (state: IShellState, action) => {\n const { profile } = action;\n let currentProfile = { ...state.profile, processId: profile.processId };\n\n profile?.params && Object.assign(currentProfile, { ...{ params: { ...profile.params } } });\n profile?.partner && Object.assign(currentProfile, { ...{ partner: { ...profile.partner } } });\n profile?.policy && Object.assign(currentProfile, { ...{ policy: { ...profile.policy } } });\n\n return {\n ...state,\n ...{\n profile: { ...currentProfile }\n }\n };\n }),\n on(ShellActions.saveAppError, (state: IShellState, action) => {\n const { error } = action;\n const { token } = error;\n\n const errorsState = { ...state.errors };\n\n errorsState[token] = error;\n\n return {\n ...state,\n ...{ errors: { ...errorsState } }\n };\n })\n);\n\nexport function shellReducer(state: IShellState | undefined, action: Action) {\n return shellReducerFn(state, action);\n}\n","import { createSelector } from '@ngrx/store';\nimport {\n IBusinessPartner,\n IFeatureConfig,\n IGlobalConfig,\n ILoanProfile,\n IPolicy,\n IPolicyConfig,\n IProcessProfile,\n IProfileParams\n} from '@partners/api';\nimport { TCatalogOption } from '@partners/catalog';\nimport { IFlatStage, IRoute, IStage } from '@partners/navigation';\nimport { TProcessMode } from '@partners/types';\nimport { IRootState } from '../../root';\nimport { IErrorsState, INavigationState, IShellState, IShellUiState } from './shell.state';\n\nexport class ShellSelectors {\n static readonly shellState = (state: IRootState): IShellState => {\n return state.shell as IShellState;\n };\n\n /**\n * application-level ui\n */\n static readonly uiState = createSelector(ShellSelectors.shellState, (appState: IShellState) => {\n return appState?.uiState as IShellUiState;\n });\n\n /**\n * application-level mode\n */\n static readonly errors = createSelector(ShellSelectors.shellState, (appState: IShellState) => {\n return appState?.errors as IErrorsState;\n });\n\n /**\n * profile selectors\n */\n static readonly profile = createSelector(ShellSelectors.shellState, (appState: IShellState) => {\n return appState?.profile as IProcessProfile;\n });\n\n // static readonly process = createSelector(ShellSelectors.profile, (profileState: IProcessProfile) => {\n // return profileState?.processId as TProcessId;\n // });\n\n static readonly mode = createSelector(ShellSelectors.profile, (profileState: IProcessProfile) => {\n return profileState?.mode as TProcessMode;\n });\n\n static readonly params = createSelector(ShellSelectors.profile, (profileState: IProcessProfile) => {\n return profileState?.params as IProfileParams;\n });\n\n static readonly process = createSelector(ShellSelectors.params, (profileParams: IProfileParams) => {\n return profileParams.lobCode;\n });\n\n static readonly policy = createSelector(ShellSelectors.profile, (profileState: IProcessProfile) => {\n return profileState?.policy as IPolicy;\n });\n static readonly token = createSelector(ShellSelectors.params, (params: IProfileParams) => {\n return params?.token;\n });\n\n static readonly config = createSelector(ShellSelectors.policy, (policy: IPolicy) => {\n return policy?.config as IPolicyConfig;\n });\n\n static readonly loanReasons = createSelector(ShellSelectors.policy, (policy: IPolicy) => {\n return policy?.loanReasons as TCatalogOption[];\n });\n\n static readonly loanProfiles = createSelector(ShellSelectors.policy, (policy: IPolicy) => {\n return policy?.loanProfiles as ILoanProfile[];\n });\n\n static readonly globalConfig = createSelector(ShellSelectors.config, (config: IPolicyConfig) => {\n return config?.global as IGlobalConfig;\n });\n\n static readonly featuresConfig = createSelector(ShellSelectors.config, (config: IPolicyConfig) => {\n return config?.modules as IFeatureConfig[];\n });\n\n static readonly businessPartner = createSelector(ShellSelectors.policy, (policy: IPolicy) => {\n return policy?.businessPartner as IBusinessPartner;\n });\n\n /**\n * navigation selectors\n */\n static readonly navigation = createSelector(ShellSelectors.shellState, (appState: IShellState) => {\n return appState?.navigation as INavigationState;\n });\n\n static readonly stages = createSelector(ShellSelectors.navigation, (navState: INavigationState) => {\n return navState?.stages as IStage[];\n });\n\n static readonly flatStages = createSelector(ShellSelectors.navigation, (navState: INavigationState) => {\n return navState?.flatStages as IFlatStage[];\n });\n\n static readonly previousStage = createSelector(ShellSelectors.navigation, (navState: INavigationState) => {\n return navState?.previousStage as IStage;\n });\n\n static readonly currentStage = createSelector(ShellSelectors.navigation, (navState: INavigationState) => {\n return navState?.currentStage as IStage;\n });\n\n static readonly nextStage = createSelector(ShellSelectors.navigation, (navState: INavigationState) => {\n return navState?.nextStage as IStage;\n });\n\n static readonly anonymousStages = createSelector(ShellSelectors.navigation, (navState: INavigationState) => {\n return navState?.anonymousStages as Partial[];\n });\n\n static readonly previousRoute = createSelector(ShellSelectors.navigation, (navState: INavigationState) => {\n return navState?.previousRoute as IRoute;\n });\n\n static readonly currentRoute = createSelector(ShellSelectors.navigation, (navState: INavigationState) => {\n return navState?.currentRoute as IRoute;\n });\n\n static readonly nextRoute = createSelector(ShellSelectors.navigation, (navState: INavigationState) => {\n return navState?.nextRoute as IRoute;\n });\n\n static readonly totalPristineStages = createSelector(ShellSelectors.navigation, (navState: INavigationState) => {\n return navState?.totalPristine as number;\n });\n\n static readonly totalCompleteStages = createSelector(ShellSelectors.navigation, (navState: INavigationState) => {\n return navState?.totalComplete as number;\n });\n}\n","import { Action, ActionReducerMap, createReducer, on } from '@ngrx/store';\nimport {\n accountReducer,\n addressReducer,\n amountReducer,\n authLoginReducer,\n authOtpReducer,\n beneficiariesReducer,\n cardReducer,\n channelsReducer,\n contactReducer,\n countryReducer,\n creditAgreementReducer,\n debitsReducer,\n deliveryReducer,\n demographyReducer,\n disclosureReducer,\n employmentReducer,\n expenseReducer,\n identityReducer,\n incomeReducer,\n introductionReducer,\n maritalReducer,\n offerReducer,\n onlineUseReducer,\n personaReducer,\n privacyReducer,\n proposalReducer,\n purposeReducer,\n refusedReducer,\n scanDocumentReducer,\n signatureReducer,\n simulatorReducer,\n summaryReducer,\n utmReducer\n} from '../../features-stores';\nimport { classifyReducer } from '../../features-stores/classify';\nimport { customerReducer } from '../../features-stores/customer';\nimport { leadReducer } from '../../features-stores/lead';\nimport { shellReducer } from '../../shell/store';\nimport { RootActions } from './root.actions';\nimport { IRootState } from './root.state';\n\nexport const initialRootState: IRootState = {\n shell: undefined,\n otp: undefined,\n login: undefined,\n introduction: undefined,\n identity: undefined,\n customer: undefined,\n classify: undefined,\n offer: undefined,\n contact: undefined,\n card: undefined,\n beneficiaries: undefined,\n privacy: undefined,\n address: undefined,\n amount: undefined,\n proposal: undefined,\n debits: undefined,\n persona: undefined,\n employment: undefined,\n purpose: undefined,\n expense: undefined,\n income: undefined,\n country: undefined,\n account: undefined,\n simulator: undefined,\n signature: undefined,\n disclosure: undefined,\n summary: undefined,\n marital: undefined,\n scanDocument: undefined,\n onlineUse: undefined,\n delivery: undefined,\n channels: undefined,\n creditAgreement: undefined,\n refused: undefined,\n lead: undefined,\n demography: undefined,\n utm: undefined,\n root: undefined\n};\n\n// export const rootReducerFn = createReducer(initialRootState);\nconst rootReducerFn = createReducer(\n initialRootState,\n on(RootActions.reset, (state: IRootState, action) => {\n return {\n ...initialRootState\n };\n })\n);\n\nexport function rootReducer(state: IRootState | undefined, action: Action) {\n return rootReducerFn(state, action);\n}\n\nexport const rootReducers: ActionReducerMap = {\n shell: shellReducer,\n introduction: introductionReducer,\n otp: authOtpReducer,\n login: authLoginReducer,\n contact: contactReducer,\n amount: amountReducer,\n card: cardReducer,\n beneficiaries: beneficiariesReducer,\n privacy: privacyReducer,\n address: addressReducer,\n proposal: proposalReducer,\n persona: personaReducer,\n employment: employmentReducer,\n debits: debitsReducer,\n purpose: purposeReducer,\n identity: identityReducer,\n customer: customerReducer,\n classify: classifyReducer,\n offer: offerReducer,\n expense: expenseReducer,\n income: incomeReducer,\n country: countryReducer,\n account: accountReducer,\n simulator: simulatorReducer,\n signature: signatureReducer,\n disclosure: disclosureReducer,\n summary: summaryReducer,\n marital: maritalReducer,\n scanDocument: scanDocumentReducer,\n onlineUse: onlineUseReducer,\n delivery: deliveryReducer,\n channels: channelsReducer,\n creditAgreement: creditAgreementReducer,\n refused: refusedReducer,\n lead: leadReducer,\n demography: demographyReducer,\n utm: utmReducer,\n root: rootReducer\n};\n","import { Injectable, inject } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { TFeature } from '@partners/settings';\nimport { Observable } from 'rxjs';\nimport { IRootState, RootActions } from '../store';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RootStore {\n private _store = inject(Store);\n\n constructor() {}\n\n dispatchResetState() {\n this._store.dispatch(RootActions.reset());\n }\n\n selectDomain$(domain: TFeature): Observable {\n // createFeatureSelector(domain);\n return this._store.select(domain);\n }\n}\n","import { computed, Injectable, Signal } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport {\n getProcessId,\n IBusinessPartner,\n IFeatureConfig,\n IGlobalConfig,\n ILoanProfile,\n IPartner,\n IPolicy,\n IProcessProfile,\n IProfileParams,\n Process\n} from '@partners/api';\nimport { TCatalogOption } from '@partners/catalog';\nimport { IError } from '@partners/errors';\nimport { IFlatStage, IRoute, IStage } from '@partners/navigation';\nimport { IViewSettings, TFeature } from '@partners/settings';\nimport { TProcessId, TProcessMode } from '@partners/types';\nimport { Guid, isNotEmpty } from '@partners/utils';\nimport { combineLatest, filter, map, Observable } from 'rxjs';\nimport { StateAccessService } from '../../services';\nimport {\n IErrorsState,\n INavigationState,\n IShellState,\n IShellUiState,\n IShellViewState,\n ShellActions,\n ShellSelectors\n} from '../store';\n\n/**\n * @description\n *\n * this service serves as the base class for handling a feature's business logic, currently\n * it has two main functionalities:\n * 1. provide access to the feature's state data (see featureState() method)\n * 2. provide common http apis (load | submit)\n *\n */\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ShellStore extends StateAccessService {\n readonly processId$$: Signal;\n readonly processMode$$: Signal;\n readonly profile$$: Signal;\n readonly token$$: Signal;\n readonly progress$$: Signal;\n readonly viewSettings$$: Signal;\n\n readonly navigation$: Observable;\n readonly state$: Observable;\n readonly errors$: Observable;\n readonly errors$$: Signal;\n\n readonly uiState$: Observable;\n\n readonly params$: Observable;\n readonly params$$: Signal;\n readonly partner$: Observable;\n readonly policy$: Observable;\n readonly policy$$: Signal;\n readonly hasPolicy$$: Signal;\n\n readonly loanReasons$$: Signal;\n readonly loanProfiles$$: Signal;\n readonly defaultLoanProfile$$: Signal;\n\n readonly businessPartner$$: Signal;\n\n readonly globalConfig$$: Signal;\n readonly featuresConfig$$: Signal;\n\n readonly stages$: Observable;\n\n readonly flatStages$: Observable;\n readonly anonymousStages$: Observable[]>;\n readonly previousStage$: Observable;\n readonly currentStage$: Observable;\n readonly nextStage$$: Signal;\n\n readonly previousRoute$: Observable;\n readonly currentRoute$: Observable;\n readonly nextRoute$: Observable;\n\n readonly routeState$: Observable<{ previousRoute: IRoute; currentRoute: IRoute }>;\n\n readonly totalStages$$: Signal;\n readonly totalCompleteStages$$: Signal;\n readonly totalPristineStages$$: Signal;\n\n readonly matchCard$$: Signal;\n readonly matchAcfl$$: Signal;\n readonly matchBnpl$$: Signal;\n readonly matchLoan$$: Signal;\n\n constructor() {\n super();\n\n this.state$ = this.stateFacade.select$(ShellSelectors.shellState);\n this.navigation$ = this.stateFacade.select$(ShellSelectors.navigation);\n this.errors$ = this.stateFacade.select$(ShellSelectors.errors);\n this.errors$$ = this.stateFacade.selectSignal$(ShellSelectors.errors);\n\n this.params$ = this.stateFacade.select$(ShellSelectors.params);\n this.partner$ = this.stateFacade.select$(ShellSelectors.profile).pipe(map(({ partner }) => partner));\n this.policy$ = this.stateFacade.select$(ShellSelectors.policy);\n\n this.businessPartner$$ = this.stateFacade.selectSignal$(ShellSelectors.businessPartner);\n\n this.uiState$ = this.stateFacade.select$(ShellSelectors.uiState);\n\n this.stages$ = this.stateFacade.select$(ShellSelectors.stages);\n\n this.flatStages$ = this.stateFacade.select$(ShellSelectors.flatStages);\n this.previousStage$ = this.stateFacade.select$(ShellSelectors.previousStage);\n this.currentStage$ = this.stateFacade.select$(ShellSelectors.currentStage);\n this.nextStage$$ = this.stateFacade.selectSignal$(ShellSelectors.nextStage);\n this.anonymousStages$ = this.stateFacade.select$(ShellSelectors.anonymousStages);\n\n this.previousRoute$ = this.stateFacade.select$(ShellSelectors.previousRoute);\n this.currentRoute$ = this.stateFacade.select$(ShellSelectors.currentRoute);\n this.nextRoute$ = this.stateFacade.select$(ShellSelectors.nextRoute);\n\n this.routeState$ = combineLatest([this.previousRoute$, this.currentRoute$]).pipe(\n map(([previousRoute, currentRoute]) => ({ previousRoute, currentRoute }))\n );\n\n this.totalCompleteStages$$ = this.stateFacade.selectSignal$(ShellSelectors.totalCompleteStages);\n this.totalPristineStages$$ = this.stateFacade.selectSignal$(ShellSelectors.totalPristineStages);\n this.totalStages$$ = computed(() => {\n return this.totalCompleteStages$$() + this.totalPristineStages$$();\n });\n this.params$$ = this.stateFacade.selectSignal$(ShellSelectors.params);\n this.token$$ = this.stateFacade.selectSignal$(ShellSelectors.token);\n this.profile$$ = this.stateFacade.selectSignal$(ShellSelectors.profile);\n this.processMode$$ = this.stateFacade.selectSignal$(ShellSelectors.mode);\n this.policy$$ = this.stateFacade.selectSignal$(ShellSelectors.policy);\n this.hasPolicy$$ = computed(() => {\n const policy = this.policy$$();\n return isNotEmpty(policy);\n // return isNotEmpty(policy?.opportunityId) && policy?.opportunityId != 0;\n });\n\n this.loanReasons$$ = this.stateFacade.selectSignal$(ShellSelectors.loanReasons);\n this.loanProfiles$$ = this.stateFacade.selectSignal$(ShellSelectors.loanProfiles);\n\n this.matchCard$$ = computed(() => this.matchProcess(Process.card));\n /** match Account Frame Loan (הלוואה ממסגרת החשבון === הלוואה ללא כרטיס) */\n this.matchAcfl$$ = computed(() => this.matchProcess(Process.acfl));\n /** match any By Now Pay Later loan */\n this.matchBnpl$$ = computed(() => this.matchProcess(Process.bnpl));\n /** match any loan */\n this.matchLoan$$ = computed(() => this.matchAcfl$$() || this.matchBnpl$$());\n\n this.defaultLoanProfile$$ = computed(() => {\n const profiles = this.loanProfiles$$();\n\n if (profiles?.length) {\n return profiles[0];\n }\n return undefined;\n });\n\n this.globalConfig$$ = toSignal(this.stateFacade.select$(ShellSelectors.globalConfig));\n this.featuresConfig$$ = toSignal(this.stateFacade.select$(ShellSelectors.featuresConfig));\n\n this.progress$$ = toSignal(\n this.stateFacade.select$(ShellSelectors.uiState).pipe(map(({ progressValue }) => progressValue))\n );\n\n this.viewSettings$$ = toSignal(\n this.stateFacade.select$(ShellSelectors.uiState).pipe(\n filter((uiState) => !!uiState),\n map(({ isFooterFixed, isProgressHidden, isProgressRendered, headerCloseAction }) => ({\n isFooterFixed,\n isProgressHidden,\n headerCloseAction,\n isProgressRendered\n }))\n )\n );\n\n this.processId$$ = computed(() => {\n const processCode = this.stateFacade.selectSignal$(ShellSelectors.process);\n return getProcessId(processCode());\n });\n }\n\n selectError$(token: Guid): Observable {\n return this.errors$.pipe(\n map((errorDictionary) => {\n if (!errorDictionary) {\n return undefined;\n }\n const errorByToken = errorDictionary[token];\n return errorByToken;\n })\n );\n }\n\n findFeatureConfig$$(featureName: TFeature): Signal {\n return computed(() => {\n const configArray = this.featuresConfig$$();\n return configArray?.find((m) => m.name === featureName);\n });\n }\n\n dispatchUpdateProfileParams(params: Partial) {\n this.stateFacade.dispatch(ShellActions.updateProfileParams({ params }));\n }\n\n dispatchShellReset() {\n this.stateFacade.dispatch(ShellActions.reset());\n }\n\n dispatchUpdateFeatureConfig(featureName: TFeature, featureConfig: IFeatureConfig) {\n this.stateFacade.dispatch(ShellActions.updateFeatureConfig({ featureName, featureConfig }));\n }\n\n dispatchSaveError(error: IError) {\n this.stateFacade.dispatch(ShellActions.saveAppError({ error }));\n }\n\n dispatchUpdateProcessProfile(profile: IProcessProfile) {\n this.stateFacade.dispatch(ShellActions.updateProcessProfile({ profile }));\n }\n\n dispatchUpdateShellView(viewState: IShellViewState) {\n this.stateFacade.dispatch(ShellActions.updateShellView({ viewState }));\n }\n\n dispatchLoadPolicy() {\n this.stateFacade.dispatch(ShellActions.loadPolicy());\n }\n\n dispatchLoadPolicyFailure(error: any) {\n this.stateFacade.dispatch(ShellActions.loadPolicyFailure({ error }));\n }\n\n dispatchUpdateStages(stages: IStage[]) {\n this.stateFacade.dispatch(ShellActions.updateStages({ stages }));\n }\n\n dispatchUpdateAnonymousStages(stage: Partial) {\n this.stateFacade.dispatch(ShellActions.updateAnonymousStage({ stage }));\n }\n\n dispatchCreateAnonymousStages(stages: Partial[]) {\n this.stateFacade.dispatch(ShellActions.createAnonymousStage({ stages }));\n }\n\n dispatchUpdateFlatStages(stages: IFlatStage[]) {\n this.stateFacade.dispatch(ShellActions.updateFlatStages({ flatStages: stages }));\n }\n dispatchUpdateRouteNavigation(previousRoute?: IRoute, currentRoute?: IRoute) {\n this.stateFacade.dispatch(ShellActions.updateRouteNavigation({ previousRoute, currentRoute }));\n }\n dispatchUpdateStageNavigation(previousStage?: IStage, currentStage?: IStage, nextStage?: IStage) {\n this.stateFacade.dispatch(ShellActions.updateStageNavigation({ previousStage, currentStage, nextStage }));\n }\n\n private matchProcess = (processQuery: number): boolean => {\n // const processId = this._shellStore.processId$$();\n // return processId === processQuery;\n const profile = this.profile$$();\n return Number(profile?.params.lobCode) === processQuery;\n };\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect } from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ShellEffects {\n dispatchLoadPolicySuccess$: Observable = createEffect(\n (): any =>\n this.actions$.pipe(\n // ofType(ShellActions.loadPolicySuccess),\n // tap(({ policy }) => {\n // // this._shellStore.dispatchUpdateStages(policy.stages);\n // })\n ),\n { dispatch: false }\n );\n\n // private _shellStore = inject(ShellStore);\n\n constructor(private actions$: Actions) {}\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { ShellEffects } from './store/shell.effects';\nimport { shellReducer } from './store/shell.reducers';\n\n@NgModule({\n imports: [StoreModule.forFeature(`shell`, shellReducer), EffectsModule.forFeature([ShellEffects])]\n})\nexport class ShellStateModule {}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { ApiModule } from '@partners/api';\n\nimport { rootMetaReducers, rootReducers } from './root';\n@NgModule({\n imports: [\n ApiModule,\n EffectsModule.forRoot([]),\n StoreModule.forRoot(rootReducers, {\n metaReducers: rootMetaReducers,\n runtimeChecks: {\n strictStateImmutability: true,\n strictActionImmutability: true\n }\n })\n ]\n})\nexport class StateModule {}\n","import { APP_BASE_HREF, PlatformLocation } from '@angular/common';\nimport { ModuleWithProviders, NgModule, Provider } from '@angular/core';\n\n@NgModule({\n imports: []\n})\nexport class ThemesModule {\n static forRoot(themeConfigProvider: Provider): ModuleWithProviders {\n return {\n ngModule: ThemesModule,\n providers: [\n themeConfigProvider,\n {\n provide: APP_BASE_HREF,\n useFactory: (platform: PlatformLocation) => { \n const baseHref = platform.getBaseHrefFromDOM();\n return baseHref;\n },\n deps: [PlatformLocation]\n }\n ]\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { IThemeConfig } from './theme.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport abstract class ThemeConfig implements IThemeConfig {\n abstract readonly themeRoot: string;\n abstract readonly themeSource: string;\n abstract readonly themeFileId: string;\n abstract readonly themeName: string;\n abstract readonly themeSuffix: string;\n abstract readonly themeIconSet: string;\n\n constructor() {}\n}\n","import { HttpContextToken } from '@angular/common/http';\nimport { InjectionToken } from '@angular/core';\nimport { ThemeConfig } from '../model';\n\nexport const THEMES_CONFIG = new InjectionToken('THEMES_CONFIG');\n\nexport const THEME_CONTEXT = new HttpContextToken<{ loader: { toggle: boolean } } | undefined>(() => undefined);\n","import { DOCUMENT } from '@angular/common';\nimport { Injectable, inject, signal } from '@angular/core';\nimport { Observable, from, lastValueFrom } from 'rxjs';\nimport { IThemeConfig, ThemeConfig } from '../model';\nimport { THEMES_CONFIG } from '../tokens';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ThemeService {\n readonly theme = signal(undefined);\n\n readonly #document = inject(DOCUMENT);\n // readonly #rootEl = this.#document.documentElement;\n readonly #config: ThemeConfig = inject(THEMES_CONFIG);\n // readonly #renderer = inject(RendererFactory2).createRenderer(null, null);\n\n get rootElement(): HTMLElement {\n return this.#document.querySelector('body');\n }\n\n constructor() {}\n\n /**\n * select theme and pull in its css\n */\n loadTheme(themeName: string): Promise {\n return lastValueFrom(this.loadThemeFile(themeName));\n }\n\n private getFullThemeName(themeConfig: IThemeConfig) {\n const { themeName, themeSuffix } = themeConfig;\n\n if (themeSuffix) {\n return `${themeName}-${themeSuffix}`;\n }\n\n return `${themeName}`;\n }\n\n private loadThemeFile(fileName: string): Observable {\n const themeConfig = this.extendTheme(fileName);\n const themeName = this.getFullThemeName(themeConfig);\n\n const themePromise = new Promise((resolve) => {\n this.createDomHeadEl(themeConfig, themeName);\n\n this.replaceThemeClass(themeName);\n\n this.theme.set(themeConfig);\n\n resolve(true);\n });\n return from(themePromise);\n }\n\n private createDomHeadEl(themeConfig: IThemeConfig, fullThemeName: string) {\n const themeLink = this.#document.getElementById(themeConfig.themeFileId) as HTMLLinkElement;\n if (themeLink) {\n themeLink.href = `${fullThemeName}.css`;\n } else {\n const head = this.#document.getElementsByTagName('head')[0];\n const style = this.#document.createElement('link');\n style.id = themeConfig.themeFileId;\n style.rel = 'stylesheet';\n style.href = `${fullThemeName}.css`;\n\n head.appendChild(style);\n }\n }\n\n private extendTheme(name: string): IThemeConfig {\n const { themeName, themeFileId, themeSuffix, themeRoot, themeSource } = this.#config;\n return Object.assign({}, { themeName, themeFileId, themeSuffix, themeRoot, themeSource }, { themeName: name });\n }\n\n private replaceThemeClass(themeName: string) {\n const themeClass = `${themeName}`;\n const classList: DOMTokenList = this.rootElement.classList;\n\n const themeClassesToRemove = Array.from(classList).filter((item: string) => themeName /*item.includes('-theme')*/);\n if (themeClassesToRemove.length) {\n classList.remove(...themeClassesToRemove);\n }\n classList.add(themeClass);\n }\n}\n","import { animate, style, transition, trigger } from '@angular/animations';\nimport { HttpClient, HttpContext } from '@angular/common/http';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n OnInit,\n ViewEncapsulation,\n computed,\n inject,\n input,\n signal\n} from '@angular/core';\nimport { SanitizePipe, isDefined, takeOnce } from '@partners/utils';\nimport { tap } from 'rxjs';\nimport {\n TAssetFileExt,\n TAssetFlow,\n TAssetSize,\n TAssetSizeExpression,\n TAssetType,\n TIconSet\n} from '../../model/theme.types';\nimport { ThemeService } from '../../services';\nimport { THEMES_CONFIG, THEME_CONTEXT } from '../../tokens';\n\n@Component({\n standalone: true,\n selector: 'theme-asset',\n template: `\n @if(loadViaHttp()) { @defer (when assetContent$$()) {\n \n } } @else {\n \n }\n `,\n imports: [SanitizePipe],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'theme-asset'\n },\n animations: [\n trigger('toggleIcon', [\n transition(':enter', [style({ opacity: 0 }), animate('250ms', style({ opacity: 1 }))]),\n transition(':leave', [style({ opacity: 1 }), animate('250ms', style({ opacity: 0 }))])\n ])\n ]\n})\nexport class ThemeAssetComponent implements OnInit /*, OnDestroy */ {\n /**\n * use this option to pass in a relative asset path => asset name only: ('cal-logo | cal-logo.svg')\n * */\n asset = input();\n\n /**\n * use this option to pass in an absolute asset path => path starting at root folder name up to file\n * extension ('./assets/cal-logo.svg')\n * */\n exactPath = input();\n\n /** filesystem partition (folder) of the asset ('/img/' | '/svg/' ets') */\n partition = input('img');\n\n extension = input('svg');\n\n size = input('auto');\n\n iconSet = input(undefined);\n\n /**\n * source property tells us which assets folder the current asset should be pulled for display\n * when dynamically building the path. there are 2 options:\n * (1) theme - default option, pulls assets from the current theme's assets library.\n * (2) partner - pulls assets from the partner's assets library.\n * normally - the two values are the same, the theme name is in fact the partner's name, however,\n * in some cases they may differ and when they do - we still need to maintain the ability to pull\n * specific assets from the PARTNER assets library and not from theme examples: partner's logo will\n * almost always be pulled from partners folder\n **/\n source = input<'partner' | 'theme'>('theme');\n\n /** limit the maximum width of the asset, otherwise it takes the width of its container */\n maxWidth = input();\n\n /** when true - asset is loaded via http/get request and injected into the dom as raw element ((false);\n\n flow = input('inline-flex');\n\n @HostBinding('class')\n get responsiveSize() {\n return this.size() !== 'auto' ? this.size() : null;\n }\n\n @HostBinding('style.width')\n get autoSize() {\n return this.size() === 'auto' ? '100%' : this.size();\n }\n\n @HostBinding('style.maxWidth')\n get maxWidthValue() {\n const maxWidth = computed(() => `${this.maxWidth()}`);\n return maxWidth() ?? null;\n }\n\n get themeRoot(): string {\n return this.#themeConfig.themeRoot;\n }\n\n get themeIcons(): string {\n return this.#themeConfig.themeIconSet;\n }\n\n assetContent$$ = signal('');\n\n #httpService = inject(HttpClient);\n #themeService = inject(ThemeService);\n #themeConfig = inject(THEMES_CONFIG);\n\n path = computed(() => {\n const { themeName, themeSource } = this.#themeService.theme();\n\n if (this.exactPath()) {\n return `${this.exactPath()}`;\n } else {\n const source = this.source() === 'partner' ? themeSource : themeName;\n const iconSet = this.iconSet();\n if (isDefined(iconSet) && iconSet !== 'custom') {\n return `${this.themeRoot}/${this.themeIcons}/${this.iconSet()}/${this.asset()}.${this.extension()}`;\n }\n\n return `${this.themeRoot}/${source}/${this.partition()}/${this.asset()}.${this.extension()}`;\n }\n });\n\n constructor() {}\n\n ngOnInit(): void {\n const useHttp = this.loadViaHttp();\n if (!useHttp) {\n return;\n }\n this.#loadDynamically();\n }\n\n #loadDynamically() {\n const assetPath = this.path();\n\n // console.log(`load asset via http: \"${assetPath}\"`);\n\n this.#httpService\n .get(`${assetPath}`, {\n context: new HttpContext().set(THEME_CONTEXT, { loader: { toggle: false } }),\n responseType: 'text'\n })\n .pipe(\n takeOnce(),\n tap((response) => {\n this.assetContent$$.set(response as string);\n })\n )\n .subscribe();\n }\n}\n","import { animate, group, query, style, transition, trigger } from '@angular/animations';\n\n// Fade Animation\nexport const TOGGLE_CHECK_ANIMATION = trigger('toggleCheckAnimation', [\n transition('* => *', [\n group([\n query(\n ':leave',\n [\n style({ opacity: 1, transform: 'scale(1) rotate(0deg)' }),\n animate('600ms', style({ transform: 'scale(.4) rotate(270deg)', opacity: 0 }))\n ],\n { optional: true }\n ),\n query(\n ':enter',\n [\n style({ opacity: 0, transform: 'scale(.4) rotate(-180deg)' }),\n animate('450ms', style({ transform: 'scale(1) rotate(0deg)', opacity: 1 }))\n ],\n { optional: true }\n )\n ])\n ])\n]);\n","import { animate, style, transition, trigger } from '@angular/animations';\n\n// Fade Animation\nexport const DIALOG_ANIMATION = trigger('dialog', [\n transition('* => open', [\n style({ opacity: 0, transform: 'translateY(50vh) scale(.7)' }),\n animate('950ms cubic-bezier(0,.74,0,1)', style({ opacity: 1, transform: 'translateY(0) scale(1)' }))\n ]),\n transition('* => close', [\n style({ opacity: 1, transform: 'translateY(0%) scale(1)' }),\n animate('450ms cubic-bezier(.54,.76,.51,1.03)', style({ opacity: 0, transform: 'translateY(10%) scale(.7)' }))\n ])\n]);\n","import { animate, style, transition, trigger } from '@angular/animations';\n\nexport const FADE_IN_OUT_ANIMATION = trigger('fadeInOut', [\n transition(':enter', [style({ opacity: 0 }), animate('250ms', style({ opacity: 1 }))]),\n transition(':leave', [style({ opacity: 1 }), animate('250ms', style({ opacity: 0 }))])\n]);\n\nexport const SLIDE_UP_DOWN_ANIMATION = trigger('slideUpDown', [\n transition(':enter', [\n style({ opacity: 0, transform: 'translateY(20px)' }),\n animate('250ms', style({ opacity: 1, transform: 'translateY(0)' }))\n ]),\n transition(':leave', [style({ opacity: 1 }), animate('250ms', style({ opacity: 0, transform: 'translateY(20px)' }))])\n]);\n\nexport const SLIDE_LEFT_RIGHT_ANIMATION = trigger('slideLeftRight', [\n transition(':enter', [\n style({ opacity: 0, transform: 'translateX(-25%)' }),\n animate('250ms', style({ opacity: 1, transform: 'translateX(0)' }))\n ]),\n transition(':leave', [style({ opacity: 1 }), animate('250ms', style({ opacity: 0, transform: 'translateX(25%)' }))])\n]);\n\nexport const SLIDE_LEFT_ANIMATION = trigger('slideLeft', [\n transition(':enter', [\n style({ opacity: 0, transform: 'translateX(-75%)' }),\n animate('350ms cubic-bezier(.54,.76,.51,1.03)', style({ opacity: 1, transform: 'translateX(0)' }))\n ]),\n transition(':leave', [\n style({ opacity: 1 }),\n animate('350ms cubic-bezier(.54,.76,.51,1.03)', style({ opacity: 0, transform: 'translateX(-75%)' }))\n ])\n]);\n","import { animate, style, transition, trigger } from '@angular/animations';\n\nexport const FIELD_ERROR_ANIMATION = [\n trigger('fieldError', [\n transition(':enter', [\n style({ transform: 'translateY(-75%)', opacity: '0' }),\n animate('.6s cubic-bezier(0.55, 0.31, 0.15, 0.93)', style({ transform: 'translateY(0%)', opacity: '1' }))\n ]),\n transition(':leave', [\n animate('0.3s cubic-bezier(0.55, 0.31, 0.15, 0.93)', style({ transform: 'translateY(50%)', opacity: '0' }))\n ])\n ])\n];\n","import { animate, group, query, style, transition, trigger } from '@angular/animations';\nconst RESET_ROUTE_ANIMATION = [\n style({ position: 'relative' }),\n query(\n ':enter, :leave',\n [\n style({\n position: 'absolute', // using absolute makes the scroll get stuck in the previous page's scroll position on the new page\n top: 0, // adjust this if you have a header so it factors in the height and not cause the router outlet to jump as it animates\n left: 0,\n width: '100%',\n height: '100%'\n })\n ],\n { optional: true }\n )\n];\n\n// Fade Animation\nexport const ROUTE_ANIMATION = trigger('routeAnimation', [\n transition('* => *', [\n ...RESET_ROUTE_ANIMATION,\n group([\n query(\n ':leave',\n [\n style({ opacity: 1, transform: 'translateX(0)', transformOrigin: 'left center' }),\n animate('.250s', style({ opacity: 0, transform: 'translateX(-5%)' }))\n ],\n {\n optional: true\n }\n ),\n query(\n ':enter',\n [\n style({ opacity: 0, transform: 'translateX(-25%)', transformOrigin: 'right center' }),\n animate('.45s', style({ opacity: 1, transform: 'translateX(0)' }))\n ],\n {\n optional: true\n }\n )\n ])\n ])\n]);\n","import { animate, state, style, transition, trigger } from '@angular/animations';\n\nexport const FLIP_ANIMATION = trigger('rotateAnimation', [\n state('void', style({ transform: 'rotate(0deg)' })),\n state('rotate', style({ transform: 'rotate({{rotate}}deg)' })),\n transition('void => rotate', animate('500ms cubic-bezier(0,.74,0,1)'))\n]);\n\n// trigger('scaleInOut', [\n// state('scaleIn', style({ transform: 'scale(1)' })),\n// state('scaleOut', style({ transform: 'scale(0)' })),\n// transition('scaleIn => scaleOut', animate('1s ease-in')),\n// transition('scaleOut => scaleIn', animate('1s ease-out'))\n// ]);\n","import { style, animate, trigger } from '@angular/animations';\n\nconst ShakeAnimation = [\n style({ transform: 'rotate(0)' }),\n animate('0.4s', style({ transform: 'translateX(16px)' })),\n animate('0.6s', style({ transform: 'translateX(16px)' })),\n animate('0.3s', style({ transform: 'translateX(8px)' })),\n animate('0.3s', style({ transform: 'translateX(8px)' })),\n animate('0.2s', style({ transform: 'translateX(3px)' })),\n animate('0.1s', style({ transform: 'translateX(0)' }))\n];\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n standalone: true,\n selector: '[buttonContent]'\n})\nexport class ButtonContentSlotDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostBinding,\n inject,\n Input,\n input,\n OnDestroy,\n OnInit,\n Output,\n signal,\n ViewEncapsulation\n} from '@angular/core';\n\nimport { MatButtonModule } from '@angular/material/button';\n\nimport { AsyncFnService, TAsyncFnPendingInd, TAsyncFnWrapper } from '@partners/utils';\nimport { Subscription } from 'rxjs';\nimport { IButtonAction } from '../../model/ui.interface';\nimport { TElementFlow, TResponsiveSize } from '../../model/ui.types';\nimport { ButtonContentSlotDirective } from '../button-content';\n\n@Component({\n template: ``,\n standalone: true,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'button'\n },\n imports: [MatButtonModule]\n})\nexport class BaseButtonComponent implements OnInit, OnDestroy {\n @Input()\n @HostBinding('attr.form')\n formName: string;\n\n @Input()\n type: 'submit' | 'button' = 'button';\n\n @Input()\n context: any;\n\n @Input()\n value: string | number;\n\n /** comply with preset responsive ui sizes */\n @Input()\n size: TResponsiveSize;\n\n clickFnTrailTime = input(0);\n\n iconName = input();\n\n iconSize = input();\n\n flow = input('grid');\n\n hasRootTemplate = input(false);\n\n pending = signal(false);\n\n clickFn = input(undefined);\n pendingInd = input(this.pending);\n\n @Input()\n @HostBinding('class.disabled')\n disabled: boolean = false;\n\n @Output()\n click: EventEmitter;\n\n @HostBinding('class.inline')\n get inlineClass() {\n return this.flow() === 'inline';\n }\n @HostBinding('class.inline-block')\n get inlineBlockClass() {\n return this.flow() === 'inline-block';\n }\n @HostBinding('class.block')\n get blockClass() {\n return this.flow() === 'block';\n }\n\n @HostBinding('class')\n get sizeClass() {\n return this.size;\n }\n\n /** the content template passed from host */\n @ContentChild(ButtonContentSlotDirective, { static: true })\n buttonContent: ButtonContentSlotDirective;\n\n get buttonEl(): HTMLButtonElement {\n return this.elementRef.nativeElement.querySelector('button');\n }\n\n protected changeDetector = inject(ChangeDetectorRef);\n protected elementRef = inject(ElementRef);\n protected _asyncClickService = inject(AsyncFnService);\n\n private _subscription: Subscription;\n\n constructor() {\n this.click = new EventEmitter();\n this._subscription = new Subscription();\n }\n\n /**\n * house keeping\n */\n ngOnDestroy(): void {\n this._subscription.unsubscribe();\n this.click.complete();\n }\n\n ngOnInit(): void {\n this.changeDetector.detectChanges();\n }\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[buttonLabel]',\n standalone: true\n})\nexport class ButtonLabelSlotDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[cardFooter]',\n standalone: true\n})\nexport class CardFooterDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[cardBody]',\n standalone: true\n})\nexport class CardBodyDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[cardTitle]',\n standalone: true\n})\nexport class CardTitleDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n HostBinding,\n Input,\n OnInit,\n ViewEncapsulation\n} from '@angular/core';\n\nimport { NgIf, NgTemplateOutlet } from '@angular/common';\nimport { TBoxAlign } from '../../directives';\nimport { CardBodyDirective, CardFooterDirective, CardTitleDirective } from './card-slots';\n\n@Component({\n selector: 'card-container',\n standalone: true,\n template: `\n \n
\n \n
\n
\n\n \n
\n \n
\n
\n\n \n
\n \n
\n
\n `,\n imports: [NgIf, NgTemplateOutlet],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'card-container'\n }\n})\nexport class CardContainerComponent implements OnInit {\n context: any;\n\n @ContentChild(CardFooterDirective, { static: true })\n footerTemplate: CardFooterDirective;\n\n @ContentChild(CardBodyDirective, { static: true })\n bodyTemplate: CardBodyDirective;\n\n @ContentChild(CardTitleDirective, { static: true })\n titleTemplate: CardTitleDirective;\n\n @Input()\n justifyContent: TBoxAlign = 'start';\n\n @Input()\n alignItems: TBoxAlign;\n\n @Input()\n @HostBinding('class.densed')\n densed: boolean;\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","import { Directive, ElementRef, Renderer2, inject } from '@angular/core';\n\n@Directive()\nexport class FlexElementDirective {\n protected renderer2 = inject(Renderer2);\n protected nativeElement = inject(ElementRef).nativeElement;\n\n constructor() {}\n\n setStyle() {\n // this.renderer2.setStyle(this.nativeElement,, RendererStyleFlags2.DashCase)\n }\n}\n","import { Directive, HostBinding, Input } from '@angular/core';\nimport { FlexElementDirective } from './flex-element.directive';\nimport { TBoxAlign, TBoxAxesAlignExpression, TBoxAxesArgs } from './model';\n\n@Directive({\n selector: '[layout-align]',\n standalone: true\n})\nexport class FlexLayoutAlignDirective<\n MainAxis extends TBoxAlign,\n CrossAxis extends TBoxAlign\n> extends FlexElementDirective {\n @Input('layout-align')\n set layoutAlign(value: TBoxAxesAlignExpression) {\n const boxAxes = this.matchAlignmentPattern(value);\n\n const { mainAxis, crossAxis } = boxAxes;\n\n this.mainAxis = mainAxis;\n this.crossAxis = crossAxis;\n }\n\n @HostBinding(`style.justify-content`)\n private mainAxis: TBoxAlign;\n\n @HostBinding(`style.align-items`)\n private crossAxis: TBoxAlign;\n\n constructor() {\n super();\n }\n\n private matchAlignmentPattern(input: TBoxAxesAlignExpression): TBoxAxesArgs {\n const [mainAxis, crossAxis] = input.split(' ');\n\n if (!(mainAxis as TBoxAlign) || !(crossAxis as TBoxAlign)) {\n return { mainAxis: undefined, crossAxis: undefined };\n }\n\n return { mainAxis: mainAxis as TBoxAlign, crossAxis: crossAxis as TBoxAlign };\n }\n}\n","import { Directive, HostBinding, Input, OnInit } from '@angular/core';\nimport { FlexElementDirective } from './flex-element.directive';\n\n@Directive({\n selector: '[layout]',\n standalone: true\n})\nexport class FlexLayoutDirective extends FlexElementDirective implements OnInit {\n @Input()\n @HostBinding(`style.flex-direction`)\n layout: 'row' | 'column';\n\n @HostBinding(`style.display`)\n private flexDisplay = 'flex';\n\n constructor() {\n super();\n }\n\n ngOnInit(): void {\n this.setLayout();\n }\n\n private setLayout() {\n this.setStyle();\n }\n}\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { TAssetFileExt, ThemeAssetComponent } from '@partners/themes';\nimport { FlexUtilsImportPack } from '../../directives';\n\n@Component({\n selector: 'card-illustration',\n standalone: true,\n imports: [ThemeAssetComponent, FlexUtilsImportPack],\n template: `\n \n
\n {{ ownerName }}\n {{ last4Digits }}\n
\n `,\n styles: [``],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'card-illustration'\n }\n})\nexport class CardIllustrationComponent {\n @Input()\n ownerName: string;\n\n @Input()\n last4Digits: string;\n\n @Input()\n imageExtension: TAssetFileExt = 'png';\n\n @Input()\n set cardImageId(value: string | number) {\n this._imageId = value.toString();\n }\n\n get cardImageId(): string {\n return `card-illustration-${this._imageId}`;\n }\n\n private _imageId: string = null;\n}\n","import { animate, group, query, style, transition, trigger } from '@angular/animations';\n\n// Fade Animation\nexport const toggleCheckAnimation = trigger('toggleCheckAnimation', [\n transition('* => *', [\n group([\n query(\n ':leave',\n [\n style({ opacity: 1, transform: 'scale(1) rotate(0deg)' }),\n animate('600ms', style({ transform: 'scale(.4) rotate(270deg)', opacity: 0 }))\n ],\n { optional: true }\n ),\n query(\n ':enter',\n [\n style({ opacity: 0, transform: 'scale(.4) rotate(-180deg)' }),\n animate('450ms', style({ transform: 'scale(1) rotate(0deg)', opacity: 1 }))\n ],\n { optional: true }\n )\n ])\n ])\n]);\n","import { ChangeDetectionStrategy, Component, HostBinding, Input, OnInit, ViewEncapsulation } from '@angular/core';\nimport { ThemeAssetComponent } from '@partners/themes';\n\nimport { TResponsiveSize } from '../../model/ui.types';\nimport { toggleCheckAnimation } from './animations';\n\n@Component({\n standalone: true,\n selector: 'check-indicator',\n template: `
`,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [toggleCheckAnimation],\n imports: [ThemeAssetComponent],\n host: {\n class: 'check-indicator'\n }\n})\nexport class CheckIndicatorComponent implements OnInit {\n @Input()\n show: boolean;\n\n /** comply with preset responsive ui sizes */\n @Input()\n @HostBinding('class')\n size: TResponsiveSize;\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","import { NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, HostBinding, Input, ViewEncapsulation } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { ThemeAssetComponent } from '@partners/themes';\nimport { BaseButtonComponent } from '../base-button/base-button.component';\n\n@Component({\n selector: 'confirm-button',\n standalone: true,\n template: `\n \n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'button--confirm'\n },\n exportAs: 'confirmButton',\n imports: [NgIf, MatButtonModule, ThemeAssetComponent]\n})\nexport class ConfirmButtonComponent extends BaseButtonComponent {\n @Input()\n @HostBinding('class.confirmed')\n isConfirmed: boolean = false;\n\n @Input()\n confirmIconName: string = 'filled-check-icon';\n\n constructor() {\n super();\n }\n\n onClick(event: MouseEvent | TouchEvent) {\n event.stopPropagation();\n event.preventDefault();\n\n this.click.emit({ event: event, context: this.context });\n this.changeDetector.markForCheck();\n }\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[panelTitle]',\n standalone: true\n})\nexport class PanelTitleDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[panelBody]',\n standalone: true\n})\nexport class PanelBodyDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import { NgIf, NgStyle, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n HostBinding,\n Input,\n OnInit,\n ViewChild,\n ViewEncapsulation,\n signal\n} from '@angular/core';\nimport { MatExpansionModule, MatExpansionPanel } from '@angular/material/expansion';\nimport { ThemeAssetComponent } from '@partners/themes';\nimport { PanelBodyDirective, PanelTitleDirective } from './panel-slots';\n\n@Component({\n selector: 'expansion-panel',\n standalone: true,\n imports: [NgIf, NgStyle, NgTemplateOutlet, MatExpansionModule, ThemeAssetComponent],\n template: `\n \n \n \n \n \n \n \n \n\n \n \n \n \n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'expansion-panel'\n }\n})\nexport class ExpansionPanelComponent implements OnInit, AfterViewInit {\n @ViewChild('panel', { static: true, read: MatExpansionPanel })\n panel: MatExpansionPanel;\n\n @ContentChild(PanelTitleDirective, { static: true })\n panelTitle: PanelTitleDirective;\n\n @ContentChild(PanelBodyDirective, { static: true })\n panelBody: PanelBodyDirective;\n\n isReady$$ = signal(false);\n\n @Input()\n headerMode: 'stretched' | 'auto' = 'auto';\n\n @HostBinding('class')\n get headerClass() {\n if (this.headerMode === 'stretched') {\n return 'stretched-header';\n }\n return 'auto-header';\n }\n\n get isOpen(): boolean {\n return this.panel.expanded;\n }\n\n @Input()\n hasToggle: boolean = true;\n\n ngOnInit(): void {\n this.panel.close();\n }\n\n ngAfterViewInit(): void {\n this.panel.close();\n this.isReady$$.set(true);\n }\n\n toggle() {\n this.isOpen ? this.panel.open() : this.panel.close();\n }\n\n open() {\n this.panel.open();\n }\n close() {\n this.panel.close();\n }\n}\n","import { NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { ThemeAssetComponent } from '@partners/themes';\nimport { BaseButtonComponent } from '../base-button/base-button.component';\n\n@Component({\n selector: 'fab-button',\n standalone: true,\n template: `\n \n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'button--fab'\n },\n exportAs: 'fabButton',\n imports: [NgIf, MatButtonModule, ThemeAssetComponent]\n})\nexport class FabButtonComponent extends BaseButtonComponent {\n constructor() {\n super();\n }\n\n onClick(event: MouseEvent | TouchEvent) {\n event.stopPropagation();\n event.preventDefault();\n\n this.click.emit({ event: event, context: this.context });\n this.changeDetector.markForCheck();\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { ThemeAssetComponent } from '@partners/themes';\nimport { isFunction } from '@partners/utils';\nimport { TCssPosition } from '../../model';\nimport { BaseButtonComponent } from '../base-button/base-button.component';\n\n@Component({\n selector: 'filled-button',\n standalone: true,\n template: `\n \n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'hostClass()'\n },\n exportAs: 'filledButton',\n imports: [MatButtonModule, ThemeAssetComponent]\n})\nexport class FilledButtonComponent extends BaseButtonComponent {\n iconPlacement = input('start');\n\n selfPosition = input('stretch');\n\n hostClass = computed(() => {\n return `button--filled button--icon-${this.iconPlacement()} button--position-${this.selfPosition()}`;\n });\n\n constructor() {\n super();\n }\n\n onClick(event: MouseEvent | TouchEvent) {\n if (this.type !== 'submit') {\n event.stopPropagation();\n event.preventDefault();\n\n /** let async fn service handle the click event to allow the manage of pending state */\n if (isFunction(this.clickFn())) {\n this._asyncClickService.runAsyncMethod(this.clickFn(), {\n pendingInd: this.pendingInd(),\n trailTime: this.clickFnTrailTime()\n });\n } else {\n this.click.emit({ event: event, context: this.context });\n }\n }\n\n this.changeDetector.markForCheck();\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input, ViewEncapsulation } from '@angular/core';\nimport { SettingsMap } from '@partners/settings';\nimport { ShellStore } from '@partners/state';\nimport { ThemeAssetComponent, TIconSet } from '@partners/themes';\nimport { TCssTuple, TResponsiveSize } from '../../model';\n\n@Component({\n selector: 'icon',\n standalone: true,\n imports: [ThemeAssetComponent],\n template: `\n \n `,\n styles: ``,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'hostClassList()',\n '[style]': 'responsiveSize()'\n }\n})\nexport class IconComponent {\n #shellStore = inject(ShellStore);\n\n loadViaHttp = input(false);\n iconName = input();\n widthHeight = input();\n iconSize = input();\n responsiveWidth = input(false);\n responsiveHeight = input(false);\n\n iconVariant = input<'rounded' | 'default'>('default');\n\n responsiveSize = computed(() => {\n if (this.iconSize()) {\n return '';\n }\n if (this.responsiveHeight()) {\n return `height:100%;max-width:100%`;\n }\n return `width:100%;max-height:100%`;\n });\n\n iconSet = computed(() => {\n const { partner } = this.#shellStore?.params$$();\n return SettingsMap.themeSettings(partner).iconSet;\n });\n\n hostClassList = computed(() => {\n const defaultClasses = `icon icon--${this.iconVariant()} icon--${this.iconSet()}`;\n if (this.iconSize()) {\n return `${defaultClasses} icon--${this.iconSize()}`;\n }\n return defaultClasses;\n });\n}\n","import { AsyncPipe, DecimalPipe, NgIf } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostBinding,\n Input,\n OnChanges,\n SimpleChanges,\n ViewEncapsulation,\n input\n} from '@angular/core';\nimport { TNumericFormatPattern, TNumericFormatType, ToDecimalPipe } from '@partners/utils';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\nexport interface INumericFormatParts {\n prefix: string;\n value: string;\n fractions: string;\n suffix: string;\n}\n\n@Component({\n standalone: true,\n selector: 'numeric-label',\n template: `\n \n {{ format.prefix }}\n {{ format.value }}\n .{{ format.fractions }}\n {{ format.suffix }}\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgIf, AsyncPipe, ToDecimalPipe],\n providers: [DecimalPipe, ToDecimalPipe],\n host: {\n '[class.unified-size]': 'isUnifiedSize()'\n }\n})\nexport class NumericLabelComponent implements OnChanges {\n @Input()\n value: string | number;\n\n @Input()\n presetFormat: TNumericFormatType = 'decimal';\n\n @Input()\n formatPattern: TNumericFormatPattern = '1.0-0';\n\n @Input()\n isAbsoluteMode: boolean;\n\n isUnifiedSize = input(true);\n\n get format$(): Observable {\n return this._readyEmitter.asObservable();\n }\n\n get currencySymbol(): string {\n return '₪';\n }\n\n get percentSymbol(): string {\n return '%';\n }\n\n get fractionDigits(): { min: number; max: number } {\n const fractionsIndex = this.formatPattern.indexOf('.');\n const fractionsPattern = this.formatPattern.slice(fractionsIndex + 1);\n const fractionsParts = fractionsPattern.split('-');\n return {\n min: parseInt(fractionsParts[0]) || 0,\n max: parseInt(fractionsParts[1]) || 0\n };\n }\n\n @HostBinding('class.numeric-label')\n hostClass: boolean = true;\n\n formatParts$: Observable;\n\n private _readyEmitter: BehaviorSubject;\n\n constructor(private decimalPipe: ToDecimalPipe, private changeDetector: ChangeDetectorRef) {\n this._readyEmitter = new BehaviorSubject({\n prefix: '',\n suffix: '',\n value: '',\n fractions: ''\n });\n }\n\n /**\n * @description\n * on any given change of value, we reformat it, this is done here, to accommodate\n * both sync and async values originated in the consumer\n * @param changes\n */\n ngOnChanges(changes: SimpleChanges): void {\n const { value } = changes;\n const { currentValue, previousValue } = value;\n\n if (currentValue !== previousValue) {\n this.formatNumericValue();\n this.changeDetector.detectChanges();\n }\n }\n\n /**\n * @description\n * converts raw numeric value into an object with format parts (prefix | suffix | value | fractions)\n * after format is done, the formatted string is broken into its parts to allow wrapping each part\n * in its own html element for different styling\n * examples:\n * 1). value=12587.62 => ₪12,587.62 => prefix:₪ | suffix:'' | value:12,587 | fractions:62\n * 2). value=6.8745 => 6.8745% => prefix:'' | suffix:'%' | value:6 | fractions:8745\n *\n * @returns\n */\n private formatNumericValue(): void {\n let format: INumericFormatParts = {\n prefix: '',\n suffix: '',\n value: '',\n fractions: ''\n };\n\n const formattedValue = this.decimalPipe.transform(this.value, this.formatPattern);\n\n if (!formattedValue) {\n this._readyEmitter.next(format);\n return;\n }\n\n /** parse the prefix & suffix */\n Object.assign(format, {\n prefix: this.getPrefixValue(),\n suffix: this.getSuffixValue(),\n fractions: this.getFractionsValue(formattedValue),\n value: this.getNumericValue(formattedValue)\n });\n\n this._readyEmitter.next(format);\n }\n\n /**\n * @description\n * cut the numeric portion of a fully-formatted numeric string. examples:\n * if formattedValue = \"12,541.0896%\" => then numeric portion is => \"12,541\"\n * if formattedValue = \"₪55,102\" => then numeric portion is => \"55,102\"\n * @param formattedValue the fully-formatted string value (example: \"12,541.0896%\")\n * @return the numeric value of a fully formatted string\n */\n private getNumericValue(formattedValue: string): string {\n formattedValue = formattedValue.trim();\n\n /** we want to display empty numeric format as single \"0\" value */\n if (formattedValue === '0') {\n return formattedValue;\n }\n\n /** in absolute mode - don't accept negative values */\n if (this.isAbsoluteMode && parseFloat(formattedValue) < 0) {\n const negativeIndex = formattedValue?.indexOf('-');\n formattedValue = formattedValue.slice(negativeIndex + 1);\n }\n\n /** slice off any fraction (decimal) digits */\n const fractionIndex = formattedValue?.indexOf('.');\n\n if (fractionIndex < 0) {\n return formattedValue;\n }\n\n return formattedValue.slice(0, fractionIndex);\n }\n\n /**\n * @description\n * cut the fractions digits (decimal digits) portion of a fully-formatted numeric string. examples:\n * if formattedValue = \"12,541.0896%\" => \"0896\"\n * if formattedValue = \"₪55,102.55\" => \"55\"\n * @param formattedValue the fully-formatted string value (example: \"12,541.0896%\")\n * @return the numeric value of a fully formatted string\n */\n private getFractionsValue(formattedValue: string): string {\n const { min, max } = this.fractionDigits;\n const fractionIndex = formattedValue?.indexOf('.');\n if (fractionIndex > 0 && (min || max)) {\n return formattedValue.slice(fractionIndex + 1);\n }\n return null;\n }\n\n private getPrefixValue(): string | null {\n switch (this.presetFormat) {\n case 'money':\n return this.currencySymbol;\n default:\n return null;\n }\n }\n\n private getSuffixValue(): string | null {\n switch (this.presetFormat) {\n case 'percent':\n return this.percentSymbol;\n default:\n return null;\n }\n }\n}\n","import { CommonModule, NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, input, Input, ViewEncapsulation } from '@angular/core';\nimport { InterestTypeEnum } from '@partners/constants';\nimport { isEmpty, TNumericFormatPattern, ToMoneyPipe } from '@partners/utils';\nimport { NumericLabelComponent } from '../numeric-label';\n\n@Component({\n standalone: true,\n selector: 'interest-label',\n template: `\n @switch(interestType()){ \n @case(interestTypeEnum.fixedLinked){\n \n } \n @case (interestTypeEnum.variable) {\n \n \n (\n \n )\n \n\n \n \n +\n -\n P\n \n \n } \n }\n `,\n host: {\n class: 'interest-label'\n },\n imports: [CommonModule, NgIf, NumericLabelComponent, ToMoneyPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class InterestLabelComponent {\n @Input()\n interestValue: string | number;\n\n @Input()\n interestClass: string = 'interest';\n\n @Input()\n primeGapClass: string = 'prime-gap';\n\n @Input()\n interestPattern: TNumericFormatPattern = '1.1-2';\n\n @Input()\n primeGapPattern: TNumericFormatPattern = '1.1-2';\n\n @Input()\n primeGapValue: string | number;\n\n interestType = input.required();\n\n interestTypeEnum = InterestTypeEnum;\n\n get isNegativeGap(): boolean {\n if (isEmpty(this.primeGapValue)) {\n return false;\n }\n return parseFloat(this.primeGapValue.toString()) < 0;\n }\n\n constructor() {}\n}\n","import { ChangeDetectionStrategy, Component, HostBinding, Input, ViewEncapsulation } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatRippleModule } from '@angular/material/core';\nimport { ThemeAssetComponent } from '@partners/themes';\nimport { BaseButtonComponent } from '../base-button/base-button.component';\n\n@Component({\n selector: 'link-button',\n standalone: true,\n imports: [MatButtonModule, MatRippleModule, ThemeAssetComponent],\n template: `\n \n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'button--link'\n },\n exportAs: 'linkButton'\n})\nexport class LinkButtonComponent extends BaseButtonComponent {\n @Input()\n @HostBinding('class')\n decoration: 'underline' | 'arrow' | 'underline-arrow' | 'none' = 'none';\n\n constructor() {\n super();\n }\n\n onClick(event: MouseEvent | TouchEvent) {\n event.preventDefault();\n event.stopPropagation();\n\n this.click.emit({ event: event, context: this.context });\n this.changeDetector.markForCheck();\n }\n}\n","import { NgStyle } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, computed, signal } from '@angular/core';\n\nexport type TrackPx = `${number}px`;\nexport type TrackPct = `${number}%`;\n\n@Component({\n selector: 'progress-bar',\n standalone: true,\n imports: [NgStyle],\n template: ``,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'progress-bar'\n }\n})\nexport class ProgressBarComponent {\n @Input()\n initialValue: number = 0;\n\n @Input()\n mode: 'relative' | 'accurate' = 'relative';\n\n @Input()\n set value(val: number) {\n this._value.set(val);\n }\n\n trackSize = computed(() => {\n let val = this._value() + this.initialValue;\n val = Math.max(val, 0);\n val = Math.min(val, 100);\n\n // console.log(`progress bar's value: ${this.trackSize}`);\n\n if (this.mode === 'relative') {\n return `${val}%`;\n }\n\n return `${val}px`;\n });\n\n private _value = signal(this.initialValue);\n\n private recalcProgress(val: number) {}\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { FADE_IN_OUT_ANIMATION } from '../../animations';\nimport { TResponsiveSize } from '../../model';\n\n@Component({\n selector: 'progress-spinner',\n standalone: true,\n imports: [MatProgressSpinnerModule],\n template: `\n \n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'progress-spinner'\n },\n animations: [FADE_IN_OUT_ANIMATION]\n})\nexport class ProgressSpinnerComponent {\n thickness = input(3);\n size = input('md');\n\n diameter = computed(() => {\n switch (this.size()) {\n case 'xs': {\n return 20;\n }\n case 'sm': {\n return 28;\n }\n default: {\n return 40;\n }\n }\n });\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { BaseButtonComponent } from '../base-button/base-button.component';\n\n@Component({\n standalone: true,\n selector: 'rounded-button',\n imports: [NgTemplateOutlet],\n template: `\n @if (hasRootTemplate()) {\n \n \n \n } @else {\n \n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'button--rounded'\n },\n exportAs: 'roundedButton'\n})\nexport class RoundedButtonComponent extends BaseButtonComponent {\n constructor() {\n super();\n }\n\n onClick(event: MouseEvent | TouchEvent) {\n if (!this.hasRootTemplate()) {\n event.preventDefault();\n event.stopPropagation();\n this.click.emit({ event: event, context: this.context });\n this.changeDetector.markForCheck();\n }\n }\n}\n","/* eslint-disable @angular-eslint/component-selector */\nimport { AsyncPipe, DOCUMENT, NgIf } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n Output,\n ViewChild,\n ViewEncapsulation,\n forwardRef\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator\n} from '@angular/forms';\nimport {\n BehaviorSubject,\n Observable,\n Subscription,\n filter,\n fromEvent,\n map,\n of,\n pairwise,\n raceWith,\n switchMap,\n tap,\n throttleTime,\n throwError,\n withLatestFrom\n} from 'rxjs';\nimport { ICoordinate, ISignaturePadConfig, ISignaturePadValidation } from '../models/signature.interfaces';\n\nimport { MatIconModule } from '@angular/material/icon';\nimport { ThemeAssetComponent } from '@partners/themes';\nimport { FlexUtilsImportPack } from '../../../directives';\nimport { FilledButtonComponent } from '../../filled-button';\nimport { LinkButtonComponent } from '../../link-button';\nimport { StrokedButtonComponent } from '../../stroked-button';\n\n@Component({\n selector: 'signature-pad',\n standalone: true,\n imports: [\n NgIf,\n AsyncPipe,\n FlexUtilsImportPack,\n FilledButtonComponent,\n StrokedButtonComponent,\n LinkButtonComponent,\n ThemeAssetComponent,\n MatIconModule\n ],\n template: `\n
\n
\n \n
\n
\n \n מחיקה\n \n
\n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SignaturePadComponent), multi: true },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SignaturePadComponent),\n multi: true\n }\n ],\n host: {\n class: 'signature-pad'\n }\n})\nexport class SignaturePadComponent implements OnDestroy, AfterViewInit, ControlValueAccessor, Validator {\n @Input()\n signaturePadConfig: Partial;\n\n /**\n * @description Emits an indication that signature drawing has ended.\n */\n @Output()\n drawEnd: EventEmitter = new EventEmitter();\n\n @ViewChild('signatureCanvas')\n signatureCanvas: ElementRef;\n\n offsetWidth$: Observable;\n offsetHeight$: Observable;\n\n get config(): ISignaturePadConfig {\n return { ...this._defaultSignatureConfig, ...this.signaturePadConfig };\n }\n\n private offsetWidthEmitter: BehaviorSubject = new BehaviorSubject(null);\n private offsetHeightEmitter: BehaviorSubject = new BehaviorSubject(null);\n private signatureSubs = new Subscription();\n private isMouseDownOrTouchedEmitter = new BehaviorSubject(false);\n private isDrawingInterrupted = new BehaviorSubject(true);\n private onChange: (base64Signature: string) => void;\n private onTouched: () => void;\n\n /**\n * @description Represents the sum of signature lines pixels length.\n */\n private signatureSize: number;\n\n private readonly _defaultSignatureConfig: ISignaturePadConfig = {\n signatureColor: 'black',\n signatureLineWidth: 3,\n isEditEnabled: true,\n resizeThrottle: 200,\n drawThrottle: 30,\n minSignatureLengthToRatio: 1,\n isSaveEnabled: true\n };\n\n constructor(@Inject(DOCUMENT) public document: Document) {\n this.offsetWidth$ = this.offsetWidthEmitter.asObservable();\n this.offsetHeight$ = this.offsetHeightEmitter.asObservable();\n /**\n * @description Sets the signature drawing pixel length to 0, because there is no signature.\n */\n this.signatureSize = 0;\n }\n\n ngAfterViewInit(): void {\n this.createOnDrawingStartPipe();\n this.createOnDrawingPipe();\n this.createOnDrawingEndPipe();\n this.createOnWindowResizePipe();\n this.createOnMouseOutPipe();\n }\n\n ngOnDestroy(): void {\n this.signatureSubs.unsubscribe();\n }\n\n /**\n * @description Called on registration to source form.\n * @param onChangeCallbackFunction A callback function which updates the source form on change of the form control value.\n */\n registerOnChange(onChangeCallbackFunction: (base64Signature: string) => void): void {\n this.onChange = onChangeCallbackFunction;\n }\n\n /**\n * @description The validation function for the component which implemented for the Validator interface.\n */\n validate(control: AbstractControl): ValidationErrors {\n const { invalid, value } = control;\n\n if (!value || invalid) {\n return null;\n }\n\n const result: ISignaturePadValidation = { signature: null };\n\n if (!this.isSignatureValid()) {\n result.signature = true;\n return result;\n }\n\n return null;\n }\n\n /**\n * @description A function that called on registration of the form control to the source form, with the initial external value of the form control from the source form.\n * Irrelevant due to the reason that signatures cannot be edited, and we start new signature every time.\n */\n writeValue(obj: string): void {}\n\n /**\n * @description A function that called on registration of the form control to the source form.\n * Signals to the form that the component has been touched.\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n onSignatureEnd() {\n if (this.config.isSaveEnabled) {\n this.drawEnd.emit();\n }\n }\n\n /**\n * @description Clears the signature canvas.\n */\n onClear() {\n this.signatureCanvas.nativeElement\n .getContext('2d')\n ?.clearRect(\n 0,\n 0,\n this.signatureCanvas.nativeElement.scrollWidth,\n this.signatureCanvas.nativeElement.scrollHeight\n );\n\n /**\n * @description Sets the signature drawing pixel length to 0, because signature is cleared.\n */\n this.signatureSize = 0;\n this.onChange && this.onChange(null);\n }\n\n /**\n * @description Creates an event listeners to mouse and touch start events on the signature canvas element.\n * On mouse or touch start event, the isMouseDownOrTouchedBehaviorSubject will be set to true, and drawing will be enabled.\n */\n private createOnDrawingStartPipe() {\n const touchStart$ = fromEvent(this.signatureCanvas.nativeElement, 'touchstart');\n const mouseDown$ = fromEvent(this.signatureCanvas.nativeElement, 'mousedown');\n\n const touchOrMouseStartSubscription = touchStart$\n .pipe(\n raceWith(mouseDown$),\n tap(() => {\n this.onTouched && this.onTouched();\n this.isMouseDownOrTouchedEmitter.next(true);\n })\n )\n .subscribe();\n\n this.signatureSubs.add(touchOrMouseStartSubscription);\n }\n\n /**\n * @description Creates an event listeners to mouse and touch move events on the signature canvas element.\n * On mouse or touch move event, the pipe will check if drawing is editable and started, and if it does, it will extract the drawing coordinate out of the event.\n * Then will check if the drawing was interrupted by exiting out of the canvas element.\n * After this the signature coordinate will be drawn to the canvas.\n */\n private createOnDrawingPipe() {\n const touchDrawing$ = fromEvent(this.signatureCanvas.nativeElement, 'touchmove');\n const mouseDrawing$ = fromEvent(this.signatureCanvas.nativeElement, 'mousemove');\n\n const drawingSubscription = touchDrawing$\n .pipe(\n raceWith(mouseDrawing$),\n tap((event) => event.preventDefault()),\n throttleTime(this.config.drawThrottle, null, { leading: true, trailing: true }),\n withLatestFrom(this.isMouseDownOrTouchedEmitter),\n filter(([_, isDrawing]) => isDrawing && this.config.isEditEnabled),\n switchMap(([event]) => this.getCoordinateFromEvent$(event)),\n pairwise(),\n withLatestFrom(this.isDrawingInterrupted),\n map(([[previousCoordinate, currentCoordinate], isDrawingInterrupted]) => {\n if (!isDrawingInterrupted) return [previousCoordinate, currentCoordinate];\n\n this.isDrawingInterrupted.next(false);\n return [currentCoordinate, currentCoordinate];\n }),\n tap(([previousCoordinate, currentCoordinate]) => {\n this.drawToCanvas(previousCoordinate, currentCoordinate);\n /**\n * @description Adds the drawn line pixel length to the total sum signature length.\n */\n this.signatureSize += this.calculateCoordinatesDistance(previousCoordinate, currentCoordinate);\n\n if (this.isOutOfCanvasBoundingBox(currentCoordinate)) {\n this.isMouseDownOrTouchedEmitter.next(false);\n this.isDrawingInterrupted.next(true);\n this.onChange && this.onChange(this.signatureAsDataUrl());\n }\n })\n )\n .subscribe();\n\n this.signatureSubs.add(drawingSubscription);\n }\n\n /**\n * @description Creates an event listeners to mouse and touch end events on the signature canvas element.\n * On mouse or touch end event, the isMouseDownOrTouchedBehaviorSubject will be set to false, and drawing will be disables.\n */\n private createOnDrawingEndPipe() {\n const touchEnd$ = fromEvent(this.signatureCanvas.nativeElement, 'touchend');\n const mouseUp$ = fromEvent(this.signatureCanvas.nativeElement, 'mouseup');\n\n const touchOrMouseEndSubscription = touchEnd$\n .pipe(\n raceWith(mouseUp$),\n tap(() => {\n this.isMouseDownOrTouchedEmitter.next(false);\n this.isDrawingInterrupted.next(true);\n this.onChange && this.onChange(this.signatureAsDataUrl());\n })\n )\n .subscribe();\n\n this.signatureSubs.add(touchOrMouseEndSubscription);\n }\n\n /**\n * @description Creates an event listeners to resize events on the window.\n * On resize of the window, the pipe will resize the canvas.\n */\n private createOnWindowResizePipe() {\n const windowResize$ = fromEvent(this.document.defaultView as Window, 'resize');\n\n const windowResizeSubscription = windowResize$\n .pipe(\n throttleTime(this.config.resizeThrottle, null, { leading: true, trailing: true }),\n tap(() => {\n this.offsetWidthEmitter.next(this.signatureCanvas.nativeElement.scrollWidth);\n this.offsetHeightEmitter.next(this.signatureCanvas.nativeElement.scrollHeight);\n /**\n * @description Sets the signature drawing pixel length to 0, because signature was cleared by the resize.\n */\n this.signatureSize = 0;\n /**\n * @description Updates the form control with the canvas value as data url, due to change of the signature in canvas by the resize.\n */\n this.onChange && this.onChange(null);\n })\n )\n .subscribe();\n\n this.signatureSubs.add(windowResizeSubscription);\n }\n\n /**\n * @description Creates an event listeners to mouse out event on the signature canvas element.\n * On mouse out, the drawing will be finished.\n * There is a problem, that when the mouse is out of the canvas element, it doesn't listen to the mouse up event (because the event is registered to the canvas, and the mouse is no longer above it).\n * The problem exists only on desktop, and therefore the function below implemented only for desktop to prevent the problem.\n */\n private createOnMouseOutPipe() {\n const mouseOut$ = fromEvent(this.signatureCanvas.nativeElement, 'mouseout');\n\n const mouseOutSubscription = mouseOut$\n .pipe(\n tap(() => {\n this.isMouseDownOrTouchedEmitter.next(false);\n this.isDrawingInterrupted.next(true);\n this.onChange && this.onChange(this.signatureAsDataUrl());\n })\n )\n .subscribe();\n\n this.signatureSubs.add(mouseOutSubscription);\n }\n\n /**\n * @description Extracts the coordinate out of mouse event.\n * @param event A mouse event.\n * @returns The extracted coordinate.\n */\n private getMousePosition(event: MouseEvent): ICoordinate {\n const x = event.clientX - this.signatureCanvas.nativeElement.getClientRects().item(0).x;\n const y = event.clientY - this.signatureCanvas.nativeElement.getClientRects().item(0).y;\n\n return { X: x, Y: y };\n }\n\n /**\n *@description Extracts the coordinate out of touch event.\n * @param event A touch event.\n * @returns The extracted coordinate.\n */\n private getTouchPosition(event: TouchEvent): ICoordinate {\n const x = event.changedTouches[0].clientX - this.signatureCanvas.nativeElement.getClientRects().item(0).x;\n const y = event.changedTouches[0].clientY - this.signatureCanvas.nativeElement.getClientRects().item(0).y;\n\n return { X: x, Y: y };\n }\n\n /**\n * @description Draws a line between 2 points on the signature canvas.\n * @param previousCoordinate The path begin coordinate.\n * @param currentCoordinate The path end coordinate.\n */\n private drawToCanvas(previousCoordinate: ICoordinate, currentCoordinate: ICoordinate) {\n const ctx = this.signatureCanvas.nativeElement.getContext('2d');\n const { signatureColor, signatureLineWidth } = this.config;\n\n ctx.beginPath();\n ctx.moveTo(previousCoordinate.X, previousCoordinate.Y);\n ctx.lineTo(currentCoordinate.X, currentCoordinate.Y);\n ctx.strokeStyle = signatureColor;\n ctx.lineWidth = signatureLineWidth;\n ctx.stroke();\n ctx.closePath();\n }\n\n /**\n * @description Receive an event, and checks if it is a valid mouse or touch event, and returns the coordinate out of it.\n * @param event A DOM event.\n * @returns If valid, returns observable of coordinate, else returns throwError observable.\n */\n private getCoordinateFromEvent$(event: Event) {\n if ((event as TouchEvent).changedTouches) return of(this.getTouchPosition(event as TouchEvent));\n else if (!isNaN((event as MouseEvent).clientX) && !isNaN((event as MouseEvent).clientY))\n return of(this.getMousePosition(event as MouseEvent));\n else return throwError(() => new Error(\"event is not valid, since it's not of type MouseEvent or TouchEvent\"));\n }\n\n /**\n * @description Checks if the input coordinate is out of the signature canvas bounding box.\n * @param coordinate The coordinate that we check if is in valid canvas bounding box.\n * @returns Boolean which indicates if coordinate is out of the signature canvas bounding box.\n */\n private isOutOfCanvasBoundingBox(coordinate: ICoordinate) {\n return (\n coordinate.X < 0 ||\n coordinate.Y < 0 ||\n coordinate.X > this.signatureCanvas.nativeElement.offsetWidth ||\n coordinate.Y > this.signatureCanvas.nativeElement.offsetHeight\n );\n }\n\n /**\n * @description Checks if the signature valid by comparing the signature length sum to the canvas pixels ratio and the input minSignatureLengthToRatio value.\n */\n private isSignatureValid(): boolean {\n const padPixelsCount =\n this.signatureCanvas.nativeElement.scrollHeight * this.signatureCanvas.nativeElement.scrollWidth;\n\n return this.signatureSize > (padPixelsCount * this.config.minSignatureLengthToRatio) / 500;\n }\n\n /**\n * @description Calculates the pixel distance between 2 coordinates.\n * @param coordinate1 Path start coordinate.\n * @param coordinate1 Path End coordinate.\n * @return 2 input coordinates distance pixel length.\n */\n private calculateCoordinatesDistance(coordinate1: ICoordinate, coordinate2: ICoordinate): number {\n return Math.sqrt(Math.pow(coordinate1.X - coordinate2.X, 2) + Math.pow(coordinate1.Y - coordinate2.Y, 2));\n }\n\n /**\n * @description Converts the canvas to base64 string due to mime type from input.\n * @returns The canvas to base64 string.\n */\n private signatureAsDataUrl(): string {\n const base64Signature = this.signatureCanvas.nativeElement.toDataURL(null, 1.0);\n\n return base64Signature.replace('data:image/png;base64,', '');\n }\n}\n","import { ChangeContext, NgxSliderModule, Options, SliderComponent } from '@angular-slider/ngx-slider';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n EventEmitter,\n HostBinding,\n Output,\n ViewChild,\n ViewEncapsulation,\n computed,\n inject,\n input\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NumericPipesModule, ToDecimalPipe } from '@partners/utils';\nimport { Observable, tap } from 'rxjs';\n\n@Component({\n selector: 'numeric-slider',\n standalone: true,\n imports: [NgxSliderModule, NumericPipesModule],\n template: `\n \n `,\n styleUrl: 'numeric-slider.component.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.hide-tick-labels]': 'hideTickLabels()'\n },\n styles: [\n `\n .mat-mdc-form-field-subscript-wrapper {\n height: 0;\n min-height: 0;\n }\n .hide-tick-labels {\n .ngx-slider-bubble.ngx-slider-limit {\n visibility: hidden !important;\n }\n }\n `\n ]\n})\nexport class NumericSliderComponent implements AfterViewInit {\n #moneyPipe = inject(ToDecimalPipe);\n\n step = input(1);\n minValue = input(0);\n maxValue = input(0);\n // thumbLabel = input(true); /** wether to show a floating label with current value above the knob */\n showTicks = input(false);\n disabled = input(false);\n value = input(0);\n debounce = input(200);\n showLabels = input(false);\n\n /**\n * the slider can emit change event in 2 ways: (1) valueChange will emit on every change\n * (2) userChange will emit only via user interaction.. the difference between the two is\n * that the former emits both on user interaction and when the slider's value is set via\n * code, while the latter will fire ONLY when USER interact with the slider.\n *\n * it is helpful to separate those events in case we want the slider to emit change event\n * when the user interact with it AND to respond to changes made TO IT as side effect by\n * other setters. in such scenario - binding to valueChange will cause the slider to get\n * caught in infinite loop of change events. using the userChange however help us avoid\n * these side-effects\n */\n changeEmitter = input<'user-only' | 'user-slider'>('user-only');\n\n @Output()\n valueChange = new EventEmitter();\n\n @Output()\n valueChangeEnd = new EventEmitter();\n\n @ViewChild('slider', { read: SliderComponent })\n sliderInstance: SliderComponent;\n\n hideTickLabels = input(false);\n\n options = computed(() => {\n return {\n disabled: this.disabled(),\n floor: this.minValue(),\n ceil: this.maxValue(),\n step: this.step(),\n showTicks: this.showTicks(),\n showSelectionBar: true,\n hidePointerLabels: true,\n showTicksValues: false,\n showSelectionBarFromValue: 0,\n translate: (value: number): string => {\n return this.#moneyPipe.transform(value);\n }\n };\n });\n\n @HostBinding('class.numeric-slider')\n hostClass = true;\n\n #destroyRef = inject(DestroyRef);\n\n ngAfterViewInit(): void {\n this.#bindChangeEvent();\n }\n\n /**\n * binds a local change emitter to the slider's change event/s. there are two optional\n * change event triggers: user and default. the difference is in the initiator. in user\n * mode change will trigger only while the user interact with the slider. in default mode\n * the change will trigger via user interaction AND setting the slider's value via code\n * (see local changeEmitter output comment above for further details)\n * @returns nothing\n */\n #bindChangeEvent(): void {\n const { userChange, valueChange } = this.sliderInstance;\n\n if (this.changeEmitter() === 'user-only') {\n this.fromChangeEvent(userChange)\n .pipe(\n tap(({ value }) => {\n this.valueChange.emit(value);\n })\n )\n .subscribe();\n\n return;\n }\n\n this.fromChangeEvent(valueChange)\n .pipe(\n tap((value) => {\n this.valueChange.emit(value);\n })\n )\n .subscribe();\n }\n\n fromChangeEvent(changeEmitter: EventEmitter): Observable {\n return changeEmitter.asObservable().pipe(\n takeUntilDestroyed(this.#destroyRef)\n // throttleTime(this.debounce(), undefined, { leading: true, trailing: true })\n );\n }\n\n ngOnDestroy(): void {\n console.log('Method not implemented.');\n }\n}\n","import { Directive, HostBinding, Input } from '@angular/core';\nimport { isNotEmpty, isNumber } from '@partners/utils';\nimport { FlexElementDirective } from './flex-element.directive';\nimport { TFlexChild, TFlexChildArgs, TFlexChildExpression } from './model';\n\n@Directive({\n standalone: true,\n selector: '[flex]'\n})\nexport class FlexChildDirective<\n Grow extends TFlexChild = 0,\n Shrink extends number = null,\n Basis extends number = null\n> extends FlexElementDirective {\n @Input()\n set flex(value: TFlexChild | TFlexChildExpression | string) {\n if (isNumber(value)) {\n this.maxWidthPct = `${value}%`;\n this.flexChild = `1 1 100%` as string;\n return;\n }\n\n this.maxWidthPct = null;\n\n const flexArgs: TFlexChildArgs = this.matchFlexChildPattern(value as TFlexChildExpression);\n\n if (!isNumber(flexArgs.grow)) {\n this.flexChild = this.flexLiteralToCssRule(flexArgs.grow);\n return;\n }\n\n this.maxWidthPct = '100%';\n\n let flexExpression = `${flexArgs.grow}`;\n\n if (flexArgs.shrink) {\n flexExpression += ` ${flexArgs.shrink}`;\n }\n\n if (flexArgs.shrink && flexArgs.basis) {\n flexExpression += ` ${flexArgs.basis}`;\n }\n\n this.flexChild = flexExpression as TFlexChildExpression;\n }\n\n @HostBinding(`style.maxWidth`)\n maxWidthPct: string;\n\n @HostBinding(`style.flex`)\n flexChild: TFlexChild | TFlexChildExpression | string;\n\n constructor() {\n super();\n }\n\n flexLiteralToCssRule(literal: string | number): TFlexChildExpression {\n let flexExpression = '';\n\n switch (literal) {\n case 'initial': {\n flexExpression = `0 1 auto`;\n break;\n }\n case 'auto': {\n flexExpression = `1 1 auto`;\n break;\n }\n case 'grow':\n flexExpression = `1 1 100%`;\n break;\n case 'nogrow': {\n flexExpression = `0 1 auto`;\n break;\n }\n case 'noshrink': {\n flexExpression = `1 0 auto`;\n break;\n }\n default: {\n flexExpression = `0 0 auto`;\n }\n }\n return flexExpression as TFlexChildExpression;\n }\n\n private matchFlexChildPattern(input: TFlexChildExpression): TFlexChildArgs {\n const [grow, shrink, basis] = input.split(' ');\n\n const result: TFlexChildArgs = {\n basis: null,\n grow: null,\n shrink: null\n };\n\n if (grow as TFlexChild) {\n result.grow = grow as TFlexChild;\n /**\n * first args (grow) has dual purpose, it can have 1st arg for flex patten flex:X Y Z\n * or it can hav values such as 'grow' | 'shrink' | 'nogrow' | 'noshrink', the latter\n * case means we dont need other two (Y-shrink, Z-basis) args\n **/\n if (!isNumber(grow)) {\n return result;\n }\n }\n\n if (basis as TFlexChild) {\n isNotEmpty(basis) && (result.basis = basis as TFlexChild);\n }\n\n if (shrink as TFlexChild) {\n isNotEmpty(shrink) && (result.shrink = shrink as TFlexChild);\n }\n\n if (grow as TFlexChild) {\n isNotEmpty(basis) && (result.grow = grow as TFlexChild);\n }\n\n return result;\n }\n}\n","import { Directive, HostBinding, Input } from '@angular/core';\nimport { FlexElementDirective } from './flex-element.directive';\nimport { TBoxAlign, TBoxAxesAlignExpression, TBoxAxesArgs } from './model';\n\n@Directive({\n selector: '[self-align]',\n standalone: true\n})\nexport class FlexSelfAlignDirective<\n MainAxis extends TBoxAlign,\n CrossAxis extends TBoxAlign\n> extends FlexElementDirective {\n @Input('self-align')\n set selfAlign(value: TBoxAxesAlignExpression) {\n const boxAxes = this.matchAlignmentPattern(value);\n\n const { mainAxis, crossAxis } = boxAxes;\n\n this.mainAxis = mainAxis;\n this.crossAxis = crossAxis;\n }\n\n @HostBinding(`style.justify-self`)\n private mainAxis: TBoxAlign;\n\n @HostBinding(`style.align-self`)\n private crossAxis: TBoxAlign;\n\n constructor() {\n super();\n }\n\n private matchAlignmentPattern(input: TBoxAxesAlignExpression): TBoxAxesArgs {\n const [mainAxis, crossAxis] = input.split(' ');\n\n if (!(mainAxis as TBoxAlign) || !(crossAxis as TBoxAlign)) {\n return { mainAxis: undefined, crossAxis: undefined };\n }\n\n return { mainAxis: mainAxis as TBoxAlign, crossAxis: crossAxis as TBoxAlign };\n }\n}\n","import { AfterViewInit, Directive, ElementRef, Renderer2, inject } from '@angular/core';\n\n@Directive({\n selector: '[selectOnFocus]',\n standalone: true\n})\nexport class SelectOnFocusDirective implements AfterViewInit {\n #renderer = inject(Renderer2);\n #elementRef = inject(ElementRef);\n\n #destroyFocusListener: () => void;\n\n constructor() {}\n\n ngAfterViewInit(): void {\n this.#destroyFocusListener = this.#renderer.listen(this.#elementRef.nativeElement, 'focus', () => {\n this.#elementRef.nativeElement.select();\n });\n }\n\n ngOnDestroy(): void {\n this.#destroyFocusListener && this.#destroyFocusListener();\n }\n}\n","import { OverlayRef } from '@angular/cdk/overlay';\nimport { Injectable } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\n/**\n * a reference to the dialog itself. can be injected into the component added to the\n * overlay and then used to close itself.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class OverlayAccessor {\n /** an observable that emits when the overlay's backdrop is clicked */\n get backdropClick$() {\n return this.overlayRef.backdropClick();\n }\n\n /** an observable that emits when the overlay has closed */\n get onDismiss$(): Observable {\n return this._dismissEmitter.asObservable();\n }\n\n private _dismissEmitter = new Subject();\n\n constructor(private overlayRef: OverlayRef) {}\n\n /**\n * @description\n * closes the overlay. we can optionally provide a result.\n */\n public dismiss(result?: any) {\n this.overlayRef.dispose();\n this._dismissEmitter.next(result);\n this._dismissEmitter.complete();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { OverlayAccessor } from '../../services/overlay-accessor';\n\n/**\n * a reference to the dialog itself. can be injected into the component added to the\n * overlay and then used to close itself.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class DialogRef extends OverlayAccessor {}\n","import {\n ConnectionPositionPair,\n FlexibleConnectedPositionStrategy,\n GlobalPositionStrategy,\n Overlay,\n RepositionScrollStrategy,\n RepositionScrollStrategyConfig\n} from '@angular/cdk/overlay';\nimport { ComponentPortal, ComponentType } from '@angular/cdk/portal';\nimport { Injectable, Injector, inject } from '@angular/core';\n\nimport { IOverlayConfig } from '../model';\nimport { OverlayAccessor } from './overlay-accessor';\n\nexport const OVERLAY_DEFAULT_CONFIG: IOverlayConfig = {\n isModal: false,\n hasBackdrop: true,\n backdropClass: 'overlay-backdrop',\n panelClass: 'overlay-panel'\n};\n\n@Injectable({\n providedIn: 'root'\n})\nexport abstract class OverlayService {\n protected getScrollStrategy(config?: RepositionScrollStrategyConfig): RepositionScrollStrategy {\n return this.overlay.scrollStrategies.reposition(config);\n }\n\n protected getPosition(config?: IOverlayConfig): GlobalPositionStrategy | FlexibleConnectedPositionStrategy {\n if (config.origin) {\n return this.overlay\n .position()\n .flexibleConnectedTo(config.origin)\n .withPositions(this.getPositionAnchors(config))\n .withFlexibleDimensions(false)\n .withPush(false);\n }\n\n return this.overlay.position().global().centerHorizontally().centerVertically();\n }\n\n abstract createInjector(overlayRef: OverlayAccessor, overlayConfig: IOverlayConfig): Injector;\n\n protected readonly overlay = inject(Overlay);\n protected readonly injector = inject(Injector);\n\n constructor() {}\n\n /**\n * open a custom component in an overlay\n */\n open(component: ComponentType, config: IOverlayConfig = {}): OverlayAccessor {\n config = this.extendConfig(config);\n\n /** create the overlay with customizable options */\n const overlayRef = this.overlay.create(config);\n\n /** create dialogRef to return */\n const overlayAccessor = new OverlayAccessor(overlayRef);\n\n const injector = this.createInjector(overlayAccessor, config);\n\n /** attach component portal to the overlay*/\n const portal = new ComponentPortal(component, null, injector);\n overlayRef.attach(portal);\n\n return overlayAccessor;\n }\n\n protected extendConfig(config: IOverlayConfig = {}): IOverlayConfig {\n /** globally centered position strategy */\n const scrollStrategy = this.getScrollStrategy({ autoClose: false, scrollThrottle: 50 });\n\n const positionStrategy = this.getPosition(config);\n\n return Object.assign({ ...OVERLAY_DEFAULT_CONFIG }, { positionStrategy }, { scrollStrategy }, { ...config });\n }\n\n private getPositionAnchors(config: IOverlayConfig): ConnectionPositionPair[] {\n const { origin, offsetX, offsetY } = config;\n\n return [\n {\n //bottom\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetX: 0,\n offsetY: 20\n },\n {\n //top\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetX: 0,\n offsetY: -20\n },\n\n {\n //left\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: 10,\n offsetY: 0\n },\n {\n //right\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: 10,\n offsetY: 0\n }\n ];\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { IAlertConfig, IConfirmConfig, ITooltipConfig } from '../model/dialog.interface';\n\nexport const DIALOG_CONFIG = new InjectionToken('DIALOG_CONFIG');\n","import { ComponentType } from '@angular/cdk/overlay';\nimport { Injectable, Injector } from '@angular/core';\nimport { IOverlayConfig } from '../../model';\nimport { OverlayAccessor, OverlayService } from '../../services';\nimport { DIALOG_CONFIG } from '../tokens';\nimport { DialogRef } from './dialog-ref';\n\n/**\n * @description\n * handles opening & closing popup dialogs, it uses the overlay service to inherit\n * common overlay behavior and configuration and adds to it customization specific\n * to dialog overlay\n */\n\nconst DIALOG_DEFAULT_CONFIG = {\n panelClass: 'dialog-panel'\n};\n\nconst DIALOG_FULL_SCREEN_CONFIG = {\n width: '90vw',\n height: '98vh',\n panelClass: 'full-screen-panel',\n buttons: {\n ok: 'סגור'\n }\n};\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DialogService extends OverlayService {\n constructor() {\n super();\n }\n\n /**\n * @description\n * opens a custom component in an overlay as popup dialog\n */\n override open(component: ComponentType, config: IOverlayConfig = {}): OverlayAccessor {\n config = Object.assign({ ...DIALOG_DEFAULT_CONFIG }, { ...config });\n\n if (config.isFullScreen) {\n config = Object.assign({ ...config }, { ...DIALOG_FULL_SCREEN_CONFIG });\n }\n\n return super.open(component, config);\n }\n\n /**\n * @description\n * creates an injector specifically for the overlay component. in order to inject the dialog\n * ref & config into the\n * @param overlayRef a dialog reference class exposing dialog options to the dialog component\n * @param overlayConfig a dialog config object specifying data & ui settings\n * @returns an injector with providers for the overlay dialog\n */\n override createInjector(overlayRef: OverlayAccessor, overlayConfig: IOverlayConfig): Injector {\n return Injector.create({\n parent: this.injector,\n providers: [\n { provide: DialogRef, useValue: overlayRef },\n { provide: DIALOG_CONFIG, useValue: overlayConfig }\n ]\n });\n }\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[dialogIcon]',\n standalone: true\n})\nexport class DialogIconDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[dialogTitle]',\n standalone: true\n})\nexport class DialogTitleDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[dialogBody]',\n standalone: true\n})\nexport class DialogBodyDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[dialogFooter]',\n standalone: true\n})\nexport class DialogFooterDirective {\n constructor(public tpl: TemplateRef) {}\n}\n","import { NgIf, NgStyle, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n inject,\n input,\n signal\n} from '@angular/core';\nimport { ThemeAssetComponent } from '@partners/themes';\nimport { filter, take } from 'rxjs/operators';\nimport { DIALOG_ANIMATION } from '../../../../animations/dialog.animation';\nimport { TDialogButtons } from '../../../model';\nimport { DialogRef } from '../../services';\nimport { DIALOG_CONFIG } from '../../tokens';\n\nimport { DialogBodyDirective, DialogFooterDirective, DialogIconDirective, DialogTitleDirective } from '../dialog-slots';\n\n@Component({\n standalone: true,\n selector: 'dialog-container',\n imports: [NgIf, NgStyle, NgTemplateOutlet, ThemeAssetComponent],\n template: `\n \n
\n \n
\n
\n \n
\n \n
\n
\n\n \n
\n

\n \n

\n
\n
\n\n \n
\n \n
\n
\n\n \n
\n
\n \n
\n
\n
\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [DIALOG_ANIMATION],\n host: {\n '[@dialog]': 'state',\n '(@dialog.start)': 'animationBegin($event)',\n '(@dialog.done)': 'animationComplete($event)',\n class: 'dialog-container'\n }\n})\nexport class DialogContainerComponent implements OnInit, OnDestroy, AfterViewInit {\n state: 'open' | 'close' = 'close';\n\n @ContentChild(DialogIconDirective, { static: true })\n iconTemplate: DialogIconDirective;\n\n @ContentChild(DialogTitleDirective, { static: true })\n titleTemplate: DialogTitleDirective;\n\n @ContentChild(DialogBodyDirective, { static: true })\n bodyTemplate: DialogBodyDirective;\n\n @ContentChild(DialogFooterDirective, { static: true })\n footerTemplate: DialogFooterDirective;\n\n iconName = signal(undefined);\n\n get buttons(): TDialogButtons {\n return this.dialogConfig.buttons;\n }\n\n get hasCloseButton(): boolean {\n return !this.dialogConfig.hideCloseIcon;\n }\n\n get hasIcon(): boolean {\n return !this.dialogConfig.hideIcon;\n }\n\n preventScroll = input(false);\n\n dialogRef = inject(DialogRef);\n dialogConfig = inject(DIALOG_CONFIG);\n\n // private readonly _elementRef = inject(ElementRef);\n private readonly _changeDetector = inject(ChangeDetectorRef);\n private readonly _actionResponse = signal(undefined);\n // private _animationBuilder = inject(AnimationBuilder);\n // private _animationPlayer: AnimationPlayer | undefined;\n\n constructor() {}\n\n dismissDialog(result: R = undefined) {\n this.state = 'close';\n this._actionResponse.set(result);\n }\n\n ngOnInit(): void {\n this.state = 'open';\n this.dialogRef.backdropClick$\n .pipe(\n take(1),\n filter(() => {\n return !this.dialogConfig.isModal;\n })\n )\n .subscribe(() => {\n this.dismissDialog(false);\n this._actionResponse.set(false);\n this._changeDetector.markForCheck();\n });\n\n if (this.dialogConfig?.icon) {\n this.iconName.set(this.dialogConfig?.icon);\n }\n }\n\n ngOnDestroy(): void {\n this.state = 'close';\n }\n\n ngAfterViewInit(): void {\n this._changeDetector.detectChanges();\n // this.playAnimation();\n }\n\n // playAnimation(): void {\n // const player = this.getAnimationPlayer();\n // if (!player) {\n // return;\n // }\n // player.play();\n // }\n\n animationBegin() {}\n\n animationComplete() {\n if (this.state === 'open') {\n return;\n }\n\n const response = this._actionResponse();\n this.dialogRef.dismiss(response);\n }\n\n // private getAnimationPlayer(): AnimationPlayer | undefined {\n // if (!this._elementRef?.nativeElement) {\n // return undefined;\n // }\n // if (!this._animationPlayer) {\n // const factory = this._animationBuilder.build([\n // transition('* => open', [\n // style({ opacity: 0, transform: 'translateY(50vh) scale(.7)' }),\n // animate('950ms cubic-bezier(0,.74,0,1)', style({ opacity: 1, transform: 'translateY(0) scale(1)' }))\n // ]),\n // transition('* => close', [\n // style({ opacity: 1, transform: 'translateY(0%) scale(1)' }),\n // animate('450ms cubic-bezier(.54,.76,.51,1.03)', style({ opacity: 0, transform: 'translateY(10%) scale(.7)' }))\n // ])\n // ]);\n // this._animationPlayer = factory.create(this._elementRef?.nativeElement);\n // }\n // return this._animationPlayer;\n // }\n}\n","import { NgModule } from '@angular/core';\n\n@NgModule({\n imports: []\n})\nexport class UiModule {}\n","import { ChangeDetectorRef, Directive, ElementRef, inject, input, signal } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { isNotEmpty } from '../../functions';\nimport { IBaseInputMask } from '../functions';\n\n/**\n * @description\n * the current input-masking library, doesn't toggle the mask pattern visibility.\n * the template is always shown, even when the input is not focused. this directive\n * override that default behavior. placing it on an input element, will toggle the\n * mask visibility on focus and blur events.\n */\n\n@Directive({\n selector: '[maskOnFocus]',\n standalone: true,\n host: {\n '(focus)': 'apply(true, $event)',\n '(blur)': 'apply(false, $event)'\n },\n exportAs: 'maskState'\n})\nexport class MaskToggleDirective {\n #changeDetector = inject(ChangeDetectorRef);\n #sourceElement = inject(ElementRef).nativeElement;\n\n maskOnFocus = input.required<[FormControl, IBaseInputMask]>();\n\n readonly isApplied = signal(false);\n\n constructor() {}\n\n apply(shouldApply: boolean, event?: FocusEvent) {\n // event?.stopImmediatePropagation();\n const [formControl, maskOptions] = this.maskOnFocus();\n\n if (!shouldApply) {\n shouldApply = isNotEmpty(formControl.value); // this.#sourceElement.value === maskOptions.maskPattern;\n }\n\n this.isApplied.set(shouldApply);\n formControl.updateValueAndValidity({ onlySelf: false, emitEvent: true });\n this.#changeDetector.detectChanges();\n }\n}\n","import { NgxMaskDirective, provideNgxMask } from 'ngx-mask';\nimport { isNumber } from '../../functions';\nimport { MaskToggleDirective } from '../directives';\n\nexport interface IBaseInputMask {\n maskPattern: string | null;\n showMaskPattern: boolean | null;\n clearForModel: boolean | null;\n placeHolderChar: string | null;\n delimiterChar: string;\n suffix: string | null;\n prefix: string;\n specialCharacters: string[];\n}\n\nexport interface IInputMask extends IBaseInputMask {\n type: 'default';\n}\n\nexport interface INumericInputMask extends IBaseInputMask {\n type: 'numeric';\n numOfDigits: number | null;\n decimalMarker: string | null;\n allowNegativeNumbers: boolean;\n}\n\nconst NUMERIC_CHAR = '0';\n\nexport function defaultMask(): IInputMask {\n return {\n type: 'default',\n maskPattern: '',\n showMaskPattern: false,\n clearForModel: true,\n placeHolderChar: '_',\n delimiterChar: '',\n suffix: '',\n prefix: '',\n specialCharacters: []\n };\n}\n\nexport function defaultNumericMask(): INumericInputMask {\n return {\n type: 'numeric',\n numOfDigits: null,\n maskPattern: null,\n showMaskPattern: null,\n clearForModel: null,\n placeHolderChar: null,\n delimiterChar: '',\n decimalMarker: null,\n allowNegativeNumbers: false,\n suffix: null,\n prefix: '',\n specialCharacters: []\n };\n}\n\nexport function numericMask(partialMask?: Partial): INumericInputMask {\n if (isNumber(partialMask?.numOfDigits)) {\n partialMask = { ...partialMask, ...{ maskPattern: NUMERIC_CHAR.repeat(partialMask.numOfDigits) } };\n }\n\n const numMask = {\n ...defaultNumericMask(),\n numOfDigits: 0,\n clearForModel: true,\n showMaskPattern: false,\n ...partialMask\n };\n return numMask;\n}\n\nexport function currencyMask(partialMask?: Partial): INumericInputMask {\n return {\n ...defaultNumericMask(),\n maskPattern: 'separator',\n ...partialMask,\n prefix: '₪',\n delimiterChar: ',',\n showMaskPattern: false,\n clearForModel: true\n };\n}\n\nexport function dateMask(partialMask?: Partial): IInputMask {\n const m = {\n ...defaultMask(),\n showMaskPattern: true,\n maskPattern: '00/00/0000',\n clearForModel: false,\n ...partialMask\n };\n\n return m;\n}\n\nexport function shortDateMask(partialMask?: Partial): IInputMask {\n return dateMask({ maskPattern: 'M0/00' });\n}\n\nfunction phoneMask(partialMask?: Partial): IInputMask {\n return {\n ...defaultMask(),\n showMaskPattern: true,\n clearForModel: false,\n ...partialMask\n };\n}\n\nexport function landlinePhoneMask(partialMask?: Partial): IInputMask {\n return phoneMask({ ...partialMask, maskPattern: '00-0000000' });\n}\n\nexport function mobilePhoneMask(partialMask?: Partial): IInputMask {\n return phoneMask({ ...partialMask, maskPattern: '000-0000000' });\n}\n\nexport const MaskingImportPack = [NgxMaskDirective, MaskToggleDirective] as const;\nexport const provideMasking = provideNgxMask;\n","import { DOCUMENT } from '@angular/common';\n// import { HttpClient } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { MEM_PATH } from '.';\n\n/**\n * @description - MemService injects Memcyco scripts into the app to enhance security and prevent phishing attacks.\n * It dynamically injects scripts into the head and body of the index.html.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class MemService {\n #document = inject(DOCUMENT);\n // #httpClient = inject(HttpClient);\n\n constructor() {}\n\n injectMemScripts(): void {\n try {\n this.#injectMemScriptsHead();\n this.#injectMemScriptBody();\n } catch (error) {\n console.error(error);\n }\n }\n\n #injectMemScriptsHead(): void {\n const locMemScriptElement = this.#createLOCMemScript();\n this.#document.head.appendChild(locMemScriptElement);\n const sbMemScriptElement = this.#createSBScriptToHead();\n this.#document.head.appendChild(sbMemScriptElement);\n }\n\n #injectMemScriptBody(): void {\n const { body } = this.#document;\n const script = this.#createMemBodyScript();\n body.appendChild(script);\n }\n\n /**\n * @description - SB means 'Safety Belt' script. Published by Memcyco. Meant to prevent XSS & Phishing attacks.\n *\n */\n #createSBScriptToHead(): HTMLScriptElement {\n const scriptElement: HTMLScriptElement = this.#document.createElement('script');\n scriptElement.src = MEM_PATH;\n scriptElement.type = 'text/javascript';\n scriptElement.defer = true;\n return scriptElement;\n }\n\n /**\n * @description - LOC means HTML 'line of code' script.\n * This script is hidden from the user and does not appear in the HTML code.\n * Instead, we can see it in the network as 'gwf', which means it loaded successfully.\n */\n #createLOCMemScript(): HTMLScriptElement {\n const scriptElement = this.#document.createElement('script');\n scriptElement.src = 'https://d2lyx5ly60ksu3.cloudfront.net/cdn/ca/mutha-calonline-wrapper.js';\n scriptElement.defer = true;\n scriptElement.referrerPolicy = 'strict-origin-when-cross-origin';\n return scriptElement;\n }\n\n #createMemBodyScript(): HTMLImageElement {\n const imgElement = this.#document.createElement('img');\n imgElement.src = 'https://d2lyx5ly60ksu3.cloudfront.net/cdn/cd/7c2c75a75890dc239675588aea0790d4-icon.jpg';\n imgElement.style.display = 'none';\n imgElement.style.height = '0px';\n imgElement.style.width = '0px';\n imgElement.style.pointerEvents = 'unset';\n return imgElement;\n }\n\n // #loadMemScript(): void {\n // this.#httpClient\n // .get(MEM_PATH, {\n // responseType: 'text'\n // })\n // .pipe(\n // takeOnce(),\n // tap((content) => {\n // this.#addScriptToHead(content);\n // })\n // )\n // .subscribe();\n // }\n}\n","export const MEM_PATH = 'assets/mem/mem.js';\n","import { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n/**\n * a custom operator to clone an array, this is a shallow copy.\n */\nexport function cloneImmutableArray() {\n return (source$: Observable): Observable => {\n return source$.pipe(map((sourceArray: T[]) => [...sourceArray]));\n };\n}\n","import { shareReplay } from 'rxjs/operators';\n\n/**\n * an custom operator to emulate the most common shareReplay() use-case (refCount = true and bufferSize = 1)\n * same as writing \"shareReplay(1)\"\" in older versions of RxJs. its emitting the last value emitted to any\n * consumer without creating new subscriptions\n */\nexport function shareReplayLast() {\n return shareReplay({ refCount: true, bufferSize: 1 });\n}\n","import { Observable } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\n/**\n * a custom operator to emulate RxJs's \"take(1)\"\" native operator\n */\nexport function takeOnce() {\n return (source$: Observable): Observable => {\n return source$.pipe(take(1));\n };\n}\n","import { DecimalPipe } from '@angular/common';\nimport { Injectable, Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'toDecimal',\n standalone: true\n})\n@Injectable({\n providedIn: 'root'\n})\nexport class ToDecimalPipe implements PipeTransform {\n constructor(private decimalPipe: DecimalPipe) {}\n\n transform(value: string | number, ...args: string[]): string {\n const formatPattern = Boolean(args?.length) ? args[0] : '0.0-0';\n\n return this.decimalPipe.transform(value, formatPattern);\n }\n}\n","import { Pipe, PipeTransform, SecurityContext } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n@Pipe({\n standalone: true,\n name: 'mark'\n})\nexport class MarkPipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {}\n\n transform(value: any, args?: any): any {\n try {\n if (!args) {\n return value;\n }\n const strValue = value.toString();\n // search the value global (not just first match)\n const re = new RegExp(args, 'gi');\n const match = strValue.match(re);\n\n // no match, just return the original value\n if (!match) {\n return value;\n }\n\n if (!strValue?.length) {\n return strValue;\n }\n\n const replacedValue = strValue.replace(match[0], '' + match[0] + '');\n\n return this.sanitizer.sanitize(SecurityContext.HTML, replacedValue);\n // return this.sanitizer.bypassSecurityTrustHtml(replacedValue);\n } catch (e) {\n return value;\n }\n }\n}\n","import { DecimalPipe } from '@angular/common';\nimport { Injectable, Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'toMoney',\n standalone: true\n})\n@Injectable({\n providedIn: 'root'\n})\nexport class ToMoneyPipe implements PipeTransform {\n constructor(private decimalPipe: DecimalPipe) {}\n\n transform(value: string | number, ...args: string[]): string {\n const formatPattern = Boolean(args?.length) ? args[0] : '0.0-0';\n\n const transformedValue = this.decimalPipe.transform(value, formatPattern);\n\n return `${transformedValue} ₪`;\n }\n}\n","import { DecimalPipe } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ToDecimalPipe } from './decimal-pipe/decimal.pipe';\nimport { ToMoneyPipe } from './money-pipe/money.pipe';\n\n@NgModule({\n imports: [DecimalPipe, ToDecimalPipe, ToMoneyPipe],\n providers: [DecimalPipe, ToDecimalPipe, ToMoneyPipe],\n declarations: [],\n exports: []\n})\nexport class NumericPipesModule {}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl } from '@angular/platform-browser';\n\nexport type TSaniziable = 'html' | 'style' | 'script' | 'url' | 'resourceUrl';\n/**\n * @description\n *\n * This Pipe is for rendering text as HTML\n * Do not use the pipe for \\ tags\n */\n@Pipe({\n standalone: true,\n name: 'sanitize'\n})\nexport class SanitizePipe implements PipeTransform {\n constructor(protected sanitizer: DomSanitizer) {}\n\n public transform(value: any, type: TSaniziable): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl {\n switch (type) {\n case 'html':\n return this.sanitizer.bypassSecurityTrustHtml(value);\n case 'style':\n return this.sanitizer.bypassSecurityTrustStyle(value);\n case 'script':\n return this.sanitizer.bypassSecurityTrustScript(value);\n case 'url':\n return this.sanitizer.bypassSecurityTrustUrl(value);\n case 'resourceUrl':\n return this.sanitizer.bypassSecurityTrustResourceUrl(value);\n default:\n throw new Error(`Invalid safe type specified: ${type}`);\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { delay, finalize, isObservable, Observable } from 'rxjs';\nimport { Console, isDefined, isPromise } from '../../functions';\nimport { takeOnce } from '../../operators';\nimport { TAsyncFnOptions, TAsyncFnWrapper } from './async-fn.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AsyncFnService {\n constructor() {}\n\n /**\n * @description\n * a function which executes an async function. the async function received as arg #1\n * is called and its progress is tracked to detect its finalization. this is useful to\n * indicate back to the consumer the state of the async process (pending or not).\n * @param asyncFn a function with async return value (either observable or promise)\n * @param pendingInd a reference to writable boolean signal\n */\n runAsyncMethod(asyncFn: TAsyncFnWrapper | undefined, asyncOptions: TAsyncFnOptions) {\n /** execute the async callback function, and get its async return object (observable | promise) */\n const fnResponse = asyncFn();\n\n /** check if the async callback function is an observable */\n if (isObservable(fnResponse)) {\n this.setPending(asyncOptions, true);\n Console.log(`Before Button clicked..`);\n (>fnResponse)\n .pipe(\n takeOnce(),\n delay(asyncOptions?.trailTime || 0),\n /**\n * add finalize operator as last change event of the the async observable. this way -\n * pending state can always be reset to false when observable is complete */\n finalize(() => {\n this.setPending(asyncOptions, false);\n Console.log(`After Form submitted!`);\n })\n )\n .subscribe();\n return;\n }\n\n /** check if the async callback function is a promise */\n if (isPromise(fnResponse)) {\n this.setPending(asyncOptions, true);\n Console.log(`Before Button clicked..`);\n /**\n * add finally function as last change event of the the promise. this way -\n * pending state can always be reset to false when the promise is done */\n (>fnResponse).finally(() => {\n this.setPending(asyncOptions, false);\n Console.log(`After Button clicked!`);\n });\n }\n }\n\n private setPending(asyncOptions: TAsyncFnOptions, value: boolean) {\n const isPendingInd = isDefined(asyncOptions?.pendingInd);\n if (!isPendingInd) {\n return;\n }\n const { pendingInd } = asyncOptions;\n pendingInd.set(value);\n }\n}\n\n/***/\n/* usage examples\n **/\n\n// /** call a method which returns an observable */\n// httpWithObservable(model: IOtpModel): TAsyncFnWrapper {\n// return (model) => this.service.sendSomething(model);\n// }\n\n// /** call a method which returns a promise */\n// sendOtpViaHttp(): TAsyncFnWrapper {\n// return async (model) => {\n// return new Promise((resolve, reject) => {\n// setTimeout(() => {\n// resolve(true);\n// }, 3000);\n// }).finally(() => {\n// Console.log(`Original finally`);\n// });\n// };\n// }\n\n// /** implement on a submit button */\n// \n// המשך\n// \n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { IDateConfig } from './model';\nimport { ToDatePipe, ToTimePipe } from './pipes';\nimport { DateUtil, dateServiceFactory } from './services';\nimport { DATE_CONFIG } from './tokens/date.token';\n\nconst DEFAULT_OPTIONS: IDateConfig = {\n format: 'DD/MM/YYYY',\n locale: 'he-IL'\n};\n\n@NgModule({\n imports: [ToDatePipe, ToTimePipe],\n providers: [ToDatePipe, ToTimePipe, { provide: DateUtil, useFactory: dateServiceFactory }],\n declarations: [],\n exports: []\n})\nexport class DateUtilModule {\n static forRoot(dateOptions?: IDateConfig): ModuleWithProviders {\n return {\n ngModule: DateUtilModule,\n providers: [\n { provide: DateUtil, useFactory: dateServiceFactory },\n {\n provide: DATE_CONFIG,\n useValue: { ...DEFAULT_OPTIONS, ...dateOptions }\n }\n ]\n };\n }\n}\n","import { Injectable, Pipe, PipeTransform } from '@angular/core';\nimport { isUndefined } from '../../functions';\nimport { TDateFormat } from '../model/date.types';\nimport { DateUtil } from '../services';\n\n@Pipe({\n name: 'toDate',\n standalone: true\n})\n@Injectable({\n providedIn: 'root'\n})\nexport class ToDatePipe implements PipeTransform {\n constructor() {}\n\n transform(value: string | Date, format: TDateFormat = 'DD/MM/YYYY'): string {\n if (isUndefined(value)) {\n return '';\n }\n\n const formatted = DateUtil.formatDate(value, format);\n return formatted;\n }\n}\n","import { Injectable, Pipe, PipeTransform } from '@angular/core';\nimport { TTimeFormat } from '../model/date.types';\nimport { DateUtil } from '../services';\n\n@Pipe({\n name: 'toTime',\n standalone: true\n})\n@Injectable({\n providedIn: 'root'\n})\nexport class ToTimePipe implements PipeTransform {\n constructor() {}\n\n transform(value: string, format: TTimeFormat = 'HH:MM'): string {\n const formatted = DateUtil.formatTime(value, format);\n return formatted;\n }\n}\n","export const SHORT_DATE_PATTERN: RegExp = /^(0[1-9]|1[0-2])\\/\\d{4}$/;\nexport const EXTRA_SHORT_DATE_PATTERN: RegExp = /^(0[1-9]|1[0-2])\\/\\d{2}$/;\nexport const HEBREW_DATE_PATTERN: RegExp = /^(0[1-9]|[1-2][0-9]|3[0-1])\\/(0[1-9]|1[0-2])\\/\\d{4}$/;\nexport const DEFAULT_DATE_PATTERN: RegExp = /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/;\nexport const ISO_DATE_PATTERN: RegExp = /^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:?\\d{2})?)?$/;\nexport const ISO_TIME_PATTERN: RegExp =\n /^(?:2[0-3]|[01]?[0-9]):[0-5][0-9]:[0-5][0-9]$/; /** matches a 24 hrs format for example: \"21:06:13\" */\n","import { Injectable, Injector, inject } from '@angular/core';\n\nimport { isNumber } from '../../functions';\nimport {\n DEFAULT_DATE_PATTERN,\n EXTRA_SHORT_DATE_PATTERN,\n HEBREW_DATE_PATTERN,\n ISO_DATE_PATTERN,\n ISO_TIME_PATTERN,\n SHORT_DATE_PATTERN\n} from '../constants/date.patterns';\nimport { IDateConfig } from '../model';\nimport {\n TAutoDayOptions,\n TDateDiff,\n TDateDiffUnit,\n TDateFormat,\n TDateRange,\n TDiffOptions,\n TPeriodDiffOptions,\n TTimeFormat\n} from '../model/date.types';\nimport { DATE_CONFIG } from '../tokens';\n\n@Injectable({\n providedIn: 'root',\n useFactory: dateServiceFactory\n})\nexport class DateUtil {\n static dateOptions: IDateConfig;\n static dateFormatter: any;\n\n /**\n * @description\n * assert weather or not a date value is lower then a given date AND lower then a given date\n * @param date the date to compare against min & max dates\n * @param { min, max } the minimum and maximum values of the dates range\n * @returns a boolean indicating weather the specified date is lower then max AND higher then min\n */\n static isDateInRange = (date: Date | string, { min, max, baseYear }: TDateRange): boolean => {\n try {\n const dateValue = DateUtil.stringToDate(date, baseYear);\n const minDateValue = DateUtil.stringToDate(min);\n const maxDateValue = DateUtil.stringToDate(max);\n const inRange = dateValue >= minDateValue && dateValue <= maxDateValue;\n return inRange;\n } catch (e) {\n return false;\n }\n };\n\n private static isStringDate(value: string | Date): value is string {\n return typeof value === 'string';\n }\n\n private static isNativeDate(value: string | Date): value is Date {\n return value instanceof Date;\n }\n\n private static stringDateForDiff(date: Date | string, autoDayOptions: TAutoDayOptions = 'first') {\n if (DateUtil.isNativeDate(date)) {\n return DateUtil.adjustDate(date, autoDayOptions);\n }\n\n const requiresAutoDay = EXTRA_SHORT_DATE_PATTERN.test(date);\n\n if (!requiresAutoDay) {\n DateUtil.stringToDate(date);\n }\n\n if (autoDayOptions === 'first') {\n return DateUtil.stringToDate(`01/${date}`);\n }\n\n if (autoDayOptions === 'today') {\n return DateUtil.stringToDate(`${DateUtil.getDay()}/${date}`);\n }\n\n throw new Error(`Unable to determine auto day value when converting short date string format to date object!`);\n }\n\n /**\n * @description - Modifies a given Date to align with the specified day of the month.\n * @param date - The date to be adjusted.\n * @param autoDayOptions - The adjustment option ('first', 'last', or 'today').\n * @returns - The adjusted date based on the `autoDayOptions`.\n *\n * examples:\n * adjustDate(\"Thu Dec 05 2024 07:37:06 GMT+0200\", \"first\") =>\"Sun Dec 01 2024 00:00:00 GMT+0200\"\n * adjustDate(\"Thu Dec 05 2024 07:37:06 GMT+0200\", \"last\") => \"Tue Dec 31 2024 00:00:00 GMT+0200\"\n */\n\n private static adjustDate(date: Date, autoDayOptions: TAutoDayOptions): Date {\n switch (autoDayOptions) {\n case 'first':\n return new Date(date.getFullYear(), date.getMonth(), 1);\n case 'last':\n return new Date(date.getFullYear(), date.getMonth() + 1, 0);\n case 'today':\n return date;\n default:\n throw new Error(`Invalid autoDayOptions value: ${autoDayOptions}`);\n }\n }\n\n /**\n * @description\n * create a date value from a specified period of time which is added or subtracted to/from a specific date.\n * the period units is predefined and can be 'years' | 'months | 'weeks | 'days\n * @param date the date to calculate time passed since\n * @param { value, unit } a destruction of diff arguments\n * @returns a string formatted date which value represents the period elapsed since the original date\n * plus or minus the diff period calculation\n *\n * examples:\n * dateDiff('01/01/2015', { 10, 'days' }) => 11/01/2015\n * dateDiff('30/12/2021', { 2, 'months' }) => 28/02/2022\n */\n static dateDiff = (\n { value, unit }: TDateDiff,\n diffOptions: TDiffOptions = { anchorDate: new Date(), autoDay: 'first' }\n ): string => {\n const { anchorDate, autoDay } = diffOptions;\n const originalDate = DateUtil.stringDateForDiff(anchorDate, autoDay);\n let diffDate;\n switch (unit) {\n case 'years':\n diffDate = new Date(originalDate);\n diffDate.setFullYear(diffDate.getFullYear() + value);\n break;\n case 'months':\n diffDate = new Date(originalDate);\n diffDate.setMonth(diffDate.getMonth() + value);\n break;\n case 'weeks':\n diffDate = new Date(originalDate);\n diffDate.setDate(originalDate.getDate() + value * 7);\n break;\n case 'days':\n diffDate = new Date(originalDate);\n diffDate.setDate(diffDate.getDate() + value);\n break;\n default:\n throw new Error('Invalid period type');\n }\n\n return DateUtil.dateToString(diffDate, 'DD/MM/YYYY');\n };\n\n /**\n * @description\n * create a period diff value from a specified range of two dates (to/from). the period units\n * can be 'years' | 'months | 'weeks | 'days\n * @param startDate the start period date\n * @param endDate the end period date\n * @param unit the unit of the diff period result in which should be returned ('years' | 'months | 'weeks | 'days)\n * @returns a number which represents the time period between the two dates\n *\n * example:\n * periodDiff('01/01/2015', '20/10/2019', 'years') => 5.38\n * periodDiff('10/09/2023', '31/12/2023', 'days') => 113.04\n */\n\n static periodDiff(\n startDate: string | Date = new Date(),\n endDate: string | Date = new Date(),\n unit: TDateDiffUnit,\n options: TPeriodDiffOptions = { round: false, decimals: 0 }\n ): TDateDiff {\n const start = DateUtil.stringToDate(startDate);\n const end = DateUtil.stringToDate(endDate);\n\n const timeDiff = Math.round(Number(end.getTime()) - Number(start.getTime()));\n const daysDiff = timeDiff / (1000 * 60 * 60 * 24);\n const avgDaysInMonth = 30.436875;\n let rawPeriod: number;\n\n switch (unit) {\n case 'years':\n rawPeriod = daysDiff / avgDaysInMonth / 12;\n break;\n case 'months':\n rawPeriod = daysDiff / avgDaysInMonth;\n break;\n case 'weeks':\n rawPeriod = daysDiff / 7;\n break;\n case 'days':\n rawPeriod = daysDiff;\n break;\n default:\n throw new Error('Invalid period type');\n }\n\n if (isNumber(options?.decimals)) {\n rawPeriod = DateUtil.truncateNumber(rawPeriod, options?.decimals);\n }\n\n if (options?.round) {\n rawPeriod = Math.round(rawPeriod);\n }\n\n return { unit, value: rawPeriod };\n }\n\n static truncateNumber(value: number, toDigits: number): number {\n const factor = Math.pow(10, toDigits);\n return Math.floor(value * factor) / factor;\n }\n\n static formatTime(value: string | Date, format: TTimeFormat = 'HH:MM') {\n const dateObject = DateUtil.stringToDate(value);\n return DateUtil.timeToString(dateObject, format);\n }\n\n static formatDate(value: string | Date, format: TDateFormat = 'DD/MM/YYYY') {\n const dateObject = DateUtil.stringToDate(value);\n return DateUtil.dateToString(dateObject, format);\n }\n\n /**\n * @description\n * converts a formatted date string into a js Date object. this is useful when a Date\n * object is required to perform manipulation & calculations on date values\n * @param date a js Date object\n * @param format required format for result string\n * @returns a string value matching the Date object arg value\n */\n static dateToString = (date: string | Date, format: TDateFormat): string => {\n if (typeof date === 'string') {\n return date;\n }\n\n if (!(date instanceof Date)) {\n throw new Error('Could not complete dateToString(), \"date\" arg is not an instance of a Date() object');\n }\n\n const day = date.getDate().toString().padStart(2, '0');\n const month = (date.getMonth() + 1).toString().padStart(2, '0'); // Months are zero-based\n const year = date.getFullYear();\n const shortYear = year.toString().slice(-2);\n\n if (format === 'DD/MM/YYYY') {\n return `${day}/${month}/${year}`;\n }\n if (format === 'MM/YYYY') {\n return `${month}/${year}`;\n }\n if (format === 'MM/YY') {\n return `${month}/${shortYear}`;\n }\n if (format === 'DD/MM') {\n return `${day}/${month}`;\n }\n if (format === 'YYYY-MM-DDTHH:MM:SS') {\n return `${year}-${month}-${year}T00:00:00`;\n }\n if (format === 'YYYY-MM-DD') {\n return `${year}-${month}-${year}`;\n }\n throw new Error(\n 'Could not complete dateToString(), \"${format}\" is not a supported date format (use: \"DD/MM/YYYY\" | \"MM/YYYY\" | \"YYYY-MM-DD\" )'\n );\n };\n\n static timeToString = (time: string | Date, format: TTimeFormat): string => {\n if (typeof time === 'string') {\n return time;\n }\n\n if (!(time instanceof Date)) {\n throw new Error('Could not complete timeToString(), \"time\" arg is not an instance of a Date() object');\n }\n\n const hours = time.getHours().toString().padStart(2, '0'); // 0\n const minutes = time.getMinutes().toString().padStart(2, '0'); // 0\n const seconds = time.getSeconds().toString().padStart(2, '0'); // 0\n\n if (format === 'HH:MM') {\n return `${hours}:${minutes}`;\n }\n if (format === 'HH:MM:SS') {\n return `${hours}:${minutes}:${seconds}`;\n }\n\n throw new Error(\n 'Could not complete timeToString(), \"${format}\" is not a supported time format (use: \"HH:MM\" | \"HH:MM:SS\" )'\n );\n };\n\n private static dateFromTimeString(time: string): Date {\n const defDate = new Date();\n const timeParts = time.split(':');\n const hours = parseInt(timeParts[0]);\n const minutes = parseInt(timeParts[1]);\n const seconds = parseInt(timeParts[2]);\n defDate.setHours(hours);\n defDate.setMinutes(minutes);\n defDate.setSeconds(seconds);\n return defDate;\n }\n\n /**\n * @description\n * converts a formatted date string into a js Date object. this is useful when a Date\n * object is required to perform manipulation & calculations on date values\n * @param date a string or Date object. (if date is Date object it is returned as is)\n * @returns a Date object set to a value matching the date string arg\n */\n static stringToDate = (date: string | Date, baseYear: number = 0): Date => {\n if (date instanceof Date) {\n return date;\n }\n\n if (!(typeof date === 'string')) {\n throw new Error('Could not complete stringToDate(), \"${date}\" arg is not a string');\n }\n\n if (ISO_TIME_PATTERN.test(date)) {\n const dateValue = DateUtil.dateFromTimeString(date);\n return dateValue;\n }\n if (ISO_DATE_PATTERN.test(date)) {\n const timestamp = Date.parse(date);\n return new Date(timestamp);\n }\n if (/** DD/MM/YYYY */ HEBREW_DATE_PATTERN.test(date)) {\n const [day, month, year] = date.split('/').map((x) => parseInt(x));\n return new Date(year, month - 1, day);\n }\n if (/** MM/YYYY */ SHORT_DATE_PATTERN.test(date)) {\n const [month, year] = date.split('/').map((x) => parseInt(x));\n return new Date(year, month - 1);\n }\n if (/** MM/YY */ EXTRA_SHORT_DATE_PATTERN.test(date)) {\n const [month, year] = date.split('/').map((x) => parseInt(x));\n return new Date(year + baseYear, month - 1);\n }\n\n if (DEFAULT_DATE_PATTERN.test(date)) {\n const [year, month, day] = date.split('-').map((x) => parseInt(x));\n return new Date(year, month - 1, day);\n }\n\n throw new Error(\n 'Could not complete dateToString(), \"${date}\" value is not a of a supported format (use: \"DD/MM/YYYY\" | \"MM/YYYY\" | \"YYYY-MM-DD\" )'\n );\n };\n\n static getToday = (format: TDateFormat = 'DD/MM/YYYY'): string => {\n return DateUtil.dateToString(new Date(), format);\n };\n\n static getYear = (): number => {\n return new Date().getFullYear();\n };\n\n static getMonth = (): number => {\n return new Date().getMonth() - 1;\n };\n\n static getDay = (): number => {\n return new Date().getDay();\n };\n}\n\nexport function dateServiceFactory(injector: Injector) {\n const service = new DateUtil();\n DateUtil.dateOptions = inject(DATE_CONFIG);\n const { locale, format } = inject(DATE_CONFIG);\n DateUtil.dateFormatter = new Intl.DateTimeFormat(locale);\n\n return service;\n}\n","import { InjectionToken } from '@angular/core';\nimport { IDateConfig } from '../model';\n\nexport const DATE_CONFIG = new InjectionToken('DATE_CONFIG');\n","export function isArray(value: any): value is Array {\n return Array.isArray(value);\n}\n\nexport function isBoolean(value: any): value is Boolean {\n if (typeof value === 'boolean') {\n return true;\n }\n\n if (typeof value === 'string') {\n const lowercaseValue = value.toLowerCase();\n return lowercaseValue === 'true' || lowercaseValue === 'false';\n }\n\n return false;\n}\nexport function isEmptyObject(obj: any): boolean {\n if (obj === null || obj === undefined) {\n return true;\n }\n return typeof obj === 'object' && Object.keys(obj).length === 0 && obj.constructor === Object;\n}\n\nexport function isEmptyArray(obj: any): boolean {\n if (obj === null || obj === undefined) {\n return true;\n }\n return isArray(obj) && obj?.length === 0;\n}\n\nexport function isEmpty(value: any): boolean {\n if (isArray(value) && isEmptyArray(value)) {\n return true;\n }\n if (typeof value === 'object' && isEmptyObject(value)) {\n return true;\n }\n return value === undefined || value === null || value === '';\n}\n\nexport function isNotEmpty(value: any): boolean {\n return !isEmpty(value);\n}\n\nexport function isUndefined(value: T | null | undefined): value is null | undefined {\n return value === null || value === undefined;\n}\n\nexport function isDefined(value: T | null | undefined): value is T {\n return !isUndefined(value);\n}\n\nexport function isFunction(value: any): value is Function {\n return typeof value === 'function';\n}\n\nexport function isNullOrUndefined(value: any): boolean {\n return value === null || value === undefined;\n}\n\nexport function isPromise(value: any): value is Promise {\n return typeof value?.then === 'function';\n}\n\nexport function isString(value: any): value is string {\n return typeof value === 'string' || value instanceof String;\n}\n\nexport function isObject(value: any): value is Object | object {\n return typeof value === 'object' && !!value;\n}\n\n/**\n * @description\n * assert value to be a number or not. it uses reg exp pattern to deliver the result\n * for the current value, it can evaluate number with or without numeric chars which\n * are not numbers like decimal point (123.45)\n * @param value a variable value of any type\n * @param options\n * withDecimal - evaluate value as a decimal, so \".\" char is acceptable\n * withFormat - evaluate value as a formatted number, so \",\" char is acceptable\n * @returns a boolean: true - if numeric evaluation succeeds, false - if not\n */\nexport function isNumber(value: any, options: { withFormat?: boolean } = { withFormat: true }): value is Number {\n const { withFormat } = options;\n\n if (isEmpty(value)) {\n return false;\n }\n\n if (withFormat) {\n return /^(\\d*\\.?\\d+|\\d{1,3}(,\\d{3})*(\\.\\d+)?)$/.test(value.toString());\n }\n\n return /^[+-]?([0-9]*[.])?[0-9]+$/.test(value.toString());\n}\n\n// export function parseNumber(input: string): number {\n// /** regular expression to match any character that is not a digit or a decimal point */\n// const cleanedString = input.replace(/[^\\d.]/g, '');\n\n// if (!cleanedString || isNaN(parseFloat(cleanedString))) {\n// return 0;\n// }\n\n// /** convert the cleaned string to a number */\n// const numericValue = parseFloat(cleanedString);\n// return numericValue;\n// }\n","/**\n * @description\n * calculates \"percent value\" of any given \"absolute value\" out of any given \"total\" value\n * @param value absolute numeric value to calculate\n * @param total total value (represents 100%)\n * @returns the percent of \"value\" out of \"total\"\n */\nexport function calcPercent(value: number, total: number) {\n let pct = Math.floor((value * 100) / total);\n pct = Math.max(pct, 0);\n pct = Math.min(pct, 100);\n return pct;\n}\n","import { Observable, from, isObservable, of } from 'rxjs';\nimport { isEmpty, isObject, isPromise, isArray } from './assertion.utils';\n\n/**\n * @description\n * coerce (force) a typed value to be an observable of that type, if the value is\n * already an observable - then we do nothing\n * @param value a value of any type (observable or not)\n * @returns an observable of type T\n */\nexport function coerceObservable(value: T | Observable): Observable {\n if (isObservable(value)) {\n return value as Observable;\n }\n if (Array.isArray(value) || isPromise(value)) {\n return from(value);\n }\n return of(value);\n}\n\n/**\n * @description\n * convert a value of any type to an array. if value is already an array - do nothing,\n * if value is not an array - create a new array and return it as the first item in that\n * array\n * @param value a value of any type\n * @returns an array of same type as value, with value as its first item (array[0] = item)\n */\nexport function coerceArray(value: T | T[]): T[] {\n return Array.isArray(value) ? value : [value];\n}\n\nexport function coerceBoolean(value: T): boolean {\n if (isEmpty(value)) {\n return false;\n }\n return Boolean(!!value);\n}\n\n/**\n * @description\n * force any value to be a number, whenever casting is possible. if value conversion\n * into numeric value is possible - return that converted value as number, if conversion\n * is not possible = return undefined. special handler for string value, in case it is\n * a formatted numeric string (\"5,236.2\") in which case, we clean the string from any\n * non-numeric chars and return just the numeric value;\n * @param value any value type\n * @returns a numeric value of the original value, or undefined when numeric conversion\n * not possible\n */\nexport function coerceNumber(value: T): number {\n const strValue = typeof value === 'string' ? value.replace(/[^0-9.-]+/g, '') : value;\n const numValue = +strValue;\n\n if (isNaN(numValue)) {\n return undefined;\n }\n\n return numValue;\n}\n\nexport function coerceDictionary(value: T): T {\n if (isObject(value)) {\n return value as T;\n }\n return {} as T;\n}\n\nexport function coerceString(value: any): string {\n if (isEmpty(value) || isObject(value) || isArray(value)) {\n value = '';\n }\n\n return (value as string).toString();\n}\n","import { isEmpty, isNumber } from './assertion.utils';\n\nexport interface IListFilterOptions {\n filterMode?: 'start' | 'include';\n emptyQueryMode?: 'match all' | 'match none';\n maxResults?: number | 'all';\n filterPredicate?: (option: T) => T[];\n props?: string[];\n}\n\nconst DEFAULT_FILTER_OPTIONS: IListFilterOptions = {\n filterMode: 'include',\n emptyQueryMode: 'match all',\n maxResults: 'all'\n};\n\n/**\n * @description\n * a generic list filtering method. will filter a list of objects by any given criteria\n *\n * @param list the source list to filter\n * @param query a full or partial value of any of the list items object's properties\n * @param props name of the properties to compare values of in the filter predicate\n * @param options\n * (1) filter mode: search value is matched from the start or anywhere in the target property\n * (2) empty query mode: return full list or empty list when filter matched no results\n * (3) max results: limit the number of items returned when results count exceeds this value\n * @returns search results - an array of items type same as list\n */\n\nexport function filterObjects(\n list: T[],\n query: string | number | boolean,\n options?: IListFilterOptions\n): Array {\n options = { ...DEFAULT_FILTER_OPTIONS, ...options };\n\n const { filterMode, emptyQueryMode, maxResults, filterPredicate, props } = options;\n\n const defaultPredicate = (obj: T) => {\n const propertyValues = props.map((prop) => {\n if (prop in obj) {\n return obj[prop];\n }\n });\n\n return propertyValues.some((value) => {\n if (filterMode === 'include') {\n return value.toString().includes(query);\n }\n return value.toString().startsWith(query);\n });\n };\n\n let results = [] as T[];\n\n if (!isEmpty(query)) {\n results = list.filter(filterPredicate || defaultPredicate);\n } else if (emptyQueryMode === 'match all') {\n results = list;\n } else if (emptyQueryMode === 'match none') {\n results = [];\n }\n\n if (isNumber(maxResults) && results?.length) {\n results = results.slice(0, maxResults);\n }\n\n return results;\n}\n\n// export function filterObjects(\n// list: T[],\n// query: any,\n// props: K[],\n// options?: IListFilterOptions\n// ): Array {\n// options = { ...DEFAULT_FILTER_OPTIONS, ...options };\n\n// const { filterMode, emptyQueryMode, maxResults } = options;\n\n// const matchPredicate = (obj: T) => {\n// const propertyValues = props.map((prop) => obj[prop]);\n\n// return propertyValues.some((value) => {\n// if (filterMode === 'include') {\n// return value.toString().includes(query);\n// }\n// return value.toString().startsWith(query);\n// });\n// };\n\n// let results = [] as T[];\n\n// if (!isEmpty(query)) {\n// results = list.filter(matchPredicate);\n// } else if (emptyQueryMode === 'match all') {\n// results = list;\n// } else if (emptyQueryMode === 'match none') {\n// results = [];\n// }\n\n// if (isNumber(maxResults) && results?.length) {\n// results = results.slice(0, maxResults);\n// }\n\n// return results;\n// }\n\n/**\n * @description\n * a generic array merging method. will merge an array of objects by any given comparer function.\n * will replace the object at the right index if found by the comparer function.\n * will push the object to the returned array if it is missing in source.\n *\n * @param source the source array whose objects will be compared to\n * @param target the target array whose objects will replace or be pushed instead of source's objects if found worthy by the comparer\n * @param comparer the function on which to compare a source object with a target object, to find their index and decide if worthy of push/replace\n * @returns merged - the merged array of the given type\n */\n\nexport function mergeArrays(source: T[], target: T[], comparer: (a: T, b: T) => boolean): T[] {\n const merged = [...source];\n\n for (const item of target) {\n const existingIndex = merged.findIndex((value) => comparer(value, item));\n if (existingIndex !== -1) {\n merged[existingIndex] = item;\n } else {\n merged.push(item);\n }\n }\n\n return merged;\n}\n","export class Console {\n static readonly #baseStyle = [\n 'font-family: consolas, segoe ui',\n 'font-size: 14px',\n 'letter-spacing: 1px',\n 'padding:3px 5px',\n 'border-radius: 4px',\n 'margin:1px 5px 1px 0',\n 'color:white'\n ];\n\n static readonly #errorStyle = Console.#baseStyle.concat(['background:#c40606']);\n static readonly #warnStyle = Console.#baseStyle.concat(['background:#d1580b']);\n static readonly #infoStyle = Console.#baseStyle.concat(['background:#0561b2']);\n static readonly #logStyle = Console.#baseStyle.concat(['background:#18b885']);\n\n static readonly log = console.log.bind(window.console, '%c%s', Console.#logStyle.join(';'));\n static readonly logInfo = console.info.bind(window.console, '%c%s', Console.#infoStyle.join(';'));\n static readonly logWarning = console.warn.bind(window.console, '%c%s', Console.#warnStyle.join(';'));\n static readonly logError = console.error.bind(window.console, '%c%s', Console.#errorStyle.join(';'));\n}\n","import { formatNumber } from '@angular/common';\n\nexport type TNumericFormatPattern = `${number}.${number}-${number}`;\nexport type TNumericFormatType = 'percent' | 'decimal' | 'money';\n\nexport interface INumericFormatOptions {\n preset?: 'percent' | 'decimal' | 'money';\n pattern?: TNumericFormatPattern /* {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits} */;\n locale?: string;\n}\n\nconst DEFAULT_FORMAT_OPTIONS: INumericFormatOptions = {\n preset: 'decimal',\n pattern: '1.0-0',\n locale: 'he'\n};\n\nexport function numericFormat(value: number, options: INumericFormatOptions = {}): string {\n options = { ...DEFAULT_FORMAT_OPTIONS, ...options };\n return formatNumber(value, options.locale, options.pattern.toString());\n}\n","import { v4 as uuid } from 'uuid';\nimport { isEmpty } from './assertion.utils';\n\nexport interface IRandomNumberOptions {\n length: number;\n}\n\n/**\n * @description\n * generates an arbitrary number which value is between a range of min & max\n * @param min the minimum range value\n * @param max the maximum range value\n * @returns a number restricted to { min < result < max }\n */\nexport function randomNumber(\n min: number = null,\n max: number = null,\n options: IRandomNumberOptions = { length: 10 }\n): number {\n let minRange = min;\n let maxRange = max;\n\n const { length } = options;\n\n if (isEmpty(minRange) && !isEmpty(maxRange)) {\n throw new Error(`Can't generate a random number without min range parameter`);\n }\n\n if (!isEmpty(minRange) && isEmpty(maxRange)) {\n throw new Error(`Can't generate a random number without max range parameter`);\n }\n\n if (isEmpty(minRange) && isEmpty(maxRange)) {\n minRange = +('1' + '0'.repeat(length - 1));\n maxRange = +('9' + '9'.repeat(length - 1));\n }\n\n return Math.floor(Math.random() * (+maxRange - +minRange + 1) + +minRange);\n}\n\n/**\n * @description\n * generates a globally unique identifier string\n * example: '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'\n * @returns a guid string\n */\nexport type Guid = `${string}-${string}-${string}-${string}-${string}`;\n\nexport function generateGuid(): Guid {\n return uuid() as Guid;\n}\n\nexport function isGuid(value: string): value is Guid {\n const guidPattern = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;\n return guidPattern.test(value);\n}\n","/**\n * @description\n * create an immutable copy (deep clone) of any object, the returned object an all its\n * descendants will have new instances when cloning is complete.\n * this behavior can be altered\n * @param obj target object to clone\n * @returns a new instance of original object\n */\nexport function deepCloneImmutable(obj: T): T {\n if (obj === null || typeof obj !== 'object') {\n return obj;\n }\n\n if (Array.isArray(obj)) {\n return obj.map((item) => deepCloneImmutable(item)) as T;\n }\n\n const clonedObject: Partial = {};\n\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n clonedObject[key] = deepCloneImmutable(obj[key]);\n }\n }\n\n return clonedObject as T;\n}\n\nexport type TCloneOptions = {\n ignoreMutationNulls?: boolean;\n};\n\nexport type TDeepPartial = {\n [K in keyof T]?: TDeepPartial;\n};\n\n/**\n * @description\n * deep clone and extend any object type with a partial of same type, the returned object an\n * all its descendants will have new instances when cloning is complete.\n * @param source\n * @param mutation\n * @param options\n * @returns\n */\nexport function deepCloneExtendImmutable(source: T, mutation: TDeepPartial, options?: TCloneOptions): T {\n function clone(sourceObj: any, mutationObj: any): any {\n if (sourceObj === null || typeof sourceObj !== 'object') {\n return sourceObj;\n }\n\n if (Array.isArray(sourceObj)) {\n return sourceObj.map((item, index) => clone(item, mutationObj[index]));\n }\n\n const clonedObject: any = { ...sourceObj };\n\n for (const key in mutationObj) {\n if (mutationObj.hasOwnProperty(key)) {\n const mutationValue = mutationObj[key];\n\n if (options?.ignoreMutationNulls && mutationValue === null) {\n /** do not copy nulls from mutation into target */\n continue;\n }\n\n clonedObject[key] = clone(sourceObj[key], mutationValue);\n }\n }\n\n return clonedObject;\n }\n\n return clone(source, mutation);\n}\n\n/**\n * @description\n * checks that an object has truthy value for each key (the fn sees the 0 value as truthy value).\n * all nested objects will be also checked to verify that their keys hold truthy values.\n * an empty object (w/o keys at all) will return false\n */\nexport function verifyObjectValues(obj: T): boolean {\n function deepCheckTruthy(innerObj: any): boolean {\n if (innerObj === null || innerObj === undefined || Object.keys(obj).length === 0) {\n return false;\n }\n\n if (typeof innerObj === 'object') {\n return Object.values(innerObj).every((value) => deepCheckTruthy(value));\n }\n\n return innerObj !== undefined && innerObj !== null && (innerObj !== '' || innerObj === 0);\n }\n\n return deepCheckTruthy(obj);\n}\n\n/**\n * @description\n * returns new object without empty values\n * for flat and not nested\n */\nexport function excludeEmptyValues(obj: T): T {\n const newObj: Partial = {};\n\n // Object.entries(obj)\n // .filter(([, value]) => value !== null && value !== undefined && value !== '')\n // .forEach(([key, value]) => (newObj[key] = value));\n\n for (const prop in obj) {\n if (obj[prop] || obj[prop] === 0) {\n newObj[prop] = obj[prop];\n }\n }\n\n return newObj as T;\n}\nexport function extractValueByKey(obj: any, key: string): T {\n if (obj?.hasOwnProperty(key)) {\n return obj[key] as T;\n }\n return undefined;\n}\n\nexport function zeroToUndefined(value: T, prop: keyof T): T {\n if (value[prop] === 0) {\n return { ...value, [prop]: undefined };\n }\n return value;\n}\n","import { isString } from './assertion.utils';\n\n/**\n * @description\n * find a sub-string inside a main notation-formatted string. for example:\n * input: \"employee.address.residence\" output: last notation: \"residence\"\n * @param value an annotated string\n * @param delimiter the annotation format delimiter\n * @returns the last expression found in the notated main string\n */\nexport function findLastNotation(value: string, delimiter: string = '.'): string {\n const lastPos = value.lastIndexOf(delimiter);\n if (lastPos < 0) {\n return value;\n }\n return value.slice((value.length - 1 - lastPos) * -1);\n}\n\n/**\n * @description\n * remove spaces at the end and start of the string\n * */\nexport function trim(value: string): string {\n return value.replace(/\\s/g, '');\n}\n\n/**\n * @description\n * remove multiple consecutive spaces off the entire string. single spaces remain untouched.\n * example: \" hel lo w w or ld\" => \"hello world\"\n */\nexport function trimMulti(value: string): string {\n if (!isString(value)) {\n return value;\n }\n return value.replace(/\\s+/g, ' ');\n}\n\n/**\n * @description\n * remove multiple consecutive spaces off the entire string. single spaces also will be trimmed.\n * example: \" hel lo w w or ld\" => \"helloworld\"\n */\nexport function trimComplete(value: string) {\n if (!isString(value)) {\n return value;\n }\n return value.replace(/\\s+/g, '');\n}\n\n/**\n * @description\n * reversing the order of the words in a given string starting at the position of a character that being provided to the fn.\n * useful when trim() does not solving issues of merging hebrew with english strings\n * examples: \" hello world\" => \"worldhello\" | \"50 ₪\" => \"₪50\" \n * @param value the original string\n * @param origChar the character that determines where to replace the order of the string words\n * @param newChar an optional param that can replace the reversing character - if not provider will concat the 2 strings between the origChar (see examples)\n * @returns new string with reversed words order\n */\nexport function reverseWordsOrder(value: string, origChar: string, newChar = '') {\n if (!isString(value)) {\n return value;\n }\n return value.split(origChar).reverse().join(newChar);\n}\n\n/**\n * @description\n * replace N chars of a given string value with a blank char ('*')\n * @param inputString the target string to partially replace its chars\n * @param startPosition the index of the first char to replace\n * @param count how many chars to replace, when negative value - count starts at the end of the string\n * @param maskCharacter optional param to determine the char that will mask the inputString - default set to asterisks characters mask ( ****** )\n * @returns the original string with chars replaced\n * @example:\n * hideChars(originalString, 0, 5) => \"*****o, World!\"\n * hideChars(originalString, 7, 5) => \"Hello, *****!\"\n * hideChars(originalString, -5, 5) => \"Hello, W*****!\";\n */\nexport function maskChars(inputString: string, startPosition: number = 0, count: number = inputString.length, maskCharacter: string = '*'): string {\n if (startPosition < 0) {\n startPosition += inputString.length;\n }\n\n if (count < 0) {\n count = inputString.length - startPosition + count;\n }\n\n if (count <= 0 || startPosition < 0 || startPosition >= inputString.length) {\n return inputString; // Nothing to hide or invalid arguments\n }\n\n const totalChars = inputString.length;\n const endPosition = startPosition + count;\n\n if (endPosition >= totalChars) {\n return inputString.substring(0, startPosition) + maskCharacter.repeat(totalChars - startPosition);\n }\n\n const visibleCharsBefore = startPosition;\n const maskSigns = maskCharacter.repeat(count);\n\n return inputString.substring(0, visibleCharsBefore) + maskSigns + inputString.substring(endPosition, totalChars);\n}\n","import { isEmpty } from './assertion.utils';\n\n/**\n * @description\n * extracts named keys from a query string and converts them to a key-value object\n * @param paramNames a string array of target named keys inside the query string\n * @param url the url containing the query string\n * @returns a key-value dictionary object\n *\n * example:\n * qs = \"?a=1&b=2&c=3\" => queryStringToObject(['a', 'c'], qs) => { a: 1, c: 3 }\n */\nexport function queryStringToObject(paramNames: string[], url: string): { [key: string]: any } {\n let obj: any = {};\n\n paramNames.forEach((param: any) => {\n obj[param] = valueFromQueryString(param, url);\n });\n\n return obj;\n}\n\nexport function valueFromQueryString(name: string, url: string) {\n name = name.replace(/[[]]/g, '$&');\n var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),\n results = regex.exec(url);\n if (!results) return null;\n if (!results[2]) return '';\n return decodeURIComponent(results[2]);\n}\n\nexport function isValidUrl(value: any) {\n // this reg dosent work for this address - 'https://cal.cal-online.co.il/#!/sale/hitechzone/6/7/'\n\n // const urlPattern =\n // /^(http:\\/\\/www\\.|https:\\/\\/www\\.|http:\\/\\/|https:\\/\\/)?[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,5}(:[0-9]{1,5})?(\\/.*)?$/gm;\n // var urlPattern = new RegExp(\n // '^(https?:\\\\/\\\\/)?' + // validate protocol\n // '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|' + // validate domain name\n // '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))' + // validate OR ip (v4) address\n // '(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*' + // validate port and path\n // '(\\\\?[;&a-z\\\\d%_.~+=-]*)?' + // validate query string\n // '(\\\\#[-a-z\\\\d_]*)?$',\n // 'i'\n // ); // validate fragment locator\n // return urlPattern.test(value || '');\n\n try {\n new URL(value);\n return true;\n } catch (e) {\n return false;\n }\n}\n\nexport function toUrlParams(params: any[], options: { includeNulls: boolean } = { includeNulls: false }): string {\n let query = '';\n const { includeNulls } = options;\n params.forEach((param) => {\n if (param) {\n query += '/' + param;\n } else if (includeNulls) {\n query += '/' + null;\n }\n });\n return query;\n}\n\nexport function userAgent() {\n return window.navigator.userAgent;\n}\n\nexport function hasQueryString(url: string): boolean {\n const uri = new URL(url);\n // console.log(uri.search)\n // console.log(uri.searchParams)\n return !isEmpty(uri.search);\n}\n","import { Injectable, inject } from '@angular/core';\nimport { UtmStore } from '@partners/state';\nimport { queryStringToObject } from '@partners/utils';\nimport { Observable, map, of, tap } from 'rxjs';\nimport { IUtmConfig, IUtmEdaModel, IUtmEdaModelData, IUtmModel, IUtmParams } from '../interface';\nimport { UTM_CONFIG, UTM_PARAMS } from '../tokens';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UtmService {\n #utmConfig: IUtmConfig = inject(UTM_CONFIG);\n #utmParams: IUtmParams[] = inject(UTM_PARAMS);\n #utmStoreFacade: UtmStore = inject(UtmStore);\n\n constructor() {}\n\n buildUtmModel(): IUtmModel {\n const { utmSource, utmMedium, utmCampaign, utmTerm, utmContent } = this.#utmStoreFacade.utmParams$$();\n\n return {\n utmSource,\n utmMedium,\n utmCampaign,\n utmTerm,\n utmContent\n } as IUtmModel;\n }\n\n getEdaUtmUrl(): string {\n return this.#utmConfig.calEdaUri;\n }\n\n buildDigitalClientData(idNumber: string, barcode: string, opportunidyId: number): IUtmEdaModel {\n const loanCalsaleProcessType = ['LoanCalSale'];\n const { utmSource, utmMedium, utmCampaign, utmTerm, utmContent } = this.#utmStoreFacade.utmParams$$();\n\n return {\n data: [\n { utm_source: utmSource },\n { utm_medium: utmMedium },\n { utm_campaign: utmCampaign },\n { utm_term: utmTerm },\n { utm_content: utmContent },\n { barcode },\n { opportunidyID: opportunidyId }\n ],\n eventdate: new Date().toJSON(),\n googleClientId: this.getClientId(),\n processType: loanCalsaleProcessType,\n userId: idNumber\n } as IUtmEdaModel;\n }\n\n loadUtmParams$(rawUrl: string = window.location.href): Observable {\n return this.parseUtmParams$(rawUrl).pipe(tap((utmParams) => this.#utmStoreFacade.dispatchUtmLoad(utmParams)));\n }\n\n /**\n * @description here we will add utm values to a given url.\n * the purpose of doing it is if we navigate to another site (for example ecredit)\n * we need to add the utms so previously navigated site will be able to save and record the utms\n * used to find it.\n * @param {*} url\n * @returns a given url with utms value.\n */\n addUtmToUrl(url: string): string {\n const { utmSource, utmMedium, utmCampaign, utmTerm, utmContent } = this.#utmStoreFacade.utmParams$$();\n\n let modifiedUrl = url;\n\n modifiedUrl += `&utm_source=${utmSource}`;\n modifiedUrl += `&utm_medium=${utmMedium}`;\n modifiedUrl += `&utm_campaign=${utmCampaign}`;\n modifiedUrl += `&utm_term=${utmTerm}`;\n modifiedUrl += `&utm_content=${utmContent}`;\n\n return modifiedUrl;\n }\n\n private parseUtmParams$(url: string): Observable {\n return of(url).pipe(\n map((url) => {\n /** read whatever params are in the querystring */\n const urlParams = queryStringToObject(this.#utmParams, url) as IUtmEdaModelData;\n\n const utmModel: IUtmModel = {\n utmSource: urlParams.utm_source,\n utmMedium: urlParams.utm_medium,\n utmCampaign: urlParams.utm_campaign,\n utmTerm: urlParams.utm_term,\n utmContent: urlParams.utm_content\n };\n\n return utmModel;\n })\n );\n }\n\n /**\n * @description\n * extract google client id value from cookies\n * @returns googleClientId value\n */\n private getClientId(): string | undefined {\n try {\n const cookieString = document.cookie;\n const cookies = cookieString?.split('; ');\n\n if (!cookies?.length) {\n return undefined;\n }\n return cookies.reduce((_, cookie) => {\n const cookieArray = cookie.split('=');\n if (cookieArray?.length && cookieArray[0] === '_ga') {\n return cookieArray[1];\n }\n return _;\n }, undefined);\n } catch (err) {\n return '';\n }\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { IUtmConfig } from '../interface';\n\nexport const UTM_CONFIG = new InjectionToken('UTM_CONFIG');\n","import { InjectionToken } from '@angular/core';\nimport { IUtmParams } from '../interface';\n\nexport const UTM_PARAMS = new InjectionToken('UTM_PARAMS');\n"],"x_google_ignoreList":[]}