PageSourceSearch

https://www.compraonline.alcampo.es/static/accessibility-settings-atWLIAl6.js

js alcampo.es collected 2026-09-25 04:48:34 UTC 3,708 bytes, 2 lines download raw bytes

1import{f as V,E as K,j as k,u as x}from"./4-vendor-DQt2o1hq.js";import{R as i,r as L}from"./0-vendor-react-CS_euKAN.js";import{a as M,b as z}from"./hooks-qE9p2NQe.js";import{b4 as B,_ as C,b5 as T,F as O,A as U,b6 as $,I as P,v as W,b7 as q,b8 as G,x as I,T as H}from"./index-MxSZxiXt.js";import{F as Q}from"./fetch-error-block-DiI7rQIc.js";import{B as J,U as R}from"./2-vendor-ecommerce-ihgBOKSo.js";import"./1-vendor-moment-BH_Rs02A.js";import"./3-vendor-optimizely-react-sdk-b0w5CiyS.js";const w=()=>async e=>{try{await e(B.getAccessibilitySettings())}catch(t){C.api.pushError(t instanceof Error?t:new Error(JSON.stringify(t)))}},X=e=>{const t=V.c(29),{defaultNotificationDuration:s}=e,{formatMessage:n}=K(),y=k(),p=M("account_settings_accessibility_update");let f;t[0]!==n?(f=d=>{const{string:F,duration:N,displayAsNumberOfSeconds:v}=d;return n(F,v?{notificationDuration:N}:void 0)},t[0]=n,t[1]=f):f=t[1];const a=f;let c;t[2]!==s||t[3]!==a?(c=(()=>{const F=T.find(N=>N.duration===s);return F?a(F):""})(),t[2]=s,t[3]=a,t[4]=c):c=t[4];let o;t[5]!==s||t[6]!==c?(o={name:c,value:s},t[5]=s,t[6]=c,t[7]=o):o=t[7];const m=o;let r;t[8]!==a?(r=T.map(d=>({name:a(d),value:d.duration})),t[8]=a,t[9]=r):r=t[9];const u=r,b=Y;let l;t[10]!==y||t[11]!==p?(l=async d=>{d.preventDefault();const F=d.currentTarget,N=new FormData(F),v=[{preferenceKey:$,preferenceValue:N.get("notification")?.toString()??null}];try{await p(async()=>{await y(B.updateAccessibilitySettings(v))})}catch{b("error");return}b("success"),await y(w())},t[10]=y,t[11]=p,t[12]=l):l=t[12];const A=l;let g;t[13]!==n?(g=n("settings.accessibility.notification.heading"),t[13]=n,t[14]=g):g=t[14];let E;t[15]!==g?(E={text:g,isVisuallyConcealed:!0},t[15]=g,t[16]=E):E=t[16];let S;t[17]!==m||t[18]!==u||t[19]!==E?(S=i.createElement(O.DropdownSelect,{options:u,name:"notification",label:E,defaultValue:m,"data-test":"notification-duration-select-test"}),t[17]=m,t[18]=u,t[19]=E,t[20]=S):S=t[20];let h;t[21]!==n?(h=n("settings.accessibility.update-details"),t[21]=n,t[22]=h):h=t[22];let D;t[23]!==h?(D=i.createElement(U,{intent:"primary",type:"submit",fill:!1,className:"salt-m-t--2"},i.createElement(U.Text,null,h)),t[23]=h,t[24]=D):D=t[24];let _;return t[25]!==A||t[26]!==D||t[27]!==S?(_=i.createElement(O,{"data-test":"accessibility-settings-form",onSubmit:A},S,D),t[25]=A,t[26]=D,t[27]=S,t[28]=_):_=t[28],_};function Y(e){P[e](`settings.accessibility.notification.update.${e}`)}const ot=()=>{const e=V.c(14),t=x(W),s=k(),n=x(q),{data:y,lastUpdated:p,isFetching:f,fetchError:a}=n,c=y[$]?.preferenceValue??G;let o;e[0]!==a||e[1]!==f?(o={journeyName:"account_settings_accessibility",isFetching:f,fetchError:a},e[0]=a,e[1]=f,e[2]=o):o=e[2],z(o);let m;e[3]!==s||e[4]!==t||e[5]!==p?(m=()=>{(!t||!p)&&s(w())},e[3]=s,e[4]=t,e[5]=p,e[6]=m):m=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=[],e[7]=r):r=e[7],L.useEffect(m,r);let u,b;e[8]===Symbol.for("react.memo_cache_sentinel")?(u={xs:12,sm:11,md:8,lg:4},b=i.createElement(H,{title:"settings.accessibility.title"}),e[8]=u,e[9]=b):(u=e[8],b=e[9]);let l;return e[10]!==c||e[11]!==s||e[12]!==a?(l=i.createElement(J,null,i.createElement(J.Item,{colSpan:u},b,a?i.createElement(Q,{action:()=>s(w())}):i.createElement(i.Fragment,null,i.createElement(R,{size:"l",bold:!0,className:"salt-m-b--2 salt-d--block"},i.createElement(I,{id:"settings.accessibility.notification.heading"})),i.createElement(R,{className:"salt-m-b--2 salt-d--block"},i.createElement(I,{id:"settings.accessibility.notification.description"})),i.createElement(X,{defaultNotificationDuration:c})))),e[10]=c,e[11]=s,e[12]=a,e[13]=l):l=e[13],l};export{ot as AccessibilitySettings};
2//# sourceMappingURL=accessibility-settings-atWLIAl6.js.map

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.