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,EAAO,MAAM,MAAU,wBAE5B,OAAOA,CAAK,CAAC,EAAE,CAejB,OAAcM,qBAAqB/I,CAAwB,CAAc,CACvE,IAAMjD,EAAW8H,eAAe+D,oBAAoB,CAAC5I,GAC/ChD,EAAY6H,eAAeiE,qBAAqB,CAAC9I,GAEvD,MAAO,CAAEjD,SAAAA,EAAUC,UAAAA,CAAU,CAC/B,CArKAgM,YAAYT,CAAqB,CAAEU,CAAqB,CAAE,CACxD,GAAM,CAAElM,SAAAA,CAAQ,CAAEC,UAAAA,CAAS,CAAE,CAAGiM,CAChC,KAAI,CAACV,IAAI,CAAGA,EACZ,IAAI,CAACxL,QAAQ,CAAGA,EAChB,IAAI,CAACC,SAAS,CAAGA,CACnB,CAiKF","sources":["webpack://_N_E/./src/components/atoms/InputCheckbox/InputCheckbox.tsx","webpack://_N_E/./src/components/atoms/InputField/InputField.tsx","webpack://_N_E/./src/components/molecules/InputButton/InputButton.tsx","webpack://_N_E/./src/components/molecules/InputButtonGroup/InputButtonGroup.tsx","webpack://_N_E/./src/components/molecules/InputCheckBoxGroup/InputCheckBoxGroup.tsx","webpack://_N_E/./src/components/molecules/InputFieldDateGroup/InputFieldDateGroup.tsx","webpack://_N_E/./src/components/molecules/InputFieldGroup/InputFieldGroup.tsx","webpack://_N_E/./src/lib/hooks/geolocation/useGeolocation.ts","webpack://_N_E/./src/components/molecules/InputPlacesFieldGoogle/InputPlacesFieldGoogle.tsx","webpack://_N_E/./src/lib/hooks/devicePixelRatio/devicePixelRatio.ts","webpack://_N_E/./src/components/molecules/GoogleStaticMap/GoogleStaticMap.tsx","webpack://_N_E/./src/components/molecules/InputPlacesGroupGoogle/InputPlacesGroupGoogle.tsx","webpack://_N_E/./src/lib/dataSource/location/getLocationLabel.ts","webpack://_N_E/./src/lib/dataSource/lostApi/utilities/geolocation/reverseGeocode.ts","webpack://_N_E/./src/lib/dataSource/utilities/geolocation/reverseGeocode.ts","webpack://_N_E/<anon>"],"sourcesContent":["import IRegisterFunction from '../InputField/IRegisterFunction';\n\n/**\n * IInputCheckbox Interface for the Input Checkbox component\n *\n * @augments React.HTMLAttributes<HTMLInputElement>\n * @interface IInputCheckbox\n */\nexport interface IInputCheckbox extends React.HTMLAttributes<HTMLInputElement> {\n  /**\n   * The name of the input field.\n   *\n   * @memberof IInputCheckbox\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The error message for the input field.\n   *\n   * @memberof IInputCheckbox\n   * @member {string} [error]\n   */\n  error?: string;\n  /**\n   * Whether or not the input field is required.\n   *\n   * @memberof IInputCheckbox\n   * @member {boolean} [required]\n   */\n  required?: boolean;\n  /**\n   * The register function from react-hook-form.\n   *\n   * @memberof IInputCheckbox\n   * @member {IRegisterFunction} register\n   */\n  register: IRegisterFunction;\n  /**\n   * The field value\n   *\n   * @memberof IInputCheckbox\n   * @member {string} [value]\n   */\n  value?: string;\n  /**\n   * If field is readOnly\n   *\n   * @memberof IInputCheckbox\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n  /**\n   * The optional classes for the input field.\n   *\n   * @memberof IInputCheckbox\n   * @default ''\n   * @member {string} [classes]\n   */\n  classes?: string;\n}\n\n/**\n * Input Checkbox Checkbox for a form. Should be used with react-hook-form.\n *\n * @param {IInputCheckbox} props - The props for the Input Checkbox component\n * @returns {React.FC<IInputCheckbox>} Input Checkbox Component\n */\nconst InputCheckbox: React.FC<IInputCheckbox> = ({\n  name,\n  error,\n  required,\n  register,\n  classes = '',\n  readOnly,\n  ...rest\n}: IInputCheckbox) => {\n  return (\n    <input\n      id={name}\n      data-testid=\"input-checkbox\"\n      type=\"checkbox\"\n      required={required}\n      aria-invalid={error ? 'true' : 'false'}\n      disabled={readOnly}\n      className={\n        'w-[21px] h-[21px] text-base-300 rounded border-neutral-500 border enabled:cursor-pointer disabled:cursor-not-allowed focus:ring-0 focus:ring-offset-0 focus-visible:ring-offset-0 focus-visible:ring-0 disabled:text-neutral-500 ' +\n        classes\n      }\n      {...register(name)}\n      {...rest}\n    />\n  );\n};\n\nexport default InputCheckbox;\n","import InputError from '@/components/atoms/InputError/InputError';\nimport React, { forwardRef, useEffect, useState } from 'react';\nimport { FieldError, FieldErrorsImpl, Merge } from 'react-hook-form';\nimport {\n  inputClasses,\n  inputDisabledClasses,\n  inputErrorClasses,\n  labelClasses,\n  labelDisabledClasses,\n  labelFocusClasses,\n  labelPeerPlaceholderShownClasses,\n} from './InputStyling';\n\n/**\n * Input Types\n *\n * @type {InputTypes}\n */\nexport type InputTypes =\n  | 'text'\n  | 'email'\n  | 'password'\n  | 'number'\n  | 'tel'\n  | 'url'\n  | 'search'\n  | 'date'\n  | 'time'\n  | 'datetime-local'\n  | 'month'\n  | 'week';\n\n/**\n * IInputField Interface for the Input Field Component\n *\n * @interface IInputField\n */\nexport interface IInputField {\n  /**\n   * The Label of the Input\n   *\n   * @memberof IInputField\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The type of the input\n   *\n   * @memberof IInputField\n   * @member {InputTypes} type\n   */\n  type: InputTypes;\n  /**\n   * The Name of the Input\n   *\n   * @memberof IInputField\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * A value for the input\n   *\n   * @memberof IInputField\n   * @member {string} [value]\n   */\n  value?: string;\n  /**\n   * If the input is read only\n   *\n   * @memberof IInputField\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n  /**\n   * If the input is required\n   *\n   * @memberof IInputField\n   * @member {boolean} [required]\n   */\n  required?: boolean;\n  /**\n   * The auto complete of the input\n   *\n   * @memberof IInputField\n   * @member {string} [autoComplete]\n   */\n  autoComplete?: string;\n  /**\n   * The function to call when the input value changes\n   *\n   * @memberof IInputField\n   * @member {(value: string) => void} onChange\n   * @param value\n   * @returns {void}\n   */\n  onChange: (value: string) => void;\n  /**\n   * The error message to display\n   *\n   * @memberof IInputField\n   * @member {string | FieldError | undefined} [error]\n   */\n  error?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * The children to display in the input. Used Mainly for Icon Buttons\n   *\n   * @memberof IInputField\n   * @member {React.ReactNode} [children]\n   */\n  children?: React.ReactNode;\n  /**\n   * The id of the input\n   *\n   * @memberof IInputField\n   * @member {string} [id]\n   */\n  id?: string;\n  /**\n   * Whether the increment/decrement spinner should be hidden\n   *\n   * @memberof IInputField\n   * @member {boolean} [hideSpinner]\n   */\n  hideSpinner?: boolean;\n}\n\n/**\n * Input Field Dynamic Input Component that renders an input with a label that\n * moves over the top of the input when the input is focused.\n *\n * @param {IInputField} props - The props to pass to the component.\n * @returns {React.FC<IInputField>} Input Dynamic Component\n */\nconst InputField = forwardRef<HTMLInputElement, IInputField>(\n  (\n    {\n      label,\n      name,\n      value,\n      error,\n      type,\n      readOnly,\n      required,\n      children,\n      onChange,\n      autoComplete = '',\n      id,\n      hideSpinner,\n    },\n    ref\n  ) => {\n    const [inputValue, setInputValue] = useState('');\n    /** If value is passed in props, set input value */\n    useEffect(() => {\n      setInputValue(value || '');\n    }, [value]);\n    /**\n     * Change Value Change Value of input on the prop on change and state.\n     *\n     * @param {React.ChangeEvent<HTMLInputElement>} event - The event to get the\n     *   value from.\n     */\n    const changeValue = (event: React.ChangeEvent<HTMLInputElement>) => {\n      setInputValue(event.target.value);\n      onChange(event.target.value);\n    };\n\n    // Set the default Label Class and Input Classes\n    let labelClass = labelClasses;\n    let inputClass = inputClasses;\n\n    // If no input values apply additional classes\n    if (!inputValue) {\n      labelClass = `${labelClasses} ${labelFocusClasses} ${labelPeerPlaceholderShownClasses}`;\n    }\n    // If there is an error apply additional classes\n    if (error) {\n      labelClass = `${labelClass} !text-error-200`;\n      inputClass = `${inputErrorClasses} ${inputClass}`;\n    }\n\n    // If their is a read only value apply additional classes\n    if (readOnly) {\n      inputClass = `${inputClass} ${inputDisabledClasses}`;\n      labelClass = `${labelClass} ${labelDisabledClasses}`;\n    }\n\n    const testId = `input-${type}-${readOnly}`;\n\n    return (\n      <>\n        <div className=\"relative\" data-testid={testId}>\n          <input\n            type={type}\n            id={id || name}\n            value={inputValue}\n            onChange={changeValue}\n            aria-invalid={error ? 'true' : 'false'}\n            required={required}\n            readOnly={readOnly}\n            disabled={readOnly}\n            className={`${inputClass} ${hideSpinner ? 'no-spinners' : ''}`}\n            data-testid=\"input-field-input\"\n            placeholder=\" \"\n            autoComplete={autoComplete}\n            ref={ref}\n          />\n          <label\n            htmlFor={id || name}\n            className={labelClass}\n            data-testid={`input-label-${name}`}\n          >\n            {label}\n          </label>\n          <div className=\"absolute top-1/2 right-2.5 transform -translate-x-1/2 -translate-y-1/2 z-10\">\n            {children}\n          </div>\n        </div>\n        <InputError error={error} />\n      </>\n    );\n  }\n);\n\nInputField.displayName = 'InputField';\n\nexport default InputField;\n","import { ColorShade, ColorType } from '@/components/atoms/Colors/Colors';\nimport Icon, { IconType } from '@/components/atoms/Icon/Icon';\nimport { cva } from 'cva';\n\n/** Input Button Classes The classes for the Input Button Component using CVA. */\nconst inputButtonClasses = cva(\n  'w-full h-16 flex justify-center items-center border-solid rounded group transition-all duration-100 cursor-pointer border-2',\n  {\n    variants: {\n      state: {\n        active: ' bg-base-100 border-base-300',\n        normal:\n          'text-neutral-800 border-neutral-300 supports-hover:hover:bg-base-100 supports-hover:hover:border-base-300 supports-hover:hover:text-base-400',\n      },\n    },\n  }\n);\n\n/**\n * Input Button Text Classes The classes for the Input Button Text Component\n * using CVA.\n */\nconst inputButtonTextClasses = cva(\n  `text-body5 font-petco font-bold transition-all duration-100 flex items-center`,\n  {\n    variants: {\n      state: {\n        active: 'text-base-400',\n        normal: 'text-neutral-800 group-hover:text-base-400',\n      },\n    },\n  }\n);\n\n/**\n * IInputButton Interface for the Input Button Component\n *\n * @augments React.HTMLAttributes<HTMLButtonElement>\n * @interface IInputButton\n */\nexport interface IInputButton extends React.HTMLAttributes<HTMLButtonElement> {\n  /**\n   * The text to display.\n   *\n   * @memberof IInputButton\n   * @member {string} text\n   */\n  text: string;\n  /**\n   * The icon to display.\n   *\n   * @memberof IInputButton\n   * @member {IconType} icon\n   */\n  icon: IconType;\n  /**\n   * The value to use for the input.\n   *\n   * @memberof IInputButton\n   * @member {string} value\n   */\n  value: string;\n  /**\n   * Whether the button is active or not.\n   *\n   * @memberof IInputButton\n   * @member {boolean} active\n   */\n  active: boolean;\n}\n\n/**\n * InputButton A Selectable Input Button Type to use in a Form\n *\n * @param {IInputButton} props - The props for the InputButton component\n * @returns {React.FC<IInputButton>} InputButton Component\n */\nconst InputButton: React.FC<IInputButton> = ({\n  active,\n  text,\n  icon,\n  ...rest\n}: IInputButton) => {\n  /**\n   * States The states for the Input Button Component\n   *\n   * @type {'active' | 'normal'}\n   */\n  type states = 'active' | 'normal';\n  let currentIconColorType: ColorType = 'neutral';\n  let currentIconColorShade: ColorShade = 800;\n  let currentState: states = 'normal';\n\n  if (active) {\n    currentState = 'active';\n    currentIconColorType = 'base';\n    currentIconColorShade = 400;\n  }\n\n  return (\n    <button\n      type=\"button\"\n      data-testid=\"input-button\"\n      className={inputButtonClasses({ state: currentState })}\n      {...rest}\n    >\n      <div className=\"flex align-middle space-x-2\">\n        <Icon\n          icon={icon}\n          colorShade={currentIconColorShade}\n          colorType={currentIconColorType}\n          size={24}\n        />\n        <span className={inputButtonTextClasses({ state: currentState })}>\n          {text}\n        </span>\n      </div>\n    </button>\n  );\n};\n\nexport default InputButton;\n","import InputButton, {\n  IInputButton,\n} from '@/components/molecules/InputButton/InputButton';\nimport { cva } from 'cva';\nimport { useEffect, useState } from 'react';\nimport { Control, Controller } from 'react-hook-form';\n\n/** Orientation Type */\nexport type Orientation = 'horizontal' | 'vertical';\n\n/**\n * IInputButtonGroup Interface for the Input Button Group Component\n *\n * @interface IInputButtonGroup\n */\nexport interface IInputButtonGroup {\n  /**\n   * The Label of the Input Button Group\n   *\n   * @memberof IInputButtonGroup\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The Name of the Input Field\n   *\n   * @memberof IInputButtonGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The onChange function to handle the input\n   *\n   * @memberof IInputButtonGroup\n   * @member {Function} onChange\n   * @param {string} value - The value of the input\n   * @returns {void}\n   */\n  onChange: (value: string) => void;\n  /**\n   * The buttons to be rendered\n   *\n   * @memberof IInputButtonGroup\n   * @member {IInputButton[]} options\n   */\n  options: IInputButton[];\n  /**\n   * The Optional classes object for the input button group\n   *\n   * @memberof IInputButtonGroup\n   * @default ''\n   * @member {string} [classes]\n   */\n  classes?: string;\n  /**\n   * The control object from react-hook-form\n   *\n   * @memberof IInputButtonGroup\n   * @member {Control<any>} [control]\n   */\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  control?: Control<any>;\n  /**\n   * The current value of the input button group\n   *\n   * @memberof IInputButtonGroup\n   * @member {string} [currentValue]\n   */\n  currentValue?: string;\n  /**\n   * Optional layout orientation\n   *\n   * @memberof IInputButtonGroup\n   * @default 'horizontal'\n   * @member {Orientation} [orientation]\n   */\n  orientation?: Orientation;\n}\n\n/**\n * InputButtonGroup A Group of Input Buttons that can be used for form inputs\n *\n * @param {IInputButtonGroup} props - The props for the InputButtonGroup\n *   component\n * @returns {React.FC<IInputButtonGroup>} InputButtonGroup Component\n */\nconst InputButtonGroup: React.FC<IInputButtonGroup> = ({\n  label,\n  name,\n  onChange,\n  options,\n  classes = '',\n  control,\n  currentValue,\n  orientation = 'horizontal',\n}: IInputButtonGroup) => {\n  const [activeButton, setActiveButton] = useState<string>('');\n\n  /** Calls the OnChange function when the active button changes */\n  useEffect(() => {\n    onChange(activeButton);\n  }, [activeButton, onChange]);\n\n  /**\n   * Check if the field's current value has changed, and if so, update the\n   * active button value\n   */\n  useEffect(() => {\n    setActiveButton(currentValue || '');\n  }, [currentValue]);\n\n  /**\n   * Base Data Test Id\n   *\n   * @constant\n   */\n  const dataTestId = 'input-button-group';\n\n  /**\n   * Input Button Group Classes\n   *\n   * @constant\n   */\n  const inputButtonClasses = cva('flex', {\n    variants: {\n      state: {\n        horizontal: 'flex-row space-x-4',\n        vertical: 'flex-col space-y-4',\n      },\n    },\n  });\n\n  return (\n    <div\n      data-testid={`${dataTestId}${control ? '-control' : ''}`}\n      className={classes}\n    >\n      <div className=\"mb-2\">\n        <label htmlFor={name} className=\"font-petco font-bold\">\n          {label}\n        </label>\n        <input type=\"hidden\" name={label} value={activeButton} />\n      </div>\n      <div\n        className={inputButtonClasses({\n          state: orientation,\n        })}\n      >\n        {control ? (\n          <Controller\n            control={control}\n            name={name}\n            render={({ field }) => (\n              <>\n                {options.map((option) => (\n                  <InputButton\n                    key={option.value}\n                    {...option}\n                    onClick={() => {\n                      let value = option.value;\n\n                      if (field.value === value) {\n                        value = '';\n                      }\n                      setActiveButton(value);\n                      field.onChange(value);\n                    }}\n                    active={option.value === activeButton}\n                  />\n                ))}\n              </>\n            )}\n          />\n        ) : (\n          <>\n            {options.map((option) => (\n              <InputButton\n                key={option.value}\n                {...option}\n                onClick={() => setActiveButton(option.value)}\n                active={option.value === activeButton}\n              />\n            ))}\n          </>\n        )}\n      </div>\n    </div>\n  );\n};\n\nexport default InputButtonGroup;\n","import InputCheckbox from '@/components/atoms/InputCheckbox/InputCheckbox';\nimport InputError from '@/components/atoms/InputError/InputError';\nimport IRegisterFunction from '@/components/atoms/InputField/IRegisterFunction';\nimport InputLabel from '@/components/atoms/InputLabel/InputLabel';\nimport { FieldError, FieldErrorsImpl, Merge } from 'react-hook-form';\n\n/**\n * IInputCheckBoxGroup - The props for the Input Check Box Group component.\n *\n * @interface IInputCheckBoxGroup\n */\nexport interface IInputCheckBoxGroup {\n  /**\n   * The name of the input to be used for the label's 'for' attribute.\n   *\n   * @memberof IInputCheckBoxGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The label for the input field.\n   *\n   * @memberof IInputCheckBoxGroup\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The error object from react-hook-form\n   *\n   * @memberof IInputCheckBoxGroup\n   * @member {FieldError | Merge<FieldError, FieldErrorsImpl<FieldError>>} [error]\n   */\n  error?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * The register function from react-hook-form\n   *\n   * @memberof IInputCheckBoxGroup\n   * @member {IRegisterFunction} register\n   */\n  register: IRegisterFunction;\n  /**\n   * If the field is readOnly\n   *\n   * @memberof IInputCheckBoxGroup\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n  /**\n   * The optional classes applied to the wrapper div.\n   *\n   * @memberof IInputCheckBoxGroup\n   * @default ''\n   * @member {string} [classes]\n   */\n  classes?: string;\n}\n\n/**\n * Input Check Box Group Used to display a label, input check box, and error\n * message for a form input. Should be used with react-hook-form.\n *\n * @param {IInputCheckBoxGroup} props - The props for the Input Check Box Group\n * @returns {React.FC<IInputCheckBoxGroup>} Input Check Box Group Component\n */\nconst InputCheckBoxGroup: React.FC<IInputCheckBoxGroup> = ({\n  name,\n  label,\n  error,\n  register,\n  classes = '',\n  readOnly = false,\n  ...rest\n}: IInputCheckBoxGroup) => {\n  const inputCheckBoxGroupClasses = `inline-flex items-center p-[3.5px] rounded [&:has(:focus-visible)]:ring-1 [&:has(:focus-visible)]:ring-focus-400 cursor-pointer ${classes}`;\n  const labelDisabledClass = readOnly ? '!text-neutral-500' : '';\n\n  return (\n    <>\n      <div data-testid=\"input-check-box-group\">\n        <InputLabel\n          name={name}\n          classes={`!items-start [&>input]:mt-[5px] ${inputCheckBoxGroupClasses} ${\n            readOnly ? '!cursor-not-allowed' : ''\n          }`}\n        >\n          <InputCheckbox\n            name={name}\n            register={register}\n            error={error?.message as string}\n            readOnly={readOnly}\n            classes=\"mr-2\"\n            {...rest}\n          />\n          <span className={`text-[1rem] ${labelDisabledClass}`}>{label}</span>\n        </InputLabel>\n      </div>\n      <InputError error={error} classes=\"ml-[3px]\" />\n    </>\n  );\n};\n\nexport default InputCheckBoxGroup;\n","import InputFieldDateSelector from '@/components/atoms/InputFieldDateSelector/InputFieldDateSelector';\nimport {\n  Control,\n  Controller,\n  FieldError,\n  FieldErrorsImpl,\n  Merge,\n} from 'react-hook-form';\n\n/**\n * IInputFieldDateGroup\n *\n * @interface IInputFieldDateGroup\n */\nexport interface IInputFieldDateGroup {\n  /**\n   * The name of the input to be used for the label's 'for' attribute.\n   *\n   * @memberof IInputFieldDateGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The label for the input field.\n   *\n   * @memberof IInputFieldDateGroup\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The error object from react-hook-form\n   *\n   * @memberof IInputFieldDateGroup\n   * @member {FieldError | Merge<FieldError, FieldErrorsImpl<FieldError>>} [error]\n   */\n  error?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * The control function from react-hook-form\n   *\n   * @memberof IInputFieldDateGroup\n   * @member {Control<any>} [control]\n   */\n  // - An any is required here for some of the limitations of react-hook-form for the Control Type.\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  control?: Control<any>;\n  /**\n   * The minimum date with no default\n   *\n   * @memberof IInputFieldDateGroup\n   * @member {string} [min]\n   */\n  min?: string;\n  /**\n   * The maximum date\n   *\n   * @memberof IInputFieldDateGroup\n   * @default today\n   * @member {string} [max]\n   */\n  max?: string;\n  /**\n   * Optional Read Only\n   *\n   * @memberof IInputFieldDateGroup\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n  /**\n   * The optional force popper bottom\n   *\n   * @memberof IInputFieldDateGroup\n   * @member {boolean} [forceDatePickerPopperBottom]\n   */\n  forceDatePickerPopperBottom?: boolean;\n}\n\n/**\n * InputFieldDateGroup A group for the Input Field Date component\n *\n * @param {IInputFieldDateGroup} props - The props for the InputFieldDateGroup\n *   component\n * @returns {React.FC<IInputFieldDateGroup>} Component\n */\nconst InputFieldDateGroup: React.FC<IInputFieldDateGroup> = ({\n  name,\n  label,\n  error,\n  control,\n  min,\n  max,\n  readOnly,\n  forceDatePickerPopperBottom,\n}: IInputFieldDateGroup) => {\n  return (\n    <div\n      data-testid=\"input-field-date-group\"\n      className=\"block pointer-events-none touch-none\"\n    >\n      {/* Look for the Control - Mainly for displaying out in Storybook */}\n      {control ? (\n        <Controller\n          control={control}\n          name={name}\n          render={({ field: { ref, ...field } }) => {\n            return (\n              <InputFieldDateSelector\n                selectsRange={false}\n                min={min}\n                max={max}\n                label={label}\n                inputRef={ref}\n                error={error}\n                {...field}\n                readOnly={readOnly}\n                forceDatePickerPopperBottom={forceDatePickerPopperBottom}\n              />\n            );\n          }}\n        />\n      ) : (\n        <InputFieldDateSelector\n          selectsRange={false}\n          min={min}\n          max={max}\n          label={label}\n          name={name}\n          error={error}\n          readOnly={readOnly}\n          forceDatePickerPopperBottom={forceDatePickerPopperBottom}\n        />\n      )}\n    </div>\n  );\n};\n\nexport default InputFieldDateGroup;\n","import InputField from '@/components/atoms/InputField/InputField';\nimport {\n  Control,\n  Controller,\n  FieldError,\n  FieldErrorsImpl,\n  Merge,\n} from 'react-hook-form';\n\n/**\n * IInputFieldGroup Interface for the InputFieldGroup Component\n *\n * @interface IInputFieldGroup\n */\nexport interface IInputFieldGroup {\n  /**\n   * The name of the input to be used for the label's 'for' attribute.\n   *\n   * @memberof IInputFieldGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The label for the input field.\n   *\n   * @memberof IInputFieldGroup\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The error object from react-hook-form\n   *\n   * @memberof IInputFieldGroup\n   * @member {FieldError | Merge<FieldError, FieldErrorsImpl<FieldError>>} [error]\n   */\n  error?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * The type of the input field. Can be text, email, password, number, tel,\n   * url, search, date, time, datetime-local, month, or week.\n   *\n   * @memberof IInputFieldGroup\n   * @member {string} type\n   */\n  type:\n    | 'text'\n    | 'email'\n    | 'password'\n    | 'number'\n    | 'tel'\n    | 'url'\n    | 'search'\n    | 'date'\n    | 'time'\n    | 'datetime-local'\n    | 'month'\n    | 'week';\n  /**\n   * The control function from react-hook-form\n   *\n   * @memberof IInputFieldGroup\n   * @member {Control<any>} [control]\n   */\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  control?: Control<any>;\n  /**\n   * Optional Read Only\n   *\n   * @memberof IInputFieldGroup\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n  /**\n   * Optional Id\n   *\n   * @memberof IInputFieldGroup\n   * @member {string} [fieldId]\n   */\n  fieldId?: string;\n  /**\n   * Whether the increment/decrement spinner should be hidden\n   *\n   * @memberof IInputFieldGroup\n   * @member {boolean} [hideSpinner]\n   */\n  hideSpinner?: boolean;\n}\n\n/**\n * Input Field Group Used to display a label, input field, and error message for\n * a form input. Allows for different types. Should be used with\n * react-hook-form.\n *\n * @param {IInputFieldGroup} props - The props for the InputFieldGroup\n * @returns {React.FC<IInputFieldGroup>} InputFieldGroup Component\n */\nconst InputFieldGroup: React.FC<IInputFieldGroup> = ({\n  name,\n  label,\n  type,\n  error,\n  control,\n  readOnly,\n  fieldId,\n  hideSpinner,\n}: IInputFieldGroup) => {\n  return (\n    <div data-testid=\"input-field-group\">\n      {/* Look for the Control - Mainly for displaying out in Storybook */}\n      {control ? (\n        <Controller\n          control={control}\n          name={name}\n          render={({ field: { ref, ...field } }) => {\n            return (\n              <InputField\n                label={label}\n                type={type}\n                ref={ref}\n                error={error}\n                readOnly={readOnly}\n                id={fieldId}\n                hideSpinner={hideSpinner}\n                {...field}\n              />\n            );\n          }}\n        />\n      ) : (\n        <InputField\n          label={label}\n          id={fieldId}\n          name={name}\n          type={type}\n          readOnly={readOnly}\n          hideSpinner={hideSpinner}\n          onChange={() => {\n            return;\n          }}\n          error={error}\n        />\n      )}\n    </div>\n  );\n};\n\nexport default InputFieldGroup;\n","import { getReverseGeocode } from '@/lib/dataSource/lostApi/utilities/geolocation/reverseGeocode';\nimport { tomorrow } from '@/lib/utils/helpers/dateHelpers/dates';\nimport SessionStorage from '@/lib/utils/storage/session-storage';\nimport { IServiceMethodResponse } from '@petcolove/lost--client--api-sdk/dist/abstract/service/interfaces';\nimport { IReverseGeocode } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/utilities/geolocation/reverseGeocode/dto';\nimport { useEffect, useState } from 'react';\nimport { FieldError } from 'react-hook-form';\n\n/**\n * Interface for the useGeolocation hook params\n *\n * @interface IUseGeolocationParams\n */\ninterface IUseGeolocationParams {\n  /**\n   * Fetch position on hook load\n   *\n   * @default true\n   */\n  loadInitial?: boolean;\n  /**\n   * Reverse geocode position\n   *\n   * @default true\n   */\n  reverseGeocode?: boolean;\n}\n\n/**\n * Location Object\n *\n * Basic location object for latitude and longitude\n */\ninterface ILocationObject {\n  /**\n   * The latitude of the location\n   *\n   * @type {number}\n   */\n  latitude: number;\n  /**\n   * The longitude of the location\n   *\n   * @type {number}\n   */\n  longitude: number;\n}\n\n/**\n * Position Type\n *\n * @typedef\n */\ntype Position = {\n  /**\n   * The location of the user\n   *\n   * @type {object}\n   */\n  location: {\n    /**\n     * The latitude of the position\n     *\n     * @type {number | null}\n     */\n    latitude: number | null;\n    /**\n     * The longitude of the position\n     *\n     * @type {number | null}\n     */\n    longitude: number | null;\n  };\n  /** The error message if there is an error */\n  error: string | null;\n};\n\n/** Geolocation Position Error Type */\nexport interface GeolocationPositionError {\n  /**\n   * The error code\n   *\n   * @type {number}\n   */\n  code: number;\n  /**\n   * The error message\n   *\n   * @type {string}\n   */\n  message: string;\n}\n\n/**\n * A hook to get the current position of the user.\n *\n * This hook will return the current position of the user. It will also store\n * the position in session storage so that it can be used later.\n *\n * @param {boolean} loadInitial - Whether or not to load the initial position\n * @returns {Position} The current position of the user\n */\nexport const useGeolocation = ({\n  loadInitial = true,\n  reverseGeocode = true,\n}: IUseGeolocationParams) => {\n  /**\n   * Setup the initial state\n   *\n   * @constant {Position} position - The position object\n   */\n  const [position, setPosition] = useState<Position>({\n    location: {\n      latitude: null,\n      longitude: null,\n    },\n    error: null,\n  });\n\n  /**\n   * Not allowed geo error state\n   *\n   * @constant {FieldError | undefined} notAllowedGeoError - The not allowed\n   *   error object\n   */\n  const [notAllowedGeoError, setNotAllowedGeoError] = useState<\n    FieldError | undefined\n  >(undefined);\n\n  /** Clear the not allowed geo error */\n  const clearNotAllowedGeoError = () => {\n    setNotAllowedGeoError(undefined);\n  };\n\n  /**\n   * The reverse geocode position is the position object returned from a given\n   * latitude and longitude\n   *\n   * @constant {IReverseGeocode} reversedGeocodePosition - The reverse geocode\n   */\n  const [reversedGeocodePosition, setReversedGeocodePosition] =\n    useState<IReverseGeocode>();\n\n  /**\n   * The loading state of the hook. This will be true when the hook is fetching\n   *\n   * @constant {boolean} loading - The loading state of the hook\n   */\n  const [loading, setLoading] = useState<boolean>(false);\n\n  /**\n   * Setup the Initial Session Storage\n   *\n   * @constant {SessionStorage} positionStorage - The type of storage to use\n   */\n  const positionStorage = new SessionStorage();\n\n  /**\n   * Setup the Initial Session Storage Key\n   *\n   * @constant {string} positionStorageKey - The key to use for the storage\n   */\n  const positionStorageKey = 'location';\n\n  /**\n   * How to handle a successful position request\n   *\n   * @param {Position} position - The position returned from the browser\n   */\n  const handleSuccess = (position: GeolocationPosition) => {\n    storePosition({\n      latitude: position.coords.latitude,\n      longitude: position.coords.longitude,\n    });\n    setPosition({\n      location: {\n        latitude: position.coords.latitude,\n        longitude: position.coords.longitude,\n      },\n      error: null,\n    });\n    if (!reverseGeocode) setLoading(false);\n  };\n\n  /**\n   * How to handle an error from the browser\n   *\n   * @param {GeolocationPositionError} error - The error returned from the\n   *   browser\n   */\n  const handleError = (error: GeolocationPositionError) => {\n    setPosition({\n      location: {\n        latitude: null,\n        longitude: null,\n      },\n      error: error.message,\n    });\n    if (!reverseGeocode) setLoading(false);\n  };\n\n  /**\n   * Store the position in session storage\n   *\n   * @param {ILocationObject} location - The location to store\n   */\n  const storePosition = ({ latitude, longitude }: ILocationObject) => {\n    positionStorage.set(\n      positionStorageKey,\n      {\n        latitude,\n        longitude,\n      },\n      {\n        expires: tomorrow,\n      }\n    );\n  };\n\n  /** Fetch the position from the browser or session storage */\n  const fetchPosition = () => {\n    /** Set the loading state of the hook */\n    setLoading(true);\n    /** Check if we have the position in session storage */\n    const storedPosition = positionStorage.get(\n      positionStorageKey\n    ) as ILocationObject;\n    if (storedPosition) {\n      setPosition({\n        location: {\n          latitude: storedPosition.latitude,\n          longitude: storedPosition.longitude,\n        },\n        error: null,\n      });\n    } else {\n      navigator.geolocation.getCurrentPosition(handleSuccess, handleError, {\n        enableHighAccuracy: false,\n        maximumAge: 60000,\n        timeout: 5000,\n      });\n    }\n  };\n\n  /** Hook to fetch the position on load */\n  useEffect(() => {\n    if (loadInitial) fetchPosition;\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n\n  /** Hook to fetch the reverse geocode on position change if required */\n  useEffect(() => {\n    const { latitude, longitude } = position.location;\n    if (reverseGeocode && latitude && longitude) {\n      getReverseGeocode({\n        latitude,\n        longitude,\n      })\n        .then((response) => setReversedGeocodePosition(response))\n        .catch((error) => {\n          if ((error as IServiceMethodResponse).statusCode === 422) {\n            /** Delete the currently set position */\n            positionStorage.delete(positionStorageKey);\n            setNotAllowedGeoError({\n              type: 'notAllowedGeoError',\n              message: 'Not available in selected country',\n            });\n          }\n        })\n        .finally(() => setLoading(false));\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [position, reverseGeocode]);\n\n  return {\n    loading,\n    position,\n    reversedGeocodePosition,\n    fetchPosition,\n    notAllowedGeoError,\n    clearNotAllowedGeoError,\n  };\n};\n","/* eslint-disable jsdoc/no-undefined-types */\nimport Icon from '@/components/atoms/Icon/Icon';\nimport InputError, {\n  InputFieldError,\n} from '@/components/atoms/InputError/InputError';\nimport LoadingSpinner from '@/components/atoms/LoadingSpinner/LoadingSpinner';\nimport Paragraph from '@/components/atoms/Paragraph/Paragraph';\nimport ReverseGeocode from '@/lib/dataSource/utilities/geolocation/reverseGeocode';\nimport { useGeolocation } from '@/lib/hooks/geolocation/useGeolocation';\nimport { ToastType, useToastContext } from '@/lib/hooks/toasts/Toast';\nimport { FieldErrorSetter } from '@/lib/utils/helpers/formHelpers/getErrorSetterForField';\nimport { Loader } from '@googlemaps/js-api-loader';\nimport { LegacyRef, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n  ErrorOption,\n  FieldError,\n  FieldErrorsImpl,\n  Merge,\n} from 'react-hook-form';\n\n/**\n * Google Maps Configuration Default Types from\n * https://developers.google.com/maps/documentation/places/web-service/supported_types\n *\n * @constant {string[]} defaultAutocompleteTypes - The default types\n */\nconst defaultAutocompleteTypes = ['address'];\n\n/**\n * Default Valid Countries\n *\n * @constant {string[]} defaultValidCountries - The default valid countries\n */\nconst defaultValidCountries = ['AUS', 'CAN', 'MEX', 'USA'];\n\n/**\n * The keys from the ILocationDto that are significant for error display\n *\n * @constant {[]} significantLocationDtoKeysForError\n */\nconst significantLocationDtoKeysForError: Array<keyof ILocationDto> = ['city'];\n\n/**\n * The default error message for missing address components\n *\n * @constant {string} defaultMissingAddressComponentErrorMessage\n */\nexport const defaultMissingAddressComponentErrorMessage =\n  'This field is required';\n\n/**\n * The Input Field Error Type\n *\n * @type {FieldError | Merge<FieldError, FieldErrorsImpl<FieldError>>}\n */\nexport type InputPlacesFieldGoogleError =\n  | InputFieldError\n  | { [key in keyof ILocationDto]?: FieldError };\n\n/**\n * IInputPlacesFieldGoogleOptionalProps\n *\n * @interface IInputPlacesFieldGoogleOptionalProps\n */\nexport interface IInputPlacesFieldGoogleOptionalProps {\n  /**\n   * A value for the input\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @member {ILocationDto} [value]\n   */\n  value?: ILocationDto;\n  /**\n   * If the input is read only\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n  /**\n   * If the input is required\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @member {boolean} [required]\n   */\n  required?: boolean;\n  /**\n   * On Change Event Handler\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @member {Function} [onChange]\n   * @param {ILocationDto} place - The place selected\n   * @returns {void}\n   */\n  onChange?: (place: ILocationDto) => void;\n  /**\n   * The error message to display\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @member {InputPlacesFieldGoogleError} [error]\n   */\n  error?: InputPlacesFieldGoogleError;\n  /**\n   * The function to set the error\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @member {FieldErrorSetter} [setError]\n   */\n  setError?: FieldErrorSetter;\n  /**\n   * API Key for Google\n   *\n   * This allows us to pass in a different API Key for testing or for Storybook.\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @default `process.env.NEXT_PUBLIC_GOOGLEMAPS_API_KEY`\n   * @member {string} [apiKey]\n   */\n  apiKey?: string;\n  /**\n   * The optional types to use for the autocomplete\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @default \"['geocode']\"\n   * @member {string[]} [autocompleteTypes]\n   */\n  autocompleteTypes?: string[];\n  /**\n   * Valid Countries\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @default \"['AUS', 'CAN', 'MEX', 'USA']\"\n   * @member {string[]} [validCountries]\n   */\n  validCountries?: string[];\n  /**\n   * The children to display\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @member {React.ReactNode} [children]\n   */\n  children?: React.ReactNode;\n  /**\n   * Ref\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @member {LegacyRef<HTMLInputElement>} [outsideRef]\n   */\n  outsideRef?: LegacyRef<HTMLInputElement>;\n  /**\n   * Autocomplete Initialization - This is added for testing\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @member {google.maps.places.Autocomplete | null} [initAutoComplete]\n   */\n  initAutoComplete?: google.maps.places.Autocomplete | null;\n  /**\n   * This boolean allows us to trigger enable a button to use the current from\n   * the browser\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @default true\n   * @member {boolean} [useCurrentLocation]\n   */\n  useCurrentLocation?: boolean;\n  /**\n   * This boolean displays the use current location button inline with the input\n   * instead of as a separate button underneath the input\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @default false\n   * @member {boolean} [inlineCurrentLocation]\n   */\n  inlineCurrentLocation?: boolean;\n  /**\n   * Test Get Place - This boolean allows us to trigger the get place function\n   * that allows us to test the get place function. You will need to pass in the\n   * initAutoComplete prop to test this function. This is added for testing.\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @default false\n   * @member {boolean} [testGetPlace]\n   */\n  testGetPlace?: boolean;\n  /**\n   * No Error Message - This boolean allows us to remove the error message text\n   * from the input field, keeping the error styles.\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @member {boolean} [noErrorMessage]\n   */\n  noErrorMessage?: boolean;\n  /**\n   * A list of required address components to be used as the city\n   *\n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @member {(keyof ILocationDto)[]} [requiredAddressComponents]\n   */\n  requiredAddressComponents?: (keyof ILocationDto)[];\n  /**\n   * Whether the static map should be displayed after the user inputs and\n   * selects a location.\n   * \n   * @memberof IInputPlacesFieldGoogleOptionalProps\n   * @member {boolean} [displayStaticMap]\n   */\n  displayStaticMap?: boolean;\n}\n\n/**\n * IInputPlacesFieldGoogle\n *\n * @augments IInputPlacesFieldGoogleOptionalProps\n * @interface IInputPlacesFieldGoogle\n */\nexport interface IInputPlacesFieldGoogle\n  extends IInputPlacesFieldGoogleOptionalProps {\n  /**\n   * The text to display\n   *\n   * @memberof IInputPlacesFieldGoogle\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The name of the field\n   *\n   * @memberof IInputPlacesFieldGoogle\n   * @member {string} name\n   */\n  name: string;\n}\n\n/**\n * The Coordinates DTO Interface\n *\n * @interface ICoordinatesDto\n */\ninterface ICoordinatesDto {\n  /**\n   * The Latitude\n   *\n   * @memberof ICoordinatesDto\n   * @member {number} latitude\n   */\n  latitude: number;\n  /**\n   * The Longitude\n   *\n   * @memberof ICoordinatesDto\n   * @member {number} longitude\n   */\n  longitude: number;\n}\n\n/**\n * The Location DTO Interface - This will allow us to move around the location\n * in a consistent way that is agnostic of any service provider or api\n *\n * This interface should\n *\n * @interface ILocationDto\n */\nexport interface ILocationDto {\n  /**\n   * The City\n   *\n   * @memberof ILocationDto\n   * @member {string} city\n   */\n  city: string;\n  /**\n   * The Region\n   *\n   * @memberof ILocationDto\n   * @member {string} region\n   */\n  region: string;\n  /**\n   * The Postal Code\n   *\n   * @memberof ILocationDto\n   * @member {string} postalCode\n   */\n  postalCode?: string;\n  /**\n   * The Street Address\n   *\n   * @memberof ILocationDto\n   * @member {string} [streetAddress]\n   */\n  streetAddress?: string;\n  /**\n   * The Coordinates\n   *\n   * @memberof ILocationDto\n   * @member {ICoordinatesDto} coordinates\n   */\n  coordinates: ICoordinatesDto;\n  /**\n   * The Country\n   *\n   * @memberof ILocationDto\n   * @member {string} country\n   */\n  country: string;\n  /**\n   * The Label\n   *\n   * @memberof ILocationDto\n   * @member {string} label\n   */\n  label: string;\n}\n\n/**\n * Find Usable City in Address Components\n *\n * @param {google.maps.GeocoderAddressComponent[]} addressComponents - The\n *   address components\n * @returns {string | undefined} The city or nothing\n */\nexport const findUsableCity = (\n  addressComponents: google.maps.GeocoderAddressComponent[]\n): string | undefined => {\n  /**\n   * The address component to be used as the city\n   *\n   * @type {string | undefined} cityOrOther\n   */\n  let cityOrOther: string | undefined;\n\n  /**\n   * City is a required property according to our ILocationsDto interface so we\n   * should always get a city for any given location.\n   *\n   * Array of possible address components to be used as the city from\n   * https://developers.google.com/maps/documentation/javascript/geocoding\n   *\n   * This array is sorted by highest to lowest priority\n   *\n   * @constant {string[]} cityTypes - Address components to be used as city\n   */\n  [\n    'locality',\n    'postal_town',\n    'sublocality',\n    // Can be: city / state / street / county\n    'administrative_area_level_3',\n    'neighborhood',\n    'colloquial_area',\n    // Is usually county\n    'administrative_area_level_2',\n  ].forEach((type) => {\n    if (!cityOrOther) {\n      cityOrOther = addressComponents.find((component) =>\n        component.types.includes(type)\n      )?.long_name;\n    }\n  });\n  return cityOrOther;\n};\n\n/**\n * Parse Place Address Components from Google into Location DTO\n *\n * @param {googlemaps.places.PlaceResult} place - The place from Google\n * @returns {ILocationDto} The parsed place from Google\n */\nexport const parsePlaces = (\n  place: google.maps.places.PlaceResult\n): ILocationDto => {\n  /**\n   * Find Usable City\n   *\n   * @constant {string} city - The city\n   */\n  const city = findUsableCity(place.address_components || []) || '';\n  const region =\n    place.address_components?.find(\n      (comp: google.maps.GeocoderAddressComponent) =>\n        comp.types.includes('administrative_area_level_1')\n    )?.short_name || '';\n  const postalCode =\n    place.address_components?.find(\n      (comp: google.maps.GeocoderAddressComponent) =>\n        comp.types.includes('postal_code')\n    )?.long_name || '';\n  const streetNumber =\n    place.address_components?.find(\n      (comp: google.maps.GeocoderAddressComponent) =>\n        comp.types.includes('street_number')\n    )?.long_name || '';\n  const route =\n    place.address_components?.find(\n      (comp: google.maps.GeocoderAddressComponent) =>\n        comp.types.includes('route')\n    )?.long_name || '';\n  const country =\n    place.address_components?.find(\n      (comp: google.maps.GeocoderAddressComponent) =>\n        comp.types.includes('country')\n    )?.long_name || '';\n\n  let streetAddress = route;\n\n  if (streetNumber && route) {\n    streetAddress = `${streetNumber} ${route}`;\n  }\n\n  if (!place.geometry?.location) {\n    throw new Error('No geometry found');\n  }\n\n  const coordinates: ICoordinatesDto = {\n    latitude: place.geometry.location.lat(),\n    longitude: place.geometry.location.lng(),\n  };\n\n  return {\n    city,\n    region,\n    postalCode,\n    streetAddress,\n    country,\n    coordinates,\n    label: place.formatted_address || streetAddress,\n  };\n};\n\n/**\n * Merge Refs\n *\n * This allows us to merge multiple refs together into a single Ref. This is\n * required to allow the outsideRef to be merged with the inputRef.\n *\n * @template T - The type of the Reference\n * @param {(React.MutableRefObject<T> | React.LegacyRef<T>)[]} refs - The refs\n *   to merge\n * @returns {React.RefCallback<T>} The merged refs callback\n */\nexport function mergeRefs<T>(\n  refs: Array<React.MutableRefObject<T> | React.LegacyRef<T>>\n): React.RefCallback<T> {\n  return (value) => {\n    refs.forEach((ref) => {\n      if (typeof ref === 'function') {\n        ref(value);\n      } else if (ref != null) {\n        (ref as React.MutableRefObject<T | null>).current = value;\n      }\n    });\n  };\n}\n\n/**\n * Build Appropriate Refs\n *\n * This allows us to build the appropriate refs to use. This is required to\n * allow the outsideRef to be merged with the inputRef.\n *\n * @template T - The type of the Reference\n * @param {LegacyRef<T>[]} refs - The refs to build\n * @returns {LegacyRef<T> | undefined} The Refs to use\n */\nexport function buildRefs<T>(refs: LegacyRef<T>[]): LegacyRef<T> | undefined {\n  if (refs.length === 0) {\n    return undefined;\n  }\n  if (refs.length === 1) {\n    return refs[0];\n  }\n  return mergeRefs<T>(refs);\n}\n\n/**\n * Select First Result form input field predictions by dispatching keyboard\n * events\n *\n * @param {HTMLInputElement} inputField - The input field\n */\nexport const selectFirstResult = (inputField: HTMLInputElement) => {\n  const arrowDown = new KeyboardEvent('keydown', {\n    key: 'ArrowDown',\n    keyCode: 40,\n  });\n  inputField.dispatchEvent(arrowDown);\n\n  const enterDown = new KeyboardEvent('keydown', {\n    key: 'Enter',\n    keyCode: 13,\n  });\n  inputField.dispatchEvent(enterDown);\n};\n\n/**\n * Get significant error\n *\n * @param {InputPlacesFieldGoogleError} error - The input places field google\n *   error\n * @param {(keyof ILocationDto)[]} significantLocationDtoKeysForError - The\n *   array of keys to check for significant error\n * @returns {InputFieldError | undefined} - The significant error\n */\nexport const getSignificantError = (\n  error: InputPlacesFieldGoogleError,\n  significantLocationDtoKeysForError: Array<keyof ILocationDto>\n): InputFieldError | undefined => {\n  if (error) {\n    /**\n     * Find the first key in the error that is in the significant keys for the\n     * ILocationDto if any\n     *\n     * @constant {keyof ILocationDto | undefined} significantErrorKey\n     */\n    const significantErrorKey = significantLocationDtoKeysForError.find(\n      (key: keyof ILocationDto) => key in error\n    );\n    /**\n     * Last check to make sure the significant error key is in the error before\n     * trying to get the error for the found key\n     */\n    return significantErrorKey && significantErrorKey in error\n      ? error[significantErrorKey as keyof typeof error]\n      : (error as InputFieldError);\n  }\n};\n\n/**\n * InputPlacesFieldGoogle Text Input that is integrated with Google Places\n *\n * @param {IInputPlacesFieldGoogle} props - The props for the\n *   InputPlacesFieldGoogle component\n * @returns {React.FC<IInputPlacesFieldGoogle>} Component\n */\nconst InputPlacesFieldGoogle: React.FC<IInputPlacesFieldGoogle> = ({\n  label,\n  onChange,\n  readOnly,\n  value,\n  required,\n  name,\n  error,\n  setError,\n  children,\n  outsideRef,\n  autocompleteTypes = defaultAutocompleteTypes,\n  validCountries = defaultValidCountries,\n  initAutoComplete = null,\n  useCurrentLocation = true,\n  inlineCurrentLocation = false,\n  testGetPlace = false,\n  apiKey,\n  noErrorMessage = false,\n  requiredAddressComponents = ['city'],\n}: IInputPlacesFieldGoogle) => {\n  /**\n   * This is the ref for the HTML Input Element that is used to build the Google\n   * Maps Autocomplete Input\n   */\n  const inputRef = useRef<HTMLInputElement>(null);\n  /**\n   * This is the ref for the Google Maps Autocomplete Service once it has been\n   * initialized by the Google Maps Loader\n   */\n  const autoCompleteRef = useRef<google.maps.places.Autocomplete>(\n    initAutoComplete as google.maps.places.Autocomplete\n  );\n  /** This is the state for the selected place */\n  const [selectedPlace, setSelectedPlace] = useState<ILocationDto>();\n  /** This is the state for the input value of the HTML Field */\n  const [inputValue, setInputValue] = useState('');\n  /** This is for tracking focus state of the HTML Input Element */\n  const [hasFocus, setHasFocus] = useState(false);\n\n  const [inputFieldError, setInputError] = useState<ErrorOption | null>(null);\n\n  /**\n   * Sets the error using the upper level setError function if inputFieldError\n   * is defined\n   */\n  useEffect(() => {\n    if (inputFieldError) {\n      setError?.(inputFieldError);\n    }\n    /*\n     * Adding setError to the dependency array will cause an infinite loop\n     * We do not need to run this effect when setError changes, since a change in the props will trigger a re-render\n     */\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [inputFieldError]);\n\n  /** Validate the input field when the value changes */\n  useEffect(() => {\n    /**\n     * The location object to validate\n     *\n     * @constant {ILocationDto} [locationObject]\n     */\n    const locationObject = value ?? selectedPlace;\n\n    if (\n      !locationObject ||\n      requiredAddressComponents.some(\n        (key) => key in locationObject && locationObject[key]\n      )\n    ) {\n      /*\n       * If there are no values to check or if at least one of the required components\n       * is present, set custom validation error to null\n       */\n      setInputError(null);\n    } else {\n      /*\n       * If none of the required components is present, show required error message\n       * for the entire field\n       */\n      setInputError({\n        type: 'custom',\n        message: defaultMissingAddressComponentErrorMessage,\n      });\n    }\n\n    /*\n     * Adding requiredAddressComponents to the dependency array will cause an infinite loop\n     */\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [value, selectedPlace]);\n\n  const { dispatch } = useToastContext();\n  /**\n   * UseGeolocation Hook to provide the location from the browser.\n   *\n   * @see {useGeolocation}\n   */\n  const {\n    loading: useGeolocationLoading,\n    position,\n    reversedGeocodePosition,\n    fetchPosition,\n    notAllowedGeoError,\n    clearNotAllowedGeoError,\n  } = useGeolocation({\n    reverseGeocode: true,\n  });\n\n  /**\n   * Use the Google Maps Loader to import the Google Maps Places Library. This\n   * handles some of the issues with loading the Google maps library\n   * dynamically\n   *\n   * https://developers.google.com/maps/documentation/javascript/overview#js_api_loader_package\n   */\n  const loader = new Loader({\n    apiKey: apiKey || process.env.NEXT_PUBLIC_GOOGLEMAPS_API_KEY || '',\n    language: 'en',\n    version: 'weekly',\n    libraries: ['places'],\n  });\n\n  /**\n   * The refs to use for the input when building the refs\n   *\n   * @returns {LegacyRef<HTMLInputElement>[]} The refs to use\n   */\n  const refs = (): LegacyRef<HTMLInputElement>[] => {\n    if (outsideRef) {\n      return [outsideRef, inputRef];\n    }\n    return [inputRef];\n  };\n\n  /** If value is passed in props, set input value */\n  useEffect(() => {\n    if (!value) {\n      setInputValue('');\n      setSelectedPlace(undefined);\n    }\n    if (value) {\n      setInputValue(value.label);\n    }\n  }, [value]);\n\n  /** Google Maps Places Autocomplete Configuration */\n  const googleMapsConfiguration: google.maps.places.AutocompleteOptions = {\n    /**\n     * From\n     * https://developers.google.com/maps/documentation/places/web-service/supported_types\n     */\n    types: autocompleteTypes,\n    fields: ['address_components', 'formatted_address', 'geometry', 'name'],\n    componentRestrictions: {\n      country: validCountries,\n    },\n  };\n\n  /**\n   * This is used to get the place when the user clicks off the input. This is\n   * needed because the place_changed event does not fire when the user clicks\n   * off the input. This is also used to clear the selected place if the input\n   * is empty.\n   */\n  const onBlur = () => {\n    if (autoCompleteRef.current && inputValue) {\n      const place = autoCompleteRef.current.getPlace();\n      /**\n       * If unable to get a plate from input field, manually select the first\n       * option before moving forward\n       */\n      if (!place) {\n        selectFirstResult(inputRef.current as HTMLInputElement);\n      }\n      if (place) {\n        const formattedPlace = parsePlaces(place);\n        setSelectedPlace(formattedPlace);\n        onChange?.(formattedPlace);\n      }\n      clearNotAllowedGeoError();\n    }\n    setHasFocus(false);\n    if (!inputValue) {\n      setInputValue('');\n      setSelectedPlace(undefined);\n    }\n  };\n\n  useEffect(() => {\n    /**\n     * Handle the keydown event of the input field. We use this event to select\n     * the first item in the autocomplete list when the user presses enter by\n     * dispatching a keydown event. This handler should also do not dispatch the\n     * keydown event if the user has already selected an item from the\n     * autocomplete list.\n     *\n     * @param {Event} event - The event\n     */\n    const handleKeyDown = (event: Event) => {\n      const { code } = event as KeyboardEvent;\n\n      if (code === 'Enter') {\n        event.preventDefault();\n\n        /**\n         * Query selection by class name to see if there are any selected items\n         *\n         * @constant {HTMLCollectionOf<Element>} googlePlacesAutocompleteSelectedItems\n         */\n        const googlePlacesAutocompleteSelectedItems =\n          document.getElementsByClassName('pac-item-selected');\n\n        /**\n         * If there is at least one result from this query, we don't want to\n         * dispatch the arrow down event and modify user input\n         */\n        if (googlePlacesAutocompleteSelectedItems.length === 0) {\n          selectFirstResult(inputRef.current as HTMLInputElement);\n        }\n      }\n    };\n\n    /**\n     * Use the Google Maps Loader to import the Google Maps Places Library\n     * https://www.npmjs.com/package/@googlemaps/js-api-loader\n     */\n    loader.importLibrary('places').then((places) => {\n      if (inputRef.current) {\n        /** Initialize the Google Maps Autocomplete */\n        const autocomplete = new places.Autocomplete(\n          inputRef.current,\n          googleMapsConfiguration\n        );\n        autoCompleteRef.current = autocomplete;\n\n        /** Add the listener for the place changed event */\n        autocomplete.addListener('place_changed', getPlace);\n\n        /**\n         * The input field to add the keydown event listener to\n         *\n         * @constant {HTMLInputElement} inputField\n         */\n        const inputField = inputRef.current;\n        inputField.addEventListener('keydown', handleKeyDown);\n      }\n    });\n\n    /**\n     * Test Get Place Function - This is strictly used for testing to allow us\n     * to mock what the `place_changed` listener would trigger\n     */\n    if (testGetPlace) {\n      getPlace();\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n\n  /** Update input field value on reverse geocode position change */\n  useEffect(() => {\n    const {\n      location: { latitude, longitude },\n    } = position;\n\n    if (reversedGeocodePosition && latitude && longitude) {\n      /** ReverseGeocode instance to parse response object from API */\n      const reverseGeocode = new ReverseGeocode(reversedGeocodePosition, {\n        latitude,\n        longitude,\n      });\n      const { locationObjectGoogle } = reverseGeocode;\n\n      setInputValue(locationObjectGoogle.label);\n      setSelectedPlace(locationObjectGoogle);\n      onChange?.(locationObjectGoogle);\n    }\n  }, [onChange, position, reversedGeocodePosition]);\n\n  /** On Place Selected Event get the place and set the selected place */\n  const getPlace = () => {\n    if (autoCompleteRef.current) {\n      const returnedPlace: google.maps.places.PlaceResult =\n        autoCompleteRef.current.getPlace();\n      if (!returnedPlace?.geometry) {\n        return;\n      }\n      const formattedPlace = parsePlaces(returnedPlace);\n      setInputValue(formattedPlace.label);\n      if (inputRef.current) {\n        inputRef.current.value = formattedPlace.label;\n      }\n      setSelectedPlace(formattedPlace);\n      onChange?.(formattedPlace);\n    }\n  };\n  /**\n   * Classes for building out the Input to be stylized to match the rest of the\n   * Inputs on the site\n   */\n  let labelClass = 'absolute left-0 px-3 font-petco duration-300';\n  let inputClass =\n    'w-full h-14 rounded font-petco focus:outline-none focus:ring-2 focus:ring-base-400 focus:border-invisible';\n\n  if (inputValue || hasFocus || selectedPlace || inputValue) {\n    labelClass = `pt-1.5 ${labelClass} text-overline`;\n    inputClass = `pt-[26px] pb-1.5 ${inputClass}`;\n  } else {\n    labelClass = `py-4  ${labelClass} text-body4`;\n    inputClass = `${inputClass}`;\n  }\n\n  if (error || notAllowedGeoError) {\n    inputClass = `${inputClass} border-error-200`;\n    labelClass = `${labelClass} text-error-200`;\n  } else {\n    labelClass = `${labelClass} text-neutral-700`;\n  }\n\n  if (readOnly) {\n    inputClass = `${inputClass} text-neutral-600 border-neutral-600 cursor-not-allowed`;\n    labelClass = `${labelClass} text-neutral-600 cursor-not-allowed`;\n  }\n\n  /**\n   * Add padding to the right of the input field if using inline use current\n   * location button so input value is not displayed behind the use current\n   * location button\n   */\n  if (useCurrentLocation && inlineCurrentLocation) {\n    inputClass = `${inputClass} pr-12`;\n  }\n\n  /**\n   * The loading spinner to use when fetching the users location\n   *\n   * @constant {React.ReactElement} useGeolocationLoadingSpinner\n   */\n  const useGeolocationLoadingSpinner = (\n    <LoadingSpinner\n      icon={{\n        icon: 'circleSpinner',\n        colorType: 'neutral',\n        colorShade: 800,\n        size: 24,\n      }}\n    />\n  );\n\n  /**\n   * The significant error to display for the input places field google\n   * component.\n   *\n   * @constant {InputFieldError}\n   */\n  const significantError = useMemo<InputFieldError>(\n    (): InputFieldError =>\n      getSignificantError(error, significantLocationDtoKeysForError),\n    [error]\n  );\n\n  /** The error field to display for the input places field google component */\n  const fieldError = useMemo(\n    () => significantError || notAllowedGeoError || inputFieldError,\n    [inputFieldError, notAllowedGeoError, significantError]\n  );\n\n  /** Fetch the current location if it is not currently in error */\n  const fetchCurrentLocation = () => {\n    if (!notAllowedGeoError) {\n      setInputValue('');\n      setSelectedPlace(undefined);\n      fetchPosition();\n    }\n  };\n\n  /**\n   * Sets the input value, if value is empty it will set selected place as\n   * undefined\n   *\n   * @param {string} inputValue - The value to set the input to\n   */\n  const handleInputValueChange = (inputValue: string) => {\n    setInputValue(inputValue);\n    const emptyLocation: ILocationDto = {\n      region: '',\n      city: '',\n      country: '',\n      label: '',\n      coordinates: {\n        latitude: 0,\n        longitude: 0,\n      },\n    };\n\n    if (inputValue === '') {\n      setSelectedPlace(undefined);\n      onChange?.(emptyLocation);\n    }\n  };\n\n  /**\n   * Handles displaying a toast message.\n   *\n   * @param {ToastType} type - The type of toast message\n   * @param {string} message - The content of the toast message\n   * @returns {void}\n   */\n  const handleToast = (type: ToastType, message: string): void => {\n    dispatch({\n      type: 'ADD_TOAST',\n      toast: {\n        id: '1',\n        type: type,\n        message: message,\n        persistent: false,\n        showIcon: true,\n      },\n    });\n  };\n\n  /**\n   * Function to check browser permission and fetch current location if\n   * permission is granted.\n   */\n  const checkBrowserPermission = () => {\n    navigator.geolocation.getCurrentPosition(\n      () => {\n        !useGeolocationLoading && fetchCurrentLocation();\n      },\n      (e) => {\n        if (e.code === 1) {\n          handleToast(\n            'error',\n            'Your location is blocked. Please adjust your permissions or complete the field below.'\n          );\n        }\n      }\n    );\n  };\n\n  return (\n    <div>\n      <div className=\"relative\" data-testid=\"input-places-field-google\">\n        <input\n          type=\"text\"\n          id={name}\n          name={name + '-search'}\n          aria-invalid={error ? 'true' : 'false'}\n          value={inputValue}\n          required={required}\n          readOnly={readOnly}\n          disabled={readOnly}\n          className={inputClass}\n          onFocus={() => setHasFocus(true)}\n          onBlur={() => onBlur()}\n          onChange={(e) => handleInputValueChange(e.target.value)}\n          data-testid=\"input-places-field-google-input\"\n          placeholder=\" \"\n          autoComplete=\"off\"\n          ref={buildRefs(refs())}\n        />\n        <label\n          htmlFor={name}\n          className={labelClass}\n          data-testid={`input-label-${name}`}\n        >\n          {label}\n        </label>\n        <div className=\"absolute top-[15px] right-2.5 z-10\">\n          {children}\n          {useCurrentLocation && inlineCurrentLocation && (\n            <div\n              onClick={() => checkBrowserPermission()}\n              data-testid=\"input-places-field-google-use-current-location-inline\"\n            >\n              {useGeolocationLoading ? (\n                <div\n                  data-testid=\"input-places-field-google-use-current-location-inline-loading\"\n                  className=\"flex items-end\"\n                >\n                  {useGeolocationLoadingSpinner}\n                </div>\n              ) : (\n                <Icon\n                  icon={'crosshairsLight'}\n                  size={24}\n                  colorType={notAllowedGeoError ? 'neutral' : 'base'}\n                  colorShade={notAllowedGeoError ? 600 : 300}\n                  classes={\n                    notAllowedGeoError ? 'cursor-not-allowed' : 'cursor-pointer'\n                  }\n                />\n              )}\n            </div>\n          )}\n        </div>\n\n        {fieldError && !noErrorMessage && <InputError error={fieldError} />}\n        {useCurrentLocation && !inlineCurrentLocation && (\n          <div\n            className=\"max-w-fit flex flex-row pt-2\"\n            data-testid=\"input-places-field-google-use-current-location\"\n          >\n            {useGeolocationLoading ? (\n              <div\n                data-testid=\"input-places-field-google-use-current-location-loading\"\n                className=\"flex items-end\"\n              >\n                {useGeolocationLoadingSpinner}\n                <Paragraph size=\"body5\">Retrieving location</Paragraph>{' '}\n              </div>\n            ) : (\n              <div\n                className={`flex flex-row ${\n                  notAllowedGeoError\n                    ? 'no-underline cursor-not-allowed'\n                    : 'cursor-pointer underline hover:no-underline'\n                }`}\n                data-testid=\"input-places-field-google-use-current-location-button\"\n                onClick={() => checkBrowserPermission()}\n              >\n                <Icon\n                  icon=\"navigationArrow\"\n                  size={24}\n                  colorType=\"neutral\"\n                  colorShade={notAllowedGeoError ? 600 : 800}\n                />\n                <Paragraph\n                  size=\"body5\"\n                  className={notAllowedGeoError && 'text-neutral-600'}\n                >\n                  Use current location\n                </Paragraph>\n              </div>\n            )}\n          </div>\n        )}\n      </div>\n    </div>\n  );\n};\n\nexport default InputPlacesFieldGoogle;\n","import { useEffect, useState } from 'react';\n\n/**\n * Get the user's device pixel ratio.\n *\n * @returns {number} The device pixel ratio.\n */\nexport function useGetDevicePixelRatio() {\n  const [pixelRatio, setPixelRatio] = useState(0);\n\n  useEffect(() => {\n    setPixelRatio(window.devicePixelRatio);\n  }, []);\n\n  return pixelRatio;\n}\n","/* eslint-disable @next/next/no-img-element */\n\nimport { useGetDevicePixelRatio } from '@/lib/hooks/devicePixelRatio/devicePixelRatio';\nimport { IGeoCoordinates } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/constants/interfaces';\n\n/**\n * IGoogleStaticMap\n *\n * @interface IGoogleStaticMap\n */\nexport interface IGoogleStaticMap {\n  /**\n   * The center coordinates.\n   *\n   * @memberof IGoogleStaticMap\n   * @member {IGeoCoordinates} [center]\n   */\n  center?: IGeoCoordinates;\n  /**\n   * The rendered size of the map.\n   *\n   * @memberof IGoogleStaticMap\n   * @member {string} [size]\n   */\n  size?: string;\n}\n\nconst iconScaleToSizeMap = {\n  '1': 'width=41&height=48',\n  '2': 'width=82&height=96',\n};\n\n/**\n * Renders a static map from google.\n *\n * @param {IGoogleStaticMap} props - The props for the GoogleStaticMap component\n * @returns {React.FC<IGoogleStaticMap>} Component\n */\nconst GoogleStaticMap: React.FC<IGoogleStaticMap> = ({\n  center,\n  size = '400x200',\n}) => {\n  const apiKey = process.env.NEXT_PUBLIC_GOOGLEMAPS_API_KEY;\n  const mapId = process.env.NEXT_PUBLIC_GOOGLEMAPS_MAP_ID;\n\n  const pixelRatio = useGetDevicePixelRatio();\n  const scale = pixelRatio > 1 ? '2' : '1';\n\n  if (!center) {\n    return null;\n  }\n\n  if (!apiKey) {\n    console.error(\n      'The static map api key is not defined. The map will not be rendered.'\n    );\n    return null;\n  }\n\n  if (!mapId) {\n    console.error(\n      'The static map id is not defined. The map will not be rendered.'\n    );\n    return null;\n  }\n\n  const params = new URLSearchParams();\n\n  const latLngString = `${center.latitude},${center.longitude}`;\n\n  const mapMarkerUrl = `${process.env.NEXT_PUBLIC_CDN_BASE_URL}/assets/lost/map/map-marker-paw-purple.svg?${iconScaleToSizeMap[scale]}`;\n\n  params.set('key', apiKey);\n  params.set('map_id', mapId);\n  params.set('zoom', '16');\n  params.set('scale', scale);\n\n  params.set('center', latLngString);\n  params.set('size', size);\n  params.set('markers', `icon:${mapMarkerUrl}|scale:${scale}|${latLngString}`);\n\n  /*\n   * It seems there's no explicit way to change the google logo to white,\n   * but setting any `style` does the trick. The following style shouldn't\n   * affect how the map is rendered.\n   */\n  params.set('style', 'feature:water|element:geometry|visibility:on');\n\n  return (\n    <div data-testid=\"google-static-map\" className=\"\">\n      <img\n        data-testid=\"google-static-map-image\"\n        src={`https://maps.googleapis.com/maps/api/staticmap?${params.toString()}`}\n        alt=\"The map of your selected location\"\n        className=\"mx-auto rounded-xl aspect-[2/1]\"\n      />\n    </div>\n  );\n};\n\nexport default GoogleStaticMap;\n","import InputPlacesFieldGoogle, {\n  IInputPlacesFieldGoogle,\n} from '@/components/molecules/InputPlacesFieldGoogle/InputPlacesFieldGoogle';\nimport { flagStaticMapInAddressStep } from '@/lib/constants/constants/featureFlags';\nimport { useOptimizelyFeature } from '@/lib/hooks/featureFlags/useOptimizelyFeature';\nimport { FieldErrorSetter } from '@/lib/utils/helpers/formHelpers/getErrorSetterForField';\nimport { Control, Controller } from 'react-hook-form';\nimport GoogleStaticMap from '../GoogleStaticMap/GoogleStaticMap';\n\n/**\n * IInputPlacesGroup\n *\n * @augments IInputPlacesFieldGoogle\n * @interface IInputPlacesGroupGoogle\n */\nexport interface IInputPlacesGroupGoogle extends IInputPlacesFieldGoogle {\n  /**\n   * The input field name\n   *\n   * @memberof IInputPlacesGroupGoogle\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The function to set the error\n   *\n   * @memberof IInputPlacesGroupGoogle\n   * @member {FieldErrorSetter} [setError]\n   */\n  setError?: FieldErrorSetter;\n  /**\n   * The control object from react-hook-form - An any is required here for some\n   * of the limitations of react-hook-form for the Control Type.\n   *\n   * @memberof IInputPlacesGroupGoogle\n   * @member {Control} [control]\n   */\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  control?: Control<any>;\n  /**\n   * The Optional classes for the input field group\n   *\n   * @memberof IInputPlacesGroupGoogle\n   * @default ''\n   * @member {string} [classes]\n   */\n  classes?: string;\n  /**\n   * The Optional label for the input field\n   *\n   * @memberof IInputPlacesGroupGoogle\n   * @default ''\n   * @member {string} [inputFieldLabel]\n   */\n  inputFieldLabel?: string;\n  /**\n   * Optional Read Only\n   *\n   * @memberof IInputPlacesGroupGoogle\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n}\n\n/**\n * InputPlacesGroup The Input Group for the Input Places Field component\n *\n * @param {IInputPlacesGroupGoogle} props - The props for the InputPlacesGroup\n *   component\n * @returns {React.FC<IInputPlacesGroupGoogle>} Component\n */\nconst InputPlacesGroupGoogle: React.FC<IInputPlacesGroupGoogle> = ({\n  label,\n  name,\n  inputFieldLabel = '',\n  classes = '',\n  control,\n  setError,\n  ...restProps\n}: IInputPlacesGroupGoogle) => {\n  const isStaticMapEnabled = useOptimizelyFeature(flagStaticMapInAddressStep);\n\n  return (\n    <div\n      data-testid=\"input-places-group-google\"\n      className={'min-h-[76px] -mt-2 ' + classes}\n    >\n      <div className=\"mb-2\">\n        {inputFieldLabel && (\n          <label htmlFor={name} className=\"font-petco font-bold\">\n            {inputFieldLabel}\n          </label>\n        )}\n      </div>\n      <Controller\n        control={control}\n        name={name}\n        render={({ field: { ref, ...field } }) => {\n          const { ...restField } = field;\n\n          const coordinates = restField.value?.coordinates;\n          const placeLabel = restField.value?.label;\n\n          return (\n            <>\n              <InputPlacesFieldGoogle\n                outsideRef={ref}\n                label={label}\n                setError={setError}\n                {...restField}\n                {...restProps}\n              />\n              {restProps.displayStaticMap && placeLabel && isStaticMapEnabled && (\n                <div className=\"mt-4 mb-5\">\n                  <GoogleStaticMap center={coordinates} />\n                </div>\n              )}\n            </>\n          );\n        }}\n      />\n    </div>\n  );\n};\n\nexport default InputPlacesGroupGoogle;\n","/**\n * Get location label params\n *\n * @interface\n */\ninterface GetLocationLabelParams {\n  /** The location address */\n  address?: string;\n  /** The location zip */\n  zip?: string;\n  /** The location city */\n  city?: string;\n  /** The location state */\n  state?: string;\n  /** The location country */\n  countryCode?: string;\n}\n\n/**\n * Get the place label from the location data\n *\n * @param {GetLocationLabelParams} params - The location data\n * @returns {string} - The place label\n */\nfunction getLocationLabel({\n  address,\n  zip,\n  city,\n  state,\n  countryCode,\n}: GetLocationLabelParams): string {\n  let placeLabel = '';\n\n  const placeLabelItems = [address, city];\n\n  if (state !== undefined && zip !== undefined) {\n    placeLabelItems.push(`${state} ${zip}`);\n  } else if (state !== undefined) {\n    placeLabelItems.push(state);\n  } else if (zip !== undefined) {\n    placeLabelItems.push(zip);\n  }\n  placeLabelItems.push(countryCode);\n\n  placeLabelItems.forEach(\n    /**\n     * Add each item to the place label if it is defined\n     *\n     * @param {string | undefined} item - The item to add to the label\n     * @returns {void}\n     */\n    (item: string | undefined): void => {\n      /**\n       * There is a known issue where a geo-point might not have attached a\n       * address information\n       */\n      if (item === undefined) return;\n\n      /**\n       * If this is the first known item, do not add a comma. Otherwise, add a\n       * comma and the item to the label.\n       */\n      if (placeLabel.length === 0) {\n        placeLabel += item;\n      } else {\n        placeLabel += `, ${item}`;\n      }\n    }\n  );\n\n  return removeCommaAfterDot(placeLabel);\n}\n\n/**\n * Remove comma after dot. This is used to remove the comma right after address\n * abbreviations. As requested on PD-230.\n *\n * Example: 123 Main St., New York becomes \"123 Main St. New York\"\n *\n * @param {string} str - The string to transform.\n * @returns {string} - The transformed string.\n * @see https://petcofoundation.atlassian.net/browse/PD-230?focusedCommentId=29297\n */\nfunction removeCommaAfterDot(str: string) {\n  return str.replace(/\\.,/, '.');\n}\n\nexport default getLocationLabel;\n","import { sdk } from '@/lib/dataSource/lostApi/common';\nimport { IReverseGeocode } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/utilities/geolocation/reverseGeocode/dto/index';\nimport { IReverseGeocodeQueryParams } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/utilities/geolocation/reverseGeocode/interfaces';\n\n/**\n * The interface for the getReverseGeocode function\n *\n * @interface\n */\nexport interface IGetReverseGeocode {\n  (params: IReverseGeocodeQueryParams): Promise<IReverseGeocode>;\n}\n\n/**\n * Get the reverse geocode for a given latitude and longitude\n *\n * @param {IReverseGeocodeQueryParams} params - The latitude and longitude\n * @returns {Promise<IReverseGeocode>} The reverse geocode\n */\nexport async function getReverseGeocode({\n  latitude,\n  longitude,\n}: IReverseGeocodeQueryParams): Promise<IReverseGeocode> {\n  try {\n    const response = await sdk\n      .reverseGeocode({})\n      .getReverseGeocode({ latitude, longitude });\n    return response.data;\n  } catch (error) {\n    console.error(error);\n    throw error;\n  }\n}\n","import { ILocationDto } from '@/components/molecules/InputPlacesFieldGoogle/InputPlacesFieldGoogle';\nimport { Place, PlaceGeometry } from '@aws-sdk/client-location';\nimport { IReverseGeocode } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/utilities/geolocation/reverseGeocode/dto';\nimport getLocationLabel from '../../location/getLocationLabel';\n\n/**\n * Interface for the latitude and longitude\n *\n * @interface\n */\nexport interface IGeoPoints {\n  /** The latitude */\n  latitude: number;\n  /** The longitude */\n  longitude: number;\n}\n\n/**\n * ReverseGeocode class\n *\n * Class used to use reverse geocode for display\n *\n * @class\n * @property {IReverseGeocode} data - The reverseGeocode data object returned\n *   from the SDK\n * @property {number} latitude - The latitude of the reverseGeocode data object\n *   returned from the SDK\n * @property {number} longitude - The longitude of the reverseGeocode data\n *   object returned from the SDK\n */\nexport default class ReverseGeocode {\n  /**\n   * The reverseGeocode object returned from the SDK\n   *\n   * @private\n   * @memberof {ReverseGeocode}\n   * @member {IReverseGeocode} data\n   */\n  private data: IReverseGeocode;\n\n  /**\n   * The latitude of the reverseGeocode object returned from the SDK\n   *\n   * @memberof {ReverseGeocode}\n   * @member {number} latitude\n   * @public\n   * @readonly\n   */\n  public readonly latitude: number;\n\n  /**\n   * The longitude of the reverseGeocode object returned from the SDK\n   *\n   * @memberof {ReverseGeocode}\n   * @member {number} longitude\n   * @public\n   * @readonly\n   */\n  public readonly longitude: number;\n\n  /**\n   * ReverseGeocode constructor\n   *\n   * @param {IReverseGeocode} data - The reverse geocode data object returned\n   *   from the SDK\n   * @param {IGeoPoints} geoPoints - The latitude and longitude\n   */\n  constructor(data: IReverseGeocode, geoPoints: IGeoPoints) {\n    const { latitude, longitude } = geoPoints;\n    this.data = data;\n    this.latitude = latitude;\n    this.longitude = longitude;\n  }\n\n  /**\n   * Get the Place geometry\n   *\n   * @memberof {ReverseGeocode}\n   * @member {PlaceGeometry} placeGeometry\n   * @returns {PlaceGeometry} - The Place geometry\n   * @public\n   */\n  public get placeGeometry(): PlaceGeometry {\n    return {\n      Point: [this.longitude, this.latitude],\n    };\n  }\n\n  /**\n   * Get the place label\n   *\n   * @memberof {ReverseGeocode}\n   * @member {string} placeLabel\n   * @returns {string} - The place label\n   * @public\n   */\n  public get placeLabel(): string {\n    const {\n      address,\n      zip,\n      city,\n      state,\n      other: { countryCode },\n    } = this.data;\n\n    return getLocationLabel({\n      address,\n      zip,\n      city,\n      state,\n      countryCode,\n    });\n  }\n\n  /**\n   * Get the location object\n   *\n   * @memberof {ReverseGeocode}\n   * @member {ILocationDto} locationObject\n   * @returns {ILocationDto} - The location object\n   * @public\n   */\n  public get locationObject(): ILocationDto {\n    const { address, city, state, zip, other } = this.data;\n\n    return {\n      city,\n      region: state,\n      postalCode: zip,\n      streetAddress: address ?? '',\n      coordinates: {\n        longitude: this.longitude,\n        latitude: this.latitude,\n      },\n      label: this.placeLabel,\n      country: other.countryCode,\n    };\n  }\n\n  /**\n   * Get the location object for google\n   *\n   * @memberof {ReverseGeocode}\n   * @member {ILocationDto} locationObject\n   * @returns {ILocationDto} - The location object\n   * @public\n   */\n  public get locationObjectGoogle(): ILocationDto {\n    const { address, city, state, zip, other } = this.data;\n    return {\n      city,\n      region: state,\n      postalCode: zip,\n      streetAddress: address,\n      coordinates: {\n        longitude: this.longitude,\n        latitude: this.latitude,\n      },\n      label: this.placeLabel,\n      country: other.countryCode,\n    };\n  }\n\n  /**\n   * Get the latitude from the Place object\n   *\n   * @memberof {ReverseGeocode}\n   * @param {Place | undefined} place - The place object\n   * @returns {number} - The latitude\n   * @throws {Error} - If the Place object is not defined\n   * @throws {Error} - If the Geometry object is not defined\n   * @throws {Error} - If the Point object is not defined\n   * @static\n   * @public\n   */\n  public static getLatitudeFromPlace(place: Place | undefined): number {\n    if (!place) throw new Error('Place is not defined');\n\n    const { Geometry } = place;\n\n    if (!Geometry) throw new Error('Geometry is not defined');\n\n    const { Point } = Geometry;\n\n    if (!Point) throw new Error('Point is not defined');\n\n    return Point[1];\n  }\n\n  /**\n   * Get the longitude form the Place object\n   *\n   * @memberof {ReverseGeocode}\n   * @param {Place | undefined} place - The place object\n   * @returns {number} - The longitude\n   * @throws {Error} - If the Place object is not defined\n   * @throws {Error} - If the Geometry object is not defined\n   * @throws {Error} - If the Point object is not defined\n   * @static\n   * @public\n   */\n  public static getLongitudeFromPlace(place: Place | undefined): number {\n    if (!place) throw new Error('Place is not defined');\n\n    const { Geometry } = place;\n\n    if (!Geometry) throw new Error('Geometry is not defined');\n\n    const { Point } = Geometry;\n\n    if (!Point) throw new Error('Point is not defined');\n\n    return Point[0];\n  }\n\n  /**\n   * Get the longitude and longitude from the Place object\n   *\n   * @memberof {ReverseGeocode}\n   * @param {Place | undefined} place - The place object\n   * @returns {IGeoPoints} - The latitude and longitude\n   * @throws {Error} - If the Place object is not defined\n   * @throws {Error} - If the Geometry object is not defined\n   * @throws {Error} - If the Point object is not defined\n   * @static\n   * @public\n   */\n  public static getGeoPointFromPlace(place: Place | undefined): IGeoPoints {\n    const latitude = ReverseGeocode.getLatitudeFromPlace(place);\n    const longitude = ReverseGeocode.getLongitudeFromPlace(place);\n\n    return { latitude, longitude };\n  }\n}\n"],"names":["__webpack_exports__","Z","name","error","required","register","classes","readOnly","rest","param","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","input","id","type","aria-invalid","disabled","className","InputField","forwardRef","ref","label","value","children","onChange","autoComplete","hideSpinner","inputValue","setInputValue","useState","useEffect","labelClass","labelClasses","inputClass","inputClasses","labelFocusClasses","labelPeerPlaceholderShownClasses","concat","inputErrorClasses","inputDisabledClasses","labelDisabledClasses","jsxs","Fragment","div","event","target","placeholder","htmlFor","InputError","displayName","inputButtonClasses","cva","variants","state","active","normal","inputButtonTextClasses","InputButton_InputButton","text","icon","currentIconColorType","currentIconColorShade","currentState","jsx_runtime","button","Icon","colorShade","colorType","size","span","InputButtonGroup_InputButtonGroup","options","control","currentValue","orientation","activeButton","setActiveButton","horizontal","vertical","Controller","render","field","map","InputButton","option","onClick","labelDisabledClass","InputLabel","InputCheckbox","message","min","max","forceDatePickerPopperBottom","InputFieldDateSelector","selectsRange","inputRef","fieldId","useGeolocation","loadInitial","reverseGeocode","position","setPosition","location","latitude","longitude","notAllowedGeoError","setNotAllowedGeoError","undefined","reversedGeocodePosition","setReversedGeocodePosition","loading","setLoading","positionStorage","SessionStorage","positionStorageKey","handleSuccess","storePosition","coords","handleError","set","expires","tomorrow","getReverseGeocode","then","response","catch","statusCode","delete","finally","fetchPosition","storedPosition","get","navigator","geolocation","getCurrentPosition","enableHighAccuracy","maximumAge","timeout","clearNotAllowedGeoError","defaultAutocompleteTypes","defaultValidCountries","significantLocationDtoKeysForError","findUsableCity","cityOrOther","forEach","addressComponents","find","component","types","includes","long_name","parsePlaces","place","city","address_components","region","comp","short_name","postalCode","streetNumber","route","country","streetAddress","geometry","coordinates","lat","lng","formatted_address","selectFirstResult","arrowDown","KeyboardEvent","key","keyCode","inputField","dispatchEvent","enterDown","getSignificantError","significantErrorKey","InputPlacesFieldGoogle_InputPlacesFieldGoogle","setError","outsideRef","autocompleteTypes","validCountries","initAutoComplete","useCurrentLocation","inlineCurrentLocation","testGetPlace","apiKey","noErrorMessage","requiredAddressComponents","useRef","autoCompleteRef","selectedPlace","setSelectedPlace","hasFocus","setHasFocus","inputFieldError","setInputError","locationObject","some","dispatch","useToastContext","useGeolocationLoading","loader","Loader","process","language","version","libraries","googleMapsConfiguration","fields","componentRestrictions","onBlur","current","getPlace","formattedPlace","handleKeyDown","code","preventDefault","googlePlacesAutocompleteSelectedItems","document","getElementsByClassName","length","importLibrary","autocomplete","places","Autocomplete","addListener","addEventListener","ReverseGeocode","locationObjectGoogle","returnedPlace","useGeolocationLoadingSpinner","LoadingSpinner","significantError","useMemo","fieldError","fetchCurrentLocation","handleInputValueChange","handleToast","toast","persistent","showIcon","checkBrowserPermission","e","onFocus","buildRefs","refs","Paragraph","iconScaleToSizeMap","GoogleStaticMap_GoogleStaticMap","center","mapId","pixelRatio","useGetDevicePixelRatio","setPixelRatio","window","devicePixelRatio","scale","params","URLSearchParams","latLngString","mapMarkerUrl","img","src","toString","alt","InputPlacesGroupGoogle_InputPlacesGroupGoogle","inputFieldLabel","restProps","isStaticMapEnabled","useOptimizelyFeature","flagStaticMapInAddressStep","restField","placeLabel","InputPlacesFieldGoogle","displayStaticMap","GoogleStaticMap","address","zip","countryCode","placeLabelItems","push","item","str","replace","sdk","data","placeGeometry","Point","other","getLocationLabel","getLatitudeFromPlace","Geometry","getLongitudeFromPlace","getGeoPointFromPlace","constructor","geoPoints"],"sourceRoot":""}