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AAsBC,GACxC,MAAMC,GAAgB/M,EAAAA,EAAAA,IAAO6M,IAE7BP,EAAAA,EAAAA,KAAgB,KACdS,EAAczM,QAAUuM,IACvB,CAACA,KAEJzM,EAAAA,EAAAA,KAAU,KACR,GAAqB,iBAAV0M,EACT,OAEF,MAAM7O,EAAK+O,YAAW,IAAMD,EAAczM,WAAWwM,GACrD,MAAO,IAAMG,aAAahP,KACzB,CAAC6O","sources":["webpack://telegram-t/./src/components/common/TrackingMonkey.tsx","webpack://telegram-t/./src/components/auth/AuthCode.tsx","webpack://telegram-t/./src/components/auth/AuthPassword.tsx","webpack://telegram-t/./src/components/auth/AuthRegister.tsx","webpack://telegram-t/./src/components/common/PasswordForm.tsx","webpack://telegram-t/./src/components/common/PasswordMonkey.tsx","webpack://telegram-t/./src/components/ui/CropModal.tsx","webpack://telegram-t/./src/components/ui/AvatarEditable.tsx","webpack://telegram-t/./src/components/ui/Modal.tsx","webpack://telegram-t/./src/util/trapFocus.ts","webpack://telegram-t/./src/components/ui/Portal.ts","webpack://telegram-t/./src/hooks/useTimeout.ts"],"sourcesContent":["import type { FC } from '../../lib/teact/teact';\nimport React, { useState, useCallback, memo } from '../../lib/teact/teact';\n\nimport { STICKER_SIZE_AUTH, STICKER_SIZE_AUTH_MOBILE, STICKER_SIZE_TWO_FA } from '../../config';\nimport { IS_SINGLE_COLUMN_LAYOUT } from '../../util/environment';\nimport { LOCAL_TGS_URLS } from './helpers/animatedAssets';\n\nimport AnimatedSticker from './AnimatedSticker';\n\nimport './PasswordMonkey.scss';\n\ntype OwnProps = {\n code: string;\n codeLength: number;\n trackingDirection: number;\n isTracking: boolean;\n isBig?: boolean;\n};\n\nconst TRACKING_START_FRAME = 15;\nconst TRACKING_END_FRAME = 180;\nconst STICKER_SIZE = IS_SINGLE_COLUMN_LAYOUT ? STICKER_SIZE_AUTH_MOBILE : STICKER_SIZE_AUTH;\n\nconst TrackingMonkey: FC = ({\n code,\n codeLength,\n trackingDirection,\n isTracking,\n isBig,\n}) => {\n const [isFirstMonkeyLoaded, setIsFirstMonkeyLoaded] = useState(false);\n const TRACKING_FRAMES_PER_SYMBOL = (TRACKING_END_FRAME - TRACKING_START_FRAME) / codeLength;\n\n const handleFirstMonkeyLoad = useCallback(() => setIsFirstMonkeyLoaded(true), []);\n\n function getTrackingFrames(): [number, number] {\n const startFrame = (code && code.length > 1) || trackingDirection < 0\n ? TRACKING_START_FRAME + TRACKING_FRAMES_PER_SYMBOL * (code.length - 1)\n : 0;\n const endFrame = code.length === codeLength\n ? TRACKING_END_FRAME\n : TRACKING_START_FRAME + TRACKING_FRAMES_PER_SYMBOL * code.length;\n\n if (trackingDirection < 1) {\n return [\n endFrame,\n startFrame,\n ];\n }\n\n return [\n startFrame,\n endFrame,\n ];\n }\n\n return (\n
\n {!isFirstMonkeyLoaded && (\n
\n )}\n \n \n
\n );\n};\n\nexport default memo(TrackingMonkey);\n","import type { FormEvent } from 'react';\nimport type { FC } from '../../lib/teact/teact';\nimport React, {\n useState, useEffect, useCallback, memo, useRef,\n} from '../../lib/teact/teact';\nimport { getActions, withGlobal } from '../../global';\nimport type { GlobalState } from '../../global/types';\n\nimport { IS_TOUCH_ENV } from '../../util/environment';\nimport { pick } from '../../util/iteratees';\nimport renderText from '../common/helpers/renderText';\nimport useHistoryBack from '../../hooks/useHistoryBack';\nimport useLang from '../../hooks/useLang';\n\nimport InputText from '../ui/InputText';\nimport Loading from '../ui/Loading';\nimport TrackingMonkey from '../common/TrackingMonkey';\n\ntype StateProps = Pick;\n\nconst CODE_LENGTH = 5;\n\nconst AuthCode: FC = ({\n authPhoneNumber,\n authIsCodeViaApp,\n authIsLoading,\n authError,\n}) => {\n const {\n setAuthCode,\n returnToAuthPhoneNumber,\n clearAuthError,\n } = getActions();\n\n const lang = useLang();\n // eslint-disable-next-line no-null/no-null\n const inputRef = useRef(null);\n\n const [code, setCode] = useState('');\n const [isTracking, setIsTracking] = useState(false);\n const [trackingDirection, setTrackingDirection] = useState(1);\n\n useEffect(() => {\n if (!IS_TOUCH_ENV) {\n inputRef.current!.focus();\n }\n }, []);\n\n useHistoryBack({\n isActive: true,\n onBack: returnToAuthPhoneNumber,\n });\n\n const onCodeChange = useCallback((e: FormEvent) => {\n if (authError) {\n clearAuthError();\n }\n\n const { currentTarget: target } = e;\n target.value = target.value.replace(/[^\\d]+/, '').substr(0, CODE_LENGTH);\n\n if (target.value === code) {\n return;\n }\n\n setCode(target.value);\n\n if (!isTracking) {\n setIsTracking(true);\n } else if (!target.value.length) {\n setIsTracking(false);\n }\n\n if (code && code.length > target.value.length) {\n setTrackingDirection(-1);\n } else {\n setTrackingDirection(1);\n }\n\n if (target.value.length === CODE_LENGTH) {\n setAuthCode({ code: target.value });\n }\n }, [authError, clearAuthError, code, isTracking, setAuthCode]);\n\n return (\n
\n
\n \n

\n {authPhoneNumber}\n \n \n

\n \n

\n {renderText(lang(authIsCodeViaApp ? 'SentAppCode' : 'Login.JustSentSms'), ['simple_markdown'])}\n

\n \n {authIsLoading && }\n
\n
\n );\n};\n\nexport default memo(withGlobal(\n (global): StateProps => pick(global, ['authPhoneNumber', 'authIsCodeViaApp', 'authIsLoading', 'authError']),\n)(AuthCode));\n","import type { FC } from '../../lib/teact/teact';\nimport React, { memo, useCallback, useState } from '../../lib/teact/teact';\nimport { getActions, withGlobal } from '../../global';\n\nimport type { GlobalState } from '../../global/types';\n\nimport { pick } from '../../util/iteratees';\nimport useLang from '../../hooks/useLang';\n\nimport MonkeyPassword from '../common/PasswordMonkey';\nimport PasswordForm from '../common/PasswordForm';\n\ntype StateProps = Pick;\n\nconst AuthPassword: FC = ({\n authIsLoading, authError, authHint,\n}) => {\n const { setAuthPassword, clearAuthError } = getActions();\n\n const lang = useLang();\n const [showPassword, setShowPassword] = useState(false);\n\n const handleChangePasswordVisibility = useCallback((isVisible) => {\n setShowPassword(isVisible);\n }, []);\n\n const handleSubmit = useCallback((password: string) => {\n setAuthPassword({ password });\n }, [setAuthPassword]);\n\n return (\n
\n
\n \n

{lang('Login.Header.Password')}

\n

{lang('Login.EnterPasswordDescription')}

\n \n
\n
\n );\n};\n\nexport default memo(withGlobal(\n (global): StateProps => pick(global, ['authIsLoading', 'authError', 'authHint']),\n)(AuthPassword));\n","import type { ChangeEvent } from 'react';\nimport type { FC } from '../../lib/teact/teact';\nimport React, { useState, memo, useCallback } from '../../lib/teact/teact';\nimport { getActions, withGlobal } from '../../global';\n\nimport type { GlobalState } from '../../global/types';\n\nimport { pick } from '../../util/iteratees';\nimport useLang from '../../hooks/useLang';\n\nimport Button from '../ui/Button';\nimport InputText from '../ui/InputText';\nimport AvatarEditable from '../ui/AvatarEditable';\n\ntype StateProps = Pick;\n\nconst AuthRegister: FC = ({\n authIsLoading, authError,\n}) => {\n const { signUp, clearAuthError, uploadProfilePhoto } = getActions();\n\n const lang = useLang();\n const [isButtonShown, setIsButtonShown] = useState(false);\n const [croppedFile, setCroppedFile] = useState();\n const [firstName, setFirstName] = useState('');\n const [lastName, setLastName] = useState('');\n\n const handleFirstNameChange = useCallback((event: ChangeEvent) => {\n if (authError) {\n clearAuthError();\n }\n\n const { target } = event;\n\n setFirstName(target.value);\n setIsButtonShown(target.value.length > 0);\n }, [authError, clearAuthError]);\n\n const handleLastNameChange = useCallback((event: ChangeEvent) => {\n const { target } = event;\n\n setLastName(target.value);\n }, []);\n\n function handleSubmit(event: React.FormEvent) {\n event.preventDefault();\n\n signUp({ firstName, lastName });\n\n if (croppedFile) {\n uploadProfilePhoto({ file: croppedFile });\n }\n }\n\n return (\n
\n
\n
\n \n

{lang('YourName')}

\n

{lang('Login.Register.Desc')}

\n \n \n {isButtonShown && (\n \n )}\n \n
\n
\n );\n};\n\nexport default memo(withGlobal(\n (global): StateProps => pick(global, ['authIsLoading', 'authError']),\n)(AuthRegister));\n","import type { ChangeEvent } from 'react';\nimport type { FC } from '../../lib/teact/teact';\nimport React, {\n memo, useEffect, useRef, useState,\n} from '../../lib/teact/teact';\n\nimport { MIN_PASSWORD_LENGTH } from '../../config';\nimport { IS_TOUCH_ENV, IS_SINGLE_COLUMN_LAYOUT } from '../../util/environment';\nimport buildClassName from '../../util/buildClassName';\nimport useLang from '../../hooks/useLang';\nimport useTimeout from '../../hooks/useTimeout';\n\nimport Button from '../ui/Button';\n\ntype OwnProps = {\n submitLabel?: string;\n error?: string;\n hint?: string;\n placeholder?: string;\n isLoading?: boolean;\n shouldDisablePasswordManager?: boolean;\n shouldShowSubmit?: boolean;\n shouldResetValue?: boolean;\n isPasswordVisible?: boolean;\n clearError: NoneToVoidFunction;\n noRipple?: boolean;\n onChangePasswordVisibility: (state: boolean) => void;\n onInputChange?: (password: string) => void;\n onSubmit: (password: string) => void;\n};\n\nconst FOCUS_DELAY_TIMEOUT_MS = IS_SINGLE_COLUMN_LAYOUT ? 550 : 400;\n\nconst PasswordForm: FC = ({\n isLoading = false,\n isPasswordVisible,\n error,\n hint,\n placeholder = 'Password',\n submitLabel = 'Next',\n shouldShowSubmit,\n shouldResetValue,\n shouldDisablePasswordManager = false,\n noRipple = false,\n clearError,\n onChangePasswordVisibility,\n onInputChange,\n onSubmit,\n}) => {\n // eslint-disable-next-line no-null/no-null\n const inputRef = useRef(null);\n const lang = useLang();\n\n const [password, setPassword] = useState('');\n const [canSubmit, setCanSubmit] = useState(false);\n\n useEffect(() => {\n if (shouldResetValue) {\n setPassword('');\n }\n }, [shouldResetValue]);\n\n useTimeout(() => {\n if (!IS_TOUCH_ENV) {\n inputRef.current!.focus();\n }\n }, FOCUS_DELAY_TIMEOUT_MS);\n\n useEffect(() => {\n if (error) {\n requestAnimationFrame(() => {\n inputRef.current!.focus();\n inputRef.current!.select();\n });\n }\n }, [error]);\n\n function onPasswordChange(e: ChangeEvent) {\n if (error) {\n clearError();\n }\n\n const { target } = e;\n setPassword(target.value);\n setCanSubmit(target.value.length >= MIN_PASSWORD_LENGTH);\n if (onInputChange) {\n onInputChange(target.value);\n }\n }\n\n function togglePasswordVisibility() {\n onChangePasswordVisibility(!isPasswordVisible);\n }\n\n function handleSubmit(event: React.FormEvent) {\n event.preventDefault();\n\n if (isLoading) {\n return;\n }\n\n if (canSubmit) {\n onSubmit(password);\n }\n }\n\n function renderFakeInput() {\n return (\n \n );\n }\n\n return (\n
\n \n {shouldDisablePasswordManager && renderFakeInput()}\n \n \n \n \n \n \n {(canSubmit || shouldShowSubmit) && (\n \n )}\n \n );\n};\n\nexport default memo(PasswordForm);\n","import type { FC } from '../../lib/teact/teact';\nimport React, { useCallback, memo } from '../../lib/teact/teact';\n\nimport { STICKER_SIZE_AUTH, STICKER_SIZE_AUTH_MOBILE, STICKER_SIZE_TWO_FA } from '../../config';\nimport { IS_SINGLE_COLUMN_LAYOUT } from '../../util/environment';\nimport { LOCAL_TGS_URLS } from './helpers/animatedAssets';\n\nimport AnimatedSticker from './AnimatedSticker';\n\nimport useTimeout from '../../hooks/useTimeout';\nimport useFlag from '../../hooks/useFlag';\n\nimport './PasswordMonkey.scss';\n\ntype OwnProps = {\n isPasswordVisible: boolean;\n isBig?: boolean;\n};\n\nconst PEEK_MONKEY_SHOW_DELAY = 2000;\nconst SEGMENT_COVER_EYES: [number, number] = [0, 50];\nconst SEGMENT_UNCOVER_EYE: [number, number] = [0, 20];\nconst SEGMENT_COVER_EYE: [number, number] = [20, 0];\nconst STICKER_SIZE = IS_SINGLE_COLUMN_LAYOUT ? STICKER_SIZE_AUTH_MOBILE : STICKER_SIZE_AUTH;\n\nconst PasswordMonkey: FC = ({ isPasswordVisible, isBig }) => {\n const [isFirstMonkeyLoaded, markFirstMonkeyLoaded] = useFlag(false);\n const [isPeekShown, markPeekShown] = useFlag(false);\n\n useTimeout(markPeekShown, PEEK_MONKEY_SHOW_DELAY);\n const handleFirstMonkeyLoad = useCallback(markFirstMonkeyLoaded, [markFirstMonkeyLoaded]);\n\n return (\n
\n {!isFirstMonkeyLoaded && (\n
\n )}\n \n \n
\n );\n};\n\nexport default memo(PasswordMonkey);\n","import type { FC } from '../../lib/teact/teact';\nimport React, {\n useEffect, useState, memo, useCallback,\n} from '../../lib/teact/teact';\n\nimport { DEBUG } from '../../config';\nimport { blobToFile, blobToDataUri } from '../../util/files';\nimport useLang from '../../hooks/useLang';\n\nimport Button from './Button';\nimport Modal from './Modal';\nimport Loading from './Loading';\n\nimport './CropModal.scss';\n\n// Change to 'base64' to get base64-encoded string\nconst cropperResultOptions: Croppie.ResultOptions & { type: 'blob' } = {\n type: 'blob',\n quality: 1,\n format: 'jpeg',\n circle: false,\n size: { width: 1024, height: 1024 },\n};\n\ntype ICroppie = typeof import('croppie');\nlet Croppie: ICroppie;\nlet croppiePromise: Promise<{ default: ICroppie }>;\n\nasync function ensureCroppie() {\n if (!croppiePromise) {\n croppiePromise = import('../../lib/croppie') as unknown as Promise<{ default: ICroppie }>;\n Croppie = (await croppiePromise).default;\n }\n\n return croppiePromise;\n}\n\nlet cropper: Croppie;\n\nasync function initCropper(imgFile: File) {\n try {\n const cropContainer = document.getElementById('avatar-crop');\n if (!cropContainer) {\n return;\n }\n\n const { offsetWidth, offsetHeight } = cropContainer;\n\n cropper = new Croppie(cropContainer, {\n enableZoom: true,\n boundary: {\n width: offsetWidth,\n height: offsetHeight,\n },\n viewport: {\n width: offsetWidth - 16,\n height: offsetHeight - 16,\n type: 'circle',\n },\n });\n\n const dataUri = await blobToDataUri(imgFile);\n await cropper.bind({ url: dataUri });\n } catch (err) {\n if (DEBUG) {\n // eslint-disable-next-line no-console\n console.error(err);\n }\n }\n}\n\ntype OwnProps = {\n file?: File;\n onChange: (file: File) => void;\n onClose: () => void;\n};\n\nconst CropModal: FC = ({ file, onChange, onClose }: OwnProps) => {\n const [isCroppieReady, setIsCroppieReady] = useState(false);\n\n useEffect(() => {\n if (!file) {\n return;\n }\n\n if (!isCroppieReady) {\n ensureCroppie().then(() => setIsCroppieReady(true));\n\n return;\n }\n\n initCropper(file);\n }, [file, isCroppieReady]);\n\n const lang = useLang();\n\n const handleCropClick = useCallback(async () => {\n if (!cropper) {\n return;\n }\n\n const result: Blob | string = await cropper.result(cropperResultOptions);\n const croppedImg = typeof result === 'string' ? result : blobToFile(result, 'avatar.jpg');\n\n onChange(croppedImg);\n }, [onChange]);\n\n return (\n \n {isCroppieReady ? (\n
\n ) : (\n \n )}\n \n \n \n \n );\n};\n\nexport default memo(CropModal);\n","import type { ChangeEvent } from 'react';\nimport type { FC } from '../../lib/teact/teact';\nimport React, {\n useState, useEffect, memo, useCallback,\n} from '../../lib/teact/teact';\n\nimport buildClassName from '../../util/buildClassName';\n\nimport CropModal from './CropModal';\n\nimport './AvatarEditable.scss';\n\ninterface OwnProps {\n title?: string;\n disabled?: boolean;\n currentAvatarBlobUrl?: string;\n onChange: (file: File) => void;\n}\n\nconst AvatarEditable: FC = ({\n title = 'Change your profile picture',\n disabled,\n currentAvatarBlobUrl,\n onChange,\n}) => {\n const [selectedFile, setSelectedFile] = useState();\n const [croppedBlobUrl, setCroppedBlobUrl] = useState(currentAvatarBlobUrl);\n\n useEffect(() => {\n setCroppedBlobUrl(currentAvatarBlobUrl);\n }, [currentAvatarBlobUrl]);\n\n function handleSelectFile(event: ChangeEvent) {\n const target = event.target as HTMLInputElement;\n\n if (!target || !target.files || !target.files[0]) {\n return;\n }\n\n setSelectedFile(target.files[0]);\n target.value = '';\n }\n\n const handleAvatarCrop = useCallback((croppedImg: File) => {\n setSelectedFile(undefined);\n onChange(croppedImg);\n\n if (croppedBlobUrl) {\n URL.revokeObjectURL(croppedBlobUrl);\n }\n setCroppedBlobUrl(URL.createObjectURL(croppedImg));\n }, [croppedBlobUrl, onChange]);\n\n const handleModalClose = useCallback(() => {\n setSelectedFile(undefined);\n }, []);\n\n const labelClassName = buildClassName(\n croppedBlobUrl && 'filled',\n disabled && 'disabled',\n );\n\n return (\n
\n \n \n \n {croppedBlobUrl && \"Avatar\"}\n \n \n
\n );\n};\n\nexport default memo(AvatarEditable);\n","import type { RefObject } from 'react';\nimport type { FC, TeactNode } from '../../lib/teact/teact';\nimport React, { useEffect, useRef } from '../../lib/teact/teact';\n\nimport type { TextPart } from '../../types';\n\nimport captureKeyboardListeners from '../../util/captureKeyboardListeners';\nimport trapFocus from '../../util/trapFocus';\nimport buildClassName from '../../util/buildClassName';\nimport { dispatchHeavyAnimationEvent } from '../../hooks/useHeavyAnimationCheck';\nimport useShowTransition from '../../hooks/useShowTransition';\nimport useEffectWithPrevDeps from '../../hooks/useEffectWithPrevDeps';\nimport useLang from '../../hooks/useLang';\nimport useHistoryBack from '../../hooks/useHistoryBack';\n\nimport Button from './Button';\nimport Portal from './Portal';\n\nimport './Modal.scss';\n\nconst ANIMATION_DURATION = 200;\n\ntype OwnProps = {\n title?: string | TextPart[];\n className?: string;\n isOpen?: boolean;\n header?: TeactNode;\n hasCloseButton?: boolean;\n noBackdrop?: boolean;\n children: React.ReactNode;\n style?: string;\n onClose: () => void;\n onCloseAnimationEnd?: () => void;\n onEnter?: () => void;\n dialogRef?: RefObject;\n};\n\ntype StateProps = {\n shouldSkipHistoryAnimations?: boolean;\n};\n\nconst Modal: FC = ({\n dialogRef,\n title,\n className,\n isOpen,\n header,\n hasCloseButton,\n noBackdrop,\n children,\n style,\n onClose,\n onCloseAnimationEnd,\n onEnter,\n shouldSkipHistoryAnimations,\n}) => {\n const {\n shouldRender,\n transitionClassNames,\n } = useShowTransition(\n isOpen, onCloseAnimationEnd, shouldSkipHistoryAnimations, undefined, shouldSkipHistoryAnimations,\n );\n // eslint-disable-next-line no-null/no-null\n const modalRef = useRef(null);\n\n useEffect(() => (isOpen\n ? captureKeyboardListeners({ onEsc: onClose, onEnter })\n : undefined), [isOpen, onClose, onEnter]);\n useEffect(() => (isOpen && modalRef.current ? trapFocus(modalRef.current) : undefined), [isOpen]);\n\n useHistoryBack({\n isActive: isOpen,\n onBack: onClose,\n });\n\n useEffectWithPrevDeps(([prevIsOpen]) => {\n document.body.classList.toggle('has-open-dialog', isOpen);\n if (isOpen || (!isOpen && prevIsOpen !== undefined)) {\n dispatchHeavyAnimationEvent(ANIMATION_DURATION);\n }\n\n return () => {\n document.body.classList.remove('has-open-dialog');\n };\n }, [isOpen]);\n\n const lang = useLang();\n\n if (!shouldRender) {\n return undefined;\n }\n\n function renderHeader() {\n if (header) {\n return header;\n }\n\n if (!title) {\n return undefined;\n }\n\n return (\n
\n {hasCloseButton && (\n \n \n \n )}\n
{title}
\n
\n );\n }\n\n const fullClassName = buildClassName(\n 'Modal',\n className,\n transitionClassNames,\n noBackdrop && 'transparent-backdrop',\n );\n\n return (\n \n \n
\n
\n
\n {renderHeader()}\n
\n {children}\n
\n
\n
\n
\n
\n );\n};\n\nexport default Modal;\n","export default function trapFocus(element: HTMLElement) {\n function handleKeyDown(e: KeyboardEvent) {\n if (e.key !== 'Tab') {\n return;\n }\n\n e.preventDefault();\n e.stopPropagation();\n\n const focusableElements = Array.from(\n element.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'),\n ) as HTMLElement[];\n if (!focusableElements.length) {\n return;\n }\n\n const currentFocusedIndex = focusableElements.findIndex((em) => em.isSameNode(document.activeElement));\n let newFocusedIndex = 0;\n if (currentFocusedIndex >= 0) {\n if (e.shiftKey) {\n newFocusedIndex = currentFocusedIndex > 0\n ? currentFocusedIndex - 1\n : focusableElements.length - 1;\n } else {\n newFocusedIndex = currentFocusedIndex < focusableElements.length - 1\n ? currentFocusedIndex + 1\n : 0;\n }\n }\n\n focusableElements[newFocusedIndex].focus();\n }\n\n document.addEventListener('keydown', handleKeyDown, false);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown, false);\n };\n}\n","import type { FC, VirtualElement } from '../../lib/teact/teact';\nimport { useRef, useLayoutEffect } from '../../lib/teact/teact';\nimport TeactDOM from '../../lib/teact/teact-dom';\n\ntype OwnProps = {\n containerId?: string;\n className?: string;\n children: VirtualElement;\n};\n\nconst Portal: FC = ({ containerId, className, children }) => {\n const elementRef = useRef();\n if (!elementRef.current) {\n elementRef.current = document.createElement('div');\n }\n\n useLayoutEffect(() => {\n const container = document.querySelector(containerId || '#portals');\n if (!container) {\n return undefined;\n }\n\n const element = elementRef.current!;\n if (className) {\n element.classList.add(className);\n }\n\n container.appendChild(element);\n\n return () => {\n TeactDOM.render(undefined, element);\n container.removeChild(element);\n };\n }, [className, containerId]);\n\n return TeactDOM.render(children, elementRef.current);\n};\n\nexport default Portal;\n","import { useEffect, useLayoutEffect, useRef } from '../lib/teact/teact';\n\nfunction useTimeout(callback: () => void, delay?: number) {\n const savedCallback = useRef(callback);\n\n useLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n\n useEffect(() => {\n if (typeof delay !== 'number') {\n return undefined;\n }\n const id = setTimeout(() => savedCallback.current(), delay);\n return () => clearTimeout(id);\n }, [delay]);\n}\n\nexport default useTimeout;\n"],"names":["STICKER_SIZE","IS_SINGLE_COLUMN_LAYOUT","STICKER_SIZE_AUTH_MOBILE","STICKER_SIZE_AUTH","memo","code","codeLength","trackingDirection","isTracking","isBig","isFirstMonkeyLoaded","setIsFirstMonkeyLoaded","useState","TRACKING_FRAMES_PER_SYMBOL","handleFirstMonkeyLoad","useCallback","id","className","AnimatedSticker","size","STICKER_SIZE_TWO_FA","undefined","tgsUrl","LOCAL_TGS_URLS","play","onLoad","playSegment","startFrame","length","endFrame","getTrackingFrames","speed","noLoop","withGlobal","global","pick","authPhoneNumber","authIsCodeViaApp","authIsLoading","authError","setAuthCode","returnToAuthPhoneNumber","clearAuthError","getActions","lang","useLang","inputRef","useRef","setCode","setIsTracking","setTrackingDirection","useEffect","IS_TOUCH_ENV","current","focus","useHistoryBack","isActive","onBack","onCodeChange","e","currentTarget","target","value","replace","substr","onClick","role","tabIndex","title","renderText","InputText","ref","label","onInput","error","autoComplete","inputMode","Loading","authHint","setAuthPassword","showPassword","setShowPassword","handleChangePasswordVisibility","isVisible","handleSubmit","password","isPasswordVisible","PasswordForm","clearError","hint","isLoading","onChangePasswordVisibility","onSubmit","signUp","uploadProfilePhoto","isButtonShown","setIsButtonShown","croppedFile","setCroppedFile","firstName","setFirstName","lastName","setLastName","handleFirstNameChange","event","handleLastNameChange","action","method","preventDefault","file","AvatarEditable","onChange","Button","type","ripple","FOCUS_DELAY_TIMEOUT_MS","placeholder","submitLabel","shouldShowSubmit","shouldResetValue","shouldDisablePasswordManager","noRipple","onInputChange","setPassword","canSubmit","setCanSubmit","useTimeout","requestAnimationFrame","select","buildClassName","dir","isRtl","MIN_PASSWORD_LENGTH","maxLength","disabled","SEGMENT_COVER_EYES","SEGMENT_UNCOVER_EYE","SEGMENT_COVER_EYE","markFirstMonkeyLoaded","useFlag","isPeekShown","markPeekShown","cropperResultOptions","quality","format","circle","width","height","Croppie","croppiePromise","cropper","onClose","isCroppieReady","setIsCroppieReady","async","imgFile","cropContainer","document","getElementById","offsetWidth","offsetHeight","enableZoom","boundary","viewport","dataUri","blobToDataUri","bind","url","err","DEBUG","console","initCropper","default","ensureCroppie","then","handleCropClick","result","croppedImg","blobToFile","Modal","isOpen","Boolean","hasCloseButton","round","color","ariaLabel","currentAvatarBlobUrl","selectedFile","setSelectedFile","croppedBlobUrl","setCroppedBlobUrl","handleAvatarCrop","URL","revokeObjectURL","createObjectURL","handleModalClose","labelClassName","files","accept","src","alt","dialogRef","header","noBackdrop","children","style","onCloseAnimationEnd","onEnter","shouldSkipHistoryAnimations","shouldRender","transitionClassNames","useShowTransition","modalRef","captureKeyboardListeners","onEsc","element","handleKeyDown","key","stopPropagation","focusableElements","Array","from","querySelectorAll","currentFocusedIndex","findIndex","em","isSameNode","activeElement","newFocusedIndex","shiftKey","addEventListener","removeEventListener","trapFocus","useEffectWithPrevDeps","prevIsOpen","body","classList","toggle","dispatchHeavyAnimationEvent","remove","fullClassName","Portal","containerId","elementRef","createElement","useLayoutEffect","container","querySelector","add","appendChild","TeactDOM","removeChild","callback","delay","savedCallback","setTimeout","clearTimeout"],"sourceRoot":""}