PageSourceSearch

https://customers.verisure.com.ar/3.5.0/static/js/4147.c516d0f9.chunk.js

js verisure.com.ar collected 2026-10-06 15:05:21 UTC 9,188 bytes, 14 lines download raw bytes

1"use strict";(globalThis.webpackChunkverisure_owa=globalThis.webpackChunkverisure_owa||[]).push([[4147],{68501(e,t,n){n.d(t,{I9:()=>r,T2:()=>d,Ud:()=>S,Up:()=>s,ad:()=>g,f2:()=>c,gZ:()=>y,xS:()=>E,yE:()=>u,yp:()=>m});var o=n(61884),i=n(82495),l=n(48163);const s=(e,t)=>{const n={[i.ol.MAIN]:{[i.Yk.ARM_TOTAL]:(0,o.t)("SystemConfig.EntryExitTime.armTotal.label"),[i.Yk.ARM_PARTIAL]:(0,o.t)("SystemConfig.EntryExitTime.armPartial.label"),[i.Yk.ARM_PET]:(0,l.Vj)()},[i.ol.PERIMETRAL]:{[i.Yk.ARM_PERIMETER]:(0,o.t)("SystemConfig.EntryExitTime.perimetral.label")},[i.ol.ANNEX]:{[i.Yk.ARM_ANNEX]:(0,o.t)("SystemConfig.EntryExitTime.annex.label")}};return n[e]&&n[e][t]||""},d=e=>{let{partitions:t,entryTimeTotalMode:n,exitTimeTotalMode:o}=e;const l=t.find(e=>e.id===i.ol.MAIN).armModes.find(e=>e.id===i.Yk.ARM_TOTAL),s=n||l.entryTime,d=o||l.exitTime;return t.map(e=>({...e,armModes:e.armModes.map(e=>({...e,entryTime:s,exitTime:d}))}))},r=e=>{let{partitions:t,time:n,key:o,partitionId:i,armModeId:l}=e;const s=t.findIndex(e=>e.id===i),d=t[s],r=d.armModes,a=r.findIndex(e=>e.id===l),u=r[a],c=r.slice(0,a).concat({...u,[o]:n},r.slice(a+1));return t.slice(0,s).concat({...d,armModes:c},t.slice(s+1))},a=["beepsEntryExitFeedbackDb","soundsDb","voiceDb"],u=[{type:"ENTRY_EXIT_SOUNDS",id:"beepsEntryExitFeedbackDb",title:(0,o.t)("SVK.SoundSettings.entryExit.title"),description:(0,o.t)("SVK.SoundSettings.entryExit.description"),options:[{key:"low",text:(0,o.t)("SVK.SoundSettings.entryExit.low.label"),value:62},{key:"medium",text:(0,o.t)("SVK.SoundSettings.entryExit.medium.label"),value:70},{key:"loud",text:(0,o.t)("SVK.SoundSettings.entryExit.loud.label"),value:77},{key:"veryLoud",text:(0,o.t)("SVK.SoundSettings.entryExit.veryLoud.label"),value:85}]},{type:"GENERAL_SOUNDS",id:"soundsDb",title:(0,o.t)("SVK.SoundSettings.generalSounds.title"),description:(0,o.t)("SVK.SoundSettings.generalSounds.description"),options:[{key:"low",text:(0,o.t)("SVK.SoundSettings.entryExit.low.label"),value:62},{key:"medium",text:(0,o.t)("SVK.SoundSettings.entryExit.medium.label"),value:70},{key:"loud",text:(0,o.t)("SVK.SoundSettings.entryExit.loud.label"),value:77},{key:"veryLoud",text:(0,o.t)("SVK.SoundSettings.entryExit.veryLoud.label"),value:85}]},{type:"VOICE_VOLUME",id:"voiceDb",title:(0,o.t)("SVK.SoundSettings.voiceVolume.title"),description:(0,o.t)("SVK.SoundSettings.voiceVolume.description"),options:[{key:"low",text:(0,o.t)("SVK.SoundSettings.entryExit.low.label"),value:67},{key:"medium",text:(0,o.t)("SVK.SoundSettings.entryExit.medium.label"),value:75},{key:"loud",text:(0,o.t)("SVK.SoundSettings.entryExit.loud.label"),value:82},{key:"veryLoud",text:(0,o.t)("SVK.SoundSettings.entryExit.veryLoud.label"),value:90}]}],c=e=>a.reduce((t,n)=>(t[n]=e[n],t),{}),S=(e,t)=>Object.keys(t).filter(n=>{const o=e[n],i=t[n];return!(!o||!i)&&a.some(e=>String(o[e])!==String(i[e]))}),E=(e,t,n)=>{const o=e[t];if(!o||void 0===o[n])return;const i=u.find(e=>e.id===n);if(!i)return;const l=i.options.find(e=>e.value===o[n]);return l?l.key:void 0},m=e=>{var t,n,o;const i=((null===e||void 0===e||null===(t=e.graphQLErrors)||void 0===t||null===(n=t[0])||void 0===n||null===(o=n.data)||void 0===o?void 0:o.url)||"").match(/\/node\/(VV\d+)/);return null===i||void 0===i?void 0:i[1]},v=(e,t)=>e.filter(e=>e.success).map(e=>{var n;return null===(n=t.find(t=>t.zoneId===e.zoneId))||void 0===n?void 0:n.name}).filter(Boolean).join(", "),g=(e,t,n)=>{const i=n.length,l=e.filter(e=>e.success).length,s=e.filter(e=>!e.success).length,d=(1===i?e[0].success:0===s)?"completed":"error";let r;if(1===i){const i=t.find(e=>e.zoneId===n[0]);r=e[0].success?(0,o.t)("SVK.SystemSettings.soundVolumeChanged.message",{device:(null===i||void 0===i?void 0:i.name)||""}):(0,o.t)("SVK.SystemSettings.soundVolumeChanged.error")}else r=0===l?(0,o.t)("SVK.SystemSettings.soundVolumeChanged.error"):(0,o.t)("SVK.SystemSettings.soundVolumeChanged.message",{device:v(e,t)});return{type:d,title:r}},y=(e,t)=>{const n=u.find(t=>t.id===e);if(!n||null==t)return null;const o=Number(t),i=n.options.find(e=>Number(e.value)===o);return null!==i&&void 0!==i?i:null}},14147(e,t,n){n.r(t),n.d(t,{default:()=>N});var o=n(5247),i=n(43433),l=n(69884),s=n(61884),d=n(99547),r=n(77080),a=n(54848),u=n(68501);const c="LvEpSK",S="ShB7Is",E="UgmeXI",m="fP2EBf",v="kujzxQ";var g=n(51367);const y=e=>{let{children:t}=e;return(0,g.jsx)(g.Fragment,{children:t})},x=e=>{let{device:t,index:n,isExpanded:o,editedConfig:i,onConfigChange:l,idOwa:s}=e;const{zoneId:d,id:v,name:x}=t;return(0,g.jsx)(r.C,{idOwa:`${s}-${v}-${n}`,title:x,className:c,expanded:o,children:u.yE.map(e=>(0,g.jsx)(y,{children:(0,g.jsxs)("div",{className:S,children:[(0,g.jsx)("div",{className:E,
1children:e.title}),(0,g.jsx)("div",{className:m,children:e.description}),(0,g.jsx)(a.m,{idOwa:`${s}-${v}-${e.id}-dropdown`,defaultKey:(0,u.xS)(i,d,e.id),options:e.options,onKeyChange:t=>{const n=e.options.find(e=>e.key===t);n&&l(d,e.id,n.value)}})]})},e.id))},`${v}-${o}`)};var V=n(56432),b=n(84151),f=n(42866),p=n(47378),K=n(25922),k=n(33300),M=n(96951);const A=n(76901).gql`
2  query xSGetSVKConfig($numinst: String!, $zoneId: String!) {
3    xSGetSVKConfig(numinst: $numinst, zoneId: $zoneId) {
4      res
5      serialNumber
6      zoneId
7      location
8      alias
9      beepsEntryExitFeedbackDb
10      soundsDb
11      voiceDb
12    }
13  }
14`,_="SoundAndVolume",N=()=>{const[e,t]=(0,o.useState)(null),[n,r]=(0,o.useState)({}),[a,c]=(0,o.useState)({}),[S,E]=(0,o.useState)(new Set),[m,y]=(0,o.useState)(!1),N=(0,o.useRef)(null),C=(0,l.zy)(),{isSystemConfig:I=!1,SVKDevices:h=[]}=(null===C||void 0===C?void 0:C.state)||{},T=(0,p.wP)(),O=(0,i.wA)(),w=(0,l.Zp)(),[D,{loading:L}]=(0,M.lb)(A,{fetchPolicy:M.bV.NETWORK_ONLY,onCompleted:e=>{const t=null===e||void 0===e?void 0:e.zoneId;if("OK"===(null===e||void 0===e?void 0:e.res)){(0,b.logUserEvent)(f.SVK_VOLUME_MANAGEMENT_RENDER_OK)();const n=(0,u.f2)(e);r(e=>({...e,[t]:n})),c(e=>({...e,[t]:n}))}else E(e=>new Set([...e,t])),(0,b.logUserEvent)(f.SVK_VOLUME_MANAGEMENT_RENDER_KO)({error:"invalid configuration data"})},onError:e=>{(0,b.logUserEvent)(f.SVK_VOLUME_MANAGEMENT_RENDER_KO)({error:e}),(0,u.yp)(e)&&E(t=>new Set([...t,(0,u.yp)(e)]))}}),[U,{loading:z}]=(0,M.o7)({variablesFromData:(0,k.U6)({numinst:T}),onCompleted:e=>{"OK"===(null===e||void 0===e?void 0:e.res)&&N.current&&(N.current.resolve(e),N.current=null)},onError:e=>{N.current&&(N.current.reject(e),N.current=null)}}),R=(0,o.useMemo)(()=>h.filter(e=>!S.has(e.zoneId)),[h,S]),j=(0,o.useMemo)(()=>(0,u.Ud)(n,a),[n,a]),$=j.length>0,G=(0,o.useCallback)((e,t,n)=>{c(o=>({...o,[e]:{...o[e],[t]:n}}))},[]),P=(0,o.useCallback)((e,t)=>new Promise((n,o)=>{N.current={resolve:n,reject:o},U(e,t)}),[U]),Y=(0,o.useCallback)(async()=>{(0,b.logUserEvent)(f.SVK_VOLUME_MANAGEMENT_SAVE_CLICK)({text:"save click - user attempted to update SVK device volume"});const e=[];for(const s of j)try{const i=await P((0,u.f2)(a[s]),s);if("OK"===(null===i||void 0===i?void 0:i.res)){var t,n,o;const i=a[s],l=(0,u.gZ)("beepsEntryExitFeedbackDb",i.beepsEntryExitFeedbackDb),d=(0,u.gZ)("soundsDb",i.soundsDb),c=(0,u.gZ)("voiceDb",i.voiceDb);(0,b.logUserEvent)(f.SVK_VOLUME_MANAGEMENT_SAVE_OK)({text:`\n              save ok -\n              Sonidos de entrada y salida: ${null!==(t=null===l||void 0===l?void 0:l.key)&&void 0!==t?t:"unknown"},\n              Sonidos generales: ${null!==(n=null===d||void 0===d?void 0:d.key)&&void 0!==n?n:"unknown"},\n              Mensajes y avisos de voz: ${null!==(o=null===c||void 0===c?void 0:c.key)&&void 0!==o?o:"unknown"} \n            `.trim()}),r(e=>({...e,[s]:a[s]})),e.push({zoneId:s,success:!0})}else e.push({zoneId:s,success:!1}),(0,b.logUserEvent)(f.SVK_VOLUME_MANAGEMENT_SAVE_KO)({error:"backend returned non-OK response"})}catch(l){e.push({zoneId:s,success:!1,error:l}),(0,b.logUserEvent)(f.SVK_VOLUME_MANAGEMENT_SAVE_KO)({error:l})}const i=(0,u.ad)(e,h,j);O((0,K.D)(i)),w(-1)},[j,a,P,O,w,h]);return(0,o.useEffect)(()=>{if(0===h.length)return;r({}),c({}),E(new Set),y(!1),t(null);(async()=>{for(const t of h)try{await D({variables:{numinst:T,zoneId:t.zoneId}})}catch(e){}y(!0)})()},[]),(0,o.useEffect)(()=>{if(!m)return;const e=R.filter(e=>n[e.zoneId]);1===e.length&&t(t=>null===t?e[0].zoneId:t)},[m,R,n]),(0,g.jsxs)(d.U3,{"id-owa":_,title:(0,s.t)("SVK.SystemSettings.soundVolume.title"),services:["DEVICESCONF"],contentArea:{type:d.U3.contentArea.SECONDARY,breadcrumbs:[{name:I?(0,s.t)("SystemConfig.title.label"):(0,s.t)("Device.DeviceList.title.label"),path:I?V.J.SYSTEMCONFIG:V.J.DEVICES}]},children:[(0,g.jsx)(d.lV,{"id-owa":`${_}-form`,title:(0,s.t)("SVK.AlarmSettings.soundVolume.title"),okText:(0,s.t)("common.save"),okAction:Y,cancelText:(0,s.t)("common.cancel"),cancelAction:()=>{(0,b.logUserEvent)(f.SVK_VOLUME_MANAGEMENT_CANCEL_CLICK)({text:"user canceled volume management flow"}),w(-1)},cancelHiddenInBigScreen:!0,okDisabled:!$,className:v,children:R.filter(e=>n[e.zoneId]).map((t,n)=>(0,g.jsx)(x,{device:t,index:n,isExpanded:e===t.zoneId,editedConfig:a,onConfigChange:G,idOwa:_},t.id))}),(L||z)&&(0,g.jsx)(d.ld,{"id-owa":"SVK-config-loading",text:(0,s.t)("common.loading.processingPetition.label"),subtext:(0,s.t)("common.loading.pleaseWait.label")})]})}}}]);

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.