# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Maintainer: Ray Donnelly <mingw.android@gmail.com>
# Maintainer: Naveen M K <naveen521kk@gmail.com>
# Contributor: Saul Ibarra Corretge <saghul@gmail.com>
# Contributor: Frode Solheim <frode@fs-uae.net>

_primary_python="yes"
_pybasever=3.12
_realname=python

if [[ "${_primary_python}" == "yes" ]]; then
  pkgbase="mingw-w64-${_realname}"
  pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
  provides=("${MINGW_PACKAGE_PREFIX}-python3"
            "${MINGW_PACKAGE_PREFIX}-python${_pybasever}")
  conflicts=("${MINGW_PACKAGE_PREFIX}-python3"
             "${MINGW_PACKAGE_PREFIX}-python${_pybasever}"
            "${MINGW_PACKAGE_PREFIX}-python2<2.7.16-7")
  replaces=("${MINGW_PACKAGE_PREFIX}-python3"
            "${MINGW_PACKAGE_PREFIX}-python${_pybasever}")
else
  pkgbase="mingw-w64-${_realname}${_pybasever}"
  pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}${_pybasever}")
fi
pkgver=${_pybasever}.7
pkgrel=3
pkgdesc="A high-level scripting language (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
license=('spdx:PSF-2.0')
url="https://www.python.org/"
msys2_references=(
  "cpe: cpe:/a:python:python"
  "cpe: cpe:/a:python_software_foundation:python"
)
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
         "${MINGW_PACKAGE_PREFIX}-expat"
         "${MINGW_PACKAGE_PREFIX}-bzip2"
         "${MINGW_PACKAGE_PREFIX}-libffi"
         "${MINGW_PACKAGE_PREFIX}-mpdecimal"
         "${MINGW_PACKAGE_PREFIX}-ncurses"
         "${MINGW_PACKAGE_PREFIX}-openssl"
         "${MINGW_PACKAGE_PREFIX}-sqlite3"
         "${MINGW_PACKAGE_PREFIX}-tcl"
         "${MINGW_PACKAGE_PREFIX}-tk"
         "${MINGW_PACKAGE_PREFIX}-zlib"
         "${MINGW_PACKAGE_PREFIX}-xz"
         "${MINGW_PACKAGE_PREFIX}-tzdata")
