PageSourceSearch

https://www.dacia.fr/client/dacia-sso-consent-c9782fd9c4ba6b64.js

js dacia.fr collected 2026-09-24 09:34:55 UTC 6,627 bytes, 1 lines download raw bytes

1"use strict";(self.rspackChunkOne=self.rspackChunkOne||[]).push([[16370],{7478(e,r,t){var n=t(38337),s=t(33761);let l=(0,s.LW)(s.op.SUCCESS),i=(0,s.LW)(s.op.ERROR),a=[{value:"YES",text:(0,n.kH)("wording.yes")},{value:"NO",text:(0,n.kH)("wording.no")}];t.d(r,{},{CS:l,HP:"UNDEFINED",cz:a,xQ:i,z_:"PARTNERSHARING"})},65963(e,r,t){var n=t(91987),s=t(71763),l=t(50865),i=t(619),a=t(73437),c=t(38337);t.d(r,{},{T:({value:e,label:r,isLoading:t,onChange:l,onDelete:o})=>(0,n.jsx)("div",{className:"ProfileSection__line",children:t?(0,n.jsx)(i.E,{isAbsolute:!0}):(0,n.jsxs)(s.Fragment,{children:[(0,n.jsxs)("div",{className:"ProfileSection__lineInfo",children:[(0,n.jsx)("h4",{className:"ProfileSection__lineTitle",children:r}),(0,n.jsx)("p",{className:"ProfileSection__lineValue",children:e||"---"})]}),(0,n.jsxs)("div",{className:"ProfileSection__actions",children:[l&&(0,n.jsx)(a.l,{variant:"link-hyper",useButtonMarkup:!0,onClick:l,children:(0,c.kH)("wording.changeCTA")}),o&&(0,n.jsx)(a.l,{variant:"link-hyper",useButtonMarkup:!0,onClick:o,children:(0,c.kH)("wording.deleteCTA")})]})]})}),r:({title:e,description:r,children:t,onChange:s,onAdd:i})=>(0,n.jsxs)("section",{className:"ProfileSection",children:[e&&(0,n.jsxs)("h3",{className:"ProfileSection__title",children:[e," ",s&&(0,n.jsx)(a.l,{variant:"link-hyper",useButtonMarkup:!0,onClick:s,size:"large",children:(0,c.kH)("wording.changeCTA")}),i&&(0,n.jsx)(a.l,{variant:"link-hyper",useButtonMarkup:!0,onClick:i,size:"large",children:(0,c.kH)("wording.addCTA")})]}),r&&(0,n.jsx)(l.d,{className:"ProfileSection__description",content:r}),(0,n.jsx)("div",{className:"ProfileSection__content",children:t})]})})},78990(e,r,t){t.r(r),t.d(r,{default:()=>g});var n=t(91987),s=t(71763),l=t(20496),i=t(61124),a=t(83680),c=t(93196),o=t(32464),d=t(9897),u=t(90939),S=t(7478),_=t(65963),p=t(50865),h=t(16383),O=t(73437),m=t(38337),C=t(22117),N=t(33761),A=t(1842),x=t(86710);let f={setNotification:A.G,updateConsent:x.M},k=(0,l.Ng)(null,f)(({agreement:e,dissociateLabel:r,setNotification:t,updateConsent:l,scopes:i})=>{let[a,c]=(0,s.useState)(!1),[o,d]=(0,s.useState)(!1),[u,_]=(0,s.useState)(!0);if(!e)return null;let{agreementType:A,agreementScopes:x,agreementRecipient:f,description:k,title:g,image:v}=e||{},j=async()=>{c(!0);try{await l({path:"digitalAgreements",agreements:[{agreementType:A,agreementRecipient:f,agreementScopes:x,agreementValue:!1,agreementSource:"ONE"}]})||(_(!1),t({emitter:"profile.consent.my",level:N.op.SUCCESS,message:S.CS}))}catch(e){d(!0),t({emitter:"profile.consent.my",level:N.op.ERROR,message:S.xQ})}finally{c(!1)}};return u?(0,n.jsxs)("section",{className:"SSOConsentBlock",children:[v&&Object.keys(v).length>0&&(0,n.jsx)("div",{className:"SSOConsentBlock__logo",children:(0,n.jsx)(h._,{src:v,alt:g||"",width:"100%",aspectRatio:"1"})}),(0,n.jsxs)("div",{className:"SSOConsentBlock__sectionContent",children:[(0,n.jsx)("div",{className:"SSOConsentBlock__sectionTitle",children:g}),(0,n.jsx)(p.d,{className:"SSOConsentBlock__sectionDescription",content:k}),o&&(0,n.jsx)("p",{className:"SSOConsentBlock__error",children:(0,m.kH)("wording.error.generic")}),(0,n.jsx)(C.A,{params:x,scopes:i})]}),!!r&&(0,n.jsx)("div",{className:"SSOConsentBlock__sectionFooter",children:(0,n.jsx)(O.l,{variant:"cta-primary",onClick:j,isLoading:a,useButtonMarkup:!0,children:r})})]}):null}),g=(0,l.Ng)(({profile:e})=>({country:(e.country||"").toUpperCase()}))(({title:e,bodyCopy:r,country:t,dissociateLabel:l,editContext:p,partnersConsent:h,scopes:O})=>{let m=(0,s.useMemo)(()=>(0,o.Hj)(h)||[],[h]),[C,N]=(0,s.useState)([]),[{response:A,isLoading:x},f]=(0,d.A)({afterMount:!0}),g=(0,s.useCallback)(async()=>{try{await f({method:"get",url:(0,u.A)("/wired/commerce/v1/persons/current?country={country}",{country:t})})}catch(e){}},[t,f]);return(0,s.useEffect)(()=>{A?N((A.data?.digitalAgreements||[]).filter(({agreementType:e})=>e===S.z_).map(e=>{let{agreementRecipient:r}=e,{title:t,description:n,image:s}=m.find(({clientId:e})=>e===r)||{};return{...e,title:t,description:n,image:s}}).filter(e=>!!e.title&&!!e.description&&!0===e.agreementValue).sort(({title:e=""},{title:r=""})=>e<r?-1:1)):g()},[g,m,A]),(0,n.jsxs)(i.G,{variant:"extended-bg-alternative",children:[(0,n.jsx)(_.r,{title:e,description:r,children:(0,n.jsx)("div",{className:"SSOConsent",children:x?(0,n.jsx)(a.l,{size:"xsmall"}):C.map(e=>(0,n.jsx)(k,{agreement:e,dissociateLabel:l,scopes:O},e.title))})}),(0,n.jsx)(c.Cq,{editContext:p,displayEditionZone:!0})]})})},86710(e,r,t){var n=t(84759),s=t(84315);t.d(r,{},{M:({path:e,agreements:r})=>async(t,l,{axios:i})=>
1{t({type:s.z.UPDATING_CONSENT});let a=l(),c=a.profile?.personId||"",o=a.profile?.country||"",d=(0,n.sB)(`/wired/commerce/v1/persons/${c}`,{country:o});try{return await i.patch(d,[{op:"replace",path:e,value:r}]),null}catch(r){let e;return t((e=r.response?.data||{},{type:s.z.UPDATE_CONSENT_FAILED,payload:e})),r}}})},22117(e,r,t){var n=t(91987);let s=["email","lang","basic","contact","addresses","vehicle","vehicleDetails"];t.d(r,{},{A:({params:e=[],scopes:r})=>{let t=Array.from(new Set(e)),l=[...s.filter(e=>t.includes(e)),...t.filter(e=>!s.includes(e))],i=l?.filter(e=>r?.[e])?.map(e=>r?.[e])?.join(", ");return i?(0,n.jsxs)("div",{className:"InfoSharedBlock",children:[(0,n.jsx)("div",{className:"InfoSharedBlock__title",children:r?.title}),(0,n.jsx)("div",{className:"InfoSharedBlock__scopes",children:i})]}):null}})},9897(e,r,t){var n=t(71763),s=t(48412);let l={isLoading:void 0,response:void 0,error:void 0};t.d(r,{},{A:({afterMount:e=!1,returnPromise:r=!1,...t}={})=>{let i=(0,n.useRef)(void 0),a=(0,n.useRef)(!1),c=(0,n.useRef)(t),[o,d]=(0,n.useReducer)((e,r)=>{switch(r.type){case"AXIOS_HOOK_ACTIONS_START":return{...e,isLoading:!0};case"AXIOS_HOOK_ACTIONS_END":return{...e,isLoading:!1,response:r.payload,error:r.error};case"AXIOS_HOOK_ACTIONS_RESET":return l;default:return e}},l),u=(0,n.useCallback)(async(e,t)=>{let n=new AbortController;t?.abort(),i.current=n;try{d({type:"AXIOS_HOOK_ACTIONS_START"});let t=await (0,s.A)({...e,signal:i.current?.signal});return r?d({type:"AXIOS_HOOK_ACTIONS_END"}):d({type:"AXIOS_HOOK_ACTIONS_END",payload:t}),t}catch(e){if(a.current&&s.A.isAxiosError(e)&&(r?d({type:"AXIOS_HOOK_ACTIONS_END"}):d({type:"AXIOS_HOOK_ACTIONS_END",error:e})),r)throw e;return}},[r]),S=(0,n.useCallback)(()=>{i.current?.abort(),i.current=new AbortController,d({type:"AXIOS_HOOK_ACTIONS_RESET"})},[]);return(0,n.useEffect)(()=>(e&&!a.current&&(i.current=new AbortController,u(c.current,i.current)),a.current=!0,()=>{a.current=!1,i.current?.abort()}),[e,u]),[o,(0,n.useCallback)(e=>u({...c.current,...e},i.current),[]),S]}})}}]);

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.