From f13cad0e367cb8cf32569b98ae08741069e73b76 Mon Sep 17 00:00:00 2001 From: Tony Volpe Date: Thu, 18 Jul 2024 20:40:50 +0000 Subject: [PATCH] plugin updates --- .../advanced-custom-fields-pro/acf.php | 4 +- .../assets/build/js/pro/acf-pro-blocks.js | 8 + .../assets/build/js/pro/acf-pro-blocks.js.map | 2 +- .../assets/build/js/pro/acf-pro-blocks.min.js | 2 +- .../includes/acf-input-functions.php | 5 + .../ajax/class-acf-ajax-check-screen.php | 10 +- .../includes/api/api-helpers.php | 25 + .../includes/api/api-template.php | 51 +- .../lang/acf-ar.l10n.php | 2 +- .../advanced-custom-fields-pro/lang/acf-ar.mo | Bin 10117 -> 10117 bytes .../advanced-custom-fields-pro/lang/acf-ar.po | 2 +- .../lang/acf-bg_BG.l10n.php | 2 +- .../lang/acf-bg_BG.mo | Bin 18977 -> 18977 bytes .../lang/acf-bg_BG.po | 2 +- .../lang/acf-ca.l10n.php | 2 +- .../advanced-custom-fields-pro/lang/acf-ca.mo | Bin 115587 -> 115587 bytes .../advanced-custom-fields-pro/lang/acf-ca.po | 2201 ++++++++------- .../lang/acf-cs_CZ.l10n.php | 2 +- .../lang/acf-cs_CZ.mo | Bin 105747 -> 105747 bytes .../lang/acf-cs_CZ.po | 2201 ++++++++------- .../lang/acf-da_DK.l10n.php | 2 +- .../lang/acf-de_CH.l10n.php | 2 +- .../lang/acf-de_CH.mo | Bin 8555 -> 8555 bytes .../lang/acf-de_CH.po | 2 +- .../lang/acf-de_DE.l10n.php | 2 +- .../lang/acf-de_DE.mo | Bin 107998 -> 109548 bytes .../lang/acf-de_DE.po | 2100 +++++++++------ .../lang/acf-de_DE_formal.l10n.php | 2 +- .../lang/acf-de_DE_formal.mo | Bin 108041 -> 109591 bytes .../lang/acf-de_DE_formal.po | 2100 +++++++++------ .../lang/acf-el.l10n.php | 2 +- .../advanced-custom-fields-pro/lang/acf-el.mo | Bin 56276 -> 56276 bytes .../advanced-custom-fields-pro/lang/acf-el.po | 2201 ++++++++------- .../lang/acf-en_CA.l10n.php | 2 +- .../lang/acf-en_GB.l10n.php | 2 +- .../lang/acf-en_GB.mo | Bin 126088 -> 121688 bytes .../lang/acf-en_GB.po | 1999 ++++++++------ .../lang/acf-en_ZA.l10n.php | 2 +- .../lang/acf-es_CO.l10n.php | 2 +- .../lang/acf-es_CR.l10n.php | 2 +- .../lang/acf-es_EC.l10n.php | 2 +- .../lang/acf-es_ES.l10n.php | 2 +- .../lang/acf-es_ES.mo | Bin 143294 -> 148403 bytes .../lang/acf-es_ES.po | 1923 +++++++------ .../lang/acf-es_MX.l10n.php | 2 +- .../lang/acf-es_MX.mo | Bin 44633 -> 44633 bytes .../lang/acf-es_MX.po | 2201 ++++++++------- .../lang/acf-es_VE.l10n.php | 2 +- .../lang/acf-fa_AF.l10n.php | 2 +- .../lang/acf-fa_AF.mo | Bin 55047 -> 55047 bytes .../lang/acf-fa_AF.po | 2201 ++++++++------- .../lang/acf-fa_IR.l10n.php | 2 +- .../lang/acf-fa_IR.mo | Bin 83709 -> 83566 bytes .../lang/acf-fa_IR.po | 2201 ++++++++------- .../lang/acf-fi.l10n.php | 2 +- .../advanced-custom-fields-pro/lang/acf-fi.mo | Bin 66475 -> 66475 bytes .../advanced-custom-fields-pro/lang/acf-fi.po | 2201 ++++++++------- .../lang/acf-fr_CA.l10n.php | 2 +- .../lang/acf-fr_CA.mo | Bin 9227 -> 9227 bytes .../lang/acf-fr_CA.po | 2 +- .../lang/acf-fr_FR.l10n.php | 2 +- .../lang/acf-fr_FR.mo | Bin 126124 -> 126531 bytes .../lang/acf-fr_FR.po | 2203 ++++++++------- .../lang/acf-gl_ES.l10n.php | 2 +- .../lang/acf-gl_ES.mo | Bin 47825 -> 46998 bytes .../lang/acf-gl_ES.po | 2249 +++++++++------- .../lang/acf-gu.l10n.php | 2 +- .../advanced-custom-fields-pro/lang/acf-gu.mo | Bin 127768 -> 127799 bytes .../advanced-custom-fields-pro/lang/acf-gu.po | 2203 ++++++++------- .../lang/acf-he_IL.l10n.php | 2 +- .../lang/acf-he_IL.mo | Bin 5745 -> 5745 bytes .../lang/acf-he_IL.po | 2 +- .../lang/acf-hr.l10n.php | 2 +- .../advanced-custom-fields-pro/lang/acf-hr.mo | Bin 7889 -> 7889 bytes .../advanced-custom-fields-pro/lang/acf-hr.po | 2 +- .../lang/acf-hu_HU.l10n.php | 2 +- .../lang/acf-hu_HU.mo | Bin 5325 -> 5325 bytes .../lang/acf-hu_HU.po | 2 +- .../lang/acf-id_ID.l10n.php | 2 +- .../lang/acf-id_ID.mo | Bin 8855 -> 8855 bytes .../lang/acf-id_ID.po | 2 +- .../lang/acf-it_IT.l10n.php | 2 +- .../lang/acf-it_IT.mo | Bin 51552 -> 51552 bytes .../lang/acf-it_IT.po | 2201 ++++++++------- .../lang/acf-ja.l10n.php | 2 +- .../advanced-custom-fields-pro/lang/acf-ja.mo | Bin 77108 -> 77108 bytes .../advanced-custom-fields-pro/lang/acf-ja.po | 2201 ++++++++------- .../lang/acf-ko_KR.l10n.php | 2 +- .../lang/acf-ko_KR.mo | Bin 134498 -> 140136 bytes .../lang/acf-ko_KR.po | 2001 ++++++++------ .../lang/acf-nb_NO.l10n.php | 2 +- .../lang/acf-nb_NO.mo | Bin 43869 -> 43869 bytes .../lang/acf-nb_NO.po | 2201 ++++++++------- .../lang/acf-nl_BE.l10n.php | 2 +- .../lang/acf-nl_BE.mo | Bin 133318 -> 138123 bytes .../lang/acf-nl_BE.po | 1924 +++++++------ .../lang/acf-nl_NL.l10n.php | 2 +- .../lang/acf-nl_NL.mo | Bin 134410 -> 138268 bytes .../lang/acf-nl_NL.po | 2342 +++++++++------- .../lang/acf-nl_NL_formal.l10n.php | 2 +- .../lang/acf-nl_NL_formal.mo | Bin 128927 -> 132753 bytes .../lang/acf-nl_NL_formal.po | 2342 +++++++++------- .../lang/acf-pl_PL.l10n.php | 2 +- .../lang/acf-pl_PL.mo | Bin 119374 -> 121420 bytes .../lang/acf-pl_PL.po | 2263 +++++++++------- .../lang/acf-pt_AO.l10n.php | 2 +- .../lang/acf-pt_BR.l10n.php | 2 +- .../lang/acf-pt_BR.mo | Bin 115180 -> 115180 bytes .../lang/acf-pt_BR.po | 2201 ++++++++------- .../lang/acf-pt_PT.l10n.php | 2 +- .../lang/acf-pt_PT.mo | Bin 73032 -> 73032 bytes .../lang/acf-pt_PT.po | 2201 ++++++++------- .../lang/acf-ro_RO.l10n.php | 2 +- .../lang/acf-ro_RO.mo | Bin 50247 -> 50247 bytes .../lang/acf-ro_RO.po | 2201 ++++++++------- .../lang/acf-ru_RU.l10n.php | 2 +- .../lang/acf-ru_RU.mo | Bin 100930 -> 100930 bytes .../lang/acf-ru_RU.po | 2201 ++++++++------- .../lang/acf-sk_SK.l10n.php | 2 +- .../lang/acf-sk_SK.mo | Bin 5838 -> 5838 bytes .../lang/acf-sk_SK.po | 2 +- .../lang/acf-sv_SE.l10n.php | 2 +- .../lang/acf-sv_SE.mo | Bin 113111 -> 119375 bytes .../lang/acf-sv_SE.po | 2060 ++++++++------ .../lang/acf-tr_TR.l10n.php | 2 +- .../lang/acf-tr_TR.mo | Bin 95661 -> 104379 bytes .../lang/acf-tr_TR.po | 2016 ++++++++------ .../lang/acf-uk.l10n.php | 2 +- .../advanced-custom-fields-pro/lang/acf-uk.mo | Bin 52319 -> 59634 bytes .../advanced-custom-fields-pro/lang/acf-uk.po | 2377 ++++++++++------- .../lang/acf-zh_CN.l10n.php | 2 +- .../lang/acf-zh_CN.mo | Bin 102790 -> 102413 bytes .../lang/acf-zh_CN.po | 2206 ++++++++------- .../lang/acf-zh_TW.l10n.php | 2 +- .../lang/acf-zh_TW.mo | Bin 7873 -> 7873 bytes .../lang/acf-zh_TW.po | 2 +- .../lang/pro/acf.pot | 16 +- .../advanced-custom-fields-pro/pro/blocks.php | 25 +- .../pro/updates.php | 8 +- .../advanced-custom-fields-pro/readme.txt | 351 +-- .../assets/images/providers/smtp2go.svg | 1 + .../wp-mail-smtp/assets/js/smtp-admin.js | 13 + .../wp-mail-smtp/assets/js/smtp-admin.min.js | 2 +- .../assets/languages/wp-mail-smtp-vue.php | 81 +- .../assets/languages/wp-mail-smtp.pot | 665 ++--- .../assets/vue/css/wizard.min.css | 2 +- .../assets/vue/css/wizard.rtl.min.css | 2 +- .../wp-mail-smtp/assets/vue/img/smtp2go.svg | 1 + .../assets/vue/js/chunk-vendors.min.js | 10 +- .../wp-mail-smtp/assets/vue/js/wizard.min.js | 2 +- wp/wp-content/plugins/wp-mail-smtp/readme.txt | 61 +- .../plugins/wp-mail-smtp/src/Admin/Area.php | 11 +- .../wp-mail-smtp/src/Admin/Education.php | 6 +- .../src/Admin/Pages/AlertsTab.php | 29 + .../plugins/wp-mail-smtp/src/Connect.php | 2 +- .../plugins/wp-mail-smtp/src/DBRepair.php | 11 - .../wp-mail-smtp/src/Helpers/Helpers.php | 1 + .../plugins/wp-mail-smtp/src/Helpers/UI.php | 49 + .../plugins/wp-mail-smtp/src/Options.php | 43 +- .../wp-mail-smtp/src/Providers/Loader.php | 2 + .../src/Providers/OptionsAbstract.php | 19 +- .../src/Providers/SMTP2GO/Mailer.php | 485 ++++ .../src/Providers/SMTP2GO/Options.php | 124 + .../src/Providers/Sendlayer/Options.php | 7 + .../src/Tasks/Queue/ProcessQueueTask.php | 13 + .../src/Tasks/Queue/SendEnqueuedEmailTask.php | 13 + .../plugins/wp-mail-smtp/src/Tasks/Task.php | 23 + .../plugins/wp-mail-smtp/src/Tasks/Tasks.php | 3 + .../plugins/wp-mail-smtp/vendor/autoload.php | 2 +- .../vendor/composer/autoload_classmap.php | 39 +- .../vendor/composer/autoload_real.php | 10 +- .../vendor/composer/autoload_static.php | 47 +- .../vendor/composer/installed.php | 68 +- .../action-scheduler/action-scheduler.php | 16 +- .../action-scheduler/changelog.txt | 20 +- .../classes/ActionScheduler_ActionFactory.php | 23 +- .../classes/ActionScheduler_AdminView.php | 3 +- .../classes/ActionScheduler_ListTable.php | 2 +- .../ActionScheduler_Abstract_ListTable.php | 31 +- .../abstracts/ActionScheduler_Store.php | 3 +- .../ActionScheduler_TimezoneHelper.php | 4 +- .../data-stores/ActionScheduler_DBStore.php | 9 +- .../ActionScheduler_wpPostStore.php | 4 +- .../classes/migration/ActionMigrator.php | 1 + .../ActionScheduler_DBStoreMigrator.php | 1 + .../action-scheduler/functions.php | 8 +- .../woocommerce/action-scheduler/readme.txt | 24 +- .../vendor_prefixed/monolog/monolog/LICENSE | 2 +- .../Monolog/Attribute/AsMonologProcessor.php | 42 + .../monolog/src/Monolog/DateTimeImmutable.php | 45 + .../monolog/src/Monolog/ErrorHandler.php | 175 +- .../Monolog/Formatter/ChromePHPFormatter.php | 16 +- .../Monolog/Formatter/ElasticaFormatter.php | 35 +- .../Formatter/ElasticsearchFormatter.php | 79 + .../Monolog/Formatter/FlowdockFormatter.php | 33 +- .../Monolog/Formatter/FluentdFormatter.php | 15 +- .../Monolog/Formatter/FormatterInterface.php | 7 + .../Formatter/GelfMessageFormatter.php | 95 +- .../Formatter/GoogleCloudLoggingFormatter.php | 36 + .../src/Monolog/Formatter/HtmlFormatter.php | 46 +- .../src/Monolog/Formatter/JsonFormatter.php | 128 +- .../src/Monolog/Formatter/LineFormatter.php | 122 +- .../src/Monolog/Formatter/LogglyFormatter.php | 11 +- .../Monolog/Formatter/LogmaticFormatter.php | 57 + .../Monolog/Formatter/LogstashFormatter.php | 102 +- .../Monolog/Formatter/MongoDBFormatter.php | 102 +- .../Monolog/Formatter/NormalizerFormatter.php | 163 +- .../src/Monolog/Formatter/ScalarFormatter.php | 18 +- .../Monolog/Formatter/WildfireFormatter.php | 48 +- .../src/Monolog/Handler/AbstractHandler.php | 124 +- .../Handler/AbstractProcessingHandler.php | 44 +- .../Monolog/Handler/AbstractSyslogHandler.php | 24 +- .../src/Monolog/Handler/AmqpHandler.php | 81 +- .../Monolog/Handler/BrowserConsoleHandler.php | 136 +- .../src/Monolog/Handler/BufferHandler.php | 63 +- .../src/Monolog/Handler/ChromePHPHandler.php | 90 +- .../src/Monolog/Handler/CouchDBHandler.php | 18 +- .../src/Monolog/Handler/CubeHandler.php | 59 +- .../monolog/src/Monolog/Handler/Curl/Util.php | 28 +- .../Monolog/Handler/DeduplicationHandler.php | 37 +- .../Handler/DoctrineCouchDBHandler.php | 9 +- .../src/Monolog/Handler/DynamoDbHandler.php | 29 +- ...cSearchHandler.php => ElasticaHandler.php} | 51 +- .../src/Monolog/Handler/ErrorLogHandler.php | 43 +- .../Monolog/Handler/FallbackGroupHandler.php | 67 + .../src/Monolog/Handler/FilterHandler.php | 87 +- .../ActivationStrategyInterface.php | 8 +- .../ChannelLevelActivationStrategy.php | 26 +- .../ErrorLevelActivationStrategy.php | 15 +- .../Monolog/Handler/FingersCrossedHandler.php | 123 +- .../src/Monolog/Handler/FirePHPHandler.php | 85 +- .../src/Monolog/Handler/FleepHookHandler.php | 45 +- .../src/Monolog/Handler/FlowdockHandler.php | 43 +- .../Handler/FormattableHandlerInterface.php | 2 - .../Handler/FormattableHandlerTrait.php | 9 +- .../src/Monolog/Handler/GelfHandler.php | 22 +- .../src/Monolog/Handler/GroupHandler.php | 57 +- .../monolog/src/Monolog/Handler/Handler.php | 56 + .../src/Monolog/Handler/HandlerInterface.php | 54 +- .../src/Monolog/Handler/HandlerWrapper.php | 70 +- .../src/Monolog/Handler/HipChatHandler.php | 300 --- .../src/Monolog/Handler/IFTTTHandler.php | 18 +- .../src/Monolog/Handler/InsightOpsHandler.php | 20 +- .../src/Monolog/Handler/LogEntriesHandler.php | 19 +- .../src/Monolog/Handler/LogglyHandler.php | 99 +- .../src/Monolog/Handler/LogmaticHandler.php | 75 + .../src/Monolog/Handler/MailHandler.php | 44 +- .../src/Monolog/Handler/MandrillHandler.php | 31 +- .../Handler/MissingExtensionException.php | 5 +- .../src/Monolog/Handler/MongoDBHandler.php | 61 +- .../Monolog/Handler/NativeMailerHandler.php | 74 +- .../src/Monolog/Handler/NewRelicHandler.php | 43 +- .../src/Monolog/Handler/NoopHandler.php | 39 + .../src/Monolog/Handler/NullHandler.php | 33 +- .../src/Monolog/Handler/OverflowHandler.php | 119 + .../src/Monolog/Handler/PHPConsoleHandler.php | 85 +- .../src/Monolog/Handler/ProcessHandler.php | 168 ++ .../Handler/ProcessableHandlerInterface.php | 14 +- .../Handler/ProcessableHandlerTrait.php | 16 +- .../src/Monolog/Handler/PsrHandler.php | 49 +- .../src/Monolog/Handler/PushoverHandler.php | 91 +- .../src/Monolog/Handler/RavenHandler.php | 197 -- .../src/Monolog/Handler/RedisHandler.php | 24 +- .../Monolog/Handler/RedisPubSubHandler.php | 61 + .../src/Monolog/Handler/RollbarHandler.php | 55 +- .../Monolog/Handler/RotatingFileHandler.php | 78 +- .../src/Monolog/Handler/SamplingHandler.php | 53 +- .../src/Monolog/Handler/SendGridHandler.php | 92 + .../src/Monolog/Handler/Slack/SlackRecord.php | 164 +- .../src/Monolog/Handler/SlackHandler.php | 125 +- .../Monolog/Handler/SlackWebhookHandler.php | 40 +- .../src/Monolog/Handler/SlackbotHandler.php | 70 - .../src/Monolog/Handler/SocketHandler.php | 188 +- .../src/Monolog/Handler/SqsHandler.php | 52 + .../src/Monolog/Handler/StreamHandler.php | 130 +- .../Monolog/Handler/SwiftMailerHandler.php | 62 +- .../Monolog/Handler/SymfonyMailerHandler.php | 101 + .../src/Monolog/Handler/SyslogHandler.php | 24 +- .../Monolog/Handler/SyslogUdp/UdpSocket.php | 54 +- .../src/Monolog/Handler/SyslogUdpHandler.php | 70 +- .../Monolog/Handler/TelegramBotHandler.php | 216 ++ .../src/Monolog/Handler/TestHandler.php | 95 +- .../Handler/WebRequestRecognizerTrait.php | 24 + .../Handler/WhatFailureGroupHandler.php | 37 +- .../Monolog/Handler/ZendMonitorHandler.php | 42 +- .../monolog/monolog/src/Monolog/LogRecord.php | 33 + .../monolog/monolog/src/Monolog/Logger.php | 585 ++-- .../src/Monolog/Processor/GitProcessor.php | 28 +- .../Monolog/Processor/HostnameProcessor.php | 33 + .../Processor/IntrospectionProcessor.php | 40 +- .../Processor/MemoryPeakUsageProcessor.php | 14 +- .../src/Monolog/Processor/MemoryProcessor.php | 12 +- .../Processor/MemoryUsageProcessor.php | 14 +- .../Monolog/Processor/MercurialProcessor.php | 30 +- .../Monolog/Processor/ProcessIdProcessor.php | 6 +- .../Monolog/Processor/ProcessorInterface.php | 10 +- .../Processor/PsrLogMessageProcessor.php | 24 +- .../src/Monolog/Processor/TagProcessor.php | 24 +- .../src/Monolog/Processor/UidProcessor.php | 20 +- .../src/Monolog/Processor/WebProcessor.php | 52 +- .../monolog/monolog/src/Monolog/Registry.php | 26 +- .../src/Monolog/ResettableInterface.php | 4 + .../monolog/src/Monolog/SignalHandler.php | 78 +- .../monolog/monolog/src/Monolog/Utils.php | 130 +- .../constant_time_encoding/src/Base32.php | 53 +- .../constant_time_encoding/src/Base64.php | 36 +- .../constant_time_encoding/src/Binary.php | 12 +- .../constant_time_encoding/src/Encoding.php | 90 +- .../constant_time_encoding/src/Hex.php | 16 +- .../constant_time_encoding/src/RFC4648.php | 50 +- .../deprecation-contracts/function.php | 9 +- .../symfony/polyfill-intl-idn/bootstrap80.php | 159 +- .../symfony/polyfill-mbstring/bootstrap80.php | 298 +-- .../plugins/wp-mail-smtp/wp_mail_smtp.php | 4 +- 314 files changed, 45107 insertions(+), 30963 deletions(-) create mode 100644 wp/wp-content/plugins/wp-mail-smtp/assets/images/providers/smtp2go.svg create mode 100644 wp/wp-content/plugins/wp-mail-smtp/assets/vue/img/smtp2go.svg create mode 100644 wp/wp-content/plugins/wp-mail-smtp/src/Providers/SMTP2GO/Mailer.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/src/Providers/SMTP2GO/Options.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Attribute/AsMonologProcessor.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/DateTimeImmutable.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php rename wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/{ElasticSearchHandler.php => ElasticaHandler.php} (64%) create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Handler.php delete mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HipChatHandler.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NoopHandler.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/OverflowHandler.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessHandler.php delete mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RavenHandler.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SendGridHandler.php delete mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SqsHandler.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/LogRecord.php create mode 100644 wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php diff --git a/wp/wp-content/plugins/advanced-custom-fields-pro/acf.php b/wp/wp-content/plugins/advanced-custom-fields-pro/acf.php index 3c1595b6..11708f75 100644 --- a/wp/wp-content/plugins/advanced-custom-fields-pro/acf.php +++ b/wp/wp-content/plugins/advanced-custom-fields-pro/acf.php @@ -9,7 +9,7 @@ * Plugin Name: Advanced Custom Fields PRO * Plugin URI: https://www.advancedcustomfields.com * Description: Customize WordPress with powerful, professional and intuitive fields. - * Version: 6.3.3 + * Version: 6.3.4 * Author: WP Engine * Author URI: https://wpengine.com/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=plugin_directory&utm_content=advanced_custom_fields * Update URI: https://www.advancedcustomfields.com/pro @@ -36,7 +36,7 @@ if ( ! class_exists( 'ACF' ) ) { * * @var string */ - public $version = '6.3.3'; + public $version = '6.3.4'; /** * The plugin settings array. diff --git a/wp/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/pro/acf-pro-blocks.js b/wp/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/pro/acf-pro-blocks.js index 1cb3832d..684008c7 100644 --- a/wp/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/pro/acf-pro-blocks.js +++ b/wp/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/pro/acf-pro-blocks.js @@ -1325,6 +1325,10 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js"); data }) => { acf.debug('fetch block form promise'); + if (!data) { + this.setHtml(`
${acf.__('Error loading block form')}
`); + return; + } if (data.form) { this.setHtml(acf.applyFilters('blocks/form/render', data.form.replaceAll(data.clientId, clientId), false)); } @@ -1492,6 +1496,10 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js"); }).done(({ data }) => { + if (!data) { + this.setHtml(`
${acf.__('Error previewing block')}
`); + return; + } let replaceHtml = data.preview.replaceAll(data.clientId, clientId); if (getBlockVersion(name) == 1) { replaceHtml = '
' + replaceHtml + '
'; diff --git a/wp/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/pro/acf-pro-blocks.js.map b/wp/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/pro/acf-pro-blocks.js.map index 4e4973bd..ce69bee2 100644 --- a/wp/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/pro/acf-pro-blocks.js.map +++ b/wp/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/pro/acf-pro-blocks.js.map @@ -1 +1 @@ -{"version":3,"file":"acf-pro-blocks.js","mappings":";;;;;;;;;;;;;;;;;AAAA,MAAMA,GAAG,GAAGC,mBAAO,CAAE,sCAAM,CAAC;AAE5B,CAAE,CAAEC,CAAC,EAAEC,SAAS,KAAM;EACrB;EACA,MAAM;IACLC,aAAa;IACbC,iBAAiB;IACjBC,WAAW;IACXC,aAAa;IACbC,gBAAgB;IAChBC;EACD,CAAC,GAAGC,EAAE,CAACC,WAAW;EAElB,MAAM;IAAEC,YAAY;IAAEC,aAAa;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAGL,EAAE,CAACM,UAAU;EAC3E,MAAM;IAAEC;EAAS,CAAC,GAAGP,EAAE,CAACQ,OAAO;EAC/B,MAAM;IAAEC;EAAU,CAAC,GAAGC,KAAK;EAC3B,MAAM;IAAEC;EAAU,CAAC,GAAGX,EAAE,CAACY,IAAI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C,kBAAkB;AACrD;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;;;;;;;;;;AC/FD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;ACpBA;AACA,cAAc,mBAAO,CAAC,4CAAO;AAC7B,aAAa,8EAAuB;AACpC,iBAAiB,mBAAO,CAAC,oDAAW;AACpC,YAAY,6EAAsB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;AC/JD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,IAAI,IAAqC;AACzC;AACA;;AAEA,YAAY,mBAAO,CAAC,4CAAO;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,iGAAiG,eAAe;AAChH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA,KAAK,GAAG;;AAER,kDAAkD;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,4BAA4B;AAC5B;AACA,qCAAqC;;AAErC,gCAAgC;AAChC;AACA;;AAEA,gCAAgC;;AAEhC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;;AAGF;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA,sBAAsB;AACtB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,iCAAiC;AACjC;AACA,SAAS;AACT,2BAA2B;AAC3B;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,2DAA2D;;AAE3D;AACA;;AAEA;AACA,yDAAyD;AACzD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA,gFAAgF;AAChF;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;;;AAGlB;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2HAA2H;AAC3H;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wCAAwC;AACxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,eAAe;AAC1B,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA,oBAAoB;AACpB,2DAA2D,UAAU;AACrE,yBAAyB,UAAU;AACnC;AACA,aAAa,UAAU;AACvB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,YAAY,SAAS;AACrB;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,6DAA6D;AAC7D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,iBAAiB;AACvC;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,4CAA4C;;AAE5C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA,0DAA0D;AAC1D;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,gDAAgD,gDAAgD,MAAM,aAAa;;AAEnH;AACA,iDAAiD,kCAAkC,OAAO;;AAE1F,yGAAyG,cAAc,UAAU,gGAAgG,kBAAkB,UAAU,UAAU;;AAEvQ;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC;AACtC;;AAEA;;AAEA,gBAAgB;AAChB,WAAW;AACX,YAAY;AACZ,GAAG;AACH;;;;;;;;;;;;;ACpzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,IAAI,IAAqC;AACzC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;;AAGL;;AAEA;AACA,oBAAoB;;AAEpB;AACA;AACA,MAAM;;;AAGN;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,4BAA4B;AAC5B;AACA,qCAAqC;;AAErC,gCAAgC;AAChC;AACA;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6FAA6F,aAAa;AAC1G;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG,eAAe;AAChH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA,KAAK,GAAG;;AAER,kDAAkD;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,8MAA8M;;AAE9M;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,aAAa,YAAY;AACzB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,WAAW;AACxB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB,aAAa,WAAW;AACxB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB,aAAa,WAAW;AACxB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,0BAA0B;;AAE1B,2BAA2B;AAC3B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA,WAAW,WAAW;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;;AAEA;AACA,oDAAoD;;AAEpD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,iCAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wCAAwC;AACxC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;;AAGF;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,eAAe;AAC1B,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,qEAAqE;;AAErE;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;;AAGA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA,oBAAoB,oBAAoB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB;;AAEhB,uBAAuB,kBAAkB;;AAEzC;AACA,yBAAyB;;AAEzB,4BAA4B;AAC5B;AACA;;AAEA,gCAAgC;;AAEhC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM;;;AAGN;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,IAAI;AACJ;;;AAGA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA,oBAAoB,oBAAoB;AACxC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,YAAY;AACZ;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wCAAwC;AACxC;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wBAAwB;;AAExB;;AAEA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,qIAAqI,yCAAyC;AAC9K;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,kBAAkB;AAC7B,WAAW,GAAG;AACd,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,YAAY,QAAQ;AACpB;;;AAGA;AACA;AACA;AACA,SAAS;AACT,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,kBAAkB;AAC7B,WAAW,GAAG;AACd;AACA;AACA;AACA,wCAAwC;AACxC,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,YAAY,cAAc;AAC1B;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA,0CAA0C;AAC1C;;AAEA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA,oCAAoC;AACpC;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,+CAA+C,IAAI;AACnD;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,oCAAoC,IAAI;AACxC;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0CAA0C;AAC1C;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA,sBAAsB;AACtB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,iCAAiC;AACjC;AACA,SAAS;AACT,2BAA2B;AAC3B;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,2DAA2D;;AAE3D;AACA;;AAEA;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA,gFAAgF;AAChF;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;;;AAGlB;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2HAA2H;AAC3H;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,2DAA2D;AAC3D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,4CAA4C;;AAE5C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA,sDAAsD;AACtD;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;;AAGA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,sBAAsB;AACxC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,mCAAmC;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;;AAEA,0OAA0O;AAC1O;AACA,WAAW;AACX;AACA;;AAEA;AACA,MAAM;AACN,gCAAgC;AAChC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;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;AAC5B;;;;;;;;;;;;;;;;ACLA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH;;;;;;;UCRA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;WACA;WACA;WACA;;;;;;;;;;;;;;;ACJ6B","sources":["webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-blocks.js","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-jsx-names.js","webpack://advanced-custom-fields-pro/./node_modules/charenc/charenc.js","webpack://advanced-custom-fields-pro/./node_modules/crypt/crypt.js","webpack://advanced-custom-fields-pro/./node_modules/is-buffer/index.js","webpack://advanced-custom-fields-pro/./node_modules/md5/md5.js","webpack://advanced-custom-fields-pro/./node_modules/react/cjs/react-jsx-runtime.development.js","webpack://advanced-custom-fields-pro/./node_modules/react/cjs/react.development.js","webpack://advanced-custom-fields-pro/./node_modules/react/index.js","webpack://advanced-custom-fields-pro/./node_modules/react/jsx-runtime.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://advanced-custom-fields-pro/webpack/bootstrap","webpack://advanced-custom-fields-pro/webpack/runtime/compat get default export","webpack://advanced-custom-fields-pro/webpack/runtime/define property getters","webpack://advanced-custom-fields-pro/webpack/runtime/hasOwnProperty shorthand","webpack://advanced-custom-fields-pro/webpack/runtime/make namespace object","webpack://advanced-custom-fields-pro/webpack/runtime/node module decorator","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/pro/acf-pro-blocks.js"],"sourcesContent":["const md5 = require( 'md5' );\n\n( ( $, undefined ) => {\n\t// Dependencies.\n\tconst {\n\t\tBlockControls,\n\t\tInspectorControls,\n\t\tInnerBlocks,\n\t\tuseBlockProps,\n\t\tAlignmentToolbar,\n\t\tBlockVerticalAlignmentToolbar,\n\t} = wp.blockEditor;\n\n\tconst { ToolbarGroup, ToolbarButton, Placeholder, Spinner } = wp.components;\n\tconst { Fragment } = wp.element;\n\tconst { Component } = React;\n\tconst { useSelect } = wp.data;\n\tconst { createHigherOrderComponent } = wp.compose;\n\n\t// Potentially experimental dependencies.\n\tconst BlockAlignmentMatrixToolbar =\n\t\twp.blockEditor.__experimentalBlockAlignmentMatrixToolbar || wp.blockEditor.BlockAlignmentMatrixToolbar;\n\t// Gutenberg v10.x begins transition from Toolbar components to Control components.\n\tconst BlockAlignmentMatrixControl =\n\t\twp.blockEditor.__experimentalBlockAlignmentMatrixControl || wp.blockEditor.BlockAlignmentMatrixControl;\n\tconst BlockFullHeightAlignmentControl =\n\t\twp.blockEditor.__experimentalBlockFullHeightAligmentControl ||\n\t\twp.blockEditor.__experimentalBlockFullHeightAlignmentControl ||\n\t\twp.blockEditor.BlockFullHeightAlignmentControl;\n\tconst useInnerBlocksProps = wp.blockEditor.__experimentalUseInnerBlocksProps || wp.blockEditor.useInnerBlocksProps;\n\n\t/**\n\t * Storage for registered block types.\n\t *\n\t * @since 5.8.0\n\t * @var object\n\t */\n\tconst blockTypes = {};\n\n\t/**\n\t * Data storage for Block Instances and their DynamicHTML components.\n\t * This is temporarily stored on the ACF object, but this will be replaced in ACF 6.4.\n\t * Developers should not rely on reading or using any aspect of acf.blockInstances.\n\t *\n\t * @since 6.3\n\t */\n\tacf.blockInstances = {};\n\n\t/**\n\t * Returns a block type for the given name.\n\t *\n\t * @date\t20/2/19\n\t * @since\t5.8.0\n\t *\n\t * @param\tstring name The block name.\n\t * @return\t(object|false)\n\t */\n\tfunction getBlockType( name ) {\n\t\treturn blockTypes[ name ] || false;\n\t}\n\n\t/**\n\t * Returns a block version for a given block name\n\t *\n\t * @date 8/6/22\n\t * @since 6.0\n\t *\n\t * @param string name The block name\n\t * @return int\n\t */\n\tfunction getBlockVersion( name ) {\n\t\tconst blockType = getBlockType( name );\n\t\treturn blockType.acf_block_version || 1;\n\t}\n\n\t/**\n\t * Returns a block's validate property. Default true.\n\t *\n\t * @since 6.3\n\t *\n\t * @param string name The block name\n\t * @return boolean\n\t */\n\tfunction blockSupportsValidation( name ) {\n\t\tconst blockType = getBlockType( name );\n\t\treturn blockType.validate;\n\t}\n\n\t/**\n\t * Returns true if a block (identified by client ID) is nested in a query loop block.\n\t *\n\t * @date 17/1/22\n\t * @since 5.12\n\t *\n\t * @param {string} clientId A block client ID\n\t * @return boolean\n\t */\n\tfunction isBlockInQueryLoop( clientId ) {\n\t\tconst parents = wp.data.select( 'core/block-editor' ).getBlockParents( clientId );\n\t\tconst parentsData = wp.data.select( 'core/block-editor' ).getBlocksByClientId( parents );\n\t\treturn parentsData.filter( ( block ) => block.name === 'core/query' ).length;\n\t}\n\n\t/**\n\t * Returns true if we're currently inside the WP 5.9+ site editor.\n\t *\n\t * @date 08/02/22\n\t * @since 5.12\n\t *\n\t * @return boolean\n\t */\n\tfunction isSiteEditor() {\n\t\treturn typeof pagenow === 'string' && pagenow === 'site-editor';\n\t}\n\n\t/**\n\t * Returns true if the block editor is currently showing the desktop device type preview.\n\t *\n\t * This function will always return true in the site editor as it uses the\n\t * edit-post store rather than the edit-site store.\n\t *\n\t * @date 15/02/22\n\t * @since 5.12\n\t *\n\t * @return boolean\n\t */\n\tfunction isDesktopPreviewDeviceType() {\n\t\tconst editPostStore = select( 'core/edit-post' );\n\n\t\t// Return true if the edit post store isn't available (such as in the widget editor)\n\t\tif ( ! editPostStore ) return true;\n\n\t\t// Check if function exists (experimental or not) and return true if it's Desktop, or doesn't exist.\n\t\tif ( editPostStore.__experimentalGetPreviewDeviceType ) {\n\t\t\treturn 'Desktop' === editPostStore.__experimentalGetPreviewDeviceType();\n\t\t} else if ( editPostStore.getPreviewDeviceType ) {\n\t\t\treturn 'Desktop' === editPostStore.getPreviewDeviceType();\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t/**\n\t * Returns true if the block editor is currently in template edit mode.\n\t *\n\t * @date 16/02/22\n\t * @since 5.12\n\t *\n\t * @return boolean\n\t */\n\tfunction isEditingTemplate() {\n\t\tconst editPostStore = select( 'core/edit-post' );\n\n\t\t// Return false if the edit post store isn't available (such as in the widget editor)\n\t\tif ( ! editPostStore ) return false;\n\n\t\t// Return false if the function doesn't exist\n\t\tif ( ! editPostStore.isEditingTemplate ) return false;\n\n\t\treturn editPostStore.isEditingTemplate();\n\t}\n\n\t/**\n\t * Returns true if we're currently inside an iFramed non-desktop device preview type (WP5.9+)\n\t *\n\t * @date 15/02/22\n\t * @since 5.12\n\t *\n\t * @return boolean\n\t */\n\tfunction isiFramedMobileDevicePreview() {\n\t\treturn $( 'iframe[name=editor-canvas]' ).length && ! isDesktopPreviewDeviceType();\n\t}\n\n\t/**\n\t * Registers a block type.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.8.0\n\t *\n\t * @param\tobject blockType The block type settings localized from PHP.\n\t * @return\tobject The result from wp.blocks.registerBlockType().\n\t */\n\tfunction registerBlockType( blockType ) {\n\t\t// Bail early if is excluded post_type.\n\t\tconst allowedTypes = blockType.post_types || [];\n\t\tif ( allowedTypes.length ) {\n\t\t\t// Always allow block to appear on \"Edit reusable Block\" screen.\n\t\t\tallowedTypes.push( 'wp_block' );\n\n\t\t\t// Check post type.\n\t\t\tconst postType = acf.get( 'postType' );\n\t\t\tif ( ! allowedTypes.includes( postType ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Handle svg HTML.\n\t\tif ( typeof blockType.icon === 'string' && blockType.icon.substr( 0, 4 ) === '{ iconHTML };\n\t\t}\n\n\t\t// Remove icon if empty to allow for default \"block\".\n\t\t// Avoids JS error preventing block from being registered.\n\t\tif ( ! blockType.icon ) {\n\t\t\tdelete blockType.icon;\n\t\t}\n\n\t\t// Check category exists and fallback to \"common\".\n\t\tconst category = wp.blocks\n\t\t\t.getCategories()\n\t\t\t.filter( ( { slug } ) => slug === blockType.category )\n\t\t\t.pop();\n\t\tif ( ! category ) {\n\t\t\t//console.warn( `The block \"${blockType.name}\" is registered with an unknown category \"${blockType.category}\".` );\n\t\t\tblockType.category = 'common';\n\t\t}\n\n\t\t// Merge in block settings before local additions.\n\t\tblockType = acf.parseArgs( blockType, {\n\t\t\ttitle: '',\n\t\t\tname: '',\n\t\t\tcategory: '',\n\t\t\tapi_version: 2,\n\t\t\tacf_block_version: 1,\n\t\t} );\n\n\t\t// Remove all empty attribute defaults from PHP values to allow serialisation.\n\t\t// https://github.com/WordPress/gutenberg/issues/7342\n\t\tfor ( const key in blockType.attributes ) {\n\t\t\tif ( 'default' in blockType.attributes[ key ] && blockType.attributes[ key ].default.length === 0 ) {\n\t\t\t\tdelete blockType.attributes[ key ].default;\n\t\t\t}\n\t\t}\n\n\t\t// Apply anchor supports to avoid block editor default writing to ID.\n\t\tif ( blockType.supports.anchor ) {\n\t\t\tblockType.attributes.anchor = {\n\t\t\t\ttype: 'string',\n\t\t\t};\n\t\t}\n\n\t\t// Append edit and save functions.\n\t\tlet ThisBlockEdit = BlockEdit;\n\t\tlet ThisBlockSave = BlockSave;\n\n\t\t// Apply alignText functionality.\n\t\tif ( blockType.supports.alignText || blockType.supports.align_text ) {\n\t\t\tblockType.attributes = addBackCompatAttribute( blockType.attributes, 'align_text', 'string' );\n\t\t\tThisBlockEdit = withAlignTextComponent( ThisBlockEdit, blockType );\n\t\t}\n\n\t\t// Apply alignContent functionality.\n\t\tif ( blockType.supports.alignContent || blockType.supports.align_content ) {\n\t\t\tblockType.attributes = addBackCompatAttribute( blockType.attributes, 'align_content', 'string' );\n\t\t\tThisBlockEdit = withAlignContentComponent( ThisBlockEdit, blockType );\n\t\t}\n\n\t\t// Apply fullHeight functionality.\n\t\tif ( blockType.supports.fullHeight || blockType.supports.full_height ) {\n\t\t\tblockType.attributes = addBackCompatAttribute( blockType.attributes, 'full_height', 'boolean' );\n\t\t\tThisBlockEdit = withFullHeightComponent( ThisBlockEdit, blockType.blockType );\n\t\t}\n\n\t\t// Set edit and save functions.\n\t\tblockType.edit = ( props ) => {\n\t\t\t// Ensure we remove our save lock if a block is removed.\n\t\t\twp.element.useEffect( () => {\n\t\t\t\treturn () => {\n\t\t\t\t\tif ( ! wp.data.dispatch( 'core/editor' ) ) return;\n\t\t\t\t\twp.data.dispatch( 'core/editor' ).unlockPostSaving( 'acf/block/' + props.clientId );\n\t\t\t\t};\n\t\t\t}, [] );\n\n\t\t\treturn ;\n\t\t};\n\t\tblockType.save = () => ;\n\n\t\t// Add to storage.\n\t\tblockTypes[ blockType.name ] = blockType;\n\n\t\t// Register with WP.\n\t\tconst result = wp.blocks.registerBlockType( blockType.name, blockType );\n\n\t\t// Fix bug in 'core/anchor/attribute' filter overwriting attribute.\n\t\t// Required for < WP5.9\n\t\t// See https://github.com/WordPress/gutenberg/issues/15240\n\t\tif ( result.attributes.anchor ) {\n\t\t\tresult.attributes.anchor = {\n\t\t\t\ttype: 'string',\n\t\t\t};\n\t\t}\n\n\t\t// Return result.\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns the wp.data.select() response with backwards compatibility.\n\t *\n\t * @date\t17/06/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring selector The selector name.\n\t * @return\tmixed\n\t */\n\tfunction select( selector ) {\n\t\tif ( selector === 'core/block-editor' ) {\n\t\t\treturn wp.data.select( 'core/block-editor' ) || wp.data.select( 'core/editor' );\n\t\t}\n\t\treturn wp.data.select( selector );\n\t}\n\n\t/**\n\t * Returns the wp.data.dispatch() response with backwards compatibility.\n\t *\n\t * @date\t17/06/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring selector The selector name.\n\t * @return\tmixed\n\t */\n\tfunction dispatch( selector ) {\n\t\treturn wp.data.dispatch( selector );\n\t}\n\n\t/**\n\t * Returns an array of all blocks for the given args.\n\t *\n\t * @date\t27/2/19\n\t * @since\t5.7.13\n\t *\n\t * @param\t{object} args An object of key=>value pairs used to filter results.\n\t * @return\tarray.\n\t */\n\tfunction getBlocks( args ) {\n\t\tlet blocks = [];\n\n\t\t// Local function to recurse through all child blocks and add to the blocks array.\n\t\tconst recurseBlocks = ( block ) => {\n\t\t\tblocks.push( block );\n\t\t\tselect( 'core/block-editor' ).getBlocks( block.clientId ).forEach( recurseBlocks );\n\t\t};\n\n\t\t// Trigger initial recursion for parent level blocks.\n\t\tselect( 'core/block-editor' ).getBlocks().forEach( recurseBlocks );\n\n\t\t// Loop over args and filter.\n\t\tfor ( const k in args ) {\n\t\t\tblocks = blocks.filter( ( { attributes } ) => attributes[ k ] === args[ k ] );\n\t\t}\n\n\t\t// Return results.\n\t\treturn blocks;\n\t}\n\n\t/**\n\t * Storage for the AJAX queue.\n\t *\n\t * @const {array}\n\t */\n\tconst ajaxQueue = {};\n\n\t/**\n\t * Storage for cached AJAX requests for block content.\n\t *\n\t * @since 5.12\n\t * @const {array}\n\t */\n\tconst fetchCache = {};\n\n\t/**\n\t * Fetches a JSON result from the AJAX API.\n\t *\n\t * @date\t28/2/19\n\t * @since\t5.7.13\n\t *\n\t * @param\tobject block The block props.\n\t * @query\tobject The query args used in AJAX callback.\n\t * @return\tobject The AJAX promise.\n\t */\n\tfunction fetchBlock( args ) {\n\t\tconst { attributes = {}, context = {}, query = {}, clientId = null, delay = 0 } = args;\n\n\t\t// Build a unique queue ID from block data, including the clientId for edit forms.\n\t\tconst queueId = md5( JSON.stringify( { ...attributes, ...context, ...query } ) );\n\n\t\tconst data = ajaxQueue[ queueId ] || {\n\t\t\tquery: {},\n\t\t\ttimeout: false,\n\t\t\tpromise: $.Deferred(),\n\t\t\tstarted: false,\n\t\t};\n\n\t\t// Append query args to storage.\n\t\tdata.query = { ...data.query, ...query };\n\n\t\tif ( data.started ) return data.promise;\n\n\t\t// Set fresh timeout.\n\t\tclearTimeout( data.timeout );\n\t\tdata.timeout = setTimeout( () => {\n\t\t\tdata.started = true;\n\t\t\tif ( fetchCache[ queueId ] ) {\n\t\t\t\tajaxQueue[ queueId ] = null;\n\t\t\t\tdata.promise.resolve.apply( fetchCache[ queueId ][ 0 ], fetchCache[ queueId ][ 1 ] );\n\t\t\t} else {\n\t\t\t\t$.ajax( {\n\t\t\t\t\turl: acf.get( 'ajaxurl' ),\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\ttype: 'post',\n\t\t\t\t\tcache: false,\n\t\t\t\t\tdata: acf.prepareForAjax( {\n\t\t\t\t\t\taction: 'acf/ajax/fetch-block',\n\t\t\t\t\t\tblock: JSON.stringify( attributes ),\n\t\t\t\t\t\tclientId: clientId,\n\t\t\t\t\t\tcontext: JSON.stringify( context ),\n\t\t\t\t\t\tquery: data.query,\n\t\t\t\t\t} ),\n\t\t\t\t} )\n\t\t\t\t\t.always( () => {\n\t\t\t\t\t\t// Clean up queue after AJAX request is complete.\n\t\t\t\t\t\tajaxQueue[ queueId ] = null;\n\t\t\t\t\t} )\n\t\t\t\t\t.done( function () {\n\t\t\t\t\t\tfetchCache[ queueId ] = [ this, arguments ];\n\t\t\t\t\t\tdata.promise.resolve.apply( this, arguments );\n\t\t\t\t\t} )\n\t\t\t\t\t.fail( function () {\n\t\t\t\t\t\tdata.promise.reject.apply( this, arguments );\n\t\t\t\t\t} );\n\t\t\t}\n\t\t}, delay );\n\n\t\t// Update storage.\n\t\tajaxQueue[ queueId ] = data;\n\n\t\t// Return promise.\n\t\treturn data.promise;\n\t}\n\n\t/**\n\t * Returns true if both object are the same.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tobject obj1\n\t * @param\tobject obj2\n\t * @return\tbool\n\t */\n\tfunction compareObjects( obj1, obj2 ) {\n\t\treturn JSON.stringify( obj1 ) === JSON.stringify( obj2 );\n\t}\n\n\t/**\n\t * Converts HTML into a React element.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring html The HTML to convert.\n\t * @param\tint acfBlockVersion The ACF block version number.\n\t * @return\tobject Result of React.createElement().\n\t */\n\tacf.parseJSX = ( html, acfBlockVersion ) => {\n\t\t// Apply a temporary wrapper for the jQuery parse to prevent text nodes triggering errors.\n\t\thtml = '
' + html + '
';\n\t\t// Correctly balance InnerBlocks tags for jQuery's initial parse.\n\t\thtml = html.replace( /]+)?\\/>/, '' );\n\t\treturn parseNode( $( html )[ 0 ], acfBlockVersion, 0 ).props.children;\n\t};\n\n\t/**\n\t * Converts a DOM node into a React element.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tDOM node The DOM node.\n\t * @param\tint acfBlockVersion The ACF block version number.\n\t * @param\tint level The recursion level.\n\t * @return\tobject Result of React.createElement().\n\t */\n\tfunction parseNode( node, acfBlockVersion, level = 0 ) {\n\t\t// Get node name.\n\t\tconst nodeName = parseNodeName( node.nodeName.toLowerCase(), acfBlockVersion );\n\t\tif ( ! nodeName ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Get node attributes in React friendly format.\n\t\tconst nodeAttrs = {};\n\n\t\tif ( level === 1 && nodeName !== 'ACFInnerBlocks' ) {\n\t\t\t// Top level (after stripping away the container div), create a ref for passing through to ACF's JS API.\n\t\t\tnodeAttrs.ref = React.createRef();\n\t\t}\n\n\t\tacf.arrayArgs( node.attributes )\n\t\t\t.map( parseNodeAttr )\n\t\t\t.forEach( ( { name, value } ) => {\n\t\t\t\tnodeAttrs[ name ] = value;\n\t\t\t} );\n\n\t\tif ( 'ACFInnerBlocks' === nodeName ) {\n\t\t\treturn ;\n\t\t}\n\n\t\t// Define args for React.createElement().\n\t\tconst args = [ nodeName, nodeAttrs ];\n\t\tacf.arrayArgs( node.childNodes ).forEach( ( child ) => {\n\t\t\tif ( child instanceof Text ) {\n\t\t\t\tconst text = child.textContent;\n\t\t\t\tif ( text ) {\n\t\t\t\t\targs.push( text );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\targs.push( parseNode( child, acfBlockVersion, level + 1 ) );\n\t\t\t}\n\t\t} );\n\n\t\t// Return element.\n\t\treturn React.createElement.apply( this, args );\n\t}\n\n\t/**\n\t * Converts a node or attribute name into it's JSX compliant name\n\t *\n\t * @date 05/07/2021\n\t * @since 5.9.8\n\t *\n\t * @param string name The node or attribute name.\n\t * @return string\n\t */\n\tfunction getJSXName( name ) {\n\t\tconst replacement = acf.isget( acf, 'jsxNameReplacements', name );\n\t\tif ( replacement ) return replacement;\n\t\treturn name;\n\t}\n\n\t/**\n\t * Converts the given name into a React friendly name or component.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring name The node name in lowercase.\n\t * @param\tint acfBlockVersion The ACF block version number.\n\t * @return\tmixed\n\t */\n\tfunction parseNodeName( name, acfBlockVersion ) {\n\t\tswitch ( name ) {\n\t\t\tcase 'innerblocks':\n\t\t\t\tif ( acfBlockVersion < 2 ) {\n\t\t\t\t\treturn InnerBlocks;\n\t\t\t\t}\n\t\t\t\treturn 'ACFInnerBlocks';\n\t\t\tcase 'script':\n\t\t\t\treturn Script;\n\t\t\tcase '#comment':\n\t\t\t\treturn null;\n\t\t\tdefault:\n\t\t\t\t// Replace names for JSX counterparts.\n\t\t\t\tname = getJSXName( name );\n\t\t}\n\t\treturn name;\n\t}\n\n\t/**\n\t * Functional component for ACFInnerBlocks.\n\t *\n\t * @since 6.0.0\n\t *\n\t * @param obj props element properties.\n\t * @return DOM element\n\t */\n\tfunction ACFInnerBlocks( props ) {\n\t\tconst { className = 'acf-innerblocks-container' } = props;\n\t\tconst innerBlockProps = useInnerBlocksProps( { className: className }, props );\n\n\t\treturn
{ innerBlockProps.children }
;\n\t}\n\n\t/**\n\t * Converts the given attribute into a React friendly name and value object.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tobj nodeAttr The node attribute.\n\t * @return\tobj\n\t */\n\tfunction parseNodeAttr( nodeAttr ) {\n\t\tlet name = nodeAttr.name;\n\t\tlet value = nodeAttr.value;\n\n\t\t// Allow overrides for third party libraries who might use specific attributes.\n\t\tlet shortcut = acf.applyFilters( 'acf_blocks_parse_node_attr', false, nodeAttr );\n\n\t\tif ( shortcut ) return shortcut;\n\n\t\tswitch ( name ) {\n\t\t\t// Class.\n\t\t\tcase 'class':\n\t\t\t\tname = 'className';\n\t\t\t\tbreak;\n\n\t\t\t// Style.\n\t\t\tcase 'style':\n\t\t\t\tconst css = {};\n\t\t\t\tvalue.split( ';' ).forEach( ( s ) => {\n\t\t\t\t\tconst pos = s.indexOf( ':' );\n\t\t\t\t\tif ( pos > 0 ) {\n\t\t\t\t\t\tlet ruleName = s.substr( 0, pos ).trim();\n\t\t\t\t\t\tconst ruleValue = s.substr( pos + 1 ).trim();\n\n\t\t\t\t\t\t// Rename core properties, but not CSS variables.\n\t\t\t\t\t\tif ( ruleName.charAt( 0 ) !== '-' ) {\n\t\t\t\t\t\t\truleName = acf.strCamelCase( ruleName );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcss[ ruleName ] = ruleValue;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\tvalue = css;\n\t\t\t\tbreak;\n\n\t\t\t// Default.\n\t\t\tdefault:\n\t\t\t\t// No formatting needed for \"data-x\" attributes.\n\t\t\t\tif ( name.indexOf( 'data-' ) === 0 ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Replace names for JSX counterparts.\n\t\t\t\tname = getJSXName( name );\n\n\t\t\t\t// Convert JSON values.\n\t\t\t\tconst c1 = value.charAt( 0 );\n\t\t\t\tif ( c1 === '[' || c1 === '{' ) {\n\t\t\t\t\tvalue = JSON.parse( value );\n\t\t\t\t}\n\n\t\t\t\t// Convert bool values.\n\t\t\t\tif ( value === 'true' || value === 'false' ) {\n\t\t\t\t\tvalue = value === 'true';\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn {\n\t\t\tname,\n\t\t\tvalue,\n\t\t};\n\t}\n\n\t/**\n\t * Higher Order Component used to set default block attribute values.\n\t *\n\t * By modifying block attributes directly, instead of defining defaults in registerBlockType(),\n\t * WordPress will include them always within the saved block serialized JSON.\n\t *\n\t * @date\t31/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tComponent BlockListBlock The BlockListBlock Component.\n\t * @return\tComponent\n\t */\n\tconst withDefaultAttributes = createHigherOrderComponent(\n\t\t( BlockListBlock ) =>\n\t\t\tclass WrappedBlockEdit extends Component {\n\t\t\t\tconstructor( props ) {\n\t\t\t\t\tsuper( props );\n\n\t\t\t\t\t// Extract vars.\n\t\t\t\t\tconst { name, attributes } = this.props;\n\n\t\t\t\t\t// Only run on ACF Blocks.\n\t\t\t\t\tconst blockType = getBlockType( name );\n\t\t\t\t\tif ( ! blockType ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check and remove any empty string attributes to match PHP behaviour.\n\t\t\t\t\tObject.keys( attributes ).forEach( ( key ) => {\n\t\t\t\t\t\tif ( attributes[ key ] === '' ) {\n\t\t\t\t\t\t\tdelete attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Backward compatibility attribute replacement.\n\t\t\t\t\tconst upgrades = {\n\t\t\t\t\t\tfull_height: 'fullHeight',\n\t\t\t\t\t\talign_content: 'alignContent',\n\t\t\t\t\t\talign_text: 'alignText',\n\t\t\t\t\t};\n\n\t\t\t\t\tObject.keys( upgrades ).forEach( ( key ) => {\n\t\t\t\t\t\tif ( attributes[ key ] !== undefined ) {\n\t\t\t\t\t\t\tattributes[ upgrades[ key ] ] = attributes[ key ];\n\t\t\t\t\t\t} else if ( attributes[ upgrades[ key ] ] === undefined ) {\n\t\t\t\t\t\t\t//Check for a default\n\t\t\t\t\t\t\tif ( blockType[ key ] !== undefined ) {\n\t\t\t\t\t\t\t\tattributes[ upgrades[ key ] ] = blockType[ key ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdelete blockType[ key ];\n\t\t\t\t\t\tdelete attributes[ key ];\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Set default attributes for those undefined.\n\t\t\t\t\tfor ( let attribute in blockType.attributes ) {\n\t\t\t\t\t\tif ( attributes[ attribute ] === undefined && blockType[ attribute ] !== undefined ) {\n\t\t\t\t\t\t\tattributes[ attribute ] = blockType[ attribute ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trender() {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t},\n\t\t'withDefaultAttributes'\n\t);\n\twp.hooks.addFilter( 'editor.BlockListBlock', 'acf/with-default-attributes', withDefaultAttributes );\n\n\t/**\n\t * The BlockSave functional component.\n\t *\n\t * @date\t08/07/2020\n\t * @since\t5.9.0\n\t */\n\tfunction BlockSave() {\n\t\treturn ;\n\t}\n\n\t/**\n\t * The BlockEdit component.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t */\n\tclass BlockEdit extends Component {\n\t\tconstructor( props ) {\n\t\t\tsuper( props );\n\t\t\tthis.setup();\n\t\t}\n\n\t\tsetup() {\n\t\t\tconst { name, attributes, clientId } = this.props;\n\t\t\tconst blockType = getBlockType( name );\n\n\t\t\t// Restrict current mode.\n\t\t\tfunction restrictMode( modes ) {\n\t\t\t\tif ( ! modes.includes( attributes.mode ) ) {\n\t\t\t\t\tattributes.mode = modes[ 0 ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tisBlockInQueryLoop( clientId ) ||\n\t\t\t\tisSiteEditor() ||\n\t\t\t\tisiFramedMobileDevicePreview() ||\n\t\t\t\tisEditingTemplate()\n\t\t\t) {\n\t\t\t\trestrictMode( [ 'preview' ] );\n\t\t\t} else {\n\t\t\t\tswitch ( blockType.mode ) {\n\t\t\t\t\tcase 'edit':\n\t\t\t\t\t\trestrictMode( [ 'edit', 'preview' ] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'preview':\n\t\t\t\t\t\trestrictMode( [ 'preview', 'edit' ] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\trestrictMode( [ 'auto' ] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\trender() {\n\t\t\tconst { name, attributes, setAttributes, clientId } = this.props;\n\t\t\tconst blockType = getBlockType( name );\n\t\t\tconst forcePreview =\n\t\t\t\tisBlockInQueryLoop( clientId ) ||\n\t\t\t\tisSiteEditor() ||\n\t\t\t\tisiFramedMobileDevicePreview() ||\n\t\t\t\tisEditingTemplate();\n\t\t\tlet { mode } = attributes;\n\n\t\t\tif ( forcePreview ) {\n\t\t\t\tmode = 'preview';\n\t\t\t}\n\n\t\t\t// Show toggle only for edit/preview modes and for blocks not in a query loop/FSE.\n\t\t\tlet showToggle = blockType.supports.mode;\n\t\t\tif ( mode === 'auto' || forcePreview ) {\n\t\t\t\tshowToggle = false;\n\t\t\t}\n\n\t\t\t// Configure toggle variables.\n\t\t\tconst toggleText = mode === 'preview' ? acf.__( 'Switch to Edit' ) : acf.__( 'Switch to Preview' );\n\t\t\tconst toggleIcon = mode === 'preview' ? 'edit' : 'welcome-view-site';\n\t\t\tfunction toggleMode() {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tmode: mode === 'preview' ? 'edit' : 'preview',\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Return template.\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ showToggle && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) }\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\t{ mode === 'preview' && (\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t) }\n\t\t\t\t\t
\n\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * The BlockBody functional component.\n\t *\n\t * @since\t5.7.12\n\t */\n\tfunction BlockBody( props ) {\n\t\tconst { attributes, isSelected, name, clientId } = props;\n\t\tconst { mode } = attributes;\n\n\t\tconst index = useSelect( ( select ) => {\n\t\t\tconst rootClientId = select( 'core/block-editor' ).getBlockRootClientId( clientId );\n\t\t\treturn select( 'core/block-editor' ).getBlockIndex( clientId, rootClientId );\n\t\t} );\n\n\t\tlet showForm = true;\n\t\tlet additionalClasses = 'acf-block-component acf-block-body';\n\n\t\tif ( ( mode === 'auto' && ! isSelected ) || mode === 'preview' ) {\n\t\t\tadditionalClasses += ' acf-block-preview';\n\t\t\tshowForm = false;\n\t\t}\n\n\t\t// Setup block cache if required, and update mode.\n\t\tif ( ! ( clientId in acf.blockInstances ) ) {\n\t\t\tacf.blockInstances[ clientId ] = {\n\t\t\t\tvalidation_errors: false,\n\t\t\t\tmode: mode,\n\t\t\t};\n\t\t}\n\t\tacf.blockInstances[ clientId ].mode = mode;\n\n\t\tif ( ! isSelected ) {\n\t\t\tif ( blockSupportsValidation( name ) && acf.blockInstances[ clientId ].validation_errors ) {\n\t\t\t\tadditionalClasses += ' acf-block-has-validation-error';\n\t\t\t}\n\t\t\tacf.blockInstances[ clientId ].has_been_deselected = true;\n\t\t}\n\n\t\tif ( getBlockVersion( name ) > 1 ) {\n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t{ showForm ? (\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t) }\n\t\t\t\t
\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t{ showForm ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) }\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * A react component to append HTMl.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tstring children The html to insert.\n\t * @return\tvoid\n\t */\n\tclass Div extends Component {\n\t\trender() {\n\t\t\treturn
;\n\t\t}\n\t}\n\n\t/**\n\t * A react Component for inline scripts.\n\t *\n\t * This Component uses a combination of React references and jQuery to append the\n\t * inline ` );\n\t\t}\n\t\tcomponentDidUpdate() {\n\t\t\tthis.setHTML( this.props.children );\n\t\t}\n\t\tcomponentDidMount() {\n\t\t\tthis.setHTML( this.props.children );\n\t\t}\n\t}\n\n\t/**\n\t * DynamicHTML Class.\n\t *\n\t * A react componenet to load and insert dynamic HTML.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tvoid\n\t * @return\tvoid\n\t */\n\tclass DynamicHTML extends Component {\n\t\tconstructor( props ) {\n\t\t\tsuper( props );\n\n\t\t\t// Bind callbacks.\n\t\t\tthis.setRef = this.setRef.bind( this );\n\n\t\t\t// Define default props and call setup().\n\t\t\tthis.id = '';\n\t\t\tthis.el = false;\n\t\t\tthis.subscribed = true;\n\t\t\tthis.renderMethod = 'jQuery';\n\t\t\tthis.passedValidation = false;\n\t\t\tthis.setup( props );\n\n\t\t\t// Load state.\n\t\t\tthis.loadState();\n\t\t}\n\n\t\tsetup( props ) {\n\t\t\tconst constructor = this.constructor.name;\n\t\t\tconst clientId = props.clientId;\n\t\t\tif ( ! ( clientId in acf.blockInstances ) ) {\n\t\t\t\tacf.blockInstances[ clientId ] = {\n\t\t\t\t\tvalidation_errors: false,\n\t\t\t\t\tmode: props.mode,\n\t\t\t\t};\n\t\t\t}\n\t\t\tif ( ! ( constructor in acf.blockInstances[ clientId ] ) ) {\n\t\t\t\tacf.blockInstances[ clientId ][ constructor ] = {};\n\t\t\t}\n\t\t}\n\n\t\tfetch() {\n\t\t\t// Do nothing.\n\t\t}\n\n\t\tmaybePreload( blockId, clientId, form ) {\n\t\t\tacf.debug( 'Preload check', blockId, clientId, form );\n\t\t\tif ( ! isBlockInQueryLoop( this.props.clientId ) ) {\n\t\t\t\tconst preloadedBlocks = acf.get( 'preloadedBlocks' );\n\t\t\t\tconst modeText = form ? 'form' : 'preview';\n\n\t\t\t\tif ( preloadedBlocks && preloadedBlocks[ blockId ] ) {\n\t\t\t\t\t// Ensure we only preload the correct block state (form or preview).\n\t\t\t\t\tif (\n\t\t\t\t\t\t( form && ! preloadedBlocks[ blockId ].form ) ||\n\t\t\t\t\t\t( ! form && preloadedBlocks[ blockId ].form )\n\t\t\t\t\t) {\n\t\t\t\t\t\tacf.debug( 'Preload failed: state not preloaded.' );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set HTML to the preloaded version.\n\t\t\t\t\tpreloadedBlocks[ blockId ].html = preloadedBlocks[ blockId ].html.replaceAll( blockId, clientId );\n\n\t\t\t\t\t// Replace blockId in errors.\n\t\t\t\t\tif ( preloadedBlocks[ blockId ].validation && preloadedBlocks[ blockId ].validation.errors ) {\n\t\t\t\t\t\tpreloadedBlocks[ blockId ].validation.errors = preloadedBlocks[ blockId ].validation.errors.map(\n\t\t\t\t\t\t\t( error ) => {\n\t\t\t\t\t\t\t\terror.input = error.input.replaceAll( blockId, clientId );\n\t\t\t\t\t\t\t\treturn error;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Return preloaded object.\n\t\t\t\t\tacf.debug( 'Preload successful', preloadedBlocks[ blockId ] );\n\t\t\t\t\treturn preloadedBlocks[ blockId ];\n\t\t\t\t}\n\t\t\t}\n\t\t\tacf.debug( 'Preload failed: not preloaded.' );\n\t\t\treturn false;\n\t\t}\n\n\t\tloadState() {\n\t\t\tconst client = acf.blockInstances[ this.props.clientId ] || {};\n\t\t\tthis.state = client[ this.constructor.name ] || {};\n\t\t}\n\n\t\tsetState( state ) {\n\t\t\tacf.blockInstances[ this.props.clientId ][ this.constructor.name ] = {\n\t\t\t\t...this.state,\n\t\t\t\t...state,\n\t\t\t};\n\n\t\t\t// Update component state if subscribed.\n\t\t\t// - Allows AJAX callback to update store without modifying state of an unmounted component.\n\t\t\tif ( this.subscribed ) {\n\t\t\t\tsuper.setState( state );\n\t\t\t}\n\n\t\t\tacf.debug(\n\t\t\t\t'SetState',\n\t\t\t\tObject.assign( {}, this ),\n\t\t\t\tthis.props.clientId,\n\t\t\t\tthis.constructor.name,\n\t\t\t\tObject.assign( {}, acf.blockInstances[ this.props.clientId ][ this.constructor.name ] )\n\t\t\t);\n\t\t}\n\n\t\tsetHtml( html ) {\n\t\t\thtml = html ? html.trim() : '';\n\n\t\t\t// Bail early if html has not changed.\n\t\t\tif ( html === this.state.html ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Update state.\n\t\t\tconst state = {\n\t\t\t\thtml,\n\t\t\t};\n\n\t\t\tif ( this.renderMethod === 'jsx' ) {\n\t\t\t\tstate.jsx = acf.parseJSX( html, getBlockVersion( this.props.name ) );\n\n\t\t\t\t// Handle templates which don't contain any valid JSX parsable elements.\n\t\t\t\tif ( ! state.jsx ) {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t'Your ACF block template contains no valid HTML elements. Appending a empty div to prevent React JS errors.'\n\t\t\t\t\t);\n\t\t\t\t\tstate.html += '
';\n\t\t\t\t\tstate.jsx = acf.parseJSX( state.html, getBlockVersion( this.props.name ) );\n\t\t\t\t}\n\n\t\t\t\t// If we've got an object (as an array) find the first valid React ref.\n\t\t\t\tif ( Array.isArray( state.jsx ) ) {\n\t\t\t\t\tlet refElement = state.jsx.find( ( element ) => React.isValidElement( element ) );\n\t\t\t\t\tstate.ref = refElement.ref;\n\t\t\t\t} else {\n\t\t\t\t\tstate.ref = state.jsx.ref;\n\t\t\t\t}\n\t\t\t\tstate.$el = $( this.el );\n\t\t\t} else {\n\t\t\t\tstate.$el = $( html );\n\t\t\t}\n\t\t\tthis.setState( state );\n\t\t}\n\n\t\tsetRef( el ) {\n\t\t\tthis.el = el;\n\t\t}\n\n\t\trender() {\n\t\t\t// Render JSX.\n\t\t\tif ( this.state.jsx ) {\n\t\t\t\t// If we're a v2+ block, use the jsx element itself as our ref.\n\t\t\t\tif ( getBlockVersion( this.props.name ) > 1 ) {\n\t\t\t\t\tthis.setRef( this.state.jsx );\n\t\t\t\t\treturn this.state.jsx;\n\t\t\t\t} else {\n\t\t\t\t\treturn
{ this.state.jsx }
;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Return HTML.\n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\tshouldComponentUpdate( { index }, { html } ) {\n\t\t\tif ( index !== this.props.index ) {\n\t\t\t\tthis.componentWillMove();\n\t\t\t}\n\t\t\treturn html !== this.state.html;\n\t\t}\n\n\t\tdisplay( context ) {\n\t\t\t// This method is called after setting new HTML and the Component render.\n\t\t\t// The jQuery render method simply needs to move $el into place.\n\t\t\tif ( this.renderMethod === 'jQuery' ) {\n\t\t\t\tconst $el = this.state.$el;\n\t\t\t\tconst $prevParent = $el.parent();\n\t\t\t\tconst $thisParent = $( this.el );\n\n\t\t\t\t// Move $el into place.\n\t\t\t\t$thisParent.html( $el );\n\n\t\t\t\t// Special case for reusable blocks.\n\t\t\t\t// Multiple instances of the same reusable block share the same block id.\n\t\t\t\t// This causes all instances to share the same state (cool), which unfortunately\n\t\t\t\t// pulls $el back and forth between the last rendered reusable block.\n\t\t\t\t// This simple fix leaves a \"clone\" behind :)\n\t\t\t\tif ( $prevParent.length && $prevParent[ 0 ] !== $thisParent[ 0 ] ) {\n\t\t\t\t\t$prevParent.html( $el.clone() );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Lock block if required.\n\t\t\tif ( this.getValidationErrors() && this.isNotNewlyAdded() ) {\n\t\t\t\tthis.lockBlockForSaving();\n\t\t\t} else {\n\t\t\t\tthis.unlockBlockForSaving();\n\t\t\t}\n\n\t\t\t// Call context specific method.\n\t\t\tswitch ( context ) {\n\t\t\t\tcase 'append':\n\t\t\t\t\tthis.componentDidAppend();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'remount':\n\t\t\t\t\tthis.componentDidRemount();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tvalidate() {\n\t\t\t// Do nothing.\n\t\t}\n\n\t\tcomponentDidMount() {\n\t\t\t// Fetch on first load.\n\t\t\tif ( this.state.html === undefined ) {\n\t\t\t\tthis.fetch();\n\n\t\t\t\t// Or remount existing HTML.\n\t\t\t} else {\n\t\t\t\tthis.display( 'remount' );\n\t\t\t}\n\t\t}\n\n\t\tcomponentDidUpdate( prevProps, prevState ) {\n\t\t\t// HTML has changed.\n\t\t\tthis.display( 'append' );\n\t\t}\n\n\t\tcomponentDidAppend() {\n\t\t\tacf.doAction( 'append', this.state.$el );\n\t\t}\n\n\t\tcomponentWillUnmount() {\n\t\t\tacf.doAction( 'unmount', this.state.$el );\n\n\t\t\t// Unsubscribe this component from state.\n\t\t\tthis.subscribed = false;\n\t\t}\n\n\t\tcomponentDidRemount() {\n\t\t\tthis.subscribed = true;\n\n\t\t\t// Use setTimeout to avoid incorrect timing of events.\n\t\t\t// React will unmount and mount components in DOM order.\n\t\t\t// This means a new component can be mounted before an old one is unmounted.\n\t\t\t// ACF shares $el across new/old components which is un-React-like.\n\t\t\t// This timout ensures that unmounting occurs before remounting.\n\t\t\tsetTimeout( () => {\n\t\t\t\tacf.doAction( 'remount', this.state.$el );\n\t\t\t} );\n\t\t}\n\n\t\tcomponentWillMove() {\n\t\t\tacf.doAction( 'unmount', this.state.$el );\n\t\t\tsetTimeout( () => {\n\t\t\t\tacf.doAction( 'remount', this.state.$el );\n\t\t\t} );\n\t\t}\n\n\t\tisNotNewlyAdded() {\n\t\t\treturn acf.blockInstances[ this.props.clientId ].has_been_deselected || false;\n\t\t}\n\n\t\thasShownValidation() {\n\t\t\treturn acf.blockInstances[ this.props.clientId ].shown_validation || false;\n\t\t}\n\n\t\tsetShownValidation() {\n\t\t\tacf.blockInstances[ this.props.clientId ].shown_validation = true;\n\t\t}\n\n\t\tsetValidationErrors( errors ) {\n\t\t\tacf.blockInstances[ this.props.clientId ].validation_errors = errors;\n\t\t}\n\n\t\tgetValidationErrors() {\n\t\t\treturn acf.blockInstances[ this.props.clientId ].validation_errors;\n\t\t}\n\n\t\tgetMode() {\n\t\t\treturn acf.blockInstances[ this.props.clientId ].mode;\n\t\t}\n\n\t\tlockBlockForSaving() {\n\t\t\tif ( ! wp.data.dispatch( 'core/editor' ) ) return;\n\t\t\twp.data.dispatch( 'core/editor' ).lockPostSaving( 'acf/block/' + this.props.clientId );\n\t\t}\n\n\t\tunlockBlockForSaving() {\n\t\t\tif ( ! wp.data.dispatch( 'core/editor' ) ) return;\n\t\t\twp.data.dispatch( 'core/editor' ).unlockPostSaving( 'acf/block/' + this.props.clientId );\n\t\t}\n\n\t\tdisplayValidation( $formEl ) {\n\t\t\tif ( ! blockSupportsValidation( this.props.name ) ) {\n\t\t\t\tacf.debug( 'Block does not support validation' );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( ! $formEl || $formEl.hasClass( 'acf-empty-block-fields' ) ) {\n\t\t\t\tacf.debug( 'There is no edit form available to validate.' );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst errors = this.getValidationErrors();\n\t\t\tacf.debug( 'Starting handle validation', Object.assign( {}, this ), Object.assign( {}, $formEl ), errors );\n\n\t\t\tthis.setShownValidation();\n\n\t\t\tlet validator = acf.getBlockFormValidator( $formEl );\n\t\t\tvalidator.clearErrors();\n\n\t\t\tacf.doAction( 'blocks/validation/pre_apply', errors );\n\t\t\tif ( errors ) {\n\t\t\t\tvalidator.addErrors( errors );\n\t\t\t\tvalidator.showErrors( 'after' );\n\n\t\t\t\tthis.lockBlockForSaving();\n\t\t\t} else {\n\t\t\t\t// remove previous error message\n\t\t\t\tif ( validator.has( 'notice' ) ) {\n\t\t\t\t\tvalidator.get( 'notice' ).update( {\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\ttext: acf.__( 'Validation successful' ),\n\t\t\t\t\t\ttimeout: 1000,\n\t\t\t\t\t} );\n\t\t\t\t\tvalidator.set( 'notice', null );\n\t\t\t\t}\n\n\t\t\t\tthis.unlockBlockForSaving();\n\t\t\t}\n\t\t\tacf.doAction( 'blocks/validation/post_apply', errors );\n\t\t}\n\t}\n\n\t/**\n\t * BlockForm Class.\n\t *\n\t * A react componenet to handle the block form.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tstring id the block id.\n\t * @return\tvoid\n\t */\n\tclass BlockForm extends DynamicHTML {\n\t\tsetup( props ) {\n\t\t\tthis.id = `BlockForm-${ props.clientId }`;\n\t\t\tsuper.setup( props );\n\t\t}\n\n\t\tfetch( validate_only = false, data = false ) {\n\t\t\t// Extract props.\n\t\t\tconst { context, clientId, name } = this.props;\n\t\t\tlet { attributes } = this.props;\n\n\t\t\tlet query = { form: true };\n\t\t\tif ( validate_only ) {\n\t\t\t\tquery = { validate: true };\n\t\t\t\tattributes.data = data;\n\t\t\t}\n\n\t\t\tconst hash = createBlockAttributesHash( attributes, context );\n\n\t\t\tacf.debug( 'BlockForm fetch', attributes, query );\n\n\t\t\t// Try preloaded data first.\n\t\t\tconst preloaded = this.maybePreload( hash, clientId, true );\n\n\t\t\tif ( preloaded ) {\n\t\t\t\tthis.setHtml( acf.applyFilters( 'blocks/form/render', preloaded.html, true ) );\n\t\t\t\tif ( preloaded.validation ) this.setValidationErrors( preloaded.validation.errors );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! blockSupportsValidation( name ) ) {\n\t\t\t\tquery.validate = false;\n\t\t\t}\n\n\t\t\t// Request AJAX and update HTML on complete.\n\t\t\tfetchBlock( {\n\t\t\t\tattributes,\n\t\t\t\tcontext,\n\t\t\t\tclientId,\n\t\t\t\tquery,\n\t\t\t} ).done( ( { data } ) => {\n\t\t\t\tacf.debug( 'fetch block form promise' );\n\n\t\t\t\tif ( data.form ) {\n\t\t\t\t\tthis.setHtml(\n\t\t\t\t\t\tacf.applyFilters( 'blocks/form/render', data.form.replaceAll( data.clientId, clientId ), false )\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ( data.validation ) this.setValidationErrors( data.validation.errors );\n\n\t\t\t\tif ( this.isNotNewlyAdded() ) {\n\t\t\t\t\tacf.debug( \"Block has already shown it's invalid. The form needs to show validation errors\" );\n\t\t\t\t\tthis.validate();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tvalidate( loadState = true ) {\n\t\t\tif ( loadState ) {\n\t\t\t\tthis.loadState();\n\t\t\t}\n\n\t\t\tacf.debug( 'BlockForm calling validate with state', Object.assign( {}, this ) );\n\t\t\tsuper.displayValidation( this.state.$el );\n\t\t}\n\n\t\tshouldComponentUpdate( nextProps, nextState ) {\n\t\t\tif (\n\t\t\t\tblockSupportsValidation( this.props.name ) &&\n\t\t\t\tthis.state.$el &&\n\t\t\t\tthis.isNotNewlyAdded() &&\n\t\t\t\t! this.hasShownValidation()\n\t\t\t) {\n\t\t\t\tthis.validate( false ); // Shouldn't update state in shouldComponentUpdate.\n\t\t\t}\n\n\t\t\treturn super.shouldComponentUpdate( nextProps, nextState );\n\t\t}\n\n\t\tcomponentWillUnmount() {\n\t\t\tsuper.componentWillUnmount();\n\n\t\t\t//TODO: either delete this, or clear validations here (if that's a sensible idea)\n\n\t\t\tacf.debug( 'BlockForm Component did unmount' );\n\t\t}\n\n\t\tcomponentDidRemount() {\n\t\t\tsuper.componentDidRemount();\n\n\t\t\tacf.debug( 'BlockForm component did remount' );\n\n\t\t\tconst { $el } = this.state;\n\n\t\t\tif ( blockSupportsValidation( this.props.name ) && this.isNotNewlyAdded() ) {\n\t\t\t\tacf.debug( \"Block has already shown it's invalid. The form needs to show validation errors\" );\n\t\t\t\tthis.validate();\n\t\t\t}\n\n\t\t\t// Make sure our on append events are registered.\n\t\t\tif ( $el.data( 'acf-events-added' ) !== true ) {\n\t\t\t\tthis.componentDidAppend();\n\t\t\t}\n\t\t}\n\n\t\tcomponentDidAppend() {\n\t\t\tsuper.componentDidAppend();\n\n\t\t\tacf.debug( 'BlockForm component did append' );\n\n\t\t\t// Extract props.\n\t\t\tconst { attributes, setAttributes, clientId, name } = this.props;\n\t\t\tconst thisBlockForm = this;\n\t\t\tconst { $el } = this.state;\n\n\t\t\t// Callback for updating block data and validation status if we're in an edit only mode.\n\t\t\tfunction serializeData( silent = false ) {\n\t\t\t\tconst data = acf.serialize( $el, `acf-block_${ clientId }` );\n\n\t\t\t\tif ( silent ) {\n\t\t\t\t\tattributes.data = data;\n\t\t\t\t} else {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tdata,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tif ( blockSupportsValidation( name ) && ! silent && thisBlockForm.getMode() !== 'preview' ) {\n\t\t\t\t\tacf.debug( 'No block preview currently available. Need to trigger a validation only fetch.' );\n\t\t\t\t\tthisBlockForm.fetch( true, data );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add events.\n\t\t\tlet timeout = false;\n\t\t\t$el.on( 'change keyup', () => {\n\t\t\t\tclearTimeout( timeout );\n\t\t\t\ttimeout = setTimeout( serializeData, 300 );\n\t\t\t} );\n\n\t\t\t// Log initialization for remount check on the persistent element.\n\t\t\t$el.data( 'acf-events-added', true );\n\n\t\t\t// Ensure newly added block is saved with data.\n\t\t\t// Do it silently to avoid triggering a preview render.\n\t\t\tif ( ! attributes.data ) {\n\t\t\t\tserializeData( true );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * BlockPreview Class.\n\t *\n\t * A react componenet to handle the block preview.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tstring id the block id.\n\t * @return\tvoid\n\t */\n\tclass BlockPreview extends DynamicHTML {\n\t\tsetup( props ) {\n\t\t\tconst blockType = getBlockType( props.name );\n\t\t\tconst contextPostId = acf.isget( this.props, 'context', 'postId' );\n\n\t\t\tthis.id = `BlockPreview-${ props.clientId }`;\n\n\t\t\tsuper.setup( props );\n\n\t\t\t// Apply the contextPostId to the ID if set to stop query loop ID duplication.\n\t\t\tif ( contextPostId ) {\n\t\t\t\tthis.id = `BlockPreview-${ props.clientId }-${ contextPostId }`;\n\t\t\t}\n\n\t\t\tif ( blockType.supports.jsx ) {\n\t\t\t\tthis.renderMethod = 'jsx';\n\t\t\t}\n\t\t}\n\n\t\tfetch( args = {} ) {\n\t\t\tconst {\n\t\t\t\tattributes = this.props.attributes,\n\t\t\t\tclientId = this.props.clientId,\n\t\t\t\tcontext = this.props.context,\n\t\t\t\tdelay = 0,\n\t\t\t} = args;\n\n\t\t\tconst { name } = this.props;\n\n\t\t\t// Remember attributes used to fetch HTML.\n\t\t\tthis.setState( {\n\t\t\t\tprevAttributes: attributes,\n\t\t\t\tprevContext: context,\n\t\t\t} );\n\n\t\t\tconst hash = createBlockAttributesHash( attributes, context );\n\n\t\t\t// Try preloaded data first.\n\t\t\tlet preloaded = this.maybePreload( hash, clientId, false );\n\n\t\t\tif ( preloaded ) {\n\t\t\t\tif ( getBlockVersion( name ) == 1 ) {\n\t\t\t\t\tpreloaded.html = '
' + preloaded.html + '
';\n\t\t\t\t}\n\t\t\t\tthis.setHtml( acf.applyFilters( 'blocks/preview/render', preloaded.html, true ) );\n\t\t\t\tif ( preloaded.validation ) this.setValidationErrors( preloaded.validation.errors );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet query = { preview: true };\n\n\t\t\tif ( ! blockSupportsValidation( name ) ) {\n\t\t\t\tquery.validate = false;\n\t\t\t}\n\n\t\t\t// Request AJAX and update HTML on complete.\n\t\t\tfetchBlock( {\n\t\t\t\tattributes,\n\t\t\t\tcontext,\n\t\t\t\tclientId,\n\t\t\t\tquery,\n\t\t\t\tdelay,\n\t\t\t} ).done( ( { data } ) => {\n\t\t\t\tlet replaceHtml = data.preview.replaceAll( data.clientId, clientId );\n\t\t\t\tif ( getBlockVersion( name ) == 1 ) {\n\t\t\t\t\treplaceHtml = '
' + replaceHtml + '
';\n\t\t\t\t}\n\t\t\t\tacf.debug( 'fetch block render promise' );\n\t\t\t\tthis.setHtml( acf.applyFilters( 'blocks/preview/render', replaceHtml, false ) );\n\t\t\t\tif ( data.validation ) {\n\t\t\t\t\tthis.setValidationErrors( data.validation.errors );\n\t\t\t\t}\n\t\t\t\tif ( this.isNotNewlyAdded() ) {\n\t\t\t\t\tthis.validate();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tvalidate() {\n\t\t\t// Check we've got a block form for this instance.\n\t\t\tconst client = acf.blockInstances[ this.props.clientId ] || {};\n\t\t\tconst blockFormState = client.BlockForm || false;\n\t\t\tif ( blockFormState ) {\n\t\t\t\tsuper.displayValidation( blockFormState.$el );\n\t\t\t}\n\t\t}\n\n\t\tcomponentDidAppend() {\n\t\t\tsuper.componentDidAppend();\n\t\t\tthis.renderBlockPreviewEvent();\n\t\t}\n\n\t\tshouldComponentUpdate( nextProps, nextState ) {\n\t\t\tconst nextAttributes = nextProps.attributes;\n\t\t\tconst thisAttributes = this.props.attributes;\n\n\t\t\t// Update preview if block data has changed.\n\t\t\tif (\n\t\t\t\t! compareObjects( nextAttributes, thisAttributes ) ||\n\t\t\t\t! compareObjects( nextProps.context, this.props.context )\n\t\t\t) {\n\t\t\t\tlet delay = 0;\n\n\t\t\t\t// Delay fetch when editing className or anchor to simulate consistent logic to custom fields.\n\t\t\t\tif ( nextAttributes.className !== thisAttributes.className ) {\n\t\t\t\t\tdelay = 300;\n\t\t\t\t}\n\t\t\t\tif ( nextAttributes.anchor !== thisAttributes.anchor ) {\n\t\t\t\t\tdelay = 300;\n\t\t\t\t}\n\n\t\t\t\tacf.debug( 'Triggering fetch from block preview shouldComponentUpdate' );\n\n\t\t\t\tthis.fetch( {\n\t\t\t\t\tattributes: nextAttributes,\n\t\t\t\t\tcontext: nextProps.context,\n\t\t\t\t\tdelay,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn super.shouldComponentUpdate( nextProps, nextState );\n\t\t}\n\n\t\trenderBlockPreviewEvent() {\n\t\t\t// Extract props.\n\t\t\tconst { attributes, name } = this.props;\n\t\t\tconst { $el, ref } = this.state;\n\t\t\tvar blockElement;\n\n\t\t\t// Generate action friendly type.\n\t\t\tconst type = attributes.name.replace( 'acf/', '' );\n\n\t\t\tif ( ref && ref.current ) {\n\t\t\t\t// We've got a react ref from a JSX container. Use the parent as the blockElement\n\t\t\t\tblockElement = $( ref.current ).parent();\n\t\t\t} else if ( getBlockVersion( name ) == 1 ) {\n\t\t\t\tblockElement = $el;\n\t\t\t} else {\n\t\t\t\tblockElement = $el.parents( '.acf-block-preview' );\n\t\t\t}\n\n\t\t\t// Do action.\n\t\t\tacf.doAction( 'render_block_preview', blockElement, attributes );\n\t\t\tacf.doAction( `render_block_preview/type=${ type }`, blockElement, attributes );\n\t\t}\n\n\t\tcomponentDidRemount() {\n\t\t\tsuper.componentDidRemount();\n\n\t\t\tacf.debug(\n\t\t\t\t'Checking if fetch is required in BlockPreview componentDidRemount',\n\t\t\t\tObject.assign( {}, this.state.prevAttributes ),\n\t\t\t\tObject.assign( {}, this.props.attributes ),\n\t\t\t\tObject.assign( {}, this.state.prevContext ),\n\t\t\t\tObject.assign( {}, this.props.context )\n\t\t\t);\n\n\t\t\t// Update preview if data has changed since last render (changing from \"edit\" to \"preview\").\n\t\t\tif (\n\t\t\t\t! compareObjects( this.state.prevAttributes, this.props.attributes ) ||\n\t\t\t\t! compareObjects( this.state.prevContext, this.props.context )\n\t\t\t) {\n\t\t\t\tacf.debug( 'Triggering block preview fetch from componentDidRemount' );\n\t\t\t\tthis.fetch();\n\t\t\t}\n\n\t\t\t// Fire the block preview event so blocks can reinit JS elements.\n\t\t\t// React reusing DOM elements covers any potential race condition from the above fetch.\n\t\t\tthis.renderBlockPreviewEvent();\n\t\t}\n\t}\n\n\t/**\n\t * Initializes ACF Blocks logic and registration.\n\t *\n\t * @since 5.9.0\n\t */\n\tfunction initialize() {\n\t\t// Add support for WordPress versions before 5.2.\n\t\tif ( ! wp.blockEditor ) {\n\t\t\twp.blockEditor = wp.editor;\n\t\t}\n\n\t\t// Register block types.\n\t\tconst blockTypes = acf.get( 'blockTypes' );\n\t\tif ( blockTypes ) {\n\t\t\tblockTypes.map( registerBlockType );\n\t\t}\n\t}\n\n\t// Run the initialize callback during the \"prepare\" action.\n\t// This ensures that all localized data is available and that blocks are registered before the WP editor has been instantiated.\n\tacf.addAction( 'prepare', initialize );\n\n\t/**\n\t * Returns a valid vertical alignment.\n\t *\n\t * @date\t07/08/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring align A vertical alignment.\n\t * @return\tstring\n\t */\n\tfunction validateVerticalAlignment( align ) {\n\t\tconst ALIGNMENTS = [ 'top', 'center', 'bottom' ];\n\t\tconst DEFAULT = 'top';\n\t\treturn ALIGNMENTS.includes( align ) ? align : DEFAULT;\n\t}\n\n\t/**\n\t * Returns a valid horizontal alignment.\n\t *\n\t * @date\t07/08/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring align A horizontal alignment.\n\t * @return\tstring\n\t */\n\tfunction validateHorizontalAlignment( align ) {\n\t\tconst ALIGNMENTS = [ 'left', 'center', 'right' ];\n\t\tconst DEFAULT = acf.get( 'rtl' ) ? 'right' : 'left';\n\t\treturn ALIGNMENTS.includes( align ) ? align : DEFAULT;\n\t}\n\n\t/**\n\t * Returns a valid matrix alignment.\n\t *\n\t * Written for \"upgrade-path\" compatibility from vertical alignment to matrix alignment.\n\t *\n\t * @date\t07/08/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring align A matrix alignment.\n\t * @return\tstring\n\t */\n\tfunction validateMatrixAlignment( align ) {\n\t\tconst DEFAULT = 'center center';\n\t\tif ( align ) {\n\t\t\tconst [ y, x ] = align.split( ' ' );\n\t\t\treturn `${ validateVerticalAlignment( y ) } ${ validateHorizontalAlignment( x ) }`;\n\t\t}\n\t\treturn DEFAULT;\n\t}\n\n\t/**\n\t * A higher order component adding alignContent editing functionality.\n\t *\n\t * @date\t08/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tcomponent OriginalBlockEdit The original BlockEdit component.\n\t * @param\tobject blockType The block type settings.\n\t * @return\tcomponent\n\t */\n\tfunction withAlignContentComponent( OriginalBlockEdit, blockType ) {\n\t\t// Determine alignment vars\n\t\tlet type = blockType.supports.align_content || blockType.supports.alignContent;\n\t\tlet AlignmentComponent;\n\t\tlet validateAlignment;\n\t\tswitch ( type ) {\n\t\t\tcase 'matrix':\n\t\t\t\tAlignmentComponent = BlockAlignmentMatrixControl || BlockAlignmentMatrixToolbar;\n\t\t\t\tvalidateAlignment = validateMatrixAlignment;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tAlignmentComponent = BlockVerticalAlignmentToolbar;\n\t\t\t\tvalidateAlignment = validateVerticalAlignment;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Ensure alignment component exists.\n\t\tif ( AlignmentComponent === undefined ) {\n\t\t\tconsole.warn( `The \"${ type }\" alignment component was not found.` );\n\t\t\treturn OriginalBlockEdit;\n\t\t}\n\n\t\t// Ensure correct block attribute data is sent in intial preview AJAX request.\n\t\tblockType.alignContent = validateAlignment( blockType.alignContent );\n\n\t\t// Return wrapped component.\n\t\treturn class WrappedBlockEdit extends Component {\n\t\t\trender() {\n\t\t\t\tconst { attributes, setAttributes } = this.props;\n\t\t\t\tconst { alignContent } = attributes;\n\t\t\t\tfunction onChangeAlignContent( alignContent ) {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\talignContent: validateAlignment( alignContent ),\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * A higher order component adding alignText editing functionality.\n\t *\n\t * @date\t08/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tcomponent OriginalBlockEdit The original BlockEdit component.\n\t * @param\tobject blockType The block type settings.\n\t * @return\tcomponent\n\t */\n\tfunction withAlignTextComponent( OriginalBlockEdit, blockType ) {\n\t\tconst validateAlignment = validateHorizontalAlignment;\n\n\t\t// Ensure correct block attribute data is sent in intial preview AJAX request.\n\t\tblockType.alignText = validateAlignment( blockType.alignText );\n\n\t\t// Return wrapped component.\n\t\treturn class WrappedBlockEdit extends Component {\n\t\t\trender() {\n\t\t\t\tconst { attributes, setAttributes } = this.props;\n\t\t\t\tconst { alignText } = attributes;\n\n\t\t\t\tfunction onChangeAlignText( alignText ) {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\talignText: validateAlignment( alignText ),\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * A higher order component adding full height support.\n\t *\n\t * @date\t19/07/2021\n\t * @since\t5.10.0\n\t *\n\t * @param\tcomponent OriginalBlockEdit The original BlockEdit component.\n\t * @param\tobject blockType The block type settings.\n\t * @return\tcomponent\n\t */\n\tfunction withFullHeightComponent( OriginalBlockEdit, blockType ) {\n\t\tif ( ! BlockFullHeightAlignmentControl ) return OriginalBlockEdit;\n\n\t\t// Return wrapped component.\n\t\treturn class WrappedBlockEdit extends Component {\n\t\t\trender() {\n\t\t\t\tconst { attributes, setAttributes } = this.props;\n\t\t\t\tconst { fullHeight } = attributes;\n\n\t\t\t\tfunction onToggleFullHeight( fullHeight ) {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tfullHeight,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Appends a backwards compatibility attribute for conversion.\n\t *\n\t * @since\t6.0\n\t *\n\t * @param\tobject attributes The block type attributes.\n\t * @return\tobject\n\t */\n\tfunction addBackCompatAttribute( attributes, new_attribute, type ) {\n\t\tattributes[ new_attribute ] = {\n\t\t\ttype: type,\n\t\t};\n\t\treturn attributes;\n\t}\n\n\t/**\n\t * Create a block hash from attributes\n\t *\n\t * @since 6.0\n\t *\n\t * @param object attributes The block type attributes.\n\t * @param object context The current block context object.\n\t * @return string\n\t */\n\tfunction createBlockAttributesHash( attributes, context ) {\n\t\tattributes[ '_acf_context' ] = sortObjectByKey( context );\n\t\treturn md5( JSON.stringify( sortObjectByKey( attributes ) ) );\n\t}\n\n\t/**\n\t * Key sort an object\n\t *\n\t * @since 6.3.1\n\t *\n\t * @param object toSort The object to be sorted\n\t * @return object\n\t */\n\tfunction sortObjectByKey( toSort ) {\n\t\treturn Object.keys( toSort )\n\t\t\t.sort()\n\t\t\t.reduce( ( acc, currValue ) => {\n\t\t\t\tacc[ currValue ] = toSort[ currValue ];\n\t\t\t\treturn acc;\n\t\t\t}, {} );\n\t}\n} )( jQuery );\n","( function ( $, undefined ) {\n\tacf.jsxNameReplacements = {\n\t\t'accent-height': 'accentHeight',\n\t\taccentheight: 'accentHeight',\n\t\t'accept-charset': 'acceptCharset',\n\t\tacceptcharset: 'acceptCharset',\n\t\taccesskey: 'accessKey',\n\t\t'alignment-baseline': 'alignmentBaseline',\n\t\talignmentbaseline: 'alignmentBaseline',\n\t\tallowedblocks: 'allowedBlocks',\n\t\tallowfullscreen: 'allowFullScreen',\n\t\tallowreorder: 'allowReorder',\n\t\t'arabic-form': 'arabicForm',\n\t\tarabicform: 'arabicForm',\n\t\tattributename: 'attributeName',\n\t\tattributetype: 'attributeType',\n\t\tautocapitalize: 'autoCapitalize',\n\t\tautocomplete: 'autoComplete',\n\t\tautocorrect: 'autoCorrect',\n\t\tautofocus: 'autoFocus',\n\t\tautoplay: 'autoPlay',\n\t\tautoreverse: 'autoReverse',\n\t\tautosave: 'autoSave',\n\t\tbasefrequency: 'baseFrequency',\n\t\t'baseline-shift': 'baselineShift',\n\t\tbaselineshift: 'baselineShift',\n\t\tbaseprofile: 'baseProfile',\n\t\tcalcmode: 'calcMode',\n\t\t'cap-height': 'capHeight',\n\t\tcapheight: 'capHeight',\n\t\tcellpadding: 'cellPadding',\n\t\tcellspacing: 'cellSpacing',\n\t\tcharset: 'charSet',\n\t\tclass: 'className',\n\t\tclassid: 'classID',\n\t\tclassname: 'className',\n\t\t'clip-path': 'clipPath',\n\t\t'clip-rule': 'clipRule',\n\t\tclippath: 'clipPath',\n\t\tclippathunits: 'clipPathUnits',\n\t\tcliprule: 'clipRule',\n\t\t'color-interpolation': 'colorInterpolation',\n\t\t'color-interpolation-filters': 'colorInterpolationFilters',\n\t\t'color-profile': 'colorProfile',\n\t\t'color-rendering': 'colorRendering',\n\t\tcolorinterpolation: 'colorInterpolation',\n\t\tcolorinterpolationfilters: 'colorInterpolationFilters',\n\t\tcolorprofile: 'colorProfile',\n\t\tcolorrendering: 'colorRendering',\n\t\tcolspan: 'colSpan',\n\t\tcontenteditable: 'contentEditable',\n\t\tcontentscripttype: 'contentScriptType',\n\t\tcontentstyletype: 'contentStyleType',\n\t\tcontextmenu: 'contextMenu',\n\t\tcontrolslist: 'controlsList',\n\t\tcrossorigin: 'crossOrigin',\n\t\tdangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n\t\tdatetime: 'dateTime',\n\t\tdefaultchecked: 'defaultChecked',\n\t\tdefaultvalue: 'defaultValue',\n\t\tdiffuseconstant: 'diffuseConstant',\n\t\tdisablepictureinpicture: 'disablePictureInPicture',\n\t\tdisableremoteplayback: 'disableRemotePlayback',\n\t\t'dominant-baseline': 'dominantBaseline',\n\t\tdominantbaseline: 'dominantBaseline',\n\t\tedgemode: 'edgeMode',\n\t\t'enable-background': 'enableBackground',\n\t\tenablebackground: 'enableBackground',\n\t\tenctype: 'encType',\n\t\tenterkeyhint: 'enterKeyHint',\n\t\texternalresourcesrequired: 'externalResourcesRequired',\n\t\t'fill-opacity': 'fillOpacity',\n\t\t'fill-rule': 'fillRule',\n\t\tfillopacity: 'fillOpacity',\n\t\tfillrule: 'fillRule',\n\t\tfilterres: 'filterRes',\n\t\tfilterunits: 'filterUnits',\n\t\t'flood-color': 'floodColor',\n\t\t'flood-opacity': 'floodOpacity',\n\t\tfloodcolor: 'floodColor',\n\t\tfloodopacity: 'floodOpacity',\n\t\t'font-family': 'fontFamily',\n\t\t'font-size': 'fontSize',\n\t\t'font-size-adjust': 'fontSizeAdjust',\n\t\t'font-stretch': 'fontStretch',\n\t\t'font-style': 'fontStyle',\n\t\t'font-variant': 'fontVariant',\n\t\t'font-weight': 'fontWeight',\n\t\tfontfamily: 'fontFamily',\n\t\tfontsize: 'fontSize',\n\t\tfontsizeadjust: 'fontSizeAdjust',\n\t\tfontstretch: 'fontStretch',\n\t\tfontstyle: 'fontStyle',\n\t\tfontvariant: 'fontVariant',\n\t\tfontweight: 'fontWeight',\n\t\tfor: 'htmlFor',\n\t\tforeignobject: 'foreignObject',\n\t\tformaction: 'formAction',\n\t\tformenctype: 'formEncType',\n\t\tformmethod: 'formMethod',\n\t\tformnovalidate: 'formNoValidate',\n\t\tformtarget: 'formTarget',\n\t\tframeborder: 'frameBorder',\n\t\t'glyph-name': 'glyphName',\n\t\t'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n\t\t'glyph-orientation-vertical': 'glyphOrientationVertical',\n\t\tglyphname: 'glyphName',\n\t\tglyphorientationhorizontal: 'glyphOrientationHorizontal',\n\t\tglyphorientationvertical: 'glyphOrientationVertical',\n\t\tglyphref: 'glyphRef',\n\t\tgradienttransform: 'gradientTransform',\n\t\tgradientunits: 'gradientUnits',\n\t\t'horiz-adv-x': 'horizAdvX',\n\t\t'horiz-origin-x': 'horizOriginX',\n\t\thorizadvx: 'horizAdvX',\n\t\thorizoriginx: 'horizOriginX',\n\t\threflang: 'hrefLang',\n\t\thtmlfor: 'htmlFor',\n\t\t'http-equiv': 'httpEquiv',\n\t\thttpequiv: 'httpEquiv',\n\t\t'image-rendering': 'imageRendering',\n\t\timagerendering: 'imageRendering',\n\t\tinnerhtml: 'innerHTML',\n\t\tinputmode: 'inputMode',\n\t\titemid: 'itemID',\n\t\titemprop: 'itemProp',\n\t\titemref: 'itemRef',\n\t\titemscope: 'itemScope',\n\t\titemtype: 'itemType',\n\t\tkernelmatrix: 'kernelMatrix',\n\t\tkernelunitlength: 'kernelUnitLength',\n\t\tkeyparams: 'keyParams',\n\t\tkeypoints: 'keyPoints',\n\t\tkeysplines: 'keySplines',\n\t\tkeytimes: 'keyTimes',\n\t\tkeytype: 'keyType',\n\t\tlengthadjust: 'lengthAdjust',\n\t\t'letter-spacing': 'letterSpacing',\n\t\tletterspacing: 'letterSpacing',\n\t\t'lighting-color': 'lightingColor',\n\t\tlightingcolor: 'lightingColor',\n\t\tlimitingconeangle: 'limitingConeAngle',\n\t\tmarginheight: 'marginHeight',\n\t\tmarginwidth: 'marginWidth',\n\t\t'marker-end': 'markerEnd',\n\t\t'marker-mid': 'markerMid',\n\t\t'marker-start': 'markerStart',\n\t\tmarkerend: 'markerEnd',\n\t\tmarkerheight: 'markerHeight',\n\t\tmarkermid: 'markerMid',\n\t\tmarkerstart: 'markerStart',\n\t\tmarkerunits: 'markerUnits',\n\t\tmarkerwidth: 'markerWidth',\n\t\tmaskcontentunits: 'maskContentUnits',\n\t\tmaskunits: 'maskUnits',\n\t\tmaxlength: 'maxLength',\n\t\tmediagroup: 'mediaGroup',\n\t\tminlength: 'minLength',\n\t\tnomodule: 'noModule',\n\t\tnovalidate: 'noValidate',\n\t\tnumoctaves: 'numOctaves',\n\t\t'overline-position': 'overlinePosition',\n\t\t'overline-thickness': 'overlineThickness',\n\t\toverlineposition: 'overlinePosition',\n\t\toverlinethickness: 'overlineThickness',\n\t\t'paint-order': 'paintOrder',\n\t\tpaintorder: 'paintOrder',\n\t\t'panose-1': 'panose1',\n\t\tpathlength: 'pathLength',\n\t\tpatterncontentunits: 'patternContentUnits',\n\t\tpatterntransform: 'patternTransform',\n\t\tpatternunits: 'patternUnits',\n\t\tplaysinline: 'playsInline',\n\t\t'pointer-events': 'pointerEvents',\n\t\tpointerevents: 'pointerEvents',\n\t\tpointsatx: 'pointsAtX',\n\t\tpointsaty: 'pointsAtY',\n\t\tpointsatz: 'pointsAtZ',\n\t\tpreservealpha: 'preserveAlpha',\n\t\tpreserveaspectratio: 'preserveAspectRatio',\n\t\tprimitiveunits: 'primitiveUnits',\n\t\tradiogroup: 'radioGroup',\n\t\treadonly: 'readOnly',\n\t\treferrerpolicy: 'referrerPolicy',\n\t\trefx: 'refX',\n\t\trefy: 'refY',\n\t\t'rendering-intent': 'renderingIntent',\n\t\trenderingintent: 'renderingIntent',\n\t\trepeatcount: 'repeatCount',\n\t\trepeatdur: 'repeatDur',\n\t\trequiredextensions: 'requiredExtensions',\n\t\trequiredfeatures: 'requiredFeatures',\n\t\trowspan: 'rowSpan',\n\t\t'shape-rendering': 'shapeRendering',\n\t\tshaperendering: 'shapeRendering',\n\t\tspecularconstant: 'specularConstant',\n\t\tspecularexponent: 'specularExponent',\n\t\tspellcheck: 'spellCheck',\n\t\tspreadmethod: 'spreadMethod',\n\t\tsrcdoc: 'srcDoc',\n\t\tsrclang: 'srcLang',\n\t\tsrcset: 'srcSet',\n\t\tstartoffset: 'startOffset',\n\t\tstddeviation: 'stdDeviation',\n\t\tstitchtiles: 'stitchTiles',\n\t\t'stop-color': 'stopColor',\n\t\t'stop-opacity': 'stopOpacity',\n\t\tstopcolor: 'stopColor',\n\t\tstopopacity: 'stopOpacity',\n\t\t'strikethrough-position': 'strikethroughPosition',\n\t\t'strikethrough-thickness': 'strikethroughThickness',\n\t\tstrikethroughposition: 'strikethroughPosition',\n\t\tstrikethroughthickness: 'strikethroughThickness',\n\t\t'stroke-dasharray': 'strokeDasharray',\n\t\t'stroke-dashoffset': 'strokeDashoffset',\n\t\t'stroke-linecap': 'strokeLinecap',\n\t\t'stroke-linejoin': 'strokeLinejoin',\n\t\t'stroke-miterlimit': 'strokeMiterlimit',\n\t\t'stroke-opacity': 'strokeOpacity',\n\t\t'stroke-width': 'strokeWidth',\n\t\tstrokedasharray: 'strokeDasharray',\n\t\tstrokedashoffset: 'strokeDashoffset',\n\t\tstrokelinecap: 'strokeLinecap',\n\t\tstrokelinejoin: 'strokeLinejoin',\n\t\tstrokemiterlimit: 'strokeMiterlimit',\n\t\tstrokeopacity: 'strokeOpacity',\n\t\tstrokewidth: 'strokeWidth',\n\t\tsuppresscontenteditablewarning: 'suppressContentEditableWarning',\n\t\tsuppresshydrationwarning: 'suppressHydrationWarning',\n\t\tsurfacescale: 'surfaceScale',\n\t\tsystemlanguage: 'systemLanguage',\n\t\ttabindex: 'tabIndex',\n\t\ttablevalues: 'tableValues',\n\t\ttargetx: 'targetX',\n\t\ttargety: 'targetY',\n\t\ttemplatelock: 'templateLock',\n\t\t'text-anchor': 'textAnchor',\n\t\t'text-decoration': 'textDecoration',\n\t\t'text-rendering': 'textRendering',\n\t\ttextanchor: 'textAnchor',\n\t\ttextdecoration: 'textDecoration',\n\t\ttextlength: 'textLength',\n\t\ttextrendering: 'textRendering',\n\t\t'underline-position': 'underlinePosition',\n\t\t'underline-thickness': 'underlineThickness',\n\t\tunderlineposition: 'underlinePosition',\n\t\tunderlinethickness: 'underlineThickness',\n\t\t'unicode-bidi': 'unicodeBidi',\n\t\t'unicode-range': 'unicodeRange',\n\t\tunicodebidi: 'unicodeBidi',\n\t\tunicoderange: 'unicodeRange',\n\t\t'units-per-em': 'unitsPerEm',\n\t\tunitsperem: 'unitsPerEm',\n\t\tusemap: 'useMap',\n\t\t'v-alphabetic': 'vAlphabetic',\n\t\t'v-hanging': 'vHanging',\n\t\t'v-ideographic': 'vIdeographic',\n\t\t'v-mathematical': 'vMathematical',\n\t\tvalphabetic: 'vAlphabetic',\n\t\t'vector-effect': 'vectorEffect',\n\t\tvectoreffect: 'vectorEffect',\n\t\t'vert-adv-y': 'vertAdvY',\n\t\t'vert-origin-x': 'vertOriginX',\n\t\t'vert-origin-y': 'vertOriginY',\n\t\tvertadvy: 'vertAdvY',\n\t\tvertoriginx: 'vertOriginX',\n\t\tvertoriginy: 'vertOriginY',\n\t\tvhanging: 'vHanging',\n\t\tvideographic: 'vIdeographic',\n\t\tviewbox: 'viewBox',\n\t\tviewtarget: 'viewTarget',\n\t\tvmathematical: 'vMathematical',\n\t\t'word-spacing': 'wordSpacing',\n\t\twordspacing: 'wordSpacing',\n\t\t'writing-mode': 'writingMode',\n\t\twritingmode: 'writingMode',\n\t\t'x-height': 'xHeight',\n\t\txchannelselector: 'xChannelSelector',\n\t\txheight: 'xHeight',\n\t\t'xlink:actuate': 'xlinkActuate',\n\t\t'xlink:arcrole': 'xlinkArcrole',\n\t\t'xlink:href': 'xlinkHref',\n\t\t'xlink:role': 'xlinkRole',\n\t\t'xlink:show': 'xlinkShow',\n\t\t'xlink:title': 'xlinkTitle',\n\t\t'xlink:type': 'xlinkType',\n\t\txlinkactuate: 'xlinkActuate',\n\t\txlinkarcrole: 'xlinkArcrole',\n\t\txlinkhref: 'xlinkHref',\n\t\txlinkrole: 'xlinkRole',\n\t\txlinkshow: 'xlinkShow',\n\t\txlinktitle: 'xlinkTitle',\n\t\txlinktype: 'xlinkType',\n\t\t'xml:base': 'xmlBase',\n\t\t'xml:lang': 'xmlLang',\n\t\t'xml:space': 'xmlSpace',\n\t\txmlbase: 'xmlBase',\n\t\txmllang: 'xmlLang',\n\t\t'xmlns:xlink': 'xmlnsXlink',\n\t\txmlnsxlink: 'xmlnsXlink',\n\t\txmlspace: 'xmlSpace',\n\t\tychannelselector: 'yChannelSelector',\n\t\tzoomandpan: 'zoomAndPan',\n\t};\n} )( jQuery );\n","var charenc = {\n // UTF-8 encoding\n utf8: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));\n }\n },\n\n // Binary encoding\n bin: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n for (var bytes = [], i = 0; i < str.length; i++)\n bytes.push(str.charCodeAt(i) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n for (var str = [], i = 0; i < bytes.length; i++)\n str.push(String.fromCharCode(bytes[i]));\n return str.join('');\n }\n }\n};\n\nmodule.exports = charenc;\n","(function() {\n var base64map\n = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n\n crypt = {\n // Bit-wise rotation left\n rotl: function(n, b) {\n return (n << b) | (n >>> (32 - b));\n },\n\n // Bit-wise rotation right\n rotr: function(n, b) {\n return (n << (32 - b)) | (n >>> b);\n },\n\n // Swap big-endian to little-endian and vice versa\n endian: function(n) {\n // If number given, swap endian\n if (n.constructor == Number) {\n return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;\n }\n\n // Else, assume array and swap all items\n for (var i = 0; i < n.length; i++)\n n[i] = crypt.endian(n[i]);\n return n;\n },\n\n // Generate an array of any length of random bytes\n randomBytes: function(n) {\n for (var bytes = []; n > 0; n--)\n bytes.push(Math.floor(Math.random() * 256));\n return bytes;\n },\n\n // Convert a byte array to big-endian 32-bit words\n bytesToWords: function(bytes) {\n for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)\n words[b >>> 5] |= bytes[i] << (24 - b % 32);\n return words;\n },\n\n // Convert big-endian 32-bit words to a byte array\n wordsToBytes: function(words) {\n for (var bytes = [], b = 0; b < words.length * 32; b += 8)\n bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a hex string\n bytesToHex: function(bytes) {\n for (var hex = [], i = 0; i < bytes.length; i++) {\n hex.push((bytes[i] >>> 4).toString(16));\n hex.push((bytes[i] & 0xF).toString(16));\n }\n return hex.join('');\n },\n\n // Convert a hex string to a byte array\n hexToBytes: function(hex) {\n for (var bytes = [], c = 0; c < hex.length; c += 2)\n bytes.push(parseInt(hex.substr(c, 2), 16));\n return bytes;\n },\n\n // Convert a byte array to a base-64 string\n bytesToBase64: function(bytes) {\n for (var base64 = [], i = 0; i < bytes.length; i += 3) {\n var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\n for (var j = 0; j < 4; j++)\n if (i * 8 + j * 6 <= bytes.length * 8)\n base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));\n else\n base64.push('=');\n }\n return base64.join('');\n },\n\n // Convert a base-64 string to a byte array\n base64ToBytes: function(base64) {\n // Remove non-base-64 characters\n base64 = base64.replace(/[^A-Z0-9+\\/]/ig, '');\n\n for (var bytes = [], i = 0, imod4 = 0; i < base64.length;\n imod4 = ++i % 4) {\n if (imod4 == 0) continue;\n bytes.push(((base64map.indexOf(base64.charAt(i - 1))\n & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))\n | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));\n }\n return bytes;\n }\n };\n\n module.exports = crypt;\n})();\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n","(function(){\r\n var crypt = require('crypt'),\r\n utf8 = require('charenc').utf8,\r\n isBuffer = require('is-buffer'),\r\n bin = require('charenc').bin,\r\n\r\n // The core\r\n md5 = function (message, options) {\r\n // Convert to byte array\r\n if (message.constructor == String)\r\n if (options && options.encoding === 'binary')\r\n message = bin.stringToBytes(message);\r\n else\r\n message = utf8.stringToBytes(message);\r\n else if (isBuffer(message))\r\n message = Array.prototype.slice.call(message, 0);\r\n else if (!Array.isArray(message) && message.constructor !== Uint8Array)\r\n message = message.toString();\r\n // else, assume byte array already\r\n\r\n var m = crypt.bytesToWords(message),\r\n l = message.length * 8,\r\n a = 1732584193,\r\n b = -271733879,\r\n c = -1732584194,\r\n d = 271733878;\r\n\r\n // Swap endian\r\n for (var i = 0; i < m.length; i++) {\r\n m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |\r\n ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;\r\n }\r\n\r\n // Padding\r\n m[l >>> 5] |= 0x80 << (l % 32);\r\n m[(((l + 64) >>> 9) << 4) + 14] = l;\r\n\r\n // Method shortcuts\r\n var FF = md5._ff,\r\n GG = md5._gg,\r\n HH = md5._hh,\r\n II = md5._ii;\r\n\r\n for (var i = 0; i < m.length; i += 16) {\r\n\r\n var aa = a,\r\n bb = b,\r\n cc = c,\r\n dd = d;\r\n\r\n a = FF(a, b, c, d, m[i+ 0], 7, -680876936);\r\n d = FF(d, a, b, c, m[i+ 1], 12, -389564586);\r\n c = FF(c, d, a, b, m[i+ 2], 17, 606105819);\r\n b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);\r\n a = FF(a, b, c, d, m[i+ 4], 7, -176418897);\r\n d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);\r\n c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);\r\n b = FF(b, c, d, a, m[i+ 7], 22, -45705983);\r\n a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);\r\n d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);\r\n c = FF(c, d, a, b, m[i+10], 17, -42063);\r\n b = FF(b, c, d, a, m[i+11], 22, -1990404162);\r\n a = FF(a, b, c, d, m[i+12], 7, 1804603682);\r\n d = FF(d, a, b, c, m[i+13], 12, -40341101);\r\n c = FF(c, d, a, b, m[i+14], 17, -1502002290);\r\n b = FF(b, c, d, a, m[i+15], 22, 1236535329);\r\n\r\n a = GG(a, b, c, d, m[i+ 1], 5, -165796510);\r\n d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);\r\n c = GG(c, d, a, b, m[i+11], 14, 643717713);\r\n b = GG(b, c, d, a, m[i+ 0], 20, -373897302);\r\n a = GG(a, b, c, d, m[i+ 5], 5, -701558691);\r\n d = GG(d, a, b, c, m[i+10], 9, 38016083);\r\n c = GG(c, d, a, b, m[i+15], 14, -660478335);\r\n b = GG(b, c, d, a, m[i+ 4], 20, -405537848);\r\n a = GG(a, b, c, d, m[i+ 9], 5, 568446438);\r\n d = GG(d, a, b, c, m[i+14], 9, -1019803690);\r\n c = GG(c, d, a, b, m[i+ 3], 14, -187363961);\r\n b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);\r\n a = GG(a, b, c, d, m[i+13], 5, -1444681467);\r\n d = GG(d, a, b, c, m[i+ 2], 9, -51403784);\r\n c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);\r\n b = GG(b, c, d, a, m[i+12], 20, -1926607734);\r\n\r\n a = HH(a, b, c, d, m[i+ 5], 4, -378558);\r\n d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);\r\n c = HH(c, d, a, b, m[i+11], 16, 1839030562);\r\n b = HH(b, c, d, a, m[i+14], 23, -35309556);\r\n a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);\r\n d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);\r\n c = HH(c, d, a, b, m[i+ 7], 16, -155497632);\r\n b = HH(b, c, d, a, m[i+10], 23, -1094730640);\r\n a = HH(a, b, c, d, m[i+13], 4, 681279174);\r\n d = HH(d, a, b, c, m[i+ 0], 11, -358537222);\r\n c = HH(c, d, a, b, m[i+ 3], 16, -722521979);\r\n b = HH(b, c, d, a, m[i+ 6], 23, 76029189);\r\n a = HH(a, b, c, d, m[i+ 9], 4, -640364487);\r\n d = HH(d, a, b, c, m[i+12], 11, -421815835);\r\n c = HH(c, d, a, b, m[i+15], 16, 530742520);\r\n b = HH(b, c, d, a, m[i+ 2], 23, -995338651);\r\n\r\n a = II(a, b, c, d, m[i+ 0], 6, -198630844);\r\n d = II(d, a, b, c, m[i+ 7], 10, 1126891415);\r\n c = II(c, d, a, b, m[i+14], 15, -1416354905);\r\n b = II(b, c, d, a, m[i+ 5], 21, -57434055);\r\n a = II(a, b, c, d, m[i+12], 6, 1700485571);\r\n d = II(d, a, b, c, m[i+ 3], 10, -1894986606);\r\n c = II(c, d, a, b, m[i+10], 15, -1051523);\r\n b = II(b, c, d, a, m[i+ 1], 21, -2054922799);\r\n a = II(a, b, c, d, m[i+ 8], 6, 1873313359);\r\n d = II(d, a, b, c, m[i+15], 10, -30611744);\r\n c = II(c, d, a, b, m[i+ 6], 15, -1560198380);\r\n b = II(b, c, d, a, m[i+13], 21, 1309151649);\r\n a = II(a, b, c, d, m[i+ 4], 6, -145523070);\r\n d = II(d, a, b, c, m[i+11], 10, -1120210379);\r\n c = II(c, d, a, b, m[i+ 2], 15, 718787259);\r\n b = II(b, c, d, a, m[i+ 9], 21, -343485551);\r\n\r\n a = (a + aa) >>> 0;\r\n b = (b + bb) >>> 0;\r\n c = (c + cc) >>> 0;\r\n d = (d + dd) >>> 0;\r\n }\r\n\r\n return crypt.endian([a, b, c, d]);\r\n };\r\n\r\n // Auxiliary functions\r\n md5._ff = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & c | ~b & d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._gg = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & d | c & ~d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._hh = function (a, b, c, d, x, s, t) {\r\n var n = a + (b ^ c ^ d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._ii = function (a, b, c, d, x, s, t) {\r\n var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n\r\n // Package private blocksize\r\n md5._blocksize = 16;\r\n md5._digestsize = 16;\r\n\r\n module.exports = function (message, options) {\r\n if (message === undefined || message === null)\r\n throw new Error('Illegal argument ' + message);\r\n\r\n var digestbytes = crypt.wordsToBytes(md5(message, options));\r\n return options && options.asBytes ? digestbytes :\r\n options && options.asString ? bin.bytesToString(digestbytes) :\r\n crypt.bytesToHex(digestbytes);\r\n };\r\n\r\n})();\r\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('')) {\n _frame = _frame.replace('', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie.
\n // or
). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n //
, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nvar didWarnAboutKeySpread = {};\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n {\n if (hasOwnProperty.call(props, 'key')) {\n var componentName = getComponentNameFromType(type);\n var keys = Object.keys(props).filter(function (k) {\n return k !== 'key';\n });\n var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';\n\n if (!didWarnAboutKeySpread[componentName + beforeExample]) {\n var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';\n\n error('A props object containing a \"key\" prop is being spread into JSX:\\n' + ' let props = %s;\\n' + ' <%s {...props} />\\n' + 'React keys must be passed directly to JSX without using spread:\\n' + ' let props = %s;\\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);\n\n didWarnAboutKeySpread[componentName + beforeExample] = true;\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var ReactVersion = '18.3.1';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nvar ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nvar ReactCurrentBatchConfig = {\n transition: null\n};\n\nvar ReactCurrentActQueue = {\n current: null,\n // Used to reproduce behavior of `batchedUpdates` in legacy mode.\n isBatchingLegacy: false,\n didScheduleLegacyUpdate: false\n};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nvar ReactDebugCurrentFrame = {};\nvar currentExtraStackFrame = null;\nfunction setExtraStackFrame(stack) {\n {\n currentExtraStackFrame = stack;\n }\n}\n\n{\n ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {\n {\n currentExtraStackFrame = stack;\n }\n }; // Stack implementation injected by the current renderer.\n\n\n ReactDebugCurrentFrame.getCurrentStack = null;\n\n ReactDebugCurrentFrame.getStackAddendum = function () {\n var stack = ''; // Add an extra top frame while an element is being validated\n\n if (currentExtraStackFrame) {\n stack += currentExtraStackFrame;\n } // Delegate to the injected renderer-specific implementation\n\n\n var impl = ReactDebugCurrentFrame.getCurrentStack;\n\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar ReactSharedInternals = {\n ReactCurrentDispatcher: ReactCurrentDispatcher,\n ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n ReactCurrentOwner: ReactCurrentOwner\n};\n\n{\n ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;\n ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n error(\"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nvar assign = Object.assign;\n\nvar emptyObject = {};\n\n{\n Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {\n throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n var refObject = {\n current: null\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (element === null || element === undefined) {\n throw new Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n\n var propName; // Original props are copied\n\n var props = assign({}, element.props); // Reserved names are extracted\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = key.replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof element === 'object' && element !== null && element.key != null) {\n // Explicit key\n {\n checkKeyStringCoercion(element.key);\n }\n\n return escape('' + element.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n var _child = children;\n var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;\n\n if (isArray(mappedChild)) {\n var escapedChildKey = '';\n\n if (childKey != null) {\n escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n }\n\n mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n {\n // The `if` statement here prevents auto-disabling of the safe\n // coercion ESLint rule, so we must manually disable it below.\n // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {\n checkKeyStringCoercion(mappedChild.key);\n }\n }\n\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n // eslint-disable-next-line react-internal/safe-string-coercion\n escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);\n }\n\n array.push(mappedChild);\n }\n\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getElementKey(child, i);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var iterableChildren = children;\n\n {\n // Warn about using Maps as children\n if (iteratorFn === iterableChildren.entries) {\n if (!didWarnAboutMaps) {\n warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n\n var iterator = iteratorFn.call(iterableChildren);\n var step;\n var ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getElementKey(child, ii++);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else if (type === 'object') {\n // eslint-disable-next-line react-internal/safe-string-coercion\n var childrenString = String(children);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var result = [];\n var count = 0;\n mapIntoArray(children, result, '', '', function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n var n = 0;\n mapChildren(children, function () {\n n++; // Don't return anything\n });\n return n;\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n mapChildren(children, function () {\n forEachFunc.apply(this, arguments); // Don't return anything.\n }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n throw new Error('React.Children.only expected to receive a single React element child.');\n }\n\n return children;\n}\n\nfunction createContext(defaultValue) {\n // TODO: Second argument used to be an optional `calculateChangedBits`\n // function. Warn to reserve for future use?\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null,\n // Add these to use same hidden class in VM as ServerContext\n _defaultValue: null,\n _globalName: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n var hasWarnedAboutDisplayNameOnConsumer = false;\n\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context\n }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Consumer;\n }\n },\n displayName: {\n get: function () {\n return context.displayName;\n },\n set: function (displayName) {\n if (!hasWarnedAboutDisplayNameOnConsumer) {\n warn('Setting `displayName` on Context.Consumer has no effect. ' + \"You should set it directly on the context with Context.displayName = '%s'.\", displayName);\n\n hasWarnedAboutDisplayNameOnConsumer = true;\n }\n }\n }\n }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n context.Consumer = Consumer;\n }\n\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n\n return context;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\n\nfunction lazyInitializer(payload) {\n if (payload._status === Uninitialized) {\n var ctor = payload._result;\n var thenable = ctor(); // Transition to the next state.\n // This might throw either because it's missing or throws. If so, we treat it\n // as still uninitialized and try again next time. Which is the same as what\n // happens if the ctor or any wrappers processing the ctor throws. This might\n // end up fixing it if the resolution was a concurrency bug.\n\n thenable.then(function (moduleObject) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var resolved = payload;\n resolved._status = Resolved;\n resolved._result = moduleObject;\n }\n }, function (error) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var rejected = payload;\n rejected._status = Rejected;\n rejected._result = error;\n }\n });\n\n if (payload._status === Uninitialized) {\n // In case, we're still uninitialized, then we're waiting for the thenable\n // to resolve. Set it as pending in the meantime.\n var pending = payload;\n pending._status = Pending;\n pending._result = thenable;\n }\n }\n\n if (payload._status === Resolved) {\n var moduleObject = payload._result;\n\n {\n if (moduleObject === undefined) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\\n\\n\" + 'Did you accidentally put curly braces around the import?', moduleObject);\n }\n }\n\n {\n if (!('default' in moduleObject)) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\", moduleObject);\n }\n }\n\n return moduleObject.default;\n } else {\n throw payload._result;\n }\n}\n\nfunction lazy(ctor) {\n var payload = {\n // We use these fields to store the result.\n _status: Uninitialized,\n _result: ctor\n };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: payload,\n _init: lazyInitializer\n };\n\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes; // $FlowFixMe\n\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n set: function (newDefaultProps) {\n error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n defaultProps = newDefaultProps; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n set: function (newPropTypes) {\n error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n propTypes = newPropTypes; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n if (render.length !== 0 && render.length !== 2) {\n error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');\n }\n }\n\n if (render != null) {\n if (render.defaultProps != null || render.propTypes != null) {\n error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');\n }\n }\n }\n\n var elementType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.forwardRef((props, ref) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!render.name && !render.displayName) {\n render.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n\n var elementType = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.memo((props) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!type.name && !type.displayName) {\n type.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nfunction resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher.current;\n\n {\n if (dispatcher === null) {\n error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n }\n } // Will result in a null access error if accessed outside render phase. We\n // intentionally don't throw our own error because this is in a hot path.\n // Also helps ensure this is inlined.\n\n\n return dispatcher;\n}\nfunction useContext(Context) {\n var dispatcher = resolveDispatcher();\n\n {\n // TODO: add a more generic warning for invalid values.\n if (Context._context !== undefined) {\n var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n if (realContext.Consumer === Context) {\n error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n } else if (realContext.Provider === Context) {\n error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n }\n\n return dispatcher.useContext(Context);\n}\nfunction useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useInsertionEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useInsertionEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n}\nfunction useTransition() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useTransition();\n}\nfunction useDeferredValue(value) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDeferredValue(value);\n}\nfunction useId() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useId();\n}\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher$1.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('')) {\n _frame = _frame.replace('', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher$1.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n setExtraStackFrame(stack);\n } else {\n setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendumForProps(elementProps) {\n if (elementProps !== null && elementProps !== undefined) {\n return getSourceInfoErrorAddendum(elementProps.__source);\n }\n\n return '';\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n {\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\nfunction createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n {\n error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n }\n\n var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\nfunction createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type;\n\n {\n if (!didWarnAboutDeprecatedCreateFactory) {\n didWarnAboutDeprecatedCreateFactory = true;\n\n warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n } // Legacy hook: remove it\n\n\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n\n return validatedFactory;\n}\nfunction cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement.apply(this, arguments);\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n\n validatePropTypes(newElement);\n return newElement;\n}\n\nfunction startTransition(scope, options) {\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = {};\n var currentTransition = ReactCurrentBatchConfig.transition;\n\n {\n ReactCurrentBatchConfig.transition._updatedFibers = new Set();\n }\n\n try {\n scope();\n } finally {\n ReactCurrentBatchConfig.transition = prevTransition;\n\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n\n currentTransition._updatedFibers.clear();\n }\n }\n }\n}\n\nvar didWarnAboutMessageChannel = false;\nvar enqueueTaskImpl = null;\nfunction enqueueTask(task) {\n if (enqueueTaskImpl === null) {\n try {\n // read require off the module object to get around the bundlers.\n // we don't want them to detect a require and bundle a Node polyfill.\n var requireString = ('require' + Math.random()).slice(0, 7);\n var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's\n // version of setImmediate, bypassing fake timers if any.\n\n enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;\n } catch (_err) {\n // we're in a browser\n // we can't use regular timers because they may still be faked\n // so we try MessageChannel+postMessage instead\n enqueueTaskImpl = function (callback) {\n {\n if (didWarnAboutMessageChannel === false) {\n didWarnAboutMessageChannel = true;\n\n if (typeof MessageChannel === 'undefined') {\n error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');\n }\n }\n }\n\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(undefined);\n };\n }\n }\n\n return enqueueTaskImpl(task);\n}\n\nvar actScopeDepth = 0;\nvar didWarnNoAwaitAct = false;\nfunction act(callback) {\n {\n // `act` calls can be nested, so we track the depth. This represents the\n // number of `act` scopes on the stack.\n var prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n\n if (ReactCurrentActQueue.current === null) {\n // This is the outermost `act` scope. Initialize the queue. The reconciler\n // will detect the queue and use it instead of Scheduler.\n ReactCurrentActQueue.current = [];\n }\n\n var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;\n var result;\n\n try {\n // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only\n // set to `true` while the given callback is executed, not for updates\n // triggered during an async event, because this is how the legacy\n // implementation of `act` behaved.\n ReactCurrentActQueue.isBatchingLegacy = true;\n result = callback(); // Replicate behavior of original `act` implementation in legacy mode,\n // which flushed updates immediately after the scope function exits, even\n // if it's an async function.\n\n if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n ReactCurrentActQueue.didScheduleLegacyUpdate = false;\n flushActQueue(queue);\n }\n }\n } catch (error) {\n popActScope(prevActScopeDepth);\n throw error;\n } finally {\n ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;\n }\n\n if (result !== null && typeof result === 'object' && typeof result.then === 'function') {\n var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait\n // for it to resolve before exiting the current scope.\n\n var wasAwaited = false;\n var thenable = {\n then: function (resolve, reject) {\n wasAwaited = true;\n thenableResult.then(function (returnValue) {\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // We've exited the outermost act scope. Recursively flush the\n // queue until there's no remaining work.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }, function (error) {\n // The callback threw an error.\n popActScope(prevActScopeDepth);\n reject(error);\n });\n }\n };\n\n {\n if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {\n // eslint-disable-next-line no-undef\n Promise.resolve().then(function () {}).then(function () {\n if (!wasAwaited) {\n didWarnNoAwaitAct = true;\n\n error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');\n }\n });\n }\n }\n\n return thenable;\n } else {\n var returnValue = result; // The callback is not an async function. Exit the current scope\n // immediately, without awaiting.\n\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // Exiting the outermost act scope. Flush the queue.\n var _queue = ReactCurrentActQueue.current;\n\n if (_queue !== null) {\n flushActQueue(_queue);\n ReactCurrentActQueue.current = null;\n } // Return a thenable. If the user awaits it, we'll flush again in\n // case additional work was scheduled by a microtask.\n\n\n var _thenable = {\n then: function (resolve, reject) {\n // Confirm we haven't re-entered another `act` scope, in case\n // the user does something weird like await the thenable\n // multiple times.\n if (ReactCurrentActQueue.current === null) {\n // Recursively flush the queue until there's no remaining work.\n ReactCurrentActQueue.current = [];\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }\n };\n return _thenable;\n } else {\n // Since we're inside a nested `act` scope, the returned thenable\n // immediately resolves. The outer scope will flush the queue.\n var _thenable2 = {\n then: function (resolve, reject) {\n resolve(returnValue);\n }\n };\n return _thenable2;\n }\n }\n }\n}\n\nfunction popActScope(prevActScopeDepth) {\n {\n if (prevActScopeDepth !== actScopeDepth - 1) {\n error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');\n }\n\n actScopeDepth = prevActScopeDepth;\n }\n}\n\nfunction recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n if (queue.length === 0) {\n // No additional work was scheduled. Finish.\n ReactCurrentActQueue.current = null;\n resolve(returnValue);\n } else {\n // Keep flushing work until there's none left.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n }\n });\n } catch (error) {\n reject(error);\n }\n } else {\n resolve(returnValue);\n }\n }\n}\n\nvar isFlushing = false;\n\nfunction flushActQueue(queue) {\n {\n if (!isFlushing) {\n // Prevent re-entrance.\n isFlushing = true;\n var i = 0;\n\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n\n do {\n callback = callback(true);\n } while (callback !== null);\n }\n\n queue.length = 0;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n queue = queue.slice(i + 1);\n throw error;\n } finally {\n isFlushing = false;\n }\n }\n }\n}\n\nvar createElement$1 = createElementWithValidation ;\nvar cloneElement$1 = cloneElementWithValidation ;\nvar createFactory = createFactoryWithValidation ;\nvar Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.act = act;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.startTransition = startTransition;\nexports.unstable_act = act;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useDeferredValue = useDeferredValue;\nexports.useEffect = useEffect;\nexports.useId = useId;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useInsertionEffect = useInsertionEffect;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.useSyncExternalStore = useSyncExternalStore;\nexports.useTransition = useTransition;\nexports.version = ReactVersion;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import './_acf-jsx-names.js';\nimport './_acf-blocks.js';\n"],"names":["md5","require","$","undefined","BlockControls","InspectorControls","InnerBlocks","useBlockProps","AlignmentToolbar","BlockVerticalAlignmentToolbar","wp","blockEditor","ToolbarGroup","ToolbarButton","Placeholder","Spinner","components","Fragment","element","Component","React","useSelect","data","createHigherOrderComponent","compose","BlockAlignmentMatrixToolbar","__experimentalBlockAlignmentMatrixToolbar","BlockAlignmentMatrixControl","__experimentalBlockAlignmentMatrixControl","BlockFullHeightAlignmentControl","__experimentalBlockFullHeightAligmentControl","__experimentalBlockFullHeightAlignmentControl","useInnerBlocksProps","__experimentalUseInnerBlocksProps","blockTypes","acf","blockInstances","getBlockType","name","getBlockVersion","blockType","acf_block_version","blockSupportsValidation","validate","isBlockInQueryLoop","clientId","parents","select","getBlockParents","parentsData","getBlocksByClientId","filter","block","length","isSiteEditor","pagenow","isDesktopPreviewDeviceType","editPostStore","__experimentalGetPreviewDeviceType","getPreviewDeviceType","isEditingTemplate","isiFramedMobileDevicePreview","registerBlockType","allowedTypes","post_types","push","postType","get","includes","icon","substr","iconHTML","_jsx","Div","children","category","blocks","getCategories","slug","pop","parseArgs","title","api_version","key","attributes","default","supports","anchor","type","ThisBlockEdit","BlockEdit","ThisBlockSave","BlockSave","alignText","align_text","addBackCompatAttribute","withAlignTextComponent","alignContent","align_content","withAlignContentComponent","fullHeight","full_height","withFullHeightComponent","edit","props","useEffect","dispatch","unlockPostSaving","_objectSpread","save","result","selector","getBlocks","args","recurseBlocks","forEach","k","ajaxQueue","fetchCache","fetchBlock","context","query","delay","queueId","JSON","stringify","timeout","promise","Deferred","started","clearTimeout","setTimeout","resolve","apply","ajax","url","dataType","cache","prepareForAjax","action","always","done","arguments","fail","reject","compareObjects","obj1","obj2","parseJSX","html","acfBlockVersion","replace","parseNode","node","level","nodeName","parseNodeName","toLowerCase","nodeAttrs","ref","createRef","arrayArgs","map","parseNodeAttr","value","ACFInnerBlocks","childNodes","child","Text","text","textContent","createElement","getJSXName","replacement","isget","Script","className","innerBlockProps","nodeAttr","shortcut","applyFilters","css","split","s","pos","indexOf","ruleName","trim","ruleValue","charAt","strCamelCase","c1","parse","withDefaultAttributes","BlockListBlock","WrappedBlockEdit","constructor","Object","keys","upgrades","attribute","render","hooks","addFilter","Content","setup","restrictMode","modes","mode","setAttributes","forcePreview","showToggle","toggleText","__","toggleIcon","toggleMode","_jsxs","label","onClick","BlockForm","BlockBody","isSelected","index","rootClientId","getBlockRootClientId","getBlockIndex","showForm","additionalClasses","validation_errors","has_been_deselected","BlockPreview","dangerouslySetInnerHTML","__html","el","setHTML","componentDidUpdate","componentDidMount","DynamicHTML","setRef","bind","id","subscribed","renderMethod","passedValidation","loadState","fetch","maybePreload","blockId","form","debug","preloadedBlocks","modeText","replaceAll","validation","errors","error","input","client","state","setState","assign","setHtml","jsx","console","warn","Array","isArray","refElement","find","isValidElement","$el","shouldComponentUpdate","componentWillMove","display","$prevParent","parent","$thisParent","clone","getValidationErrors","isNotNewlyAdded","lockBlockForSaving","unlockBlockForSaving","componentDidAppend","componentDidRemount","prevProps","prevState","doAction","componentWillUnmount","hasShownValidation","shown_validation","setShownValidation","setValidationErrors","getMode","lockPostSaving","displayValidation","$formEl","hasClass","validator","getBlockFormValidator","clearErrors","addErrors","showErrors","has","update","set","validate_only","hash","createBlockAttributesHash","preloaded","nextProps","nextState","thisBlockForm","serializeData","silent","serialize","on","contextPostId","prevAttributes","prevContext","preview","replaceHtml","blockFormState","renderBlockPreviewEvent","nextAttributes","thisAttributes","blockElement","current","initialize","editor","addAction","validateVerticalAlignment","align","ALIGNMENTS","DEFAULT","validateHorizontalAlignment","validateMatrixAlignment","y","x","OriginalBlockEdit","AlignmentComponent","validateAlignment","onChangeAlignContent","group","onChange","onChangeAlignText","onToggleFullHeight","isActive","onToggle","new_attribute","sortObjectByKey","toSort","sort","reduce","acc","currValue","jQuery","jsxNameReplacements","accentheight","acceptcharset","accesskey","alignmentbaseline","allowedblocks","allowfullscreen","allowreorder","arabicform","attributename","attributetype","autocapitalize","autocomplete","autocorrect","autofocus","autoplay","autoreverse","autosave","basefrequency","baselineshift","baseprofile","calcmode","capheight","cellpadding","cellspacing","charset","class","classid","classname","clippath","clippathunits","cliprule","colorinterpolation","colorinterpolationfilters","colorprofile","colorrendering","colspan","contenteditable","contentscripttype","contentstyletype","contextmenu","controlslist","crossorigin","dangerouslysetinnerhtml","datetime","defaultchecked","defaultvalue","diffuseconstant","disablepictureinpicture","disableremoteplayback","dominantbaseline","edgemode","enablebackground","enctype","enterkeyhint","externalresourcesrequired","fillopacity","fillrule","filterres","filterunits","floodcolor","floodopacity","fontfamily","fontsize","fontsizeadjust","fontstretch","fontstyle","fontvariant","fontweight","for","foreignobject","formaction","formenctype","formmethod","formnovalidate","formtarget","frameborder","glyphname","glyphorientationhorizontal","glyphorientationvertical","glyphref","gradienttransform","gradientunits","horizadvx","horizoriginx","hreflang","htmlfor","httpequiv","imagerendering","innerhtml","inputmode","itemid","itemprop","itemref","itemscope","itemtype","kernelmatrix","kernelunitlength","keyparams","keypoints","keysplines","keytimes","keytype","lengthadjust","letterspacing","lightingcolor","limitingconeangle","marginheight","marginwidth","markerend","markerheight","markermid","markerstart","markerunits","markerwidth","maskcontentunits","maskunits","maxlength","mediagroup","minlength","nomodule","novalidate","numoctaves","overlineposition","overlinethickness","paintorder","pathlength","patterncontentunits","patterntransform","patternunits","playsinline","pointerevents","pointsatx","pointsaty","pointsatz","preservealpha","preserveaspectratio","primitiveunits","radiogroup","readonly","referrerpolicy","refx","refy","renderingintent","repeatcount","repeatdur","requiredextensions","requiredfeatures","rowspan","shaperendering","specularconstant","specularexponent","spellcheck","spreadmethod","srcdoc","srclang","srcset","startoffset","stddeviation","stitchtiles","stopcolor","stopopacity","strikethroughposition","strikethroughthickness","strokedasharray","strokedashoffset","strokelinecap","strokelinejoin","strokemiterlimit","strokeopacity","strokewidth","suppresscontenteditablewarning","suppresshydrationwarning","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","templatelock","textanchor","textdecoration","textlength","textrendering","underlineposition","underlinethickness","unicodebidi","unicoderange","unitsperem","usemap","valphabetic","vectoreffect","vertadvy","vertoriginx","vertoriginy","vhanging","videographic","viewbox","viewtarget","vmathematical","wordspacing","writingmode","xchannelselector","xheight","xlinkactuate","xlinkarcrole","xlinkhref","xlinkrole","xlinkshow","xlinktitle","xlinktype","xmlbase","xmllang","xmlnsxlink","xmlspace","ychannelselector","zoomandpan"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"acf-pro-blocks.js","mappings":";;;;;;;;;;;;;;;;;AAAA,MAAMA,GAAG,GAAGC,mBAAO,CAAE,sCAAM,CAAC;AAE5B,CAAE,CAAEC,CAAC,EAAEC,SAAS,KAAM;EACrB;EACA,MAAM;IACLC,aAAa;IACbC,iBAAiB;IACjBC,WAAW;IACXC,aAAa;IACbC,gBAAgB;IAChBC;EACD,CAAC,GAAGC,EAAE,CAACC,WAAW;EAElB,MAAM;IAAEC,YAAY;IAAEC,aAAa;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAGL,EAAE,CAACM,UAAU;EAC3E,MAAM;IAAEC;EAAS,CAAC,GAAGP,EAAE,CAACQ,OAAO;EAC/B,MAAM;IAAEC;EAAU,CAAC,GAAGC,KAAK;EAC3B,MAAM;IAAEC;EAAU,CAAC,GAAGX,EAAE,CAACY,IAAI;EAC7B,MAAM;IAAEC;EAA2B,CAAC,GAAGb,EAAE,CAACc,OAAO;;EAEjD;EACA,MAAMC,2BAA2B,GAChCf,EAAE,CAACC,WAAW,CAACe,yCAAyC,I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;AAEL;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA,KAAK;;AAEL;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;;;;;;;;;;AC/FD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;ACpBA;AACA,cAAc,mBAAO,CAAC,4CAAO;AAC7B,aAAa,8EAAuB;AACpC,iBAAiB,mBAAO,CAAC,oDAAW;AACpC,YAAY,6EAAsB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;AC/JD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,IAAI,IAAqC;AACzC;AACA;;AAEA,YAAY,mBAAO,CAAC,4CAAO;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,iGAAiG,eAAe;AAChH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA,KAAK,GAAG;;AAER,kDAAkD;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,4BAA4B;AAC5B;AACA,qCAAqC;;AAErC,gCAAgC;AAChC;AACA;;AAEA,gCAAgC;;AAEhC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;;AAGF;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA,sBAAsB;AACtB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,iCAAiC;AACjC;AACA,SAAS;AACT,2BAA2B;AAC3B;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,2DAA2D;;AAE3D;AACA;;AAEA;AACA,yDAAyD;AACzD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA,gFAAgF;AAChF;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;;;AAGlB;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2HAA2H;AAC3H;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wCAAwC;AACxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,eAAe;AAC1B,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA,oBAAoB;AACpB,2DAA2D,UAAU;AACrE,yBAAyB,UAAU;AACnC;AACA,aAAa,UAAU;AACvB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,YAAY,SAAS;AACrB;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,6DAA6D;AAC7D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,iBAAiB;AACvC;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,4CAA4C;;AAE5C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA,0DAA0D;AAC1D;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,gDAAgD,gDAAgD,MAAM,aAAa;;AAEnH;AACA,iDAAiD,kCAAkC,OAAO;;AAE1F,yGAAyG,cAAc,UAAU,gGAAgG,kBAAkB,UAAU,UAAU;;AAEvQ;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC;AACtC;;AAEA;;AAEA,gBAAgB;AAChB,WAAW;AACX,YAAY;AACZ,GAAG;AACH;;;;;;;;;;;;;ACpzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,IAAI,IAAqC;AACzC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;;AAGL;;AAEA;AACA,oBAAoB;;AAEpB;AACA;AACA,MAAM;;;AAGN;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,4BAA4B;AAC5B;AACA,qCAAqC;;AAErC,gCAAgC;AAChC;AACA;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6FAA6F,aAAa;AAC1G;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG,eAAe;AAChH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA,KAAK,GAAG;;AAER,kDAAkD;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,8MAA8M;;AAE9M;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,aAAa,YAAY;AACzB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,WAAW;AACxB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB,aAAa,WAAW;AACxB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB,aAAa,WAAW;AACxB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,0BAA0B;;AAE1B,2BAA2B;AAC3B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA,WAAW,WAAW;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;;AAEA;AACA,oDAAoD;;AAEpD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,iCAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wCAAwC;AACxC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;;AAGF;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,eAAe;AAC1B,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,qEAAqE;;AAErE;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;;AAGA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA,oBAAoB,oBAAoB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB;;AAEhB,uBAAuB,kBAAkB;;AAEzC;AACA,yBAAyB;;AAEzB,4BAA4B;AAC5B;AACA;;AAEA,gCAAgC;;AAEhC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM;;;AAGN;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,IAAI;AACJ;;;AAGA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA,oBAAoB,oBAAoB;AACxC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,YAAY;AACZ;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wCAAwC;AACxC;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wBAAwB;;AAExB;;AAEA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,qIAAqI,yCAAyC;AAC9K;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,kBAAkB;AAC7B,WAAW,GAAG;AACd,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,YAAY,QAAQ;AACpB;;;AAGA;AACA;AACA;AACA,SAAS;AACT,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,kBAAkB;AAC7B,WAAW,GAAG;AACd;AACA;AACA;AACA,wCAAwC;AACxC,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,YAAY,cAAc;AAC1B;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA,0CAA0C;AAC1C;;AAEA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA,oCAAoC;AACpC;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,+CAA+C,IAAI;AACnD;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,oCAAoC,IAAI;AACxC;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0CAA0C;AAC1C;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA,sBAAsB;AACtB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,iCAAiC;AACjC;AACA,SAAS;AACT,2BAA2B;AAC3B;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,2DAA2D;;AAE3D;AACA;;AAEA;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA,gFAAgF;AAChF;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;;;AAGlB;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2HAA2H;AAC3H;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,2DAA2D;AAC3D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,4CAA4C;;AAE5C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA,sDAAsD;AACtD;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;;AAGA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,sBAAsB;AACxC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,mCAAmC;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;;AAEA,0OAA0O;AAC1O;AACA,WAAW;AACX;AACA;;AAEA;AACA,MAAM;AACN,gCAAgC;AAChC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AA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sDAAO;AACzB;AACA;AACA;AACA,oBAAoB,sDAAO;AAC3B;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACVkC;AACS;AAC3C;AACA,UAAU,2DAAW;AACrB,qBAAqB,sDAAO;AAC5B;;;;;;;;;;;;;;;;ACLA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH;;;;;;;UCRA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;WACA;WACA;WACA;;;;;;;;;;;;;;;ACJ6B","sources":["webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-blocks.js","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-jsx-names.js","webpack://advanced-custom-fields-pro/./node_modules/charenc/charenc.js","webpack://advanced-custom-fields-pro/./node_modules/crypt/crypt.js","webpack://advanced-custom-fields-pro/./node_modules/is-buffer/index.js","webpack://advanced-custom-fields-pro/./node_modules/md5/md5.js","webpack://advanced-custom-fields-pro/./node_modules/react/cjs/react-jsx-runtime.development.js","webpack://advanced-custom-fields-pro/./node_modules/react/cjs/react.development.js","webpack://advanced-custom-fields-pro/./node_modules/react/index.js","webpack://advanced-custom-fields-pro/./node_modules/react/jsx-runtime.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://advanced-custom-fields-pro/webpack/bootstrap","webpack://advanced-custom-fields-pro/webpack/runtime/compat get default export","webpack://advanced-custom-fields-pro/webpack/runtime/define property getters","webpack://advanced-custom-fields-pro/webpack/runtime/hasOwnProperty shorthand","webpack://advanced-custom-fields-pro/webpack/runtime/make namespace object","webpack://advanced-custom-fields-pro/webpack/runtime/node module decorator","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/pro/acf-pro-blocks.js"],"sourcesContent":["const md5 = require( 'md5' );\n\n( ( $, undefined ) => {\n\t// Dependencies.\n\tconst {\n\t\tBlockControls,\n\t\tInspectorControls,\n\t\tInnerBlocks,\n\t\tuseBlockProps,\n\t\tAlignmentToolbar,\n\t\tBlockVerticalAlignmentToolbar,\n\t} = wp.blockEditor;\n\n\tconst { ToolbarGroup, ToolbarButton, Placeholder, Spinner } = wp.components;\n\tconst { Fragment } = wp.element;\n\tconst { Component } = React;\n\tconst { useSelect } = wp.data;\n\tconst { createHigherOrderComponent } = wp.compose;\n\n\t// Potentially experimental dependencies.\n\tconst BlockAlignmentMatrixToolbar =\n\t\twp.blockEditor.__experimentalBlockAlignmentMatrixToolbar || wp.blockEditor.BlockAlignmentMatrixToolbar;\n\t// Gutenberg v10.x begins transition from Toolbar components to Control components.\n\tconst BlockAlignmentMatrixControl =\n\t\twp.blockEditor.__experimentalBlockAlignmentMatrixControl || wp.blockEditor.BlockAlignmentMatrixControl;\n\tconst BlockFullHeightAlignmentControl =\n\t\twp.blockEditor.__experimentalBlockFullHeightAligmentControl ||\n\t\twp.blockEditor.__experimentalBlockFullHeightAlignmentControl ||\n\t\twp.blockEditor.BlockFullHeightAlignmentControl;\n\tconst useInnerBlocksProps = wp.blockEditor.__experimentalUseInnerBlocksProps || wp.blockEditor.useInnerBlocksProps;\n\n\t/**\n\t * Storage for registered block types.\n\t *\n\t * @since 5.8.0\n\t * @var object\n\t */\n\tconst blockTypes = {};\n\n\t/**\n\t * Data storage for Block Instances and their DynamicHTML components.\n\t * This is temporarily stored on the ACF object, but this will be replaced in ACF 6.4.\n\t * Developers should not rely on reading or using any aspect of acf.blockInstances.\n\t *\n\t * @since 6.3\n\t */\n\tacf.blockInstances = {};\n\n\t/**\n\t * Returns a block type for the given name.\n\t *\n\t * @date\t20/2/19\n\t * @since\t5.8.0\n\t *\n\t * @param\tstring name The block name.\n\t * @return\t(object|false)\n\t */\n\tfunction getBlockType( name ) {\n\t\treturn blockTypes[ name ] || false;\n\t}\n\n\t/**\n\t * Returns a block version for a given block name\n\t *\n\t * @date 8/6/22\n\t * @since 6.0\n\t *\n\t * @param string name The block name\n\t * @return int\n\t */\n\tfunction getBlockVersion( name ) {\n\t\tconst blockType = getBlockType( name );\n\t\treturn blockType.acf_block_version || 1;\n\t}\n\n\t/**\n\t * Returns a block's validate property. Default true.\n\t *\n\t * @since 6.3\n\t *\n\t * @param string name The block name\n\t * @return boolean\n\t */\n\tfunction blockSupportsValidation( name ) {\n\t\tconst blockType = getBlockType( name );\n\t\treturn blockType.validate;\n\t}\n\n\t/**\n\t * Returns true if a block (identified by client ID) is nested in a query loop block.\n\t *\n\t * @date 17/1/22\n\t * @since 5.12\n\t *\n\t * @param {string} clientId A block client ID\n\t * @return boolean\n\t */\n\tfunction isBlockInQueryLoop( clientId ) {\n\t\tconst parents = wp.data.select( 'core/block-editor' ).getBlockParents( clientId );\n\t\tconst parentsData = wp.data.select( 'core/block-editor' ).getBlocksByClientId( parents );\n\t\treturn parentsData.filter( ( block ) => block.name === 'core/query' ).length;\n\t}\n\n\t/**\n\t * Returns true if we're currently inside the WP 5.9+ site editor.\n\t *\n\t * @date 08/02/22\n\t * @since 5.12\n\t *\n\t * @return boolean\n\t */\n\tfunction isSiteEditor() {\n\t\treturn typeof pagenow === 'string' && pagenow === 'site-editor';\n\t}\n\n\t/**\n\t * Returns true if the block editor is currently showing the desktop device type preview.\n\t *\n\t * This function will always return true in the site editor as it uses the\n\t * edit-post store rather than the edit-site store.\n\t *\n\t * @date 15/02/22\n\t * @since 5.12\n\t *\n\t * @return boolean\n\t */\n\tfunction isDesktopPreviewDeviceType() {\n\t\tconst editPostStore = select( 'core/edit-post' );\n\n\t\t// Return true if the edit post store isn't available (such as in the widget editor)\n\t\tif ( ! editPostStore ) return true;\n\n\t\t// Check if function exists (experimental or not) and return true if it's Desktop, or doesn't exist.\n\t\tif ( editPostStore.__experimentalGetPreviewDeviceType ) {\n\t\t\treturn 'Desktop' === editPostStore.__experimentalGetPreviewDeviceType();\n\t\t} else if ( editPostStore.getPreviewDeviceType ) {\n\t\t\treturn 'Desktop' === editPostStore.getPreviewDeviceType();\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t/**\n\t * Returns true if the block editor is currently in template edit mode.\n\t *\n\t * @date 16/02/22\n\t * @since 5.12\n\t *\n\t * @return boolean\n\t */\n\tfunction isEditingTemplate() {\n\t\tconst editPostStore = select( 'core/edit-post' );\n\n\t\t// Return false if the edit post store isn't available (such as in the widget editor)\n\t\tif ( ! editPostStore ) return false;\n\n\t\t// Return false if the function doesn't exist\n\t\tif ( ! editPostStore.isEditingTemplate ) return false;\n\n\t\treturn editPostStore.isEditingTemplate();\n\t}\n\n\t/**\n\t * Returns true if we're currently inside an iFramed non-desktop device preview type (WP5.9+)\n\t *\n\t * @date 15/02/22\n\t * @since 5.12\n\t *\n\t * @return boolean\n\t */\n\tfunction isiFramedMobileDevicePreview() {\n\t\treturn $( 'iframe[name=editor-canvas]' ).length && ! isDesktopPreviewDeviceType();\n\t}\n\n\t/**\n\t * Registers a block type.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.8.0\n\t *\n\t * @param\tobject blockType The block type settings localized from PHP.\n\t * @return\tobject The result from wp.blocks.registerBlockType().\n\t */\n\tfunction registerBlockType( blockType ) {\n\t\t// Bail early if is excluded post_type.\n\t\tconst allowedTypes = blockType.post_types || [];\n\t\tif ( allowedTypes.length ) {\n\t\t\t// Always allow block to appear on \"Edit reusable Block\" screen.\n\t\t\tallowedTypes.push( 'wp_block' );\n\n\t\t\t// Check post type.\n\t\t\tconst postType = acf.get( 'postType' );\n\t\t\tif ( ! allowedTypes.includes( postType ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Handle svg HTML.\n\t\tif ( typeof blockType.icon === 'string' && blockType.icon.substr( 0, 4 ) === '{ iconHTML }
;\n\t\t}\n\n\t\t// Remove icon if empty to allow for default \"block\".\n\t\t// Avoids JS error preventing block from being registered.\n\t\tif ( ! blockType.icon ) {\n\t\t\tdelete blockType.icon;\n\t\t}\n\n\t\t// Check category exists and fallback to \"common\".\n\t\tconst category = wp.blocks\n\t\t\t.getCategories()\n\t\t\t.filter( ( { slug } ) => slug === blockType.category )\n\t\t\t.pop();\n\t\tif ( ! category ) {\n\t\t\t//console.warn( `The block \"${blockType.name}\" is registered with an unknown category \"${blockType.category}\".` );\n\t\t\tblockType.category = 'common';\n\t\t}\n\n\t\t// Merge in block settings before local additions.\n\t\tblockType = acf.parseArgs( blockType, {\n\t\t\ttitle: '',\n\t\t\tname: '',\n\t\t\tcategory: '',\n\t\t\tapi_version: 2,\n\t\t\tacf_block_version: 1,\n\t\t} );\n\n\t\t// Remove all empty attribute defaults from PHP values to allow serialisation.\n\t\t// https://github.com/WordPress/gutenberg/issues/7342\n\t\tfor ( const key in blockType.attributes ) {\n\t\t\tif ( 'default' in blockType.attributes[ key ] && blockType.attributes[ key ].default.length === 0 ) {\n\t\t\t\tdelete blockType.attributes[ key ].default;\n\t\t\t}\n\t\t}\n\n\t\t// Apply anchor supports to avoid block editor default writing to ID.\n\t\tif ( blockType.supports.anchor ) {\n\t\t\tblockType.attributes.anchor = {\n\t\t\t\ttype: 'string',\n\t\t\t};\n\t\t}\n\n\t\t// Append edit and save functions.\n\t\tlet ThisBlockEdit = BlockEdit;\n\t\tlet ThisBlockSave = BlockSave;\n\n\t\t// Apply alignText functionality.\n\t\tif ( blockType.supports.alignText || blockType.supports.align_text ) {\n\t\t\tblockType.attributes = addBackCompatAttribute( blockType.attributes, 'align_text', 'string' );\n\t\t\tThisBlockEdit = withAlignTextComponent( ThisBlockEdit, blockType );\n\t\t}\n\n\t\t// Apply alignContent functionality.\n\t\tif ( blockType.supports.alignContent || blockType.supports.align_content ) {\n\t\t\tblockType.attributes = addBackCompatAttribute( blockType.attributes, 'align_content', 'string' );\n\t\t\tThisBlockEdit = withAlignContentComponent( ThisBlockEdit, blockType );\n\t\t}\n\n\t\t// Apply fullHeight functionality.\n\t\tif ( blockType.supports.fullHeight || blockType.supports.full_height ) {\n\t\t\tblockType.attributes = addBackCompatAttribute( blockType.attributes, 'full_height', 'boolean' );\n\t\t\tThisBlockEdit = withFullHeightComponent( ThisBlockEdit, blockType.blockType );\n\t\t}\n\n\t\t// Set edit and save functions.\n\t\tblockType.edit = ( props ) => {\n\t\t\t// Ensure we remove our save lock if a block is removed.\n\t\t\twp.element.useEffect( () => {\n\t\t\t\treturn () => {\n\t\t\t\t\tif ( ! wp.data.dispatch( 'core/editor' ) ) return;\n\t\t\t\t\twp.data.dispatch( 'core/editor' ).unlockPostSaving( 'acf/block/' + props.clientId );\n\t\t\t\t};\n\t\t\t}, [] );\n\n\t\t\treturn ;\n\t\t};\n\t\tblockType.save = () => ;\n\n\t\t// Add to storage.\n\t\tblockTypes[ blockType.name ] = blockType;\n\n\t\t// Register with WP.\n\t\tconst result = wp.blocks.registerBlockType( blockType.name, blockType );\n\n\t\t// Fix bug in 'core/anchor/attribute' filter overwriting attribute.\n\t\t// Required for < WP5.9\n\t\t// See https://github.com/WordPress/gutenberg/issues/15240\n\t\tif ( result.attributes.anchor ) {\n\t\t\tresult.attributes.anchor = {\n\t\t\t\ttype: 'string',\n\t\t\t};\n\t\t}\n\n\t\t// Return result.\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns the wp.data.select() response with backwards compatibility.\n\t *\n\t * @date\t17/06/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring selector The selector name.\n\t * @return\tmixed\n\t */\n\tfunction select( selector ) {\n\t\tif ( selector === 'core/block-editor' ) {\n\t\t\treturn wp.data.select( 'core/block-editor' ) || wp.data.select( 'core/editor' );\n\t\t}\n\t\treturn wp.data.select( selector );\n\t}\n\n\t/**\n\t * Returns the wp.data.dispatch() response with backwards compatibility.\n\t *\n\t * @date\t17/06/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring selector The selector name.\n\t * @return\tmixed\n\t */\n\tfunction dispatch( selector ) {\n\t\treturn wp.data.dispatch( selector );\n\t}\n\n\t/**\n\t * Returns an array of all blocks for the given args.\n\t *\n\t * @date\t27/2/19\n\t * @since\t5.7.13\n\t *\n\t * @param\t{object} args An object of key=>value pairs used to filter results.\n\t * @return\tarray.\n\t */\n\tfunction getBlocks( args ) {\n\t\tlet blocks = [];\n\n\t\t// Local function to recurse through all child blocks and add to the blocks array.\n\t\tconst recurseBlocks = ( block ) => {\n\t\t\tblocks.push( block );\n\t\t\tselect( 'core/block-editor' ).getBlocks( block.clientId ).forEach( recurseBlocks );\n\t\t};\n\n\t\t// Trigger initial recursion for parent level blocks.\n\t\tselect( 'core/block-editor' ).getBlocks().forEach( recurseBlocks );\n\n\t\t// Loop over args and filter.\n\t\tfor ( const k in args ) {\n\t\t\tblocks = blocks.filter( ( { attributes } ) => attributes[ k ] === args[ k ] );\n\t\t}\n\n\t\t// Return results.\n\t\treturn blocks;\n\t}\n\n\t/**\n\t * Storage for the AJAX queue.\n\t *\n\t * @const {array}\n\t */\n\tconst ajaxQueue = {};\n\n\t/**\n\t * Storage for cached AJAX requests for block content.\n\t *\n\t * @since 5.12\n\t * @const {array}\n\t */\n\tconst fetchCache = {};\n\n\t/**\n\t * Fetches a JSON result from the AJAX API.\n\t *\n\t * @date\t28/2/19\n\t * @since\t5.7.13\n\t *\n\t * @param\tobject block The block props.\n\t * @query\tobject The query args used in AJAX callback.\n\t * @return\tobject The AJAX promise.\n\t */\n\tfunction fetchBlock( args ) {\n\t\tconst { attributes = {}, context = {}, query = {}, clientId = null, delay = 0 } = args;\n\n\t\t// Build a unique queue ID from block data, including the clientId for edit forms.\n\t\tconst queueId = md5( JSON.stringify( { ...attributes, ...context, ...query } ) );\n\n\t\tconst data = ajaxQueue[ queueId ] || {\n\t\t\tquery: {},\n\t\t\ttimeout: false,\n\t\t\tpromise: $.Deferred(),\n\t\t\tstarted: false,\n\t\t};\n\n\t\t// Append query args to storage.\n\t\tdata.query = { ...data.query, ...query };\n\n\t\tif ( data.started ) return data.promise;\n\n\t\t// Set fresh timeout.\n\t\tclearTimeout( data.timeout );\n\t\tdata.timeout = setTimeout( () => {\n\t\t\tdata.started = true;\n\t\t\tif ( fetchCache[ queueId ] ) {\n\t\t\t\tajaxQueue[ queueId ] = null;\n\t\t\t\tdata.promise.resolve.apply( fetchCache[ queueId ][ 0 ], fetchCache[ queueId ][ 1 ] );\n\t\t\t} else {\n\t\t\t\t$.ajax( {\n\t\t\t\t\turl: acf.get( 'ajaxurl' ),\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\ttype: 'post',\n\t\t\t\t\tcache: false,\n\t\t\t\t\tdata: acf.prepareForAjax( {\n\t\t\t\t\t\taction: 'acf/ajax/fetch-block',\n\t\t\t\t\t\tblock: JSON.stringify( attributes ),\n\t\t\t\t\t\tclientId: clientId,\n\t\t\t\t\t\tcontext: JSON.stringify( context ),\n\t\t\t\t\t\tquery: data.query,\n\t\t\t\t\t} ),\n\t\t\t\t} )\n\t\t\t\t\t.always( () => {\n\t\t\t\t\t\t// Clean up queue after AJAX request is complete.\n\t\t\t\t\t\tajaxQueue[ queueId ] = null;\n\t\t\t\t\t} )\n\t\t\t\t\t.done( function () {\n\t\t\t\t\t\tfetchCache[ queueId ] = [ this, arguments ];\n\t\t\t\t\t\tdata.promise.resolve.apply( this, arguments );\n\t\t\t\t\t} )\n\t\t\t\t\t.fail( function () {\n\t\t\t\t\t\tdata.promise.reject.apply( this, arguments );\n\t\t\t\t\t} );\n\t\t\t}\n\t\t}, delay );\n\n\t\t// Update storage.\n\t\tajaxQueue[ queueId ] = data;\n\n\t\t// Return promise.\n\t\treturn data.promise;\n\t}\n\n\t/**\n\t * Returns true if both object are the same.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tobject obj1\n\t * @param\tobject obj2\n\t * @return\tbool\n\t */\n\tfunction compareObjects( obj1, obj2 ) {\n\t\treturn JSON.stringify( obj1 ) === JSON.stringify( obj2 );\n\t}\n\n\t/**\n\t * Converts HTML into a React element.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring html The HTML to convert.\n\t * @param\tint acfBlockVersion The ACF block version number.\n\t * @return\tobject Result of React.createElement().\n\t */\n\tacf.parseJSX = ( html, acfBlockVersion ) => {\n\t\t// Apply a temporary wrapper for the jQuery parse to prevent text nodes triggering errors.\n\t\thtml = '
' + html + '
';\n\t\t// Correctly balance InnerBlocks tags for jQuery's initial parse.\n\t\thtml = html.replace( /]+)?\\/>/, '' );\n\t\treturn parseNode( $( html )[ 0 ], acfBlockVersion, 0 ).props.children;\n\t};\n\n\t/**\n\t * Converts a DOM node into a React element.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tDOM node The DOM node.\n\t * @param\tint acfBlockVersion The ACF block version number.\n\t * @param\tint level The recursion level.\n\t * @return\tobject Result of React.createElement().\n\t */\n\tfunction parseNode( node, acfBlockVersion, level = 0 ) {\n\t\t// Get node name.\n\t\tconst nodeName = parseNodeName( node.nodeName.toLowerCase(), acfBlockVersion );\n\t\tif ( ! nodeName ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Get node attributes in React friendly format.\n\t\tconst nodeAttrs = {};\n\n\t\tif ( level === 1 && nodeName !== 'ACFInnerBlocks' ) {\n\t\t\t// Top level (after stripping away the container div), create a ref for passing through to ACF's JS API.\n\t\t\tnodeAttrs.ref = React.createRef();\n\t\t}\n\n\t\tacf.arrayArgs( node.attributes )\n\t\t\t.map( parseNodeAttr )\n\t\t\t.forEach( ( { name, value } ) => {\n\t\t\t\tnodeAttrs[ name ] = value;\n\t\t\t} );\n\n\t\tif ( 'ACFInnerBlocks' === nodeName ) {\n\t\t\treturn ;\n\t\t}\n\n\t\t// Define args for React.createElement().\n\t\tconst args = [ nodeName, nodeAttrs ];\n\t\tacf.arrayArgs( node.childNodes ).forEach( ( child ) => {\n\t\t\tif ( child instanceof Text ) {\n\t\t\t\tconst text = child.textContent;\n\t\t\t\tif ( text ) {\n\t\t\t\t\targs.push( text );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\targs.push( parseNode( child, acfBlockVersion, level + 1 ) );\n\t\t\t}\n\t\t} );\n\n\t\t// Return element.\n\t\treturn React.createElement.apply( this, args );\n\t}\n\n\t/**\n\t * Converts a node or attribute name into it's JSX compliant name\n\t *\n\t * @date 05/07/2021\n\t * @since 5.9.8\n\t *\n\t * @param string name The node or attribute name.\n\t * @return string\n\t */\n\tfunction getJSXName( name ) {\n\t\tconst replacement = acf.isget( acf, 'jsxNameReplacements', name );\n\t\tif ( replacement ) return replacement;\n\t\treturn name;\n\t}\n\n\t/**\n\t * Converts the given name into a React friendly name or component.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring name The node name in lowercase.\n\t * @param\tint acfBlockVersion The ACF block version number.\n\t * @return\tmixed\n\t */\n\tfunction parseNodeName( name, acfBlockVersion ) {\n\t\tswitch ( name ) {\n\t\t\tcase 'innerblocks':\n\t\t\t\tif ( acfBlockVersion < 2 ) {\n\t\t\t\t\treturn InnerBlocks;\n\t\t\t\t}\n\t\t\t\treturn 'ACFInnerBlocks';\n\t\t\tcase 'script':\n\t\t\t\treturn Script;\n\t\t\tcase '#comment':\n\t\t\t\treturn null;\n\t\t\tdefault:\n\t\t\t\t// Replace names for JSX counterparts.\n\t\t\t\tname = getJSXName( name );\n\t\t}\n\t\treturn name;\n\t}\n\n\t/**\n\t * Functional component for ACFInnerBlocks.\n\t *\n\t * @since 6.0.0\n\t *\n\t * @param obj props element properties.\n\t * @return DOM element\n\t */\n\tfunction ACFInnerBlocks( props ) {\n\t\tconst { className = 'acf-innerblocks-container' } = props;\n\t\tconst innerBlockProps = useInnerBlocksProps( { className: className }, props );\n\n\t\treturn
{ innerBlockProps.children }
;\n\t}\n\n\t/**\n\t * Converts the given attribute into a React friendly name and value object.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tobj nodeAttr The node attribute.\n\t * @return\tobj\n\t */\n\tfunction parseNodeAttr( nodeAttr ) {\n\t\tlet name = nodeAttr.name;\n\t\tlet value = nodeAttr.value;\n\n\t\t// Allow overrides for third party libraries who might use specific attributes.\n\t\tlet shortcut = acf.applyFilters( 'acf_blocks_parse_node_attr', false, nodeAttr );\n\n\t\tif ( shortcut ) return shortcut;\n\n\t\tswitch ( name ) {\n\t\t\t// Class.\n\t\t\tcase 'class':\n\t\t\t\tname = 'className';\n\t\t\t\tbreak;\n\n\t\t\t// Style.\n\t\t\tcase 'style':\n\t\t\t\tconst css = {};\n\t\t\t\tvalue.split( ';' ).forEach( ( s ) => {\n\t\t\t\t\tconst pos = s.indexOf( ':' );\n\t\t\t\t\tif ( pos > 0 ) {\n\t\t\t\t\t\tlet ruleName = s.substr( 0, pos ).trim();\n\t\t\t\t\t\tconst ruleValue = s.substr( pos + 1 ).trim();\n\n\t\t\t\t\t\t// Rename core properties, but not CSS variables.\n\t\t\t\t\t\tif ( ruleName.charAt( 0 ) !== '-' ) {\n\t\t\t\t\t\t\truleName = acf.strCamelCase( ruleName );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcss[ ruleName ] = ruleValue;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\tvalue = css;\n\t\t\t\tbreak;\n\n\t\t\t// Default.\n\t\t\tdefault:\n\t\t\t\t// No formatting needed for \"data-x\" attributes.\n\t\t\t\tif ( name.indexOf( 'data-' ) === 0 ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Replace names for JSX counterparts.\n\t\t\t\tname = getJSXName( name );\n\n\t\t\t\t// Convert JSON values.\n\t\t\t\tconst c1 = value.charAt( 0 );\n\t\t\t\tif ( c1 === '[' || c1 === '{' ) {\n\t\t\t\t\tvalue = JSON.parse( value );\n\t\t\t\t}\n\n\t\t\t\t// Convert bool values.\n\t\t\t\tif ( value === 'true' || value === 'false' ) {\n\t\t\t\t\tvalue = value === 'true';\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn {\n\t\t\tname,\n\t\t\tvalue,\n\t\t};\n\t}\n\n\t/**\n\t * Higher Order Component used to set default block attribute values.\n\t *\n\t * By modifying block attributes directly, instead of defining defaults in registerBlockType(),\n\t * WordPress will include them always within the saved block serialized JSON.\n\t *\n\t * @date\t31/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tComponent BlockListBlock The BlockListBlock Component.\n\t * @return\tComponent\n\t */\n\tconst withDefaultAttributes = createHigherOrderComponent(\n\t\t( BlockListBlock ) =>\n\t\t\tclass WrappedBlockEdit extends Component {\n\t\t\t\tconstructor( props ) {\n\t\t\t\t\tsuper( props );\n\n\t\t\t\t\t// Extract vars.\n\t\t\t\t\tconst { name, attributes } = this.props;\n\n\t\t\t\t\t// Only run on ACF Blocks.\n\t\t\t\t\tconst blockType = getBlockType( name );\n\t\t\t\t\tif ( ! blockType ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check and remove any empty string attributes to match PHP behaviour.\n\t\t\t\t\tObject.keys( attributes ).forEach( ( key ) => {\n\t\t\t\t\t\tif ( attributes[ key ] === '' ) {\n\t\t\t\t\t\t\tdelete attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Backward compatibility attribute replacement.\n\t\t\t\t\tconst upgrades = {\n\t\t\t\t\t\tfull_height: 'fullHeight',\n\t\t\t\t\t\talign_content: 'alignContent',\n\t\t\t\t\t\talign_text: 'alignText',\n\t\t\t\t\t};\n\n\t\t\t\t\tObject.keys( upgrades ).forEach( ( key ) => {\n\t\t\t\t\t\tif ( attributes[ key ] !== undefined ) {\n\t\t\t\t\t\t\tattributes[ upgrades[ key ] ] = attributes[ key ];\n\t\t\t\t\t\t} else if ( attributes[ upgrades[ key ] ] === undefined ) {\n\t\t\t\t\t\t\t//Check for a default\n\t\t\t\t\t\t\tif ( blockType[ key ] !== undefined ) {\n\t\t\t\t\t\t\t\tattributes[ upgrades[ key ] ] = blockType[ key ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdelete blockType[ key ];\n\t\t\t\t\t\tdelete attributes[ key ];\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Set default attributes for those undefined.\n\t\t\t\t\tfor ( let attribute in blockType.attributes ) {\n\t\t\t\t\t\tif ( attributes[ attribute ] === undefined && blockType[ attribute ] !== undefined ) {\n\t\t\t\t\t\t\tattributes[ attribute ] = blockType[ attribute ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trender() {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t},\n\t\t'withDefaultAttributes'\n\t);\n\twp.hooks.addFilter( 'editor.BlockListBlock', 'acf/with-default-attributes', withDefaultAttributes );\n\n\t/**\n\t * The BlockSave functional component.\n\t *\n\t * @date\t08/07/2020\n\t * @since\t5.9.0\n\t */\n\tfunction BlockSave() {\n\t\treturn ;\n\t}\n\n\t/**\n\t * The BlockEdit component.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t */\n\tclass BlockEdit extends Component {\n\t\tconstructor( props ) {\n\t\t\tsuper( props );\n\t\t\tthis.setup();\n\t\t}\n\n\t\tsetup() {\n\t\t\tconst { name, attributes, clientId } = this.props;\n\t\t\tconst blockType = getBlockType( name );\n\n\t\t\t// Restrict current mode.\n\t\t\tfunction restrictMode( modes ) {\n\t\t\t\tif ( ! modes.includes( attributes.mode ) ) {\n\t\t\t\t\tattributes.mode = modes[ 0 ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tisBlockInQueryLoop( clientId ) ||\n\t\t\t\tisSiteEditor() ||\n\t\t\t\tisiFramedMobileDevicePreview() ||\n\t\t\t\tisEditingTemplate()\n\t\t\t) {\n\t\t\t\trestrictMode( [ 'preview' ] );\n\t\t\t} else {\n\t\t\t\tswitch ( blockType.mode ) {\n\t\t\t\t\tcase 'edit':\n\t\t\t\t\t\trestrictMode( [ 'edit', 'preview' ] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'preview':\n\t\t\t\t\t\trestrictMode( [ 'preview', 'edit' ] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\trestrictMode( [ 'auto' ] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\trender() {\n\t\t\tconst { name, attributes, setAttributes, clientId } = this.props;\n\t\t\tconst blockType = getBlockType( name );\n\t\t\tconst forcePreview =\n\t\t\t\tisBlockInQueryLoop( clientId ) ||\n\t\t\t\tisSiteEditor() ||\n\t\t\t\tisiFramedMobileDevicePreview() ||\n\t\t\t\tisEditingTemplate();\n\t\t\tlet { mode } = attributes;\n\n\t\t\tif ( forcePreview ) {\n\t\t\t\tmode = 'preview';\n\t\t\t}\n\n\t\t\t// Show toggle only for edit/preview modes and for blocks not in a query loop/FSE.\n\t\t\tlet showToggle = blockType.supports.mode;\n\t\t\tif ( mode === 'auto' || forcePreview ) {\n\t\t\t\tshowToggle = false;\n\t\t\t}\n\n\t\t\t// Configure toggle variables.\n\t\t\tconst toggleText = mode === 'preview' ? acf.__( 'Switch to Edit' ) : acf.__( 'Switch to Preview' );\n\t\t\tconst toggleIcon = mode === 'preview' ? 'edit' : 'welcome-view-site';\n\t\t\tfunction toggleMode() {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tmode: mode === 'preview' ? 'edit' : 'preview',\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Return template.\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ showToggle && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) }\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\t{ mode === 'preview' && (\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t) }\n\t\t\t\t\t
\n\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * The BlockBody functional component.\n\t *\n\t * @since\t5.7.12\n\t */\n\tfunction BlockBody( props ) {\n\t\tconst { attributes, isSelected, name, clientId } = props;\n\t\tconst { mode } = attributes;\n\n\t\tconst index = useSelect( ( select ) => {\n\t\t\tconst rootClientId = select( 'core/block-editor' ).getBlockRootClientId( clientId );\n\t\t\treturn select( 'core/block-editor' ).getBlockIndex( clientId, rootClientId );\n\t\t} );\n\n\t\tlet showForm = true;\n\t\tlet additionalClasses = 'acf-block-component acf-block-body';\n\n\t\tif ( ( mode === 'auto' && ! isSelected ) || mode === 'preview' ) {\n\t\t\tadditionalClasses += ' acf-block-preview';\n\t\t\tshowForm = false;\n\t\t}\n\n\t\t// Setup block cache if required, and update mode.\n\t\tif ( ! ( clientId in acf.blockInstances ) ) {\n\t\t\tacf.blockInstances[ clientId ] = {\n\t\t\t\tvalidation_errors: false,\n\t\t\t\tmode: mode,\n\t\t\t};\n\t\t}\n\t\tacf.blockInstances[ clientId ].mode = mode;\n\n\t\tif ( ! isSelected ) {\n\t\t\tif ( blockSupportsValidation( name ) && acf.blockInstances[ clientId ].validation_errors ) {\n\t\t\t\tadditionalClasses += ' acf-block-has-validation-error';\n\t\t\t}\n\t\t\tacf.blockInstances[ clientId ].has_been_deselected = true;\n\t\t}\n\n\t\tif ( getBlockVersion( name ) > 1 ) {\n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t{ showForm ? (\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t) }\n\t\t\t\t
\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t{ showForm ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) }\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * A react component to append HTMl.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tstring children The html to insert.\n\t * @return\tvoid\n\t */\n\tclass Div extends Component {\n\t\trender() {\n\t\t\treturn
;\n\t\t}\n\t}\n\n\t/**\n\t * A react Component for inline scripts.\n\t *\n\t * This Component uses a combination of React references and jQuery to append the\n\t * inline ` );\n\t\t}\n\t\tcomponentDidUpdate() {\n\t\t\tthis.setHTML( this.props.children );\n\t\t}\n\t\tcomponentDidMount() {\n\t\t\tthis.setHTML( this.props.children );\n\t\t}\n\t}\n\n\t/**\n\t * DynamicHTML Class.\n\t *\n\t * A react componenet to load and insert dynamic HTML.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tvoid\n\t * @return\tvoid\n\t */\n\tclass DynamicHTML extends Component {\n\t\tconstructor( props ) {\n\t\t\tsuper( props );\n\n\t\t\t// Bind callbacks.\n\t\t\tthis.setRef = this.setRef.bind( this );\n\n\t\t\t// Define default props and call setup().\n\t\t\tthis.id = '';\n\t\t\tthis.el = false;\n\t\t\tthis.subscribed = true;\n\t\t\tthis.renderMethod = 'jQuery';\n\t\t\tthis.passedValidation = false;\n\t\t\tthis.setup( props );\n\n\t\t\t// Load state.\n\t\t\tthis.loadState();\n\t\t}\n\n\t\tsetup( props ) {\n\t\t\tconst constructor = this.constructor.name;\n\t\t\tconst clientId = props.clientId;\n\t\t\tif ( ! ( clientId in acf.blockInstances ) ) {\n\t\t\t\tacf.blockInstances[ clientId ] = {\n\t\t\t\t\tvalidation_errors: false,\n\t\t\t\t\tmode: props.mode,\n\t\t\t\t};\n\t\t\t}\n\t\t\tif ( ! ( constructor in acf.blockInstances[ clientId ] ) ) {\n\t\t\t\tacf.blockInstances[ clientId ][ constructor ] = {};\n\t\t\t}\n\t\t}\n\n\t\tfetch() {\n\t\t\t// Do nothing.\n\t\t}\n\n\t\tmaybePreload( blockId, clientId, form ) {\n\t\t\tacf.debug( 'Preload check', blockId, clientId, form );\n\t\t\tif ( ! isBlockInQueryLoop( this.props.clientId ) ) {\n\t\t\t\tconst preloadedBlocks = acf.get( 'preloadedBlocks' );\n\t\t\t\tconst modeText = form ? 'form' : 'preview';\n\n\t\t\t\tif ( preloadedBlocks && preloadedBlocks[ blockId ] ) {\n\t\t\t\t\t// Ensure we only preload the correct block state (form or preview).\n\t\t\t\t\tif (\n\t\t\t\t\t\t( form && ! preloadedBlocks[ blockId ].form ) ||\n\t\t\t\t\t\t( ! form && preloadedBlocks[ blockId ].form )\n\t\t\t\t\t) {\n\t\t\t\t\t\tacf.debug( 'Preload failed: state not preloaded.' );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set HTML to the preloaded version.\n\t\t\t\t\tpreloadedBlocks[ blockId ].html = preloadedBlocks[ blockId ].html.replaceAll( blockId, clientId );\n\n\t\t\t\t\t// Replace blockId in errors.\n\t\t\t\t\tif ( preloadedBlocks[ blockId ].validation && preloadedBlocks[ blockId ].validation.errors ) {\n\t\t\t\t\t\tpreloadedBlocks[ blockId ].validation.errors = preloadedBlocks[ blockId ].validation.errors.map(\n\t\t\t\t\t\t\t( error ) => {\n\t\t\t\t\t\t\t\terror.input = error.input.replaceAll( blockId, clientId );\n\t\t\t\t\t\t\t\treturn error;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Return preloaded object.\n\t\t\t\t\tacf.debug( 'Preload successful', preloadedBlocks[ blockId ] );\n\t\t\t\t\treturn preloadedBlocks[ blockId ];\n\t\t\t\t}\n\t\t\t}\n\t\t\tacf.debug( 'Preload failed: not preloaded.' );\n\t\t\treturn false;\n\t\t}\n\n\t\tloadState() {\n\t\t\tconst client = acf.blockInstances[ this.props.clientId ] || {};\n\t\t\tthis.state = client[ this.constructor.name ] || {};\n\t\t}\n\n\t\tsetState( state ) {\n\t\t\tacf.blockInstances[ this.props.clientId ][ this.constructor.name ] = {\n\t\t\t\t...this.state,\n\t\t\t\t...state,\n\t\t\t};\n\n\t\t\t// Update component state if subscribed.\n\t\t\t// - Allows AJAX callback to update store without modifying state of an unmounted component.\n\t\t\tif ( this.subscribed ) {\n\t\t\t\tsuper.setState( state );\n\t\t\t}\n\n\t\t\tacf.debug(\n\t\t\t\t'SetState',\n\t\t\t\tObject.assign( {}, this ),\n\t\t\t\tthis.props.clientId,\n\t\t\t\tthis.constructor.name,\n\t\t\t\tObject.assign( {}, acf.blockInstances[ this.props.clientId ][ this.constructor.name ] )\n\t\t\t);\n\t\t}\n\n\t\tsetHtml( html ) {\n\t\t\thtml = html ? html.trim() : '';\n\n\t\t\t// Bail early if html has not changed.\n\t\t\tif ( html === this.state.html ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Update state.\n\t\t\tconst state = {\n\t\t\t\thtml,\n\t\t\t};\n\n\t\t\tif ( this.renderMethod === 'jsx' ) {\n\t\t\t\tstate.jsx = acf.parseJSX( html, getBlockVersion( this.props.name ) );\n\n\t\t\t\t// Handle templates which don't contain any valid JSX parsable elements.\n\t\t\t\tif ( ! state.jsx ) {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t'Your ACF block template contains no valid HTML elements. Appending a empty div to prevent React JS errors.'\n\t\t\t\t\t);\n\t\t\t\t\tstate.html += '
';\n\t\t\t\t\tstate.jsx = acf.parseJSX( state.html, getBlockVersion( this.props.name ) );\n\t\t\t\t}\n\n\t\t\t\t// If we've got an object (as an array) find the first valid React ref.\n\t\t\t\tif ( Array.isArray( state.jsx ) ) {\n\t\t\t\t\tlet refElement = state.jsx.find( ( element ) => React.isValidElement( element ) );\n\t\t\t\t\tstate.ref = refElement.ref;\n\t\t\t\t} else {\n\t\t\t\t\tstate.ref = state.jsx.ref;\n\t\t\t\t}\n\t\t\t\tstate.$el = $( this.el );\n\t\t\t} else {\n\t\t\t\tstate.$el = $( html );\n\t\t\t}\n\t\t\tthis.setState( state );\n\t\t}\n\n\t\tsetRef( el ) {\n\t\t\tthis.el = el;\n\t\t}\n\n\t\trender() {\n\t\t\t// Render JSX.\n\t\t\tif ( this.state.jsx ) {\n\t\t\t\t// If we're a v2+ block, use the jsx element itself as our ref.\n\t\t\t\tif ( getBlockVersion( this.props.name ) > 1 ) {\n\t\t\t\t\tthis.setRef( this.state.jsx );\n\t\t\t\t\treturn this.state.jsx;\n\t\t\t\t} else {\n\t\t\t\t\treturn
{ this.state.jsx }
;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Return HTML.\n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\tshouldComponentUpdate( { index }, { html } ) {\n\t\t\tif ( index !== this.props.index ) {\n\t\t\t\tthis.componentWillMove();\n\t\t\t}\n\t\t\treturn html !== this.state.html;\n\t\t}\n\n\t\tdisplay( context ) {\n\t\t\t// This method is called after setting new HTML and the Component render.\n\t\t\t// The jQuery render method simply needs to move $el into place.\n\t\t\tif ( this.renderMethod === 'jQuery' ) {\n\t\t\t\tconst $el = this.state.$el;\n\t\t\t\tconst $prevParent = $el.parent();\n\t\t\t\tconst $thisParent = $( this.el );\n\n\t\t\t\t// Move $el into place.\n\t\t\t\t$thisParent.html( $el );\n\n\t\t\t\t// Special case for reusable blocks.\n\t\t\t\t// Multiple instances of the same reusable block share the same block id.\n\t\t\t\t// This causes all instances to share the same state (cool), which unfortunately\n\t\t\t\t// pulls $el back and forth between the last rendered reusable block.\n\t\t\t\t// This simple fix leaves a \"clone\" behind :)\n\t\t\t\tif ( $prevParent.length && $prevParent[ 0 ] !== $thisParent[ 0 ] ) {\n\t\t\t\t\t$prevParent.html( $el.clone() );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Lock block if required.\n\t\t\tif ( this.getValidationErrors() && this.isNotNewlyAdded() ) {\n\t\t\t\tthis.lockBlockForSaving();\n\t\t\t} else {\n\t\t\t\tthis.unlockBlockForSaving();\n\t\t\t}\n\n\t\t\t// Call context specific method.\n\t\t\tswitch ( context ) {\n\t\t\t\tcase 'append':\n\t\t\t\t\tthis.componentDidAppend();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'remount':\n\t\t\t\t\tthis.componentDidRemount();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tvalidate() {\n\t\t\t// Do nothing.\n\t\t}\n\n\t\tcomponentDidMount() {\n\t\t\t// Fetch on first load.\n\t\t\tif ( this.state.html === undefined ) {\n\t\t\t\tthis.fetch();\n\n\t\t\t\t// Or remount existing HTML.\n\t\t\t} else {\n\t\t\t\tthis.display( 'remount' );\n\t\t\t}\n\t\t}\n\n\t\tcomponentDidUpdate( prevProps, prevState ) {\n\t\t\t// HTML has changed.\n\t\t\tthis.display( 'append' );\n\t\t}\n\n\t\tcomponentDidAppend() {\n\t\t\tacf.doAction( 'append', this.state.$el );\n\t\t}\n\n\t\tcomponentWillUnmount() {\n\t\t\tacf.doAction( 'unmount', this.state.$el );\n\n\t\t\t// Unsubscribe this component from state.\n\t\t\tthis.subscribed = false;\n\t\t}\n\n\t\tcomponentDidRemount() {\n\t\t\tthis.subscribed = true;\n\n\t\t\t// Use setTimeout to avoid incorrect timing of events.\n\t\t\t// React will unmount and mount components in DOM order.\n\t\t\t// This means a new component can be mounted before an old one is unmounted.\n\t\t\t// ACF shares $el across new/old components which is un-React-like.\n\t\t\t// This timout ensures that unmounting occurs before remounting.\n\t\t\tsetTimeout( () => {\n\t\t\t\tacf.doAction( 'remount', this.state.$el );\n\t\t\t} );\n\t\t}\n\n\t\tcomponentWillMove() {\n\t\t\tacf.doAction( 'unmount', this.state.$el );\n\t\t\tsetTimeout( () => {\n\t\t\t\tacf.doAction( 'remount', this.state.$el );\n\t\t\t} );\n\t\t}\n\n\t\tisNotNewlyAdded() {\n\t\t\treturn acf.blockInstances[ this.props.clientId ].has_been_deselected || false;\n\t\t}\n\n\t\thasShownValidation() {\n\t\t\treturn acf.blockInstances[ this.props.clientId ].shown_validation || false;\n\t\t}\n\n\t\tsetShownValidation() {\n\t\t\tacf.blockInstances[ this.props.clientId ].shown_validation = true;\n\t\t}\n\n\t\tsetValidationErrors( errors ) {\n\t\t\tacf.blockInstances[ this.props.clientId ].validation_errors = errors;\n\t\t}\n\n\t\tgetValidationErrors() {\n\t\t\treturn acf.blockInstances[ this.props.clientId ].validation_errors;\n\t\t}\n\n\t\tgetMode() {\n\t\t\treturn acf.blockInstances[ this.props.clientId ].mode;\n\t\t}\n\n\t\tlockBlockForSaving() {\n\t\t\tif ( ! wp.data.dispatch( 'core/editor' ) ) return;\n\t\t\twp.data.dispatch( 'core/editor' ).lockPostSaving( 'acf/block/' + this.props.clientId );\n\t\t}\n\n\t\tunlockBlockForSaving() {\n\t\t\tif ( ! wp.data.dispatch( 'core/editor' ) ) return;\n\t\t\twp.data.dispatch( 'core/editor' ).unlockPostSaving( 'acf/block/' + this.props.clientId );\n\t\t}\n\n\t\tdisplayValidation( $formEl ) {\n\t\t\tif ( ! blockSupportsValidation( this.props.name ) ) {\n\t\t\t\tacf.debug( 'Block does not support validation' );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( ! $formEl || $formEl.hasClass( 'acf-empty-block-fields' ) ) {\n\t\t\t\tacf.debug( 'There is no edit form available to validate.' );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst errors = this.getValidationErrors();\n\t\t\tacf.debug( 'Starting handle validation', Object.assign( {}, this ), Object.assign( {}, $formEl ), errors );\n\n\t\t\tthis.setShownValidation();\n\n\t\t\tlet validator = acf.getBlockFormValidator( $formEl );\n\t\t\tvalidator.clearErrors();\n\n\t\t\tacf.doAction( 'blocks/validation/pre_apply', errors );\n\t\t\tif ( errors ) {\n\t\t\t\tvalidator.addErrors( errors );\n\t\t\t\tvalidator.showErrors( 'after' );\n\n\t\t\t\tthis.lockBlockForSaving();\n\t\t\t} else {\n\t\t\t\t// remove previous error message\n\t\t\t\tif ( validator.has( 'notice' ) ) {\n\t\t\t\t\tvalidator.get( 'notice' ).update( {\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\ttext: acf.__( 'Validation successful' ),\n\t\t\t\t\t\ttimeout: 1000,\n\t\t\t\t\t} );\n\t\t\t\t\tvalidator.set( 'notice', null );\n\t\t\t\t}\n\n\t\t\t\tthis.unlockBlockForSaving();\n\t\t\t}\n\t\t\tacf.doAction( 'blocks/validation/post_apply', errors );\n\t\t}\n\t}\n\n\t/**\n\t * BlockForm Class.\n\t *\n\t * A react componenet to handle the block form.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tstring id the block id.\n\t * @return\tvoid\n\t */\n\tclass BlockForm extends DynamicHTML {\n\t\tsetup( props ) {\n\t\t\tthis.id = `BlockForm-${ props.clientId }`;\n\t\t\tsuper.setup( props );\n\t\t}\n\n\t\tfetch( validate_only = false, data = false ) {\n\t\t\t// Extract props.\n\t\t\tconst { context, clientId, name } = this.props;\n\t\t\tlet { attributes } = this.props;\n\n\t\t\tlet query = { form: true };\n\t\t\tif ( validate_only ) {\n\t\t\t\tquery = { validate: true };\n\t\t\t\tattributes.data = data;\n\t\t\t}\n\n\t\t\tconst hash = createBlockAttributesHash( attributes, context );\n\n\t\t\tacf.debug( 'BlockForm fetch', attributes, query );\n\n\t\t\t// Try preloaded data first.\n\t\t\tconst preloaded = this.maybePreload( hash, clientId, true );\n\n\t\t\tif ( preloaded ) {\n\t\t\t\tthis.setHtml( acf.applyFilters( 'blocks/form/render', preloaded.html, true ) );\n\t\t\t\tif ( preloaded.validation ) this.setValidationErrors( preloaded.validation.errors );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! blockSupportsValidation( name ) ) {\n\t\t\t\tquery.validate = false;\n\t\t\t}\n\n\t\t\t// Request AJAX and update HTML on complete.\n\t\t\tfetchBlock( {\n\t\t\t\tattributes,\n\t\t\t\tcontext,\n\t\t\t\tclientId,\n\t\t\t\tquery,\n\t\t\t} ).done( ( { data } ) => {\n\t\t\t\tacf.debug( 'fetch block form promise' );\n\n\t\t\t\tif ( ! data ) {\n\t\t\t\t\tthis.setHtml( `
${acf.__( 'Error loading block form' )}
` );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( data.form ) {\n\t\t\t\t\tthis.setHtml(\n\t\t\t\t\t\tacf.applyFilters( 'blocks/form/render', data.form.replaceAll( data.clientId, clientId ), false )\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ( data.validation ) this.setValidationErrors( data.validation.errors );\n\n\t\t\t\tif ( this.isNotNewlyAdded() ) {\n\t\t\t\t\tacf.debug( \"Block has already shown it's invalid. The form needs to show validation errors\" );\n\t\t\t\t\tthis.validate();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tvalidate( loadState = true ) {\n\t\t\tif ( loadState ) {\n\t\t\t\tthis.loadState();\n\t\t\t}\n\n\t\t\tacf.debug( 'BlockForm calling validate with state', Object.assign( {}, this ) );\n\t\t\tsuper.displayValidation( this.state.$el );\n\t\t}\n\n\t\tshouldComponentUpdate( nextProps, nextState ) {\n\t\t\tif (\n\t\t\t\tblockSupportsValidation( this.props.name ) &&\n\t\t\t\tthis.state.$el &&\n\t\t\t\tthis.isNotNewlyAdded() &&\n\t\t\t\t! this.hasShownValidation()\n\t\t\t) {\n\t\t\t\tthis.validate( false ); // Shouldn't update state in shouldComponentUpdate.\n\t\t\t}\n\n\t\t\treturn super.shouldComponentUpdate( nextProps, nextState );\n\t\t}\n\n\t\tcomponentWillUnmount() {\n\t\t\tsuper.componentWillUnmount();\n\n\t\t\t//TODO: either delete this, or clear validations here (if that's a sensible idea)\n\n\t\t\tacf.debug( 'BlockForm Component did unmount' );\n\t\t}\n\n\t\tcomponentDidRemount() {\n\t\t\tsuper.componentDidRemount();\n\n\t\t\tacf.debug( 'BlockForm component did remount' );\n\n\t\t\tconst { $el } = this.state;\n\n\t\t\tif ( blockSupportsValidation( this.props.name ) && this.isNotNewlyAdded() ) {\n\t\t\t\tacf.debug( \"Block has already shown it's invalid. The form needs to show validation errors\" );\n\t\t\t\tthis.validate();\n\t\t\t}\n\n\t\t\t// Make sure our on append events are registered.\n\t\t\tif ( $el.data( 'acf-events-added' ) !== true ) {\n\t\t\t\tthis.componentDidAppend();\n\t\t\t}\n\t\t}\n\n\t\tcomponentDidAppend() {\n\t\t\tsuper.componentDidAppend();\n\n\t\t\tacf.debug( 'BlockForm component did append' );\n\n\t\t\t// Extract props.\n\t\t\tconst { attributes, setAttributes, clientId, name } = this.props;\n\t\t\tconst thisBlockForm = this;\n\t\t\tconst { $el } = this.state;\n\n\t\t\t// Callback for updating block data and validation status if we're in an edit only mode.\n\t\t\tfunction serializeData( silent = false ) {\n\t\t\t\tconst data = acf.serialize( $el, `acf-block_${ clientId }` );\n\n\t\t\t\tif ( silent ) {\n\t\t\t\t\tattributes.data = data;\n\t\t\t\t} else {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tdata,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tif ( blockSupportsValidation( name ) && ! silent && thisBlockForm.getMode() !== 'preview' ) {\n\t\t\t\t\tacf.debug( 'No block preview currently available. Need to trigger a validation only fetch.' );\n\t\t\t\t\tthisBlockForm.fetch( true, data );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add events.\n\t\t\tlet timeout = false;\n\t\t\t$el.on( 'change keyup', () => {\n\t\t\t\tclearTimeout( timeout );\n\t\t\t\ttimeout = setTimeout( serializeData, 300 );\n\t\t\t} );\n\n\t\t\t// Log initialization for remount check on the persistent element.\n\t\t\t$el.data( 'acf-events-added', true );\n\n\t\t\t// Ensure newly added block is saved with data.\n\t\t\t// Do it silently to avoid triggering a preview render.\n\t\t\tif ( ! attributes.data ) {\n\t\t\t\tserializeData( true );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * BlockPreview Class.\n\t *\n\t * A react componenet to handle the block preview.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tstring id the block id.\n\t * @return\tvoid\n\t */\n\tclass BlockPreview extends DynamicHTML {\n\t\tsetup( props ) {\n\t\t\tconst blockType = getBlockType( props.name );\n\t\t\tconst contextPostId = acf.isget( this.props, 'context', 'postId' );\n\n\t\t\tthis.id = `BlockPreview-${ props.clientId }`;\n\n\t\t\tsuper.setup( props );\n\n\t\t\t// Apply the contextPostId to the ID if set to stop query loop ID duplication.\n\t\t\tif ( contextPostId ) {\n\t\t\t\tthis.id = `BlockPreview-${ props.clientId }-${ contextPostId }`;\n\t\t\t}\n\n\t\t\tif ( blockType.supports.jsx ) {\n\t\t\t\tthis.renderMethod = 'jsx';\n\t\t\t}\n\t\t}\n\n\t\tfetch( args = {} ) {\n\t\t\tconst {\n\t\t\t\tattributes = this.props.attributes,\n\t\t\t\tclientId = this.props.clientId,\n\t\t\t\tcontext = this.props.context,\n\t\t\t\tdelay = 0,\n\t\t\t} = args;\n\n\t\t\tconst { name } = this.props;\n\n\t\t\t// Remember attributes used to fetch HTML.\n\t\t\tthis.setState( {\n\t\t\t\tprevAttributes: attributes,\n\t\t\t\tprevContext: context,\n\t\t\t} );\n\n\t\t\tconst hash = createBlockAttributesHash( attributes, context );\n\n\t\t\t// Try preloaded data first.\n\t\t\tlet preloaded = this.maybePreload( hash, clientId, false );\n\n\t\t\tif ( preloaded ) {\n\t\t\t\tif ( getBlockVersion( name ) == 1 ) {\n\t\t\t\t\tpreloaded.html = '
' + preloaded.html + '
';\n\t\t\t\t}\n\t\t\t\tthis.setHtml( acf.applyFilters( 'blocks/preview/render', preloaded.html, true ) );\n\t\t\t\tif ( preloaded.validation ) this.setValidationErrors( preloaded.validation.errors );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet query = { preview: true };\n\n\t\t\tif ( ! blockSupportsValidation( name ) ) {\n\t\t\t\tquery.validate = false;\n\t\t\t}\n\n\t\t\t// Request AJAX and update HTML on complete.\n\t\t\tfetchBlock( {\n\t\t\t\tattributes,\n\t\t\t\tcontext,\n\t\t\t\tclientId,\n\t\t\t\tquery,\n\t\t\t\tdelay,\n\t\t\t} ).done( ( { data } ) => {\n\t\t\t\tif ( ! data ) {\n\t\t\t\t\tthis.setHtml( `
${acf.__( 'Error previewing block' )}
` );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet replaceHtml = data.preview.replaceAll( data.clientId, clientId );\n\t\t\t\tif ( getBlockVersion( name ) == 1 ) {\n\t\t\t\t\treplaceHtml = '
' + replaceHtml + '
';\n\t\t\t\t}\n\t\t\t\tacf.debug( 'fetch block render promise' );\n\t\t\t\tthis.setHtml( acf.applyFilters( 'blocks/preview/render', replaceHtml, false ) );\n\t\t\t\tif ( data.validation ) {\n\t\t\t\t\tthis.setValidationErrors( data.validation.errors );\n\t\t\t\t}\n\t\t\t\tif ( this.isNotNewlyAdded() ) {\n\t\t\t\t\tthis.validate();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tvalidate() {\n\t\t\t// Check we've got a block form for this instance.\n\t\t\tconst client = acf.blockInstances[ this.props.clientId ] || {};\n\t\t\tconst blockFormState = client.BlockForm || false;\n\t\t\tif ( blockFormState ) {\n\t\t\t\tsuper.displayValidation( blockFormState.$el );\n\t\t\t}\n\t\t}\n\n\t\tcomponentDidAppend() {\n\t\t\tsuper.componentDidAppend();\n\t\t\tthis.renderBlockPreviewEvent();\n\t\t}\n\n\t\tshouldComponentUpdate( nextProps, nextState ) {\n\t\t\tconst nextAttributes = nextProps.attributes;\n\t\t\tconst thisAttributes = this.props.attributes;\n\n\t\t\t// Update preview if block data has changed.\n\t\t\tif (\n\t\t\t\t! compareObjects( nextAttributes, thisAttributes ) ||\n\t\t\t\t! compareObjects( nextProps.context, this.props.context )\n\t\t\t) {\n\t\t\t\tlet delay = 0;\n\n\t\t\t\t// Delay fetch when editing className or anchor to simulate consistent logic to custom fields.\n\t\t\t\tif ( nextAttributes.className !== thisAttributes.className ) {\n\t\t\t\t\tdelay = 300;\n\t\t\t\t}\n\t\t\t\tif ( nextAttributes.anchor !== thisAttributes.anchor ) {\n\t\t\t\t\tdelay = 300;\n\t\t\t\t}\n\n\t\t\t\tacf.debug( 'Triggering fetch from block preview shouldComponentUpdate' );\n\n\t\t\t\tthis.fetch( {\n\t\t\t\t\tattributes: nextAttributes,\n\t\t\t\t\tcontext: nextProps.context,\n\t\t\t\t\tdelay,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn super.shouldComponentUpdate( nextProps, nextState );\n\t\t}\n\n\t\trenderBlockPreviewEvent() {\n\t\t\t// Extract props.\n\t\t\tconst { attributes, name } = this.props;\n\t\t\tconst { $el, ref } = this.state;\n\t\t\tvar blockElement;\n\n\t\t\t// Generate action friendly type.\n\t\t\tconst type = attributes.name.replace( 'acf/', '' );\n\n\t\t\tif ( ref && ref.current ) {\n\t\t\t\t// We've got a react ref from a JSX container. Use the parent as the blockElement\n\t\t\t\tblockElement = $( ref.current ).parent();\n\t\t\t} else if ( getBlockVersion( name ) == 1 ) {\n\t\t\t\tblockElement = $el;\n\t\t\t} else {\n\t\t\t\tblockElement = $el.parents( '.acf-block-preview' );\n\t\t\t}\n\n\t\t\t// Do action.\n\t\t\tacf.doAction( 'render_block_preview', blockElement, attributes );\n\t\t\tacf.doAction( `render_block_preview/type=${ type }`, blockElement, attributes );\n\t\t}\n\n\t\tcomponentDidRemount() {\n\t\t\tsuper.componentDidRemount();\n\n\t\t\tacf.debug(\n\t\t\t\t'Checking if fetch is required in BlockPreview componentDidRemount',\n\t\t\t\tObject.assign( {}, this.state.prevAttributes ),\n\t\t\t\tObject.assign( {}, this.props.attributes ),\n\t\t\t\tObject.assign( {}, this.state.prevContext ),\n\t\t\t\tObject.assign( {}, this.props.context )\n\t\t\t);\n\n\t\t\t// Update preview if data has changed since last render (changing from \"edit\" to \"preview\").\n\t\t\tif (\n\t\t\t\t! compareObjects( this.state.prevAttributes, this.props.attributes ) ||\n\t\t\t\t! compareObjects( this.state.prevContext, this.props.context )\n\t\t\t) {\n\t\t\t\tacf.debug( 'Triggering block preview fetch from componentDidRemount' );\n\t\t\t\tthis.fetch();\n\t\t\t}\n\n\t\t\t// Fire the block preview event so blocks can reinit JS elements.\n\t\t\t// React reusing DOM elements covers any potential race condition from the above fetch.\n\t\t\tthis.renderBlockPreviewEvent();\n\t\t}\n\t}\n\n\t/**\n\t * Initializes ACF Blocks logic and registration.\n\t *\n\t * @since 5.9.0\n\t */\n\tfunction initialize() {\n\t\t// Add support for WordPress versions before 5.2.\n\t\tif ( ! wp.blockEditor ) {\n\t\t\twp.blockEditor = wp.editor;\n\t\t}\n\n\t\t// Register block types.\n\t\tconst blockTypes = acf.get( 'blockTypes' );\n\t\tif ( blockTypes ) {\n\t\t\tblockTypes.map( registerBlockType );\n\t\t}\n\t}\n\n\t// Run the initialize callback during the \"prepare\" action.\n\t// This ensures that all localized data is available and that blocks are registered before the WP editor has been instantiated.\n\tacf.addAction( 'prepare', initialize );\n\n\t/**\n\t * Returns a valid vertical alignment.\n\t *\n\t * @date\t07/08/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring align A vertical alignment.\n\t * @return\tstring\n\t */\n\tfunction validateVerticalAlignment( align ) {\n\t\tconst ALIGNMENTS = [ 'top', 'center', 'bottom' ];\n\t\tconst DEFAULT = 'top';\n\t\treturn ALIGNMENTS.includes( align ) ? align : DEFAULT;\n\t}\n\n\t/**\n\t * Returns a valid horizontal alignment.\n\t *\n\t * @date\t07/08/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring align A horizontal alignment.\n\t * @return\tstring\n\t */\n\tfunction validateHorizontalAlignment( align ) {\n\t\tconst ALIGNMENTS = [ 'left', 'center', 'right' ];\n\t\tconst DEFAULT = acf.get( 'rtl' ) ? 'right' : 'left';\n\t\treturn ALIGNMENTS.includes( align ) ? align : DEFAULT;\n\t}\n\n\t/**\n\t * Returns a valid matrix alignment.\n\t *\n\t * Written for \"upgrade-path\" compatibility from vertical alignment to matrix alignment.\n\t *\n\t * @date\t07/08/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring align A matrix alignment.\n\t * @return\tstring\n\t */\n\tfunction validateMatrixAlignment( align ) {\n\t\tconst DEFAULT = 'center center';\n\t\tif ( align ) {\n\t\t\tconst [ y, x ] = align.split( ' ' );\n\t\t\treturn `${ validateVerticalAlignment( y ) } ${ validateHorizontalAlignment( x ) }`;\n\t\t}\n\t\treturn DEFAULT;\n\t}\n\n\t/**\n\t * A higher order component adding alignContent editing functionality.\n\t *\n\t * @date\t08/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tcomponent OriginalBlockEdit The original BlockEdit component.\n\t * @param\tobject blockType The block type settings.\n\t * @return\tcomponent\n\t */\n\tfunction withAlignContentComponent( OriginalBlockEdit, blockType ) {\n\t\t// Determine alignment vars\n\t\tlet type = blockType.supports.align_content || blockType.supports.alignContent;\n\t\tlet AlignmentComponent;\n\t\tlet validateAlignment;\n\t\tswitch ( type ) {\n\t\t\tcase 'matrix':\n\t\t\t\tAlignmentComponent = BlockAlignmentMatrixControl || BlockAlignmentMatrixToolbar;\n\t\t\t\tvalidateAlignment = validateMatrixAlignment;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tAlignmentComponent = BlockVerticalAlignmentToolbar;\n\t\t\t\tvalidateAlignment = validateVerticalAlignment;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Ensure alignment component exists.\n\t\tif ( AlignmentComponent === undefined ) {\n\t\t\tconsole.warn( `The \"${ type }\" alignment component was not found.` );\n\t\t\treturn OriginalBlockEdit;\n\t\t}\n\n\t\t// Ensure correct block attribute data is sent in intial preview AJAX request.\n\t\tblockType.alignContent = validateAlignment( blockType.alignContent );\n\n\t\t// Return wrapped component.\n\t\treturn class WrappedBlockEdit extends Component {\n\t\t\trender() {\n\t\t\t\tconst { attributes, setAttributes } = this.props;\n\t\t\t\tconst { alignContent } = attributes;\n\t\t\t\tfunction onChangeAlignContent( alignContent ) {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\talignContent: validateAlignment( alignContent ),\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * A higher order component adding alignText editing functionality.\n\t *\n\t * @date\t08/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tcomponent OriginalBlockEdit The original BlockEdit component.\n\t * @param\tobject blockType The block type settings.\n\t * @return\tcomponent\n\t */\n\tfunction withAlignTextComponent( OriginalBlockEdit, blockType ) {\n\t\tconst validateAlignment = validateHorizontalAlignment;\n\n\t\t// Ensure correct block attribute data is sent in intial preview AJAX request.\n\t\tblockType.alignText = validateAlignment( blockType.alignText );\n\n\t\t// Return wrapped component.\n\t\treturn class WrappedBlockEdit extends Component {\n\t\t\trender() {\n\t\t\t\tconst { attributes, setAttributes } = this.props;\n\t\t\t\tconst { alignText } = attributes;\n\n\t\t\t\tfunction onChangeAlignText( alignText ) {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\talignText: validateAlignment( alignText ),\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * A higher order component adding full height support.\n\t *\n\t * @date\t19/07/2021\n\t * @since\t5.10.0\n\t *\n\t * @param\tcomponent OriginalBlockEdit The original BlockEdit component.\n\t * @param\tobject blockType The block type settings.\n\t * @return\tcomponent\n\t */\n\tfunction withFullHeightComponent( OriginalBlockEdit, blockType ) {\n\t\tif ( ! BlockFullHeightAlignmentControl ) return OriginalBlockEdit;\n\n\t\t// Return wrapped component.\n\t\treturn class WrappedBlockEdit extends Component {\n\t\t\trender() {\n\t\t\t\tconst { attributes, setAttributes } = this.props;\n\t\t\t\tconst { fullHeight } = attributes;\n\n\t\t\t\tfunction onToggleFullHeight( fullHeight ) {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tfullHeight,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Appends a backwards compatibility attribute for conversion.\n\t *\n\t * @since\t6.0\n\t *\n\t * @param\tobject attributes The block type attributes.\n\t * @return\tobject\n\t */\n\tfunction addBackCompatAttribute( attributes, new_attribute, type ) {\n\t\tattributes[ new_attribute ] = {\n\t\t\ttype: type,\n\t\t};\n\t\treturn attributes;\n\t}\n\n\t/**\n\t * Create a block hash from attributes\n\t *\n\t * @since 6.0\n\t *\n\t * @param object attributes The block type attributes.\n\t * @param object context The current block context object.\n\t * @return string\n\t */\n\tfunction createBlockAttributesHash( attributes, context ) {\n\t\tattributes[ '_acf_context' ] = sortObjectByKey( context );\n\t\treturn md5( JSON.stringify( sortObjectByKey( attributes ) ) );\n\t}\n\n\t/**\n\t * Key sort an object\n\t *\n\t * @since 6.3.1\n\t *\n\t * @param object toSort The object to be sorted\n\t * @return object\n\t */\n\tfunction sortObjectByKey( toSort ) {\n\t\treturn Object.keys( toSort )\n\t\t\t.sort()\n\t\t\t.reduce( ( acc, currValue ) => {\n\t\t\t\tacc[ currValue ] = toSort[ currValue ];\n\t\t\t\treturn acc;\n\t\t\t}, {} );\n\t}\n} )( jQuery );\n","( function ( $, undefined ) {\n\tacf.jsxNameReplacements = {\n\t\t'accent-height': 'accentHeight',\n\t\taccentheight: 'accentHeight',\n\t\t'accept-charset': 'acceptCharset',\n\t\tacceptcharset: 'acceptCharset',\n\t\taccesskey: 'accessKey',\n\t\t'alignment-baseline': 'alignmentBaseline',\n\t\talignmentbaseline: 'alignmentBaseline',\n\t\tallowedblocks: 'allowedBlocks',\n\t\tallowfullscreen: 'allowFullScreen',\n\t\tallowreorder: 'allowReorder',\n\t\t'arabic-form': 'arabicForm',\n\t\tarabicform: 'arabicForm',\n\t\tattributename: 'attributeName',\n\t\tattributetype: 'attributeType',\n\t\tautocapitalize: 'autoCapitalize',\n\t\tautocomplete: 'autoComplete',\n\t\tautocorrect: 'autoCorrect',\n\t\tautofocus: 'autoFocus',\n\t\tautoplay: 'autoPlay',\n\t\tautoreverse: 'autoReverse',\n\t\tautosave: 'autoSave',\n\t\tbasefrequency: 'baseFrequency',\n\t\t'baseline-shift': 'baselineShift',\n\t\tbaselineshift: 'baselineShift',\n\t\tbaseprofile: 'baseProfile',\n\t\tcalcmode: 'calcMode',\n\t\t'cap-height': 'capHeight',\n\t\tcapheight: 'capHeight',\n\t\tcellpadding: 'cellPadding',\n\t\tcellspacing: 'cellSpacing',\n\t\tcharset: 'charSet',\n\t\tclass: 'className',\n\t\tclassid: 'classID',\n\t\tclassname: 'className',\n\t\t'clip-path': 'clipPath',\n\t\t'clip-rule': 'clipRule',\n\t\tclippath: 'clipPath',\n\t\tclippathunits: 'clipPathUnits',\n\t\tcliprule: 'clipRule',\n\t\t'color-interpolation': 'colorInterpolation',\n\t\t'color-interpolation-filters': 'colorInterpolationFilters',\n\t\t'color-profile': 'colorProfile',\n\t\t'color-rendering': 'colorRendering',\n\t\tcolorinterpolation: 'colorInterpolation',\n\t\tcolorinterpolationfilters: 'colorInterpolationFilters',\n\t\tcolorprofile: 'colorProfile',\n\t\tcolorrendering: 'colorRendering',\n\t\tcolspan: 'colSpan',\n\t\tcontenteditable: 'contentEditable',\n\t\tcontentscripttype: 'contentScriptType',\n\t\tcontentstyletype: 'contentStyleType',\n\t\tcontextmenu: 'contextMenu',\n\t\tcontrolslist: 'controlsList',\n\t\tcrossorigin: 'crossOrigin',\n\t\tdangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n\t\tdatetime: 'dateTime',\n\t\tdefaultchecked: 'defaultChecked',\n\t\tdefaultvalue: 'defaultValue',\n\t\tdiffuseconstant: 'diffuseConstant',\n\t\tdisablepictureinpicture: 'disablePictureInPicture',\n\t\tdisableremoteplayback: 'disableRemotePlayback',\n\t\t'dominant-baseline': 'dominantBaseline',\n\t\tdominantbaseline: 'dominantBaseline',\n\t\tedgemode: 'edgeMode',\n\t\t'enable-background': 'enableBackground',\n\t\tenablebackground: 'enableBackground',\n\t\tenctype: 'encType',\n\t\tenterkeyhint: 'enterKeyHint',\n\t\texternalresourcesrequired: 'externalResourcesRequired',\n\t\t'fill-opacity': 'fillOpacity',\n\t\t'fill-rule': 'fillRule',\n\t\tfillopacity: 'fillOpacity',\n\t\tfillrule: 'fillRule',\n\t\tfilterres: 'filterRes',\n\t\tfilterunits: 'filterUnits',\n\t\t'flood-color': 'floodColor',\n\t\t'flood-opacity': 'floodOpacity',\n\t\tfloodcolor: 'floodColor',\n\t\tfloodopacity: 'floodOpacity',\n\t\t'font-family': 'fontFamily',\n\t\t'font-size': 'fontSize',\n\t\t'font-size-adjust': 'fontSizeAdjust',\n\t\t'font-stretch': 'fontStretch',\n\t\t'font-style': 'fontStyle',\n\t\t'font-variant': 'fontVariant',\n\t\t'font-weight': 'fontWeight',\n\t\tfontfamily: 'fontFamily',\n\t\tfontsize: 'fontSize',\n\t\tfontsizeadjust: 'fontSizeAdjust',\n\t\tfontstretch: 'fontStretch',\n\t\tfontstyle: 'fontStyle',\n\t\tfontvariant: 'fontVariant',\n\t\tfontweight: 'fontWeight',\n\t\tfor: 'htmlFor',\n\t\tforeignobject: 'foreignObject',\n\t\tformaction: 'formAction',\n\t\tformenctype: 'formEncType',\n\t\tformmethod: 'formMethod',\n\t\tformnovalidate: 'formNoValidate',\n\t\tformtarget: 'formTarget',\n\t\tframeborder: 'frameBorder',\n\t\t'glyph-name': 'glyphName',\n\t\t'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n\t\t'glyph-orientation-vertical': 'glyphOrientationVertical',\n\t\tglyphname: 'glyphName',\n\t\tglyphorientationhorizontal: 'glyphOrientationHorizontal',\n\t\tglyphorientationvertical: 'glyphOrientationVertical',\n\t\tglyphref: 'glyphRef',\n\t\tgradienttransform: 'gradientTransform',\n\t\tgradientunits: 'gradientUnits',\n\t\t'horiz-adv-x': 'horizAdvX',\n\t\t'horiz-origin-x': 'horizOriginX',\n\t\thorizadvx: 'horizAdvX',\n\t\thorizoriginx: 'horizOriginX',\n\t\threflang: 'hrefLang',\n\t\thtmlfor: 'htmlFor',\n\t\t'http-equiv': 'httpEquiv',\n\t\thttpequiv: 'httpEquiv',\n\t\t'image-rendering': 'imageRendering',\n\t\timagerendering: 'imageRendering',\n\t\tinnerhtml: 'innerHTML',\n\t\tinputmode: 'inputMode',\n\t\titemid: 'itemID',\n\t\titemprop: 'itemProp',\n\t\titemref: 'itemRef',\n\t\titemscope: 'itemScope',\n\t\titemtype: 'itemType',\n\t\tkernelmatrix: 'kernelMatrix',\n\t\tkernelunitlength: 'kernelUnitLength',\n\t\tkeyparams: 'keyParams',\n\t\tkeypoints: 'keyPoints',\n\t\tkeysplines: 'keySplines',\n\t\tkeytimes: 'keyTimes',\n\t\tkeytype: 'keyType',\n\t\tlengthadjust: 'lengthAdjust',\n\t\t'letter-spacing': 'letterSpacing',\n\t\tletterspacing: 'letterSpacing',\n\t\t'lighting-color': 'lightingColor',\n\t\tlightingcolor: 'lightingColor',\n\t\tlimitingconeangle: 'limitingConeAngle',\n\t\tmarginheight: 'marginHeight',\n\t\tmarginwidth: 'marginWidth',\n\t\t'marker-end': 'markerEnd',\n\t\t'marker-mid': 'markerMid',\n\t\t'marker-start': 'markerStart',\n\t\tmarkerend: 'markerEnd',\n\t\tmarkerheight: 'markerHeight',\n\t\tmarkermid: 'markerMid',\n\t\tmarkerstart: 'markerStart',\n\t\tmarkerunits: 'markerUnits',\n\t\tmarkerwidth: 'markerWidth',\n\t\tmaskcontentunits: 'maskContentUnits',\n\t\tmaskunits: 'maskUnits',\n\t\tmaxlength: 'maxLength',\n\t\tmediagroup: 'mediaGroup',\n\t\tminlength: 'minLength',\n\t\tnomodule: 'noModule',\n\t\tnovalidate: 'noValidate',\n\t\tnumoctaves: 'numOctaves',\n\t\t'overline-position': 'overlinePosition',\n\t\t'overline-thickness': 'overlineThickness',\n\t\toverlineposition: 'overlinePosition',\n\t\toverlinethickness: 'overlineThickness',\n\t\t'paint-order': 'paintOrder',\n\t\tpaintorder: 'paintOrder',\n\t\t'panose-1': 'panose1',\n\t\tpathlength: 'pathLength',\n\t\tpatterncontentunits: 'patternContentUnits',\n\t\tpatterntransform: 'patternTransform',\n\t\tpatternunits: 'patternUnits',\n\t\tplaysinline: 'playsInline',\n\t\t'pointer-events': 'pointerEvents',\n\t\tpointerevents: 'pointerEvents',\n\t\tpointsatx: 'pointsAtX',\n\t\tpointsaty: 'pointsAtY',\n\t\tpointsatz: 'pointsAtZ',\n\t\tpreservealpha: 'preserveAlpha',\n\t\tpreserveaspectratio: 'preserveAspectRatio',\n\t\tprimitiveunits: 'primitiveUnits',\n\t\tradiogroup: 'radioGroup',\n\t\treadonly: 'readOnly',\n\t\treferrerpolicy: 'referrerPolicy',\n\t\trefx: 'refX',\n\t\trefy: 'refY',\n\t\t'rendering-intent': 'renderingIntent',\n\t\trenderingintent: 'renderingIntent',\n\t\trepeatcount: 'repeatCount',\n\t\trepeatdur: 'repeatDur',\n\t\trequiredextensions: 'requiredExtensions',\n\t\trequiredfeatures: 'requiredFeatures',\n\t\trowspan: 'rowSpan',\n\t\t'shape-rendering': 'shapeRendering',\n\t\tshaperendering: 'shapeRendering',\n\t\tspecularconstant: 'specularConstant',\n\t\tspecularexponent: 'specularExponent',\n\t\tspellcheck: 'spellCheck',\n\t\tspreadmethod: 'spreadMethod',\n\t\tsrcdoc: 'srcDoc',\n\t\tsrclang: 'srcLang',\n\t\tsrcset: 'srcSet',\n\t\tstartoffset: 'startOffset',\n\t\tstddeviation: 'stdDeviation',\n\t\tstitchtiles: 'stitchTiles',\n\t\t'stop-color': 'stopColor',\n\t\t'stop-opacity': 'stopOpacity',\n\t\tstopcolor: 'stopColor',\n\t\tstopopacity: 'stopOpacity',\n\t\t'strikethrough-position': 'strikethroughPosition',\n\t\t'strikethrough-thickness': 'strikethroughThickness',\n\t\tstrikethroughposition: 'strikethroughPosition',\n\t\tstrikethroughthickness: 'strikethroughThickness',\n\t\t'stroke-dasharray': 'strokeDasharray',\n\t\t'stroke-dashoffset': 'strokeDashoffset',\n\t\t'stroke-linecap': 'strokeLinecap',\n\t\t'stroke-linejoin': 'strokeLinejoin',\n\t\t'stroke-miterlimit': 'strokeMiterlimit',\n\t\t'stroke-opacity': 'strokeOpacity',\n\t\t'stroke-width': 'strokeWidth',\n\t\tstrokedasharray: 'strokeDasharray',\n\t\tstrokedashoffset: 'strokeDashoffset',\n\t\tstrokelinecap: 'strokeLinecap',\n\t\tstrokelinejoin: 'strokeLinejoin',\n\t\tstrokemiterlimit: 'strokeMiterlimit',\n\t\tstrokeopacity: 'strokeOpacity',\n\t\tstrokewidth: 'strokeWidth',\n\t\tsuppresscontenteditablewarning: 'suppressContentEditableWarning',\n\t\tsuppresshydrationwarning: 'suppressHydrationWarning',\n\t\tsurfacescale: 'surfaceScale',\n\t\tsystemlanguage: 'systemLanguage',\n\t\ttabindex: 'tabIndex',\n\t\ttablevalues: 'tableValues',\n\t\ttargetx: 'targetX',\n\t\ttargety: 'targetY',\n\t\ttemplatelock: 'templateLock',\n\t\t'text-anchor': 'textAnchor',\n\t\t'text-decoration': 'textDecoration',\n\t\t'text-rendering': 'textRendering',\n\t\ttextanchor: 'textAnchor',\n\t\ttextdecoration: 'textDecoration',\n\t\ttextlength: 'textLength',\n\t\ttextrendering: 'textRendering',\n\t\t'underline-position': 'underlinePosition',\n\t\t'underline-thickness': 'underlineThickness',\n\t\tunderlineposition: 'underlinePosition',\n\t\tunderlinethickness: 'underlineThickness',\n\t\t'unicode-bidi': 'unicodeBidi',\n\t\t'unicode-range': 'unicodeRange',\n\t\tunicodebidi: 'unicodeBidi',\n\t\tunicoderange: 'unicodeRange',\n\t\t'units-per-em': 'unitsPerEm',\n\t\tunitsperem: 'unitsPerEm',\n\t\tusemap: 'useMap',\n\t\t'v-alphabetic': 'vAlphabetic',\n\t\t'v-hanging': 'vHanging',\n\t\t'v-ideographic': 'vIdeographic',\n\t\t'v-mathematical': 'vMathematical',\n\t\tvalphabetic: 'vAlphabetic',\n\t\t'vector-effect': 'vectorEffect',\n\t\tvectoreffect: 'vectorEffect',\n\t\t'vert-adv-y': 'vertAdvY',\n\t\t'vert-origin-x': 'vertOriginX',\n\t\t'vert-origin-y': 'vertOriginY',\n\t\tvertadvy: 'vertAdvY',\n\t\tvertoriginx: 'vertOriginX',\n\t\tvertoriginy: 'vertOriginY',\n\t\tvhanging: 'vHanging',\n\t\tvideographic: 'vIdeographic',\n\t\tviewbox: 'viewBox',\n\t\tviewtarget: 'viewTarget',\n\t\tvmathematical: 'vMathematical',\n\t\t'word-spacing': 'wordSpacing',\n\t\twordspacing: 'wordSpacing',\n\t\t'writing-mode': 'writingMode',\n\t\twritingmode: 'writingMode',\n\t\t'x-height': 'xHeight',\n\t\txchannelselector: 'xChannelSelector',\n\t\txheight: 'xHeight',\n\t\t'xlink:actuate': 'xlinkActuate',\n\t\t'xlink:arcrole': 'xlinkArcrole',\n\t\t'xlink:href': 'xlinkHref',\n\t\t'xlink:role': 'xlinkRole',\n\t\t'xlink:show': 'xlinkShow',\n\t\t'xlink:title': 'xlinkTitle',\n\t\t'xlink:type': 'xlinkType',\n\t\txlinkactuate: 'xlinkActuate',\n\t\txlinkarcrole: 'xlinkArcrole',\n\t\txlinkhref: 'xlinkHref',\n\t\txlinkrole: 'xlinkRole',\n\t\txlinkshow: 'xlinkShow',\n\t\txlinktitle: 'xlinkTitle',\n\t\txlinktype: 'xlinkType',\n\t\t'xml:base': 'xmlBase',\n\t\t'xml:lang': 'xmlLang',\n\t\t'xml:space': 'xmlSpace',\n\t\txmlbase: 'xmlBase',\n\t\txmllang: 'xmlLang',\n\t\t'xmlns:xlink': 'xmlnsXlink',\n\t\txmlnsxlink: 'xmlnsXlink',\n\t\txmlspace: 'xmlSpace',\n\t\tychannelselector: 'yChannelSelector',\n\t\tzoomandpan: 'zoomAndPan',\n\t};\n} )( jQuery );\n","var charenc = {\n // UTF-8 encoding\n utf8: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));\n }\n },\n\n // Binary encoding\n bin: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n for (var bytes = [], i = 0; i < str.length; i++)\n bytes.push(str.charCodeAt(i) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n for (var str = [], i = 0; i < bytes.length; i++)\n str.push(String.fromCharCode(bytes[i]));\n return str.join('');\n }\n }\n};\n\nmodule.exports = charenc;\n","(function() {\n var base64map\n = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n\n crypt = {\n // Bit-wise rotation left\n rotl: function(n, b) {\n return (n << b) | (n >>> (32 - b));\n },\n\n // Bit-wise rotation right\n rotr: function(n, b) {\n return (n << (32 - b)) | (n >>> b);\n },\n\n // Swap big-endian to little-endian and vice versa\n endian: function(n) {\n // If number given, swap endian\n if (n.constructor == Number) {\n return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;\n }\n\n // Else, assume array and swap all items\n for (var i = 0; i < n.length; i++)\n n[i] = crypt.endian(n[i]);\n return n;\n },\n\n // Generate an array of any length of random bytes\n randomBytes: function(n) {\n for (var bytes = []; n > 0; n--)\n bytes.push(Math.floor(Math.random() * 256));\n return bytes;\n },\n\n // Convert a byte array to big-endian 32-bit words\n bytesToWords: function(bytes) {\n for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)\n words[b >>> 5] |= bytes[i] << (24 - b % 32);\n return words;\n },\n\n // Convert big-endian 32-bit words to a byte array\n wordsToBytes: function(words) {\n for (var bytes = [], b = 0; b < words.length * 32; b += 8)\n bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a hex string\n bytesToHex: function(bytes) {\n for (var hex = [], i = 0; i < bytes.length; i++) {\n hex.push((bytes[i] >>> 4).toString(16));\n hex.push((bytes[i] & 0xF).toString(16));\n }\n return hex.join('');\n },\n\n // Convert a hex string to a byte array\n hexToBytes: function(hex) {\n for (var bytes = [], c = 0; c < hex.length; c += 2)\n bytes.push(parseInt(hex.substr(c, 2), 16));\n return bytes;\n },\n\n // Convert a byte array to a base-64 string\n bytesToBase64: function(bytes) {\n for (var base64 = [], i = 0; i < bytes.length; i += 3) {\n var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\n for (var j = 0; j < 4; j++)\n if (i * 8 + j * 6 <= bytes.length * 8)\n base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));\n else\n base64.push('=');\n }\n return base64.join('');\n },\n\n // Convert a base-64 string to a byte array\n base64ToBytes: function(base64) {\n // Remove non-base-64 characters\n base64 = base64.replace(/[^A-Z0-9+\\/]/ig, '');\n\n for (var bytes = [], i = 0, imod4 = 0; i < base64.length;\n imod4 = ++i % 4) {\n if (imod4 == 0) continue;\n bytes.push(((base64map.indexOf(base64.charAt(i - 1))\n & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))\n | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));\n }\n return bytes;\n }\n };\n\n module.exports = crypt;\n})();\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n","(function(){\r\n var crypt = require('crypt'),\r\n utf8 = require('charenc').utf8,\r\n isBuffer = require('is-buffer'),\r\n bin = require('charenc').bin,\r\n\r\n // The core\r\n md5 = function (message, options) {\r\n // Convert to byte array\r\n if (message.constructor == String)\r\n if (options && options.encoding === 'binary')\r\n message = bin.stringToBytes(message);\r\n else\r\n message = utf8.stringToBytes(message);\r\n else if (isBuffer(message))\r\n message = Array.prototype.slice.call(message, 0);\r\n else if (!Array.isArray(message) && message.constructor !== Uint8Array)\r\n message = message.toString();\r\n // else, assume byte array already\r\n\r\n var m = crypt.bytesToWords(message),\r\n l = message.length * 8,\r\n a = 1732584193,\r\n b = -271733879,\r\n c = -1732584194,\r\n d = 271733878;\r\n\r\n // Swap endian\r\n for (var i = 0; i < m.length; i++) {\r\n m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |\r\n ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;\r\n }\r\n\r\n // Padding\r\n m[l >>> 5] |= 0x80 << (l % 32);\r\n m[(((l + 64) >>> 9) << 4) + 14] = l;\r\n\r\n // Method shortcuts\r\n var FF = md5._ff,\r\n GG = md5._gg,\r\n HH = md5._hh,\r\n II = md5._ii;\r\n\r\n for (var i = 0; i < m.length; i += 16) {\r\n\r\n var aa = a,\r\n bb = b,\r\n cc = c,\r\n dd = d;\r\n\r\n a = FF(a, b, c, d, m[i+ 0], 7, -680876936);\r\n d = FF(d, a, b, c, m[i+ 1], 12, -389564586);\r\n c = FF(c, d, a, b, m[i+ 2], 17, 606105819);\r\n b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);\r\n a = FF(a, b, c, d, m[i+ 4], 7, -176418897);\r\n d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);\r\n c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);\r\n b = FF(b, c, d, a, m[i+ 7], 22, -45705983);\r\n a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);\r\n d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);\r\n c = FF(c, d, a, b, m[i+10], 17, -42063);\r\n b = FF(b, c, d, a, m[i+11], 22, -1990404162);\r\n a = FF(a, b, c, d, m[i+12], 7, 1804603682);\r\n d = FF(d, a, b, c, m[i+13], 12, -40341101);\r\n c = FF(c, d, a, b, m[i+14], 17, -1502002290);\r\n b = FF(b, c, d, a, m[i+15], 22, 1236535329);\r\n\r\n a = GG(a, b, c, d, m[i+ 1], 5, -165796510);\r\n d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);\r\n c = GG(c, d, a, b, m[i+11], 14, 643717713);\r\n b = GG(b, c, d, a, m[i+ 0], 20, -373897302);\r\n a = GG(a, b, c, d, m[i+ 5], 5, -701558691);\r\n d = GG(d, a, b, c, m[i+10], 9, 38016083);\r\n c = GG(c, d, a, b, m[i+15], 14, -660478335);\r\n b = GG(b, c, d, a, m[i+ 4], 20, -405537848);\r\n a = GG(a, b, c, d, m[i+ 9], 5, 568446438);\r\n d = GG(d, a, b, c, m[i+14], 9, -1019803690);\r\n c = GG(c, d, a, b, m[i+ 3], 14, -187363961);\r\n b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);\r\n a = GG(a, b, c, d, m[i+13], 5, -1444681467);\r\n d = GG(d, a, b, c, m[i+ 2], 9, -51403784);\r\n c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);\r\n b = GG(b, c, d, a, m[i+12], 20, -1926607734);\r\n\r\n a = HH(a, b, c, d, m[i+ 5], 4, -378558);\r\n d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);\r\n c = HH(c, d, a, b, m[i+11], 16, 1839030562);\r\n b = HH(b, c, d, a, m[i+14], 23, -35309556);\r\n a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);\r\n d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);\r\n c = HH(c, d, a, b, m[i+ 7], 16, -155497632);\r\n b = HH(b, c, d, a, m[i+10], 23, -1094730640);\r\n a = HH(a, b, c, d, m[i+13], 4, 681279174);\r\n d = HH(d, a, b, c, m[i+ 0], 11, -358537222);\r\n c = HH(c, d, a, b, m[i+ 3], 16, -722521979);\r\n b = HH(b, c, d, a, m[i+ 6], 23, 76029189);\r\n a = HH(a, b, c, d, m[i+ 9], 4, -640364487);\r\n d = HH(d, a, b, c, m[i+12], 11, -421815835);\r\n c = HH(c, d, a, b, m[i+15], 16, 530742520);\r\n b = HH(b, c, d, a, m[i+ 2], 23, -995338651);\r\n\r\n a = II(a, b, c, d, m[i+ 0], 6, -198630844);\r\n d = II(d, a, b, c, m[i+ 7], 10, 1126891415);\r\n c = II(c, d, a, b, m[i+14], 15, -1416354905);\r\n b = II(b, c, d, a, m[i+ 5], 21, -57434055);\r\n a = II(a, b, c, d, m[i+12], 6, 1700485571);\r\n d = II(d, a, b, c, m[i+ 3], 10, -1894986606);\r\n c = II(c, d, a, b, m[i+10], 15, -1051523);\r\n b = II(b, c, d, a, m[i+ 1], 21, -2054922799);\r\n a = II(a, b, c, d, m[i+ 8], 6, 1873313359);\r\n d = II(d, a, b, c, m[i+15], 10, -30611744);\r\n c = II(c, d, a, b, m[i+ 6], 15, -1560198380);\r\n b = II(b, c, d, a, m[i+13], 21, 1309151649);\r\n a = II(a, b, c, d, m[i+ 4], 6, -145523070);\r\n d = II(d, a, b, c, m[i+11], 10, -1120210379);\r\n c = II(c, d, a, b, m[i+ 2], 15, 718787259);\r\n b = II(b, c, d, a, m[i+ 9], 21, -343485551);\r\n\r\n a = (a + aa) >>> 0;\r\n b = (b + bb) >>> 0;\r\n c = (c + cc) >>> 0;\r\n d = (d + dd) >>> 0;\r\n }\r\n\r\n return crypt.endian([a, b, c, d]);\r\n };\r\n\r\n // Auxiliary functions\r\n md5._ff = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & c | ~b & d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._gg = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & d | c & ~d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._hh = function (a, b, c, d, x, s, t) {\r\n var n = a + (b ^ c ^ d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._ii = function (a, b, c, d, x, s, t) {\r\n var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n\r\n // Package private blocksize\r\n md5._blocksize = 16;\r\n md5._digestsize = 16;\r\n\r\n module.exports = function (message, options) {\r\n if (message === undefined || message === null)\r\n throw new Error('Illegal argument ' + message);\r\n\r\n var digestbytes = crypt.wordsToBytes(md5(message, options));\r\n return options && options.asBytes ? digestbytes :\r\n options && options.asString ? bin.bytesToString(digestbytes) :\r\n crypt.bytesToHex(digestbytes);\r\n };\r\n\r\n})();\r\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('')) {\n _frame = _frame.replace('', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie.
\n // or
). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n //
, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nvar didWarnAboutKeySpread = {};\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n {\n if (hasOwnProperty.call(props, 'key')) {\n var componentName = getComponentNameFromType(type);\n var keys = Object.keys(props).filter(function (k) {\n return k !== 'key';\n });\n var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';\n\n if (!didWarnAboutKeySpread[componentName + beforeExample]) {\n var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';\n\n error('A props object containing a \"key\" prop is being spread into JSX:\\n' + ' let props = %s;\\n' + ' <%s {...props} />\\n' + 'React keys must be passed directly to JSX without using spread:\\n' + ' let props = %s;\\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);\n\n didWarnAboutKeySpread[componentName + beforeExample] = true;\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var ReactVersion = '18.3.1';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nvar ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nvar ReactCurrentBatchConfig = {\n transition: null\n};\n\nvar ReactCurrentActQueue = {\n current: null,\n // Used to reproduce behavior of `batchedUpdates` in legacy mode.\n isBatchingLegacy: false,\n didScheduleLegacyUpdate: false\n};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nvar ReactDebugCurrentFrame = {};\nvar currentExtraStackFrame = null;\nfunction setExtraStackFrame(stack) {\n {\n currentExtraStackFrame = stack;\n }\n}\n\n{\n ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {\n {\n currentExtraStackFrame = stack;\n }\n }; // Stack implementation injected by the current renderer.\n\n\n ReactDebugCurrentFrame.getCurrentStack = null;\n\n ReactDebugCurrentFrame.getStackAddendum = function () {\n var stack = ''; // Add an extra top frame while an element is being validated\n\n if (currentExtraStackFrame) {\n stack += currentExtraStackFrame;\n } // Delegate to the injected renderer-specific implementation\n\n\n var impl = ReactDebugCurrentFrame.getCurrentStack;\n\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar ReactSharedInternals = {\n ReactCurrentDispatcher: ReactCurrentDispatcher,\n ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n ReactCurrentOwner: ReactCurrentOwner\n};\n\n{\n ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;\n ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n error(\"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nvar assign = Object.assign;\n\nvar emptyObject = {};\n\n{\n Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {\n throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n var refObject = {\n current: null\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (element === null || element === undefined) {\n throw new Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n\n var propName; // Original props are copied\n\n var props = assign({}, element.props); // Reserved names are extracted\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = key.replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof element === 'object' && element !== null && element.key != null) {\n // Explicit key\n {\n checkKeyStringCoercion(element.key);\n }\n\n return escape('' + element.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n var _child = children;\n var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;\n\n if (isArray(mappedChild)) {\n var escapedChildKey = '';\n\n if (childKey != null) {\n escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n }\n\n mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n {\n // The `if` statement here prevents auto-disabling of the safe\n // coercion ESLint rule, so we must manually disable it below.\n // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {\n checkKeyStringCoercion(mappedChild.key);\n }\n }\n\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n // eslint-disable-next-line react-internal/safe-string-coercion\n escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);\n }\n\n array.push(mappedChild);\n }\n\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getElementKey(child, i);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var iterableChildren = children;\n\n {\n // Warn about using Maps as children\n if (iteratorFn === iterableChildren.entries) {\n if (!didWarnAboutMaps) {\n warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n\n var iterator = iteratorFn.call(iterableChildren);\n var step;\n var ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getElementKey(child, ii++);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else if (type === 'object') {\n // eslint-disable-next-line react-internal/safe-string-coercion\n var childrenString = String(children);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var result = [];\n var count = 0;\n mapIntoArray(children, result, '', '', function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n var n = 0;\n mapChildren(children, function () {\n n++; // Don't return anything\n });\n return n;\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n mapChildren(children, function () {\n forEachFunc.apply(this, arguments); // Don't return anything.\n }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n throw new Error('React.Children.only expected to receive a single React element child.');\n }\n\n return children;\n}\n\nfunction createContext(defaultValue) {\n // TODO: Second argument used to be an optional `calculateChangedBits`\n // function. Warn to reserve for future use?\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null,\n // Add these to use same hidden class in VM as ServerContext\n _defaultValue: null,\n _globalName: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n var hasWarnedAboutDisplayNameOnConsumer = false;\n\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context\n }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Consumer;\n }\n },\n displayName: {\n get: function () {\n return context.displayName;\n },\n set: function (displayName) {\n if (!hasWarnedAboutDisplayNameOnConsumer) {\n warn('Setting `displayName` on Context.Consumer has no effect. ' + \"You should set it directly on the context with Context.displayName = '%s'.\", displayName);\n\n hasWarnedAboutDisplayNameOnConsumer = true;\n }\n }\n }\n }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n context.Consumer = Consumer;\n }\n\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n\n return context;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\n\nfunction lazyInitializer(payload) {\n if (payload._status === Uninitialized) {\n var ctor = payload._result;\n var thenable = ctor(); // Transition to the next state.\n // This might throw either because it's missing or throws. If so, we treat it\n // as still uninitialized and try again next time. Which is the same as what\n // happens if the ctor or any wrappers processing the ctor throws. This might\n // end up fixing it if the resolution was a concurrency bug.\n\n thenable.then(function (moduleObject) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var resolved = payload;\n resolved._status = Resolved;\n resolved._result = moduleObject;\n }\n }, function (error) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var rejected = payload;\n rejected._status = Rejected;\n rejected._result = error;\n }\n });\n\n if (payload._status === Uninitialized) {\n // In case, we're still uninitialized, then we're waiting for the thenable\n // to resolve. Set it as pending in the meantime.\n var pending = payload;\n pending._status = Pending;\n pending._result = thenable;\n }\n }\n\n if (payload._status === Resolved) {\n var moduleObject = payload._result;\n\n {\n if (moduleObject === undefined) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\\n\\n\" + 'Did you accidentally put curly braces around the import?', moduleObject);\n }\n }\n\n {\n if (!('default' in moduleObject)) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\", moduleObject);\n }\n }\n\n return moduleObject.default;\n } else {\n throw payload._result;\n }\n}\n\nfunction lazy(ctor) {\n var payload = {\n // We use these fields to store the result.\n _status: Uninitialized,\n _result: ctor\n };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: payload,\n _init: lazyInitializer\n };\n\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes; // $FlowFixMe\n\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n set: function (newDefaultProps) {\n error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n defaultProps = newDefaultProps; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n set: function (newPropTypes) {\n error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n propTypes = newPropTypes; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n if (render.length !== 0 && render.length !== 2) {\n error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');\n }\n }\n\n if (render != null) {\n if (render.defaultProps != null || render.propTypes != null) {\n error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');\n }\n }\n }\n\n var elementType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.forwardRef((props, ref) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!render.name && !render.displayName) {\n render.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n\n var elementType = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.memo((props) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!type.name && !type.displayName) {\n type.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nfunction resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher.current;\n\n {\n if (dispatcher === null) {\n error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n }\n } // Will result in a null access error if accessed outside render phase. We\n // intentionally don't throw our own error because this is in a hot path.\n // Also helps ensure this is inlined.\n\n\n return dispatcher;\n}\nfunction useContext(Context) {\n var dispatcher = resolveDispatcher();\n\n {\n // TODO: add a more generic warning for invalid values.\n if (Context._context !== undefined) {\n var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n if (realContext.Consumer === Context) {\n error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n } else if (realContext.Provider === Context) {\n error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n }\n\n return dispatcher.useContext(Context);\n}\nfunction useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useInsertionEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useInsertionEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n}\nfunction useTransition() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useTransition();\n}\nfunction useDeferredValue(value) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDeferredValue(value);\n}\nfunction useId() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useId();\n}\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher$1.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('')) {\n _frame = _frame.replace('', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher$1.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n setExtraStackFrame(stack);\n } else {\n setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendumForProps(elementProps) {\n if (elementProps !== null && elementProps !== undefined) {\n return getSourceInfoErrorAddendum(elementProps.__source);\n }\n\n return '';\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n {\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\nfunction createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n {\n error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n }\n\n var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\nfunction createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type;\n\n {\n if (!didWarnAboutDeprecatedCreateFactory) {\n didWarnAboutDeprecatedCreateFactory = true;\n\n warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n } // Legacy hook: remove it\n\n\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n\n return validatedFactory;\n}\nfunction cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement.apply(this, arguments);\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n\n validatePropTypes(newElement);\n return newElement;\n}\n\nfunction startTransition(scope, options) {\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = {};\n var currentTransition = ReactCurrentBatchConfig.transition;\n\n {\n ReactCurrentBatchConfig.transition._updatedFibers = new Set();\n }\n\n try {\n scope();\n } finally {\n ReactCurrentBatchConfig.transition = prevTransition;\n\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n\n currentTransition._updatedFibers.clear();\n }\n }\n }\n}\n\nvar didWarnAboutMessageChannel = false;\nvar enqueueTaskImpl = null;\nfunction enqueueTask(task) {\n if (enqueueTaskImpl === null) {\n try {\n // read require off the module object to get around the bundlers.\n // we don't want them to detect a require and bundle a Node polyfill.\n var requireString = ('require' + Math.random()).slice(0, 7);\n var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's\n // version of setImmediate, bypassing fake timers if any.\n\n enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;\n } catch (_err) {\n // we're in a browser\n // we can't use regular timers because they may still be faked\n // so we try MessageChannel+postMessage instead\n enqueueTaskImpl = function (callback) {\n {\n if (didWarnAboutMessageChannel === false) {\n didWarnAboutMessageChannel = true;\n\n if (typeof MessageChannel === 'undefined') {\n error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');\n }\n }\n }\n\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(undefined);\n };\n }\n }\n\n return enqueueTaskImpl(task);\n}\n\nvar actScopeDepth = 0;\nvar didWarnNoAwaitAct = false;\nfunction act(callback) {\n {\n // `act` calls can be nested, so we track the depth. This represents the\n // number of `act` scopes on the stack.\n var prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n\n if (ReactCurrentActQueue.current === null) {\n // This is the outermost `act` scope. Initialize the queue. The reconciler\n // will detect the queue and use it instead of Scheduler.\n ReactCurrentActQueue.current = [];\n }\n\n var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;\n var result;\n\n try {\n // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only\n // set to `true` while the given callback is executed, not for updates\n // triggered during an async event, because this is how the legacy\n // implementation of `act` behaved.\n ReactCurrentActQueue.isBatchingLegacy = true;\n result = callback(); // Replicate behavior of original `act` implementation in legacy mode,\n // which flushed updates immediately after the scope function exits, even\n // if it's an async function.\n\n if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n ReactCurrentActQueue.didScheduleLegacyUpdate = false;\n flushActQueue(queue);\n }\n }\n } catch (error) {\n popActScope(prevActScopeDepth);\n throw error;\n } finally {\n ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;\n }\n\n if (result !== null && typeof result === 'object' && typeof result.then === 'function') {\n var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait\n // for it to resolve before exiting the current scope.\n\n var wasAwaited = false;\n var thenable = {\n then: function (resolve, reject) {\n wasAwaited = true;\n thenableResult.then(function (returnValue) {\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // We've exited the outermost act scope. Recursively flush the\n // queue until there's no remaining work.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }, function (error) {\n // The callback threw an error.\n popActScope(prevActScopeDepth);\n reject(error);\n });\n }\n };\n\n {\n if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {\n // eslint-disable-next-line no-undef\n Promise.resolve().then(function () {}).then(function () {\n if (!wasAwaited) {\n didWarnNoAwaitAct = true;\n\n error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');\n }\n });\n }\n }\n\n return thenable;\n } else {\n var returnValue = result; // The callback is not an async function. Exit the current scope\n // immediately, without awaiting.\n\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // Exiting the outermost act scope. Flush the queue.\n var _queue = ReactCurrentActQueue.current;\n\n if (_queue !== null) {\n flushActQueue(_queue);\n ReactCurrentActQueue.current = null;\n } // Return a thenable. If the user awaits it, we'll flush again in\n // case additional work was scheduled by a microtask.\n\n\n var _thenable = {\n then: function (resolve, reject) {\n // Confirm we haven't re-entered another `act` scope, in case\n // the user does something weird like await the thenable\n // multiple times.\n if (ReactCurrentActQueue.current === null) {\n // Recursively flush the queue until there's no remaining work.\n ReactCurrentActQueue.current = [];\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }\n };\n return _thenable;\n } else {\n // Since we're inside a nested `act` scope, the returned thenable\n // immediately resolves. The outer scope will flush the queue.\n var _thenable2 = {\n then: function (resolve, reject) {\n resolve(returnValue);\n }\n };\n return _thenable2;\n }\n }\n }\n}\n\nfunction popActScope(prevActScopeDepth) {\n {\n if (prevActScopeDepth !== actScopeDepth - 1) {\n error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');\n }\n\n actScopeDepth = prevActScopeDepth;\n }\n}\n\nfunction recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n if (queue.length === 0) {\n // No additional work was scheduled. Finish.\n ReactCurrentActQueue.current = null;\n resolve(returnValue);\n } else {\n // Keep flushing work until there's none left.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n }\n });\n } catch (error) {\n reject(error);\n }\n } else {\n resolve(returnValue);\n }\n }\n}\n\nvar isFlushing = false;\n\nfunction flushActQueue(queue) {\n {\n if (!isFlushing) {\n // Prevent re-entrance.\n isFlushing = true;\n var i = 0;\n\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n\n do {\n callback = callback(true);\n } while (callback !== null);\n }\n\n queue.length = 0;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n queue = queue.slice(i + 1);\n throw error;\n } finally {\n isFlushing = false;\n }\n }\n }\n}\n\nvar createElement$1 = createElementWithValidation ;\nvar cloneElement$1 = cloneElementWithValidation ;\nvar createFactory = createFactoryWithValidation ;\nvar Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.act = act;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.startTransition = startTransition;\nexports.unstable_act = act;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useDeferredValue = useDeferredValue;\nexports.useEffect = useEffect;\nexports.useId = useId;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useInsertionEffect = useInsertionEffect;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.useSyncExternalStore = useSyncExternalStore;\nexports.useTransition = useTransition;\nexports.version = ReactVersion;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import './_acf-jsx-names.js';\nimport './_acf-blocks.js';\n"],"names":["md5","require","$","undefined","BlockControls","InspectorControls","InnerBlocks","useBlockProps","AlignmentToolbar","BlockVerticalAlignmentToolbar","wp","blockEditor","ToolbarGroup","ToolbarButton","Placeholder","Spinner","components","Fragment","element","Component","React","useSelect","data","createHigherOrderComponent","compose","BlockAlignmentMatrixToolbar","__experimentalBlockAlignmentMatrixToolbar","BlockAlignmentMatrixControl","__experimentalBlockAlignmentMatrixControl","BlockFullHeightAlignmentControl","__experimentalBlockFullHeightAligmentControl","__experimentalBlockFullHeightAlignmentControl","useInnerBlocksProps","__experimentalUseInnerBlocksProps","blockTypes","acf","blockInstances","getBlockType","name","getBlockVersion","blockType","acf_block_version","blockSupportsValidation","validate","isBlockInQueryLoop","clientId","parents","select","getBlockParents","parentsData","getBlocksByClientId","filter","block","length","isSiteEditor","pagenow","isDesktopPreviewDeviceType","editPostStore","__experimentalGetPreviewDeviceType","getPreviewDeviceType","isEditingTemplate","isiFramedMobileDevicePreview","registerBlockType","allowedTypes","post_types","push","postType","get","includes","icon","substr","iconHTML","_jsx","Div","children","category","blocks","getCategories","slug","pop","parseArgs","title","api_version","key","attributes","default","supports","anchor","type","ThisBlockEdit","BlockEdit","ThisBlockSave","BlockSave","alignText","align_text","addBackCompatAttribute","withAlignTextComponent","alignContent","align_content","withAlignContentComponent","fullHeight","full_height","withFullHeightComponent","edit","props","useEffect","dispatch","unlockPostSaving","_objectSpread","save","result","selector","getBlocks","args","recurseBlocks","forEach","k","ajaxQueue","fetchCache","fetchBlock","context","query","delay","queueId","JSON","stringify","timeout","promise","Deferred","started","clearTimeout","setTimeout","resolve","apply","ajax","url","dataType","cache","prepareForAjax","action","always","done","arguments","fail","reject","compareObjects","obj1","obj2","parseJSX","html","acfBlockVersion","replace","parseNode","node","level","nodeName","parseNodeName","toLowerCase","nodeAttrs","ref","createRef","arrayArgs","map","parseNodeAttr","value","ACFInnerBlocks","childNodes","child","Text","text","textContent","createElement","getJSXName","replacement","isget","Script","className","innerBlockProps","nodeAttr","shortcut","applyFilters","css","split","s","pos","indexOf","ruleName","trim","ruleValue","charAt","strCamelCase","c1","parse","withDefaultAttributes","BlockListBlock","WrappedBlockEdit","constructor","Object","keys","upgrades","attribute","render","hooks","addFilter","Content","setup","restrictMode","modes","mode","setAttributes","forcePreview","showToggle","toggleText","__","toggleIcon","toggleMode","_jsxs","label","onClick","BlockForm","BlockBody","isSelected","index","rootClientId","getBlockRootClientId","getBlockIndex","showForm","additionalClasses","validation_errors","has_been_deselected","BlockPreview","dangerouslySetInnerHTML","__html","el","setHTML","componentDidUpdate","componentDidMount","DynamicHTML","setRef","bind","id","subscribed","renderMethod","passedValidation","loadState","fetch","maybePreload","blockId","form","debug","preloadedBlocks","modeText","replaceAll","validation","errors","error","input","client","state","setState","assign","setHtml","jsx","console","warn","Array","isArray","refElement","find","isValidElement","$el","shouldComponentUpdate","componentWillMove","display","$prevParent","parent","$thisParent","clone","getValidationErrors","isNotNewlyAdded","lockBlockForSaving","unlockBlockForSaving","componentDidAppend","componentDidRemount","prevProps","prevState","doAction","componentWillUnmount","hasShownValidation","shown_validation","setShownValidation","setValidationErrors","getMode","lockPostSaving","displayValidation","$formEl","hasClass","validator","getBlockFormValidator","clearErrors","addErrors","showErrors","has","update","set","validate_only","hash","createBlockAttributesHash","preloaded","nextProps","nextState","thisBlockForm","serializeData","silent","serialize","on","contextPostId","prevAttributes","prevContext","preview","replaceHtml","blockFormState","renderBlockPreviewEvent","nextAttributes","thisAttributes","blockElement","current","initialize","editor","addAction","validateVerticalAlignment","align","ALIGNMENTS","DEFAULT","validateHorizontalAlignment","validateMatrixAlignment","y","x","OriginalBlockEdit","AlignmentComponent","validateAlignment","onChangeAlignContent","group","onChange","onChangeAlignText","onToggleFullHeight","isActive","onToggle","new_attribute","sortObjectByKey","toSort","sort","reduce","acc","currValue","jQuery","jsxNameReplacements","accentheight","acceptcharset","accesskey","alignmentbaseline","allowedblocks","allowfullscreen","allowreorder","arabicform","attributename","attributetype","autocapitalize","autocomplete","autocorrect","autofocus","autoplay","autoreverse","autosave","basefrequency","baselineshift","baseprofile","calcmode","capheight","cellpadding","cellspacing","charset","class","classid","classname","clippath","clippathunits","cliprule","colorinterpolation","colorinterpolationfilters","colorprofile","colorrendering","colspan","contenteditable","contentscripttype","contentstyletype","contextmenu","controlslist","crossorigin","dangerouslysetinnerhtml","datetime","defaultchecked","defaultvalue","diffuseconstant","disablepictureinpicture","disableremoteplayback","dominantbaseline","edgemode","enablebackground","enctype","enterkeyhint","externalresourcesrequired","fillopacity","fillrule","filterres","filterunits","floodcolor","floodopacity","fontfamily","fontsize","fontsizeadjust","fontstretch","fontstyle","fontvariant","fontweight","for","foreignobject","formaction","formenctype","formmethod","formnovalidate","formtarget","frameborder","glyphname","glyphorientationhorizontal","glyphorientationvertical","glyphref","gradienttransform","gradientunits","horizadvx","horizoriginx","hreflang","htmlfor","httpequiv","imagerendering","innerhtml","inputmode","itemid","itemprop","itemref","itemscope","itemtype","kernelmatrix","kernelunitlength","keyparams","keypoints","keysplines","keytimes","keytype","lengthadjust","letterspacing","lightingcolor","limitingconeangle","marginheight","marginwidth","markerend","markerheight","markermid","markerstart","markerunits","markerwidth","maskcontentunits","maskunits","maxlength","mediagroup","minlength","nomodule","novalidate","numoctaves","overlineposition","overlinethickness","paintorder","pathlength","patterncontentunits","patterntransform","patternunits","playsinline","pointerevents","pointsatx","pointsaty","pointsatz","preservealpha","preserveaspectratio","primitiveunits","radiogroup","readonly","referrerpolicy","refx","refy","renderingintent","repeatcount","repeatdur","requiredextensions","requiredfeatures","rowspan","shaperendering","specularconstant","specularexponent","spellcheck","spreadmethod","srcdoc","srclang","srcset","startoffset","stddeviation","stitchtiles","stopcolor","stopopacity","strikethroughposition","strikethroughthickness","strokedasharray","strokedashoffset","strokelinecap","strokelinejoin","strokemiterlimit","strokeopacity","strokewidth","suppresscontenteditablewarning","suppresshydrationwarning","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","templatelock","textanchor","textdecoration","textlength","textrendering","underlineposition","underlinethickness","unicodebidi","unicoderange","unitsperem","usemap","valphabetic","vectoreffect","vertadvy","vertoriginx","vertoriginy","vhanging","videographic","viewbox","viewtarget","vmathematical","wordspacing","writingmode","xchannelselector","xheight","xlinkactuate","xlinkarcrole","xlinkhref","xlinkrole","xlinkshow","xlinktitle","xlinktype","xmlbase","xmllang","xmlnsxlink","xmlspace","ychannelselector","zoomandpan"],"sourceRoot":""} \ No newline at end of file diff --git a/wp/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/pro/acf-pro-blocks.min.js b/wp/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/pro/acf-pro-blocks.min.js index ffb295a6..9f9b79ae 100644 --- a/wp/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/pro/acf-pro-blocks.min.js +++ b/wp/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/pro/acf-pro-blocks.min.js @@ -1 +1 @@ -(()=>{var e={138:()=>{jQuery,acf.jsxNameReplacements={"accent-height":"accentHeight",accentheight:"accentHeight","accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey","alignment-baseline":"alignmentBaseline",alignmentbaseline:"alignmentBaseline",allowedblocks:"allowedBlocks",allowfullscreen:"allowFullScreen",allowreorder:"allowReorder","arabic-form":"arabicForm",arabicform:"arabicForm",attributename:"attributeName",attributetype:"attributeType",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autoreverse:"autoReverse",autosave:"autoSave",basefrequency:"baseFrequency","baseline-shift":"baselineShift",baselineshift:"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode","cap-height":"capHeight",capheight:"capHeight",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className","clip-path":"clipPath","clip-rule":"clipRule",clippath:"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","color-interpolation":"colorInterpolation","color-interpolation-filters":"colorInterpolationFilters","color-profile":"colorProfile","color-rendering":"colorRendering",colorinterpolation:"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters",colorprofile:"colorProfile",colorrendering:"colorRendering",colspan:"colSpan",contenteditable:"contentEditable",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",diffuseconstant:"diffuseConstant",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback","dominant-baseline":"dominantBaseline",dominantbaseline:"dominantBaseline",edgemode:"edgeMode","enable-background":"enableBackground",enablebackground:"enableBackground",enctype:"encType",enterkeyhint:"enterKeyHint",externalresourcesrequired:"externalResourcesRequired","fill-opacity":"fillOpacity","fill-rule":"fillRule",fillopacity:"fillOpacity",fillrule:"fillRule",filterres:"filterRes",filterunits:"filterUnits","flood-color":"floodColor","flood-opacity":"floodOpacity",floodcolor:"floodColor",floodopacity:"floodOpacity","font-family":"fontFamily","font-size":"fontSize","font-size-adjust":"fontSizeAdjust","font-stretch":"fontStretch","font-style":"fontStyle","font-variant":"fontVariant","font-weight":"fontWeight",fontfamily:"fontFamily",fontsize:"fontSize",fontsizeadjust:"fontSizeAdjust",fontstretch:"fontStretch",fontstyle:"fontStyle",fontvariant:"fontVariant",fontweight:"fontWeight",for:"htmlFor",foreignobject:"foreignObject",formaction:"formAction",formenctype:"formEncType",formmethod:"formMethod",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder","glyph-name":"glyphName","glyph-orientation-horizontal":"glyphOrientationHorizontal","glyph-orientation-vertical":"glyphOrientationVertical",glyphname:"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits","horiz-adv-x":"horizAdvX","horiz-origin-x":"horizOriginX",horizadvx:"horizAdvX",horizoriginx:"horizOriginX",hreflang:"hrefLang",htmlfor:"htmlFor","http-equiv":"httpEquiv",httpequiv:"httpEquiv","image-rendering":"imageRendering",imagerendering:"imageRendering",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keyparams:"keyParams",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",keytype:"keyType",lengthadjust:"lengthAdjust","letter-spacing":"letterSpacing",letterspacing:"letterSpacing","lighting-color":"lightingColor",lightingcolor:"lightingColor",limitingconeangle:"limitingConeAngle",marginheight:"marginHeight",marginwidth:"marginWidth","marker-end":"markerEnd","marker-mid":"markerMid","marker-start":"markerStart",markerend:"markerEnd",markerheight:"markerHeight",markermid:"markerMid",markerstart:"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",numoctaves:"numOctaves","overline-position":"overlinePosition","overline-thickness":"overlineThickness",overlineposition:"overlinePosition",overlinethickness:"overlineThickness","paint-order":"paintOrder",paintorder:"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",playsinline:"playsInline","pointer-events":"pointerEvents",pointerevents:"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",refx:"refX",refy:"refY","rendering-intent":"renderingIntent",renderingintent:"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",rowspan:"rowSpan","shape-rendering":"shapeRendering",shaperendering:"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spellcheck:"spellCheck",spreadmethod:"spreadMethod",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles","stop-color":"stopColor","stop-opacity":"stopOpacity",stopcolor:"stopColor",stopopacity:"stopOpacity","strikethrough-position":"strikethroughPosition","strikethrough-thickness":"strikethroughThickness",strikethroughposition:"strikethroughPosition",strikethroughthickness:"strikethroughThickness","stroke-dasharray":"strokeDasharray","stroke-dashoffset":"strokeDashoffset","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","stroke-miterlimit":"strokeMiterlimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth",strokedasharray:"strokeDasharray",strokedashoffset:"strokeDashoffset",strokelinecap:"strokeLinecap",strokelinejoin:"strokeLinejoin",strokemiterlimit:"strokeMiterlimit",strokeopacity:"strokeOpacity",strokewidth:"strokeWidth",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tabindex:"tabIndex",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",templatelock:"templateLock","text-anchor":"textAnchor","text-decoration":"textDecoration","text-rendering":"textRendering",textanchor:"textAnchor",textdecoration:"textDecoration",textlength:"textLength",textrendering:"textRendering","underline-position":"underlinePosition","underline-thickness":"underlineThickness",underlineposition:"underlinePosition",underlinethickness:"underlineThickness","unicode-bidi":"unicodeBidi","unicode-range":"unicodeRange",unicodebidi:"unicodeBidi",unicoderange:"unicodeRange","units-per-em":"unitsPerEm",unitsperem:"unitsPerEm",usemap:"useMap","v-alphabetic":"vAlphabetic","v-hanging":"vHanging","v-ideographic":"vIdeographic","v-mathematical":"vMathematical",valphabetic:"vAlphabetic","vector-effect":"vectorEffect",vectoreffect:"vectorEffect","vert-adv-y":"vertAdvY","vert-origin-x":"vertOriginX","vert-origin-y":"vertOriginY",vertadvy:"vertAdvY",vertoriginx:"vertOriginX",vertoriginy:"vertOriginY",vhanging:"vHanging",videographic:"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","word-spacing":"wordSpacing",wordspacing:"wordSpacing","writing-mode":"writingMode",writingmode:"writingMode","x-height":"xHeight",xchannelselector:"xChannelSelector",xheight:"xHeight","xlink:actuate":"xlinkActuate","xlink:arcrole":"xlinkArcrole","xlink:href":"xlinkHref","xlink:role":"xlinkRole","xlink:show":"xlinkShow","xlink:title":"xlinkTitle","xlink:type":"xlinkType",xlinkactuate:"xlinkActuate",xlinkarcrole:"xlinkArcrole",xlinkhref:"xlinkHref",xlinkrole:"xlinkRole",xlinkshow:"xlinkShow",xlinktitle:"xlinkTitle",xlinktype:"xlinkType","xml:base":"xmlBase","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlbase:"xmlBase",xmllang:"xmlLang","xmlns:xlink":"xmlnsXlink",xmlnsxlink:"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"}},151:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r{var t,r;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r>>6*(3-i)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,o=0;n>>6-2*o);return r}},e.exports=r},206:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},503:(e,t,r)=>{var n,o,i,s,a;n=r(939),o=r(151).utf8,i=r(206),s=r(151).bin,(a=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?s.stringToBytes(e):o.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var r=n.bytesToWords(e),c=8*e.length,l=1732584193,u=-271733879,p=-1732584194,d=271733878,f=0;f>>24)|4278255360&(r[f]<<24|r[f]>>>8);r[c>>>5]|=128<>>9<<4)]=c;var h=a._ff,m=a._gg,g=a._hh,y=a._ii;for(f=0;f>>0,u=u+k>>>0,p=p+v>>>0,d=d+x>>>0}return n.endian([l,u,p,d])})._ff=function(e,t,r,n,o,i,s){var a=e+(t&r|~t&n)+(o>>>0)+s;return(a<>>32-i)+t},a._gg=function(e,t,r,n,o,i,s){var a=e+(t&n|r&~n)+(o>>>0)+s;return(a<>>32-i)+t},a._hh=function(e,t,r,n,o,i,s){var a=e+(t^r^n)+(o>>>0)+s;return(a<>>32-i)+t},a._ii=function(e,t,r,n,o,i,s){var a=e+(r^(t|~n))+(o>>>0)+s;return(a<>>32-i)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(a(e,t));return t&&t.asBytes?r:t&&t.asString?s.bytesToString(r):n.bytesToHex(r)}},20:(e,t,r)=>{"use strict";var n=r(540),o=Symbol.for("react.element"),i=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var n,c={},l=null,u=null;for(n in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,n)&&!a.hasOwnProperty(n)&&(c[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===c[n]&&(c[n]=t[n]);return{$$typeof:o,type:e,key:l,ref:u,props:c,_owner:s.current}}t.jsx=c,t.jsxs=c},287:(e,t)=>{"use strict";var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator,h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function y(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||h}function b(){}function k(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||h}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=y.prototype;var v=k.prototype=new b;v.constructor=k,m(v,y.prototype),v.isPureReactComponent=!0;var x=Array.isArray,w=Object.prototype.hasOwnProperty,_={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function j(e,t,n){var o,i={},s=null,a=null;if(null!=t)for(o in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)w.call(t,o)&&!S.hasOwnProperty(o)&&(i[o]=t[o]);var c=arguments.length-2;if(1===c)i.children=n;else if(1{"use strict";e.exports=r(287)},848:(e,t,r)=>{"use strict";e.exports=r(20)}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,r,n){return(r=function(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}r(138);var n=r(848);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var r=1;r{const{BlockControls:r,InspectorControls:o,InnerBlocks:a,useBlockProps:c,AlignmentToolbar:l,BlockVerticalAlignmentToolbar:u}=wp.blockEditor,{ToolbarGroup:p,ToolbarButton:d,Placeholder:f,Spinner:h}=wp.components,{Fragment:m}=wp.element,{Component:g}=React,{useSelect:y}=wp.data,{createHigherOrderComponent:b}=wp.compose,k=wp.blockEditor.__experimentalBlockAlignmentMatrixToolbar||wp.blockEditor.BlockAlignmentMatrixToolbar,v=wp.blockEditor.__experimentalBlockAlignmentMatrixControl||wp.blockEditor.BlockAlignmentMatrixControl,x=wp.blockEditor.__experimentalBlockFullHeightAligmentControl||wp.blockEditor.__experimentalBlockFullHeightAlignmentControl||wp.blockEditor.BlockFullHeightAlignmentControl,w=wp.blockEditor.__experimentalUseInnerBlocksProps||wp.blockEditor.useInnerBlocksProps,_={};function S(e){return _[e]||!1}function j(e){return S(e).acf_block_version||1}function A(e){return S(e).validate}function I(e){const t=wp.data.select("core/block-editor").getBlockParents(e);return wp.data.select("core/block-editor").getBlocksByClientId(t).filter((e=>"core/query"===e.name)).length}function T(){return"string"==typeof pagenow&&"site-editor"===pagenow}function C(){const e=B("core/edit-post");return!!e&&!!e.isEditingTemplate&&e.isEditingTemplate()}function O(){return e("iframe[name=editor-canvas]").length&&!function(){const e=B("core/edit-post");return!e||(e.__experimentalGetPreviewDeviceType?"Desktop"===e.__experimentalGetPreviewDeviceType():!e.getPreviewDeviceType||"Desktop"===e.getPreviewDeviceType())}()}function E(e){const o=e.post_types||[];if(o.length){o.push("wp_block");const e=acf.get("postType");if(!o.includes(e))return!1}if("string"==typeof e.icon&&"t===e.category)).pop()||(e.category="common"),e=acf.parseArgs(e,{title:"",name:"",category:"",api_version:2,acf_block_version:1});for(const t in e.attributes)"default"in e.attributes[t]&&0===e.attributes[t].default.length&&delete e.attributes[t].default;e.supports.anchor&&(e.attributes.anchor={type:"string"});let s=U,a=L;var c;(e.supports.alignText||e.supports.align_text)&&(e.attributes=Z(e.attributes,"align_text","string"),s=function(e,t){const o=Q;return t.alignText=o(t.alignText),class extends g{render(){const{attributes:t,setAttributes:s}=this.props,{alignText:a}=t;return(0,n.jsxs)(m,{children:[(0,n.jsx)(r,{group:"block",children:(0,n.jsx)(l,{value:o(a),onChange:function(e){s({alignText:o(e)})}})}),(0,n.jsx)(e,i({},this.props))]})}}}(s,e)),(e.supports.alignContent||e.supports.align_content)&&(e.attributes=Z(e.attributes,"align_content","string"),s=function(e,o){let s,a,c=o.supports.align_content||o.supports.alignContent;return"matrix"===c?(s=v||k,a=K):(s=u,a=G),s===t?(console.warn(`The "${c}" alignment component was not found.`),e):(o.alignContent=a(o.alignContent),class extends g{render(){const{attributes:t,setAttributes:o}=this.props,{alignContent:c}=t;return(0,n.jsxs)(m,{children:[(0,n.jsx)(r,{group:"block",children:(0,n.jsx)(s,{label:acf.__("Change content alignment"),value:a(c),onChange:function(e){o({alignContent:a(e)})}})}),(0,n.jsx)(e,i({},this.props))]})}})}(s,e)),(e.supports.fullHeight||e.supports.full_height)&&(e.attributes=Z(e.attributes,"full_height","boolean"),c=s,e.blockType,s=x?class extends g{render(){const{attributes:e,setAttributes:t}=this.props,{fullHeight:o}=e;return(0,n.jsxs)(m,{children:[(0,n.jsx)(r,{group:"block",children:(0,n.jsx)(x,{isActive:o,onToggle:function(e){t({fullHeight:e})}})}),(0,n.jsx)(c,i({},this.props))]})}}:c),e.edit=e=>(wp.element.useEffect((()=>()=>{wp.data.dispatch("core/editor")&&wp.data.dispatch("core/editor").unlockPostSaving("acf/block/"+e.clientId)}),[]),(0,n.jsx)(s,i({},e))),e.save=()=>(0,n.jsx)(a,{}),_[e.name]=e;const p=wp.blocks.registerBlockType(e.name,e);return p.attributes.anchor&&(p.attributes.anchor={type:"string"}),p}function B(e){return"core/block-editor"===e?wp.data.select("core/block-editor")||wp.data.select("core/editor"):wp.data.select(e)}acf.blockInstances={};const P={},R={};function D(t){const{attributes:r={},context:n={},query:o={},clientId:a=null,delay:c=0}=t,l=s(JSON.stringify(i(i(i({},r),n),o))),u=P[l]||{query:{},timeout:!1,promise:e.Deferred(),started:!1};return u.query=i(i({},u.query),o),u.started||(clearTimeout(u.timeout),u.timeout=setTimeout((()=>{u.started=!0,R[l]?(P[l]=null,u.promise.resolve.apply(R[l][0],R[l][1])):e.ajax({url:acf.get("ajaxurl"),dataType:"json",type:"post",cache:!1,data:acf.prepareForAjax({action:"acf/ajax/fetch-block",block:JSON.stringify(r),clientId:a,context:JSON.stringify(n),query:u.query})}).always((()=>{P[l]=null})).done((function(){R[l]=[this,arguments],u.promise.resolve.apply(this,arguments)})).fail((function(){u.promise.reject.apply(this,arguments)}))}),c),P[l]=u),u.promise}function $(e,t){return JSON.stringify(e)===JSON.stringify(t)}function F(e,t,r=0){const o=function(e,t){switch(e){case"innerblocks":return t<2?a:"ACFInnerBlocks";case"script":return W;case"#comment":return null;default:e=N(e)}return e}(e.nodeName.toLowerCase(),t);if(!o)return null;const s={};if(1===r&&"ACFInnerBlocks"!==o&&(s.ref=React.createRef()),acf.arrayArgs(e.attributes).map(H).forEach((({name:e,value:t})=>{s[e]=t})),"ACFInnerBlocks"===o)return(0,n.jsx)(M,i({},s));const c=[o,s];return acf.arrayArgs(e.childNodes).forEach((e=>{if(e instanceof Text){const t=e.textContent;t&&c.push(t)}else c.push(F(e,t,r+1))})),React.createElement.apply(this,c)}function N(e){return acf.isget(acf,"jsxNameReplacements",e)||e}function M(e){const{className:t="acf-innerblocks-container"}=e,r=w({className:t},e);return(0,n.jsx)("div",i(i({},r),{},{children:r.children}))}function H(e){let t=e.name,r=e.value,n=acf.applyFilters("acf_blocks_parse_node_attr",!1,e);if(n)return n;switch(t){case"class":t="className";break;case"style":const e={};r.split(";").forEach((t=>{const r=t.indexOf(":");if(r>0){let n=t.substr(0,r).trim();const o=t.substr(r+1).trim();"-"!==n.charAt(0)&&(n=acf.strCamelCase(n)),e[n]=o}})),r=e;break;default:if(0===t.indexOf("data-"))break;t=N(t);const n=r.charAt(0);"["!==n&&"{"!==n||(r=JSON.parse(r)),"true"!==r&&"false"!==r||(r="true"===r)}return{name:t,value:r}}acf.parseJSX=(t,r)=>(t=(t="
"+t+"
").replace(/]+)?\/>/,""),F(e(t)[0],r,0).props.children);const V=b((e=>class extends g{constructor(e){super(e);const{name:r,attributes:n}=this.props,o=S(r);if(!o)return;Object.keys(n).forEach((e=>{""===n[e]&&delete n[e]}));const i={full_height:"fullHeight",align_content:"alignContent",align_text:"alignText"};Object.keys(i).forEach((e=>{n[e]!==t?n[i[e]]=n[e]:n[i[e]]===t&&o[e]!==t&&(n[i[e]]=o[e]),delete o[e],delete n[e]}));for(let e in o.attributes)n[e]===t&&o[e]!==t&&(n[e]=o[e])}render(){return(0,n.jsx)(e,i({},this.props))}}),"withDefaultAttributes");function L(){return(0,n.jsx)(a.Content,{})}wp.hooks.addFilter("editor.BlockListBlock","acf/with-default-attributes",V);class U extends g{constructor(e){super(e),this.setup()}setup(){const{name:e,attributes:t,clientId:r}=this.props,n=S(e);function o(e){e.includes(t.mode)||(t.mode=e[0])}if(I(r)||T()||O()||C())o(["preview"]);else switch(n.mode){case"edit":o(["edit","preview"]);break;case"preview":o(["preview","edit"]);break;default:o(["auto"])}}render(){const{name:e,attributes:t,setAttributes:s,clientId:a}=this.props,c=S(e),l=I(a)||T()||O()||C();let{mode:u}=t;l&&(u="preview");let f=c.supports.mode;("auto"===u||l)&&(f=!1);const h="preview"===u?acf.__("Switch to Edit"):acf.__("Switch to Preview"),g="preview"===u?"edit":"welcome-view-site";return(0,n.jsxs)(m,{children:[(0,n.jsx)(r,{children:f&&(0,n.jsx)(p,{children:(0,n.jsx)(d,{className:"components-icon-button components-toolbar__control",label:h,icon:g,onClick:function(){s({mode:"preview"===u?"edit":"preview"})}})})}),(0,n.jsx)(o,{children:"preview"===u&&(0,n.jsx)("div",{className:"acf-block-component acf-block-panel",children:(0,n.jsx)(J,i({},this.props))})}),(0,n.jsx)(z,i({},this.props))]})}}function z(e){const{attributes:t,isSelected:r,name:o,clientId:s}=e,{mode:a}=t,l=y((e=>{const t=e("core/block-editor").getBlockRootClientId(s);return e("core/block-editor").getBlockIndex(s,t)}));let u=!0,p="acf-block-component acf-block-body";return("auto"===a&&!r||"preview"===a)&&(p+=" acf-block-preview",u=!1),s in acf.blockInstances||(acf.blockInstances[s]={validation_errors:!1,mode:a}),acf.blockInstances[s].mode=a,r||(A(o)&&acf.blockInstances[s].validation_errors&&(p+=" acf-block-has-validation-error"),acf.blockInstances[s].has_been_deselected=!0),j(o)>1?(0,n.jsx)("div",i(i({},c({className:p})),{},{children:u?(0,n.jsx)(J,i(i({},e),{},{index:l})):(0,n.jsx)(Y,i(i({},e),{},{index:l}))})):(0,n.jsx)("div",i(i({},c()),{},{children:(0,n.jsx)("div",{className:"acf-block-component acf-block-body",children:u?(0,n.jsx)(J,i(i({},e),{},{index:l})):(0,n.jsx)(Y,i(i({},e),{},{index:l}))})}))}class q extends g{render(){return(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:this.props.children}})}}class W extends g{render(){return(0,n.jsx)("div",{ref:e=>this.el=e})}setHTML(t){e(this.el).html(`'); - } elseif ($format === 'js') { + } elseif ($format === self::FORMAT_JS) { static::writeOutput(static::generateScript()); } static::resetStatic(); } } - public function close() + public function close() : void { self::resetStatic(); } public function reset() { + parent::reset(); self::resetStatic(); } /** * Forget all logged records */ - public static function resetStatic() + public static function resetStatic() : void { - static::$records = array(); + static::$records = []; } /** * Wrapper for register_shutdown_function to allow overriding */ - protected function registerShutdownFunction() + protected function registerShutdownFunction() : void { if (\PHP_SAPI !== 'cli') { - \register_shutdown_function(array('WPMailSMTP\\Vendor\\Monolog\\Handler\\BrowserConsoleHandler', 'send')); + \register_shutdown_function(['WPMailSMTP\\Vendor\\Monolog\\Handler\\BrowserConsoleHandler', 'send']); } } /** * Wrapper for echo to allow overriding - * - * @param string $str */ - protected static function writeOutput($str) + protected static function writeOutput(string $str) : void { echo $str; } @@ -106,59 +121,75 @@ class BrowserConsoleHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractP * If Content-Type is anything else -> unknown * * @return string One of 'js', 'html' or 'unknown' + * @phpstan-return self::FORMAT_* */ - protected static function getResponseFormat() + protected static function getResponseFormat() : string { // Check content type foreach (\headers_list() as $header) { if (\stripos($header, 'content-type:') === 0) { - // This handler only works with HTML and javascript outputs - // text/javascript is obsolete in favour of application/javascript, but still used - if (\stripos($header, 'application/javascript') !== \false || \stripos($header, 'text/javascript') !== \false) { - return 'js'; - } - if (\stripos($header, 'text/html') === \false) { - return 'unknown'; - } - break; + return static::getResponseFormatFromContentType($header); } } - return 'html'; + return self::FORMAT_HTML; } - private static function generateScript() + /** + * @return string One of 'js', 'html' or 'unknown' + * @phpstan-return self::FORMAT_* + */ + protected static function getResponseFormatFromContentType(string $contentType) : string { - $script = array(); + // This handler only works with HTML and javascript outputs + // text/javascript is obsolete in favour of application/javascript, but still used + if (\stripos($contentType, 'application/javascript') !== \false || \stripos($contentType, 'text/javascript') !== \false) { + return self::FORMAT_JS; + } + if (\stripos($contentType, 'text/html') !== \false) { + return self::FORMAT_HTML; + } + return self::FORMAT_UNKNOWN; + } + private static function generateScript() : string + { + $script = []; foreach (static::$records as $record) { $context = static::dump('Context', $record['context']); $extra = static::dump('Extra', $record['extra']); if (empty($context) && empty($extra)) { - $script[] = static::call_array('log', static::handleStyles($record['formatted'])); + $script[] = static::call_array(static::getConsoleMethodForLevel($record['level']), static::handleStyles($record['formatted'])); } else { - $script = \array_merge($script, array(static::call_array('groupCollapsed', static::handleStyles($record['formatted']))), $context, $extra, array(static::call('groupEnd'))); + $script = \array_merge($script, [static::call_array('groupCollapsed', static::handleStyles($record['formatted']))], $context, $extra, [static::call('groupEnd')]); } } return "(function (c) {if (c && c.groupCollapsed) {\n" . \implode("\n", $script) . "\n}})(console);"; } - private static function handleStyles($formatted) + private static function getConsoleMethodForLevel(int $level) : string { - $args = array(); + return [\WPMailSMTP\Vendor\Monolog\Logger::DEBUG => 'debug', \WPMailSMTP\Vendor\Monolog\Logger::INFO => 'info', \WPMailSMTP\Vendor\Monolog\Logger::NOTICE => 'info', \WPMailSMTP\Vendor\Monolog\Logger::WARNING => 'warn', \WPMailSMTP\Vendor\Monolog\Logger::ERROR => 'error', \WPMailSMTP\Vendor\Monolog\Logger::CRITICAL => 'error', \WPMailSMTP\Vendor\Monolog\Logger::ALERT => 'error', \WPMailSMTP\Vendor\Monolog\Logger::EMERGENCY => 'error'][$level] ?? 'log'; + } + /** + * @return string[] + */ + private static function handleStyles(string $formatted) : array + { + $args = []; $format = '%c' . $formatted; \preg_match_all('/\\[\\[(.*?)\\]\\]\\{([^}]*)\\}/s', $format, $matches, \PREG_OFFSET_CAPTURE | \PREG_SET_ORDER); foreach (\array_reverse($matches) as $match) { $args[] = '"font-weight: normal"'; $args[] = static::quote(static::handleCustomStyles($match[2][0], $match[1][0])); $pos = $match[0][1]; - $format = \substr($format, 0, $pos) . '%c' . $match[1][0] . '%c' . \substr($format, $pos + \strlen($match[0][0])); + $format = \WPMailSMTP\Vendor\Monolog\Utils::substr($format, 0, $pos) . '%c' . $match[1][0] . '%c' . \WPMailSMTP\Vendor\Monolog\Utils::substr($format, $pos + \strlen($match[0][0])); } $args[] = static::quote('font-weight: normal'); $args[] = static::quote($format); return \array_reverse($args); } - private static function handleCustomStyles($style, $string) + private static function handleCustomStyles(string $style, string $string) : string { - static $colors = array('blue', 'green', 'red', 'magenta', 'orange', 'black', 'grey'); - static $labels = array(); - return \preg_replace_callback('/macro\\s*:(.*?)(?:;|$)/', function ($m) use($string, &$colors, &$labels) { + static $colors = ['blue', 'green', 'red', 'magenta', 'orange', 'black', 'grey']; + static $labels = []; + $style = \preg_replace_callback('/macro\\s*:(.*?)(?:;|$)/', function (array $m) use($string, &$colors, &$labels) { if (\trim($m[1]) === 'autolabel') { // Format the string as a label with consistent auto assigned background color if (!isset($labels[$string])) { @@ -169,10 +200,19 @@ class BrowserConsoleHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractP } return $m[1]; }, $style); + if (null === $style) { + $pcreErrorCode = \preg_last_error(); + throw new \RuntimeException('Failed to run preg_replace_callback: ' . $pcreErrorCode . ' / ' . \WPMailSMTP\Vendor\Monolog\Utils::pcreLastErrorMessage($pcreErrorCode)); + } + return $style; } - private static function dump($title, array $dict) + /** + * @param mixed[] $dict + * @return mixed[] + */ + private static function dump(string $title, array $dict) : array { - $script = array(); + $script = []; $dict = \array_filter($dict); if (empty($dict)) { return $script; @@ -183,21 +223,29 @@ class BrowserConsoleHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractP if (empty($value)) { $value = static::quote(''); } - $script[] = static::call('log', static::quote('%s: %o'), static::quote($key), $value); + $script[] = static::call('log', static::quote('%s: %o'), static::quote((string) $key), $value); } return $script; } - private static function quote($arg) + private static function quote(string $arg) : string { return '"' . \addcslashes($arg, "\"\n\\") . '"'; } - private static function call() + /** + * @param mixed $args + */ + private static function call(...$args) : string { - $args = \func_get_args(); $method = \array_shift($args); + if (!\is_string($method)) { + throw new \UnexpectedValueException('Expected the first arg to be a string, got: ' . \var_export($method, \true)); + } return static::call_array($method, $args); } - private static function call_array($method, array $args) + /** + * @param mixed[] $args + */ + private static function call_array(string $method, array $args) : string { return 'c.' . $method . '(' . \implode(', ', $args) . ');'; } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/BufferHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/BufferHandler.php index 7b7000ef..374f1e43 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/BufferHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/BufferHandler.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type Record from \Monolog\Logger */ -class BufferHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler +class BufferHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler implements \WPMailSMTP\Vendor\Monolog\Handler\ProcessableHandlerInterface, \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface { + use ProcessableHandlerTrait; + /** @var HandlerInterface */ protected $handler; + /** @var int */ protected $bufferSize = 0; + /** @var int */ protected $bufferLimit; + /** @var bool */ protected $flushOnOverflow; - protected $buffer = array(); + /** @var Record[] */ + protected $buffer = []; + /** @var bool */ protected $initialized = \false; /** * @param HandlerInterface $handler Handler. * @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not * @param bool $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded */ - public function __construct(\WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface $handler, $bufferLimit = 0, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true, $flushOnOverflow = \false) + public function __construct(\WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface $handler, int $bufferLimit = 0, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true, bool $flushOnOverflow = \false) { parent::__construct($level, $bubble); $this->handler = $handler; - $this->bufferLimit = (int) $bufferLimit; + $this->bufferLimit = $bufferLimit; $this->flushOnOverflow = $flushOnOverflow; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function handle(array $record) + public function handle(array $record) : bool { if ($record['level'] < $this->level) { return \false; } if (!$this->initialized) { // __destructor() doesn't get called on Fatal errors - \register_shutdown_function(array($this, 'close')); + \register_shutdown_function([$this, 'close']); $this->initialized = \true; } if ($this->bufferLimit > 0 && $this->bufferSize === $this->bufferLimit) { @@ -65,15 +73,14 @@ class BufferHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler } } if ($this->processors) { - foreach ($this->processors as $processor) { - $record = \call_user_func($processor, $record); - } + /** @var Record $record */ + $record = $this->processRecord($record); } $this->buffer[] = $record; $this->bufferSize++; return \false === $this->bubble; } - public function flush() + public function flush() : void { if ($this->bufferSize === 0) { return; @@ -88,41 +95,49 @@ class BufferHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler // GC'd until the end of the request } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function close() + public function close() : void { $this->flush(); + $this->handler->close(); } /** * Clears the buffer without flushing any messages down to the wrapped handler. */ - public function clear() + public function clear() : void { $this->bufferSize = 0; - $this->buffer = array(); + $this->buffer = []; } public function reset() { $this->flush(); parent::reset(); + $this->resetProcessors(); if ($this->handler instanceof \WPMailSMTP\Vendor\Monolog\ResettableInterface) { $this->handler->reset(); } } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) + public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface { - $this->handler->setFormatter($formatter); - return $this; + if ($this->handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface) { + $this->handler->setFormatter($formatter); + return $this; + } + throw new \UnexpectedValueException('The nested handler of type ' . \get_class($this->handler) . ' does not support formatters.'); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function getFormatter() + public function getFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { - return $this->handler->getFormatter(); + if ($this->handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface) { + return $this->handler->getFormatter(); + } + throw new \UnexpectedValueException('The nested handler of type ' . \get_class($this->handler) . ' does not support formatters.'); } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php index 6d195dcd..262687e5 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type Record from \Monolog\Logger */ class ChromePHPHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler { + use WebRequestRecognizerTrait; /** * Version of the extension */ - const VERSION = '4.0'; + protected const VERSION = '4.0'; /** * Header name */ - const HEADER_NAME = 'X-ChromeLogger-Data'; + protected const HEADER_NAME = 'X-ChromeLogger-Data'; /** * Regular expression to detect supported browsers (matches any Chrome, or Firefox 43+) */ - const USER_AGENT_REGEX = '{\\b(?:Chrome/\\d+(?:\\.\\d+)*|HeadlessChrome|Firefox/(?:4[3-9]|[5-9]\\d|\\d{3,})(?:\\.\\d)*)\\b}'; + protected const USER_AGENT_REGEX = '{\\b(?:Chrome/\\d+(?:\\.\\d+)*|HeadlessChrome|Firefox/(?:4[3-9]|[5-9]\\d|\\d{3,})(?:\\.\\d)*)\\b}'; + /** @var bool */ protected static $initialized = \false; /** * Tracks whether we sent too much data @@ -43,13 +49,11 @@ class ChromePHPHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProces * @var bool */ protected static $overflowed = \false; - protected static $json = array('version' => self::VERSION, 'columns' => array('label', 'log', 'backtrace', 'type'), 'rows' => array()); + /** @var mixed[] */ + protected static $json = ['version' => self::VERSION, 'columns' => ['label', 'log', 'backtrace', 'type'], 'rows' => []]; + /** @var bool */ protected static $sendHeaders = \true; - /** - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true) + public function __construct($level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true) { parent::__construct($level, $bubble); if (!\function_exists('json_encode')) { @@ -57,16 +61,21 @@ class ChromePHPHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProces } } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function handleBatch(array $records) + public function handleBatch(array $records) : void { - $messages = array(); + if (!$this->isWebRequest()) { + return; + } + $messages = []; foreach ($records as $record) { if ($record['level'] < $this->level) { continue; } - $messages[] = $this->processRecord($record); + /** @var Record $message */ + $message = $this->processRecord($record); + $messages[] = $message; } if (!empty($messages)) { $messages = $this->getFormatter()->formatBatch($messages); @@ -77,7 +86,7 @@ class ChromePHPHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProces /** * {@inheritDoc} */ - protected function getDefaultFormatter() + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { return new \WPMailSMTP\Vendor\Monolog\Formatter\ChromePHPFormatter(); } @@ -86,10 +95,12 @@ class ChromePHPHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProces * * @see sendHeader() * @see send() - * @param array $record */ - protected function write(array $record) + protected function write(array $record) : void { + if (!$this->isWebRequest()) { + return; + } self::$json['rows'][] = $record['formatted']; $this->send(); } @@ -98,7 +109,7 @@ class ChromePHPHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProces * * @see sendHeader() */ - protected function send() + protected function send() : void { if (self::$overflowed || !self::$sendHeaders) { return; @@ -109,28 +120,25 @@ class ChromePHPHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProces if (!self::$sendHeaders) { return; } - self::$json['request_uri'] = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; + self::$json['request_uri'] = $_SERVER['REQUEST_URI'] ?? ''; } - $json = \WPMailSMTP\Vendor\Monolog\Utils::jsonEncode(self::$json, null, \true); - $data = \base64_encode(\utf8_encode($json)); + $json = \WPMailSMTP\Vendor\Monolog\Utils::jsonEncode(self::$json, \WPMailSMTP\Vendor\Monolog\Utils::DEFAULT_JSON_FLAGS & ~\JSON_UNESCAPED_UNICODE, \true); + $data = \base64_encode($json); if (\strlen($data) > 3 * 1024) { self::$overflowed = \true; - $record = array('message' => 'Incomplete logs, chrome header size limit reached', 'context' => array(), 'level' => \WPMailSMTP\Vendor\Monolog\Logger::WARNING, 'level_name' => \WPMailSMTP\Vendor\Monolog\Logger::getLevelName(\WPMailSMTP\Vendor\Monolog\Logger::WARNING), 'channel' => 'monolog', 'datetime' => new \DateTime(), 'extra' => array()); + $record = ['message' => 'Incomplete logs, chrome header size limit reached', 'context' => [], 'level' => \WPMailSMTP\Vendor\Monolog\Logger::WARNING, 'level_name' => \WPMailSMTP\Vendor\Monolog\Logger::getLevelName(\WPMailSMTP\Vendor\Monolog\Logger::WARNING), 'channel' => 'monolog', 'datetime' => new \DateTimeImmutable(), 'extra' => []]; self::$json['rows'][\count(self::$json['rows']) - 1] = $this->getFormatter()->format($record); - $json = \WPMailSMTP\Vendor\Monolog\Utils::jsonEncode(self::$json, null, \true); - $data = \base64_encode(\utf8_encode($json)); + $json = \WPMailSMTP\Vendor\Monolog\Utils::jsonEncode(self::$json, \WPMailSMTP\Vendor\Monolog\Utils::DEFAULT_JSON_FLAGS & ~\JSON_UNESCAPED_UNICODE, \true); + $data = \base64_encode($json); } if (\trim($data) !== '') { - $this->sendHeader(self::HEADER_NAME, $data); + $this->sendHeader(static::HEADER_NAME, $data); } } /** * Send header string to the client - * - * @param string $header - * @param string $content */ - protected function sendHeader($header, $content) + protected function sendHeader(string $header, string $content) : void { if (!\headers_sent() && self::$sendHeaders) { \header(\sprintf('%s: %s', $header, $content)); @@ -138,34 +146,12 @@ class ChromePHPHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProces } /** * Verifies if the headers are accepted by the current user agent - * - * @return bool */ - protected function headersAccepted() + protected function headersAccepted() : bool { if (empty($_SERVER['HTTP_USER_AGENT'])) { return \false; } - return \preg_match(self::USER_AGENT_REGEX, $_SERVER['HTTP_USER_AGENT']); - } - /** - * BC getter for the sendHeaders property that has been made static - */ - public function __get($property) - { - if ('sendHeaders' !== $property) { - throw new \InvalidArgumentException('Undefined property ' . $property); - } - return static::$sendHeaders; - } - /** - * BC setter for the sendHeaders property that has been made static - */ - public function __set($property, $value) - { - if ('sendHeaders' !== $property) { - throw new \InvalidArgumentException('Undefined property ' . $property); - } - static::$sendHeaders = $value; + return \preg_match(static::USER_AGENT_REGEX, $_SERVER['HTTP_USER_AGENT']) === 1; } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php index 243e7d51..fe8bdf21 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php @@ -1,5 +1,6 @@ options = \array_merge(array('host' => 'localhost', 'port' => 5984, 'dbname' => 'logger', 'username' => null, 'password' => null), $options); + $this->options = \array_merge(['host' => 'localhost', 'port' => 5984, 'dbname' => 'logger', 'username' => null, 'password' => null], $options); parent::__construct($level, $bubble); } /** * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { $basicAuth = null; if ($this->options['username']) { $basicAuth = \sprintf('%s:%s@', $this->options['username'], $this->options['password']); } $url = 'http://' . $basicAuth . $this->options['host'] . ':' . $this->options['port'] . '/' . $this->options['dbname']; - $context = \stream_context_create(array('http' => array('method' => 'POST', 'content' => $record['formatted'], 'ignore_errors' => \true, 'max_redirects' => 0, 'header' => 'Content-type: application/json'))); - if (\false === @\file_get_contents($url, null, $context)) { + $context = \stream_context_create(['http' => ['method' => 'POST', 'content' => $record['formatted'], 'ignore_errors' => \true, 'max_redirects' => 0, 'header' => 'Content-type: application/json']]); + if (\false === @\file_get_contents($url, \false, $context)) { throw new \RuntimeException(\sprintf('Could not connect to %s', $url)); } } /** * {@inheritDoc} */ - protected function getDefaultFormatter() + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { return new \WPMailSMTP\Vendor\Monolog\Formatter\JsonFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\JsonFormatter::BATCH_MODE_JSON, \false); } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/CubeHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/CubeHandler.php index f63a6023..cb665df4 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/CubeHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/CubeHandler.php @@ -1,5 +1,6 @@ + * @deprecated Since 2.8.0 and 3.2.0, Cube appears abandoned and thus we will drop this handler in Monolog 4 */ class CubeHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler { - private $udpConnection; - private $httpConnection; + /** @var resource|\Socket|null */ + private $udpConnection = null; + /** @var resource|\CurlHandle|null */ + private $httpConnection = null; + /** @var string */ private $scheme; + /** @var string */ private $host; + /** @var int */ private $port; - private $acceptedSchemes = array('http', 'udp'); + /** @var string[] */ + private $acceptedSchemes = ['http', 'udp']; /** * Create a Cube handler * @@ -33,10 +41,10 @@ class CubeHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingH * A valid url must consist of three parts : protocol://host:port * Only valid protocols used by Cube are http and udp */ - public function __construct($url, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true) + public function __construct(string $url, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true) { $urlInfo = \parse_url($url); - if (!isset($urlInfo['scheme'], $urlInfo['host'], $urlInfo['port'])) { + if ($urlInfo === \false || !isset($urlInfo['scheme'], $urlInfo['host'], $urlInfo['port'])) { throw new \UnexpectedValueException('URL "' . $url . '" is not valid'); } if (!\in_array($urlInfo['scheme'], $this->acceptedSchemes)) { @@ -44,7 +52,7 @@ class CubeHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingH } $this->scheme = $urlInfo['scheme']; $this->host = $urlInfo['host']; - $this->port = $urlInfo['port']; + $this->port = (int) $urlInfo['port']; parent::__construct($level, $bubble); } /** @@ -53,42 +61,46 @@ class CubeHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingH * @throws \LogicException when unable to connect to the socket * @throws MissingExtensionException when there is no socket extension */ - protected function connectUdp() + protected function connectUdp() : void { if (!\extension_loaded('sockets')) { throw new \WPMailSMTP\Vendor\Monolog\Handler\MissingExtensionException('The sockets extension is required to use udp URLs with the CubeHandler'); } - $this->udpConnection = \socket_create(\AF_INET, \SOCK_DGRAM, 0); - if (!$this->udpConnection) { + $udpConnection = \socket_create(\AF_INET, \SOCK_DGRAM, 0); + if (\false === $udpConnection) { throw new \LogicException('Unable to create a socket'); } + $this->udpConnection = $udpConnection; if (!\socket_connect($this->udpConnection, $this->host, $this->port)) { throw new \LogicException('Unable to connect to the socket at ' . $this->host . ':' . $this->port); } } /** - * Establish a connection to a http server - * @throws \LogicException when no curl extension + * Establish a connection to an http server + * + * @throws \LogicException when unable to connect to the socket + * @throws MissingExtensionException when no curl extension */ - protected function connectHttp() + protected function connectHttp() : void { if (!\extension_loaded('curl')) { - throw new \LogicException('The curl extension is needed to use http URLs with the CubeHandler'); + throw new \WPMailSMTP\Vendor\Monolog\Handler\MissingExtensionException('The curl extension is required to use http URLs with the CubeHandler'); } - $this->httpConnection = \curl_init('http://' . $this->host . ':' . $this->port . '/1.0/event/put'); - if (!$this->httpConnection) { + $httpConnection = \curl_init('http://' . $this->host . ':' . $this->port . '/1.0/event/put'); + if (\false === $httpConnection) { throw new \LogicException('Unable to connect to ' . $this->host . ':' . $this->port); } + $this->httpConnection = $httpConnection; \curl_setopt($this->httpConnection, \CURLOPT_CUSTOMREQUEST, "POST"); \curl_setopt($this->httpConnection, \CURLOPT_RETURNTRANSFER, \true); } /** - * {@inheritdoc} + * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { $date = $record['datetime']; - $data = array('time' => $date->format('Y-m-d\\TH:i:s.uO')); + $data = ['time' => $date->format('Y-m-d\\TH:i:s.uO')]; unset($record['datetime']); if (isset($record['context']['type'])) { $data['type'] = $record['context']['type']; @@ -104,20 +116,23 @@ class CubeHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingH $this->writeUdp(\WPMailSMTP\Vendor\Monolog\Utils::jsonEncode($data)); } } - private function writeUdp($data) + private function writeUdp(string $data) : void { if (!$this->udpConnection) { $this->connectUdp(); } \socket_send($this->udpConnection, $data, \strlen($data), 0); } - private function writeHttp($data) + private function writeHttp(string $data) : void { if (!$this->httpConnection) { $this->connectHttp(); } + if (null === $this->httpConnection) { + throw new \LogicException('No connection could be established'); + } \curl_setopt($this->httpConnection, \CURLOPT_POSTFIELDS, '[' . $data . ']'); - \curl_setopt($this->httpConnection, \CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Content-Length: ' . \strlen('[' . $data . ']'))); + \curl_setopt($this->httpConnection, \CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Content-Length: ' . \strlen('[' . $data . ']')]); \WPMailSMTP\Vendor\Monolog\Handler\Curl\Util::execute($this->httpConnection, 5, \false); } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Curl/Util.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Curl/Util.php index 8d4353de..17e0a1ec 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Curl/Util.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Curl/Util.php @@ -1,5 +1,6 @@ */ + private static $retriableErrorCodes = [\CURLE_COULDNT_RESOLVE_HOST, \CURLE_COULDNT_CONNECT, \CURLE_HTTP_NOT_FOUND, \CURLE_READ_ERROR, \CURLE_OPERATION_TIMEOUTED, \CURLE_HTTP_POST_ERROR, \CURLE_SSL_CONNECT_ERROR]; /** * Executes a CURL request with optional retries and exception on failure * - * @param resource $ch curl handler - * @throws \RuntimeException + * @param resource|CurlHandle $ch curl handler + * @param int $retries + * @param bool $closeAfterDone + * @return bool|string @see curl_exec */ - public static function execute($ch, $retries = 5, $closeAfterDone = \true) + public static function execute($ch, int $retries = 5, bool $closeAfterDone = \true) { while ($retries--) { - if (\curl_exec($ch) === \false) { + $curlResponse = \curl_exec($ch); + if ($curlResponse === \false) { $curlErrno = \curl_errno($ch); if (\false === \in_array($curlErrno, self::$retriableErrorCodes, \true) || !$retries) { $curlError = \curl_error($ch); if ($closeAfterDone) { \curl_close($ch); } - throw new \RuntimeException(\sprintf('Curl error (code %s): %s', $curlErrno, $curlError)); + throw new \RuntimeException(\sprintf('Curl error (code %d): %s', $curlErrno, $curlError)); } continue; } if ($closeAfterDone) { \curl_close($ch); } - break; + return $curlResponse; } + return \false; } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php index 7aa80465..1897e3e0 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type Record from \Monolog\Logger + * @phpstan-import-type LevelName from \Monolog\Logger + * @phpstan-import-type Level from \Monolog\Logger */ class DeduplicationHandler extends \WPMailSMTP\Vendor\Monolog\Handler\BufferHandler { @@ -38,7 +44,7 @@ class DeduplicationHandler extends \WPMailSMTP\Vendor\Monolog\Handler\BufferHand */ protected $deduplicationStore; /** - * @var int + * @var Level */ protected $deduplicationLevel; /** @@ -52,18 +58,20 @@ class DeduplicationHandler extends \WPMailSMTP\Vendor\Monolog\Handler\BufferHand /** * @param HandlerInterface $handler Handler. * @param string $deduplicationStore The file/path where the deduplication log should be kept - * @param int $deduplicationLevel The minimum logging level for log records to be looked at for deduplication purposes + * @param string|int $deduplicationLevel The minimum logging level for log records to be looked at for deduplication purposes * @param int $time The period (in seconds) during which duplicate entries should be suppressed after a given log is sent through * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * + * @phpstan-param Level|LevelName|LogLevel::* $deduplicationLevel */ - public function __construct(\WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface $handler, $deduplicationStore = null, $deduplicationLevel = \WPMailSMTP\Vendor\Monolog\Logger::ERROR, $time = 60, $bubble = \true) + public function __construct(\WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface $handler, ?string $deduplicationStore = null, $deduplicationLevel = \WPMailSMTP\Vendor\Monolog\Logger::ERROR, int $time = 60, bool $bubble = \true) { parent::__construct($handler, 0, \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble, \false); $this->deduplicationStore = $deduplicationStore === null ? \sys_get_temp_dir() . '/monolog-dedup-' . \substr(\md5(__FILE__), 0, 20) . '.log' : $deduplicationStore; $this->deduplicationLevel = \WPMailSMTP\Vendor\Monolog\Logger::toMonologLevel($deduplicationLevel); $this->time = $time; } - public function flush() + public function flush() : void { if ($this->bufferSize === 0) { return; @@ -86,7 +94,10 @@ class DeduplicationHandler extends \WPMailSMTP\Vendor\Monolog\Handler\BufferHand $this->collectLogs(); } } - private function isDuplicate(array $record) + /** + * @phpstan-param Record $record + */ + private function isDuplicate(array $record) : bool { if (!\file_exists($this->deduplicationStore)) { return \false; @@ -109,18 +120,21 @@ class DeduplicationHandler extends \WPMailSMTP\Vendor\Monolog\Handler\BufferHand } return \false; } - private function collectLogs() + private function collectLogs() : void { if (!\file_exists($this->deduplicationStore)) { - return \false; + return; } $handle = \fopen($this->deduplicationStore, 'rw+'); + if (!$handle) { + throw new \RuntimeException('Failed to open file for reading and writing: ' . $this->deduplicationStore); + } \flock($handle, \LOCK_EX); - $validLogs = array(); + $validLogs = []; $timestampValidity = \time() - $this->time; while (!\feof($handle)) { $log = \fgets($handle); - if (\substr($log, 0, 10) >= $timestampValidity) { + if ($log && \substr($log, 0, 10) >= $timestampValidity) { $validLogs[] = $log; } } @@ -133,7 +147,10 @@ class DeduplicationHandler extends \WPMailSMTP\Vendor\Monolog\Handler\BufferHand \fclose($handle); $this->gc = \false; } - private function appendRecord(array $record) + /** + * @phpstan-param Record $record + */ + private function appendRecord(array $record) : void { \file_put_contents($this->deduplicationStore, $record['datetime']->getTimestamp() . ':' . $record['level_name'] . ':' . \preg_replace('{[\\r\\n].*}', '', $record['message']) . "\n", \FILE_APPEND); } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php index b72f6a41..ac5ccda2 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php @@ -1,5 +1,6 @@ client = $client; parent::__construct($level, $bubble); @@ -29,11 +32,11 @@ class DoctrineCouchDBHandler extends \WPMailSMTP\Vendor\Monolog\Handler\Abstract /** * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { $this->client->postDocument($record['formatted']); } - protected function getDefaultFormatter() + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { return new \WPMailSMTP\Vendor\Monolog\Formatter\NormalizerFormatter(); } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php index f4f118b6..86e85428 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php @@ -1,5 +1,6 @@ =')) { $this->version = 3; $this->marshaler = new \WPMailSMTP\Vendor\Aws\DynamoDb\Marshaler(); @@ -59,9 +56,9 @@ class DynamoDbHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcess parent::__construct($level, $bubble); } /** - * {@inheritdoc} + * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { $filtered = $this->filterEmptyFields($record['formatted']); if ($this->version === 3) { @@ -70,22 +67,22 @@ class DynamoDbHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcess /** @phpstan-ignore-next-line */ $formatted = $this->client->formatAttributes($filtered); } - $this->client->putItem(array('TableName' => $this->table, 'Item' => $formatted)); + $this->client->putItem(['TableName' => $this->table, 'Item' => $formatted]); } /** - * @param array $record - * @return array + * @param mixed[] $record + * @return mixed[] */ - protected function filterEmptyFields(array $record) + protected function filterEmptyFields(array $record) : array { return \array_filter($record, function ($value) { return !empty($value) || \false === $value || 0 === $value; }); } /** - * {@inheritdoc} + * {@inheritDoc} */ - protected function getDefaultFormatter() + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { return new \WPMailSMTP\Vendor\Monolog\Formatter\ScalarFormatter(self::DATE_FORMAT); } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php similarity index 64% rename from wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php rename to wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php index 82d8f57e..981472c5 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php @@ -1,5 +1,6 @@ 'elastic_index_name', - * 'type' => 'elastic_doc_type', + * 'type' => 'elastic_doc_type', Types have been removed in Elastica 7 * ); - * $handler = new ElasticSearchHandler($client, $options); + * $handler = new ElasticaHandler($client, $options); * $log = new Logger('application'); * $log->pushHandler($handler); * * @author Jelle Vink */ -class ElasticSearchHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler +class ElasticaHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler { /** * @var Client */ protected $client; /** - * @var array Handler config options + * @var mixed[] Handler config options */ - protected $options = array(); + protected $options = []; /** - * @param Client $client Elastica Client object - * @param array $options Handler configuration - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param Client $client Elastica Client object + * @param mixed[] $options Handler configuration */ - public function __construct(\WPMailSMTP\Vendor\Elastica\Client $client, array $options = array(), $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true) + public function __construct(\WPMailSMTP\Vendor\Elastica\Client $client, array $options = [], $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true) { parent::__construct($level, $bubble); $this->client = $client; - $this->options = \array_merge(array( + $this->options = \array_merge([ 'index' => 'monolog', // Elastic index name 'type' => 'record', // Elastic document type 'ignore_error' => \false, - ), $options); + ], $options); } /** * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { - $this->bulkSend(array($record['formatted'])); + $this->bulkSend([$record['formatted']]); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) + public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface { if ($formatter instanceof \WPMailSMTP\Vendor\Monolog\Formatter\ElasticaFormatter) { return parent::setFormatter($formatter); } - throw new \InvalidArgumentException('ElasticSearchHandler is only compatible with ElasticaFormatter'); + throw new \InvalidArgumentException('ElasticaHandler is only compatible with ElasticaFormatter'); } /** - * Getter options - * @return array + * @return mixed[] */ - public function getOptions() + public function getOptions() : array { return $this->options; } /** * {@inheritDoc} */ - protected function getDefaultFormatter() + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { return new \WPMailSMTP\Vendor\Monolog\Formatter\ElasticaFormatter($this->options['index'], $this->options['type']); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function handleBatch(array $records) + public function handleBatch(array $records) : void { $documents = $this->getFormatter()->formatBatch($records); $this->bulkSend($documents); } /** * Use Elasticsearch bulk API to send list of documents - * @param array $documents + * + * @param Document[] $documents + * * @throws \RuntimeException */ - protected function bulkSend(array $documents) + protected function bulkSend(array $documents) : void { try { $this->client->addDocuments($documents); diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php index 9cadc7f5..0983a87b 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php @@ -1,5 +1,6 @@ expandNewlines = $expandNewlines; } /** - * @return array With all available types + * @return int[] With all available types */ - public static function getAvailableTypes() + public static function getAvailableTypes() : array { - return array(self::OPERATING_SYSTEM, self::SAPI); + return [self::OPERATING_SYSTEM, self::SAPI]; } /** * {@inheritDoc} */ - protected function getDefaultFormatter() + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { return new \WPMailSMTP\Vendor\Monolog\Formatter\LineFormatter('[%datetime%] %channel%.%level_name%: %message% %context% %extra%'); } /** - * {@inheritdoc} + * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { - if ($this->expandNewlines) { - $lines = \preg_split('{[\\r\\n]+}', (string) $record['formatted']); - foreach ($lines as $line) { - \error_log($line, $this->messageType); - } - } else { + if (!$this->expandNewlines) { \error_log((string) $record['formatted'], $this->messageType); + return; + } + $lines = \preg_split('{[\\r\\n]+}', (string) $record['formatted']); + if ($lines === \false) { + $pcreErrorCode = \preg_last_error(); + throw new \RuntimeException('Failed to preg_split formatted string: ' . $pcreErrorCode . ' / ' . \WPMailSMTP\Vendor\Monolog\Utils::pcreLastErrorMessage($pcreErrorCode)); + } + foreach ($lines as $line) { + \error_log($line, $this->messageType); } } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php new file mode 100644 index 00000000..c7651063 --- /dev/null +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace WPMailSMTP\Vendor\Monolog\Handler; + +use Throwable; +/** + * Forwards records to at most one handler + * + * If a handler fails, the exception is suppressed and the record is forwarded to the next handler. + * + * As soon as one handler handles a record successfully, the handling stops there. + * + * @phpstan-import-type Record from \Monolog\Logger + */ +class FallbackGroupHandler extends \WPMailSMTP\Vendor\Monolog\Handler\GroupHandler +{ + /** + * {@inheritDoc} + */ + public function handle(array $record) : bool + { + if ($this->processors) { + /** @var Record $record */ + $record = $this->processRecord($record); + } + foreach ($this->handlers as $handler) { + try { + $handler->handle($record); + break; + } catch (\Throwable $e) { + // What throwable? + } + } + return \false === $this->bubble; + } + /** + * {@inheritDoc} + */ + public function handleBatch(array $records) : void + { + if ($this->processors) { + $processed = []; + foreach ($records as $record) { + $processed[] = $this->processRecord($record); + } + /** @var Record[] $records */ + $records = $processed; + } + foreach ($this->handlers as $handler) { + try { + $handler->handleBatch($records); + break; + } catch (\Throwable $e) { + // What throwable? + } + } + } +} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FilterHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FilterHandler.php index 88089c83..119c441c 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FilterHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FilterHandler.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type Record from \Monolog\Logger + * @phpstan-import-type Level from \Monolog\Logger + * @phpstan-import-type LevelName from \Monolog\Logger */ -class FilterHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler +class FilterHandler extends \WPMailSMTP\Vendor\Monolog\Handler\Handler implements \WPMailSMTP\Vendor\Monolog\Handler\ProcessableHandlerInterface, \WPMailSMTP\Vendor\Monolog\ResettableInterface, \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface { + use ProcessableHandlerTrait; /** * Handler or factory callable($record, $this) * - * @var callable|\Monolog\Handler\HandlerInterface + * @var callable|HandlerInterface + * @phpstan-var callable(?Record, HandlerInterface): HandlerInterface|HandlerInterface */ protected $handler; /** * Minimum level for logs that are passed to handler * * @var int[] + * @phpstan-var array */ protected $acceptedLevels; /** @@ -41,12 +51,17 @@ class FilterHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler */ protected $bubble; /** + * @psalm-param HandlerInterface|callable(?Record, HandlerInterface): HandlerInterface $handler + * * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $filterHandler). * @param int|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided - * @param int $maxLevel Maximum level to accept, only used if $minLevelOrList is not an array + * @param int|string $maxLevel Maximum level to accept, only used if $minLevelOrList is not an array * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * + * @phpstan-param Level|LevelName|LogLevel::*|array $minLevelOrList + * @phpstan-param Level|LevelName|LogLevel::* $maxLevel */ - public function __construct($handler, $minLevelOrList = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $maxLevel = \WPMailSMTP\Vendor\Monolog\Logger::EMERGENCY, $bubble = \true) + public function __construct($handler, $minLevelOrList = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $maxLevel = \WPMailSMTP\Vendor\Monolog\Logger::EMERGENCY, bool $bubble = \true) { $this->handler = $handler; $this->bubble = $bubble; @@ -56,17 +71,20 @@ class FilterHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler } } /** - * @return array + * @phpstan-return array */ - public function getAcceptedLevels() + public function getAcceptedLevels() : array { return \array_flip($this->acceptedLevels); } /** * @param int|string|array $minLevelOrList A list of levels to accept or a minimum level or level name if maxLevel is provided * @param int|string $maxLevel Maximum level or level name to accept, only used if $minLevelOrList is not an array + * + * @phpstan-param Level|LevelName|LogLevel::*|array $minLevelOrList + * @phpstan-param Level|LevelName|LogLevel::* $maxLevel */ - public function setAcceptedLevels($minLevelOrList = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $maxLevel = \WPMailSMTP\Vendor\Monolog\Logger::EMERGENCY) + public function setAcceptedLevels($minLevelOrList = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $maxLevel = \WPMailSMTP\Vendor\Monolog\Logger::EMERGENCY) : self { if (\is_array($minLevelOrList)) { $acceptedLevels = \array_map('WPMailSMTP\\Vendor\\Monolog\\Logger::toMonologLevel', $minLevelOrList); @@ -78,36 +96,36 @@ class FilterHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler })); } $this->acceptedLevels = \array_flip($acceptedLevels); + return $this; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function isHandling(array $record) + public function isHandling(array $record) : bool { return isset($this->acceptedLevels[$record['level']]); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function handle(array $record) + public function handle(array $record) : bool { if (!$this->isHandling($record)) { return \false; } if ($this->processors) { - foreach ($this->processors as $processor) { - $record = \call_user_func($processor, $record); - } + /** @var Record $record */ + $record = $this->processRecord($record); } $this->getHandler($record)->handle($record); return \false === $this->bubble; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function handleBatch(array $records) + public function handleBatch(array $records) : void { - $filtered = array(); + $filtered = []; foreach ($records as $record) { if ($this->isHandling($record)) { $filtered[] = $record; @@ -123,11 +141,13 @@ class FilterHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler * If the handler was provided as a factory callable, this will trigger the handler's instantiation. * * @return HandlerInterface + * + * @phpstan-param Record $record */ - public function getHandler(array $record = null) + public function getHandler(?array $record = null) { if (!$this->handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface) { - $this->handler = \call_user_func($this->handler, $record, $this); + $this->handler = ($this->handler)($record, $this); if (!$this->handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface) { throw new \RuntimeException("The factory callable should return a HandlerInterface"); } @@ -135,18 +155,33 @@ class FilterHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler return $this->handler; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) + public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface { - $this->getHandler()->setFormatter($formatter); - return $this; + $handler = $this->getHandler(); + if ($handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface) { + $handler->setFormatter($formatter); + return $this; + } + throw new \UnexpectedValueException('The nested handler of type ' . \get_class($handler) . ' does not support formatters.'); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function getFormatter() + public function getFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { - return $this->getHandler()->getFormatter(); + $handler = $this->getHandler(); + if ($handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface) { + return $handler->getFormatter(); + } + throw new \UnexpectedValueException('The nested handler of type ' . \get_class($handler) . ' does not support formatters.'); + } + public function reset() + { + $this->resetProcessors(); + if ($this->getHandler() instanceof \WPMailSMTP\Vendor\Monolog\ResettableInterface) { + $this->getHandler()->reset(); + } } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php index 23a6ee9b..180fa387 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type Record from \Monolog\Logger */ interface ActivationStrategyInterface { /** * Returns whether the given record activates the handler. * - * @param array $record - * @return bool + * @phpstan-param Record $record */ - public function isHandlerActivated(array $record); + public function isHandlerActivated(array $record) : bool; } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php index 627d799a..62de1333 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php @@ -1,5 +1,6 @@ * * @author Mike Meessen + * + * @phpstan-import-type Record from \Monolog\Logger + * @phpstan-import-type Level from \Monolog\Logger + * @phpstan-import-type LevelName from \Monolog\Logger */ class ChannelLevelActivationStrategy implements \WPMailSMTP\Vendor\Monolog\Handler\FingersCrossed\ActivationStrategyInterface { + /** + * @var Level + */ private $defaultActionLevel; + /** + * @var array + */ private $channelToActionLevel; /** - * @param int $defaultActionLevel The default action level to be used if the record's category doesn't match any - * @param array $channelToActionLevel An array that maps channel names to action levels. + * @param int|string $defaultActionLevel The default action level to be used if the record's category doesn't match any + * @param array $channelToActionLevel An array that maps channel names to action levels. + * + * @phpstan-param array $channelToActionLevel + * @phpstan-param Level|LevelName|LogLevel::* $defaultActionLevel */ - public function __construct($defaultActionLevel, $channelToActionLevel = array()) + public function __construct($defaultActionLevel, array $channelToActionLevel = []) { $this->defaultActionLevel = \WPMailSMTP\Vendor\Monolog\Logger::toMonologLevel($defaultActionLevel); $this->channelToActionLevel = \array_map('WPMailSMTP\\Vendor\\Monolog\\Logger::toMonologLevel', $channelToActionLevel); } - public function isHandlerActivated(array $record) + /** + * @phpstan-param Record $record + */ + public function isHandlerActivated(array $record) : bool { if (isset($this->channelToActionLevel[$record['channel']])) { return $record['level'] >= $this->channelToActionLevel[$record['channel']]; diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php index 4f9cff8e..0ca1b112 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type Level from \Monolog\Logger + * @phpstan-import-type LevelName from \Monolog\Logger */ class ErrorLevelActivationStrategy implements \WPMailSMTP\Vendor\Monolog\Handler\FingersCrossed\ActivationStrategyInterface { + /** + * @var Level + */ private $actionLevel; + /** + * @param int|string $actionLevel Level or name or value + * + * @phpstan-param Level|LevelName|LogLevel::* $actionLevel + */ public function __construct($actionLevel) { $this->actionLevel = \WPMailSMTP\Vendor\Monolog\Logger::toMonologLevel($actionLevel); } - public function isHandlerActivated(array $record) + public function isHandlerActivated(array $record) : bool { return $record['level'] >= $this->actionLevel; } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php index 8514dcd2..2b2d4b97 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type Record from \Monolog\Logger + * @phpstan-import-type Level from \Monolog\Logger + * @phpstan-import-type LevelName from \Monolog\Logger */ -class FingersCrossedHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler +class FingersCrossedHandler extends \WPMailSMTP\Vendor\Monolog\Handler\Handler implements \WPMailSMTP\Vendor\Monolog\Handler\ProcessableHandlerInterface, \WPMailSMTP\Vendor\Monolog\ResettableInterface, \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface { - protected $handler; - protected $activationStrategy; - protected $buffering = \true; - protected $bufferSize; - protected $buffer = array(); - protected $stopBuffering; - protected $passthruLevel; + use ProcessableHandlerTrait; /** - * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $fingersCrossedHandler). - * @param int|ActivationStrategyInterface $activationStrategy Strategy which determines when this handler takes action - * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param bool $stopBuffering Whether the handler should stop buffering after being triggered (default true) - * @param int $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered + * @var callable|HandlerInterface + * @phpstan-var callable(?Record, HandlerInterface): HandlerInterface|HandlerInterface */ - public function __construct($handler, $activationStrategy = null, $bufferSize = 0, $bubble = \true, $stopBuffering = \true, $passthruLevel = null) + protected $handler; + /** @var ActivationStrategyInterface */ + protected $activationStrategy; + /** @var bool */ + protected $buffering = \true; + /** @var int */ + protected $bufferSize; + /** @var Record[] */ + protected $buffer = []; + /** @var bool */ + protected $stopBuffering; + /** + * @var ?int + * @phpstan-var ?Level + */ + protected $passthruLevel; + /** @var bool */ + protected $bubble; + /** + * @psalm-param HandlerInterface|callable(?Record, HandlerInterface): HandlerInterface $handler + * + * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $fingersCrossedHandler). + * @param int|string|ActivationStrategyInterface $activationStrategy Strategy which determines when this handler takes action, or a level name/value at which the handler is activated + * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $stopBuffering Whether the handler should stop buffering after being triggered (default true) + * @param int|string $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered + * + * @phpstan-param Level|LevelName|LogLevel::* $passthruLevel + * @phpstan-param Level|LevelName|LogLevel::*|ActivationStrategyInterface $activationStrategy + */ + public function __construct($handler, $activationStrategy = null, int $bufferSize = 0, bool $bubble = \true, bool $stopBuffering = \true, $passthruLevel = null) { if (null === $activationStrategy) { $activationStrategy = new \WPMailSMTP\Vendor\Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy(\WPMailSMTP\Vendor\Monolog\Logger::WARNING); @@ -66,32 +97,31 @@ class FingersCrossedHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractH } } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function isHandling(array $record) + public function isHandling(array $record) : bool { return \true; } /** * Manually activate this logger regardless of the activation strategy */ - public function activate() + public function activate() : void { if ($this->stopBuffering) { $this->buffering = \false; } $this->getHandler(\end($this->buffer) ?: null)->handleBatch($this->buffer); - $this->buffer = array(); + $this->buffer = []; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function handle(array $record) + public function handle(array $record) : bool { if ($this->processors) { - foreach ($this->processors as $processor) { - $record = \call_user_func($processor, $record); - } + /** @var Record $record */ + $record = $this->processRecord($record); } if ($this->buffering) { $this->buffer[] = $record; @@ -107,16 +137,17 @@ class FingersCrossedHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractH return \false === $this->bubble; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function close() + public function close() : void { $this->flushBuffer(); + $this->getHandler()->close(); } public function reset() { $this->flushBuffer(); - parent::reset(); + $this->resetProcessors(); if ($this->getHandler() instanceof \WPMailSMTP\Vendor\Monolog\ResettableInterface) { $this->getHandler()->reset(); } @@ -126,15 +157,15 @@ class FingersCrossedHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractH * * It also resets the handler to its initial buffering state. */ - public function clear() + public function clear() : void { - $this->buffer = array(); + $this->buffer = []; $this->reset(); } /** * Resets the state of the handler. Stops forwarding records to the wrapped handler. */ - private function flushBuffer() + private function flushBuffer() : void { if (null !== $this->passthruLevel) { $level = $this->passthruLevel; @@ -142,10 +173,10 @@ class FingersCrossedHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractH return $record['level'] >= $level; }); if (\count($this->buffer) > 0) { - $this->getHandler(\end($this->buffer) ?: null)->handleBatch($this->buffer); + $this->getHandler(\end($this->buffer))->handleBatch($this->buffer); } } - $this->buffer = array(); + $this->buffer = []; $this->buffering = \true; } /** @@ -154,11 +185,13 @@ class FingersCrossedHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractH * If the handler was provided as a factory callable, this will trigger the handler's instantiation. * * @return HandlerInterface + * + * @phpstan-param Record $record */ - public function getHandler(array $record = null) + public function getHandler(?array $record = null) { if (!$this->handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface) { - $this->handler = \call_user_func($this->handler, $record, $this); + $this->handler = ($this->handler)($record, $this); if (!$this->handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface) { throw new \RuntimeException("The factory callable should return a HandlerInterface"); } @@ -166,18 +199,26 @@ class FingersCrossedHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractH return $this->handler; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) + public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface { - $this->getHandler()->setFormatter($formatter); - return $this; + $handler = $this->getHandler(); + if ($handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface) { + $handler->setFormatter($formatter); + return $this; + } + throw new \UnexpectedValueException('The nested handler of type ' . \get_class($handler) . ' does not support formatters.'); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function getFormatter() + public function getFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { - return $this->getHandler()->getFormatter(); + $handler = $this->getHandler(); + if ($handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface) { + return $handler->getFormatter(); + } + throw new \UnexpectedValueException('The nested handler of type ' . \get_class($handler) . ' does not support formatters.'); } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php index 72597ceb..bcb5371b 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type FormattedRecord from AbstractProcessingHandler */ class FirePHPHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler { + use WebRequestRecognizerTrait; /** * WildFire JSON header message format */ - const PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'; + protected const PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'; /** * FirePHP structure for parsing messages & their presentation */ - const STRUCTURE_URI = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'; + protected const STRUCTURE_URI = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'; /** * Must reference a "known" plugin, otherwise headers won't display in FirePHP */ - const PLUGIN_URI = 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3'; + protected const PLUGIN_URI = 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3'; /** * Header prefix for Wildfire to recognize & parse headers */ - const HEADER_PREFIX = 'X-Wf'; + protected const HEADER_PREFIX = 'X-Wf'; /** * Whether or not Wildfire vendor-specific headers have been generated & sent yet + * @var bool */ protected static $initialized = \false; /** @@ -43,36 +49,44 @@ class FirePHPHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessi * @var int */ protected static $messageIndex = 1; + /** @var bool */ protected static $sendHeaders = \true; /** * Base header creation function used by init headers & record headers * - * @param array $meta Wildfire Plugin, Protocol & Structure Indexes - * @param string $message Log message - * @return array Complete header string ready for the client as key and message as value + * @param array $meta Wildfire Plugin, Protocol & Structure Indexes + * @param string $message Log message + * + * @return array Complete header string ready for the client as key and message as value + * + * @phpstan-return non-empty-array */ - protected function createHeader(array $meta, $message) + protected function createHeader(array $meta, string $message) : array { - $header = \sprintf('%s-%s', self::HEADER_PREFIX, \join('-', $meta)); - return array($header => $message); + $header = \sprintf('%s-%s', static::HEADER_PREFIX, \join('-', $meta)); + return [$header => $message]; } /** * Creates message header from record * + * @return array + * + * @phpstan-return non-empty-array + * * @see createHeader() - * @param array $record - * @return array + * + * @phpstan-param FormattedRecord $record */ - protected function createRecordHeader(array $record) + protected function createRecordHeader(array $record) : array { // Wildfire is extensible to support multiple protocols & plugins in a single request, // but we're not taking advantage of that (yet), so we're using "1" for simplicity's sake. - return $this->createHeader(array(1, 1, 1, self::$messageIndex++), $record['formatted']); + return $this->createHeader([1, 1, 1, self::$messageIndex++], $record['formatted']); } /** * {@inheritDoc} */ - protected function getDefaultFormatter() + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { return new \WPMailSMTP\Vendor\Monolog\Formatter\WildfireFormatter(); } @@ -81,20 +95,18 @@ class FirePHPHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessi * * @see createHeader() * @see sendHeader() - * @return array + * + * @return array */ - protected function getInitHeaders() + protected function getInitHeaders() : array { // Initial payload consists of required headers for Wildfire - return \array_merge($this->createHeader(array('Protocol', 1), self::PROTOCOL_URI), $this->createHeader(array(1, 'Structure', 1), self::STRUCTURE_URI), $this->createHeader(array(1, 'Plugin', 1), self::PLUGIN_URI)); + return \array_merge($this->createHeader(['Protocol', 1], static::PROTOCOL_URI), $this->createHeader([1, 'Structure', 1], static::STRUCTURE_URI), $this->createHeader([1, 'Plugin', 1], static::PLUGIN_URI)); } /** * Send header string to the client - * - * @param string $header - * @param string $content */ - protected function sendHeader($header, $content) + protected function sendHeader(string $header, string $content) : void { if (!\headers_sent() && self::$sendHeaders) { \header(\sprintf('%s: %s', $header, $content)); @@ -105,11 +117,10 @@ class FirePHPHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessi * * @see sendHeader() * @see sendInitHeaders() - * @param array $record */ - protected function write(array $record) + protected function write(array $record) : void { - if (!self::$sendHeaders) { + if (!self::$sendHeaders || !$this->isWebRequest()) { return; } // WildFire-specific headers must be sent prior to any messages @@ -130,34 +141,12 @@ class FirePHPHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessi } /** * Verifies if the headers are accepted by the current user agent - * - * @return bool */ - protected function headersAccepted() + protected function headersAccepted() : bool { if (!empty($_SERVER['HTTP_USER_AGENT']) && \preg_match('{\\bFirePHP/\\d+\\.\\d+\\b}', $_SERVER['HTTP_USER_AGENT'])) { return \true; } return isset($_SERVER['HTTP_X_FIREPHP_VERSION']); } - /** - * BC getter for the sendHeaders property that has been made static - */ - public function __get($property) - { - if ('sendHeaders' !== $property) { - throw new \InvalidArgumentException('Undefined property ' . $property); - } - return static::$sendHeaders; - } - /** - * BC setter for the sendHeaders property that has been made static - */ - public function __set($property, $value) - { - if ('sendHeaders' !== $property) { - throw new \InvalidArgumentException('Undefined property ' . $property); - } - static::$sendHeaders = $value; - } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php index df78d3e7..9ff9872c 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type FormattedRecord from AbstractProcessingHandler */ class FleepHookHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler { - const FLEEP_HOST = 'fleep.io'; - const FLEEP_HOOK_URI = '/hook/'; + protected const FLEEP_HOST = 'fleep.io'; + protected const FLEEP_HOOK_URI = '/hook/'; /** * @var string Webhook token (specifies the conversation where logs are sent) */ @@ -35,18 +39,16 @@ class FleepHookHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler * see https://fleep.io/integrations/webhooks/ * * @param string $token Webhook token - * @param bool|int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not * @throws MissingExtensionException */ - public function __construct($token, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true) + public function __construct(string $token, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true, bool $persistent = \false, float $timeout = 0.0, float $writingTimeout = 10.0, ?float $connectionTimeout = null, ?int $chunkSize = null) { if (!\extension_loaded('openssl')) { throw new \WPMailSMTP\Vendor\Monolog\Handler\MissingExtensionException('The OpenSSL PHP extension is required to use the FleepHookHandler'); } $this->token = $token; - $connectionString = 'ssl://' . self::FLEEP_HOST . ':443'; - parent::__construct($connectionString, $level, $bubble); + $connectionString = 'ssl://' . static::FLEEP_HOST . ':443'; + parent::__construct($connectionString, $level, $bubble, $persistent, $timeout, $writingTimeout, $connectionTimeout, $chunkSize); } /** * Returns the default formatter to use with this handler @@ -55,41 +57,33 @@ class FleepHookHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler * * @return LineFormatter */ - protected function getDefaultFormatter() + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { return new \WPMailSMTP\Vendor\Monolog\Formatter\LineFormatter(null, null, \true, \true); } /** * Handles a log record - * - * @param array $record */ - public function write(array $record) + public function write(array $record) : void { parent::write($record); $this->closeSocket(); } /** - * {@inheritdoc} - * - * @param array $record - * @return string + * {@inheritDoc} */ - protected function generateDataStream($record) + protected function generateDataStream(array $record) : string { $content = $this->buildContent($record); return $this->buildHeader($content) . $content; } /** * Builds the header of the API Call - * - * @param string $content - * @return string */ - private function buildHeader($content) + private function buildHeader(string $content) : string { - $header = "POST " . self::FLEEP_HOOK_URI . $this->token . " HTTP/1.1\r\n"; - $header .= "Host: " . self::FLEEP_HOST . "\r\n"; + $header = "POST " . static::FLEEP_HOOK_URI . $this->token . " HTTP/1.1\r\n"; + $header .= "Host: " . static::FLEEP_HOST . "\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . \strlen($content) . "\r\n"; $header .= "\r\n"; @@ -98,12 +92,11 @@ class FleepHookHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler /** * Builds the body of API call * - * @param array $record - * @return string + * @phpstan-param FormattedRecord $record */ - private function buildContent($record) + private function buildContent(array $record) : string { - $dataArray = array('message' => $record['formatted']); + $dataArray = ['message' => $record['formatted']]; return \http_build_query($dataArray); } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php index 92c41c77..543035e8 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php @@ -1,5 +1,6 @@ * @see https://www.flowdock.com/api/push + * + * @phpstan-import-type FormattedRecord from AbstractProcessingHandler + * @deprecated Since 2.9.0 and 3.3.0, Flowdock was shutdown we will thus drop this handler in Monolog 4 */ class FlowdockHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler { @@ -32,24 +36,20 @@ class FlowdockHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler */ protected $apiToken; /** - * @param string $apiToken - * @param bool|int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * * @throws MissingExtensionException if OpenSSL is missing */ - public function __construct($apiToken, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true) + public function __construct(string $apiToken, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true, bool $persistent = \false, float $timeout = 0.0, float $writingTimeout = 10.0, ?float $connectionTimeout = null, ?int $chunkSize = null) { if (!\extension_loaded('openssl')) { throw new \WPMailSMTP\Vendor\Monolog\Handler\MissingExtensionException('The OpenSSL PHP extension is required to use the FlowdockHandler'); } - parent::__construct('ssl://api.flowdock.com:443', $level, $bubble); + parent::__construct('ssl://api.flowdock.com:443', $level, $bubble, $persistent, $timeout, $writingTimeout, $connectionTimeout, $chunkSize); $this->apiToken = $apiToken; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) + public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface { if (!$formatter instanceof \WPMailSMTP\Vendor\Monolog\Formatter\FlowdockFormatter) { throw new \InvalidArgumentException('The FlowdockHandler requires an instance of Monolog\\Formatter\\FlowdockFormatter to function correctly'); @@ -58,30 +58,23 @@ class FlowdockHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler } /** * Gets the default formatter. - * - * @return FormatterInterface */ - protected function getDefaultFormatter() + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { throw new \InvalidArgumentException('The FlowdockHandler must be configured (via setFormatter) with an instance of Monolog\\Formatter\\FlowdockFormatter to function correctly'); } /** - * {@inheritdoc} - * - * @param array $record + * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { parent::write($record); $this->closeSocket(); } /** - * {@inheritdoc} - * - * @param array $record - * @return string + * {@inheritDoc} */ - protected function generateDataStream($record) + protected function generateDataStream(array $record) : string { $content = $this->buildContent($record); return $this->buildHeader($content) . $content; @@ -89,20 +82,16 @@ class FlowdockHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler /** * Builds the body of API call * - * @param array $record - * @return string + * @phpstan-param FormattedRecord $record */ - private function buildContent($record) + private function buildContent(array $record) : string { return \WPMailSMTP\Vendor\Monolog\Utils::jsonEncode($record['formatted']['flowdock']); } /** * Builds the header of the API Call - * - * @param string $content - * @return string */ - private function buildHeader($content) + private function buildHeader(string $content) : string { $header = "POST /v1/messages/team_inbox/" . $this->apiToken . " HTTP/1.1\r\n"; $header .= "Host: api.flowdock.com\r\n"; diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php index bed65993..703b32fe 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php @@ -15,8 +15,6 @@ use WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface; /** * Interface to describe loggers that have a formatter * - * This interface is present in monolog 1.x to ease forward compatibility. - * * @author Jordi Boggiano */ interface FormattableHandlerInterface diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php index c881faf2..460b4cca 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php @@ -16,19 +16,16 @@ use WPMailSMTP\Vendor\Monolog\Formatter\LineFormatter; /** * Helper trait for implementing FormattableInterface * - * This trait is present in monolog 1.x to ease forward compatibility. - * * @author Jordi Boggiano */ trait FormattableHandlerTrait { /** - * @var FormatterInterface + * @var ?FormatterInterface */ protected $formatter; /** - * {@inheritdoc} - * @suppress PhanTypeMismatchReturn + * {@inheritDoc} */ public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface { @@ -36,7 +33,7 @@ trait FormattableHandlerTrait return $this; } /** - * {@inheritdoc} + * {@inheritDoc} */ public function getFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/GelfHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/GelfHandler.php index 229302f4..ceb9dbc1 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/GelfHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/GelfHandler.php @@ -1,5 +1,6 @@ publisher = $publisher; } /** - * {@inheritdoc} + * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { $this->publisher->publish($record['formatted']); } /** * {@inheritDoc} */ - protected function getDefaultFormatter() + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { return new \WPMailSMTP\Vendor\Monolog\Formatter\GelfMessageFormatter(); } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/GroupHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/GroupHandler.php index 136cbeea..44d37969 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/GroupHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/GroupHandler.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type Record from \Monolog\Logger */ -class GroupHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler +class GroupHandler extends \WPMailSMTP\Vendor\Monolog\Handler\Handler implements \WPMailSMTP\Vendor\Monolog\Handler\ProcessableHandlerInterface, \WPMailSMTP\Vendor\Monolog\ResettableInterface { + use ProcessableHandlerTrait; + /** @var HandlerInterface[] */ protected $handlers; + /** @var bool */ + protected $bubble; /** - * @param array $handlers Array of Handlers. - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param HandlerInterface[] $handlers Array of Handlers. + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ - public function __construct(array $handlers, $bubble = \true) + public function __construct(array $handlers, bool $bubble = \true) { foreach ($handlers as $handler) { if (!$handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface) { @@ -35,9 +42,9 @@ class GroupHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler $this->bubble = $bubble; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function isHandling(array $record) + public function isHandling(array $record) : bool { foreach ($this->handlers as $handler) { if ($handler->isHandling($record)) { @@ -47,14 +54,13 @@ class GroupHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler return \false; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function handle(array $record) + public function handle(array $record) : bool { if ($this->processors) { - foreach ($this->processors as $processor) { - $record = \call_user_func($processor, $record); - } + /** @var Record $record */ + $record = $this->processRecord($record); } foreach ($this->handlers as $handler) { $handler->handle($record); @@ -62,18 +68,16 @@ class GroupHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler return \false === $this->bubble; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function handleBatch(array $records) + public function handleBatch(array $records) : void { if ($this->processors) { - $processed = array(); + $processed = []; foreach ($records as $record) { - foreach ($this->processors as $processor) { - $record = \call_user_func($processor, $record); - } - $processed[] = $record; + $processed[] = $this->processRecord($record); } + /** @var Record[] $records */ $records = $processed; } foreach ($this->handlers as $handler) { @@ -82,20 +86,29 @@ class GroupHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler } public function reset() { - parent::reset(); + $this->resetProcessors(); foreach ($this->handlers as $handler) { if ($handler instanceof \WPMailSMTP\Vendor\Monolog\ResettableInterface) { $handler->reset(); } } } + public function close() : void + { + parent::close(); + foreach ($this->handlers as $handler) { + $handler->close(); + } + } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) + public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface { foreach ($this->handlers as $handler) { - $handler->setFormatter($formatter); + if ($handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface) { + $handler->setFormatter($formatter); + } } return $this; } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Handler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Handler.php new file mode 100644 index 00000000..53c997f6 --- /dev/null +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Handler.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace WPMailSMTP\Vendor\Monolog\Handler; + +/** + * Base Handler class providing basic close() support as well as handleBatch + * + * @author Jordi Boggiano + */ +abstract class Handler implements \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface +{ + /** + * {@inheritDoc} + */ + public function handleBatch(array $records) : void + { + foreach ($records as $record) { + $this->handle($record); + } + } + /** + * {@inheritDoc} + */ + public function close() : void + { + } + public function __destruct() + { + try { + $this->close(); + } catch (\Throwable $e) { + // do nothing + } + } + public function __sleep() + { + $this->close(); + $reflClass = new \ReflectionClass($this); + $keys = []; + foreach ($reflClass->getProperties() as $reflProp) { + if (!$reflProp->isStatic()) { + $keys[] = $reflProp->getName(); + } + } + return $keys; + } +} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HandlerInterface.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HandlerInterface.php index 7f6e8047..fc3d713f 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HandlerInterface.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HandlerInterface.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type Record from \Monolog\Logger + * @phpstan-import-type Level from \Monolog\Logger */ interface HandlerInterface { @@ -30,8 +33,10 @@ interface HandlerInterface * @param array $record Partial log record containing only a level key * * @return bool + * + * @phpstan-param array{level: Level} $record */ - public function isHandling(array $record); + public function isHandling(array $record) : bool; /** * Handles a record. * @@ -42,41 +47,36 @@ interface HandlerInterface * Unless the bubbling is interrupted (by returning true), the Logger class will keep on * calling further handlers in the stack with a given log record. * - * @param array $record The record to handle - * @return bool true means that this handler handled the record, and that bubbling is not permitted. - * false means the record was either not processed or that this handler allows bubbling. + * @param array $record The record to handle + * @return bool true means that this handler handled the record, and that bubbling is not permitted. + * false means the record was either not processed or that this handler allows bubbling. + * + * @phpstan-param Record $record */ - public function handle(array $record); + public function handle(array $record) : bool; /** * Handles a set of records at once. * * @param array $records The records to handle (an array of record arrays) - */ - public function handleBatch(array $records); - /** - * Adds a processor in the stack. * - * @param callable $callback - * @return self + * @phpstan-param Record[] $records */ - public function pushProcessor($callback); + public function handleBatch(array $records) : void; /** - * Removes the processor on top of the stack and returns it. + * Closes the handler. * - * @return callable - */ - public function popProcessor(); - /** - * Sets the formatter. + * Ends a log cycle and frees all resources used by the handler. * - * @param FormatterInterface $formatter - * @return self - */ - public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter); - /** - * Gets the formatter. + * Closing a Handler means flushing all buffers and freeing any open resources/handles. * - * @return FormatterInterface + * Implementations have to be idempotent (i.e. it should be possible to call close several times without breakage) + * and ideally handlers should be able to reopen themselves on handle() after they have been closed. + * + * This is useful at the end of a request and will be called automatically when the object + * is destroyed if you extend Monolog\Handler\Handler. + * + * If you are thinking of calling this method yourself, most likely you should be + * calling ResettableInterface::reset instead. Have a look. */ - public function getFormatter(); + public function close() : void; } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php index 277bd236..694cfdca 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php @@ -1,5 +1,6 @@ */ -class HandlerWrapper implements \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface, \WPMailSMTP\Vendor\Monolog\ResettableInterface +class HandlerWrapper implements \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface, \WPMailSMTP\Vendor\Monolog\Handler\ProcessableHandlerInterface, \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface, \WPMailSMTP\Vendor\Monolog\ResettableInterface { /** * @var HandlerInterface */ protected $handler; - /** - * HandlerWrapper constructor. - * @param HandlerInterface $handler - */ public function __construct(\WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface $handler) { $this->handler = $handler; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function isHandling(array $record) + public function isHandling(array $record) : bool { return $this->handler->isHandling($record); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function handle(array $record) + public function handle(array $record) : bool { return $this->handler->handle($record); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function handleBatch(array $records) + public function handleBatch(array $records) : void { - return $this->handler->handleBatch($records); + $this->handler->handleBatch($records); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function pushProcessor($callback) + public function close() : void { - $this->handler->pushProcessor($callback); - return $this; + $this->handler->close(); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function popProcessor() + public function pushProcessor(callable $callback) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface { - return $this->handler->popProcessor(); + if ($this->handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\ProcessableHandlerInterface) { + $this->handler->pushProcessor($callback); + return $this; + } + throw new \LogicException('The wrapped handler does not implement ' . \WPMailSMTP\Vendor\Monolog\Handler\ProcessableHandlerInterface::class); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) + public function popProcessor() : callable { - $this->handler->setFormatter($formatter); - return $this; + if ($this->handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\ProcessableHandlerInterface) { + return $this->handler->popProcessor(); + } + throw new \LogicException('The wrapped handler does not implement ' . \WPMailSMTP\Vendor\Monolog\Handler\ProcessableHandlerInterface::class); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function getFormatter() + public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface { - return $this->handler->getFormatter(); + if ($this->handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface) { + $this->handler->setFormatter($formatter); + return $this; + } + throw new \LogicException('The wrapped handler does not implement ' . \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface::class); + } + /** + * {@inheritDoc} + */ + public function getFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface + { + if ($this->handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface) { + return $this->handler->getFormatter(); + } + throw new \LogicException('The wrapped handler does not implement ' . \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface::class); } public function reset() { if ($this->handler instanceof \WPMailSMTP\Vendor\Monolog\ResettableInterface) { - return $this->handler->reset(); + $this->handler->reset(); } } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HipChatHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HipChatHandler.php deleted file mode 100644 index e03f93cf..00000000 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HipChatHandler.php +++ /dev/null @@ -1,300 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace WPMailSMTP\Vendor\Monolog\Handler; - -use WPMailSMTP\Vendor\Monolog\Logger; -/** - * Sends notifications through the hipchat api to a hipchat room - * - * Notes: - * API token - HipChat API token - * Room - HipChat Room Id or name, where messages are sent - * Name - Name used to send the message (from) - * notify - Should the message trigger a notification in the clients - * version - The API version to use (HipChatHandler::API_V1 | HipChatHandler::API_V2) - * - * @author Rafael Dohms - * @see https://www.hipchat.com/docs/api - */ -class HipChatHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler -{ - /** - * Use API version 1 - */ - const API_V1 = 'v1'; - /** - * Use API version v2 - */ - const API_V2 = 'v2'; - /** - * The maximum allowed length for the name used in the "from" field. - */ - const MAXIMUM_NAME_LENGTH = 15; - /** - * The maximum allowed length for the message. - */ - const MAXIMUM_MESSAGE_LENGTH = 9500; - /** - * @var string - */ - private $token; - /** - * @var string - */ - private $room; - /** - * @var string - */ - private $name; - /** - * @var bool - */ - private $notify; - /** - * @var string - */ - private $format; - /** - * @var string - */ - private $host; - /** - * @var string - */ - private $version; - /** - * @param string $token HipChat API Token - * @param string $room The room that should be alerted of the message (Id or Name) - * @param string $name Name used in the "from" field. - * @param bool $notify Trigger a notification in clients or not - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param bool $useSSL Whether to connect via SSL. - * @param string $format The format of the messages (default to text, can be set to html if you have html in the messages) - * @param string $host The HipChat server hostname. - * @param string $version The HipChat API version (default HipChatHandler::API_V1) - */ - public function __construct($token, $room, $name = 'Monolog', $notify = \false, $level = \WPMailSMTP\Vendor\Monolog\Logger::CRITICAL, $bubble = \true, $useSSL = \true, $format = 'text', $host = 'api.hipchat.com', $version = self::API_V1) - { - @\trigger_error('The Monolog\\Handler\\HipChatHandler class is deprecated. You should migrate to Slack and the SlackWebhookHandler / SlackbotHandler, see https://www.atlassian.com/partnerships/slack', \E_USER_DEPRECATED); - if ($version == self::API_V1 && !$this->validateStringLength($name, static::MAXIMUM_NAME_LENGTH)) { - throw new \InvalidArgumentException('The supplied name is too long. HipChat\'s v1 API supports names up to 15 UTF-8 characters.'); - } - $connectionString = $useSSL ? 'ssl://' . $host . ':443' : $host . ':80'; - parent::__construct($connectionString, $level, $bubble); - $this->token = $token; - $this->name = $name; - $this->notify = $notify; - $this->room = $room; - $this->format = $format; - $this->host = $host; - $this->version = $version; - } - /** - * {@inheritdoc} - * - * @param array $record - * @return string - */ - protected function generateDataStream($record) - { - $content = $this->buildContent($record); - return $this->buildHeader($content) . $content; - } - /** - * Builds the body of API call - * - * @param array $record - * @return string - */ - private function buildContent($record) - { - $dataArray = array('notify' => $this->version == self::API_V1 ? $this->notify ? 1 : 0 : ($this->notify ? 'true' : 'false'), 'message' => $record['formatted'], 'message_format' => $this->format, 'color' => $this->getAlertColor($record['level'])); - if (!$this->validateStringLength($dataArray['message'], static::MAXIMUM_MESSAGE_LENGTH)) { - if (\function_exists('mb_substr')) { - $dataArray['message'] = \mb_substr($dataArray['message'], 0, static::MAXIMUM_MESSAGE_LENGTH) . ' [truncated]'; - } else { - $dataArray['message'] = \substr($dataArray['message'], 0, static::MAXIMUM_MESSAGE_LENGTH) . ' [truncated]'; - } - } - // if we are using the legacy API then we need to send some additional information - if ($this->version == self::API_V1) { - $dataArray['room_id'] = $this->room; - } - // append the sender name if it is set - // always append it if we use the v1 api (it is required in v1) - if ($this->version == self::API_V1 || $this->name !== null) { - $dataArray['from'] = (string) $this->name; - } - return \http_build_query($dataArray); - } - /** - * Builds the header of the API Call - * - * @param string $content - * @return string - */ - private function buildHeader($content) - { - if ($this->version == self::API_V1) { - $header = "POST /v1/rooms/message?format=json&auth_token={$this->token} HTTP/1.1\r\n"; - } else { - // needed for rooms with special (spaces, etc) characters in the name - $room = \rawurlencode($this->room); - $header = "POST /v2/room/{$room}/notification?auth_token={$this->token} HTTP/1.1\r\n"; - } - $header .= "Host: {$this->host}\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . \strlen($content) . "\r\n"; - $header .= "\r\n"; - return $header; - } - /** - * Assigns a color to each level of log records. - * - * @param int $level - * @return string - */ - protected function getAlertColor($level) - { - switch (\true) { - case $level >= \WPMailSMTP\Vendor\Monolog\Logger::ERROR: - return 'red'; - case $level >= \WPMailSMTP\Vendor\Monolog\Logger::WARNING: - return 'yellow'; - case $level >= \WPMailSMTP\Vendor\Monolog\Logger::INFO: - return 'green'; - case $level == \WPMailSMTP\Vendor\Monolog\Logger::DEBUG: - return 'gray'; - default: - return 'yellow'; - } - } - /** - * {@inheritdoc} - * - * @param array $record - */ - protected function write(array $record) - { - parent::write($record); - $this->finalizeWrite(); - } - /** - * Finalizes the request by reading some bytes and then closing the socket - * - * If we do not read some but close the socket too early, hipchat sometimes - * drops the request entirely. - */ - protected function finalizeWrite() - { - $res = $this->getResource(); - if (\is_resource($res)) { - @\fread($res, 2048); - } - $this->closeSocket(); - } - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - if (\count($records) == 0) { - return \true; - } - $batchRecords = $this->combineRecords($records); - $handled = \false; - foreach ($batchRecords as $batchRecord) { - if ($this->isHandling($batchRecord)) { - $this->write($batchRecord); - $handled = \true; - } - } - if (!$handled) { - return \false; - } - return \false === $this->bubble; - } - /** - * Combines multiple records into one. Error level of the combined record - * will be the highest level from the given records. Datetime will be taken - * from the first record. - * - * @param array $records - * @return array - */ - private function combineRecords(array $records) - { - $batchRecord = null; - $batchRecords = array(); - $messages = array(); - $formattedMessages = array(); - $level = 0; - $levelName = null; - $datetime = null; - foreach ($records as $record) { - $record = $this->processRecord($record); - if ($record['level'] > $level) { - $level = $record['level']; - $levelName = $record['level_name']; - } - if (null === $datetime) { - $datetime = $record['datetime']; - } - $messages[] = $record['message']; - $messageStr = \implode(\PHP_EOL, $messages); - $formattedMessages[] = $this->getFormatter()->format($record); - $formattedMessageStr = \implode('', $formattedMessages); - $batchRecord = array('message' => $messageStr, 'formatted' => $formattedMessageStr, 'context' => array(), 'extra' => array()); - if (!$this->validateStringLength($batchRecord['formatted'], static::MAXIMUM_MESSAGE_LENGTH)) { - // Pop the last message and implode the remaining messages - $lastMessage = \array_pop($messages); - $lastFormattedMessage = \array_pop($formattedMessages); - $batchRecord['message'] = \implode(\PHP_EOL, $messages); - $batchRecord['formatted'] = \implode('', $formattedMessages); - $batchRecords[] = $batchRecord; - $messages = array($lastMessage); - $formattedMessages = array($lastFormattedMessage); - $batchRecord = null; - } - } - if (null !== $batchRecord) { - $batchRecords[] = $batchRecord; - } - // Set the max level and datetime for all records - foreach ($batchRecords as &$batchRecord) { - $batchRecord = \array_merge($batchRecord, array('level' => $level, 'level_name' => $levelName, 'datetime' => $datetime)); - } - return $batchRecords; - } - /** - * Validates the length of a string. - * - * If the `mb_strlen()` function is available, it will use that, as HipChat - * allows UTF-8 characters. Otherwise, it will fall back to `strlen()`. - * - * Note that this might cause false failures in the specific case of using - * a valid name with less than 16 characters, but 16 or more bytes, on a - * system where `mb_strlen()` is unavailable. - * - * @param string $str - * @param int $length - * - * @return bool - */ - private function validateStringLength($str, $length) - { - if (\function_exists('mb_strlen')) { - return \mb_strlen($str) <= $length; - } - return \strlen($str) <= $length; - } -} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php index 512cc8b7..dee00f1f 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php @@ -1,5 +1,6 @@ eventName = $eventName; $this->secretKey = $secretKey; parent::__construct($level, $bubble); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function write(array $record) + public function write(array $record) : void { - $postData = array("value1" => $record["channel"], "value2" => $record["level_name"], "value3" => $record["message"]); + $postData = ["value1" => $record["channel"], "value2" => $record["level_name"], "value3" => $record["message"]]; $postString = \WPMailSMTP\Vendor\Monolog\Utils::jsonEncode($postData); $ch = \curl_init(); \curl_setopt($ch, \CURLOPT_URL, "https://maker.ifttt.com/trigger/" . $this->eventName . "/with/key/" . $this->secretKey); \curl_setopt($ch, \CURLOPT_POST, \true); \curl_setopt($ch, \CURLOPT_RETURNTRANSFER, \true); \curl_setopt($ch, \CURLOPT_POSTFIELDS, $postString); - \curl_setopt($ch, \CURLOPT_HTTPHEADER, array("Content-Type: application/json")); + \curl_setopt($ch, \CURLOPT_HTTPHEADER, ["Content-Type: application/json"]); \WPMailSMTP\Vendor\Monolog\Handler\Curl\Util::execute($ch); } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php index 2a0d3715..41610f4f 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php @@ -1,5 +1,6 @@ logToken = $token; } /** - * {@inheritdoc} - * - * @param array $record - * @return string + * {@inheritDoc} */ - protected function generateDataStream($record) + protected function generateDataStream(array $record) : string { return $this->logToken . ' ' . $record['formatted']; } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php index 38f73e2c..80bd1e53 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php @@ -1,5 +1,6 @@ logToken = $token; } /** - * {@inheritdoc} - * - * @param array $record - * @return string + * {@inheritDoc} */ - protected function generateDataStream($record) + protected function generateDataStream(array $record) : string { return $this->logToken . ' ' . $record['formatted']; } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogglyHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogglyHandler.php index d9f470cc..1e75f5b9 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogglyHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogglyHandler.php @@ -1,5 +1,6 @@ token = $token; parent::__construct($level, $bubble); } - public function setTag($tag) + /** + * Loads and returns the shared curl handler for the given endpoint. + * + * @param string $endpoint + * + * @return resource|CurlHandle + */ + protected function getCurlHandler(string $endpoint) { - $tag = !empty($tag) ? $tag : array(); - $this->tag = \is_array($tag) ? $tag : array($tag); + if (!\array_key_exists($endpoint, $this->curlHandlers)) { + $this->curlHandlers[$endpoint] = $this->loadCurlHandle($endpoint); + } + return $this->curlHandlers[$endpoint]; } - public function addTag($tag) + /** + * Starts a fresh curl session for the given endpoint and returns its handler. + * + * @param string $endpoint + * + * @return resource|CurlHandle + */ + private function loadCurlHandle(string $endpoint) + { + $url = \sprintf("https://%s/%s/%s/", static::HOST, $endpoint, $this->token); + $ch = \curl_init(); + \curl_setopt($ch, \CURLOPT_URL, $url); + \curl_setopt($ch, \CURLOPT_POST, \true); + \curl_setopt($ch, \CURLOPT_RETURNTRANSFER, \true); + return $ch; + } + /** + * @param string[]|string $tag + */ + public function setTag($tag) : self + { + $tag = !empty($tag) ? $tag : []; + $this->tag = \is_array($tag) ? $tag : [$tag]; + return $this; + } + /** + * @param string[]|string $tag + */ + public function addTag($tag) : self { if (!empty($tag)) { - $tag = \is_array($tag) ? $tag : array($tag); + $tag = \is_array($tag) ? $tag : [$tag]; $this->tag = \array_unique(\array_merge($this->tag, $tag)); } + return $this; } - protected function write(array $record) + protected function write(array $record) : void { - $this->send($record["formatted"], self::ENDPOINT_SINGLE); + $this->send($record["formatted"], static::ENDPOINT_SINGLE); } - public function handleBatch(array $records) + public function handleBatch(array $records) : void { $level = $this->level; $records = \array_filter($records, function ($record) use($level) { return $record['level'] >= $level; }); if ($records) { - $this->send($this->getFormatter()->formatBatch($records), self::ENDPOINT_BATCH); + $this->send($this->getFormatter()->formatBatch($records), static::ENDPOINT_BATCH); } } - protected function send($data, $endpoint) + protected function send(string $data, string $endpoint) : void { - $url = \sprintf("https://%s/%s/%s/", self::HOST, $endpoint, $this->token); - $headers = array('Content-Type: application/json'); + $ch = $this->getCurlHandler($endpoint); + $headers = ['Content-Type: application/json']; if (!empty($this->tag)) { $headers[] = 'X-LOGGLY-TAG: ' . \implode(',', $this->tag); } - $ch = \curl_init(); - \curl_setopt($ch, \CURLOPT_URL, $url); - \curl_setopt($ch, \CURLOPT_POST, \true); \curl_setopt($ch, \CURLOPT_POSTFIELDS, $data); \curl_setopt($ch, \CURLOPT_HTTPHEADER, $headers); - \curl_setopt($ch, \CURLOPT_RETURNTRANSFER, \true); - \WPMailSMTP\Vendor\Monolog\Handler\Curl\Util::execute($ch); + \WPMailSMTP\Vendor\Monolog\Handler\Curl\Util::execute($ch, 5, \false); } - protected function getDefaultFormatter() + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { return new \WPMailSMTP\Vendor\Monolog\Formatter\LogglyFormatter(); } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php new file mode 100644 index 00000000..11a5e92a --- /dev/null +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace WPMailSMTP\Vendor\Monolog\Handler; + +use WPMailSMTP\Vendor\Monolog\Logger; +use WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface; +use WPMailSMTP\Vendor\Monolog\Formatter\LogmaticFormatter; +/** + * @author Julien Breux + */ +class LogmaticHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler +{ + /** + * @var string + */ + private $logToken; + /** + * @var string + */ + private $hostname; + /** + * @var string + */ + private $appname; + /** + * @param string $token Log token supplied by Logmatic. + * @param string $hostname Host name supplied by Logmatic. + * @param string $appname Application name supplied by Logmatic. + * @param bool $useSSL Whether or not SSL encryption should be used. + * + * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing + */ + public function __construct(string $token, string $hostname = '', string $appname = '', bool $useSSL = \true, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true, bool $persistent = \false, float $timeout = 0.0, float $writingTimeout = 10.0, ?float $connectionTimeout = null, ?int $chunkSize = null) + { + if ($useSSL && !\extension_loaded('openssl')) { + throw new \WPMailSMTP\Vendor\Monolog\Handler\MissingExtensionException('The OpenSSL PHP extension is required to use SSL encrypted connection for LogmaticHandler'); + } + $endpoint = $useSSL ? 'ssl://api.logmatic.io:10515' : 'api.logmatic.io:10514'; + $endpoint .= '/v1/'; + parent::__construct($endpoint, $level, $bubble, $persistent, $timeout, $writingTimeout, $connectionTimeout, $chunkSize); + $this->logToken = $token; + $this->hostname = $hostname; + $this->appname = $appname; + } + /** + * {@inheritDoc} + */ + protected function generateDataStream(array $record) : string + { + return $this->logToken . ' ' . $record['formatted']; + } + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface + { + $formatter = new \WPMailSMTP\Vendor\Monolog\Formatter\LogmaticFormatter(); + if (!empty($this->hostname)) { + $formatter->setHostname($this->hostname); + } + if (!empty($this->appname)) { + $formatter->setAppname($this->appname); + } + return $formatter; + } +} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MailHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MailHandler.php index d4d773c3..68065da2 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MailHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MailHandler.php @@ -1,5 +1,6 @@ level) { continue; } - $messages[] = $this->processRecord($record); + /** @var Record $message */ + $message = $this->processRecord($record); + $messages[] = $message; } if (!empty($messages)) { $this->send((string) $this->getFormatter()->formatBatch($messages), $messages); @@ -38,16 +45,22 @@ abstract class MailHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractPr * * @param string $content formatted email body to be sent * @param array $records the array of log records that formed this content + * + * @phpstan-param Record[] $records */ - protected abstract function send($content, array $records); + protected abstract function send(string $content, array $records) : void; /** - * {@inheritdoc} + * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { - $this->send((string) $record['formatted'], array($record)); + $this->send((string) $record['formatted'], [$record]); } - protected function getHighestRecord(array $records) + /** + * @phpstan-param non-empty-array $records + * @phpstan-return Record + */ + protected function getHighestRecord(array $records) : array { $highestRecord = null; foreach ($records as $record) { @@ -57,4 +70,17 @@ abstract class MailHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractPr } return $highestRecord; } + protected function isHtmlBody(string $body) : bool + { + return ($body[0] ?? null) === '<'; + } + /** + * Gets the default formatter. + * + * @return FormatterInterface + */ + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface + { + return new \WPMailSMTP\Vendor\Monolog\Formatter\HtmlFormatter(); + } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MandrillHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MandrillHandler.php index 754318e7..521304d0 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MandrillHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MandrillHandler.php @@ -1,5 +1,6 @@ apiKey = $apiKey; } /** - * {@inheritdoc} + * {@inheritDoc} */ - protected function send($content, array $records) + protected function send(string $content, array $records) : void { + $mime = 'text/plain'; + if ($this->isHtmlBody($content)) { + $mime = 'text/html'; + } $message = clone $this->message; - $message->setBody($content); + $message->setBody($content, $mime); + /** @phpstan-ignore-next-line */ if (\version_compare(\WPMailSMTP\Vendor\Swift::VERSION, '6.0.0', '>=')) { $message->setDate(new \DateTimeImmutable()); } else { + /** @phpstan-ignore-next-line */ $message->setDate(\time()); } $ch = \curl_init(); \curl_setopt($ch, \CURLOPT_URL, 'https://mandrillapp.com/api/1.0/messages/send-raw.json'); \curl_setopt($ch, \CURLOPT_POST, 1); \curl_setopt($ch, \CURLOPT_RETURNTRANSFER, 1); - \curl_setopt($ch, \CURLOPT_POSTFIELDS, \http_build_query(array('key' => $this->apiKey, 'raw_message' => (string) $message, 'async' => \false))); + \curl_setopt($ch, \CURLOPT_POSTFIELDS, \http_build_query(['key' => $this->apiKey, 'raw_message' => (string) $message, 'async' => \false])); \WPMailSMTP\Vendor\Monolog\Handler\Curl\Util::execute($ch); } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php index 988df6e9..6d2a7c88 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php @@ -1,5 +1,6 @@ + * @author Christian Bergau */ class MissingExtensionException extends \Exception { diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php index 22b80886..81792472 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php @@ -1,5 +1,6 @@ pushHandler($mongodb); * - * @author Thomas Tourlourat + * The above examples uses the MongoDB PHP library's client class; however, the + * MongoDB\Driver\Manager class from ext-mongodb is also supported. */ class MongoDBHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler { - protected $mongoCollection; - public function __construct($mongo, $database, $collection, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true) + /** @var \MongoDB\Collection */ + private $collection; + /** @var Client|Manager */ + private $manager; + /** @var string */ + private $namespace; + /** + * Constructor. + * + * @param Client|Manager $mongodb MongoDB library or driver client + * @param string $database Database name + * @param string $collection Collection name + */ + public function __construct($mongodb, string $database, string $collection, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true) { - if (!($mongo instanceof \MongoClient || $mongo instanceof \Mongo || $mongo instanceof \WPMailSMTP\Vendor\MongoDB\Client)) { - throw new \InvalidArgumentException('MongoClient, Mongo or MongoDB\\Client instance required'); + if (!($mongodb instanceof \WPMailSMTP\Vendor\MongoDB\Client || $mongodb instanceof \MongoDB\Driver\Manager)) { + throw new \InvalidArgumentException('MongoDB\\Client or MongoDB\\Driver\\Manager instance required'); + } + if ($mongodb instanceof \WPMailSMTP\Vendor\MongoDB\Client) { + $this->collection = $mongodb->selectCollection($database, $collection); + } else { + $this->manager = $mongodb; + $this->namespace = $database . '.' . $collection; } - $this->mongoCollection = $mongo->selectCollection($database, $collection); parent::__construct($level, $bubble); } - protected function write(array $record) + protected function write(array $record) : void { - if ($this->mongoCollection instanceof \WPMailSMTP\Vendor\MongoDB\Collection) { - $this->mongoCollection->insertOne($record["formatted"]); - } else { - $this->mongoCollection->save($record["formatted"]); + if (isset($this->collection)) { + $this->collection->insertOne($record['formatted']); + } + if (isset($this->manager, $this->namespace)) { + $bulk = new \MongoDB\Driver\BulkWrite(); + $bulk->insert($record["formatted"]); + $this->manager->executeBulkWrite($this->namespace, $bulk); } } /** * {@inheritDoc} */ - protected function getDefaultFormatter() + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { - return new \WPMailSMTP\Vendor\Monolog\Formatter\NormalizerFormatter(); + return new \WPMailSMTP\Vendor\Monolog\Formatter\MongoDBFormatter(); } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php index 70ec235d..0298368a 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php @@ -1,5 +1,6 @@ to = \is_array($to) ? $to : array($to); + $this->to = (array) $to; $this->subject = $subject; $this->addHeader(\sprintf('From: %s', $from)); $this->maxColumnWidth = $maxColumnWidth; @@ -74,10 +73,9 @@ class NativeMailerHandler extends \WPMailSMTP\Vendor\Monolog\Handler\MailHandler /** * Add headers to the message * - * @param string|array $headers Custom added headers - * @return self + * @param string|string[] $headers Custom added headers */ - public function addHeader($headers) + public function addHeader($headers) : self { foreach ((array) $headers as $header) { if (\strpos($header, "\n") !== \false || \strpos($header, "\r") !== \false) { @@ -90,23 +88,25 @@ class NativeMailerHandler extends \WPMailSMTP\Vendor\Monolog\Handler\MailHandler /** * Add parameters to the message * - * @param string|array $parameters Custom added parameters - * @return self + * @param string|string[] $parameters Custom added parameters */ - public function addParameter($parameters) + public function addParameter($parameters) : self { $this->parameters = \array_merge($this->parameters, (array) $parameters); return $this; } /** - * {@inheritdoc} + * {@inheritDoc} */ - protected function send($content, array $records) + protected function send(string $content, array $records) : void { - $content = \wordwrap($content, $this->maxColumnWidth); + $contentType = $this->getContentType() ?: ($this->isHtmlBody($content) ? 'text/html' : 'text/plain'); + if ($contentType !== 'text/html') { + $content = \wordwrap($content, $this->maxColumnWidth); + } $headers = \ltrim(\implode("\r\n", $this->headers) . "\r\n", "\r\n"); - $headers .= 'Content-type: ' . $this->getContentType() . '; charset=' . $this->getEncoding() . "\r\n"; - if ($this->getContentType() == 'text/html' && \false === \strpos($headers, 'MIME-Version:')) { + $headers .= 'Content-type: ' . $contentType . '; charset=' . $this->getEncoding() . "\r\n"; + if ($contentType === 'text/html' && \false === \strpos($headers, 'MIME-Version:')) { $headers .= 'MIME-Version: 1.0' . "\r\n"; } $subject = $this->subject; @@ -119,26 +119,18 @@ class NativeMailerHandler extends \WPMailSMTP\Vendor\Monolog\Handler\MailHandler \mail($to, $subject, $content, $headers, $parameters); } } - /** - * @return string $contentType - */ - public function getContentType() + public function getContentType() : ?string { return $this->contentType; } - /** - * @return string $encoding - */ - public function getEncoding() + public function getEncoding() : string { return $this->encoding; } /** - * @param string $contentType The content type of the email - Defaults to text/plain. Use text/html for HTML - * messages. - * @return self + * @param string $contentType The content type of the email - Defaults to text/plain. Use text/html for HTML messages. */ - public function setContentType($contentType) + public function setContentType(string $contentType) : self { if (\strpos($contentType, "\n") !== \false || \strpos($contentType, "\r") !== \false) { throw new \InvalidArgumentException('The content type can not contain newline characters to prevent email header injection'); @@ -146,11 +138,7 @@ class NativeMailerHandler extends \WPMailSMTP\Vendor\Monolog\Handler\MailHandler $this->contentType = $contentType; return $this; } - /** - * @param string $encoding - * @return self - */ - public function setEncoding($encoding) + public function setEncoding(string $encoding) : self { if (\strpos($encoding, "\n") !== \false || \strpos($encoding, "\r") !== \false) { throw new \InvalidArgumentException('The encoding can not contain newline characters to prevent email header injection'); diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php index 198c3d71..3ecf53eb 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php @@ -1,5 +1,6 @@ appName = $appName; @@ -60,7 +62,7 @@ class NewRelicHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcess /** * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { if (!$this->isNewRelicEnabled()) { throw new \WPMailSMTP\Vendor\Monolog\Handler\MissingExtensionException('The newrelic PHP extension is required to use the NewRelicHandler'); @@ -72,7 +74,7 @@ class NewRelicHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcess $this->setNewRelicTransactionName($transactionName); unset($record['formatted']['context']['transaction_name']); } - if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || \PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable)) { + if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) { \newrelic_notice_error($record['message'], $record['context']['exception']); unset($record['formatted']['context']['exception']); } else { @@ -106,7 +108,7 @@ class NewRelicHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcess * * @return bool */ - protected function isNewRelicEnabled() + protected function isNewRelicEnabled() : bool { return \extension_loaded('newrelic'); } @@ -114,10 +116,9 @@ class NewRelicHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcess * Returns the appname where this log should be sent. Each log can override the default appname, set in this * handler's constructor, by providing the appname in it's context. * - * @param array $context - * @return null|string + * @param mixed[] $context */ - protected function getAppName(array $context) + protected function getAppName(array $context) : ?string { if (isset($context['appname'])) { return $context['appname']; @@ -128,11 +129,9 @@ class NewRelicHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcess * Returns the name of the current transaction. Each log can override the default transaction name, set in this * handler's constructor, by providing the transaction_name in it's context * - * @param array $context - * - * @return null|string + * @param mixed[] $context */ - protected function getTransactionName(array $context) + protected function getTransactionName(array $context) : ?string { if (isset($context['transaction_name'])) { return $context['transaction_name']; @@ -141,19 +140,15 @@ class NewRelicHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcess } /** * Sets the NewRelic application that should receive this log. - * - * @param string $appName */ - protected function setNewRelicAppName($appName) + protected function setNewRelicAppName(string $appName) : void { \newrelic_set_appname($appName); } /** * Overwrites the name of the current transaction - * - * @param string $transactionName */ - protected function setNewRelicTransactionName($transactionName) + protected function setNewRelicTransactionName(string $transactionName) : void { \newrelic_name_transaction($transactionName); } @@ -161,7 +156,7 @@ class NewRelicHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcess * @param string $key * @param mixed $value */ - protected function setNewRelicParameter($key, $value) + protected function setNewRelicParameter(string $key, $value) : void { if (null === $value || \is_scalar($value)) { \newrelic_add_custom_parameter($key, $value); @@ -172,7 +167,7 @@ class NewRelicHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcess /** * {@inheritDoc} */ - protected function getDefaultFormatter() + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { return new \WPMailSMTP\Vendor\Monolog\Formatter\NormalizerFormatter(); } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NoopHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NoopHandler.php new file mode 100644 index 00000000..5d74d271 --- /dev/null +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NoopHandler.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace WPMailSMTP\Vendor\Monolog\Handler; + +/** + * No-op + * + * This handler handles anything, but does nothing, and does not stop bubbling to the rest of the stack. + * This can be used for testing, or to disable a handler when overriding a configuration without + * influencing the rest of the stack. + * + * @author Roel Harbers + */ +class NoopHandler extends \WPMailSMTP\Vendor\Monolog\Handler\Handler +{ + /** + * {@inheritDoc} + */ + public function isHandling(array $record) : bool + { + return \true; + } + /** + * {@inheritDoc} + */ + public function handle(array $record) : bool + { + return \false; + } +} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NullHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NullHandler.php index 49595974..82daf5b2 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NullHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NullHandler.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type Level from \Monolog\Logger + * @phpstan-import-type LevelName from \Monolog\Logger */ -class NullHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler +class NullHandler extends \WPMailSMTP\Vendor\Monolog\Handler\Handler { /** - * @param int $level The minimum logging level at which this handler will be triggered + * @var int + */ + private $level; + /** + * @param string|int $level The minimum logging level at which this handler will be triggered + * + * @phpstan-param Level|LevelName|LogLevel::* $level */ public function __construct($level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG) { - parent::__construct($level, \false); + $this->level = \WPMailSMTP\Vendor\Monolog\Logger::toMonologLevel($level); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function handle(array $record) + public function isHandling(array $record) : bool { - if ($record['level'] < $this->level) { - return \false; - } - return \true; + return $record['level'] >= $this->level; + } + /** + * {@inheritDoc} + */ + public function handle(array $record) : bool + { + return $record['level'] >= $this->level; } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/OverflowHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/OverflowHandler.php new file mode 100644 index 00000000..e48da727 --- /dev/null +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/OverflowHandler.php @@ -0,0 +1,119 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace WPMailSMTP\Vendor\Monolog\Handler; + +use WPMailSMTP\Vendor\Monolog\Logger; +use WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface; +/** + * Handler to only pass log messages when a certain threshold of number of messages is reached. + * + * This can be useful in cases of processing a batch of data, but you're for example only interested + * in case it fails catastrophically instead of a warning for 1 or 2 events. Worse things can happen, right? + * + * Usage example: + * + * ``` + * $log = new Logger('application'); + * $handler = new SomeHandler(...) + * + * // Pass all warnings to the handler when more than 10 & all error messages when more then 5 + * $overflow = new OverflowHandler($handler, [Logger::WARNING => 10, Logger::ERROR => 5]); + * + * $log->pushHandler($overflow); + *``` + * + * @author Kris Buist + */ +class OverflowHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler implements \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface +{ + /** @var HandlerInterface */ + private $handler; + /** @var int[] */ + private $thresholdMap = [\WPMailSMTP\Vendor\Monolog\Logger::DEBUG => 0, \WPMailSMTP\Vendor\Monolog\Logger::INFO => 0, \WPMailSMTP\Vendor\Monolog\Logger::NOTICE => 0, \WPMailSMTP\Vendor\Monolog\Logger::WARNING => 0, \WPMailSMTP\Vendor\Monolog\Logger::ERROR => 0, \WPMailSMTP\Vendor\Monolog\Logger::CRITICAL => 0, \WPMailSMTP\Vendor\Monolog\Logger::ALERT => 0, \WPMailSMTP\Vendor\Monolog\Logger::EMERGENCY => 0]; + /** + * Buffer of all messages passed to the handler before the threshold was reached + * + * @var mixed[][] + */ + private $buffer = []; + /** + * @param HandlerInterface $handler + * @param int[] $thresholdMap Dictionary of logger level => threshold + */ + public function __construct(\WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface $handler, array $thresholdMap = [], $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true) + { + $this->handler = $handler; + foreach ($thresholdMap as $thresholdLevel => $threshold) { + $this->thresholdMap[$thresholdLevel] = $threshold; + } + parent::__construct($level, $bubble); + } + /** + * Handles a record. + * + * All records may be passed to this method, and the handler should discard + * those that it does not want to handle. + * + * The return value of this function controls the bubbling process of the handler stack. + * Unless the bubbling is interrupted (by returning true), the Logger class will keep on + * calling further handlers in the stack with a given log record. + * + * {@inheritDoc} + */ + public function handle(array $record) : bool + { + if ($record['level'] < $this->level) { + return \false; + } + $level = $record['level']; + if (!isset($this->thresholdMap[$level])) { + $this->thresholdMap[$level] = 0; + } + if ($this->thresholdMap[$level] > 0) { + // The overflow threshold is not yet reached, so we're buffering the record and lowering the threshold by 1 + $this->thresholdMap[$level]--; + $this->buffer[$level][] = $record; + return \false === $this->bubble; + } + if ($this->thresholdMap[$level] == 0) { + // This current message is breaking the threshold. Flush the buffer and continue handling the current record + foreach ($this->buffer[$level] ?? [] as $buffered) { + $this->handler->handle($buffered); + } + $this->thresholdMap[$level]--; + unset($this->buffer[$level]); + } + $this->handler->handle($record); + return \false === $this->bubble; + } + /** + * {@inheritDoc} + */ + public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface + { + if ($this->handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface) { + $this->handler->setFormatter($formatter); + return $this; + } + throw new \UnexpectedValueException('The nested handler of type ' . \get_class($this->handler) . ' does not support formatters.'); + } + /** + * {@inheritDoc} + */ + public function getFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface + { + if ($this->handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface) { + return $this->handler->getFormatter(); + } + throw new \UnexpectedValueException('The nested handler of type ' . \get_class($this->handler) . ' does not support formatters.'); + } +} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php index 7fd4a6d5..edf6418f 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php @@ -1,5 +1,6 @@ addDebug('SELECT * FROM users', array('db', 'time' => 0.012)); + * $logger->debug('SELECT * FROM users', array('db', 'time' => 0.012)); * PC::debug($_SERVER); // PHP Console debugger for any type of vars * * @author Sergey Barbushin https://www.linkedin.com/in/barbushin + * + * @phpstan-import-type Record from \Monolog\Logger + * @deprecated Since 2.8.0 and 3.2.0, PHPConsole is abandoned and thus we will drop this handler in Monolog 4 */ class PHPConsoleHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler { - private $options = array( + /** @var array */ + private $options = [ 'enabled' => \true, // bool Is PHP Console server enabled - 'classesPartialsTraceIgnore' => array('WPMailSMTP\\Vendor\\Monolog\\'), + 'classesPartialsTraceIgnore' => ['WPMailSMTP\\Vendor\\Monolog\\'], // array Hide calls of classes started with... - 'debugTagsKeysInContext' => array(0, 'tag'), + 'debugTagsKeysInContext' => [0, 'tag'], // bool Is PHP Console server enabled 'useOwnErrorsHandler' => \false, // bool Enable errors handling @@ -61,7 +66,7 @@ class PHPConsoleHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProce // string|null Protect PHP Console connection by password 'enableSslOnlyMode' => \false, // bool Force connection by SSL for clients with PHP Console installed - 'ipMasks' => array(), + 'ipMasks' => [], // array Set IP masks of clients that will be allowed to connect to PHP Console: array('192.168.*.*', '127.0.0.1') 'enableEvalListener' => \false, // bool Enable eval request to be handled by eval dispatcher(if enabled, 'password' option is also required) @@ -78,34 +83,37 @@ class PHPConsoleHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProce 'detectDumpTraceAndSource' => \false, // bool Autodetect and append trace data to debug 'dataStorage' => null, - ); + ]; /** @var Connector */ private $connector; /** - * @param array $options See \Monolog\Handler\PHPConsoleHandler::$options for more details - * @param Connector|null $connector Instance of \PhpConsole\Connector class (optional) - * @param int $level - * @param bool $bubble - * @throws Exception + * @param array $options See \Monolog\Handler\PHPConsoleHandler::$options for more details + * @param Connector|null $connector Instance of \PhpConsole\Connector class (optional) + * @throws \RuntimeException */ - public function __construct(array $options = array(), \WPMailSMTP\Vendor\PhpConsole\Connector $connector = null, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true) + public function __construct(array $options = [], ?\WPMailSMTP\Vendor\PhpConsole\Connector $connector = null, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true) { if (!\class_exists('WPMailSMTP\\Vendor\\PhpConsole\\Connector')) { - throw new \Exception('PHP Console library not found. See https://github.com/barbushin/php-console#installation'); + throw new \RuntimeException('PHP Console library not found. See https://github.com/barbushin/php-console#installation'); } parent::__construct($level, $bubble); $this->options = $this->initOptions($options); $this->connector = $this->initConnector($connector); } - private function initOptions(array $options) + /** + * @param array $options + * + * @return array + */ + private function initOptions(array $options) : array { $wrongOptions = \array_diff(\array_keys($options), \array_keys($this->options)); if ($wrongOptions) { - throw new \Exception('Unknown options: ' . \implode(', ', $wrongOptions)); + throw new \RuntimeException('Unknown options: ' . \implode(', ', $wrongOptions)); } return \array_replace($this->options, $options); } - private function initConnector(\WPMailSMTP\Vendor\PhpConsole\Connector $connector = null) + private function initConnector(?\WPMailSMTP\Vendor\PhpConsole\Connector $connector = null) : \WPMailSMTP\Vendor\PhpConsole\Connector { if (!$connector) { if ($this->options['dataStorage']) { @@ -156,15 +164,18 @@ class PHPConsoleHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProce } return $connector; } - public function getConnector() + public function getConnector() : \WPMailSMTP\Vendor\PhpConsole\Connector { return $this->connector; } - public function getOptions() + /** + * @return array + */ + public function getOptions() : array { return $this->options; } - public function handle(array $record) + public function handle(array $record) : bool { if ($this->options['enabled'] && $this->connector->isActiveClient()) { return parent::handle($record); @@ -173,21 +184,21 @@ class PHPConsoleHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProce } /** * Writes the record down to the log of the implementing handler - * - * @param array $record - * @return void */ - protected function write(array $record) + protected function write(array $record) : void { if ($record['level'] < \WPMailSMTP\Vendor\Monolog\Logger::NOTICE) { $this->handleDebugRecord($record); - } elseif (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Exception) { + } elseif (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) { $this->handleExceptionRecord($record); } else { $this->handleErrorRecord($record); } } - private function handleDebugRecord(array $record) + /** + * @phpstan-param Record $record + */ + private function handleDebugRecord(array $record) : void { $tags = $this->getRecordTags($record); $message = $record['message']; @@ -196,15 +207,25 @@ class PHPConsoleHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProce } $this->connector->getDebugDispatcher()->dispatchDebug($message, $tags, $this->options['classesPartialsTraceIgnore']); } - private function handleExceptionRecord(array $record) + /** + * @phpstan-param Record $record + */ + private function handleExceptionRecord(array $record) : void { $this->connector->getErrorsDispatcher()->dispatchException($record['context']['exception']); } - private function handleErrorRecord(array $record) + /** + * @phpstan-param Record $record + */ + private function handleErrorRecord(array $record) : void { $context = $record['context']; - $this->connector->getErrorsDispatcher()->dispatchError(isset($context['code']) ? $context['code'] : null, isset($context['message']) ? $context['message'] : $record['message'], isset($context['file']) ? $context['file'] : null, isset($context['line']) ? $context['line'] : null, $this->options['classesPartialsTraceIgnore']); + $this->connector->getErrorsDispatcher()->dispatchError($context['code'] ?? null, $context['message'] ?? $record['message'], $context['file'] ?? null, $context['line'] ?? null, $this->options['classesPartialsTraceIgnore']); } + /** + * @phpstan-param Record $record + * @return string + */ private function getRecordTags(array &$record) { $tags = null; @@ -227,7 +248,7 @@ class PHPConsoleHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProce /** * {@inheritDoc} */ - protected function getDefaultFormatter() + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { return new \WPMailSMTP\Vendor\Monolog\Formatter\LineFormatter('%message%'); } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessHandler.php new file mode 100644 index 00000000..6cacbbdd --- /dev/null +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessHandler.php @@ -0,0 +1,168 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace WPMailSMTP\Vendor\Monolog\Handler; + +use WPMailSMTP\Vendor\Monolog\Logger; +/** + * Stores to STDIN of any process, specified by a command. + * + * Usage example: + *
+ * $log = new Logger('myLogger');
+ * $log->pushHandler(new ProcessHandler('/usr/bin/php /var/www/monolog/someScript.php'));
+ * 
+ * + * @author Kolja Zuelsdorf + */ +class ProcessHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler +{ + /** + * Holds the process to receive data on its STDIN. + * + * @var resource|bool|null + */ + private $process; + /** + * @var string + */ + private $command; + /** + * @var string|null + */ + private $cwd; + /** + * @var resource[] + */ + private $pipes = []; + /** + * @var array + */ + protected const DESCRIPTOR_SPEC = [ + 0 => ['pipe', 'r'], + // STDIN is a pipe that the child will read from + 1 => ['pipe', 'w'], + // STDOUT is a pipe that the child will write to + 2 => ['pipe', 'w'], + ]; + /** + * @param string $command Command for the process to start. Absolute paths are recommended, + * especially if you do not use the $cwd parameter. + * @param string|null $cwd "Current working directory" (CWD) for the process to be executed in. + * @throws \InvalidArgumentException + */ + public function __construct(string $command, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true, ?string $cwd = null) + { + if ($command === '') { + throw new \InvalidArgumentException('The command argument must be a non-empty string.'); + } + if ($cwd === '') { + throw new \InvalidArgumentException('The optional CWD argument must be a non-empty string or null.'); + } + parent::__construct($level, $bubble); + $this->command = $command; + $this->cwd = $cwd; + } + /** + * Writes the record down to the log of the implementing handler + * + * @throws \UnexpectedValueException + */ + protected function write(array $record) : void + { + $this->ensureProcessIsStarted(); + $this->writeProcessInput($record['formatted']); + $errors = $this->readProcessErrors(); + if (empty($errors) === \false) { + throw new \UnexpectedValueException(\sprintf('Errors while writing to process: %s', $errors)); + } + } + /** + * Makes sure that the process is actually started, and if not, starts it, + * assigns the stream pipes, and handles startup errors, if any. + */ + private function ensureProcessIsStarted() : void + { + if (\is_resource($this->process) === \false) { + $this->startProcess(); + $this->handleStartupErrors(); + } + } + /** + * Starts the actual process and sets all streams to non-blocking. + */ + private function startProcess() : void + { + $this->process = \proc_open($this->command, static::DESCRIPTOR_SPEC, $this->pipes, $this->cwd); + foreach ($this->pipes as $pipe) { + \stream_set_blocking($pipe, \false); + } + } + /** + * Selects the STDERR stream, handles upcoming startup errors, and throws an exception, if any. + * + * @throws \UnexpectedValueException + */ + private function handleStartupErrors() : void + { + $selected = $this->selectErrorStream(); + if (\false === $selected) { + throw new \UnexpectedValueException('Something went wrong while selecting a stream.'); + } + $errors = $this->readProcessErrors(); + if (\is_resource($this->process) === \false || empty($errors) === \false) { + throw new \UnexpectedValueException(\sprintf('The process "%s" could not be opened: ' . $errors, $this->command)); + } + } + /** + * Selects the STDERR stream. + * + * @return int|bool + */ + protected function selectErrorStream() + { + $empty = []; + $errorPipes = [$this->pipes[2]]; + return \stream_select($errorPipes, $empty, $empty, 1); + } + /** + * Reads the errors of the process, if there are any. + * + * @codeCoverageIgnore + * @return string Empty string if there are no errors. + */ + protected function readProcessErrors() : string + { + return (string) \stream_get_contents($this->pipes[2]); + } + /** + * Writes to the input stream of the opened process. + * + * @codeCoverageIgnore + */ + protected function writeProcessInput(string $string) : void + { + \fwrite($this->pipes[0], $string); + } + /** + * {@inheritDoc} + */ + public function close() : void + { + if (\is_resource($this->process)) { + foreach ($this->pipes as $pipe) { + \fclose($pipe); + } + \proc_close($this->process); + $this->process = null; + } + } +} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php index f62041ed..e7ec406e 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php @@ -15,24 +15,28 @@ use WPMailSMTP\Vendor\Monolog\Processor\ProcessorInterface; /** * Interface to describe loggers that have processors * - * This interface is present in monolog 1.x to ease forward compatibility. - * * @author Jordi Boggiano + * + * @phpstan-import-type Record from \Monolog\Logger */ interface ProcessableHandlerInterface { /** * Adds a processor in the stack. * + * @psalm-param ProcessorInterface|callable(Record): Record $callback + * * @param ProcessorInterface|callable $callback * @return HandlerInterface self */ - public function pushProcessor($callback) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface; + public function pushProcessor(callable $callback) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface; /** * Removes the processor on top of the stack and returns it. * - * @throws \LogicException In case the processor stack is empty - * @return callable + * @psalm-return ProcessorInterface|callable(Record): Record $callback + * + * @throws \LogicException In case the processor stack is empty + * @return callable|ProcessorInterface */ public function popProcessor() : callable; } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php index 47e6a2d8..881d6215 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php @@ -12,30 +12,31 @@ declare (strict_types=1); namespace WPMailSMTP\Vendor\Monolog\Handler; use WPMailSMTP\Vendor\Monolog\ResettableInterface; +use WPMailSMTP\Vendor\Monolog\Processor\ProcessorInterface; /** * Helper trait for implementing ProcessableInterface * - * This trait is present in monolog 1.x to ease forward compatibility. - * * @author Jordi Boggiano + * + * @phpstan-import-type Record from \Monolog\Logger */ trait ProcessableHandlerTrait { /** * @var callable[] + * @phpstan-var array */ protected $processors = []; /** - * {@inheritdoc} - * @suppress PhanTypeMismatchReturn + * {@inheritDoc} */ - public function pushProcessor($callback) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface + public function pushProcessor(callable $callback) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface { \array_unshift($this->processors, $callback); return $this; } /** - * {@inheritdoc} + * {@inheritDoc} */ public function popProcessor() : callable { @@ -46,6 +47,9 @@ trait ProcessableHandlerTrait } /** * Processes a record. + * + * @phpstan-param Record $record + * @phpstan-return Record */ protected function processRecord(array $record) : array { diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PsrHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PsrHandler.php index 77a131c4..ba4e2e92 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PsrHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PsrHandler.php @@ -1,5 +1,6 @@ */ -class PsrHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler +class PsrHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler implements \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface { /** * PSR-3 compliant logger @@ -26,11 +32,13 @@ class PsrHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler */ protected $logger; /** - * @param LoggerInterface $logger The underlying PSR-3 compliant logger to which messages will be proxied - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @var FormatterInterface|null */ - public function __construct(\WPMailSMTP\Vendor\Psr\Log\LoggerInterface $logger, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true) + protected $formatter; + /** + * @param LoggerInterface $logger The underlying PSR-3 compliant logger to which messages will be proxied + */ + public function __construct(\WPMailSMTP\Vendor\Psr\Log\LoggerInterface $logger, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true) { parent::__construct($level, $bubble); $this->logger = $logger; @@ -38,12 +46,39 @@ class PsrHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler /** * {@inheritDoc} */ - public function handle(array $record) + public function handle(array $record) : bool { if (!$this->isHandling($record)) { return \false; } - $this->logger->log(\strtolower($record['level_name']), $record['message'], $record['context']); + if ($this->formatter) { + $formatted = $this->formatter->format($record); + $this->logger->log(\strtolower($record['level_name']), (string) $formatted, $record['context']); + } else { + $this->logger->log(\strtolower($record['level_name']), $record['message'], $record['context']); + } return \false === $this->bubble; } + /** + * Sets the formatter. + * + * @param FormatterInterface $formatter + */ + public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface + { + $this->formatter = $formatter; + return $this; + } + /** + * Gets the formatter. + * + * @return FormatterInterface + */ + public function getFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface + { + if (!$this->formatter) { + throw new \LogicException('No formatter has been set and this handler does not have a default formatter'); + } + return $this->formatter; + } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PushoverHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PushoverHandler.php index 48a069db..58ed7c7c 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PushoverHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PushoverHandler.php @@ -1,5 +1,6 @@ * @see https://www.pushover.net/api + * + * @phpstan-import-type FormattedRecord from AbstractProcessingHandler + * @phpstan-import-type Level from \Monolog\Logger + * @phpstan-import-type LevelName from \Monolog\Logger */ class PushoverHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler { + /** @var string */ private $token; + /** @var array */ private $users; + /** @var string */ private $title; - private $user; + /** @var string|int|null */ + private $user = null; + /** @var int */ private $retry; + /** @var int */ private $expire; + /** @var int */ private $highPriorityLevel; + /** @var int */ private $emergencyLevel; + /** @var bool */ private $useFormattedMessage = \false; /** * All parameters that can be sent to Pushover * @see https://pushover.net/api - * @var array + * @var array */ - private $parameterNames = array('token' => \true, 'user' => \true, 'message' => \true, 'device' => \true, 'title' => \true, 'url' => \true, 'url_title' => \true, 'priority' => \true, 'timestamp' => \true, 'sound' => \true, 'retry' => \true, 'expire' => \true, 'callback' => \true); + private $parameterNames = ['token' => \true, 'user' => \true, 'message' => \true, 'device' => \true, 'title' => \true, 'url' => \true, 'url_title' => \true, 'priority' => \true, 'timestamp' => \true, 'sound' => \true, 'retry' => \true, 'expire' => \true, 'callback' => \true]; /** * Sounds the api supports by default * @see https://pushover.net/api#sounds - * @var array + * @var string[] */ - private $sounds = array('pushover', 'bike', 'bugle', 'cashregister', 'classical', 'cosmic', 'falling', 'gamelan', 'incoming', 'intermission', 'magic', 'mechanical', 'pianobar', 'siren', 'spacealarm', 'tugboat', 'alien', 'climb', 'persistent', 'echo', 'updown', 'none'); + private $sounds = ['pushover', 'bike', 'bugle', 'cashregister', 'classical', 'cosmic', 'falling', 'gamelan', 'incoming', 'intermission', 'magic', 'mechanical', 'pianobar', 'siren', 'spacealarm', 'tugboat', 'alien', 'climb', 'persistent', 'echo', 'updown', 'none']; /** * @param string $token Pushover api token * @param string|array $users Pushover user id or array of ids the message will be sent to - * @param string $title Title sent to the Pushover API - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param string|null $title Title sent to the Pushover API * @param bool $useSSL Whether to connect via SSL. Required when pushing messages to users that are not * the pushover.net app owner. OpenSSL is required for this option. - * @param int $highPriorityLevel The minimum logging level at which this handler will start + * @param string|int $highPriorityLevel The minimum logging level at which this handler will start * sending "high priority" requests to the Pushover API - * @param int $emergencyLevel The minimum logging level at which this handler will start + * @param string|int $emergencyLevel The minimum logging level at which this handler will start * sending "emergency" requests to the Pushover API - * @param int $retry The retry parameter specifies how often (in seconds) the Pushover servers will send the same notification to the user. - * @param int $expire The expire parameter specifies how many seconds your notification will continue to be retried for (every retry seconds). + * @param int $retry The retry parameter specifies how often (in seconds) the Pushover servers will + * send the same notification to the user. + * @param int $expire The expire parameter specifies how many seconds your notification will continue + * to be retried for (every retry seconds). + * + * @phpstan-param string|array $users + * @phpstan-param Level|LevelName|LogLevel::* $highPriorityLevel + * @phpstan-param Level|LevelName|LogLevel::* $emergencyLevel */ - public function __construct($token, $users, $title = null, $level = \WPMailSMTP\Vendor\Monolog\Logger::CRITICAL, $bubble = \true, $useSSL = \true, $highPriorityLevel = \WPMailSMTP\Vendor\Monolog\Logger::CRITICAL, $emergencyLevel = \WPMailSMTP\Vendor\Monolog\Logger::EMERGENCY, $retry = 30, $expire = 25200) + public function __construct(string $token, $users, ?string $title = null, $level = \WPMailSMTP\Vendor\Monolog\Logger::CRITICAL, bool $bubble = \true, bool $useSSL = \true, $highPriorityLevel = \WPMailSMTP\Vendor\Monolog\Logger::CRITICAL, $emergencyLevel = \WPMailSMTP\Vendor\Monolog\Logger::EMERGENCY, int $retry = 30, int $expire = 25200, bool $persistent = \false, float $timeout = 0.0, float $writingTimeout = 10.0, ?float $connectionTimeout = null, ?int $chunkSize = null) { $connectionString = $useSSL ? 'ssl://api.pushover.net:443' : 'api.pushover.net:80'; - parent::__construct($connectionString, $level, $bubble); + parent::__construct($connectionString, $level, $bubble, $persistent, $timeout, $writingTimeout, $connectionTimeout, $chunkSize); $this->token = $token; $this->users = (array) $users; - $this->title = $title ?: \gethostname(); + $this->title = $title ?: (string) \gethostname(); $this->highPriorityLevel = \WPMailSMTP\Vendor\Monolog\Logger::toMonologLevel($highPriorityLevel); $this->emergencyLevel = \WPMailSMTP\Vendor\Monolog\Logger::toMonologLevel($emergencyLevel); $this->retry = $retry; $this->expire = $expire; } - protected function generateDataStream($record) + protected function generateDataStream(array $record) : string { $content = $this->buildContent($record); return $this->buildHeader($content) . $content; } - private function buildContent($record) + /** + * @phpstan-param FormattedRecord $record + */ + private function buildContent(array $record) : string { // Pushover has a limit of 512 characters on title and message combined. $maxMessageLength = 512 - \strlen($this->title); $message = $this->useFormattedMessage ? $record['formatted'] : $record['message']; - $message = \substr($message, 0, $maxMessageLength); + $message = \WPMailSMTP\Vendor\Monolog\Utils::substr($message, 0, $maxMessageLength); $timestamp = $record['datetime']->getTimestamp(); - $dataArray = array('token' => $this->token, 'user' => $this->user, 'message' => $message, 'title' => $this->title, 'timestamp' => $timestamp); + $dataArray = ['token' => $this->token, 'user' => $this->user, 'message' => $message, 'title' => $this->title, 'timestamp' => $timestamp]; if (isset($record['level']) && $record['level'] >= $this->emergencyLevel) { $dataArray['priority'] = 2; $dataArray['retry'] = $this->retry; @@ -98,7 +121,7 @@ class PushoverHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler } return \http_build_query($dataArray); } - private function buildHeader($content) + private function buildHeader(string $content) : string { $header = "POST /1/messages.json HTTP/1.1\r\n"; $header .= "Host: api.pushover.net\r\n"; @@ -107,7 +130,7 @@ class PushoverHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler $header .= "\r\n"; return $header; } - protected function write(array $record) + protected function write(array $record) : void { foreach ($this->users as $user) { $this->user = $user; @@ -116,20 +139,32 @@ class PushoverHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler } $this->user = null; } - public function setHighPriorityLevel($value) + /** + * @param int|string $value + * + * @phpstan-param Level|LevelName|LogLevel::* $value + */ + public function setHighPriorityLevel($value) : self { - $this->highPriorityLevel = $value; + $this->highPriorityLevel = \WPMailSMTP\Vendor\Monolog\Logger::toMonologLevel($value); + return $this; } - public function setEmergencyLevel($value) + /** + * @param int|string $value + * + * @phpstan-param Level|LevelName|LogLevel::* $value + */ + public function setEmergencyLevel($value) : self { - $this->emergencyLevel = $value; + $this->emergencyLevel = \WPMailSMTP\Vendor\Monolog\Logger::toMonologLevel($value); + return $this; } /** * Use the formatted message? - * @param bool $value */ - public function useFormattedMessage($value) + public function useFormattedMessage(bool $value) : self { - $this->useFormattedMessage = (bool) $value; + $this->useFormattedMessage = $value; + return $this; } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RavenHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RavenHandler.php deleted file mode 100644 index 8843ade1..00000000 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RavenHandler.php +++ /dev/null @@ -1,197 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace WPMailSMTP\Vendor\Monolog\Handler; - -use WPMailSMTP\Vendor\Monolog\Formatter\LineFormatter; -use WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface; -use WPMailSMTP\Vendor\Monolog\Logger; -use WPMailSMTP\Vendor\Raven_Client; -/** - * Handler to send messages to a Sentry (https://github.com/getsentry/sentry) server - * using sentry-php (https://github.com/getsentry/sentry-php) - * - * @author Marc Abramowitz - */ -class RavenHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler -{ - /** - * Translates Monolog log levels to Raven log levels. - */ - protected $logLevels = array(\WPMailSMTP\Vendor\Monolog\Logger::DEBUG => \WPMailSMTP\Vendor\Raven_Client::DEBUG, \WPMailSMTP\Vendor\Monolog\Logger::INFO => \WPMailSMTP\Vendor\Raven_Client::INFO, \WPMailSMTP\Vendor\Monolog\Logger::NOTICE => \WPMailSMTP\Vendor\Raven_Client::INFO, \WPMailSMTP\Vendor\Monolog\Logger::WARNING => \WPMailSMTP\Vendor\Raven_Client::WARNING, \WPMailSMTP\Vendor\Monolog\Logger::ERROR => \WPMailSMTP\Vendor\Raven_Client::ERROR, \WPMailSMTP\Vendor\Monolog\Logger::CRITICAL => \WPMailSMTP\Vendor\Raven_Client::FATAL, \WPMailSMTP\Vendor\Monolog\Logger::ALERT => \WPMailSMTP\Vendor\Raven_Client::FATAL, \WPMailSMTP\Vendor\Monolog\Logger::EMERGENCY => \WPMailSMTP\Vendor\Raven_Client::FATAL); - /** - * @var string should represent the current version of the calling - * software. Can be any string (git commit, version number) - */ - protected $release; - /** - * @var Raven_Client the client object that sends the message to the server - */ - protected $ravenClient; - /** - * @var FormatterInterface The formatter to use for the logs generated via handleBatch() - */ - protected $batchFormatter; - /** - * @param Raven_Client $ravenClient - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(\WPMailSMTP\Vendor\Raven_Client $ravenClient, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true) - { - @\trigger_error('The Monolog\\Handler\\RavenHandler class is deprecated. You should rather upgrade to the sentry/sentry 2.x and use Sentry\\Monolog\\Handler, see https://github.com/getsentry/sentry-php/blob/master/src/Monolog/Handler.php', \E_USER_DEPRECATED); - parent::__construct($level, $bubble); - $this->ravenClient = $ravenClient; - } - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - $level = $this->level; - // filter records based on their level - $records = \array_filter($records, function ($record) use($level) { - return $record['level'] >= $level; - }); - if (!$records) { - return; - } - // the record with the highest severity is the "main" one - $record = \array_reduce($records, function ($highest, $record) { - if (null === $highest || $record['level'] > $highest['level']) { - return $record; - } - return $highest; - }); - // the other ones are added as a context item - $logs = array(); - foreach ($records as $r) { - $logs[] = $this->processRecord($r); - } - if ($logs) { - $record['context']['logs'] = (string) $this->getBatchFormatter()->formatBatch($logs); - } - $this->handle($record); - } - /** - * Sets the formatter for the logs generated by handleBatch(). - * - * @param FormatterInterface $formatter - */ - public function setBatchFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) - { - $this->batchFormatter = $formatter; - } - /** - * Gets the formatter for the logs generated by handleBatch(). - * - * @return FormatterInterface - */ - public function getBatchFormatter() - { - if (!$this->batchFormatter) { - $this->batchFormatter = $this->getDefaultBatchFormatter(); - } - return $this->batchFormatter; - } - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - $previousUserContext = \false; - $options = array(); - $options['level'] = $this->logLevels[$record['level']]; - $options['tags'] = array(); - if (!empty($record['extra']['tags'])) { - $options['tags'] = \array_merge($options['tags'], $record['extra']['tags']); - unset($record['extra']['tags']); - } - if (!empty($record['context']['tags'])) { - $options['tags'] = \array_merge($options['tags'], $record['context']['tags']); - unset($record['context']['tags']); - } - if (!empty($record['context']['fingerprint'])) { - $options['fingerprint'] = $record['context']['fingerprint']; - unset($record['context']['fingerprint']); - } - if (!empty($record['context']['logger'])) { - $options['logger'] = $record['context']['logger']; - unset($record['context']['logger']); - } else { - $options['logger'] = $record['channel']; - } - foreach ($this->getExtraParameters() as $key) { - foreach (array('extra', 'context') as $source) { - if (!empty($record[$source][$key])) { - $options[$key] = $record[$source][$key]; - unset($record[$source][$key]); - } - } - } - if (!empty($record['context'])) { - $options['extra']['context'] = $record['context']; - if (!empty($record['context']['user'])) { - $previousUserContext = $this->ravenClient->context->user; - $this->ravenClient->user_context($record['context']['user']); - unset($options['extra']['context']['user']); - } - } - if (!empty($record['extra'])) { - $options['extra']['extra'] = $record['extra']; - } - if (!empty($this->release) && !isset($options['release'])) { - $options['release'] = $this->release; - } - if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || \PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable)) { - $options['message'] = $record['formatted']; - $this->ravenClient->captureException($record['context']['exception'], $options); - } else { - $this->ravenClient->captureMessage($record['formatted'], array(), $options); - } - if ($previousUserContext !== \false) { - $this->ravenClient->user_context($previousUserContext); - } - } - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new \WPMailSMTP\Vendor\Monolog\Formatter\LineFormatter('[%channel%] %message%'); - } - /** - * Gets the default formatter for the logs generated by handleBatch(). - * - * @return FormatterInterface - */ - protected function getDefaultBatchFormatter() - { - return new \WPMailSMTP\Vendor\Monolog\Formatter\LineFormatter(); - } - /** - * Gets extra parameters supported by Raven that can be found in "extra" and "context" - * - * @return array - */ - protected function getExtraParameters() - { - return array('contexts', 'checksum', 'release', 'event_id'); - } - /** - * @param string $value - * @return self - */ - public function setRelease($value) - { - $this->release = $value; - return $this; - } -} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RedisHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RedisHandler.php index ca341427..bee6018a 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RedisHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RedisHandler.php @@ -1,5 +1,6 @@ pushHandler($redis); * * @author Thomas Tourlourat + * + * @phpstan-import-type FormattedRecord from AbstractProcessingHandler */ class RedisHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler { + /** @var \Predis\Client<\Predis\Client>|\Redis */ private $redisClient; + /** @var string */ private $redisKey; + /** @var int */ protected $capSize; /** - * @param \Predis\Client|\Redis $redis The redis instance + * @param \Predis\Client<\Predis\Client>|\Redis $redis The redis instance * @param string $key The key name to push records to - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param int|false $capSize Number of entries to limit list size to + * @param int $capSize Number of entries to limit list size to, 0 = unlimited */ - public function __construct($redis, $key, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true, $capSize = \false) + public function __construct($redis, string $key, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true, int $capSize = 0) { if (!($redis instanceof \WPMailSMTP\Vendor\Predis\Client || $redis instanceof \Redis)) { throw new \InvalidArgumentException('Predis\\Client or Redis instance required'); @@ -48,7 +53,7 @@ class RedisHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessing /** * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { if ($this->capSize) { $this->writeCapped($record); @@ -60,10 +65,9 @@ class RedisHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessing * Write and cap the collection * Writes the record to the redis list and caps its * - * @param array $record associative record array - * @return void + * @phpstan-param FormattedRecord $record */ - protected function writeCapped(array $record) + protected function writeCapped(array $record) : void { if ($this->redisClient instanceof \Redis) { $mode = \defined('\\Redis::MULTI') ? \Redis::MULTI : 1; @@ -80,7 +84,7 @@ class RedisHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessing /** * {@inheritDoc} */ - protected function getDefaultFormatter() + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { return new \WPMailSMTP\Vendor\Monolog\Formatter\LineFormatter(); } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php new file mode 100644 index 00000000..33b274c7 --- /dev/null +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace WPMailSMTP\Vendor\Monolog\Handler; + +use WPMailSMTP\Vendor\Monolog\Formatter\LineFormatter; +use WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface; +use WPMailSMTP\Vendor\Monolog\Logger; +/** + * Sends the message to a Redis Pub/Sub channel using PUBLISH + * + * usage example: + * + * $log = new Logger('application'); + * $redis = new RedisPubSubHandler(new Predis\Client("tcp://localhost:6379"), "logs", Logger::WARNING); + * $log->pushHandler($redis); + * + * @author Gaëtan Faugère + */ +class RedisPubSubHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler +{ + /** @var \Predis\Client<\Predis\Client>|\Redis */ + private $redisClient; + /** @var string */ + private $channelKey; + /** + * @param \Predis\Client<\Predis\Client>|\Redis $redis The redis instance + * @param string $key The channel key to publish records to + */ + public function __construct($redis, string $key, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true) + { + if (!($redis instanceof \WPMailSMTP\Vendor\Predis\Client || $redis instanceof \Redis)) { + throw new \InvalidArgumentException('Predis\\Client or Redis instance required'); + } + $this->redisClient = $redis; + $this->channelKey = $key; + parent::__construct($level, $bubble); + } + /** + * {@inheritDoc} + */ + protected function write(array $record) : void + { + $this->redisClient->publish($this->channelKey, $record["formatted"]); + } + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface + { + return new \WPMailSMTP\Vendor\Monolog\Formatter\LineFormatter(); + } +} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RollbarHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RollbarHandler.php index d01f04d0..4f845a59 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RollbarHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RollbarHandler.php @@ -1,5 +1,6 @@ 'debug', \WPMailSMTP\Vendor\Monolog\Logger::INFO => 'info', \WPMailSMTP\Vendor\Monolog\Logger::NOTICE => 'info', \WPMailSMTP\Vendor\Monolog\Logger::WARNING => 'warning', \WPMailSMTP\Vendor\Monolog\Logger::ERROR => 'error', \WPMailSMTP\Vendor\Monolog\Logger::CRITICAL => 'critical', \WPMailSMTP\Vendor\Monolog\Logger::ALERT => 'critical', \WPMailSMTP\Vendor\Monolog\Logger::EMERGENCY => 'critical'); + protected $rollbarLogger; + /** @var string[] */ + protected $levelMap = [\WPMailSMTP\Vendor\Monolog\Logger::DEBUG => 'debug', \WPMailSMTP\Vendor\Monolog\Logger::INFO => 'info', \WPMailSMTP\Vendor\Monolog\Logger::NOTICE => 'info', \WPMailSMTP\Vendor\Monolog\Logger::WARNING => 'warning', \WPMailSMTP\Vendor\Monolog\Logger::ERROR => 'error', \WPMailSMTP\Vendor\Monolog\Logger::CRITICAL => 'critical', \WPMailSMTP\Vendor\Monolog\Logger::ALERT => 'critical', \WPMailSMTP\Vendor\Monolog\Logger::EMERGENCY => 'critical']; /** * Records whether any log records have been added since the last flush of the rollbar notifier * * @var bool */ private $hasRecords = \false; + /** @var bool */ protected $initialized = \false; /** - * @param RollbarNotifier $rollbarNotifier RollbarNotifier object constructed with valid token - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param RollbarLogger $rollbarLogger RollbarLogger object constructed with valid token */ - public function __construct(\WPMailSMTP\Vendor\RollbarNotifier $rollbarNotifier, $level = \WPMailSMTP\Vendor\Monolog\Logger::ERROR, $bubble = \true) + public function __construct(\WPMailSMTP\Vendor\Rollbar\RollbarLogger $rollbarLogger, $level = \WPMailSMTP\Vendor\Monolog\Logger::ERROR, bool $bubble = \true) { - $this->rollbarNotifier = $rollbarNotifier; + $this->rollbarLogger = $rollbarLogger; parent::__construct($level, $bubble); } /** - * {@inheritdoc} + * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { if (!$this->initialized) { // __destructor() doesn't get called on Fatal errors @@ -66,38 +65,34 @@ class RollbarHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessi $this->initialized = \true; } $context = $record['context']; - $payload = array(); - if (isset($context['payload'])) { - $payload = $context['payload']; - unset($context['payload']); - } - $context = \array_merge($context, $record['extra'], array('level' => $this->levelMap[$record['level']], 'monolog_level' => $record['level_name'], 'channel' => $record['channel'], 'datetime' => $record['datetime']->format('U'))); - if (isset($context['exception']) && $context['exception'] instanceof \Exception) { - $payload['level'] = $context['level']; + $context = \array_merge($context, $record['extra'], ['level' => $this->levelMap[$record['level']], 'monolog_level' => $record['level_name'], 'channel' => $record['channel'], 'datetime' => $record['datetime']->format('U')]); + if (isset($context['exception']) && $context['exception'] instanceof \Throwable) { $exception = $context['exception']; unset($context['exception']); - $this->rollbarNotifier->report_exception($exception, $context, $payload); + $toLog = $exception; } else { - $this->rollbarNotifier->report_message($record['message'], $context['level'], $context, $payload); + $toLog = $record['message']; } + // @phpstan-ignore-next-line + $this->rollbarLogger->log($context['level'], $toLog, $context); $this->hasRecords = \true; } - public function flush() + public function flush() : void { if ($this->hasRecords) { - $this->rollbarNotifier->flush(); + $this->rollbarLogger->flush(); $this->hasRecords = \false; } } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function close() + public function close() : void { $this->flush(); } /** - * {@inheritdoc} + * {@inheritDoc} */ public function reset() { diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php index 143413af..a2dc0184 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php @@ -1,5 +1,6 @@ filename = \WPMailSMTP\Vendor\Monolog\Utils::canonicalizePath($filename); - $this->maxFiles = (int) $maxFiles; - $this->nextRotation = new \DateTime('tomorrow'); + $this->maxFiles = $maxFiles; + $this->nextRotation = new \DateTimeImmutable('tomorrow'); $this->filenameFormat = '{filename}-{date}'; - $this->dateFormat = 'Y-m-d'; + $this->dateFormat = static::FILE_PER_DAY; parent::__construct($this->getTimedFilename(), $level, $bubble, $filePermission, $useLocking); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function close() + public function close() : void { parent::close(); if (\true === $this->mustRotate) { @@ -60,7 +66,7 @@ class RotatingFileHandler extends \WPMailSMTP\Vendor\Monolog\Handler\StreamHandl } } /** - * {@inheritdoc} + * {@inheritDoc} */ public function reset() { @@ -69,29 +75,30 @@ class RotatingFileHandler extends \WPMailSMTP\Vendor\Monolog\Handler\StreamHandl $this->rotate(); } } - public function setFilenameFormat($filenameFormat, $dateFormat) + public function setFilenameFormat(string $filenameFormat, string $dateFormat) : self { - if (!\preg_match('{^Y(([/_.-]?m)([/_.-]?d)?)?$}', $dateFormat)) { - \trigger_error('Invalid date format - format must be one of ' . 'RotatingFileHandler::FILE_PER_DAY ("Y-m-d"), RotatingFileHandler::FILE_PER_MONTH ("Y-m") ' . 'or RotatingFileHandler::FILE_PER_YEAR ("Y"), or you can set one of the ' . 'date formats using slashes, underscores and/or dots instead of dashes.', \E_USER_DEPRECATED); + if (!\preg_match('{^[Yy](([/_.-]?m)([/_.-]?d)?)?$}', $dateFormat)) { + throw new \InvalidArgumentException('Invalid date format - format must be one of ' . 'RotatingFileHandler::FILE_PER_DAY ("Y-m-d"), RotatingFileHandler::FILE_PER_MONTH ("Y-m") ' . 'or RotatingFileHandler::FILE_PER_YEAR ("Y"), or you can set one of the ' . 'date formats using slashes, underscores and/or dots instead of dashes.'); } if (\substr_count($filenameFormat, '{date}') === 0) { - \trigger_error('Invalid filename format - format should contain at least `{date}`, because otherwise rotating is impossible.', \E_USER_DEPRECATED); + throw new \InvalidArgumentException('Invalid filename format - format must contain at least `{date}`, because otherwise rotating is impossible.'); } $this->filenameFormat = $filenameFormat; $this->dateFormat = $dateFormat; $this->url = $this->getTimedFilename(); $this->close(); + return $this; } /** - * {@inheritdoc} + * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { // on the first record written, if the log is new, we should rotate (once per day) if (null === $this->mustRotate) { - $this->mustRotate = !\file_exists($this->url); + $this->mustRotate = null === $this->url || !\file_exists($this->url); } - if ($this->nextRotation < $record['datetime']) { + if ($this->nextRotation <= $record['datetime']) { $this->mustRotate = \true; $this->close(); } @@ -100,16 +107,20 @@ class RotatingFileHandler extends \WPMailSMTP\Vendor\Monolog\Handler\StreamHandl /** * Rotates the files. */ - protected function rotate() + protected function rotate() : void { // update filename $this->url = $this->getTimedFilename(); - $this->nextRotation = new \DateTime('tomorrow'); + $this->nextRotation = new \DateTimeImmutable('tomorrow'); // skip GC of old logs if files are unlimited if (0 === $this->maxFiles) { return; } $logFiles = \glob($this->getGlobPattern()); + if (\false === $logFiles) { + // failed to glob + return; + } if ($this->maxFiles >= \count($logFiles)) { // no files to remove return; @@ -122,7 +133,8 @@ class RotatingFileHandler extends \WPMailSMTP\Vendor\Monolog\Handler\StreamHandl if (\is_writable($file)) { // suppress errors here as unlink() might fail if two processes // are cleaning up/rotating at the same time - \set_error_handler(function ($errno, $errstr, $errfile, $errline) { + \set_error_handler(function (int $errno, string $errstr, string $errfile, int $errline) : bool { + return \false; }); \unlink($file); \restore_error_handler(); @@ -130,20 +142,20 @@ class RotatingFileHandler extends \WPMailSMTP\Vendor\Monolog\Handler\StreamHandl } $this->mustRotate = \false; } - protected function getTimedFilename() + protected function getTimedFilename() : string { $fileInfo = \pathinfo($this->filename); - $timedFilename = \str_replace(array('{filename}', '{date}'), array($fileInfo['filename'], \date($this->dateFormat)), $fileInfo['dirname'] . '/' . $this->filenameFormat); - if (!empty($fileInfo['extension'])) { + $timedFilename = \str_replace(['{filename}', '{date}'], [$fileInfo['filename'], \date($this->dateFormat)], $fileInfo['dirname'] . '/' . $this->filenameFormat); + if (isset($fileInfo['extension'])) { $timedFilename .= '.' . $fileInfo['extension']; } return $timedFilename; } - protected function getGlobPattern() + protected function getGlobPattern() : string { $fileInfo = \pathinfo($this->filename); - $glob = \str_replace(array('{filename}', '{date}'), array($fileInfo['filename'], '[0-9][0-9][0-9][0-9]*'), $fileInfo['dirname'] . '/' . $this->filenameFormat); - if (!empty($fileInfo['extension'])) { + $glob = \str_replace(['{filename}', '{date}'], [$fileInfo['filename'], \str_replace(['Y', 'y', 'm', 'd'], ['[0-9][0-9][0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]'], $this->dateFormat)], $fileInfo['dirname'] . '/' . $this->filenameFormat); + if (isset($fileInfo['extension'])) { $glob .= '.' . $fileInfo['extension']; } return $glob; diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SamplingHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SamplingHandler.php index 2d2d629c..f4e0f083 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SamplingHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SamplingHandler.php @@ -1,5 +1,6 @@ * @author Kunal Mehta + * + * @phpstan-import-type Record from \Monolog\Logger + * @phpstan-import-type Level from \Monolog\Logger */ -class SamplingHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler +class SamplingHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler implements \WPMailSMTP\Vendor\Monolog\Handler\ProcessableHandlerInterface, \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface { + use ProcessableHandlerTrait; /** - * @var callable|HandlerInterface $handler + * @var HandlerInterface|callable + * @phpstan-var HandlerInterface|callable(Record|array{level: Level}|null, HandlerInterface): HandlerInterface */ protected $handler; /** @@ -36,10 +42,12 @@ class SamplingHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler */ protected $factor; /** + * @psalm-param HandlerInterface|callable(Record|array{level: Level}|null, HandlerInterface): HandlerInterface $handler + * * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $samplingHandler). - * @param int $factor Sample factor + * @param int $factor Sample factor (e.g. 10 means every ~10th record is sampled) */ - public function __construct($handler, $factor) + public function __construct($handler, int $factor) { parent::__construct(); $this->handler = $handler; @@ -48,17 +56,16 @@ class SamplingHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler throw new \RuntimeException("The given handler (" . \json_encode($this->handler) . ") is not a callable nor a Monolog\\Handler\\HandlerInterface object"); } } - public function isHandling(array $record) + public function isHandling(array $record) : bool { return $this->getHandler($record)->isHandling($record); } - public function handle(array $record) + public function handle(array $record) : bool { if ($this->isHandling($record) && \mt_rand(1, $this->factor) === 1) { if ($this->processors) { - foreach ($this->processors as $processor) { - $record = \call_user_func($processor, $record); - } + /** @var Record $record */ + $record = $this->processRecord($record); } $this->getHandler($record)->handle($record); } @@ -69,12 +76,14 @@ class SamplingHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler * * If the handler was provided as a factory callable, this will trigger the handler's instantiation. * + * @phpstan-param Record|array{level: Level}|null $record + * * @return HandlerInterface */ - public function getHandler(array $record = null) + public function getHandler(?array $record = null) { if (!$this->handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface) { - $this->handler = \call_user_func($this->handler, $record, $this); + $this->handler = ($this->handler)($record, $this); if (!$this->handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface) { throw new \RuntimeException("The factory callable should return a HandlerInterface"); } @@ -82,18 +91,26 @@ class SamplingHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractHandler return $this->handler; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) + public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface { - $this->getHandler()->setFormatter($formatter); - return $this; + $handler = $this->getHandler(); + if ($handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface) { + $handler->setFormatter($formatter); + return $this; + } + throw new \UnexpectedValueException('The nested handler of type ' . \get_class($handler) . ' does not support formatters.'); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function getFormatter() + public function getFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { - return $this->getHandler()->getFormatter(); + $handler = $this->getHandler(); + if ($handler instanceof \WPMailSMTP\Vendor\Monolog\Handler\FormattableHandlerInterface) { + return $handler->getFormatter(); + } + throw new \UnexpectedValueException('The nested handler of type ' . \get_class($handler) . ' does not support formatters.'); } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SendGridHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SendGridHandler.php new file mode 100644 index 00000000..841277ca --- /dev/null +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SendGridHandler.php @@ -0,0 +1,92 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace WPMailSMTP\Vendor\Monolog\Handler; + +use WPMailSMTP\Vendor\Monolog\Logger; +/** + * SendGridrHandler uses the SendGrid API v2 function to send Log emails, more information in https://sendgrid.com/docs/API_Reference/Web_API/mail.html + * + * @author Ricardo Fontanelli + */ +class SendGridHandler extends \WPMailSMTP\Vendor\Monolog\Handler\MailHandler +{ + /** + * The SendGrid API User + * @var string + */ + protected $apiUser; + /** + * The SendGrid API Key + * @var string + */ + protected $apiKey; + /** + * The email addresses to which the message will be sent + * @var string + */ + protected $from; + /** + * The email addresses to which the message will be sent + * @var string[] + */ + protected $to; + /** + * The subject of the email + * @var string + */ + protected $subject; + /** + * @param string $apiUser The SendGrid API User + * @param string $apiKey The SendGrid API Key + * @param string $from The sender of the email + * @param string|string[] $to The recipients of the email + * @param string $subject The subject of the mail + */ + public function __construct(string $apiUser, string $apiKey, string $from, $to, string $subject, $level = \WPMailSMTP\Vendor\Monolog\Logger::ERROR, bool $bubble = \true) + { + if (!\extension_loaded('curl')) { + throw new \WPMailSMTP\Vendor\Monolog\Handler\MissingExtensionException('The curl extension is needed to use the SendGridHandler'); + } + parent::__construct($level, $bubble); + $this->apiUser = $apiUser; + $this->apiKey = $apiKey; + $this->from = $from; + $this->to = (array) $to; + $this->subject = $subject; + } + /** + * {@inheritDoc} + */ + protected function send(string $content, array $records) : void + { + $message = []; + $message['api_user'] = $this->apiUser; + $message['api_key'] = $this->apiKey; + $message['from'] = $this->from; + foreach ($this->to as $recipient) { + $message['to[]'] = $recipient; + } + $message['subject'] = $this->subject; + $message['date'] = \date('r'); + if ($this->isHtmlBody($content)) { + $message['html'] = $content; + } else { + $message['text'] = $content; + } + $ch = \curl_init(); + \curl_setopt($ch, \CURLOPT_URL, 'https://api.sendgrid.com/api/mail.send.json'); + \curl_setopt($ch, \CURLOPT_POST, 1); + \curl_setopt($ch, \CURLOPT_RETURNTRANSFER, 1); + \curl_setopt($ch, \CURLOPT_POSTFIELDS, \http_build_query($message)); + \WPMailSMTP\Vendor\Monolog\Handler\Curl\Util::execute($ch, 2); + } +} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php index 21ef9153..7dde5ba7 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php @@ -1,5 +1,6 @@ * @see https://api.slack.com/incoming-webhooks * @see https://api.slack.com/docs/message-attachments + * + * @phpstan-import-type FormattedRecord from \Monolog\Handler\AbstractProcessingHandler + * @phpstan-import-type Record from \Monolog\Logger */ class SlackRecord { - const COLOR_DANGER = 'danger'; - const COLOR_WARNING = 'warning'; - const COLOR_GOOD = 'good'; - const COLOR_DEFAULT = '#e3e4e6'; + public const COLOR_DANGER = 'danger'; + public const COLOR_WARNING = 'warning'; + public const COLOR_GOOD = 'good'; + public const COLOR_DEFAULT = '#e3e4e6'; /** * Slack channel (encoded ID or name) * @var string|null @@ -40,7 +44,7 @@ class SlackRecord private $username; /** * User icon e.g. 'ghost', 'http://example.com/user.png' - * @var string + * @var string|null */ private $userIcon; /** @@ -60,35 +64,38 @@ class SlackRecord private $includeContextAndExtra; /** * Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - * @var array + * @var string[] */ private $excludeFields; /** - * @var FormatterInterface + * @var ?FormatterInterface */ private $formatter; /** * @var NormalizerFormatter */ private $normalizerFormatter; - public function __construct($channel = null, $username = null, $useAttachment = \true, $userIcon = null, $useShortAttachment = \false, $includeContextAndExtra = \false, array $excludeFields = array(), \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter = null) + /** + * @param string[] $excludeFields + */ + public function __construct(?string $channel = null, ?string $username = null, bool $useAttachment = \true, ?string $userIcon = null, bool $useShortAttachment = \false, bool $includeContextAndExtra = \false, array $excludeFields = array(), ?\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter = null) { - $this->channel = $channel; - $this->username = $username; - $this->userIcon = \trim($userIcon, ':'); - $this->useAttachment = $useAttachment; - $this->useShortAttachment = $useShortAttachment; - $this->includeContextAndExtra = $includeContextAndExtra; - $this->excludeFields = $excludeFields; - $this->formatter = $formatter; + $this->setChannel($channel)->setUsername($username)->useAttachment($useAttachment)->setUserIcon($userIcon)->useShortAttachment($useShortAttachment)->includeContextAndExtra($includeContextAndExtra)->excludeFields($excludeFields)->setFormatter($formatter); if ($this->includeContextAndExtra) { $this->normalizerFormatter = new \WPMailSMTP\Vendor\Monolog\Formatter\NormalizerFormatter(); } } - public function getSlackData(array $record) + /** + * Returns required data in format that Slack + * is expecting. + * + * @phpstan-param FormattedRecord $record + * @phpstan-return mixed[] + */ + public function getSlackData(array $record) : array { $dataArray = array(); - $record = $this->excludeFields($record); + $record = $this->removeExcludedFields($record); if ($this->username) { $dataArray['username'] = $this->username; } @@ -96,12 +103,13 @@ class SlackRecord $dataArray['channel'] = $this->channel; } if ($this->formatter && !$this->useAttachment) { + /** @phpstan-ignore-next-line */ $message = $this->formatter->format($record); } else { $message = $record['message']; } if ($this->useAttachment) { - $attachment = array('fallback' => $message, 'text' => $message, 'color' => $this->getAttachmentColor($record['level']), 'fields' => array(), 'mrkdwn_in' => array('fields'), 'ts' => $record['datetime']->getTimestamp()); + $attachment = array('fallback' => $message, 'text' => $message, 'color' => $this->getAttachmentColor($record['level']), 'fields' => array(), 'mrkdwn_in' => array('fields'), 'ts' => $record['datetime']->getTimestamp(), 'footer' => $this->username, 'footer_icon' => $this->userIcon); if ($this->useShortAttachment) { $attachment['title'] = $record['level_name']; } else { @@ -114,7 +122,7 @@ class SlackRecord continue; } if ($this->useShortAttachment) { - $attachment['fields'][] = $this->generateAttachmentField($key, $record[$key]); + $attachment['fields'][] = $this->generateAttachmentField((string) $key, $record[$key]); } else { // Add all extra fields as individual fields in attachment $attachment['fields'] = \array_merge($attachment['fields'], $this->generateAttachmentFields($record[$key])); @@ -135,89 +143,135 @@ class SlackRecord return $dataArray; } /** - * Returned a Slack message attachment color associated with + * Returns a Slack message attachment color associated with * provided level. - * - * @param int $level - * @return string */ - public function getAttachmentColor($level) + public function getAttachmentColor(int $level) : string { switch (\true) { case $level >= \WPMailSMTP\Vendor\Monolog\Logger::ERROR: - return self::COLOR_DANGER; + return static::COLOR_DANGER; case $level >= \WPMailSMTP\Vendor\Monolog\Logger::WARNING: - return self::COLOR_WARNING; + return static::COLOR_WARNING; case $level >= \WPMailSMTP\Vendor\Monolog\Logger::INFO: - return self::COLOR_GOOD; + return static::COLOR_GOOD; default: - return self::COLOR_DEFAULT; + return static::COLOR_DEFAULT; } } /** * Stringifies an array of key/value pairs to be used in attachment fields * - * @param array $fields - * - * @return string + * @param mixed[] $fields */ - public function stringify($fields) + public function stringify(array $fields) : string { + /** @var Record $fields */ $normalized = $this->normalizerFormatter->format($fields); - $prettyPrintFlag = \defined('JSON_PRETTY_PRINT') ? \JSON_PRETTY_PRINT : 128; - $flags = 0; - if (\PHP_VERSION_ID >= 50400) { - $flags = \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE; - } $hasSecondDimension = \count(\array_filter($normalized, 'is_array')); $hasNonNumericKeys = !\count(\array_filter(\array_keys($normalized), 'is_numeric')); - return $hasSecondDimension || $hasNonNumericKeys ? \WPMailSMTP\Vendor\Monolog\Utils::jsonEncode($normalized, $prettyPrintFlag | $flags) : \WPMailSMTP\Vendor\Monolog\Utils::jsonEncode($normalized, $flags); + return $hasSecondDimension || $hasNonNumericKeys ? \WPMailSMTP\Vendor\Monolog\Utils::jsonEncode($normalized, \JSON_PRETTY_PRINT | \WPMailSMTP\Vendor\Monolog\Utils::DEFAULT_JSON_FLAGS) : \WPMailSMTP\Vendor\Monolog\Utils::jsonEncode($normalized, \WPMailSMTP\Vendor\Monolog\Utils::DEFAULT_JSON_FLAGS); } /** - * Sets the formatter + * Channel used by the bot when posting * - * @param FormatterInterface $formatter + * @param ?string $channel + * + * @return static */ - public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) + public function setChannel(?string $channel = null) : self + { + $this->channel = $channel; + return $this; + } + /** + * Username used by the bot when posting + * + * @param ?string $username + * + * @return static + */ + public function setUsername(?string $username = null) : self + { + $this->username = $username; + return $this; + } + public function useAttachment(bool $useAttachment = \true) : self + { + $this->useAttachment = $useAttachment; + return $this; + } + public function setUserIcon(?string $userIcon = null) : self + { + $this->userIcon = $userIcon; + if (\is_string($userIcon)) { + $this->userIcon = \trim($userIcon, ':'); + } + return $this; + } + public function useShortAttachment(bool $useShortAttachment = \false) : self + { + $this->useShortAttachment = $useShortAttachment; + return $this; + } + public function includeContextAndExtra(bool $includeContextAndExtra = \false) : self + { + $this->includeContextAndExtra = $includeContextAndExtra; + if ($this->includeContextAndExtra) { + $this->normalizerFormatter = new \WPMailSMTP\Vendor\Monolog\Formatter\NormalizerFormatter(); + } + return $this; + } + /** + * @param string[] $excludeFields + */ + public function excludeFields(array $excludeFields = []) : self + { + $this->excludeFields = $excludeFields; + return $this; + } + public function setFormatter(?\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter = null) : self { $this->formatter = $formatter; + return $this; } /** * Generates attachment field * - * @param string $title - * @param string|array $value + * @param string|mixed[] $value * - * @return array + * @return array{title: string, value: string, short: false} */ - private function generateAttachmentField($title, $value) + private function generateAttachmentField(string $title, $value) : array { - $value = \is_array($value) ? \sprintf('```%s```', $this->stringify($value)) : $value; + $value = \is_array($value) ? \sprintf('```%s```', \substr($this->stringify($value), 0, 1990)) : $value; return array('title' => \ucfirst($title), 'value' => $value, 'short' => \false); } /** * Generates a collection of attachment fields from array * - * @param array $data + * @param mixed[] $data * - * @return array + * @return array */ - private function generateAttachmentFields(array $data) + private function generateAttachmentFields(array $data) : array { + /** @var Record $data */ + $normalized = $this->normalizerFormatter->format($data); $fields = array(); - foreach ($this->normalizerFormatter->format($data) as $key => $value) { - $fields[] = $this->generateAttachmentField($key, $value); + foreach ($normalized as $key => $value) { + $fields[] = $this->generateAttachmentField((string) $key, $value); } return $fields; } /** * Get a copy of record with fields excluded according to $this->excludeFields * - * @param array $record + * @phpstan-param FormattedRecord $record * - * @return array + * @return mixed[] */ - private function excludeFields(array $record) + private function removeExcludedFields(array $record) : array { foreach ($this->excludeFields as $field) { $keys = \explode('.', $field); diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackHandler.php index 8af2f089..e19611ee 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackHandler.php @@ -1,5 +1,6 @@ * @see https://api.slack.com/ + * + * @phpstan-import-type FormattedRecord from AbstractProcessingHandler */ class SlackHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler { @@ -38,37 +41,32 @@ class SlackHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler * @param string|null $username Name of a bot * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) * @param string|null $iconEmoji The emoji name to use (or null) - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style + * @param bool $useShortAttachment Whether the context/extra messages added to Slack as attachments are in a short style * @param bool $includeContextAndExtra Whether the attachment should include context and extra data - * @param array $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] + * @param string[] $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] * @throws MissingExtensionException If no OpenSSL PHP extension configured */ - public function __construct($token, $channel, $username = null, $useAttachment = \true, $iconEmoji = null, $level = \WPMailSMTP\Vendor\Monolog\Logger::CRITICAL, $bubble = \true, $useShortAttachment = \false, $includeContextAndExtra = \false, array $excludeFields = array()) + public function __construct(string $token, string $channel, ?string $username = null, bool $useAttachment = \true, ?string $iconEmoji = null, $level = \WPMailSMTP\Vendor\Monolog\Logger::CRITICAL, bool $bubble = \true, bool $useShortAttachment = \false, bool $includeContextAndExtra = \false, array $excludeFields = array(), bool $persistent = \false, float $timeout = 0.0, float $writingTimeout = 10.0, ?float $connectionTimeout = null, ?int $chunkSize = null) { if (!\extension_loaded('openssl')) { throw new \WPMailSMTP\Vendor\Monolog\Handler\MissingExtensionException('The OpenSSL PHP extension is required to use the SlackHandler'); } - parent::__construct('ssl://slack.com:443', $level, $bubble); - $this->slackRecord = new \WPMailSMTP\Vendor\Monolog\Handler\Slack\SlackRecord($channel, $username, $useAttachment, $iconEmoji, $useShortAttachment, $includeContextAndExtra, $excludeFields, $this->formatter); + parent::__construct('ssl://slack.com:443', $level, $bubble, $persistent, $timeout, $writingTimeout, $connectionTimeout, $chunkSize); + $this->slackRecord = new \WPMailSMTP\Vendor\Monolog\Handler\Slack\SlackRecord($channel, $username, $useAttachment, $iconEmoji, $useShortAttachment, $includeContextAndExtra, $excludeFields); $this->token = $token; } - public function getSlackRecord() + public function getSlackRecord() : \WPMailSMTP\Vendor\Monolog\Handler\Slack\SlackRecord { return $this->slackRecord; } - public function getToken() + public function getToken() : string { return $this->token; } /** - * {@inheritdoc} - * - * @param array $record - * @return string + * {@inheritDoc} */ - protected function generateDataStream($record) + protected function generateDataStream(array $record) : string { $content = $this->buildContent($record); return $this->buildHeader($content) . $content; @@ -76,21 +74,18 @@ class SlackHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler /** * Builds the body of API call * - * @param array $record - * @return string + * @phpstan-param FormattedRecord $record */ - private function buildContent($record) + private function buildContent(array $record) : string { $dataArray = $this->prepareContentData($record); return \http_build_query($dataArray); } /** - * Prepares content data - * - * @param array $record - * @return array + * @phpstan-param FormattedRecord $record + * @return string[] */ - protected function prepareContentData($record) + protected function prepareContentData(array $record) : array { $dataArray = $this->slackRecord->getSlackData($record); $dataArray['token'] = $this->token; @@ -101,11 +96,8 @@ class SlackHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler } /** * Builds the header of the API Call - * - * @param string $content - * @return string */ - private function buildHeader($content) + private function buildHeader(string $content) : string { $header = "POST /api/chat.postMessage HTTP/1.1\r\n"; $header .= "Host: slack.com\r\n"; @@ -115,11 +107,9 @@ class SlackHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler return $header; } /** - * {@inheritdoc} - * - * @param array $record + * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { parent::write($record); $this->finalizeWrite(); @@ -130,7 +120,7 @@ class SlackHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler * If we do not read some but close the socket too early, slack sometimes * drops the request entirely. */ - protected function finalizeWrite() + protected function finalizeWrite() : void { $res = $this->getResource(); if (\is_resource($res)) { @@ -138,41 +128,60 @@ class SlackHandler extends \WPMailSMTP\Vendor\Monolog\Handler\SocketHandler } $this->closeSocket(); } - /** - * Returned a Slack message attachment color associated with - * provided level. - * - * @param int $level - * @return string - * @deprecated Use underlying SlackRecord instead - */ - protected function getAttachmentColor($level) - { - \trigger_error('SlackHandler::getAttachmentColor() is deprecated. Use underlying SlackRecord instead.', \E_USER_DEPRECATED); - return $this->slackRecord->getAttachmentColor($level); - } - /** - * Stringifies an array of key/value pairs to be used in attachment fields - * - * @param array $fields - * @return string - * @deprecated Use underlying SlackRecord instead - */ - protected function stringify($fields) - { - \trigger_error('SlackHandler::stringify() is deprecated. Use underlying SlackRecord instead.', \E_USER_DEPRECATED); - return $this->slackRecord->stringify($fields); - } - public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) + public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface { parent::setFormatter($formatter); $this->slackRecord->setFormatter($formatter); return $this; } - public function getFormatter() + public function getFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { $formatter = parent::getFormatter(); $this->slackRecord->setFormatter($formatter); return $formatter; } + /** + * Channel used by the bot when posting + */ + public function setChannel(string $channel) : self + { + $this->slackRecord->setChannel($channel); + return $this; + } + /** + * Username used by the bot when posting + */ + public function setUsername(string $username) : self + { + $this->slackRecord->setUsername($username); + return $this; + } + public function useAttachment(bool $useAttachment) : self + { + $this->slackRecord->useAttachment($useAttachment); + return $this; + } + public function setIconEmoji(string $iconEmoji) : self + { + $this->slackRecord->setUserIcon($iconEmoji); + return $this; + } + public function useShortAttachment(bool $useShortAttachment) : self + { + $this->slackRecord->useShortAttachment($useShortAttachment); + return $this; + } + public function includeContextAndExtra(bool $includeContextAndExtra) : self + { + $this->slackRecord->includeContextAndExtra($includeContextAndExtra); + return $this; + } + /** + * @param string[] $excludeFields + */ + public function excludeFields(array $excludeFields) : self + { + $this->slackRecord->excludeFields($excludeFields); + return $this; + } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php index 104d9ad7..c429428a 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php @@ -1,5 +1,6 @@ webhookUrl = $webhookUrl; - $this->slackRecord = new \WPMailSMTP\Vendor\Monolog\Handler\Slack\SlackRecord($channel, $username, $useAttachment, $iconEmoji, $useShortAttachment, $includeContextAndExtra, $excludeFields, $this->formatter); + $this->slackRecord = new \WPMailSMTP\Vendor\Monolog\Handler\Slack\SlackRecord($channel, $username, $useAttachment, $iconEmoji, $useShortAttachment, $includeContextAndExtra, $excludeFields); } - public function getSlackRecord() + public function getSlackRecord() : \WPMailSMTP\Vendor\Monolog\Handler\Slack\SlackRecord { return $this->slackRecord; } - public function getWebhookUrl() + public function getWebhookUrl() : string { return $this->webhookUrl; } /** - * {@inheritdoc} - * - * @param array $record + * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { $postData = $this->slackRecord->getSlackData($record); $postString = \WPMailSMTP\Vendor\Monolog\Utils::jsonEncode($postData); @@ -75,13 +75,13 @@ class SlackWebhookHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractPro \curl_setopt_array($ch, $options); \WPMailSMTP\Vendor\Monolog\Handler\Curl\Util::execute($ch); } - public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) + public function setFormatter(\WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface $formatter) : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface { parent::setFormatter($formatter); $this->slackRecord->setFormatter($formatter); return $this; } - public function getFormatter() + public function getFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { $formatter = parent::getFormatter(); $this->slackRecord->setFormatter($formatter); diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php deleted file mode 100644 index c915d3f9..00000000 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace WPMailSMTP\Vendor\Monolog\Handler; - -use WPMailSMTP\Vendor\Monolog\Logger; -/** - * Sends notifications through Slack's Slackbot - * - * @author Haralan Dobrev - * @see https://slack.com/apps/A0F81R8ET-slackbot - * @deprecated According to Slack the API used on this handler it is deprecated. - * Therefore this handler will be removed on 2.x - * Slack suggests to use webhooks instead. Please contact slack for more information. - */ -class SlackbotHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler -{ - /** - * The slug of the Slack team - * @var string - */ - private $slackTeam; - /** - * Slackbot token - * @var string - */ - private $token; - /** - * Slack channel name - * @var string - */ - private $channel; - /** - * @param string $slackTeam Slack team slug - * @param string $token Slackbot token - * @param string $channel Slack channel (encoded ID or name) - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($slackTeam, $token, $channel, $level = \WPMailSMTP\Vendor\Monolog\Logger::CRITICAL, $bubble = \true) - { - @\trigger_error('SlackbotHandler is deprecated and will be removed on 2.x', \E_USER_DEPRECATED); - parent::__construct($level, $bubble); - $this->slackTeam = $slackTeam; - $this->token = $token; - $this->channel = $channel; - } - /** - * {@inheritdoc} - * - * @param array $record - */ - protected function write(array $record) - { - $slackbotUrl = \sprintf('https://%s.slack.com/services/hooks/slackbot?token=%s&channel=%s', $this->slackTeam, $this->token, $this->channel); - $ch = \curl_init(); - \curl_setopt($ch, \CURLOPT_URL, $slackbotUrl); - \curl_setopt($ch, \CURLOPT_POST, \true); - \curl_setopt($ch, \CURLOPT_RETURNTRANSFER, \true); - \curl_setopt($ch, \CURLOPT_POSTFIELDS, $record['message']); - \WPMailSMTP\Vendor\Monolog\Handler\Curl\Util::execute($ch); - } -} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SocketHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SocketHandler.php index 877be7d2..dbc192b6 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SocketHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SocketHandler.php @@ -1,5 +1,6 @@ * @see http://php.net/manual/en/function.fsockopen.php + * + * @phpstan-import-type Record from \Monolog\Logger + * @phpstan-import-type FormattedRecord from AbstractProcessingHandler */ class SocketHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler { + /** @var string */ private $connectionString; + /** @var float */ private $connectionTimeout; + /** @var resource|null */ private $resource; - private $timeout = 0; - private $writingTimeout = 10; + /** @var float */ + private $timeout; + /** @var float */ + private $writingTimeout; + /** @var ?int */ private $lastSentBytes = null; - private $chunkSize = null; - private $persistent = \false; - private $errno; - private $errstr; - private $lastWritingAt; + /** @var ?int */ + private $chunkSize; + /** @var bool */ + private $persistent; + /** @var ?int */ + private $errno = null; + /** @var ?string */ + private $errstr = null; + /** @var ?float */ + private $lastWritingAt = null; /** - * @param string $connectionString Socket connection string - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param string $connectionString Socket connection string + * @param bool $persistent Flag to enable/disable persistent connections + * @param float $timeout Socket timeout to wait until the request is being aborted + * @param float $writingTimeout Socket timeout to wait until the request should've been sent/written + * @param float|null $connectionTimeout Socket connect timeout to wait until the connection should've been + * established + * @param int|null $chunkSize Sets the chunk size. Only has effect during connection in the writing cycle + * + * @throws \InvalidArgumentException If an invalid timeout value (less than 0) is passed. */ - public function __construct($connectionString, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true) + public function __construct(string $connectionString, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true, bool $persistent = \false, float $timeout = 0.0, float $writingTimeout = 10.0, ?float $connectionTimeout = null, ?int $chunkSize = null) { parent::__construct($level, $bubble); $this->connectionString = $connectionString; - $this->connectionTimeout = (float) \ini_get('default_socket_timeout'); + if ($connectionTimeout !== null) { + $this->validateTimeout($connectionTimeout); + } + $this->connectionTimeout = $connectionTimeout ?? (float) \ini_get('default_socket_timeout'); + $this->persistent = $persistent; + $this->validateTimeout($timeout); + $this->timeout = $timeout; + $this->validateTimeout($writingTimeout); + $this->writingTimeout = $writingTimeout; + $this->chunkSize = $chunkSize; } /** * Connect (if necessary) and write to the socket * - * @param array $record + * {@inheritDoc} * * @throws \UnexpectedValueException * @throws \RuntimeException */ - protected function write(array $record) + protected function write(array $record) : void { $this->connectIfNotConnected(); $data = $this->generateDataStream($record); @@ -58,7 +88,7 @@ class SocketHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessin /** * We will not close a PersistentSocket instance so it can be reused in other requests. */ - public function close() + public function close() : void { if (!$this->isPersistent()) { $this->closeSocket(); @@ -67,7 +97,7 @@ class SocketHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessin /** * Close socket, if open */ - public function closeSocket() + public function closeSocket() : void { if (\is_resource($this->resource)) { \fclose($this->resource); @@ -75,90 +105,79 @@ class SocketHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessin } } /** - * Set socket connection to nbe persistent. It only has effect before the connection is initiated. - * - * @param bool $persistent + * Set socket connection to be persistent. It only has effect before the connection is initiated. */ - public function setPersistent($persistent) + public function setPersistent(bool $persistent) : self { - $this->persistent = (bool) $persistent; + $this->persistent = $persistent; + return $this; } /** * Set connection timeout. Only has effect before we connect. * - * @param float $seconds - * * @see http://php.net/manual/en/function.fsockopen.php */ - public function setConnectionTimeout($seconds) + public function setConnectionTimeout(float $seconds) : self { $this->validateTimeout($seconds); - $this->connectionTimeout = (float) $seconds; + $this->connectionTimeout = $seconds; + return $this; } /** * Set write timeout. Only has effect before we connect. * - * @param float $seconds - * * @see http://php.net/manual/en/function.stream-set-timeout.php */ - public function setTimeout($seconds) + public function setTimeout(float $seconds) : self { $this->validateTimeout($seconds); - $this->timeout = (float) $seconds; + $this->timeout = $seconds; + return $this; } /** * Set writing timeout. Only has effect during connection in the writing cycle. * * @param float $seconds 0 for no timeout */ - public function setWritingTimeout($seconds) + public function setWritingTimeout(float $seconds) : self { $this->validateTimeout($seconds); - $this->writingTimeout = (float) $seconds; + $this->writingTimeout = $seconds; + return $this; } /** * Set chunk size. Only has effect during connection in the writing cycle. - * - * @param float $bytes */ - public function setChunkSize($bytes) + public function setChunkSize(int $bytes) : self { $this->chunkSize = $bytes; + return $this; } /** * Get current connection string - * - * @return string */ - public function getConnectionString() + public function getConnectionString() : string { return $this->connectionString; } /** * Get persistent setting - * - * @return bool */ - public function isPersistent() + public function isPersistent() : bool { return $this->persistent; } /** * Get current connection timeout setting - * - * @return float */ - public function getConnectionTimeout() + public function getConnectionTimeout() : float { return $this->connectionTimeout; } /** * Get current in-transfer timeout - * - * @return float */ - public function getTimeout() + public function getTimeout() : float { return $this->timeout; } @@ -167,16 +186,14 @@ class SocketHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessin * * @return float */ - public function getWritingTimeout() + public function getWritingTimeout() : float { return $this->writingTimeout; } /** * Get current chunk size - * - * @return float */ - public function getChunkSize() + public function getChunkSize() : ?int { return $this->chunkSize; } @@ -184,16 +201,16 @@ class SocketHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessin * Check to see if the socket is currently available. * * UDP might appear to be connected but might fail when writing. See http://php.net/fsockopen for details. - * - * @return bool */ - public function isConnected() + public function isConnected() : bool { return \is_resource($this->resource) && !\feof($this->resource); // on TCP - other party can close connection. } /** * Wrapper to allow mocking + * + * @return resource|false */ protected function pfsockopen() { @@ -201,6 +218,8 @@ class SocketHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessin } /** * Wrapper to allow mocking + * + * @return resource|false */ protected function fsockopen() { @@ -210,51 +229,76 @@ class SocketHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessin * Wrapper to allow mocking * * @see http://php.net/manual/en/function.stream-set-timeout.php + * + * @return bool */ protected function streamSetTimeout() { $seconds = \floor($this->timeout); $microseconds = \round(($this->timeout - $seconds) * 1000000.0); - return \stream_set_timeout($this->resource, $seconds, $microseconds); + if (!\is_resource($this->resource)) { + throw new \LogicException('streamSetTimeout called but $this->resource is not a resource'); + } + return \stream_set_timeout($this->resource, (int) $seconds, (int) $microseconds); } /** * Wrapper to allow mocking * * @see http://php.net/manual/en/function.stream-set-chunk-size.php + * + * @return int|bool */ protected function streamSetChunkSize() { + if (!\is_resource($this->resource)) { + throw new \LogicException('streamSetChunkSize called but $this->resource is not a resource'); + } + if (null === $this->chunkSize) { + throw new \LogicException('streamSetChunkSize called but $this->chunkSize is not set'); + } return \stream_set_chunk_size($this->resource, $this->chunkSize); } /** * Wrapper to allow mocking + * + * @return int|bool */ - protected function fwrite($data) + protected function fwrite(string $data) { + if (!\is_resource($this->resource)) { + throw new \LogicException('fwrite called but $this->resource is not a resource'); + } return @\fwrite($this->resource, $data); } /** * Wrapper to allow mocking + * + * @return mixed[]|bool */ protected function streamGetMetadata() { + if (!\is_resource($this->resource)) { + throw new \LogicException('streamGetMetadata called but $this->resource is not a resource'); + } return \stream_get_meta_data($this->resource); } - private function validateTimeout($value) + private function validateTimeout(float $value) : void { - $ok = \filter_var($value, \FILTER_VALIDATE_FLOAT); - if ($ok === \false || $value < 0) { + if ($value < 0) { throw new \InvalidArgumentException("Timeout must be 0 or a positive float (got {$value})"); } } - private function connectIfNotConnected() + private function connectIfNotConnected() : void { if ($this->isConnected()) { return; } $this->connect(); } - protected function generateDataStream($record) + /** + * @phpstan-param FormattedRecord $record + */ + protected function generateDataStream(array $record) : string { return (string) $record['formatted']; } @@ -265,37 +309,37 @@ class SocketHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessin { return $this->resource; } - private function connect() + private function connect() : void { $this->createSocketResource(); $this->setSocketTimeout(); $this->setStreamChunkSize(); } - private function createSocketResource() + private function createSocketResource() : void { if ($this->isPersistent()) { $resource = $this->pfsockopen(); } else { $resource = $this->fsockopen(); } - if (!$resource) { + if (\is_bool($resource)) { throw new \UnexpectedValueException("Failed connecting to {$this->connectionString} ({$this->errno}: {$this->errstr})"); } $this->resource = $resource; } - private function setSocketTimeout() + private function setSocketTimeout() : void { if (!$this->streamSetTimeout()) { throw new \UnexpectedValueException("Failed setting timeout with stream_set_timeout()"); } } - private function setStreamChunkSize() + private function setStreamChunkSize() : void { if ($this->chunkSize && !$this->streamSetChunkSize()) { throw new \UnexpectedValueException("Failed setting chunk size with stream_set_chunk_size()"); } } - private function writeToSocket($data) + private function writeToSocket(string $data) : void { $length = \strlen($data); $sent = 0; @@ -311,7 +355,7 @@ class SocketHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessin } $sent += $chunk; $socketInfo = $this->streamGetMetadata(); - if ($socketInfo['timed_out']) { + if (\is_array($socketInfo) && $socketInfo['timed_out']) { throw new \RuntimeException("Write timed-out"); } if ($this->writingIsTimedOut($sent)) { @@ -322,20 +366,20 @@ class SocketHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessin throw new \RuntimeException("End-of-file reached, probably we got disconnected (sent {$sent} of {$length})"); } } - private function writingIsTimedOut($sent) + private function writingIsTimedOut(int $sent) : bool { - $writingTimeout = (int) \floor($this->writingTimeout); - if (0 === $writingTimeout) { + // convert to ms + if (0.0 == $this->writingTimeout) { return \false; } if ($sent !== $this->lastSentBytes) { - $this->lastWritingAt = \time(); + $this->lastWritingAt = \microtime(\true); $this->lastSentBytes = $sent; return \false; } else { \usleep(100); } - if (\time() - $this->lastWritingAt >= $writingTimeout) { + if (\microtime(\true) - $this->lastWritingAt >= $this->writingTimeout) { $this->closeSocket(); return \true; } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SqsHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SqsHandler.php new file mode 100644 index 00000000..b2a4300f --- /dev/null +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SqsHandler.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace WPMailSMTP\Vendor\Monolog\Handler; + +use WPMailSMTP\Vendor\Aws\Sqs\SqsClient; +use WPMailSMTP\Vendor\Monolog\Logger; +use WPMailSMTP\Vendor\Monolog\Utils; +/** + * Writes to any sqs queue. + * + * @author Martijn van Calker + */ +class SqsHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler +{ + /** 256 KB in bytes - maximum message size in SQS */ + protected const MAX_MESSAGE_SIZE = 262144; + /** 100 KB in bytes - head message size for new error log */ + protected const HEAD_MESSAGE_SIZE = 102400; + /** @var SqsClient */ + private $client; + /** @var string */ + private $queueUrl; + public function __construct(\WPMailSMTP\Vendor\Aws\Sqs\SqsClient $sqsClient, string $queueUrl, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true) + { + parent::__construct($level, $bubble); + $this->client = $sqsClient; + $this->queueUrl = $queueUrl; + } + /** + * {@inheritDoc} + */ + protected function write(array $record) : void + { + if (!isset($record['formatted']) || 'string' !== \gettype($record['formatted'])) { + throw new \InvalidArgumentException('SqsHandler accepts only formatted records as a string' . \WPMailSMTP\Vendor\Monolog\Utils::getRecordMessageForException($record)); + } + $messageBody = $record['formatted']; + if (\strlen($messageBody) >= static::MAX_MESSAGE_SIZE) { + $messageBody = \WPMailSMTP\Vendor\Monolog\Utils::substr($messageBody, 0, static::HEAD_MESSAGE_SIZE); + } + $this->client->sendMessage(['QueueUrl' => $this->queueUrl, 'MessageBody' => $messageBody]); + } +} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/StreamHandler.php index 7d17dc9e..0a9102c0 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/StreamHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/StreamHandler.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type FormattedRecord from AbstractProcessingHandler */ class StreamHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler { - /** @private 512KB */ - const CHUNK_SIZE = 524288; + /** @const int */ + protected const MAX_CHUNK_SIZE = 2147483647; + /** @const int 10MB */ + protected const DEFAULT_CHUNK_SIZE = 10 * 1024 * 1024; + /** @var int */ + protected $streamChunkSize; /** @var resource|null */ protected $stream; - protected $url; - private $errorMessage; + /** @var ?string */ + protected $url = null; + /** @var ?string */ + private $errorMessage = null; + /** @var ?int */ protected $filePermission; + /** @var bool */ protected $useLocking; - private $dirCreated; + /** @var true|null */ + private $dirCreated = null; /** - * @param resource|string $stream - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param resource|string $stream If a missing path can't be created, an UnexpectedValueException will be thrown on first write * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) * @param bool $useLocking Try to lock log file before doing any writes * - * @throws \Exception If a missing directory is not buildable * @throws \InvalidArgumentException If stream is not a resource or string */ - public function __construct($stream, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true, $filePermission = null, $useLocking = \false) + public function __construct($stream, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true, ?int $filePermission = null, bool $useLocking = \false) { parent::__construct($level, $bubble); + if (($phpMemoryLimit = \WPMailSMTP\Vendor\Monolog\Utils::expandIniShorthandBytes(\ini_get('memory_limit'))) !== \false) { + if ($phpMemoryLimit > 0) { + // use max 10% of allowed memory for the chunk size, and at least 100KB + $this->streamChunkSize = \min(static::MAX_CHUNK_SIZE, \max((int) ($phpMemoryLimit / 10), 100 * 1024)); + } else { + // memory is unlimited, set to the default 10MB + $this->streamChunkSize = static::DEFAULT_CHUNK_SIZE; + } + } else { + // no memory limit information, set to the default 10MB + $this->streamChunkSize = static::DEFAULT_CHUNK_SIZE; + } if (\is_resource($stream)) { $this->stream = $stream; - $this->streamSetChunkSize(); + \stream_set_chunk_size($this->stream, $this->streamChunkSize); } elseif (\is_string($stream)) { $this->url = \WPMailSMTP\Vendor\Monolog\Utils::canonicalizePath($stream); } else { @@ -55,9 +76,9 @@ class StreamHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessin $this->useLocking = $useLocking; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function close() + public function close() : void { if ($this->url && \is_resource($this->stream)) { \fclose($this->stream); @@ -79,68 +100,75 @@ class StreamHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessin * * @return string|null */ - public function getUrl() + public function getUrl() : ?string { return $this->url; } /** - * {@inheritdoc} + * @return int */ - protected function write(array $record) + public function getStreamChunkSize() : int + { + return $this->streamChunkSize; + } + /** + * {@inheritDoc} + */ + protected function write(array $record) : void { if (!\is_resource($this->stream)) { - if (null === $this->url || '' === $this->url) { - throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().'); + $url = $this->url; + if (null === $url || '' === $url) { + throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().' . \WPMailSMTP\Vendor\Monolog\Utils::getRecordMessageForException($record)); } - $this->createDir(); + $this->createDir($url); $this->errorMessage = null; - \set_error_handler(array($this, 'customErrorHandler')); - $this->stream = \fopen($this->url, 'a'); - if ($this->filePermission !== null) { - @\chmod($this->url, $this->filePermission); + \set_error_handler([$this, 'customErrorHandler']); + try { + $stream = \fopen($url, 'a'); + if ($this->filePermission !== null) { + @\chmod($url, $this->filePermission); + } + } finally { + \restore_error_handler(); } - \restore_error_handler(); - if (!\is_resource($this->stream)) { + if (!\is_resource($stream)) { $this->stream = null; - throw new \UnexpectedValueException(\sprintf('The stream or file "%s" could not be opened in append mode: ' . $this->errorMessage, $this->url)); + throw new \UnexpectedValueException(\sprintf('The stream or file "%s" could not be opened in append mode: ' . $this->errorMessage, $url) . \WPMailSMTP\Vendor\Monolog\Utils::getRecordMessageForException($record)); } - $this->streamSetChunkSize(); + \stream_set_chunk_size($stream, $this->streamChunkSize); + $this->stream = $stream; + } + $stream = $this->stream; + if (!\is_resource($stream)) { + throw new \LogicException('No stream was opened yet' . \WPMailSMTP\Vendor\Monolog\Utils::getRecordMessageForException($record)); } if ($this->useLocking) { // ignoring errors here, there's not much we can do about them - \flock($this->stream, \LOCK_EX); + \flock($stream, \LOCK_EX); } - $this->streamWrite($this->stream, $record); + $this->streamWrite($stream, $record); if ($this->useLocking) { - \flock($this->stream, \LOCK_UN); + \flock($stream, \LOCK_UN); } } /** * Write to stream * @param resource $stream - * @param array $record + * @param array $record + * + * @phpstan-param FormattedRecord $record */ - protected function streamWrite($stream, array $record) + protected function streamWrite($stream, array $record) : void { \fwrite($stream, (string) $record['formatted']); } - protected function streamSetChunkSize() - { - if (\version_compare(\PHP_VERSION, '5.4.0', '>=')) { - return \stream_set_chunk_size($this->stream, self::CHUNK_SIZE); - } - return \false; - } - private function customErrorHandler($code, $msg) + private function customErrorHandler(int $code, string $msg) : bool { $this->errorMessage = \preg_replace('{^(fopen|mkdir)\\(.*?\\): }', '', $msg); + return \true; } - /** - * @param string $stream - * - * @return null|string - */ - private function getDirFromStream($stream) + private function getDirFromStream(string $stream) : ?string { $pos = \strpos($stream, '://'); if ($pos === \false) { @@ -151,20 +179,20 @@ class StreamHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessin } return null; } - private function createDir() + private function createDir(string $url) : void { // Do not try to create dir if it has already been tried. if ($this->dirCreated) { return; } - $dir = $this->getDirFromStream($this->url); + $dir = $this->getDirFromStream($url); if (null !== $dir && !\is_dir($dir)) { $this->errorMessage = null; - \set_error_handler(array($this, 'customErrorHandler')); + \set_error_handler([$this, 'customErrorHandler']); $status = \mkdir($dir, 0777, \true); \restore_error_handler(); - if (\false === $status && !\is_dir($dir)) { - throw new \UnexpectedValueException(\sprintf('There is no existing directory at "%s" and its not buildable: ' . $this->errorMessage, $dir)); + if (\false === $status && !\is_dir($dir) && \strpos((string) $this->errorMessage, 'File exists') === \false) { + throw new \UnexpectedValueException(\sprintf('There is no existing directory at "%s" and it could not be created: ' . $this->errorMessage, $dir)); } } $this->dirCreated = \true; diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php index 44cf8988..7329a150 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php @@ -1,5 +1,6 @@ mailer = $mailer; $this->messageTemplate = $message; } /** - * {@inheritdoc} + * {@inheritDoc} */ - protected function send($content, array $records) + protected function send(string $content, array $records) : void { $this->mailer->send($this->buildMessage($content, $records)); } /** * Gets the formatter for the Swift_Message subject. * - * @param string $format The format of the subject - * @return FormatterInterface + * @param string|null $format The format of the subject */ - protected function getSubjectFormatter($format) + protected function getSubjectFormatter(?string $format) : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { return new \WPMailSMTP\Vendor\Monolog\Formatter\LineFormatter($format); } /** * Creates instance of Swift_Message to be sent * - * @param string $content formatted email body to be sent - * @param array $records Log records that formed the content - * @return \Swift_Message + * @param string $content formatted email body to be sent + * @param array $records Log records that formed the content + * @return Swift_Message + * + * @phpstan-param Record[] $records */ - protected function buildMessage($content, array $records) + protected function buildMessage(string $content, array $records) : \WPMailSMTP\Vendor\Swift_Message { $message = null; if ($this->messageTemplate instanceof \WPMailSMTP\Vendor\Swift_Message) { $message = clone $this->messageTemplate; $message->generateId(); } elseif (\is_callable($this->messageTemplate)) { - $message = \call_user_func($this->messageTemplate, $content, $records); + $message = ($this->messageTemplate)($content, $records); } if (!$message instanceof \WPMailSMTP\Vendor\Swift_Message) { - throw new \InvalidArgumentException('Could not resolve message as instance of Swift_Message or a callable returning it'); + $record = \reset($records); + throw new \InvalidArgumentException('Could not resolve message as instance of Swift_Message or a callable returning it' . ($record ? \WPMailSMTP\Vendor\Monolog\Utils::getRecordMessageForException($record) : '')); } if ($records) { $subjectFormatter = $this->getSubjectFormatter($message->getSubject()); $message->setSubject($subjectFormatter->format($this->getHighestRecord($records))); } - $message->setBody($content); + $mime = 'text/plain'; + if ($this->isHtmlBody($content)) { + $mime = 'text/html'; + } + $message->setBody($content, $mime); + /** @phpstan-ignore-next-line */ if (\version_compare(\WPMailSMTP\Vendor\Swift::VERSION, '6.0.0', '>=')) { $message->setDate(new \DateTimeImmutable()); } else { + /** @phpstan-ignore-next-line */ $message->setDate(\time()); } return $message; } - /** - * BC getter, to be removed in 2.0 - */ - public function __get($name) - { - if ($name === 'message') { - \trigger_error('SwiftMailerHandler->message is deprecated, use ->buildMessage() instead to retrieve the message', \E_USER_DEPRECATED); - return $this->buildMessage(null, array()); - } - throw new \InvalidArgumentException('Invalid property ' . $name); - } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php new file mode 100644 index 00000000..ac971ddc --- /dev/null +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace WPMailSMTP\Vendor\Monolog\Handler; + +use WPMailSMTP\Vendor\Monolog\Logger; +use WPMailSMTP\Vendor\Monolog\Utils; +use WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface; +use WPMailSMTP\Vendor\Monolog\Formatter\LineFormatter; +use WPMailSMTP\Vendor\Symfony\Component\Mailer\MailerInterface; +use WPMailSMTP\Vendor\Symfony\Component\Mailer\Transport\TransportInterface; +use WPMailSMTP\Vendor\Symfony\Component\Mime\Email; +/** + * SymfonyMailerHandler uses Symfony's Mailer component to send the emails + * + * @author Jordi Boggiano + * + * @phpstan-import-type Record from \Monolog\Logger + */ +class SymfonyMailerHandler extends \WPMailSMTP\Vendor\Monolog\Handler\MailHandler +{ + /** @var MailerInterface|TransportInterface */ + protected $mailer; + /** @var Email|callable(string, Record[]): Email */ + private $emailTemplate; + /** + * @psalm-param Email|callable(string, Record[]): Email $email + * + * @param MailerInterface|TransportInterface $mailer The mailer to use + * @param callable|Email $email An email template, the subject/body will be replaced + */ + public function __construct($mailer, $email, $level = \WPMailSMTP\Vendor\Monolog\Logger::ERROR, bool $bubble = \true) + { + parent::__construct($level, $bubble); + $this->mailer = $mailer; + $this->emailTemplate = $email; + } + /** + * {@inheritDoc} + */ + protected function send(string $content, array $records) : void + { + $this->mailer->send($this->buildMessage($content, $records)); + } + /** + * Gets the formatter for the Swift_Message subject. + * + * @param string|null $format The format of the subject + */ + protected function getSubjectFormatter(?string $format) : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface + { + return new \WPMailSMTP\Vendor\Monolog\Formatter\LineFormatter($format); + } + /** + * Creates instance of Email to be sent + * + * @param string $content formatted email body to be sent + * @param array $records Log records that formed the content + * + * @phpstan-param Record[] $records + */ + protected function buildMessage(string $content, array $records) : \WPMailSMTP\Vendor\Symfony\Component\Mime\Email + { + $message = null; + if ($this->emailTemplate instanceof \WPMailSMTP\Vendor\Symfony\Component\Mime\Email) { + $message = clone $this->emailTemplate; + } elseif (\is_callable($this->emailTemplate)) { + $message = ($this->emailTemplate)($content, $records); + } + if (!$message instanceof \WPMailSMTP\Vendor\Symfony\Component\Mime\Email) { + $record = \reset($records); + throw new \InvalidArgumentException('Could not resolve message as instance of Email or a callable returning it' . ($record ? \WPMailSMTP\Vendor\Monolog\Utils::getRecordMessageForException($record) : '')); + } + if ($records) { + $subjectFormatter = $this->getSubjectFormatter($message->getSubject()); + $message->subject($subjectFormatter->format($this->getHighestRecord($records))); + } + if ($this->isHtmlBody($content)) { + if (null !== ($charset = $message->getHtmlCharset())) { + $message->html($content, $charset); + } else { + $message->html($content); + } + } else { + if (null !== ($charset = $message->getTextCharset())) { + $message->text($content, $charset); + } else { + $message->text($content); + } + } + return $message->date(new \DateTimeImmutable()); + } +} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogHandler.php index 5bedba34..36b7bd47 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogHandler.php @@ -1,5 +1,6 @@ facilities, or a LOG_* facility constant + * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID */ - public function __construct($ident, $facility = \LOG_USER, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true, $logopts = \LOG_PID) + public function __construct(string $ident, $facility = \LOG_USER, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true, int $logopts = \LOG_PID) { parent::__construct($facility, $level, $bubble); $this->ident = $ident; $this->logopts = $logopts; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function close() + public function close() : void { \closelog(); } /** - * {@inheritdoc} + * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { if (!\openlog($this->ident, $this->logopts, $this->facility)) { - throw new \LogicException('Can\'t open syslog for ident "' . $this->ident . '" and facility "' . $this->facility . '"'); + throw new \LogicException('Can\'t open syslog for ident "' . $this->ident . '" and facility "' . $this->facility . '"' . \WPMailSMTP\Vendor\Monolog\Utils::getRecordMessageForException($record)); } \syslog($this->logLevels[$record['level']], (string) $record['formatted']); } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php index ad4c7824..2f34ebdb 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php @@ -1,5 +1,6 @@ ip = $ip; $this->port = $port; - $this->socket = \socket_create(\AF_INET, \SOCK_DGRAM, \SOL_UDP); } + /** + * @param string $line + * @param string $header + * @return void + */ public function write($line, $header = "") { $this->send($this->assembleMessage($line, $header)); } - public function close() + public function close() : void { - if (\is_resource($this->socket)) { + if (\is_resource($this->socket) || $this->socket instanceof \Socket) { \socket_close($this->socket); $this->socket = null; } } - protected function send($chunk) + /** + * @return resource|Socket + */ + protected function getSocket() { - if (!\is_resource($this->socket)) { - throw new \LogicException('The UdpSocket to ' . $this->ip . ':' . $this->port . ' has been closed and can not be written to anymore'); + if (null !== $this->socket) { + return $this->socket; } - \socket_sendto($this->socket, $chunk, \strlen($chunk), $flags = 0, $this->ip, $this->port); + $domain = \AF_INET; + $protocol = \SOL_UDP; + // Check if we are using unix sockets. + if ($this->port === 0) { + $domain = \AF_UNIX; + $protocol = \IPPROTO_IP; + } + $this->socket = \socket_create($domain, \SOCK_DGRAM, $protocol) ?: null; + if (null === $this->socket) { + throw new \RuntimeException('The UdpSocket to ' . $this->ip . ':' . $this->port . ' could not be opened via socket_create'); + } + return $this->socket; } - protected function assembleMessage($line, $header) + protected function send(string $chunk) : void { - $chunkSize = self::DATAGRAM_MAX_LENGTH - \strlen($header); - return $header . \substr($line, 0, $chunkSize); + \socket_sendto($this->getSocket(), $chunk, \strlen($chunk), $flags = 0, $this->ip, $this->port); + } + protected function assembleMessage(string $line, string $header) : string + { + $chunkSize = static::DATAGRAM_MAX_LENGTH - \strlen($header); + return $header . \WPMailSMTP\Vendor\Monolog\Utils::substr($line, 0, $chunkSize); } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php index 4dfdd919..19ae863d 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php @@ -1,5 +1,6 @@ 'M d H:i:s', self::RFC5424 => \DateTime::RFC3339); + const RFC5424e = 2; + /** @var array */ + private $dateFormats = array(self::RFC3164 => 'M d H:i:s', self::RFC5424 => \DateTime::RFC3339, self::RFC5424e => \DateTime::RFC3339_EXTENDED); + /** @var UdpSocket */ protected $socket; + /** @var string */ protected $ident; + /** @var self::RFC* */ protected $rfc; /** - * @param string $host - * @param int $port - * @param mixed $facility - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param string $ident Program name or tag for each log message. - * @param int $rfc RFC to format the message for. + * @param string $host Either IP/hostname or a path to a unix socket (port must be 0 then) + * @param int $port Port number, or 0 if $host is a unix socket + * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param string $ident Program name or tag for each log message. + * @param int $rfc RFC to format the message for. + * @throws MissingExtensionException + * + * @phpstan-param self::RFC* $rfc */ - public function __construct($host, $port = 514, $facility = \LOG_USER, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true, $ident = 'php', $rfc = self::RFC5424) + public function __construct(string $host, int $port = 514, $facility = \LOG_USER, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true, string $ident = 'php', int $rfc = self::RFC5424) { + if (!\extension_loaded('sockets')) { + throw new \WPMailSMTP\Vendor\Monolog\Handler\MissingExtensionException('The sockets extension is required to use the SyslogUdpHandler'); + } parent::__construct($facility, $level, $bubble); $this->ident = $ident; $this->rfc = $rfc; - $this->socket = new \WPMailSMTP\Vendor\Monolog\Handler\SyslogUdp\UdpSocket($host, $port ?: 514); + $this->socket = new \WPMailSMTP\Vendor\Monolog\Handler\SyslogUdp\UdpSocket($host, $port); } - protected function write(array $record) + protected function write(array $record) : void { $lines = $this->splitMessageIntoLines($record['formatted']); - $header = $this->makeCommonSyslogHeader($this->logLevels[$record['level']]); + $header = $this->makeCommonSyslogHeader($this->logLevels[$record['level']], $record['datetime']); foreach ($lines as $line) { $this->socket->write($line, $header); } } - public function close() + public function close() : void { $this->socket->close(); } - private function splitMessageIntoLines($message) + /** + * @param string|string[] $message + * @return string[] + */ + private function splitMessageIntoLines($message) : array { if (\is_array($message)) { $message = \implode("\n", $message); } - return \preg_split('/$\\R?^/m', $message, -1, \PREG_SPLIT_NO_EMPTY); + $lines = \preg_split('/$\\R?^/m', (string) $message, -1, \PREG_SPLIT_NO_EMPTY); + if (\false === $lines) { + $pcreErrorCode = \preg_last_error(); + throw new \RuntimeException('Could not preg_split: ' . $pcreErrorCode . ' / ' . \WPMailSMTP\Vendor\Monolog\Utils::pcreLastErrorMessage($pcreErrorCode)); + } + return $lines; } /** * Make common syslog header (see rfc5424 or rfc3164) */ - protected function makeCommonSyslogHeader($severity) + protected function makeCommonSyslogHeader(int $severity, \DateTimeInterface $datetime) : string { $priority = $severity + $this->facility; if (!($pid = \getmypid())) { @@ -73,22 +95,22 @@ class SyslogUdpHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractSyslog if (!($hostname = \gethostname())) { $hostname = '-'; } - $date = $this->getDateTime(); if ($this->rfc === self::RFC3164) { + // see https://github.com/phpstan/phpstan/issues/5348 + // @phpstan-ignore-next-line + $dateNew = $datetime->setTimezone(new \DateTimeZone('UTC')); + $date = $dateNew->format($this->dateFormats[$this->rfc]); return "<{$priority}>" . $date . " " . $hostname . " " . $this->ident . "[" . $pid . "]: "; - } else { - return "<{$priority}>1 " . $date . " " . $hostname . " " . $this->ident . " " . $pid . " - - "; } - } - protected function getDateTime() - { - return \date($this->dateFormats[$this->rfc]); + $date = $datetime->format($this->dateFormats[$this->rfc]); + return "<{$priority}>1 " . $date . " " . $hostname . " " . $this->ident . " " . $pid . " - - "; } /** * Inject your own socket, mainly used for testing */ - public function setSocket($socket) + public function setSocket(\WPMailSMTP\Vendor\Monolog\Handler\SyslogUdp\UdpSocket $socket) : self { $this->socket = $socket; + return $this; } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php new file mode 100644 index 00000000..85775857 --- /dev/null +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php @@ -0,0 +1,216 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace WPMailSMTP\Vendor\Monolog\Handler; + +use RuntimeException; +use WPMailSMTP\Vendor\Monolog\Logger; +use WPMailSMTP\Vendor\Monolog\Utils; +/** + * Handler send logs to Telegram using Telegram Bot API. + * + * How to use: + * 1) Create telegram bot with https://telegram.me/BotFather + * 2) Create a telegram channel where logs will be recorded. + * 3) Add created bot from step 1 to the created channel from step 2. + * + * Use telegram bot API key from step 1 and channel name with '@' prefix from step 2 to create instance of TelegramBotHandler + * + * @link https://core.telegram.org/bots/api + * + * @author Mazur Alexandr + * + * @phpstan-import-type Record from \Monolog\Logger + */ +class TelegramBotHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler +{ + private const BOT_API = 'https://api.telegram.org/bot'; + /** + * The available values of parseMode according to the Telegram api documentation + */ + private const AVAILABLE_PARSE_MODES = ['HTML', 'MarkdownV2', 'Markdown']; + /** + * The maximum number of characters allowed in a message according to the Telegram api documentation + */ + private const MAX_MESSAGE_LENGTH = 4096; + /** + * Telegram bot access token provided by BotFather. + * Create telegram bot with https://telegram.me/BotFather and use access token from it. + * @var string + */ + private $apiKey; + /** + * Telegram channel name. + * Since to start with '@' symbol as prefix. + * @var string + */ + private $channel; + /** + * The kind of formatting that is used for the message. + * See available options at https://core.telegram.org/bots/api#formatting-options + * or in AVAILABLE_PARSE_MODES + * @var ?string + */ + private $parseMode; + /** + * Disables link previews for links in the message. + * @var ?bool + */ + private $disableWebPagePreview; + /** + * Sends the message silently. Users will receive a notification with no sound. + * @var ?bool + */ + private $disableNotification; + /** + * True - split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages. + * False - truncates a message that is too long. + * @var bool + */ + private $splitLongMessages; + /** + * Adds 1-second delay between sending a split message (according to Telegram API to avoid 429 Too Many Requests). + * @var bool + */ + private $delayBetweenMessages; + /** + * @param string $apiKey Telegram bot access token provided by BotFather + * @param string $channel Telegram channel name + * @param bool $splitLongMessages Split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages + * @param bool $delayBetweenMessages Adds delay between sending a split message according to Telegram API + * @throws MissingExtensionException + */ + public function __construct(string $apiKey, string $channel, $level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true, ?string $parseMode = null, ?bool $disableWebPagePreview = null, ?bool $disableNotification = null, bool $splitLongMessages = \false, bool $delayBetweenMessages = \false) + { + if (!\extension_loaded('curl')) { + throw new \WPMailSMTP\Vendor\Monolog\Handler\MissingExtensionException('The curl extension is needed to use the TelegramBotHandler'); + } + parent::__construct($level, $bubble); + $this->apiKey = $apiKey; + $this->channel = $channel; + $this->setParseMode($parseMode); + $this->disableWebPagePreview($disableWebPagePreview); + $this->disableNotification($disableNotification); + $this->splitLongMessages($splitLongMessages); + $this->delayBetweenMessages($delayBetweenMessages); + } + public function setParseMode(?string $parseMode = null) : self + { + if ($parseMode !== null && !\in_array($parseMode, self::AVAILABLE_PARSE_MODES)) { + throw new \InvalidArgumentException('Unknown parseMode, use one of these: ' . \implode(', ', self::AVAILABLE_PARSE_MODES) . '.'); + } + $this->parseMode = $parseMode; + return $this; + } + public function disableWebPagePreview(?bool $disableWebPagePreview = null) : self + { + $this->disableWebPagePreview = $disableWebPagePreview; + return $this; + } + public function disableNotification(?bool $disableNotification = null) : self + { + $this->disableNotification = $disableNotification; + return $this; + } + /** + * True - split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages. + * False - truncates a message that is too long. + * @param bool $splitLongMessages + * @return $this + */ + public function splitLongMessages(bool $splitLongMessages = \false) : self + { + $this->splitLongMessages = $splitLongMessages; + return $this; + } + /** + * Adds 1-second delay between sending a split message (according to Telegram API to avoid 429 Too Many Requests). + * @param bool $delayBetweenMessages + * @return $this + */ + public function delayBetweenMessages(bool $delayBetweenMessages = \false) : self + { + $this->delayBetweenMessages = $delayBetweenMessages; + return $this; + } + /** + * {@inheritDoc} + */ + public function handleBatch(array $records) : void + { + /** @var Record[] $messages */ + $messages = []; + foreach ($records as $record) { + if (!$this->isHandling($record)) { + continue; + } + if ($this->processors) { + /** @var Record $record */ + $record = $this->processRecord($record); + } + $messages[] = $record; + } + if (!empty($messages)) { + $this->send((string) $this->getFormatter()->formatBatch($messages)); + } + } + /** + * @inheritDoc + */ + protected function write(array $record) : void + { + $this->send($record['formatted']); + } + /** + * Send request to @link https://api.telegram.org/bot on SendMessage action. + * @param string $message + */ + protected function send(string $message) : void + { + $messages = $this->handleMessageLength($message); + foreach ($messages as $key => $msg) { + if ($this->delayBetweenMessages && $key > 0) { + \sleep(1); + } + $this->sendCurl($msg); + } + } + protected function sendCurl(string $message) : void + { + $ch = \curl_init(); + $url = self::BOT_API . $this->apiKey . '/SendMessage'; + \curl_setopt($ch, \CURLOPT_URL, $url); + \curl_setopt($ch, \CURLOPT_RETURNTRANSFER, \true); + \curl_setopt($ch, \CURLOPT_SSL_VERIFYPEER, \true); + \curl_setopt($ch, \CURLOPT_POSTFIELDS, \http_build_query(['text' => $message, 'chat_id' => $this->channel, 'parse_mode' => $this->parseMode, 'disable_web_page_preview' => $this->disableWebPagePreview, 'disable_notification' => $this->disableNotification])); + $result = \WPMailSMTP\Vendor\Monolog\Handler\Curl\Util::execute($ch); + if (!\is_string($result)) { + throw new \RuntimeException('Telegram API error. Description: No response'); + } + $result = \json_decode($result, \true); + if ($result['ok'] === \false) { + throw new \RuntimeException('Telegram API error. Description: ' . $result['description']); + } + } + /** + * Handle a message that is too long: truncates or splits into several + * @param string $message + * @return string[] + */ + private function handleMessageLength(string $message) : array + { + $truncatedMarker = ' (...truncated)'; + if (!$this->splitLongMessages && \strlen($message) > self::MAX_MESSAGE_LENGTH) { + return [\WPMailSMTP\Vendor\Monolog\Utils::substr($message, 0, self::MAX_MESSAGE_LENGTH - \strlen($truncatedMarker)) . $truncatedMarker]; + } + return \str_split($message, self::MAX_MESSAGE_LENGTH); + } +} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/TestHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/TestHandler.php index 8879b739..ffee6de7 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/TestHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/TestHandler.php @@ -1,5 +1,6 @@ */ + protected $recordsByLevel = []; + /** @var bool */ private $skipReset = \false; + /** + * @return array + * + * @phpstan-return Record[] + */ public function getRecords() { return $this->records; } + /** + * @return void + */ public function clear() { - $this->records = array(); - $this->recordsByLevel = array(); + $this->records = []; + $this->recordsByLevel = []; } + /** + * @return void + */ public function reset() { if (!$this->skipReset) { $this->clear(); } } - public function setSkipReset($skipReset) + /** + * @return void + */ + public function setSkipReset(bool $skipReset) { $this->skipReset = $skipReset; } - public function hasRecords($level) + /** + * @param string|int $level Logging level value or name + * + * @phpstan-param Level|LevelName|LogLevel::* $level + */ + public function hasRecords($level) : bool { - return isset($this->recordsByLevel[$level]); + return isset($this->recordsByLevel[\WPMailSMTP\Vendor\Monolog\Logger::toMonologLevel($level)]); } /** * @param string|array $record Either a message string or an array containing message and optionally context keys that will be checked against all records - * @param int $level Logger::LEVEL constant value + * @param string|int $level Logging level value or name + * + * @phpstan-param array{message: string, context?: mixed[]}|string $record + * @phpstan-param Level|LevelName|LogLevel::* $level */ - public function hasRecord($record, $level) + public function hasRecord($record, $level) : bool { if (\is_string($record)) { $record = array('message' => $record); @@ -109,49 +141,70 @@ class TestHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingH return \true; }, $level); } - public function hasRecordThatContains($message, $level) + /** + * @param string|int $level Logging level value or name + * + * @phpstan-param Level|LevelName|LogLevel::* $level + */ + public function hasRecordThatContains(string $message, $level) : bool { return $this->hasRecordThatPasses(function ($rec) use($message) { return \strpos($rec['message'], $message) !== \false; }, $level); } - public function hasRecordThatMatches($regex, $level) + /** + * @param string|int $level Logging level value or name + * + * @phpstan-param Level|LevelName|LogLevel::* $level + */ + public function hasRecordThatMatches(string $regex, $level) : bool { - return $this->hasRecordThatPasses(function ($rec) use($regex) { + return $this->hasRecordThatPasses(function (array $rec) use($regex) : bool { return \preg_match($regex, $rec['message']) > 0; }, $level); } - public function hasRecordThatPasses($predicate, $level) + /** + * @param string|int $level Logging level value or name + * @return bool + * + * @psalm-param callable(Record, int): mixed $predicate + * @phpstan-param Level|LevelName|LogLevel::* $level + */ + public function hasRecordThatPasses(callable $predicate, $level) { - if (!\is_callable($predicate)) { - throw new \InvalidArgumentException("Expected a callable for hasRecordThatSucceeds"); - } + $level = \WPMailSMTP\Vendor\Monolog\Logger::toMonologLevel($level); if (!isset($this->recordsByLevel[$level])) { return \false; } foreach ($this->recordsByLevel[$level] as $i => $rec) { - if (\call_user_func($predicate, $rec, $i)) { + if ($predicate($rec, $i)) { return \true; } } return \false; } /** - * {@inheritdoc} + * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { $this->recordsByLevel[$record['level']][] = $record; $this->records[] = $record; } + /** + * @param string $method + * @param mixed[] $args + * @return bool + */ public function __call($method, $args) { if (\preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; $level = \constant('WPMailSMTP\\Vendor\\Monolog\\Logger::' . \strtoupper($matches[2])); - if (\method_exists($this, $genericMethod)) { + $callback = [$this, $genericMethod]; + if (\is_callable($callback)) { $args[] = $level; - return \call_user_func_array(array($this, $genericMethod), $args); + return \call_user_func_array($callback, $args); } } throw new \BadMethodCallException('Call to undefined method ' . \get_class($this) . '::' . $method . '()'); diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php new file mode 100644 index 00000000..f6f1ec48 --- /dev/null +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace WPMailSMTP\Vendor\Monolog\Handler; + +trait WebRequestRecognizerTrait +{ + /** + * Checks if PHP's serving a web request + * @return bool + */ + protected function isWebRequest() : bool + { + return 'cli' !== \PHP_SAPI && 'phpdbg' !== \PHP_SAPI; + } +} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php index cd9036ce..60c1e127 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type Record from \Monolog\Logger */ class WhatFailureGroupHandler extends \WPMailSMTP\Vendor\Monolog\Handler\GroupHandler { /** - * {@inheritdoc} + * {@inheritDoc} */ - public function handle(array $record) + public function handle(array $record) : bool { if ($this->processors) { - foreach ($this->processors as $processor) { - $record = \call_user_func($processor, $record); - } + /** @var Record $record */ + $record = $this->processRecord($record); } foreach ($this->handlers as $handler) { try { $handler->handle($record); - } catch (\Exception $e) { - // What failure? } catch (\Throwable $e) { // What failure? } @@ -40,25 +40,34 @@ class WhatFailureGroupHandler extends \WPMailSMTP\Vendor\Monolog\Handler\GroupHa return \false === $this->bubble; } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function handleBatch(array $records) + public function handleBatch(array $records) : void { if ($this->processors) { $processed = array(); foreach ($records as $record) { - foreach ($this->processors as $processor) { - $record = \call_user_func($processor, $record); - } - $processed[] = $record; + $processed[] = $this->processRecord($record); } + /** @var Record[] $records */ $records = $processed; } foreach ($this->handlers as $handler) { try { $handler->handleBatch($records); - } catch (\Exception $e) { + } catch (\Throwable $e) { // What failure? + } + } + } + /** + * {@inheritDoc} + */ + public function close() : void + { + foreach ($this->handlers as $handler) { + try { + $handler->close(); } catch (\Throwable $e) { // What failure? } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php index 9a889c40..fab98a3d 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php @@ -1,5 +1,6 @@ * @author Jason Davis + * + * @phpstan-import-type FormattedRecord from AbstractProcessingHandler */ class ZendMonitorHandler extends \WPMailSMTP\Vendor\Monolog\Handler\AbstractProcessingHandler { /** * Monolog level / ZendMonitor Custom Event priority map * - * @var array + * @var array */ - protected $levelMap = array(); + protected $levelMap = []; /** - * Construct - * - * @param int $level - * @param bool $bubble * @throws MissingExtensionException */ - public function __construct($level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, $bubble = \true) + public function __construct($level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, bool $bubble = \true) { if (!\function_exists('WPMailSMTP\\Vendor\\zend_monitor_custom_event')) { throw new \WPMailSMTP\Vendor\Monolog\Handler\MissingExtensionException('You must have Zend Server installed with Zend Monitor enabled in order to use this handler'); } //zend monitor constants are not defined if zend monitor is not enabled. - $this->levelMap = array(\WPMailSMTP\Vendor\Monolog\Logger::DEBUG => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_INFO, \WPMailSMTP\Vendor\Monolog\Logger::INFO => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_INFO, \WPMailSMTP\Vendor\Monolog\Logger::NOTICE => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_INFO, \WPMailSMTP\Vendor\Monolog\Logger::WARNING => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_WARNING, \WPMailSMTP\Vendor\Monolog\Logger::ERROR => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_ERROR, \WPMailSMTP\Vendor\Monolog\Logger::CRITICAL => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_ERROR, \WPMailSMTP\Vendor\Monolog\Logger::ALERT => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_ERROR, \WPMailSMTP\Vendor\Monolog\Logger::EMERGENCY => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_ERROR); + $this->levelMap = [\WPMailSMTP\Vendor\Monolog\Logger::DEBUG => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_INFO, \WPMailSMTP\Vendor\Monolog\Logger::INFO => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_INFO, \WPMailSMTP\Vendor\Monolog\Logger::NOTICE => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_INFO, \WPMailSMTP\Vendor\Monolog\Logger::WARNING => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_WARNING, \WPMailSMTP\Vendor\Monolog\Logger::ERROR => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_ERROR, \WPMailSMTP\Vendor\Monolog\Logger::CRITICAL => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_ERROR, \WPMailSMTP\Vendor\Monolog\Logger::ALERT => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_ERROR, \WPMailSMTP\Vendor\Monolog\Logger::EMERGENCY => \WPMailSMTP\Vendor\ZEND_MONITOR_EVENT_SEVERITY_ERROR]; parent::__construct($level, $bubble); } /** - * {@inheritdoc} + * {@inheritDoc} */ - protected function write(array $record) + protected function write(array $record) : void { $this->writeZendMonitorCustomEvent(\WPMailSMTP\Vendor\Monolog\Logger::getLevelName($record['level']), $record['message'], $record['formatted'], $this->levelMap[$record['level']]); } /** * Write to Zend Monitor Events - * @param string $type Text displayed in "Class Name (custom)" field - * @param string $message Text displayed in "Error String" - * @param mixed $formatted Displayed in Custom Variables tab - * @param int $severity Set the event severity level (-1,0,1) + * @param string $type Text displayed in "Class Name (custom)" field + * @param string $message Text displayed in "Error String" + * @param array $formatted Displayed in Custom Variables tab + * @param int $severity Set the event severity level (-1,0,1) + * + * @phpstan-param FormattedRecord $formatted */ - protected function writeZendMonitorCustomEvent($type, $message, $formatted, $severity) + protected function writeZendMonitorCustomEvent(string $type, string $message, array $formatted, int $severity) : void { zend_monitor_custom_event($type, $message, $formatted, $severity); } /** - * {@inheritdoc} + * {@inheritDoc} */ - public function getDefaultFormatter() + public function getDefaultFormatter() : \WPMailSMTP\Vendor\Monolog\Formatter\FormatterInterface { return new \WPMailSMTP\Vendor\Monolog\Formatter\NormalizerFormatter(); } /** - * Get the level map - * - * @return array + * @return array */ - public function getLevelMap() + public function getLevelMap() : array { return $this->levelMap; } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/LogRecord.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/LogRecord.php new file mode 100644 index 00000000..c11e2031 --- /dev/null +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/LogRecord.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace WPMailSMTP\Vendor\Monolog; + +use ArrayAccess; +/** + * Monolog log record interface for forward compatibility with Monolog 3.0 + * + * This is just present in Monolog 2.4+ to allow interoperable code to be written against + * both versions by type-hinting arguments as `array|\Monolog\LogRecord $record` + * + * Do not rely on this interface for other purposes, and do not implement it. + * + * @author Jordi Boggiano + * @template-extends \ArrayAccess<'message'|'level'|'context'|'level_name'|'channel'|'datetime'|'extra'|'formatted', mixed> + * @phpstan-import-type Record from Logger + */ +interface LogRecord extends \ArrayAccess +{ + /** + * @phpstan-return Record + */ + public function toArray() : array; +} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Logger.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Logger.php index 61ae655e..6464eb95 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Logger.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Logger.php @@ -1,5 +1,6 @@ + * + * @phpstan-type Level Logger::DEBUG|Logger::INFO|Logger::NOTICE|Logger::WARNING|Logger::ERROR|Logger::CRITICAL|Logger::ALERT|Logger::EMERGENCY + * @phpstan-type LevelName 'DEBUG'|'INFO'|'NOTICE'|'WARNING'|'ERROR'|'CRITICAL'|'ALERT'|'EMERGENCY' + * @phpstan-type Record array{message: string, context: mixed[], level: Level, level_name: LevelName, channel: string, datetime: \DateTimeImmutable, extra: mixed[]} */ class Logger implements \WPMailSMTP\Vendor\Psr\Log\LoggerInterface, \WPMailSMTP\Vendor\Monolog\ResettableInterface { /** * Detailed debug information */ - const DEBUG = 100; + public const DEBUG = 100; /** * Interesting events * * Examples: User logs in, SQL logs. */ - const INFO = 200; + public const INFO = 200; /** * Uncommon events */ - const NOTICE = 250; + public const NOTICE = 250; /** * Exceptional occurrences that are not errors * * Examples: Use of deprecated APIs, poor use of an API, * undesirable things that are not necessarily wrong. */ - const WARNING = 300; + public const WARNING = 300; /** * Runtime errors */ - const ERROR = 400; + public const ERROR = 400; /** * Critical conditions * * Example: Application component unavailable, unexpected exception. */ - const CRITICAL = 500; + public const CRITICAL = 500; /** * Action must be taken immediately * * Example: Entire website down, database unavailable, etc. * This should trigger the SMS alerts and wake you up. */ - const ALERT = 550; + public const ALERT = 550; /** * Urgent alert. */ - const EMERGENCY = 600; + public const EMERGENCY = 600; /** * Monolog API version * @@ -75,17 +82,21 @@ class Logger implements \WPMailSMTP\Vendor\Psr\Log\LoggerInterface, \WPMailSMTP\ * * @var int */ - const API = 1; + public const API = 2; /** - * Logging levels from syslog protocol defined in RFC 5424 + * This is a static variable and not a constant to serve as an extension point for custom levels * - * @var array $levels Logging levels + * @var array $levels Logging levels with the levels as key + * + * @phpstan-var array $levels Logging levels with the levels as key */ - protected static $levels = array(self::DEBUG => 'DEBUG', self::INFO => 'INFO', self::NOTICE => 'NOTICE', self::WARNING => 'WARNING', self::ERROR => 'ERROR', self::CRITICAL => 'CRITICAL', self::ALERT => 'ALERT', self::EMERGENCY => 'EMERGENCY'); + protected static $levels = [self::DEBUG => 'DEBUG', self::INFO => 'INFO', self::NOTICE => 'NOTICE', self::WARNING => 'WARNING', self::ERROR => 'ERROR', self::CRITICAL => 'CRITICAL', self::ALERT => 'ALERT', self::EMERGENCY => 'EMERGENCY']; /** - * @var \DateTimeZone + * Mapping between levels numbers defined in RFC 5424 and Monolog ones + * + * @phpstan-var array $rfc_5424_levels */ - protected static $timezone; + private const RFC_5424_LEVELS = [7 => self::DEBUG, 6 => self::INFO, 5 => self::NOTICE, 4 => self::WARNING, 3 => self::ERROR, 2 => self::CRITICAL, 1 => self::ALERT, 0 => self::EMERGENCY]; /** * @var string */ @@ -109,33 +120,56 @@ class Logger implements \WPMailSMTP\Vendor\Psr\Log\LoggerInterface, \WPMailSMTP\ */ protected $microsecondTimestamps = \true; /** - * @var callable + * @var DateTimeZone + */ + protected $timezone; + /** + * @var callable|null */ protected $exceptionHandler; /** - * @param string $name The logging channel + * @var int Keeps track of depth to prevent infinite logging loops + */ + private $logDepth = 0; + /** + * @var \WeakMap<\Fiber, int>|null Keeps track of depth inside fibers to prevent infinite logging loops + */ + private $fiberLogDepth; + /** + * @var bool Whether to detect infinite logging loops + * + * This can be disabled via {@see useLoggingLoopDetection} if you have async handlers that do not play well with this + */ + private $detectCycles = \true; + /** + * @psalm-param array $processors + * + * @param string $name The logging channel, a simple descriptive name that is attached to all log records * @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc. * @param callable[] $processors Optional array of processors + * @param DateTimeZone|null $timezone Optional timezone, if not provided date_default_timezone_get() will be used */ - public function __construct($name, array $handlers = array(), array $processors = array()) + public function __construct(string $name, array $handlers = [], array $processors = [], ?\DateTimeZone $timezone = null) { $this->name = $name; $this->setHandlers($handlers); $this->processors = $processors; + $this->timezone = $timezone ?: new \DateTimeZone(\date_default_timezone_get() ?: 'UTC'); + if (\PHP_VERSION_ID >= 80100) { + // Local variable for phpstan, see https://github.com/phpstan/phpstan/issues/6732#issuecomment-1111118412 + /** @var \WeakMap<\Fiber, int> $fiberLogDepth */ + $fiberLogDepth = new \WeakMap(); + $this->fiberLogDepth = $fiberLogDepth; + } } - /** - * @return string - */ - public function getName() + public function getName() : string { return $this->name; } /** * Return a new cloned instance with the name changed - * - * @return static */ - public function withName($name) + public function withName(string $name) : self { $new = clone $this; $new->name = $name; @@ -143,11 +177,8 @@ class Logger implements \WPMailSMTP\Vendor\Psr\Log\LoggerInterface, \WPMailSMTP\ } /** * Pushes a handler on to the stack. - * - * @param HandlerInterface $handler - * @return $this */ - public function pushHandler(\WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface $handler) + public function pushHandler(\WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface $handler) : self { \array_unshift($this->handlers, $handler); return $this; @@ -155,9 +186,9 @@ class Logger implements \WPMailSMTP\Vendor\Psr\Log\LoggerInterface, \WPMailSMTP\ /** * Pops a handler from the stack * - * @return HandlerInterface + * @throws \LogicException If empty handler stack */ - public function popHandler() + public function popHandler() : \WPMailSMTP\Vendor\Monolog\Handler\HandlerInterface { if (!$this->handlers) { throw new \LogicException('You tried to pop from an empty handler stack.'); @@ -169,12 +200,11 @@ class Logger implements \WPMailSMTP\Vendor\Psr\Log\LoggerInterface, \WPMailSMTP\ * * If a map is passed, keys will be ignored. * - * @param HandlerInterface[] $handlers - * @return $this + * @param HandlerInterface[] $handlers */ - public function setHandlers(array $handlers) + public function setHandlers(array $handlers) : self { - $this->handlers = array(); + $this->handlers = []; foreach (\array_reverse($handlers) as $handler) { $this->pushHandler($handler); } @@ -183,30 +213,25 @@ class Logger implements \WPMailSMTP\Vendor\Psr\Log\LoggerInterface, \WPMailSMTP\ /** * @return HandlerInterface[] */ - public function getHandlers() + public function getHandlers() : array { return $this->handlers; } /** * Adds a processor on to the stack. - * - * @param callable $callback - * @return $this */ - public function pushProcessor($callback) + public function pushProcessor(callable $callback) : self { - if (!\is_callable($callback)) { - throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), ' . \var_export($callback, \true) . ' given'); - } \array_unshift($this->processors, $callback); return $this; } /** * Removes the processor on top of the stack and returns it. * + * @throws \LogicException If empty processor stack * @return callable */ - public function popProcessor() + public function popProcessor() : callable { if (!$this->processors) { throw new \LogicException('You tried to pop from an empty processor stack.'); @@ -216,7 +241,7 @@ class Logger implements \WPMailSMTP\Vendor\Psr\Log\LoggerInterface, \WPMailSMTP\ /** * @return callable[] */ - public function getProcessors() + public function getProcessors() : array { return $this->processors; } @@ -224,71 +249,95 @@ class Logger implements \WPMailSMTP\Vendor\Psr\Log\LoggerInterface, \WPMailSMTP\ * Control the use of microsecond resolution timestamps in the 'datetime' * member of new records. * - * Generating microsecond resolution timestamps by calling - * microtime(true), formatting the result via sprintf() and then parsing - * the resulting string via \DateTime::createFromFormat() can incur - * a measurable runtime overhead vs simple usage of DateTime to capture - * a second resolution timestamp in systems which generate a large number - * of log events. + * As of PHP7.1 microseconds are always included by the engine, so + * there is no performance penalty and Monolog 2 enabled microseconds + * by default. This function lets you disable them though in case you want + * to suppress microseconds from the output. * * @param bool $micro True to use microtime() to create timestamps */ - public function useMicrosecondTimestamps($micro) + public function useMicrosecondTimestamps(bool $micro) : self { - $this->microsecondTimestamps = (bool) $micro; + $this->microsecondTimestamps = $micro; + return $this; + } + public function useLoggingLoopDetection(bool $detectCycles) : self + { + $this->detectCycles = $detectCycles; + return $this; } /** * Adds a log record. * - * @param int $level The logging level - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed + * @param int $level The logging level (a Monolog or RFC 5424 level) + * @param string $message The log message + * @param mixed[] $context The log context + * @param DateTimeImmutable $datetime Optional log date to log into the past or future + * @return bool Whether the record has been processed + * + * @phpstan-param Level $level */ - public function addRecord($level, $message, array $context = array()) + public function addRecord(int $level, string $message, array $context = [], ?\WPMailSMTP\Vendor\Monolog\DateTimeImmutable $datetime = null) : bool { - if (!$this->handlers) { - $this->pushHandler(new \WPMailSMTP\Vendor\Monolog\Handler\StreamHandler('php://stderr', static::DEBUG)); + if (isset(self::RFC_5424_LEVELS[$level])) { + $level = self::RFC_5424_LEVELS[$level]; } - $levelName = static::getLevelName($level); - // check if any handler will handle this message so we can return early and save cycles - $handlerKey = null; - \reset($this->handlers); - while ($handler = \current($this->handlers)) { - if ($handler->isHandling(array('level' => $level))) { - $handlerKey = \key($this->handlers); - break; + if ($this->detectCycles) { + if (\PHP_VERSION_ID >= 80100 && ($fiber = \Fiber::getCurrent())) { + $this->fiberLogDepth[$fiber] = $this->fiberLogDepth[$fiber] ?? 0; + $logDepth = ++$this->fiberLogDepth[$fiber]; + } else { + $logDepth = ++$this->logDepth; } - \next($this->handlers); + } else { + $logDepth = 0; } - if (null === $handlerKey) { + if ($logDepth === 3) { + $this->warning('A possible infinite logging loop was detected and aborted. It appears some of your handler code is triggering logging, see the previous log record for a hint as to what may be the cause.'); + return \false; + } elseif ($logDepth >= 5) { + // log depth 4 is let through, so we can log the warning above return \false; } - if (!static::$timezone) { - static::$timezone = new \DateTimeZone(\date_default_timezone_get() ?: 'UTC'); - } - // php7.1+ always has microseconds enabled, so we do not need this hack - if ($this->microsecondTimestamps && \PHP_VERSION_ID < 70100) { - $ts = \DateTime::createFromFormat('U.u', \sprintf('%.6F', \microtime(\true)), static::$timezone); - } else { - $ts = new \DateTime('now', static::$timezone); - } - $ts->setTimezone(static::$timezone); - $record = array('message' => (string) $message, 'context' => $context, 'level' => $level, 'level_name' => $levelName, 'channel' => $this->name, 'datetime' => $ts, 'extra' => array()); try { - foreach ($this->processors as $processor) { - $record = \call_user_func($processor, $record); - } - while ($handler = \current($this->handlers)) { - if (\true === $handler->handle($record)) { - break; + $record = null; + foreach ($this->handlers as $handler) { + if (null === $record) { + // skip creating the record as long as no handler is going to handle it + if (!$handler->isHandling(['level' => $level])) { + continue; + } + $levelName = static::getLevelName($level); + $record = ['message' => $message, 'context' => $context, 'level' => $level, 'level_name' => $levelName, 'channel' => $this->name, 'datetime' => $datetime ?? new \WPMailSMTP\Vendor\Monolog\DateTimeImmutable($this->microsecondTimestamps, $this->timezone), 'extra' => []]; + try { + foreach ($this->processors as $processor) { + $record = $processor($record); + } + } catch (\Throwable $e) { + $this->handleException($e, $record); + return \true; + } + } + // once the record exists, send it to all handlers as long as the bubbling chain is not interrupted + try { + if (\true === $handler->handle($record)) { + break; + } + } catch (\Throwable $e) { + $this->handleException($e, $record); + return \true; + } + } + } finally { + if ($this->detectCycles) { + if (isset($fiber)) { + $this->fiberLogDepth[$fiber]--; + } else { + $this->logDepth--; } - \next($this->handlers); } - } catch (\Exception $e) { - $this->handleException($e, $record); } - return \true; + return null !== $record; } /** * Ends a log cycle and frees all resources used by handlers. @@ -300,12 +349,10 @@ class Logger implements \WPMailSMTP\Vendor\Psr\Log\LoggerInterface, \WPMailSMTP\ * This is useful at the end of a request and will be called automatically on every handler * when they get destructed. */ - public function close() + public function close() : void { foreach ($this->handlers as $handler) { - if (\method_exists($handler, 'close')) { - $handler->close(); - } + $handler->close(); } } /** @@ -318,7 +365,7 @@ class Logger implements \WPMailSMTP\Vendor\Psr\Log\LoggerInterface, \WPMailSMTP\ * have a long running process like a worker or an application server serving multiple requests * in one process. */ - public function reset() + public function reset() : void { foreach ($this->handlers as $handler) { if ($handler instanceof \WPMailSMTP\Vendor\Monolog\ResettableInterface) { @@ -331,110 +378,25 @@ class Logger implements \WPMailSMTP\Vendor\Psr\Log\LoggerInterface, \WPMailSMTP\ } } } - /** - * Adds a log record at the DEBUG level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addDebug($message, array $context = array()) - { - return $this->addRecord(static::DEBUG, $message, $context); - } - /** - * Adds a log record at the INFO level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addInfo($message, array $context = array()) - { - return $this->addRecord(static::INFO, $message, $context); - } - /** - * Adds a log record at the NOTICE level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addNotice($message, array $context = array()) - { - return $this->addRecord(static::NOTICE, $message, $context); - } - /** - * Adds a log record at the WARNING level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addWarning($message, array $context = array()) - { - return $this->addRecord(static::WARNING, $message, $context); - } - /** - * Adds a log record at the ERROR level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addError($message, array $context = array()) - { - return $this->addRecord(static::ERROR, $message, $context); - } - /** - * Adds a log record at the CRITICAL level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addCritical($message, array $context = array()) - { - return $this->addRecord(static::CRITICAL, $message, $context); - } - /** - * Adds a log record at the ALERT level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addAlert($message, array $context = array()) - { - return $this->addRecord(static::ALERT, $message, $context); - } - /** - * Adds a log record at the EMERGENCY level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addEmergency($message, array $context = array()) - { - return $this->addRecord(static::EMERGENCY, $message, $context); - } /** * Gets all supported logging levels. * - * @return array Assoc array with human-readable level names => level codes. + * @return array Assoc array with human-readable level names => level codes. + * @phpstan-return array */ - public static function getLevels() + public static function getLevels() : array { return \array_flip(static::$levels); } /** * Gets the name of the logging level. * - * @param int $level - * @return string + * @throws \Psr\Log\InvalidArgumentException If level is not defined + * + * @phpstan-param Level $level + * @phpstan-return LevelName */ - public static function getLevelName($level) + public static function getLevelName(int $level) : string { if (!isset(static::$levels[$level])) { throw new \WPMailSMTP\Vendor\Psr\Log\InvalidArgumentException('Level "' . $level . '" is not defined, use one of: ' . \implode(', ', \array_keys(static::$levels))); @@ -444,30 +406,40 @@ class Logger implements \WPMailSMTP\Vendor\Psr\Log\LoggerInterface, \WPMailSMTP\ /** * Converts PSR-3 levels to Monolog ones if necessary * - * @param string|int $level Level number (monolog) or name (PSR-3) - * @return int + * @param string|int $level Level number (monolog) or name (PSR-3) + * @throws \Psr\Log\InvalidArgumentException If level is not defined + * + * @phpstan-param Level|LevelName|LogLevel::* $level + * @phpstan-return Level */ - public static function toMonologLevel($level) + public static function toMonologLevel($level) : int { if (\is_string($level)) { + if (\is_numeric($level)) { + /** @phpstan-ignore-next-line */ + return \intval($level); + } // Contains chars of all log levels and avoids using strtoupper() which may have - // strange results depending on locale (for example, "i" will become "İ") + // strange results depending on locale (for example, "i" will become "İ" in Turkish locale) $upper = \strtr($level, 'abcdefgilmnortuwy', 'ABCDEFGILMNORTUWY'); if (\defined(__CLASS__ . '::' . $upper)) { return \constant(__CLASS__ . '::' . $upper); } + throw new \WPMailSMTP\Vendor\Psr\Log\InvalidArgumentException('Level "' . $level . '" is not defined, use one of: ' . \implode(', ', \array_keys(static::$levels) + static::$levels)); + } + if (!\is_int($level)) { + throw new \WPMailSMTP\Vendor\Psr\Log\InvalidArgumentException('Level "' . \var_export($level, \true) . '" is not defined, use one of: ' . \implode(', ', \array_keys(static::$levels) + static::$levels)); } return $level; } /** * Checks whether the Logger has a handler that listens on the given level * - * @param int $level - * @return bool + * @phpstan-param Level $level */ - public function isHandling($level) + public function isHandling(int $level) : bool { - $record = array('level' => $level); + $record = ['level' => $level]; foreach ($this->handlers as $handler) { if ($handler->isHandling($record)) { return \true; @@ -476,217 +448,188 @@ class Logger implements \WPMailSMTP\Vendor\Psr\Log\LoggerInterface, \WPMailSMTP\ return \false; } /** - * Set a custom exception handler + * Set a custom exception handler that will be called if adding a new record fails * - * @param callable $callback - * @return $this + * The callable will receive an exception object and the record that failed to be logged */ - public function setExceptionHandler($callback) + public function setExceptionHandler(?callable $callback) : self { - if (!\is_callable($callback)) { - throw new \InvalidArgumentException('Exception handler must be valid callable (callback or object with an __invoke method), ' . \var_export($callback, \true) . ' given'); - } $this->exceptionHandler = $callback; return $this; } - /** - * @return callable - */ - public function getExceptionHandler() + public function getExceptionHandler() : ?callable { return $this->exceptionHandler; } - /** - * Delegates exception management to the custom exception handler, - * or throws the exception if no custom handler is set. - */ - protected function handleException(\Exception $e, array $record) - { - if (!$this->exceptionHandler) { - throw $e; - } - \call_user_func($this->exceptionHandler, $e, $record); - } /** * Adds a log record at an arbitrary level. * * This method allows for compatibility with common interfaces. * - * @param mixed $level The log level - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed + * @param mixed $level The log level (a Monolog, PSR-3 or RFC 5424 level) + * @param string|Stringable $message The log message + * @param mixed[] $context The log context + * + * @phpstan-param Level|LevelName|LogLevel::* $level */ - public function log($level, $message, array $context = array()) + public function log($level, $message, array $context = []) : void { + if (!\is_int($level) && !\is_string($level)) { + throw new \InvalidArgumentException('$level is expected to be a string or int'); + } + if (isset(self::RFC_5424_LEVELS[$level])) { + $level = self::RFC_5424_LEVELS[$level]; + } $level = static::toMonologLevel($level); - return $this->addRecord($level, $message, $context); + $this->addRecord($level, (string) $message, $context); } /** * Adds a log record at the DEBUG level. * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed + * @param string|Stringable $message The log message + * @param mixed[] $context The log context */ - public function debug($message, array $context = array()) + public function debug($message, array $context = []) : void { - return $this->addRecord(static::DEBUG, $message, $context); + $this->addRecord(static::DEBUG, (string) $message, $context); } /** * Adds a log record at the INFO level. * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed + * @param string|Stringable $message The log message + * @param mixed[] $context The log context */ - public function info($message, array $context = array()) + public function info($message, array $context = []) : void { - return $this->addRecord(static::INFO, $message, $context); + $this->addRecord(static::INFO, (string) $message, $context); } /** * Adds a log record at the NOTICE level. * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed + * @param string|Stringable $message The log message + * @param mixed[] $context The log context */ - public function notice($message, array $context = array()) + public function notice($message, array $context = []) : void { - return $this->addRecord(static::NOTICE, $message, $context); + $this->addRecord(static::NOTICE, (string) $message, $context); } /** * Adds a log record at the WARNING level. * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed + * @param string|Stringable $message The log message + * @param mixed[] $context The log context */ - public function warn($message, array $context = array()) + public function warning($message, array $context = []) : void { - return $this->addRecord(static::WARNING, $message, $context); - } - /** - * Adds a log record at the WARNING level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function warning($message, array $context = array()) - { - return $this->addRecord(static::WARNING, $message, $context); + $this->addRecord(static::WARNING, (string) $message, $context); } /** * Adds a log record at the ERROR level. * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed + * @param string|Stringable $message The log message + * @param mixed[] $context The log context */ - public function err($message, array $context = array()) + public function error($message, array $context = []) : void { - return $this->addRecord(static::ERROR, $message, $context); - } - /** - * Adds a log record at the ERROR level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function error($message, array $context = array()) - { - return $this->addRecord(static::ERROR, $message, $context); + $this->addRecord(static::ERROR, (string) $message, $context); } /** * Adds a log record at the CRITICAL level. * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed + * @param string|Stringable $message The log message + * @param mixed[] $context The log context */ - public function crit($message, array $context = array()) + public function critical($message, array $context = []) : void { - return $this->addRecord(static::CRITICAL, $message, $context); - } - /** - * Adds a log record at the CRITICAL level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function critical($message, array $context = array()) - { - return $this->addRecord(static::CRITICAL, $message, $context); + $this->addRecord(static::CRITICAL, (string) $message, $context); } /** * Adds a log record at the ALERT level. * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed + * @param string|Stringable $message The log message + * @param mixed[] $context The log context */ - public function alert($message, array $context = array()) + public function alert($message, array $context = []) : void { - return $this->addRecord(static::ALERT, $message, $context); + $this->addRecord(static::ALERT, (string) $message, $context); } /** * Adds a log record at the EMERGENCY level. * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed + * @param string|Stringable $message The log message + * @param mixed[] $context The log context */ - public function emerg($message, array $context = array()) + public function emergency($message, array $context = []) : void { - return $this->addRecord(static::EMERGENCY, $message, $context); + $this->addRecord(static::EMERGENCY, (string) $message, $context); } /** - * Adds a log record at the EMERGENCY level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed + * Sets the timezone to be used for the timestamp of log records. */ - public function emergency($message, array $context = array()) + public function setTimezone(\DateTimeZone $tz) : self { - return $this->addRecord(static::EMERGENCY, $message, $context); + $this->timezone = $tz; + return $this; } /** - * Set the timezone to be used for the timestamp of log records. - * - * This is stored globally for all Logger instances - * - * @param \DateTimeZone $tz Timezone object + * Returns the timezone to be used for the timestamp of log records. */ - public static function setTimezone(\DateTimeZone $tz) + public function getTimezone() : \DateTimeZone { - self::$timezone = $tz; + return $this->timezone; + } + /** + * Delegates exception management to the custom exception handler, + * or throws the exception if no custom handler is set. + * + * @param array $record + * @phpstan-param Record $record + */ + protected function handleException(\Throwable $e, array $record) : void + { + if (!$this->exceptionHandler) { + throw $e; + } + ($this->exceptionHandler)($e, $record); + } + /** + * @return array + */ + public function __serialize() : array + { + return ['name' => $this->name, 'handlers' => $this->handlers, 'processors' => $this->processors, 'microsecondTimestamps' => $this->microsecondTimestamps, 'timezone' => $this->timezone, 'exceptionHandler' => $this->exceptionHandler, 'logDepth' => $this->logDepth, 'detectCycles' => $this->detectCycles]; + } + /** + * @param array $data + */ + public function __unserialize(array $data) : void + { + foreach (['name', 'handlers', 'processors', 'microsecondTimestamps', 'timezone', 'exceptionHandler', 'logDepth', 'detectCycles'] as $property) { + if (isset($data[$property])) { + $this->{$property} = $data[$property]; + } + } + if (\PHP_VERSION_ID >= 80100) { + // Local variable for phpstan, see https://github.com/phpstan/phpstan/issues/6732#issuecomment-1111118412 + /** @var \WeakMap<\Fiber, int> $fiberLogDepth */ + $fiberLogDepth = new \WeakMap(); + $this->fiberLogDepth = $fiberLogDepth; + } } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/GitProcessor.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/GitProcessor.php index 7cd63904..21bfdcb4 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/GitProcessor.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/GitProcessor.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type Level from \Monolog\Logger + * @phpstan-import-type LevelName from \Monolog\Logger */ class GitProcessor implements \WPMailSMTP\Vendor\Monolog\Processor\ProcessorInterface { + /** @var int */ private $level; - private static $cache; + /** @var array{branch: string, commit: string}|array|null */ + private static $cache = null; + /** + * @param string|int $level The minimum logging level at which this Processor will be triggered + * + * @phpstan-param Level|LevelName|LogLevel::* $level + */ public function __construct($level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG) { $this->level = \WPMailSMTP\Vendor\Monolog\Logger::toMonologLevel($level); } /** - * @param array $record - * @return array + * {@inheritDoc} */ - public function __invoke(array $record) + public function __invoke(array $record) : array { // return if the level is not high enough if ($record['level'] < $this->level) { @@ -38,15 +49,18 @@ class GitProcessor implements \WPMailSMTP\Vendor\Monolog\Processor\ProcessorInte $record['extra']['git'] = self::getGitInfo(); return $record; } - private static function getGitInfo() + /** + * @return array{branch: string, commit: string}|array + */ + private static function getGitInfo() : array { if (self::$cache) { return self::$cache; } $branches = `git branch -v --no-abbrev`; if ($branches && \preg_match('{^\\* (.+?)\\s+([a-f0-9]{40})(?:\\s|$)}m', $branches, $matches)) { - return self::$cache = array('branch' => $matches[1], 'commit' => $matches[2]); + return self::$cache = ['branch' => $matches[1], 'commit' => $matches[2]]; } - return self::$cache = array(); + return self::$cache = []; } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php new file mode 100644 index 00000000..a25ebd3f --- /dev/null +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace WPMailSMTP\Vendor\Monolog\Processor; + +/** + * Injects value of gethostname in all records + */ +class HostnameProcessor implements \WPMailSMTP\Vendor\Monolog\Processor\ProcessorInterface +{ + /** @var string */ + private static $host; + public function __construct() + { + self::$host = (string) \gethostname(); + } + /** + * {@inheritDoc} + */ + public function __invoke(array $record) : array + { + $record['extra']['hostname'] = self::$host; + return $record; + } +} diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php index 9350d10d..285d2027 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type Level from \Monolog\Logger + * @phpstan-import-type LevelName from \Monolog\Logger */ class IntrospectionProcessor implements \WPMailSMTP\Vendor\Monolog\Processor\ProcessorInterface { + /** @var int */ private $level; + /** @var string[] */ private $skipClassesPartials; + /** @var int */ private $skipStackFramesCount; - private $skipFunctions = array('call_user_func', 'call_user_func_array'); - public function __construct($level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, array $skipClassesPartials = array(), $skipStackFramesCount = 0) + /** @var string[] */ + private $skipFunctions = ['call_user_func', 'call_user_func_array']; + /** + * @param string|int $level The minimum logging level at which this Processor will be triggered + * @param string[] $skipClassesPartials + * + * @phpstan-param Level|LevelName|LogLevel::* $level + */ + public function __construct($level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG, array $skipClassesPartials = [], int $skipStackFramesCount = 0) { $this->level = \WPMailSMTP\Vendor\Monolog\Logger::toMonologLevel($level); - $this->skipClassesPartials = \array_merge(array('WPMailSMTP\\Vendor\\Monolog\\'), $skipClassesPartials); + $this->skipClassesPartials = \array_merge(['WPMailSMTP\\Vendor\\Monolog\\'], $skipClassesPartials); $this->skipStackFramesCount = $skipStackFramesCount; } /** - * @param array $record - * @return array + * {@inheritDoc} */ - public function __invoke(array $record) + public function __invoke(array $record) : array { // return if the level is not high enough if ($record['level'] < $this->level) { return $record; } - /* - * http://php.net/manual/en/function.debug-backtrace.php - * As of 5.3.6, DEBUG_BACKTRACE_IGNORE_ARGS option was added. - * Any version less than 5.3.6 must use the DEBUG_BACKTRACE_IGNORE_ARGS constant value '2'. - */ - $trace = \debug_backtrace(\PHP_VERSION_ID < 50306 ? 2 : \DEBUG_BACKTRACE_IGNORE_ARGS); + $trace = \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS); // skip first since it's always the current method \array_shift($trace); // the call_user_func call is also skipped @@ -71,10 +80,13 @@ class IntrospectionProcessor implements \WPMailSMTP\Vendor\Monolog\Processor\Pro } $i += $this->skipStackFramesCount; // we should have the call source now - $record['extra'] = \array_merge($record['extra'], array('file' => isset($trace[$i - 1]['file']) ? $trace[$i - 1]['file'] : null, 'line' => isset($trace[$i - 1]['line']) ? $trace[$i - 1]['line'] : null, 'class' => isset($trace[$i]['class']) ? $trace[$i]['class'] : null, 'function' => isset($trace[$i]['function']) ? $trace[$i]['function'] : null)); + $record['extra'] = \array_merge($record['extra'], ['file' => isset($trace[$i - 1]['file']) ? $trace[$i - 1]['file'] : null, 'line' => isset($trace[$i - 1]['line']) ? $trace[$i - 1]['line'] : null, 'class' => isset($trace[$i]['class']) ? $trace[$i]['class'] : null, 'callType' => isset($trace[$i]['type']) ? $trace[$i]['type'] : null, 'function' => isset($trace[$i]['function']) ? $trace[$i]['function'] : null]); return $record; } - private function isTraceClassOrSkippedFunction(array $trace, $index) + /** + * @param array[] $trace + */ + private function isTraceClassOrSkippedFunction(array $trace, int $index) : bool { if (!isset($trace[$index])) { return \false; diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php index b0f974ef..9f84bc12 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php @@ -1,5 +1,6 @@ realUsage); - $formatted = $this->formatBytes($bytes); - $record['extra']['memory_peak_usage'] = $formatted; + $usage = \memory_get_peak_usage($this->realUsage); + if ($this->useFormatting) { + $usage = $this->formatBytes($usage); + } + $record['extra']['memory_peak_usage'] = $usage; return $record; } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php index 970edf66..beccabbd 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php @@ -1,5 +1,6 @@ realUsage = (bool) $realUsage; - $this->useFormatting = (bool) $useFormatting; + $this->realUsage = $realUsage; + $this->useFormatting = $useFormatting; } /** * Formats bytes into a human readable string if $this->useFormatting is true, otherwise return $bytes as is * * @param int $bytes - * @return string|int Formatted string if $this->useFormatting is true, otherwise return $bytes as is + * @return string|int Formatted string if $this->useFormatting is true, otherwise return $bytes as int */ - protected function formatBytes($bytes) + protected function formatBytes(int $bytes) { - $bytes = (int) $bytes; if (!$this->useFormatting) { return $bytes; } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php index d508fea5..448f085c 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php @@ -1,5 +1,6 @@ realUsage); - $formatted = $this->formatBytes($bytes); - $record['extra']['memory_usage'] = $formatted; + $usage = \memory_get_usage($this->realUsage); + if ($this->useFormatting) { + $usage = $this->formatBytes($usage); + } + $record['extra']['memory_usage'] = $usage; return $record; } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php index 6f578c54..65534738 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php @@ -1,9 +1,10 @@ + * (c) Jordi Boggiano * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -11,24 +12,34 @@ namespace WPMailSMTP\Vendor\Monolog\Processor; use WPMailSMTP\Vendor\Monolog\Logger; +use WPMailSMTP\Vendor\Psr\Log\LogLevel; /** * Injects Hg branch and Hg revision number in all records * * @author Jonathan A. Schweder + * + * @phpstan-import-type LevelName from \Monolog\Logger + * @phpstan-import-type Level from \Monolog\Logger */ class MercurialProcessor implements \WPMailSMTP\Vendor\Monolog\Processor\ProcessorInterface { + /** @var Level */ private $level; - private static $cache; + /** @var array{branch: string, revision: string}|array|null */ + private static $cache = null; + /** + * @param int|string $level The minimum logging level at which this Processor will be triggered + * + * @phpstan-param Level|LevelName|LogLevel::* $level + */ public function __construct($level = \WPMailSMTP\Vendor\Monolog\Logger::DEBUG) { $this->level = \WPMailSMTP\Vendor\Monolog\Logger::toMonologLevel($level); } /** - * @param array $record - * @return array + * {@inheritDoc} */ - public function __invoke(array $record) + public function __invoke(array $record) : array { // return if the level is not high enough if ($record['level'] < $this->level) { @@ -37,15 +48,18 @@ class MercurialProcessor implements \WPMailSMTP\Vendor\Monolog\Processor\Process $record['extra']['hg'] = self::getMercurialInfo(); return $record; } - private static function getMercurialInfo() + /** + * @return array{branch: string, revision: string}|array + */ + private static function getMercurialInfo() : array { if (self::$cache) { return self::$cache; } $result = \explode(' ', \trim(`hg id -nb`)); if (\count($result) >= 3) { - return self::$cache = array('branch' => $result[1], 'revision' => $result[2]); + return self::$cache = ['branch' => $result[1], 'revision' => $result[2]]; } - return self::$cache = array(); + return self::$cache = []; } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php index 3c7dfa09..43f71fb9 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type Record from \Monolog\Logger */ interface ProcessorInterface { /** - * @return array The processed records + * @return array The processed record + * + * @phpstan-param Record $record + * @phpstan-return Record */ - public function __invoke(array $records); + public function __invoke(array $record); } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php index e306f190..36c1300f 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php @@ -1,5 +1,6 @@ dateFormat = $dateFormat; $this->removeUsedContextFields = $removeUsedContextFields; } /** - * @param array $record - * @return array + * {@inheritDoc} */ - public function __invoke(array $record) + public function __invoke(array $record) : array { if (\false === \strpos($record['message'], '{')) { return $record; } - $replacements = array(); + $replacements = []; foreach ($record['context'] as $key => $val) { $placeholder = '{' . $key . '}'; if (\strpos($record['message'], $placeholder) === \false) { @@ -51,8 +51,16 @@ class PsrLogMessageProcessor implements \WPMailSMTP\Vendor\Monolog\Processor\Pro } if (\is_null($val) || \is_scalar($val) || \is_object($val) && \method_exists($val, "__toString")) { $replacements[$placeholder] = $val; - } elseif ($val instanceof \DateTime) { - $replacements[$placeholder] = $val->format($this->dateFormat ?: static::SIMPLE_DATE); + } elseif ($val instanceof \DateTimeInterface) { + if (!$this->dateFormat && $val instanceof \WPMailSMTP\Vendor\Monolog\DateTimeImmutable) { + // handle monolog dates using __toString if no specific dateFormat was asked for + // so that it follows the useMicroseconds flag + $replacements[$placeholder] = (string) $val; + } else { + $replacements[$placeholder] = $val->format($this->dateFormat ?: static::SIMPLE_DATE); + } + } elseif ($val instanceof \UnitEnum) { + $replacements[$placeholder] = $val instanceof \BackedEnum ? $val->value : $val->name; } elseif (\is_object($val)) { $replacements[$placeholder] = '[object ' . \WPMailSMTP\Vendor\Monolog\Utils::getClass($val) . ']'; } elseif (\is_array($val)) { diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/TagProcessor.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/TagProcessor.php index f722cd65..df00e967 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/TagProcessor.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/TagProcessor.php @@ -1,5 +1,6 @@ setTags($tags); } - public function addTags(array $tags = array()) + /** + * @param string[] $tags + */ + public function addTags(array $tags = []) : self { $this->tags = \array_merge($this->tags, $tags); + return $this; } - public function setTags(array $tags = array()) + /** + * @param string[] $tags + */ + public function setTags(array $tags = []) : self { $this->tags = $tags; + return $this; } - public function __invoke(array $record) + /** + * {@inheritDoc} + */ + public function __invoke(array $record) : array { $record['extra']['tags'] = $this->tags; return $record; diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/UidProcessor.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/UidProcessor.php index bba2a8d2..ece9e563 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/UidProcessor.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/UidProcessor.php @@ -1,5 +1,6 @@ 32 || $length < 1) { + if ($length > 32 || $length < 1) { throw new \InvalidArgumentException('The uid length must be an integer between 1 and 32'); } $this->uid = $this->generateUid($length); } - public function __invoke(array $record) + /** + * {@inheritDoc} + */ + public function __invoke(array $record) : array { $record['extra']['uid'] = $this->uid; return $record; } - /** - * @return string - */ - public function getUid() + public function getUid() : string { return $this->uid; } @@ -42,8 +44,8 @@ class UidProcessor implements \WPMailSMTP\Vendor\Monolog\Processor\ProcessorInte { $this->uid = $this->generateUid(\strlen($this->uid)); } - private function generateUid($length) + private function generateUid(int $length) : string { - return \substr(\hash('md5', \uniqid('', \true)), 0, $length); + return \substr(\bin2hex(\random_bytes((int) \ceil($length / 2))), 0, $length); } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/WebProcessor.php index a18a8533..5187acb9 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/WebProcessor.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Processor/WebProcessor.php @@ -1,5 +1,6 @@ |\ArrayAccess */ protected $serverData; /** @@ -26,14 +27,14 @@ class WebProcessor implements \WPMailSMTP\Vendor\Monolog\Processor\ProcessorInte * * Array is structured as [key in record.extra => key in $serverData] * - * @var array + * @var array */ - protected $extraFields = array('url' => 'REQUEST_URI', 'ip' => 'REMOTE_ADDR', 'http_method' => 'REQUEST_METHOD', 'server' => 'SERVER_NAME', 'referrer' => 'HTTP_REFERER'); + protected $extraFields = ['url' => 'REQUEST_URI', 'ip' => 'REMOTE_ADDR', 'http_method' => 'REQUEST_METHOD', 'server' => 'SERVER_NAME', 'referrer' => 'HTTP_REFERER', 'user_agent' => 'HTTP_USER_AGENT']; /** - * @param array|\ArrayAccess $serverData Array or object w/ ArrayAccess that provides access to the $_SERVER data - * @param array|null $extraFields Field names and the related key inside $serverData to be added. If not provided it defaults to: url, ip, http_method, server, referrer + * @param array|\ArrayAccess|null $serverData Array or object w/ ArrayAccess that provides access to the $_SERVER data + * @param array|array|null $extraFields Field names and the related key inside $serverData to be added (or just a list of field names to use the default configured $serverData mapping). If not provided it defaults to: [url, ip, http_method, server, referrer] + unique_id if present in server data */ - public function __construct($serverData = null, array $extraFields = null) + public function __construct($serverData = null, ?array $extraFields = null) { if (null === $serverData) { $this->serverData =& $_SERVER; @@ -42,26 +43,28 @@ class WebProcessor implements \WPMailSMTP\Vendor\Monolog\Processor\ProcessorInte } else { throw new \UnexpectedValueException('$serverData must be an array or object implementing ArrayAccess.'); } + $defaultEnabled = ['url', 'ip', 'http_method', 'server', 'referrer']; if (isset($this->serverData['UNIQUE_ID'])) { $this->extraFields['unique_id'] = 'UNIQUE_ID'; + $defaultEnabled[] = 'unique_id'; } - if (null !== $extraFields) { - if (isset($extraFields[0])) { - foreach (\array_keys($this->extraFields) as $fieldName) { - if (!\in_array($fieldName, $extraFields)) { - unset($this->extraFields[$fieldName]); - } + if (null === $extraFields) { + $extraFields = $defaultEnabled; + } + if (isset($extraFields[0])) { + foreach (\array_keys($this->extraFields) as $fieldName) { + if (!\in_array($fieldName, $extraFields)) { + unset($this->extraFields[$fieldName]); } - } else { - $this->extraFields = $extraFields; } + } else { + $this->extraFields = $extraFields; } } /** - * @param array $record - * @return array + * {@inheritDoc} */ - public function __invoke(array $record) + public function __invoke(array $record) : array { // skip processing if for some reason request data // is not present (CLI or wonky SAPIs) @@ -71,24 +74,19 @@ class WebProcessor implements \WPMailSMTP\Vendor\Monolog\Processor\ProcessorInte $record['extra'] = $this->appendExtraFields($record['extra']); return $record; } - /** - * @param string $extraName - * @param string $serverName - * @return $this - */ - public function addExtraField($extraName, $serverName) + public function addExtraField(string $extraName, string $serverName) : self { $this->extraFields[$extraName] = $serverName; return $this; } /** - * @param array $extra - * @return array + * @param mixed[] $extra + * @return mixed[] */ - private function appendExtraFields(array $extra) + private function appendExtraFields(array $extra) : array { foreach ($this->extraFields as $extraName => $serverName) { - $extra[$extraName] = isset($this->serverData[$serverName]) ? $this->serverData[$serverName] : null; + $extra[$extraName] = $this->serverData[$serverName] ?? null; } return $extra; } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Registry.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Registry.php index 87531e51..e30550ec 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Registry.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Registry.php @@ -1,5 +1,6 @@ addError('Sent to $api Logger instance'); - * Monolog\Registry::application()->addError('Sent to $application Logger instance'); + * Monolog\Registry::api()->error('Sent to $api Logger instance'); + * Monolog\Registry::application()->error('Sent to $application Logger instance'); * } * * @@ -40,7 +41,7 @@ class Registry * * @var Logger[] */ - private static $loggers = array(); + private static $loggers = []; /** * Adds new logging channel to the registry * @@ -48,8 +49,9 @@ class Registry * @param string|null $name Name of the logging channel ($logger->getName() by default) * @param bool $overwrite Overwrite instance in the registry if the given name already exists? * @throws \InvalidArgumentException If $overwrite set to false and named Logger instance already exists + * @return void */ - public static function addLogger(\WPMailSMTP\Vendor\Monolog\Logger $logger, $name = null, $overwrite = \false) + public static function addLogger(\WPMailSMTP\Vendor\Monolog\Logger $logger, ?string $name = null, bool $overwrite = \false) { $name = $name ?: $logger->getName(); if (isset(self::$loggers[$name]) && !$overwrite) { @@ -62,21 +64,20 @@ class Registry * * @param string|Logger $logger Name or logger instance */ - public static function hasLogger($logger) + public static function hasLogger($logger) : bool { if ($logger instanceof \WPMailSMTP\Vendor\Monolog\Logger) { $index = \array_search($logger, self::$loggers, \true); return \false !== $index; - } else { - return isset(self::$loggers[$logger]); } + return isset(self::$loggers[$logger]); } /** * Removes instance from registry by name or instance * * @param string|Logger $logger Name or logger instance */ - public static function removeLogger($logger) + public static function removeLogger($logger) : void { if ($logger instanceof \WPMailSMTP\Vendor\Monolog\Logger) { if (\false !== ($idx = \array_search($logger, self::$loggers, \true))) { @@ -89,18 +90,17 @@ class Registry /** * Clears the registry */ - public static function clear() + public static function clear() : void { - self::$loggers = array(); + self::$loggers = []; } /** * Gets Logger instance from the registry * * @param string $name Name of the requested Logger instance * @throws \InvalidArgumentException If named Logger instance is not in the registry - * @return Logger Requested instance of Logger */ - public static function getInstance($name) + public static function getInstance($name) : \WPMailSMTP\Vendor\Monolog\Logger { if (!isset(self::$loggers[$name])) { throw new \InvalidArgumentException(\sprintf('Requested "%s" logger instance is not in the registry', $name)); @@ -111,7 +111,7 @@ class Registry * Gets Logger instance from the registry via static method call * * @param string $name Name of the requested Logger instance - * @param array $arguments Arguments passed to static method call + * @param mixed[] $arguments Arguments passed to static method call * @throws \InvalidArgumentException If named Logger instance is not in the registry * @return Logger Requested instance of Logger */ diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/ResettableInterface.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/ResettableInterface.php index 57167392..ff3fe217 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/ResettableInterface.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/ResettableInterface.php @@ -1,5 +1,6 @@ + * + * @phpstan-import-type Level from \Monolog\Logger + * @phpstan-import-type LevelName from \Monolog\Logger */ class SignalHandler { + /** @var LoggerInterface */ private $logger; - private $previousSignalHandler = array(); - private $signalLevelMap = array(); - private $signalRestartSyscalls = array(); + /** @var array SIG_DFL, SIG_IGN or previous callable */ + private $previousSignalHandler = []; + /** @var array */ + private $signalLevelMap = []; + /** @var array */ + private $signalRestartSyscalls = []; public function __construct(\WPMailSMTP\Vendor\Psr\Log\LoggerInterface $logger) { $this->logger = $logger; } - public function registerSignalHandler($signo, $level = \WPMailSMTP\Vendor\Psr\Log\LogLevel::CRITICAL, $callPrevious = \true, $restartSyscalls = \true, $async = \true) + /** + * @param int|string $level Level or level name + * @param bool $callPrevious + * @param bool $restartSyscalls + * @param bool|null $async + * @return $this + * + * @phpstan-param Level|LevelName|LogLevel::* $level + */ + public function registerSignalHandler(int $signo, $level = \WPMailSMTP\Vendor\Psr\Log\LogLevel::CRITICAL, bool $callPrevious = \true, bool $restartSyscalls = \true, ?bool $async = \true) : self { if (!\extension_loaded('pcntl') || !\function_exists('pcntl_signal')) { return $this; } + $level = \WPMailSMTP\Vendor\Monolog\Logger::toMonologLevel($level); if ($callPrevious) { - if (\function_exists('pcntl_signal_get_handler')) { - $handler = \pcntl_signal_get_handler($signo); - if ($handler === \false) { - return $this; - } - $this->previousSignalHandler[$signo] = $handler; - } else { - $this->previousSignalHandler[$signo] = \true; - } + $handler = \pcntl_signal_get_handler($signo); + $this->previousSignalHandler[$signo] = $handler; } else { unset($this->previousSignalHandler[$signo]); } $this->signalLevelMap[$signo] = $level; $this->signalRestartSyscalls[$signo] = $restartSyscalls; - if (\function_exists('pcntl_async_signals') && $async !== null) { + if ($async !== null) { \pcntl_async_signals($async); } - \pcntl_signal($signo, array($this, 'handleSignal'), $restartSyscalls); + \pcntl_signal($signo, [$this, 'handleSignal'], $restartSyscalls); return $this; } - public function handleSignal($signo, array $siginfo = null) + /** + * @param mixed $siginfo + */ + public function handleSignal(int $signo, $siginfo = null) : void { - static $signals = array(); + static $signals = []; if (!$signals && \extension_loaded('pcntl')) { $pcntl = new \ReflectionExtension('pcntl'); - $constants = $pcntl->getConstants(); - if (!$constants) { - // HHVM 3.24.2 returns an empty array. - $constants = \get_defined_constants(\true); - $constants = $constants['Core']; - } - foreach ($constants as $name => $value) { + // HHVM 3.24.2 returns an empty array. + foreach ($pcntl->getConstants() ?: \get_defined_constants(\true)['Core'] as $name => $value) { if (\substr($name, 0, 3) === 'SIG' && $name[3] !== '_' && \is_int($value)) { $signals[$value] = $name; } } - unset($constants); } - $level = isset($this->signalLevelMap[$signo]) ? $this->signalLevelMap[$signo] : \WPMailSMTP\Vendor\Psr\Log\LogLevel::CRITICAL; - $signal = isset($signals[$signo]) ? $signals[$signo] : $signo; - $context = isset($siginfo) ? $siginfo : array(); + $level = $this->signalLevelMap[$signo] ?? \WPMailSMTP\Vendor\Psr\Log\LogLevel::CRITICAL; + $signal = $signals[$signo] ?? $signo; + $context = $siginfo ?? []; $this->logger->log($level, \sprintf('Program received signal %s', $signal), $context); if (!isset($this->previousSignalHandler[$signo])) { return; } - if ($this->previousSignalHandler[$signo] === \true || $this->previousSignalHandler[$signo] === \SIG_DFL) { + if ($this->previousSignalHandler[$signo] === \SIG_DFL) { if (\extension_loaded('pcntl') && \function_exists('pcntl_signal') && \function_exists('pcntl_sigprocmask') && \function_exists('pcntl_signal_dispatch') && \extension_loaded('posix') && \function_exists('posix_getpid') && \function_exists('posix_kill')) { - $restartSyscalls = isset($this->signalRestartSyscalls[$signo]) ? $this->signalRestartSyscalls[$signo] : \true; + $restartSyscalls = $this->signalRestartSyscalls[$signo] ?? \true; \pcntl_signal($signo, \SIG_DFL, $restartSyscalls); - \pcntl_sigprocmask(\SIG_UNBLOCK, array($signo), $oldset); + \pcntl_sigprocmask(\SIG_UNBLOCK, [$signo], $oldset); \posix_kill(\posix_getpid(), $signo); \pcntl_signal_dispatch(); \pcntl_sigprocmask(\SIG_SETMASK, $oldset); - \pcntl_signal($signo, array($this, 'handleSignal'), $restartSyscalls); + \pcntl_signal($signo, [$this, 'handleSignal'], $restartSyscalls); } } elseif (\is_callable($this->previousSignalHandler[$signo])) { - if (\PHP_VERSION_ID >= 70100) { - $this->previousSignalHandler[$signo]($signo, $siginfo); - } else { - $this->previousSignalHandler[$signo]($signo); - } + $this->previousSignalHandler[$signo]($signo, $siginfo); } } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Utils.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Utils.php index a16f2fe4..7f196534 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Utils.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Utils.php @@ -1,5 +1,6 @@ =')) { - $encodeFlags = \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE; + if (null === $encodeFlags) { + $encodeFlags = self::DEFAULT_JSON_FLAGS; } if ($ignoreErrors) { $json = @\json_encode($data, $encodeFlags); @@ -77,16 +87,16 @@ class Utils * * If the failure is due to invalid string encoding, try to clean the * input and encode again. If the second encoding attempt fails, the - * inital error is not encoding related or the input can't be cleaned then + * initial error is not encoding related or the input can't be cleaned then * raise a descriptive exception. * - * @param int $code return code of json_last_error function - * @param mixed $data data that was meant to be encoded - * @param int $encodeFlags flags to pass to json encode, defaults to JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE + * @param int $code return code of json_last_error function + * @param mixed $data data that was meant to be encoded + * @param int $encodeFlags flags to pass to json encode, defaults to JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION * @throws \RuntimeException if failure can't be corrected * @return string JSON encoded data after error correction */ - public static function handleJsonError($code, $data, $encodeFlags = null) + public static function handleJsonError(int $code, $data, ?int $encodeFlags = null) : string { if ($code !== \JSON_ERROR_UTF8) { self::throwEncodeError($code, $data); @@ -98,8 +108,8 @@ class Utils } else { self::throwEncodeError($code, $data); } - if (null === $encodeFlags && \version_compare(\PHP_VERSION, '5.4.0', '>=')) { - $encodeFlags = \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE; + if (null === $encodeFlags) { + $encodeFlags = self::DEFAULT_JSON_FLAGS; } $json = \json_encode($data, $encodeFlags); if ($json === \false) { @@ -107,14 +117,31 @@ class Utils } return $json; } + /** + * @internal + */ + public static function pcreLastErrorMessage(int $code) : string + { + if (\PHP_VERSION_ID >= 80000) { + return \preg_last_error_msg(); + } + $constants = \get_defined_constants(\true)['pcre']; + $constants = \array_filter($constants, function ($key) { + return \substr($key, -6) == '_ERROR'; + }, \ARRAY_FILTER_USE_KEY); + $constants = \array_flip($constants); + return $constants[$code] ?? 'UNDEFINED_ERROR'; + } /** * Throws an exception according to a given code with a customized message * * @param int $code return code of json_last_error function * @param mixed $data data that was meant to be encoded * @throws \RuntimeException + * + * @return never */ - private static function throwEncodeError($code, $data) + private static function throwEncodeError(int $code, $data) : void { switch ($code) { case \JSON_ERROR_DEPTH: @@ -148,15 +175,66 @@ class Utils * can be used as a callback for array_walk_recursive. * * @param mixed $data Input to check and convert if needed, passed by ref - * @private */ - public static function detectAndCleanUtf8(&$data) + private static function detectAndCleanUtf8(&$data) : void { if (\is_string($data) && !\preg_match('//u', $data)) { $data = \preg_replace_callback('/[\\x80-\\xFF]+/', function ($m) { - return \utf8_encode($m[0]); + return \function_exists('mb_convert_encoding') ? \mb_convert_encoding($m[0], 'UTF-8', 'ISO-8859-1') : \utf8_encode($m[0]); }, $data); - $data = \str_replace(array('¤', '¦', '¨', '´', '¸', '¼', '½', '¾'), array('€', 'Š', 'š', 'Ž', 'ž', 'Œ', 'œ', 'Ÿ'), $data); + if (!\is_string($data)) { + $pcreErrorCode = \preg_last_error(); + throw new \RuntimeException('Failed to preg_replace_callback: ' . $pcreErrorCode . ' / ' . self::pcreLastErrorMessage($pcreErrorCode)); + } + $data = \str_replace(['¤', '¦', '¨', '´', '¸', '¼', '½', '¾'], ['€', 'Š', 'š', 'Ž', 'ž', 'Œ', 'œ', 'Ÿ'], $data); } } + /** + * Converts a string with a valid 'memory_limit' format, to bytes. + * + * @param string|false $val + * @return int|false Returns an integer representing bytes. Returns FALSE in case of error. + */ + public static function expandIniShorthandBytes($val) + { + if (!\is_string($val)) { + return \false; + } + // support -1 + if ((int) $val < 0) { + return (int) $val; + } + if (!\preg_match('/^\\s*(?\\d+)(?:\\.\\d+)?\\s*(?[gmk]?)\\s*$/i', $val, $match)) { + return \false; + } + $val = (int) $match['val']; + switch (\strtolower($match['unit'] ?? '')) { + case 'g': + $val *= 1024; + case 'm': + $val *= 1024; + case 'k': + $val *= 1024; + } + return $val; + } + /** + * @param array $record + */ + public static function getRecordMessageForException(array $record) : string + { + $context = ''; + $extra = ''; + try { + if ($record['context']) { + $context = "\nContext: " . \json_encode($record['context']); + } + if ($record['extra']) { + $extra = "\nExtra: " . \json_encode($record['extra']); + } + } catch (\Throwable $e) { + // noop + } + return "\nThe exception occurred while attempting to log: " . $record['message'] . $context . $extra; + } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Base32.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Base32.php index 4b16a7d6..603ddd25 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Base32.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Base32.php @@ -43,7 +43,11 @@ abstract class Base32 implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Encod * @param bool $strictPadding * @return string */ - public static function decode(string $encodedString, bool $strictPadding = \false) : string + public static function decode( + #[\SensitiveParameter] + string $encodedString, + bool $strictPadding = \false + ) : string { return static::doDecode($encodedString, \false, $strictPadding); } @@ -54,7 +58,11 @@ abstract class Base32 implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Encod * @param bool $strictPadding * @return string */ - public static function decodeUpper(string $src, bool $strictPadding = \false) : string + public static function decodeUpper( + #[\SensitiveParameter] + string $src, + bool $strictPadding = \false + ) : string { return static::doDecode($src, \true, $strictPadding); } @@ -65,7 +73,10 @@ abstract class Base32 implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Encod * @return string * @throws TypeError */ - public static function encode(string $binString) : string + public static function encode( + #[\SensitiveParameter] + string $binString + ) : string { return static::doEncode($binString, \false, \true); } @@ -76,7 +87,10 @@ abstract class Base32 implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Encod * @return string * @throws TypeError */ - public static function encodeUnpadded(string $src) : string + public static function encodeUnpadded( + #[\SensitiveParameter] + string $src + ) : string { return static::doEncode($src, \false, \false); } @@ -87,7 +101,10 @@ abstract class Base32 implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Encod * @return string * @throws TypeError */ - public static function encodeUpper(string $src) : string + public static function encodeUpper( + #[\SensitiveParameter] + string $src + ) : string { return static::doEncode($src, \true, \true); } @@ -98,7 +115,10 @@ abstract class Base32 implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Encod * @return string * @throws TypeError */ - public static function encodeUpperUnpadded(string $src) : string + public static function encodeUpperUnpadded( + #[\SensitiveParameter] + string $src + ) : string { return static::doEncode($src, \true, \false); } @@ -171,7 +191,11 @@ abstract class Base32 implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Encod * @param bool $upper * @return string */ - public static function decodeNoPadding(string $encodedString, bool $upper = \false) : string + public static function decodeNoPadding( + #[\SensitiveParameter] + string $encodedString, + bool $upper = \false + ) : string { $srcLen = \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Binary::safeStrlen($encodedString); if ($srcLen === 0) { @@ -195,9 +219,13 @@ abstract class Base32 implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Encod * @return string * * @throws TypeError - * @psalm-suppress RedundantCondition */ - protected static function doDecode(string $src, bool $upper = \false, bool $strictPadding = \false) : string + protected static function doDecode( + #[\SensitiveParameter] + string $src, + bool $upper = \false, + bool $strictPadding = \false + ) : string { // We do this to reduce code duplication: $method = $upper ? 'decode5BitsUpper' : 'decode5Bits'; @@ -349,7 +377,12 @@ abstract class Base32 implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Encod * @return string * @throws TypeError */ - protected static function doEncode(string $src, bool $upper = \false, $pad = \true) : string + protected static function doEncode( + #[\SensitiveParameter] + string $src, + bool $upper = \false, + $pad = \true + ) : string { // We do this to reduce code duplication: $method = $upper ? 'encode5BitsUpper' : 'encode5Bits'; diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Base64.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Base64.php index f2ee3d2e..5e6e4c36 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Base64.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Base64.php @@ -46,7 +46,10 @@ abstract class Base64 implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Encod * * @throws TypeError */ - public static function encode(string $binString) : string + public static function encode( + #[\SensitiveParameter] + string $binString + ) : string { return static::doEncode($binString, \true); } @@ -60,7 +63,10 @@ abstract class Base64 implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Encod * * @throws TypeError */ - public static function encodeUnpadded(string $src) : string + public static function encodeUnpadded( + #[\SensitiveParameter] + string $src + ) : string { return static::doEncode($src, \false); } @@ -71,7 +77,11 @@ abstract class Base64 implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Encod * * @throws TypeError */ - protected static function doEncode(string $src, bool $pad = \true) : string + protected static function doEncode( + #[\SensitiveParameter] + string $src, + bool $pad = \true + ) : string { $dest = ''; $srcLen = \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Binary::safeStrlen($src); @@ -115,9 +125,12 @@ abstract class Base64 implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Encod * * @throws RangeException * @throws TypeError - * @psalm-suppress RedundantCondition */ - public static function decode(string $encodedString, bool $strictPadding = \false) : string + public static function decode( + #[\SensitiveParameter] + string $encodedString, + bool $strictPadding = \false + ) : string { // Remove padding $srcLen = \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Binary::safeStrlen($encodedString); @@ -190,21 +203,20 @@ abstract class Base64 implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Encod * @param string $encodedString * @return string */ - public static function decodeNoPadding(string $encodedString) : string + public static function decodeNoPadding( + #[\SensitiveParameter] + string $encodedString + ) : string { $srcLen = \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Binary::safeStrlen($encodedString); if ($srcLen === 0) { return ''; } if (($srcLen & 3) === 0) { - if ($encodedString[$srcLen - 1] === '=') { + // If $strLen is not zero, and it is divisible by 4, then it's at least 4. + if ($encodedString[$srcLen - 1] === '=' || $encodedString[$srcLen - 2] === '=') { throw new \InvalidArgumentException("decodeNoPadding() doesn't tolerate padding"); } - if (($srcLen & 3) > 1) { - if ($encodedString[$srcLen - 2] === '=') { - throw new \InvalidArgumentException("decodeNoPadding() doesn't tolerate padding"); - } - } } return static::decode($encodedString, \true); } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Binary.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Binary.php index 9d8eb126..624b330e 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Binary.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Binary.php @@ -44,7 +44,10 @@ abstract class Binary * @param string $str * @return int */ - public static function safeStrlen(string $str) : int + public static function safeStrlen( + #[\SensitiveParameter] + string $str + ) : int { if (\function_exists('mb_strlen')) { // mb_strlen in PHP 7.x can return false. @@ -67,7 +70,12 @@ abstract class Binary * * @throws TypeError */ - public static function safeSubstr(string $str, int $start = 0, $length = null) : string + public static function safeSubstr( + #[\SensitiveParameter] + string $str, + int $start = 0, + $length = null + ) : string { if ($length === 0) { return ''; diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Encoding.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Encoding.php index e82a9165..a1c528e3 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Encoding.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Encoding.php @@ -39,7 +39,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32Encode(string $str) : string + public static function base32Encode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base32::encode($str); } @@ -50,7 +53,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32EncodeUpper(string $str) : string + public static function base32EncodeUpper( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base32::encodeUpper($str); } @@ -61,7 +67,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32Decode(string $str) : string + public static function base32Decode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base32::decode($str); } @@ -72,7 +81,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32DecodeUpper(string $str) : string + public static function base32DecodeUpper( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base32::decodeUpper($str); } @@ -83,7 +95,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32HexEncode(string $str) : string + public static function base32HexEncode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base32Hex::encode($str); } @@ -94,7 +109,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32HexEncodeUpper(string $str) : string + public static function base32HexEncodeUpper( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base32Hex::encodeUpper($str); } @@ -105,7 +123,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32HexDecode(string $str) : string + public static function base32HexDecode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base32Hex::decode($str); } @@ -116,7 +137,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32HexDecodeUpper(string $str) : string + public static function base32HexDecodeUpper( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base32Hex::decodeUpper($str); } @@ -127,7 +151,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base64Encode(string $str) : string + public static function base64Encode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base64::encode($str); } @@ -138,7 +165,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base64Decode(string $str) : string + public static function base64Decode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base64::decode($str); } @@ -150,7 +180,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base64EncodeDotSlash(string $str) : string + public static function base64EncodeDotSlash( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base64DotSlash::encode($str); } @@ -164,7 +197,10 @@ abstract class Encoding * @throws \RangeException * @throws TypeError */ - public static function base64DecodeDotSlash(string $str) : string + public static function base64DecodeDotSlash( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base64DotSlash::decode($str); } @@ -176,7 +212,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base64EncodeDotSlashOrdered(string $str) : string + public static function base64EncodeDotSlashOrdered( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base64DotSlashOrdered::encode($str); } @@ -190,7 +229,10 @@ abstract class Encoding * @throws \RangeException * @throws TypeError */ - public static function base64DecodeDotSlashOrdered(string $str) : string + public static function base64DecodeDotSlashOrdered( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base64DotSlashOrdered::decode($str); } @@ -202,7 +244,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function hexEncode(string $bin_string) : string + public static function hexEncode( + #[\SensitiveParameter] + string $bin_string + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Hex::encode($bin_string); } @@ -214,7 +259,10 @@ abstract class Encoding * @return string (raw binary) * @throws \RangeException */ - public static function hexDecode(string $hex_string) : string + public static function hexDecode( + #[\SensitiveParameter] + string $hex_string + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Hex::decode($hex_string); } @@ -226,7 +274,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function hexEncodeUpper(string $bin_string) : string + public static function hexEncodeUpper( + #[\SensitiveParameter] + string $bin_string + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Hex::encodeUpper($bin_string); } @@ -237,7 +288,10 @@ abstract class Encoding * @param string $bin_string (raw binary) * @return string */ - public static function hexDecodeUpper(string $bin_string) : string + public static function hexDecodeUpper( + #[\SensitiveParameter] + string $bin_string + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Hex::decode($bin_string); } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Hex.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Hex.php index c64ae246..52b55ccf 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Hex.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/Hex.php @@ -41,7 +41,10 @@ abstract class Hex implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\EncoderI * @return string * @throws TypeError */ - public static function encode(string $binString) : string + public static function encode( + #[\SensitiveParameter] + string $binString + ) : string { $hex = ''; $len = \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Binary::safeStrlen($binString); @@ -62,7 +65,10 @@ abstract class Hex implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\EncoderI * @return string * @throws TypeError */ - public static function encodeUpper(string $binString) : string + public static function encodeUpper( + #[\SensitiveParameter] + string $binString + ) : string { $hex = ''; $len = \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Binary::safeStrlen($binString); @@ -84,7 +90,11 @@ abstract class Hex implements \WPMailSMTP\Vendor\ParagonIE\ConstantTime\EncoderI * @return string (raw binary) * @throws RangeException */ - public static function decode(string $encodedString, bool $strictPadding = \false) : string + public static function decode( + #[\SensitiveParameter] + string $encodedString, + bool $strictPadding = \false + ) : string { $hex_pos = 0; $bin = ''; diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/RFC4648.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/RFC4648.php index 431fde31..ef4fcc4b 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/RFC4648.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/paragonie/constant_time_encoding/src/RFC4648.php @@ -45,7 +45,10 @@ abstract class RFC4648 * * @throws TypeError */ - public static function base64Encode(string $str) : string + public static function base64Encode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base64::encode($str); } @@ -59,7 +62,10 @@ abstract class RFC4648 * * @throws TypeError */ - public static function base64Decode(string $str) : string + public static function base64Decode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base64::decode($str, \true); } @@ -73,7 +79,10 @@ abstract class RFC4648 * * @throws TypeError */ - public static function base64UrlSafeEncode(string $str) : string + public static function base64UrlSafeEncode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base64UrlSafe::encode($str); } @@ -87,7 +96,10 @@ abstract class RFC4648 * * @throws TypeError */ - public static function base64UrlSafeDecode(string $str) : string + public static function base64UrlSafeDecode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base64UrlSafe::decode($str, \true); } @@ -101,7 +113,10 @@ abstract class RFC4648 * * @throws TypeError */ - public static function base32Encode(string $str) : string + public static function base32Encode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base32::encodeUpper($str); } @@ -115,7 +130,10 @@ abstract class RFC4648 * * @throws TypeError */ - public static function base32Decode(string $str) : string + public static function base32Decode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base32::decodeUpper($str, \true); } @@ -129,7 +147,10 @@ abstract class RFC4648 * * @throws TypeError */ - public static function base32HexEncode(string $str) : string + public static function base32HexEncode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base32::encodeUpper($str); } @@ -143,7 +164,10 @@ abstract class RFC4648 * * @throws TypeError */ - public static function base32HexDecode(string $str) : string + public static function base32HexDecode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Base32::decodeUpper($str, \true); } @@ -157,7 +181,10 @@ abstract class RFC4648 * * @throws TypeError */ - public static function base16Encode(string $str) : string + public static function base16Encode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Hex::encodeUpper($str); } @@ -169,7 +196,10 @@ abstract class RFC4648 * @param string $str * @return string */ - public static function base16Decode(string $str) : string + public static function base16Decode( + #[\SensitiveParameter] + string $str + ) : string { return \WPMailSMTP\Vendor\ParagonIE\ConstantTime\Hex::decode($str, \true); } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/symfony/deprecation-contracts/function.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/symfony/deprecation-contracts/function.php index 015893eb..d4371504 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/symfony/deprecation-contracts/function.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/symfony/deprecation-contracts/function.php @@ -1,7 +1,5 @@ */ - function trigger_deprecation(string $package, string $version, string $message, ...$args) : void + function trigger_deprecation(string $package, string $version, string $message, ...$args): void { - @\trigger_error(($package || $version ? "Since {$package} {$version}: " : '') . ($args ? \vsprintf($message, $args) : $message), \E_USER_DEPRECATED); + @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); } } diff --git a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/symfony/polyfill-intl-idn/bootstrap80.php b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/symfony/polyfill-intl-idn/bootstrap80.php index 15697236..40cba8b2 100644 --- a/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/symfony/polyfill-intl-idn/bootstrap80.php +++ b/wp/wp-content/plugins/wp-mail-smtp/vendor_prefixed/symfony/polyfill-intl-idn/bootstrap80.php @@ -1,7 +1,5 @@