makedepends=(
  "${MINGW_PACKAGE_PREFIX}-cc"
  "${MINGW_PACKAGE_PREFIX}-autotools"
  "autoconf-archive"
)
#options=('debug' '!strip')
source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz"
        "EXTERNALLY-MANAGED"
        https://github.com/python/cpython/commit/29648980d440e70ade4e0975b8d6aa83214866ed.patch
        0001-sysconfig-make-_sysconfigdata.py-relocatable.patch
        0002-build-add-with-nt-threads-and-make-it-default-on-min.patch
        0003-Define-MS_WINDOWS-and-others-when-compiling-with-MIN.patch
        0004-configure-add-MACHDEP-and-platform-on-MINGW.patch
        0005-Add-default-configuration-for-MINGW.patch
        0006-configure-enable-largefile-support-by-default-for-Mi.patch
        0007-Add-PC-to-CPPFLAGS-and-to-SRCDIRS-on-Mingw.patch
        0008-posixmodule.c-Define-necessary-headers-for-compiling.patch
        0009-Build-winreg-by-default-when-compiling-for-MINGW.patch
        0010-pyport.h-Add-support-for-MINGW.patch
        0011-configure-add-options-so-that-shared-build-is-possib.patch
        0012-Add-dynamic-loading-support-for-MINGW.patch
        0013-Ignore-main-program-for-frozen-scripts-on-MINGW.patch
        0014-Detect-winsock2-and-setup-_socket-module-on-MINGW.patch
        0015-Enable-some-windows-specific-modules.patch
        0016-sysconfig-MINGW-build-extensions-with-GCC.patch
        0017-sysconfig-treat-MINGW-builds-as-POSIX-builds.patch
        0018-Add-support-for-stdcall-without-underscore.patch
        0019-Customize-site-for-MINGW.patch
        0020-add-python-config-sh.patch
        0021-mingw-prefer-unix-sep-if-MSYSTEM-environment-variabl.patch
        0022-msys-cygwin-semi-native-build-sysconfig.patch
        0023-sysconfig-mingw-sysconfig-like-posix.patch
        0024-mingw-use-backslashes-in-compileall-py.patch
        0025-mingw-pdcurses_ISPAD.patch
        0026-remove_path_max.default.patch
        0027-dont-link-with-gettext.patch
        0028-ctypes-python-dll.patch
        0029-gdbm-module-includes.patch
        0030-use-gnu_printf-in-format.patch
        0031-mingw-fix-ssl-dont-use-enum_certificates.patch
        0032-fix-using-dllhandle-and-winver-mingw.patch
        0033-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch
        0034-MINGW-link-with-additional-library.patch
        0035-install-msilib.patch
        0036-fix-signal-module-build.patch
        0037-build-build-winconsoleio-and-_testconsole.patch
        0038-expose-sem_unlink.patch
        0039-Use-cygpty-while-using-isatty.patch
        0040-build-link-win-resource-files-and-build-pythonw.patch
        0041-fix-isselectable.patch
        0042-configure.ac-fix-inet_pton-check.patch
        0043-pass-gen-profile-ldflags.patch
        0044-pkg-config-windows-must-link-ext-with-python-lib.patch
        0045-importlib-bootstrap-path-sep.patch
        0046-warnings-fixes.patch
        0047-fix-build-testinternalcapi.patch
        0048-clang-arm64.patch
        0049-configure.ac-set-MINGW-stack-reserve.patch
        0050-Don-t-use-os.pathsep-to-find-EOF.patch
        0051-Fix-extension-suffix-for-c-extensions-on-mingw.patch
        0052-Change-the-get_platform-method-in-sysconfig.patch
        0053-build-Fix-ncursesw-include-lookup.patch
        0054-tests-fix-test_bytes.patch
        0055-time-fix-strftime-not-raising-for-invalid-year-value.patch
        0056-ctypes-find_library-c-should-return-None-with-ucrt.patch
        0057-build-Disable-checks-for-dlopen-dlfcn.patch
        0058-Fix-install-location-of-the-import-library.patch
        0059-build-Integrate-venvlauncher-build-installation-into.patch
        0060-configure.ac-set-_WIN32_WINNT-version.patch
        0061-configure.ac-don-t-check-for-clock_-functions.patch
        0062-expanduser-normpath-paths-coming-from-env-vars.patch
        0063-CI-test-the-build-and-add-some-mingw-specific-tests.patch
        0064-Define-PY3_DLLNAME-to-fix-build.patch
        0065-_testconsole.c-Fix-casing-path-sep.patch
        0066-Return-consistent-architecture-markers-for-python-on.patch
        0067-handle-ncursesw-pkg-config-when-cross-compiling.patch
        0068-mingw_smoketests-fix-_UCRT-condition.patch
        0069-Modify-sys.winver-to-match-upstream.patch
        0070-Change-user-site-packages-path-to-include-the-enviro.patch
        0071-configure-Include-a-header-in-the-check-for-_beginth.patch
        0072-configure.ac-Default-to-without-c-locale-coercion-on.patch
        0073-Fix-failing-tests.patch
        0074-Don-t-change-os.sep-with-an-empty-MSYSTEM-env-var-no.patch
        0075-def-VPATH-when-compiling-Python-sysmodule.c.patch
        0076-Make-_Py_CheckPython3-extern.patch
        0077-link-with-bcrypt.patch
        0078-correctly-find-native-python.patch
        0079-Add-extra-flags-for-_bootstrap_python.patch
        0080-posixmodule-undefine-HAVE_OPENDIR.patch
        0081-getpath.py-add-support-for-mingw.patch
        0082-Don-t-build-_posixsubprocess-on-Windows.patch
        0083-_ssl-link-with-ws2_32.patch
        0084-Always-normalize-path-in-abspath.patch
        0085-Include-winsock.h-when-checking-for-netdb-function.patch
        0086-include-_multiprocessing-semaphore.c-on-win32.patch
        0087-configure-build-mmap-module-on-win32.patch
        0088-venv-creation-fixes.patch
        0089-move-the-shutdown-function-where-winsock.h-is-includ.patch
        0090-configure.ac-set-BUILDEXEEXT-and-EXEEXT.patch
        0091-configure.ac-fix-building-some-test-modules.patch
        0092-Don-t-convert-sysconfig.get_config_var-VPATH-to-an-a.patch
        0093-Always-convert-to-before-passing-though-pathcch-func.patch
        0094-Build-venvlauncher.exe-from-PC-launcher.c.patch
        0095-getpath.py-fix-dirname.patch
        0096-getpath-use-normpath-on-all-generated-paths.patch
        0097-pathconfig-normpath-sys.path-0.patch
        0098-smoketests-add-some-tests-for-sys-site-paths.patch
        0099-Search-DLLs-only-on-paths-added-using-add_dll_direct.patch
        0100-Build-and-install-libpython3.dll.patch
        0101-Port-GetPythonImport-to-mingw.patch
        0102-LoadLibraryExW-make-sure-to-only-use-backslashes-for.patch
        0103-mingw_smoketests-add-a-test-to-check-if-sysconfig-re.patch
        0104-Add-missing-library-for-multiprocessing-module.patch
        0105-selectmodule-add-support-for-MINGW.patch
        0106-readline-disable-on-MINGW.patch
        0107-Add-libraries-to-fix-compile-of-ctypes-on-MINGW.patch
        0108-Add-lpython-version-while-linking-stdlib.patch
        0109-Enable-_uuid-on-MINGW.patch
        0110-Enable-curses-library-on-MINGW.patch
        0111-mingw_smoketests-disable-distutils-related-tests.patch
        0112-mingw_smoketests-skip-test_c_ext_build-for-in-tree-b.patch
        0113-configure.ac-use-autoconf-2.69.patch
        0114-CI-clean-up-ignored-tests.patch
        0115-gcc-make-incompatible-pointer-types-as-warning.patch
        0116-test_makefile-normalize-path.patch
        0117-sysconfig.get_platform-use-consistent-naming.patch
        0118-Add-ucrt-to-version-string.patch
        0119-socketmodule-fix-captilization-of-headers.patch)

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
  for _patch in "$@"
  do
    msg2 "Applying ${_patch}"
    patch -Nbp1 -i "${srcdir}/${_patch}"
  done
}

