PageSourceSearch

https://app.adcero.io/_next/static/chunks/16997.2a7930a499e9f3d4.js

js adcero.io collected 2026-10-02 02:01:16 UTC 21,067 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[16997],{16997:(e,a,t)=>{t.d(a,{CT:()=>I,A0:()=>C,F$:()=>b,Rk:()=>h,uS:()=>A,hq:()=>E});var r=t(12115),i=t(65820),l=t(99158),n=t(97072),o=t(79467),s=t(19126),d=t(15695);let u={marketingLandscape:{field:"marketingImages",label:"landscape image",ratio:1.91,prefix:"mktimg-"},marketingSquare:{field:"squareMarketingImages",label:"square image",ratio:1,prefix:"sqimg-"},logo:{field:"logoImages",label:"logo",ratio:1,prefix:"logo-"}};function c(e,a){return(0,l.vL)(a.width,a.height,u[e].ratio,.01)}function g(e){let a=e.width/e.height;return Math.abs(a-u.marketingLandscape.ratio)<=Math.abs(a-u.marketingSquare.ratio)?"marketingLandscape":"marketingSquare"}function m(e){let a=e.trim(),t=a.match(/youtu\.be\/([a-zA-Z0-9_-]{11})/);if(t)return t[1];let r=a.match(/[?&]v=([a-zA-Z0-9_-]{11})/);if(r)return r[1];let i=a.match(/(?:embed|shorts)\/([a-zA-Z0-9_-]{11})/);return i?i[1]:/^[a-zA-Z0-9_-]{11}$/.test(a)?a:null}function p(e){let{id:a,resourceName:t,name:r,imagePreviewMap:i}=e,n=i[t];return{id:a,url:null!=n?n:(0,l.rY)(t)?t:void 0,name:r}}function C(e){let{dgCreative:a,updateDemandGenAdCreative:t,apiConfig:C}=e,[f,b]=(0,r.useState)({}),[v,h]=(0,r.useState)({}),[y,k]=(0,r.useState)([]),[I,T]=(0,r.useState)([]),[E,w]=(0,r.useState)(null),[A,S]=(0,r.useState)([]),R=(0,r.useRef)(a),M=(0,r.useRef)(new Map);(0,r.useEffect)(()=>{R.current=a},[a]),(0,r.useEffect)(()=>{let e=M.current;return()=>{e.forEach(e=>e()),e.clear()}},[]);let G=(0,r.useMemo)(()=>{let e=A[0];if(!e)return null;let a=u[e.bucket];return{...e,targetLabel:a.label,targetRatio:a.ratio}},[A]),L=(0,r.useCallback)(async()=>{let e=await (0,o.c4)();return(0,n.qg)(C,e)},[C]),_=(0,r.useCallback)((e,a,r)=>{let i=R.current,l=[...i[e]||[],a];R.current={...i,[e]:l},t({[e]:l}),b(e=>({...e,[a]:r}))},[t]),U=(0,r.useCallback)(async(e,a)=>{let t=await fetch(d.G.assets.upload,{method:"POST",headers:await L(),body:JSON.stringify({assetType:"IMAGE",imageData:(0,l.Yq)(e),name:a})}),r=await t.json().catch(()=>void 0),i=(0,s.uj)(r);if(t.ok&&i)return i;throw Error((0,n.Bb)(r)||"Image upload failed. Please try again.")},[L]),P=(0,r.useCallback)(async(e,a)=>{let t=await fetch(d.G.assets.agentUpload,{method:"POST",headers:await L(),body:JSON.stringify({assetType:"IMAGE",imageUrl:e.url,name:e.displayName})}),r=await t.json().catch(()=>void 0),i=(0,s.uj)(r);if(t.ok&&i)return i;throw Error((0,n.Bb)(r)||a)},[L]),N=(0,r.useCallback)(async(e,a)=>{let t=await fetch(d.G.assets.upload,{method:"POST",headers:await L(),body:JSON.stringify({assetType:"YOUTUBE_VIDEO",youtubeVideoId:e,name:a})}),r=await t.json().catch(()=>void 0),i=(0,s.uj)(r);if(t.ok&&i)return i;throw Error((0,n.Bb)(r)||"Video upload failed. Please try again.")},[L]),O=(0,r.useCallback)(e=>{e.cleanup&&M.current.set(e.id,e.cleanup),S(a=>[...a,e])},[]),D=(0,r.useCallback)(e=>{var a;let t=null!=(a=M.current.get(e.id))?a:e.cleanup;M.current.delete(e.id),null==t||t()},[]),x=(0,r.useCallback)(e=>{S(a=>a.filter(a=>a.id!==e.id)),k(a=>a.filter(a=>a.tempId!==e.tempId)),D(e)},[D]),q=(0,r.useMemo)(()=>[...(a.marketingImages||[]).map((e,a)=>p({id:"mktimg-".concat(a),resourceName:e,name:"Image ".concat(a+1),imagePreviewMap:f})),...(a.squareMarketingImages||[]).map((e,a)=>p({id:"sqimg-".concat(a),resourceName:e,name:"Square image ".concat(a+1),imagePreviewMap:f})),...y.filter(e=>"logoImages"!==e.field).map(e=>({id:e.tempId,url:e.previewUrl,name:e.name,isUploading:!0}))],[a.marketingImages,a.squareMarketingImages,f,y]),B=(0,r.useMemo)(()=>[...(a.logoImages||[]).map((e,a)=>p({id:"logo-".concat(a),resourceName:e,name:"Logo ".concat(a+1),imagePreviewMap:f})),...y.filter(e=>"logoImages"===e.field).map(e=>({id:e.tempId,url:e.previewUrl,name:e.name,isUploading:!0}))],[a.logoImages,f,y]),V=(0,r.useMemo)(()=>{var e;return[...a.videoAsset?[{id:"video-asset",source:null!=(e=v[a.videoAsset])?e:a.videoAsset,name:"Video 1",sourceType:v[a.videoAsset]?"youtube":"asset",youtubeVideoId:v[a.videoAsset]}]:[],...I.map(e=>({id:e.tempId,source:e.youtubeVideoId,name:"Uploading video",sourceType:"youtube",youtubeVideoId:e.youtubeVideoId,isUploading:!0}))]},[a.videoAsset,I,v]),j=(0,r.useCallback)(async(e,a)=>{let t=URL.createObjectURL(e),r=!1,o=!1;try{let i=await (0,l.Lq)(t),s="marketing"===a?g(i):a,d=u[s].field,m="uploading-".concat(Date.now(),"-").concat(Math.random());if(k(a=>[...a,{tempId:m,previewUrl:t,field:d,name:e.name||"Uploading image"}]),!c(s,i)){O({id:"crop-".concat(Date.now(),"-").concat(Math.random()),tempId:m,field:d,bucket:s,sourceUrl:t,previewUrl:t,name:e.name,cleanup:()=>URL.revokeObjectURL(t)}),r=!0,o=!0;return}let p=await (0,n.bB)(e),C=await U(p,e.name);_(d,C,t),r=!0}catch(e){console.error("[DemandGen] Image upload failed:",e),i.oR.error(e instanceof Error?e.message:"Image upload failed. Please try again.")}finally{r||URL.revokeObjectURL(t),o||k(e=>e.filter(e=>e.previewUrl!==t))}},[_,O,U]),F=(0,r.useCallback)(async e=>{for(let a of Array.from(e))await j(a,"marketing")},[j]),Z=(0,r.useCallback)(async e=>{for(let a of Array.from(e))await j(a,"logo")},[j]),X=(0,r.useCallback)((e,a)=>{let{field:r,prefix:i}=u[a],l=parseInt(e.replace(i,""),10);if(Number.isNaN(l))return;let n=R.current,o=(n[r]||[]).filter((e,a)=>a!==l);R.current={...n,[r]:o},t({[r]:o})},[t]),H=(0,r.useCallback)(e=>{if(e.startsWith(u.marketingSquare.prefix))return void X(e,"marketingSquare");X(e,"marketingLandscape")},[X]),W=(0,r.useCallback)(e=>X(e,"logo"),[X]),Y=(0,r.useCallback)(async(e,a)=>{var t;let r=(0,l.Kq)(e.url),n=null!=(t=e.previewUrl)?t:e.url,o="library-upload-".concat(Date.now(),"-").concat(Math.random()),s=!1;try{let t=await (0,l.Lq)(r),i="marketing"===a?g(t):a,d=u[i].field;if(k(a=>[...a,{tempId:o,previewUrl:n,field:d,name:e.displayName||"Uploading image"}]),!c(i,t)){O({id:"crop-".concat(Date.now(),"-").concat(Math.random()),tempId:o,field:d,bucket:i,sourceUrl:r,previewUrl:n,name:e.displayName}),s=!0;return}let m=await P(e,"logoImages"===d?"Logo upload failed. Please try again.":"Library image upload failed. Please try again.");_(d,m,n)}catch(e){console.error("[DemandGen] Library asset upload failed:",e),i.oR.error(e instanceof Error?e.message:"Library image upload failed. Please try again.")}finally{s||k(e=>e.filter(e=>e.tempId!==o))}},[_,O,P]),z=(0,r.useCallback)(async e=>{if(G)try{let a=await U(e.imageData,G.name);_(G.field,a,e.previewUrl)}catch(e){console.error("[DemandGen] Cropped image upload failed:",e),i.oR.error(e instanceof Error?e.message:"Cropped image upload failed. Please try again.")}finally{x(G)}},[G,_,x,U]),K=(0,r.useCallback)(()=>{G&&x(G)},[G,x]),J=(0,r.useCallback)(async e=>{let a=m(e);if(!a)return void i.oR.error("Paste a valid YouTube URL or 11-character video ID.");let r="video-upload-".concat(Date.now(),"-").concat(Math.random());T(e=>[...e,{tempId:r,youtubeVideoId:a}]);try{let e=await N(a,"YouTube video ".concat(a)),r=R.current;R.current={...r,videoAsset:e},t({videoAsset:e}),h(t=>({...t,[e]:a}))}catch(e){console.error("[DemandGen] Video upload failed:",e),i.oR.error(e instanceof Error?e.message:"Video upload failed. Please try again.")}finally{T(e=>e.filter(e=>e.tempId!==r))}},[t,N]),$=(0,r.useCallback)(e=>{if(T(a=>a.filter(a=>a.tempId!==e)),"video-asset"!==e)return;let a=R.current;R.current={...a,videoAsset:void 0},t({videoAsset:void 0})},[t]),Q=(0,r.useCallback)(async e=>{if("videos"===E){let t=e[0];if(t){var a;let e=m(null!=(a=t.videoUrl)?a:t.url);e?await J(e):i.oR.error("Demand Gen video ads require a YouTube video. Paste a YouTube URL or choose a YouTube asset.")}w(null);return}if("logos"===E){let a=5-(R.current.logoImages||[]).length;for(let t of e.slice(0,a))await Y(t,"logo");w(null);return}for(let a of e)await Y(a,"marketing");w(null)},[J,E,Y]);return{imagePreviewMap:f,setImagePreviewMap:b,marketingImageAssets:q,logoImageAssets:B,videoAssets:V,libraryPickerTarget:E,setLibraryPickerTarget:w,handleImageFileUpload:F,handleLogoFileUpload:Z,handleImageRemove:H,handleLogoRemove:W,handleVideoAdd:J,handleVideoRemove:$,handleLibrarySelect:Q,activeCropRequest:G,handleCropApply:z,handleCropCancel:K}}function f(e){return e.map(e=>({text:e}))}function b(e){let{dgCreative:a,updateDemandGenAdCreative:t}=e,i=(0,r.useMemo)(()=>a.headlines.map(e=>e.text),[a.headlines]),l=(0,r.useMemo)(()=>a.descriptions.map(e=>e.text),[a.descriptions]),n=a.callToAction||"automated",[o,s]=(0,r.useState)("en_US"),d=a.businessName||"",u=(0,r.useCallback)((e,a)=>{t({headlines:f(i.map((t,r)=>r===e?a:t))})},[i,t]),c=(0,r.useCallback)(()=>{t({headlines:f([...i,""])})},[i,t]),g=(0,r.useCallback)(e=>{t({headlines:f(i.filter((a,t)=>t!==e))})},[i,t]),m=(0,r.useCallback)((e,a)=>{t({descriptions:f(l.map((t,r)=>r===e?a:t))})},[l,t]),p=(0,r.useCallback)(()=>{t({descriptions:f([...l,""])})},[l,t]),C=(0,r.useCallback)(e=>{t({descriptions:f(l.filter((a,t)=>t!==e))})},[l,t]),b=(0,r.useCallback)(e=>{t({callToAction:e})},[t]),v=(0,r.useCallback)(e=>{t({businessName:e})},[t]),h=(0,r.useMemo)(()=>i.filter(e=>e.trim()),[i]),y=(0,r.useMemo)(()=>l.filter(e=>e.trim()),[l]);return{headlines:i,descriptions:l,callToAction:n,ctaLanguage:o,setCtaLanguage:s,businessName:d,filledHeadlines:h,filledDescriptions:y,handleHeadlineChange:u,handleHeadlineAdd:c,handleHeadlineRemove:g,handleDescriptionChange:m,handleDescriptionAdd:p,handleDescriptionRemove:C,handleCallToActionChange:b,handleBusinessNameChange:v}}var v=t(74952);function h(e){var a,t,i,l,n,o,s;let{dgCreative:d,updateDemandGenAdCreative:u,adGroup:c,updateAdGroup:g}=e,m=d.finalUrl||"",p=(0,r.useCallback)(e=>{u({finalUrl:e})},[u]),C=null!=(a=d.displayPath1)?a:"",f=null!=(t=d.displayPath2)?t:"",b=null!=(i=d.useMobileFinalUrl)&&i,h=null!=(l=
1d.mobileFinalUrl)?l:"",y=null!=(n=d.companionBanner)?n:"autogenerate",k=null!=(o=null==c?void 0:c.adGroupTrackingTemplate)?o:"",I=null!=(s=null==c?void 0:c.adGroupFinalUrlSuffix)?s:"",T=(0,r.useMemo)(()=>{var e;let a=null!=(e=null==c?void 0:c.adGroupCustomParameters)?e:[];return 0===a.length?[{id:"1",name:"",value:""}]:a.map((e,a)=>({id:String(a+1),name:e.key,value:e.value}))},[null==c?void 0:c.adGroupCustomParameters]),E=(0,r.useCallback)(e=>{let a=e.filter(e=>e.name||e.value).map(e=>({key:e.name,value:e.value}));g({adGroupCustomParameters:a.length>0?a:void 0})},[g]),w=(0,r.useCallback)(()=>{E([...T,{id:String(Date.now()),name:"",value:""}])},[T,E]),A=(0,r.useCallback)(e=>{E(T.filter(a=>a.id!==e))},[T,E]),S=(0,r.useCallback)((e,a,t)=>{E(T.map(r=>r.id===e?{...r,[a]:t}:r))},[T,E]),R=(0,r.useMemo)(()=>{let e=(0,v.y0)(m).value;return e.trim()?e.split("/")[0]:"example.com"},[m]);return{finalUrl:m,handleFinalUrlChange:p,displayPath1:C,displayPath2:f,useMobileFinalUrl:b,mobileFinalUrl:h,companionBanner:y,trackingTemplate:k,finalUrlSuffix:I,customParameters:T,handleParameterAdd:w,handleParameterRemove:A,handleParameterChange:S,previewDisplayUrl:R}}let y={marketingImageAsset:{label:"landscape image",ratio:1.91,minWidth:600,minHeight:314},squareMarketingImageAsset:{label:"square image",ratio:1,minWidth:300,minHeight:300},portraitMarketingImageAsset:{label:"portrait image",ratio:.8,minWidth:480,minHeight:600}};function k(e,a){let t=y[e];if(a.width<t.minWidth||a.height<t.minHeight)throw Error("Use a ".concat(t.label," at least ").concat(t.minWidth,"x").concat(t.minHeight,"px."));if(!(0,l.vL)(a.width,a.height,t.ratio,.01))throw Error("Use a ".concat(t.label," with the correct aspect ratio."))}function I(e){var a,t;let{dgCreative:u,updateDemandGenAdCreative:c,apiConfig:g,setImagePreviewMap:m}=e,p=(0,r.useMemo)(()=>{var e;return null!=(e=u.carouselCards)?e:[]},[u.carouselCards]),C=null!=(a=u.carouselHeadline)?a:"",f=null!=(t=u.carouselDescription)?t:"",[b,v]=(0,r.useState)(null),h=(0,r.useCallback)((e,a)=>{c({carouselCards:p.map((t,r)=>r===e?{...t,...a}:t)})},[p,c]),y=(0,r.useCallback)(()=>{p.length>=10||c({carouselCards:[...p,{headline:"",marketingImageAsset:""}]})},[p,c]),I=(0,r.useCallback)(e=>{p.length<=2||c({carouselCards:p.filter((a,t)=>t!==e)})},[p,c]),T=(0,r.useCallback)(e=>c({carouselHeadline:e}),[c]),E=(0,r.useCallback)(e=>c({carouselDescription:e}),[c]),w=(0,r.useCallback)(async()=>{let e=await (0,o.c4)();return(0,n.qg)(g,e)},[g]),A=(0,r.useCallback)((e,a,t,r)=>{h(e,{[a]:t}),m(e=>({...e,[t]:r}))},[h,m]),S=(0,r.useCallback)(async(e,a)=>{let t=await fetch(d.G.assets.upload,{method:"POST",headers:await w(),body:JSON.stringify({assetType:"IMAGE",imageData:e,name:a})}),r=await t.json().catch(()=>void 0),i=(0,s.uj)(r);if(t.ok&&i)return i;throw Error((0,n.Bb)(r)||"Carousel image upload failed. Please try again.")},[w]),R=(0,r.useCallback)(async e=>{let a=await fetch(d.G.assets.agentUpload,{method:"POST",headers:await w(),body:JSON.stringify({assetType:"IMAGE",imageUrl:e.url,name:e.displayName})}),t=await a.json().catch(()=>void 0),r=(0,s.uj)(t);if(a.ok&&r)return r;throw Error((0,n.Bb)(t)||"Library image upload failed. Please try again.")},[w]),M=(0,r.useCallback)(async(e,a,t)=>{let r=Array.from(t).find(e=>e.type.startsWith("image/"));if(!r)return void i.oR.error("Choose a JPG, PNG, or GIF image.");let o=URL.createObjectURL(r),s=!1;try{let t=await (0,l.Lq)(o);k(a,t);let i=await (0,n.bB)(r),d=await S(i,r.name);A(e,a,d,o),s=!0}catch(e){console.error("[DemandGen] Carousel card image upload failed:",e),i.oR.error(e instanceof Error?e.message:"Carousel image upload failed. Please try again.")}finally{s||URL.revokeObjectURL(o)}},[A,S]),G=(0,r.useCallback)(async e=>{if(null===b||0===e.length)return;let a=e[0];try{var t;let e=(0,l.Kq)(a.url),r=await (0,l.Lq)(e);k(b.field,r);let i=await R(a);A(b.index,b.field,i,null!=(t=a.previewUrl)?t:a.url)}catch(e){console.error("[DemandGen] Carousel card library image upload failed:",e),i.oR.error(e instanceof Error?e.message:"Library image upload failed. Please try again.")}v(null)},[A,b,R]);return{carouselCards:p,carouselHeadline:C,carouselDescription:f,carouselPickerTarget:b,setCarouselPickerTarget:v,handleCarouselCardUpdate:h,handleCarouselCardAdd:y,handleCarouselCardRemove:I,handleCarouselHeadlineChange:T,handleCarouselDescriptionChange:E,handleCarouselFileUpload:M,handleCarouselLibrarySelect:G}}let T={productFeeds:!0,campaignGoal:!0,conversionGoals:!0,targetCost:!0,budgetAndDates:!0,customerAcquisition:!1,euPoliticalAds:!0,locationLanguage:!1,locations:!0,languages:!0,devices:!1,adSchedule:!1,thirdPartyMeasurement:!1,campaignUrlOptions:!1,ipExclusions:!1};function E(){let[e,a]=(0,r.useState)(T);return{expandedSections:e,toggleSection:(0,r.useCallback)(e=>{a(a=>({...a,[e]:!a[e]}))},[])}}function w(e,a){return"CAMPAIGN_TOTAL"===e?a?"select_date":"ends_in":a?"select_date":"none"}function A(e){var a,t,i,l,n;let{campaign:o,merchantAccounts:s,updateCampaign:d}=e,u=function(e){if(e.demandGenCampaignGoal)return e.demandGenCampaignGoal;switch(e.biddingStrategy){case"MAXIMIZE_CLICKS":case"TARGET_CPC":return"clicks";case"MAXIMIZE_CONVERSION_VALUE":case"TARGET_ROAS":return"conversion_value";default:return"conversions"}}(o),c=(0,r.useCallback)(e=>{switch(e){case"conversions":case"youtube_engagements":d({demandGenCampaignGoal:e,biddingFocus:"CONVERSIONS",biddingStrategy:"MAX
1IMIZE_CONVERSIONS",targetCpc:void 0,maxCpcBidCeilingMicros:void 0,targetCpa:void 0,setTargetCpa:!1,targetRoas:void 0,setTargetRoas:!1});break;case"conversion_value":d({demandGenCampaignGoal:e,biddingFocus:"CONVERSION_VALUE",biddingStrategy:"MAXIMIZE_CONVERSION_VALUE",targetCpc:void 0,maxCpcBidCeilingMicros:void 0,targetCpa:void 0,setTargetCpa:!1,targetRoas:void 0,setTargetRoas:!1});break;case"clicks":d({demandGenCampaignGoal:e,biddingFocus:"CLICKS",biddingStrategy:"MAXIMIZE_CLICKS",targetCpc:void 0,maxCpcBidCeilingMicros:void 0,targetCpa:void 0,setTargetCpa:!1,targetRoas:void 0,setTargetRoas:!1})}},[d]),g=!!o.demandGenProductFeedsEnabled||!!o.demandGenMerchantCenterId,m=null!=(a=s.find(e=>e.id===o.demandGenMerchantCenterId))?a:null,p=(0,r.useCallback)(e=>{if(!e)return void d({demandGenProductFeedsEnabled:!1,demandGenMerchantCenterId:void 0});d({demandGenProductFeedsEnabled:!0})},[d]),C=(0,r.useCallback)(e=>{d({demandGenProductFeedsEnabled:!!e,demandGenMerchantCenterId:(null==e?void 0:e.id)||void 0})},[d]),f="clicks"===u?"TARGET_CPC"===o.biddingStrategy:"conversion_value"===u?"TARGET_ROAS"===o.biddingStrategy||!!o.setTargetRoas:"TARGET_CPA"===o.biddingStrategy||!!o.setTargetCpa,b="clicks"===u?o.targetCpc:"conversion_value"===u?o.targetRoas:o.targetCpa,v=(0,r.useCallback)(e=>{e?"clicks"===u?d({biddingStrategy:"TARGET_CPC",targetCpa:void 0,setTargetCpa:!1,targetRoas:void 0,setTargetRoas:!1,maxCpcBidCeilingMicros:void 0}):"conversion_value"===u?d({biddingStrategy:"TARGET_ROAS",targetCpc:void 0,setTargetCpa:!1,targetCpa:void 0,maxCpcBidCeilingMicros:void 0,setTargetRoas:!0}):d({biddingStrategy:"TARGET_CPA",targetCpc:void 0,maxCpcBidCeilingMicros:void 0,setTargetCpa:!0,targetRoas:void 0,setTargetRoas:!1}):d({biddingStrategy:"clicks"===u?"MAXIMIZE_CLICKS":"conversion_value"===u?"MAXIMIZE_CONVERSION_VALUE":"MAXIMIZE_CONVERSIONS",targetCpa:void 0,setTargetCpa:!1,targetCpc:void 0,maxCpcBidCeilingMicros:void 0,targetRoas:void 0,setTargetRoas:!1})},[u,d]),h=(0,r.useCallback)(e=>"clicks"===u?void d({targetCpc:e}):"conversion_value"===u?void d({targetRoas:e}):void d({targetCpa:e}),[u,d]),y=(0,r.useMemo)(()=>new Date,[]),k="CAMPAIGN_TOTAL"===o.budgetType?"campaign_total":"daily",[I,T]=(0,r.useState)(()=>w(o.budgetType,o.endDate)),[E,A]=(0,r.useState)("2_weeks");(0,r.useEffect)(()=>{o.startDate||d({startDate:y})},[o.startDate,y,d]),(0,r.useEffect)(()=>{T(w(o.budgetType,o.endDate))},[o.budgetType,o.endDate]);let S=(0,r.useCallback)(e=>{d({budgetType:"daily"===e?"DAILY":"CAMPAIGN_TOTAL"})},[d]),R=(0,r.useCallback)(e=>{d({budgetAmount:e})},[d]),M=(0,r.useCallback)(e=>{d({startDate:e})},[d]),G=(0,r.useCallback)(e=>{d({endDate:e})},[d]),L=(0,r.useCallback)(e=>{T(e),"none"===e&&d({endDate:void 0})},[d]),_=(0,r.useCallback)(e=>{d({onlyBidForNewCustomers:e})},[d]),U=!!o.demandGenUseCampaignLevelTargeting,P="PRESENCE"===o.locationTargetingPresence?"presence":"presence_or_interest",N=(0,r.useCallback)(e=>{d({demandGenUseCampaignLevelTargeting:e})},[d]),O=(0,r.useCallback)(e=>{d({locationTargetingPresence:"presence"===e?"PRESENCE":"PRESENCE_OR_INTEREST"})},[d]),D=null!=(t=o.demandGenDeviceTargetingMode)?t:"all",x=null!=(i=o.demandGenSelectedOperatingSystems)?i:[],q=(0,r.useCallback)(e=>{d({demandGenDeviceTargetingMode:e})},[d]),B=(0,r.useCallback)(e=>{d({demandGenSelectedOperatingSystems:e})},[d]),V=(null!=(l=o.ipExclusions)?l:[]).join("\n"),j=(0,r.useCallback)(e=>{d({ipExclusions:e.split(/[\n,]/).map(e=>e.trim()).filter(Boolean)})},[d]);return{campaignGoal:{value:u,set:c},productFeeds:{enabled:g,setEnabled:p,selectedAccount:m,setSelectedAccount:C},targetCost:{enabled:f,value:b,handleEnabledChange:v,handleValueChange:h},budget:{type:k,amount:o.budgetAmount,startDate:null!=(n=o.startDate)?n:y,endDate:o.endDate,endDateOption:I,endsInValue:E,setEndDateOption:L,setEndsInValue:A,handleTypeChange:S,handleAmountChange:R,handleStartDateChange:M,handleEndDateChange:G},customerAcquisition:{onlyNewCustomers:!!o.onlyBidForNewCustomers,handleOnlyNewCustomersChange:_},locationLanguage:{useCampaignLevel:U,setUseCampaignLevel:N,presenceType:P,setPresenceType:O},devices:{mode:D,setMode:q,selectedOS:x,setSelectedOS:B},ipExclusions:{ipAddresses:V,handleChange:j}}}},19126:(e,a,t)=>{t.d(a,{Lq:()=>i,Pr:()=>l,uj:()=>function e(a){if(!a||"object"!=typeof a)return;if("string"==typeof a.resourceName)return a.resourceName;let t=e(a.entity);if(t)return t;let r=e(a.data);if(r)return r}});let r={maxBytes:5242880,minWidth:128,minHeight:128,aspectRatio:1,aspectRatioTolerance:.01};function i(e){return new Promise((a,t)=>{let r=new Image;r.onload=()=>
1{let e=r.naturalWidth,i=r.naturalHeight;if(e>0&&i>0)return void a({width:e,height:i});t(Error("Image loaded without readable dimensions"))},r.onerror=()=>t(Error("Image failed to load")),r.src=e})}function l(e){let{width:a,height:t,sizeBytes:i}=e;if(i>r.maxBytes)return{valid:!1,message:"Logo is too large: Google allows logos up to 5 MB. This file is ".concat(i<=0xa00000?"".concat(Math.ceil(i/1024)," KB"):"".concat((i/1048576).toFixed(1)," MB"),".")};return a<r.minWidth||t<r.minHeight?{valid:!1,message:"Logo is too small: Google requires at least 128 x 128 px. This file is ".concat(a," x ").concat(t," px.")}:Math.abs(a/t-r.aspectRatio)>r.aspectRatioTolerance?{valid:!1,message:"Logo must be square (1:1). This file is ".concat(a," x ").concat(t," px.")}:{valid:!0}}},97072:(e,a,t)=>{function r(e,a){return{"Content-Type":"application/json",...a?{Authorization:"Bearer ".concat(a)}:{},...(null==e?void 0:e.organizationId)?{"X-Organization-Id":e.organizationId}:{},...(null==e?void 0:e.customerId)?{"X-Customer-Id":e.customerId}:{},...(null==e?void 0:e.managerCustomerId)?{"X-Login-Customer-Id":e.managerCustomerId}:{}}}function i(e){return new Promise((a,t)=>{let r=new FileReader;r.onload=()=>a(r.result.split(",")[1]),r.onerror=t,r.readAsDataURL(e)})}t.d(a,{Bb:()=>function e(a){if(a&&"object"==typeof a)for(let t of["reason","message","error","remediation"]){let r=a[t];if("string"==typeof r&&r.trim().length>0)return r;let i=e(r);if(i)return i}},bB:()=>i,qg:()=>r})}}]);

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