LiveProducerLiveBoostingUtils_SetNewGoalTooltipShownMutation.graphql",["LiveProducerLiveBoostingUtils_SetNewGoalTooltipShownMutation_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"input"}],t=[{alias:null,args:[{kind:"Variable",name:"data",variableName:"input"}],concreteType:"XFBSetLiveProducerBoostingNewGoalTooltipShownResponsePayload",kind:"LinkedField",name:"xfb_set_live_producer_boosting_new_goal_tooltip_shown",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"client_mutation_id",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"LiveProducerLiveBoostingUtils_SetNewGoalTooltipShownMutation",selections:t,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"LiveProducerLiveBoostingUtils_SetNewGoalTooltipShownMutation",selections:t},params:{id:n("LiveProducerLiveBoostingUtils_SetNewGoalTooltipShownMutation_facebookRelayOperation"),metadata:{},name:"LiveProducerLiveBoostingUtils_SetNewGoalTooltipShownMutation",operationKind:"mutation",text:null}}})();a.exports=e}),null);
-----
LiveProducerLiveBoostingUtils_SetNewGoalTooltipShownMutation_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="9806932432742577"}),null);
-----
LiveProducerLiveBoostingUtils",["fbt","BoostedPostAudienceOptions","CometRelay","LWICometGeoLocationUtils","LWICometRadiusUtils","LiveProducerLiveBoostingAudienceLocationAllowlistCheck","LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation.graphql","LiveProducerLiveBoostingUtils_SaveAdDetailsMutation.graphql","QuickPerformanceLogger","buildLWIAudienceMap","jsonParseSafe","lwiCometFetchLocationMeta","qpl"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j,k,l={},m=i!==void 0?i:i=b("LiveProducerLiveBoostingUtils_SaveAdDetailsMutation.graphql"),n=j!==void 0?j:j=b("LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation.graphql");function a(a,b,c){if(a!=null&&a!==""){a=c.get(a);if(a!=null)return a}if(b!=null&&b!==""){a=c.get(b);if(a!=null)return a}return c.values().next().value}function e(a,b,c){if(a!=null)return a;if(b!=null)return b;if(c!=null)return c}function f(a,b){if(a!=null)return a;if(b!=null&&b.length>=2)return b[0]}function o(a,b){if(a!=null)return a;if(b!=null&&b.length>=2)return b[b.length-1]}function p(a){var b=new Map();a==null?void 0:a.forEach(function(a){if(a.ad_account_id==null||a.currency==null||a.name==null)return;b.set(a.ad_account_id,{ad_account_id:a.ad_account_id,currency:a.currency,name:a.name})});return b}function q(a,b,e,f){if(a==null)return;var g=d("LWICometGeoLocationUtils").getGeoMetaQueryItemsFromLocationApiSpec(a),h=d("LWICometRadiusUtils").RADIUS_CONFIG_MAP;c("lwiCometFetchLocationMeta")(e,g,h,d("LWICometGeoLocationUtils").getRadiusInfoFromLocationApiSpec(a,!1,h),function(a){a=c("LiveProducerLiveBoostingAudienceLocationAllowlistCheck")(b,a);f(a.length>0)})}b=function(a,b,d){var e;b=c("buildLWIAudienceMap")(b,!1,!0);var f=new Map(),g=d==null?void 0:(e=d.default_settings)==null?void 0:e.audience_option,h=d==null?void 0:(e=d.default_settings)==null?void 0:e.audience_targeting_spec,i=c("jsonParseSafe")(String(h),l),j=d==null?void 0:(e=d.default_settings)==null?void 0:e.audience_targeting_spec_saved,k=c("jsonParseSafe")(String(j),l),m=g==="AUTO_TARGETING"||g==="NCPP";Object.values(b).forEach(function(a){m&&a.audienceOption===g&&h!=null&&h!==""?a.targetSpec=i:a.audienceOption==="AUTO_TARGETING"&&j!=null&&j!==""&&(a.targetSpec=k),f.set(a.audienceID,a)});a!=null&&a.length>0&&a.forEach(function(a){var b,d;b=(b=a.node)==null?void 0:b.id;if(b==null)return;a={audienceID:b,audienceOption:"SAVED_AUDIENCE",clientEditable:!0,name:String((d=a.node)==null?void 0:d.name),subjectToDSA:Boolean((d=a.node)==null?void 0:d.subject_to_dsa),subjectToTaiwanFinServ:Boolean((d=a.node)==null?void 0:d.subject_to_taiwan_finserv),targetSpec:c("jsonParseSafe")(String((d=a.node)==null?void 0:d.target_spec_string_without_placements),l)};f.set(b,a)});f["delete"]("14");return f};function r(a,b,c){return(b=s(a,b,c))!=null?b:a.values().next().value}function s(a,b,d){if(b==="AUTO_TARGETING")return a.get(c("BoostedPostAudienceOptions").AUTO_TARGETING);if(b==="NCPP")return a.get(c("BoostedPostAudienceOptions").NCPP);if(b==="SAVED_AUDIENCE"&&d!=null)return a.get(d)}function t(a,b,e,f,g,h,i,j,l){d("CometRelay").commitMutation(l,{mutation:m,onCompleted:function(){(k||(k=c("QuickPerformanceLogger"))).markerEnd(c("qpl")._(402788135,"2387"),2),j&&j()},onError:function(){(k||(k=c("QuickPerformanceLogger"))).markerEnd(c("qpl")._(402788135,"2387"),87)},updater:function(a){var b=a.getRoot();b=b.getLinkedRecord("lwi");b==null?void 0:b.invalidateRecord();b=a.get(h);b==null?void 0:b.invalidateRecord()},variables:{input:{ad_account_id:a==null?void 0:a.ad_account_id,audience_option:b==null?void 0:b.audienceOption,audience_targeting_spec:JSON.stringify(b==null?void 0:b.targetSpec,null),budget:e,currency:a==null?void 0:a.currency,duration_in_hours:f,goal:g,page_id:h,saved_audience_id:(b==null?void 0:b.audienceOption)==="SAVED_AUDIENCE"?b==null?void 0:b.audienceID:null,video_id:i}}})}function u(a,b,c,e){d("CometRelay").commitMutation(e,{mutation:n,onCompleted:function(){c&&c()},onError:function(){},updater:function(b){var c=b.getRoot();c=c.getLinkedRecord("lwi");c==null?void 0:c.invalidateRecord();c=b.get(a);c==null?void 0:c.invalidateRecord()},variables:{input:{page_id:a,video_id:b}}})}var v=h._("__JHASH__onIv61P8D_J__JHASH__");h=h._("__JHASH__orIYFhrR_gA__JHASH__");function w(a){return a.audience||a.payment||a.budget||a.duration||a.specialAd||a.targeting}g.getDefaultAdAccount=a;g.getDefaultAdBudget=e;g.getDefaultAdBudgetMin=f;g.getDefaultAdBudgetMax=o;g.buildAdAccountMap=p;g.containsUnallowedCountries=q;g.buildLiveShoppingLWIMap=b;g.getDefautSelectedAudienceWithFallback=r;g.saveAdDetails=t;g.removeAdDetails=u;g.SAVE_AD_DETAILS_LABEL=v;g.REMOVE_AD_DETAILS_LABEL=h;g.liveProducerLiveBoosingHasError=w}),226);
-----
LiveProducerLiveBoostingDialog.react",["fbt","ix","CometLink.react","CometPlaceholder.react","CometProgressButtonIndeterminate.react","CometRelay","CometRow.react","CometRowItem.react","FDSCardedDialogLegacy.react","FDSListCellGlimmer.react","FDSTextPairing.react","JSResourceForInteraction","LiveProducerContext","LiveProducerLiveBoostingAdAccountSelector.react","LiveProducerLiveBoostingAudienceSelector.react","LiveProducerLiveBoostingBudgetSelector.react","LiveProducerLiveBoostingDefaults","LiveProducerLiveBoostingDialogQuery.graphql","LiveProducerLiveBoostingDurationSelector.react","LiveProducerLiveBoostingGoalSelector.react","LiveProducerLiveBoostingGuidanceCardDialog.entrypoint","LiveProducerLiveBoostingNoticeCard.react","LiveProducerLiveBoostingPaymentSelector.react","LiveProducerLiveBoostingSpecialAdSelector.react","LiveProducerLiveBoostingUtils","QuickPerformanceLogger","RelayHooks","TetraButton.react","fbicon","qpl","react","requireDeferred","useCometEntryPointDialog","useCometLazyDialog"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k,l,m=l||(l=d("react"));e=l;var n=e.useContext,o=e.useEffect,p=e.useRef,q=e.useState,r=c("requireDeferred")("LiveBoostingFalcoEvent").__setRef("LiveProducerLiveBoostingDialog.react"),s=c("JSResourceForInteraction")("LiveProducerLiveBoostingTermsAndConditionsDialog.react").__setRef("LiveProducerLiveBoostingDialog.react"),t={banner:{marginTop:"x14vqqas",marginEnd:"xq8finb",marginBottom:"xod5an3",marginStart:"x16n37ib",$$css:!0},deleteButton:{marginTop:"x135pmgq",$$css:!0},termstext:{alignItems:"x6s0dn4",display:"x78zum5",flexShrink:"xs83m0k",justifyContent:"xl56j7k",marginBottom:"xh3wvx0",$$css:!0}},u=j!==void 0?j:j=b("LiveProducerLiveBoostingDialogQuery.graphql");function a(a){var b,e,f=a.extraProps,g=a.props.onClose;a=a.queries;var j=n(c("LiveProducerContext"));j=j.videoData;var l=j.liveProducerBoostingVersion,v=j.setLiveProducerBoostingVersion;j=d("CometRelay").usePreloadedQuery(u,a.queryReference);var w=(a=(a=j.page)==null?void 0:(a=a.live_producer_boosting_qe)==null?void 0:a.is_pre_live_boost_enabled)!=null?a:!1,x=(a=(a=j.page)==null?void 0:(a=a.live_producer_boosting_ad_details_info)==null?void 0:a.has_create_ads_permission)!=null?a:!1;a=(a=j.page)==null?void 0:(a=a.live_producer_boosting_ad_details_info)==null?void 0:a.default_settings;var y=(b=f==null?void 0:f.pageID)!=null?b:"0",z=(b=f==null?void 0:f.videoID)!=null?b:"0",A=(b=f==null?void 0:f.entrypoint)!=null?b:"unknown",B=d("RelayHooks").useRelayEnvironment();f=(f=j.page)==null?void 0:(b=f.live_producer_boosting_ad_details_info)==null?void 0:b.ad_accounts;b=d("LiveProducerLiveBoostingUtils").buildAdAccountMap(f);j=q(d("LiveProducerLiveBoostingUtils").getDefaultAdAccount(a==null?void 0:(e=a.ad_account)==null?void 0:(e=e.payment_account)==null?void 0:e.id,(e=j.page)==null?void 0:(j=e.live_producer_boosting_ad_details_info)==null?void 0:(e=j.selected_ad_account)==null?void 0:e.ad_account_id,b));var C=j[0];e=j[1];var D=f!=null&&f.length>0&&C!=null;f=q((j=a==null?void 0:a.goal)!=null?j:d("LiveProducerLiveBoostingDefaults").LIVE_SHOPPING_DEFAULT_GOAL);var E=f[0];j=f[1];a=q((f=a==null?void 0:a.duration_in_hours)!=null?f:d("LiveProducerLiveBoostingDefaults").LIVE_SHOPPING_DEFAULT_DURATION);var F=a[0];f=a[1];a=q(-1);var G=a[0];a=a[1];var H=q(),I=H[0];H=H[1];var J=q(!1),K=J[0],L=J[1];J=q(d("LiveProducerLiveBoostingDefaults").LIVE_SHOPPING_DEFAULT_ERROR_STATE);var M=J[0];J=J[1];var N=p(null),O=c("useCometLazyDialog")(s),P=O[0];O=c("useCometEntryPointDialog")(c("LiveProducerLiveBoostingGuidanceCardDialog.entrypoint"),{adAccountID:(O=C==null?void 0:C.ad_account_id)!=null?O:"",pageID:y});var Q=O[0];o(function(){x&&w&&((k||(k=c("QuickPerformanceLogger"))).markerStart(c("qpl")._(402788135,"2387")),k.markerAnnotate(c("qpl")._(402788135,"2387"),{string:{entrypoint:A}})),r.onReady(function(a){return a.log(function(){return{event:"live_producer_boosting_dialog_open",extra_data:{hasActiveAdAccounts:String(D),hasCreateAdsPermission:String(x),isPreLiveBoostingEnabled:String(w),selectedAdAccount:String(C==null?void 0:C.ad_account_id)},page_id:y,surface:"live_producer",ui_component:"pre_live_boosting_ad_edit_dialog",video_id:z}})})},[]);return m.jsx(c("FDSCardedDialogLegacy.react"),{disableClosingWithMask:!0,onClose:function(){x&&w&&(k||(k=c("QuickPerformanceLogger"))).markerEnd(c("qpl")._(402788135,"2387"),4),g()},title:h._("__JHASH__LtuMDEQI8lb__JHASH__"),withCloseButton:!0,children:m.jsxs("div",{className:"x78zum5 xdt5ytf x179dxpb",children:[D&&x&&w&&m.jsx(c("LiveProducerLiveBoostingNoticeCard.react"),{body:h._("__JHASH__Pb89CrPoyMQ__JHASH__"),headline:h._("__JHASH__9ShNnL39YKl__JHASH__"),icon:{color:"highlight",icon:d("fbicon")._(i("479178"),24)},xstyle:t.banner}),!D&&m.jsxs(m.Fragment,{children:[m.jsx(c("LiveProducerLiveBoostingNoticeCard.react"),{body:h._("__JHASH__Clnm-yNOtbr__JHASH__"),headline:h._("__JHASH__jGSBQct5_2e__JHASH__"),icon:{color:"negative",icon:d("fbicon")._(i("538077"),24)},xstyle:t.banner}),m.jsx("div",{className:"x1exxf4d x13fuv20 x178xt8z x14vqqas xod5an3",children:m.jsx(c("CometRow.react"),{children:m.jsx(c("CometRowItem.react"),{expanding:!0,children:m.jsx(c("TetraButton.react"),{label:h._("__JHASH__IwgnvP_gANW__JHASH__"),onPress:function(){window.open("https://www.facebook.com/business-support-home")},type:"primary"})})})})]}),D&&!w&&m.jsx(c("LiveProducerLiveBoostingNoticeCard.react"),{body:h._("__JHASH__xeIN1ZWz1_p__JHASH__"),headline:h._("__JHASH__FyxE2NvmSTI__JHASH__"),icon:{color:"negative",icon:d("fbicon")._(i("538077"),24)},xstyle:t.banner}),D&&w&&!x&&m.jsx(c("LiveProducerLiveBoostingNoticeCard.react"),{body:h._("__JHASH__COnUyw-Y_yb__JHASH__"),headline:h._("__JHASH__oEbUu0AjEpZ__JHASH__"),icon:{color:"negative",icon:d("fbicon")._(i("538077"),24)},xstyle:t.banner}),C&&x&&w&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"x78zum5 xdt5ytf x1rife3k x1l90r2v x1ye3gou",children:m.jsxs("div",{className:"xktsk01",children:[m.jsx(c("LiveProducerLiveBoostingGoalSelector.react"),{selectedGoal:E,setSelectedGoal:j}),m.jsx(c("LiveProducerLiveBoostingAudienceSelector.react"),{adAccountID:C.ad_account_id,localSelectedAudience:I,pageID:y,setErrorState:J,setLocalSelectedAudience:H,videoID:z}),M.audience&&m.jsx(c("LiveProducerLiveBoostingNoticeCard.react"),{body:h._("__JHASH__BwT0RqnF0SR__JHASH__"),headline:h._("__JHASH__lo1l-a0BIkh__JHASH__"),icon:{color:"negative",icon:d("fbicon")._(i("538077"),24)}}),m.jsx(c("LiveProducerLiveBoostingDurationSelector.react"),{selectedDuration:F,setErrorState:J,setSelectedDuration:f}),m.jsx(c("CometPlaceholder.react"),{fallback:m.jsx(c("FDSListCellGlimmer.react"),{numberOfItems:2}),children:m.jsx(c("LiveProducerLiveBoostingBudgetSelector.react"),{adAccountID:C.ad_account_id,audienceData:I,currency:(O=C==null?void 0:C.currency)!=null?O:d("LiveProducerLiveBoostingDefaults").LIVE_SHOPPING_DEFAULT_CURRENCY,goal:E,localBudget:G,pageID:y,setErrorState:J,setLocalBudget:a})}),m.jsx(c("LiveProducerLiveBoostingAdAccountSelector.react"),{adAccounts:Array.from(b.values()),selectedAdAccount:C,setSelectedAdAccount:e}),m.jsx(c("CometPlaceholder.react"),{fallback:m.jsx(c("FDSListCellGlimmer.react"),{numberOfItems:2}),children:m.jsx(c("LiveProducerLiveBoostingPaymentSelector.react"),{budgetAmount:G.toString(),currency:C.currency,paymentAccountID:C.ad_account_id,paymentWizardCallbackRefSetter:function(a){N.current=a},setErrorState:J})}),M.payment&&m.jsx(c("LiveProducerLiveBoostingNoticeCard.react"),{body:h._("__JHASH__NgJiKvhG__u__JHASH__"),headline:h._("__JHASH__3YD2Pe6XbJI__JHASH__"),icon:{color:"negative",icon:d("fbicon")._(i("538077"),24)}}),m.jsx(c("LiveProducerLiveBoostingSpecialAdSelector.react"),{setErrorState:J}),M.specialAd&&m.jsx(c("LiveProducerLiveBoostingNoticeCard.react"),{body:h._("__JHASH__-pCJ6ZGGVJT__JHASH__"),headline:h._("__JHASH__LhXJWOoiFdV__JHASH__"),icon:{color:"negative",icon:d("fbicon")._(i("538077"),24)}})]})}),m.jsxs("div",{className:"x1exxf4d x13fuv20 x178xt8z x14vqqas xod5an3",children:[m.jsx(c("CometRow.react"),{xstyle:t.termstext,children:m.jsx(c("CometRowItem.react"),{children:m.jsx(c("FDSTextPairing.react"),{body:h._("__JHASH__qdcUs5iPNjz__JHASH__",[h._implicitParam("=m4",m.jsx(c("CometLink.react"),{onClick:function(){P({})},target:"_blank",children:h._("__JHASH__p60pCDSg7dZ__JHASH__")}))]),level:4})})}),m.jsx(c("CometRow.react"),{children:m.jsx(c("CometRowItem.react"),{expanding:!0,children:K?m.jsx(c("CometProgressButtonIndeterminate.react"),{label:d("LiveProducerLiveBoostingUtils").SAVE_AD_DETAILS_LABEL}):m.jsx(c("TetraButton.react"),{disabled:G===-1||d("LiveProducerLiveBoostingUtils").liveProducerLiveBoosingHasError(M),label:d("LiveProducerLiveBoostingUtils").SAVE_AD_DETAILS_LABEL,onPress:function(){L(!0),d("LiveProducerLiveBoostingUtils").saveAdDetails(C,I,G,F,E,y,z,function(){L(!1),l===0?Q({},function(){},"",!0):g(),v(l+1)},B)},type:"primary"})})}),l>0&&m.jsx(c("CometRow.react"),{xstyle:t.deleteButton,children:m.jsx(c("CometRowItem.react"),{expanding:!0,children:m.jsx(c("TetraButton.react"),{label:d("LiveProducerLiveBoostingUtils").REMOVE_AD_DETAILS_LABEL,onPress:function(){d("LiveProducerLiveBoostingUtils").removeAdDetails(y,z,function(){x&&w&&(k||(k=c("QuickPerformanceLogger"))).markerEnd(c("qpl")._(402788135,"2387"),4),g(),v(0)},B)},type:"secondary"})})})]})]})]})})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
LiveProducerLiveBoostingAudienceDetail.react",["fbt","ix","CometCard.react","CometRow.react","CometRowItem.react","FDSTextPairing.react","JSResourceForInteraction","LWIOmniText.react","LiveProducerLiveBoostingAudienceDetailQuery.graphql","LiveProducerLiveBoostingAudienceDetailQuery_allowedCountries.graphql","LiveProducerLiveBoostingAudienceDetailQuery_constraints.graphql","LiveProducerLiveBoostingAudienceEditRedirect.react","LiveProducerLiveBoostingDefaults","LiveProducerLiveBoostingUtils","QuickPerformanceLogger","RelayHooks","TetraCircleButton.react","TetraIcon.react","fbicon","intlList","qpl","react","stylex","useCometLazyDialog"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k,l,m,n,o,p=o||(o=d("react"));e=o;var q=e.useEffect,r=e.useMemo,s=e.useState,t={targetingCard:{marginBottom:"x1e56ztr",marginTop:"x1xmf6yo",$$css:!0},targetingSentence:{marginTop:"x1xmf6yo",$$css:!0}},u=c("JSResourceForInteraction")("LiveProducerLiveBoostingAudienceEditDialog.react").__setRef("LiveProducerLiveBoostingAudienceDetail.react");function a(a){var e=a.adAccountID,f=a.allowedCountriesRef,g=a.audienceData,o=a.constraintsRef,v=a.setAudienceData,w=a.setErrorState;a=a.setRedirectClicked;var x=d("RelayHooks").useFragment(j!==void 0?j:j=b("LiveProducerLiveBoostingAudienceDetailQuery_constraints.graphql"),o),y=d("RelayHooks").useFragment(k!==void 0?k:k=b("LiveProducerLiveBoostingAudienceDetailQuery_allowedCountries.graphql"),f),z=r(function(){var a;return(a=y==null?void 0:y.allowed_countries)!=null?a:d("LiveProducerLiveBoostingDefaults").LIVE_SHOPPING_DEFAULT_ALLOWED_COUNTRIES},[y==null?void 0:y.allowed_countries]);o={ad_account_id:e,audience_option:(o=g==null?void 0:g.audienceOption)!=null?o:null,location_only:!1,targeting_spec_string:JSON.stringify((f=g==null?void 0:g.targetSpec)!=null?f:"{}")};f=c("useCometLazyDialog")(u);var A=f[0];f=d("RelayHooks").useLazyLoadQuery(l!==void 0?l:l=b("LiveProducerLiveBoostingAudienceDetailQuery.graphql"),o);o=(o=(o=f.xfb_live_producer_boosting_ad_details_with_validation)==null?void 0:(o=o.targeting_sentences_with_validation)==null?void 0:o.targeting_sentences)!=null?o:[];var B=(f=f.xfb_live_producer_boosting_ad_details_with_validation)==null?void 0:(f=f.targeting_sentences_with_validation)==null?void 0:f.error;f=s(!1);var C=f[0],D=f[1],E=d("RelayHooks").useRelayEnvironment();q(function(){d("LiveProducerLiveBoostingUtils").containsUnallowedCountries(g==null?void 0:g.targetSpec.geo_locations,z,E,function(a){D(a)})},[z,g==null?void 0:g.targetSpec.geo_locations,E]);q(function(){C&&(m||(m=c("QuickPerformanceLogger"))).markerPoint(c("qpl")._(402788135,"2387"),"audience_details_edit_has_unallowed_countries"),B!=null&&(m||(m=c("QuickPerformanceLogger"))).markerPoint(c("qpl")._(402788135,"2387"),"audience_details_edit_has_targeting_error"),w(function(a){return babelHelpers["extends"]({},a,{audience:C,targeting:B!=null})})},[C,w,B]);if(g==null)return null;f=o.map(function(a){return{category:a.category_string,values:a.values}});o=f.map(function(a,b){return a.category!=null&&a.values.length>0?p.jsx("div",{className:(n||(n=c("stylex")))(b>0&&t.targetingSentence),children:p.jsxs(c("LWIOmniText.react"),{type:"body4",children:[p.jsxs(c("LWIOmniText.react"),{color:"secondary",type:"body4",children:[a.category,": "]}),c("intlList")(a.values,c("intlList").CONJUNCTIONS.NONE)]})},String(a.category)+b):null}).filter(Boolean);return p.jsxs(p.Fragment,{children:[p.jsxs(c("CometCard.react"),{background:"light-wash",xstyle:t.targetingCard,children:[p.jsx(c("CometRow.react"),{paddingTop:12,children:p.jsx(c("CometRowItem.react"),{expanding:!1,children:p.jsx(c("FDSTextPairing.react"),{headline:h._("__JHASH__lhInO-o_yTK__JHASH__"),level:4})})}),p.jsx("div",{className:"x3nfvp2 x1k3u6ij x10l6tqk x1tk7jg1",children:g.audienceOption!=="SAVED_AUDIENCE"&&p.jsx(c("TetraCircleButton.react"),{color:"primary",icon:d("fbicon")._(i("477824"),12),label:h._("__JHASH__Wt7u0rXaxvF__JHASH__"),onPress:function(){A({adAccountID:e,allowedCountries:z,audienceData:g,constraintsRef:x,setAudienceData:v},function(){(m||(m=c("QuickPerformanceLogger"))).markerPoint(c("qpl")._(402788135,"2387"),"audience_details_edit_dialog_close")})},size:24})}),p.jsx(c("CometRow.react"),{paddingVertical:12,children:B!=null?p.jsx(c("CometRowItem.react"),{expanding:!0,children:p.jsxs(c("CometRow.react"),{align:"start",children:[p.jsx(c("CometRowItem.react"),{children:p.jsx(c("TetraIcon.react"),{color:"negative",icon:d("fbicon")._(i("538077"),24)})}),p.jsx(c("CometRowItem.react"),{verticalAlign:"center",children:p.jsx("div",{className:"xq8finb",children:p.jsx(c("LWIOmniText.react"),{color:"secondary",type:"body3",children:B})})})]})}):p.jsx(c("CometRowItem.react"),{expanding:!0,children:o})})]}),g.audienceOption==="SAVED_AUDIENCE"&&p.jsx(c("LiveProducerLiveBoostingAudienceEditRedirect.react"),{adAccountID:e,setRedirectClicked:a})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
LiveProducerLiveBoostingBudgetSelector.react",["fbt","ix","AccordionAddOn.react","AdsCurrencyFormatter","CometCircleButton.react","CometPlaceholder.react","CometRow.react","CometRowItem.react","CometSlider.react","Currency","FDSAccordionListCell.react","FDSListCellGlimmer.react","FDSTextPairing.react","LWICometFormatCurrency","LiveProducerLiveBoostingBudgetErrorNoticeCard.react","LiveProducerLiveBoostingBudgetInvoice.react","LiveProducerLiveBoostingBudgetLimitWrapper.react","LiveProducerLiveBoostingBudgetReachEstimation.react","LiveProducerLiveBoostingBudgetSelectorQuery.graphql","LiveProducerLiveBoostingDefaults","LiveProducerLiveBoostingUtils","PECurrency","QuickPerformanceLogger","RelayHooks","TetraIcon.react","fbicon","parseCurrencyDisplayString","qpl","react","useToggle"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k,l,m=l||(l=d("react"));e=l;var n=e.useCallback,o=e.useEffect,p=e.useId,q=e.useMemo,r=e.useRef,s=e.useState,t=12,u=4,v="48px Roboto-Bold",w={withDecimals:!0,withISO:!1,withNumberDelimiters:!0,withSymbol:!0};function x(a,b){var c=document.createElement("canvas");c=c.getContext("2d");c.font=b;b=c.measureText(a);c=(a.length+1)*u;return b.width+c}function y(a,b){var c=0,d=b.length;while(ce){(k||(k=c("QuickPerformanceLogger"))).markerPoint(c("qpl")._(402788135,"2387"),"budget_exceed_maxium");return{body:h._("__JHASH__aUIvvFqMV6H__JHASH__",[h._param("max_budget",d("AdsCurrencyFormatter").formatCurrency(f,e))]),headline:h._("__JHASH__kXpFgtC5VMn__JHASH__")}}}var A=j!==void 0?j:j=b("LiveProducerLiveBoostingBudgetSelectorQuery.graphql");function a(a){var b=a.adAccountID,e=a.audienceData,f=a.currency,g=a.goal,j=a.localBudget,k=a.pageID,l=a.setErrorState,u=a.setLocalBudget;a=p();var B=d("RelayHooks").useLazyLoadQuery(A,{adAccountID:b,pageID:k}),C=(B=B.page)==null?void 0:(B=B.live_producer_boosting_ad_details_info)==null?void 0:B.budget,D=(B=d("LiveProducerLiveBoostingUtils").getDefaultAdBudgetMin(C==null?void 0:C.min_budget,C==null?void 0:C.budget_selections))!=null?B:d("LiveProducerLiveBoostingDefaults").LIVE_SHOPPING_DEFAULT_MIN_BUDGET,E=(B=d("LiveProducerLiveBoostingUtils").getDefaultAdBudgetMax(C==null?void 0:C.max_budget,C==null?void 0:C.budget_selections))!=null?B:d("LiveProducerLiveBoostingDefaults").LIVE_SHOPPING_DEFAULT_MAX_BUDGET,F=(B=C==null?void 0:C.budget_selections)!=null?B:d("LiveProducerLiveBoostingDefaults").LIVE_SHOPPING_DEFAULT_BUDGET_SELECTIONS;B=d("Currency").getSymbol(f)||"";var G=c("useToggle")(!0),H=G[0],I=G[1];G=s(!1);var J=G[0],K=G[1];G=s(d("AdsCurrencyFormatter").formatCurrencyNoSymbol(f,j));var L=G[0],M=G[1];G=s(!1);var N=G[0],O=G[1];o(function(){var a;a=(a=d("LiveProducerLiveBoostingUtils").getDefaultAdBudget(null,C==null?void 0:C.default_budget,C==null?void 0:C.min_budget))!=null?a:d("LiveProducerLiveBoostingDefaults").LIVE_SHOPPING_DEFAULT_BUDGET;u(a);M(d("AdsCurrencyFormatter").formatCurrencyNoSymbol(f,a))},[C==null?void 0:C.default_budget,C==null?void 0:C.min_budget,f,u]);o(function(){var a=z(j,D,E,f)!=null;l(function(b){return babelHelpers["extends"]({},b,{budget:a})});O(a)},[f,j,E,D,l]);var P=r(null);G=q(function(){return J?L:d("AdsCurrencyFormatter").formatCurrencyNoSymbol(f,j,!0)},[f,L,J,j]);var Q=n(function(){P.current&&P.current.focus(),K(!0)},[]),R=n(function(){var a;a=(a=c("parseCurrencyDisplayString")(L,f))!=null?a:0;u(a);M(d("AdsCurrencyFormatter").formatCurrencyNoSymbol(f,a))},[f,L,u]),S=n(function(){K(!1),R()},[R]),T=n(function(a){a=F[a];u(a);M(d("AdsCurrencyFormatter").formatCurrencyNoSymbol(f,a));l(function(a){return babelHelpers["extends"]({},a,{budget:!1})});O(!1)},[F,f,l,u]);B=m.jsx("div",{className:"x6s0dn4 x78zum5 xdt5ytf",children:m.jsxs("div",{className:"x78zum5 x1q0g3np x1a02dak x12nagc x1xmf6yo",children:[m.jsx("div",{className:"x1sy10c2",children:m.jsx(c("FDSTextPairing.react"),{headline:B,headlineColor:"highlight",level:1})}),m.jsx("input",{className:"xjbqb8w x972fbf xcfux6l x1qhh985 xm0m39n x1qq9wsj x1iv1qll x117nqv4 x2b8uid",id:a,maxLength:t,onBlur:S,onChange:function(a){M(a.target.value)},onFocus:Q,ref:P,style:{width:x(G,v)},value:G}),J?!1:m.jsx("div",{className:"x78zum5 xdt5ytf xl56j7k",children:m.jsx(c("TetraIcon.react"),{"aria-label":h._("__JHASH__Wt7u0rXaxvF__JHASH__"),color:"highlight",icon:d("fbicon")._(i("477831"),20),onPress:Q})})]})});a=m.jsx("div",{className:"x6s0dn4 x78zum5 x1q0g3np x1xmf6yo x1n2onr6",children:m.jsx("div",{className:"xh8yej3",children:m.jsxs(c("CometRow.react"),{children:[f&&F.length>=2&&m.jsx(c("CometRowItem.react"),{children:m.jsx(c("FDSTextPairing.react"),{body:d("LWICometFormatCurrency").getLWIFormatCurrency(Math.min(F[0],j),f,w),bodyColor:"secondary",level:3})}),m.jsx(c("CometRowItem.react"),{expanding:!0,children:m.jsx("div",{className:"x10l6tqk x17qophe x13vifvy xh8yej3",children:m.jsx(c("CometSlider.react"),{label:h._("__JHASH__JXZ1lVneyMx__JHASH__"),max:F.length-1,min:0,onChange:T,step:1,value:y(j,F)})})}),f&&F.length>=2&&m.jsx(c("CometRowItem.react"),{children:m.jsx(c("FDSTextPairing.react"),{body:d("LWICometFormatCurrency").getLWIFormatCurrency(Math.max(F[F.length-1],j),f,w),bodyColor:"secondary",level:3})})]})})});return m.jsxs(m.Fragment,{children:[m.jsx(c("FDSAccordionListCell.react"),{addOnEnd:c("AccordionAddOn.react"),addOnEndProps:{open:H},addOnStart:m.jsx(c("CometCircleButton.react"),{color:H?"white":"primary",icon:d("fbicon")._(i("480625"),20),label:h._("__JHASH__7rOn6o2YW02__JHASH__"),size:36,type:H?"primary-background-overlay":"normal"}),content:m.jsx(c("FDSTextPairing.react"),{headline:d("PECurrency").formatAmountWithExtendedSymbolAndOffset(f,j),level:4,meta:h._("__JHASH__iXiTfinlarf__JHASH__"),metaLocation:"above"}),onPress:function(){return I(!H)},selected:H,selectedBackground:"highlight",children:m.jsxs("div",{className:"xdj266r x11i5rnm xat24cr x1mh8g0r xx6bls6 x4uap5 x1ye3gou xz9dl7a",children:[m.jsx(c("LiveProducerLiveBoostingBudgetLimitWrapper.react"),{adAccountID:b,currency:f,totalBudget:j}),m.jsx("div",{className:"x1e56ztr",children:m.jsx(c("CometPlaceholder.react"),{fallback:m.jsx(c("FDSListCellGlimmer.react"),{numberOfItems:1}),children:m.jsx(c("LiveProducerLiveBoostingBudgetReachEstimation.react"),{adAccountID:b,audienceData:e,goal:g,localBudget:j,pageID:k})})}),B,a,m.jsx(c("CometPlaceholder.react"),{fallback:m.jsx(c("FDSListCellGlimmer.react"),{numberOfItems:2}),children:!N&&m.jsx("div",{className:"xqui205",children:m.jsx(c("CometPlaceholder.react"),{fallback:m.jsx(c("FDSListCellGlimmer.react"),{numberOfItems:3}),children:m.jsx(c("LiveProducerLiveBoostingBudgetInvoice.react"),{adAccountID:b,currency:f,localBudget:j})})})})]})}),N&&m.jsx(c("LiveProducerLiveBoostingBudgetErrorNoticeCard.react"),{errorMsg:(S=z(j,D,E,f))==null?void 0:S.body,headline:(G=z(j,D,E,f))==null?void 0:G.headline})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
LiveProducerLiveBoostingAudienceSelector.react",["fbt","ix","AccordionAddOn.react","CometCircleButton.react","CometListCellRadioAddOn.react","CometPlaceholder.react","ConstUriUtils","FDSAccordionListCell.react","FDSListCellGlimmer.react","FDSRadioList.react","FDSRadioListCellPressable.react","FDSTextPairing.react","LWICometTargetingSentencesGlimmer.react","LiveProducerLiveBoostingAudienceDetail.react","LiveProducerLiveBoostingAudienceRedirectAndRefetchButton.react","LiveProducerLiveBoostingAudienceSelectorQuery.graphql","LiveProducerLiveBoostingUtils","RelayHooks","fbicon","react","useCollapsableList"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k,l=k||(k=d("react"));e=k;var m=e.useEffect,n=e.useLayoutEffect,o=e.useState,p=e.useTransition,q=15,r=h._("__JHASH__5nQVisC9JrC__JHASH__"),s=j!==void 0?j:j=b("LiveProducerLiveBoostingAudienceSelectorQuery.graphql");function a(a){var b=a.adAccountID,e=a.localSelectedAudience,f=a.pageID,g=a.setErrorState,j=a.setLocalSelectedAudience;a=a.videoID;var k=o(!1),t=k[0],u=k[1];k=o(null);var v=k[0],w=k[1];k=p();var x=k[0],y=k[1];k=function(){y(function(){w(function(a){return{fetchKey:((a=a==null?void 0:a.fetchKey)!=null?a:0)+1,fetchPolicy:"network-only"}})})};var z=o(!1),A=z[0],B=z[1];z=function(){var a,c=d("ConstUriUtils").getUri("/ads/manager/audiences");c=(a=c)==null?void 0:a.addQueryParam("act",b);window.open(c)};f=d("RelayHooks").useLazyLoadQuery(s,{adAccountID:b,count:q,input:{page_id:f,product:"BOOSTED_POST",target_id:a},pageID:f},(a=v)!=null?a:{});v=f.adAccount;a=f.lwi;var C=f.page,D=v==null?void 0:(f=v.savedAudiences)==null?void 0:f.edges,E=a==null?void 0:(v=a.boosted_component)==null?void 0:v.constraints,F=a==null?void 0:(f=a.boosted_component)==null?void 0:f.options.audiences_v2,G=C==null?void 0:C.live_producer_boosting_ad_details_info;v=o(d("LiveProducerLiveBoostingUtils").buildLiveShoppingLWIMap(D,F,G));var H=v[0],I=v[1];m(function(){var a=d("LiveProducerLiveBoostingUtils").buildLiveShoppingLWIMap(D,F,G);I(a);j(d("LiveProducerLiveBoostingUtils").getDefautSelectedAudienceWithFallback(a,G==null?void 0:(a=G.default_settings)==null?void 0:a.audience_option,G==null?void 0:G.saved_audience_id))},[G,F,D,j]);a=d("useCollapsableList").useCollapsableList(Array.from(H.values()),10,e);f=a[0];var J=a[1],K=a[2];n(function(){J||K()},[J,K]);v=l.jsx(c("FDSRadioList.react"),{label:h._("__JHASH__C-Vwq7D9TC6__JHASH__"),onValueChange:function(a){j(H.get(a))},children:f.map(function(a){var d;return l.jsxs(l.Fragment,{children:[l.jsx(c("FDSRadioListCellPressable.react"),{content:l.jsx(c("FDSTextPairing.react"),{headline:(d=a.name)!=null?d:"",level:4,meta:a.audienceOption==="AUTO_TARGETING"?r:null}),level:4,radioAddonComponent:c("CometListCellRadioAddOn.react"),radioAddonProps:{checked:(e==null?void 0:e.audienceID)===a.audienceID,value:a.audienceID}},a.audienceID),(e==null?void 0:e.audienceID)===a.audienceID?l.jsx(c("CometPlaceholder.react"),{fallback:l.jsx(c("LWICometTargetingSentencesGlimmer.react"),{}),children:l.jsx(c("LiveProducerLiveBoostingAudienceDetail.react"),{adAccountID:b,allowedCountriesRef:C==null?void 0:C.live_producer_boosting_ad_details_info,audienceData:e,constraintsRef:E,setAudienceData:function(a){a&&(j(a),I(function(b){return new Map(b.set(a==null?void 0:a.audienceID,a))}))},setErrorState:g,setRedirectClicked:B})}):null]},a.audienceID)})});return x?l.jsx(c("FDSListCellGlimmer.react"),{numberOfItems:2}):l.jsxs(c("FDSAccordionListCell.react"),{addOnEnd:c("AccordionAddOn.react"),addOnEndProps:{open:t},addOnStart:l.jsx(c("CometCircleButton.react"),{color:t?"white":"primary",icon:d("fbicon")._(i("500642"),20),label:h._("__JHASH__M9lhrhhg9_v__JHASH__"),size:36,type:t?"primary-background-overlay":"normal"}),content:l.jsx(c("FDSTextPairing.react"),{headline:e==null?void 0:e.name,level:4,meta:h._("__JHASH__y_NId_HbTRB__JHASH__"),metaLocation:"above"}),onPress:function(){return u(!t)},selected:t,selectedBackground:"highlight",children:[l.jsx("div",{className:"xdj266r x11i5rnm xat24cr x1mh8g0r x4uap5 x1ye3gou",children:v}),l.jsx(c("LiveProducerLiveBoostingAudienceRedirectAndRefetchButton.react"),{redirect:z,redirectClicked:A,refetch:k,setRedirectClicked:B})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
LiveProducerLiveBoostingUtils_SaveAdDetailsMutation.graphql",["LiveProducerLiveBoostingUtils_SaveAdDetailsMutation_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],c=[{kind:"Variable",name:"data",variableName:"input"}],d={alias:null,args:null,kind:"ScalarField",name:"client_mutation_id",storageKey:null},e={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"goal",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"call_to_action",storageKey:null},h={alias:null,args:null,kind:"ScalarField",name:"audience_option",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"duration_in_hours",storageKey:null},j={alias:null,args:null,kind:"ScalarField",name:"budget",storageKey:null},k={alias:null,args:null,kind:"ScalarField",name:"currency",storageKey:null};return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"LiveProducerLiveBoostingUtils_SaveAdDetailsMutation",selections:[{alias:null,args:c,concreteType:"XFBSetLiveProducerBoostingAdDetailsResponsePayload",kind:"LinkedField",name:"xfb_set_live_producer_boosting_ad_details",plural:!1,selections:[d,{alias:null,args:null,concreteType:"XFBLiveProducerBoostingAdDetails",kind:"LinkedField",name:"settings",plural:!1,selections:[e,f,g,h,i,j,k,{alias:null,args:null,concreteType:"AdAccount",kind:"LinkedField",name:"ad_account",plural:!1,selections:[e,{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"payment_account",plural:!1,selections:[e],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"LiveProducerLiveBoostingUtils_SaveAdDetailsMutation",selections:[{alias:null,args:c,concreteType:"XFBSetLiveProducerBoostingAdDetailsResponsePayload",kind:"LinkedField",name:"xfb_set_live_producer_boosting_ad_details",plural:!1,selections:[d,{alias:null,args:null,concreteType:"XFBLiveProducerBoostingAdDetails",kind:"LinkedField",name:"settings",plural:!1,selections:[e,f,g,h,i,j,k,{alias:null,args:null,concreteType:"AdAccount",kind:"LinkedField",name:"ad_account",plural:!1,selections:[e,{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"payment_account",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},e],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}]},params:{id:b("LiveProducerLiveBoostingUtils_SaveAdDetailsMutation_facebookRelayOperation"),metadata:{},name:"LiveProducerLiveBoostingUtils_SaveAdDetailsMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation.graphql",["LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation_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:"XFBRemoveLiveProducerBoostingAdDetailsResponsePayload",kind:"LinkedField",name:"xfb_remove_live_producer_boosting_ad_details",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"client_mutation_id",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation",selections:c,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation",selections:c},params:{id:b("LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation_facebookRelayOperation"),metadata:{},name:"LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
LiveProducerLiveBoostingUtils_SaveAdDetailsMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="7615706828545855"}),null);
-----
LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="7711391168968832"}),null);
-----
LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation.graphql",["LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation_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:"XFBRemoveLiveProducerBoostingAdDetailsResponsePayload",kind:"LinkedField",name:"xfb_remove_live_producer_boosting_ad_details",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"client_mutation_id",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation",selections:c,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation",selections:c},params:{id:b("LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation_facebookRelayOperation"),metadata:{},name:"LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
LiveProducerLiveBoostingUtils_RemoveAdDetailsMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="7711391168968832"}),null);
-----
LiveProducerLiveBoostingUtils",["fbt","BoostedPostAudienceOptions","CometRelay","LWICometGeoLocationUtils","LWICometRadiusUtils","LiveProducerLiveBoostingAudienceLocationAllowlistCheck","LiveProducerLiveBoostingDefaults","LiveProducerLiveBoostingUtils_SaveAdDetailsMutation.graphql","buildLWIAudienceMap","jsonParseSafe","lwiCometFetchLocationMeta"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j={},k=i!==void 0?i:i=b("LiveProducerLiveBoostingUtils_SaveAdDetailsMutation.graphql");function a(a,b,c){if(a!=null&&a!=="")return c.get(a);return b!=null&&b!==""?c.get(b):c.values().next().value}function e(a,b,c){if(a!=null)return a;if(b!=null)return b;if(c!=null)return c}function f(a,b){if(a!=null)return a;if(b!=null&&b.length>=2)return b[0]}function l(a,b){if(a!=null)return a;if(b!=null&&b.length>=2)return b[b.length-1]}function m(a){var b=new Map();a==null?void 0:a.forEach(function(a){if(a.ad_account_id==null||a.currency==null||a.name==null)return;b.set(a.ad_account_id,{ad_account_id:a.ad_account_id,currency:a.currency,name:a.name})});return b}function n(a,b,e){if(a==null)return;var f=d("LWICometGeoLocationUtils").getGeoMetaQueryItemsFromLocationApiSpec(a),g=d("LWICometRadiusUtils").RADIUS_CONFIG_MAP;c("lwiCometFetchLocationMeta")(b,f,g,d("LWICometGeoLocationUtils").getRadiusInfoFromLocationApiSpec(a,!1,g),function(a){a=c("LiveProducerLiveBoostingAudienceLocationAllowlistCheck")(d("LiveProducerLiveBoostingDefaults").LIVE_SHOPPING_DEFAULT_ALLOWED_COUNTRIES,a);e(a.length>0)})}b=function(a,b,d){var e;b=c("buildLWIAudienceMap")(b,!1,!0);var f=new Map(),g=d==null?void 0:(e=d.default_settings)==null?void 0:e.audience_option,h=d==null?void 0:(e=d.default_settings)==null?void 0:e.audience_targeting_spec,i=c("jsonParseSafe")(String(h),j),k=g==="AUTO_TARGETING"||g==="NCPP";Object.values(b).forEach(function(a){k&&a.audienceOption===g&&h!=null&&(a.targetSpec=i),f.set(a.audienceID,a)});a!=null&&a.length>0&&a.forEach(function(a){var b,d;b=(b=a.node)==null?void 0:b.id;if(b==null)return;a={audienceID:b,audienceOption:"SAVED_AUDIENCE",clientEditable:!0,name:String((d=a.node)==null?void 0:d.name),subjectToDSA:Boolean((d=a.node)==null?void 0:d.subject_to_dsa),targetSpec:c("jsonParseSafe")(String((d=a.node)==null?void 0:d.target_spec_string_without_placements),j)};f.set(b,a)});f["delete"]("14");return f};function o(a,b,c){return(b=p(a,b,c))!=null?b:a.values().next().value}function p(a,b,d){if(b==="AUTO_TARGETING")return a.get(c("BoostedPostAudienceOptions").AUTO_TARGETING);if(b==="NCPP")return a.get(c("BoostedPostAudienceOptions").NCPP);if(b==="SAVED_AUDIENCE"&&d!=null)return a.get(d)}function q(a,b,c,e,f,g,h,i){d("CometRelay").commitMutation(i,{mutation:k,onCompleted:function(){h&&h()},onError:function(){},updater:function(a){var b=a.getRoot();b=b.getLinkedRecord("lwi");b==null?void 0:b.invalidateRecord();b=a.get(g);b==null?void 0:b.invalidateRecord()},variables:{input:{ad_account_id:a==null?void 0:a.ad_account_id,audience_option:b==null?void 0:b.audienceOption,audience_targeting_spec:JSON.stringify(b==null?void 0:b.targetSpec,null),budget:c,currency:a==null?void 0:a.currency,duration_in_hours:e,goal:f,page_id:g,saved_audience_id:(b==null?void 0:b.audienceOption)==="SAVED_AUDIENCE"?b==null?void 0:b.audienceID:null}}})}h=h._("__JHASH__tdkb7OZsivm__JHASH__");function r(a){return a.audience||a.payment}g.getDefaultAdAccount=a;g.getDefaultAdBudget=e;g.getDefaultAdBudgetMin=f;g.getDefaultAdBudgetMax=l;g.buildAdAccountMap=m;g.containsUnallowedCountries=n;g.buildLiveShoppingLWIMap=b;g.getDefautSelectedAudienceWithFallback=o;g.saveAdDetails=q;g.SAVE_AD_DETAILS_LABEL=h;g.liveProducerLiveBoosingHasError=r}),226);
-----
LiveProducerLiveBoostingUtils_SaveAdDetailsMutation.graphql",["LiveProducerLiveBoostingUtils_SaveAdDetailsMutation_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],c=[{kind:"Variable",name:"data",variableName:"input"}],d={alias:null,args:null,kind:"ScalarField",name:"client_mutation_id",storageKey:null},e={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"goal",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"call_to_action",storageKey:null},h={alias:null,args:null,kind:"ScalarField",name:"audience_option",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"duration_in_hours",storageKey:null},j={alias:null,args:null,kind:"ScalarField",name:"budget",storageKey:null},k={alias:null,args:null,kind:"ScalarField",name:"currency",storageKey:null};return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"LiveProducerLiveBoostingUtils_SaveAdDetailsMutation",selections:[{alias:null,args:c,concreteType:"XFBSetLiveProducerBoostingAdDetailsResponsePayload",kind:"LinkedField",name:"xfb_set_live_producer_boosting_ad_details",plural:!1,selections:[d,{alias:null,args:null,concreteType:"XFBLiveProducerBoostingAdDetails",kind:"LinkedField",name:"settings",plural:!1,selections:[e,f,g,h,i,j,k,{alias:null,args:null,concreteType:"AdAccount",kind:"LinkedField",name:"ad_account",plural:!1,selections:[e,{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"payment_account",plural:!1,selections:[e],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"LiveProducerLiveBoostingUtils_SaveAdDetailsMutation",selections:[{alias:null,args:c,concreteType:"XFBSetLiveProducerBoostingAdDetailsResponsePayload",kind:"LinkedField",name:"xfb_set_live_producer_boosting_ad_details",plural:!1,selections:[d,{alias:null,args:null,concreteType:"XFBLiveProducerBoostingAdDetails",kind:"LinkedField",name:"settings",plural:!1,selections:[e,f,g,h,i,j,k,{alias:null,args:null,concreteType:"AdAccount",kind:"LinkedField",name:"ad_account",plural:!1,selections:[e,{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"payment_account",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},e],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}]},params:{id:b("LiveProducerLiveBoostingUtils_SaveAdDetailsMutation_facebookRelayOperation"),metadata:{},name:"LiveProducerLiveBoostingUtils_SaveAdDetailsMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
LiveProducerLiveBoostingUtils_SaveAdDetailsMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="7615706828545855"}),null);
-----