AdsPLRCategoryBenchmarkingCardQuery.graphql",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"ad_account_id"}],t=[{fields:[{kind:"Variable",name:"ad_account_id",variableName:"ad_account_id"}],kind:"ObjectValue",name:"input"}],n={alias:"title",args:null,kind:"ScalarField",name:"localized_name",storageKey:null},r={alias:"uniqueID",args:null,kind:"ScalarField",name:"unique_node_id",storageKey:null},o={alias:null,args:null,kind:"ScalarField",name:"has_benchmarking_data",storageKey:null},a=[{alias:null,args:t,concreteType:"XFBProductInsightsBenchmarkingFptCategory",kind:"LinkedField",name:"xfb_plr_category_benchmarking_category_list",plural:!1,selections:[{alias:null,args:null,concreteType:"ProductInsightsBenchmarkingFptCategoryNode",kind:"LinkedField",name:"fpt_categories",plural:!0,selections:[n,r,o,{alias:null,args:null,concreteType:"ProductInsightsBenchmarkingFptCategoryNode",kind:"LinkedField",name:"children",plural:!0,selections:[n,r,o,{alias:null,args:null,concreteType:"ProductInsightsBenchmarkingFptCategoryNode",kind:"LinkedField",name:"children",plural:!0,selections:[n,r,o,{alias:null,args:null,concreteType:"ProductInsightsBenchmarkingFptCategoryNode",kind:"LinkedField",name:"children",plural:!0,selections:[n,r,o],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"ProductInsightsBenchmarkingFptCategoryNode",kind:"LinkedField",name:"default_fpt_category",plural:!1,selections:[n,r],storageKey:null}],storageKey:null},{alias:null,args:t,concreteType:"ProductInsightsCategoryBenchmarking",kind:"LinkedField",name:"xfb_plr_category_benchmarking",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"country",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"AdsPLRCategoryBenchmarkingCardQuery",selections:a,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"AdsPLRCategoryBenchmarkingCardQuery",selections:a},params:{id:"25228539136810726",metadata:{},name:"AdsPLRCategoryBenchmarkingCardQuery",operationKind:"query",text:null}}})();a.exports=e}),null);
-----
AdsPLRCategoryBenchmarkingCard.react",["fbt","AdsErrorBoundary.react","AdsPLRCategoryBenchmarkingCardInnerQuery.graphql","AdsPLRCategoryBenchmarkingCardQuery.graphql","AdsPLRCategoryBenchmarkingGeoHierarchicalTreeSearchSource","AdsPLRCategoryBenchmarkingLineChartContainer.react","AdsPLRCategoryBenchmarkingSimilarCategoriesCard.react","AdsPLRCategoryBenchmarkingYourCategoryCard.react","AdsReportBuilderPLRHeaderDescriptionWithTooltip.react","CometPlaceholder.react","GeoAppearanceSelectors","GeoBaseContextualLayerAnchorRoot.react","GeoBaseText.react","GeoButtonLoadingState.react","GeoCard.react","GeoCardLoadingState.react","GeoColorSelectors","GeoComplexSelector.experimental.react","GeoDivider.react","GeoDropdownMenu.react","GeoFlexbox.react","GeoHStack.react","GeoHeaderLoadingState.react","GeoIcon.react","GeoLink.react","GeoMenuItem.react","GeoPopover.react","GeoPrivateChartPaletteContext","GeoVStack.react","ProductLevelReportingEventsLoggerFalcoEvent","RelayHooks","geoMargin","getTofuDateRangeFromDateRangeValue","meta-brand-i-circle-outline-16","nullthrows","productInsightsCategoryBenchmarkingMetrics","react","react-compiler-runtime","shouldShowAdsPLRCategoryBenchmarkingCard"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c,d=c||(c=o("react")),m=c,p=m.useMemo,_=m.useState,f={menuWidth:{minWidth:"x18n5i07",$$css:!0},loadingView:{height:"x4juun3",$$css:!0}},g=e!==void 0?e:e=n("AdsPLRCategoryBenchmarkingCardQuery.graphql"),h=u!==void 0?u:u=n("AdsPLRCategoryBenchmarkingCardInnerQuery.graphql");function y(e){var t=o("react-compiler-runtime").c(4),n=e.adAccountID,a=e.dateRangeValue;if(!r("shouldShowAdsPLRCategoryBenchmarkingCard")())return null;var l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=d.jsx(r("GeoCardLoadingState.react"),{header:d.jsx(r("GeoHeaderLoadingState.react"),{endContent:d.jsx(r("GeoButtonLoadingState.react"),{loggingName:i.id}),headerLines:2}),xstyle:f.loadingView,loggingName:i.id}),t[0]=l):l=t[0];var s;return t[1]!==n||t[2]!==a?(s=d.jsx(r("AdsErrorBoundary.react"),{moduleName:i.id,children:d.jsx(r("CometPlaceholder.react"),{fallback:l,name:i.id,children:d.jsx(C,{adAccountID:n,dateRangeValue:a})})}),t[1]=n,t[2]=a,t[3]=s):s=t[3],s}function C(e){var t,n,r,a,i,l=o("react-compiler-runtime").c(13),s=e.adAccountID,u=e.dateRangeValue,c=o("RelayHooks").useLazyLoadQuery(g,{ad_account_id:s}),m,p;if(l[0]!==c){var _=S(c),f=_[0],h=_[1];m=h,p=o("AdsPLRCategoryBenchmarkingGeoHierarchicalTreeSearchSource").createAdsPLRCategoryBenchmarkingGeoHierarchicalTreeSearchSource(f),l[0]=c,l[1]=m,l[2]=p}else m=l[1],p=l[2];var y=p,C=(t=(n=c.xfb_plr_category_benchmarking_category_list)==null||(n=n.default_fpt_category)==null?void 0:n.uniqueID)!=null?t:"",v=(r=(a=c.xfb_plr_category_benchmarking_category_list)==null||(a=a.default_fpt_category)==null?void 0:a.title)!=null?r:"",R;if(l[3]!==C||l[4]!==v){var L={uniqueID:C,title:v};R=o("AdsPLRCategoryBenchmarkingGeoHierarchicalTreeSearchSource").createAdsPLRCategoryBenchmarkingGeoHierarchicalTreeSearchSource([L]),l[3]=C,l[4]=v,l[5]=R}else R=l[5];var E=R[0],k=(i=c.xfb_plr_category_benchmarking)==null?void 0:i.country;if(y.length===0)return null;var I;return l[6]!==s||l[7]!==y||l[8]!==k||l[9]!==u||l[10]!==E||l[11]!==m?(I=d.jsx(b,{adAccountID:s,categoryList:y,country:k,dateRangeValue:u,defaultCategory:E,disabledEntries:m}),l[6]=s,l[7]=y,l[8]=k,l[9]=u,l[10]=E,l[11]=m,l[12]=I):I=l[12],I}function b(e){var t=o("react-compiler-runtime").c(67),n=e.adAccountID,a=e.categoryList,i=e.country,l=e.dateRangeValue,u=e.defaultCategory,c=e.disabledEntries,m;t[0]!==u?(m=[u],t[0]=u,t[1]=m):m=t[1];var p=_(m),g=p[0],y=p[1],C=_(r("productInsightsCategoryBenchmarkingMetrics")[0]),b=C[0],S=C[1],R=g[0],L;t[2]!==R?(L=r("nullthrows")(R==null?void 0:R.getTitle()),t[2]=R,t[3]=L):L=t[3];var E=L,k=b.key,I=b.metricContent,T;t[4]!==I.lowerCaseHeading?(T=r("nullthrows")(I.lowerCaseHeading),t[4]=I.lowerCaseHeading,t[5]=T):T=t[5];var D=T,x=o("RelayHooks").useLazyLoadQuery(h,{ad_account_id:n,category:R==null?void 0:R.getUniqueID(),metric:k,date_range:r("getTofuDateRangeFromDateRangeValue")(l)}),$;t[6]!==a?($=new(o("AdsPLRCategoryBenchmarkingGeoHierarchicalTreeSearchSource")).AdsPLRCategoryBenchmarkingGeoHierarchicalTreeSearchSource(a),t[6]=a,t[7]=$):$=t[7];var P=$,N;t[8]===Symbol.for("react.memo_cache_sentinel")?(N=s._(/*BTDS*/"businesses like yours"),t[8]=N):N=t[8];var M=N,w;if(t[9]!==E||t[10]!==D){var A;t[12]===Symbol.for("react.memo_cache_sentinel")?(A=d.jsx("span",{className:"xujl8zx xi2nhp4",children:M}),t[12]=A):A=t[12],w=s._(/*BTDS*/"Compare your {metrics name} against {=m6} in the {category name} category",[s._param("metrics name",D),s._param("category name",E),s._implicitParam("=m6",d.jsx(r("GeoPopover.react"),{content:[d.jsx("div",{children:s._(/*BTDS*/"We find similar campaigns run by similar businesses based on the following:")},0),d.jsx("br",{},1),d.jsxs("ul",{className:"xtaz4m5 xexx8yu x5zjp28 x18d9i69 x162tt16",children:[d.jsx("li",{children:s._(/*BTDS*/"Campaign objective")}),d.jsx("li",{children:s._(/*BTDS*/"Industry")}),d.jsx("li",{children:s._(/*BTDS*/"Country or region")}),d.jsx("li",{children:s._(/*BTDS*/"Ad spend")}),d.jsx("li",{children:s._(/*BTDS*/"Product category")})]},2)],heading:s._(/*BTDS*/"Businesses like yours"),isSticky:!1,children:s._(/*BTDS*/"{businesses like yours}",[s._param("businesses like yours",A)])}))]),t[9]=E,t[10]=D,t[11]=w}else w=t[11];var F=w,O;t[13]===Symbol.for("react.memo_cache_sentinel")?(O=s._(/*BTDS*/"Category benchmarking"),t[13]=O):O=t[13];var B=O,W;t[14]===Symbol.for("react.memo_cache_sentinel")?(W=s._(/*BTDS*/"Category benchmarking percentiles"),t[14]=W):W=t[14];var q=W,U;t[15]===Symbol.for("react.memo_cache_sentinel")?(U=s._(/*BTDS*/"This metric is {estimatedLink} and in development.",[s._param("estimatedLink",d.jsx(r("GeoLink.react"),{href:"/help/181058782494426?ref=search_new_1",target:"_blank",children:s._(/*BTDS*/"estimated")}))]),t[15]=U):U=t[15];var V=U,H;t[16]===Symbol.for("react.memo_cache_sentinel")?(H=d.jsxs(r("GeoBaseText.react"),{color:"valueDescription",size:"value",children:[s._(/*BTDS*/"These percentiles are calculated using values from ad accounts of businesses like yours over the selected time period. We then arrange these values from highest to lowest to identify the top 90th and middle 50th percentiles."),d.jsx("br",{}),d.jsx("br",{})]},"column description"),t[16]=H):H=t[16];var G;if(t[17]===Symbol.for("react.memo_cache_sentinel")){var z=[H,d.jsxs(r("GeoFlexbox.react"),{alignItems:"center",children:[d.jsx(r("GeoIcon.react"),{color:"inherit",icon:o("meta-brand-i-circle-outline-16").metaBrandICircleOutline16}),d.jsx(r("GeoBaseText.react"),{color:"valueDescription",size:"value",children:V})]},"more-text")];G=d.jsx(r("GeoPopover.react"),{content:z,heading:q,isSticky:!1}),t[17]=G}else G=t[17];var j=G,K;t[18]===Symbol.for("react.memo_cache_sentinel")?(K={default:!1,getColor:v},t[18]=K):K=t[18];var Q=K,X;t[19]===Symbol.for("react.memo_cache_sentinel")?(X=d.jsx(r("AdsReportBuilderPLRHeaderDescriptionWithTooltip.react"),{header:"header3",title:B,tooltip:j}),t[19]=X):X=t[19];var Y;t[20]===Symbol.for("react.memo_cache_sentinel")?(Y={className:"x18n5i07"},t[20]=Y):Y=t[20];var J;t[21]===Symbol.for("react.memo_cache_sentinel")?(J=s._(/*BTDS*/"Category selector"),t[21]=J):J=t[21];var Z;t[22]===Symbol.for("react.memo_cache_sentinel")?(Z=s._(/*BTDS*/"Search"),t[22]=Z):Z=t[22];var ee;t[23]!==n?(ee=function(t){r("ProductLevelReportingEventsLoggerFalcoEvent").log(function(){var e;return{ad_account_id:n!=null?n:"",event_severity:"info",event:"category_benchmarking_category_change",action_data:{category:(e=t[0].getUniqueID())!=null?e:""}}}),y(t)},t[23]=n,t[24]=ee):ee=t[24];var te;t[25]!==c||t[26]!==P||t[27]!==ee||t[28]!==g?(te=d.jsx("div",babelHelpers.extends({},Y,{children:d.jsx(r("GeoBaseContextualLayerAnchorRoot.react"),{children:d.jsx(r("GeoComplexSelector.experimental.react"),{disabledEntries:c,isCategorySelectable:!0,isLabelHidden:!0,label:J,layerXStyle:f.menuWidth,placeholder:Z,searchSource:P,selectionType:"single",value:g,onChange:ee})})})),t[25]=c,t[26]=P,t[27]=ee,t[28]=g,t[29]=te):te=t[29];var ne=I.heading,re;t[30]!==n||t[31]!==I.heading?(re=r("productInsightsCategoryBenchmarkingMetrics").map(function(e){return d.jsx(r("GeoMenuItem.react"),{"data-testid":void 0,label:e.metricContent.heading,onClick:function(){r("ProductLevelReportingEventsLoggerFalcoEvent").log(function(){return{ad_account_id:n!=null?n:"",event_severity:"info",event:"category_benchmarking_metric_change",action_data:{metric:I.heading.toString()}}}),S(e)}},e.key)}),t[30]=n,t[31]=I.heading,t[32]=re):re=t[32];var oe;t[33]!==I.heading||t[34]!==re?(oe=d.jsx("div",{children:d.jsx(r("GeoBaseContextualLayerAnchorRoot.react"),{children:d.jsx(r("GeoDropdownMenu.react"),{label:ne,children:re})})}),t[33]=I.heading,t[34]=re,t[35]=oe):oe=t[35];var ae;t[36]!==te||t[37]!==oe?(ae=d.jsxs(r("GeoHStack.react"),{justifyContent:"space-between",children:[X,d.jsxs(r("GeoHStack.react"),{grow:0,shrink:0,children:[te,oe]})]}),t[36]=te,t[37]=oe,t[38]=ae):ae=t[38];var ie;t[39]!==F?(ie=d.jsx(r("GeoBaseText.react"),{color:"heading",size:"header3",children:F}),t[39]=F,t[40]=ie):ie=t[40];var le;t[41]!==x||t[42]!==b?(le=d.jsx(r("AdsPLRCategoryBenchmarkingLineChartContainer.react"),{fragmentKey:x,metric:b}),t[41]=x,t[42]=b,t[43]=le):le=t[43];var se;t[44]!==ie||t[45]!==le?(se=d.jsxs(r("GeoVStack.react"),{grow:2,children:[ie,le]}),t[44]=ie,t[45]=le,t[46]=se):se=t[46];var ue;t[47]===Symbol.for("react.memo_cache_sentinel")?(ue=d.jsx(r("GeoDivider.react"),{direction:"vertical",xstyle:r("geoMargin").horiz8}),t[47]=ue):ue=t[47];var ce;t[48]===Symbol.for("react.memo_cache_sentinel")?(ce=[o("GeoAppearanceSelectors").selectBorderRadius({context:"container"}),o("GeoColorSelectors").selectBorderColor({color:"element"}),o("GeoAppearanceSelectors").selectBorderWidth({context:"divider"}),r("geoMargin").bottom8],t[48]=ce):ce=t[48];var de;t[49]!==x||t[50]!==l||t[51]!==b?(de=d.jsx(r("GeoVStack.react"),{xstyle:ce,children:d.jsx(r("AdsPLRCategoryBenchmarkingYourCategoryCard.react"),{dateRangeValue:l,fragmentKey:x,metric:b})}),t[49]=x,t[50]=l,t[51]=b,t[52]=de):de=t[52];var me;t[53]===Symbol.for("react.memo_cache_sentinel")?(me=[o("GeoAppearanceSelectors").selectBorderRadius({context:"container"}),o("GeoColorSelectors").selectBorderColor({color:"element"}),o("GeoAppearanceSelectors").selectBorderWidth({context:"divider"})],t[53]=me):me=t[53];var pe;t[54]!==i||t[55]!==x||t[56]!==k?(pe=d.jsx(r("GeoVStack.react"),{xstyle:me,children:d.jsx(r("AdsPLRCategoryBenchmarkingSimilarCategoriesCard.react"),{country:i,fragmentKey:x,metric:k})}),t[54]=i,t[55]=x,t[56]=k,t[57]=pe):pe=t[57];var _e;t[58]!==de||t[59]!==pe?(_e=d.jsxs(r("GeoVStack.react"),{xstyle:r("geoMargin").start8,children:[de,pe]}),t[58]=de,t[59]=pe,t[60]=_e):_e=t[60];var fe;t[61]!==se||t[62]!==_e?(fe=d.jsxs(r("GeoHStack.react"),{alignItems:"stretch",children:[se,ue,_e]}),t[61]=se,t[62]=_e,t[63]=fe):fe=t[63];var ge;return t[64]!==ae||t[65]!==fe?(ge=d.jsx(r("GeoCard.react"),{children:d.jsx(r("GeoPrivateChartPaletteContext").Provider,{value:Q,children:d.jsxs(r("GeoVStack.react"),{xstyle:r("geoMargin").all16,children:[ae,fe]})})}),t[64]=ae,t[65]=fe,t[66]=ge):ge=t[66],ge}function v(e){switch(e){case 0:return"#3D92CA";case 1:return"#E6E2DF";case 2:default:return"#83C8C0"}}function S(e){var t,n=(t=e.xfb_plr_category_benchmarking_category_list)==null?void 0:t.fpt_categories;if(n==null)return[[],[]];var r=s._(/*BTDS*/"No benchmarking data available for this category."),o=[],a=[];return n.forEach(function(e){var t,n,i={uniqueID:(t=e.uniqueID)!=null?t:"",title:(n=e.title)!=null?n:""};if(e.has_benchmarking_data===!1){var l;a.push({id:(l=e.uniqueID)!=null?l:"",disabledMessage:r})}e.children!=null&&e.children.length>0&&(i.children=e.children.map(function(e){var t,n,o={uniqueID:(t=e.uniqueID)!=null?t:"",title:(n=e.title)!=null?n:""};if(e.has_benchmarking_data===!1){var i;a.push({id:(i=e.uniqueID)!=null?i:"",disabledMessage:r})}return e.children!=null&&e.children.length>0&&(o.children=e.children.map(function(e){var t,n,o={uniqueID:(t=e.uniqueID)!=null?t:"",title:(n=e.title)!=null?n:""};if(e.has_benchmarking_data===!1){var i;a.push({id:(i=e.uniqueID)!=null?i:"",disabledMessage:r})}return e.children!=null&&e.children.length>0&&(o.children=e.children.map(function(e){var t,n;if(e.has_benchmarking_data===!1){var o;a.push({id:(o=e.uniqueID)!=null?o:"",disabledMessage:r})}return{uniqueID:(t=e.uniqueID)!=null?t:"",title:(n=e.title)!=null?n:""}})),o})),o})),o.push(i)}),[o,a]}l.default=y}),226);
-----