1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8796],{95645:function(e,t,n){n.d(t,{i:function(){return a}});var r=n(91039);let a={config:n(69517).s,url:"/audiences"},i=async(e,t)=>{let n=t?"/v2".concat(a.url):a.url;return r.ZP.get({...a,url:n,params:e})};t.Z=i},58570:function(e,t,n){n.d(t,{i:function(){return a}});var r=n(91039);let a={config:n(69517).s,url:"/v2/audiences/public"},i=async e=>r.ZP.get({...a,params:e});t.Z=i},8911:function(e,t,n){n.d(t,{l4:function(){return A},I:function(){return T}});var r=n(85893),a=n(95639),i=n(19663),l=n(25784),c=n(89587),u=n(56819);let{CANCEL:s}=i.default.COMMON,o=e=>{let{spacing:t,palette:n,breakpoints:r}=e;return{marginRight:t(2),color:n.primary.main,[r.down(r.values.sm)]:{color:n.text.secondary}}};var d=e=>{let{disabled:t,onClose:n}=e,{isMobile:i}=(0,l.Z)();return i?(0,r.jsx)(c.Z,{disabled:t,onClick:n,sx:o,children:(0,r.jsx)(a.Z,{})}):(0,r.jsx)(u.Z,{disabled:t,tertiary:!0,onClick:n,sx:o,children:s})},m=n(67294),f=n(97365),p=n(55157),y=n(62803),S=n(619);let E=()=>({alignItems:"center",spacing:2,padding:e=>e.spacing(2)}),Z=e=>{let{breakpoints:t}=e;return{display:"flex",justifyContent:"space-between",flexDirection:"row",[t.only("xs")]:{flexDirection:"column"}}},g={mr:e=>"-".concat(e.spacing(3)),ml:e=>"-".concat(e.spacing(3))},v=e=>({display:"flex",alignItems:"center",gap:e.spacing(1),justifyContent:"space-between"});var A=e=>{let{title:t,actions:n,onCancel:a,isCloseDisabled:i,sx:l}=e,c=(0,m.useMemo)(()=>n.map(e=>{let{Component:t,label:n,propsComponent:a,onClick:i}=e;return t?(0,r.jsx)(t,{...a}):(0,m.createElement)(u.Z,{secondary:!0,...a,key:n,onClick:i},n)}),[n]);return(0,r.jsxs)(f.Z,{sx:l,children:[(0,r.jsx)(f.Z,{sx:E,children:(0,r.jsxs)(f.Z,{sx:Z,children:[(0,r.jsx)(y.ZP,{noMarginBottom:!0,textvariant:"h5",children:t}),(0,r.jsxs)(f.Z,{sx:v,children:[(0,r.jsx)(S.Z,{isPrimaryIcon:!0}),(0,r.jsx)(d,{onClose:a,disabled:i}),(0,r.jsx)(f.Z,{children:c})]})]})}),(0,r.jsx)(p.Z,{sx:g})]})},L=n(79328),P=n(80483);let I=e=>{let{spacing:t,palette:n,breakpoints:r}=e;return{marginRight:t(2),color:n.primary.main,[r.down(r.values.sm)]:{color:n.text.secondary}}},{COMMON:{SAVE_AS_DRAFT:C}}=L.T;var T=e=>{let{onClick:t,isSubmitting:n}=e,{isMobile:a}=(0,l.Z)();return a?(0,r.jsx)(c.Z,{sx:I,onClick:t,disabled:n,children:(0,r.jsx)(P.Z,{})}):(0,r.jsx)(u.Z,{secondary:!0,sx:I,onClick:t,disabled:n,children:C})}},65898:function(e,t,n){n.d(t,{Z:function(){return L}});var r=n(85893),a=n(38296),i=n(76258),l=n(19663),c=n(65389),u=n(74478),s=n(66628),o=n(42042),d=n(94974),m=n(19738);let{COMMON:f,DIALOGS:{NEW_CAMPAIGN_ADVERTISER:p}}=l.default,{DIALOG:{ACTIONS:y},DIALOGS:S}=i.default,{ADVERTISER_KEYS:E}=s.default.campaigns,{ADVERTISER:Z}=E,g=S.NEW_CAMPAIGN_ADVERTISER,v=Object.entries(a.iab_categories).map(e=>{let[t,n]=e,[r,a]=n.split(" > ");return{label:r,sublabel:a,value:t}}),A=[{name:"name",type:m.FIELD_TYPES.INPUT,label:"Name",lgSize:6,mdSize:6,smSize:12,required:!0},{name:"domain",type:m.FIELD_TYPES.INPUT,label:"Domain",lgSize:6,mdSize:6,smSize:12,required:!0},{name:"iab_category",type:m.FIELD_TYPES.AUTOCOMPLETE,options:v,label:"Category",lgSize:6,mdSize:6,smSize:12,filterOptions:(e,t)=>{let{inputValue:n}=t,r=n.toLowerCase();return e.filter(e=>{var t;return e.label.toLowerCase().includes(r)||(null==e?void 0:null===(t=e.sublabel)||void 0===t?void 0:t.toLowerCase().includes(r))})},required:!0},{name:"sensitive_content",type:m.FIELD_TYPES.SWITCH,label:"Sensitive content",lgSize:6,mdSize:6,smSize:12,defaultValue:!1}];var L=()=>{let e=(0,m.Gc)(),t=(0,o.D)(),n=()=>c.default.closeDialog(g),a=async r=>{try{let t=await u.ZP.addAdvertisers(r);null==e||e.setFieldValue(Z,t.event_id),n()}catch(e){t.error({error:e})}},i=[{label:f.CREATE,form:g,type:y.TYPE.SUBMIT},{label:f.CANCEL,onClick:n,type:y.TYPE.RESET}];return(0,r.jsx)(d.Z,{title:p.TITLE,actions:i,formContent:A,formId:g,onSubmit:a})}},37439:function(e,t,n){n.d(t,{Z:function(){return E}});var r=n(85893),a=n(76258),i=n(19663),l=n(65389),c=n(90979),u=n(42042),s=n(94974),o=n(19738);let{COMMON:d,DIALOGS:{NEW_CAMPAIGN_DEAL:m}}=i.default,{DIALOG:{ACTIONS:f},DIALOGS:p}=a.default,y=p.NEW_CAMPAIGN_DEAL,S=[{name:"name",type:o.FIELD_TYPES.INPUT,label:"Name",lgSize:6,mdSize:6,smSize:12,required:!0},{name:"key",type:o.FIELD_TYPES.INPUT,label:"ID",lgSize:6,mdSize:6,smSize:12,required:!0}];var E=e=>{let{onNewDeal:t,open:n,onClose:a}=e,i=(0,u.D)(),o=e=>{null==a||a(null!=e?e:{},"backdropClick"),l.default.closeDialog(y)},p=async e=>{try{let n=await c.ZP.add(e);i.success({message:m.SUCCESS}),o(),null==t||t(n)}catch(e){i.error({error:e})}},E=[{label:d.CREATE,form:y,type:f.TYPE.SUBMIT},{label:d.CANCEL,onClick:o,type:f.TYPE.RESET}];return(0,r.jsx)(s.Z,{open:n,title:m.TITLE,actions:E,formContent:S,fullWidth:!0,formId:y,onSubmit:p})}},5469:function(e,t,n){n.d(t,{Z:function(){return U}});var r=n(85893),a=n(19663),i=n(76258),l=n(94974),c=n(65389),u=n(19287),s=n(42042),o=n(34727),d=n(79328),m=n(66628),f=n(19738),p=n(68151),y=n(2913);
1let{DIALOGS:{NEW_GEOLIST:S}}=d.T,{CITIES:E,COUNTRIES:Z,FILE:g,GEOLOCATION_AREAS:v,NAME:A,PRECISION:L,RADIUS:P,REGIONS:I}=o.NEW_GEOLIST_FORM_KEYS,{AREAS_MAP:C,INPUT:T,RADIO_GROUP:O,SLIDER:_,UPLOAD_INPUT:b}=f.FIELD_TYPES,x=Object.entries(d.C.PRECISION_OPTIONS).map(e=>{let[t,n]=e;return{label:n,value:t}}),z=(0,r.jsxs)(r.Fragment,{children:[S.UPLOAD.DESCRIPTION," ",(0,r.jsx)(p.Z,{color:"secondary",href:"/documents/us_retail areas.csv",target:"_blank",underline:"hover",children:"Use this template"})]}),N=[{name:A,type:T,label:S.LABEL_NAME,required:!0,lgSize:4,mdSize:4,smSize:8,xsSize:12},{name:L,type:O,ariaLabel:"radio-group-precision",label:S.PRECISION.LABEL,options:x,lgSize:4,mdSize:4,smSize:4,xsSize:12,row:!0},{name:P,type:_,label:S.LABEL_RADIUS_MAP,min:100,max:1e4,lgSize:4,mdSize:4,smSize:12,xsSize:12,parser:{dependencies:[P],parse:(e,t)=>{let n=(0,f.NA)(P,t);return{...e,valueLabelFormat:"".concat(n," meters")}}}},m.default.templates.countriesAutocomplete({name:Z,label:S.LABEL_COUNTRY,required:!0,lgSize:4,mdSize:12,smSize:12,xsSize:12}),m.default.templates.regionsAutocomplete({name:I,label:S.LABEL_REGION,countriesFieldName:Z,lgSize:4,mdSize:6,smSize:6,xsSize:12}),m.default.templates.citiesAutocomplete({name:E,label:S.LABEL_CITY,countriesFieldName:Z,regionsFieldName:I,lgSize:4,mdSize:6,smSize:6,xsSize:12}),{name:g,type:b,text:S.UPLOAD.LABEL,description:z,format:"application/json, text/csv",size:12},{name:v,type:C,points:[],size:12,minRadius:100,maxRadius:1e4,parser:{dependencies:[E,Z,g,P,I],parse:y.Z},consolidation:{dependencies:[P],consolidate:async e=>{let t=(0,f.NA)(P,e),n=(0,f.NA)(v,e);return n&&n.length&&n.map(e=>({...e,radius:t}))}}}],{COMMON:w,DIALOGS:{NEW_GEOLIST:h}}=a.default,{DIALOG:{ACTIONS:D},DIALOGS:M}=i.default,R=M.NEW_GEOLIST,j={precision:"low",radius:i.default.GEOLIST.DEFAULT_RADIUS},G=e=>({areas:e.areas,cities:e.cities,countries:e.countries,name:e.name,precision:e.precision,regions:e.regions,file:e.file});var U=e=>{let{onAddGeolist:t}=e,n=(0,s.D)(),a=()=>c.default.closeDialog(R),i=async e=>{try{let r=G(e),i=await u.ZP.add(r);a(),n.success({message:h.SUCCESS_CREATION_MESSAGE}),t&&t(i)}catch(e){n.error({error:e})}},o=[{label:w.CREATE,form:R,type:D.TYPE.SUBMIT},{label:w.CANCEL,onClick:a,type:D.TYPE.RESET}];return(0,r.jsx)(l.Z,{title:h.TITLE,formId:R,actions:o,formContent:N,onSubmit:i,fullWidth:!0,maxWidth:"md",initialValues:j})}},2913:function(e,t,n){var r=n(54215);let{CITIES:a,COUNTRIES:i,FILE:l,RADIUS:c,REGIONS:u}=n(34727).NEW_GEOLIST_FORM_KEYS;t.Z=(e,t)=>{let{[a]:n,[i]:s,[l]:o,[c]:d,[u]:m}=t,f=(0,r.$y)({countries:s,regions:m,cities:n});return{...e,file:o,points:f,radius:d}}},34727:function(e,t,n){n.d(t,{NEW_GEOLIST_FORM_KEYS:function(){return r}});let r={CITIES:"cities",COUNTRIES:"countries",FILE:"file",GEOLOCATION_AREAS:"areas",NAME:"name",PRECISION:"precision",RADIUS:"radius",REGIONS:"regions"}},23410:function(e,t,n){n.d(t,{ZP:function(){return K}});var r={};n.r(r),n.d(r,{add:function(){return B},canAccessAudiences:function(){return G},download:function(){return h},get:function(){return z},getAudiencesSuscription:function(){return k},list:function(){return N},listAll:function(){return w},mutateListAudiences:function(){return x},remove:function(){return D},removeMany:function(){return M},update:function(){return R},updateMany:function(){return j},useAudience:function(){return U},useListAudiences:function(){return F}});var a={};n.r(a),n.d(a,{isAdsquare:function(){return W.Z},isDigiseg:function(){return q.Z},isNavegg:function(){return V.Z},isThirdPartyAudience:function(){return $.Z}});var i=n(91039),l=n(69517);let c={config:l.s,url:"/audience"},u=async e=>i.ZP.multipart({...c,params:e}),s=async e=>{i.ZP.openUrl({url:"".concat("/audience","/").concat(e,"/download"),params:{id:e,download:!0}})};var o=n(95645);l.s;let d=async e=>i.ZP.del({url:"".concat("/audience","/").concat(e)}),m={url:"/v2/audiences"},f=async e=>i.ZP.del({...m,config:{data:{ids:e}}}),p={config:l.s,url:"/audience"},y=async e=>{let{id:t,...n}=e;return i.ZP.multipart({method:"put",url:"".concat(p.url,"/").concat(t),params:n})},S=async e=>i.ZP.put({url:"/v2/audiences",params:e}),E={config:l.s,url:"/audience"},Z=async e=>i.ZP.get({...E,url:"".concat(E.url,"/").concat(e)});var g=n(58570);let v={create:u,download:s,get:Z,list:o.Z,listAll:g.Z,remove:d,removeMany:f,update:y,updateMany:S};var A=n(79328),L=n(34530),P=n(72266),I=n(66310),C=n(93902);let T=["type[isnt]".concat(A.C.AUDIENCE.TYPES.TIME_BASED),"type[isnt]".concat(A.C.AUDIENCE.TYPES.DOOH)].join(","),O=e=>{let t=(0,C.Xf)(null==e?void 0:e.filter);return{...e,filter:t?"".concat(T,",").concat(t):T}},_=e=>(0,P.CA)(t=>t.url==="audience/".concat(e)),b=e=>
1e.forEach(e=>_(e)),x=()=>(0,P.CA)(e=>e.url.includes(o.i.url)),z=async e=>{let t=await v.get(e);return(0,C.LZ)(t)},N=async e=>{let t=await v.list(e);return(0,C.LZ)(t)},w=async e=>{let t=await v.listAll(e);return(0,C.LZ)(t)},h=async e=>v.download(e),D=async e=>{let t=await v.remove(e);return x(),(0,C.LZ)(t)},M=async e=>{let t=await v.removeMany(e);return b(e),x(),(0,C.LZ)(t)},R=async e=>{let t=await v.update(e);return _(e.id),x(),(0,C.LZ)(t)},j=async e=>{let t=await v.updateMany(e);return(0,C.LZ)(t)},G=e=>{var t;let n=null!==(t=null!=e?e:I.Z.getSession())&&void 0!==t?t:null;return(0,L.QO)({resource:"access_resources_audiences",session:n})},U=e=>(0,P.ZP)({url:"audience/".concat(e.id)}),F=e=>{let t=O(e),n=(0,C.rz)(t);return(0,P.ZP)({url:"/v2/audiences-all",params:n})},Y=e=>({label:e.name,value:e.id}),k=e=>({url:o.i.url,params:e,responseToOptions:e=>e.map(Y)}),B=async e=>{let t=await v.create(e);return x(),(0,C.LZ)(t)};var W=n(2750),q=n(93929),V=n(67702),$=n(83755);n(12577);var K={...r,...a}},2750:function(e,t){t.Z=e=>/adsquare/i.test(e.name)},93929:function(e,t){t.Z=e=>/digiseg/i.test(e.name)},67702:function(e,t){t.Z=e=>/navegg/i.test(e.name)},83755:function(e,t,n){var r=n(38296);t.Z=e=>Object.values(r.third_party_data_providers).some(t=>RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i").test(e.name))},12577:function(e,t,n){n.d(t,{Z:function(){return S}});var r=n(72266),a=n(91039),i=n(69517);let l={config:i.s,url:"/sync-audience"},c=async e=>a.ZP.post({...l,params:e}),u={config:i.s,url:"/sync-audience"},s=async e=>{let{id:t,...n}=e;return a.ZP.put({...u,url:"".concat(u.url,"/").concat(t),params:n})},o={config:i.s,url:"/sync-audience"},d=async e=>a.ZP.del({...o,url:"".concat(o.url,"/").concat(e)});var m=n(95645),f=n(93902);let p=e=>(0,r.CA)(t=>t.url==="sync-audience/".concat(e)),y=()=>(0,r.CA)(e=>e.url.includes(m.i.url));var S={update:async e=>{let t=await s(e);return p(e.id),y(),(0,f.LZ)(t)},remove:async e=>{let t=await d(e);return y(),(0,f.LZ)(t)},add:async e=>{let t=await c(e);return y(),(0,f.LZ)(t)},useAudience:e=>(0,r.ZP)({url:"sync-audience/".concat(e.id)})}},19287:function(e,t,n){n.d(t,{ZP:function(){return U}});var r={};n.r(r),n.d(r,{add:function(){return x},canAccessGeoLists:function(){return z},duplicate:function(){return N},fetch:function(){return C},geolistToOption:function(){return T},getListSuscription:function(){return O},list:function(){return w},mutateListGeolists:function(){return b},remove:function(){return h},removeMany:function(){return D},update:function(){return M},updateMany:function(){return R},useGeolist:function(){return j},useListGeolists:function(){return G}});var a=n(38296),i=n(34530),l=n(72266),c=n(91039),u=n(69517);let s={config:u.s,url:"/geolists"},o={config:u.s,url:"/geolist"};var d=async e=>c.ZP.post({url:"v2".concat(o.url),params:e}),m=async e=>c.ZP.post({url:o.url,params:e}),f=async e=>c.ZP.get({url:"".concat(o.url,"/").concat(e)}),p=async e=>c.ZP.get({...s,params:e}),y=async e=>c.ZP.del({url:"v2".concat(o.url,"/").concat(e)}),S=async e=>c.ZP.del({url:"v2".concat(s.url),config:{data:{ids:e}}}),E=async e=>{let{id:t}=e;return c.ZP.multipart({url:"v2".concat(o.url,"/").concat(t),params:e,method:"put"})},Z=async e=>c.ZP.put({url:"v2".concat(s.url),params:e}),g=n(66310),v=n(25915),A=n(93902),L=n(19663),P=e=>{let{id:t,name:n,...r}=e||{};return{name:"".concat(L.default.COMMON.PREFFIX).concat(n),...r}};let I=async e=>{let{file:t,areas:n}=e;if(!t||Array.isArray(t)&&!t.length)return n;let r=Array.isArray(t)?t[0]:t;return[...n||[],...await (0,v.eu)({file:r})]},C=async e=>{let t=await f(e);return(0,A.LZ)(t)},T=e=>{let t=e.countries.length?e.countries.map(e=>a.countries[e]):[],n=t.length&&e.items,r=e.items||null,i=r?"".concat(r," ").concat(e.items>1?"areas":"area"):"";return{label:e.name,value:e.id,sublabel:"".concat(t.join(" ")).concat(n?" | ":"").concat(i)}},O=e=>({url:s.url,params:e,responseToOptions:e=>e.map(T)}),_=e=>(0,l.CA)(t=>t.url==="".concat(o.url,"/").concat(e)),b=()=>(0,l.CA)(e=>e.url.includes(s.url)),x=async e=>{let{file:t,...n}=e,r=await I({file:t,areas:e.areas}),a=await d({...n,areas:r});return b(),(0,A.LZ)(a)},z=e=>{var t;let n=null!==(t=null!=e?e:g.Z.getSession())&&void 0!==t?t:null;return(0,i.QO)({resource:"access_resources_geolists",session:n})},N=async e=>{let t=P(e),n=await m(t);return b(),(0,A.LZ)(n)},w=async e=>{let t=await p(e);return t&&"data"in t?t.data:t},h=async e=>{let t=await y(e);return b(),(0,A.LZ)(t)},D=async e=>{let t=await S(e);return(0,A.LZ)(t)},M=async e=>{let t=await I({file:e.file,areas:e.areas}),n=await E({...e,...t&&{areas:t}});return _(e.id),b(),(0,A.LZ)(n)},R=async e=>{let t=await Z(e);return(0,A.LZ)(t)},j=e=>(0,l.ZP)({url:e.id?"".concat(o.url,"/").concat(e.id):null}),G=e=>(0,l.ZP)({url:"v2".concat(s.url),params:(0,A.rz)(e)});var U=r},54215:function(e,t,n){n.d(t,{ZP:function(){return d},$y:function(){return o}});var r={};n.r(r),n.d(r,{getPoints:function(){return s},getShapes:function(){return o}});var a=n(91039),i=async e=>{let{countries:t=[],regions:n=[],name:r=[]}=e||{};return Array.isArray(t)&&0===t.length||Array.isArray(r)&&0===r.length?[]:a.ZP.get({url:"/pois",params:{countries:t,regions:n,name:r}})},l=async e=>{let{codes:t=[]}=e||{};return a.ZP.get({url:"/pois/shapes",params:{code:t.map(e=>e)}})},c=n(99158);let u=e=>{let{countries:t,regions:n,cities:r}=e;if(null==r?void 0:r.length)return r;let a=[...t,...n];return a.filter(e=>!a.some(t=>t.startsWith("".concat(e,":"))))},s=async e=>{let t=await i(e);return(0,c.Z)(t)},o=async e=>{let t=u(e),n=await l({codes:t});return(0,c.Z)(n)};var d={...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.