MFBEUnifiedBusinessLoginSelectCatalogSection.react",["AdsApplicationIDs","FBESetupSteps","FBEUnifiedBusinessLoginErrorBoundary.react","FBEUnifiedBusinessLoginLabels","FBEUnifiedBusinessLoginLogger","FBEUnifiedBusinessLoginSelectAndCreateAssetSection.react","FBEUnifiedBusinessLoginStateProvider","FBEUnifiedBusinessLoginStateSetCatalogAction","FBEUnifiedBusinessLoginStateSetErrorAction","Laminar","MFBEUnifiedBusinessLoginCatalogItem.react","MFBEUnifiedBusinessLoginSelectCatalogSectionQuery.graphql","RelayHooks","nullthrows","react","useFBECreateCatalogMutation"],(function(a,b,c,d,e,f,g){"use strict";var h,i,j=i||(i=d("react"));e=i;var k=e.Suspense,l=e.useCallback,m=e.useState,n=h!==void 0?h:h=b("MFBEUnifiedBusinessLoginSelectCatalogSectionQuery.graphql");function o(a){var b,e,g,h=a.application,i=a.advanceStep,k=a.cancelOnClick,o=a.coreAssetsStep;o=o===void 0?null:o;var p=a.loadingView;a=a.retreatStep;var q=c("FBEUnifiedBusinessLoginStateProvider")(),r=q.businessID,s=q.appID,t=q.catalogID,u=q.catalogName,v=q.commerceSalesIntent,w=q.flowConfig,x=q.installedCatalogID,y=q.instagramAssetID,z=q.pageID,A=q.instagramLoggedInAccessToken,B=q.instagramOIDCToken,C=w.assetsSetup,D=w.flow;b=(b=q.fbeExtraParams)==null?void 0:(b=b.setup)==null?void 0:b.business_vertical;e=(e=q.fbeExtraParams)==null?void 0:(e=e.business_config)==null?void 0:(e=e.business)==null?void 0:e.name;e=e!=null?d("FBEUnifiedBusinessLoginLabels").FBEUnifiedBusinessLoginLabelsUtils.getDefaultNewAssetName(e,d("FBEUnifiedBusinessLoginLabels").CATALOG).toString():"";var E=c("FBEUnifiedBusinessLoginLogger").getInstance().setStep(c("FBESetupSteps").CATALOG_STEP);u=m({id:t,name:u});var F=u[0],G=u[1];u=(u=C.catalog.contentOverride)!=null?u:d("FBEUnifiedBusinessLoginLabels").SELECT_CATALOG_SECTION_LABELS;var H=F.id==null;o=w.editComponentAssetChanged&&o==="CATALOG_STEP";v=w.getFBECommerceRequirements(v);A=A!=null?{sensitive_string_value:A}:null;B=B!=null?{sensitive_string_value:B}:null;g={input:{business_id:c("nullthrows")(r,"Business ID should not be null"),flow:D,page_id:z,instagram_id:y,catalog_id:t,ad_account_id:null,pixel_id:null,vertical:(g=b)!=null?g:"ECOMMERCE",external_business_id:q.externalBusinessID,app_id:q.appID,commerce_requirements:v,install_source:"BUSINESS_LOGIN",entrypoint:"BUSINESS_LOGIN",instagram_access_token:A,oidc_token:B}};var I={fetchPolicy:"network-only"};g=d("RelayHooks").useLazyLoadQuery(n,g,I);I=(I=g.fbe_viewer_catalogs_with_channel_data)==null?void 0:I.__id;g=(g=(g=g.fbe_viewer_catalogs_with_channel_data)==null?void 0:g.edges)!=null?g:[];var J=g.map(function(a){return a.node}).filter(Boolean);g=J.length===0;var K=l(function(a,b){G({id:a,name:b})},[]),L=l(function(){c("FBEUnifiedBusinessLoginStateSetCatalogAction").dispatch({catalogID:F.id,catalogName:F.name})},[F]),M=l(function(){F.id!==t&&(w.setEditComponentAssetChanged(!0),L()),i()},[i,t,w,L,F.id]);r=c("useFBECreateCatalogMutation")(r,s,b,z,y,t,v,D,I,A,B,q.externalBusinessID,function(a){var b,c;b=(b=a.fbe_create_catalog_with_eligibility)==null?void 0:(b=b.catalog)==null?void 0:b.id;c=(c=a.fbe_create_catalog_with_eligibility)==null?void 0:(c=c.catalog)==null?void 0:c.name;a=(a=(a=a.fbe_create_catalog_with_eligibility)==null?void 0:a.is_disabled)!=null?a:!0;a||K(b,c);E.setEvent("asset_creation_success").logWithAssets(q)},function(a){var b;c("FBEUnifiedBusinessLoginStateSetErrorAction").dispatch({error:a},{line:"252",module:"MFBEUnifiedBusinessLoginSelectCatalogSection.react.js",moduleID:f.id});E.setEvent("asset_creation_fail").setExtra((b={},b.error_message=a.message,b.error_code=String(a.number),b.error_stack_trace=a.stack,b)).logWithAssets(q)});s=r[0];b=r[1];z=g?void 0:j.jsx("div",{children:J.map(function(a,b){var d=a.catalog,e=a.ineligibilities,f=a.rich_ineligibilities;a=a.is_disabled;if(d==null)return null;var g=d.id;d=d.name;return g==null||d==null||a==null?null:j.jsx(c("MFBEUnifiedBusinessLoginCatalogItem.react"),{id:g,ineligibilities:e,richIneligibilities:f,isDisabled:a,isLastItem:b===J.length-1,isSelected:g===F.id,name:d,onSelect:K},b)})});v=(y=J.find(function(a){a=a.catalog;return(a==null?void 0:a.id)===F.id}))==null?void 0:y.catalog;A=v==null?void 0:(I=v.items)==null?void 0:I.count;g=(r=v==null?void 0:(B=v.product_feeds)==null?void 0:B.nodes.some(function(a){a=a.source_app_id;return a===c("AdsApplicationIDs").COMMERCE_MANAGER}))!=null?r:!1;y=A!=null&&A>0;I=x!=null&&F.id!=null&&x!==F.id&&y;v=w.isFlowCatalogMigration();B=v?"CATALOG_MIGRATION":I?"DEFAULT":null;(I||g)&&D==="AR_COMMERCE"&&(B="AR_COMMERCE");r=v||I||g?d("FBEUnifiedBusinessLoginLabels").FBEUnifiedBusinessLoginLabelsUtils.getAssetSelectionWarningDescription({appName:h.name,labelKey:B,step:c("FBESetupSteps").CATALOG_STEP}):null;return j.jsx(c("FBEUnifiedBusinessLoginSelectAndCreateAssetSection.react"),{application:h,assetSelectionWarning:r,defaultNewAssetName:e,isFallback:!1,isLoading:b,labels:u,loadingComponent:p,step:c("FBESetupSteps").CATALOG_STEP,onAdvanceClick:H?void 0:M,onBackClick:o?void 0:a,onCancelClick:k,shouldShowCreateNewAction:(A=C.catalog.canCreateInFlow)!=null?A:!1,onCreate:s,children:z})}o.displayName=o.name+" [from "+f.id+"]";function a(a){var b=a.application,e=a.advanceStep,f=a.cancelOnClick,g=a.context,h=a.coreAssetsStep;h=h===void 0?null:h;var i=a.loadingView;a=a.retreatStep;d("Laminar").useProvider(c("FBEUnifiedBusinessLoginStateProvider"));var l=j.jsx(c("FBEUnifiedBusinessLoginSelectAndCreateAssetSection.react"),{application:b,assetSelectionWarning:null,isFallback:!0,isLoading:!1,labels:d("FBEUnifiedBusinessLoginLabels").SELECT_CATALOG_SECTION_LABELS,step:c("FBESetupSteps").CATALOG_STEP,onAdvanceClick:e,onBackClick:a,onCancelClick:f});return j.jsx(c("FBEUnifiedBusinessLoginErrorBoundary.react"),{application:b,children:j.jsx(k,{fallback:l,children:j.jsx(o,{application:b,advanceStep:e,cancelOnClick:f,context:g,coreAssetsStep:h,loadingView:i,retreatStep:a})})})}a.displayName=a.name+" [from "+f.id+"]";e=d("Laminar").laminarContainer(a);g["default"]=e}),98);
-----
FBEUnifiedBusinessLoginSelectCatalogSection.react",["AdsApplicationIDs","FBESetupSteps","FBEUnifiedBusinessLoginCatalogItem.react","FBEUnifiedBusinessLoginErrorBoundary.react","FBEUnifiedBusinessLoginLabels","FBEUnifiedBusinessLoginLogger","FBEUnifiedBusinessLoginSelectAndCreateAssetSection.react","FBEUnifiedBusinessLoginSelectCatalogSectionQuery.graphql","FBEUnifiedBusinessLoginStateProvider","FBEUnifiedBusinessLoginStateSetCatalogAction","FBEUnifiedBusinessLoginStateSetErrorAction","FBEUnifiedBusinessLoginUtils","Laminar","RelayHooks","isNullish","nullthrows","react","useFBECreateCatalogMutation"],(function(a,b,c,d,e,f,g){"use strict";var h,i,j=i||(i=d("react"));e=i;var k=e.Suspense,l=e.useCallback,m=e.useEffect,n=e.useState,o=h!==void 0?h:h=b("FBEUnifiedBusinessLoginSelectCatalogSectionQuery.graphql");function p(a){var b,e,g,h=a.application,i=a.advanceStep,k=a.cancelOnClick,p=a.coreAssetsStep;p=p===void 0?null:p;var q=a.loadingView;a=a.retreatStep;var r=c("FBEUnifiedBusinessLoginStateProvider")(),s=r.businessID,t=r.appID,u=r.catalogID,v=r.catalogName,w=r.commerceSalesIntent,x=r.flowConfig,y=r.installedCatalogID,z=r.instagramAssetID,A=r.pageID,B=r.instagramLoggedInAccessToken,C=r.instagramOIDCToken,D=x.assetsSetup,E=x.flow,F=x.hasExternalClientMetadata;b=(b=r.fbeExtraParams)==null?void 0:(b=b.setup)==null?void 0:b.business_vertical;e=(e=r.fbeExtraParams)==null?void 0:(e=e.business_config)==null?void 0:(e=e.business)==null?void 0:e.name;e=e!=null?d("FBEUnifiedBusinessLoginLabels").FBEUnifiedBusinessLoginLabelsUtils.getDefaultNewAssetName(e,d("FBEUnifiedBusinessLoginLabels").CATALOG).toString():"";var G=c("FBEUnifiedBusinessLoginLogger").getInstance().setStep(c("FBESetupSteps").CATALOG_STEP);v=n({id:u,name:v});var H=v[0],I=v[1];v=(v=D.catalog.contentOverride)!=null?v:d("FBEUnifiedBusinessLoginLabels").SELECT_CATALOG_SECTION_LABELS;var J=H.id==null;p=x.editComponentAssetChanged&&p==="CATALOG_STEP";w=x.getFBECommerceRequirements(w);B=B!=null?{sensitive_string_value:B}:null;C=c("isNullish")(C)?null:{sensitive_string_value:C};g={input:{business_id:c("nullthrows")(s,"Business ID should not be null"),flow:E,page_id:A,instagram_id:z,catalog_id:u,ad_account_id:null,pixel_id:null,vertical:(g=b)!=null?g:"ECOMMERCE",external_business_id:r.externalBusinessID,app_id:r.appID,commerce_requirements:w,install_source:"BUSINESS_LOGIN",entrypoint:"BUSINESS_LOGIN",instagram_access_token:B,oidc_token:C}};var K={fetchPolicy:"network-only"};g=d("RelayHooks").useLazyLoadQuery(o,g,K);K=(K=g.fbe_viewer_catalogs_with_channel_data)==null?void 0:K.__id;g=(g=(g=g.fbe_viewer_catalogs_with_channel_data)==null?void 0:g.edges)!=null?g:[];var L=g.map(function(a){return a.node}).filter(Boolean),M=L.length===0,N=d("FBEUnifiedBusinessLoginUtils").isNewBeyondShopifyBetaFlow(t,E,F),O=(g=L[0])==null?void 0:g.catalog,P=(F=L[0])==null?void 0:F.is_disabled;m(function(){var a=H.id;N&&a==null&&!M&&(P!==!0&&I({id:O==null?void 0:O.id,name:O==null?void 0:O.name}))},[L,I,H.id,M,N,P,O==null?void 0:O.id,O==null?void 0:O.name]);var Q=l(function(a,b){I({id:a,name:b})},[]),R=l(function(){c("FBEUnifiedBusinessLoginStateSetCatalogAction").dispatch({catalogID:H.id,catalogName:H.name})},[H]);g=l(function(){H.id!==u&&(x.setEditComponentAssetChanged(!0),R()),i()},[i,u,x,R,H.id]);F=c("useFBECreateCatalogMutation")(s,t,b,A,z,u,w,E,K,B,C,r.externalBusinessID,function(a){var b,c;b=(b=a.fbe_create_catalog_with_eligibility)==null?void 0:(b=b.catalog)==null?void 0:b.id;c=(c=a.fbe_create_catalog_with_eligibility)==null?void 0:(c=c.catalog)==null?void 0:c.name;a=(a=(a=a.fbe_create_catalog_with_eligibility)==null?void 0:a.is_disabled)!=null?a:!0;a||Q(b,c);G.setEvent("asset_creation_success").logWithAssets(r)},function(a){var b;c("FBEUnifiedBusinessLoginStateSetErrorAction").dispatch({error:a},{line:"286",module:"FBEUnifiedBusinessLoginSelectCatalogSection.react.js",moduleID:f.id});G.setEvent("asset_creation_fail").setExtra((b={},b.error_message=a.message,b.error_code=String(a.number),b.error_stack_trace=a.stack,b)).logWithAssets(r)});s=F[0];t=F[1];b=M?void 0:j.jsx("div",{children:L.map(function(a,b){var d=a.catalog,e=a.ineligibilities,f=a.rich_ineligibilities;a=a.is_disabled;if(d==null)return null;var g=d.id;d=d.name;return g==null||d==null||a==null?null:j.jsx(c("FBEUnifiedBusinessLoginCatalogItem.react"),{flow:E,id:g,ineligibilities:e,isDisabled:a,isLastItem:b===L.length-1,isSelected:g===H.id,name:d,richIneligibilities:f,onSelect:Q},b)})});z=(A=L.find(function(a){a=a.catalog;return(a==null?void 0:a.id)===H.id}))==null?void 0:A.catalog;K=z==null?void 0:(w=z.items)==null?void 0:w.count;F=(C=z==null?void 0:(B=z.product_feeds)==null?void 0:B.nodes.some(function(a){a=a.source_app_id;return a===c("AdsApplicationIDs").COMMERCE_MANAGER}))!=null?C:!1;A=K!=null&&K>0;w=y!=null&&H.id!=null&&y!==H.id&&A;z=x.isFlowCatalogMigration();B=z?"CATALOG_MIGRATION":w?"DEFAULT":null;(w||F)&&E==="AR_COMMERCE"&&(B="AR_COMMERCE");C=N&&(O==null?void 0:O.id)===H.id?null:z||w||F?d("FBEUnifiedBusinessLoginLabels").FBEUnifiedBusinessLoginLabelsUtils.getAssetSelectionWarningDescription({appName:h.name,labelKey:B,step:c("FBESetupSteps").CATALOG_STEP}):null;return j.jsx(c("FBEUnifiedBusinessLoginSelectAndCreateAssetSection.react"),{application:h,assetSelectionWarning:C,defaultNewAssetName:e,isFallback:!1,isLoading:t,labels:v,loadingComponent:q,shouldShowCreateNewAction:(K=D.catalog.canCreateInFlow)!=null?K:!1,step:c("FBESetupSteps").CATALOG_STEP,onAdvanceClick:J?void 0:g,onBackClick:p?void 0:a,onCancelClick:k,onCreate:s,children:b})}p.displayName=p.name+" [from "+f.id+"]";function a(a){var b=a.application,e=a.advanceStep,f=a.cancelOnClick,g=a.context,h=a.coreAssetsStep;h=h===void 0?null:h;var i=a.loadingView;a=a.retreatStep;d("Laminar").useProvider(c("FBEUnifiedBusinessLoginStateProvider"));var l=j.jsx(c("FBEUnifiedBusinessLoginSelectAndCreateAssetSection.react"),{application:b,assetSelectionWarning:null,isFallback:!0,isLoading:!1,labels:d("FBEUnifiedBusinessLoginLabels").SELECT_CATALOG_SECTION_LABELS,step:c("FBESetupSteps").CATALOG_STEP,onAdvanceClick:e,onBackClick:a,onCancelClick:f});return j.jsx(c("FBEUnifiedBusinessLoginErrorBoundary.react"),{application:b,children:j.jsx(k,{fallback:l,children:j.jsx(p,{advanceStep:e,application:b,cancelOnClick:f,context:g,coreAssetsStep:h,loadingView:i,retreatStep:a})})})}a.displayName=a.name+" [from "+f.id+"]";e=d("Laminar").laminarContainer(a);g["default"]=e}),98);
-----
useFBECreateCatalogMutation",["FBELoginUtils","RelayHooks","nullthrows","react","relay-runtime","useFBECreateCatalogMutation_CreateCatalogMutation.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h,i,j=(i||d("react")).useCallback,k=h!==void 0?h:h=b("useFBECreateCatalogMutation_CreateCatalogMutation.graphql");function l(a){return function(b){var c=b.getRootField("fbe_create_catalog_with_eligibility");if(a!=null){var e=b.get(a);c=e&&c&&d("relay-runtime").ConnectionHandler.createEdge(b,e,c,"FbeViewerPagesWithChannelDataEdge");e!=null&&c!=null&&d("relay-runtime").ConnectionHandler.insertEdgeBefore(e,c)}else b.invalidateStore()}}function a(a,b,e,f,g,h,i,m,n,o,p,q,r,s){var t=d("RelayHooks").useMutation(k),u=t[0];t=t[1];var v=j(function(d,j){u({onCompleted:function(a){r(a),j(!0)},onError:function(a){s(a),j(!1)},updater:l(n),variables:{input:{business_id:c("nullthrows")(a),name:d,app_id:c("nullthrows")(b),catalog_vertical:c("FBELoginUtils").getCatalogVerticalFromFBEVertical(e),fbe_vertical:c("nullthrows")(e),commerce_requirements:i,flow:m,page_id:f,instagram_id:g,catalog_id:h,instagram_access_token:o,external_business_id:q,oidc_token:p}}})},[u,n,a,b,e,i,m,f,g,h,o,q,r,s,p]);return[v,t]}g["default"]=a}),98);
-----
useFBEAssetListItemsWithMutation",["BizLinkInstagramUsernameRelay","FBELoginUtils","FBEUnifiedBusinessLoginLabels","FBEUnifiedBusinessLoginStateSetAdAccountAction","FBEUnifiedBusinessLoginStateSetCatalogAction","FBEUnifiedBusinessLoginStateSetErrorAction","FBEUnifiedBusinessLoginStateSetPixelAction","FBEUnifiedBusinessLoginStateSetSelectedProfileAction","FBEUnifiedBusinessLoginUtils","cr:7075","gkx","nullthrows","react","useFBECreateAdAccountMutation","useFBECreateCatalogMutation","useFBECreatePageMutation","useFBECreatePixelMutation"],(function(a,b,c,d,e,f,g){"use strict";var h,i=(h||d("react")).useState;function a(a){var e,g,h,j,k,l=a.newAssetNamePrefix,m=a.onPageCreationSuccess,n=a.state;a=(a=n.fbeExtraParams)==null?void 0:a.setup;var o=a==null?void 0:a.business_vertical,p=n.adAccountID,q=n.adAccountName,r=n.adsValuePropSelected,s=n.appID,t=n.businessID,u=n.businessName,v=n.catalogID,w=n.catalogName,x=n.commerceSalesIntent,y=n.cms,z=n.flowConfig,A=n.instagramAssetID,B=n.instagramUsername,C=n.instagramUsernameRelayKey,D=n.pageID,E=n.pageName,F=n.pixelID,G=n.pixelIdsBulkSelect,H=n.pixelName,I=n.instagramLoggedInAccessToken,J=n.instagramOIDCToken,K=z.allowMultiSelect,L=z.assetsSetup,M=z.dependencies,N=z.flow,O=z.steps,aa=z.hasExternalClientMetadata,P=i(),ba=P[0],Q=P[1];P=i();var R=P[0],S=P[1];P=i();var T=P[0],U=P[1];P=i();var ca=P[0],V=P[1];P=p==null;var W=v==null;e=z.isFlowMessagingEvents()&&((e=z.assetsSetup.page.optional)!=null?e:!1);e=D==null&&!e;var X=K?!1:F==null&&L.pixel.canCreateInFlow===!0,Y=l,da=d("FBEUnifiedBusinessLoginLabels").FBEUnifiedBusinessLoginLabelsUtils.getDefaultNewAssetName(l,d("FBEUnifiedBusinessLoginLabels").AD_ACCOUNT).toString(),Z=d("FBEUnifiedBusinessLoginLabels").FBEUnifiedBusinessLoginLabelsUtils.getDefaultNewAssetName(l,d("FBEUnifiedBusinessLoginLabels").CATALOG).toString();l=d("FBEUnifiedBusinessLoginLabels").FBEUnifiedBusinessLoginLabelsUtils.getDefaultNewAssetName(l,c("FBELoginUtils").shouldShowDatasets(s,N)?d("FBEUnifiedBusinessLoginLabels").DATASET:d("FBEUnifiedBusinessLoginLabels").PIXEL).toString();x=z.getFBECommerceRequirements(x);I=I!=null?{sensitive_string_value:I}:null;var $=function(a){return a==null||a===""};C=d("BizLinkInstagramUsernameRelay").useBizLinkInstagramUsernameBuilder({bizLinkInstagramUsername:C});$=$(B)?C.wrap(function(a){if(a.length===0)return"";else return"@"+a}).build().asFbtParam():B;C=J!=null?{sensitive_string_value:J}:null;B=c("useFBECreateAdAccountMutation")(t,D,A,a,N,null,s,function(a){var b;if(((b=a.fbe_create_ad_account_with_channel_data)==null?void 0:b.ineligibilities.length)===0){c("FBEUnifiedBusinessLoginStateSetAdAccountAction").dispatch({adAccountID:(b=a.fbe_create_ad_account_with_channel_data)==null?void 0:(b=b.ad_account)==null?void 0:b.id,adAccountName:(b=a.fbe_create_ad_account_with_channel_data)==null?void 0:(a=b.ad_account)==null?void 0:a.name},{line:"198",module:"useFBEAssetListItemsWithMutation.js",moduleID:f.id})}},function(a){var b;c("FBEUnifiedBusinessLoginStateSetErrorAction").dispatch({error:a},{line:"207",module:"useFBEAssetListItemsWithMutation.js",moduleID:f.id});Q((b=a.description)!=null?b:a.message)});J=B[0];B=B[1];o=c("useFBECreateCatalogMutation")(t,s,o,D,A,v,x,N,null,I,C,a==null?void 0:a.external_business_id,function(a){var b;c("FBEUnifiedBusinessLoginStateSetCatalogAction").dispatch({catalogName:(b=a.fbe_create_catalog_with_eligibility)==null?void 0:(b=b.catalog)==null?void 0:b.name,catalogID:(b=a.fbe_create_catalog_with_eligibility)==null?void 0:(a=b.catalog)==null?void 0:a.id},{line:"231",module:"useFBEAssetListItemsWithMutation.js",moduleID:f.id})},function(a){var b;c("FBEUnifiedBusinessLoginStateSetErrorAction").dispatch({error:a},{line:"238",module:"useFBEAssetListItemsWithMutation.js",moduleID:f.id});S((b=a.description)!=null?b:a.message)});C=o[0];a=o[1];o=c("useFBECreatePageMutation")(t,D,A,x,N,null,I,s,function(a){var b,d;b=(b=a.fbe_create_page_with_eligibility)==null?void 0:(b=b.page)==null?void 0:b.id;d=(d=a.fbe_create_page_with_eligibility)==null?void 0:(d=d.page)==null?void 0:d.name;a=(a=(a=a.fbe_create_page_with_eligibility)==null?void 0:a.is_disabled)!=null?a:!0;a||(m&&m(b,d),c("FBEUnifiedBusinessLoginStateSetSelectedProfileAction").dispatch({pageID:b,pageName:d,instagramAssetID:null,instagramNameRelayKey:null,instagramUsernameRelayKey:null,instagramImageURI:null,cmsID:null},{line:"263",module:"useFBEAssetListItemsWithMutation.js",moduleID:f.id}))},function(a){var b;c("FBEUnifiedBusinessLoginStateSetErrorAction").dispatch({error:a},{line:"275",module:"useFBEAssetListItemsWithMutation.js",moduleID:f.id});U((b=a.description)!=null?b:a.message)});I=o[0];o=o[1];t=c("useFBECreatePixelMutation")(c("nullthrows")(s),c("nullthrows")(t),D,A,x,v,N,null,c("FBELoginUtils").shouldShowDatasets(s,N),function(a){var b;a=a.fbe_create_pixel_with_eligibility;b=(b=a==null?void 0:a.is_disabled)!=null?b:!0;if(!b){c("FBEUnifiedBusinessLoginStateSetPixelAction").dispatch({pixelAutomaticMatching:a==null?void 0:(b=a.pixel)==null?void 0:b.enable_automatic_matching,pixelAutomaticMatchingFields:a==null?void 0:(b=a.pixel)==null?void 0:b.automatic_matching_fields,pixelID:a==null?void 0:(b=a.pixel)==null?void 0:b.id,pixelName:a==null?void 0:(b=a.pixel)==null?void 0:b.name,datasetHasAppContainer:d("FBEUnifiedBusinessLoginUtils").hasDatasetAppContainer(a)},{line:"297",module:"useFBEAssetListItemsWithMutation.js",moduleID:f.id})}},function(a){var b;c("FBEUnifiedBusinessLoginStateSetErrorAction").dispatch({error:a},{line:"307",module:"useFBEAssetListItemsWithMutation.js",moduleID:f.id});V((b=a.description)!=null?b:a.message)});A=t[0];x=t[1];t=(t=L.page.enabled)!=null?t:!1;g=(g=L.ig.enabled)!=null?g:!1;h=(h=L.catalog.enabled)!=null?h:!1;j=(j=L.ad_account.enabled)!=null?j:!1;k=(k=L.pixel.enabled)!=null?k:!1;$={coreAssetsStep:"INSTAGRAM_STEP",editComponent:["INSTAGRAM_STEP"].concat(c("nullthrows")(M.ig_step,"IG dependency list should not be null")).map(function(a){return z.getStepComponent(n,a)}).filter(Boolean),existsWhenNull:g,isDisabled:c("nullthrows")(L.ig.lockOnAssetScreen,"lockOnAssetScreen should not be null for assets"),name:($=$)!=null?$:"",rowTestID:"business_login_ig_row",type:d("FBEUnifiedBusinessLoginLabels").INSTAGRAM_PROFILE};D={coreAssetsStep:"PAGE_STEP",editComponent:["PAGE_STEP"].concat(c("nullthrows")(M.page_step,"Page dependency list should not be null")).map(function(a){return z.getStepComponent(n,a)}).filter(Boolean),error:D==null?T:void 0,isCreating:o,isDisabled:c("nullthrows")(L.page.lockOnAssetScreen,"lockOnAssetScreen should not be null for assets"),name:e?Y:E,onCreate:I,onError:U,rowTestID:"business_login_page_row",shouldCreate:e,type:d("FBEUnifiedBusinessLoginLabels").FACEBOOK_PAGE};T=O.includes("CATALOG_MIGRATION_STEP")?"CATALOG_MIGRATION_STEP":"CATALOG_STEP";o={coreAssetsStep:"CATALOG_STEP",editComponent:[T].concat(c("nullthrows")(M.catalog_step,"Catalog dependency list should not be null")).map(function(a){return z.getStepComponent(n,a)}).filter(Boolean),error:v==null?R:void 0,isCreating:a,isDisabled:c("nullthrows")(L.catalog.lockOnAssetScreen,"lockOnAssetScreen should not be null for assets"),name:W?Z:w,onCreate:C,onError:S,rowTestID:"business_login_catalog_row",shouldCreate:W,type:d("FBEUnifiedBusinessLoginLabels").CATALOG};E=(Y=L.pixel.enabled)!=null?Y:!1;I=["AD_ACCOUNT_STEP"].concat(c("nullthrows")(M.ad_account_step,"Ad Account dependency list should not be null"));e={coreAssetsStep:"AD_ACCOUNT_STEP",editComponent:I.map(function(a){return z.getStepComponent(n,a)}).filter(Boolean),error:p==null?ba:void 0,isCreating:B,isDisabled:c("nullthrows")(L.ad_account.lockOnAssetScreen,"lockOnAssetScreen should not be null for assets"),name:P?da:q,onCreate:J,onError:Q,rowTestID:"business_login_ad_account_row",shouldCreate:P,type:d("FBEUnifiedBusinessLoginLabels").AD_ACCOUNT};T={additionalComponent:F!=null&&N!=="CONVERSIONS_API_GATEWAY_INDEPENDENT_PIXEL_MIGRATION"?b("cr:7075"):void 0,coreAssetsStep:"PIXEL_STEP",editComponent:["PIXEL_STEP"].concat(c("nullthrows")(M.pixel_step,"Pixel dependency list should not be null")).map(function(a){return z.getStepComponent(n,a)}).filter(Boolean),error:F==null?ca:void 0,isCreating:x,isDisabled:c("nullthrows")(L.pixel.lockOnAssetScreen,"lockOnAssetScreen should not be null for assets"),name:K?d("FBEUnifiedBusinessLoginLabels").FBEUnifiedBusinessLoginLabelsUtils.getMultiAssetsLabel((O=G==null?void 0:G.length)!=null?O:0,c("FBELoginUtils").shouldShowDatasets(s,N)).toString():X?l:H,onCreate:A,onError:V,rowTestID:"business_login_pixel_row",shouldCreate:X,type:c("FBELoginUtils").shouldShowDatasets(s,N)?d("FBEUnifiedBusinessLoginLabels").DATASET:d("FBEUnifiedBusinessLoginLabels").PIXEL};v={coreAssetsStep:"COMMERCE_ACCOUNT_STEP",editComponent:["COMMERCE_ACCOUNT_STEP"].map(function(a){return z.getStepComponent(n,a)}).filter(Boolean),isDisabled:!1,name:y==null?void 0:y.name,type:d("FBEUnifiedBusinessLoginLabels").COMMERCE_ACCOUNT};R=["BUSINESS_MANAGER_STEP"];t&&R.push("PAGE_STEP");h&&R.push("CATALOG_STEP");j&&r.isSelected&&R.push("AD_ACCOUNT_STEP");k&&E&&R.push("PIXEL_STEP");a=z.isFlowCommerce();a&&(n.instagramShopSelected.isSelected||n.facebookShopSelected.isSelected)&&R.push("COMMERCE_ACCOUNT_STEP");Z=["BUSINESS_MANAGER_STEP"].concat(c("nullthrows")(M.business_manager_step,"Business Manager dependency list should not be null"));w={coreAssetsStep:"BUSINESS_MANAGER_STEP",editComponent:Z.map(function(a){return z.getStepComponent(n,a)}).filter(Boolean),isDisabled:c("nullthrows")(L.business_manager.lockOnAssetScreen,"lockOnAssetScreen should not be null for assets"),name:u,rowTestID:"business_login_business_manager_row",type:d("FBEUnifiedBusinessLoginLabels").BUSINESS};C=[w];W=c("gkx")("20906")&&a&&!n.facebookShopSelected.isSelected;t&&!W&&C.push(D);Y=(!n.instagramShopSelected.isSelected||n.isInferredIGFromAsset)&&a;g&&!$.isDisabled&&!Y&&C.push($);h&&C.push(o);j&&r.isSelected&&C.push(e);a&&(n.instagramShopSelected.isSelected||n.facebookShopSelected.isSelected)&&!d("FBEUnifiedBusinessLoginUtils").isNewBeyondShopifyBetaFlow(s,N,aa)&&C.push(v);k&&E&&C.push(T);return C}g["default"]=a}),98);
-----
useFBECreateCatalogMutation_CreateCatalogMutation.graphql",["useFBECreateCatalogMutation_CreateCatalogMutation_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],c=[{alias:null,args:[{kind:"Variable",name:"data",variableName:"input"}],concreteType:"FBECatalogWithEligibility",kind:"LinkedField",name:"fbe_create_catalog_with_eligibility",plural:!1,selections:[{alias:null,args:null,concreteType:"ProductCatalog",kind:"LinkedField",name:"catalog",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ineligibilities",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_disabled",storageKey:null},{alias:null,args:null,concreteType:"FBERichIneligibility",kind:"LinkedField",name:"rich_ineligibilities",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"content_ref_uri",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"fbe_ineligibility",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"message",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"useFBECreateCatalogMutation_CreateCatalogMutation",selections:c,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"useFBECreateCatalogMutation_CreateCatalogMutation",selections:c},params:{id:b("useFBECreateCatalogMutation_CreateCatalogMutation_facebookRelayOperation"),metadata:{},name:"useFBECreateCatalogMutation_CreateCatalogMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
useFBECreateCatalogMutation_CreateCatalogMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="5837023673085902"}),null);
-----
useFBECreateCatalogMutation_CreateCatalogMutation_mobileRelayOperation",[],(function(a,b,c,d,e,f){e.exports="5837023673085902"}),null);
-----
useFBEAssetListItemsWithMutation",["FBEUnifiedBusinessLoginLabels","FBEUnifiedBusinessLoginPixelAutomaticMatchingOverviewComponent.react","FBEUnifiedBusinessLoginStateSetAdAccountAction","FBEUnifiedBusinessLoginStateSetCatalogAction","FBEUnifiedBusinessLoginStateSetErrorAction","FBEUnifiedBusinessLoginStateSetPixelAction","FBEUnifiedBusinessLoginStateSetSelectedProfileAction","gkx","nullthrows","react","useFBECreateAdAccountMutation","useFBECreateCatalogMutation","useFBECreatePageMutation","useFBECreatePixelMutation"],(function(a,b,c,d,e,f,g){"use strict";var h=d("react").useState;function a(a){var b,e,f=a.newAssetNamePrefix,g=a.onPageCreationSuccess,i=a.state;a=(a=i.fbeExtraParams)==null?void 0:a.setup;var j=a==null?void 0:a.business_vertical,k=i.adAccountID,l=i.adAccountName,m=i.adsValuePropSelected,n=i.appID,o=i.businessID,p=i.businessName,q=i.catalogID,r=i.catalogName,s=i.commerceSalesIntent,t=i.cms,u=i.flowConfig,v=i.instagramID,w=i.instagramUsername,x=i.pageID,y=i.pageName,z=i.pixelID,A=i.pixelName,B=i.instagramLoggedInAccessToken,C=u.assetsSetup,D=u.dependencies,E=u.flow,F=u.steps,G=h(),H=G[0],I=G[1];G=h();var J=G[0],K=G[1];G=h();var L=G[0],M=G[1];G=h();var N=G[0],O=G[1];G=k==null;var P=q==null,Q=x==null,R=z==null,S=f,T=d("FBEUnifiedBusinessLoginLabels").FBEUnifiedBusinessLoginLabelsUtils.getDefaultNewAssetName(f,d("FBEUnifiedBusinessLoginLabels").AD_ACCOUNT).toString(),U=d("FBEUnifiedBusinessLoginLabels").FBEUnifiedBusinessLoginLabelsUtils.getDefaultNewAssetName(f,d("FBEUnifiedBusinessLoginLabels").CATALOG).toString();f=d("FBEUnifiedBusinessLoginLabels").FBEUnifiedBusinessLoginLabelsUtils.getDefaultNewAssetName(f,d("FBEUnifiedBusinessLoginLabels").PIXEL).toString();s=u.getFBECommerceRequirements(s);B=B!=null?{sensitive_string_value:B}:null;var V=c("useFBECreateAdAccountMutation")(o,x,v,a,E,null,n,function(a){var b;if(((b=a.fbe_create_ad_account_with_channel_data)==null?void 0:b.ineligibilities.length)===0){c("FBEUnifiedBusinessLoginStateSetAdAccountAction").dispatch({adAccountID:(b=a.fbe_create_ad_account_with_channel_data)==null?void 0:(b=b.ad_account)==null?void 0:b.id,adAccountName:(b=a.fbe_create_ad_account_with_channel_data)==null?void 0:(a=b.ad_account)==null?void 0:a.name},{line:"144",module:"useFBEAssetListItemsWithMutation.js"})}},function(a){var b;c("FBEUnifiedBusinessLoginStateSetErrorAction").dispatch({error:a},{line:"153",module:"useFBEAssetListItemsWithMutation.js"});I((b=a.description)!=null?b:a.message)}),W=V[0];V=V[1];j=c("useFBECreateCatalogMutation")(o,n,j,x,v,q,s,E,null,B,a==null?void 0:a.external_business_id,function(a){var b;c("FBEUnifiedBusinessLoginStateSetCatalogAction").dispatch({catalogName:(b=a.fbe_create_catalog_with_eligibility)==null?void 0:(b=b.catalog)==null?void 0:b.name,catalogID:(b=a.fbe_create_catalog_with_eligibility)==null?void 0:(a=b.catalog)==null?void 0:a.id},{line:"176",module:"useFBEAssetListItemsWithMutation.js"})},function(a){var b;c("FBEUnifiedBusinessLoginStateSetErrorAction").dispatch({error:a},{line:"183",module:"useFBEAssetListItemsWithMutation.js"});K((b=a.description)!=null?b:a.message)});a=j[0];j=j[1];B=c("useFBECreatePageMutation")(o,x,v,s,E,null,B,function(a){var b,d;b=(b=a.fbe_create_page_with_eligibility)==null?void 0:(b=b.page)==null?void 0:b.id;d=(d=a.fbe_create_page_with_eligibility)==null?void 0:(d=d.page)==null?void 0:d.name;a=(a=(a=a.fbe_create_page_with_eligibility)==null?void 0:a.is_disabled)!=null?a:!0;a||(g&&g(b,d),c("FBEUnifiedBusinessLoginStateSetSelectedProfileAction").dispatch({pageID:b,pageName:d,instagramID:null,instagramName:null,instagramUsername:null,instagramImageURI:null,cmsID:null,commerceSalesIntent:null},{line:"207",module:"useFBEAssetListItemsWithMutation.js"}))},function(a){var b;c("FBEUnifiedBusinessLoginStateSetErrorAction").dispatch({error:a},{line:"220",module:"useFBEAssetListItemsWithMutation.js"});M((b=a.description)!=null?b:a.message)});var X=B[0];B=B[1];n=c("useFBECreatePixelMutation")(c("nullthrows")(n),c("nullthrows")(o),x,v,s,q,E,null,function(a){var b;a=a.fbe_create_pixel_with_eligibility;b=(b=a==null?void 0:a.is_disabled)!=null?b:!0;if(!b){c("FBEUnifiedBusinessLoginStateSetPixelAction").dispatch({pixelAutomaticMatching:a==null?void 0:(b=a.pixel)==null?void 0:b.enable_automatic_matching,pixelAutomaticMatchingFields:a==null?void 0:(b=a.pixel)==null?void 0:b.automatic_matching_fields,pixelID:a==null?void 0:(b=a.pixel)==null?void 0:b.id,pixelName:a==null?void 0:(b=a.pixel)==null?void 0:b.name},{line:"241",module:"useFBEAssetListItemsWithMutation.js"})}},function(a){var b;c("FBEUnifiedBusinessLoginStateSetErrorAction").dispatch({error:a},{line:"250",module:"useFBEAssetListItemsWithMutation.js"});O((b=a.description)!=null?b:a.message)});o=n[0];v=n[1];E=(s=C.page.enabled)!=null?s:!1;s=(n=C.ig.enabled)!=null?n:!1;n=(n=C.catalog.enabled)!=null?n:!1;b=(b=C.ad_account.enabled)!=null?b:!1;e=(e=C.pixel.enabled)!=null?e:!1;w={coreAssetsStep:"INSTAGRAM_STEP",editComponent:["INSTAGRAM_STEP"].concat(c("nullthrows")(D.ig_step,"IG dependency list should not be null")).map(function(a){return u.getStepComponent(i,a)}).filter(Boolean),existsWhenNull:s,isDisabled:c("nullthrows")(C.ig.lockOnAssetScreen,"lockOnAssetScreen should not be null for assets"),name:w==null?"":"@"+w,rowTestID:"business_login_ig_row",type:d("FBEUnifiedBusinessLoginLabels").INSTAGRAM_PROFILE};x={coreAssetsStep:"PAGE_STEP",editComponent:["PAGE_STEP"].concat(c("nullthrows")(D.page_step,"Page dependency list should not be null")).map(function(a){return u.getStepComponent(i,a)}).filter(Boolean),error:x==null?L:void 0,isCreating:B,isDisabled:c("nullthrows")(C.page.lockOnAssetScreen,"lockOnAssetScreen should not be null for assets"),name:Q?S:y,onCreate:X,onError:M,rowTestID:"business_login_page_row",shouldCreate:Q,type:d("FBEUnifiedBusinessLoginLabels").FACEBOOK_PAGE};L=F.includes("CATALOG_MIGRATION_STEP")?"CATALOG_MIGRATION_STEP":"CATALOG_STEP";B={coreAssetsStep:"CATALOG_STEP",editComponent:[L].concat(c("nullthrows")(D.catalog_step,"Catalog dependency list should not be null")).map(function(a){return u.getStepComponent(i,a)}).filter(Boolean),error:q==null?J:void 0,isCreating:j,isDisabled:c("nullthrows")(C.catalog.lockOnAssetScreen,"lockOnAssetScreen should not be null for assets"),name:P?U:r,onCreate:a,onError:K,rowTestID:"business_login_catalog_row",shouldCreate:P,type:d("FBEUnifiedBusinessLoginLabels").CATALOG};y=(S=C.pixel.enabled)!=null?S:!1;X=["AD_ACCOUNT_STEP"].concat(c("nullthrows")(D.ad_account_step,"Ad Account dependency list should not be null"));Q={coreAssetsStep:"AD_ACCOUNT_STEP",editComponent:X.map(function(a){return u.getStepComponent(i,a)}).filter(Boolean),error:k==null?H:void 0,isCreating:V,isDisabled:c("nullthrows")(C.ad_account.lockOnAssetScreen,"lockOnAssetScreen should not be null for assets"),name:G?T:l,onCreate:W,onError:I,rowTestID:"business_login_ad_account_row",shouldCreate:G,type:d("FBEUnifiedBusinessLoginLabels").AD_ACCOUNT};F={additionalComponent:z!=null?c("FBEUnifiedBusinessLoginPixelAutomaticMatchingOverviewComponent.react"):void 0,coreAssetsStep:"PIXEL_STEP",editComponent:["PIXEL_STEP"].concat(c("nullthrows")(D.pixel_step,"Pixel dependency list should not be null")).map(function(a){return u.getStepComponent(i,a)}).filter(Boolean),error:z==null?N:void 0,isCreating:v,isDisabled:c("nullthrows")(C.pixel.lockOnAssetScreen,"lockOnAssetScreen should not be null for assets"),name:R?f:A,onCreate:o,onError:O,rowTestID:"business_login_pixel_row",shouldCreate:R,type:d("FBEUnifiedBusinessLoginLabels").PIXEL};L={coreAssetsStep:"COMMERCE_ACCOUNT_STEP",editComponent:["COMMERCE_ACCOUNT_STEP"].map(function(a){return u.getStepComponent(i,a)}).filter(Boolean),isDisabled:!1,name:t==null?void 0:t.name,type:d("FBEUnifiedBusinessLoginLabels").COMMERCE_ACCOUNT};q=["BUSINESS_MANAGER_STEP"];E&&q.push("PAGE_STEP");n&&q.push("CATALOG_STEP");b&&m.isSelected&&q.push("AD_ACCOUNT_STEP");e&&y&&q.push("PIXEL_STEP");J=u.isFlowCommerce();J&&(i.instagramShopSelected.isSelected||i.facebookShopSelected.isSelected)&&q.push("COMMERCE_ACCOUNT_STEP");j=["BUSINESS_MANAGER_STEP"].concat(c("nullthrows")(D.business_manager_step,"Business Manager dependency list should not be null"));U={coreAssetsStep:"BUSINESS_MANAGER_STEP",editComponent:j.map(function(a){return u.getStepComponent(i,a)}).filter(Boolean),isDisabled:c("nullthrows")(C.business_manager.lockOnAssetScreen,"lockOnAssetScreen should not be null for assets"),name:p,rowTestID:"business_login_business_manager_row",type:d("FBEUnifiedBusinessLoginLabels").BUSINESS};r=[U];a=c("gkx")("1477")&&J&&!i.facebookShopSelected.isSelected;E&&!a&&r.push(x);s&&!w.isDisabled&&r.push(w);n&&r.push(B);b&&m.isSelected&&r.push(Q);J&&(i.instagramShopSelected.isSelected||i.facebookShopSelected.isSelected)&&r.push(L);e&&y&&r.push(F);return r}g["default"]=a}),98);
-----
useFBECreateCatalogMutation",["FBELoginUtils","RelayHooks","nullthrows","react","relay-runtime","useFBECreateCatalogMutation_CreateCatalogMutation.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h,i=d("react").useCallback,j=h!==void 0?h:h=b("useFBECreateCatalogMutation_CreateCatalogMutation.graphql");function k(a){return function(b){var c=b.getRootField("fbe_create_catalog_with_eligibility");if(a!=null){var e=b.get(a);c=e&&c&&d("relay-runtime").ConnectionHandler.createEdge(b,e,c,"FbeViewerPagesWithChannelDataEdge");e!=null&&c!=null&&d("relay-runtime").ConnectionHandler.insertEdgeBefore(e,c)}else b.invalidateStore()}}function a(a,b,e,f,g,h,l,m,n,o,p,q,r){var s=d("RelayHooks").useMutation(j),t=s[0];s=s[1];var u=i(function(d,i){t({onCompleted:function(a){q(a),i(!0)},onError:function(a){r(a),i(!1)},updater:k(n),variables:{input:{business_id:c("nullthrows")(a),name:d,app_id:c("nullthrows")(b),catalog_vertical:c("FBELoginUtils").getCatalogVerticalFromFBEVertical(e),fbe_vertical:c("nullthrows")(e),commerce_requirements:l,flow:m,page_id:f,instagram_id:g,catalog_id:h,instagram_access_token:o,external_business_id:p}}})},[t,n,a,b,e,l,m,f,g,h,o,p,q,r]);return[u,s]}g["default"]=a}),98);
-----
FBEUnifiedBusinessLoginSelectCatalogSection.react",["AdsApplicationIDs","FBESetupSteps","FBEUnifiedBusinessLoginCatalogItem.react","FBEUnifiedBusinessLoginErrorBoundary.react","FBEUnifiedBusinessLoginLabels","FBEUnifiedBusinessLoginLogger","FBEUnifiedBusinessLoginSelectAndCreateAssetSection.react","FBEUnifiedBusinessLoginSelectCatalogSectionQuery.graphql","FBEUnifiedBusinessLoginStateProvider","FBEUnifiedBusinessLoginStateSetCatalogAction","FBEUnifiedBusinessLoginStateSetErrorAction","Laminar","RelayHooks","nullthrows","react","useFBECreateCatalogMutation"],(function(a,b,c,d,e,f,g){"use strict";var h,i=d("react");e=d("react");var j=e.Suspense,k=e.useCallback,l=e.useState,m=h!==void 0?h:h=b("FBEUnifiedBusinessLoginSelectCatalogSectionQuery.graphql");function n(a){var b,e,f,g=a.application,h=a.advanceStep,j=a.cancelOnClick,n=a.coreAssetsStep;n=n===void 0?null:n;var o=a.loadingView;a=a.retreatStep;var p=c("FBEUnifiedBusinessLoginStateProvider")(),q=p.businessID,r=p.appID,s=p.catalogID,t=p.catalogName,u=p.commerceSalesIntent,v=p.flowConfig,w=p.installedCatalogID,x=p.instagramID,y=p.pageID,z=p.instagramLoggedInAccessToken,A=v.assetsSetup,B=v.flow;b=(b=p.fbeExtraParams)==null?void 0:(b=b.setup)==null?void 0:b.business_vertical;e=(e=p.fbeExtraParams)==null?void 0:(e=e.business_config)==null?void 0:(e=e.business)==null?void 0:e.name;e=e!=null?d("FBEUnifiedBusinessLoginLabels").FBEUnifiedBusinessLoginLabelsUtils.getDefaultNewAssetName(e,d("FBEUnifiedBusinessLoginLabels").CATALOG).toString():"";var C=c("FBEUnifiedBusinessLoginLogger").getInstance().setStep(c("FBESetupSteps").CATALOG_STEP);t=l({id:s,name:t});var D=t[0],E=t[1];A=(t=A.catalog.contentOverride)!=null?t:d("FBEUnifiedBusinessLoginLabels").SELECT_CATALOG_SECTION_LABELS;t=D.id==null;n=v.editComponentAssetChanged&&n==="CATALOG_STEP";u=v.getFBECommerceRequirements(u);z=z!=null?{sensitive_string_value:z}:null;f={input:{business_id:c("nullthrows")(q,"Business ID should not be null"),flow:B,page_id:y,instagram_id:x,catalog_id:s,ad_account_id:null,pixel_id:null,vertical:(f=b)!=null?f:"ECOMMERCE",external_business_id:p.externalBusinessID,app_id:p.appID,commerce_requirements:u,install_source:"BUSINESS_LOGIN",entrypoint:"BUSINESS_LOGIN",instagram_access_token:z}};var F={fetchPolicy:"network-only"};f=d("RelayHooks").useLazyLoadQuery(m,f,F);F=(F=f.fbe_viewer_catalogs_with_channel_data)==null?void 0:F.__id;f=(f=(f=f.fbe_viewer_catalogs_with_channel_data)==null?void 0:f.edges)!=null?f:[];var G=f.map(function(a){return a.node}).filter(Boolean);f=G.length===0;var H=k(function(a,b){E({id:a,name:b})},[]),I=k(function(){c("FBEUnifiedBusinessLoginStateSetCatalogAction").dispatch({catalogID:D.id,catalogName:D.name})},[D]),J=k(function(){D.id!==s&&(v.setEditComponentAssetChanged(!0),I()),h()},[h,s,v,I,D.id]);q=c("useFBECreateCatalogMutation")(q,r,b,y,x,s,u,B,F,z,p.externalBusinessID,function(a){var b,c;b=(b=a.fbe_create_catalog_with_eligibility)==null?void 0:(b=b.catalog)==null?void 0:b.id;c=(c=a.fbe_create_catalog_with_eligibility)==null?void 0:(c=c.catalog)==null?void 0:c.name;a=(a=(a=a.fbe_create_catalog_with_eligibility)==null?void 0:a.is_disabled)!=null?a:!0;a||H(b,c);C.setEvent("asset_creation_success").logWithAssets(p)},function(a){var b;c("FBEUnifiedBusinessLoginStateSetErrorAction").dispatch({error:a},{line:"248",module:"FBEUnifiedBusinessLoginSelectCatalogSection.react.js"});C.setEvent("asset_creation_fail").setExtra((b={},b.error_message=a.message,b.error_code=String(a.number),b.error_stack_trace=a.stack,b)).logWithAssets(p)});r=q[0];b=q[1];y=f?void 0:i.jsx("div",{children:G.map(function(a,b){var d=a.catalog,e=a.ineligibilities,f=a.rich_ineligibilities;a=a.is_disabled;if(d==null)return null;var g=d.id;d=d.name;return g==null||d==null||a==null?null:i.jsx(c("FBEUnifiedBusinessLoginCatalogItem.react"),{flow:B,id:g,ineligibilities:e,isDisabled:a,isLastItem:b===G.length-1,isSelected:g===D.id,name:d,richIneligibilities:f,onSelect:H},b)})});u=(x=G.find(function(a){a=a.catalog;return(a==null?void 0:a.id)===D.id}))==null?void 0:x.catalog;z=u==null?void 0:(F=u.items)==null?void 0:F.count;x=(f=u==null?void 0:(q=u.product_feeds)==null?void 0:q.nodes.some(function(a){a=a.source_app_id;return a===c("AdsApplicationIDs").COMMERCE_MANAGER}))!=null?f:!1;F=z!=null&&z>0;u=w!=null&&D.id!=null&&w!==D.id&&F;q=v.isFlowCatalogMigration();f=q?"CATALOG_MIGRATION":u?"DEFAULT":null;(u||x)&&B==="AR_COMMERCE"&&(f="AR_COMMERCE");z=q||u||x?d("FBEUnifiedBusinessLoginLabels").FBEUnifiedBusinessLoginLabelsUtils.getAssetSelectionWarningDescription({appName:g.name,labelKey:f,step:c("FBESetupSteps").CATALOG_STEP}):null;return i.jsx(c("FBEUnifiedBusinessLoginSelectAndCreateAssetSection.react"),{application:g,assetSelectionWarning:z,defaultNewAssetName:e,isFallback:!1,isLoading:b,labels:A,loadingComponent:o,step:c("FBESetupSteps").CATALOG_STEP,onAdvanceClick:t?void 0:J,onBackClick:n?void 0:a,onCancelClick:j,onCreate:r,children:y})}n.displayName=n.name+" [from "+f.id+"]";function a(a){var b=a.application,e=a.advanceStep,f=a.cancelOnClick,g=a.context,h=a.coreAssetsStep;h=h===void 0?null:h;var k=a.loadingView;a=a.retreatStep;d("Laminar").useProvider(c("FBEUnifiedBusinessLoginStateProvider"));var l=i.jsx(c("FBEUnifiedBusinessLoginSelectAndCreateAssetSection.react"),{application:b,assetSelectionWarning:null,isFallback:!0,isLoading:!1,labels:d("FBEUnifiedBusinessLoginLabels").SELECT_CATALOG_SECTION_LABELS,step:c("FBESetupSteps").CATALOG_STEP,onAdvanceClick:e,onBackClick:a,onCancelClick:f});return i.jsx(c("FBEUnifiedBusinessLoginErrorBoundary.react"),{application:b,children:i.jsx(j,{fallback:l,children:i.jsx(n,{advanceStep:e,application:b,cancelOnClick:f,context:g,coreAssetsStep:h,loadingView:k,retreatStep:a})})})}a.displayName=a.name+" [from "+f.id+"]";e=d("Laminar").laminarContainer(a);g["default"]=e}),98);
-----
useFBECreateCatalogMutation_CreateCatalogMutation.graphql",["useFBECreateCatalogMutation_CreateCatalogMutation_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],c=[{alias:null,args:[{kind:"Variable",name:"data",variableName:"input"}],concreteType:"FBECatalogWithEligibility",kind:"LinkedField",name:"fbe_create_catalog_with_eligibility",plural:!1,selections:[{alias:null,args:null,concreteType:"ProductCatalog",kind:"LinkedField",name:"catalog",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ineligibilities",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_disabled",storageKey:null},{alias:null,args:null,concreteType:"FBERichIneligibility",kind:"LinkedField",name:"rich_ineligibilities",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"content_ref_uri",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"fbe_ineligibility",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"message",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"useFBECreateCatalogMutation_CreateCatalogMutation",selections:c,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"useFBECreateCatalogMutation_CreateCatalogMutation",selections:c},params:{id:b("useFBECreateCatalogMutation_CreateCatalogMutation_facebookRelayOperation"),metadata:{},name:"useFBECreateCatalogMutation_CreateCatalogMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
useFBECreateCatalogMutation_CreateCatalogMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="5837023673085902"}),null);
-----