prepare() {
  cd "${srcdir}/Python-${pkgver}"

 apply_patch_with_msg 0001-sysconfig-make-_sysconfigdata.py-relocatable.patch \
  0002-build-add-with-nt-threads-and-make-it-default-on-min.patch \
  0003-Define-MS_WINDOWS-and-others-when-compiling-with-MIN.patch \
  0004-configure-add-MACHDEP-and-platform-on-MINGW.patch \
  0005-Add-default-configuration-for-MINGW.patch \
  0006-configure-enable-largefile-support-by-default-for-Mi.patch \
  0007-Add-PC-to-CPPFLAGS-and-to-SRCDIRS-on-Mingw.patch \
  0008-posixmodule.c-Define-necessary-headers-for-compiling.patch \
  0009-Build-winreg-by-default-when-compiling-for-MINGW.patch \
  0010-pyport.h-Add-support-for-MINGW.patch \
  0011-configure-add-options-so-that-shared-build-is-possib.patch \
  0012-Add-dynamic-loading-support-for-MINGW.patch \
  0013-Ignore-main-program-for-frozen-scripts-on-MINGW.patch \
  0014-Detect-winsock2-and-setup-_socket-module-on-MINGW.patch \
  0015-Enable-some-windows-specific-modules.patch \
  0016-sysconfig-MINGW-build-extensions-with-GCC.patch \
  0017-sysconfig-treat-MINGW-builds-as-POSIX-builds.patch \
  0018-Add-support-for-stdcall-without-underscore.patch \
  0019-Customize-site-for-MINGW.patch \
  0020-add-python-config-sh.patch \
  0021-mingw-prefer-unix-sep-if-MSYSTEM-environment-variabl.patch \
  0022-msys-cygwin-semi-native-build-sysconfig.patch \
  0023-sysconfig-mingw-sysconfig-like-posix.patch \
  0024-mingw-use-backslashes-in-compileall-py.patch \
  0025-mingw-pdcurses_ISPAD.patch \
  0026-remove_path_max.default.patch \
  0027-dont-link-with-gettext.patch \
  0028-ctypes-python-dll.patch \
  0029-gdbm-module-includes.patch \
  0030-use-gnu_printf-in-format.patch \
  0031-mingw-fix-ssl-dont-use-enum_certificates.patch \
  0032-fix-using-dllhandle-and-winver-mingw.patch \
  0033-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch \
  0034-MINGW-link-with-additional-library.patch \
  0035-install-msilib.patch \
  0036-fix-signal-module-build.patch \
  0037-build-build-winconsoleio-and-_testconsole.patch \
  0038-expose-sem_unlink.patch \
  0039-Use-cygpty-while-using-isatty.patch \
  0040-build-link-win-resource-files-and-build-pythonw.patch \
  0041-fix-isselectable.patch \
  0042-configure.ac-fix-inet_pton-check.patch \
  0043-pass-gen-profile-ldflags.patch \
  0044-pkg-config-windows-must-link-ext-with-python-lib.patch \
  0045-importlib-bootstrap-path-sep.patch \
  0046-warnings-fixes.patch \
  0047-fix-build-testinternalcapi.patch \
  0048-clang-arm64.patch \
  0049-configure.ac-set-MINGW-stack-reserve.patch \
  0050-Don-t-use-os.pathsep-to-find-EOF.patch \
  0051-Fix-extension-suffix-for-c-extensions-on-mingw.patch \
  0052-Change-the-get_platform-method-in-sysconfig.patch \
  0053-build-Fix-ncursesw-include-lookup.patch \
  0054-tests-fix-test_bytes.patch \
  0055-time-fix-strftime-not-raising-for-invalid-year-value.patch \
  0056-ctypes-find_library-c-should-return-None-with-ucrt.patch \
  0057-build-Disable-checks-for-dlopen-dlfcn.patch \
  0058-Fix-install-location-of-the-import-library.patch \
  0059-build-Integrate-venvlauncher-build-installation-into.patch \
  0060-configure.ac-set-_WIN32_WINNT-version.patch \
  0061-configure.ac-don-t-check-for-clock_-functions.patch \
  0062-expanduser-normpath-paths-coming-from-env-vars.patch \
  0063-CI-test-the-build-and-add-some-mingw-specific-tests.patch \
  0064-Define-PY3_DLLNAME-to-fix-build.patch \
  0065-_testconsole.c-Fix-casing-path-sep.patch \
  0066-Return-consistent-architecture-markers-for-python-on.patch \
  0067-handle-ncursesw-pkg-config-when-cross-compiling.patch \
  0068-mingw_smoketests-fix-_UCRT-condition.patch \
  0069-Modify-sys.winver-to-match-upstream.patch \
  0070-Change-user-site-packages-path-to-include-the-enviro.patch \
  0071-configure-Include-a-header-in-the-check-for-_beginth.patch \
  0072-configure.ac-Default-to-without-c-locale-coercion-on.patch \
  0073-Fix-failing-tests.patch \
  0074-Don-t-change-os.sep-with-an-empty-MSYSTEM-env-var-no.patch \
  0075-def-VPATH-when-compiling-Python-sysmodule.c.patch \
  0076-Make-_Py_CheckPython3-extern.patch \
  0077-link-with-bcrypt.patch \
  0078-correctly-find-native-python.patch \
  0079-Add-extra-flags-for-_bootstrap_python.patch \
  0080-posixmodule-undefine-HAVE_OPENDIR.patch \
  0081-getpath.py-add-support-for-mingw.patch \
  0082-Don-t-build-_posixsubprocess-on-Windows.patch \
  0083-_ssl-link-with-ws2_32.patch \
  0084-Always-normalize-path-in-abspath.patch \
  0085-Include-winsock.h-when-checking-for-netdb-function.patch \
  0086-include-_multiprocessing-semaphore.c-on-win32.patch \
  0087-configure-build-mmap-module-on-win32.patch \
  0088-venv-creation-fixes.patch \
  0089-move-the-shutdown-function-where-winsock.h-is-includ.patch \
  0090-configure.ac-set-BUILDEXEEXT-and-EXEEXT.patch \
  0091-configure.ac-fix-building-some-test-modules.patch \
  0092-Don-t-convert-sysconfig.get_config_var-VPATH-to-an-a.patch \
  0093-Always-convert-to-before-passing-though-pathcch-func.patch \
  0094-Build-venvlauncher.exe-from-PC-launcher.c.patch \
  0095-getpath.py-fix-dirname.patch \
  0096-getpath-use-normpath-on-all-generated-paths.patch \
  0097-pathconfig-normpath-sys.path-0.patch \
  0098-smoketests-add-some-tests-for-sys-site-paths.patch \
  0099-Search-DLLs-only-on-paths-added-using-add_dll_direct.patch \
  0100-Build-and-install-libpython3.dll.patch \
  0101-Port-GetPythonImport-to-mingw.patch \
  0102-LoadLibraryExW-make-sure-to-only-use-backslashes-for.patch \
  0103-mingw_smoketests-add-a-test-to-check-if-sysconfig-re.patch \
  0104-Add-missing-library-for-multiprocessing-module.patch \
  0105-selectmodule-add-support-for-MINGW.patch \
  0106-readline-disable-on-MINGW.patch \
  0107-Add-libraries-to-fix-compile-of-ctypes-on-MINGW.patch \
  0108-Add-lpython-version-while-linking-stdlib.patch \
  0109-Enable-_uuid-on-MINGW.patch \
  0110-Enable-curses-library-on-MINGW.patch \
  0111-mingw_smoketests-disable-distutils-related-tests.patch \
  0112-mingw_smoketests-skip-test_c_ext_build-for-in-tree-b.patch \
  0113-configure.ac-use-autoconf-2.69.patch \
  0114-CI-clean-up-ignored-tests.patch \
  0115-gcc-make-incompatible-pointer-types-as-warning.patch \
  0116-test_makefile-normalize-path.patch \
  0117-sysconfig.get_platform-use-consistent-naming.patch \
  0118-Add-ucrt-to-version-string.patch \
  0119-socketmodule-fix-captilization-of-headers.patch

  # https://github.com/python/cpython/issues/127001
  patch -Np1 -i "${srcdir}/29648980d440e70ade4e0975b8d6aa83214866ed.patch"

  autoreconf -vfi
}

