PageSourceSearch

https://www.qualidoc.com.br/_next/static/chunks/5111.e0f8224abca70cf4.js

js qualidoc.com.br collected 2026-09-24 12:33:02 UTC 8,589 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5111],{55111:function(e,n,t){t.r(n),t.d(n,{default:function(){return AddOrUpdateContact}});var r=t(85893),o=t(75814),a=t(69016),l=t(70451),u=t(48583),i=t(43516),s=t(88006);function AddOrUpdateContact(){let{settings:e}=(0,i.rV)(),n=null==e?void 0:e.useOtp,{closeModal:t}=(0,o.SO)(),[c,d]=(0,u.KO)(l.lu);function onSubmit(e){let{phone_number:n}=e;d(n),t()}return(0,r.jsxs)("div",{className:"flex flex-col justify-center min-h-screen p-5 bg-light sm:p-8 md:min-h-0 md:rounded-xl",children:[(0,r.jsxs)("h1",{className:"mb-5 text-sm font-semibold text-center text-heading sm:mb-6",children:[c?"Atualizar":"Adicionar Novo"," ","N\xfamero de Contato"]}),n?(0,r.jsx)(a.Z,{phoneNumber:c,onVerifySuccess:onSubmit}):(0,r.jsx)(s.Z,{onSubmit:onSubmit,phoneNumber:c})]})}},54858:function(e,n,t){t.d(n,{Z:function(){return OtpCodeForm}});var r=t(85893),o=t(58386),a=t(60802),l=t(92132),u=t(75814),i=t(66644),s=t(87536),c=t(16310);let d=c.Ry().shape({code:c.Z_().required("error-code-required")});function OtpCodeForm(e){let{onSubmit:n,isLoading:t}=e,{closeModal:c}=(0,u.SO)();return(0,r.jsx)("div",{className:"p-5 space-y-5 border border-gray-200 rounded",children:(0,r.jsx)(i.l,{onSubmit:n,validationSchema:d,children:e=>{let{control:n,formState:{errors:u}}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mb-5",children:[(0,r.jsx)(l.Z,{children:"C\xf3digo OTP"}),(0,r.jsx)(s.Qr,{control:n,render:e=>{let{field:{onChange:n,onBlur:t,value:a}}=e;return(0,r.jsx)(o.Z,{value:a,onChange:n,numInputs:6,renderSeparator:(0,r.jsx)("span",{className:"hidden sm:inline-block",children:"-"}),containerStyle:"flex items-center justify-between -mx-2",inputStyle:"flex items-center justify-center !w-full mx-2 sm:!w-9 !px-0 appearance-none transition duration-300 ease-in-out text-heading text-sm focus:outline-0 focus:ring-0 border border-border-base rounded focus:border-accent h-12",renderInput:e=>(0,r.jsx)("input",{...e})})},name:"code",defaultValue:""})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-5",children:[(0,r.jsx)(a.Z,{variant:"outline",onClick:c,className:"hover:border-red-500 hover:bg-red-500",children:"cancelar"}),(0,r.jsx)(a.Z,{type:"submit",loading:t,disabled:t,children:"Verificar C\xf3digo"})]})]})}})})}},69016:function(e,n,t){t.d(n,{Z:function(){return OtpForm}});var r=t(85893),o=t(48583),a=t(28692),l=t(21587),u=t(88006),i=t(53649),s=t(54858),c=t(91341);function OtpForm(e){let{phoneNumber:n,onVerifySuccess:t}=e,[d]=(0,o.KO)(i.R),{mutate:f,isLoading:p}=(0,c._7)({onVerifySuccess:t}),{mutate:m,isLoading:h,serverError:b,setServerError:g}=(0,c.Tk)({verifyOnly:!0});return(0,r.jsxs)(r.Fragment,{children:["PhoneNumber"===d.step&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Z,{variant:"error",message:b&&(0,a.P4)(b),className:"mb-4",closeable:!0,onClose:()=>g(null)}),(0,r.jsx)(u.Z,{onSubmit:function(e){let{phone_number:n}=e;m({phone_number:"+".concat(n)})},isLoading:h,phoneNumber:n})]}),"OtpForm"===d.step&&(0,r.jsx)(s.Z,{onSubmit:function(e){let{code:n}=e;f({code:n,phone_number:d.phoneNumber,otp_id:d.otpId})},isLoading:p})]})}},88006:function(e,n,t){t.d(n,{Z:function(){return PhoneNumberForm}});var r=t(85893),o=t(87536),a=t(28692),l=t(66644),u=t(74890),i=t(60802),s=t(16310);let c=s.Ry().shape({phone_number:s.Z_().required("error-contact-required")});function PhoneNumberForm(e){let{phoneNumber:n,onSubmit:t,isLoading:s,view:d}=e;return(0,r.jsx)(l.l,{onSubmit:t,validationSchema:c,className:"w-full",useFormProps:{defaultValues:{phone_number:n}},children:e=>{var t;let{control:l,formState:{errors:c}}=e;return(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsxs)("div",{className:"flex w-full items-center md:min-w-[360px]",children:[(0,r.jsx)(o.Qr,{name:"phone_number",control:l,render:e=>{let{field:n}=e;return(0,r.jsx)(u.Z,{country:"us",inputClass:"!p-0 ltr:!pr-4 rtl:!pl-4 ltr:!pl-14 rtl:!pr-14 !flex !items-center !w-full !appearance-none !transition !duration-300 !ease-in-out !text-heading !text-sm focus:!outline-none focus:!ring-0 !border !border-border-base ltr:!border-r-0 rtl:!border-l-0 !rounded ltr:!rounded-r-none rtl:!rounded-l-none focus:!border-accent !h-12",dropdownClass:"focus:!ring-0 !border !border-border-base !shadow-350",...n})}}),(0,r.jsx)(i.Z,{type:"submit",className:"!text-sm ltr:!rounded-l-none rtl:!rounded-r-none",loading:s,disabled:s,children:"login"===d?"Enviar OTP":(0,r.jsxs)(r.Fragment,{children:[n?"Atualizar":"Adicionar"," ","Contato"]})})]}),(null===(t=c.phone_number)||void 0===t?void 0:t.message)&&(0,r.jsx)("p",{className:"mt-2 text-xs text-red-500 ltr:text-left rtl:text-right",children:(0,a.P4)(c.phone_number.message)})]})}})}},92132:function(e,n,t){var r=t(85893),o=t(93967),a=t.n(o);n.Z=e=>{let{className:n,children:t,htmlFor:o,...l}=e,u=a()("block text-body-dark font-semibold text-sm leading-none mb-3",n);return o?(0,r.jsx)("label",{htmlFor:o,className:u,...l,children:t}):(0,r.jsx)("div",{className:u,children:t})}},74890:function(e,n,t){t.d(n,{Z:function(){return o.a}}),t(48705);var r=t(67555),o=t.n(r)},58386:function(e,n,t){t.d(n,{Z:function(){return OTPInput}});var r=t(67294),isStyleObject=function(e){return"object"==typeof e&&null!==e},OTPInput=function(e){var n=e.value,t=void 0===n?"":n,o=e.numInputs,a=void 0===o?4:o,l=e.onChange,u=e.onPaste,i=e.renderInput,s=e.shouldAutoFocus,c=void 0!==s&&s,d=e.inputType,f=void 0===d?"text":d,p=e.renderSeparator,m=e.placeholder,h=e.containerStyle,b=e.inputStyle,g=e.skipDefaultStyles,v=void 0!==g&&g,x=r.useState(0),j=x[0],y=x[1],N=r.useRef([]),getOTPValue=function(){return t?t.toString().split(""):[]},C="number"===f||"tel"===f;r.useEffect(function(){N.current=N.current.slice(0,a)},[a]),r.useEffect(function(){var e;c&&(null===(e=N.current[0])||void 0===e||e.focus())},[c]);var getPlaceholderValue=function(){if("string"==typeof m){if(m.length===a)return m;m.length>0&&console.error("Length of the placeholder should be equal to the number of inputs.")}},isInputValueValid=function(e){return(C?!isNaN(Number(e)):"string"==typeof e)&&1===e.trim().length},handleChange=function(e){var n=e.target.value;isInputValueValid(n)&&(changeCodeAtFocus(n),focusInput(j+1))},handleInputChange=function(e){var n=e.nativeEvent,t=e.target.value;isInputValueValid(t)||(t.length!==a||t.split("").some(function(e){return!isInputValueValid(e)})||(handleOTPChange(t.split("")),focusInput(a-1)),null===n.data&&"deleteContentBackward"===n.inputType&&(e.preventDefault(),changeCodeAtFocus(""),focusInput(j-1)),e.target.value="")},handleBlur=function(){y(j-1)},handleKeyDown=function(e){var n=getOTPValue();[e.code,e.key].includes("Backspace")?(e.preventDefault(),changeCodeAtFocus(""),focusInput(j-1)):"Delete"===e.code?(e.preventDefault(),changeCodeAtFocus("")):"ArrowLeft"===e.code?(e.preventDefault(),focusInput(j-1)):"ArrowRight"===e.code?(e.preventDefault(),focusInput(j+1)):e.key===n[j]?(e.preventDefault(),focusInput(j+1)):("Spacebar"===e.code||"
1Space"===e.code||"ArrowUp"===e.code||"ArrowDown"===e.code)&&e.preventDefault()},focusInput=function(e){var n,t,r=Math.max(Math.min(a-1,e),0);N.current[r]&&(null===(n=N.current[r])||void 0===n||n.focus(),null===(t=N.current[r])||void 0===t||t.select(),y(r))},changeCodeAtFocus=function(e){var n=getOTPValue();n[j]=e[0],handleOTPChange(n)},handleOTPChange=function(e){l(e.join(""))},handlePaste=function(e){e.preventDefault();var n,t=getOTPValue(),r=j,o=e.clipboardData.getData("text/plain").slice(0,a-j).split("");if(!(C&&o.some(function(e){return isNaN(Number(e))}))){for(var l=0;l<a;++l)l>=j&&o.length>0&&(t[l]=null!==(n=o.shift())&&void 0!==n?n:"",r++);focusInput(r),handleOTPChange(t)}};return r.createElement("div",{style:Object.assign({display:"flex",alignItems:"center"},isStyleObject(h)&&h),className:"string"==typeof h?h:void 0,onPaste:u},Array.from({length:a},function(e,n){return n}).map(function(e){var n,t,o;return r.createElement(r.Fragment,{key:e},i({value:null!==(n=getOTPValue()[e])&&void 0!==n?n:"",placeholder:null!==(o=null===(t=getPlaceholderValue())||void 0===t?void 0:t[e])&&void 0!==o?o:void 0,ref:function(n){return N.current[e]=n},onChange:handleChange,onFocus:function(n){y(e),n.target.select()},onBlur:handleBlur,onKeyDown:handleKeyDown,onPaste:handlePaste,autoComplete:"off","aria-label":"Please enter OTP character ".concat(e+1),style:Object.assign(v?{}:{width:"1em",textAlign:"center"},isStyleObject(b)?b:{}),className:"string"==typeof b?b:void 0,type:f,inputMode:C?"numeric":"text",onInput:handleInputChange},e),e<a-1&&("function"==typeof p?p(e):p))}))}}}]);
2//# sourceMappingURL=5111.e0f8224abca70cf4.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.