PageSourceSearch

https://www.flowrestling.org/nextgen/chunk-642WD33D.js

js flowrestling.org collected 2026-10-02 02:46:55 UTC 17,205 bytes, 1 lines download raw bytes

1import{a as ue}from"./chunk-I3WXR5YL.js";import{a as me}from"./chunk-RAXR5T5B.js";import{a as ge}from"./chunk-FFBQCS34.js";import"./chunk-KQCDQBK4.js";import"./chunk-CQ4UIV3F.js";import"./chunk-RCAXGH2E.js";import"./chunk-NF623ZZL.js";import{a as he,b as fe,c as pe}from"./chunk-P2DD44T7.js";import{b as S}from"./chunk-JQ2PYCPX.js";import{b as ie,g as I,h as ne,l as ae,m as E,n as oe,o as se,p as re,q as le,w as ce,x as de,y as _e}from"./chunk-G5Y5JYHL.js";import"./chunk-CMBK43MS.js";import{a as ee,j as te}from"./chunk-JJCG7NSL.js";import"./chunk-G4Q7HQ4A.js";import"./chunk-THM5VL3V.js";import"./chunk-DCRHAWNI.js";import"./chunk-FEMJCSD5.js";import"./chunk-UVHD2AZ7.js";import{T as L,U as k,na as B,oa as p,pa as H}from"./chunk-SO63KCWN.js";import{a as Z}from"./chunk-AMYNG6OI.js";import{Ca as z,Cb as J,Fa as Y,Ia as d,Ob as K,Pb as Q,Ub as X,_a as $,ab as j,na as R,sb as q,ua as G,za as W}from"./chunk-LOSIO2HW.js";import"./chunk-KD6NQZWG.js";import{Aa as y,C as m,Cc as Ce,Fb as x,Gb as U,Ja as u,La as M,Ra as g,Wa as h,Xa as f,Zb as V,ab as C,bb as v,cb as o,ia as c,ob as F,qb as A,t as r,tc as D,u as l,va as O,x as N,za as b}from"./chunk-HH3XFPXS.js";import"./chunk-ILL4XUFR.js";import"./chunk-7LQVUJSB.js";import"./chunk-EVT5P2AJ.js";import{a as _,b as P,l as s}from"./chunk-4ZXV5L7B.js";Ce();V();var w=function(n){return n.Save="MANAGE_NOTIFICATIONS_SAVE",n}(w||{});V();function ve(n,T){if(n&1){let e=C();h(0,"div",1)(1,"flo-notification-channels-inline",5),v("onChannelToggle",function(i){r(e);let a=o();return l(a._onChannelToggle(i))})("onUpgrade",function(){r(e);let i=o();return l(i._onChannelsUpgrade())})("onPhoneSubmitted",function(){r(e);let i=o();return l(i._onPhoneSubmitted())}),f()()}if(n&2){let e=o();c(),u("state",e.channelsState)}}function Se(n,T){n&1&&(h(0,"div",2),F(1),x(2,"localize"),f()),n&2&&(c(),A(" ",U(2,1,"components:modals.manage-notifications.unavailable")," "))}function Te(n,T){if(n&1){let e=C();h(0,"flo-favorite-toggle-row",8),v("onFavoriteToggle",function(i){r(e);let a=o(2);return l(a._onFavoriteToggle(i))}),f()}if(n&2){let e=o(2);M("ruled",e.showTopics),u("value",e.isFavoriteOn)("settingsHref",e.settingsHref)}}function Pe(n,T){if(n&1){let e=C();h(0,"flo-notification-topics",6),v("onValueChange",function(i){r(e);let a=o();return l(a.onTopicsChange(i))}),y(1,Te,1,4,"flo-favorite-toggle-row",7),f()}if(n&2){let e=o();u("flat",e.isFlat)("name",e.data==null?null:e.data.athleteName)("subtitle",e.data==null?null:e.data.athleteSubtitle)("value",e.selectedTopics)("hideGroups",!e.showTopics),c(),g(e.showFavoriteRow?1:-1)}}function ye(n,T){if(n&1){let e=C();h(0,"flo-notification-preferences-card",9),v("onEdit",function(){r(e);let i=o();return l(i._onEditNotificationPreferences())})("onLogin",function(){r(e);let i=o();return l(i._onNotificationPreferencesLogin())}),f()}if(n&2){let e=o();u("isAuthenticated",!0)("notificationEmail",e.notificationEmail)("notificationPhone",e.notificationPhone)("deliveryChannels",e.deliveryChannels)("hasError",e.preferencesCardError)("warningMessage",e.preferencesCardWarning)("editDisabled",e.preferencesEditDisabled)}}var we="manage_notifications",Ie="components:modals.notification-topics.title",Ee="components:athlete-profile.profile-claiming.notifications.messages.notification-subscription-success",Ne="components:modals.manage-notifications.applied-to-all-events",Oe="components:modals.manage-notifications.event-overrides-failure",rt=(()=>{class n extends ${CONFIGURATION={id:"MANAGE_NOTIFICATIONS",width:390,className:"manage-notifications",header:{titleAlign:K.Center,showBack:!0,showAlert:!1,showClose:!0},ctas:{primary:{id:w.Save,label:"components:modals.manage-notifications.save",type:J.Primary,fullWidth:!0,alignment:Z.Left}},scrollable:!1,size:j.Standard,position:Q.Right};onSaveSettled=new m;onTopicToggle=new m;onChannelToggle=new m;onFavoriteToggle=new m;selectedTopics=[];isReadDegraded=!1;isSaving=!1;isLoadingTopics=!0;notificationEmail="";notificationPhone="";deliveryChannels=[];preferencesCardError=!1;preferencesCardWarning=he;preferencesEditDisabled=!1;isNotificationsV2=!1;isFavoriteOn=!0;channelsState=new k;channelsDisplay=p.Summary;_subscriptions=new R;_lastChannels=null;_channelsPaywall;_channelsPaywallAttach;_isFavoriteAdded=!1;_panel=new _e(()=>this._UIService);_unreportedSave=null;_isFlagResolved=!1;_isChannelsSettled=!1;get isSaveEnabled(){return!this.isReadDegraded&&!this.isSaving&&!this.isLoadingTopics&&!(this.isInlineChannels&&this.showTopics&&this.channelsState.isPhonePending)}get isInlineChannels(){return this.isNotificationsV2&&this.showPreferencesCard&&this.channelsDisplay===p.Inline}get showFavoriteRow(){return!!this.data?.offerFavorite&&!this._isFavoriteAdded}get showTopics(){return!this.data?.offerFavorite||this.isFavoriteOn}get settingsHref(){let e=this._UIService.config?.accountsBaseUrl;return e?`${e}/favorites`:null}get showPreferencesCard(){return this.data?.showPreferencesCard??!0}get isFlat(){return this.data?.layout==="flat"}ngOnInit(){super.ngOnInit(),this.data&&(this._applyHeader(),this._syncSaveCta(),this._loadStoredTopics(),z(this._UIService,W.EVENT_HUB_NOTIFICATIONS_V2).then(e=>this._onFlagResolved(e)))}ngAfterViewInit(){super.ngAfterViewInit(),this._subscriptions.push(this.onCta,this._onCta.bind(this)),this._subscriptions.push(this.onBack,()=>this._onPanelClosed(I.back)),this._subscriptions.push(this.onClose,()=>this._onPanelClosed(I.close)),this.showPreferencesCard&&this._loadNotificationPreferences()}ngOnDestroy(){this._subscriptions.destroy()}onTopicsChange(e){if(!this.isLoadingTopics&&!this.isReadDegraded){let t=new Set(this.selectedTopics),i=new Set(e);for(let a of e)t.has(a)||this._reportTopicToggle(a,!0);for(let a of this.selectedTopics)i.has(a)||this._reportTopicToggle(a,!1)}this.selectedTopics=e}onSave(){return s(this,null,function*(){if(this.isSaveEnabled){if(!this.showTopics){this._emitSaveSettled(!0,[]),this._trackPanelSaved(!1),this.close();return}this.isSaving=!0,this._syncSaveCta(),this.showLoader();try{if(!(yield this._writeListeners())){this._emitSaveSettled(!1);return}if(this.data.offerFavorite&&!this._isFavoriteAdded){if(!(yield this._UIService.user.preferences.addFavorite(this.data.athleteOfpPersonId))?.isSuccess){this._emitSaveSettled(!1);return}this._isFavoriteAdded=!0,this._cd.detectChanges()}if(!(yield this._UIService.athleteProfile.subscribeToAthlete(this.data.athleteOfpPersonId,this.data.athleteName,this.selectedTopics,[...S],this.data.dataSource)).isSuccess){this._UIService.n
1otifications.displayErrorNotice("components:athlete-profile.profile-claiming.notifications.messages.notification-subscription-failed"),this._emitSaveSettled(!1);return}this._trackTopicsUpdated();let t=yield this._clearEventOverrides();if(t===null){this._UIService.notifications.displayErrorNotice(Oe),this._emitSaveSettled(!0),this._unreportedSave=this._panelSavedProps(!0);return}t>0?(this._UIService.notifications.displaySuccessNotice(Ne,{translationVariables:{name:this.data.athleteName}}),this._panel.shown(d.notificationPanel.globalChangeToastShown,{athlete_id:this.data.athleteOfpPersonId})):this._UIService.notifications.displaySuccessNotice(Ee),this._emitSaveSettled(!0),this._trackPanelSaved(!0),this.close()}catch(e){console.error("Failed to update notification topics:",e),this._emitSaveSettled(!1)}finally{this.isSaving=!1,this._syncSaveCta(),this.hideLoader()}}})}_onFavoriteToggle(e){this.isFavoriteOn=e,this.onFavoriteToggle.emit(e),this._panel.track(d.notificationPanel.favoriteToggled,{athlete_id:this.data.athleteOfpPersonId,new_state:E(e)}),this._syncSaveCta(),this._cd.detectChanges()}_onChannelToggle(e){this.deliveryChannels=this.channelsState.writeChannels(),e&&(this.onChannelToggle.emit(e),this._panel.track(d.notificationPanel.channelToggled,le(e,this.channelsState))),this._syncSaveCta(),this._cd.detectChanges()}_onChannelsUpgrade(){this._panel.track(d.notificationPanel.upgradeSelected,ae),this._channelsPaywall?.launchUpgrade()}_onPhoneSubmitted(){this._onChannelToggle(),this._panel.track(d.notificationPanel.phoneNumberSubmitted,{submitted:!0})}_onEditNotificationPreferences(){if(this.preferencesEditDisabled)return;let e=this._UIService.modals.create(ge,{origin:this,email:this.notificationEmail,smsNumber:this.notificationPhone,deliveryChannels:this.deliveryChannels,dataSource:this.data.dataSource,panelAnalytics:this.data.panelAnalytics?{surface:this.data.panelAnalytics.surface,pageProps:this.data.panelAnalytics.pageProps}:void 0});this._subscriptions.push(e.onPreferencesSaved,t=>{this.notificationEmail=t.email||"",this.notificationPhone=t.smsNumber||"",this.deliveryChannels=[...t.deliveryChannels],this.deliveryChannels.length>0&&(this.preferencesCardError=!1),this._cd.detectChanges()})}_onNotificationPreferencesLogin(){this._UIService.modals.create(ee,{body:te,origin:this,showCloseIcon:!0})}_onCta(e){return s(this,null,function*(){e===w.Save&&(yield this.onSave())})}_loadStoredTopics(){return s(this,null,function*(){if(this.data.proposeAllTopics){this.selectedTopics=[...S],this.isLoadingTopics=!1,this._syncSaveCta(),this._cd.detectChanges(),this._trackOpenedIfReady();return}try{let e=yield this._UIService.user.preferences.getUserAlerts(this.data.dataSource);if(!e?.isSuccess){this.isReadDegraded=!0;return}let t=(e.data??[]).find(a=>a.topic?.id===this.data.athleteOfpPersonId&&a.topic?.topicType===G.Person),i=new Set(S);this.selectedTopics=(t?.listenProperties?.topicSubType??[]).filter(a=>i.has(String(a)))}catch(e){console.warn("Failed to load stored notification topics",e),this.isReadDegraded=!0}finally{this.isLoadingTopics=!1,this._syncSaveCta(),this._cd.detectChanges(),this._trackOpenedIfReady()}})}_syncSaveCta(){this.setCtaState({id:X.Primary,disabled:!this.isSaveEnabled})}_loadNotificationPreferences(){return s(this,null,function*(){this.notificationEmail=this.data?.fallbackEmail??"",this.notificationPhone=this.data?.fallbackPhone??"";try{let e=yield B({uiService:this._UIService,dataSource:this.data.dataSource});e.isDegraded?this._markPreferencesUnavailable():(e.email&&(this.notificationEmail=e.email),e.smsNumber&&(this.notificationPhone=L(e.smsNumber,e.smsCountryCode)),this.deliveryChannels=e.deliveryChannels),this._lastChannels=e,this.isNotificationsV2&&this._applyChannelsV2(e)}catch(e){console.warn("Failed to load notification preferences",e),this._markPreferencesUnavailable()}this._cd.detectChanges(),this._isChannelsSettled=!0,this._trackOpenedIfReady()})}_applyHeader(){this.setHeader(P(_({},this.config.header),{title:this.isNotificationsV2?Ie:this.data.title??this.data.athleteName,showBack:this.data.showBack??this.config.header.showBack}))}_onFlagResolved(e){this.isNotificationsV2=e,this._isFlagResolved=!0,e&&(this._applyHeader(),this._lastChannels&&this._applyChannelsV2(this._lastChannels),this._syncSaveCta(),this._cd.detectChanges()),this._trackOpenedIfReady()}_applyChannelsV2(e){if(e.isDegraded){this.channelsDisplay=p.Summary;return}let t=H({channels:e,isPremium:this._UIService.user.isPremium});this.channelsDisplay=t.display,this.channelsState.seedChannels(e,{email:e.email,phone:e.smsNumber},t.seedOptions),this.isInlineChannels&&(this._channelsPaywallAttach??=this._attachChannelsPaywall()),this._syncSaveCta(),this._cd.detectChanges()}_attachChannelsPaywall(){return s(this,null,function*(){this._channelsPaywall=yield de({uiService:this._UIService,cd:this._cd,subscriptions:this._subscriptions,state:this.channelsState,surface:Y.modal,onLockChange:()=>this._onChannelToggle()})})}_writeListeners(){return s(this,null,function*(){if(!this.isInlineChannels)return!0;let e=this.channelsState.listenersWrite();return e?(yield this._UIService.user.attributes.setContactDetails(e,this.data.dataSource))?.isSuccess?(this.channelsState.commitListeners(),!0):(this.channelsState.revertToBaseline(),this.deliveryChannels=this.channelsState.writeChannels(),this._cd.detectChanges(),this._UIService.n
1otifications.displayErrorNotice("components:modals.manage-notifications.contact-update-failure"),!1):!0})}_clearEventOverrides(){return s(this,null,function*(){if(!this.isNotificationsV2||!(this._isFavoriteAdded||this._UIService.user.preferences.hasFavoriteBasedOnOfpId(this.data.athleteOfpPersonId)===!0))return 0;let t=yield this._UIService.user.preferences.clearPersonEventOverrides(this.data.athleteOfpPersonId,this.data.dataSource);return t.isSuccess?t.data?.clearedCount??0:null})}_markPreferencesUnavailable(){this.preferencesCardError=!0,this.preferencesCardWarning=fe,this.preferencesEditDisabled=!0}_emitSaveSettled(e,t=[...this.selectedTopics]){let i={topics:t,isSuccess:e};this.data.offerFavorite&&(i.isFavoriteAdded=this._isFavoriteAdded),this.onSaveSettled.emit(i)}_reportTopicToggle(e,t){this.onTopicToggle.emit({subType:e,isOn:t});let i=oe(e);i&&this._panel.track(d.notificationPanel.optionToggled,P(_({athlete_id:this.data.athleteOfpPersonId},i),{new_state:E(t)}))}_trackOpenedIfReady(){let e=this.data?.panelAnalytics;!e||this.isLoadingTopics||!this._isFlagResolved||this.showPreferencesCard&&!this._isChannelsSettled||this._panel.open(_({panelType:ie.favoritedAthlete},e),{athlete_id:this.data.athleteOfpPersonId,already_favorited:!this.data.offerFavorite,channels_displayed:this._channelsDisplayed()})}_channelsDisplayed(){return this.showPreferencesCard?this.isInlineChannels?p.Inline:p.Summary:p.Suppressed}_trackPanelSaved(e){this._panel.saved(this._panelSavedProps(e))}_panelSavedProps(e){let t=this.data.athleteOfpPersonId;if(!e)return()=>({athlete_id:t,general_on_count:0,event_on_count:0,favorite_all_events:!1});let i=[...this.selectedTopics],a=this.isInlineChannels&&this.showTopics?this.channelsState.writeChannels():null;return()=>_(P(_({athlete_id:t},se(i)),{favorite_all_events:!0,scope:ne.allEvents}),a?{channels_committed:re(a)}:{})}_onPanelClosed(e){this._unreportedSave&&this._panel.saved(this._unreportedSave),this._panel.dismissed(e)}_trackTopicsUpdated(){this._UIService.analytics.track(d.profileClaiming.notificationTopicsUpdated,{subpage_category:this.data.analyticsSource??we,athlete_ofp_person_id:this.data.athleteOfpPersonId,topics_selected:this.selectedTopics,topics_offered:[...S],topic_count:this.selectedTopics.length})}static \u0275fac=(()=>{let e;return function(i){return(e||(e=N(n)))(i||n)}})();static \u0275cmp=O({type:n,selectors:[["ng-component"]],outputs:{onSaveSettled:"onSaveSettled",onTopicToggle:"onTopicToggle",onChannelToggle:"onChannelToggle",onFavoriteToggle:"onFavoriteToggle"},features:[b],decls:5,vars:4,consts:[[1,"manage-notifications-body"],[1,"manage-notifications-channels"],["role","alert",1,"manage-notifications-degraded"],[3,"flat","name","subtitle","value","hideGroups"],[3,"isAuthenticated","notificationEmail","notificationPhone","deliveryChannels","hasError","warningMessage","editDisabled"],[3,"onChannelToggle","onUpgrade","onPhoneSubmitted","state"],[3,"onValueChange","flat","name","subtitle","value","hideGroups"],["topicsFooter","",1,"manage-notifications-favorite",3,"ruled","value","settingsHref"],["topicsFooter","",1,"manage-notifications-favorite",3,"onFavoriteToggle","value","settingsHref"],[3,"onEdit","onLogin","isAuthenticated","notificationEmail","notificationPhone","deliveryChannels","hasError","warningMessage","editDisabled"]],template:function(t,i){t&1&&(h(0,"div",0),y(1,ve,2,1,"div",1)(2,Se,3,3,"div",2)(3,Pe,2,6,"flo-notification-topics",3),f(),y(4,ye,1,7,"flo-notification-preferences-card",4)),t&2&&(c(),g(i.isInlineChannels&&i.showTopics?1:-1),c(),g(i.isReadDegraded?2:-1),c(),g(i.showTopics||i.showFavoriteRow?3:-1),c(),g(i.showPreferencesCard&&!i.isInlineChannels?4:-1))},dependencies:[D,ue,pe,ce,me,q],styles:["[_nghost-%COMP%]{display:block;min-height:100%}[_nghost-%COMP%]   flo-modal-cta[_ngcontent-%COMP%]   flo-button-standard[_ngcontent-%COMP%]{margin:0 8px 0 0}[_nghost-%COMP%]   flo-modal-cta[_ngcontent-%COMP%]   flo-button-standard[_ngcontent-%COMP%]:last-child{margin:0}@media (max-width: 650){[_nghost-%COMP%]   flo-modal-cta[_ngcontent-%COMP%]{position:fixed;width:100%;bottom:0;left:0}}.panel.fullscreen[_nghost-%COMP%], .panel.fullscreen   [_nghost-%COMP%]{padding-bottom:0}.panel.fullscreen[_nghost-%COMP%]   flo-modal-cta[_ngcontent-%COMP%], .panel.fullscreen   [_nghost-%COMP%]   flo-modal-cta[_ngcontent-%COMP%]{position:fixed;width:100%;bottom:0;left:0}","[_nghost-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column}[_nghost-%COMP%]   .manage-notifications-body[_ngcontent-%COMP%]{flex:1;padding:16px;overflow-y:auto}[_nghost-%COMP%]   .manage-notifications-channels[_ngcontent-%COMP%]{margin-bottom:var(--spacing-400)}[_nghost-%COMP%]   .manage-notifications-favorite[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%]   .manage-notifications-favorite.ruled[_ngcontent-%COMP%]{padding-top:var(--spacing-300);border-top:1px solid var(--gray200)}[_nghost-%COMP%]   .manage-notifications-degraded[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;line-height:1.125rem;letter-spacing:0;text-transform:none;color:var(--red800);margin-bottom:16px}[_nghost-%COMP%]   flo-notification-preferences-card[_ngcontent-%COMP%]{position:relative;flex-shrink:0}"],changeDetection:0})}return n})();export{w as ManageNotificationsModalAction,rt as ManageNotificationsModalComponent};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.