build() {
  declare -a _extra_config
  if check_option "debug" "n"; then
    _extra_config+=("--enable-optimizations")
    # Upstream defaults to -O3, so we can do too
    CFLAGS+=" -O3"
    # FIXME: https://github.com/msys2-contrib/cpython-mingw/issues/10
    # _extra_config+=("--with-lto")
  else
    CFLAGS+=" -O0 -ggdb"
    CXXFLAGS+=" -O0 -ggdb"
    _extra_config+=("--with-pydebug")
  fi

  case "${CARCH}" in
    i686)
      LDFLAGS+=" -Wl,--large-address-aware"
    ;;
  esac

  mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"

  ../Python-${pkgver}/configure \
    --prefix=${MINGW_PREFIX} \
    --host=${MINGW_CHOST} \
    --build=${MINGW_CHOST} \
    --enable-shared \
    --with-system-expat \
    --with-system-ffi \
    --with-system-libmpdec \
    --without-ensurepip \
    --enable-loadable-sqlite-extensions \
    --with-tzpath=${MINGW_PREFIX}/share/zoneinfo \
    "${_extra_config[@]}"

  make
}

check() {
  cd "${srcdir}/build-${MSYSTEM}"

  # Some basic tests to ensure nothing major or MSYS2 specific features are broken
  ./python.exe "../Python-${pkgver}/mingw_smoketests.py"
  MSYSTEM= ./python.exe "../Python-${pkgver}/mingw_smoketests.py"
}

