LWICometBoostedPostImageGenModal.react",["fbt","ix","AdsCreativeGenAIImageGenFeedbackSurveyConfig","BaseImage.react","CometPressable.react","CometRelay","GeoBasePressable.react","GeoButton.react","GeoFlexbox.react","GeoModal.react","GeoModalFooter.react","GeoModalHeader.react","GeoToast.react","LWICometBoostedPostImageGenContext.react","LWICometBoostedPostImageGenModalMainPage.react","LWICometGenAIImageFeedbackMutation","LWIOmniIcon.react","LWIOmniText.react","addToMap","deferredLoadComponent","fbicon","react","requireDeferred","requireDeferredForDisplay","useBoolean","useGeoToaster","useLWICometCurrentSpec","useLWILoggerContext"],(function(t,n,r,o,a,i,l,s,u){"use strict";var e=["onHide"],c,d=c||(c=o("react")),m=c,p=m.useContext,_=m.useState,f=r("requireDeferred")("LWICometUnifiedLoggingUtil").__setRef("LWICometBoostedPostImageGenModal.react"),g={footer:{width:"xh8yej3",$$css:!0},thumbnail:{borderStartStartRadius:"xjwep3j",borderStartEndRadius:"x1t39747",borderEndEndRadius:"x1wcsgtt",borderEndStartRadius:"x1pczhz8",objectFit:"xl1xv1r",objectPosition:"x115dhu7",$$css:!0}};function h(e){var t=e.imageVariant,n=e.onRemove,a=_(!1),i=a[0],l=a[1],c=t.imageUrl;return c==null?null:d.jsx("div",{onMouseEnter:function(){return l(!0)},onMouseLeave:function(){return l(!1)},className:"x78zum5",children:d.jsxs(r("CometPressable.react"),{"aria-label":s._(/*BTDS*/""),onPress:function(){return n(t)},children:[d.jsx(r("BaseImage.react"),{height:60,objectFit:"cover",src:c,width:60,xstyle:g.thumbnail}),i&&d.jsx("div",{className:"x6s0dn4 xatbrnm xjwep3j x1t39747 x1wcsgtt x1pczhz8 x78zum5 x5yr21d x1o0tod xl56j7k x10l6tqk x13vifvy xh8yej3",children:d.jsx(r("LWIOmniIcon.react"),{color:"white",icon:o("fbicon")._(u("478234"),24)})})]})})}h.displayName=h.name+" [from "+i.id+"]";function y(){return d.jsx("div",{className:"x6s0dn4 xqmpxtq x10y0y8g xdrs2t1 x2wxn4d xjwep3j x1t39747 x1wcsgtt x1pczhz8 xlya59e xwy3id5 xpvcztv x11nt7xy xamhcws x1alpsbp xlxy82 xyumdvf x9f619 x78zum5 xng8ra xl56j7k x1247r65",children:d.jsx(r("LWIOmniIcon.react"),{color:"secondary",icon:o("fbicon")._(u("483773"),24)})})}y.displayName=y.name+" [from "+i.id+"]";var C=r("deferredLoadComponent")(r("requireDeferredForDisplay")("AdsCreativeFeatureFeedbackSurveyModal.react").__setRef("LWICometBoostedPostImageGenModal.react"));function b(t){var n=t.onHide,a=babelHelpers.objectWithoutPropertiesLoose(t,e),i=r("useLWILoggerContext")(),l=r("useLWICometCurrentSpec")(),c=o("CometRelay").useRelayEnvironment(),m=r("useGeoToaster")(),b=m.add,v=r("useBoolean")(!1),S=v.setFalse,R=v.setTrue,L=v.value,E=p(r("LWICometBoostedPostImageGenContext.react")),k=E.imageVariants,I=E.inFlightRequestsCount,T=E.reorderImageVariants,D=E.selectedImageVariants,x=E.setSelectedImageVariants,$=_([].concat(D)),P=$[0],N=$[1],M=new Map([[o("AdsCreativeGenAIImageGenFeedbackSurveyConfig").GEN_AI_IMAGE_GEN_SATISFACTION_QUESTION,{response:"dissatisfied",type:"SATISFACTION"}]]),w=_(M),A=w[0],F=w[1],O=_("neutral"),B=O[0],W=O[1],q=function(t,n){n===void 0&&(n=""),W(t),o("LWICometGenAIImageFeedbackMutation").commit(c,{adAccountId:a.adAccountId,creativeOptimizationSatisfaction:t,freeFormFeedback:n},{onCompleted:function(t){b(d.jsx(r("GeoToast.react"),{heading:s._(/*BTDS*/"")}))}})},U=function(t,n){t.type===n.type&&F(function(e){return r("addToMap")(e,t,n)})},V=function(){F(M),S()},H=function(){var e,t,n,r,a,i=(e=A.get(o("AdsCreativeGenAIImageGenFeedbackSurveyConfig").GEN_AI_IMAGE_GEN_SATISFACTION_QUESTION))==null?void 0:e.response,l=i==="satisfied"?"satisfied":i==="dissatisfied"?"dissatisfied":"neutral",s=(t=(n=A.get(o("AdsCreativeGenAIImageGenFeedbackSurveyConfig").GEN_AI_IMAGE_GEN_PRIMARY_FEEDBACK_QUESTION))==null?void 0:n.response)!=null?t:"",u=s.toString()+";"+((r=(a=A.get(o("AdsCreativeGenAIImageGenFeedbackSurveyConfig").GEN_AI_IMAGE_GEN_FREEFORM_TEXT_QUESTION))==null?void 0:a.response.toString())!=null?r:"");typeof u=="string"&&q(l,u),V()},G=function(){q("satisfied")},z=function(){R()},j=d.jsx(r("GeoModalHeader.react"),{heading:s._(/*BTDS*/"")}),K=d.jsxs(r("GeoFlexbox.react"),{justifyContent:"end",xstyle:g.footer,children:[d.jsx(r("GeoBasePressable.react"),{"aria-label":s._(/*BTDS*/""),isDisabled:B==="satisfied",isVisuallyActive:B==="satisfied",onPress:G,variant:"flat",children:d.jsx(r("LWIOmniIcon.react"),{icon:o("fbicon")._(u("420842"),16)})}),d.jsx(r("GeoBasePressable.react"),{"aria-label":s._(/*BTDS*/""),isDisabled:B==="dissatisfied",isVisuallyActive:B==="dissatisfied",onPress:z,variant:"flat",children:d.jsx(r("LWIOmniIcon.react"),{icon:o("fbicon")._(u("420838"),16)})})]}),Q=function(){f.onReady(function(e){return e.logWithLoggerAndOptionalSpecContext(i,l,{action:"cancel",event:"boosted_post_image_gen_modal_cancel",extra_data:{is_loading:I>0,selected_images_count:D.length,selected_images_in_modal:P.length,total_images:k.length},side:"user_action"})})},X=function(t){N(function(e){return e.filter(function(e){return e.key!==t.key})})},Y=d.jsxs("div",{className:"x6s0dn4 xtqikln x78zum5 x1iyjqo2 xs83m0k",children:[d.jsxs("div",{className:"x6s0dn4 xfex06f x78zum5",children:[d.jsxs("div",{className:"x78zum5 xdt5ytf x1dbijih xuxw1ft",children:[d.jsx(r("LWIOmniText.react"),{type:"headlineEmphasized4",children:s._(/*BTDS*/"",[s._param("count",P.length)])}),d.jsx(r("LWIOmniText.react"),{color:"secondary",type:"meta3",children:s._(/*BTDS*/"")})]}),d.jsxs("div",{className:"xtqikln x78zum5 x13fj5qh",children:[P.map(function(e){return d.jsx(h,{imageVariant:e,onRemove:X},e.key)}),Array.from({length:3-P.length}).map(function(e,t){return d.jsx(y,{},"placeholder-"+t)})]})]}),d.jsx("div",{className:"x1iyjqo2 xs83m0k"}),K]}),J=d.jsx(r("GeoModalFooter.react"),{primaryButton:d.jsx(r("GeoButton.react"),{label:s._(/*BTDS*/""),onClick:function(){f.onReady(function(e){return e.logWithLoggerAndOptionalSpecContext(i,l,{action:"save",event:"boosted_post_image_gen_modal_save",extra_data:{is_loading:I>0,selected_images_count:D.length,selected_images_in_modal:P.length,total_images:k.length},side:"user_action"})}),x(P),T(P),n("transition")},variant:"primary"}),secondaryButton:d.jsx(r("GeoButton.react"),{label:s._(/*BTDS*/""),onClick:function(){Q(),n("layerCancelButton")}}),startContent:Y});return d.jsxs(d.Fragment,{children:[d.jsxs(r("GeoModal.react"),{footer:J,header:j,onHide:function(t){Q(),n(t)},width:1200,children:[d.jsx("div",{className:"x14nfmen xjm9jq1 xh8yej3"}),d.jsx(r("LWICometBoostedPostImageGenModalMainPage.react"),{adAccountId:a.adAccountId,boostedPostMedia:a.boostedPostMedia,pageID:a.pageID,selectedImagesBeforeSave:P,setSelectedImagesBeforeSave:N})]}),L&&d.jsx(C,{onCancelSurvey:V,onSubmitSurvey:H,surveyConfig:o("AdsCreativeGenAIImageGenFeedbackSurveyConfig").GEN_AI_IMAGE_GEN_FEEDBACK_BASIC_SURVEY,surveyResponses:A,updateSurveyRepsonses:U})]})}b.displayName=b.name+" [from "+i.id+"]",l.default=b}),226);
-----
LWICometCreativeEditorImageGenerationFeedbackFooterSection.react",["fbt","ix","AdsCreativeGenAIImageGenFeedbackSurveyConfig","CometErrorBoundary.react","CometImage.react","CometRelay","GeoBaseText.react","GeoButton.react","GeoButtonGroup.react","GeoFlexbox.react","GeoToast.react","GeoTooltip.react","LWICometGenAIImageFeedbackMutation","addToMap","deferredLoadComponent","fbicon","geoMargin","react","react-compiler-runtime","requireDeferredForDisplay","useBoolean","useGeoToaster","withLWICometSpecPart"],(function(t,n,r,o,a,i,l,s,u){"use strict";var e,c=e||(e=o("react")),d=e.useState,m=r("deferredLoadComponent")(r("requireDeferredForDisplay")("AdsCreativeFeatureFeedbackSurveyModal.react").__setRef("LWICometCreativeEditorImageGenerationFeedbackFooterSection.react")),p={negativeFeedbackButton:{transform:"x1nghlpw",$$css:!0}};function _(e){var t=o("react-compiler-runtime").c(40),n=e.legacyAdAccountID,a=r("useBoolean")(!1),i=a.setFalse,l=a.setTrue,_=a.value,g=o("CometRelay").useRelayEnvironment(),h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=new Map([[o("AdsCreativeGenAIImageGenFeedbackSurveyConfig").GEN_AI_IMAGE_GEN_SATISFACTION_QUESTION,{response:"dissatisfied",type:"SATISFACTION"}]]),t[0]=h):h=t[0];var y=h,C=d(y),b=C[0],v=C[1],S=d("neutral"),R=S[0],L=S[1],E=r("useGeoToaster")(),k=E.add,I;t[1]!==k||t[2]!==g||t[3]!==n?(I=function(t,a){var e=a===void 0?"":a;L(t),o("LWICometGenAIImageFeedbackMutation").commit(g,{adAccountId:n,creativeOptimizationSatisfaction:t,freeFormFeedback:e},{onCompleted:function(t){k(c.jsx(r("GeoToast.react"),{heading:s._(/*BTDS*/"Thanks for your feedback!")}))}})},t[1]=k,t[2]=g,t[3]=n,t[4]=I):I=t[4];var T=I,D;t[5]===Symbol.for("react.memo_cache_sentinel")?(D=function(t,n){t.type===n.type&&v(function(e){return r("addToMap")(e,t,n)})},t[5]=D):D=t[5];var x=D,$;t[6]!==i?($=function(){v(y),i()},t[6]=i,t[7]=$):$=t[7];var P=$,N;t[8]!==P||t[9]!==T||t[10]!==b?(N=function(){var e,t,n,r,a,i=(e=b.get(o("AdsCreativeGenAIImageGenFeedbackSurveyConfig").GEN_AI_IMAGE_GEN_SATISFACTION_QUESTION))==null?void 0:e.response,l=i==="satisfied"?"satisfied":i==="dissatisfied"?"dissatisfied":"neutral",s=(t=(n=b.get(o("AdsCreativeGenAIImageGenFeedbackSurveyConfig").GEN_AI_IMAGE_GEN_PRIMARY_FEEDBACK_QUESTION))==null?void 0:n.response)!=null?t:"",u=s.toString()+";"+((r=(a=b.get(o("AdsCreativeGenAIImageGenFeedbackSurveyConfig").GEN_AI_IMAGE_GEN_FREEFORM_TEXT_QUESTION))==null?void 0:a.response.toString())!=null?r:"");typeof u=="string"&&T(l,u),P()},t[8]=P,t[9]=T,t[10]=b,t[11]=N):N=t[11];var M=N,w;t[12]===Symbol.for("react.memo_cache_sentinel")?(w=o("fbicon")._(u("509925"),16),t[12]=w):w=t[12];var A=R==="satisfied",F;t[13]!==T||t[14]!==R?(F=function(){R!=="satisfied"&&T("satisfied")},t[13]=T,t[14]=R,t[15]=F):F=t[15];var O;t[16]===Symbol.for("react.memo_cache_sentinel")?(O=c.jsx(r("GeoTooltip.react"),{content:s._(/*BTDS*/"I like image variations")}),t[16]=O):O=t[16];var B;t[17]!==A||t[18]!==F?(B=c.jsx(r("GeoButton.react"),{icon:w,isDepressed:A,isLabelHidden:!0,label:"positive feedback",onClick:F,tooltip:O,variant:"flat"}),t[17]=A,t[18]=F,t[19]=B):B=t[19];var W=B,q;t[20]===Symbol.for("react.memo_cache_sentinel")?(q=c.jsx(r("CometImage.react"),{src:u("509925"),xstyle:p.negativeFeedbackButton}),t[20]=q):q=t[20];var U=R==="dissatisfied",V;t[21]!==R||t[22]!==l?(V=function(){R!=="dissatisfied"&&l()},t[21]=R,t[22]=l,t[23]=V):V=t[23];var H;t[24]===Symbol.for("react.memo_cache_sentinel")?(H=c.jsx(r("GeoTooltip.react"),{content:s._(/*BTDS*/"I do not like image variations")}),t[24]=H):H=t[24];var G;t[25]!==U||t[26]!==V?(G=c.jsx(r("GeoButton.react"),{"data-testid":void 0,icon:q,isDepressed:U,isLabelHidden:!0,label:"negative feedback",onClick:V,tooltip:H,variant:"flat"}),t[25]=U,t[26]=V,t[27]=G):G=t[27];var z=G,j;t[28]===Symbol.for("react.memo_cache_sentinel")?(j=c.jsx(r("GeoFlexbox.react"),{xstyle:r("geoMargin").end8,children:c.jsx(r("GeoBaseText.react"),{color:"valueDescription",size:"value",children:s._(/*BTDS*/"Give feedback on image variations")})}),t[28]=j):j=t[28];var K;t[29]!==z||t[30]!==W?(K=c.jsx(r("CometErrorBoundary.react"),{fallback:f,children:c.jsx(r("GeoFlexbox.react"),{alignItems:"center",justifyContent:"center",xstyle:r("geoMargin").top4,children:c.jsxs(r("GeoButtonGroup.react"),{children:[W,z]})})}),t[29]=z,t[30]=W,t[31]=K):K=t[31];var Q;t[32]!==_||t[33]!==P||t[34]!==M||t[35]!==b?(Q=_&&c.jsx(m,{onCancelSurvey:P,onSubmitSurvey:M,surveyConfig:o("AdsCreativeGenAIImageGenFeedbackSurveyConfig").GEN_AI_IMAGE_GEN_FEEDBACK_BASIC_SURVEY,surveyResponses:b,updateSurveyRepsonses:x}),t[32]=_,t[33]=P,t[34]=M,t[35]=b,t[36]=Q):Q=t[36];var X;return t[37]!==K||t[38]!==Q?(X=c.jsxs(r("GeoFlexbox.react"),{alignItems:"center",direction:"row",children:[j,K,Q]}),t[37]=K,t[38]=Q,t[39]=X):X=t[39],X}function f(){return c.jsx("div",{})}f.displayName=f.name+" [from "+i.id+"]";var g=r("withLWICometSpecPart")(_,function(e){return{legacyAdAccountID:e.adAccountData.legacyAccountID}});l.default=g}),226);
-----
LWICometGenAIImageFeedbackMutation",["CometRelay","LWICometGenAIImageFeedbackMutation.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h,i=h!==void 0?h:h=b("LWICometGenAIImageFeedbackMutation.graphql");function a(a,b,c){b={ad_account_id:b.adAccountId,creative_optimization_satisfaction:b.creativeOptimizationSatisfaction,free_form_feedback:b.freeFormFeedback};var e=c==null?void 0:c.onCompleted;c=c==null?void 0:c.onError;d("CometRelay").commitMutation(a,{mutation:i,onCompleted:e,onError:c,variables:b})}g.commit=a}),98);
-----
LWICometGenAIImageFeedbackMutation.graphql",["LWICometGenAIImageFeedbackMutation_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"ad_account_id"},{defaultValue:null,kind:"LocalArgument",name:"creative_optimization_satisfaction"},{defaultValue:null,kind:"LocalArgument",name:"free_form_feedback"}],c=[{alias:null,args:[{kind:"Variable",name:"ad_account_id",variableName:"ad_account_id"},{kind:"Variable",name:"creative_optimization_satisfaction",variableName:"creative_optimization_satisfaction"},{kind:"Variable",name:"free_form_feedback",variableName:"free_form_feedback"}],concreteType:"XFBLogGenAiImageSatisfactionResponsePayload",kind:"LinkedField",name:"xfb_log_gen_ai_image_satisfaction",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"success",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"LWICometGenAIImageFeedbackMutation",selections:c,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"LWICometGenAIImageFeedbackMutation",selections:c},params:{id:b("LWICometGenAIImageFeedbackMutation_facebookRelayOperation"),metadata:{},name:"LWICometGenAIImageFeedbackMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
LWICometGenAIImageFeedbackMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="23910048631977714"}),null);
-----