package() {
  cd "${srcdir}/build-${MSYSTEM}"

  make -j1 install DESTDIR="${pkgdir}"

  # gdb pretty printers for debugging Python itself; to use:
  # python
  # sys.path.append('C:/msys64/mingw64/share/gdb/python3')
  # import python_gdb
  # reload(python_gdb)
  # end
  if [[ "${_primary_python}" == "yes" ]]; then
    [[ -d "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/ ]] || mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/
    cp -f python.exe-gdb.py "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/python_gdb.py
  fi

  # some useful "stuff"
  install -dm755 "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/{i18n,scripts}
  install -m755 "${srcdir}/Python-${pkgver}"/Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/i18n/
  install -m755 "${srcdir}/Python-${pkgver}"/Tools/scripts/{README,*py} "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/scripts/

  # License
  install -Dm644 "${srcdir}/Python-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}${_pybasever}/LICENSE"

  # PEP668
  install -Dm644 "${srcdir}/EXTERNALLY-MANAGED" -t "${pkgdir}${MINGW_PREFIX}/lib/python${_pybasever}/"

  # fixup shebangs
  for fscripts in 2to3 2to3-${_pybasever} idle3 idle${_pybasever} pydoc3 pydoc${_pybasever}; do
    sed -e '1 { s|^#!.*$|#!/usr/bin/env python'"${_pybasever}"'.exe| }' -i "${pkgdir}${MINGW_PREFIX}"/bin/${fscripts}
  done

  # default aliases for all scripts/binaries
  if [[ "${_primary_python}" == "yes" ]]; then
    # Default names are aliases for Python now
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe "${pkgdir}${MINGW_PREFIX}"/bin/python.exe
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe "${pkgdir}${MINGW_PREFIX}"/bin/pythonw.exe
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3-config "${pkgdir}${MINGW_PREFIX}"/bin/python-config
    cp "${pkgdir}${MINGW_PREFIX}"/bin/idle3 "${pkgdir}${MINGW_PREFIX}"/bin/idle
    cp "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3 "${pkgdir}${MINGW_PREFIX}"/bin/pydoc
  fi

  # delete anything that could conflict with the primary Python
  if [[ "${_primary_python}" != "yes" ]]; then
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3-config
    rm "${pkgdir}${MINGW_PREFIX}"/bin/idle3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/2to3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/libpython3.dll
    rm "${pkgdir}${MINGW_PREFIX}"/lib/libpython3.dll.a
    rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3-embed.pc
    rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3.pc
    rm "${pkgdir}${MINGW_PREFIX}"/share/man/man1/python3.1
  fi
}

sha256sums=('24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550'
            '3981fed74ee7d43ad69bd67e634e03d7bf6890558a87062380112e195688728a'
            'b5c9ad802d6f3614aefbaec593c1c670dd1918b56e4ac9a682a6f23dfba579fa'
            '770dce22043bc1af5492fe946fb92cfcc9938058296e495e61895fb767339f8b'
            '1de135dac2a086c307a31c17b15e5e54a78b02c124518d5fe90393473ae97908'
            'c22cbb174ab1b017f90cd24a583cc04c908c1329b825e90a55ba6160754f9dc8'
            'ef7fc45074e0fe0cffdfd5812d8279ff3b33fdcf2c43b4dd2ea5509aedc38c33'
            '54077d0f5f930e47e304e7c0f427f10a16f46458364613d7a02708d9e7908e2d'
            '860ee392666b1b769317fa6f65bed5cd9eeb7c8345eab60dc0e5182606ebd683'
            '4257664abef76a7861e4b0b240080793b195cccd91c190b0ec260f63b122ebce'
            'a9500a12d01ddf2be4d9061bfcfe53d2df8ab9a905410443f9dd0caacf366ee8'
            'cdbf4ca2334ce78bc333b6bd7e1ad5d2528b0ebc30c4cc8ceb01e496dbaa57bf'
            'b2f4eb43e475f33d75ef0b21d05a56aab6ec1eaa5f7b2c3cf4a0d981446095cf'
            'c3a45212e7d02ef360ce09bfb20883949ad3e7f7c453eab2ce7fd2eb9e17c022'
            '649cdce9c7e53348cdd0dd0805f3fddd75b4a73e35320c9423daec55dbe3ceb8'
            '26a63d55052d31a13f2711f8d93f063b996595af11b2024419200cb6536c4f55'
            '28a1f431df4d89a7022ff78460952e162cb094c51c8795fd97f8cfa7e595579a'
            'c07d621b25f7c69e940cae24841f93897026c825a696e87fa59eb641b47333b6'
            '73cd734bf9591a8f8279bf7c0cbd8ba65e190d62ba0b0372ee29f2e654b55b1a'
            '74e6f8eed891c2d9b18920832de972fa1c229f42f5b2fb7334d3b65f3d75ded6'
            'c9b8f9a11f59498c96678552771e394b31d0f14b8bb913a920c15bb7a1bd3e84'
            '082c0d1e6e829c00906789798a5cc4e1b58b0937b72c004daf2e9b9a0c498d94'
            'b89f722101adab624d014219c89be26e42c92508e94af923ea8e05aeba048ffc'
            '871ad8904d1b5c0dc9c945067aee5caec153ec30bb474b06eceacbc0d83c5013'
            '2109d457a3e1cc078a90851a06db1405672bceb1fc14a5b772b2e7c96dabe6d3'
            '10467f6958953b9d729d7c7d917f589be88a584924c21c9a2a1f5132ca17029f'
            '2bc91621a73f4eee9841ad84967a0fbb6a2d151c873599a531e2965c49f2b79c'
            'e5a768e4a69b1e430c299cd6969e8d46d4bbc3f41359ac0f1dd6d87b7f6fe065'
            '47fd9ed148f24298828b479650174e52bda8043c248fe44f0eb278e36018b6a8'
            '22247b6530993c157c13e3f25119982a75a985c5186c06318fae4c19a60ef359'
            '5bc4fed76606cf78b9ff9424d84aa8363feb1d474843da8a3022d121af4e2520'
            '8d883372a81774abf4636ee0a4774c3a6742179b0d104be4b19ccc2e105ee8b3'
            '3ba1745e914ce5c1c905889c6600181432c15c3b0f510ef29bc5a5e26f09fee2'
            '2d3b4f51076622de2c8057bd90a85e541418caa6c2bb1c956ac5bea37a3b6659'
            '18a84b0fc24dabae529bebfb52257d68ecb6281bd011586b672407c451102acf'
            'ae579799defb8834463e80434e9975b843135e35d332f48fa5d056534e6e6d06'
            '3b040bc797596655733e4481499881b7d5129eb6c381b05b20d30eae8d20ed7d'
            'f22a3101ea3707eac3f3d943c476e833885b9503d8fbbe6b615ce05029e10452'
            'cc9fa41aef127b59afdeee081b31962b7c33f6b0b2da40724bb90ea81d9b7030'
            'b496bed924dd3e5bef65a3bf17513821472ca15d8cb1a4a517f9cf1a498e9465'
            'b39655578462f3a383217c9e81a40fda97ef12fffd5e6d94861f10ca7617a7e3'
            '8a1f54718c7bb3e2eda5823686e4477a0fd0e6a018b54666fc0e70d92edbaa63'
            '2ece34a9135220fd096c34a2a5cea9049426c5f12ae4a5153aa312b61e627ed0'
            'c3a5acef4259975d6da4ab96b2ffc5844bcbb25ff003ac32bc27525eeac82fb2'
            'ad1666684d4fb0a4d60e47dfdb277d4d053eeb52dc27fb1c641d29a2fcf16562'
            '378c0d4590d61abbcdbb73fcca7cc94955c6792762741f00dffc19f3ac84c66f'
            '66e57ab20aedb5041c631812f03f393135a4fce9f7f90c43ff8df5bed68474d2'
            '3b9136a387c017390a638287cd97a6823187baa6785f3a0a681b84d14532e386'
            '03bf490bd0755ccb4acdb9446f7dfaeb1fd153a556af320115fb6346f3143f00'
            'eb35ebeb93d4c66636e183766911a5aba9a555b3478a6ee76a78f88e4cce6d86'
            'e87b35346f7a9635dabd614fc25fda5fb4a4a296c70215dfbbbbf25c9001aba7'
            'c9381f4c84da91a0f666754017fac6cdfe27e154a8e1fee6bec4ff3c5fd8fdef'
            '62cf976829c493e835ad35922a55c362eb02602426e2af0e538ab8873622adf1'
            '3778515ea1f0cd1d790bcecd0e5f162962c56f231a655e9f10d2e8c386d0a5ee'
            '250677aec754d3c28027bb8affe844c6bdebc94ab272b69134bdd191223fc6be'
            'e985634709b1914d86668eb115621068f0d24065d4806d7de6c9c19bdebec091'
            'f469fad5a3dc1c84fc5da7cc477e05845ffb8be63d6de2cfdc601504ceb4fad6'
            '48fc9a8372e46bee103f64e360e5e7c9d6a449da39d72ad30913d209ba0f71df'
            '80abefdee1539b6c63bdce729ec71cc755b7965835b981f95fc992b5bc23ccc0'
            '1ae1cc3b53dee235787d3c40120526bc2037f54b95f951ad5ff2c420a71d163d'
            '414f6e9088d496ca107112c613b84cb327998de28ebb21ea4c34b55405f862f4'
            'f265ba7a24e79737963fe62b080892a8adf26c5d31b9433ecce0787f603f738c'
            '6d2803b80a41a7f35568244882beaf795925e83a692e95fd9e84693f3524f8eb'
            'ac9958c5a6e9e265c148438b8cfbd7a881fdbe3d26b2c10b86af5890fe9463ff'
            'e250649378496ff74163d7670034003ebd7140e4a7691fca800d0ec0be71b5c3'
            '113f9023aac770d84e7916583e4c54c00d316153e19672e7f02d9809e0e8c5eb'
            'd73336d1a6ad702d2b59a4b89ee7a9352d9aed79d25c9c8ddc6243903898e566'
            '431693149efef7482a95fcfcafb0072435ff3a3975480cb4202350a494007eff'
            '7b17d9e6a0757ebf276e03e107b4809c84395e33e46256d598419f5aa16029a1'
            '20add52564bdb97f5be85274d158f0a609ae0a28b5bb7a98a6ed35bb31b34b11'
            'cf998de7d4145af8e3f6b47be75bbbae631f752a3cea7022cd8b390871ae5080'
            '50533913873739694f62b5a707ba877f4e4cab891009e8d8c243eff3cb050cda'
            'f57f28dce3066a5518a57294e7132b0697e811b537f56bdb8f9522ce1cb9b005'
            '342f23099755d5a870e2074215f2f93621526ed7f68f95809907b52e58b71d9c'
            '328a7a991ffd33d561e74ddfd0d1ced71c21fa9a1855c6c7b4fbdbd39c1f3742'
            '3764658844ad5b82bd9c1e36e6d0552d35c55a085ca092e09dd49302ce2cbce9'
            '04c7c6e6c92a1ba7afcd61c696024c0b87cfaa7f54a413ec7f997f79a3063c93'
            'f45719d27d7c434289f480f88b4c855453ea7db4e92b5bfebe50d86613068e3d'
            '38869eaf4e5b30b99c6dbbdd7f979c1a7e39c73fe71299f428ee62debe657ba9'
            '99337c4a19e1d8c6067afbcd960d392d17ba9d6941513f1a09b3efc7d9daadef'
            '3ff77e803a9f327f4491bef1eb1604a2a0d49f18746acec17810afebfa268a91'
            '69abb6cf1fa67f099634620c1fc8e23a36c4dce0ccae5c5da35cefd084d6a6b5'
            '129c707aba0394f01328fa57d820754d97dc905d780e693d738119af41cb3079'
            'a49b5b6249dcaffaca55ab89cda60960c37ffb9cda5f5493df78a3f6c7b87502'
            '2a959e63bb1e0cbe087b01c5d29b94f50b33d781d6023eeb244886d369d3f75f'
            'd0b725f4e47cf42b27b218e227aaf6a01e6d6024c26b2892290dc162edd16544'
            '967e63fde3363984aad7f39438ae7b4b7fe1a4e53ee682d530a9d843ee2ee7b5'
            '50fb2e6358aaf74fe212120af3fb1ea0deac7ef0b309ee2af61b0ec9bf2d4f4c'
            '200b4bae69b715aa29e838a522cfef19793e6da40beda9dc6519fcb3f928facf'
            '6e254dba0ccf47924a2c4658eb80ee48fd11e247525efa5d5d4f02d49a197a38'
            '22cef691acfac6a18a6ea488ea3cddb7982bd783ab81f017eb140d4ce4f2598c'
            '4ac61b6383886f81dde95e361958873a9795f889c7492e35be758f2115469c6b'
            'ba48aa9643b51612cdd290517e806c320a8cf3447914d9c007757799afb7f582'
            '7bd07a9f17459388a3f893693d30777f0cbb1f69b72837ef76675eaac302aca4'
            'e0ddb358ab80c4c855c0f41fc3962e72d1426c0d7d8adb76552b82f7045ff43f'
            'e0c4ea35eb7c18f3f6f932a7a310b62f0f8ae49eb72eb72a1733e7eabf9bbad1'
            '96913bf5e5d9c828121697fce2ec80c09edfdd06e8e72a35f11a3c42b9a42f64'
            '241107b05ef3747b45e70d1dee5ddc75187dc7748ecd72563137dcf80de3ddab'
            '69017b5c1f17a38fae6390df0db68b157fa2b5fd2c9dee7bc83530eb96488b4c'
            'cfa2206e908ac1ef06a900248e6c90ce7527f7964aac3b18ffadd84516227b39'
            '2419eb6fd0a9121a0bac6bf9e7433530ec1c1d42a2cf5e353e6d25ba61efc830'
            'f75c71b32d36eb63f0d76687863d1476360864056fb983f11cb0a9372c1e6e61'
            '2962e03b06c7dddead50528c747397044d81f22cde5841e7a46ae71070d3d8d7'
            'ca6b7f20293fe1314c15076a762498644e2e7be699a42c1b5e6a3f50c00a7144'
            '6886e33190e9269cbc06161a83d5f58169be8b3fe669b36b7c95e8d4bad161b1'
            '880f8b92477ff94559426aac0f3a87ec2e521af31a92c77735a474a7231911d1'
            '091a0f1ccf413de8a11bff49bc17b41cc5413388b8260b0b145fa60a7e031078'
            'fa9d807a83618cd3610175c8cd312c857b78e822cc0024713b8b2be508201d0f'
            'a9ada9ad6b04b6f136282519d8fe4dc3ff438ed8e71c88a6af68a59a86ed66c9'
            '553f5aa43507f307e3afb6d2b86a3ace7275d8b752e8bac6a7a52b32d6b702b2'
            'ac03fe422d323817ea9620b2a02850c7bcd86c0282bb81d8f3b60e68a742509d'
            '5c3b423c56fd5f4226b14b2cf3237ee1fec5b9295d1023d0f792b46b45d96c65'
            'de9e73aed7a31609b984acdcf9b800ca34d938ce589b467802a0e174de09d55d'
            '6e76d72bb606f332b198823f273c9cba0afce05ef66b2e4b9bba9009b21bc83c'
            '4ddb73494b9653428bdfe1f8e561786ee9361afa14ca71bf922e82f3cef41fc6'
            '6d5cf250fcb7231c0df0fc43840a6b09aeff1ba26517aa0733f1d8be7366f3d4'
            'ce44413635a73b030e2a91aa42c545334618df2fc726ff9e8e873651545b267d'
            '812f7b58395787e9c355760b9c9d3bd0071b709fd99ec79241420c3df7714a43'
            'd58607022bf87bbab0db96527f23f03acf6c365c27d347a4aaac91e336809483'
            '82ab42107559c3d839063e6756e8928e68692f89bff76a9c83bcf775c4bf98aa'
            '2dcc6c088e159defe3e64361cc8606ff63559398dc63a57e3257ca843901de14'
            '227a56967ed4b02c8175cfc4c98a04c4004f5920417b5d92d5da0358cc0c920f')
