diff --git a/gruntfile.js b/gruntfile.js index 7ca71c66..f49873b5 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -1,116 +1,125 @@ -module.exports = function( grunt ) { +module.exports = function (grunt) { + var pkg = grunt.file.readJSON("package.json"); - var pkg = grunt.file.readJSON( 'package.json' ); + console.log(pkg.title + " - " + pkg.version); - console.log( pkg.title + ' - ' + pkg.version ); + // Set files to include/exclude in a release. + var distFiles = [ + "**", + "!bower_components/**", + "!build/**", + "!node_modules/**", + "!vendor/bin/**", + "!wordpress_org_assets/**", + "!.editorconfig", + "!.gitignore", + "!.jshintrc", + "!bower.json", + "!composer.json", + "!composer.lock", + "!contributing.md", + "!gruntfile.js", + "!package.json", + "!package-lock.json", + "!readme.md", + "!**/*~", + ]; - // Set files to include/exclude in a release. - var distFiles = [ - '**', - '!bower_components/**', - '!build/**', - '!node_modules/**', - '!vendor/bin/**', - '!wordpress_org_assets/**', - '!.editorconfig', - '!.gitignore', - '!.jshintrc', - '!bower.json', - '!composer.json', - '!composer.lock', - '!contributing.md', - '!gruntfile.js', - '!package.json', - '!package-lock.json', - '!readme.md', - '!**/*~' - ]; + grunt.initConfig({ + pkg: pkg, - grunt.initConfig( { + // Validates text domain. + sed: { + textDomain: { + pattern: '"simple-pay"', + replacement: '"stripe"', + recursive: true, + path: "includes/core/assets/js/dist", + }, + }, - pkg: pkg, + checktextdomain: { + options: { + text_domain: "stripe", + correct_domain: true, + keywords: [ + "__:1,2d", + "_e:1,2d", + "_x:1,2c,3d", + "esc_html__:1,2d", + "esc_html_e:1,2d", + "esc_html_x:1,2c,3d", + "esc_attr__:1,2d", + "esc_attr_e:1,2d", + "esc_attr_x:1,2c,3d", + "_ex:1,2c,3d", + "_n:1,2,4d", + "_nx:1,2,4c,5d", + "_n_noop:1,2,3d", + "_nx_noop:1,2,3c,4d", + ], + }, + files: { + src: [ + "includes/**/*.php", + "includes/core/assets/js/dist/**.js", + "views/**/*.php", + "src/**/*.php", + "stripe-checkout.php", + "uninstall.php", + ], + expand: true, + }, + }, - // Validates text domain. - checktextdomain: { - options: { - text_domain: 'stripe', - correct_domain: true, - keywords: [ - '__:1,2d', - '_e:1,2d', - '_x:1,2c,3d', - 'esc_html__:1,2d', - 'esc_html_e:1,2d', - 'esc_html_x:1,2c,3d', - 'esc_attr__:1,2d', - 'esc_attr_e:1,2d', - 'esc_attr_x:1,2c,3d', - '_ex:1,2c,3d', - '_n:1,2,4d', - '_nx:1,2,4c,5d', - '_n_noop:1,2,3d', - '_nx_noop:1,2,3c,4d' - ] - }, - files: { - src: [ - 'includes/**/*.php', - 'views/**/*.php', - 'src/**/*.php', - 'stripe-checkout.php', - 'uninstall.php' - ], - expand: true - } - }, + // Adds/adjusts text domains. + addtextdomain: { + options: { + textdomain: "stripe", + }, + target: { + files: { + src: ["includes/**/*.php", "stripe-checkout.php", "uninstall.php"], + }, + }, + }, - // Adds/adjusts text domains. - addtextdomain: { - options: { - textdomain: 'stripe' - }, - target: { - files: { - src: [ - 'includes/**/*.php', - 'stripe-checkout.php', - 'uninstall.php' - ] - } - } - }, + // Wipe out build folder. + clean: { + build: ["build"], + }, - // Wipe out build folder. - clean: { - build: [ 'build' ] - }, + // Build the plugin zip file and place in build folder. + compress: { + main: { + options: { + mode: "zip", + archive: "./build/stripe-<%= pkg.version %>.zip", + }, + expand: true, + src: distFiles, + dest: "/stripe", + }, + }, - // Build the plugin zip file and place in build folder. - compress: { - main: { - options: { - mode: 'zip', - archive: './build/stripe-<%= pkg.version %>.zip' - }, - expand: true, - src: distFiles, - dest: '/stripe' - } - }, + // Copy files to build folder. + copy: { + main: { + expand: true, + src: distFiles, + dest: "build/stripe", + }, + }, + }); - // Copy files to build folder. - copy: { - main: { - expand: true, - src: distFiles, - dest: 'build/stripe' - } - }, - } ); + require("load-grunt-tasks")(grunt); - require( 'load-grunt-tasks' )( grunt ); + grunt.registerTask("build", [ + "checktextdomain", + "clean:build", + "copy:main", + "compress", + ]); - grunt.registerTask( 'build', [ 'checktextdomain', 'clean:build', 'copy:main', 'compress' ] ); - - grunt.util.linefeed = '\n'; + grunt.util.linefeed = "\n"; }; diff --git a/includes/core/admin/class-assets.php b/includes/core/admin/class-assets.php index be29f614..2010ea32 100644 --- a/includes/core/admin/class-assets.php +++ b/includes/core/admin/class-assets.php @@ -61,7 +61,7 @@ public function enqueue_on_all_admin_pages() { // Notices. wp_enqueue_script( 'simpay-notices', - SIMPLE_PAY_INC_URL . 'core/assets/js/simpay-admin-notices.min.js', + SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-admin-notices.js', array( 'wp-util', 'jquery' ), SIMPLE_PAY_VERSION, true @@ -86,14 +86,15 @@ public function setup() { 'footer' => false, ), 'simpay-shared' => array( - 'src' => SIMPLE_PAY_INC_URL . 'core/assets/js/simpay-public-shared.min.js', + 'src' => SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-public-shared.js', 'deps' => array( 'jquery', 'simpay-accounting' ), 'ver' => SIMPLE_PAY_VERSION, 'footer' => false, ), 'simpay-admin' => array( - 'src' => SIMPLE_PAY_INC_URL . 'core/assets/js/simpay-admin.min.js', + 'src' => SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-admin.js', 'deps' => array( + 'common', 'jquery', 'simpay-chosen', 'simpay-accounting', @@ -181,80 +182,81 @@ public function register() { 'minAmount' => simpay_global_minimum_amount(), 'isUpe' => simpay_is_upe(), 'i18n' => array( - 'dateFormat' => simpay_get_date_format(), - 'mediaTitle' => esc_html__( + 'dateFormat' => simpay_get_date_format(), + 'mediaTitle' => esc_html__( 'Insert Media', 'stripe' ), - 'mediaButtonText' => esc_html__( + 'mediaButtonText' => esc_html__( 'Use Image', 'stripe' ), - 'leavePageConfirm' => esc_html__( + 'leavePageConfirm' => esc_html__( 'The changes you made will be lost if you navigate away from this page.', 'stripe' ), - 'disconnectConfirm' => esc_html__( + 'disconnectConfirm' => esc_html__( 'Disconnect', 'stripe' ), - 'disconnectCancel' => esc_html__( + 'disconnectCancel' => esc_html__( 'Cancel', 'stripe' ), - 'addonActivate' => esc_html__( + 'addonActivate' => esc_html__( 'Activate', 'stripe' ), - 'addonActivated' => esc_html__( + 'addonActivated' => esc_html__( 'Activated', 'stripe' ), - 'addonActive' => esc_html__( + 'addonActive' => esc_html__( 'Active', 'stripe' ), - 'addonDeactivate' => esc_html__( + 'addonDeactivate' => esc_html__( 'Deactivate', 'stripe' ), - 'addonInactive' => esc_html__( + 'addonInactive' => esc_html__( 'Inactive', 'stripe' ), - 'addonInstall' => esc_html__( + 'addonInstall' => esc_html__( 'Install Addon', 'stripe' ), - 'addonError' => esc_html__( + 'addonError' => esc_html__( 'Could not install the addon. Please download it from wpforms.com and install it manually.', 'stripe' ), - 'pluginError' => esc_html__( + 'pluginError' => esc_html__( 'Could not install the plugin automatically. Please download and install it manually.', 'stripe' ), - 'pluginInstallActivate' => esc_html__( + 'pluginInstallActivate' => esc_html__( 'Install and Activate', 'stripe' ), - 'pluginActivate' => esc_html__( + 'pluginActivate' => esc_html__( 'Activate', 'stripe' ), - 'trashFormConfirm' => esc_html__( + 'trashFormConfirm' => esc_html__( 'Warning: Removing a payment form will prevent active subscriptions from sending upcoming invoice and invoice receipt emails. It is recommended to leave payment forms that have accepted Live Mode payments published.', 'stripe' ), - /* translators: Minimum payment amount. */ - 'customAmountLabel' => esc_html__( 'starting at %s', 'stripe' ), - 'recurringIntervals' => simpay_get_recurring_intervals(), + /* translators: %s: Minimum payment amount. */ + 'customAmountLabel' => esc_html__( 'starting at %s', 'stripe' ), + 'recurringIntervals' => simpay_get_recurring_intervals(), /* translators: %1$s Recurring amount. %2$s Recurring interval count. %3$s Recurring interval. */ 'recurringIntervalDisplay' => esc_html_x( '%1$s every %2$s %3$s', 'recurring interval', 'stripe' ), + ), ) ); diff --git a/includes/core/assets/css/admin/settings.scss b/includes/core/assets/css/admin/settings.scss index e71fc516..d0b07e54 100644 --- a/includes/core/assets/css/admin/settings.scss +++ b/includes/core/assets/css/admin/settings.scss @@ -188,6 +188,7 @@ &.simpay-settings-subsection-payment-confirmation, &.simpay-settings-subsection-payment-notification, &.simpay-settings-subsection-upcoming-invoice, + &.simpay-settings-subsection-manage-subscriptions, &.simpay-settings-subsection-invoice-confirmation { display: none; } diff --git a/includes/core/assets/css/simpay-admin.min.css b/includes/core/assets/css/simpay-admin.min.css index 23ca52f3..a92fba0f 100644 --- a/includes/core/assets/css/simpay-admin.min.css +++ b/includes/core/assets/css/simpay-admin.min.css @@ -1 +1 @@ -.simpay-settings-subsections{display:flex;align-items:center;box-shadow:inset 0 -1px 0 0 #ccc}.simpay-settings-subsections__subsection{font-weight:500;text-decoration:none;padding:15px;display:flex;align-items:center}.simpay-settings-subsections__subsection .dashicons{width:18px;height:18px;font-size:18px;margin-right:4px}.simpay-settings-subsections__subsection.is-active{box-shadow:inset 0 -4px 0 0 currentColor;position:relative;z-index:1}.simpay-settings-subsections__subsection:not(.is-active){color:#23282d}.simpay-settings form>h2:not(.nav-tab-wrapper){clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute !important;width:1px}.simpay-settings .form-table td fieldset+p,.simpay-settings .form-table td label+p,.simpay-settings .form-table td select+p,.simpay-settings .form-table td input+p{color:#666;font-style:italic}.simpay-settings .simpay-settings-subsections__subsection{display:flex;align-items:center}.simpay-settings .simpay-settings-subsections__subsection .simpay-settings-bubble{margin-left:5px}.simpay-settings .simpay-settings-visual-toggles{margin:30px 0 0;display:flex}.simpay-settings .simpay-settings-visual-toggles input[type=radio]{display:none}.simpay-settings .simpay-settings-visual-toggles__toggle{-webkit-user-select:none;-moz-user-select:none;user-select:none;min-width:180px;margin:0 30px 0 0 !important;position:relative;display:block;background-color:#fff;border-radius:4px;border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04)}.simpay-settings .simpay-settings-visual-toggles__toggle:hover{border:1px solid #999;box-shadow:0 1px 2px rgba(0,0,0,.1)}.simpay-settings .simpay-settings-visual-toggles input[type=radio]:checked+.simpay-settings-visual-toggles__toggle{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px #007cba;box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.simpay-settings .simpay-settings-visual-toggles__toggle-recommended,.simpay-settings .simpay-settings-visual-toggles__toggle-not-recommended{text-align:center;font-size:12px;text-transform:uppercase;font-weight:bold;margin:0;padding:5px 0;display:block;border-top-right-radius:4px;border-top-left-radius:4px}.simpay-settings .simpay-settings-visual-toggles__toggle-recommended{color:#0f8569;background:#f4f9f7}.simpay-settings .simpay-settings-visual-toggles__toggle-not-recommended{color:#b91c1b;background:#fef2f2}.simpay-settings .simpay-settings-visual-toggles__toggle-icon{margin:20px auto 15px;padding:0 15px;display:block}.simpay-settings .simpay-settings-visual-toggles__toggle-label{line-height:1.5;text-align:center;font-size:16px;font-weight:500;margin:15px;display:block}.simpay-settings .simpay-settings-visual-toggles__toggle-label small{color:#666;font-weight:normal;font-size:13px;line-height:1;display:block;margin:4px 0}.simpay-settings .simpay-settings-visual-toggles.simpay-settings-captcha-type .simpay-settings-visual-toggles__toggle{min-height:160px}.simpay-settings .simpay-settings-visual-toggles.simpay-settings-captcha-type .simpay-settings-visual-toggles__toggle-icon{width:80px;height:80px}.simpay-settings .simpay-settings-visual-toggles.simpay-settings-captcha-type input[type=radio].simpay-settings-captcha-type--is-recommended:checked+.simpay-settings-visual-toggles__toggle{border-color:#0f8569;box-shadow:0 0 0 1px #0f8569}.simpay-settings .simpay-settings-visual-toggles.simpay-settings-captcha-type input[type=radio].simpay-settings-captcha-type--is-not-recommended:checked+.simpay-settings-visual-toggles__toggle{border-color:#b91c1b;box-shadow:0 0 0 1px #b91c1b}.simpay-settings .simpay-settings-visual-toggles.simpay-settings-captcha-type label[for=simpay-settings-captcha-type-cloudflare-turnstile] .simpay-settings-visual-toggles__toggle-icon{width:120px}.simpay-settings-general-recaptcha-no_captcha_warning th,.simpay-settings-general-recaptcha-no_captcha_warning td,.simpay-settings-hcaptcha_secret_key th,.simpay-settings-hcaptcha_secret_key td,.simpay-settings-cloudflare_turnstile_secret_key th,.simpay-settings-cloudflare_turnstile_secret_key td,.simpay-settings-recaptcha_score_threshold th,.simpay-settings-recaptcha_score_threshold td{padding-bottom:50px !important}.simpay-settings .simpay-settings-subsections__subsection.simpay-settings-subsection-summary-report,.simpay-settings .simpay-settings-subsections__subsection.simpay-settings-subsection-payment-confirmation,.simpay-settings .simpay-settings-subsections__subsection.simpay-settings-subsection-payment-notification,.simpay-settings .simpay-settings-subsections__subsection.simpay-settings-subsection-upcoming-invoice,.simpay-settings .simpay-settings-subsections__subsection.simpay-settings-subsection-invoice-confirmation{display:none}.simpay-settings .simpay-settings-subsection-emails-tools{margin-left:auto}.simpay-admin-charts-period-over-period{position:relative;padding-bottom:12px}.simpay-admin-charts-period-over-period *{box-sizing:border-box}.simpay-admin-charts-period-over-period__tooltip{position:absolute;background:#fff;border:1px solid #c3c3c3;box-shadow:0 2px 6px rgba(0,0,0,.05);border-radius:2px;padding:10px 14px;display:flex;flex-direction:column;z-Index:10000;min-width:175px}.simpay-admin-charts-period-over-period__tooltip-data{white-space:nowrap;margin-bottom:8px;display:grid;grid-template-columns:1fr auto;grid-auto-rows:auto;-moz-column-gap:16px;column-gap:16px}.simpay-admin-charts-period-over-period__tooltip-data:last-child{margin-bottom:0}.simpay-admin-charts-period-over-period__tooltip-data[data-dataset="1"]{opacity:.65}.simpay-admin-charts-period-over-period__tooltip-data em{font-style:normal;text-align:right}.simpay-admin-charts-period-over-period__tooltip-delta{font-size:12px;margin:0 -14px -10px;padding:8px 14px;border-top:1px solid #eee;background:#fdfdfd;border-radius:2px;display:flex;align-items:center;justify-content:center}.simpay-admin-charts-period-over-period__tooltip-delta .simpay-admin-charts-badge{margin-right:4px}.simpay-admin-charts-period-over-period__tooltip-delta strong.is-positive{color:#006908}.simpay-admin-charts-period-over-period__tooltip-delta strong.is-negative{color:#b3093c}.simpay-admin-charts-badge{color:#2f2f2f;font-size:12px;font-weight:500;font-style:normal;line-height:1;padding:3px 6px;display:inline-flex;align-items:center;background:#f0f0f0;border-radius:100px}.simpay-admin-charts-badge.is-positive{color:#006908;background-color:#d7f7c2}.simpay-admin-charts-badge.is-negative{color:#b3093c;background-color:#ffe7f2}.simpay-admin-charts-badge__icon{width:15px;height:15px}.simpay-admin-charts-no-data{position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;background:rgba(255,255,255,.5);z-index:2}.simpay-admin-charts-no-data>div{text-align:center;padding:24px;background:#fff;border:1px solid #c3c3c3;box-shadow:0 2px 6px rgba(0,0,0,.1);border-radius:2px;max-width:60%}.simpay-admin-charts-no-data strong{font-size:15px;margin-bottom:8px;display:block}.button.button-large.simpay-button-large{font-size:14px;line-height:30px;padding:4px 12px}.simpay-copy-hidden-input{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.fixed .column-livemode{width:15%;text-align:right}@media screen and (max-width: 782px){.fixed .column-livemode{text-align:left}}.fixed .column-livemode .simpay-badge{margin-top:3px}.fixed .column-shortcode{width:25%}.fixed .column-shortcode .simpay-shortcode{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.post-type-simple-pay .misc-pub-curtime,.post-type-simple-pay .misc-pub-visibility{display:none}.simpay-metabox-title{border:1px solid #eee}.simpay-shortcode-section{border-top:1px solid #ddd;border-width:1px 0;padding-top:15px;padding-bottom:15px;position:relative}.simpay-shortcode-section label{display:block;margin-bottom:6px}.simpay-shortcode-section label .dashicons{color:#8c8f94;margin-right:3px}.simpay-shortcode-section .simpay-copy-button{line-height:normal;position:absolute;right:20px;bottom:20px;border:0;background:none;box-shadow:none;padding:0}.simpay-shortcode-section .simpay-copy-button:hover{border:0;background:none;box-shadow:none}.simpay-shortcode-section .simpay-copy-button .dashicons{color:#3c434a}.simpay-shortcode{width:100%;padding:8px;line-height:1;margin:0;height:32px;resize:none}.simpay-badge{color:#3f3f46;text-align:center;line-height:1;padding:5px 7px;border-radius:3px;background:#e4e4e7;border:0;box-shadow:none;display:inline-flex;align-items:center}button.simpay-badge{cursor:pointer}button.simpay-badge:hover{background:#d4d4d8}.simpay-badge__icon{opacity:.8;margin:2px 5px 0 0}.simpay-badge--green{color:#0e6245;background:#cbf4c9}.simpay-badge--yellow{color:#983705;background:#f8e5b9}.simpay-stripe-account-info{display:flex;align-items:center;margin-bottom:8px;position:relative}.simpay-stripe-account-info .spinner{float:none;margin-top:0;margin-left:0}.simple-pay_page_simpay_settings .simpay-settings-upgrade,.post-type-simple-pay .simpay-settings-upgrade{margin-top:20px;padding:1px;position:relative;background:#fff;border-radius:4px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2),0 5px 10px rgba(0,0,0,.1);max-width:677px}.simple-pay_page_simpay_settings .simpay-settings-upgrade__inner,.post-type-simple-pay .simpay-settings-upgrade__inner{text-align:center;margin:0;padding:30px}.simple-pay_page_simpay_settings .simpay-settings-upgrade h3,.post-type-simple-pay .simpay-settings-upgrade h3{line-height:1.5;font-size:22px;margin:0 0 1.5rem}.simple-pay_page_simpay_settings .simpay-settings-upgrade ul,.post-type-simple-pay .simpay-settings-upgrade ul{margin:1.5rem 0 calc(1.5rem - 6px);display:flex;flex-wrap:wrap;justify-content:center}@media screen and (min-width: 782px){.simple-pay_page_simpay_settings .simpay-settings-upgrade ul,.post-type-simple-pay .simpay-settings-upgrade ul{margin-left:4rem;margin-right:4rem}}.simple-pay_page_simpay_settings .simpay-settings-upgrade li,.post-type-simple-pay .simpay-settings-upgrade li{font-size:15px;margin:6px 0;width:100%}.simple-pay_page_simpay_settings .simpay-settings-upgrade li a,.post-type-simple-pay .simpay-settings-upgrade li a{color:#3c434a;text-decoration:none}.simple-pay_page_simpay_settings .simpay-settings-upgrade li a:hover,.post-type-simple-pay .simpay-settings-upgrade li a:hover{color:var(--wp-admin-theme-color);text-decoration:underline}@media screen and (min-width: 782px){.simple-pay_page_simpay_settings .simpay-settings-upgrade li,.post-type-simple-pay .simpay-settings-upgrade li{text-align:left;width:50%}}.simple-pay_page_simpay_settings .simpay-settings-upgrade .button.button-large,.post-type-simple-pay .simpay-settings-upgrade .button.button-large{font-size:17px;line-height:30px;padding:10px 20px}.simple-pay_page_simpay_settings .simpay-settings-upgrade small,.post-type-simple-pay .simpay-settings-upgrade small{color:#666;margin:15px 0 0;display:block}.simple-pay_page_simpay_settings .simpay-settings-upgrade .dashicons-yes,.post-type-simple-pay .simpay-settings-upgrade .dashicons-yes{color:#428bca}.simple-pay_page_simpay_settings .simpay-settings-upgrade .button-link,.post-type-simple-pay .simpay-settings-upgrade .button-link{position:absolute;top:0;right:0;font-size:20px;color:#666;font-weight:bold;text-decoration:none;margin-left:5px;padding:6px 10px;z-index:2}.simple-pay_page_simpay_settings .simpay-settings-upgrade .button-link:hover,.simple-pay_page_simpay_settings .simpay-settings-upgrade .button-link:active,.simple-pay_page_simpay_settings .simpay-settings-upgrade .button-link:focus,.post-type-simple-pay .simpay-settings-upgrade .button-link:hover,.post-type-simple-pay .simpay-settings-upgrade .button-link:active,.post-type-simple-pay .simpay-settings-upgrade .button-link:focus{color:#666;text-decoration:none}.simple-pay_page_simpay_settings .simpay-settings-upgrade .simpay-upgrade-btn-subtext,.post-type-simple-pay .simpay-settings-upgrade .simpay-upgrade-btn-subtext{text-align:center;margin:0;padding:30px 20px 20px;background-color:#fcf9e8;border:1px solid #edeac9;border-width:1px 0 0;position:relative;border-radius:0;border-bottom-left-radius:4px;border-bottom-right-radius:4px}@media screen and (min-width: 782px){.simple-pay_page_simpay_settings .simpay-settings-upgrade .simpay-upgrade-btn-subtext,.post-type-simple-pay .simpay-settings-upgrade .simpay-upgrade-btn-subtext{padding-left:4rem;padding-right:4rem}}.simple-pay_page_simpay_settings .simpay-settings-upgrade .simpay-upgrade-btn-subtext svg,.post-type-simple-pay .simpay-settings-upgrade .simpay-upgrade-btn-subtext svg{background:#00a32a;fill:#fff;border-radius:50%;border:4px solid #fff;box-shadow:0 0 0 1px #edeac9;width:28px;height:28px;position:absolute;top:-18px;left:50%;margin-left:-18px}.simple-pay_page_simpay_settings .simpay-settings-upgrade .simpay-upgrade-btn-subtext u,.post-type-simple-pay .simpay-settings-upgrade .simpay-upgrade-btn-subtext u{text-decoration:none;font-weight:bold;color:#00a32a}.simple-pay_page_simpay_settings .simpay-settings-upgrade .simpay-upgrade-btn-subtext a,.post-type-simple-pay .simpay-settings-upgrade .simpay-upgrade-btn-subtext a{font-weight:normal;display:inline-block}#simpay-payment-form-settings table{width:100%;border-collapse:collapse}#simpay-payment-form-settings ::-webkit-input-placeholder{color:#9ba1a9}#simpay-payment-form-settings ::-moz-placeholder{color:#9ba1a9;opacity:1}#simpay-payment-form-settings :-ms-input-placeholder{color:#9ba1a9}#simpay-payment-form-settings .inside{margin:0;padding:0}#simpay-payment-form-settings .simpay-panel-field .toolbar{margin-bottom:-4px}#simpay-payment-form-settings .simpay-panel-field .toolbar .simpay-field-select{margin:0 0 4px;width:auto;max-width:70%}#simpay-payment-form-settings .simpay-tabs{margin:0;padding:0;list-style:none;background:#fafafa;border-right:1px solid #ccd0d4;line-height:1em;position:relative;flex:0 0 25%}@media screen and (max-width: 782px){#simpay-payment-form-settings .simpay-tabs{flex-basis:100%;flex-grow:1;border-right:0}}#simpay-payment-form-settings .simpay-tabs li{margin:0;padding:0}#simpay-payment-form-settings .simpay-tabs li:first-child{margin-top:12px}#simpay-payment-form-settings .simpay-tabs li:last-child{margin-bottom:20px}@media screen and (max-width: 782px){#simpay-payment-form-settings .simpay-tabs li:last-child{margin-bottom:0}}#simpay-payment-form-settings .simpay-tabs li.active{margin-left:-1px;box-shadow:0 1px 1px rgba(0,0,0,.04);position:relative}#simpay-payment-form-settings .simpay-tabs li.active:focus:after{display:none}#simpay-payment-form-settings .simpay-tabs li.active:before,#simpay-payment-form-settings .simpay-tabs li.active:after{content:"";width:calc(100% + 1px);height:1px;background:#ccd0d4;position:absolute;top:0;left:0;right:0;z-index:2}#simpay-payment-form-settings .simpay-tabs li.active:after{top:auto;bottom:0}#simpay-payment-form-settings .simpay-tabs li.active a{font-weight:bold;background-color:#fff;position:relative;margin-right:-1px}#simpay-payment-form-settings .simpay-tabs li.active a:before{content:"";position:absolute;top:0;left:0;bottom:0;width:4px;height:100%;background:currentColor;z-index:3}@media screen and (max-width: 782px){#simpay-payment-form-settings .simpay-tabs li.active a{margin-right:0}}#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item{display:flex;align-items:center;line-height:20px;margin:0;padding:8px 10px 8px 14px;text-decoration:none;transition:all .05s ease-in-out}#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item svg,#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item .dashicons{margin-right:6px}@media screen and (max-width: 782px){#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item{padding:18px}}#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item:focus{outline:0;position:relative;z-index:3;box-shadow:inset 0 0 0 1px currentColor,0 0 0 1px currentColor}#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item[href="#purchase-restrictions-settings-panel"],#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item[href="#payment-page-settings-panel"]{margin-bottom:20px;position:relative}#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item[href="#purchase-restrictions-settings-panel"]:after,#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item[href="#payment-page-settings-panel"]:after{content:"";position:absolute;left:14px;right:14px;bottom:-10px;width:calc(100% - 28px);height:1px;background:#eaeaea}#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item span>span{color:#f18500;font-size:12px;font-weight:600;margin:0 0 0 5px;display:inline-block}#simpay-payment-form-settings .simpay-tabs li:not(.active) .simpay-tab-item{color:inherit}#simpay-payment-form-settings .simpay-panels-wrap{background:#fff;display:flex}@media screen and (max-width: 782px){#simpay-payment-form-settings .simpay-panels-wrap{flex-direction:column}}#simpay-payment-form-settings .simpay-panels{flex:0 0 75%;display:flex}@media screen and (min-width: 1400px){#simpay-payment-form-settings .simpay-panels{flex-basis:75%}}@media screen and (max-width: 782px){#simpay-payment-form-settings .simpay-panels{flex-basis:100%}}#simpay-payment-form-settings .simpay-panel,#simpay-payment-form-settings .simpay-panel-section{width:100%}#simpay-payment-form-settings .simpay-panel>table,#simpay-payment-form-settings .simpay-panel>table>tr,#simpay-payment-form-settings .simpay-panel>table>tbody,#simpay-payment-form-settings .simpay-panel>table>tbody>tr,#simpay-payment-form-settings .simpay-panel>table>thead,#simpay-payment-form-settings .simpay-panel>table>thead>tr{display:block;width:100%}#simpay-payment-form-settings .simpay-panel>table:last-child>tbody:last-child>tr:last-child>td{border-bottom:0}#simpay-payment-form-settings .simpay-panel-field--requires-upgrade{position:relative}#simpay-payment-form-settings .simpay-panel-field--requires-upgrade td>div{margin-right:80px}#simpay-payment-form-settings .simpay-panel-field--requires-upgrade td>div .button-small{position:absolute;top:calc(50% - 13px);right:18px}#simpay-payment-form-settings .simpay-panel-field,#simpay-payment-form-settings .simpay-panel-field>td,#simpay-payment-form-settings .simpay-panel-field>th{text-align:left;display:block}#simpay-payment-form-settings .simpay-panel-field>td,#simpay-payment-form-settings .simpay-panel-field>th{width:calc(100% - 36px);margin-left:18px;margin-right:18px}#simpay-payment-form-settings .simpay-panel-field th{font-weight:bold;padding-top:18px;padding-bottom:5px}#simpay-payment-form-settings .simpay-panel-field td{border-bottom:1px solid #ddd;padding-bottom:18px}#simpay-payment-form-settings .simpay-panel-field p.description{margin-top:4px}#simpay-payment-form-settings .simpay-panel-field p.description:last-of-type{margin-bottom:0}#simpay-payment-form-settings .simpay-panel-field .simpay-panel-field__nested{margin-top:18px}#simpay-payment-form-settings .simpay-panel-field .simpay-panel-field__nested label{font-weight:bold;display:block;margin-bottom:4px}#simpay-payment-form-settings .simpay-panel-field .simpay-field-select,#simpay-payment-form-settings .simpay-panel-field .simpay-field-text{min-width:75%;max-width:100%}@media screen and (max-width: 782px){#simpay-payment-form-settings .simpay-panel-field .simpay-field-select,#simpay-payment-form-settings .simpay-panel-field .simpay-field-text{min-width:0;width:100%}}#simpay-payment-form-settings .simpay-panel-field .simpay-field-textarea{width:100%;max-width:100%}#simpay-payment-form-settings .simpay-panel-field .notice:last-of-type{margin-bottom:0}#simpay-payment-form-settings .simpay-panel-field .error,#simpay-payment-form-settings .simpay-panel-field .simpay-important{color:#a94442;font-weight:normal}#simpay-payment-form-settings .simpay-panel-field .simpay-image-preview-wrap{position:relative;margin-top:12px}#simpay-payment-form-settings .simpay-panel-field .simpay-image-preview-wrap .simpay-remove-image-preview{position:absolute;top:-15px;left:-15px;cursor:pointer;background-color:#fff}#simpay-payment-form-settings .simpay-panel-field .simpay-image-preview-wrap .simpay-remove-image-preview::before{font-size:22px;line-height:26px}#simpay-payment-form-settings .simpay-panel-field .simpay-image-preview-wrap .simpay-image-preview{max-height:128px;max-width:128px;border:1px solid #ddd}#simpay-payment-form-settings .simpay-panel .simpay-promo-under-box{background-color:#f4f4f4;border:1px solid #e5e5e5;padding:18px;margin-top:18px;position:relative}#simpay-payment-form-settings .simpay-panel .simpay-promo-under-box__dismiss{color:inherit;text-decoration:none;position:absolute;top:8px;right:8px}#simpay-payment-form-settings .simpay-panel .simpay-promo-under-box__dismiss .dashicons-dismiss{font-size:16px;width:16px;height:16px}#simpay-payment-form-settings .simpay-panel .simpay-promo-under-box h3{font-size:18px;font-weight:600;margin:0;padding:0}#simpay-payment-form-settings .simpay-panel .simpay-promo-under-box p{font-size:14px}#simpay-payment-form-settings .simpay-panel .simpay-promo-under-box p:last-child{margin-bottom:0}#simpay-payment-form-settings .simpay-metabox-content{margin-bottom:-1px;background-color:#f5f5f5;border:1px solid #c3c4c7;border-width:1px 0;box-shadow:0 1px 1px rgba(0,0,0,.04);position:relative}#simpay-payment-form-settings .simpay-show-if,#simpay-payment-form-settings .simpay-panel-hidden{display:none}#simpay-payment-form-settings .simpay-payment-methods{border:1px solid #ccd0d4;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.04)}#simpay-payment-form-settings .simpay-panel-field-payment-method{display:block;border-top:1px solid #ccd0d4;padding:7px;box-sizing:border-box}#simpay-payment-form-settings .simpay-panel-field-payment-method:first-child{border-top:0;border-top-left-radius:4px;border-top-right-radius:4px}#simpay-payment-form-settings .simpay-panel-field-payment-method__enable{display:flex;align-items:center}#simpay-payment-form-settings .simpay-panel-field-payment-method__enable input[type=checkbox]{margin-top:0;margin-right:8px}#simpay-payment-form-settings .simpay-panel-field-payment-method__help{text-decoration:none}#simpay-payment-form-settings .simpay-panel-field-payment-method__help .dashicons{font-size:18px;width:18px;height:18px}#simpay-payment-form-settings .simpay-panel-field-payment-method__restrictions,#simpay-payment-form-settings .simpay-panel-field-payment-method__restrictions-ach{margin-left:72px}#simpay-payment-form-settings .simpay-panel-field-payment-method__icon{border-radius:3px;overflow:hidden;margin:0 8px 0 5px;width:30px;height:30px;flex-shrink:0}#simpay-payment-form-settings .simpay-panel-field-payment-method__icon svg{width:30px;height:30px}#simpay-payment-form-settings .simpay-panel-field-payment-method__configure{display:flex;align-items:center;justify-content:center}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metaboxes:not(.is-empty),#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metaboxes:not(.is-empty){border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04);border-radius:4px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-handlediv,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-handlediv{display:none;float:right;width:36px;height:36px;margin:0;padding:0;border:0;background:none;cursor:pointer;display:block}#simpay-global-settings .simpay-metaboxes-wrapper .postbox.closed .simpay-handlediv .toggle-indicator:before,#simpay-form-settings .simpay-metaboxes-wrapper .postbox.closed .simpay-handlediv .toggle-indicator:before{content:""}#simpay-global-settings .simpay-metaboxes-wrapper .postbox .simpay-handlediv:focus,#simpay-form-settings .simpay-metaboxes-wrapper .postbox .simpay-handlediv:focus{outline:0}#simpay-global-settings .simpay-metaboxes-wrapper .postbox .simpay-handlediv:focus .toggle-indicator:before,#simpay-form-settings .simpay-metaboxes-wrapper .postbox .simpay-handlediv:focus .toggle-indicator:before{box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#simpay-global-settings .simpay-metaboxes-wrapper .postbox .simpay-handlediv .toggle-indicator:before,#simpay-form-settings .simpay-metaboxes-wrapper .postbox .simpay-handlediv .toggle-indicator:before{margin-top:4px;width:20px;border-radius:50%;text-indent:-1px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox{background:#fff;border:1px solid #ccd0d4;margin:0 -1px -1px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .hndle,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .hndle{border:0}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox select,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox select{font-weight:400}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox:first-of-type,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox:first-of-type{margin-top:-1px;border-top-left-radius:4px;border-top-right-radius:4px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox:last-of-type,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox:last-of-type{margin-bottom:-1px;border-bottom-left-radius:4px;border-bottom-right-radius:4px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox:last-of-type .simpay-metabox-content,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox:last-of-type .simpay-metabox-content{border-bottom-left-radius:4px;border-bottom-right-radius:4px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2{cursor:pointer;display:flex;align-items:center;padding:10px 0 10px 12px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .simpay-field-type,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .simpay-field-type{font-size:90%;color:gray;font-weight:normal;text-decoration:none;margin-left:10px}@media screen and (max-width: 782px){#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .simpay-field-type,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .simpay-field-type{display:none}}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .dashicons-handle,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .dashicons-handle{cursor:move}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2 strong,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2 strong{font-size:95%;margin-left:8px;display:flex;align-items:center;flex-grow:1}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2 svg,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2 svg{border-radius:3px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2 select,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2 select{font-family:sans-serif;max-width:20%;margin:.25em .25em .25em 0}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2.fixed,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2.fixed{cursor:pointer !important}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .dashicons-menu,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .dashicons-menu{cursor:move}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions{padding:9px 18px;justify-content:space-between;display:flex;align-items:center}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions__field-id,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions__field-id{display:flex;align-items:center}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions__field-id input,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions__field-id input{margin:0 2px 0 5px;width:50px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions__field-id a,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions__field-id a{text-decoration:none}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .button-link.simpay-remove-field-link,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .button-link.simpay-remove-field-link{color:#a00}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .button-link.simpay-remove-field-link:hover,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .button-link.simpay-remove-field-link:hover{color:#dc3232}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox table,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox table{border-spacing:0;width:100%}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox table.simpay-inner-table,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox table.simpay-inner-table{border:none;padding:0 1em}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox table tr td,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox table tr td{border-bottom-color:#ccd0d4}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-remove-plan,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-remove-plan{color:#a00}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-custom-field-payment-button .dashicons-menu,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-custom-field-payment-button .dashicons-menu{visibility:hidden}#simpay-global-settings .sortable-placeholder,#simpay-form-settings .sortable-placeholder{margin:5px;display:block;min-height:36px}#simpay-global-settings .chosen-container,#simpay-form-settings .chosen-container{min-width:20em;max-width:30em}#simpay-global-settings .simpay-field.simpay-small-text,#simpay-form-settings .simpay-field.simpay-small-text{width:7em}#simpay-global-settings .simpay-field.simpay-medium-text,#simpay-form-settings .simpay-field.simpay-medium-text{width:15em}#simpay-global-settings .simpay-field-radios ul,#simpay-form-settings .simpay-field-radios ul{margin:0}#simpay-global-settings .simpay-field-radios>i,#simpay-form-settings .simpay-field-radios>i{margin-left:5px;vertical-align:middle}#simpay-global-settings ul.simpay-field-radios-inline,#simpay-form-settings ul.simpay-field-radios-inline{margin:0 0 -10px}#simpay-global-settings ul.simpay-field-radios-inline li,#simpay-form-settings ul.simpay-field-radios-inline li{display:inline-block;margin:0 10px 10px 0}#simpay-global-settings ul.simpay-field-radios-inline li:last-child,#simpay-form-settings ul.simpay-field-radios-inline li:last-child{margin-right:0}#simpay-global-settings .simpay-currency-field,#simpay-form-settings .simpay-currency-field{display:flex;align-items:center}>#simpay-global-settings .simpay-currency-field:focus,>#simpay-form-settings .simpay-currency-field:focus{position:relative;z-index:5}#simpay-global-settings .simpay-currency-symbol,#simpay-form-settings .simpay-currency-symbol{margin:0;padding-left:8px;padding-right:8px;line-height:28px;font-size:14px}@media screen and (max-width: 782px){#simpay-global-settings .simpay-currency-symbol,#simpay-form-settings .simpay-currency-symbol{line-height:38px}}#simpay-global-settings .simpay-currency-symbol-left,#simpay-form-settings .simpay-currency-symbol-left{border-top-left-radius:4px;border-bottom-left-radius:4px}#simpay-global-settings .simpay-currency-symbol-right,#simpay-form-settings .simpay-currency-symbol-right{border-top-right-radius:4px;border-bottom-right-radius:4px}#simpay-global-settings div.simpay-currency-symbol,#simpay-form-settings div.simpay-currency-symbol{border-color:#7e8993;border-style:solid;background-color:#fff}#simpay-global-settings select.simpay-currency-symbol,#simpay-form-settings select.simpay-currency-symbol{padding-right:25px}#simpay-global-settings .simpay-currency-symbol-left,#simpay-form-settings .simpay-currency-symbol-left{border-width:1px 0 1px 1px}#simpay-global-settings .simpay-currency-symbol-left+.simpay-field-amount,#simpay-form-settings .simpay-currency-symbol-left+.simpay-field-amount{border-radius:0 4px 4px 0}#simpay-global-settings .simpay-currency-symbol-right,#simpay-form-settings .simpay-currency-symbol-right{border-width:1px 1px 1px 0}#simpay-global-settings .simpay-field-amount,#simpay-form-settings .simpay-field-amount{margin:0;padding-left:8px;padding-right:8px;font-size:14px;width:6em;position:relative;z-index:2;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px}#simpay-global-settings .simpay-error,#simpay-form-settings .simpay-error{color:red}#simpay-global-settings .simpay-docs-link-wrap,#simpay-form-settings .simpay-docs-link-wrap{position:absolute;right:0;bottom:0;color:#666;font-size:13px;font-style:italic;padding:15px 18px}#simpay-global-settings .simpay-docs-link-wrap a .dashicons-editor-help,#simpay-form-settings .simpay-docs-link-wrap a .dashicons-editor-help{color:#666;text-decoration:none;width:17px;height:17px;font-size:17px;padding-left:4px}#simpay-global-settings .simpay-docs-icon,#simpay-form-settings .simpay-docs-icon{color:#666}#simpay-global-settings .simpay-docs-icon,#simpay-global-settings .simpay-docs-icon .dashicons-editor-help,#simpay-form-settings .simpay-docs-icon,#simpay-form-settings .simpay-docs-icon .dashicons-editor-help{text-decoration:none;width:17px;height:17px;font-size:17px}.button.button-primary.simpay-upgrade-btn{background-color:#428bca;border:1px solid #428bca;color:#fff;display:inline-block}.button.button-primary.simpay-upgrade-btn:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #2d6ca2}.button.button-primary.simpay-upgrade-btn:hover{background-color:#037ad0;border:1px solid #428bca}.simpay-upgrade-btn-subtext{color:#3c434a;font-size:14px;line-height:1.5;text-align:center;margin:40px 0 0;padding:30px 35px 20px;background-color:#fcf9e8;border:3px solid #ebe29a;border-radius:4px;position:relative}.simpay-upgrade-btn-subtext svg{background:#00a32a;fill:#fff;border-radius:50%;border:3px solid #ebe29a;width:28px;height:28px;position:absolute;top:-14px;left:50%;margin-left:-14px}.simpay-upgrade-btn-subtext u{text-decoration:none;font-weight:bold;color:#00a32a}.simpay-upgrade-btn-subtext a{text-decoration:none;display:block;margin-top:6px;font-weight:bold}.post-type-simple-pay #post-body-content{display:none}.simpay-card{margin:0 0 20px;padding:30px;background:#fff;border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04)}.simpay-card,.simpay-card p{line-height:1.5;font-size:16px}.simpay-card h3{line-height:1.6;font-size:18px;margin:0 0 20px;color:#23282c}.simpay-card p{margin:0 0 20px}.simpay-card p:last-child,.simpay-card ul:last-child{margin-bottom:0}.simpay-card figure{float:right;margin:0 0 30px 30px;max-width:400px}.simpay-card figure iframe,.simpay-card figure img{max-width:100%}.simpay-card figure figcaption{text-align:center}@media screen and (max-width: 782px){.simpay-card figure{margin:0 0 30px;max-width:100%;float:none}}.simpay-doc-suggestions{width:100%;display:flex;flex-wrap:wrap;padding:0}.simpay-doc-suggestion{text-align:center;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:0 1 33.333%;padding:30px;border-right:1px solid #c3c4c7;box-sizing:border-box}.simpay-doc-suggestion:nth-child(3n){border-right:0}@media screen and (max-width: 782px){.simpay-doc-suggestion{flex:0 1 100%;border-bottom:1px solid #c3c4c7;border-right:0}.simpay-doc-suggestion:last-child{border-bottom:0}}.simpay-doc-suggestion h3{font-size:20px;margin-bottom:10px}.simpay-doc-suggestion p{font-size:15px}.simpay-doc-suggestion .dashicons{font-size:40px;width:40px;height:40px;display:block;margin-bottom:10px}.simpay-doc-suggestion .button-large{font-size:16px}.simpay-addons{display:flex;flex-wrap:wrap;justify-content:space-between;margin:20px 0}.simpay-addon{background:#fff;border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04);margin-bottom:20px;display:flex;flex-direction:column;flex-basis:calc(33% - 10px);box-sizing:border-box}@media screen and (max-width: 782px){.simpay-addon{flex-basis:100%}}.simpay-addon img{float:left;max-width:75px}.simpay-addon h5{margin:0 0 10px 100px;font-size:16px}.simpay-addon__details{padding:20px;flex:1 0 auto}.simpay-addon__actions{display:flex;align-items:center;justify-content:space-between;flex:0 1 auto;background-color:#f7f7f7;border-top:1px solid #ddd;margin-top:auto;padding:20px;position:relative}.simpay-addon__actions .msg{text-align:center;justify-content:center;display:flex;align-items:center;position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;background-color:#f7f7f7;z-index:3}.simpay-addon .error,.simpay-addon .status-label.status-installed{color:#d63638}.simpay-addon .success,.simpay-addon .status-label.status-active{color:#00a32a}.simpay-addon .addon-desc{margin:0 0 0 100px}.form-table td .simpay-stripe-connect-help{margin:15px 0;display:flex;align-items:center}.form-table td .simpay-stripe-connect-help .dashicons{margin-right:4px}.simpay-currency-field{display:flex;align-items:center}>.simpay-currency-field:focus{position:relative;z-index:5}.simpay-currency-symbol{margin:0;padding-left:8px;padding-right:8px;line-height:28px;font-size:14px}@media screen and (max-width: 782px){.simpay-currency-symbol{line-height:38px}}.simpay-currency-symbol-left{border-top-left-radius:4px;border-bottom-left-radius:4px}.simpay-currency-symbol-right{border-top-right-radius:4px;border-bottom-right-radius:4px}div.simpay-currency-symbol{border-color:#7e8993;border-style:solid;background-color:#fff}select.simpay-currency-symbol{padding-right:25px}.simpay-currency-symbol-left{border-width:1px 0 1px 1px}.simpay-currency-symbol-left+.simpay-field-amount{border-radius:0 4px 4px 0}.simpay-currency-symbol-right{border-width:1px 1px 1px 0}.simpay-field-amount{margin:0;padding-left:8px;padding-right:8px;font-size:14px;width:6em;position:relative;z-index:2;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.simpay-template-explorer-open .show-settings{display:none !important}.simpay-branding-bar{margin:0 -20px;padding:14px 22px;background:#fff;border-bottom:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04);width:calc(100% + 20px);display:flex;justify-content:space-between;box-sizing:border-box}.site-health .simpay-branding-bar{display:none}.simpay-branding-bar__title{display:flex;align-items:center;margin:8px 0}.simpay-branding-bar__logo{width:200px}.simpay-branding-bar__divider{color:#dadbdf;font-size:23px;font-weight:400;margin:0 15px}.simpay-branding-bar__actions{display:flex;align-items:center}.simpay-branding-bar__actions>div{margin-left:10px;min-width:40px}.simpay-branding-bar__actions-button{color:#000;cursor:pointer;padding:10px;width:40px;height:40px;background-color:#f3f4f5;border-radius:50%;border:0;box-shadow:none;position:relative;transition:background-color .2s ease;box-sizing:border-box;display:block}.simpay-branding-bar__actions-button:hover{background-color:#e5e5e5}.simpay-branding-bar__actions-button:active,.simpay-branding-bar__actions-button:focus{box-shadow:0 0 0 2px var(--wp-admin-theme-color)}.simpay-branding-bar__actions-button-count{font-weight:600;font-size:10px;line-height:16px;color:#fff;margin:0;background-color:#df2a4a;border-radius:100%;width:16px;height:16px;position:absolute;top:-8px;left:50%;margin-left:-8px}.simpay-branding-bar .wp-heading-inline{font-size:23px;font-weight:400;margin:0}.simpay-branding-bar .page-title-action{font-weight:600;font-size:13px;line-height:normal;cursor:pointer;text-shadow:none;text-decoration:none;margin-left:10px;padding:4px 8px;border:1px solid currentColor;border-radius:2px;background:#f6f7f7}.simpay-landing-zone{text-align:center;max-width:700px;margin:40px auto}.simpay-landing-zone__title{font-size:26px;font-weight:600;margin:0 0 1.5rem;padding:0}.simpay-landing-zone__subtitle{font-size:17px;color:#666;margin:.25rem 0}.simpay-landing-zone__subtitle strong{color:#444}.simpay-landing-zone section{margin:2rem 0}.simpay-landing-zone__empty-state-graphic img{width:425px}.simpay-landing-zone__screenshot>*{vertical-align:middle}.simpay-landing-zone__screenshot-img{display:inline-block;position:relative;width:315px;padding:5px;background-color:#fff;box-shadow:0px 2px 5px 0px rgba(0,0,0,.05);border-radius:3px}.simpay-landing-zone__screenshot-img img{max-width:100%;display:block}.simpay-landing-zone__screenshot-img .hover{position:absolute;opacity:0;height:calc(100% - 10px);width:calc(100% - 10px);top:0;left:0;border:5px solid #fff;background-color:rgba(0,0,0,.15);background-image:url(data:image/svg+xml;base64,PHN2ZyBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjojZmZmZmZmMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiPjxwYXRoIGQ9Ik01MCAwYzI3LjYxNCAwIDUwIDIyLjM4NiA1MCA1MHMtMjIuMzg2IDUwLTUwIDUwUzAgNzcuNjE0IDAgNTAgMjIuMzg2IDAgNTAgMHoiIGZpbGw9IiMxNjg1YjciLz48cGF0aCBkPSJNNzMuMDIzIDY3LjA2N2wtOS4zNDQtOS4zNDRhMi4yNDcgMi4yNDcgMCAwMC0xLjU5My0uNjU2aC0xLjUyOGExOS4zOTkgMTkuMzk5IDAgMDA0LjEyNC0xMS45OTZjMC0xMC43Ny04LjcyNS0xOS40OTUtMTkuNDk0LTE5LjQ5NS0xMC43NjggMC0xOS40OTQgOC43MjYtMTkuNDk0IDE5LjQ5NSAwIDEwLjc2OCA4LjcyNiAxOS40OTMgMTkuNDk0IDE5LjQ5M2ExOS40IDE5LjQgMCAwMDExLjk5Ny00LjEyM3YxLjUyN2MwIC42LjIzNCAxLjE3Mi42NTUgMS41OTRsOS4zNDQgOS4zNDRhMi4yNCAyLjI0IDAgMDAzLjE3OCAwbDIuNjUyLTIuNjUzYTIuMjYgMi4yNiAwIDAwLjAxLTMuMTg2em0tMjcuODM1LTEwYy02LjYyNiAwLTExLjk5Ni01LjM2MS0xMS45OTYtMTEuOTk2IDAtNi42MjcgNS4zNi0xMS45OTcgMTEuOTk2LTExLjk5NyA2LjYyNiAwIDExLjk5NyA1LjM2MSAxMS45OTcgMTEuOTk3IDAgNi42MjYtNS4zNjEgMTEuOTk2LTExLjk5NyAxMS45OTZ6IiBmaWxsPSIjZmZmIi8+PC9zdmc+);background-repeat:no-repeat;background-position:center;background-size:50px;transition:all .3s}.simpay-landing-zone__screenshot-img:hover .hover{opacity:1;transition:all .3s}.simpay-landing-zone__screenshot ul{text-align:left;display:inline-block;margin:0 0 0 30px;list-style-type:none;max-width:calc(100% - 350px)}@media screen and (max-width: 782px){.simpay-landing-zone__screenshot ul{text-align:center;margin:30px auto;max-width:100%;display:block}}.simpay-landing-zone__screenshot li{margin:16px 0;padding:0;font-size:15px;color:#777;position:relative}.simpay-landing-zone__screenshot li:before{content:"";background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjc3NjIgNi40NTYwNUw4LjcyMDMyIDEuNDAwMDVDOC41NzU5OSAxLjI1NTcyIDguMzgzNjQgMS4xNzY1IDguMTc4NTMgMS4xNzY1QzcuOTczMiAxLjE3NjUgNy43ODA5NiAxLjI1NTg0IDcuNjM2NjQgMS40MDAwNUw3LjE3NzYgMS44NTkyQzcuMDMzMzkgMi4wMDMyOSA2Ljk1Mzk1IDIuMTk1NzYgNi45NTM5NSAyLjQwMDk4QzYuOTUzOTUgMi42MDYwOCA3LjAzMzM5IDIuODA1MDQgNy4xNzc2IDIuOTQ5MTRMMTAuMTI3MSA1LjkwNTE2SDAuNzU2MzM0QzAuMzMzODM0IDUuOTA1MTYgMCA2LjIzNTkyIDAgNi42NTg1NFY3LjMwNzY1QzAgNy43MzAyNyAwLjMzMzgzNCA4LjA5NDM4IDAuNzU2MzM0IDguMDk0MzhIMTAuMTYwNkw3LjE3NzcyIDExLjA2NjlDNy4wMzM1MSAxMS4yMTEyIDYuOTU0MDYgMTEuMzk4NSA2Ljk1NDA2IDExLjYwMzdDNi45NTQwNiAxMS44MDg3IDcuMDMzNTEgMTEuOTk4NiA3LjE3NzcyIDEyLjE0MjhMNy42MzY3NSAxMi42MDA1QzcuNzgxMDcgMTIuNzQ0OCA3Ljk3MzMyIDEyLjgyMzUgOC4xNzg2NSAxMi44MjM1QzguMzgzNzUgMTIuODIzNSA4LjU3NjExIDEyLjc0MzggOC43MjA0MyAxMi41OTk1TDEzLjc3NjMgNy41NDM2QzEzLjkyMSA3LjM5ODgyIDE0LjAwMDUgNy4yMDU1NiAxNCA3LjAwMDExQzE0LjAwMDQgNi43OTM5OCAxMy45MjEgNi42MDA2IDEzLjc3NjIgNi40NTYwNVY2LjQ1NjA1WiIgZmlsbD0iIzQyOEJDQSIvPgo8L3N2Zz4K);background-position:center;background-repeat:no-repeat;background-size:14px;width:14px;height:14px;display:inline-block;margin:-3px 5px 0 0;vertical-align:middle}.simpay-landing-zone .button.button-large{font-size:17px;line-height:30px;padding:10px 20px}.simpay-landing-zone__purchased{display:block;margin:15px 0 0}.simpay-upgrade-modal,.simpay-upgrade-upe-modal{padding:0 !important}.simpay-upgrade-modal *,.simpay-upgrade-upe-modal *{box-sizing:border-box}.simpay-upgrade-modal__content,.simpay-upgrade-upe-modal__content{text-align:center;display:flex;flex-direction:column;align-items:center;padding:16px 32px 32px}.simpay-upgrade-modal__content>.dashicons,.simpay-upgrade-upe-modal__content>.dashicons{color:#333;font-size:48px;width:48px;height:48px}.simpay-upgrade-modal__title,.simpay-upgrade-upe-modal__title{font-size:22px;line-height:1.5;display:block;margin:12px 0 0}.simpay-upgrade-modal__description,.simpay-upgrade-upe-modal__description{color:#777;font-size:16px;margin:16px 0 24px}.simpay-upgrade-modal__description strong,.simpay-upgrade-upe-modal__description strong{color:#333}.simpay-upgrade-modal__discount,.simpay-upgrade-upe-modal__discount{font-size:15px;text-align:center;margin:32px -32px -32px;padding:24px 40px;background-color:#fcf9e8;position:relative}.simpay-upgrade-modal__discount svg,.simpay-upgrade-upe-modal__discount svg{background:#00a32a;fill:#fff;border-radius:50%;border:4px solid #fff;width:32px;height:32px;position:absolute;top:-16px;left:50%;margin-left:-16px}.simpay-upgrade-modal__discount u,.simpay-upgrade-upe-modal__discount u{text-decoration:none;font-weight:bold;color:#00a32a}.simpay-upgrade-modal .button-large,.simpay-upgrade-upe-modal .button-large{font-size:16px;font-weight:bold;margin:0 0 15px;padding:8px 30px !important;height:auto}.simpay-teaser-float{margin:50px;position:relative}.simpay-teaser-float__card{text-align:center;padding:30px;background:#fff;border-radius:4px;box-shadow:0 0 30px 15px rgba(0,0,0,.18);position:relative;z-index:2}#poststuff .simpay-teaser-float h2,.simpay-teaser-float h2{font-size:24px;font-weight:600;margin:0;padding:0}.simpay-teaser-float p{font-size:15px;line-height:1.35;color:#666}.simpay-teaser-float p strong{color:#444}.simpay-teaser-float ul{text-align:left;display:inline-block;margin:-10px 0 20px;list-style-type:none}.simpay-teaser-float li{margin:16px 0;padding:0 0 0 24px;font-size:15px;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjc3NjIgNi40NTYwNUw4LjcyMDMyIDEuNDAwMDVDOC41NzU5OSAxLjI1NTcyIDguMzgzNjQgMS4xNzY1IDguMTc4NTMgMS4xNzY1QzcuOTczMiAxLjE3NjUgNy43ODA5NiAxLjI1NTg0IDcuNjM2NjQgMS40MDAwNUw3LjE3NzYgMS44NTkyQzcuMDMzMzkgMi4wMDMyOSA2Ljk1Mzk1IDIuMTk1NzYgNi45NTM5NSAyLjQwMDk4QzYuOTUzOTUgMi42MDYwOCA3LjAzMzM5IDIuODA1MDQgNy4xNzc2IDIuOTQ5MTRMMTAuMTI3MSA1LjkwNTE2SDAuNzU2MzM0QzAuMzMzODM0IDUuOTA1MTYgMCA2LjIzNTkyIDAgNi42NTg1NFY3LjMwNzY1QzAgNy43MzAyNyAwLjMzMzgzNCA4LjA5NDM4IDAuNzU2MzM0IDguMDk0MzhIMTAuMTYwNkw3LjE3NzcyIDExLjA2NjlDNy4wMzM1MSAxMS4yMTEyIDYuOTU0MDYgMTEuMzk4NSA2Ljk1NDA2IDExLjYwMzdDNi45NTQwNiAxMS44MDg3IDcuMDMzNTEgMTEuOTk4NiA3LjE3NzcyIDEyLjE0MjhMNy42MzY3NSAxMi42MDA1QzcuNzgxMDcgMTIuNzQ0OCA3Ljk3MzMyIDEyLjgyMzUgOC4xNzg2NSAxMi44MjM1QzguMzgzNzUgMTIuODIzNSA4LjU3NjExIDEyLjc0MzggOC43MjA0MyAxMi41OTk1TDEzLjc3NjMgNy41NDM2QzEzLjkyMSA3LjM5ODgyIDE0LjAwMDUgNy4yMDU1NiAxNCA3LjAwMDExQzE0LjAwMDQgNi43OTM5OCAxMy45MjEgNi42MDA2IDEzLjc3NjIgNi40NTYwNVY2LjQ1NjA1WiIgZmlsbD0iIzQyOEJDQSIvPgo8L3N2Zz4K);background-position:left 3px;background-repeat:no-repeat;background-size:14px;color:#777}.simpay-teaser-float .button.button-large{font-size:17px;line-height:30px;padding:10px 20px}.simpay-teaser-float .simpay-notice-dismiss{position:absolute;top:0;right:0;font-size:20px;color:#666;font-weight:bold;text-decoration:none;margin-left:5px;padding:6px 10px;z-index:2}.simpay-teaser-float .simpay-notice-dismiss:hover,.simpay-teaser-float .simpay-notice-dismiss:active,.simpay-teaser-float .simpay-notice-dismiss:focus{color:#666;text-decoration:none}.simpay-teaser-float:after,.simpay-teaser-float:before{opacity:.75;z-index:0;content:"";position:absolute;left:-30px;right:-30px;top:-35px;width:calc(100% + 60px);height:170px;background-image:linear-gradient(#ddd, #ddd),linear-gradient(#eee, #eee),linear-gradient(#ddd, #ddd),linear-gradient(#eee, #eee);background-repeat:no-repeat;background-size:100% 20px,100% 40px,100% 20px,100% 40px;background-position:0 0,0 30px,0 100px,0 130px}.simpay-teaser-float:before{top:170px}.simpay-teaser-float .simpay-upgrade-btn-subtext{margin:24px -30px -30px;padding:32px 40px;border-bottom-left-radius:2px;border-bottom-right-radius:2px;border:0}.simpay-teaser-float .simpay-upgrade-btn-subtext svg{border-color:#fff}.simpay-teaser-float--inline{margin:40px 30px 30px}.simpay-teaser-float--inline .simpay-teaser-float__card{padding:30px;box-shadow:0 0 12px 6px rgba(0,0,0,.16)}#poststuff .simpay-teaser-float--inline h2,.simpay-teaser-float--inline h2{font-size:20px}.simpay-teaser-float--inline p{font-size:15px;margin:.75rem 0}.simpay-teaser-float--inline .button.button-large{font-size:15px;line-height:24px;margin:1rem 0;padding:8px 14px;display:inline-block}.simpay-teaser-float--inline:before,.simpay-teaser-float--inline:after{opacity:.6}.simpay-teaser-float--inline:before{display:none}.simpay-teaser-float--inline:after{top:15px}.simpay-form-settings-notice{font-weight:normal;color:#1d2327;position:relative;margin:18px 18px 0;padding:14px;border-radius:4px;background:#f5f5ff}.simpay-form-settings-notice a{color:#635aff}.simpay-form-settings-notice .simpay-external-link .dashicons-external{margin:1px 0 0 2px}.simpay-form-settings-notice strong{font-size:14px}.simpay-form-settings-notice p{margin:5px 0 0 23px}.simpay-form-settings-notice .simpay-notice-dismiss{font-size:20px;color:#b0b0f0;font-weight:bold;line-height:1;position:absolute;top:0;right:5px;text-decoration:none;padding:0 5px;z-index:2}.simpay-form-settings-notice .simpay-notice-dismiss:hover,.simpay-form-settings-notice .simpay-notice-dismiss:active,.simpay-form-settings-notice .simpay-notice-dismiss:focus{color:#9191ef;text-decoration:none;background:none}.simpay-settings .simpay-form-settings-notice{border:2px solid #645aff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.post-type-simple-pay .lity{z-index:999999999;padding:20px}.post-type-simple-pay .lity-close{margin:10px}.post-type-simple-pay .lity-content{max-width:80vw;max-height:80vh}.post-type-simple-pay .lity-content img{max-height:80vh !important;max-width:80vw !important}#wpsp-api-keys-row-hide{display:none}.post-type-simple-pay #post-preview:not(.simpay-preview-button){display:none}.simpay-license-field-wrapper{margin:20px 0}#simpay-settings-license-key-license-key{margin:0}#simpay-settings-license-key-license-key[readonly]{background:#fff}.simpay-license-message__loading,.simpay-license-field{display:flex;align-items:center}.wp-core-ui .button.simpay-license-button.button-primary,.wp-core-ui .button.simpay-license-button.button-secondary{font-size:1rem;line-height:1;margin:0 8px;padding:13px}.simpay-license-message{font-size:15px;margin-top:8px}.simpay-license-message--valid{color:#15803d}.simpay-license-message--invalid{color:#b91c1c}.simpay-recaptcha-payment-form-feedback .dashicons{margin-top:-1px;display:inline-block}.simpay-recaptcha-payment-form-feedback .dashicons-update-alt{animation:rotation 2s infinite linear}.simpay-form-builder-inset-settings{margin:3px 0 0 24px}fieldset.simpay-form-builder-inset-settings>*:not(legend){margin:5px 0 8px}.simpay-form-builder-inset-settings>*:last-child{margin-bottom:0}.simpay-form-builder-inventory-control{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;padding:6px 8px;box-shadow:0 0 0 rgba(0,0,0,0);transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;margin:0;padding:0;width:auto;display:inline-flex;align-items:center}@media(prefers-reduced-motion: reduce){.simpay-form-builder-inventory-control{transition-duration:0s;transition-delay:0s}}@media(min-width: 600px){.simpay-form-builder-inventory-control{font-size:13px;line-height:normal}}.simpay-form-builder-inventory-control:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}.simpay-form-builder-inventory-control::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.simpay-form-builder-inventory-control::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.simpay-form-builder-inventory-control:-ms-input-placeholder{color:rgba(30,30,30,.62)}.simpay-form-builder-inventory-control:focus-within{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}.simpay-form-builder-inventory-control input[type=number]{border:0;box-shadow:none;background:none;border-radius:0;width:75px}.simpay-form-builder-inventory-control input[type=number]:focus{border:0;box-shadow:none;outline:0}.simpay-form-builder-inventory-control+label{margin-left:8px}.simpay-form-builder-inventory-control__initial{color:#757575;font-size:16px;line-height:normal;padding-right:8px}@media(min-width: 600px){.simpay-form-builder-inventory-control__initial{font-size:13px;line-height:normal}}.simpay-form-builder-inventory-control__initial:before{content:"/";display:inline-block;vertical-align:top;margin-top:-1px}.simpay-form-builder-purchase-restrictions__restriction-item{display:flex;align-items:center;margin-top:8px;margin-bottom:8px}.simpay-form-builder-purchase-restrictions__restriction-item label{margin-left:8px}.simpay-form-builder-purchase-restrictions__restriction-item-datetime{display:flex;align-items:center}.simpay-form-builder-purchase-restrictions__restriction-item-datetime>*{margin-right:10px}.simpay-form-builder-purchase-restrictions__restriction-item-datetime span{color:#757575}.simpay-form-builder-fee-recovery__amounts{display:flex;align-items:center;margin-top:5px}.simpay-form-builder-fee-recovery ::-webkit-input-placeholder{color:#b7bec7}.simpay-form-builder-fee-recovery ::-moz-placeholder{color:#b7bec7;opacity:1}.simpay-form-builder-fee-recovery :-ms-input-placeholder{color:#b7bec7}.simpay-form-builder-fee-recovery>*{margin-right:8px}.simpay-form-builder-fee-percent-control{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;padding:6px 8px;box-shadow:0 0 0 rgba(0,0,0,0);transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;margin:0;padding:0;width:auto;display:inline-flex;align-items:center}@media(prefers-reduced-motion: reduce){.simpay-form-builder-fee-percent-control{transition-duration:0s;transition-delay:0s}}@media(min-width: 600px){.simpay-form-builder-fee-percent-control{font-size:13px;line-height:normal}}.simpay-form-builder-fee-percent-control:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}.simpay-form-builder-fee-percent-control::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.simpay-form-builder-fee-percent-control::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.simpay-form-builder-fee-percent-control:-ms-input-placeholder{color:rgba(30,30,30,.62)}.simpay-form-builder-fee-percent-control:focus-within{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}.simpay-form-builder-fee-percent-control input[type=number]{border:0;box-shadow:none;background:none;border-radius:0;width:75px}.simpay-form-builder-fee-percent-control input[type=number]:focus{border:0;box-shadow:none;outline:0}.simpay-form-builder-fee-percent-control+label{margin-left:8px}.simpay-form-builder-fee-percent-control__suffix{color:#757575;font-size:16px;line-height:normal;padding-right:8px}@media(min-width: 600px){.simpay-form-builder-fee-percent-control__suffix{font-size:13px;line-height:normal}}.simpay-form-builder-automations__cta{margin:24px 0 6px;text-align:center}.simpay-form-builder-automator{padding:16px 4px 26px !important}.simpay-form-builder-automator,.simpay-form-builder-automator *{box-sizing:border-box}.simpay-form-builder-automator input[type=search]{font-size:15px;padding:2px 8px}.simpay-form-builder-automator__integrations{display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));grid-column-gap:16px;grid-row-gap:16px;margin:18px -18px 0;padding:0 18px 10px;width:calc(100% + 36px);max-height:400px;overflow-y:scroll}.simpay-form-builder-automator__integrations-integration{color:initial;text-align:center;text-decoration:none;background:#fff;border:1px solid #eee;border-radius:4px;box-shadow:0 1px 3px 0 rgba(0,0,0,.03);transition:all ease-in .15s}.simpay-form-builder-automator__integrations-integration img{display:block;margin:16px auto;height:50px}.simpay-form-builder-automator__integrations-integration span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:8px 16px;display:block;border-top:1px solid #eee}.simpay-form-builder-automator__integrations-integration:hover{cursor:pointer;border-color:#ddd;box-shadow:0 2px 4px 0 rgba(0,0,0,.06)}body.site-health #wpbody-content,body.post-type-simple-pay #wpbody-content{padding-bottom:200px}#wpfooter .simpay-footer-promotion{text-align:center;font-weight:400;font-size:13px;line-height:16px;color:#787c82;padding:20px 0 30px 0;margin-bottom:20px}#wpfooter .simpay-footer-promotion p{font-weight:600}#wpfooter .simpay-footer-promotion-links,#wpfooter .simpay-footer-promotion-social{display:flex;justify-content:center;align-items:center}#wpfooter .simpay-footer-promotion-links{margin:9px 0 0}#wpfooter .simpay-footer-promotion-links span{color:#c3c4c7;padding:0 7px}#wpfooter .simpay-footer-promotion-social{margin:10px 0 0 0;gap:10px}#wpfooter .simpay-footer-promotion-social li{margin-bottom:0}#wpfooter .simpay-footer-promotion-social li:hover path{fill:#50575e}#wpfooter .simpay-footer-promotion-social a{display:block;height:16px}.simpay-settings-is_upe td{background:#fff;border:1px solid #c3c4c7;border-left-width:4px;border-left-color:#2271b1;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:12px 18px} +.simpay-settings-subsections{display:flex;align-items:center;box-shadow:inset 0 -1px 0 0 #ccc}.simpay-settings-subsections__subsection{font-weight:500;text-decoration:none;padding:15px;display:flex;align-items:center}.simpay-settings-subsections__subsection .dashicons{width:18px;height:18px;font-size:18px;margin-right:4px}.simpay-settings-subsections__subsection.is-active{box-shadow:inset 0 -4px 0 0 currentColor;position:relative;z-index:1}.simpay-settings-subsections__subsection:not(.is-active){color:#23282d}.simpay-settings form>h2:not(.nav-tab-wrapper){clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute !important;width:1px}.simpay-settings .form-table td fieldset+p,.simpay-settings .form-table td label+p,.simpay-settings .form-table td select+p,.simpay-settings .form-table td input+p{color:#666;font-style:italic}.simpay-settings .simpay-settings-subsections__subsection{display:flex;align-items:center}.simpay-settings .simpay-settings-subsections__subsection .simpay-settings-bubble{margin-left:5px}.simpay-settings .simpay-settings-visual-toggles{margin:30px 0 0;display:flex}.simpay-settings .simpay-settings-visual-toggles input[type=radio]{display:none}.simpay-settings .simpay-settings-visual-toggles__toggle{-webkit-user-select:none;-moz-user-select:none;user-select:none;min-width:180px;margin:0 30px 0 0 !important;position:relative;display:block;background-color:#fff;border-radius:4px;border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04)}.simpay-settings .simpay-settings-visual-toggles__toggle:hover{border:1px solid #999;box-shadow:0 1px 2px rgba(0,0,0,.1)}.simpay-settings .simpay-settings-visual-toggles input[type=radio]:checked+.simpay-settings-visual-toggles__toggle{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px #007cba;box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.simpay-settings .simpay-settings-visual-toggles__toggle-recommended,.simpay-settings .simpay-settings-visual-toggles__toggle-not-recommended{text-align:center;font-size:12px;text-transform:uppercase;font-weight:bold;margin:0;padding:5px 0;display:block;border-top-right-radius:4px;border-top-left-radius:4px}.simpay-settings .simpay-settings-visual-toggles__toggle-recommended{color:#0f8569;background:#f4f9f7}.simpay-settings .simpay-settings-visual-toggles__toggle-not-recommended{color:#b91c1b;background:#fef2f2}.simpay-settings .simpay-settings-visual-toggles__toggle-icon{margin:20px auto 15px;padding:0 15px;display:block}.simpay-settings .simpay-settings-visual-toggles__toggle-label{line-height:1.5;text-align:center;font-size:16px;font-weight:500;margin:15px;display:block}.simpay-settings .simpay-settings-visual-toggles__toggle-label small{color:#666;font-weight:normal;font-size:13px;line-height:1;display:block;margin:4px 0}.simpay-settings .simpay-settings-visual-toggles.simpay-settings-captcha-type .simpay-settings-visual-toggles__toggle{min-height:160px}.simpay-settings .simpay-settings-visual-toggles.simpay-settings-captcha-type .simpay-settings-visual-toggles__toggle-icon{width:80px;height:80px}.simpay-settings .simpay-settings-visual-toggles.simpay-settings-captcha-type input[type=radio].simpay-settings-captcha-type--is-recommended:checked+.simpay-settings-visual-toggles__toggle{border-color:#0f8569;box-shadow:0 0 0 1px #0f8569}.simpay-settings .simpay-settings-visual-toggles.simpay-settings-captcha-type input[type=radio].simpay-settings-captcha-type--is-not-recommended:checked+.simpay-settings-visual-toggles__toggle{border-color:#b91c1b;box-shadow:0 0 0 1px #b91c1b}.simpay-settings .simpay-settings-visual-toggles.simpay-settings-captcha-type label[for=simpay-settings-captcha-type-cloudflare-turnstile] .simpay-settings-visual-toggles__toggle-icon{width:120px}.simpay-settings-general-recaptcha-no_captcha_warning th,.simpay-settings-general-recaptcha-no_captcha_warning td,.simpay-settings-hcaptcha_secret_key th,.simpay-settings-hcaptcha_secret_key td,.simpay-settings-cloudflare_turnstile_secret_key th,.simpay-settings-cloudflare_turnstile_secret_key td,.simpay-settings-recaptcha_score_threshold th,.simpay-settings-recaptcha_score_threshold td{padding-bottom:50px !important}.simpay-settings .simpay-settings-subsections__subsection.simpay-settings-subsection-summary-report,.simpay-settings .simpay-settings-subsections__subsection.simpay-settings-subsection-payment-confirmation,.simpay-settings .simpay-settings-subsections__subsection.simpay-settings-subsection-payment-notification,.simpay-settings .simpay-settings-subsections__subsection.simpay-settings-subsection-upcoming-invoice,.simpay-settings .simpay-settings-subsections__subsection.simpay-settings-subsection-manage-subscriptions,.simpay-settings .simpay-settings-subsections__subsection.simpay-settings-subsection-invoice-confirmation{display:none}.simpay-settings .simpay-settings-subsection-emails-tools{margin-left:auto}.simpay-admin-charts-period-over-period{position:relative;padding-bottom:12px}.simpay-admin-charts-period-over-period *{box-sizing:border-box}.simpay-admin-charts-period-over-period__tooltip{position:absolute;background:#fff;border:1px solid #c3c3c3;box-shadow:0 2px 6px rgba(0,0,0,.05);border-radius:2px;padding:10px 14px;display:flex;flex-direction:column;z-Index:10000;min-width:175px}.simpay-admin-charts-period-over-period__tooltip-data{white-space:nowrap;margin-bottom:8px;display:grid;grid-template-columns:1fr auto;grid-auto-rows:auto;-moz-column-gap:16px;column-gap:16px}.simpay-admin-charts-period-over-period__tooltip-data:last-child{margin-bottom:0}.simpay-admin-charts-period-over-period__tooltip-data[data-dataset="1"]{opacity:.65}.simpay-admin-charts-period-over-period__tooltip-data em{font-style:normal;text-align:right}.simpay-admin-charts-period-over-period__tooltip-delta{font-size:12px;margin:0 -14px -10px;padding:8px 14px;border-top:1px solid #eee;background:#fdfdfd;border-radius:2px;display:flex;align-items:center;justify-content:center}.simpay-admin-charts-period-over-period__tooltip-delta .simpay-admin-charts-badge{margin-right:4px}.simpay-admin-charts-period-over-period__tooltip-delta strong.is-positive{color:#006908}.simpay-admin-charts-period-over-period__tooltip-delta strong.is-negative{color:#b3093c}.simpay-admin-charts-badge{color:#2f2f2f;font-size:12px;font-weight:500;font-style:normal;line-height:1;padding:3px 6px;display:inline-flex;align-items:center;background:#f0f0f0;border-radius:100px}.simpay-admin-charts-badge.is-positive{color:#006908;background-color:#d7f7c2}.simpay-admin-charts-badge.is-negative{color:#b3093c;background-color:#ffe7f2}.simpay-admin-charts-badge__icon{width:15px;height:15px}.simpay-admin-charts-no-data{position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;background:rgba(255,255,255,.5);z-index:2}.simpay-admin-charts-no-data>div{text-align:center;padding:24px;background:#fff;border:1px solid #c3c3c3;box-shadow:0 2px 6px rgba(0,0,0,.1);border-radius:2px;max-width:60%}.simpay-admin-charts-no-data strong{font-size:15px;margin-bottom:8px;display:block}.button.button-large.simpay-button-large{font-size:14px;line-height:30px;padding:4px 12px}.simpay-copy-hidden-input{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.fixed .column-livemode{width:15%;text-align:right}@media screen and (max-width: 782px){.fixed .column-livemode{text-align:left}}.fixed .column-livemode .simpay-badge{margin-top:3px}.fixed .column-shortcode{width:25%}.fixed .column-shortcode .simpay-shortcode{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.post-type-simple-pay .misc-pub-curtime,.post-type-simple-pay .misc-pub-visibility{display:none}.simpay-metabox-title{border:1px solid #eee}.simpay-shortcode-section{border-top:1px solid #ddd;border-width:1px 0;padding-top:15px;padding-bottom:15px;position:relative}.simpay-shortcode-section label{display:block;margin-bottom:6px}.simpay-shortcode-section label .dashicons{color:#8c8f94;margin-right:3px}.simpay-shortcode-section .simpay-copy-button{line-height:normal;position:absolute;right:20px;bottom:20px;border:0;background:none;box-shadow:none;padding:0}.simpay-shortcode-section .simpay-copy-button:hover{border:0;background:none;box-shadow:none}.simpay-shortcode-section .simpay-copy-button .dashicons{color:#3c434a}.simpay-shortcode{width:100%;padding:8px;line-height:1;margin:0;height:32px;resize:none}.simpay-badge{color:#3f3f46;text-align:center;line-height:1;padding:5px 7px;border-radius:3px;background:#e4e4e7;border:0;box-shadow:none;display:inline-flex;align-items:center}button.simpay-badge{cursor:pointer}button.simpay-badge:hover{background:#d4d4d8}.simpay-badge__icon{opacity:.8;margin:2px 5px 0 0}.simpay-badge--green{color:#0e6245;background:#cbf4c9}.simpay-badge--yellow{color:#983705;background:#f8e5b9}.simpay-stripe-account-info{display:flex;align-items:center;margin-bottom:8px;position:relative}.simpay-stripe-account-info .spinner{float:none;margin-top:0;margin-left:0}.simple-pay_page_simpay_settings .simpay-settings-upgrade,.post-type-simple-pay .simpay-settings-upgrade{margin-top:20px;padding:1px;position:relative;background:#fff;border-radius:4px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2),0 5px 10px rgba(0,0,0,.1);max-width:677px}.simple-pay_page_simpay_settings .simpay-settings-upgrade__inner,.post-type-simple-pay .simpay-settings-upgrade__inner{text-align:center;margin:0;padding:30px}.simple-pay_page_simpay_settings .simpay-settings-upgrade h3,.post-type-simple-pay .simpay-settings-upgrade h3{line-height:1.5;font-size:22px;margin:0 0 1.5rem}.simple-pay_page_simpay_settings .simpay-settings-upgrade ul,.post-type-simple-pay .simpay-settings-upgrade ul{margin:1.5rem 0 calc(1.5rem - 6px);display:flex;flex-wrap:wrap;justify-content:center}@media screen and (min-width: 782px){.simple-pay_page_simpay_settings .simpay-settings-upgrade ul,.post-type-simple-pay .simpay-settings-upgrade ul{margin-left:4rem;margin-right:4rem}}.simple-pay_page_simpay_settings .simpay-settings-upgrade li,.post-type-simple-pay .simpay-settings-upgrade li{font-size:15px;margin:6px 0;width:100%}.simple-pay_page_simpay_settings .simpay-settings-upgrade li a,.post-type-simple-pay .simpay-settings-upgrade li a{color:#3c434a;text-decoration:none}.simple-pay_page_simpay_settings .simpay-settings-upgrade li a:hover,.post-type-simple-pay .simpay-settings-upgrade li a:hover{color:var(--wp-admin-theme-color);text-decoration:underline}@media screen and (min-width: 782px){.simple-pay_page_simpay_settings .simpay-settings-upgrade li,.post-type-simple-pay .simpay-settings-upgrade li{text-align:left;width:50%}}.simple-pay_page_simpay_settings .simpay-settings-upgrade .button.button-large,.post-type-simple-pay .simpay-settings-upgrade .button.button-large{font-size:17px;line-height:30px;padding:10px 20px}.simple-pay_page_simpay_settings .simpay-settings-upgrade small,.post-type-simple-pay .simpay-settings-upgrade small{color:#666;margin:15px 0 0;display:block}.simple-pay_page_simpay_settings .simpay-settings-upgrade .dashicons-yes,.post-type-simple-pay .simpay-settings-upgrade .dashicons-yes{color:#428bca}.simple-pay_page_simpay_settings .simpay-settings-upgrade .button-link,.post-type-simple-pay .simpay-settings-upgrade .button-link{position:absolute;top:0;right:0;font-size:20px;color:#666;font-weight:bold;text-decoration:none;margin-left:5px;padding:6px 10px;z-index:2}.simple-pay_page_simpay_settings .simpay-settings-upgrade .button-link:hover,.simple-pay_page_simpay_settings .simpay-settings-upgrade .button-link:active,.simple-pay_page_simpay_settings .simpay-settings-upgrade .button-link:focus,.post-type-simple-pay .simpay-settings-upgrade .button-link:hover,.post-type-simple-pay .simpay-settings-upgrade .button-link:active,.post-type-simple-pay .simpay-settings-upgrade .button-link:focus{color:#666;text-decoration:none}.simple-pay_page_simpay_settings .simpay-settings-upgrade .simpay-upgrade-btn-subtext,.post-type-simple-pay .simpay-settings-upgrade .simpay-upgrade-btn-subtext{text-align:center;margin:0;padding:30px 20px 20px;background-color:#fcf9e8;border:1px solid #edeac9;border-width:1px 0 0;position:relative;border-radius:0;border-bottom-left-radius:4px;border-bottom-right-radius:4px}@media screen and (min-width: 782px){.simple-pay_page_simpay_settings .simpay-settings-upgrade .simpay-upgrade-btn-subtext,.post-type-simple-pay .simpay-settings-upgrade .simpay-upgrade-btn-subtext{padding-left:4rem;padding-right:4rem}}.simple-pay_page_simpay_settings .simpay-settings-upgrade .simpay-upgrade-btn-subtext svg,.post-type-simple-pay .simpay-settings-upgrade .simpay-upgrade-btn-subtext svg{background:#00a32a;fill:#fff;border-radius:50%;border:4px solid #fff;box-shadow:0 0 0 1px #edeac9;width:28px;height:28px;position:absolute;top:-18px;left:50%;margin-left:-18px}.simple-pay_page_simpay_settings .simpay-settings-upgrade .simpay-upgrade-btn-subtext u,.post-type-simple-pay .simpay-settings-upgrade .simpay-upgrade-btn-subtext u{text-decoration:none;font-weight:bold;color:#00a32a}.simple-pay_page_simpay_settings .simpay-settings-upgrade .simpay-upgrade-btn-subtext a,.post-type-simple-pay .simpay-settings-upgrade .simpay-upgrade-btn-subtext a{font-weight:normal;display:inline-block}#simpay-payment-form-settings table{width:100%;border-collapse:collapse}#simpay-payment-form-settings ::-webkit-input-placeholder{color:#9ba1a9}#simpay-payment-form-settings ::-moz-placeholder{color:#9ba1a9;opacity:1}#simpay-payment-form-settings :-ms-input-placeholder{color:#9ba1a9}#simpay-payment-form-settings .inside{margin:0;padding:0}#simpay-payment-form-settings .simpay-panel-field .toolbar{margin-bottom:-4px}#simpay-payment-form-settings .simpay-panel-field .toolbar .simpay-field-select{margin:0 0 4px;width:auto;max-width:70%}#simpay-payment-form-settings .simpay-tabs{margin:0;padding:0;list-style:none;background:#fafafa;border-right:1px solid #ccd0d4;line-height:1em;position:relative;flex:0 0 25%}@media screen and (max-width: 782px){#simpay-payment-form-settings .simpay-tabs{flex-basis:100%;flex-grow:1;border-right:0}}#simpay-payment-form-settings .simpay-tabs li{margin:0;padding:0}#simpay-payment-form-settings .simpay-tabs li:first-child{margin-top:12px}#simpay-payment-form-settings .simpay-tabs li:last-child{margin-bottom:20px}@media screen and (max-width: 782px){#simpay-payment-form-settings .simpay-tabs li:last-child{margin-bottom:0}}#simpay-payment-form-settings .simpay-tabs li.active{margin-left:-1px;box-shadow:0 1px 1px rgba(0,0,0,.04);position:relative}#simpay-payment-form-settings .simpay-tabs li.active:focus:after{display:none}#simpay-payment-form-settings .simpay-tabs li.active:before,#simpay-payment-form-settings .simpay-tabs li.active:after{content:"";width:calc(100% + 1px);height:1px;background:#ccd0d4;position:absolute;top:0;left:0;right:0;z-index:2}#simpay-payment-form-settings .simpay-tabs li.active:after{top:auto;bottom:0}#simpay-payment-form-settings .simpay-tabs li.active a{font-weight:bold;background-color:#fff;position:relative;margin-right:-1px}#simpay-payment-form-settings .simpay-tabs li.active a:before{content:"";position:absolute;top:0;left:0;bottom:0;width:4px;height:100%;background:currentColor;z-index:3}@media screen and (max-width: 782px){#simpay-payment-form-settings .simpay-tabs li.active a{margin-right:0}}#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item{display:flex;align-items:center;line-height:20px;margin:0;padding:8px 10px 8px 14px;text-decoration:none;transition:all .05s ease-in-out}#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item svg,#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item .dashicons{margin-right:6px}@media screen and (max-width: 782px){#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item{padding:18px}}#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item:focus{outline:0;position:relative;z-index:3;box-shadow:inset 0 0 0 1px currentColor,0 0 0 1px currentColor}#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item[href="#purchase-restrictions-settings-panel"],#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item[href="#payment-page-settings-panel"]{margin-bottom:20px;position:relative}#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item[href="#purchase-restrictions-settings-panel"]:after,#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item[href="#payment-page-settings-panel"]:after{content:"";position:absolute;left:14px;right:14px;bottom:-10px;width:calc(100% - 28px);height:1px;background:#eaeaea}#simpay-payment-form-settings .simpay-tabs li .simpay-tab-item span>span{color:#f18500;font-size:12px;font-weight:600;margin:0 0 0 5px;display:inline-block}#simpay-payment-form-settings .simpay-tabs li:not(.active) .simpay-tab-item{color:inherit}#simpay-payment-form-settings .simpay-panels-wrap{background:#fff;display:flex}@media screen and (max-width: 782px){#simpay-payment-form-settings .simpay-panels-wrap{flex-direction:column}}#simpay-payment-form-settings .simpay-panels{flex:0 0 75%;display:flex}@media screen and (min-width: 1400px){#simpay-payment-form-settings .simpay-panels{flex-basis:75%}}@media screen and (max-width: 782px){#simpay-payment-form-settings .simpay-panels{flex-basis:100%}}#simpay-payment-form-settings .simpay-panel,#simpay-payment-form-settings .simpay-panel-section{width:100%}#simpay-payment-form-settings .simpay-panel>table,#simpay-payment-form-settings .simpay-panel>table>tr,#simpay-payment-form-settings .simpay-panel>table>tbody,#simpay-payment-form-settings .simpay-panel>table>tbody>tr,#simpay-payment-form-settings .simpay-panel>table>thead,#simpay-payment-form-settings .simpay-panel>table>thead>tr{display:block;width:100%}#simpay-payment-form-settings .simpay-panel>table:last-child>tbody:last-child>tr:last-child>td{border-bottom:0}#simpay-payment-form-settings .simpay-panel-field--requires-upgrade{position:relative}#simpay-payment-form-settings .simpay-panel-field--requires-upgrade td>div{margin-right:80px}#simpay-payment-form-settings .simpay-panel-field--requires-upgrade td>div .button-small{position:absolute;top:calc(50% - 13px);right:18px}#simpay-payment-form-settings .simpay-panel-field,#simpay-payment-form-settings .simpay-panel-field>td,#simpay-payment-form-settings .simpay-panel-field>th{text-align:left;display:block}#simpay-payment-form-settings .simpay-panel-field>td,#simpay-payment-form-settings .simpay-panel-field>th{width:calc(100% - 36px);margin-left:18px;margin-right:18px}#simpay-payment-form-settings .simpay-panel-field th{font-weight:bold;padding-top:18px;padding-bottom:5px}#simpay-payment-form-settings .simpay-panel-field td{border-bottom:1px solid #ddd;padding-bottom:18px}#simpay-payment-form-settings .simpay-panel-field p.description{margin-top:4px}#simpay-payment-form-settings .simpay-panel-field p.description:last-of-type{margin-bottom:0}#simpay-payment-form-settings .simpay-panel-field .simpay-panel-field__nested{margin-top:18px}#simpay-payment-form-settings .simpay-panel-field .simpay-panel-field__nested label{font-weight:bold;display:block;margin-bottom:4px}#simpay-payment-form-settings .simpay-panel-field .simpay-field-select,#simpay-payment-form-settings .simpay-panel-field .simpay-field-text{min-width:75%;max-width:100%}@media screen and (max-width: 782px){#simpay-payment-form-settings .simpay-panel-field .simpay-field-select,#simpay-payment-form-settings .simpay-panel-field .simpay-field-text{min-width:0;width:100%}}#simpay-payment-form-settings .simpay-panel-field .simpay-field-textarea{width:100%;max-width:100%}#simpay-payment-form-settings .simpay-panel-field .notice:last-of-type{margin-bottom:0}#simpay-payment-form-settings .simpay-panel-field .error,#simpay-payment-form-settings .simpay-panel-field .simpay-important{color:#a94442;font-weight:normal}#simpay-payment-form-settings .simpay-panel-field .simpay-image-preview-wrap{position:relative;margin-top:12px}#simpay-payment-form-settings .simpay-panel-field .simpay-image-preview-wrap .simpay-remove-image-preview{position:absolute;top:-15px;left:-15px;cursor:pointer;background-color:#fff}#simpay-payment-form-settings .simpay-panel-field .simpay-image-preview-wrap .simpay-remove-image-preview::before{font-size:22px;line-height:26px}#simpay-payment-form-settings .simpay-panel-field .simpay-image-preview-wrap .simpay-image-preview{max-height:128px;max-width:128px;border:1px solid #ddd}#simpay-payment-form-settings .simpay-panel .simpay-promo-under-box{background-color:#f4f4f4;border:1px solid #e5e5e5;padding:18px;margin-top:18px;position:relative}#simpay-payment-form-settings .simpay-panel .simpay-promo-under-box__dismiss{color:inherit;text-decoration:none;position:absolute;top:8px;right:8px}#simpay-payment-form-settings .simpay-panel .simpay-promo-under-box__dismiss .dashicons-dismiss{font-size:16px;width:16px;height:16px}#simpay-payment-form-settings .simpay-panel .simpay-promo-under-box h3{font-size:18px;font-weight:600;margin:0;padding:0}#simpay-payment-form-settings .simpay-panel .simpay-promo-under-box p{font-size:14px}#simpay-payment-form-settings .simpay-panel .simpay-promo-under-box p:last-child{margin-bottom:0}#simpay-payment-form-settings .simpay-metabox-content{margin-bottom:-1px;background-color:#f5f5f5;border:1px solid #c3c4c7;border-width:1px 0;box-shadow:0 1px 1px rgba(0,0,0,.04);position:relative}#simpay-payment-form-settings .simpay-show-if,#simpay-payment-form-settings .simpay-panel-hidden{display:none}#simpay-payment-form-settings .simpay-payment-methods{border:1px solid #ccd0d4;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.04)}#simpay-payment-form-settings .simpay-panel-field-payment-method{display:block;border-top:1px solid #ccd0d4;padding:7px;box-sizing:border-box}#simpay-payment-form-settings .simpay-panel-field-payment-method:first-child{border-top:0;border-top-left-radius:4px;border-top-right-radius:4px}#simpay-payment-form-settings .simpay-panel-field-payment-method__enable{display:flex;align-items:center}#simpay-payment-form-settings .simpay-panel-field-payment-method__enable input[type=checkbox]{margin-top:0;margin-right:8px}#simpay-payment-form-settings .simpay-panel-field-payment-method__help{text-decoration:none}#simpay-payment-form-settings .simpay-panel-field-payment-method__help .dashicons{font-size:18px;width:18px;height:18px}#simpay-payment-form-settings .simpay-panel-field-payment-method__restrictions,#simpay-payment-form-settings .simpay-panel-field-payment-method__restrictions-ach{margin-left:72px}#simpay-payment-form-settings .simpay-panel-field-payment-method__icon{border-radius:3px;overflow:hidden;margin:0 8px 0 5px;width:30px;height:30px;flex-shrink:0}#simpay-payment-form-settings .simpay-panel-field-payment-method__icon svg{width:30px;height:30px}#simpay-payment-form-settings .simpay-panel-field-payment-method__configure{display:flex;align-items:center;justify-content:center}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metaboxes:not(.is-empty),#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metaboxes:not(.is-empty){border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04);border-radius:4px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-handlediv,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-handlediv{display:none;float:right;width:36px;height:36px;margin:0;padding:0;border:0;background:none;cursor:pointer;display:block}#simpay-global-settings .simpay-metaboxes-wrapper .postbox.closed .simpay-handlediv .toggle-indicator:before,#simpay-form-settings .simpay-metaboxes-wrapper .postbox.closed .simpay-handlediv .toggle-indicator:before{content:""}#simpay-global-settings .simpay-metaboxes-wrapper .postbox .simpay-handlediv:focus,#simpay-form-settings .simpay-metaboxes-wrapper .postbox .simpay-handlediv:focus{outline:0}#simpay-global-settings .simpay-metaboxes-wrapper .postbox .simpay-handlediv:focus .toggle-indicator:before,#simpay-form-settings .simpay-metaboxes-wrapper .postbox .simpay-handlediv:focus .toggle-indicator:before{box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#simpay-global-settings .simpay-metaboxes-wrapper .postbox .simpay-handlediv .toggle-indicator:before,#simpay-form-settings .simpay-metaboxes-wrapper .postbox .simpay-handlediv .toggle-indicator:before{margin-top:4px;width:20px;border-radius:50%;text-indent:-1px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox{background:#fff;border:1px solid #ccd0d4;margin:0 -1px -1px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .hndle,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .hndle{border:0}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox select,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox select{font-weight:400}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox:first-of-type,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox:first-of-type{margin-top:-1px;border-top-left-radius:4px;border-top-right-radius:4px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox:last-of-type,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox:last-of-type{margin-bottom:-1px;border-bottom-left-radius:4px;border-bottom-right-radius:4px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox:last-of-type .simpay-metabox-content,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox:last-of-type .simpay-metabox-content{border-bottom-left-radius:4px;border-bottom-right-radius:4px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2{cursor:pointer;display:flex;align-items:center;padding:10px 0 10px 12px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .simpay-field-type,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .simpay-field-type{font-size:90%;color:gray;font-weight:normal;text-decoration:none;margin-left:10px}@media screen and (max-width: 782px){#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .simpay-field-type,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .simpay-field-type{display:none}}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .dashicons-handle,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .dashicons-handle{cursor:move}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2 strong,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2 strong{font-size:95%;margin-left:8px;display:flex;align-items:center;flex-grow:1}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2 svg,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2 svg{border-radius:3px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2 select,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2 select{font-family:sans-serif;max-width:20%;margin:.25em .25em .25em 0}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2.fixed,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2.fixed{cursor:pointer !important}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .dashicons-menu,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox h2 .dashicons-menu{cursor:move}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions{padding:9px 18px;justify-content:space-between;display:flex;align-items:center}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions__field-id,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions__field-id{display:flex;align-items:center}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions__field-id input,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions__field-id input{margin:0 2px 0 5px;width:50px}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions__field-id a,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-metabox-content-actions__field-id a{text-decoration:none}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .button-link.simpay-remove-field-link,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .button-link.simpay-remove-field-link{color:#a00}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .button-link.simpay-remove-field-link:hover,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .button-link.simpay-remove-field-link:hover{color:#dc3232}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox table,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox table{border-spacing:0;width:100%}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox table.simpay-inner-table,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox table.simpay-inner-table{border:none;padding:0 1em}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox table tr td,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox table tr td{border-bottom-color:#ccd0d4}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-remove-plan,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-metabox .simpay-remove-plan{color:#a00}#simpay-global-settings .simpay-metaboxes-wrapper .simpay-custom-field-payment-button .dashicons-menu,#simpay-form-settings .simpay-metaboxes-wrapper .simpay-custom-field-payment-button .dashicons-menu{visibility:hidden}#simpay-global-settings .sortable-placeholder,#simpay-form-settings .sortable-placeholder{margin:5px;display:block;min-height:36px}#simpay-global-settings .chosen-container,#simpay-form-settings .chosen-container{min-width:20em;max-width:30em}#simpay-global-settings .simpay-field.simpay-small-text,#simpay-form-settings .simpay-field.simpay-small-text{width:7em}#simpay-global-settings .simpay-field.simpay-medium-text,#simpay-form-settings .simpay-field.simpay-medium-text{width:15em}#simpay-global-settings .simpay-field-radios ul,#simpay-form-settings .simpay-field-radios ul{margin:0}#simpay-global-settings .simpay-field-radios>i,#simpay-form-settings .simpay-field-radios>i{margin-left:5px;vertical-align:middle}#simpay-global-settings ul.simpay-field-radios-inline,#simpay-form-settings ul.simpay-field-radios-inline{margin:0 0 -10px}#simpay-global-settings ul.simpay-field-radios-inline li,#simpay-form-settings ul.simpay-field-radios-inline li{display:inline-block;margin:0 10px 10px 0}#simpay-global-settings ul.simpay-field-radios-inline li:last-child,#simpay-form-settings ul.simpay-field-radios-inline li:last-child{margin-right:0}#simpay-global-settings .simpay-currency-field,#simpay-form-settings .simpay-currency-field{display:flex;align-items:center}>#simpay-global-settings .simpay-currency-field:focus,>#simpay-form-settings .simpay-currency-field:focus{position:relative;z-index:5}#simpay-global-settings .simpay-currency-symbol,#simpay-form-settings .simpay-currency-symbol{margin:0;padding-left:8px;padding-right:8px;line-height:28px;font-size:14px}@media screen and (max-width: 782px){#simpay-global-settings .simpay-currency-symbol,#simpay-form-settings .simpay-currency-symbol{line-height:38px}}#simpay-global-settings .simpay-currency-symbol-left,#simpay-form-settings .simpay-currency-symbol-left{border-top-left-radius:4px;border-bottom-left-radius:4px}#simpay-global-settings .simpay-currency-symbol-right,#simpay-form-settings .simpay-currency-symbol-right{border-top-right-radius:4px;border-bottom-right-radius:4px}#simpay-global-settings div.simpay-currency-symbol,#simpay-form-settings div.simpay-currency-symbol{border-color:#7e8993;border-style:solid;background-color:#fff}#simpay-global-settings select.simpay-currency-symbol,#simpay-form-settings select.simpay-currency-symbol{padding-right:25px}#simpay-global-settings .simpay-currency-symbol-left,#simpay-form-settings .simpay-currency-symbol-left{border-width:1px 0 1px 1px}#simpay-global-settings .simpay-currency-symbol-left+.simpay-field-amount,#simpay-form-settings .simpay-currency-symbol-left+.simpay-field-amount{border-radius:0 4px 4px 0}#simpay-global-settings .simpay-currency-symbol-right,#simpay-form-settings .simpay-currency-symbol-right{border-width:1px 1px 1px 0}#simpay-global-settings .simpay-field-amount,#simpay-form-settings .simpay-field-amount{margin:0;padding-left:8px;padding-right:8px;font-size:14px;width:6em;position:relative;z-index:2;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px}#simpay-global-settings .simpay-error,#simpay-form-settings .simpay-error{color:red}#simpay-global-settings .simpay-docs-link-wrap,#simpay-form-settings .simpay-docs-link-wrap{position:absolute;right:0;bottom:0;color:#666;font-size:13px;font-style:italic;padding:15px 18px}#simpay-global-settings .simpay-docs-link-wrap a .dashicons-editor-help,#simpay-form-settings .simpay-docs-link-wrap a .dashicons-editor-help{color:#666;text-decoration:none;width:17px;height:17px;font-size:17px;padding-left:4px}#simpay-global-settings .simpay-docs-icon,#simpay-form-settings .simpay-docs-icon{color:#666}#simpay-global-settings .simpay-docs-icon,#simpay-global-settings .simpay-docs-icon .dashicons-editor-help,#simpay-form-settings .simpay-docs-icon,#simpay-form-settings .simpay-docs-icon .dashicons-editor-help{text-decoration:none;width:17px;height:17px;font-size:17px}.button.button-primary.simpay-upgrade-btn{background-color:#428bca;border:1px solid #428bca;color:#fff;display:inline-block}.button.button-primary.simpay-upgrade-btn:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #2d6ca2}.button.button-primary.simpay-upgrade-btn:hover{background-color:#037ad0;border:1px solid #428bca}.simpay-upgrade-btn-subtext{color:#3c434a;font-size:14px;line-height:1.5;text-align:center;margin:40px 0 0;padding:30px 35px 20px;background-color:#fcf9e8;border:3px solid #ebe29a;border-radius:4px;position:relative}.simpay-upgrade-btn-subtext svg{background:#00a32a;fill:#fff;border-radius:50%;border:3px solid #ebe29a;width:28px;height:28px;position:absolute;top:-14px;left:50%;margin-left:-14px}.simpay-upgrade-btn-subtext u{text-decoration:none;font-weight:bold;color:#00a32a}.simpay-upgrade-btn-subtext a{text-decoration:none;display:block;margin-top:6px;font-weight:bold}.post-type-simple-pay #post-body-content{display:none}.simpay-card{margin:0 0 20px;padding:30px;background:#fff;border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04)}.simpay-card,.simpay-card p{line-height:1.5;font-size:16px}.simpay-card h3{line-height:1.6;font-size:18px;margin:0 0 20px;color:#23282c}.simpay-card p{margin:0 0 20px}.simpay-card p:last-child,.simpay-card ul:last-child{margin-bottom:0}.simpay-card figure{float:right;margin:0 0 30px 30px;max-width:400px}.simpay-card figure iframe,.simpay-card figure img{max-width:100%}.simpay-card figure figcaption{text-align:center}@media screen and (max-width: 782px){.simpay-card figure{margin:0 0 30px;max-width:100%;float:none}}.simpay-doc-suggestions{width:100%;display:flex;flex-wrap:wrap;padding:0}.simpay-doc-suggestion{text-align:center;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:0 1 33.333%;padding:30px;border-right:1px solid #c3c4c7;box-sizing:border-box}.simpay-doc-suggestion:nth-child(3n){border-right:0}@media screen and (max-width: 782px){.simpay-doc-suggestion{flex:0 1 100%;border-bottom:1px solid #c3c4c7;border-right:0}.simpay-doc-suggestion:last-child{border-bottom:0}}.simpay-doc-suggestion h3{font-size:20px;margin-bottom:10px}.simpay-doc-suggestion p{font-size:15px}.simpay-doc-suggestion .dashicons{font-size:40px;width:40px;height:40px;display:block;margin-bottom:10px}.simpay-doc-suggestion .button-large{font-size:16px}.simpay-addons{display:flex;flex-wrap:wrap;justify-content:space-between;margin:20px 0}.simpay-addon{background:#fff;border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04);margin-bottom:20px;display:flex;flex-direction:column;flex-basis:calc(33% - 10px);box-sizing:border-box}@media screen and (max-width: 782px){.simpay-addon{flex-basis:100%}}.simpay-addon img{float:left;max-width:75px}.simpay-addon h5{margin:0 0 10px 100px;font-size:16px}.simpay-addon__details{padding:20px;flex:1 0 auto}.simpay-addon__actions{display:flex;align-items:center;justify-content:space-between;flex:0 1 auto;background-color:#f7f7f7;border-top:1px solid #ddd;margin-top:auto;padding:20px;position:relative}.simpay-addon__actions .msg{text-align:center;justify-content:center;display:flex;align-items:center;position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;background-color:#f7f7f7;z-index:3}.simpay-addon .error,.simpay-addon .status-label.status-installed{color:#d63638}.simpay-addon .success,.simpay-addon .status-label.status-active{color:#00a32a}.simpay-addon .addon-desc{margin:0 0 0 100px}.form-table td .simpay-stripe-connect-help{margin:15px 0;display:flex;align-items:center}.form-table td .simpay-stripe-connect-help .dashicons{margin-right:4px}.simpay-currency-field{display:flex;align-items:center}>.simpay-currency-field:focus{position:relative;z-index:5}.simpay-currency-symbol{margin:0;padding-left:8px;padding-right:8px;line-height:28px;font-size:14px}@media screen and (max-width: 782px){.simpay-currency-symbol{line-height:38px}}.simpay-currency-symbol-left{border-top-left-radius:4px;border-bottom-left-radius:4px}.simpay-currency-symbol-right{border-top-right-radius:4px;border-bottom-right-radius:4px}div.simpay-currency-symbol{border-color:#7e8993;border-style:solid;background-color:#fff}select.simpay-currency-symbol{padding-right:25px}.simpay-currency-symbol-left{border-width:1px 0 1px 1px}.simpay-currency-symbol-left+.simpay-field-amount{border-radius:0 4px 4px 0}.simpay-currency-symbol-right{border-width:1px 1px 1px 0}.simpay-field-amount{margin:0;padding-left:8px;padding-right:8px;font-size:14px;width:6em;position:relative;z-index:2;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.simpay-template-explorer-open .show-settings{display:none !important}.simpay-branding-bar{margin:0 -20px;padding:14px 22px;background:#fff;border-bottom:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04);width:calc(100% + 20px);display:flex;justify-content:space-between;box-sizing:border-box}.site-health .simpay-branding-bar{display:none}.simpay-branding-bar__title{display:flex;align-items:center;margin:8px 0}.simpay-branding-bar__logo{width:200px}.simpay-branding-bar__divider{color:#dadbdf;font-size:23px;font-weight:400;margin:0 15px}.simpay-branding-bar__actions{display:flex;align-items:center}.simpay-branding-bar__actions>div{margin-left:10px;min-width:40px}.simpay-branding-bar__actions-button{color:#000;cursor:pointer;padding:10px;width:40px;height:40px;background-color:#f3f4f5;border-radius:50%;border:0;box-shadow:none;position:relative;transition:background-color .2s ease;box-sizing:border-box;display:block}.simpay-branding-bar__actions-button:hover{background-color:#e5e5e5}.simpay-branding-bar__actions-button:active,.simpay-branding-bar__actions-button:focus{box-shadow:0 0 0 2px var(--wp-admin-theme-color)}.simpay-branding-bar__actions-button-count{font-weight:600;font-size:10px;line-height:16px;color:#fff;margin:0;background-color:#df2a4a;border-radius:100%;width:16px;height:16px;position:absolute;top:-8px;left:50%;margin-left:-8px}.simpay-branding-bar .wp-heading-inline{font-size:23px;font-weight:400;margin:0}.simpay-branding-bar .page-title-action{font-weight:600;font-size:13px;line-height:normal;cursor:pointer;text-shadow:none;text-decoration:none;margin-left:10px;padding:4px 8px;border:1px solid currentColor;border-radius:2px;background:#f6f7f7}.simpay-landing-zone{text-align:center;max-width:700px;margin:40px auto}.simpay-landing-zone__title{font-size:26px;font-weight:600;margin:0 0 1.5rem;padding:0}.simpay-landing-zone__subtitle{font-size:17px;color:#666;margin:.25rem 0}.simpay-landing-zone__subtitle strong{color:#444}.simpay-landing-zone section{margin:2rem 0}.simpay-landing-zone__empty-state-graphic img{width:425px}.simpay-landing-zone__screenshot>*{vertical-align:middle}.simpay-landing-zone__screenshot-img{display:inline-block;position:relative;width:315px;padding:5px;background-color:#fff;box-shadow:0px 2px 5px 0px rgba(0,0,0,.05);border-radius:3px}.simpay-landing-zone__screenshot-img img{max-width:100%;display:block}.simpay-landing-zone__screenshot-img .hover{position:absolute;opacity:0;height:calc(100% - 10px);width:calc(100% - 10px);top:0;left:0;border:5px solid #fff;background-color:rgba(0,0,0,.15);background-image:url(data:image/svg+xml;base64,PHN2ZyBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjojZmZmZmZmMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiPjxwYXRoIGQ9Ik01MCAwYzI3LjYxNCAwIDUwIDIyLjM4NiA1MCA1MHMtMjIuMzg2IDUwLTUwIDUwUzAgNzcuNjE0IDAgNTAgMjIuMzg2IDAgNTAgMHoiIGZpbGw9IiMxNjg1YjciLz48cGF0aCBkPSJNNzMuMDIzIDY3LjA2N2wtOS4zNDQtOS4zNDRhMi4yNDcgMi4yNDcgMCAwMC0xLjU5My0uNjU2aC0xLjUyOGExOS4zOTkgMTkuMzk5IDAgMDA0LjEyNC0xMS45OTZjMC0xMC43Ny04LjcyNS0xOS40OTUtMTkuNDk0LTE5LjQ5NS0xMC43NjggMC0xOS40OTQgOC43MjYtMTkuNDk0IDE5LjQ5NSAwIDEwLjc2OCA4LjcyNiAxOS40OTMgMTkuNDk0IDE5LjQ5M2ExOS40IDE5LjQgMCAwMDExLjk5Ny00LjEyM3YxLjUyN2MwIC42LjIzNCAxLjE3Mi42NTUgMS41OTRsOS4zNDQgOS4zNDRhMi4yNCAyLjI0IDAgMDAzLjE3OCAwbDIuNjUyLTIuNjUzYTIuMjYgMi4yNiAwIDAwLjAxLTMuMTg2em0tMjcuODM1LTEwYy02LjYyNiAwLTExLjk5Ni01LjM2MS0xMS45OTYtMTEuOTk2IDAtNi42MjcgNS4zNi0xMS45OTcgMTEuOTk2LTExLjk5NyA2LjYyNiAwIDExLjk5NyA1LjM2MSAxMS45OTcgMTEuOTk3IDAgNi42MjYtNS4zNjEgMTEuOTk2LTExLjk5NyAxMS45OTZ6IiBmaWxsPSIjZmZmIi8+PC9zdmc+);background-repeat:no-repeat;background-position:center;background-size:50px;transition:all .3s}.simpay-landing-zone__screenshot-img:hover .hover{opacity:1;transition:all .3s}.simpay-landing-zone__screenshot ul{text-align:left;display:inline-block;margin:0 0 0 30px;list-style-type:none;max-width:calc(100% - 350px)}@media screen and (max-width: 782px){.simpay-landing-zone__screenshot ul{text-align:center;margin:30px auto;max-width:100%;display:block}}.simpay-landing-zone__screenshot li{margin:16px 0;padding:0;font-size:15px;color:#777;position:relative}.simpay-landing-zone__screenshot li:before{content:"";background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjc3NjIgNi40NTYwNUw4LjcyMDMyIDEuNDAwMDVDOC41NzU5OSAxLjI1NTcyIDguMzgzNjQgMS4xNzY1IDguMTc4NTMgMS4xNzY1QzcuOTczMiAxLjE3NjUgNy43ODA5NiAxLjI1NTg0IDcuNjM2NjQgMS40MDAwNUw3LjE3NzYgMS44NTkyQzcuMDMzMzkgMi4wMDMyOSA2Ljk1Mzk1IDIuMTk1NzYgNi45NTM5NSAyLjQwMDk4QzYuOTUzOTUgMi42MDYwOCA3LjAzMzM5IDIuODA1MDQgNy4xNzc2IDIuOTQ5MTRMMTAuMTI3MSA1LjkwNTE2SDAuNzU2MzM0QzAuMzMzODM0IDUuOTA1MTYgMCA2LjIzNTkyIDAgNi42NTg1NFY3LjMwNzY1QzAgNy43MzAyNyAwLjMzMzgzNCA4LjA5NDM4IDAuNzU2MzM0IDguMDk0MzhIMTAuMTYwNkw3LjE3NzcyIDExLjA2NjlDNy4wMzM1MSAxMS4yMTEyIDYuOTU0MDYgMTEuMzk4NSA2Ljk1NDA2IDExLjYwMzdDNi45NTQwNiAxMS44MDg3IDcuMDMzNTEgMTEuOTk4NiA3LjE3NzcyIDEyLjE0MjhMNy42MzY3NSAxMi42MDA1QzcuNzgxMDcgMTIuNzQ0OCA3Ljk3MzMyIDEyLjgyMzUgOC4xNzg2NSAxMi44MjM1QzguMzgzNzUgMTIuODIzNSA4LjU3NjExIDEyLjc0MzggOC43MjA0MyAxMi41OTk1TDEzLjc3NjMgNy41NDM2QzEzLjkyMSA3LjM5ODgyIDE0LjAwMDUgNy4yMDU1NiAxNCA3LjAwMDExQzE0LjAwMDQgNi43OTM5OCAxMy45MjEgNi42MDA2IDEzLjc3NjIgNi40NTYwNVY2LjQ1NjA1WiIgZmlsbD0iIzQyOEJDQSIvPgo8L3N2Zz4K);background-position:center;background-repeat:no-repeat;background-size:14px;width:14px;height:14px;display:inline-block;margin:-3px 5px 0 0;vertical-align:middle}.simpay-landing-zone .button.button-large{font-size:17px;line-height:30px;padding:10px 20px}.simpay-landing-zone__purchased{display:block;margin:15px 0 0}.simpay-upgrade-modal,.simpay-upgrade-upe-modal{padding:0 !important}.simpay-upgrade-modal *,.simpay-upgrade-upe-modal *{box-sizing:border-box}.simpay-upgrade-modal__content,.simpay-upgrade-upe-modal__content{text-align:center;display:flex;flex-direction:column;align-items:center;padding:16px 32px 32px}.simpay-upgrade-modal__content>.dashicons,.simpay-upgrade-upe-modal__content>.dashicons{color:#333;font-size:48px;width:48px;height:48px}.simpay-upgrade-modal__title,.simpay-upgrade-upe-modal__title{font-size:22px;line-height:1.5;display:block;margin:12px 0 0}.simpay-upgrade-modal__description,.simpay-upgrade-upe-modal__description{color:#777;font-size:16px;margin:16px 0 24px}.simpay-upgrade-modal__description strong,.simpay-upgrade-upe-modal__description strong{color:#333}.simpay-upgrade-modal__discount,.simpay-upgrade-upe-modal__discount{font-size:15px;text-align:center;margin:32px -32px -32px;padding:24px 40px;background-color:#fcf9e8;position:relative}.simpay-upgrade-modal__discount svg,.simpay-upgrade-upe-modal__discount svg{background:#00a32a;fill:#fff;border-radius:50%;border:4px solid #fff;width:32px;height:32px;position:absolute;top:-16px;left:50%;margin-left:-16px}.simpay-upgrade-modal__discount u,.simpay-upgrade-upe-modal__discount u{text-decoration:none;font-weight:bold;color:#00a32a}.simpay-upgrade-modal .button-large,.simpay-upgrade-upe-modal .button-large{font-size:16px;font-weight:bold;margin:0 0 15px;padding:8px 30px !important;height:auto}.simpay-teaser-float{margin:50px;position:relative}.simpay-teaser-float__card{text-align:center;padding:30px;background:#fff;border-radius:4px;box-shadow:0 0 30px 15px rgba(0,0,0,.18);position:relative;z-index:2}#poststuff .simpay-teaser-float h2,.simpay-teaser-float h2{font-size:24px;font-weight:600;margin:0;padding:0}.simpay-teaser-float p{font-size:15px;line-height:1.35;color:#666}.simpay-teaser-float p strong{color:#444}.simpay-teaser-float ul{text-align:left;display:inline-block;margin:-10px 0 20px;list-style-type:none}.simpay-teaser-float li{margin:16px 0;padding:0 0 0 24px;font-size:15px;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjc3NjIgNi40NTYwNUw4LjcyMDMyIDEuNDAwMDVDOC41NzU5OSAxLjI1NTcyIDguMzgzNjQgMS4xNzY1IDguMTc4NTMgMS4xNzY1QzcuOTczMiAxLjE3NjUgNy43ODA5NiAxLjI1NTg0IDcuNjM2NjQgMS40MDAwNUw3LjE3NzYgMS44NTkyQzcuMDMzMzkgMi4wMDMyOSA2Ljk1Mzk1IDIuMTk1NzYgNi45NTM5NSAyLjQwMDk4QzYuOTUzOTUgMi42MDYwOCA3LjAzMzM5IDIuODA1MDQgNy4xNzc2IDIuOTQ5MTRMMTAuMTI3MSA1LjkwNTE2SDAuNzU2MzM0QzAuMzMzODM0IDUuOTA1MTYgMCA2LjIzNTkyIDAgNi42NTg1NFY3LjMwNzY1QzAgNy43MzAyNyAwLjMzMzgzNCA4LjA5NDM4IDAuNzU2MzM0IDguMDk0MzhIMTAuMTYwNkw3LjE3NzcyIDExLjA2NjlDNy4wMzM1MSAxMS4yMTEyIDYuOTU0MDYgMTEuMzk4NSA2Ljk1NDA2IDExLjYwMzdDNi45NTQwNiAxMS44MDg3IDcuMDMzNTEgMTEuOTk4NiA3LjE3NzcyIDEyLjE0MjhMNy42MzY3NSAxMi42MDA1QzcuNzgxMDcgMTIuNzQ0OCA3Ljk3MzMyIDEyLjgyMzUgOC4xNzg2NSAxMi44MjM1QzguMzgzNzUgMTIuODIzNSA4LjU3NjExIDEyLjc0MzggOC43MjA0MyAxMi41OTk1TDEzLjc3NjMgNy41NDM2QzEzLjkyMSA3LjM5ODgyIDE0LjAwMDUgNy4yMDU1NiAxNCA3LjAwMDExQzE0LjAwMDQgNi43OTM5OCAxMy45MjEgNi42MDA2IDEzLjc3NjIgNi40NTYwNVY2LjQ1NjA1WiIgZmlsbD0iIzQyOEJDQSIvPgo8L3N2Zz4K);background-position:left 3px;background-repeat:no-repeat;background-size:14px;color:#777}.simpay-teaser-float .button.button-large{font-size:17px;line-height:30px;padding:10px 20px}.simpay-teaser-float .simpay-notice-dismiss{position:absolute;top:0;right:0;font-size:20px;color:#666;font-weight:bold;text-decoration:none;margin-left:5px;padding:6px 10px;z-index:2}.simpay-teaser-float .simpay-notice-dismiss:hover,.simpay-teaser-float .simpay-notice-dismiss:active,.simpay-teaser-float .simpay-notice-dismiss:focus{color:#666;text-decoration:none}.simpay-teaser-float:after,.simpay-teaser-float:before{opacity:.75;z-index:0;content:"";position:absolute;left:-30px;right:-30px;top:-35px;width:calc(100% + 60px);height:170px;background-image:linear-gradient(#ddd, #ddd),linear-gradient(#eee, #eee),linear-gradient(#ddd, #ddd),linear-gradient(#eee, #eee);background-repeat:no-repeat;background-size:100% 20px,100% 40px,100% 20px,100% 40px;background-position:0 0,0 30px,0 100px,0 130px}.simpay-teaser-float:before{top:170px}.simpay-teaser-float .simpay-upgrade-btn-subtext{margin:24px -30px -30px;padding:32px 40px;border-bottom-left-radius:2px;border-bottom-right-radius:2px;border:0}.simpay-teaser-float .simpay-upgrade-btn-subtext svg{border-color:#fff}.simpay-teaser-float--inline{margin:40px 30px 30px}.simpay-teaser-float--inline .simpay-teaser-float__card{padding:30px;box-shadow:0 0 12px 6px rgba(0,0,0,.16)}#poststuff .simpay-teaser-float--inline h2,.simpay-teaser-float--inline h2{font-size:20px}.simpay-teaser-float--inline p{font-size:15px;margin:.75rem 0}.simpay-teaser-float--inline .button.button-large{font-size:15px;line-height:24px;margin:1rem 0;padding:8px 14px;display:inline-block}.simpay-teaser-float--inline:before,.simpay-teaser-float--inline:after{opacity:.6}.simpay-teaser-float--inline:before{display:none}.simpay-teaser-float--inline:after{top:15px}.simpay-form-settings-notice{font-weight:normal;color:#1d2327;position:relative;margin:18px 18px 0;padding:14px;border-radius:4px;background:#f5f5ff}.simpay-form-settings-notice a{color:#635aff}.simpay-form-settings-notice .simpay-external-link .dashicons-external{margin:1px 0 0 2px}.simpay-form-settings-notice strong{font-size:14px}.simpay-form-settings-notice p{margin:5px 0 0 23px}.simpay-form-settings-notice .simpay-notice-dismiss{font-size:20px;color:#b0b0f0;font-weight:bold;line-height:1;position:absolute;top:0;right:5px;text-decoration:none;padding:0 5px;z-index:2}.simpay-form-settings-notice .simpay-notice-dismiss:hover,.simpay-form-settings-notice .simpay-notice-dismiss:active,.simpay-form-settings-notice .simpay-notice-dismiss:focus{color:#9191ef;text-decoration:none;background:none}.simpay-settings .simpay-form-settings-notice{border:2px solid #645aff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.post-type-simple-pay .lity{z-index:999999999;padding:20px}.post-type-simple-pay .lity-close{margin:10px}.post-type-simple-pay .lity-content{max-width:80vw;max-height:80vh}.post-type-simple-pay .lity-content img{max-height:80vh !important;max-width:80vw !important}#wpsp-api-keys-row-hide{display:none}.post-type-simple-pay #post-preview:not(.simpay-preview-button){display:none}.simpay-license-field-wrapper{margin:20px 0}#simpay-settings-license-key-license-key{margin:0}#simpay-settings-license-key-license-key[readonly]{background:#fff}.simpay-license-message__loading,.simpay-license-field{display:flex;align-items:center}.wp-core-ui .button.simpay-license-button.button-primary,.wp-core-ui .button.simpay-license-button.button-secondary{font-size:1rem;line-height:1;margin:0 8px;padding:13px}.simpay-license-message{font-size:15px;margin-top:8px}.simpay-license-message--valid{color:#15803d}.simpay-license-message--invalid{color:#b91c1c}.simpay-recaptcha-payment-form-feedback .dashicons{margin-top:-1px;display:inline-block}.simpay-recaptcha-payment-form-feedback .dashicons-update-alt{animation:rotation 2s infinite linear}.simpay-form-builder-inset-settings{margin:3px 0 0 24px}fieldset.simpay-form-builder-inset-settings>*:not(legend){margin:5px 0 8px}.simpay-form-builder-inset-settings>*:last-child{margin-bottom:0}.simpay-form-builder-inventory-control{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;padding:6px 8px;box-shadow:0 0 0 rgba(0,0,0,0);transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;margin:0;padding:0;width:auto;display:inline-flex;align-items:center}@media(prefers-reduced-motion: reduce){.simpay-form-builder-inventory-control{transition-duration:0s;transition-delay:0s}}@media(min-width: 600px){.simpay-form-builder-inventory-control{font-size:13px;line-height:normal}}.simpay-form-builder-inventory-control:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}.simpay-form-builder-inventory-control::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.simpay-form-builder-inventory-control::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.simpay-form-builder-inventory-control:-ms-input-placeholder{color:rgba(30,30,30,.62)}.simpay-form-builder-inventory-control:focus-within{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}.simpay-form-builder-inventory-control input[type=number]{border:0;box-shadow:none;background:none;border-radius:0;width:75px}.simpay-form-builder-inventory-control input[type=number]:focus{border:0;box-shadow:none;outline:0}.simpay-form-builder-inventory-control+label{margin-left:8px}.simpay-form-builder-inventory-control__initial{color:#757575;font-size:16px;line-height:normal;padding-right:8px}@media(min-width: 600px){.simpay-form-builder-inventory-control__initial{font-size:13px;line-height:normal}}.simpay-form-builder-inventory-control__initial:before{content:"/";display:inline-block;vertical-align:top;margin-top:-1px}.simpay-form-builder-purchase-restrictions__restriction-item{display:flex;align-items:center;margin-top:8px;margin-bottom:8px}.simpay-form-builder-purchase-restrictions__restriction-item label{margin-left:8px}.simpay-form-builder-purchase-restrictions__restriction-item-datetime{display:flex;align-items:center}.simpay-form-builder-purchase-restrictions__restriction-item-datetime>*{margin-right:10px}.simpay-form-builder-purchase-restrictions__restriction-item-datetime span{color:#757575}.simpay-form-builder-fee-recovery__amounts{display:flex;align-items:center;margin-top:5px}.simpay-form-builder-fee-recovery ::-webkit-input-placeholder{color:#b7bec7}.simpay-form-builder-fee-recovery ::-moz-placeholder{color:#b7bec7;opacity:1}.simpay-form-builder-fee-recovery :-ms-input-placeholder{color:#b7bec7}.simpay-form-builder-fee-recovery>*{margin-right:8px}.simpay-form-builder-fee-percent-control{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;padding:6px 8px;box-shadow:0 0 0 rgba(0,0,0,0);transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;margin:0;padding:0;width:auto;display:inline-flex;align-items:center}@media(prefers-reduced-motion: reduce){.simpay-form-builder-fee-percent-control{transition-duration:0s;transition-delay:0s}}@media(min-width: 600px){.simpay-form-builder-fee-percent-control{font-size:13px;line-height:normal}}.simpay-form-builder-fee-percent-control:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}.simpay-form-builder-fee-percent-control::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.simpay-form-builder-fee-percent-control::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.simpay-form-builder-fee-percent-control:-ms-input-placeholder{color:rgba(30,30,30,.62)}.simpay-form-builder-fee-percent-control:focus-within{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}.simpay-form-builder-fee-percent-control input[type=number]{border:0;box-shadow:none;background:none;border-radius:0;width:75px}.simpay-form-builder-fee-percent-control input[type=number]:focus{border:0;box-shadow:none;outline:0}.simpay-form-builder-fee-percent-control+label{margin-left:8px}.simpay-form-builder-fee-percent-control__suffix{color:#757575;font-size:16px;line-height:normal;padding-right:8px}@media(min-width: 600px){.simpay-form-builder-fee-percent-control__suffix{font-size:13px;line-height:normal}}.simpay-form-builder-automations__cta{margin:24px 0 6px;text-align:center}.simpay-form-builder-automator{padding:16px 4px 26px !important}.simpay-form-builder-automator,.simpay-form-builder-automator *{box-sizing:border-box}.simpay-form-builder-automator input[type=search]{font-size:15px;padding:2px 8px}.simpay-form-builder-automator__integrations{display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));grid-column-gap:16px;grid-row-gap:16px;margin:18px -18px 0;padding:0 18px 10px;width:calc(100% + 36px);max-height:400px;overflow-y:scroll}.simpay-form-builder-automator__integrations-integration{color:initial;text-align:center;text-decoration:none;background:#fff;border:1px solid #eee;border-radius:4px;box-shadow:0 1px 3px 0 rgba(0,0,0,.03);transition:all ease-in .15s}.simpay-form-builder-automator__integrations-integration img{display:block;margin:16px auto;height:50px}.simpay-form-builder-automator__integrations-integration span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:8px 16px;display:block;border-top:1px solid #eee}.simpay-form-builder-automator__integrations-integration:hover{cursor:pointer;border-color:#ddd;box-shadow:0 2px 4px 0 rgba(0,0,0,.06)}body.site-health #wpbody-content,body.post-type-simple-pay #wpbody-content{padding-bottom:200px}#wpfooter .simpay-footer-promotion{text-align:center;font-weight:400;font-size:13px;line-height:16px;color:#787c82;padding:20px 0 30px 0;margin-bottom:20px}#wpfooter .simpay-footer-promotion p{font-weight:600}#wpfooter .simpay-footer-promotion-links,#wpfooter .simpay-footer-promotion-social{display:flex;justify-content:center;align-items:center}#wpfooter .simpay-footer-promotion-links{margin:9px 0 0}#wpfooter .simpay-footer-promotion-links span{color:#c3c4c7;padding:0 7px}#wpfooter .simpay-footer-promotion-social{margin:10px 0 0 0;gap:10px}#wpfooter .simpay-footer-promotion-social li{margin-bottom:0}#wpfooter .simpay-footer-promotion-social li:hover path{fill:#50575e}#wpfooter .simpay-footer-promotion-social a{display:block;height:16px}.simpay-settings-is_upe td{background:#fff;border:1px solid #c3c4c7;border-left-width:4px;border-left-color:#2271b1;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:12px 18px} diff --git a/includes/core/assets/js/dist/simpay-admin-dashboard-widget-report-css.asset.php b/includes/core/assets/js/dist/simpay-admin-dashboard-widget-report-css.asset.php new file mode 100644 index 00000000..9781c80d --- /dev/null +++ b/includes/core/assets/js/dist/simpay-admin-dashboard-widget-report-css.asset.php @@ -0,0 +1 @@ + array(), 'version' => '10e0c9aefff5d3a8302d317cb61bc427'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-dashboard-widget-report.min.asset.php b/includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.asset.php similarity index 78% rename from includes/core/assets/js/simpay-admin-dashboard-widget-report.min.asset.php rename to includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.asset.php index 2533fd23..aff448bd 100644 --- a/includes/core/assets/js/simpay-admin-dashboard-widget-report.min.asset.php +++ b/includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => '0024d0220a1e13e29b7e2cc30458d3e4'); \ No newline at end of file + array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => 'af7158193a243840baf147a2c1cd6f5e'); \ No newline at end of file diff --git a/includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js b/includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js new file mode 100644 index 00000000..20f5f114 --- /dev/null +++ b/includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js @@ -0,0 +1,5 @@ +!function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=83)}([function(t,e){t.exports=window.wp.element},,function(t,e){t.exports=window.wp.i18n},function(t,e){t.exports=window.wp.components},function(t,e,i){"use strict";function n(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}i.d(e,"a",(function(){return n}))},function(t,e){t.exports=window.React},function(t,e,i){var n=i(26),s=i(27),r=i(22),o=i(28);t.exports=function(t,e){return n(t)||s(t,e)||r(t,e)||o()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){"use strict";function n(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i(4);function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){Object(n.a)(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===s(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},function(t,e){t.exports=window.wp.primitives},function(t,e){t.exports=window.wp.url},function(t,e,i){var n=i(30);t.exports=function(t,e,i){return(e=n(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=window.lodash},function(t,e,i){var n;!function(){"use strict";var i={}.hasOwnProperty;function s(){for(var t=[],e=0;eArray.prototype.slice.call(t));let s=!1,r=[];return function(...i){r=n(i),s||(s=!0,h.call(window,()=>{s=!1,t.apply(e,r)}))}}const u=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function f(){}const g=function(){let t=0;return function(){return t++}}();function p(t){return null==t}function m(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function b(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const x=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function y(t,e){return x(t)?t:e}function v(t,e){return void 0===t?e:t}const _=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function w(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function M(t,e,i,n){let s,r,o;if(m(t))if(r=t.length,n)for(s=r-1;s>=0;s--)e.call(i,t[s],s);else for(s=0;si;)t=t[e.substr(i,n-i)],i=n+1,n=E(e,i);return t}function A(t){return t.charAt(0).toUpperCase()+t.slice(1)}const L=t=>void 0!==t,R=t=>"function"==typeof t,F=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},z=Math.PI,I=2*z,N=I+z,V=Number.POSITIVE_INFINITY,W=z/180,B=z/2,H=z/4,U=2*z/3,Y=Math.log10,$=Math.sign;function X(t){const e=Math.round(t);t=G(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(Y(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function q(t){return!isNaN(parseFloat(t))&&isFinite(t)}function G(t,e,i){return Math.abs(t-e)l&&c=Math.min(e,i)-n&&t<=Math.max(e,i)+n}const at=t=>0===t||1===t,lt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*I/i),ct=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*I/i)+1,ht={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*B),easeOutSine:t=>Math.sin(t*B),easeInOutSine:t=>-.5*(Math.cos(z*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>at(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>at(t)?t:lt(t,.075,.3),easeOutElastic:t=>at(t)?t:ct(t,.075,.3),easeInOutElastic(t){const e=.1125;return at(t)?t:t<.5?.5*lt(2*t,e,.45):.5+.5*ct(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ht.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ht.easeInBounce(2*t):.5*ht.easeOutBounce(2*t-1)+.5},dt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ut="0123456789ABCDEF",ft=t=>ut[15&t],gt=t=>ut[(240&t)>>4]+ut[15&t],pt=t=>(240&t)>>4==(15&t);function mt(t){return t+.5|0}const bt=(t,e,i)=>Math.max(Math.min(t,i),e);function xt(t){return bt(mt(2.55*t),0,255)}function yt(t){return bt(mt(255*t),0,255)}function vt(t){return bt(mt(t/2.55)/100,0,1)}function _t(t){return bt(mt(100*t),0,100)}const wt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Mt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ot(t,e,i){const n=e*Math.min(i,1-i),s=(e,s=(e+t/30)%12)=>i-n*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function kt(t,e,i){const n=(n,s=(n+t/60)%6)=>i-i*e*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function St(t,e,i){const n=Ot(t,1,.5);let s;for(e+i>1&&(s=1/(e+i),e*=s,i*=s),s=0;s<3;s++)n[s]*=1-e-i,n[s]+=e;return n}function Dt(t){const e=t.r/255,i=t.g/255,n=t.b/255,s=Math.max(e,i,n),r=Math.min(e,i,n),o=(s+r)/2;let a,l,c;return s!==r&&(c=s-r,l=o>.5?c/(2-s-r):c/(s+r),a=s===e?(i-n)/c+(i=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=yt(t[3]))):(e=Rt(t,{r:0,g:0,b:0,a:1})).a=yt(e.a),e}function zt(t){return"r"===t.charAt(0)?function(t){const e=wt.exec(t);let i,n,s,r=255;if(e){if(e[7]!==i){const t=+e[7];r=255&(e[8]?xt(t):255*t)}return i=+e[1],n=+e[3],s=+e[5],i=255&(e[2]?xt(i):i),n=255&(e[4]?xt(n):n),s=255&(e[6]?xt(s):s),{r:i,g:n,b:s,a:r}}}(t):function(t){const e=Mt.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?xt(+e[5]):yt(+e[5]));const s=Tt(+e[2]),r=+e[3]/100,o=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return Pt(St,t,e,i)}(s,r,o):"hsv"===e[1]?function(t,e,i){return Pt(kt,t,e,i)}(s,r,o):Ct(s,r,o),{r:i[0],g:i[1],b:i[2],a:n}}(t)}class It{constructor(t){if(t instanceof It)return t;const e=typeof t;let i;var n,s,r;"object"===e?i=Ft(t):"string"===e&&(r=(n=t).length,"#"===n[0]&&(4===r||5===r?s={r:255&17*dt[n[1]],g:255&17*dt[n[2]],b:255&17*dt[n[3]],a:5===r?17*dt[n[4]]:255}:7!==r&&9!==r||(s={r:dt[n[1]]<<4|dt[n[2]],g:dt[n[3]]<<4|dt[n[4]],b:dt[n[5]]<<4|dt[n[6]],a:9===r?dt[n[7]]<<4|dt[n[8]]:255})),i=s||function(t){At||(At=function(){const t={},e=Object.keys(jt),i=Object.keys(Et);let n,s,r,o,a;for(n=0;n>16&255,r>>8&255,255&r]}return t}(),At.transparent=[0,0,0,0]);const e=At[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||zt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Rt(this._rgb);return t&&(t.a=vt(t.a)),t}set rgb(t){this._rgb=Ft(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${vt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?(t=this._rgb,e=function(t){return pt(t.r)&&pt(t.g)&&pt(t.b)&&pt(t.a)}(t)?ft:gt,t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t):this._rgb;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=Dt(t),i=e[0],n=_t(e[1]),s=_t(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${s}%, ${vt(t.a)})`:`hsl(${i}, ${n}%, ${s}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,s=t.rgb;let r;const o=e===r?.5:e,a=2*o-1,l=n.a-s.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;r=1-c,n.r=255&c*n.r+r*s.r+.5,n.g=255&c*n.g+r*s.g+.5,n.b=255&c*n.b+r*s.b+.5,n.a=o*n.a+(1-o)*s.a,i.rgb=n}return i}clone(){return new It(this.rgb)}alpha(t){return this._rgb.a=yt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=mt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Lt(this._rgb,2,t),this}darken(t){return Lt(this._rgb,2,-t),this}saturate(t){return Lt(this._rgb,1,t),this}desaturate(t){return Lt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Dt(t);i[0]=Tt(i[0]+e),i=Ct(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function Nt(t){return new It(t)}const Vt=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Wt(t){return Vt(t)?t:Nt(t)}function Bt(t){return Vt(t)?t:Nt(t).saturate(.5).darken(.1).hexString()}const Ht=Object.create(null),Ut=Object.create(null);function Yt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Bt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Bt(e.borderColor),this.hoverColor=(t,e)=>Bt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return $t(this,t,e)}get(t){return Yt(this,t)}describe(t,e){return $t(Ut,t,e)}override(t,e){return $t(Ht,t,e)}route(t,e,i,n){const s=Yt(this,t),r=Yt(this,i),o="_"+e;Object.defineProperties(s,{[o]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[o],e=r[n];return b(t)?Object.assign({},e,t):v(t,e)},set(t){this[o]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function qt(t,e,i,n,s){let r=e[s];return r||(r=e[s]=t.measureText(s).width,i.push(s)),r>n&&(n=r),n}function Gt(t,e,i,n){let s=(n=n||{}).data=n.data||{},r=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(s=n.data={},r=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let o=0;const a=i.length;let l,c,h,d,u;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function Jt(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==r.strokeColor;let l,c;for(t.save(),t.font=s.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),p(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,r),l=0;lv(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of s)i[t]=+r(t)||0;return i}function de(t){return he(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ue(t){return he(t,["topLeft","topRight","bottomLeft","bottomRight"])}function fe(t){const e=de(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ge(t,e){t=t||{},e=e||Xt.font;let i=v(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=v(t.style,e.style);n&&!(""+n).match(le)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const s={family:v(t.family,e.family),lineHeight:ce(v(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:v(t.weight,e.weight),string:""};return s.string=function(t){return!t||p(t.size)||p(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(s),s}function pe(t,e,i,n){let s,r,o,a=!0;for(s=0,r=t.length;st[i]1;)n=r+s>>1,i(n)?r=n:s=n;return{lo:r,hi:s}}const xe=(t,e,i)=>be(t,i,n=>t[n][e]be(t,i,n=>t[n][e]>=i),ve=["push","pop","shift","splice","unshift"];function _e(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,s=n.indexOf(e);-1!==s&&n.splice(s,1),n.length>0||(ve.forEach(e=>{delete t[e]}),delete t._chartjs)}function we(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){L(n)||(n=Le("_fallback",t));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:s,override:s=>Me([s,...t],e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Pe(i,n,()=>function(t,e,i,n){let s;for(const r of e)if(s=Le(Se(r,t),i),L(s))return De(t,s)?je(i,n,t,s):s}(n,e,t,i)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Re(t).includes(e),ownKeys:t=>Re(t),set(t,e,i){const n=t._storage||(t._storage=s());return t[e]=n[e]=i,delete t._keys,!0}})}function Oe(t,e,i,n){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:ke(t,n),setContext:e=>Oe(t,e,i,n),override:s=>Oe(t.override(s),e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Pe(t,e,()=>function(t,e,i){const{_proxy:n,_context:s,_subProxy:r,_descriptors:o}=t;let a=n[e];return R(a)&&o.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:s,_context:r,_subProxy:o,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);return a.add(t),e=e(r,o||n),a.delete(t),De(t,e)&&(e=je(s._scopes,s,t,e)),e}(e,a,t,i)),m(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:s,_context:r,_subProxy:o,_descriptors:a}=i;if(L(r.index)&&n(t))e=e[r.index%e.length];else if(b(e[0])){const i=e,n=s._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=je(n,s,t,l);e.push(Oe(i,r,o&&o[t],a))}}return e}(e,a,t,o.isIndexable)),De(e,a)&&(a=Oe(a,s,r&&r[e],o)),a}(t,e,i)),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function ke(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:i,indexable:n,isScriptable:R(i)?i:()=>i,isIndexable:R(n)?n:()=>n}}const Se=(t,e)=>t?t+A(e):e,De=(t,e)=>b(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Pe(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Ce(t,e,i){return R(t)?t(e,i):t}const Te=(t,e)=>!0===t?e:"string"==typeof t?j(e,t):void 0;function Ee(t,e,i,n,s){for(const r of e){const e=Te(i,r);if(e){t.add(e);const r=Ce(e._fallback,i,s);if(L(r)&&r!==i&&r!==n)return r}else if(!1===e&&L(n)&&i!==n)return null}return!1}function je(t,e,i,n){const s=e._rootScopes,r=Ce(e._fallback,i,n),o=[...t,...s],a=new Set;a.add(n);let l=Ae(a,o,i,r||i,n);return null!==l&&(!L(r)||r===i||(l=Ae(a,o,r,l,n),null!==l))&&Me(Array.from(a),[""],s,r,()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const s=n[e];return m(s)&&b(i)?i:s}(e,i,n))}function Ae(t,e,i,n,s){for(;i;)i=Ee(t,e,i,n,s);return i}function Le(t,e){for(const i of e){if(!i)continue;const e=i[t];if(L(e))return e}}function Re(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}const Fe=Number.EPSILON||1e-14,ze=(t,e)=>e"x"===t?"y":"x";function Ne(t,e,i,n){const s=t.skip?e:t,r=e,o=i.skip?e:i,a=et(r,s),l=et(o,r);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:r.x-d*(o.x-s.x),y:r.y-d*(o.y-s.y)},next:{x:r.x+u*(o.x-s.x),y:r.y+u*(o.y-s.y)}}}function Ve(t,e,i){return Math.max(Math.min(t,i),e)}function We(t,e,i,n,s){let r,o,a,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const i=Ie(e),n=t.length,s=Array(n).fill(0),r=Array(n);let o,a,l,c=ze(t,0);for(o=0;owindow.getComputedStyle(t,null),$e=["top","right","bottom","left"];function Xe(t,e,i){const n={};i=i?"-"+i:"";for(let s=0;s<4;s++){const r=$e[s];n[r]=parseFloat(t[e+"-"+r+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function qe(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,s=Ye(i),r="border-box"===s.boxSizing,o=Xe(s,"padding"),a=Xe(s,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,s=n&&n.length?n[0]:i,{offsetX:r,offsetY:o}=s;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(r,o,i.target))a=r,l=o;else{const t=e.getBoundingClientRect();a=s.clientX-t.left,l=s.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),d=o.left+(h&&a.left),u=o.top+(h&&a.top);let{width:f,height:g}=e;return r&&(f-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/g*i.height/n)}}const Ge=t=>Math.round(10*t)/10;function Qe(t,e,i){const n=e||1,s=Math.floor(t.height*n),r=Math.floor(t.width*n);t.height=s/n,t.width=r/n;const o=t.canvas;return o.style&&(i||!o.style.height&&!o.style.width)&&(o.style.height=t.height+"px",o.style.width=t.width+"px"),(t.currentDevicePixelRatio!==n||o.height!==s||o.width!==r)&&(t.currentDevicePixelRatio=n,o.height=s,o.width=r,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Ke=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Ze(t,e){const i=function(t,e){return Ye(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Je(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ti(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function ei(t,e,i,n){const s={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},o=Je(t,s,i),a=Je(s,r,i),l=Je(r,e,i),c=Je(o,a,i),h=Je(a,l,i);return Je(c,h,i)}const ii=new Map;function ni(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ii.get(i);return n||(n=new Intl.NumberFormat(t,e),ii.set(i,n)),n}(e,i).format(t)}function si(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function ri(t){return"angle"===t?{between:st,compare:it,normalize:nt}:{between:ot,compare:(t,e)=>t-e,normalize:t=>t}}function oi({start:t,end:e,count:i,loop:n,style:s}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:s}}function ai(t,e,i){if(!i)return[t];const{property:n,start:s,end:r}=i,o=e.length,{compare:a,between:l,normalize:c}=ri(n),{start:h,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:s,end:r}=i,{between:o,normalize:a}=ri(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;cn({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(i-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=h.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const s=i.items;let r,o=s.length-1,a=!1;for(;o>=0;--o)r=s[o],r._active?(r._total>i.duration&&(i.duration=r._total),r.tick(t),a=!0):(s[o]=s[s.length-1],s.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),s.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=s.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const ui={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Wt(t||"transparent"),s=n.valid&&Wt(e||"transparent");return s&&s.valid?s.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class fi{constructor(t,e,i,n){const s=e[i];n=pe([t.to,n,s,t.from]);const r=pe([t.from,s,n]);this._active=!0,this._fn=t.fn||ui[t.type||typeof r],this._easing=ht[t.easing]||ht.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],s=i-this._start,r=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=pe([t.to,e,n,t.from]),this._from=pe([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,s=this._from,r=this._loop,o=this._to;let a;if(this._active=s!==o&&(r||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(s,o,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),Xt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),Xt.describe("animations",{_fallback:"animation"}),Xt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class pi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!b(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const n=t[i];if(!b(n))return;const s={};for(const t of gi)s[t]=n[t];(m(n.properties)&&n.properties||[i]).forEach(t=>{t!==i&&e.has(t)||e.set(t,s)})})}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const s=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i},()=>{}),s}_createAnimations(t,e){const i=this._properties,n=[],s=t.$animations||(t.$animations={}),r=Object.keys(e),o=Date.now();let a;for(a=r.length-1;a>=0;--a){const l=r[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=s[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,o);continue}h.cancel()}d&&d.duration?(s[l]=h=new fi(d,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(di.add(this._chart,i),!0):void 0}}function mi(t,e){const i=t&&t.options||{},n=i.reverse,s=void 0===i.min?e:0,r=void 0===i.max?e:0;return{start:n?r:s,end:n?s:r}}function bi(t,e){const i=[],n=t._getSortedDatasetMetas(e);let s,r;for(s=0,r=n.length;s0||!i&&e<0)return s.index}return null}function wi(t,e){const{chart:i,_cachedMeta:n}=t,s=i._stacks||(i._stacks={}),{iScale:r,vScale:o,index:a}=n,l=r.axis,c=o.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(r,o,n),d=e.length;let u;for(let t=0;ti[t].axis===e).shift()}function Oi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const ki=t=>"reset"===t||"none"===t,Si=(t,e)=>e?t:Object.assign({},t);class Di{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=yi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Oi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=e.xAxisID=v(i.xAxisID,Mi(t,"x")),r=e.yAxisID=v(i.yAxisID,Mi(t,"y")),o=e.rAxisID=v(i.rAxisID,Mi(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,s,r,o),c=e.vAxisID=n(a,r,s,o);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&_e(this._data,this),t._stacked&&Oi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(b(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,s,r;for(n=0,s=e.length;n{const e="_onData"+A(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const s=i.apply(this,t);return n._chartjs.listeners.forEach(i=>{"function"==typeof i[e]&&i[e](...t)}),s}})}))),this._syncList=[],this._data=e}var n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const s=e._stacked;e._stacked=yi(e.vScale,e),e.stack!==i.stack&&(n=!0,Oi(e),e.stack=i.stack),this._resyncElements(t),(n||s!==e._stacked)&&wi(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:s,_stacked:r}=i,o=s.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=m(n[t])?this.parseArrayData(i,n,t,e):b(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const s=()=>null===l[o]||d&&l[o]t&&!e.hidden&&e._stacked&&{keys:bi(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:s}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:s?i:Number.POSITIVE_INFINITY}}(o);let d,u;function f(){u=n[d];const e=u[o.axis];return!x(u[t.axis])||c>e||h=0;--d)if(!f()){this.updateRangeFromParsed(l,t,u,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,s,r;for(n=0,s=e.length;n=0&&tthis.getContext(i,n),h);return f.$shared&&(f.$shared=a,s[r]=Object.freeze(Si(f,a))),f}_resolveAnimations(t,e,i){const n=this.chart,s=this._cachedDataOpts,r="animation-"+e,o=s[r];if(o)return o;let a;if(!1!==n.options.animation){const n=this.chart.config,s=n.datasetAnimationScopeKeys(this._type,e),r=n.getOptionScopes(this.getDataset(),s);a=n.createResolver(r,this.getContext(t,i,e))}const l=new pi(n,a&&a.animations);return a&&a._cacheable&&(s[r]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ki(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){ki(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!ki(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const s=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,s=e.length,r=Math.min(s,n);r&&this.parse(0,r),s>n?this._insertElements(n,s-n,t):s{for(t.length+=e,o=t.length-1;o>=r;o--)t[o]=t[o-e]};for(a(s),o=t;ot-e))}return t._cache.$bar}(e,t.type);let n,s,r,o,a=e._length;const l=()=>{32767!==r&&-32768!==r&&(L(o)&&(a=Math.min(a,Math.abs(r-o)||a)),o=r)};for(n=0,s=i.length;nMath.abs(a)&&(l=a,c=o),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:r,min:o,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Ti(t,e,i,n){const s=t.iScale,r=t.vScale,o=s.getLabels(),a=s===r,l=[];let c,h,d,u;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,r)*s,d===r&&(m-=h/2),c=m+h),m===e.getPixelForValue(r)){const t=$(h)*e.getLineWidthForValue(r)/2;m+=t,h-=t}return{size:h,base:m,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,s=n.skipNull,r=v(n.maxBarThickness,1/0);let o,a;if(e.grouped){const i=s?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const s=e.pixels,r=s[t];let o=t>0?s[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,s=this.getParsed(t),r=i.getLabelForValue(s.x),o=n.getLabelForValue(s.y),a=s._custom;return{label:e.label,value:"("+r+", "+o+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:r,vScale:o}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=r.axis,d=o.axis;for(let a=e;a""}}}};class Ii extends Di{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let s,r,o=t=>+i[t];if(b(i[t])){const{key:t="value"}=this._parsing;o=e=>+j(i[e],t)}for(s=t,r=t+e;sst(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),g=(t,e,n)=>st(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),p=f(0,c,d),m=f(B,h,u),b=g(z,c,d),x=g(z+B,h,u);n=(p-b)/2,s=(m-x)/2,r=-(p+b)/2,o=-(m+x)/2}return{ratioX:n,ratioY:s,offsetX:r,offsetY:o}}(u,d,a),b=(i.width-r)/f,x=(i.height-r)/g,y=Math.max(Math.min(b,x)/2,0),v=_(this.options.radius,y),w=(v-Math.max(v*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*v,this.offsetY=m*v,n.total=this.calculateTotal(),this.outerRadius=v-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*h,0),this.updateElements(s,0,s.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,s=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*s/I)}updateElements(t,e,i,n){const s="reset"===n,r=this.chart,o=r.chartArea,a=r.options.animation,l=(o.left+o.right)/2,c=(o.top+o.bottom)/2,h=s&&a.animateScale,d=h?0:this.innerRadius,u=h?0:this.outerRadius,f=this.resolveDataElementOptions(e,n),g=this.getSharedOptions(f),p=this.includeOptions(n,g);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?I*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],s=ni(e._parsed[t],i.options.locale);return{label:n[t]||"",value:s}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,s,r,o,a;if(!t)for(n=0,s=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ii.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,n)=>{const s=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return m(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Ni extends Di{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:s}=e,r=this.chart._animationsDisabled;let{start:o,count:a}=function(t,e,i){const n=e.length;let s=0,r=n;if(t._sorted){const{iScale:o,_parsed:a}=t,l=o.axis,{min:c,max:h,minDefined:d,maxDefined:u}=o.getUserBounds();d&&(s=rt(Math.min(xe(a,o.axis,c).lo,i?n:xe(e,l,o.getPixelForValue(c)).lo),0,n-1)),r=u?rt(Math.max(xe(a,o.axis,h).hi+1,i?0:xe(e,l,o.getPixelForValue(h)).hi+1),s,n)-s:n-s}return{start:s,count:r}}(e,n,r);this._drawStart=o,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,s={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=s,!0;const r=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,s),r}(e)&&(o=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!s._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!r,options:l},t),this.updateElements(n,o,a,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:r,vScale:o,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),d=this.includeOptions(n,h),u=r.axis,f=o.axis,{spanGaps:g,segment:m}=this.options,b=q(g)?g:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||s||"none"===n;let y=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[u]-y[u]>b,m&&(g.parsed=i,g.raw=l.data[c]),d&&(g.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),x||this.updateElement(e,c,g,n),y=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Ni.id="line",Ni.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Ni.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Vi extends Di{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],s=ni(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:s}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),s=Math.max(n/2,0),r=(s-Math.max(i.cutoutPercentage?s/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=s-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,i,n){const s="reset"===n,r=this.chart,o=this.getDataset(),a=r.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,d=l.getIndexAngle(0)-.5*z;let u,f=d;const g=360/this.countVisibleElements();for(u=0;u{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++}),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?K(this.resolveDataElementOptions(t,e).angle||i):0}}Vi.id="polarArea",Vi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Vi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,n)=>{const s=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Wi extends Ii{}Wi.id="pie",Wi.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Bi extends Di{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],s=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const r={_loop:!0,_fullLoop:s.length===n.length,options:e};this.updateElement(i,void 0,r,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const s=this.getDataset(),r=this._cachedMeta.rScale,o="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};class Yi{constructor(t){this.options=t||{}}formats(){return Ui()}parse(t,e){return Ui()}format(t,e){return Ui()}add(t,e,i){return Ui()}diff(t,e,i){return Ui()}startOf(t,e,i){return Ui()}endOf(t,e){return Ui()}}Yi.override=function(t){Object.assign(Yi.prototype,t)};var $i={_date:Yi};function Xi(t,e){return"native"in t?{x:t.x,y:t.y}:qe(t,e)}function qi(t,e,i,n){const{controller:s,data:r,_sorted:o}=t,a=s._cachedMeta.iScale;if(a&&e===a.axis&&"r"!==e&&o&&r.length){const t=a._reversePixels?ye:xe;if(!n)return t(r,e,i);if(s._sharedOptions){const n=r[0],s="function"==typeof n.getRange&&n.getRange(e);if(s){const n=t(r,e,i-s),o=t(r,e,i+s);return{lo:n.lo,hi:o.hi}}}}return{lo:0,hi:r.length-1}}function Gi(t,e,i,n,s){const r=t.getSortedVisibleDatasetMetas(),o=i[e];for(let t=0,i=r.length;t{t[a](s[o],n)&&r.push({element:t,datasetIndex:e,index:i}),t.inRange(s.x,s.y,n)&&(l=!0)}),i.intersect&&!l?[]:r}var Ji={modes:{index(t,e,i,n){const s=Xi(e,t),r=i.axis||"x",o=i.intersect?Qi(t,s,r,n):Ki(t,s,r,!1,n),a=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=o[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})}),a):[]},dataset(t,e,i,n){const s=Xi(e,t),r=i.axis||"xy";let o=i.intersect?Qi(t,s,r,n):Ki(t,s,r,!1,n);if(o.length>0){const e=o[0].datasetIndex,i=t.getDatasetMeta(e).data;o=[];for(let t=0;tQi(t,Xi(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>Ki(t,Xi(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>Zi(t,e,{axis:"x",intersect:i.intersect},n),y:(t,e,i,n)=>Zi(t,e,{axis:"y",intersect:i.intersect},n)}};const tn=["left","top","right","bottom"];function en(t,e){return t.filter(t=>t.pos===e)}function nn(t,e){return t.filter(t=>-1===tn.indexOf(t.pos)&&t.box.axis===e)}function sn(t,e){return t.sort((t,i)=>{const n=e?i:t,s=e?t:i;return n.weight===s.weight?n.index-s.index:n.weight-s.weight})}function rn(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function on(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function an(t,e,i,n){const{pos:s,box:r}=i,o=t.maxPadding;if(!b(s)){i.size&&(t[s]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?r.height:r.width),i.size=e.size/e.count,t[s]+=i.size}r.getPadding&&on(o,r.getPadding());const a=Math.max(0,e.outerWidth-rn(o,t,"left","right")),l=Math.max(0,e.outerHeight-rn(o,t,"top","bottom")),c=a!==t.w,h=l!==t.h;return t.w=a,t.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function ln(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{n[t]=Math.max(e[t],i[t])}),n}(t?["left","right"]:["top","bottom"])}function cn(t,e,i,n){const s=[];let r,o,a,l,c,h;for(r=0,o=t.length,c=0;rt.box.fullSize),!0),n=sn(en(e,"left"),!0),s=sn(en(e,"right")),r=sn(en(e,"top"),!0),o=sn(en(e,"bottom")),a=nn(e,"x"),l=nn(e,"y");return{fullSize:i,leftAndTop:n.concat(r),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:en(e,"chartArea"),vertical:n.concat(s).concat(l),horizontal:r.concat(o).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;M(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const h=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:s,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/h,hBoxMaxHeight:o/2}),u=Object.assign({},s);on(u,fe(n));const f=Object.assign({maxPadding:u,w:r,h:o,x:s.left,y:s.top},s),g=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:s}=i;if(!t||!tn.includes(n))continue;const r=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=s}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:s}=e;let r,o,a;for(r=0,o=t.length;r{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class fn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class gn extends fn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const pn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},mn=t=>null===t||""===t,bn=!!Ke&&{passive:!0};function xn(t,e,i){t.canvas.removeEventListener(e,i,bn)}function yn(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function vn(t,e,i){const n=t.canvas,s=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||yn(i.addedNodes,n),e=e&&!yn(i.removedNodes,n);e&&i()});return s.observe(document,{childList:!0,subtree:!0}),s}function wn(t,e,i){const n=t.canvas,s=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||yn(i.removedNodes,n),e=e&&!yn(i.addedNodes,n);e&&i()});return s.observe(document,{childList:!0,subtree:!0}),s}const Mn=new Map;let On=0;function kn(){const t=window.devicePixelRatio;t!==On&&(On=t,Mn.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function Sn(t,e,i){const n=t.canvas,s=n&&He(n);if(!s)return;const r=d((t,e)=>{const n=s.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||r(i,n)});return o.observe(s),function(t,e){Mn.size||window.addEventListener("resize",kn),Mn.set(t,e)}(t,r),o}function Dn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Mn.delete(t),Mn.size||window.removeEventListener("resize",kn)}(t)}function Pn(t,e,i){const n=t.canvas,s=d(e=>{null!==t.ctx&&i(function(t,e){const i=pn[t.type]||t.type,{x:n,y:s}=qe(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==s?s:null}}(e,t))},t,t=>{const e=t[0];return[e,e.offsetX,e.offsetY]});return function(t,e,i){t.addEventListener(e,i,bn)}(n,e,s),s}class Cn extends fn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),s=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:s,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",mn(s)){const e=Ze(t,"width");void 0!==e&&(t.width=e)}if(mn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Ze(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach(t=>{const n=i[t];p(n)?e.removeAttribute(t):e.setAttribute(t,n)});const n=i.style||{};return Object.keys(n).forEach(t=>{e.style[t]=n[t]}),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),s={attach:vn,detach:wn,resize:Sn}[e]||Pn;n[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:Dn,detach:Dn,resize:Dn}[e]||xn)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return function(t,e,i,n){const s=Ye(t),r=Xe(s,"margin"),o=Ue(s.maxWidth,t,"clientWidth")||V,a=Ue(s.maxHeight,t,"clientHeight")||V,l=function(t,e,i){let n,s;if(void 0===e||void 0===i){const r=He(t);if(r){const t=r.getBoundingClientRect(),o=Ye(r),a=Xe(o,"border","width"),l=Xe(o,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ue(o.maxWidth,r,"clientWidth"),s=Ue(o.maxHeight,r,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||V,maxHeight:s||V}}(t,e,i);let{width:c,height:h}=l;if("content-box"===s.boxSizing){const t=Xe(s,"border","width"),e=Xe(s,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-r.width),h=Math.max(0,n?Math.floor(c/n):h-r.height),c=Ge(Math.min(c,o,l.maxWidth)),h=Ge(Math.min(h,a,l.maxHeight)),c&&!h&&(h=Ge(c/2)),{width:c,height:h}}(t,e,i,n)}isAttached(t){const e=He(t);return!(!e||!e.isConnected)}}class Tn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return q(this.x)&&q(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),n}}Tn.defaults={},Tn.defaultRoutes=void 0;const En={values:t=>m(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let s,r=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),r=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const o=Y(Math.abs(r)),a=Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),ni(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(Y(t)));return 1===n||2===n||5===n?En.numeric.call(this,t,e,i):""}};var jn={formatters:En};function An(t,e,i,n,s){const r=v(n,0),o=Math.min(v(s,t.length),t.length);let a,l,c,h=0;for(i=Math.ceil(i),s&&(a=s-n,i=a/Math.floor(a/i)),c=r;c<0;)h++,c=Math.round(r+h*i);for(l=Math.max(r,0);le.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:jn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),Xt.route("scale.ticks","color","","color"),Xt.route("scale.grid","color","","borderColor"),Xt.route("scale.grid","borderColor","","borderColor"),Xt.route("scale.title","color","","color"),Xt.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),Xt.describe("scales",{_fallback:"scale"}),Xt.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Ln=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Rn(t,e){const i=[],n=t.length/e,s=t.length;let r=0;for(;ro+1e-6)))return l}function zn(t){return t.drawTicks?t.tickLength:0}function In(t,e){if(!t.display)return 0;const i=ge(t.font,e),n=fe(t.padding);return(m(t.text)?t.text.length:1)*i.lineHeight+n.height}function Nn(t,e,i){let n=(t=>"start"===t?"left":"end"===t?"right":"center")(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class Vn extends Tn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=y(t,Number.POSITIVE_INFINITY),e=y(e,Number.NEGATIVE_INFINITY),i=y(i,Number.POSITIVE_INFINITY),n=y(n,Number.NEGATIVE_INFINITY),{min:y(t,i),max:y(e,n),minDefined:x(t),maxDefined:x(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:s,maxDefined:r}=this.getUserBounds();if(s&&r)return{min:i,max:n};const o=this.getMatchingVisibleMetas();for(let a=0,l=o.length;an?n:i,n=s&&i>n?i:n,{min:y(i,y(n,i)),max:y(n,y(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){w(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:s,ticks:r}=this.options,o=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:s}=t,r=_(e,(s-n)/2),o=(t,e)=>i&&0===t?0:t+e;return{min:o(n,-Math.abs(r)),max:o(s,r)}}(this,s,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=on)return function(t,e,i,n){let s,r=0,o=i[0];for(n=Math.ceil(n),s=0;st-e).pop(),e}(n);for(let t=0,e=r.length-1;ts)return e}return Math.max(s,1)}(s,e,n);if(r>0){let t,i;const n=r>1?Math.round((a-o)/(r-1)):null;for(An(e,l,c,p(n)?0:o-n,o),t=0,i=r-1;t=s||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,d=c.highest.height,u=rt(this.chart.width-h,0,this.maxWidth);r=t.offset?this.maxWidth/i:u/(i-1),h+6>r&&(r=u/(i-(t.offset?.5:1)),o=this.maxHeight-zn(t.grid)-e.padding-In(t.title,this.chart.options.font),a=Math.sqrt(h*h+d*d),l=Z(Math.min(Math.asin(rt((c.highest.height+6)/r,-1,1)),Math.asin(rt(o/a,-1,1))-Math.asin(rt(d/a,-1,1)))),l=Math.max(n,Math.min(s,l))),this.labelRotation=l}afterCalculateLabelRotation(){w(this.options.afterCalculateLabelRotation,[this])}beforeFit(){w(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:s}}=this,r=this._isVisible(),o=this.isHorizontal();if(r){const r=In(n,e.options.font);if(o?(t.width=this.maxWidth,t.height=zn(s)+r):(t.height=this.maxHeight,t.width=zn(s)+r),i.display&&this.ticks.length){const{first:e,last:n,widest:s,highest:r}=this._getLabelSizes(),a=2*i.padding,l=K(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(o){const e=i.mirror?0:h*s.width+c*r.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*s.width+h*r.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:s,padding:r},position:o}=this.options,a=0!==this.labelRotation,l="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;a?l?(h=n*t.width,d=i*e.height):(h=i*t.height,d=n*e.width):"start"===s?d=e.width:"end"===s?h=t.width:(h=t.width/2,d=e.width/2),this.paddingLeft=Math.max((h-o+r)*this.width/(this.width-o),0),this.paddingRight=Math.max((d-c+r)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),this.paddingTop=i+r,this.paddingBottom=n+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){w(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let s;if(n>e){for(s=0;s({width:s[t]||0,height:r[t]||0});return{first:O(0),last:O(e-1),widest:O(_),highest:O(w),widths:s,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return rt(this._alignToPixels?Qt(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&to*n?o/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:s,position:r}=n,o=s.offset,a=this.isHorizontal(),l=this.ticks.length+(o?1:0),c=zn(s),h=[],d=s.setContext(this.getContext()),u=d.drawBorder?d.borderWidth:0,f=u/2,g=function(t){return Qt(i,t,u)};let p,m,x,y,_,w,M,O,k,S,D,P;if("top"===r)p=g(this.bottom),w=this.bottom-c,O=p-f,S=g(t.top)+f,P=t.bottom;else if("bottom"===r)p=g(this.top),S=t.top,P=g(t.bottom)-f,w=p+f,O=this.top+c;else if("left"===r)p=g(this.right),_=this.right-c,M=p-f,k=g(t.left)+f,D=t.right;else if("right"===r)p=g(this.left),k=t.left,D=g(t.right)-f,_=p+f,M=this.left+c;else if("x"===e){if("center"===r)p=g((t.top+t.bottom)/2+.5);else if(b(r)){const t=Object.keys(r)[0],e=r[t];p=g(this.chart.scales[t].getPixelForValue(e))}S=t.top,P=t.bottom,w=p+f,O=w+c}else if("y"===e){if("center"===r)p=g((t.left+t.right)/2);else if(b(r)){const t=Object.keys(r)[0],e=r[t];p=g(this.chart.scales[t].getPixelForValue(e))}_=p-f,M=_-c,k=t.left,D=t.right}const C=v(n.ticks.maxTicksLimit,l),T=Math.max(1,Math.ceil(l/C));for(m=0;me.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,r;const o=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(s=0,r=n.length;s{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let s,r;for(s=0,r=e.length;s{const n=i.split("."),s=n.pop(),r=[t].concat(n).join("."),o=e[i].split("."),a=o.pop(),l=o.join(".");Xt.route(r,s,l,a)})}(e,t.defaultRoutes),t.descriptors&&Xt.describe(e,t.descriptors)}(t,r,i),this.override&&Xt.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in Xt[n]&&(delete Xt[n][i],this.override&&delete Ht[i])}}var Bn=new class{constructor(){this.controllers=new Wn(Di,"datasets",!0),this.elements=new Wn(Tn,"elements"),this.plugins=new Wn(Object,"plugins"),this.scales=new Wn(Vn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):M(e,e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)})})}_exec(t,e,i){const n=A(t);w(i["before"+n],[],i),e[t](i),w(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Un(t,e){return e||!1!==t?!0===t?{}:t:null}function Yn(t,e,i,n){const s=t.pluginScopeKeys(e),r=t.getOptionScopes(i,s);return t.createResolver(r,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function $n(t,e){const i=Xt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Xn(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function qn(t){const e=t.options||(t.options={});e.plugins=v(e.plugins,{}),e.scales=function(t,e){const i=Ht[t.type]||{scales:{}},n=e.scales||{},s=$n(t.type,e),r=Object.create(null),o=Object.create(null);return Object.keys(n).forEach(t=>{const e=n[t];if(!b(e))return console.error("Invalid scale configuration for scale: "+t);if(e._proxy)return console.warn("Ignoring resolver passed as options for scale: "+t);const a=Xn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,s),c=i.scales||{};r[a]=r[a]||t,o[t]=C(Object.create(null),[{axis:a},e,c[a],c[l]])}),t.data.datasets.forEach(i=>{const s=i.type||t.type,a=i.indexAxis||$n(s,e),l=(Ht[s]||{}).scales||{};Object.keys(l).forEach(t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),s=i[e+"AxisID"]||r[e]||e;o[s]=o[s]||Object.create(null),C(o[s],[{axis:e},n[s],l[t]])})}),Object.keys(o).forEach(t=>{const e=o[t];C(e,[Xt.scales[e.type],Xt.scale])}),o}(t,e)}function Gn(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Qn=new Map,Kn=new Set;function Zn(t,e){let i=Qn.get(t);return i||(i=e(),Qn.set(t,i),Kn.add(i)),i}const Jn=(t,e,i)=>{const n=j(e,i);void 0!==n&&t.add(n)};class ts{constructor(t){this._config=function(t){return(t=t||{}).data=Gn(t.data),qn(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Gn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),qn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Zn(t,()=>[["datasets."+t,""]])}datasetAnimationScopeKeys(t,e){return Zn(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,"transitions."+e],["datasets."+t,""]])}datasetElementScopeKeys(t,e){return Zn(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,"datasets."+t,"elements."+e,""]])}pluginScopeKeys(t){const e=t.id;return Zn(`${this.type}-plugin-${e}`,()=>[["plugins."+e,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:s}=this,r=this._cachedScopes(t,i),o=r.get(e);if(o)return o;const a=new Set;e.forEach(e=>{t&&(a.add(t),e.forEach(e=>Jn(a,t,e))),e.forEach(t=>Jn(a,n,t)),e.forEach(t=>Jn(a,Ht[s]||{},t)),e.forEach(t=>Jn(a,Xt,t)),e.forEach(t=>Jn(a,Ut,t))});const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),Kn.has(e)&&r.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Ht[e]||{},Xt.datasets[e]||{},{type:e},Xt,Ut]}resolveNamedOptions(t,e,i,n=[""]){const s={$shared:!0},{resolver:r,subPrefixes:o}=es(this._resolverCache,t,n);let a=r;(function(t,e){const{isScriptable:i,isIndexable:n}=ke(t);for(const s of e){const e=i(s),r=n(s),o=(r||e)&&t[s];if(e&&(R(o)||is(o))||r&&m(o))return!0}return!1})(r,e)&&(s.$shared=!1,a=Oe(r,i=R(i)?i():i,this.createResolver(t,i,o)));for(const t of e)s[t]=a[t];return s}createResolver(t,e,i=[""],n){const{resolver:s}=es(this._resolverCache,t,i);return b(e)?Oe(s,e,void 0,n):s}}function es(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const s=i.join();let r=n.get(s);return r||(r={resolver:Me(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},n.set(s,r)),r}const is=t=>b(t)&&Object.getOwnPropertyNames(t).reduce((e,i)=>e||R(t[i]),!1),ns=["top","bottom","left","right","chartArea"];function ss(t,e){return"top"===t||"bottom"===t||-1===ns.indexOf(t)&&"x"===e}function rs(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function os(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),w(i&&i.onComplete,[t],e)}function as(t){const e=t.chart,i=e.options.animation;w(i&&i.onProgress,[t],e)}function ls(t){return Be()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const cs={},hs=t=>{const e=ls(t);return Object.values(cs).filter(t=>t.canvas===e).pop()};function ds(t,e,i){const n=Object.keys(t);for(const s of n){const n=+s;if(n>=e){const r=t[s];delete t[s],(i>0||n>e)&&(t[n+i]=r)}}}class us{constructor(t,e){const i=this.config=new ts(e),n=ls(t),s=hs(n);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas can be reused.");const r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Be()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?gn:Cn}(n)),this.platform.updateConfig(i);const o=this.platform.acquireContext(n,r.aspectRatio),a=o&&o.canvas,l=a&&a.height,c=a&&a.width;this.id=g(),this.ctx=o,this.canvas=a,this.width=c,this.height=l,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Hn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}(t=>this.update(t),r.resizeDelay||0),this._dataChanges=[],cs[this.id]=this,o&&a?(di.listen(this,"complete",os),di.listen(this,"progress",as),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:s}=this;return p(t)?e&&s?s:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Qe(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Kt(this.canvas,this.ctx),this}stop(){return di.stop(this),this}resize(t,e){di.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(n,t,e,s),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Qe(this,o,!0)&&(this.notifyPlugins("resize",{size:r}),w(i.onResize,[this,r],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){M(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{});let s=[];e&&(s=s.concat(Object.keys(e).map(t=>{const i=e[t],n=Xn(t,i),s="r"===n,r="x"===n;return{options:i,dposition:s?"chartArea":r?"bottom":"left",dtype:s?"radialLinear":r?"category":"linear"}}))),M(s,e=>{const s=e.options,r=s.id,o=Xn(r,s),a=v(s.type,e.dtype);void 0!==s.position&&ss(s.position,o)===ss(e.dposition)||(s.position=e.dposition),n[r]=!0;let l=null;r in i&&i[r].type===a?l=i[r]:(l=new(Bn.getScale(a))({id:r,type:a,ctx:this.ctx,chart:this}),i[l.id]=l),l.init(s,t)}),M(n,(t,e)=>{t||delete i[e]}),M(i,t=>{un.configure(this,t,t.options),un.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let t=0,e=this.data.datasets.length;t{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(rs("z","_idx"));const{_active:o,_lastEvent:a}=this;a?this._eventHandler(a,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){M(this.scales,t=>{un.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);F(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:s}of e)ds(t,n,"_removeElements"===i?-s:s)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),n=i(0);for(let t=1;tt.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;un.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],M(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,s=this.chartArea,r={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",r)&&(n&&te(e,{left:!1===i.left?0:s.left-i.left,right:!1===i.right?this.width:s.right+i.right,top:!1===i.top?0:s.top-i.top,bottom:!1===i.bottom?this.height:s.bottom+i.bottom}),t.controller.draw(),n&&ee(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}getElementsAtEventForMode(t,e,i,n){const s=Ji.modes[e];return"function"==typeof s?s(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(t=>t&&t._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=me(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",s=this.getDatasetMeta(t),r=s.controller._resolveAnimations(void 0,n);L(e)?(s.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(s,{visible:i}),this.update(e=>e.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),di.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};M(this.options.events,t=>i(t,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},s=(t,e)=>{this.canvas&&this.resize(t,e)};let r;const o=()=>{n("attach",o),this.attached=!0,this.resize(),i("resize",s),i("detach",r)};r=()=>{this.attached=!1,n("resize",s),this._stop(),this._resize(0,0),i("attach",o)},e.isAttached(this.canvas)?o():r()}unbindEvents(){M(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},M(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let s,r,o,a;for("dataset"===e&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+n+"DatasetHoverStyle"]()),o=0,a=t.length;o{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}});!O(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,s=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),r=s(e,t),o=i?t:s(t,e);r.length&&this.updateHoverStyle(r,n.mode,!1),o.length&&n.mode&&this.updateHoverStyle(o,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:Jt(t,this.chartArea,this._minPadding)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const s=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(s||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:s}=this,r=e,o=this._getActiveElements(t,n,i,r),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,a);i&&(this._lastEvent=null,w(s.onHover,[t,o,this],this),a&&w(s.onClick,[t,o,this],this));const c=!O(o,n);return(c||e)&&(this._active=o,this._updateHoverStyles(o,n,e)),this._lastEvent=l,c}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,n)}}const fs=()=>M(us.instances,t=>t._plugins.invalidate());function gs(t,e,i){const{startAngle:n,pixelMargin:s,x:r,y:o,outerRadius:a,innerRadius:l}=e;let c=s/a;t.beginPath(),t.arc(r,o,a,n-c,i+c),l>s?(c=s/l,t.arc(r,o,l,i+c,n-c,!0)):t.arc(r,o,s,i+B,n-B),t.closePath(),t.clip()}function ps(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function ms(t,e,i,n,s){const{x:r,y:o,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),d=c>0?c+n+i+l:0;let u=0;const f=s-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;u=(f-(0!==t?f*t/(t+n):f))/2}const g=(f-Math.max(.001,f*h-i/z)/h)/2,p=a+g+u,m=s-g-u,{outerStart:b,outerEnd:x,innerStart:y,innerEnd:v}=function(t,e,i,n){const s=he(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),r=(i-e)/2,o=Math.min(r,n*e/2),a=t=>{const e=(i-Math.min(r,t))*n/2;return rt(t,0,Math.min(r,e))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:rt(s.innerStart,0,o),innerEnd:rt(s.innerEnd,0,o)}}(e,d,h,m-p),_=h-b,w=h-x,M=p+b/_,O=m-x/w,k=d+y,S=d+v,D=p+y/k,P=m-v/S;if(t.beginPath(),t.arc(r,o,h,M,O),x>0){const e=ps(w,O,r,o);t.arc(e.x,e.y,x,O,m+B)}const C=ps(S,m,r,o);if(t.lineTo(C.x,C.y),v>0){const e=ps(S,P,r,o);t.arc(e.x,e.y,v,m+B,P+Math.PI)}if(t.arc(r,o,d,m-v/d,p+y/d,!0),y>0){const e=ps(k,D,r,o);t.arc(e.x,e.y,y,D+Math.PI,p-B)}const T=ps(_,p,r,o);if(t.lineTo(T.x,T.y),b>0){const e=ps(_,M,r,o);t.arc(e.x,e.y,b,p-B,M)}t.closePath()}Object.defineProperties(us,{defaults:{enumerable:!0,value:Xt},instances:{enumerable:!0,value:cs},overrides:{enumerable:!0,value:Ht},registry:{enumerable:!0,value:Bn},version:{enumerable:!0,value:"3.7.1"},getChart:{enumerable:!0,value:hs},register:{enumerable:!0,value:(...t)=>{Bn.add(...t),fs()}},unregister:{enumerable:!0,value:(...t)=>{Bn.remove(...t),fs()}}});class bs extends Tn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:s,distance:r}=tt(n,{x:t,y:e}),{startAngle:o,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2,u=v(h,a-o)>=I||st(s,o,a),f=ot(r,l+d,c+d);return u&&f}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:s,innerRadius:r,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+s)/2,h=(r+o+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,s=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>I?Math.floor(i/I):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let r=0;if(n){r=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*r,Math.sin(e)*r),this.circumference>=z&&(r=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const o=function(t,e,i,n){const{fullCircles:s,startAngle:r,circumference:o}=e;let a=e.endAngle;if(s){ms(t,e,i,n,r+I);for(let e=0;ea&&r>a;return{count:n,start:l,loop:e.loop,ilen:c(o+(c?a-t:t))%r,y=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=s[x(0)],t.moveTo(d.x,d.y)),h=0;h<=a;++h){if(d=s[x(h)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(ig&&(g=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),u=n,b=0,f=g=i),p=i}y()}function Ms(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?_s:ws}bs.id="arc",bs.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},bs.defaultRoutes={backgroundColor:"backgroundColor"};const Os="function"==typeof Path2D;class ks extends Tn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;We(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,s=i.length;if(!s)return[];const r=!!t._loop,{start:o,end:a}=function(t,e,i,n){let s=0,r=e-1;if(i&&!n)for(;ss&&t[r%e].skip;)r--;return r%=e,{start:s,end:r}}(i,s,r,n);return function(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const s=t._chart.getContext(),r=ci(t.options),{_datasetIndex:o,options:{spanGaps:a}}=t,l=i.length,c=[];let h=r,d=e[0].start,u=d;function f(t,e,n,s){const r=a?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=r;for(;i[e%l].skip;)e+=r;t%l!=e%l&&(c.push({start:t%l,end:e%l,loop:n,style:s}),h=s,d=e%l)}}for(const t of e){d=a?d:t.start;let e,r=i[d%l];for(u=d+1;u<=t.end;u++){const a=i[u%l];e=ci(n.setContext(me(s,{type:"segment",p0:r,p1:a,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:o}))),hi(e,h)&&f(d,u-1,t.loop,h),r=a,h=e}d"borderDash"!==t&&"fill"!==t};class Ds extends Tn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:s,y:r}=this.getProps(["x","y"],i);return Math.pow(t-s,2)+Math.pow(e-r,2)=i)&&s):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}As.id="bar",As.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},As.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Rs{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:s,radius:r}=this;return e=e||{start:0,end:I},t.arc(n,s,r,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,s=t.angle;return{x:e+Math.cos(s)*n,y:i+Math.sin(s)*n,angle:s}}}function Fs(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function zs(t,e,i){const n=[];for(let s=0;s{e=Fs(t,e,s);const o=s[t],a=s[e];null!==n?(r.push({x:o.x,y:n}),r.push({x:a.x,y:n})):null!==i&&(r.push({x:i,y:o.y}),r.push({x:i,y:a.y}))}),r}(t,e),i.length?new ks({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Ws(t,e,i){let n=t[e].fill;const s=[e];let r;if(!i)return n;for(;!1!==n&&-1===s.indexOf(n);){if(!x(n))return n;if(r=t[n],!r)return!1;if(r.visible)return n;s.push(n),n=r.fill}return!1}function Bs(t,e,i){const{segments:n,points:s}=e;let r=!0,o=!1;t.beginPath();for(const a of n){const{start:n,end:l}=a,c=s[n],h=s[Fs(n,l,s)];r?(t.moveTo(c.x,c.y),r=!1):(t.lineTo(c.x,i),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,a,{move:o}),o?t.closePath():t.lineTo(h.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function Hs(t,e,i,n){if(n)return;let s=e[t],r=i[t];return"angle"===t&&(s=nt(s),r=nt(r)),{property:t,start:s,end:r}}function Us(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Ys(t,e,i){const{top:n,bottom:s}=e.chart.chartArea,{property:r,start:o,end:a}=i||{};"x"===r&&(t.beginPath(),t.rect(o,n,a-o,s-n),t.clip())}function $s(t,e,i,n){const s=e.interpolate(i,n);s&&t.lineTo(s.x,s.y)}function Xs(t,e){const{line:i,target:n,property:s,color:r,scale:o}=e,a=function(t,e,i){const n=t.segments,s=t.points,r=e.points,o=[];for(const t of n){let{start:n,end:a}=t;a=Fs(n,a,s);const l=Hs(i,s[n],s[a],t.loop);if(!e.segments){o.push({source:t,target:l,start:s[n],end:s[a]});continue}const c=li(e,l);for(const e of c){const n=Hs(i,r[e.start],r[e.end],e.loop),a=ai(t,s,n);for(const t of a)o.push({source:t,target:e,start:{[i]:Us(l,n,"start",Math.max)},end:{[i]:Us(l,n,"end",Math.min)}})}}return o}(i,n,s);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=r}={}}=e,d=!0!==n;t.save(),t.fillStyle=a,Ys(t,o,d&&Hs(s,c,h)),t.beginPath();const u=!!i.pathSegment(t,e);let f;if(d){u?t.closePath():$s(t,n,h,s);const e=!!n.pathSegment(t,l,{move:u,reverse:!0});f=u&&e,f||$s(t,n,c,s)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function qs(t,e,i){const n=Ns(e),{line:s,scale:r,axis:o}=e,a=s.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:d=c}=l||{};n&&s.points.length&&(te(t,i),function(t,e){const{line:i,target:n,above:s,below:r,area:o,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&r!==s&&(Bs(t,n,o.top),Xs(t,{line:i,target:n,color:s,scale:a,property:l}),t.restore(),t.save(),Bs(t,n,o.bottom)),Xs(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore()}(t,{line:s,target:n,above:h,below:d,area:i,scale:r,axis:o}),ee(t))}var Gs={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,s=[];let r,o,a,l;for(o=0;o=0;--e){const i=s[e].$filler;i&&(i.line.updateControlPoints(r,i.axis),n&&qs(t.ctx,i,r))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&qs(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&qs(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};new WeakMap;const Qs={average(t){if(!t.length)return!1;let e,i,n=0,s=0,r=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Js(t,e){const{element:i,datasetIndex:n,index:s}=e,r=t.getDatasetMeta(n).controller,{label:o,value:a}=r.getLabelAndValue(s);return{chart:t,label:o,parsed:r.getParsed(s),raw:t.data.datasets[n].data[s],formattedValue:a,dataset:r.getDataset(),dataIndex:s,datasetIndex:n,element:i}}function tr(t,e){const i=t.chart.ctx,{body:n,footer:s,title:r}=t,{boxWidth:o,boxHeight:a}=e,l=ge(e.bodyFont),c=ge(e.titleFont),h=ge(e.footerFont),d=r.length,u=s.length,f=n.length,g=fe(e.padding);let p=g.height,m=0,b=n.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);b+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),b&&(p+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing),u&&(p+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let x=0;const y=function(t){m=Math.max(m,i.measureText(t).width+x)};return i.save(),i.font=c.string,M(t.title,y),i.font=l.string,M(t.beforeBody.concat(t.afterBody),y),x=e.displayColors?o+2+e.boxPadding:0,M(n,t=>{M(t.before,y),M(t.lines,y),M(t.after,y)}),x=0,i.font=h.string,M(t.footer,y),i.restore(),m+=g.width,{width:m,height:p}}function er(t,e,i,n){const{x:s,width:r}=i,{width:o,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=s<=(a+l)/2?"left":"right":s<=r/2?c="left":s>=o-r/2&&(c="right"),function(t,e,i,n){const{x:s,width:r}=n,o=i.caretSize+i.caretPadding;return"left"===t&&s+r+o>e.width||"right"===t&&s-r-o<0||void 0}(c,t,e,i)&&(c="center"),c}function ir(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||er(t,e,i,n),yAlign:n}}function nr(t,e,i,n){const{caretSize:s,caretPadding:r,cornerRadius:o}=t,{xAlign:a,yAlign:l}=i,c=s+r,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=ue(o);let g=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const p=function(t,e,i){let{y:n,height:s}=t;return"top"===e?n+=i:n-="bottom"===e?s+i:s/2,n}(e,l,c);return"center"===l?"left"===a?g+=c:"right"===a&&(g-=c):"left"===a?g-=Math.max(h,u)+s:"right"===a&&(g+=Math.max(d,f)+s),{x:rt(g,0,n.width-e.width),y:rt(p,0,n.height-e.height)}}function sr(t,e,i){const n=fe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function rr(t){return Ks([],Zs(t))}function or(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class ar extends Tn{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,s=new pi(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=(this,me(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"})))}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),s=i.title.apply(this,[t]),r=i.afterTitle.apply(this,[t]);let o=[];return o=Ks(o,Zs(n)),o=Ks(o,Zs(s)),o=Ks(o,Zs(r)),o}getBeforeBody(t,e){return rr(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return M(t,t=>{const e={before:[],lines:[],after:[]},s=or(i,t);Ks(e.before,Zs(s.beforeLabel.call(this,t))),Ks(e.lines,s.label.call(this,t)),Ks(e.after,Zs(s.afterLabel.call(this,t))),n.push(e)}),n}getAfterBody(t,e){return rr(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),s=i.footer.apply(this,[t]),r=i.afterFooter.apply(this,[t]);let o=[];return o=Ks(o,Zs(n)),o=Ks(o,Zs(s)),o=Ks(o,Zs(r)),o}_createItems(t){const e=this._active,i=this.chart.data,n=[],s=[],r=[];let o,a,l=[];for(o=0,a=e.length;ot.filter(e,n,s,i))),t.itemSort&&(l=l.sort((e,n)=>t.itemSort(e,n,i))),M(l,e=>{const i=or(t.callbacks,e);n.push(i.labelColor.call(this,e)),s.push(i.labelPointStyle.call(this,e)),r.push(i.labelTextColor.call(this,e))}),this.labelColors=n,this.labelPointStyles=s,this.labelTextColors=r,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let s,r=[];if(n.length){const t=Qs[i.position].call(this,n,this._eventPosition);r=this._createItems(i),this.title=this.getTitle(r,i),this.beforeBody=this.getBeforeBody(r,i),this.body=this.getBody(r,i),this.afterBody=this.getAfterBody(r,i),this.footer=this.getFooter(r,i);const e=this._size=tr(this,i),o=Object.assign({},t,e),a=ir(this.chart,i,o),l=nr(i,o,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,s={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(s={opacity:0});this._tooltipItems=r,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const s=this.getCaretPosition(t,i,n);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:s}=this,{caretSize:r,cornerRadius:o}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=ue(o),{x:d,y:u}=t,{width:f,height:g}=e;let p,m,b,x,y,v;return"center"===s?(y=u+g/2,"left"===n?(p=d,m=p-r,x=y+r,v=y-r):(p=d+f,m=p+r,x=y-r,v=y+r),b=p):(m="left"===n?d+Math.max(a,c)+r:"right"===n?d+f-Math.max(l,h)-r:this.caretX,"top"===s?(x=u,y=x-r,p=m-r,b=m+r):(x=u+g,y=x+r,p=m+r,b=m-r),v=x),{x1:p,x2:m,x3:b,y1:x,y2:y,y3:v}}drawTitle(t,e,i){const n=this.title,s=n.length;let r,o,a;if(s){const l=si(i.rtl,this.x,this.width);for(t.x=sr(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",r=ge(i.titleFont),o=i.titleSpacing,e.fillStyle=i.titleColor,e.font=r.string,a=0;a0!==t)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,oe(t,{x:e,y:g,w:l,h:a,radius:o}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),oe(t,{x:i,y:g+1,w:l-2,h:a-2,radius:o}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(e,g,l,a),t.strokeRect(e,g,l,a),t.fillStyle=r.backgroundColor,t.fillRect(i,g+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:s,bodyAlign:r,displayColors:o,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=ge(i.bodyFont);let d=h.lineHeight,u=0;const f=si(i.rtl,this.x,this.width),g=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+s},p=f.textAlign(r);let m,b,x,y,v,_,w;for(e.textAlign=r,e.textBaseline="middle",e.font=h.string,t.x=sr(this,p,i),e.fillStyle=i.bodyColor,M(this.beforeBody,g),u=o&&"right"!==p?"center"===r?l/2+c:l+2+c:0,y=0,_=n.length;y<_;++y){for(m=n[y],b=this.labelTextColors[y],e.fillStyle=b,M(m.before,g),x=m.lines,o&&x.length&&(this._drawColorBox(e,t,y,f,i),d=Math.max(h.lineHeight,a)),v=0,w=x.length;v0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,s=i&&i.y;if(n||s){const i=Qs[t.position].call(this,this._active,this._eventPosition);if(!i)return;const r=this._size=tr(this,t),o=Object.assign({},i,this._size),a=ir(e,t,o),l=nr(t,o,a,e);n._to===l.x&&s._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=r.width,this.height=r.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},s={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const r=fe(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(s,t,n,e),function(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}(t,e.textDirection),s.y+=r.top,this.drawTitle(s,t,e),this.drawBody(s,t,e),this.drawFooter(s,t,e),function(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map(({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),s=!O(i,n),r=this._positionChanged(n,e);(s||r)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,s=this._active||[],r=this._getActiveElements(t,s,e,i),o=this._positionChanged(r,t),a=e||!O(r,s)||o;return a&&(this._active=r,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,i,n){const s=this.options;if("mouseout"===t.type)return[];if(!n)return e;const r=this.chart.getElementsAtEventForMode(t,s.mode,s,i);return s.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:s}=this,r=Qs[s.position].call(this,t,e);return!1!==r&&(i!==r.x||n!==r.y)}}ar.positioners=Qs;var lr={id:"tooltip",_element:ar,positioners:Qs,afterInit(t,e,i){i&&(t.tooltip=new ar({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:f,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};class cr extends Vn{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(p(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:rt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,i,n){const s=t.indexOf(e);return-1===s?((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n):s!==t.lastIndexOf(e)?i:s}(i,t,v(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let s=this.getLabels();s=0===t&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function hr(t,e,{horizontal:i,minRotation:n}){const s=K(n),r=(i?Math.sin(s):Math.cos(s))||.001,o=.75*e*(""+t).length;return Math.min(e/r,o)}cr.id="category",cr.defaults={ticks:{callback:cr.prototype.getLabelForValue}};class dr extends Vn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return p(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:s}=this;const r=t=>n=e?n:t,o=t=>s=i?s:t;if(t){const t=$(n),e=$(s);t<0&&e<0?o(0):t>0&&e>0&&r(0)}if(n===s){let e=1;(s>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*s)),o(s+e),t||r(n-e)}this.min=n,this.max=s}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=function(t,e){const i=[],{bounds:n,step:s,min:r,max:o,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:d}=t,u=s||1,f=c-1,{min:g,max:m}=e,b=!p(r),x=!p(o),y=!p(l),v=(m-g)/(h+1);let _,w,M,O,k=X((m-g)/f/u)*u;if(k<1e-14&&!b&&!x)return[{value:g},{value:m}];O=Math.ceil(m/k)-Math.floor(g/k),O>f&&(k=X(O*k/f/u)*u),p(a)||(_=Math.pow(10,a),k=Math.ceil(k*_)/_),"ticks"===n?(w=Math.floor(g/k)*k,M=Math.ceil(m/k)*k):(w=g,M=m),b&&x&&s&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((o-r)/s,k/1e3)?(O=Math.round(Math.min((o-r)/k,c)),k=(o-r)/O,w=r,M=o):y?(w=b?r:w,M=x?o:M,O=l-1,k=(M-w)/O):(O=(M-w)/k,O=G(O,Math.round(O),k/1e3)?Math.round(O):Math.ceil(O));const S=Math.max(J(k),J(w));_=Math.pow(10,p(a)?S:a),w=Math.round(w*_)/_,M=Math.round(M*_)/_;let D=0;for(b&&(d&&w!==r?(i.push({value:r}),w0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=x(t)?Math.max(0,t):null,this.max=x(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const s=e=>i=t?i:e,r=t=>n=e?n:t,o=(t,e)=>Math.pow(10,Math.floor(Y(t))+e);i===n&&(i<=0?(s(1),r(10)):(s(o(i,-1)),r(o(n,1)))),i<=0&&s(o(n,-1)),n<=0&&r(o(i,1)),this._zero&&this.min!==this._suggestedMin&&i===o(this.min,0)&&s(o(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(Y(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),s=[];let r=y(t.min,Math.pow(10,Math.floor(Y(e.min)))),o=Math.floor(Y(r)),a=Math.floor(r/Math.pow(10,o)),l=o<0?Math.pow(10,Math.abs(o)):1;do{s.push({value:r,major:fr(r)}),++a,10===a&&(a=1,++o,l=o>=0?1:l),r=Math.round(a*Math.pow(10,o)*l)/l}while(os?{start:e-i,end:e}:{start:e,end:e+i}}function br(t,e,i,n,s){const r=Math.abs(Math.sin(i)),o=Math.abs(Math.cos(i));let a=0,l=0;n.starte.r&&(a=(n.end-e.r)/r,t.r=Math.max(t.r,e.r+a)),s.starte.b&&(l=(s.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function xr(t){return 0===t||180===t?"center":t<180?"left":"right"}function yr(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function vr(t,e,i,n){const{ctx:s}=t;if(i)s.arc(t.xCenter,t.yCenter,e,0,I);else{let i=t.getPointPosition(0,e);s.moveTo(i.x,i.y);for(let r=1;r{const i=w(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){const t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],s=[],r=t._pointLabels.length,o=t.options.pointLabels,a=o.centerPointLabels?z/r:0;for(let d=0;d=0&&t=0;s--){const e=n.setContext(t.getPointLabelContext(s)),r=ge(e.font),{x:o,y:a,textAlign:l,left:c,top:h,right:d,bottom:u}=t._pointLabelItems[s],{backdropColor:f}=e;if(!p(f)){const t=fe(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,d-c+t.width,u-h+t.height)}se(i,t._pointLabels[s],o,a+r.lineHeight/2,r,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,s),n.display&&this.ticks.forEach((t,e)=>{0!==e&&(o=this.getDistanceFromCenterForValue(t.value),function(t,e,i,n){const s=t.ctx,r=e.circular,{color:o,lineWidth:a}=e;!r&&!n||!o||!a||i<0||(s.save(),s.strokeStyle=o,s.lineWidth=a,s.setLineDash(e.borderDash),s.lineDashOffset=e.borderDashOffset,s.beginPath(),vr(t,i,r,n),s.closePath(),s.stroke(),s.restore())}(this,n.setContext(this.getContext(e-1)),o,s))}),i.display){for(t.save(),r=s-1;r>=0;r--){const n=i.setContext(this.getPointLabelContext(r)),{color:s,lineWidth:l}=n;l&&s&&(t.lineWidth=l,t.strokeStyle=s,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,o=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(r,o),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let s,r;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((n,o)=>{if(0===o&&!e.reverse)return;const a=i.setContext(this.getContext(o)),l=ge(a.font);if(s=this.getDistanceFromCenterForValue(this.ticks[o].value),a.showLabelBackdrop){t.font=l.string,r=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=fe(a.backdropPadding);t.fillRect(-r/2-e.left,-s-l.size/2-e.top,r+e.width,l.size+e.height)}se(t,n.label,0,-s,l,{color:a.color})}),t.restore()}drawTitle(){}}_r.id="radialLinear",_r.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:jn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},_r.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},_r.descriptors={angleLines:{_fallback:"grid"}};const wr={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Mr=Object.keys(wr);function Or(t,e){return t-e}function kr(t,e){if(p(e))return null;const i=t._adapter,{parser:n,round:s,isoWeekday:r}=t._parseOpts;let o=e;return"function"==typeof n&&(o=n(o)),x(o)||(o="string"==typeof n?i.parse(o,n):i.parse(o)),null===o?null:(s&&(o="week"!==s||!q(r)&&!0!==r?i.startOf(o,s):i.startOf(o,"isoWeek",r)),+o)}function Sr(t,e,i,n){const s=Mr.length;for(let r=Mr.indexOf(t);r=e?i[n]:i[s]]=!0}}else t[e]=!0}function Pr(t,e,i){const n=[],s={},r=e.length;let o,a;for(o=0;o=0&&(e[l].major=!0);return e}(t,n,s,i):n}class Cr extends Vn{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new $i._date(t.adapters.date);C(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:kr(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:s,minDefined:r,maxDefined:o}=this.getUserBounds();function a(t){r||isNaN(t.min)||(n=Math.min(n,t.min)),o||isNaN(t.max)||(s=Math.max(s,t.max))}r&&o||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=x(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),s=x(s)&&!isNaN(s)?s:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,s-1),this.max=Math.max(n+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const s=this.min,r=function(t,e,i){let n=0,s=t.length;for(;nn&&t[s-1]>i;)s--;return n>0||s=Mr.indexOf(i);r--){const i=Mr[r];if(wr[i].common&&t._adapter.diff(s,n,i)>=e-1)return i}return Mr[i?Mr.indexOf(i):0]}(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=Mr.indexOf(t)+1,i=Mr.length;e1e5*o)throw new Error(e+" and "+i+" are too far apart with stepSize of "+o+" "+r);const f="data"===n.ticks.source&&this.getDataTimestamps();for(h=u,d=0;ht-e).map(t=>+t)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const s=this.options,r=s.time.displayFormats,o=this._unit,a=this._majorUnit,l=o&&r[o],c=a&&r[a],h=i[e],d=a&&c&&h&&h.major,u=this._adapter.format(t,n||(d?c:l)),f=s.ticks.callback;return f?w(f,[u,e,i],this):u}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?o:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=xe(t,"pos",e)),({pos:n,time:r}=t[a]),({pos:s,time:o}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=xe(t,"time",e)),({time:n,pos:r}=t[a]),({time:s,pos:o}=t[l]));const c=s-n;return c?r+(o-r)*(e-n)/c:r}Cr.id="time",Cr.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Er extends Cr{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Tr(e,this.min),this._tableRange=Tr(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],s=[];let r,o,a,l,c;for(r=0,o=t.length;r=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(r=0,o=n.length;r2&&void 0!==arguments[2]?arguments[2]:"label";const n=[];t.datasets=e.map(e=>{const s=t.datasets.find(t=>t[i]===e[i]);return s&&e.data&&!n.includes(s)?(n.push(s),Object.assign(s,e),s):{...e}})}function zr(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label";const i={labels:[],datasets:[]};return Rr(i,t.labels),Fr(i,t.datasets,e),i}function Ir(t,e){let{height:i=150,width:n=300,redraw:s=!1,datasetIdKey:r,type:o,data:a,options:l,plugins:c=[],fallbackContent:h,...d}=t;const u=Object(jr.useRef)(null),f=Object(jr.useRef)(),g=()=>{u.current&&(f.current=new us(u.current,{type:o,data:zr(a,r),options:l,plugins:c}),Lr(e,f.current))},p=()=>{Lr(e,null),f.current&&(f.current.destroy(),f.current=null)};return Object(jr.useEffect)(()=>{var t,e;!s&&f.current&&l&&(t=f.current,e=l,t.options={...e})},[s,l]),Object(jr.useEffect)(()=>{!s&&f.current&&Rr(f.current.config.data,a.labels)},[s,a.labels]),Object(jr.useEffect)(()=>{!s&&f.current&&a.datasets&&Fr(f.current.config.data,a.datasets,r)},[s,a.datasets]),Object(jr.useEffect)(()=>{f.current&&(s?(p(),setTimeout(g)):f.current.update())},[s,l,a.labels,a.datasets]),Object(jr.useEffect)(()=>(g(),()=>p()),[]),Ar.a.createElement("canvas",Object.assign({ref:u,role:"img",height:i,width:n},d),h)}const Nr=Object(jr.forwardRef)(Ir);var Vr=i(3),Wr=i(17),Br=i(7),Hr=i(8),Ur=i(4);function Yr(t,e){Object(Ur.a)(2,arguments);var i=Object(Hr.a)(t),n=Object(Br.a)(e);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}function $r(t,e){Object(Ur.a)(2,arguments);var i=Object(Br.a)(e);return Yr(t,-i)}function Xr(t,e){Object(Ur.a)(2,arguments);var i=Object(Hr.a)(t),n=Object(Br.a)(e);if(isNaN(n))return new Date(NaN);if(!n)return i;var s=i.getDate(),r=new Date(i.getTime());r.setMonth(i.getMonth()+n+1,0);var o=r.getDate();return s>=o?r:(i.setFullYear(r.getFullYear(),r.getMonth(),s),i)}function qr(t,e){Object(Ur.a)(2,arguments);var i=Object(Br.a)(e);return Xr(t,-i)}function Gr(t){return(Gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Qr(t,e){if(Object(Ur.a)(2,arguments),!e||"object"!==Gr(e))return new Date(NaN);var i=e.years?Object(Br.a)(e.years):0,n=e.months?Object(Br.a)(e.months):0,s=e.weeks?Object(Br.a)(e.weeks):0,r=e.days?Object(Br.a)(e.days):0,o=e.hours?Object(Br.a)(e.hours):0,a=e.minutes?Object(Br.a)(e.minutes):0,l=e.seconds?Object(Br.a)(e.seconds):0,c=qr(t,n+12*i),h=$r(c,r+7*s),d=a+60*o,u=l+60*d,f=1e3*u,g=new Date(h.getTime()-f);return g}function Kr(t){return(Kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zr(t,e){if(Object(Ur.a)(2,arguments),!e||"object"!==Kr(e))return new Date(NaN);var i=e.years?Object(Br.a)(e.years):0,n=e.months?Object(Br.a)(e.months):0,s=e.weeks?Object(Br.a)(e.weeks):0,r=e.days?Object(Br.a)(e.days):0,o=e.hours?Object(Br.a)(e.hours):0,a=e.minutes?Object(Br.a)(e.minutes):0,l=e.seconds?Object(Br.a)(e.seconds):0,c=Object(Hr.a)(t),h=n||i?Xr(c,n+12*i):c,d=r||s?Yr(h,r+7*s):h,u=a+60*o,f=l+60*u,g=1e3*f,p=new Date(d.getTime()+g);return p}function Jr(t,e){var i;Object(Ur.a)(1,arguments);var n=Object(Br.a)(null!==(i=null==e?void 0:e.additionalDigits)&&void 0!==i?i:2);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var s,r=so(t);if(r.date){var o=ro(r.date,n);s=oo(o.restDateString,o.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);var a,l=s.getTime(),c=0;if(r.time&&(c=lo(r.time),isNaN(c)))return new Date(NaN);if(!r.timezone){var h=new Date(l+c),d=new Date(0);return d.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),d.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),d}return a=ho(r.timezone),isNaN(a)?new Date(NaN):new Date(l+c+a)}Math.pow(10,8);var to={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},eo=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,io=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,no=/^([+-])(\d{2})(?::?(\d{2}))?$/;function so(t){var e,i={},n=t.split(to.dateTimeDelimiter);if(n.length>2)return i;if(/:/.test(n[0])?e=n[0]:(i.date=n[0],e=n[1],to.timeZoneDelimiter.test(i.date)&&(i.date=t.split(to.timeZoneDelimiter)[0],e=t.substr(i.date.length,t.length))),e){var s=to.timezone.exec(e);s?(i.time=e.replace(s[1],""),i.timezone=s[1]):i.time=e}return i}function ro(t,e){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(i);if(!n)return{year:NaN,restDateString:""};var s=n[1]?parseInt(n[1]):null,r=n[2]?parseInt(n[2]):null;return{year:null===r?s:100*r,restDateString:t.slice((n[1]||n[2]).length)}}function oo(t,e){if(null===e)return new Date(NaN);var i=t.match(eo);if(!i)return new Date(NaN);var n=!!i[4],s=ao(i[1]),r=ao(i[2])-1,o=ao(i[3]),a=ao(i[4]),l=ao(i[5])-1;if(n)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,a,l)?function(t,e,i){var n=new Date(0);n.setUTCFullYear(t,0,4);var s=7*(e-1)+i+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+s),n}(e,a,l):new Date(NaN);var c=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(uo[e]||(fo(t)?29:28))}(e,r,o)&&function(t,e){return e>=1&&e<=(fo(t)?366:365)}(e,s)?(c.setUTCFullYear(e,r,Math.max(s,o)),c):new Date(NaN)}function ao(t){return t?parseInt(t):1}function lo(t){var e=t.match(io);if(!e)return NaN;var i=co(e[1]),n=co(e[2]),s=co(e[3]);return function(t,e,i){return 24===t?0===e&&0===i:i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,n,s)?36e5*i+6e4*n+1e3*s:NaN}function co(t){return t&&parseFloat(t.replace(",","."))||0}function ho(t){if("Z"===t)return 0;var e=t.match(no);if(!e)return 0;var i="+"===e[1]?-1:1,n=parseInt(e[2]),s=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,s)?i*(36e5*n+6e4*s):NaN}var uo=[31,null,31,30,31,30,31,31,30,31,30,31];function fo(t){return t%400==0||t%4==0&&t%100!=0}var go=i(78);function po(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function mo(t){for(var e=1;e0,"is-negative":e<0});return Object(c.createElement)("div",{className:r},Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"simpay-admin-charts-badge__icon",width:"16",height:"16"},e>0?Object(c.createElement)("path",{d:"M16.004 9.414l-8.607 8.607-1.414-1.414L14.589 8H7.004V6h11v11h-2V9.414z"}):Object(c.createElement)("path",{d:"M14.59 16.004L5.982 7.397l1.414-1.414 8.607 8.606V7.004h2v11h-11v-2z"})),!n&&Object(c.createElement)("span",null,Math.abs(e),"%"))},Eo="simpay-admin-charts-period-over-period__tooltip",jo=function(t){var e=t.position,i=t.opacity,n=t.data,s=t.delta,r=t.deltaChangedString;if(!n.length)return null;var o=e.top,a=e.left,l=e.right,h=Co()("simpay-admin-charts-badge",{"is-positive":s>0,"is-negative":s<0});return Object(c.createElement)("div",{className:Eo,style:{top:o,left:a||"auto",right:l||"auto",opacity:i}},n.map((function(t,e){var i=t.label,n=t.value;return Object(c.createElement)("div",{className:"".concat(Eo,"-data"),"data-dataset":e,key:i+Math.random()},Object(c.createElement)("strong",null,i)," ",Object(c.createElement)("em",null,Object(Wr.decodeEntities)(n)))})),0!==s&&Object(c.createElement)("div",{className:"".concat(Eo,"-delta")},Object(c.createElement)("div",{className:h},Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"simpay-admin-charts-badge__icon"},s>0?Object(c.createElement)("path",{fillRule:"evenodd",d:"M5.22 14.78a.75.75 0 001.06 0l7.22-7.22v5.69a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75h-7.5a.75.75 0 000 1.5h5.69l-7.22 7.22a.75.75 0 000 1.06z",clipRule:"evenodd"}):Object(c.createElement)("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06l7.22 7.22H6.75a.75.75 0 000 1.5h7.5a.747.747 0 00.75-.75v-7.5a.75.75 0 00-1.5 0v5.69L6.28 5.22z"}))),Object(c.createElement)("span",null,r)))},Ao=function(t){var e=t.chart,i=function(t,e){var i=Object(c.useState)({marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}),n=l()(i,2),s=n[0],r=s.marginTop,o=s.marginRight,a=s.marginBottom,h=s.marginLeft,d=n[1];return Object(c.useEffect)((function(){t.current&&d({marginTop:Math.floor(t.current.chartArea.top),marginRight:Math.floor(t.current.width-t.current.chartArea.right),marginBottom:Math.floor(t.current.chartArea.bottom),marginLeft:Math.floor(t.current.chartArea.left)})}),[t,e]),{marginTop:r,marginRight:o,marginBottom:a,marginLeft:h}}(t.chartRef,e),n=i.marginLeft,s=i.marginRight;return Object(c.createElement)("div",{style:{width:"100%",position:"relative",fontSize:"12px",display:"flex",justifyContent:"space-between",marginTop:"-2px"}},Object(c.createElement)("div",{style:{marginLeft:n,textAlign:"left"}},e.datasets[0].data[0].x),Object(c.createElement)("div",{style:{marginRight:s,textAlign:"right"}},e.datasets[0].data[e.datasets[0].data.length-1].x))};function Lo(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ro(t){for(var e=1;e0}))}));return Object(c.createElement)("div",{className:"simpay-admin-charts-period-over-period",style:r},!O&&Object(c.createElement)("div",{className:"simpay-admin-charts-no-data",style:Ro(Ro({},r),{},{height:"calc(".concat(r.height," + 15px)")})},a),Object(c.createElement)(Nr,{type:"line",ref:p,options:M,plugins:[_o,(_="rgb(".concat(f.primary_color.join(","),")"),{id:"YGridLineHover",afterDraw:function(t){var e;if(null!==(e=t.tooltip)&&void 0!==e&&null!==(e=e._active)&&void 0!==e&&e.length){var i=t.tooltip._active[0].element.x,n=t.scales.yAxis,s=t.ctx;s.save(),s.beginPath(),s.moveTo(i,n.top),s.lineTo(i,n.bottom),s.lineWidth=2,s.strokeStyle=_,s.stroke(),s.restore()}}})],data:{datasets:m}}),Object(c.createElement)(Ao,{chartRef:p,chart:f}),Object(c.createElement)(jo,s()({},y,{deltaChangedString:h(y)})),Object(c.createElement)(Vr.Popover.Slot,null))}},function(t,e){function i(){return t.exports=i=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var i=0,n=new Array(e);i=r.getTime()?i+1:e.getTime()>=l.getTime()?i:i-1}function f(t){Object(n.a)(1,arguments);var e=u(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var s=d(i);return s}var g={};function p(){return g}function m(t,e){var i,s,r,a,c,h,d,u;Object(n.a)(1,arguments);var f=p(),g=Object(l.a)(null!==(i=null!==(s=null!==(r=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(c=e.locale)||void 0===c||null===(h=c.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==r?r:f.weekStartsOn)&&void 0!==s?s:null===(d=f.locale)||void 0===d||null===(u=d.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==i?i:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Object(o.a)(t),b=m.getUTCDay(),x=(b=1&&x<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(g+1,0,x),y.setUTCHours(0,0,0,0);var v=m(y,e),_=new Date(0);_.setUTCFullYear(g,0,x),_.setUTCHours(0,0,0,0);var w=m(_,e);return f.getTime()>=v.getTime()?g+1:f.getTime()>=w.getTime()?g:g-1}function x(t,e){var i,s,r,o,a,c,h,d;Object(n.a)(1,arguments);var u=p(),f=Object(l.a)(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(a=e.locale)||void 0===a||null===(c=a.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==r?r:u.firstWeekContainsDate)&&void 0!==s?s:null===(h=u.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==i?i:1),g=b(t,e),x=new Date(0);x.setUTCFullYear(g,0,f),x.setUTCHours(0,0,0,0);var y=m(x,e);return y}function y(t,e){for(var i=t<0?"-":"",n=Math.abs(t).toString();n.length0?i:1-i;return y("yy"===e?n%100:n,e.length)},_=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):y(i+1,2)},w=function(t,e){return y(t.getUTCDate(),e.length)},M=function(t,e){return y(t.getUTCHours()%12||12,e.length)},O=function(t,e){return y(t.getUTCHours(),e.length)},k=function(t,e){return y(t.getUTCMinutes(),e.length)},S=function(t,e){return y(t.getUTCSeconds(),e.length)},D=function(t,e){var i=e.length,n=t.getUTCMilliseconds();return y(Math.floor(n*Math.pow(10,i-3)),e.length)};function P(t,e){var i=t>0?"-":"+",n=Math.abs(t),s=Math.floor(n/60),r=n%60;if(0===r)return i+String(s);var o=e||"";return i+String(s)+o+y(r,2)}function C(t,e){return t%60==0?(t>0?"-":"+")+y(Math.abs(t)/60,2):T(t,e)}function T(t,e){var i=e||"",n=t>0?"-":"+",s=Math.abs(t);return n+y(Math.floor(s/60),2)+i+y(s%60,2)}var E={G:function(t,e,i){var n=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"});case"GGGGG":return i.era(n,{width:"narrow"});case"GGGG":default:return i.era(n,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var n=t.getUTCFullYear(),s=n>0?n:1-n;return i.ordinalNumber(s,{unit:"year"})}return v(t,e)},Y:function(t,e,i,n){var s=b(t,n),r=s>0?s:1-s;return"YY"===e?y(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):y(r,e.length)},R:function(t,e){return y(u(t),e.length)},u:function(t,e){return y(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return y(n,2);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return y(n,2);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,i){var n=t.getUTCMonth();switch(e){case"M":case"MM":return _(t,e);case"Mo":return i.ordinalNumber(n+1,{unit:"month"});case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,i){var n=t.getUTCMonth();switch(e){case"L":return String(n+1);case"LL":return y(n+1,2);case"Lo":return i.ordinalNumber(n+1,{unit:"month"});case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var r=function(t,e){Object(n.a)(1,arguments);var i=Object(o.a)(t),s=m(i,e).getTime()-x(i,e).getTime();return Math.round(s/6048e5)+1}(t,s);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):y(r,e.length)},I:function(t,e,i){var s=function(t){Object(n.a)(1,arguments);var e=Object(o.a)(t),i=d(e).getTime()-f(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):y(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):w(t,e)},D:function(t,e,i){var s=function(t){Object(n.a)(1,arguments);var e=Object(o.a)(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime(),r=i-s;return Math.floor(r/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):y(s,e.length)},E:function(t,e,i){var n=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"});case"EEEE":default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,i,n){var s=t.getUTCDay(),r=(s-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return y(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(s,{width:"short",context:"formatting"});case"eeee":default:return i.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,i,n){var s=t.getUTCDay(),r=(s-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return y(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(s,{width:"narrow",context:"standalone"});case"cccccc":return i.day(s,{width:"short",context:"standalone"});case"cccc":default:return i.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,i){var n=t.getUTCDay(),s=0===n?7:n;switch(e){case"i":return String(s);case"ii":return y(s,e.length);case"io":return i.ordinalNumber(s,{unit:"day"});case"iii":return i.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(n,{width:"short",context:"formatting"});case"iiii":default:return i.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,i){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(t,e,i){var n,s=t.getUTCHours();switch(n=12===s?"noon":0===s?"midnight":s/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(t,e,i){var n,s=t.getUTCHours();switch(n=s>=17?"evening":s>=12?"afternoon":s>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var n=t.getUTCHours()%12;return 0===n&&(n=12),i.ordinalNumber(n,{unit:"hour"})}return M(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):O(t,e)},K:function(t,e,i){var n=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(n,{unit:"hour"}):y(n,e.length)},k:function(t,e,i){var n=t.getUTCHours();return 0===n&&(n=24),"ko"===e?i.ordinalNumber(n,{unit:"hour"}):y(n,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):k(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):S(t,e)},S:function(t,e){return D(t,e)},X:function(t,e,i,n){var s=(n._originalDate||t).getTimezoneOffset();if(0===s)return"Z";switch(e){case"X":return C(s);case"XXXX":case"XX":return T(s);case"XXXXX":case"XXX":default:return T(s,":")}},x:function(t,e,i,n){var s=(n._originalDate||t).getTimezoneOffset();switch(e){case"x":return C(s);case"xxxx":case"xx":return T(s);case"xxxxx":case"xxx":default:return T(s,":")}},O:function(t,e,i,n){var s=(n._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+P(s,":");case"OOOO":default:return"GMT"+T(s,":")}},z:function(t,e,i,n){var s=(n._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+P(s,":");case"zzzz":default:return"GMT"+T(s,":")}},t:function(t,e,i,n){var s=n._originalDate||t;return y(Math.floor(s.getTime()/1e3),e.length)},T:function(t,e,i,n){return y((n._originalDate||t).getTime(),e.length)}},j=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},A=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},L={p:A,P:function(t,e){var i,n=t.match(/(P+)(p+)?/)||[],s=n[1],r=n[2];if(!r)return j(t,e);switch(s){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",j(s,e)).replace("{{time}}",A(r,e))}};function R(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var F=["D","DD"],z=["YY","YYYY"];function I(t){return-1!==F.indexOf(t)}function N(t){return-1!==z.indexOf(t)}function V(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var W={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function B(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth,n=t.formats[i]||t.formats[t.defaultWidth];return n}}var H={date:B({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:B({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:B({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},U={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Y(t){return function(e,i){var n;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):s;n=t.formattingValues[r]||t.formattingValues[s]}else{var o=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;n=t.values[a]||t.values[o]}return n[t.argumentCallback?t.argumentCallback(e):e]}}function $(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,s=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],r=e.match(s);if(!r)return null;var o,a=r[0],l=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?q(l,(function(t){return t.test(a)})):X(l,(function(t){return t.test(a)}));o=t.valueCallback?t.valueCallback(c):c,o=i.valueCallback?i.valueCallback(o):o;var h=e.slice(a.length);return{value:o,rest:h}}}function X(t,e){for(var i in t)if(t.hasOwnProperty(i)&&e(t[i]))return i}function q(t,e){for(var i=0;i0?"in "+n:n+" ago":n},formatLong:H,formatRelative:function(t,e,i,n){return U[t]},localize:{ordinalNumber:function(t,e){var i=Number(t),n=i%100;if(n>20||n<10)switch(n%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:Y({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Y({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Y({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Y({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Y({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(G={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(G.matchPattern);if(!i)return null;var n=i[0],s=t.match(G.parsePattern);if(!s)return null;var r=G.valueCallback?G.valueCallback(s[0]):s[0];r=e.valueCallback?e.valueCallback(r):r;var o=t.slice(n.length);return{value:r,rest:o}}),era:$({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:$({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:$({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:$({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:$({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},K=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Z=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,J=/^'([^]*?)'?$/,tt=/''/g,et=/[a-zA-Z]/;function it(t,e,i){var s,r,c,d,u,f,g,m,b,x,y,v,_,w,M,O,k,S;Object(n.a)(2,arguments);var D=String(e),P=p(),C=null!==(s=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:P.locale)&&void 0!==s?s:Q,T=Object(l.a)(null!==(c=null!==(d=null!==(u=null!==(f=null==i?void 0:i.firstWeekContainsDate)&&void 0!==f?f:null==i||null===(g=i.locale)||void 0===g||null===(m=g.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==u?u:P.firstWeekContainsDate)&&void 0!==d?d:null===(b=P.locale)||void 0===b||null===(x=b.options)||void 0===x?void 0:x.firstWeekContainsDate)&&void 0!==c?c:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=Object(l.a)(null!==(y=null!==(v=null!==(_=null!==(w=null==i?void 0:i.weekStartsOn)&&void 0!==w?w:null==i||null===(M=i.locale)||void 0===M||null===(O=M.options)||void 0===O?void 0:O.weekStartsOn)&&void 0!==_?_:P.weekStartsOn)&&void 0!==v?v:null===(k=P.locale)||void 0===k||null===(S=k.options)||void 0===S?void 0:S.weekStartsOn)&&void 0!==y?y:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!C.localize)throw new RangeError("locale must contain localize property");if(!C.formatLong)throw new RangeError("locale must contain formatLong property");var A=Object(o.a)(t);if(!a(A))throw new RangeError("Invalid time value");var F=R(A),z=h(A,F),W={firstWeekContainsDate:T,weekStartsOn:j,locale:C,_originalDate:A},B=D.match(Z).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,L[e])(t,C.formatLong):t})).join("").match(K).map((function(n){if("''"===n)return"'";var s=n[0];if("'"===s)return nt(n);var r=E[s];if(r)return null!=i&&i.useAdditionalWeekYearTokens||!N(n)||V(n,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!I(n)||V(n,e,String(t)),r(z,n,C.localize,W);if(s.match(et))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");return n})).join("");return B}function nt(t){var e=t.match(J);return e?e[1].replace(tt,"'"):t}},,,,,function(t,e,i){"use strict";i.r(e);var n=i(6),s=i.n(n),r=i(0),o=(i(37),i(10)),a=i(25),l=i.n(a),c=i(2),h=i(11),d=i.n(h);function u(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function f(t){for(var e=1;ewebhooks to be properly configured to populate correctly.","stripe"),{url:Object(r.createElement)("a",{href:y})})),Object(r.createElement)(p.Flex,null,Object(r.createElement)(p.Button,{variant:"link",onClick:function(){return e(!1)}},Object(c.__)("Close","stripe")),Object(r.createElement)(p.Button,{variant:"primary",isPrimary:!0,href:"https://dashboard.stripe.com/reports/hub",target:"_blank"},Object(c.__)("View advanced reports in Stripe →","stripe"))))},w=i(14),M=simpayAdminDashboardWidgetReport.currencies,O=new Date,k=function(t){var e=t.report,i=t.currency,n=t.setCurrency,o=t.range,a=t.setRange,l=e.data.delta,h=Object(r.useState)(!1),d=s()(h,2),u=d[0],f=d[1];return Object(r.createElement)("div",{className:"simpay-admin-dashboard-widget-report__data-filter"},Object(r.createElement)("div",{className:"simpay-admin-dashboard-widget-report__data-filter-title"},Object(r.createElement)("strong",null,Object(c.__)("Top Forms","stripe")),u&&Object(r.createElement)(_,{setIsOpen:f}),Object(r.createElement)(p.Button,{variant:"link",onClick:function(){return f(!0)}},Object(r.createElement)(m.a,{size:20,icon:b.a}))),Object(r.createElement)("div",{className:"simpay-admin-dashboard-widget-report__data-filter-controls"},!e.isLoading&&0!==l&&Object(r.createElement)(w.a,{delta:l}),Object(r.createElement)(p.SelectControl,{label:Object(c.__)("Currency","stripe"),hideLabelFromVision:!0,value:i,onChange:n,options:M.map((function(t){return{label:t,value:t.toLowerCase()}}))}),Object(r.createElement)(p.SelectControl,{label:Object(c.__)("Range","stripe"),hideLabelFromVision:!0,value:o.type,onChange:function(t){return a({type:t,start:Object(w.d)(t,O),end:Object(w.c)(t,o.end)})},options:[{label:"Today",value:"today"},{label:"Last 7 days",value:"7days"},{label:"Last 4 weeks",value:"4weeks"}]})))},S=i(15),D=i.n(S),P=i(17),C=function(t){var e=t.id,i=t.title,n=t.total_formatted,s=Object(o.addQueryArgs)("post.php",{post:e,action:"edit"});return Object(r.createElement)("div",{style:{display:"flex",justifyContent:"space-between"}},Object(r.createElement)("span",null,i?Object(r.createElement)("a",{href:s,target:"_blank",rel:"noreferrer"},i):Object(c.sprintf)(/* translators: %d Form ID. */ +Object(c.__)("Payment form %d (deleted)","stripe"),e)),Object(r.createElement)("div",null,Object(r.createElement)("strong",null,Object(P.decodeEntities)(n))))},T=function(t){var e=t.report;if(e.isLoading)return Object(r.createElement)("div",{className:"simpay-admin-dashboard-widget-report__data-list"});var i=e.data.top_forms,n=i.top,s=i.remaining;return Object(r.createElement)("div",{className:"simpay-admin-dashboard-widget-report__data-list"},n.map((function(t){return Object(r.createElement)(C,D()({key:t.id},t))})),s.count>0&&Object(r.createElement)("div",{style:{display:"flex",justifyContent:"space-between"}},Object(r.createElement)("div",null,Object(c.sprintf)(/* translators: %d The number of forms included in results that are not shown. */ +Object(c.__)("…and %d more","stripe"),s.count)),Object(r.createElement)("div",null,Object(P.decodeEntities)(s.total_formatted))))},E=simpayAdminDashboardWidgetReport,j=E.user_id,A=E.default_range,L=A.type,R=A.start,F=A.end,z=E.default_currency;Object(r.render)(Object(r.createElement)((function(){var t=Object(w.e)(j,"simpay_dashboard_widget_report_range",{start:Object(w.d)(L,R),end:Object(w.c)(L,F),type:L}),e=s()(t,2),i=e[0],n=e[1],a=Object(w.e)(j,"simpay_dashboard_widget_report_currency",z),h=s()(a,2),d=h[0],u=h[1],f=Object(r.useReducer)(g,{data:!1,isLoading:!0}),p=s()(f,2),m=p[0],b=p[1];return Object(r.useEffect)((function(){var t=Object(o.addQueryArgs)("/wpsp/__internal__/report/dashboard-widget",{range:i,currency:d});b({type:"START_RESOLUTION"}),l()({path:t}).then((function(t){b({type:"RECEIVE",data:t}),b({type:"FINISH_RESOLUTION"})}))}),[i,d]),Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"simpay-admin-dashboard-widget-report__chart"},Object(r.createElement)(w.b,{report:m,style:{width:"100%",height:"300px"},config:{yAxisIsCurrency:!0},noData:Object(r.createElement)("div",null,Object(r.createElement)("strong",null,Object(c.sprintf)(/* translators: %s Currency code. */ +Object(c.__)("No %s transactions found.","stripe"),d.toUpperCase())),Object(r.createElement)("div",null,Object(c.__)("Please select a different currency, date range, or check back later.","stripe"))),deltaChangedString:function(t){return Object(r.createInterpolateElement)(Object(c.sprintf)(/* translators: %s: delta percentage */ +Object(c.__)("%1$s%% vs. previous period","stripe"),Math.abs(t.delta)),{delta:Object(r.createElement)("strong",{className:t.delta>0?"is-positive":"is-negative"})})}})),Object(r.createElement)("div",{className:"simpay-admin-dashboard-widget-report__data"},Object(r.createElement)(k,{currency:d,range:i,setCurrency:u,setRange:n,report:m}),Object(r.createElement)(T,{report:m})))}),null),document.getElementById("simpay-admin-dashboard-widget-report"))}]); \ No newline at end of file diff --git a/includes/core/assets/js/dist/simpay-admin-form-template-explorer-css.asset.php b/includes/core/assets/js/dist/simpay-admin-form-template-explorer-css.asset.php new file mode 100644 index 00000000..2cde2dd0 --- /dev/null +++ b/includes/core/assets/js/dist/simpay-admin-form-template-explorer-css.asset.php @@ -0,0 +1 @@ + array(), 'version' => 'f65ff075fab34cb49b6d582d31577036'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-form-template-explorer.min.asset.php b/includes/core/assets/js/dist/simpay-admin-form-template-explorer.asset.php similarity index 64% rename from includes/core/assets/js/simpay-admin-form-template-explorer.min.asset.php rename to includes/core/assets/js/dist/simpay-admin-form-template-explorer.asset.php index 357670d6..14a894bd 100644 --- a/includes/core/assets/js/simpay-admin-form-template-explorer.min.asset.php +++ b/includes/core/assets/js/dist/simpay-admin-form-template-explorer.asset.php @@ -1 +1 @@ - array('lodash', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => '8fb0c2ee464e3ea4e3de4e92a8502b62'); \ No newline at end of file + array('lodash', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => '5dce049d9407deb8d0ff4624ab58bb21'); \ No newline at end of file diff --git a/includes/core/assets/js/dist/simpay-admin-form-template-explorer.js b/includes/core/assets/js/dist/simpay-admin-form-template-explorer.js new file mode 100644 index 00000000..dc41c979 --- /dev/null +++ b/includes/core/assets/js/dist/simpay-admin-form-template-explorer.js @@ -0,0 +1,4 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=81)}([function(e,t){e.exports=window.wp.element},,function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},,,function(e,t,r){var n=r(26),a=r(27),o=r(22),l=r(28);e.exports=function(e,t){return n(e)||a(e,t)||o(e,t)||l()},e.exports.__esModule=!0,e.exports.default=e.exports},,,function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.url},,function(e,t){e.exports=window.lodash},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rbasic form. Have a suggestion for a new template? We'd love to hear it!","stripe"),{blank:Object(o.createElement)("a",{href:b}),suggest:Object(o.createElement)("a",{href:p,target:"_blank",rel:"noopener noreferrer"})})))},O=r(13),_=r.n(O),v=r(20),h=r(66),E=r(44),x=r(67),w=function e(t){var r=t.className,n=t.onChange,a=t.value,c=t.label,s=t.placeholder,u=void 0===s?Object(i.__)("Search"):s,p=t.hideLabelFromVision,m=void 0===p||p,d=t.help,f=Object(v.useInstanceId)(e),b=Object(o.useRef)(),g="components-search-control-".concat(f);return Object(o.createElement)(l.BaseControl,{label:c,id:g,hideLabelFromVision:m,help:d,className:_()(r,"components-search-control")},Object(o.createElement)("div",{className:"components-search-control__input-wrapper"},Object(o.createElement)("input",{ref:b,className:"components-search-control__input",id:g,type:"search",placeholder:u,onChange:function(e){return n(e.target.value)},autoComplete:"off",value:a||""}),Object(o.createElement)("div",{className:"components-search-control__icon"},!!a&&Object(o.createElement)(l.Button,{icon:h.a,label:Object(i.__)("Reset search","stripe"),onClick:function(){n(""),b.current.focus()}}),!a&&Object(o.createElement)(E.a,{icon:x.a}))))},C="simpay-form-template-explorer-main__sidebar";function S(e){var t=e.selectedCategory,r=e.templateCategories,n=e.onClickCategory;return Object(o.createElement)(l.NavigableMenu,{orientation:"vertical",className:"".concat(C,"-categories")},Object.keys(r).map((function(e){var a=_()("category-".concat(e),"".concat(C,"-categories_category"));return Object(o.createElement)(l.Button,{key:e,label:r[e],className:a,isPressed:t===e,onClick:function(){n(e)}},r[e])})))}function k(e){var t=e.filterValue,r=e.setFilterValue;return Object(o.createElement)("div",{className:"".concat(C,"-search")},Object(o.createElement)(w,{onChange:r,value:t,label:Object(i.__)("Search for templates","stripe"),placeholder:Object(i.__)("Search","stripe")}))}var N=function(e){var t=e.selectedCategory,r=e.templateCategories,n=e.onClickCategory,a=e.filterValue,l=e.setFilterValue;return Object(o.createElement)("div",{className:C},Object(o.createElement)(k,{filterValue:a,setFilterValue:l}),!a&&Object(o.createElement)(S,{selectedCategory:t,templateCategories:r,onClickCategory:n}))},M=r(39),P=r(9),V=Object(o.createElement)(P.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(P.Path,{d:"M8 5C8 3.34315 9.34315 2 11 2H13C14.6569 2 16 3.34315 16 5V9H18C19.2624 9 20 9.9804 20 11V19C20 20.0196 19.2624 21 18 21H6C4.73763 21 4 20.0196 4 19V11C4 9.9804 4.73763 9 6 9H8V5ZM9.5 9H14.5V5C14.5 4.17157 13.8284 3.5 13 3.5H11C10.1716 3.5 9.5 4.17157 9.5 5V9Z"})),L=r(64),B=simpayFormBuilderTemplateExplorer,A=B.alreadyPurchasedUrl,U=B.licenseLevel,F=B.upgradeUrl,I="simpay-form-template-explorer-upgrade",T=function(e){var t=e.template,r=e.setIsShowingUpgradeModal;return Object(o.createElement)(l.Modal,{title:Object(i.__)("Upgrade Required","stripe"),onRequestClose:function(){return r(!1)},className:I},Object(o.createElement)("div",{className:"".concat(I,"__content")},Object(o.createElement)(E.a,{icon:V,size:"48px"}),Object(o.createElement)("h3",{className:"".concat(I,"__title")},Object(i.sprintf)(/* translators: %s Template name */ +Object(i.__)('Unlock the "%s" Template',"stripe"),t.name)),Object(o.createElement)("p",{className:"".concat(I,"__description")},Object(o.createInterpolateElement)(Object(i.sprintf)(/* translators: %$ss Template name. %2$s Minimum license level. */ +Object(i.__)('We\'re sorry, the "%1$s" template is not available on your plan. Please upgrade to the %2$s plan or higher to unlock this and other awesome features.',"stripe"),t.name,Object(c.upperFirst)(t.license[0])),{strong:Object(o.createElement)("strong",null)})),Object(o.createElement)(l.Button,{isPrimary:!0,variant:"primary",href:Object(s.addQueryArgs)(F,{utm_content:t.name}),target:"_blank",rel:"noopener noreferrer"},"lite"===U?Object(i.__)("Upgrade to Pro","stripe"):Object(i.__)("See Upgrade Options","stripe")),Object(o.createElement)("a",{href:A,target:"_blank",rel:"noopener noreferrer",className:"".concat(I,"__purchased")},Object(i.__)("Already purchased?","stripe")),Object(o.createElement)("p",{className:"".concat(I,"__discount")},Object(o.createElement)(E.a,{icon:L.a}),"lite"===U?Object(o.createInterpolateElement)(Object(i.__)("Bonus: WP Simple Pay Lite users get 50% off regular price, automatically applied at checkout. Upgrade to Pro →","stripe"),{strong:Object(o.createElement)("strong",null),highlight:Object(o.createElement)("u",null),upgrade:Object(o.createElement)("a",{href:Object(s.addQueryArgs)(F,{utm_content:t.name}),target:"_blank",rel:"noopener noreferrer"})}):Object(o.createInterpolateElement)(Object(i.__)("Bonus: WP Simple Pay Pro users get 50% off upgrade pricing, automatically applied at checkout. See Upgrade Options →","stripe"),{strong:Object(o.createElement)("strong",null),highlight:Object(o.createElement)("u",null),upgrade:Object(o.createElement)("a",{href:Object(s.addQueryArgs)(F,{utm_content:t.name}),target:"_blank",rel:"noopener noreferrer"})}))))},H=simpayFormBuilderTemplateExplorer,W=H.licenseLevel,z=H.addNewUrl,G=H.isLite,Q="simpay-form-template-explorer-main__content",R=["payment-button","donate-button","payment-form","product-installment-plan-form","product-purchse-form","product-subscription-form","product-subscription-form-coupon","recurring-service-setup-fee-form","recurring-service-trial-period-form","recurring-services-form","alipay-payment-button","giropay-payment-button","ideal-payment-button","przelewy24-payment-button"],Z=function(e){var t=e.template,r=Object(o.useState)(!1),n=a()(r,2),c=n[0],u=n[1],p=!t.license.includes(W),m=Object(s.addQueryArgs)(z,{"simpay-template":t.id}),d=Object(s.addQueryArgs)("https://wpsimplepay.com/templates/".concat(t.slug,"/"),{utm_source:"WordPress",utm_campaign:"1"===G?"lite-plugin":"pro-plugin",utm_medium:"template-explorer",utm_content:t.name});return Object(o.createElement)(o.Fragment,null,c&&Object(o.createElement)(T,{template:t,setIsShowingUpgradeModal:u}),Object(o.createElement)("div",{key:t.id,className:"".concat(Q,"-list-item")},p&&Object(o.createElement)("div",{className:"".concat(Q,"-list-item__badge")},Object(o.createElement)(E.a,{icon:V,size:"16px"})),Object(o.createElement)("div",{id:t.id,className:"".concat(Q,"-list-item__name ").concat(p?"".concat(Q,"-list-item__name--is-locked"):"")},t.name),Object(o.createElement)("div",{className:"".concat(Q,"-list-item__description")},t.description),Object(o.createElement)("div",{className:"".concat(Q,"-list-item__actions")},Object(o.createElement)(l.Button,{isPrimary:!0,variant:"primary",href:p?void 0:m,onClick:function(){return p?u(!0):null}},Object(i.__)("Use Template","stripe")),!R.includes(t.slug)&&Object(o.createElement)(l.Button,{isSecondary:!0,variant:"secondary",href:d,style:{marginLeft:"10px"},target:"_blank"},Object(i.__)("View Demo","stripe")))))},q=Object(o.createElement)(P.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(P.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"})),D=simpayFormBuilderTemplateExplorer.suggestUrl,$=function(){return Object(o.createElement)("div",{className:"".concat("simpay-form-template-explorer-main__content","-suggest")},Object(o.createElement)("div",{style:{flexGrow:0}},Object(o.createElement)(E.a,{icon:q,size:"42px"})),Object(o.createElement)("div",null,Object(o.createElement)("h4",null,Object(i.__)("We need your help!","stripe")),Object(o.createElement)("p",null,Object(o.createInterpolateElement)(Object(i.__)("We're constantly building more pre-made payment form templates to get you up and running even faster. If you have ideas for future templates, please let us know!","stripe"),{suggest:Object(o.createElement)("a",{href:D,target:"_blank",rel:"noopener noreferrer"})})),Object(o.createElement)(l.Button,{isSecondary:!0,variant:"secondary",isLink:!0,href:D,target:"_blank"},Object(i.__)("Suggest a Template","stripe"))))},K=simpayFormBuilderTemplateExplorer,J=K.isLite,X=K.upgradeUrl,Y=function(){return Object(o.createElement)("div",{className:"".concat("simpay-form-template-explorer-main__content","-upgrade")},Object(o.createElement)("div",null,Object(o.createElement)("h4",null,Object(i.__)("Get Access to All of Our Pre-Made Payment Form Templates","stripe")),Object(o.createElement)("p",null,Object(i.__)("Never start from scratch again! Upgrade to gain access to every payment form template we make and unlock powerful new features.","stripe"))),Object(o.createElement)(l.Button,{isSecondary:!0,variant:"primary",isLink:!0,size:"large",href:X,target:"_blank"},J?Object(i.__)("Upgrade to Pro","stripe"):Object(i.__)("Upgrade Now","stripe")))},ee=r(29),te=r.n(ee),re=function(e){return e.name||""},ne=function(e){return e.description||""},ae=function(e){return e.keywords||[]},oe=function(e){return e.category};function le(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(e=(e=Object(c.deburr)(e)).replace(/^\//,"")).toLowerCase()}var ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(c.words)(le(e))},ie=function(e,t){return Object(c.differenceWith)(e,ce(t),(function(e,t){return t.includes(e)}))};function se(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.getName,a=void 0===n?re:n,o=r.getDescription,l=void 0===o?ne:o,i=r.getKeywords,s=void 0===i?ae:i,u=r.getCategory,p=void 0===u?oe:u,m=a(e),d=l(e),f=s(e),b=p(e),g=le(t),y=le(m),j=0;if(g===y)j+=30;else if(y.startsWith(g))j+=20;else{var O=[m,d].concat(te()(f),[b]).join(" "),_=Object(c.words)(g),v=ie(_,O);0===v.length&&(j+=10)}return j}var ue=simpayFormBuilderTemplateExplorer,pe=ue.suggestUrl,me=ue.licenseLevel,de=function(e){var t=e.filterValue,r=e.selectedCategory,n=e.templates,l=Object(v.useDebounce)(M.speak,500),s=Object(o.useMemo)((function(){var e=n;return t?e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=ce(t);if(0===n.length)return e;var o=e.map((function(e){return[e,se(e,t,r)]})).filter((function(e){return a()(e,2)[1]>0}));return o.sort((function(e,t){var r=a()(e,2)[1];return a()(t,2)[1]-r})),o.map((function(e){return a()(e,1)[0]}))}(n,t):""!==r&&(e=n.filter((function(e){return e.categories.includes(r)}))),Object(c.sortBy)(e,(function(e){return!e.license.includes(me)}))}),[t,r,n]);Object(o.useEffect)((function(){if(t){var e=s.length,r=Object(i.sprintf)(/* translators: %d: number of results. */ +Object(i._n)("%d result found.","%d results found.",e,"stripe"),e);l(r)}}),[t,l]);var u=!(null==s||!s.length),p=_()("simpay-form-template-explorer-main__content",{"is-empty":!u});return Object(o.createElement)("div",{className:p},!u&&Object(o.createElement)("p",null,Object(o.createInterpolateElement)(Object(i.__)("No results found. Have a suggestion for a new template? We'd love to hear it!","stripe"),{suggest:Object(o.createElement)("a",{href:pe,target:"_blank",rel:"noopener noreferrer"})})),u&&Object(o.createElement)(o.Fragment,null,s.map((function(e,r){var n=Object(o.createElement)(Z,{key:e.slug,template:e});return""===t&&["lite","personal","plus"].includes(me)&&5===r?Object(o.createElement)(o.Fragment,{key:"upgrade-frag"},n,Object(o.createElement)(Y,null)):n})),Object(o.createElement)($,null)))},fe=simpayFormBuilderTemplateExplorer,be=fe.hasNew,ge=fe.templates,ye=fe.categories;Object(o.render)(Object(o.createElement)((function(){var e=Object(o.useState)(""),t=a()(e,2),r=t[0],n=t[1],c=Object(o.useState)(be?"new":""),i=a()(c,2),s=i[0],u=i[1];return Object(o.useEffect)((function(){document.querySelector("body").classList.add("simpay-template-explorer-open")}),[]),Object(o.createElement)(l.SlotFillProvider,null,Object(o.createElement)("div",{className:"simpay-form-template-explorer"},Object(o.createElement)(j,null),Object(o.createElement)("div",{className:"".concat("simpay-form-template-explorer","-main")},Object(o.createElement)(N,{selectedCategory:s,templateCategories:ye,onClickCategory:u,filterValue:r,setFilterValue:function(e){n(e),u("")}}),Object(o.createElement)(de,{templates:ge,templateCategories:ye,selectedCategory:s,filterValue:r}))),Object(o.createElement)(l.Popover.Slot,null))}),null),document.getElementById("simpay-form-template-explorer"))}]); \ No newline at end of file diff --git a/includes/core/assets/js/dist/simpay-admin-help-css.asset.php b/includes/core/assets/js/dist/simpay-admin-help-css.asset.php new file mode 100644 index 00000000..94f97812 --- /dev/null +++ b/includes/core/assets/js/dist/simpay-admin-help-css.asset.php @@ -0,0 +1 @@ + array(), 'version' => '657fa03a722399c998ae7b0233b5bb8d'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-help.min.asset.php b/includes/core/assets/js/dist/simpay-admin-help.asset.php similarity index 60% rename from includes/core/assets/js/simpay-admin-help.min.asset.php rename to includes/core/assets/js/dist/simpay-admin-help.asset.php index a54bfdc1..7df9e571 100644 --- a/includes/core/assets/js/simpay-admin-help.min.asset.php +++ b/includes/core/assets/js/dist/simpay-admin-help.asset.php @@ -1 +1 @@ - array('lodash', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => '50e20c80b4a3c0f58bf6612d1b9d8c3e'); \ No newline at end of file + array('lodash', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => '340417a4172b75d60d3db387972142da'); \ No newline at end of file diff --git a/includes/core/assets/js/dist/simpay-admin-help.js b/includes/core/assets/js/dist/simpay-admin-help.js new file mode 100644 index 00000000..62736c2a --- /dev/null +++ b/includes/core/assets/js/dist/simpay-admin-help.js @@ -0,0 +1,2 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=80)}([function(e,t){e.exports=window.wp.element},,function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},,,function(e,t,n){var r=n(26),o=n(27),c=n(22),a=n(28);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},,,function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.url},,function(e,t){e.exports=window.lodash},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n5&&Object(c.createElement)(a.Button,{variant:"secondary",isSecondary:!0,isSmall:!0,onClick:function(){return f(!0)}},Object(s.__)("View all","stripe"))))},R=simpayHelp,I=R.docs,G=R.docsCategories,D=function(){var e,t=Object(c.useState)("getting-started"),n=o()(t,2),r=n[0],a=n[1];return Object(c.createElement)("div",{className:"simpay-help-panel__categories"},(e=Object(V.groupBy)(I,"categories"),Object(V.map)(e,(function(e,t){return{slug:t,title:G[t]||"",docs:e}}))).map((function(e){return Object(c.createElement)(H,k()({key:e.slug,openCategory:r,setOpenCategory:a},e))})))},F=n(29),W=n.n(F);function U(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(e=(e=Object(V.deburr)(e)).replace(/^\//,"")).toLowerCase()}var Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(V.words)(U(e))};function $(e,t){var n,r,o=e.title||"",c=e.excerpt||"",a=e.categories||[],l=e.tags||[],i=U(t),s=U(o),u=0;if(i===s)u+=30;else if(s.startsWith(i))u+=20;else{var p=[o,c].concat(W()(a),W()(l)).join(" ");0===(n=Object(V.words)(i),r=p,Object(V.differenceWith)(n,Z(r),(function(e,t){return t.includes(e)}))).length&&(u+=10)}return u}var Q=simpayHelp.docs,K=function(e){var t=e.searchTerm,n=Object(c.useMemo)((function(){var e=[];return""!==t&&(e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Z(t);if(0===n.length)return e;var r=e.map((function(e){return[e,$(e,t)]})).filter((function(e){return o()(e,2)[1]>0}));return r.sort((function(e,t){var n=o()(e,2)[1];return o()(t,2)[1]-n})),r.map((function(e){return o()(e,1)[0]}))}(Q,t)),e}),[t]),r=Object(b.useDebounce)(P.speak,500);Object(c.useEffect)((function(){if(t){var e=n.length,o=Object(s.sprintf)(/* translators: %d: number of results. */ +Object(s._n)("%d result found.","%d results found.",e,"stripe"),e);r(o)}}),[t,r]);var a=!(null==n||!n.length);return Object(c.createElement)("div",{className:"simpay-help-panel__results"},!a&&Object(c.createElement)(D,null),a&&n.map((function(e){return Object(c.createElement)(N,k()({key:e.id,searchTerm:t},e))})))},q=function(e){var t=e.onClose,n=e.onSearch,r=e.searchTerm,o=Object(b.useFocusOnMount)("firstElement"),l=function(e){var t=Object(c.useRef)(),n=Object(c.useRef)(!1),r=Object(c.useRef)([]),o=Object(c.useRef)(e);return o.current=e,Object(c.useLayoutEffect)((function(){!1===n.current&&e.forEach((function(e,n){var o=r.current[n];e!==o&&(h(o,null),h(e,t.current))})),r.current=e}),e),Object(c.useLayoutEffect)((function(){n.current=!1})),Object(c.useCallback)((function(e){h(t,e),n.current=!0;var c,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return d(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,c=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw c}}}}(e?o.current:r.current);try{for(a.s();!(c=a.n()).done;)h(c.value,e)}catch(e){a.e(e)}finally{a.f()}}),[])}([Object(b.useConstrainedTabbing)(),Object(b.useFocusReturn)(),o]);return Object(c.createElement)(a.Animate,{type:"slide-in",options:{origin:"left"}},(function(e){var o=e.className,a=f()("simpay-help-panel",o);return Object(c.createElement)("div",{ref:l,className:a},Object(c.createElement)(v,{onClose:t}),Object(c.createElement)("div",{className:"simpay-help-panel__search"},Object(c.createElement)(M,{label:Object(s.__)("Search the documentation","stripe"),placeholder:Object(s.__)("Search","stripe"),onChange:n,value:r}),Object(c.createElement)(K,{searchTerm:r})),Object(c.createElement)(x,{searchTerm:r}))}))},J=function(e){var t=e.isOpen,n=e.onClose;return Object(c.useEffect)((function(){return document.body.classList.toggle("simpay-help-body-locked"),function(){document.body.classList.remove("simpay-help-body-locked")}}),[t]),Object(c.createElement)("button",{className:"simpay-help-backdrop",onClick:n})},X=simpayHelp,Y=X.docsSearchTerm,ee=X.docs;function te(e){var t=Object(i.getFragment)(e),n=Y;if(t&&t.includes("/")){var r=t.split("/");t=r[0],n=Object(i.safeDecodeURI)(r[1])}return{hash:t,searchTerm:n}}Object(c.render)(Object(c.createElement)((function(){var e=te(window.location.href),t=e.hash,n=e.searchTerm,r=Object(c.useState)(n),i=o()(r,2),s=i[0],u=i[1],m=Object(c.useState)("#help"===t),f=o()(m,2),b=f[0],d=f[1];function h(){d(!1),window.history.pushState("",document.title,window.location.pathname+window.location.search)}return Object(c.useEffect)((function(){function e(e){var t=te(e.newURL),r=t.hash,o=t.searchTerm;"#help"===r&&d(!0),o!==n&&u(o)}return window.addEventListener("hashchange",e),function(){window.removeEventListener("hashchange",e)}}),[]),Object(c.createElement)("div",{onKeyDown:function(e){e.keyCode!==l.ESCAPE||e.defaultPrevented||(e.preventDefault(),d(!1))},role:"region"},Object(c.createElement)(p,{isOpen:b,onOpen:function(){u(Y),d(!0),window.history.pushState("",document.title,window.location.pathname+window.location.search+"#help")}}),b&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)(q,{onClose:h,onSearch:u,searchTerm:s,docs:ee}),Object(c.createElement)(J,{onClose:h})),Object(c.createElement)(a.Popover.Slot,null))}),null),document.getElementById("simpay-branding-bar-help"))}]); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-notices.min.js b/includes/core/assets/js/dist/simpay-admin-notices.js similarity index 100% rename from includes/core/assets/js/simpay-admin-notices.min.js rename to includes/core/assets/js/dist/simpay-admin-notices.js diff --git a/includes/core/assets/js/dist/simpay-admin-notifications-css.asset.php b/includes/core/assets/js/dist/simpay-admin-notifications-css.asset.php new file mode 100644 index 00000000..2c15c1b4 --- /dev/null +++ b/includes/core/assets/js/dist/simpay-admin-notifications-css.asset.php @@ -0,0 +1 @@ + array(), 'version' => '30784043ec33dac042e57124a07cd0aa'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-notifications.min.asset.php b/includes/core/assets/js/dist/simpay-admin-notifications.asset.php similarity index 69% rename from includes/core/assets/js/simpay-admin-notifications.min.asset.php rename to includes/core/assets/js/dist/simpay-admin-notifications.asset.php index f2f29e26..05a6377e 100644 --- a/includes/core/assets/js/simpay-admin-notifications.min.asset.php +++ b/includes/core/assets/js/dist/simpay-admin-notifications.asset.php @@ -1 +1 @@ - array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-autop', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '3139f4ebf034986ebe51bd20d838ff8d'); \ No newline at end of file + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-autop', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '7a8f10de49c3453462dd59a8e9f8066f'); \ No newline at end of file diff --git a/includes/core/assets/js/dist/simpay-admin-notifications.js b/includes/core/assets/js/dist/simpay-admin-notifications.js new file mode 100644 index 00000000..351ccf63 --- /dev/null +++ b/includes/core/assets/js/dist/simpay-admin-notifications.js @@ -0,0 +1,3 @@ +!function(t){var e={};function n(r){if(e[r])return e[r].exports;var s=e[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(r,s,function(e){return t[e]}.bind(null,s));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=82)}([function(t,e){t.exports=window.wp.element},function(t,e,n){"use strict";n.d(e,"w",(function(){return s})),n.d(e,"a",(function(){return Ot})),n.d(e,"b",(function(){return q})),n.d(e,"c",(function(){return jt})),n.d(e,"d",(function(){return yt})),n.d(e,"e",(function(){return H})),n.d(e,"f",(function(){return dt})),n.d(e,"g",(function(){return Rt})),n.d(e,"h",(function(){return _})),n.d(e,"i",(function(){return zt})),n.d(e,"j",(function(){return qt})),n.d(e,"k",(function(){return S})),n.d(e,"l",(function(){return E})),n.d(e,"m",(function(){return M})),n.d(e,"n",(function(){return A})),n.d(e,"o",(function(){return U})),n.d(e,"p",(function(){return gt})),n.d(e,"q",(function(){return bt})),n.d(e,"r",(function(){return mt})),n.d(e,"s",(function(){return x})),n.d(e,"t",(function(){return Lt})),n.d(e,"u",(function(){return k})),n.d(e,"v",(function(){return w})),n.d(e,"x",(function(){return wt})),n.d(e,"y",(function(){return P})),n.d(e,"z",(function(){return Ut})),n.d(e,"A",(function(){return Ft})),n.d(e,"B",(function(){return $t})),n.d(e,"C",(function(){return Qt})),n.d(e,"D",(function(){return Gt}));let r=O();const s=t=>m(t,r);let o=O();s.write=t=>m(t,o);let i=O();s.onStart=t=>m(t,i);let a=O();s.onFrame=t=>m(t,a);let c=O();s.onFinish=t=>m(t,c);let u=[];s.setTimeout=(t,e)=>{let n=s.now()+e,r=()=>{let t=u.findIndex(t=>t.cancel==r);~t&&u.splice(t,1),p-=~t?1:0},o={time:n,handler:t,cancel:r};return u.splice(l(n),0,o),p+=1,b(),o};let l=t=>~(~u.findIndex(e=>e.time>t)||~u.length);s.cancel=t=>{i.delete(t),a.delete(t),r.delete(t),o.delete(t),c.delete(t)},s.sync=t=>{h=!0,s.batchedUpdates(t),h=!1},s.throttle=t=>{let e;function n(){try{t(...e)}finally{e=null}}function r(...t){e=t,s.onStart(n)}return r.handler=t,r.cancel=()=>{i.delete(n),e=null},r};let d="undefined"!=typeof window?window.requestAnimationFrame:()=>{};s.use=t=>d=t,s.now="undefined"!=typeof performance?()=>performance.now():Date.now,s.batchedUpdates=t=>t(),s.catch=console.error,s.frameLoop="always",s.advance=()=>{"demand"!==s.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):y()};let f=-1,p=0,h=!1;function m(t,e){h?(e.delete(t),t(0)):(e.add(t),b())}function b(){f<0&&(f=0,"demand"!==s.frameLoop&&d(g))}function g(){~f&&(d(g),s.batchedUpdates(y))}function y(){let t=f;f=s.now();let e=l(f);e&&(v(u.splice(0,e),t=>t.handler()),p-=e),i.flush(),r.flush(t?Math.min(64,f-t):16.667),a.flush(),o.flush(),c.flush(),p||(f=-1)}function O(){let t=new Set,e=t;return{add(n){p+=e!=t||t.has(n)?0:1,t.add(n)},delete:n=>(p-=e==t&&t.has(n)?1:0,t.delete(n)),flush(n){e.size&&(t=new Set,p-=e.size,v(e,e=>e(n)&&t.add(e)),p+=t.size,e=t)}}}function v(t,e){t.forEach(t=>{try{e(t)}catch(t){s.catch(t)}})}var j=n(5);function w(){}const _=(t,e,n)=>Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0}),x={arr:Array.isArray,obj:t=>!!t&&"Object"===t.constructor.name,fun:t=>"function"==typeof t,str:t=>"string"==typeof t,num:t=>"number"==typeof t,und:t=>void 0===t};function k(t,e){if(x.arr(t)){if(!x.arr(e)||t.length!==e.length)return!1;for(let n=0;nt.forEach(e);function E(t,e,n){if(x.arr(t))for(let r=0;rx.und(t)?[]:x.arr(t)?t:[t];function M(t,e){if(t.size){const n=Array.from(t);t.clear(),S(n,e)}}const A=(t,...e)=>M(t,t=>t(...e)),I=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let C,R,T=null,N=!1,V=w;var q=Object.freeze({__proto__:null,get createStringInterpolator(){return C},get to(){return R},get colors(){return T},get skipAnimation(){return N},get willAdvance(){return V},assign:t=>{t.to&&(R=t.to),t.now&&(s.now=t.now),void 0!==t.colors&&(T=t.colors),null!=t.skipAnimation&&(N=t.skipAnimation),t.createStringInterpolator&&(C=t.createStringInterpolator),t.requestAnimationFrame&&s.use(t.requestAnimationFrame),t.batchedUpdates&&(s.batchedUpdates=t.batchedUpdates),t.willAdvance&&(V=t.willAdvance),t.frameLoop&&(s.frameLoop=t.frameLoop)}});const D=new Set;let z=[],L=[],F=0;const U={get idle(){return!D.size&&!z.length},start(t){F>t.priority?(D.add(t),s.onStart($)):(Q(t),s(G))},advance:G,sort(t){if(F)s.onFrame(()=>U.sort(t));else{const e=z.indexOf(t);~e&&(z.splice(e,1),B(t))}},clear(){z=[],D.clear()}};function $(){D.forEach(Q),D.clear(),s(G)}function Q(t){z.includes(t)||B(t)}function B(t){z.splice(function(e,n){const r=e.findIndex(e=>e.priority>t.priority);return r<0?e.length:r}(z),0,t)}function G(t){const e=L;for(let n=0;n0}const H={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},W="[-+]?\\d*\\.?\\d+";function Z(...t){return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}const Y=new RegExp("rgb"+Z(W,W,W)),J=new RegExp("rgba"+Z(W,W,W,W)),K=new RegExp("hsl"+Z(W,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),X=new RegExp("hsla"+Z(W,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",W)),tt=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,et=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,nt=/^#([0-9a-fA-F]{6})$/,rt=/^#([0-9a-fA-F]{8})$/;function st(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ot(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,s=2*n-r,o=st(s,r,t+1/3),i=st(s,r,t),a=st(s,r,t-1/3);return Math.round(255*o)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function it(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function at(t){return(parseFloat(t)%360+360)%360/360}function ct(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(255*e)}function ut(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function lt(t){let e=function(t){let e;return"number"==typeof t?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=nt.exec(t))?parseInt(e[1]+"ff",16)>>>0:T&&void 0!==T[t]?T[t]:(e=Y.exec(t))?(it(e[1])<<24|it(e[2])<<16|it(e[3])<<8|255)>>>0:(e=J.exec(t))?(it(e[1])<<24|it(e[2])<<16|it(e[3])<<8|ct(e[4]))>>>0:(e=tt.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=rt.exec(t))?parseInt(e[1],16)>>>0:(e=et.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=K.exec(t))?(255|ot(at(e[1]),ut(e[2]),ut(e[3])))>>>0:(e=X.exec(t))?(ot(at(e[1]),ut(e[2]),ut(e[3]))|ct(e[4]))>>>0:null}(t);return null===e?t:(e=e||0,`rgba(${(4278190080&e)>>>24}, ${(16711680&e)>>>16}, ${(65280&e)>>>8}, ${(255&e)/255})`)}const dt=(t,e,n)=>{if(x.fun(t))return t;if(x.arr(t))return dt({range:t,output:e,extrapolate:n});if(x.str(t.output[0]))return C(t);const r=t,s=r.output,o=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(t=>t);return t=>{const e=function(t,e){for(var n=1;n=t);++n);return n-1}(t,o);return function(t,e,n,r,s,o,i,a,c){let u=c?c(t):t;if(un){if("identity"===a)return u;"clamp"===a&&(u=n)}return r===s?r:e===n?t<=e?r:s:(e===-1/0?u=-u:n===1/0?u-=e:u=(u-e)/(n-e),u=o(u),r===-1/0?u=-u:s===1/0?u+=r:u=u*(s-r)+r,u)}(t,o[e],o[e+1],s[e],s[e+1],c,i,a,r.map)}};function ft(){return(ft=Object.assign||function(t){for(var e=1;eBoolean(t&&t[pt]),bt=t=>t&&t[pt]?t[pt]():t,gt=t=>t[ht]||null;function yt(t,e){let n=t[ht];n&&n.forEach(t=>{!function(t,e){t.eventObserved?t.eventObserved(e):t(e)}(t,e)})}class Ot{constructor(t){if(this[pt]=void 0,this[ht]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");vt(this,t)}}const vt=(t,e)=>_t(t,pt,e);function jt(t,e){if(t[pt]){let n=t[ht];n||_t(t,ht,n=new Set),n.has(e)||(n.add(e),t.observerAdded&&t.observerAdded(n.size,e))}return e}function wt(t,e){let n=t[ht];if(n&&n.has(e)){const r=n.size-1;r?n.delete(e):t[ht]=null,t.observerRemoved&&t.observerRemoved(r,e)}}const _t=(t,e,n)=>Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0}),xt=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,kt=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,St=new RegExp(`(${xt.source})(%|[a-z]+)`,"i"),Et=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Pt=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Mt=t=>{const[e,n]=At(t);if(!e||I())return t;const r=window.getComputedStyle(document.documentElement).getPropertyValue(e);if(r)return r.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||t}return n&&Pt.test(n)?Mt(n):n||t},At=t=>{const e=Pt.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]};let It;const Ct=(t,e,n,r,s)=>`rgba(${Math.round(e)}, ${Math.round(n)}, ${Math.round(r)}, ${s})`,Rt=t=>{It||(It=T?new RegExp(`(${Object.keys(T).join("|")})(?!\\w)`,"g"):/^\b$/);const e=t.output.map(t=>bt(t).replace(Pt,Mt).replace(kt,lt).replace(It,lt)),n=e.map(t=>t.match(xt).map(Number)),r=n[0].map((t,e)=>n.map(t=>{if(!(e in t))throw Error('The arity of each "output" value must be equal');return t[e]})).map(e=>dt(ft({},t,{output:e})));return t=>{var n;const s=!St.test(e[0])&&(null==(n=e.find(t=>St.test(t)))?void 0:n.replace(xt,""));let o=0;return e[0].replace(xt,()=>`${r[o++](t)}${s||""}`).replace(Et,Ct)}},Tt="react-spring: ",Nt=t=>{const e=t;let n=!1;if("function"!=typeof e)throw new TypeError(Tt+"once requires a function parameter");return(...t)=>{n||(e(...t),n=!0)}},Vt=Nt(console.warn);function qt(){Vt(Tt+'The "interpolate" function is deprecated in v9 (use "to" instead)')}const Dt=Nt(console.warn);function zt(){Dt(Tt+'Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions')}function Lt(t){return x.str(t)&&("#"==t[0]||/\d/.test(t)||!I()&&Pt.test(t)||t in(T||{}))}const Ft="undefined"!=typeof window&&window.document&&window.document.createElement?j.useLayoutEffect:j.useEffect;function Ut(){const t=Object(j.useState)()[1],e=(()=>{const t=Object(j.useRef)(!1);return Ft(()=>(t.current=!0,()=>{t.current=!1}),[]),t})();return()=>{e.current&&t(Math.random())}}function $t(t,e){const[n]=Object(j.useState)(()=>({inputs:e,result:t()})),r=Object(j.useRef)(),s=r.current;let o=s;return o?Boolean(e&&o.inputs&&function(t,e){if(t.length!==e.length)return!1;for(let n=0;n{r.current=o,s==n&&(n.inputs=n.result=void 0)},[o]),o.result}const Qt=t=>Object(j.useEffect)(t,Bt),Bt=[];function Gt(t){const e=Object(j.useRef)();return Object(j.useEffect)(()=>{e.current=t}),e.current}},function(t,e){t.exports=window.wp.i18n},function(t,e){t.exports=window.wp.components},,function(t,e){t.exports=window.React},function(t,e,n){var r=n(26),s=n(27),o=n(22),i=n(28);t.exports=function(t,e){return r(t)||s(t,e)||o(t,e)||i()},t.exports.__esModule=!0,t.exports.default=t.exports},,,function(t,e){t.exports=window.wp.primitives},function(t,e){t.exports=window.wp.url},function(t,e,n){var r=n(30);t.exports=function(t,e,n){return(e=r(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=window.lodash},function(t,e,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function s(){for(var t=[],e=0;et&&t[o],a=(t,e)=>Object(r.h)(t,o,e),c=t=>t&&t[o]&&t[o].getPayload();class u{constructor(){this.payload=void 0,a(this,this)}getPayload(){return this.payload||[]}}class l extends u{constructor(t){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=t,r.s.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new l(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,e){return r.s.num(t)&&(this.lastPosition=t,e&&(t=Math.round(t/e)*e,this.done&&(this.lastPosition=t))),this._value!==t&&(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,r.s.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}}class d extends l{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=Object(r.f)({output:[t,t]})}static create(t){return new d(t)}getValue(){let t=this._string;return null==t?this._string=this._toString(this._value):t}setValue(t){if(r.s.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else{if(!super.setValue(t))return!1;this._string=null}return!0}reset(t){t&&(this._toString=Object(r.f)({output:[this.getValue(),t]})),this._value=0,super.reset()}}const f={dependencies:null};class p extends u{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){const e={};return Object(r.l)(this.source,(n,s)=>{var i;(i=n)&&i[o]===i?e[s]=n.getValue(t):Object(r.r)(n)?e[s]=Object(r.q)(n):t||(e[s]=n)}),e}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&Object(r.k)(this.payload,t=>t.reset())}_makePayload(t){if(t){const e=new Set;return Object(r.l)(t,this._addToPayload,e),Array.from(e)}}_addToPayload(t){f.dependencies&&Object(r.r)(t)&&f.dependencies.add(t);const e=c(t);e&&Object(r.k)(e,t=>this.add(t))}}class h extends p{constructor(t){super(t)}static create(t){return new h(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const e=this.getPayload();return t.length==e.length?e.map((e,n)=>e.setValue(t[n])).some(Boolean):(super.setValue(t.map(m)),!0)}}function m(t){return(Object(r.t)(t)?d:l).create(t)}function b(t){const e=i(t);return e?e.constructor:r.s.arr(t)?h:Object(r.t)(t)?d:l}function g(){return(g=Object.assign||function(t){for(var e=1;e{const n=!r.s.fun(t)||t.prototype&&t.prototype.isReactComponent;return Object(s.forwardRef)((o,i)=>{const a=Object(s.useRef)(null),c=n&&Object(s.useCallback)(t=>{a.current=function(t,e){return t&&(r.s.fun(t)?t(e):t.current=e),e}(i,t)},[i]),[u,l]=function(t,e){const n=new Set;return f.dependencies=n,t.style&&(t=g({},t,{style:e.createAnimatedStyle(t.style)})),t=new p(t),f.dependencies=null,[t,n]}(o,e),d=Object(r.z)(),h=()=>{const t=a.current;n&&!t||!1===(!!t&&e.applyAnimatedValues(t,u.getValue(!0)))&&d()},m=new O(h,l),b=Object(s.useRef)();Object(r.A)(()=>(b.current=m,Object(r.k)(l,t=>Object(r.c)(t,m)),()=>{b.current&&(Object(r.k)(b.current.deps,t=>Object(r.x)(t,b.current)),r.w.cancel(b.current.update))})),Object(s.useEffect)(h,[]),Object(r.C)(()=>()=>{const t=b.current;Object(r.k)(t.deps,e=>Object(r.x)(e,t))});const y=e.getComponentProps(u.getValue());return s.createElement(t,g({},y,{ref:c}))})};class O{constructor(t,e){this.update=t,this.deps=e}eventObserved(t){"change"==t.type&&r.w.write(this.update)}}const v=Symbol.for("AnimatedComponent"),j=(t,{applyAnimatedValues:e=(()=>!1),createAnimatedStyle:n=(t=>new p(t)),getComponentProps:s=(t=>t)}={})=>{const o={applyAnimatedValues:e,createAnimatedStyle:n,getComponentProps:s},i=t=>{const e=w(t)||"Anonymous";return(t=r.s.str(t)?i[t]||(i[t]=y(t,o)):t[v]||(t[v]=y(t,o))).displayName=`Animated(${e})`,t};return Object(r.l)(t,(e,n)=>{r.s.arr(t)&&(n=w(e)),i[n]=i(e)}),{animated:i}},w=t=>r.s.str(t)?t:t&&r.s.str(t.displayName)?t.displayName:r.s.fun(t)&&t.name||null},function(t,e){t.exports=window.wp.compose},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n!0===t||!!(e&&t&&(r.s.fun(t)?t(e):Object(r.y)(t).includes(e))),u=(t,e)=>r.s.obj(t)?e&&t[e]:t,l=(t,e)=>!0===t.default?t[e]:t.default?t.default[e]:void 0,d=t=>t,f=(t,e=d)=>{let n=p;t.default&&!0!==t.default&&(t=t.default,n=Object.keys(t));const s={};for(const o of n){const n=e(t[o],o);r.s.und(n)||(s[o]=n)}return s},p=["config","onProps","onStart","onChange","onPause","onResume","onRest"],h={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function m(t){const e=function(t){const e={};let n=0;if(Object(r.l)(t,(t,r)=>{h[r]||(e[r]=t,n++)}),n)return e}(t);if(e){const n={to:e};return Object(r.l)(t,(t,r)=>r in e||(n[r]=t)),n}return i({},t)}function b(t){return t=Object(r.q)(t),r.s.arr(t)?t.map(b):Object(r.t)(t)?r.b.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function g(t){for(const e in t)return!0;return!1}function y(t){return r.s.fun(t)||r.s.arr(t)&&r.s.obj(t[0])}function O(t,e){var n;null==(n=t.ref)||n.delete(t),null==e||e.delete(t)}function v(t,e){var n;e&&t.ref!==e&&(null==(n=t.ref)||n.delete(t),e.add(t),t.ref=e)}const j={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},w=1.70158,_=1.525*w,x=2*Math.PI/3,k=2*Math.PI/4.5,S=t=>{const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},E={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>1-(1-t)*(1-t),easeInOutQuad:t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2,easeInCubic:t=>t*t*t,easeOutCubic:t=>1-Math.pow(1-t,3),easeInOutCubic:t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1-Math.pow(1-t,4),easeInOutQuart:t=>t<.5?8*t*t*t*t:1-Math.pow(-2*t+2,4)/2,easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>1-Math.pow(1-t,5),easeInOutQuint:t=>t<.5?16*t*t*t*t*t:1-Math.pow(-2*t+2,5)/2,easeInSine:t=>1-Math.cos(t*Math.PI/2),easeOutSine:t=>Math.sin(t*Math.PI/2),easeInOutSine:t=>-(Math.cos(Math.PI*t)-1)/2,easeInExpo:t=>0===t?0:Math.pow(2,10*t-10),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>0===t?0:1===t?1:t<.5?Math.pow(2,20*t-10)/2:(2-Math.pow(2,-20*t+10))/2,easeInCirc:t=>1-Math.sqrt(1-Math.pow(t,2)),easeOutCirc:t=>Math.sqrt(1-Math.pow(t-1,2)),easeInOutCirc:t=>t<.5?(1-Math.sqrt(1-Math.pow(2*t,2)))/2:(Math.sqrt(1-Math.pow(-2*t+2,2))+1)/2,easeInBack:t=>2.70158*t*t*t-w*t*t,easeOutBack:t=>1+2.70158*Math.pow(t-1,3)+w*Math.pow(t-1,2),easeInOutBack:t=>t<.5?Math.pow(2*t,2)*(7.189819*t-_)/2:(Math.pow(2*t-2,2)*((_+1)*(2*t-2)+_)+2)/2,easeInElastic:t=>0===t?0:1===t?1:-Math.pow(2,10*t-10)*Math.sin((10*t-10.75)*x),easeOutElastic:t=>0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin((10*t-.75)*x)+1,easeInOutElastic:t=>0===t?0:1===t?1:t<.5?-Math.pow(2,20*t-10)*Math.sin((20*t-11.125)*k)/2:Math.pow(2,-20*t+10)*Math.sin((20*t-11.125)*k)/2+1,easeInBounce:t=>1-S(1-t),easeOutBounce:S,easeInOutBounce:t=>t<.5?(1-S(1-2*t))/2:(1+S(2*t-1))/2},P=i({},j.default,{mass:1,damping:1,easing:E.linear,clamp:!1});class M{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,P)}}function A(t,e){if(r.s.und(e.decay)){const n=!r.s.und(e.tension)||!r.s.und(e.friction);!n&&r.s.und(e.frequency)&&r.s.und(e.damping)&&r.s.und(e.mass)||(t.duration=void 0,t.decay=void 0),n&&(t.frequency=void 0)}else t.duration=void 0}const I=[];class C{constructor(){this.changed=!1,this.values=I,this.toValues=null,this.fromValues=I,this.to=void 0,this.from=void 0,this.config=new M,this.immediate=!1}}function R(t,{key:e,props:n,defaultProps:s,state:o,actions:u}){return new Promise((l,d)=>{var f;let p,h,m=c(null!=(f=n.cancel)?f:null==s?void 0:s.cancel,e);if(m)y();else{r.s.und(n.pause)||(o.paused=c(n.pause,e));let t=null==s?void 0:s.pause;!0!==t&&(t=o.paused||c(t,e)),p=a(n.delay||0,e),t?(o.resumeQueue.add(g),u.pause()):(u.resume(),g())}function b(){o.resumeQueue.add(g),o.timeouts.delete(h),h.cancel(),p=h.time-r.w.now()}function g(){p>0&&!r.b.skipAnimation?(o.delayed=!0,h=r.w.setTimeout(y,p),o.pauseQueue.add(b),o.timeouts.add(h)):y()}function y(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(b),o.timeouts.delete(h),t<=(o.cancelId||0)&&(m=!0);try{u.start(i({},n,{callId:t,cancel:m}),l)}catch(t){d(t)}}})}const T=(t,e)=>1==e.length?e[0]:e.some(t=>t.cancelled)?q(t.get()):e.every(t=>t.noop)?N(t.get()):V(t.get(),e.every(t=>t.finished)),N=t=>({value:t,noop:!0,finished:!0,cancelled:!1}),V=(t,e,n=!1)=>({value:t,finished:e,cancelled:n}),q=t=>({value:t,cancelled:!0,finished:!1});function D(t,e,n,s){const{callId:o,parentId:a,onRest:c}=e,{asyncTo:u,promise:l}=n;return a||t!==u||e.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=t;const d=f(e,(t,e)=>"onRest"===e?void 0:t);let p,h;const m=new Promise((t,e)=>(p=t,h=e)),b=t=>{const e=o<=(n.cancelId||0)&&q(s)||o!==n.asyncId&&V(s,!1);if(e)throw t.result=e,h(t),t},g=(t,e)=>{const a=new L,c=new F;return(async()=>{if(r.b.skipAnimation)throw z(n),c.result=V(s,!1),h(c),c;b(a);const u=r.s.obj(t)?i({},t):i({},e,{to:t});u.parentId=o,Object(r.l)(d,(t,e)=>{r.s.und(u[e])&&(u[e]=t)});const l=await s.start(u);return b(a),n.paused&&await new Promise(t=>{n.resumeQueue.add(t)}),l})()};let y;if(r.b.skipAnimation)return z(n),V(s,!1);try{let e;e=r.s.arr(t)?(async t=>{for(const e of t)await g(e)})(t):Promise.resolve(t(g,s.stop.bind(s))),await Promise.all([e.then(p),m]),y=V(s.get(),!0,!1)}catch(t){if(t instanceof L)y=t.result;else{if(!(t instanceof F))throw t;y=t.result}}finally{o==n.asyncId&&(n.asyncId=a,n.asyncTo=a?u:void 0,n.promise=a?l:void 0)}return r.s.fun(c)&&r.w.batchedUpdates(()=>{c(y,s,s.item)}),y})():l}function z(t,e){Object(r.m)(t.timeouts,t=>t.cancel()),t.pauseQueue.clear(),t.resumeQueue.clear(),t.asyncId=t.asyncTo=t.promise=void 0,e&&(t.cancelId=e)}class L extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}}class F extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const U=t=>t instanceof Q;let $=1;class Q extends r.a{constructor(...t){super(...t),this.id=$++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){const t=Object(o.e)(this);return t&&t.getValue()}to(...t){return r.b.to(this,t)}interpolate(...t){return Object(r.j)(),r.b.to(this,t)}toJSON(){return this.get()}observerAdded(t){1==t&&this._attach()}observerRemoved(t){0==t&&this._detach()}_attach(){}_detach(){}_onChange(t,e=!1){Object(r.d)(this,{type:"change",parent:this,value:t,idle:e})}_onPriorityChange(t){this.idle||r.o.sort(this),Object(r.d)(this,{type:"priority",parent:this,priority:t})}}const B=Symbol.for("SpringPhase"),G=t=>(1&t[B])>0,H=t=>(2&t[B])>0,W=t=>(4&t[B])>0,Z=(t,e)=>e?t[B]|=3:t[B]&=-3,Y=(t,e)=>e?t[B]|=4:t[B]&=-5;class J extends Q{constructor(t,e){if(super(),this.key=void 0,this.animation=new C,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!r.s.und(t)||!r.s.und(e)){const n=r.s.obj(t)?i({},t):i({},e,{from:t});r.s.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(H(this)||this._state.asyncTo)||W(this)}get goal(){return Object(r.q)(this.animation.to)}get velocity(){const t=Object(o.e)(this);return t instanceof o.c?t.lastVelocity||0:t.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return G(this)}get isAnimating(){return H(this)}get isPaused(){return W(this)}get isDelayed(){return this._state.delayed}advance(t){let e=!0,n=!1;const s=this.animation;let{config:i,toValues:a}=s;const c=Object(o.g)(s.to);!c&&Object(r.r)(s.to)&&(a=Object(r.y)(Object(r.q)(s.to))),s.values.forEach((u,l)=>{if(u.done)return;const d=u.constructor==o.b?1:c?c[l].lastPosition:a[l];let f=s.immediate,p=d;if(!f){if(p=u.lastPosition,i.tension<=0)return void(u.done=!0);let e=u.elapsedTime+=t;const n=s.fromValues[l],o=null!=u.v0?u.v0:u.v0=r.s.arr(i.velocity)?i.velocity[l]:i.velocity;let a;if(r.s.und(i.duration))if(i.decay){const t=!0===i.decay?.998:i.decay,r=Math.exp(-(1-t)*e);p=n+o/(1-t)*(1-r),f=Math.abs(u.lastPosition-p)<.1,a=o*r}else{a=null==u.lastVelocity?o:u.lastVelocity;const e=i.precision||(n==d?.005:Math.min(1,.001*Math.abs(d-n))),s=i.restVelocity||e/10,c=i.clamp?0:i.bounce,l=!r.s.und(c),h=n==d?u.v0>0:ns,m||(f=Math.abs(d-p)<=e,!f));++t)l&&(b=p==d||p>d==h,b&&(a=-a*c,p=d)),a+=(1e-6*-i.tension*(p-d)+.001*-i.friction*a)/i.mass*g,p+=a*g}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,u.durationProgress>0&&(u.elapsedTime=i.duration*u.durationProgress,e=u.elapsedTime+=t)),r=(i.progress||0)+e/this._memoizedDuration,r=r>1?1:r<0?0:r,u.durationProgress=r),p=n+i.easing(r)*(d-n),a=(p-u.lastPosition)/t,f=1==r}u.lastVelocity=a,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),f=!0)}c&&!c[l].done&&(f=!1),f?u.done=!0:e=!1,u.setValue(p,i.round)&&(n=!0)});const u=Object(o.e)(this),l=u.getValue();if(e){const t=Object(r.q)(s.to);l===t&&!n||i.decay?n&&i.decay&&this._onChange(l):(u.setValue(t),this._onChange(t)),this._stop()}else n&&this._onChange(l)}set(t){return r.w.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(H(this)){const{to:t,config:e}=this.animation;r.w.batchedUpdates(()=>{this._onStart(),e.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,e){let n;return r.s.und(t)?(n=this.queue||[],this.queue=[]):n=[r.s.obj(t)?t:i({},e,{to:t})],Promise.all(n.map(t=>this._update(t))).then(t=>T(this,t))}stop(t){const{to:e}=this.animation;return this._focus(this.get()),z(this._state,t&&this._lastCallId),r.w.batchedUpdates(()=>this._stop(e,t)),this}reset(){this._update({reset:!0})}eventObserved(t){"change"==t.type?this._start():"priority"==t.type&&(this.priority=t.priority+1)}_prepareNode(t){const e=this.key||"";let{to:n,from:s}=t;n=r.s.obj(n)?n[e]:n,(null==n||y(n))&&(n=void 0),s=r.s.obj(s)?s[e]:s,null==s&&(s=void 0);const i={to:n,from:s};return G(this)||(t.reverse&&([n,s]=[s,n]),s=Object(r.q)(s),r.s.und(s)?Object(o.e)(this)||this._set(n):this._set(s)),i}_update(t,e){let n=i({},t);const{key:s,defaultProps:o}=this;n.default&&Object.assign(o,f(n,(t,e)=>/^on/.test(e)?u(t,s):t)),st(this,n,"onProps"),ot(this,"onProps",n,this);const a=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const c=this._state;return R(++this._lastCallId,{key:s,props:n,defaultProps:o,state:c,actions:{pause:()=>{W(this)||(Y(this,!0),Object(r.n)(c.pauseQueue),ot(this,"onPause",V(this,K(this,this.animation.to)),this))},resume:()=>{W(this)&&(Y(this,!1),H(this)&&this._resume(),Object(r.n)(c.resumeQueue),ot(this,"onResume",V(this,K(this,this.animation.to)),this))},start:this._merge.bind(this,a)}}).then(t=>{if(n.loop&&t.finished&&(!e||!t.noop)){const t=X(n);if(t)return this._update(t,!0)}return t})}_merge(t,e,n){if(e.cancel)return this.stop(!0),n(q(this));const s=!r.s.und(t.to),u=!r.s.und(t.from);if(s||u){if(!(e.callId>this._lastToId))return n(q(this));this._lastToId=e.callId}const{key:l,defaultProps:d,animation:f}=this,{to:p,from:h}=f;let{to:m=p,from:g=h}=t;!u||s||e.default&&!r.s.und(m)||(m=g),e.reverse&&([m,g]=[g,m]);const O=!Object(r.u)(g,h);O&&(f.from=g),g=Object(r.q)(g);const v=!Object(r.u)(m,p);v&&this._focus(m);const j=y(e.to),{config:w}=f,{decay:_,velocity:x}=w;(s||u)&&(w.velocity=0),e.config&&!j&&function(t,e,n){n&&(A(n=i({},n),e),e=i({},n,e)),A(t,e),Object.assign(t,e);for(const e in P)null==t[e]&&(t[e]=P[e]);let{mass:s,frequency:o,damping:a}=t;r.s.und(o)||(o<.01&&(o=.01),a<0&&(a=0),t.tension=Math.pow(2*Math.PI/o,2)*s,t.friction=4*Math.PI*a*s/o)}(w,a(e.config,l),e.config!==d.config?a(d.config,l):void 0);let k=Object(o.e)(this);if(!k||r.s.und(m))return n(V(this,!0));const S=r.s.und(e.reset)?u&&!e.default:!r.s.und(g)&&c(e.reset,l),E=S?g:this.get(),M=b(m),I=r.s.num(M)||r.s.arr(M)||Object(r.t)(M),C=!j&&(!I||c(d.immediate||e.immediate,l));if(v){const t=Object(o.f)(m);if(t!==k.constructor){if(!C)throw Error(`Cannot animate between ${k.constructor.name} and ${t.name}, as the "to" prop suggests`);k=this._set(M)}}const R=k.constructor;let T=Object(r.r)(m),z=!1;if(!T){const t=S||!G(this)&&O;(v||t)&&(z=Object(r.u)(b(E),M),T=!z),(Object(r.u)(f.immediate,C)||C)&&Object(r.u)(w.decay,_)&&Object(r.u)(w.velocity,x)||(T=!0)}if(z&&H(this)&&(f.changed&&!S?T=!0:T||this._stop(p)),!j&&((T||Object(r.r)(p))&&(f.values=k.getPayload(),f.toValues=Object(r.r)(m)?null:R==o.b?[1]:Object(r.y)(M)),f.immediate!=C&&(f.immediate=C,C||S||this._set(p)),T)){const{onRest:t}=f;Object(r.k)(rt,t=>st(this,e,t));const s=V(this,K(this,p));Object(r.n)(this._pendingCalls,s),this._pendingCalls.add(n),f.changed&&r.w.batchedUpdates(()=>{f.changed=!S,null==t||t(s,this),S?a(d.onRest,s):null==f.onStart||f.onStart(s,this)})}S&&this._set(E),j?n(D(e.to,e,this._state,this)):T?this._start():H(this)&&!v?this._pendingCalls.add(n):n(N(E))}_focus(t){const e=this.animation;t!==e.to&&(Object(r.p)(this)&&this._detach(),e.to=t,Object(r.p)(this)&&this._attach())}_attach(){let t=0;const{to:e}=this.animation;Object(r.r)(e)&&(Object(r.c)(e,this),U(e)&&(t=e.priority+1)),this.priority=t}_detach(){const{to:t}=this.animation;Object(r.r)(t)&&Object(r.x)(t,this)}_set(t,e=!0){const n=Object(r.q)(t);if(!r.s.und(n)){const t=Object(o.e)(this);if(!t||!Object(r.u)(n,t.getValue())){const s=Object(o.f)(n);t&&t.constructor==s?t.setValue(n):Object(o.h)(this,s.create(n)),t&&r.w.batchedUpdates(()=>{this._onChange(n,e)})}}return Object(o.e)(this)}_onStart(){const t=this.animation;t.changed||(t.changed=!0,ot(this,"onStart",V(this,K(this,t.to)),this))}_onChange(t,e){e||(this._onStart(),a(this.animation.onChange,t,this)),a(this.defaultProps.onChange,t,this),super._onChange(t,e)}_start(){const t=this.animation;Object(o.e)(this).reset(Object(r.q)(t.to)),t.immediate||(t.fromValues=t.values.map(t=>t.lastPosition)),H(this)||(Z(this,!0),W(this)||this._resume())}_resume(){r.b.skipAnimation?this.finish():r.o.start(this)}_stop(t,e){if(H(this)){Z(this,!1);const n=this.animation;Object(r.k)(n.values,t=>{t.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Object(r.d)(this,{type:"idle",parent:this});const s=e?q(this.get()):V(this.get(),K(this,null!=t?t:n.to));Object(r.n)(this._pendingCalls,s),n.changed&&(n.changed=!1,ot(this,"onRest",s,this))}}}function K(t,e){const n=b(e),s=b(t.get());return Object(r.u)(s,n)}function X(t,e=t.loop,n=t.to){let r=a(e);if(r){const s=!0!==r&&m(r),o=(s||t).reverse,a=!s||s.reset;return tt(i({},t,{loop:e,default:!1,pause:void 0,to:!o||y(n)?n:void 0,from:a?t.from:void 0,reset:a},s))}}function tt(t){const{to:e,from:n}=t=m(t),s=new Set;return r.s.obj(e)&&nt(e,s),r.s.obj(n)&&nt(n,s),t.keys=s.size?Array.from(s):null,t}function et(t){const e=tt(t);return r.s.und(e.default)&&(e.default=f(e)),e}function nt(t,e){Object(r.l)(t,(t,n)=>null!=t&&e.add(n))}const rt=["onStart","onRest","onChange","onPause","onResume"];function st(t,e,n){t.animation[n]=e[n]!==l(e,n)?u(e[n],t.key):void 0}function ot(t,e,...n){var r,s,o,i;null==(r=(s=t.animation)[e])||r.call(s,...n),null==(o=(i=t.defaultProps)[e])||o.call(i,...n)}const it=["onStart","onChange","onRest"];let at=1;class ct{constructor(t,e){this.id=at++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),e&&(this._flush=e),t&&this.start(i({default:!0},t))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((e,n)=>t[n]=e.get()),t}set(t){for(const e in t){const n=t[e];r.s.und(n)||this.springs[e].set(n)}}update(t){return t&&this.queue.push(tt(t)),this}start(t){let{queue:e}=this;return t?e=Object(r.y)(t).map(tt):this.queue=[],this._flush?this._flush(this,e):(ht(this,e),ut(this,e))}stop(t,e){if(t!==!!t&&(e=t),e){const n=this.springs;Object(r.k)(Object(r.y)(e),e=>n[e].stop(!!t))}else z(this._state,this._lastAsyncId),this.each(e=>e.stop(!!t));return this}pause(t){if(r.s.und(t))this.start({pause:!0});else{const e=this.springs;Object(r.k)(Object(r.y)(t),t=>e[t].pause())}return this}resume(t){if(r.s.und(t))this.start({pause:!1});else{const e=this.springs;Object(r.k)(Object(r.y)(t),t=>e[t].resume())}return this}each(t){Object(r.l)(this.springs,t)}_onFrame(){const{onStart:t,onChange:e,onRest:n}=this._events,s=this._active.size>0,o=this._changed.size>0;(s&&!this._started||o&&!this._started)&&(this._started=!0,Object(r.m)(t,([t,e])=>{e.value=this.get(),t(e,this,this._item)}));const i=!s&&this._started,a=o||i&&n.size?this.get():null;o&&e.size&&Object(r.m)(e,([t,e])=>{e.value=a,t(e,this,this._item)}),i&&(this._started=!1,Object(r.m)(n,([t,e])=>{e.value=a,t(e,this,this._item)}))}eventObserved(t){if("change"==t.type)this._changed.add(t.parent),t.idle||this._active.add(t.parent);else{if("idle"!=t.type)return;this._active.delete(t.parent)}r.w.onFrame(this._onFrame)}}function ut(t,e){return Promise.all(e.map(e=>async function t(e,n,s){const{keys:o,to:i,from:a,loop:c,onRest:u,onResolve:d}=n,f=r.s.obj(n.default)&&n.default;c&&(n.loop=!1),!1===i&&(n.to=null),!1===a&&(n.from=null);const p=r.s.arr(i)||r.s.fun(i)?i:void 0;p?(n.to=void 0,n.onRest=void 0,f&&(f.onRest=void 0)):Object(r.k)(it,t=>{const s=n[t];if(r.s.fun(s)){const r=e._events[t];n[t]=({finished:t,cancelled:e})=>{const n=r.get(s);n?(t||(n.finished=!1),e&&(n.cancelled=!0)):r.set(s,{value:null,finished:t||!1,cancelled:e||!1})},f&&(f[t]=n[t])}});const h=e._state;n.pause===!h.paused?(h.paused=n.pause,Object(r.n)(n.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(n.pause=!0);const m=(o||Object.keys(e.springs)).map(t=>e.springs[t].start(n)),b=!0===n.cancel||!0===l(n,"cancel");(p||b&&h.asyncId)&&m.push(R(++e._lastAsyncId,{props:n,state:h,actions:{pause:r.v,resume:r.v,start(t,n){b?(z(h,e._lastAsyncId),n(q(e))):(t.onRest=u,n(D(p,t,h,e)))}}})),h.paused&&await new Promise(t=>{h.resumeQueue.add(t)});const g=T(e,await Promise.all(m));if(c&&g.finished&&(!s||!g.noop)){const r=X(n,c,i);if(r)return ht(e,[r]),t(e,r,!0)}return d&&r.w.batchedUpdates(()=>d(g,e,e.item)),g}(t,e))).then(e=>T(t,e))}function lt(t,e){const n=i({},t.springs);return e&&Object(r.k)(Object(r.y)(e),t=>{r.s.und(t.keys)&&(t=tt(t)),r.s.obj(t.to)||(t=i({},t,{to:void 0})),pt(n,t,t=>ft(t))}),dt(t,n),n}function dt(t,e){Object(r.l)(e,(e,n)=>{t.springs[n]||(t.springs[n]=e,Object(r.c)(e,t))})}function ft(t,e){const n=new J;return n.key=t,e&&Object(r.c)(n,e),n}function pt(t,e,n){e.keys&&Object(r.k)(e.keys,r=>{(t[r]||(t[r]=n(r)))._prepareNode(e)})}function ht(t,e){Object(r.k)(e,e=>{pt(t.springs,e,e=>ft(e,t))})}const mt=["children"],bt=t=>{let{children:e}=t,n=function(t,e){if(null==t)return{};var n,r,s={},o=Object.keys(t);for(r=0;r=0||(s[n]=t[n]);return s}(t,mt);const o=Object(s.useContext)(gt),i=n.pause||!!o.pause,a=n.immediate||!!o.immediate;n=Object(r.B)(()=>({pause:i,immediate:a}),[i,a]);const{Provider:c}=gt;return s.createElement(c,{value:n},e)},gt=(yt=bt,Ot={},Object.assign(yt,s.createContext(Ot)),yt.Provider._context=yt,yt.Consumer._context=yt,yt);var yt,Ot;bt.Provider=gt.Provider,bt.Consumer=gt.Consumer;const vt=()=>{const t=[],e=function(e){Object(r.i)();const s=[];return Object(r.k)(t,(t,o)=>{if(r.s.und(e))s.push(t.start());else{const r=n(e,t,o);r&&s.push(t.start(r))}}),s};e.current=t,e.add=function(e){t.includes(e)||t.push(e)},e.delete=function(e){const n=t.indexOf(e);~n&&t.splice(n,1)},e.pause=function(){return Object(r.k)(t,t=>t.pause(...arguments)),this},e.resume=function(){return Object(r.k)(t,t=>t.resume(...arguments)),this},e.set=function(e){Object(r.k)(t,t=>t.set(e))},e.start=function(e){const n=[];return Object(r.k)(t,(t,s)=>{if(r.s.und(e))n.push(t.start());else{const r=this._getProps(e,t,s);r&&n.push(t.start(r))}}),n},e.stop=function(){return Object(r.k)(t,t=>t.stop(...arguments)),this},e.update=function(e){return Object(r.k)(t,(t,n)=>t.update(this._getProps(e,t,n))),this};const n=function(t,e,n){return r.s.fun(t)?t(n,e):t};return e._getProps=n,e};function jt(t,e,n){const o=r.s.fun(e)&&e;o&&!n&&(n=[]);const a=Object(s.useMemo)(()=>o||3==arguments.length?vt():void 0,[]),c=Object(s.useRef)(0),u=Object(r.z)(),l=Object(s.useMemo)(()=>({ctrls:[],queue:[],flush(t,e){const n=lt(t,e);return c.current>0&&!l.queue.length&&!Object.keys(n).some(e=>!t.springs[e])?ut(t,e):new Promise(r=>{dt(t,n),l.queue.push(()=>{r(ut(t,e))}),u()})}}),[]),d=Object(s.useRef)([...l.ctrls]),f=[],p=Object(r.D)(t)||0;function h(t,n){for(let r=t;r{Object(r.k)(d.current.slice(t,p),t=>{O(t,a),t.stop(!0)}),d.current.length=t,h(p,t)},[t]),Object(s.useMemo)(()=>{h(0,Math.min(p,t))},n);const m=d.current.map((t,e)=>lt(t,f[e])),b=Object(s.useContext)(bt),y=Object(r.D)(b),j=b!==y&&g(b);Object(r.A)(()=>{c.current++,l.ctrls=d.current;const{queue:t}=l;t.length&&(l.queue=[],Object(r.k)(t,t=>t())),Object(r.k)(d.current,(t,e)=>{null==a||a.add(t),j&&t.start({default:b});const n=f[e];n&&(v(t,n.ref),t.ref?t.queue.push(n):t.start(n))})}),Object(r.C)(()=>()=>{Object(r.k)(l.ctrls,t=>t.stop(!0))});const w=m.map(t=>i({},t));return a?[w,a]:w}function wt(t,e){const n=r.s.fun(t),[[s],o]=jt(1,n?t:[t],n?e||[]:e);return n||2==arguments.length?[s,o]:s}let _t;function xt(t,e,n){const o=r.s.fun(e)&&e,{reset:c,sort:u,trail:l=0,expires:d=!0,exitBeforeEnter:p=!1,onDestroyed:h,ref:b,config:y}=o?o():e,j=Object(s.useMemo)(()=>o||3==arguments.length?vt():void 0,[]),w=Object(r.y)(t),_=[],x=Object(s.useRef)(null),k=c?null:x.current;Object(r.A)(()=>{x.current=_}),Object(r.C)(()=>(Object(r.k)(x.current,t=>{var e;null==(e=t.ctrl.ref)||e.add(t.ctrl);const n=C.get(t);n&&t.ctrl.start(n.payload)}),()=>{Object(r.k)(x.current,t=>{t.expired&&clearTimeout(t.expirationId),O(t.ctrl,j),t.ctrl.stop(!0)})}));const S=St(w,o?o():e,k),E=c&&x.current||[];Object(r.A)(()=>Object(r.k)(E,({ctrl:t,item:e,key:n})=>{O(t,j),a(h,e,n)}));const P=[];if(k&&Object(r.k)(k,(t,e)=>{t.expired?(clearTimeout(t.expirationId),E.push(t)):~(e=P[e]=S.indexOf(t.key))&&(_[e]=t)}),Object(r.k)(w,(t,e)=>{_[e]||(_[e]={key:S[e],item:t,phase:_t.MOUNT,ctrl:new ct},_[e].ctrl.item=t)}),P.length){let t=-1;const{leave:n}=o?o():e;Object(r.k)(P,(e,r)=>{const s=k[r];~e?(t=_.indexOf(s),_[t]=i({},s,{item:w[e]})):n&&_.splice(++t,0,s)})}r.s.fun(u)&&_.sort((t,e)=>u(t.item,e.item));let M=-l;const A=Object(r.z)(),I=f(e),C=new Map,R=Object(s.useRef)(new Map),T=Object(s.useRef)(!1);Object(r.k)(_,(t,n)=>{const s=t.key,c=t.phase,u=o?o():e;let f,h,g=a(u.delay||0,s);if(c==_t.MOUNT)f=u.enter,h=_t.ENTER;else{const t=S.indexOf(s)<0;if(c!=_t.LEAVE)if(t)f=u.leave,h=_t.LEAVE;else{if(!(f=u.update))return;h=_t.UPDATE}else{if(t)return;f=u.enter,h=_t.ENTER}}if(f=a(f,t.item,n),f=r.s.obj(f)?m(f):{to:f},!f.config){const e=y||I.config;f.config=a(e,t.item,n,h)}M+=l;const O=i({},I,{delay:g+M,ref:b,immediate:u.immediate,reset:!1},f);if(h==_t.ENTER&&r.s.und(O.from)){const s=o?o():e,i=r.s.und(s.initial)||k?s.from:s.initial;O.from=a(i,t.item,n)}const{onResolve:v}=O;O.onResolve=t=>{a(v,t);const e=x.current,n=e.find(t=>t.key===s);if(n&&(!t.cancelled||n.phase==_t.UPDATE)&&n.ctrl.idle){const t=e.every(t=>t.ctrl.idle);if(n.phase==_t.LEAVE){const e=a(d,n.item);if(!1!==e){const r=!0===e?0:e;if(n.expired=!0,!t&&r>0)return void(r<=2147483647&&(n.expirationId=setTimeout(A,r)))}}t&&e.some(t=>t.expired)&&(R.current.delete(n),p&&(T.current=!0),A())}};const j=lt(t.ctrl,O);h===_t.LEAVE&&p?R.current.set(t,{phase:h,springs:j,payload:O}):C.set(t,{phase:h,springs:j,payload:O})});const N=Object(s.useContext)(bt),V=Object(r.D)(N),q=N!==V&&g(N);Object(r.A)(()=>{q&&Object(r.k)(_,t=>{t.ctrl.start({default:N})})},[N]),Object(r.k)(C,(t,e)=>{if(R.current.size){const t=_.findIndex(t=>t.key===e.key);_.splice(t,1)}}),Object(r.A)(()=>{Object(r.k)(R.current.size?R.current:C,({phase:t,payload:e},n)=>{const{ctrl:r}=n;n.phase=t,null==j||j.add(r),q&&t==_t.ENTER&&r.start({default:N}),e&&(v(r,e.ref),r.ref&&!T.current?r.update(e):(r.start(e),T.current&&(T.current=!1)))})},c?void 0:n);const D=t=>s.createElement(s.Fragment,null,_.map((e,n)=>{const{springs:o}=C.get(e)||e.ctrl,a=t(i({},o),e.item,e,n);return a&&a.type?s.createElement(a.type,i({},a.props,{key:r.s.str(e.key)||r.s.num(e.key)?e.key:e.ctrl.id,ref:a.ref})):a}));return j?[D,j]:D}!function(t){t.MOUNT="mount",t.ENTER="enter",t.UPDATE="update",t.LEAVE="leave"}(_t||(_t={}));let kt=1;function St(t,{key:e,keys:n=e},s){if(null===n){const e=new Set;return t.map(t=>{const n=s&&s.find(n=>n.item===t&&n.phase!==_t.LEAVE&&!e.has(n));return n?(e.add(n),n.key):kt++})}return r.s.und(n)?t:r.s.fun(n)?t.map(n):Object(r.y)(n)}class Et extends Q{constructor(t,e){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=Object(r.f)(...e);const n=this._get(),s=Object(o.f)(n);Object(o.h)(this,s.create(n))}advance(t){const e=this._get(),n=this.get();Object(r.u)(e,n)||(Object(o.e)(this).setValue(e),this._onChange(e,this.idle)),!this.idle&&Mt(this._active)&&At(this)}_get(){const t=r.s.arr(this.source)?this.source.map(r.q):Object(r.y)(Object(r.q)(this.source));return this.calc(...t)}_start(){this.idle&&!Mt(this._active)&&(this.idle=!1,Object(r.k)(Object(o.g)(this),t=>{t.done=!1}),r.b.skipAnimation?(r.w.batchedUpdates(()=>this.advance()),At(this)):r.o.start(this))}_attach(){let t=1;Object(r.k)(Object(r.y)(this.source),e=>{Object(r.r)(e)&&Object(r.c)(e,this),U(e)&&(e.idle||this._active.add(e),t=Math.max(t,e.priority+1))}),this.priority=t,this._start()}_detach(){Object(r.k)(Object(r.y)(this.source),t=>{Object(r.r)(t)&&Object(r.x)(t,this)}),this._active.clear(),At(this)}eventObserved(t){"change"==t.type?t.idle?this.advance():(this._active.add(t.parent),this._start()):"idle"==t.type?this._active.delete(t.parent):"priority"==t.type&&(this.priority=Object(r.y)(this.source).reduce((t,e)=>Math.max(t,(U(e)?e.priority:0)+1),0))}}function Pt(t){return!1!==t.idle}function Mt(t){return!t.size||Array.from(t).every(Pt)}function At(t){t.idle||(t.idle=!0,Object(r.k)(Object(o.g)(t),t=>{t.done=!0}),Object(r.d)(t,{type:"idle",parent:t}))}r.b.assign({createStringInterpolator:r.g,to:(t,e)=>new Et(t,e)}),r.o.advance},,function(t,e){t.exports=window.regeneratorRuntime},,,function(t,e,n){"use strict";n.d(e,"animated",(function(){return _}));var r=n(43);n.o(r,"config")&&n.d(e,"config",(function(){return r.config})),n.o(r,"useSpring")&&n.d(e,"useSpring",(function(){return r.useSpring})),n.o(r,"useTransition")&&n.d(e,"useTransition",(function(){return r.useTransition}));var s=n(55),o=n(1),i=n(19);function a(t,e){if(null==t)return{};var n,r,s={},o=Object.keys(t);for(r=0;r=0||(s[n]=t[n]);return s}const c=["style","children","scrollTop","scrollLeft"],u=/^--/;function l(t,e){return null==e||"boolean"==typeof e||""===e?"":"number"!=typeof e||0===e||u.test(t)||f.hasOwnProperty(t)&&f[t]?(""+e).trim():e+"px"}const d={};let f={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const p=["Webkit","Ms","Moz","O"];f=Object.keys(f).reduce((t,e)=>(p.forEach(n=>t[((t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1))(n,e)]=t[e]),t),f);const h=["x","y","z"],m=/^(matrix|translate|scale|rotate|skew)/,b=/^(translate)/,g=/^(rotate|skew)/,y=(t,e)=>o.s.num(t)&&0!==t?t+e:t,O=(t,e)=>o.s.arr(t)?t.every(t=>O(t,e)):o.s.num(t)?t===e:parseFloat(t)===e;class v extends i.a{constructor(t){let{x:e,y:n,z:r}=t,s=a(t,h);const i=[],c=[];(e||n||r)&&(i.push([e||0,n||0,r||0]),c.push(t=>[`translate3d(${t.map(t=>y(t,"px")).join(",")})`,O(t,0)])),Object(o.l)(s,(t,e)=>{if("transform"===e)i.push([t||""]),c.push(t=>[t,""===t]);else if(m.test(e)){if(delete s[e],o.s.und(t))return;const n=b.test(e)?"px":g.test(e)?"deg":"";i.push(Object(o.y)(t)),c.push("rotate3d"===e?([t,e,r,s])=>[`rotate3d(${t},${e},${r},${y(s,n)})`,O(s,0)]:t=>[`${e}(${t.map(t=>y(t,n)).join(",")})`,O(t,e.startsWith("scale")?1:0)])}}),i.length&&(s.transform=new j(i,c)),super(s)}}class j extends o.a{constructor(t,e){super(),this._value=null,this.inputs=t,this.transforms=e}get(){return this._value||(this._value=this._get())}_get(){let t="",e=!0;return Object(o.k)(this.inputs,(n,r)=>{const s=Object(o.q)(n[0]),[i,a]=this.transforms[r](o.s.arr(s)?s:n.map(o.q));t+=" "+i,e=e&&a}),e?"none":t}observerAdded(t){1==t&&Object(o.k)(this.inputs,t=>Object(o.k)(t,t=>Object(o.r)(t)&&Object(o.c)(t,this)))}observerRemoved(t){0==t&&Object(o.k)(this.inputs,t=>Object(o.k)(t,t=>Object(o.r)(t)&&Object(o.x)(t,this)))}eventObserved(t){"change"==t.type&&(this._value=null),Object(o.d)(this,t)}}const w=["scrollTop","scrollLeft"];r.Globals.assign({batchedUpdates:s.unstable_batchedUpdates,createStringInterpolator:o.g,colors:o.e});const _=Object(i.d)(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(t,e){if(!t.nodeType||!t.setAttribute)return!1;const n="filter"===t.nodeName||t.parentNode&&"filter"===t.parentNode.nodeName,r=e,{style:s,children:o,scrollTop:i,scrollLeft:f}=r,p=a(r,c),h=Object.values(p),m=Object.keys(p).map(e=>n||t.hasAttribute(e)?e:d[e]||(d[e]=e.replace(/([A-Z])/g,t=>"-"+t.toLowerCase())));void 0!==o&&(t.textContent=o);for(let e in s)if(s.hasOwnProperty(e)){const n=l(e,s[e]);u.test(e)?t.style.setProperty(e,n):t.style[e]=n}m.forEach((e,n)=>{t.setAttribute(e,h[n])}),void 0!==i&&(t.scrollTop=i),void 0!==f&&(t.scrollLeft=f)},createAnimatedStyle:t=>new v(t),getComponentProps:t=>a(t,w)}).animated},function(t,e){},function(t,e){},,,,,function(t,e){t.exports=window.ReactDOM},function(t,e){t.exports=window.moment},function(t,e){t.exports=window.wp.autop},function(t,e){function n(t,e,n,r,s,o,i){try{var a=t[o](i),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,s)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(s,o){var i=t.apply(e,r);function a(t){n(i,s,o,a,c,"next",t)}function c(t){n(i,s,o,a,c,"throw",t)}a(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},,,,,,,,,,,function(t,e,n){"use strict";var r=n(0),s=n(9);const o=Object(r.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(s.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));e.a=o},,,,,,,,,,,,,function(t,e,n){"use strict";n.r(e);var r=n(6),s=n.n(r),o=n(0),i=n(25),a=n.n(i),c=n(41),u=n(10),l=n(11),d=n.n(l);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e0&&Object(o.createElement)(m.animated.span,{style:r,className:"simpay-branding-bar__actions-button-count","aria-label":Object(b.sprintf)(/* translators: %d Unread notification count. */ +Object(b.__)("%d unread notifications","stripe"),e)},Object(o.createElement)("span",null,e)),Object(o.createElement)("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.8333 2.5H4.16667C3.25 2.5 2.5 3.25 2.5 4.16667V15.8333c0 .9167.74167 1.6667 1.66667 1.6667H15.8333c.9167 0 1.6667-.75 1.6667-1.6667V4.16667C17.5 3.25 16.75 2.5 15.8333 2.5Zm0 13.3333H4.16667v-2.5h2.96666C7.70833 14.325 8.775 15 10.0083 15c1.2334 0 2.2917-.675 2.875-1.6667h2.95v2.5Zm-4.1583-4.1666h4.1583V4.16667H4.16667v7.50003h4.175c0 .9166.75 1.6666 1.66663 1.6666.9167 0 1.6667-.75 1.6667-1.6666Z",fill:"currentColor"})))},y=n(56),O=n.n(y),v=n(3),j=n(57),w="simpay-notifications-notification",_=simpayNotifications.isLite;function x(t){switch(t){case"warning":return"warning";case"error":return"dismiss";case"info":return"admin-generic";case"success":default:return"yes-alt"}}function k(t){return Object(u.getAuthority)(window.location.href)!==Object(u.getAuthority)(t)}function S(t,e,n){return!1===k(t)?t:Object(u.addQueryArgs)(t.replace(/\/?$/,"/"),{utm_source:"WordPress",utm_campaign:"1"===_?"lite-plugin":"pro-plugin",utm_medium:e,utm_content:n})}var E=function(t){var e=t.notification,n=t.onDismissNotification,r=e.id,s=e.title,i=e.content,a=e.type,c=e.start,u=e.actions,l=e.is_dismissible;return Object(o.createElement)("div",{className:w,style:{backgroundColor:l?"transparent":"#fafafa"}},Object(o.createElement)("div",{className:"".concat(w,"__icon ").concat(w,"__icon-").concat(a||"success")},Object(o.createElement)("span",{className:"dashicons dashicons-".concat(x(a))})),Object(o.createElement)("div",{className:"".concat(w,"__body")},Object(o.createElement)("div",{className:"".concat(w,"__header")},Object(o.createElement)("div",{className:"".concat(w,"__title")},s),l&&Object(o.createElement)("div",{className:"".concat(w,"__date")},O.a.unix(c).fromNow())),Object(o.createElement)("div",{className:"".concat(w,"__content"),dangerouslySetInnerHTML:{__html:Object(j.autop)(i)}}),Object(o.createElement)("div",{className:"".concat(w,"__actions")},u.map((function(t){var e=t.type,n=t.text,r=t.url;return Object(o.createElement)(v.Button,{key:n,href:S(r,"notification-inbox",s),isPrimary:"primary"===e,isSecondary:"secondary"===e,variant:e,target:k(r)?"_blank":"_self"},n)})),l&&Object(o.createElement)(v.Button,{isLink:!0,variant:"link",onClick:function(){return n(r)}},Object(b.__)("Dismiss","stripe")))))},P=n(58),M=n.n(P),A=n(45),I=n.n(A),C=n(13),R=n.n(C),T=n(12),N=n(20);function V(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){a=!0,o=t},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}(t?s.current:r.current);try{for(i.s();!(o=i.n()).done;)q(o.value,t)}catch(t){i.e(t)}finally{i.f()}}),[])}([Object(N.useConstrainedTabbing)(),Object(N.useFocusReturn)(),c]),l=Object(o.useState)((function(){return new WeakMap})),d=s()(l,1)[0],f=Object(T.sortBy)(i,"is_dismissible"),p=Object(m.useTransition)(f,{config:m.config.default,enter:function(t){return function(){var e=M()(I.a.mark((function e(n){return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({height:d.get(t).offsetHeight,transform:"translate3d(0%, 0px, 0px)"});case 2:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}()},leave:[{transform:"translate3d(150%, 0px, 0px)"},{height:0}],keys:function(t){return t.id},trail:100});return Object(o.createElement)(v.Animate,{type:"slide-in",options:{origin:"left"}},(function(t){var s=t.className,c=R()("simpay-notifications-panel",s);return Object(o.createElement)("div",{ref:u,className:c},Object(o.createElement)(z,{count:e.data.length,onClose:n}),Object(o.createElement)("div",{className:"simpay-notifications-panel__notifications"},a&&Object(o.createElement)("div",{className:"simpay-notifications-panel__none"},Object(o.createElement)(v.Spinner,null)),0===i.length&&!a&&Object(o.createElement)("div",{className:"simpay-notifications-panel__none"},Object(o.createElement)("span",null,Object(b.__)("You have no new notifications.","stripe"))),p((function(t,e){return Object(o.createElement)(m.animated.div,{style:F(F({},t),{},{overflow:"hidden"}),ref:function(t){return t&&d.set(e,t)}},Object(o.createElement)(E,{onDismissNotification:r,notification:e}))}))))}))},$=function(t){var e=t.isOpen,n=t.onClose;return Object(o.useEffect)((function(){return document.body.classList.toggle("simpay-notifications-body-locked"),function(){document.body.classList.remove("simpay-notifications-body-locked")}}),[e]),Object(o.createElement)("button",{className:"simpay-notifications-backdrop",onClick:n})};Object(o.render)(Object(o.createElement)((function(){var t=Object(o.useReducer)(h,{data:[],isLoading:!0}),e=s()(t,2),n=e[0],r=e[1],i=Object(o.useState)("#notifications"===Object(u.getFragment)(window.location.href)),l=s()(i,2),d=l[0],f=l[1];function p(){f(!1),window.history.pushState("",document.title,window.location.pathname+window.location.search)}return Object(o.useEffect)((function(){function t(){"#notifications"===Object(u.getFragment)(window.location.href)&&f(!0)}return window.addEventListener("hashchange",t),function(){window.removeEventListener("hashchange",t)}}),[]),Object(o.useEffect)((function(){if(!n.isLoading){var t=document.querySelector("#wp-admin-bar-simpay-admin-bar-test-mode .wp-ui-notification");if(0===n.data.length){t&&t.remove();var e=document.getElementById("wp-admin-bar-simpay-notifications");e&&e.remove();var r=document.querySelector('#menu-posts-simple-pay .wp-submenu a[href$="#notifications"]');r&&r.remove()}else t&&(t.textContent=n.data.length)}}),[n.data]),Object(o.useEffect)((function(){r({type:"START_RESOLUTION"}),a()({path:"/wpsp/__internal__/notifications"}).then((function(t){var e=t.data;r({type:"SET",notifications:e}),r({type:"FINISH_RESOLUTION"})}))}),[]),Object(o.createElement)("div",{onKeyDown:function(t){t.keyCode!==c.ESCAPE||t.defaultPrevented||(t.preventDefault(),f(!1))},role:"region"},Object(o.createElement)(g,{count:n.data.length,isOpen:d,onOpen:function(){f(!0),window.history.pushState("",document.title,window.location.pathname+window.location.search+"#notifications")}}),d&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(U,{notifications:n,onDismissNotification:function(t){r({type:"DISMISS",id:t}),a()({path:"/wpsp/__internal__/notifications/"+t,method:"DELETE"})},onClose:p}),Object(o.createElement)($,{onClose:p})))}),null),document.getElementById("simpay-branding-bar-notifications"))}]); \ No newline at end of file diff --git a/includes/core/assets/js/dist/simpay-admin-page-activity-reports-css.asset.php b/includes/core/assets/js/dist/simpay-admin-page-activity-reports-css.asset.php new file mode 100644 index 00000000..43f87d6a --- /dev/null +++ b/includes/core/assets/js/dist/simpay-admin-page-activity-reports-css.asset.php @@ -0,0 +1 @@ + array(), 'version' => '573049bae9275d33a66d652f3a3ff8c7'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-page-activity-reports.min.asset.php b/includes/core/assets/js/dist/simpay-admin-page-activity-reports.asset.php similarity index 75% rename from includes/core/assets/js/simpay-admin-page-activity-reports.min.asset.php rename to includes/core/assets/js/dist/simpay-admin-page-activity-reports.asset.php index 3737e15d..8f0ad733 100644 --- a/includes/core/assets/js/simpay-admin-page-activity-reports.min.asset.php +++ b/includes/core/assets/js/dist/simpay-admin-page-activity-reports.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => '7ddf7478dfc08cb2cd18adddcf97a0b9'); \ No newline at end of file + array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => '865904a6360b86b2b48ca786d982c481'); \ No newline at end of file diff --git a/includes/core/assets/js/dist/simpay-admin-page-activity-reports.js b/includes/core/assets/js/dist/simpay-admin-page-activity-reports.js new file mode 100644 index 00000000..4cae676a --- /dev/null +++ b/includes/core/assets/js/dist/simpay-admin-page-activity-reports.js @@ -0,0 +1,6 @@ +!function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,function(e){return t[e]}.bind(null,a));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=79)}([function(t,e){t.exports=window.wp.element},,function(t,e){t.exports=window.wp.i18n},function(t,e){t.exports=window.wp.components},function(t,e,i){"use strict";function n(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}i.d(e,"a",(function(){return n}))},function(t,e){t.exports=window.React},function(t,e,i){var n=i(26),a=i(27),s=i(22),r=i(28);t.exports=function(t,e){return n(t)||a(t,e)||s(t,e)||r()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){"use strict";function n(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i(4);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){Object(n.a)(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===a(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},function(t,e){t.exports=window.wp.primitives},function(t,e){t.exports=window.wp.url},function(t,e,i){var n=i(30);t.exports=function(t,e,i){return(e=n(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=window.lodash},function(t,e,i){var n;!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var t=[],e=0;eArray.prototype.slice.call(t));let a=!1,s=[];return function(...i){s=n(i),a||(a=!0,h.call(window,()=>{a=!1,t.apply(e,s)}))}}const u=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function f(){}const p=function(){let t=0;return function(){return t++}}();function g(t){return null==t}function m(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function b(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const y=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function x(t,e){return y(t)?t:e}function v(t,e){return void 0===t?e:t}const _=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function w(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function O(t,e,i,n){let a,s,r;if(m(t))if(s=t.length,n)for(a=s-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;ai;)t=t[e.substr(i,n-i)],i=n+1,n=C(e,i);return t}function A(t){return t.charAt(0).toUpperCase()+t.slice(1)}const L=t=>void 0!==t,R=t=>"function"==typeof t,N=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},F=Math.PI,I=2*F,z=I+F,B=Number.POSITIVE_INFINITY,V=F/180,W=F/2,H=F/4,U=2*F/3,Y=Math.log10,$=Math.sign;function X(t){const e=Math.round(t);t=G(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(Y(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function q(t){return!isNaN(parseFloat(t))&&isFinite(t)}function G(t,e,i){return Math.abs(t-e)l&&c=Math.min(e,i)-n&&t<=Math.max(e,i)+n}const ot=t=>0===t||1===t,lt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*I/i),ct=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*I/i)+1,ht={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*W),easeOutSine:t=>Math.sin(t*W),easeInOutSine:t=>-.5*(Math.cos(F*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ot(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ot(t)?t:lt(t,.075,.3),easeOutElastic:t=>ot(t)?t:ct(t,.075,.3),easeInOutElastic(t){const e=.1125;return ot(t)?t:t<.5?.5*lt(2*t,e,.45):.5+.5*ct(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ht.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ht.easeInBounce(2*t):.5*ht.easeOutBounce(2*t-1)+.5},dt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ut="0123456789ABCDEF",ft=t=>ut[15&t],pt=t=>ut[(240&t)>>4]+ut[15&t],gt=t=>(240&t)>>4==(15&t);function mt(t){return t+.5|0}const bt=(t,e,i)=>Math.max(Math.min(t,i),e);function yt(t){return bt(mt(2.55*t),0,255)}function xt(t){return bt(mt(255*t),0,255)}function vt(t){return bt(mt(t/2.55)/100,0,1)}function _t(t){return bt(mt(100*t),0,100)}const wt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Ot=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Mt(t,e,i){const n=e*Math.min(i,1-i),a=(e,a=(e+t/30)%12)=>i-n*Math.max(Math.min(a-3,9-a,1),-1);return[a(0),a(8),a(4)]}function kt(t,e,i){const n=(n,a=(n+t/60)%6)=>i-i*e*Math.max(Math.min(a,4-a,1),0);return[n(5),n(3),n(1)]}function jt(t,e,i){const n=Mt(t,1,.5);let a;for(e+i>1&&(a=1/(e+i),e*=a,i*=a),a=0;a<3;a++)n[a]*=1-e-i,n[a]+=e;return n}function St(t){const e=t.r/255,i=t.g/255,n=t.b/255,a=Math.max(e,i,n),s=Math.min(e,i,n),r=(a+s)/2;let o,l,c;return a!==s&&(c=a-s,l=r>.5?c/(2-a-s):c/(a+s),o=a===e?(i-n)/c+(i=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=xt(t[3]))):(e=Rt(t,{r:0,g:0,b:0,a:1})).a=xt(e.a),e}function Ft(t){return"r"===t.charAt(0)?function(t){const e=wt.exec(t);let i,n,a,s=255;if(e){if(e[7]!==i){const t=+e[7];s=255&(e[8]?yt(t):255*t)}return i=+e[1],n=+e[3],a=+e[5],i=255&(e[2]?yt(i):i),n=255&(e[4]?yt(n):n),a=255&(e[6]?yt(a):a),{r:i,g:n,b:a,a:s}}}(t):function(t){const e=Ot.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?yt(+e[5]):xt(+e[5]));const a=Et(+e[2]),s=+e[3]/100,r=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return Dt(jt,t,e,i)}(a,s,r):"hsv"===e[1]?function(t,e,i){return Dt(kt,t,e,i)}(a,s,r):Pt(a,s,r),{r:i[0],g:i[1],b:i[2],a:n}}(t)}class It{constructor(t){if(t instanceof It)return t;const e=typeof t;let i;var n,a,s;"object"===e?i=Nt(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?a={r:255&17*dt[n[1]],g:255&17*dt[n[2]],b:255&17*dt[n[3]],a:5===s?17*dt[n[4]]:255}:7!==s&&9!==s||(a={r:dt[n[1]]<<4|dt[n[2]],g:dt[n[3]]<<4|dt[n[4]],b:dt[n[5]]<<4|dt[n[6]],a:9===s?dt[n[7]]<<4|dt[n[8]]:255})),i=a||function(t){At||(At=function(){const t={},e=Object.keys(Tt),i=Object.keys(Ct);let n,a,s,r,o;for(n=0;n>16&255,s>>8&255,255&s]}return t}(),At.transparent=[0,0,0,0]);const e=At[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||Ft(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Rt(this._rgb);return t&&(t.a=vt(t.a)),t}set rgb(t){this._rgb=Nt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${vt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?(t=this._rgb,e=function(t){return gt(t.r)&>(t.g)&>(t.b)&>(t.a)}(t)?ft:pt,t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t):this._rgb;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=St(t),i=e[0],n=_t(e[1]),a=_t(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${a}%, ${vt(t.a)})`:`hsl(${i}, ${n}%, ${a}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,a=t.rgb;let s;const r=e===s?.5:e,o=2*r-1,l=n.a-a.a,c=((o*l==-1?o:(o+l)/(1+o*l))+1)/2;s=1-c,n.r=255&c*n.r+s*a.r+.5,n.g=255&c*n.g+s*a.g+.5,n.b=255&c*n.b+s*a.b+.5,n.a=r*n.a+(1-r)*a.a,i.rgb=n}return i}clone(){return new It(this.rgb)}alpha(t){return this._rgb.a=xt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=mt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Lt(this._rgb,2,t),this}darken(t){return Lt(this._rgb,2,-t),this}saturate(t){return Lt(this._rgb,1,t),this}desaturate(t){return Lt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=St(t);i[0]=Et(i[0]+e),i=Pt(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function zt(t){return new It(t)}const Bt=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Vt(t){return Bt(t)?t:zt(t)}function Wt(t){return Bt(t)?t:zt(t).saturate(.5).darken(.1).hexString()}const Ht=Object.create(null),Ut=Object.create(null);function Yt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Wt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Wt(e.borderColor),this.hoverColor=(t,e)=>Wt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return $t(this,t,e)}get(t){return Yt(this,t)}describe(t,e){return $t(Ut,t,e)}override(t,e){return $t(Ht,t,e)}route(t,e,i,n){const a=Yt(this,t),s=Yt(this,i),r="_"+e;Object.defineProperties(a,{[r]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=s[n];return b(t)?Object.assign({},e,t):v(t,e)},set(t){this[r]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function qt(t,e,i,n,a){let s=e[a];return s||(s=e[a]=t.measureText(a).width,i.push(a)),s>n&&(n=s),n}function Gt(t,e,i,n){let a=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(a=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let r=0;const o=i.length;let l,c,h,d,u;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function Jt(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==s.strokeColor;let l,c;for(t.save(),t.font=a.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),g(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),l=0;lv(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of a)i[t]=+s(t)||0;return i}function de(t){return he(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ue(t){return he(t,["topLeft","topRight","bottomLeft","bottomRight"])}function fe(t){const e=de(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function pe(t,e){t=t||{},e=e||Xt.font;let i=v(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=v(t.style,e.style);n&&!(""+n).match(le)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const a={family:v(t.family,e.family),lineHeight:ce(v(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:v(t.weight,e.weight),string:""};return a.string=function(t){return!t||g(t.size)||g(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(a),a}function ge(t,e,i,n){let a,s,r,o=!0;for(a=0,s=t.length;at[i]1;)n=s+a>>1,i(n)?s=n:a=n;return{lo:s,hi:a}}const ye=(t,e,i)=>be(t,i,n=>t[n][e]be(t,i,n=>t[n][e]>=i),ve=["push","pop","shift","splice","unshift"];function _e(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,a=n.indexOf(e);-1!==a&&n.splice(a,1),n.length>0||(ve.forEach(e=>{delete t[e]}),delete t._chartjs)}function we(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){L(n)||(n=Le("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:a,override:a=>Oe([a,...t],e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>De(i,n,()=>function(t,e,i,n){let a;for(const s of e)if(a=Le(je(s,t),i),L(a))return Se(t,a)?Te(i,n,t,a):a}(n,e,t,i)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Re(t).includes(e),ownKeys:t=>Re(t),set(t,e,i){const n=t._storage||(t._storage=a());return t[e]=n[e]=i,delete t._keys,!0}})}function Me(t,e,i,n){const a={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:ke(t,n),setContext:e=>Me(t,e,i,n),override:a=>Me(t.override(a),e,i,n)};return new Proxy(a,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>De(t,e,()=>function(t,e,i){const{_proxy:n,_context:a,_subProxy:s,_descriptors:r}=t;let o=n[e];return R(o)&&r.isScriptable(e)&&(o=function(t,e,i,n){const{_proxy:a,_context:s,_subProxy:r,_stack:o}=i;if(o.has(t))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);return o.add(t),e=e(s,r||n),o.delete(t),Se(t,e)&&(e=Te(a._scopes,a,t,e)),e}(e,o,t,i)),m(o)&&o.length&&(o=function(t,e,i,n){const{_proxy:a,_context:s,_subProxy:r,_descriptors:o}=i;if(L(s.index)&&n(t))e=e[s.index%e.length];else if(b(e[0])){const i=e,n=a._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=Te(n,a,t,l);e.push(Me(i,s,r&&r[t],o))}}return e}(e,o,t,r.isIndexable)),Se(e,o)&&(o=Me(o,a,s&&s[e],r)),o}(t,e,i)),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function ke(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:a=e.allKeys}=t;return{allKeys:a,scriptable:i,indexable:n,isScriptable:R(i)?i:()=>i,isIndexable:R(n)?n:()=>n}}const je=(t,e)=>t?t+A(e):e,Se=(t,e)=>b(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function De(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Pe(t,e,i){return R(t)?t(e,i):t}const Ee=(t,e)=>!0===t?e:"string"==typeof t?T(e,t):void 0;function Ce(t,e,i,n,a){for(const s of e){const e=Ee(i,s);if(e){t.add(e);const s=Pe(e._fallback,i,a);if(L(s)&&s!==i&&s!==n)return s}else if(!1===e&&L(n)&&i!==n)return null}return!1}function Te(t,e,i,n){const a=e._rootScopes,s=Pe(e._fallback,i,n),r=[...t,...a],o=new Set;o.add(n);let l=Ae(o,r,i,s||i,n);return null!==l&&(!L(s)||s===i||(l=Ae(o,r,s,l,n),null!==l))&&Oe(Array.from(o),[""],a,s,()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const a=n[e];return m(a)&&b(i)?i:a}(e,i,n))}function Ae(t,e,i,n,a){for(;i;)i=Ce(t,e,i,n,a);return i}function Le(t,e){for(const i of e){if(!i)continue;const e=i[t];if(L(e))return e}}function Re(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}const Ne=Number.EPSILON||1e-14,Fe=(t,e)=>e"x"===t?"y":"x";function ze(t,e,i,n){const a=t.skip?e:t,s=e,r=i.skip?e:i,o=et(s,a),l=et(r,s);let c=o/(o+l),h=l/(o+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:s.x-d*(r.x-a.x),y:s.y-d*(r.y-a.y)},next:{x:s.x+u*(r.x-a.x),y:s.y+u*(r.y-a.y)}}}function Be(t,e,i){return Math.max(Math.min(t,i),e)}function Ve(t,e,i,n,a){let s,r,o,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const i=Ie(e),n=t.length,a=Array(n).fill(0),s=Array(n);let r,o,l,c=Fe(t,0);for(r=0;rwindow.getComputedStyle(t,null),$e=["top","right","bottom","left"];function Xe(t,e,i){const n={};i=i?"-"+i:"";for(let a=0;a<4;a++){const s=$e[a];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function qe(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,a=Ye(i),s="border-box"===a.boxSizing,r=Xe(a,"padding"),o=Xe(a,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,a=n&&n.length?n[0]:i,{offsetX:s,offsetY:r}=a;let o,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,r,i.target))o=s,l=r;else{const t=e.getBoundingClientRect();o=a.clientX-t.left,l=a.clientY-t.top,c=!0}return{x:o,y:l,box:c}}(t,i),d=r.left+(h&&o.left),u=r.top+(h&&o.top);let{width:f,height:p}=e;return s&&(f-=r.width+o.width,p-=r.height+o.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/p*i.height/n)}}const Ge=t=>Math.round(10*t)/10;function Qe(t,e,i){const n=e||1,a=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=a/n,t.width=s/n;const r=t.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=t.height+"px",r.style.width=t.width+"px"),(t.currentDevicePixelRatio!==n||r.height!==a||r.width!==s)&&(t.currentDevicePixelRatio=n,r.height=a,r.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Ke=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Ze(t,e){const i=function(t,e){return Ye(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Je(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ti(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function ei(t,e,i,n){const a={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},r=Je(t,a,i),o=Je(a,s,i),l=Je(s,e,i),c=Je(r,o,i),h=Je(o,l,i);return Je(c,h,i)}const ii=new Map;function ni(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ii.get(i);return n||(n=new Intl.NumberFormat(t,e),ii.set(i,n)),n}(e,i).format(t)}function ai(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function si(t){return"angle"===t?{between:at,compare:it,normalize:nt}:{between:rt,compare:(t,e)=>t-e,normalize:t=>t}}function ri({start:t,end:e,count:i,loop:n,style:a}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:a}}function oi(t,e,i){if(!i)return[t];const{property:n,start:a,end:s}=i,r=e.length,{compare:o,between:l,normalize:c}=si(n),{start:h,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:a,end:s}=i,{between:r,normalize:o}=si(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;cn({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=h.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const a=i.items;let s,r=a.length-1,o=!1;for(;r>=0;--r)s=a[r],s._active?(s._total>i.duration&&(i.duration=s._total),s.tick(t),o=!0):(a[r]=a[a.length-1],a.pop());o&&(n.draw(),this._notify(n,i,t,"progress")),a.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=a.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const ui={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Vt(t||"transparent"),a=n.valid&&Vt(e||"transparent");return a&&a.valid?a.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class fi{constructor(t,e,i,n){const a=e[i];n=ge([t.to,n,a,t.from]);const s=ge([t.from,a,n]);this._active=!0,this._fn=t.fn||ui[t.type||typeof s],this._easing=ht[t.easing]||ht.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],a=i-this._start,s=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=ge([t.to,e,n,t.from]),this._from=ge([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,a=this._from,s=this._loop,r=this._to;let o;if(this._active=a!==r&&(s||e1?2-o:o,o=this._easing(Math.min(1,Math.max(0,o))),this._target[n]=this._fn(a,r,o))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),Xt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),Xt.describe("animations",{_fallback:"animation"}),Xt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class gi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!b(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const n=t[i];if(!b(n))return;const a={};for(const t of pi)a[t]=n[t];(m(n.properties)&&n.properties||[i]).forEach(t=>{t!==i&&e.has(t)||e.set(t,a)})})}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const a=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i},()=>{}),a}_createAnimations(t,e){const i=this._properties,n=[],a=t.$animations||(t.$animations={}),s=Object.keys(e),r=Date.now();let o;for(o=s.length-1;o>=0;--o){const l=s[o];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=a[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,r);continue}h.cancel()}d&&d.duration?(a[l]=h=new fi(d,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(di.add(this._chart,i),!0):void 0}}function mi(t,e){const i=t&&t.options||{},n=i.reverse,a=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:a,end:n?a:s}}function bi(t,e){const i=[],n=t._getSortedDatasetMetas(e);let a,s;for(a=0,s=n.length;a0||!i&&e<0)return a.index}return null}function wi(t,e){const{chart:i,_cachedMeta:n}=t,a=i._stacks||(i._stacks={}),{iScale:s,vScale:r,index:o}=n,l=s.axis,c=r.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,r,n),d=e.length;let u;for(let t=0;ti[t].axis===e).shift()}function Mi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const ki=t=>"reset"===t||"none"===t,ji=(t,e)=>e?t:Object.assign({},t);class Si{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=xi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Mi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,a=e.xAxisID=v(i.xAxisID,Oi(t,"x")),s=e.yAxisID=v(i.yAxisID,Oi(t,"y")),r=e.rAxisID=v(i.rAxisID,Oi(t,"r")),o=e.indexAxis,l=e.iAxisID=n(o,a,s,r),c=e.vAxisID=n(o,s,a,r);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&_e(this._data,this),t._stacked&&Mi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(b(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,a,s;for(n=0,a=e.length;n{const e="_onData"+A(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const a=i.apply(this,t);return n._chartjs.listeners.forEach(i=>{"function"==typeof i[e]&&i[e](...t)}),a}})}))),this._syncList=[],this._data=e}var n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const a=e._stacked;e._stacked=xi(e.vScale,e),e.stack!==i.stack&&(n=!0,Mi(e),e.stack=i.stack),this._resyncElements(t),(n||a!==e._stacked)&&wi(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:a,_stacked:s}=i,r=a.axis;let o,l,c,h=0===t&&e===n.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=m(n[t])?this.parseArrayData(i,n,t,e):b(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const a=()=>null===l[r]||d&&l[r]t&&!e.hidden&&e._stacked&&{keys:bi(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:a}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:a?i:Number.POSITIVE_INFINITY}}(r);let d,u;function f(){u=n[d];const e=u[r.axis];return!y(u[t.axis])||c>e||h=0;--d)if(!f()){this.updateRangeFromParsed(l,t,u,o);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,a,s;for(n=0,a=e.length;n=0&&tthis.getContext(i,n),h);return f.$shared&&(f.$shared=o,a[s]=Object.freeze(ji(f,o))),f}_resolveAnimations(t,e,i){const n=this.chart,a=this._cachedDataOpts,s="animation-"+e,r=a[s];if(r)return r;let o;if(!1!==n.options.animation){const n=this.chart.config,a=n.datasetAnimationScopeKeys(this._type,e),s=n.getOptionScopes(this.getDataset(),a);o=n.createResolver(s,this.getContext(t,i,e))}const l=new gi(n,o&&o.animations);return o&&o._cacheable&&(a[s]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ki(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){ki(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!ki(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const a=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,a=e.length,s=Math.min(a,n);s&&this.parse(0,s),a>n?this._insertElements(n,a-n,t):a{for(t.length+=e,r=t.length-1;r>=s;r--)t[r]=t[r-e]};for(o(a),r=t;rt-e))}return t._cache.$bar}(e,t.type);let n,a,s,r,o=e._length;const l=()=>{32767!==s&&-32768!==s&&(L(r)&&(o=Math.min(o,Math.abs(s-r)||o)),r=s)};for(n=0,a=i.length;nMath.abs(o)&&(l=o,c=r),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:a,end:s,min:r,max:o}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Ei(t,e,i,n){const a=t.iScale,s=t.vScale,r=a.getLabels(),o=a===s,l=[];let c,h,d,u;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,s)*a,d===s&&(m-=h/2),c=m+h),m===e.getPixelForValue(s)){const t=$(h)*e.getLineWidthForValue(s)/2;m+=t,h-=t}return{size:h,base:m,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,a=n.skipNull,s=v(n.maxBarThickness,1/0);let r,o;if(e.grouped){const i=a?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const a=e.pixels,s=a[t];let r=t>0?a[t-1]:null,o=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,a=this.getParsed(t),s=i.getLabelForValue(a.x),r=n.getLabelForValue(a.y),o=a._custom;return{label:e.label,value:"("+s+", "+r+(o?", "+o:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const a="reset"===n,{iScale:s,vScale:r}=this._cachedMeta,o=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(o),c=this.includeOptions(n,l),h=s.axis,d=r.axis;for(let o=e;o""}}}};class Ii extends Si{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let a,s,r=t=>+i[t];if(b(i[t])){const{key:t="value"}=this._parsing;r=e=>+T(i[e],t)}for(a=t,s=t+e;aat(t,o,l,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>at(t,o,l,!0)?-1:Math.min(e,e*i,n,n*i),g=f(0,c,d),m=f(W,h,u),b=p(F,c,d),y=p(F+W,h,u);n=(g-b)/2,a=(m-y)/2,s=-(g+b)/2,r=-(m+y)/2}return{ratioX:n,ratioY:a,offsetX:s,offsetY:r}}(u,d,o),b=(i.width-s)/f,y=(i.height-s)/p,x=Math.max(Math.min(b,y)/2,0),v=_(this.options.radius,x),w=(v-Math.max(v*o,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*v,this.offsetY=m*v,n.total=this.calculateTotal(),this.outerRadius=v-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*h,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,a=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*a/I)}updateElements(t,e,i,n){const a="reset"===n,s=this.chart,r=s.chartArea,o=s.options.animation,l=(r.left+r.right)/2,c=(r.top+r.bottom)/2,h=a&&o.animateScale,d=h?0:this.innerRadius,u=h?0:this.outerRadius,f=this.resolveDataElementOptions(e,n),p=this.getSharedOptions(f),g=this.includeOptions(n,p);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?I*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=ni(e._parsed[t],i.options.locale);return{label:n[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,a,s,r,o;if(!t)for(n=0,a=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ii.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,n)=>{const a=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return m(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class zi extends Si{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:a}=e,s=this.chart._animationsDisabled;let{start:r,count:o}=function(t,e,i){const n=e.length;let a=0,s=n;if(t._sorted){const{iScale:r,_parsed:o}=t,l=r.axis,{min:c,max:h,minDefined:d,maxDefined:u}=r.getUserBounds();d&&(a=st(Math.min(ye(o,r.axis,c).lo,i?n:ye(e,l,r.getPixelForValue(c)).lo),0,n-1)),s=u?st(Math.max(ye(o,r.axis,h).hi+1,i?0:ye(e,l,r.getPixelForValue(h)).hi+1),a,n)-a:n-a}return{start:a,count:s}}(e,n,s);this._drawStart=r,this._drawCount=o,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,a={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=a,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,a),s}(e)&&(r=0,o=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:l},t),this.updateElements(n,r,o,t)}updateElements(t,e,i,n){const a="reset"===n,{iScale:s,vScale:r,_stacked:o,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),d=this.includeOptions(n,h),u=s.axis,f=r.axis,{spanGaps:p,segment:m}=this.options,b=q(p)?p:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||"none"===n;let x=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[u]-x[u]>b,m&&(p.parsed=i,p.raw=l.data[c]),d&&(p.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),y||this.updateElement(e,c,p,n),x=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const a=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}zi.id="line",zi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},zi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Bi extends Si{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=ni(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:a}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(n/2,0),s=(a-Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=a-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,e,i,n){const a="reset"===n,s=this.chart,r=this.getDataset(),o=s.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,d=l.getIndexAngle(0)-.5*F;let u,f=d;const p=360/this.countVisibleElements();for(u=0;u{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++}),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?K(this.resolveDataElementOptions(t,e).angle||i):0}}Bi.id="polarArea",Bi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Bi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,n)=>{const a=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Vi extends Ii{}Vi.id="pie",Vi.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Wi extends Si{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],a=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const s={_loop:!0,_fullLoop:a.length===n.length,options:e};this.updateElement(i,void 0,s,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const a=this.getDataset(),s=this._cachedMeta.rScale,r="reset"===n;for(let o=e;o"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};class Yi{constructor(t){this.options=t||{}}formats(){return Ui()}parse(t,e){return Ui()}format(t,e){return Ui()}add(t,e,i){return Ui()}diff(t,e,i){return Ui()}startOf(t,e,i){return Ui()}endOf(t,e){return Ui()}}Yi.override=function(t){Object.assign(Yi.prototype,t)};var $i={_date:Yi};function Xi(t,e){return"native"in t?{x:t.x,y:t.y}:qe(t,e)}function qi(t,e,i,n){const{controller:a,data:s,_sorted:r}=t,o=a._cachedMeta.iScale;if(o&&e===o.axis&&"r"!==e&&r&&s.length){const t=o._reversePixels?xe:ye;if(!n)return t(s,e,i);if(a._sharedOptions){const n=s[0],a="function"==typeof n.getRange&&n.getRange(e);if(a){const n=t(s,e,i-a),r=t(s,e,i+a);return{lo:n.lo,hi:r.hi}}}}return{lo:0,hi:s.length-1}}function Gi(t,e,i,n,a){const s=t.getSortedVisibleDatasetMetas(),r=i[e];for(let t=0,i=s.length;t{t[o](a[r],n)&&s.push({element:t,datasetIndex:e,index:i}),t.inRange(a.x,a.y,n)&&(l=!0)}),i.intersect&&!l?[]:s}var Ji={modes:{index(t,e,i,n){const a=Xi(e,t),s=i.axis||"x",r=i.intersect?Qi(t,a,s,n):Ki(t,a,s,!1,n),o=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&o.push({element:i,datasetIndex:t.index,index:e})}),o):[]},dataset(t,e,i,n){const a=Xi(e,t),s=i.axis||"xy";let r=i.intersect?Qi(t,a,s,n):Ki(t,a,s,!1,n);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;tQi(t,Xi(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>Ki(t,Xi(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>Zi(t,e,{axis:"x",intersect:i.intersect},n),y:(t,e,i,n)=>Zi(t,e,{axis:"y",intersect:i.intersect},n)}};const tn=["left","top","right","bottom"];function en(t,e){return t.filter(t=>t.pos===e)}function nn(t,e){return t.filter(t=>-1===tn.indexOf(t.pos)&&t.box.axis===e)}function an(t,e){return t.sort((t,i)=>{const n=e?i:t,a=e?t:i;return n.weight===a.weight?n.index-a.index:n.weight-a.weight})}function sn(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function rn(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function on(t,e,i,n){const{pos:a,box:s}=i,r=t.maxPadding;if(!b(a)){i.size&&(t[a]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?s.height:s.width),i.size=e.size/e.count,t[a]+=i.size}s.getPadding&&rn(r,s.getPadding());const o=Math.max(0,e.outerWidth-sn(r,t,"left","right")),l=Math.max(0,e.outerHeight-sn(r,t,"top","bottom")),c=o!==t.w,h=l!==t.h;return t.w=o,t.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function ln(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{n[t]=Math.max(e[t],i[t])}),n}(t?["left","right"]:["top","bottom"])}function cn(t,e,i,n){const a=[];let s,r,o,l,c,h;for(s=0,r=t.length,c=0;st.box.fullSize),!0),n=an(en(e,"left"),!0),a=an(en(e,"right")),s=an(en(e,"top"),!0),r=an(en(e,"bottom")),o=nn(e,"x"),l=nn(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:a.concat(l).concat(r).concat(o),chartArea:en(e,"chartArea"),vertical:n.concat(a).concat(l),horizontal:s.concat(r).concat(o)}}(t.boxes),l=o.vertical,c=o.horizontal;O(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const h=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:a,availableWidth:s,availableHeight:r,vBoxMaxWidth:s/2/h,hBoxMaxHeight:r/2}),u=Object.assign({},a);rn(u,fe(n));const f=Object.assign({maxPadding:u,w:s,h:r,x:a.left,y:a.top},a),p=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:a}=i;if(!t||!tn.includes(n))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:a}=e;let s,r,o;for(s=0,r=t.length;s{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class fn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class pn extends fn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const gn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},mn=t=>null===t||""===t,bn=!!Ke&&{passive:!0};function yn(t,e,i){t.canvas.removeEventListener(e,i,bn)}function xn(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function vn(t,e,i){const n=t.canvas,a=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||xn(i.addedNodes,n),e=e&&!xn(i.removedNodes,n);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}function wn(t,e,i){const n=t.canvas,a=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||xn(i.removedNodes,n),e=e&&!xn(i.addedNodes,n);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}const On=new Map;let Mn=0;function kn(){const t=window.devicePixelRatio;t!==Mn&&(Mn=t,On.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function jn(t,e,i){const n=t.canvas,a=n&&He(n);if(!a)return;const s=d((t,e)=>{const n=a.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||s(i,n)});return r.observe(a),function(t,e){On.size||window.addEventListener("resize",kn),On.set(t,e)}(t,s),r}function Sn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){On.delete(t),On.size||window.removeEventListener("resize",kn)}(t)}function Dn(t,e,i){const n=t.canvas,a=d(e=>{null!==t.ctx&&i(function(t,e){const i=gn[t.type]||t.type,{x:n,y:a}=qe(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==a?a:null}}(e,t))},t,t=>{const e=t[0];return[e,e.offsetX,e.offsetY]});return function(t,e,i){t.addEventListener(e,i,bn)}(n,e,a),a}class Pn extends fn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),a=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:a,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",mn(a)){const e=Ze(t,"width");void 0!==e&&(t.width=e)}if(mn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Ze(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach(t=>{const n=i[t];g(n)?e.removeAttribute(t):e.setAttribute(t,n)});const n=i.style||{};return Object.keys(n).forEach(t=>{e.style[t]=n[t]}),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),a={attach:vn,detach:wn,resize:jn}[e]||Dn;n[e]=a(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:Sn,detach:Sn,resize:Sn}[e]||yn)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return function(t,e,i,n){const a=Ye(t),s=Xe(a,"margin"),r=Ue(a.maxWidth,t,"clientWidth")||B,o=Ue(a.maxHeight,t,"clientHeight")||B,l=function(t,e,i){let n,a;if(void 0===e||void 0===i){const s=He(t);if(s){const t=s.getBoundingClientRect(),r=Ye(s),o=Xe(r,"border","width"),l=Xe(r,"padding");e=t.width-l.width-o.width,i=t.height-l.height-o.height,n=Ue(r.maxWidth,s,"clientWidth"),a=Ue(r.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||B,maxHeight:a||B}}(t,e,i);let{width:c,height:h}=l;if("content-box"===a.boxSizing){const t=Xe(a,"border","width"),e=Xe(a,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-s.width),h=Math.max(0,n?Math.floor(c/n):h-s.height),c=Ge(Math.min(c,r,l.maxWidth)),h=Ge(Math.min(h,o,l.maxHeight)),c&&!h&&(h=Ge(c/2)),{width:c,height:h}}(t,e,i,n)}isAttached(t){const e=He(t);return!(!e||!e.isConnected)}}class En{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return q(this.x)&&q(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),n}}En.defaults={},En.defaultRoutes=void 0;const Cn={values:t=>m(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let a,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(a="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const r=Y(Math.abs(s)),o=Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:a,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),ni(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(Y(t)));return 1===n||2===n||5===n?Cn.numeric.call(this,t,e,i):""}};var Tn={formatters:Cn};function An(t,e,i,n,a){const s=v(n,0),r=Math.min(v(a,t.length),t.length);let o,l,c,h=0;for(i=Math.ceil(i),a&&(o=a-n,i=o/Math.floor(o/i)),c=s;c<0;)h++,c=Math.round(s+h*i);for(l=Math.max(s,0);le.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Tn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),Xt.route("scale.ticks","color","","color"),Xt.route("scale.grid","color","","borderColor"),Xt.route("scale.grid","borderColor","","borderColor"),Xt.route("scale.title","color","","color"),Xt.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),Xt.describe("scales",{_fallback:"scale"}),Xt.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Ln=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Rn(t,e){const i=[],n=t.length/e,a=t.length;let s=0;for(;sr+1e-6)))return l}function Fn(t){return t.drawTicks?t.tickLength:0}function In(t,e){if(!t.display)return 0;const i=pe(t.font,e),n=fe(t.padding);return(m(t.text)?t.text.length:1)*i.lineHeight+n.height}function zn(t,e,i){let n=(t=>"start"===t?"left":"end"===t?"right":"center")(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class Bn extends En{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=x(t,Number.POSITIVE_INFINITY),e=x(e,Number.NEGATIVE_INFINITY),i=x(i,Number.POSITIVE_INFINITY),n=x(n,Number.NEGATIVE_INFINITY),{min:x(t,i),max:x(e,n),minDefined:y(t),maxDefined:y(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:a,maxDefined:s}=this.getUserBounds();if(a&&s)return{min:i,max:n};const r=this.getMatchingVisibleMetas();for(let o=0,l=r.length;on?n:i,n=a&&i>n?i:n,{min:x(i,x(n,i)),max:x(n,x(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){w(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:a,ticks:s}=this.options,r=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:a}=t,s=_(e,(a-n)/2),r=(t,e)=>i&&0===t?0:t+e;return{min:r(n,-Math.abs(s)),max:r(a,s)}}(this,a,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const o=rn)return function(t,e,i,n){let a,s=0,r=i[0];for(n=Math.ceil(n),a=0;at-e).pop(),e}(n);for(let t=0,e=s.length-1;ta)return e}return Math.max(a,1)}(a,e,n);if(s>0){let t,i;const n=s>1?Math.round((o-r)/(s-1)):null;for(An(e,l,c,g(n)?0:r-n,r),t=0,i=s-1;t=a||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,d=c.highest.height,u=st(this.chart.width-h,0,this.maxWidth);s=t.offset?this.maxWidth/i:u/(i-1),h+6>s&&(s=u/(i-(t.offset?.5:1)),r=this.maxHeight-Fn(t.grid)-e.padding-In(t.title,this.chart.options.font),o=Math.sqrt(h*h+d*d),l=Z(Math.min(Math.asin(st((c.highest.height+6)/s,-1,1)),Math.asin(st(r/o,-1,1))-Math.asin(st(d/o,-1,1)))),l=Math.max(n,Math.min(a,l))),this.labelRotation=l}afterCalculateLabelRotation(){w(this.options.afterCalculateLabelRotation,[this])}beforeFit(){w(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:a}}=this,s=this._isVisible(),r=this.isHorizontal();if(s){const s=In(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=Fn(a)+s):(t.height=this.maxHeight,t.width=Fn(a)+s),i.display&&this.ticks.length){const{first:e,last:n,widest:a,highest:s}=this._getLabelSizes(),o=2*i.padding,l=K(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(r){const e=i.mirror?0:h*a.width+c*s.height;t.height=Math.min(this.maxHeight,t.height+e+o)}else{const e=i.mirror?0:c*a.width+h*s.height;t.width=Math.min(this.maxWidth,t.width+e+o)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:a,padding:s},position:r}=this.options,o=0!==this.labelRotation,l="top"!==r&&"x"===this.axis;if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;o?l?(h=n*t.width,d=i*e.height):(h=i*t.height,d=n*e.width):"start"===a?d=e.width:"end"===a?h=t.width:(h=t.width/2,d=e.width/2),this.paddingLeft=Math.max((h-r+s)*this.width/(this.width-r),0),this.paddingRight=Math.max((d-c+s)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===a?(i=0,n=t.height):"end"===a&&(i=e.height,n=0),this.paddingTop=i+s,this.paddingBottom=n+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){w(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let a;if(n>e){for(a=0;a({width:a[t]||0,height:s[t]||0});return{first:M(0),last:M(e-1),widest:M(_),highest:M(w),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return st(this._alignToPixels?Qt(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&tr*n?r/i:o/n:o*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:a,position:s}=n,r=a.offset,o=this.isHorizontal(),l=this.ticks.length+(r?1:0),c=Fn(a),h=[],d=a.setContext(this.getContext()),u=d.drawBorder?d.borderWidth:0,f=u/2,p=function(t){return Qt(i,t,u)};let g,m,y,x,_,w,O,M,k,j,S,D;if("top"===s)g=p(this.bottom),w=this.bottom-c,M=g-f,j=p(t.top)+f,D=t.bottom;else if("bottom"===s)g=p(this.top),j=t.top,D=p(t.bottom)-f,w=g+f,M=this.top+c;else if("left"===s)g=p(this.right),_=this.right-c,O=g-f,k=p(t.left)+f,S=t.right;else if("right"===s)g=p(this.left),k=t.left,S=p(t.right)-f,_=g+f,O=this.left+c;else if("x"===e){if("center"===s)g=p((t.top+t.bottom)/2+.5);else if(b(s)){const t=Object.keys(s)[0],e=s[t];g=p(this.chart.scales[t].getPixelForValue(e))}j=t.top,D=t.bottom,w=g+f,M=w+c}else if("y"===e){if("center"===s)g=p((t.left+t.right)/2);else if(b(s)){const t=Object.keys(s)[0],e=s[t];g=p(this.chart.scales[t].getPixelForValue(e))}_=g-f,O=_-c,k=t.left,S=t.right}const P=v(n.ticks.maxTicksLimit,l),E=Math.max(1,Math.ceil(l/P));for(m=0;me.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,s;const r=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(a=0,s=n.length;a{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let a,s;for(a=0,s=e.length;a{const n=i.split("."),a=n.pop(),s=[t].concat(n).join("."),r=e[i].split("."),o=r.pop(),l=r.join(".");Xt.route(s,a,l,o)})}(e,t.defaultRoutes),t.descriptors&&Xt.describe(e,t.descriptors)}(t,s,i),this.override&&Xt.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in Xt[n]&&(delete Xt[n][i],this.override&&delete Ht[i])}}var Wn=new class{constructor(){this.controllers=new Vn(Si,"datasets",!0),this.elements=new Vn(En,"elements"),this.plugins=new Vn(Object,"plugins"),this.scales=new Vn(Bn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):O(e,e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)})})}_exec(t,e,i){const n=A(t);w(i["before"+n],[],i),e[t](i),w(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Un(t,e){return e||!1!==t?!0===t?{}:t:null}function Yn(t,e,i,n){const a=t.pluginScopeKeys(e),s=t.getOptionScopes(i,a);return t.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function $n(t,e){const i=Xt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Xn(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function qn(t){const e=t.options||(t.options={});e.plugins=v(e.plugins,{}),e.scales=function(t,e){const i=Ht[t.type]||{scales:{}},n=e.scales||{},a=$n(t.type,e),s=Object.create(null),r=Object.create(null);return Object.keys(n).forEach(t=>{const e=n[t];if(!b(e))return console.error("Invalid scale configuration for scale: "+t);if(e._proxy)return console.warn("Ignoring resolver passed as options for scale: "+t);const o=Xn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(o,a),c=i.scales||{};s[o]=s[o]||t,r[t]=P(Object.create(null),[{axis:o},e,c[o],c[l]])}),t.data.datasets.forEach(i=>{const a=i.type||t.type,o=i.indexAxis||$n(a,e),l=(Ht[a]||{}).scales||{};Object.keys(l).forEach(t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,o),a=i[e+"AxisID"]||s[e]||e;r[a]=r[a]||Object.create(null),P(r[a],[{axis:e},n[a],l[t]])})}),Object.keys(r).forEach(t=>{const e=r[t];P(e,[Xt.scales[e.type],Xt.scale])}),r}(t,e)}function Gn(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Qn=new Map,Kn=new Set;function Zn(t,e){let i=Qn.get(t);return i||(i=e(),Qn.set(t,i),Kn.add(i)),i}const Jn=(t,e,i)=>{const n=T(e,i);void 0!==n&&t.add(n)};class ta{constructor(t){this._config=function(t){return(t=t||{}).data=Gn(t.data),qn(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Gn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),qn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Zn(t,()=>[["datasets."+t,""]])}datasetAnimationScopeKeys(t,e){return Zn(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,"transitions."+e],["datasets."+t,""]])}datasetElementScopeKeys(t,e){return Zn(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,"datasets."+t,"elements."+e,""]])}pluginScopeKeys(t){const e=t.id;return Zn(`${this.type}-plugin-${e}`,()=>[["plugins."+e,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:a}=this,s=this._cachedScopes(t,i),r=s.get(e);if(r)return r;const o=new Set;e.forEach(e=>{t&&(o.add(t),e.forEach(e=>Jn(o,t,e))),e.forEach(t=>Jn(o,n,t)),e.forEach(t=>Jn(o,Ht[a]||{},t)),e.forEach(t=>Jn(o,Xt,t)),e.forEach(t=>Jn(o,Ut,t))});const l=Array.from(o);return 0===l.length&&l.push(Object.create(null)),Kn.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Ht[e]||{},Xt.datasets[e]||{},{type:e},Xt,Ut]}resolveNamedOptions(t,e,i,n=[""]){const a={$shared:!0},{resolver:s,subPrefixes:r}=ea(this._resolverCache,t,n);let o=s;(function(t,e){const{isScriptable:i,isIndexable:n}=ke(t);for(const a of e){const e=i(a),s=n(a),r=(s||e)&&t[a];if(e&&(R(r)||ia(r))||s&&m(r))return!0}return!1})(s,e)&&(a.$shared=!1,o=Me(s,i=R(i)?i():i,this.createResolver(t,i,r)));for(const t of e)a[t]=o[t];return a}createResolver(t,e,i=[""],n){const{resolver:a}=ea(this._resolverCache,t,i);return b(e)?Me(a,e,void 0,n):a}}function ea(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const a=i.join();let s=n.get(a);return s||(s={resolver:Oe(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},n.set(a,s)),s}const ia=t=>b(t)&&Object.getOwnPropertyNames(t).reduce((e,i)=>e||R(t[i]),!1),na=["top","bottom","left","right","chartArea"];function aa(t,e){return"top"===t||"bottom"===t||-1===na.indexOf(t)&&"x"===e}function sa(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function ra(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),w(i&&i.onComplete,[t],e)}function oa(t){const e=t.chart,i=e.options.animation;w(i&&i.onProgress,[t],e)}function la(t){return We()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const ca={},ha=t=>{const e=la(t);return Object.values(ca).filter(t=>t.canvas===e).pop()};function da(t,e,i){const n=Object.keys(t);for(const a of n){const n=+a;if(n>=e){const s=t[a];delete t[a],(i>0||n>e)&&(t[n+i]=s)}}}class ua{constructor(t,e){const i=this.config=new ta(e),n=la(t),a=ha(n);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!We()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?pn:Pn}(n)),this.platform.updateConfig(i);const r=this.platform.acquireContext(n,s.aspectRatio),o=r&&r.canvas,l=o&&o.height,c=o&&o.width;this.id=p(),this.ctx=r,this.canvas=o,this.width=c,this.height=l,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Hn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}(t=>this.update(t),s.resizeDelay||0),this._dataChanges=[],ca[this.id]=this,r&&o?(di.listen(this,"complete",ra),di.listen(this,"progress",oa),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:a}=this;return g(t)?e&&a?a:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Qe(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Kt(this.canvas,this.ctx),this}stop(){return di.stop(this),this}resize(t,e){di.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(n,t,e,a),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),o=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Qe(this,r,!0)&&(this.notifyPlugins("resize",{size:s}),w(i.onResize,[this,s],this),this.attached&&this._doResize(o)&&this.render())}ensureScalesHaveIDs(){O(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{});let a=[];e&&(a=a.concat(Object.keys(e).map(t=>{const i=e[t],n=Xn(t,i),a="r"===n,s="x"===n;return{options:i,dposition:a?"chartArea":s?"bottom":"left",dtype:a?"radialLinear":s?"category":"linear"}}))),O(a,e=>{const a=e.options,s=a.id,r=Xn(s,a),o=v(a.type,e.dtype);void 0!==a.position&&aa(a.position,r)===aa(e.dposition)||(a.position=e.dposition),n[s]=!0;let l=null;s in i&&i[s].type===o?l=i[s]:(l=new(Wn.getScale(o))({id:s,type:o,ctx:this.ctx,chart:this}),i[l.id]=l),l.init(a,t)}),O(n,(t,e)=>{t||delete i[e]}),O(i,t=>{un.configure(this,t,t.options),un.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let t=0,e=this.data.datasets.length;t{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(sa("z","_idx"));const{_active:r,_lastEvent:o}=this;o?this._eventHandler(o,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){O(this.scales,t=>{un.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);N(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:a}of e)da(t,n,"_removeElements"===i?-a:a)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),n=i(0);for(let t=1;tt.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;un.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],O(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,a=this.chartArea,s={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",s)&&(n&&te(e,{left:!1===i.left?0:a.left-i.left,right:!1===i.right?this.width:a.right+i.right,top:!1===i.top?0:a.top-i.top,bottom:!1===i.bottom?this.height:a.bottom+i.bottom}),t.controller.draw(),n&&ee(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}getElementsAtEventForMode(t,e,i,n){const a=Ji.modes[e];return"function"==typeof a?a(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(t=>t&&t._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=me(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,n);L(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(a,{visible:i}),this.update(e=>e.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),di.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};O(this.options.events,t=>i(t,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},a=(t,e)=>{this.canvas&&this.resize(t,e)};let s;const r=()=>{n("attach",r),this.attached=!0,this.resize(),i("resize",a),i("detach",s)};s=()=>{this.attached=!1,n("resize",a),this._stop(),this._resize(0,0),i("attach",r)},e.isAttached(this.canvas)?r():s()}unbindEvents(){O(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},O(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let a,s,r,o;for("dataset"===e&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+n+"DatasetHoverStyle"]()),r=0,o=t.length;r{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}});!M(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,a=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),s=a(e,t),r=i?t:a(t,e);s.length&&this.updateHoverStyle(s,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:Jt(t,this.chartArea,this._minPadding)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:a}=this,s=e,r=this._getActiveElements(t,n,i,s),o=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,o);i&&(this._lastEvent=null,w(a.onHover,[t,r,this],this),o&&w(a.onClick,[t,r,this],this));const c=!M(r,n);return(c||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=l,c}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,n)}}const fa=()=>O(ua.instances,t=>t._plugins.invalidate());function pa(t,e,i){const{startAngle:n,pixelMargin:a,x:s,y:r,outerRadius:o,innerRadius:l}=e;let c=a/o;t.beginPath(),t.arc(s,r,o,n-c,i+c),l>a?(c=a/l,t.arc(s,r,l,i+c,n-c,!0)):t.arc(s,r,a,i+W,n-W),t.closePath(),t.clip()}function ga(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function ma(t,e,i,n,a){const{x:s,y:r,startAngle:o,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),d=c>0?c+n+i+l:0;let u=0;const f=a-o;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;u=(f-(0!==t?f*t/(t+n):f))/2}const p=(f-Math.max(.001,f*h-i/F)/h)/2,g=o+p+u,m=a-p-u,{outerStart:b,outerEnd:y,innerStart:x,innerEnd:v}=function(t,e,i,n){const a=he(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),s=(i-e)/2,r=Math.min(s,n*e/2),o=t=>{const e=(i-Math.min(s,t))*n/2;return st(t,0,Math.min(s,e))};return{outerStart:o(a.outerStart),outerEnd:o(a.outerEnd),innerStart:st(a.innerStart,0,r),innerEnd:st(a.innerEnd,0,r)}}(e,d,h,m-g),_=h-b,w=h-y,O=g+b/_,M=m-y/w,k=d+x,j=d+v,S=g+x/k,D=m-v/j;if(t.beginPath(),t.arc(s,r,h,O,M),y>0){const e=ga(w,M,s,r);t.arc(e.x,e.y,y,M,m+W)}const P=ga(j,m,s,r);if(t.lineTo(P.x,P.y),v>0){const e=ga(j,D,s,r);t.arc(e.x,e.y,v,m+W,D+Math.PI)}if(t.arc(s,r,d,m-v/d,g+x/d,!0),x>0){const e=ga(k,S,s,r);t.arc(e.x,e.y,x,S+Math.PI,g-W)}const E=ga(_,g,s,r);if(t.lineTo(E.x,E.y),b>0){const e=ga(_,O,s,r);t.arc(e.x,e.y,b,g-W,O)}t.closePath()}Object.defineProperties(ua,{defaults:{enumerable:!0,value:Xt},instances:{enumerable:!0,value:ca},overrides:{enumerable:!0,value:Ht},registry:{enumerable:!0,value:Wn},version:{enumerable:!0,value:"3.7.1"},getChart:{enumerable:!0,value:ha},register:{enumerable:!0,value:(...t)=>{Wn.add(...t),fa()}},unregister:{enumerable:!0,value:(...t)=>{Wn.remove(...t),fa()}}});class ba extends En{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:a,distance:s}=tt(n,{x:t,y:e}),{startAngle:r,endAngle:o,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2,u=v(h,o-r)>=I||at(a,r,o),f=rt(s,l+d,c+d);return u&&f}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:a,innerRadius:s,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:o,spacing:l}=this.options,c=(n+a)/2,h=(s+r+l+o)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,a=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>I?Math.floor(i/I):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let s=0;if(n){s=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*s,Math.sin(e)*s),this.circumference>=F&&(s=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const r=function(t,e,i,n){const{fullCircles:a,startAngle:s,circumference:r}=e;let o=e.endAngle;if(a){ma(t,e,i,n,s+I);for(let e=0;eo&&s>o;return{count:n,start:l,loop:e.loop,ilen:c(r+(c?o-t:t))%s,x=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(d=a[y(0)],t.moveTo(d.x,d.y)),h=0;h<=o;++h){if(d=a[y(h)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(ip&&(p=i),m=(b*m+e)/++b):(x(),t.lineTo(e,i),u=n,b=0,f=p=i),g=i}x()}function Oa(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?_a:wa}ba.id="arc",ba.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},ba.defaultRoutes={backgroundColor:"backgroundColor"};const Ma="function"==typeof Path2D;class ka extends En{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ve(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,a=i.length;if(!a)return[];const s=!!t._loop,{start:r,end:o}=function(t,e,i,n){let a=0,s=e-1;if(i&&!n)for(;aa&&t[s%e].skip;)s--;return s%=e,{start:a,end:s}}(i,a,s,n);return function(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const a=t._chart.getContext(),s=ci(t.options),{_datasetIndex:r,options:{spanGaps:o}}=t,l=i.length,c=[];let h=s,d=e[0].start,u=d;function f(t,e,n,a){const s=o?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=s;for(;i[e%l].skip;)e+=s;t%l!=e%l&&(c.push({start:t%l,end:e%l,loop:n,style:a}),h=a,d=e%l)}}for(const t of e){d=o?d:t.start;let e,s=i[d%l];for(u=d+1;u<=t.end;u++){const o=i[u%l];e=ci(n.setContext(me(a,{type:"segment",p0:s,p1:o,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),hi(e,h)&&f(d,u-1,t.loop,h),s=o,h=e}d"borderDash"!==t&&"fill"!==t};class Sa extends En{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:a,y:s}=this.getProps(["x","y"],i);return Math.pow(t-a,2)+Math.pow(e-s,2)=i)&&a):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}Aa.id="bar",Aa.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Aa.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Ra{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:a,radius:s}=this;return e=e||{start:0,end:I},t.arc(n,a,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,a=t.angle;return{x:e+Math.cos(a)*n,y:i+Math.sin(a)*n,angle:a}}}function Na(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Fa(t,e,i){const n=[];for(let a=0;a{e=Na(t,e,a);const r=a[t],o=a[e];null!==n?(s.push({x:r.x,y:n}),s.push({x:o.x,y:n})):null!==i&&(s.push({x:i,y:r.y}),s.push({x:i,y:o.y}))}),s}(t,e),i.length?new ka({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Va(t,e,i){let n=t[e].fill;const a=[e];let s;if(!i)return n;for(;!1!==n&&-1===a.indexOf(n);){if(!y(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;a.push(n),n=s.fill}return!1}function Wa(t,e,i){const{segments:n,points:a}=e;let s=!0,r=!1;t.beginPath();for(const o of n){const{start:n,end:l}=o,c=a[n],h=a[Na(n,l,a)];s?(t.moveTo(c.x,c.y),s=!1):(t.lineTo(c.x,i),t.lineTo(c.x,c.y)),r=!!e.pathSegment(t,o,{move:r}),r?t.closePath():t.lineTo(h.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function Ha(t,e,i,n){if(n)return;let a=e[t],s=i[t];return"angle"===t&&(a=nt(a),s=nt(s)),{property:t,start:a,end:s}}function Ua(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Ya(t,e,i){const{top:n,bottom:a}=e.chart.chartArea,{property:s,start:r,end:o}=i||{};"x"===s&&(t.beginPath(),t.rect(r,n,o-r,a-n),t.clip())}function $a(t,e,i,n){const a=e.interpolate(i,n);a&&t.lineTo(a.x,a.y)}function Xa(t,e){const{line:i,target:n,property:a,color:s,scale:r}=e,o=function(t,e,i){const n=t.segments,a=t.points,s=e.points,r=[];for(const t of n){let{start:n,end:o}=t;o=Na(n,o,a);const l=Ha(i,a[n],a[o],t.loop);if(!e.segments){r.push({source:t,target:l,start:a[n],end:a[o]});continue}const c=li(e,l);for(const e of c){const n=Ha(i,s[e.start],s[e.end],e.loop),o=oi(t,a,n);for(const t of o)r.push({source:t,target:e,start:{[i]:Ua(l,n,"start",Math.max)},end:{[i]:Ua(l,n,"end",Math.min)}})}}return r}(i,n,a);for(const{source:e,target:l,start:c,end:h}of o){const{style:{backgroundColor:o=s}={}}=e,d=!0!==n;t.save(),t.fillStyle=o,Ya(t,r,d&&Ha(a,c,h)),t.beginPath();const u=!!i.pathSegment(t,e);let f;if(d){u?t.closePath():$a(t,n,h,a);const e=!!n.pathSegment(t,l,{move:u,reverse:!0});f=u&&e,f||$a(t,n,c,a)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function qa(t,e,i){const n=za(e),{line:a,scale:s,axis:r}=e,o=a.options,l=o.fill,c=o.backgroundColor,{above:h=c,below:d=c}=l||{};n&&a.points.length&&(te(t,i),function(t,e){const{line:i,target:n,above:a,below:s,area:r,scale:o}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&s!==a&&(Wa(t,n,r.top),Xa(t,{line:i,target:n,color:a,scale:o,property:l}),t.restore(),t.save(),Wa(t,n,r.bottom)),Xa(t,{line:i,target:n,color:s,scale:o,property:l}),t.restore()}(t,{line:a,target:n,above:h,below:d,area:i,scale:s,axis:r}),ee(t))}var Ga={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,a=[];let s,r,o,l;for(r=0;r=0;--e){const i=a[e].$filler;i&&(i.line.updateControlPoints(s,i.axis),n&&qa(t.ctx,i,s))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&qa(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&qa(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};new WeakMap;const Qa={average(t){if(!t.length)return!1;let e,i,n=0,a=0,s=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Ja(t,e){const{element:i,datasetIndex:n,index:a}=e,s=t.getDatasetMeta(n).controller,{label:r,value:o}=s.getLabelAndValue(a);return{chart:t,label:r,parsed:s.getParsed(a),raw:t.data.datasets[n].data[a],formattedValue:o,dataset:s.getDataset(),dataIndex:a,datasetIndex:n,element:i}}function ts(t,e){const i=t.chart.ctx,{body:n,footer:a,title:s}=t,{boxWidth:r,boxHeight:o}=e,l=pe(e.bodyFont),c=pe(e.titleFont),h=pe(e.footerFont),d=s.length,u=a.length,f=n.length,p=fe(e.padding);let g=p.height,m=0,b=n.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);b+=t.beforeBody.length+t.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),b&&(g+=f*(e.displayColors?Math.max(o,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing),u&&(g+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let y=0;const x=function(t){m=Math.max(m,i.measureText(t).width+y)};return i.save(),i.font=c.string,O(t.title,x),i.font=l.string,O(t.beforeBody.concat(t.afterBody),x),y=e.displayColors?r+2+e.boxPadding:0,O(n,t=>{O(t.before,x),O(t.lines,x),O(t.after,x)}),y=0,i.font=h.string,O(t.footer,x),i.restore(),m+=p.width,{width:m,height:g}}function es(t,e,i,n){const{x:a,width:s}=i,{width:r,chartArea:{left:o,right:l}}=t;let c="center";return"center"===n?c=a<=(o+l)/2?"left":"right":a<=s/2?c="left":a>=r-s/2&&(c="right"),function(t,e,i,n){const{x:a,width:s}=n,r=i.caretSize+i.caretPadding;return"left"===t&&a+s+r>e.width||"right"===t&&a-s-r<0||void 0}(c,t,e,i)&&(c="center"),c}function is(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||es(t,e,i,n),yAlign:n}}function ns(t,e,i,n){const{caretSize:a,caretPadding:s,cornerRadius:r}=t,{xAlign:o,yAlign:l}=i,c=a+s,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=ue(r);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,o);const g=function(t,e,i){let{y:n,height:a}=t;return"top"===e?n+=i:n-="bottom"===e?a+i:a/2,n}(e,l,c);return"center"===l?"left"===o?p+=c:"right"===o&&(p-=c):"left"===o?p-=Math.max(h,u)+a:"right"===o&&(p+=Math.max(d,f)+a),{x:st(p,0,n.width-e.width),y:st(g,0,n.height-e.height)}}function as(t,e,i){const n=fe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function ss(t){return Ka([],Za(t))}function rs(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class os extends En{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,a=new gi(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=(this,me(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"})))}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),a=i.title.apply(this,[t]),s=i.afterTitle.apply(this,[t]);let r=[];return r=Ka(r,Za(n)),r=Ka(r,Za(a)),r=Ka(r,Za(s)),r}getBeforeBody(t,e){return ss(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return O(t,t=>{const e={before:[],lines:[],after:[]},a=rs(i,t);Ka(e.before,Za(a.beforeLabel.call(this,t))),Ka(e.lines,a.label.call(this,t)),Ka(e.after,Za(a.afterLabel.call(this,t))),n.push(e)}),n}getAfterBody(t,e){return ss(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),a=i.footer.apply(this,[t]),s=i.afterFooter.apply(this,[t]);let r=[];return r=Ka(r,Za(n)),r=Ka(r,Za(a)),r=Ka(r,Za(s)),r}_createItems(t){const e=this._active,i=this.chart.data,n=[],a=[],s=[];let r,o,l=[];for(r=0,o=e.length;rt.filter(e,n,a,i))),t.itemSort&&(l=l.sort((e,n)=>t.itemSort(e,n,i))),O(l,e=>{const i=rs(t.callbacks,e);n.push(i.labelColor.call(this,e)),a.push(i.labelPointStyle.call(this,e)),s.push(i.labelTextColor.call(this,e))}),this.labelColors=n,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let a,s=[];if(n.length){const t=Qa[i.position].call(this,n,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const e=this._size=ts(this,i),r=Object.assign({},t,e),o=is(this.chart,i,r),l=ns(i,r,o,this.chart);this.xAlign=o.xAlign,this.yAlign=o.yAlign,a={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(a={opacity:0});this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const a=this.getCaretPosition(t,i,n);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:a}=this,{caretSize:s,cornerRadius:r}=i,{topLeft:o,topRight:l,bottomLeft:c,bottomRight:h}=ue(r),{x:d,y:u}=t,{width:f,height:p}=e;let g,m,b,y,x,v;return"center"===a?(x=u+p/2,"left"===n?(g=d,m=g-s,y=x+s,v=x-s):(g=d+f,m=g+s,y=x-s,v=x+s),b=g):(m="left"===n?d+Math.max(o,c)+s:"right"===n?d+f-Math.max(l,h)-s:this.caretX,"top"===a?(y=u,x=y-s,g=m-s,b=m+s):(y=u+p,x=y+s,g=m+s,b=m-s),v=y),{x1:g,x2:m,x3:b,y1:y,y2:x,y3:v}}drawTitle(t,e,i){const n=this.title,a=n.length;let s,r,o;if(a){const l=ai(i.rtl,this.x,this.width);for(t.x=as(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",s=pe(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,o=0;o0!==t)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,re(t,{x:e,y:p,w:l,h:o,radius:r}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),re(t,{x:i,y:p+1,w:l-2,h:o-2,radius:r}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(e,p,l,o),t.strokeRect(e,p,l,o),t.fillStyle=s.backgroundColor,t.fillRect(i,p+1,l-2,o-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:a,bodyAlign:s,displayColors:r,boxHeight:o,boxWidth:l,boxPadding:c}=i,h=pe(i.bodyFont);let d=h.lineHeight,u=0;const f=ai(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+a},g=f.textAlign(s);let m,b,y,x,v,_,w;for(e.textAlign=s,e.textBaseline="middle",e.font=h.string,t.x=as(this,g,i),e.fillStyle=i.bodyColor,O(this.beforeBody,p),u=r&&"right"!==g?"center"===s?l/2+c:l+2+c:0,x=0,_=n.length;x<_;++x){for(m=n[x],b=this.labelTextColors[x],e.fillStyle=b,O(m.before,p),y=m.lines,r&&y.length&&(this._drawColorBox(e,t,x,f,i),d=Math.max(h.lineHeight,o)),v=0,w=y.length;v0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,a=i&&i.y;if(n||a){const i=Qa[t.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=ts(this,t),r=Object.assign({},i,this._size),o=is(e,t,r),l=ns(t,r,o,e);n._to===l.x&&a._to===l.y||(this.xAlign=o.xAlign,this.yAlign=o.yAlign,this.width=s.width,this.height=s.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=fe(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,n,e),function(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}(t,e.textDirection),a.y+=s.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),function(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map(({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),a=!M(i,n),s=this._positionChanged(n,e);(a||s)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,a=this._active||[],s=this._getActiveElements(t,a,e,i),r=this._positionChanged(s,t),o=e||!M(s,a)||r;return o&&(this._active=s,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),o}_getActiveElements(t,e,i,n){const a=this.options;if("mouseout"===t.type)return[];if(!n)return e;const s=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:i,caretY:n,options:a}=this,s=Qa[a.position].call(this,t,e);return!1!==s&&(i!==s.x||n!==s.y)}}os.positioners=Qa;var ls={id:"tooltip",_element:os,positioners:Qa,afterInit(t,e,i){i&&(t.tooltip=new os({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:f,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};class cs extends Bn{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(g(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:st(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,i,n){const a=t.indexOf(e);return-1===a?((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n):a!==t.lastIndexOf(e)?i:a}(i,t,v(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let a=this.getLabels();a=0===t&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function hs(t,e,{horizontal:i,minRotation:n}){const a=K(n),s=(i?Math.sin(a):Math.cos(a))||.001,r=.75*e*(""+t).length;return Math.min(e/s,r)}cs.id="category",cs.defaults={ticks:{callback:cs.prototype.getLabelForValue}};class ds extends Bn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return g(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:a}=this;const s=t=>n=e?n:t,r=t=>a=i?a:t;if(t){const t=$(n),e=$(a);t<0&&e<0?r(0):t>0&&e>0&&s(0)}if(n===a){let e=1;(a>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*a)),r(a+e),t||s(n-e)}this.min=n,this.max=a}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=function(t,e){const i=[],{bounds:n,step:a,min:s,max:r,precision:o,count:l,maxTicks:c,maxDigits:h,includeBounds:d}=t,u=a||1,f=c-1,{min:p,max:m}=e,b=!g(s),y=!g(r),x=!g(l),v=(m-p)/(h+1);let _,w,O,M,k=X((m-p)/f/u)*u;if(k<1e-14&&!b&&!y)return[{value:p},{value:m}];M=Math.ceil(m/k)-Math.floor(p/k),M>f&&(k=X(M*k/f/u)*u),g(o)||(_=Math.pow(10,o),k=Math.ceil(k*_)/_),"ticks"===n?(w=Math.floor(p/k)*k,O=Math.ceil(m/k)*k):(w=p,O=m),b&&y&&a&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((r-s)/a,k/1e3)?(M=Math.round(Math.min((r-s)/k,c)),k=(r-s)/M,w=s,O=r):x?(w=b?s:w,O=y?r:O,M=l-1,k=(O-w)/M):(M=(O-w)/k,M=G(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const j=Math.max(J(k),J(w));_=Math.pow(10,g(o)?j:o),w=Math.round(w*_)/_,O=Math.round(O*_)/_;let S=0;for(b&&(d&&w!==s?(i.push({value:s}),w0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=y(t)?Math.max(0,t):null,this.max=y(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const a=e=>i=t?i:e,s=t=>n=e?n:t,r=(t,e)=>Math.pow(10,Math.floor(Y(t))+e);i===n&&(i<=0?(a(1),s(10)):(a(r(i,-1)),s(r(n,1)))),i<=0&&a(r(n,-1)),n<=0&&s(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&a(r(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(Y(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),a=[];let s=x(t.min,Math.pow(10,Math.floor(Y(e.min)))),r=Math.floor(Y(s)),o=Math.floor(s/Math.pow(10,r)),l=r<0?Math.pow(10,Math.abs(r)):1;do{a.push({value:s,major:fs(s)}),++o,10===o&&(o=1,++r,l=r>=0?1:l),s=Math.round(o*Math.pow(10,r)*l)/l}while(ra?{start:e-i,end:e}:{start:e,end:e+i}}function bs(t,e,i,n,a){const s=Math.abs(Math.sin(i)),r=Math.abs(Math.cos(i));let o=0,l=0;n.starte.r&&(o=(n.end-e.r)/s,t.r=Math.max(t.r,e.r+o)),a.starte.b&&(l=(a.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}function ys(t){return 0===t||180===t?"center":t<180?"left":"right"}function xs(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function vs(t,e,i,n){const{ctx:a}=t;if(i)a.arc(t.xCenter,t.yCenter,e,0,I);else{let i=t.getPointPosition(0,e);a.moveTo(i.x,i.y);for(let s=1;s{const i=w(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){const t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],a=[],s=t._pointLabels.length,r=t.options.pointLabels,o=r.centerPointLabels?F/s:0;for(let d=0;d=0&&t=0;a--){const e=n.setContext(t.getPointLabelContext(a)),s=pe(e.font),{x:r,y:o,textAlign:l,left:c,top:h,right:d,bottom:u}=t._pointLabelItems[a],{backdropColor:f}=e;if(!g(f)){const t=fe(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,d-c+t.width,u-h+t.height)}ae(i,t._pointLabels[a],r,o+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,a),n.display&&this.ticks.forEach((t,e)=>{0!==e&&(r=this.getDistanceFromCenterForValue(t.value),function(t,e,i,n){const a=t.ctx,s=e.circular,{color:r,lineWidth:o}=e;!s&&!n||!r||!o||i<0||(a.save(),a.strokeStyle=r,a.lineWidth=o,a.setLineDash(e.borderDash),a.lineDashOffset=e.borderDashOffset,a.beginPath(),vs(t,i,s,n),a.closePath(),a.stroke(),a.restore())}(this,n.setContext(this.getContext(e-1)),r,a))}),i.display){for(t.save(),s=a-1;s>=0;s--){const n=i.setContext(this.getPointLabelContext(s)),{color:a,lineWidth:l}=n;l&&a&&(t.lineWidth=l,t.strokeStyle=a,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),o=this.getPointPosition(s,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(o.x,o.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let a,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((n,r)=>{if(0===r&&!e.reverse)return;const o=i.setContext(this.getContext(r)),l=pe(o.font);if(a=this.getDistanceFromCenterForValue(this.ticks[r].value),o.showLabelBackdrop){t.font=l.string,s=t.measureText(n.label).width,t.fillStyle=o.backdropColor;const e=fe(o.backdropPadding);t.fillRect(-s/2-e.left,-a-l.size/2-e.top,s+e.width,l.size+e.height)}ae(t,n.label,0,-a,l,{color:o.color})}),t.restore()}drawTitle(){}}_s.id="radialLinear",_s.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Tn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},_s.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},_s.descriptors={angleLines:{_fallback:"grid"}};const ws={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Os=Object.keys(ws);function Ms(t,e){return t-e}function ks(t,e){if(g(e))return null;const i=t._adapter,{parser:n,round:a,isoWeekday:s}=t._parseOpts;let r=e;return"function"==typeof n&&(r=n(r)),y(r)||(r="string"==typeof n?i.parse(r,n):i.parse(r)),null===r?null:(a&&(r="week"!==a||!q(s)&&!0!==s?i.startOf(r,a):i.startOf(r,"isoWeek",s)),+r)}function js(t,e,i,n){const a=Os.length;for(let s=Os.indexOf(t);s=e?i[n]:i[a]]=!0}}else t[e]=!0}function Ds(t,e,i){const n=[],a={},s=e.length;let r,o;for(r=0;r=0&&(e[l].major=!0);return e}(t,n,a,i):n}class Ps extends Bn{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new $i._date(t.adapters.date);P(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:ks(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:a,minDefined:s,maxDefined:r}=this.getUserBounds();function o(t){s||isNaN(t.min)||(n=Math.min(n,t.min)),r||isNaN(t.max)||(a=Math.max(a,t.max))}s&&r||(o(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||o(this.getMinMax(!1))),n=y(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),a=y(a)&&!isNaN(a)?a:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,a-1),this.max=Math.max(n+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const a=this.min,s=function(t,e,i){let n=0,a=t.length;for(;nn&&t[a-1]>i;)a--;return n>0||a=Os.indexOf(i);s--){const i=Os[s];if(ws[i].common&&t._adapter.diff(a,n,i)>=e-1)return i}return Os[i?Os.indexOf(i):0]}(this,s.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=Os.indexOf(t)+1,i=Os.length;e1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+s);const f="data"===n.ticks.source&&this.getDataTimestamps();for(h=u,d=0;ht-e).map(t=>+t)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const a=this.options,s=a.time.displayFormats,r=this._unit,o=this._majorUnit,l=r&&s[r],c=o&&s[o],h=i[e],d=o&&c&&h&&h.major,u=this._adapter.format(t,n||(d?c:l)),f=a.ticks.callback;return f?w(f,[u,e,i],this):u}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?r:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[o].pos&&e<=t[l].pos&&({lo:o,hi:l}=ye(t,"pos",e)),({pos:n,time:s}=t[o]),({pos:a,time:r}=t[l])):(e>=t[o].time&&e<=t[l].time&&({lo:o,hi:l}=ye(t,"time",e)),({time:n,pos:s}=t[o]),({time:a,pos:r}=t[l]));const c=a-n;return c?s+(r-s)*(e-n)/c:s}Ps.id="time",Ps.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Cs extends Ps{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Es(e,this.min),this._tableRange=Es(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],a=[];let s,r,o,l,c;for(s=0,r=t.length;s=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,r=n.length;s2&&void 0!==arguments[2]?arguments[2]:"label";const n=[];t.datasets=e.map(e=>{const a=t.datasets.find(t=>t[i]===e[i]);return a&&e.data&&!n.includes(a)?(n.push(a),Object.assign(a,e),a):{...e}})}function Fs(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label";const i={labels:[],datasets:[]};return Rs(i,t.labels),Ns(i,t.datasets,e),i}function Is(t,e){let{height:i=150,width:n=300,redraw:a=!1,datasetIdKey:s,type:r,data:o,options:l,plugins:c=[],fallbackContent:h,...d}=t;const u=Object(Ts.useRef)(null),f=Object(Ts.useRef)(),p=()=>{u.current&&(f.current=new ua(u.current,{type:r,data:Fs(o,s),options:l,plugins:c}),Ls(e,f.current))},g=()=>{Ls(e,null),f.current&&(f.current.destroy(),f.current=null)};return Object(Ts.useEffect)(()=>{var t,e;!a&&f.current&&l&&(t=f.current,e=l,t.options={...e})},[a,l]),Object(Ts.useEffect)(()=>{!a&&f.current&&Rs(f.current.config.data,o.labels)},[a,o.labels]),Object(Ts.useEffect)(()=>{!a&&f.current&&o.datasets&&Ns(f.current.config.data,o.datasets,s)},[a,o.datasets]),Object(Ts.useEffect)(()=>{f.current&&(a?(g(),setTimeout(p)):f.current.update())},[a,l,o.labels,o.datasets]),Object(Ts.useEffect)(()=>(p(),()=>g()),[]),As.a.createElement("canvas",Object.assign({ref:u,role:"img",height:i,width:n},d),h)}const zs=Object(Ts.forwardRef)(Is);var Bs=i(3),Vs=i(17),Ws=i(7),Hs=i(8),Us=i(4);function Ys(t,e){Object(Us.a)(2,arguments);var i=Object(Hs.a)(t),n=Object(Ws.a)(e);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}function $s(t,e){Object(Us.a)(2,arguments);var i=Object(Ws.a)(e);return Ys(t,-i)}function Xs(t,e){Object(Us.a)(2,arguments);var i=Object(Hs.a)(t),n=Object(Ws.a)(e);if(isNaN(n))return new Date(NaN);if(!n)return i;var a=i.getDate(),s=new Date(i.getTime());s.setMonth(i.getMonth()+n+1,0);var r=s.getDate();return a>=r?s:(i.setFullYear(s.getFullYear(),s.getMonth(),a),i)}function qs(t,e){Object(Us.a)(2,arguments);var i=Object(Ws.a)(e);return Xs(t,-i)}function Gs(t){return(Gs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Qs(t,e){if(Object(Us.a)(2,arguments),!e||"object"!==Gs(e))return new Date(NaN);var i=e.years?Object(Ws.a)(e.years):0,n=e.months?Object(Ws.a)(e.months):0,a=e.weeks?Object(Ws.a)(e.weeks):0,s=e.days?Object(Ws.a)(e.days):0,r=e.hours?Object(Ws.a)(e.hours):0,o=e.minutes?Object(Ws.a)(e.minutes):0,l=e.seconds?Object(Ws.a)(e.seconds):0,c=qs(t,n+12*i),h=$s(c,s+7*a),d=o+60*r,u=l+60*d,f=1e3*u,p=new Date(h.getTime()-f);return p}function Ks(t){return(Ks="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zs(t,e){if(Object(Us.a)(2,arguments),!e||"object"!==Ks(e))return new Date(NaN);var i=e.years?Object(Ws.a)(e.years):0,n=e.months?Object(Ws.a)(e.months):0,a=e.weeks?Object(Ws.a)(e.weeks):0,s=e.days?Object(Ws.a)(e.days):0,r=e.hours?Object(Ws.a)(e.hours):0,o=e.minutes?Object(Ws.a)(e.minutes):0,l=e.seconds?Object(Ws.a)(e.seconds):0,c=Object(Hs.a)(t),h=n||i?Xs(c,n+12*i):c,d=s||a?Ys(h,s+7*a):h,u=o+60*r,f=l+60*u,p=1e3*f,g=new Date(d.getTime()+p);return g}function Js(t,e){var i;Object(Us.a)(1,arguments);var n=Object(Ws.a)(null!==(i=null==e?void 0:e.additionalDigits)&&void 0!==i?i:2);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var a,s=ar(t);if(s.date){var r=sr(s.date,n);a=rr(r.restDateString,r.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var o,l=a.getTime(),c=0;if(s.time&&(c=lr(s.time),isNaN(c)))return new Date(NaN);if(!s.timezone){var h=new Date(l+c),d=new Date(0);return d.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),d.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),d}return o=hr(s.timezone),isNaN(o)?new Date(NaN):new Date(l+c+o)}Math.pow(10,8);var tr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},er=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ir=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,nr=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ar(t){var e,i={},n=t.split(tr.dateTimeDelimiter);if(n.length>2)return i;if(/:/.test(n[0])?e=n[0]:(i.date=n[0],e=n[1],tr.timeZoneDelimiter.test(i.date)&&(i.date=t.split(tr.timeZoneDelimiter)[0],e=t.substr(i.date.length,t.length))),e){var a=tr.timezone.exec(e);a?(i.time=e.replace(a[1],""),i.timezone=a[1]):i.time=e}return i}function sr(t,e){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(i);if(!n)return{year:NaN,restDateString:""};var a=n[1]?parseInt(n[1]):null,s=n[2]?parseInt(n[2]):null;return{year:null===s?a:100*s,restDateString:t.slice((n[1]||n[2]).length)}}function rr(t,e){if(null===e)return new Date(NaN);var i=t.match(er);if(!i)return new Date(NaN);var n=!!i[4],a=or(i[1]),s=or(i[2])-1,r=or(i[3]),o=or(i[4]),l=or(i[5])-1;if(n)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,o,l)?function(t,e,i){var n=new Date(0);n.setUTCFullYear(t,0,4);var a=7*(e-1)+i+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+a),n}(e,o,l):new Date(NaN);var c=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(dr[e]||(ur(t)?29:28))}(e,s,r)&&function(t,e){return e>=1&&e<=(ur(t)?366:365)}(e,a)?(c.setUTCFullYear(e,s,Math.max(a,r)),c):new Date(NaN)}function or(t){return t?parseInt(t):1}function lr(t){var e=t.match(ir);if(!e)return NaN;var i=cr(e[1]),n=cr(e[2]),a=cr(e[3]);return function(t,e,i){return 24===t?0===e&&0===i:i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,n,a)?36e5*i+6e4*n+1e3*a:NaN}function cr(t){return t&&parseFloat(t.replace(",","."))||0}function hr(t){if("Z"===t)return 0;var e=t.match(nr);if(!e)return 0;var i="+"===e[1]?-1:1,n=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,a)?i*(36e5*n+6e4*a):NaN}var dr=[31,null,31,30,31,30,31,31,30,31,30,31];function ur(t){return t%400==0||t%4==0&&t%100!=0}var fr=i(78);function pr(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function gr(t){for(var e=1;e0,"is-negative":e<0});return Object(c.createElement)("div",{className:s},Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"simpay-admin-charts-badge__icon",width:"16",height:"16"},e>0?Object(c.createElement)("path",{d:"M16.004 9.414l-8.607 8.607-1.414-1.414L14.589 8H7.004V6h11v11h-2V9.414z"}):Object(c.createElement)("path",{d:"M14.59 16.004L5.982 7.397l1.414-1.414 8.607 8.606V7.004h2v11h-11v-2z"})),!n&&Object(c.createElement)("span",null,Math.abs(e),"%"))},Er="simpay-admin-charts-period-over-period__tooltip",Cr=function(t){var e=t.position,i=t.opacity,n=t.data,a=t.delta,s=t.deltaChangedString;if(!n.length)return null;var r=e.top,o=e.left,l=e.right,h=Dr()("simpay-admin-charts-badge",{"is-positive":a>0,"is-negative":a<0});return Object(c.createElement)("div",{className:Er,style:{top:r,left:o||"auto",right:l||"auto",opacity:i}},n.map((function(t,e){var i=t.label,n=t.value;return Object(c.createElement)("div",{className:"".concat(Er,"-data"),"data-dataset":e,key:i+Math.random()},Object(c.createElement)("strong",null,i)," ",Object(c.createElement)("em",null,Object(Vs.decodeEntities)(n)))})),0!==a&&Object(c.createElement)("div",{className:"".concat(Er,"-delta")},Object(c.createElement)("div",{className:h},Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"simpay-admin-charts-badge__icon"},a>0?Object(c.createElement)("path",{fillRule:"evenodd",d:"M5.22 14.78a.75.75 0 001.06 0l7.22-7.22v5.69a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75h-7.5a.75.75 0 000 1.5h5.69l-7.22 7.22a.75.75 0 000 1.06z",clipRule:"evenodd"}):Object(c.createElement)("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06l7.22 7.22H6.75a.75.75 0 000 1.5h7.5a.747.747 0 00.75-.75v-7.5a.75.75 0 00-1.5 0v5.69L6.28 5.22z"}))),Object(c.createElement)("span",null,s)))},Tr=function(t){var e=t.chart,i=function(t,e){var i=Object(c.useState)({marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}),n=l()(i,2),a=n[0],s=a.marginTop,r=a.marginRight,o=a.marginBottom,h=a.marginLeft,d=n[1];return Object(c.useEffect)((function(){t.current&&d({marginTop:Math.floor(t.current.chartArea.top),marginRight:Math.floor(t.current.width-t.current.chartArea.right),marginBottom:Math.floor(t.current.chartArea.bottom),marginLeft:Math.floor(t.current.chartArea.left)})}),[t,e]),{marginTop:s,marginRight:r,marginBottom:o,marginLeft:h}}(t.chartRef,e),n=i.marginLeft,a=i.marginRight;return Object(c.createElement)("div",{style:{width:"100%",position:"relative",fontSize:"12px",display:"flex",justifyContent:"space-between",marginTop:"-2px"}},Object(c.createElement)("div",{style:{marginLeft:n,textAlign:"left"}},e.datasets[0].data[0].x),Object(c.createElement)("div",{style:{marginRight:a,textAlign:"right"}},e.datasets[0].data[e.datasets[0].data.length-1].x))};function Ar(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Lr(t){for(var e=1;e0}))}));return Object(c.createElement)("div",{className:"simpay-admin-charts-period-over-period",style:s},!M&&Object(c.createElement)("div",{className:"simpay-admin-charts-no-data",style:Lr(Lr({},s),{},{height:"calc(".concat(s.height," + 15px)")})},o),Object(c.createElement)(zs,{type:"line",ref:g,options:O,plugins:[vr,(_="rgb(".concat(f.primary_color.join(","),")"),{id:"YGridLineHover",afterDraw:function(t){var e;if(null!==(e=t.tooltip)&&void 0!==e&&null!==(e=e._active)&&void 0!==e&&e.length){var i=t.tooltip._active[0].element.x,n=t.scales.yAxis,a=t.ctx;a.save(),a.beginPath(),a.moveTo(i,n.top),a.lineTo(i,n.bottom),a.lineWidth=2,a.strokeStyle=_,a.stroke(),a.restore()}}})],data:{datasets:m}}),Object(c.createElement)(Tr,{chartRef:g,chart:f}),Object(c.createElement)(Cr,a()({},x,{deltaChangedString:h(x)})),Object(c.createElement)(Bs.Popover.Slot,null))}},function(t,e){function i(){return t.exports=i=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var i=0,n=new Array(e);i=s.getTime()?i+1:e.getTime()>=l.getTime()?i:i-1}function f(t){Object(n.a)(1,arguments);var e=u(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var a=d(i);return a}var p={};function g(){return p}function m(t,e){var i,a,s,o,c,h,d,u;Object(n.a)(1,arguments);var f=g(),p=Object(l.a)(null!==(i=null!==(a=null!==(s=null!==(o=null==e?void 0:e.weekStartsOn)&&void 0!==o?o:null==e||null===(c=e.locale)||void 0===c||null===(h=c.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==s?s:f.weekStartsOn)&&void 0!==a?a:null===(d=f.locale)||void 0===d||null===(u=d.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==i?i:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Object(r.a)(t),b=m.getUTCDay(),y=(b=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var x=new Date(0);x.setUTCFullYear(p+1,0,y),x.setUTCHours(0,0,0,0);var v=m(x,e),_=new Date(0);_.setUTCFullYear(p,0,y),_.setUTCHours(0,0,0,0);var w=m(_,e);return f.getTime()>=v.getTime()?p+1:f.getTime()>=w.getTime()?p:p-1}function y(t,e){var i,a,s,r,o,c,h,d;Object(n.a)(1,arguments);var u=g(),f=Object(l.a)(null!==(i=null!==(a=null!==(s=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(o=e.locale)||void 0===o||null===(c=o.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==s?s:u.firstWeekContainsDate)&&void 0!==a?a:null===(h=u.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==i?i:1),p=b(t,e),y=new Date(0);y.setUTCFullYear(p,0,f),y.setUTCHours(0,0,0,0);var x=m(y,e);return x}function x(t,e){for(var i=t<0?"-":"",n=Math.abs(t).toString();n.length0?i:1-i;return x("yy"===e?n%100:n,e.length)},_=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):x(i+1,2)},w=function(t,e){return x(t.getUTCDate(),e.length)},O=function(t,e){return x(t.getUTCHours()%12||12,e.length)},M=function(t,e){return x(t.getUTCHours(),e.length)},k=function(t,e){return x(t.getUTCMinutes(),e.length)},j=function(t,e){return x(t.getUTCSeconds(),e.length)},S=function(t,e){var i=e.length,n=t.getUTCMilliseconds();return x(Math.floor(n*Math.pow(10,i-3)),e.length)};function D(t,e){var i=t>0?"-":"+",n=Math.abs(t),a=Math.floor(n/60),s=n%60;if(0===s)return i+String(a);var r=e||"";return i+String(a)+r+x(s,2)}function P(t,e){return t%60==0?(t>0?"-":"+")+x(Math.abs(t)/60,2):E(t,e)}function E(t,e){var i=e||"",n=t>0?"-":"+",a=Math.abs(t);return n+x(Math.floor(a/60),2)+i+x(a%60,2)}var C={G:function(t,e,i){var n=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"});case"GGGGG":return i.era(n,{width:"narrow"});case"GGGG":default:return i.era(n,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var n=t.getUTCFullYear(),a=n>0?n:1-n;return i.ordinalNumber(a,{unit:"year"})}return v(t,e)},Y:function(t,e,i,n){var a=b(t,n),s=a>0?a:1-a;return"YY"===e?x(s%100,2):"Yo"===e?i.ordinalNumber(s,{unit:"year"}):x(s,e.length)},R:function(t,e){return x(u(t),e.length)},u:function(t,e){return x(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return x(n,2);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return x(n,2);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,i){var n=t.getUTCMonth();switch(e){case"M":case"MM":return _(t,e);case"Mo":return i.ordinalNumber(n+1,{unit:"month"});case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,i){var n=t.getUTCMonth();switch(e){case"L":return String(n+1);case"LL":return x(n+1,2);case"Lo":return i.ordinalNumber(n+1,{unit:"month"});case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,i,a){var s=function(t,e){Object(n.a)(1,arguments);var i=Object(r.a)(t),a=m(i,e).getTime()-y(i,e).getTime();return Math.round(a/6048e5)+1}(t,a);return"wo"===e?i.ordinalNumber(s,{unit:"week"}):x(s,e.length)},I:function(t,e,i){var a=function(t){Object(n.a)(1,arguments);var e=Object(r.a)(t),i=d(e).getTime()-f(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(a,{unit:"week"}):x(a,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):w(t,e)},D:function(t,e,i){var a=function(t){Object(n.a)(1,arguments);var e=Object(r.a)(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var a=e.getTime(),s=i-a;return Math.floor(s/864e5)+1}(t);return"Do"===e?i.ordinalNumber(a,{unit:"dayOfYear"}):x(a,e.length)},E:function(t,e,i){var n=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"});case"EEEE":default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,i,n){var a=t.getUTCDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return x(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(a,{width:"short",context:"formatting"});case"eeee":default:return i.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,i,n){var a=t.getUTCDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return x(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(a,{width:"narrow",context:"standalone"});case"cccccc":return i.day(a,{width:"short",context:"standalone"});case"cccc":default:return i.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,i){var n=t.getUTCDay(),a=0===n?7:n;switch(e){case"i":return String(a);case"ii":return x(a,e.length);case"io":return i.ordinalNumber(a,{unit:"day"});case"iii":return i.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(n,{width:"short",context:"formatting"});case"iiii":default:return i.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,i){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(t,e,i){var n,a=t.getUTCHours();switch(n=12===a?"noon":0===a?"midnight":a/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(t,e,i){var n,a=t.getUTCHours();switch(n=a>=17?"evening":a>=12?"afternoon":a>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var n=t.getUTCHours()%12;return 0===n&&(n=12),i.ordinalNumber(n,{unit:"hour"})}return O(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):M(t,e)},K:function(t,e,i){var n=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(n,{unit:"hour"}):x(n,e.length)},k:function(t,e,i){var n=t.getUTCHours();return 0===n&&(n=24),"ko"===e?i.ordinalNumber(n,{unit:"hour"}):x(n,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):k(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):j(t,e)},S:function(t,e){return S(t,e)},X:function(t,e,i,n){var a=(n._originalDate||t).getTimezoneOffset();if(0===a)return"Z";switch(e){case"X":return P(a);case"XXXX":case"XX":return E(a);case"XXXXX":case"XXX":default:return E(a,":")}},x:function(t,e,i,n){var a=(n._originalDate||t).getTimezoneOffset();switch(e){case"x":return P(a);case"xxxx":case"xx":return E(a);case"xxxxx":case"xxx":default:return E(a,":")}},O:function(t,e,i,n){var a=(n._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+D(a,":");case"OOOO":default:return"GMT"+E(a,":")}},z:function(t,e,i,n){var a=(n._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+D(a,":");case"zzzz":default:return"GMT"+E(a,":")}},t:function(t,e,i,n){var a=n._originalDate||t;return x(Math.floor(a.getTime()/1e3),e.length)},T:function(t,e,i,n){return x((n._originalDate||t).getTime(),e.length)}},T=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},A=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},L={p:A,P:function(t,e){var i,n=t.match(/(P+)(p+)?/)||[],a=n[1],s=n[2];if(!s)return T(t,e);switch(a){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",T(a,e)).replace("{{time}}",A(s,e))}};function R(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var N=["D","DD"],F=["YY","YYYY"];function I(t){return-1!==N.indexOf(t)}function z(t){return-1!==F.indexOf(t)}function B(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var V={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function W(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth,n=t.formats[i]||t.formats[t.defaultWidth];return n}}var H={date:W({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:W({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:W({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},U={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Y(t){return function(e,i){var n;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,s=null!=i&&i.width?String(i.width):a;n=t.formattingValues[s]||t.formattingValues[a]}else{var r=t.defaultWidth,o=null!=i&&i.width?String(i.width):t.defaultWidth;n=t.values[o]||t.values[r]}return n[t.argumentCallback?t.argumentCallback(e):e]}}function $(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,a=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],s=e.match(a);if(!s)return null;var r,o=s[0],l=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?q(l,(function(t){return t.test(o)})):X(l,(function(t){return t.test(o)}));r=t.valueCallback?t.valueCallback(c):c,r=i.valueCallback?i.valueCallback(r):r;var h=e.slice(o.length);return{value:r,rest:h}}}function X(t,e){for(var i in t)if(t.hasOwnProperty(i)&&e(t[i]))return i}function q(t,e){for(var i=0;i0?"in "+n:n+" ago":n},formatLong:H,formatRelative:function(t,e,i,n){return U[t]},localize:{ordinalNumber:function(t,e){var i=Number(t),n=i%100;if(n>20||n<10)switch(n%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:Y({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Y({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Y({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Y({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Y({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(G={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(G.matchPattern);if(!i)return null;var n=i[0],a=t.match(G.parsePattern);if(!a)return null;var s=G.valueCallback?G.valueCallback(a[0]):a[0];s=e.valueCallback?e.valueCallback(s):s;var r=t.slice(n.length);return{value:s,rest:r}}),era:$({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:$({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:$({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:$({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:$({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},K=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Z=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,J=/^'([^]*?)'?$/,tt=/''/g,et=/[a-zA-Z]/;function it(t,e,i){var a,s,c,d,u,f,p,m,b,y,x,v,_,w,O,M,k,j;Object(n.a)(2,arguments);var S=String(e),D=g(),P=null!==(a=null!==(s=null==i?void 0:i.locale)&&void 0!==s?s:D.locale)&&void 0!==a?a:Q,E=Object(l.a)(null!==(c=null!==(d=null!==(u=null!==(f=null==i?void 0:i.firstWeekContainsDate)&&void 0!==f?f:null==i||null===(p=i.locale)||void 0===p||null===(m=p.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==u?u:D.firstWeekContainsDate)&&void 0!==d?d:null===(b=D.locale)||void 0===b||null===(y=b.options)||void 0===y?void 0:y.firstWeekContainsDate)&&void 0!==c?c:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=Object(l.a)(null!==(x=null!==(v=null!==(_=null!==(w=null==i?void 0:i.weekStartsOn)&&void 0!==w?w:null==i||null===(O=i.locale)||void 0===O||null===(M=O.options)||void 0===M?void 0:M.weekStartsOn)&&void 0!==_?_:D.weekStartsOn)&&void 0!==v?v:null===(k=D.locale)||void 0===k||null===(j=k.options)||void 0===j?void 0:j.weekStartsOn)&&void 0!==x?x:0);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!P.localize)throw new RangeError("locale must contain localize property");if(!P.formatLong)throw new RangeError("locale must contain formatLong property");var A=Object(r.a)(t);if(!o(A))throw new RangeError("Invalid time value");var N=R(A),F=h(A,N),V={firstWeekContainsDate:E,weekStartsOn:T,locale:P,_originalDate:A},W=S.match(Z).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,L[e])(t,P.formatLong):t})).join("").match(K).map((function(n){if("''"===n)return"'";var a=n[0];if("'"===a)return nt(n);var s=C[a];if(s)return null!=i&&i.useAdditionalWeekYearTokens||!z(n)||B(n,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!I(n)||B(n,e,String(t)),s(F,n,P.localize,V);if(a.match(et))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return n})).join("");return W}function nt(t){var e=t.match(J);return e?e[1].replace(tt,"'"):t}},function(t,e,i){"use strict";i.r(e);var n=i(0),a=(i(37),i(3)),s=i(6),r=i.n(s),o=i(2),l=i(9),c=Object(n.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(l.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})),h=i(10),d=i(14),u=simpayAdminPageActivityReports,f=u.user_id,p=u.currencies,g=u.default_currency,m=i(15),b=i.n(m),y=i(17),x=i(11),v=i.n(x),_=i(25),w=i.n(_);function O(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function M(t){for(var e=1;e0&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.CardDivider,null),Object(n.createElement)("h3",{className:"".concat("simpay-activity-reports-card-today","-today-misc-title")},Object(o.__)("Top Forms","stripe")),Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-today","-forms")},s.map((function(t){return Object(n.createElement)(D,b()({key:t.id},t))})))),r&&Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-today","-tip")},Object(n.createElement)("strong",null,Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M11.7 2.805a.75.75 0 01.6 0A60.65 60.65 0 0122.83 8.72a.75.75 0 01-.231 1.337 49.949 49.949 0 00-9.902 3.912l-.003.002-.34.18a.75.75 0 01-.707 0A50.009 50.009 0 007.5 12.174v-.224c0-.131.067-.248.172-.311a54.614 54.614 0 014.653-2.52.75.75 0 00-.65-1.352 56.129 56.129 0 00-4.78 2.589 1.858 1.858 0 00-.859 1.228 49.803 49.803 0 00-4.634-1.527.75.75 0 01-.231-1.337A60.653 60.653 0 0111.7 2.805z"}),Object(n.createElement)("path",{d:"M13.06 15.473a48.45 48.45 0 017.666-3.282c.134 1.414.22 2.843.255 4.285a.75.75 0 01-.46.71 47.878 47.878 0 00-8.105 4.342.75.75 0 01-.832 0 47.877 47.877 0 00-8.104-4.342.75.75 0 01-.461-.71c.035-1.442.121-2.87.255-4.286A48.4 48.4 0 016 13.18v1.27a1.5 1.5 0 00-.14 2.508c-.09.38-.222.753-.397 1.11.452.213.901.434 1.346.661a6.729 6.729 0 00.551-1.608 1.5 1.5 0 00.14-2.67v-.645a48.549 48.549 0 013.44 1.668 2.25 2.25 0 002.12 0z"}),Object(n.createElement)("path",{d:"M4.462 19.462c.42-.419.753-.89 1-1.394.453.213.902.434 1.347.661a6.743 6.743 0 01-1.286 1.794.75.75 0 11-1.06-1.06z"})),r.title),Object(n.createElement)("p",null,r.text," ",Object(n.createElement)("a",{href:Object(y.decodeEntities)(r.href),target:"_blank",rel:"noreferrer"},Object(o.__)("Learn More →","stripe")))))))},C=function(t){var e=t.currency;return Object(n.createElement)("div",{className:"simpay-admin-charts-no-data",style:{width:"100%",height:"100%"}},Object(n.createElement)("div",null,Object(n.createElement)("strong",null,Object(o.sprintf)(/* translators: %s Currency code. */ +Object(o.__)("No %s transactions found.","stripe"),e.toUpperCase())),Object(n.createElement)("div",null,Object(o.__)("Please select a different currency or check back later.","stripe"))))},T=i(13),A=i.n(T),L=function(t){var e=t.currency,i=t.amount_total_formatted,s=t.status,r=t.status_formatted,l=t.email,c=t.payment_method_type_icon,h=t.date_created_human_time_diff,d=t.links,u=d.customer,f=d.payment,p="simpay-activity-reports-card-latest-payment",g=A()("simpay-activity-reports-badge",{"is-succeeded":"succeeded"===s,"is-failed":"failed"===s});return Object(n.createElement)("tr",{className:p},Object(n.createElement)("td",{className:"".concat(p,"__amount")},Object(y.decodeEntities)(i)," ",Object(n.createElement)("small",{style:{fontWeight:"normal"}},e.toUpperCase())),Object(n.createElement)("td",{className:"".concat(p,"__type")},""!==c&&Object(n.createElement)("span",{dangerouslySetInnerHTML:{__html:c}})),Object(n.createElement)("td",{className:"".concat(p,"__status")},Object(n.createElement)("div",{className:g},Object(n.createElement)("span",null,r),Object(n.createElement)("svg",{"aria-hidden":"true",className:"simpay-activity-reports-badge__icon",height:"12",width:"12",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",style:{marginLeft:"4px"}},"succeeded"===s?Object(n.createElement)("path",{d:"M5.297 13.213.293 8.255c-.39-.394-.39-1.033 0-1.426s1.024-.394 1.414 0l4.294 4.224 8.288-8.258c.39-.393 1.024-.393 1.414 0s.39 1.033 0 1.426L6.7 13.208a.994.994 0 0 1-1.402.005z",fillRule:"evenodd"}):Object(n.createElement)("path",{d:"m8 6.585 4.593-4.592a1 1 0 0 1 1.415 1.416L9.417 8l4.591 4.591a1 1 0 0 1-1.415 1.416L8 9.415l-4.592 4.592a1 1 0 0 1-1.416-1.416L6.584 8l-4.59-4.591a1 1 0 1 1 1.415-1.416z",fillRule:"evenodd"})))),Object(n.createElement)("td",{className:"".concat(p,"__email")},Object(n.createElement)(a.Tooltip,{text:Object(o.__)("View customer records","stripe")},Object(n.createElement)("a",{href:u,target:"_blank",rel:"noreferrer noopener"},l))),Object(n.createElement)("td",{className:"".concat(p,"__date")},Object(n.createElement)(a.Tooltip,{text:Object(o.__)("View payment record","stripe")},Object(n.createElement)("a",{href:f,target:"_blank",rel:"noreferrer noopener"},h))))},R=simpayAdminPageActivityReports,N=R.default_currency,F=R.links.all_payments,I=function(){var t=j("/wpsp/__internal__/report/latest-payments",{currency:N},[]),e=t.data.payments;return Object(n.createElement)(a.Card,{elevation:2,className:"simpay-activity-reports-card-latest"},Object(n.createElement)(a.CardHeader,null,Object(n.createElement)("h2",{className:"simpay-activity-reports-card-title"},Object(o.__)("Latest Payments","stripe")),Object(n.createElement)(a.Button,{className:"simpay-activity-reports-card-title-link",href:F,variant:"link",isSmall:!0,target:"_blank"},Object(o.__)("View More →","stripe"))),Object(n.createElement)(a.CardBody,null,t.isLoading&&Object(n.createElement)(a.Spinner,null),!t.isLoading&&e.length>0&&Object(n.createElement)("table",{className:"".concat("simpay-activity-reports-card-latest","-payments")},Object(n.createElement)("tbody",null,e.map((function(t){return Object(n.createElement)(L,b()({key:t.id},t))})))),!t.isLoading&&0===e.length&&Object(n.createElement)(C,{currency:N})))},z=i(8),B=i(4);function V(t,e){Object(B.a)(2,arguments);var i=Object(z.a)(t),n=Object(z.a)(e),a=i.getFullYear()-n.getFullYear(),s=i.getMonth()-n.getMonth();return 12*a+s}function W(t,e){Object(B.a)(2,arguments);var i=Object(z.a)(t),n=Object(z.a)(e),a=i.getTime()-n.getTime();return a<0?-1:a>0?1:a}function H(t){Object(B.a)(1,arguments);var e=Object(z.a)(t);return e.setHours(23,59,59,999),e}function U(t){Object(B.a)(1,arguments);var e=Object(z.a)(t),i=e.getMonth();return e.setFullYear(e.getFullYear(),i+1,0),e.setHours(23,59,59,999),e}function Y(t){Object(B.a)(1,arguments);var e=Object(z.a)(t);return H(e).getTime()===U(e).getTime()}var $=i(78),X=i(33);function q(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function G(t){for(var e=1;e27&&n.setDate(30),n.setMonth(n.getMonth()-s*r);var o=W(n,a)===-s;Y(Object(z.a)(t))&&1===r&&1===W(t,a)&&(o=!1),i=s*(r-Number(o))}return 0===i?0:i}(new Date(s.end),new Date(s.start))>12?(e=Object(X.dateI18n)("F Y",s.start),i=Object(X.dateI18n)("F Y",s.end)):"today"===s.type?(e=Object(X.dateI18n)(l.formats.date,K),i=e):(e=Object(X.dateI18n)(l.formats.date,s.start),i=Object(X.dateI18n)(l.formats.date,s.end)),Object(n.createElement)("div",{className:"simpay-activity-reports-card-reports-date-range"},Object(n.createElement)(a.SelectControl,{label:Object(o.__)("Report range","stripe"),value:s.type,options:"custom"===s.type?[].concat(c,[{label:Object(o.__)("Custom","stripe"),value:"custom"}]):c,onChange:function(t){r(G(G({},s),{},{type:t,start:Object(d.d)(t,K),end:Object(d.c)(t,s.end)}))},hideLabelFromVision:!0}),Object(n.createElement)(a.Dropdown,{position:"bottom center",popoverProps:{noArrow:!1},renderToggle:function(t){var i=t.isOpen,s=t.onToggle;return Object(n.createElement)(a.Button,{variant:"tertiary",onClick:s,"aria-expanded":i},e)},renderContent:function(t){var e=t.onToggle;return Object(n.createElement)(a.DatePicker,{currentDate:new Date(s.start),onChange:function(t){r(G(G({},s),{},{start:Object($.a)(new Date(t),"yyyy-MM-dd 00:00:00"),type:"custom"})),e()},startOfWeek:l.l10n.startOfWeek,isInvalidDate:function(t){return t>new Date(s.end)}})}}),Object(n.createElement)("span",{style:{color:"#ccc"}},"–"),Object(n.createElement)(a.Dropdown,{position:"bottom center",popoverProps:{noArrow:!1},renderToggle:function(t){var e=t.isOpen,s=t.onToggle;return Object(n.createElement)(a.Button,{variant:"tertiary",onClick:s,"aria-expanded":e},i)},renderContent:function(t){var e=t.onToggle;return Object(n.createElement)(a.DatePicker,{currentDate:new Date(s.end),onChange:function(t){r(G(G({},s),{},{end:Object($.a)(new Date(t),"yyyy-MM-dd 23:59:59"),type:"custom"})),e()},startOfWeek:l.l10n.startOfWeek,isInvalidDate:function(t){return tnew Date}})}}))},J="simpay-activity-reports-data-bar",tt=function(t){var e=t.isLoading,i=t.label,s=t.data;return Object(n.createElement)("div",{className:J},Object(n.createElement)("div",{className:"".concat(J,"__header")},Object(n.createElement)("h3",{className:"".concat(J,"__label")},i),!e&&Object(n.createElement)("div",{className:"".concat(J,"__legend")},s.map((function(t){var e=t.label,i=t.color;return Object(n.createElement)("div",{key:e,className:"".concat(J,"__legend-item"),style:{color:i}},Object(n.createElement)("span",null,e))})))),Object(n.createElement)("div",{className:"".concat(J,"__bar")},!e&&s.length>0&&s.map((function(t){return Object(n.createElement)(a.Button,{key:t.label,label:"".concat(t.label,": ").concat(t.value,"%"),showTooltip:!0,className:"".concat(J,"__bar-item"),style:{backgroundColor:t.color,flexBasis:"".concat(t.value,"%"),flexGrow:1}},Object(n.createElement)("div",{className:"screen-reader-text"},t.label))})),!e&&0===s.length&&Object(n.createElement)("div",{className:"".concat(J,"__bar-item-none")},Object(o.__)("n/a","stripe"))))},et=function(t){var e=t.currency,i=t.range,a=j("/wpsp/__internal__/report/payment-info",{range:i,currency:e},[i]),s=a.data,r=s.payment_method_types,l=s.payment_statuses;return Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-reports","-payment-breakdown")},Object(n.createElement)(tt,{label:Object(o.__)("Payment Methods","stripe"),data:r,isLoading:a.isLoading}),Object(n.createElement)(tt,{label:Object(o.__)("Payments","stripe"),data:l,isLoading:a.isLoading}))},it=function(t){var e=t.currency,i=t.range,a=j("/wpsp/__internal__/report/gross-volume-period-over-period",{range:i,currency:e},[i]),s=a.data,r=s.delta,l=s.total_formatted;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-reports","-report-title")},Object(n.createElement)("h3",null,Object(o.__)("Gross Volume","stripe"),!a.isLoading&&Object(n.createElement)(n.Fragment,null,": ",Object(n.createElement)("em",null,Object(y.decodeEntities)(l)))),!a.isLoading&&Object(n.createElement)(d.a,{delta:r})),Object(n.createElement)(d.b,{report:a,style:{width:"100%",height:"300px"},config:{yAxisIsCurrency:!0},noData:Object(n.createElement)("div",null,Object(n.createElement)("strong",null,Object(o.sprintf)(/* translators: %s Currency code. */ +Object(o.__)("No %s transactions found.","stripe"),e.toUpperCase())),Object(n.createElement)("div",null,Object(o.__)("Please select a different currency, date range, or check back later.","stripe"))),deltaChangedString:function(t){return Object(n.createInterpolateElement)(Object(o.sprintf)(/* translators: %s: delta percentage */ +Object(o.__)("%1$s%% vs. previous period","stripe"),Math.abs(t.delta)),{delta:Object(n.createElement)("strong",{className:t.delta>0?"is-positive":"is-negative"})})}}))},nt=simpayAdminPageActivityReports.default_currency,at=function(t){var e=t.range,i=j("/wpsp/__internal__/report/successful-payments-period-over-period",{range:e,currency:nt},[e]),a=i.data,s=a.delta,r=a.total_formatted;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-reports","-report-title")},Object(n.createElement)("h3",null,Object(o.__)("Successful Payments","stripe"),!i.isLoading&&Object(n.createElement)(n.Fragment,null,": ",Object(n.createElement)("em",null,r))),!i.isLoading&&Object(n.createElement)(d.a,{delta:s})),Object(n.createElement)(d.b,{report:i,style:{width:"100%",height:"300px"},config:{yAxisIsCurrency:!1},noData:Object(n.createElement)("div",null,Object(n.createElement)("strong",null,Object(o.sprintf)(/* translators: %s Currency code. */ +Object(o.__)("No %s transactions found.","stripe"),nt.toUpperCase())),Object(n.createElement)("div",null,Object(o.__)("Please select a different currency, date range, or check back later.","stripe"))),deltaChangedString:function(t){return Object(n.createInterpolateElement)(Object(o.sprintf)(/* translators: %s: delta percentage */ +Object(o.__)("%1$s%% vs. previous period","stripe"),Math.abs(t.delta)),{delta:Object(n.createElement)("strong",{className:t.delta>0?"is-positive":"is-negative"})})}}))},st=simpayAdminPageActivityReports,rt=st.user_id,ot=st.default_range,lt=ot.start,ct=ot.end,ht=ot.type,dt=st.default_currency,ut=function(){var t=Object(d.e)(rt,"simpay_activity_reports_range",{start:Object(d.d)(ht,lt),end:Object(d.c)(ht,ct),type:ht}),e=r()(t,2),i=e[0],s=e[1];return Object(n.createElement)(a.Card,{elevation:2,className:"simpay-activity-reports-card-reports"},Object(n.createElement)(a.CardHeader,{className:"".concat("simpay-activity-reports-card-reports","-header")},Object(n.createElement)("h2",{className:"simpay-activity-reports-card-title"},Object(o.__)("Reports","stripe")),Object(n.createElement)(Z,{range:i,setRange:s})),Object(n.createElement)(a.CardBody,null,Object(n.createElement)(et,{range:i,currency:dt}),Object(n.createElement)(a.CardDivider,null),Object(n.createElement)(it,{range:i,currency:dt}),Object(n.createElement)(a.CardDivider,null),Object(n.createElement)(at,{range:i,currency:dt})))};Object(n.render)(Object(n.createElement)((function(){var t=Object(d.e)(f,"simpay_activity_reports_currency",g),e=r()(t,3),i=e[0],s=e[1],l=e[2];function u(){var t=Object(h.addQueryArgs)(window.location.href,{currency:i});window.location.href=t}return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.Dropdown,{position:"bottom center",popoverProps:{noArrow:!1},renderToggle:function(t){var e=t.isOpen,i=t.onToggle;return Object(n.createElement)(a.Button,{variant:"secondary",onClick:i,"aria-expanded":e,icon:c,tooltip:Object(o.__)("Settings","stripe")})},renderContent:function(){return Object(n.createElement)("div",{style:{width:"200px",padding:"8px"}},Object(n.createElement)(a.SelectControl,{label:Object(o.__)("Currency","stripe"),value:i,onChange:s,options:p.map((function(t){return{label:t,value:t.toLowerCase()}})),help:Object(o.__)("Activity with the selected currency and global payment mode will be shown.","stripe")}),Object(n.createElement)(a.Button,{type:"submit",variant:"primary",onClick:u,isBusy:l,disabled:l},Object(o.__)("Update","stripe")))}}),Object(n.createElement)(a.Popover.Slot,null))}),null),document.getElementById("simpay-admin-page-activity-reports-config")),Object(n.render)(Object(n.createElement)((function(){return Object(n.createElement)("div",{className:"simpay-activity-reports"},Object(n.createElement)(E,null),Object(n.createElement)(I,null),Object(n.createElement)(ut,null),Object(n.createElement)(a.Popover.Slot,null))}),null),document.getElementById("simpay-admin-page-activity-reports"))}]); \ No newline at end of file diff --git a/includes/core/assets/js/dist/simpay-admin-page-setup-wizard-css.asset.php b/includes/core/assets/js/dist/simpay-admin-page-setup-wizard-css.asset.php new file mode 100644 index 00000000..bb8b4ef8 --- /dev/null +++ b/includes/core/assets/js/dist/simpay-admin-page-setup-wizard-css.asset.php @@ -0,0 +1 @@ + array(), 'version' => 'd99dc49f938c91cae2684bcc17849259'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-page-setup-wizard.min.asset.php b/includes/core/assets/js/dist/simpay-admin-page-setup-wizard.asset.php similarity index 80% rename from includes/core/assets/js/simpay-admin-page-setup-wizard.min.asset.php rename to includes/core/assets/js/dist/simpay-admin-page-setup-wizard.asset.php index 12d4a83e..15e647bb 100644 --- a/includes/core/assets/js/simpay-admin-page-setup-wizard.min.asset.php +++ b/includes/core/assets/js/dist/simpay-admin-page-setup-wizard.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => 'e196aff24b480b6f6f207eb40e2c8c63'); \ No newline at end of file + array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '579b9765c204b25653135173b92b4236'); \ No newline at end of file diff --git a/includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js b/includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js new file mode 100644 index 00000000..b515d6a7 --- /dev/null +++ b/includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js @@ -0,0 +1,2 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=77)}([function(e,t){e.exports=window.wp.element},,function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},,function(e,t){e.exports=window.React},function(e,t,n){var r=n(26),a=n(27),i=n(22),c=n(28);e.exports=function(e,t){return r(e)||a(e,t)||i(e,t)||c()},e.exports.__esModule=!0,e.exports.default=e.exports},,,function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.url},function(e,t,n){var r=n(30);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.lodash},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.__esModule=!0,e.exports.default=e.exports},,,,,,,,function(e,t){e.exports=window.wp.notices},function(e,t,n){"use strict";e.exports=n(62)},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for,a=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,c=r?Symbol.for("react.fragment"):60107,o=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,m=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,b=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,j=r?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case p:case m:case c:case s:case o:case d:return e;default:switch(e=e&&e.$$typeof){case u:case f:case h:case y:case l:return e;default:return t}}case i:return t}}}function x(e){return _(e)===m}t.AsyncMode=p,t.ConcurrentMode=m,t.ContextConsumer=u,t.ContextProvider=l,t.Element=a,t.ForwardRef=f,t.Fragment=c,t.Lazy=h,t.Memo=y,t.Portal=i,t.Profiler=s,t.StrictMode=o,t.Suspense=d,t.isAsyncMode=function(e){return x(e)||_(e)===p},t.isConcurrentMode=x,t.isContextConsumer=function(e){return _(e)===u},t.isContextProvider=function(e){return _(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return _(e)===f},t.isFragment=function(e){return _(e)===c},t.isLazy=function(e){return _(e)===h},t.isMemo=function(e){return _(e)===y},t.isPortal=function(e){return _(e)===i},t.isProfiler=function(e){return _(e)===s},t.isStrictMode=function(e){return _(e)===o},t.isSuspense=function(e){return _(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===c||e===m||e===s||e===o||e===d||e===b||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===y||e.$$typeof===l||e.$$typeof===u||e.$$typeof===f||e.$$typeof===v||e.$$typeof===O||e.$$typeof===j||e.$$typeof===g)},t.typeOf=_},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(0),a=n(9);const i=Object(r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(a.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));t.a=i},function(e,t,n){"use strict";var r=n(0),a=n(9);const i=Object(r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(a.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));t.a=i},,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(6),a=n.n(r),i=n(0),c=(n(60),n(3)),o=n(2),s=n(10),l=n(37),u=n(12),p=n(25),m=n.n(p),f=n(44),d=n(65),b=n(18),y=n.n(b),h=n(15),g=n.n(h),v=n(5);function O(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var j=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,_=O((function(e){return j.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;t2||J(V)>3?"":" "}function ae(e,t){for(;--t&&Y()&&!(V<48||V>102||V>57&&V<65||V>70&&V<97););return K(e,Q()+(t<6&&32==X()&&32==Y()))}function ie(e,t){for(;Y()&&e+V!==57&&(e+V!==84||47!==X()););return"/*"+K(t,Z-1)+"*"+A(47===e?e:Y())}function ce(e){for(;!J(X());)Y();return K(e,Z)}function oe(e,t,n,r,a,i,c,o,s,l,u){for(var p=a-1,m=0===a?i:[""],f=D(m),d=0,b=0,y=0;d0?m[h]+" "+g:$(g,/&\f/g,m[h])))&&(s[y++]=v);return G(e,t,n,0===a?k:o,s,l,u)}function se(e,t,n){return G(e,t,n,S,A(V),F(e,2,-2),0)}function le(e,t,n,r){return G(e,t,n,C,F(e,0,r),F(e,r+1,-1),r)}function ue(e,t){for(var n="",r=D(e),a=0;a-1&&!e.return)switch(e.type){case C:e.return=function e(t,n){switch(a=n,45^T(r=t,0)?(((a<<2^T(r,0))<<2^T(r,1))<<2^T(r,2))<<2^T(r,3):0){case 5103:return E+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return E+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return E+t+"-moz-"+t+"-ms-"+t+t;case 6828:case 4268:return E+t+"-ms-"+t+t;case 6165:return E+t+"-ms-flex-"+t+t;case 5187:return E+t+$(t,/(\w+).+(:[^]+)/,E+"box-$1$2-ms-flex-$1$2")+t;case 5443:return E+t+"-ms-flex-item-"+$(t,/flex-|-self/,"")+t;case 4675:return E+t+"-ms-flex-line-pack"+$(t,/align-content|flex-|-self/,"")+t;case 5548:return E+t+"-ms-"+$(t,"shrink","negative")+t;case 5292:return E+t+"-ms-"+$(t,"basis","preferred-size")+t;case 6060:return E+"box-"+$(t,"-grow","")+E+t+"-ms-"+$(t,"grow","positive")+t;case 4554:return E+$(t,/([^-])(transform)/g,"$1"+E+"$2")+t;case 6187:return $($($(t,/(zoom-|grab)/,E+"$1"),/(image-set)/,E+"$1"),t,"")+t;case 5495:case 3959:return $(t,/(image-set\([^]*)/,E+"$1$`$1");case 4968:return $($(t,/(.+:)(flex-)?(.*)/,E+"box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+E+t+t;case 4095:case 3583:case 4068:case 2532:return $(t,/(.+)-inline(.+)/,E+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(L(t)-1-n>6)switch(T(t,n+1)){case 109:if(45!==T(t,n+4))break;case 102:return $(t,/(.+:)(.+)-([^]+)/,"$1"+E+"$2-$3$1-moz-"+(108==T(t,n+3)?"$3":"$2-$3"))+t;case 115:return~R(t,"stretch")?e($(t,"stretch","fill-available"),n)+t:t}break;case 4949:if(115!==T(t,n+1))break;case 6444:switch(T(t,L(t)-3-(~R(t,"!important")&&10))){case 107:return $(t,":",":"+E)+t;case 101:return $(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+E+(45===T(t,14)?"inline-":"")+"box$3$1"+E+"$2$3$1-ms-$2box$3")+t}break;case 5936:switch(T(t,n+11)){case 114:return E+t+"-ms-"+$(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return E+t+"-ms-"+$(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return E+t+"-ms-"+$(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return E+t+"-ms-"+t+t}var r,a;return t}(e.value,e.length);break;case P:return ue([q(e,{value:$(e.value,"@","@"+E)})],r);case k:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch((n=/(::plac\w+|:read-\w+)/.exec(n=t))?n[0]:n){case":read-only":case":read-write":return ue([q(e,{props:[$(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ue([q(e,{props:[$(t,/:(plac\w+)/,":"+E+"input-$1")]}),q(e,{props:[$(t,/:(plac\w+)/,":-moz-$1")]}),q(e,{props:[$(t,/:(plac\w+)/,"-ms-input-$1")]})],r)}var n;return""}))}}],ge=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,a,i=e.stylisPlugins||he,c={},o=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n0&&L(w)-m&&B(d>32?le(w+";",a,r,m-1):le($(w," ","")+";",a,r,m-2),l);break;case 59:w+=";";default:if(B(x=oe(w,n,r,u,p,i,s,O,j=[],_=[],m),c),123===v)if(0===p)e(w,n,x,x,j,c,m,s,_);else switch(99===f&&110===T(w,3)?100:f){case 100:case 108:case 109:case 115:e(t,x,x,a&&B(oe(t,x,x,0,0,i,s,O,i,j=[],m),_),i,_,m,s,a?j:_);break;default:e(w,x,x,x,[""],_,0,s,_)}}u=p=d=0,y=g=1,O=w="",m=o;break;case 58:m=1+L(w),d=b;default:if(y<1)if(123==v)--y;else if(125==v&&0==y++&&125==(V=Z>0?T(H,--Z):0,W--,10===V&&(W=1,U--),V))continue;switch(w+=A(v),v*y){case 38:g=p>0?1:(w+="\f",-1);break;case 44:s[u++]=(L(w)-1)*g,g=1;break;case 64:45===X()&&(w+=ne(Y())),f=X(),p=m=L(O=w+=ce(Q())),v++;break;case 45:45===b&&2==L(w)&&(y=0)}}return c}("",null,null,null,[""],e=ee(e),0,[0],e))}(e?e+"{"+t.styles+"}":t.styles),p),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new w({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:c,registered:{},insert:a};return m.sheet.hydrate(o),m};function ve(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}n(51);var Oe=function(e,t,n){!function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)}(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do{e.insert(t===a?"."+r:"",a,e.sheet,!0),a=a.next}while(void 0!==a)}},je={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_e=/[A-Z]|^ms/g,xe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,we=function(e){return 45===e.charCodeAt(1)},Ee=function(e){return null!=e&&"boolean"!=typeof e},Se=O((function(e){return we(e)?e:e.replace(_e,"-$&").toLowerCase()})),ke=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(xe,(function(e,t,n){return Pe={name:t,styles:n,next:Pe},t}))}return 1===je[e]||we(e)||"number"!=typeof t||0===t?t:t+"px"};function Ce(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Pe={name:n.name,styles:n.styles,next:Pe},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Pe={name:r.name,styles:r.styles,next:Pe},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a=4;++r,a-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(a){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(a)+s,styles:a,next:Pe}},Me=(!!v.useInsertionEffect&&v.useInsertionEffect||v.useLayoutEffect,v.createContext("undefined"!=typeof HTMLElement?ge({key:"css"}):null));Me.Provider;var Ne=function(e){return Object(v.forwardRef)((function(t,n){var r=Object(v.useContext)(Me);return e(t,r,n)}))},$e=v.createContext({}),Re=_,Te=function(e){return"theme"!==e},Fe=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Re:Te},Le=function(e,t,n){var r;if(t){var a=t.shouldForwardProp;r=e.__emotion_forwardProp&&a?function(t){return e.__emotion_forwardProp(t)&&a(t)}:a}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},De=function(){return null},Be=function e(t,n){var r,a,i=t.__emotion_real===t,c=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,a=n.target);var o=Le(t,n,i),s=o||Fe(c),l=!s("as");return function(){var u=arguments,p=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&p.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)p.push.apply(p,u);else{p.push(u[0][0]);for(var m=u.length,f=1;f div {\n\t\tmargin-left: 8px;\n\t}\n\n\tsvg {\n\t\tdisplay: block;\n\n\t\t&:hover {\n\t\t\tcursor: pointer;\n\t\t}\n\t}\n"]))),Ke=Ye(c.Popover)(Ie||(Ie=y()(["\n\t.components-popover__content {\n\t\tpadding: 20px;\n\t\twidth: 200px;\n\t}\n"]))),Je=Ye(c.ToggleControl)(Ze||(Ze=y()(["\n\t&& {\n\t\t.components-base-control__field {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t}\n"]))),et=n(52),tt=n.n(et),nt=Ye(c.Card)(Ve||(Ve=y()(["\n\tpadding: 30px;\n\n\t&& {\n\t\tbox-shadow: 0 2px 6px 0 rgba( 0, 0, 0, 0.05 );\n\t\tborder: 1px solid #ccc;\n\t\twidth: 100%;\n\t}\n"]))),rt=Ye(c.CardHeader)(He||(He=y()(["\n\t&&& {\n\t\tpadding: 0 0 30px;\n\t}\n\n\th1 {\n\t\tfont-size: 26px;\n\t\tline-height: 1;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\tsmall {\n\t\tcolor: #c0c0c0;\n\t\tfont-size: 13px;\n\t\tfont-weight: normal;\n\t\tdisplay: block;\n\t\tmargin: 0 0 3px;\n\t}\n"]))),at=Ye(c.CardFooter)(Ge||(Ge=y()(["\n\t&&& {\n\t\tpadding: 30px 0 0;\n\t}\n"]))),it=Ye(c.CardBody)(qe||(qe=y()(["\n\t&&& {\n\t\tpadding: 30px 0;\n\t}\n\n\t> * {\n\t\tmargin: 0 0 2rem;\n\n\t\t&:last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t}\n\n\t> p {\n\t\tcolor: #555555;\n\t\tfont-size: 15px;\n\t}\n"]))),ct=["title","supTitle","children"];function ot(e){return Object(i.createElement)(nt,e)}function st(e){var t=e.title,n=e.supTitle,r=e.children,a=tt()(e,ct);return Object(i.createElement)(rt,a,Object(i.createElement)("div",null,n&&Object(i.createElement)("small",null,n),t&&Object(i.createElement)("h1",null,t)),r)}function lt(e){return Object(i.createElement)(at,e)}function ut(e){return Object(i.createElement)(it,e)}var pt,mt=simpaySetupWizard.adminUrl;function ft(e){var t=e.isFirst,n=Object(i.useState)(!1),r=a()(n,2),s=r[0],l=r[1];return Object(i.createElement)(c.Flex,{justify:"center"},s&&Object(i.createElement)(c.Modal,{title:Object(o.__)("Are you sure you want to exit the wizard?","stripe"),onRequestClose:function(){return l(!1)}},Object(i.createElement)("p",{style:{marginBottom:"2rem"}},Object(o.__)("Manual setup is only recommended for experienced users.","stripe")),Object(i.createElement)(c.Flex,null,Object(i.createElement)(c.Button,{href:mt,isDestructive:!0,variant:"destructive"},Object(o.__)("Exit Setup Wizard","stripe")),Object(i.createElement)(c.Button,{variant:"primary",isPrimary:!0,onClick:function(){return l(!1)}},Object(o.__)("Continue Setup","stripe")))),Object(i.createElement)(c.Button,{isLink:!0,variant:"link",className:"simpay-setup-wizard-subtle-link",onClick:function(){return l(!0)}},t?Object(o.__)("Go back to the Dashboard","stripe"):Object(o.__)("Close and exit the Setup Wizard","stripe")))}var dt=Ye(c.Button)(pt||(pt=y()(["\n\t&& {\n\t\tfont-size: 16px;\n\t\tfont-weight: bold;\n\t\tpadding: 15px 30px !important;\n\t\theight: auto;\n\t}\n"]))),bt=Object(i.forwardRef)((function(e,t){return Object(i.createElement)(dt,g()({isPrimary:!0,variant:"primary"},e,{ref:t}))}));function yt(e){return e.width,Object(i.createElement)("svg",{width:"311",height:"41",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.352 0C1.052 0 0 1.02 0 2.277v30.746C0 34.281 1.053 35.3 2.352 35.3h28.806c.975 0 1.764-.764 1.764-1.708 0-.943-.79-1.708-1.763-1.708H5.29c-.974 0-1.764-.765-1.764-1.708v-17.08c0-.944.79-1.709 1.764-1.709h44.092c1.299 0 2.352-1.02 2.352-2.277V2.277C51.735 1.02 50.682 0 49.383 0H2.352Zm55.262 24.198h-1.47v-1.993c0-4.088-3.422-7.402-7.643-7.402-4.22 0-7.642 3.314-7.642 7.402v1.993H38.8c-1.299 0-2.352 1.02-2.352 2.277v11.387c0 1.258 1.053 2.278 2.352 2.278h18.813c1.299 0 2.351-1.02 2.351-2.278V26.475c0-1.258-1.053-2.277-2.351-2.277Zm-4.997-1.993v1.993h-8.23v-1.993c0-2.201 1.842-3.985 4.114-3.985 2.273 0 4.116 1.784 4.116 3.985ZM8.23 20.497c0-.629.526-1.139 1.175-1.139H28.22c.65 0 1.176.51 1.176 1.139s-.527 1.139-1.176 1.139H9.406c-.649 0-1.175-.51-1.175-1.139Zm0 5.124c0-.629.526-1.138 1.175-1.138h7.055c.65 0 1.176.51 1.176 1.138 0 .63-.527 1.139-1.176 1.139H9.406c-.649 0-1.175-.51-1.175-1.139Zm31.158 11.672V27.045h17.637v10.248H39.389Z",fill:"#428BCA"}),Object(i.createElement)("path",{d:"M81.08 30.745h5.288l5.41-17.186 5.596 17.187h5.289l7.84-24.29h-5.288l-5.289 17.956L94.7 6.457h-5.842L83.785 24.38 78.528 6.457h-5.289l7.84 24.288Zm31.511 0h4.796v-8.793h6.456c5.319 0 8.302-3.228 8.302-7.963 0-4.735-2.983-7.532-8.302-7.532h-11.252v24.288Zm4.796-13.405V11.1h5.288c2.952 0 4.52 1.168 4.52 3.104 0 1.968-1.507 3.136-4.366 3.136h-5.442Zm35.473 13.897c6.303 0 10.023-3.197 10.023-7.747 0-10.3-14.789-4.581-14.789-10.085 0-1.906 1.599-3.013 4.52-3.013 2.859 0 4.519 1.322 4.704 3.567h5.288c0-4.92-4.089-7.994-9.9-7.994-5.872 0-9.562 2.89-9.562 7.502 0 10.268 14.758 4.642 14.758 10.084 0 1.998-1.752 3.26-4.919 3.26-3.228 0-5.073-1.6-5.165-4.305h-5.381c0 5.503 4.274 8.731 10.423 8.731Zm15.137-18.447c1.66 0 2.89-1.23 2.89-2.89 0-1.66-1.23-2.829-2.89-2.829-1.691 0-2.921 1.169-2.921 2.83 0 1.66 1.23 2.89 2.921 2.89Zm-2.306 17.956h4.581V14.758h-4.581v15.988Zm7.696-.001h4.55v-8.178c0-2.644 1.384-4.366 3.597-4.366 1.968 0 3.136 1.415 3.136 3.751v8.793h4.612v-8.178c0-2.644 1.384-4.366 3.597-4.366 1.968 0 3.136 1.415 3.136 3.751v8.793h4.643v-9.039c0-4.888-1.968-7.44-5.965-7.44-2.459 0-4.642.86-6.21 3.044-.892-2.03-2.583-3.044-5.135-3.044-2.552 0-4.335 1.076-5.411 2.798v-2.306h-4.55v15.988Zm30.183 6.15h4.551v-8.24c1.106 1.63 2.859 2.582 5.38 2.582 4.028 0 6.887-3.504 6.887-8.424 0-5.011-2.859-8.547-6.887-8.547-2.521 0-4.274.953-5.38 2.583v-2.091h-4.551v22.137Zm8.363-9.593c-2.244 0-3.843-1.875-3.843-4.52 0-2.674 1.599-4.58 3.843-4.58 2.275 0 3.874 1.906 3.874 4.58 0 2.645-1.599 4.52-3.874 4.52Zm10.651 3.443h4.551V6.457h-4.551v24.288Zm15.443.492c3.905 0 6.918-2.213 7.41-5.688h-4.551c-.184 1.107-1.229 1.968-2.828 1.968-2.368 0-3.536-1.353-3.751-3.412h11.222v-1.476c0-5.104-3.259-8.363-7.502-8.363-4.919 0-8.363 3.505-8.363 8.455 0 4.98 3.444 8.516 8.363 8.516Zm-3.689-9.93c.276-1.845 1.352-3.106 3.505-3.106 1.937 0 3.013 1.322 3.105 3.106h-6.61Zm22.358 9.438h4.796v-8.793h6.457c5.319 0 8.301-3.228 8.301-7.963 0-4.735-2.982-7.532-8.301-7.532h-11.253v24.288Zm4.796-13.405V11.1h5.288c2.952 0 4.52 1.168 4.52 3.104 0 1.968-1.507 3.136-4.366 3.136h-5.442Zm20.704 13.897c2.736 0 4.458-1.23 5.257-3.228.4 2.183 2.152 3.413 5.688 2.613v-3.259c-1.261.123-1.507-.338-1.507-1.66v-5.411c0-3.782-2.644-6.026-7.317-6.026-4.612 0-7.317 2.275-7.317 6.118h4.488c0-1.383 1.015-2.183 2.768-2.183 1.906 0 2.859.769 2.828 2.091v.492l-3.659.43c-4.519.523-7.071 2.368-7.071 5.258 0 2.429 1.722 4.765 5.842 4.765Zm.922-3.382c-1.414 0-2.183-.645-2.183-1.63 0-1.167 1.507-1.629 4.397-1.998l1.568-.153c-.277 2.152-1.599 3.781-3.782 3.781Zm11.126 9.04h1.967c3.936 0 6.641-1.077 8.271-4.981L311 14.758h-4.766l-3.996 10.669-4.797-10.67h-4.796l7.225 16.234c-1.014 1.446-2.06 1.907-4.058 1.876h-1.568v4.028Z",fill:"#428BCA"}))}var ht=n(16);function gt(e){var t=Object(ht.useSelect)((function(e){return Object(u.filter)(e("core/notices").getNotices(),{type:"snackbar"})}),[]),n=Object(ht.useDispatch)("core/notices").removeNotice;return 0===t.length?null:Object(i.createElement)(c.SnackbarList,g()({onRemove:n,notices:t},e))}var vt,Ot,jt,_t,xt,wt=n(64),Et=Ye.div(vt||(vt=y()(["\n\tmax-width: 80%;\n\tdisplay: flex;\n\talign-items: center;\n\n\t> * {\n\t\tmargin-right: 8px;\n\n\t\t&:last-child {\n\t\t\tmargin-right: 0;\n\t\t}\n\t}\n"]))),St={current:"var(--wp-admin-theme-color)",complete:"var(--wp-admin-theme-color)",incomplete:"#c0c0c0"},kt=Ye.div(Ot||(Ot=y()(["\n\twidth: 16px;\n\theight: 16px;\n\tborder-radius: 50%;\n\tbackground-color: ",";\n\tflex-shrink: 0;\n\tposition: relative;\n\ttransition: backgroundColor 0.2s ease-in-out;\n\n\tsvg {\n\t\tfill: #fff;\n\t\tposition: absolute;\n\t\tleft: -1px;\n\t\ttop: -1px;\n\t\ttransition: opacity 0.2s ease-in-out;\n\t\topacity: ",";\n\t}\n\n\tdiv {\n\t\topacity: ",";\n\t}\n\n\tpath {\n\t\tstroke: #fff;\n\t}\n"])),(function(e){return St[e.status]}),(function(e){return e.isComplete?"1":"0"}),(function(e){var t=e.isCurrent,n=e.isComplete;return t&&!n?"1":"0"})),Ct=Ye.div(jt||(jt=y()(["\n\twidth: 6px;\n\theight: 6px;\n\tbackground-color: #f0f0f1;\n\tborder-radius: 50%;\n\tposition: absolute;\n\ttop: 5px;\n\tleft: 5px;\n\ttransition: opacity 0.2s ease-in-out;\n"]))),Pt=Ye.div(_t||(_t=y()(["\n\twidth: 100%;\n\theight: 2px;\n\tbackground-color: rgba( 192, 192, 192, 0.5 );\n\twidth: 100px;\n"])));function zt(e){for(var t=e.current,n=e.total,r=[],a=1;a<=n;a++){var c="incomplete";a * {\n\t\tmargin: 25px 0;\n\t}\n"])));function Nt(e){return Object(i.createElement)(Mt,e)}var $t=Ye(c.Button)(At||(At=y()(["\n\t&&&& {\n\t\tfont-size: 16px;\n\t\tfont-weight: bold;\n\t\tpadding: 13px 30px 12px !important;\n\t\theight: auto;\n\t\tbackground-color: #635bff;\n\n\t\t&:focus {\n\t\t\tbackground-color: #635bff;\n\t\t\tbox-shadow: inset 0 0 0 1px #fff,\n\t\t\t\t0 0 0 var( --wp-admin-border-width-focus ) #635bff;\n\t\t}\n\n\t\t&:hover {\n\t\t\tbackground-color: #0a2540 !important;\n\t\t}\n\n\t\t&:focus:hover {\n\t\t\tbox-shadow: inset 0 0 0 1px #fff,\n\t\t\t\t0 0 0 var( --wp-admin-border-width-focus ) #0a2540;\n\t\t}\n\n\t\tsvg {\n\t\t\tmargin-left: 5px;\n\t\t}\n\t}\n"]))),Rt=Object(i.forwardRef)((function(e,t){return Object(i.createElement)($t,g()({isPrimary:!0,variant:"primary"},e,{ref:t}))}));function Tt(){return Object(i.createElement)("svg",{width:56,height:23,fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M55.742 11.884c0-3.93-1.92-7.032-5.59-7.032-3.684 0-5.914 3.101-5.914 7.001 0 4.622 2.632 6.955 6.41 6.955 1.843 0 3.236-.414 4.29-.998v-3.07c-1.053.522-2.261.844-3.794.844-1.502 0-2.834-.522-3.004-2.334h7.572c0-.2.03-.998.03-1.366Zm-7.649-1.459c0-1.735 1.069-2.456 2.044-2.456.945 0 1.951.721 1.951 2.456h-3.995Zm-9.832-5.573c-1.517 0-2.493.706-3.035 1.197l-.201-.952h-3.407V23l3.871-.814.016-4.345c.557.4 1.378.967 2.74.967 2.772 0 5.296-2.21 5.296-7.078-.015-4.452-2.57-6.878-5.28-6.878Zm-.929 10.579c-.913 0-1.456-.323-1.827-.722l-.016-5.696c.403-.446.96-.753 1.843-.753 1.41 0 2.385 1.566 2.385 3.578 0 2.057-.96 3.593-2.385 3.593ZM26.292 3.946l3.886-.83V0l-3.886.814v3.132Zm0 1.167h3.886v13.434h-3.886V5.113Zm-4.165 1.136-.248-1.136h-3.345v13.434h3.871V9.443c.914-1.183 2.462-.968 2.942-.799V5.113c-.495-.184-2.307-.522-3.22 1.136Zm-7.742-4.468-3.778.798-.016 12.299c0 2.272 1.719 3.946 4.01 3.946 1.27 0 2.2-.23 2.71-.507V15.2c-.495.2-2.942.906-2.942-1.366v-5.45h2.942V5.112H14.37l.016-3.332ZM3.917 9.013c0-.6.496-.83 1.317-.83 1.176 0 2.663.354 3.84.983V5.558c-1.286-.507-2.555-.706-3.84-.706C2.09 4.852 0 6.479 0 9.197c0 4.238 5.884 3.562 5.884 5.39 0 .705-.62.936-1.487.936-1.285 0-2.926-.522-4.227-1.229v3.655c1.44.614 2.896.875 4.227.875 3.221 0 5.435-1.582 5.435-4.33-.015-4.575-5.915-3.762-5.915-5.481Z",fill:"#fff"}))}var Ft=n(11),Lt=n.n(Ft);function Dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;tWP Simple Pay account or purchase receipt email.","stripe"),{strong:Object(i.createElement)("strong",null),a:Object(i.createElement)("a",{href:Jt,target:"_blank",rel:"noopener noreferrer"})})),Object(i.createElement)(c.TextControl,{label:Object(o.__)("License Key","stripe"),value:l,className:_,onChange:function(e){return u(e)},disabled:d,help:g||Object(o.__)("An active license ensures automatic updates and the latest features.","stripe"),ref:j})),Object(i.createElement)(lt,{justify:"flex-end",align:"center"},Object(i.createElement)(bt,{onClick:function(){b(!0);var e=new FormData;e.append("action","simpay_activate_license"),e.append("nonce",en),e.append("license",l),m()({url:Kt,method:"POST",body:e}).then((function(e){var r=e.success,a=e.data,i=a.message,c=a.license;if(!r)throw{message:i};n(c),O(Object(o.__)("License activated","stripe"),{type:"snackbar"}),b(!1),t()})).catch((function(e){var t=e.message;v(t),b(!1)}))},disabled:""===l||d,isBusy:d},Object(o.__)("Activate and Continue →","stripe"))))}},{id:"stripe",title:Object(o.__)("Connect to Stripe","stripe"),content:wn},{id:"emails",title:Object(o.__)("Configure Emails","stripe"),content:function(e){var t=e.goPrev,n=e.goNext,r=e.licenseData,a=Wt(),s=a.settings,l=a.rawSettings,p=a.discardChanges,m=a.editSettings,f=a.saveSettings,d=Object(i.useRef)();if(Object(i.useLayoutEffect)((function(){d.current&&d.current.focus()}),[l]),Object(u.isEmpty)(s))return Object(i.createElement)(ut,null,Object(i.createElement)(c.Spinner,null));var b=s["email_payment-confirmation"],y=s["email_payment-notification"],h=s["email_payment-notification_to"],g=s["email_upcoming-invoice"],v=s["email_invoice-confirmation"],O=r.features,j=O.subscriptions,_=O.enhanced_subscriptions;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ut,null,Object(i.createElement)("ul",{className:"simpay-setup-wizard-toggle-list"},Object(i.createElement)("li",null,Object(i.createElement)("label",{htmlFor:"email_payment-confirmation"},Object(i.createElement)("h3",null,Object(o.__)("Payment Receipt","stripe")),Object(i.createElement)("p",null,Object(o.__)("Send a payment receipt email to the customer upon successful payment.","stripe"))),Object(i.createElement)(c.FormToggle,{id:"email_payment-confirmation",checked:"no"!==b,onChange:function(e){var t=e.target;return m({"email_payment-confirmation":t.checked?"yes":"no"})}})),Object(i.createElement)("li",null,Object(i.createElement)("label",{htmlFor:"email_payment-notification"},Object(i.createElement)("h3",null,Object(o.__)("Payment Notification","stripe")),Object(i.createElement)("p",null,Object(o.__)("Receive an email notification when a new payment is made.","stripe"))),Object(i.createElement)(c.FormToggle,{id:"email_payment-notification",checked:"no"!==y,onChange:function(e){var t=e.target;return m({"email_payment-notification":t.checked?"yes":"no"})}})),"no"!==y&&Object(i.createElement)("li",{className:"simpay-setup-wizard-toggle-list__child"},Object(i.createElement)(c.TextControl,{label:Object(o.__)("Send to:","stripe"),value:h,onChange:function(e){return m({"email_payment-notification_to":e})}})),_&&Object(i.createElement)("li",null,Object(i.createElement)("label",{htmlFor:"email_invoice-confirmation"},Object(i.createElement)("h3",null,Object(o.__)("Invoice Receipt","stripe")),Object(i.createElement)("p",null,Object(o.__)("Send a payment receipt email to the customer upon successful invoice.","stripe"))),Object(i.createElement)(c.FormToggle,{id:"email_payment-confirmation",checked:"no"!==v,onChange:function(e){var t=e.target;return m({"email_invoice-confirmation":t.checked?"yes":"no"})}})),j&&Object(i.createElement)("li",null,Object(i.createElement)("label",{htmlFor:"email_upcoming-invoice"},Object(i.createElement)("h3",null,Object(o.__)("Upcoming Invoice","stripe")),Object(i.createElement)("p",null,Object(o.__)("Remind customers of upcoming invoices and allow payment method changes.","stripe"))),Object(i.createElement)(c.FormToggle,{id:"email_upcoming-invoice",checked:"no"!==g,onChange:function(e){var t=e.target;return m({"email_upcoming-invoice":t.checked?"yes":"no"})}})))),Object(i.createElement)(lt,{justify:"space-between",align:"center"},Object(i.createElement)("div",null,Object(i.createElement)(c.Button,{isLink:!0,variant:"link",onClick:t,className:"simpay-setup-wizard-subtle-link"},Object(o.__)("← Previous Step","stripe"))),Object(i.createElement)("div",{style:{display:"flex",justifyContent:"center"}},Object(i.createElement)(c.Button,{isLink:!0,variant:"link",onClick:function(){p(),n()},style:{marginRight:"16px"},className:"simpay-setup-wizard-subtle-link"},Object(o.__)("Skip Step","stripe")),Object(i.createElement)(bt,{onClick:function(){f(),n()},ref:d},Object(o.__)("Save and Continue →","stripe")))))}},{id:"next-steps",title:Object(o.__)("🎉 Setup Complete","stripe"),content:function(){return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ut,null,Object(i.createElement)("div",{className:"simpay-setup-wizard-content-list"},Object(i.createElement)("div",{className:"simpay-setup-wizard-content-list__content"},Object(i.createElement)("p",null,Object(o.__)("Congratulations, you’re ready to start accepting payments!","stripe")),Object(i.createElement)("p",null,Object(o.__)("WP Simple Pay is just that: simple. Create your first payment form below to start collecting payments, or fine-tune your setup through some of these suggestions:","stripe"))),Object(i.createElement)("div",{className:"simpay-setup-wizard-content-list__list"},Object(i.createElement)("ul",{className:"simpay-setup-wizard-bullet-list"},Object(i.createElement)("li",null,Object(i.createElement)("a",{href:bn,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Collect tax or GST","stripe"))),Object(i.createElement)("li",null,Object(i.createElement)("a",{href:yn,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Add anti-spam protection","stripe"))),Object(i.createElement)("li",null,Object(i.createElement)("a",{href:hn,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Change the default currency","stripe"))),Object(i.createElement)("li",null,Object(i.createElement)("a",{href:gn,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Customize receipts","stripe")))))),Object(i.createElement)("hr",null),Object(i.createElement)("div",{className:"simpay-setup-wizard-doc-suggestions"},Object(i.createElement)("div",null,Object(i.createElement)("h3",null,Object(o.__)("Accept Donations","stripe")),Object(i.createElement)("p",null,Object(o.__)("Easily fundraise or accept donations online via 135+ supported currencies. Offer one-time or recurring donations of fixed or user-defined amounts.","stripe")),Object(i.createElement)(c.Button,{href:vn,variant:"secondary",isSecondary:!0,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("View Walkthrough","stripe"))),Object(i.createElement)("div",null,Object(i.createElement)("h3",null,Object(o.__)("Reconcile Invoices","stripe")),Object(i.createElement)("p",null,Object(o.__)("Collect additional custom data on your payment forms such as an Invoice ID to reconcile invoices against your own invoicing system.","stripe")),Object(i.createElement)(c.Button,{href:On,variant:"secondary",isSecondary:!0,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("View Walkthrough","stripe"))))),Object(i.createElement)(lt,{justify:"space-between",align:"center"},Object(i.createElement)("div",{style:{flexBasis:"100%"}},Object(i.createElement)(c.Button,{isLink:!0,variant:"link",href:fn,className:"simpay-setup-wizard-subtle-link",icon:Object(i.createElement)(f.a,{icon:rn})},Object(o.__)("Return to Dashboard","stripe"))),Object(i.createElement)(c.Flex,{justify:"flex-end",gap:4},Object(i.createElement)(bt,{href:dn},Object(o.__)("Create a Payment Form →","stripe")))))}}],lite:[{id:"stripe",title:Object(o.__)("Connect to Stripe","stripe"),content:wn},{id:"analytics",title:Object(o.__)("Help Improve WP Simple Pay + Smart Recommendations","stripe"),content:function(e){var t=e.goPrev,n=e.goNext,r=Wt(),s=r.settings,l=r.rawSettings,p=r.discardChanges,b=r.editSettings,y=r.saveSettings,h=Object(i.useState)(!0),g=a()(h,2),v=g[0],O=g[1],j=Object(i.useState)(Ht),_=a()(j,2),x=_[0],w=_[1],E=Object(i.useState)(!1),S=a()(E,2),k=S[0],C=S[1],P=Object(i.useState)(!1),z=a()(P,2),A=z[0],M=z[1],N=Object(i.useRef)();return Object(i.useLayoutEffect)((function(){N.current&&N.current.focus()}),[l]),Object(u.isEmpty)(s)?Object(i.createElement)(ut,null,Object(i.createElement)(c.Spinner,null)):Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ut,null,Object(i.createElement)("p",null,Object(o.__)("Get helpful suggestions from WP Simple Pay on how to optimize your payment forms and grow your business or increase donations.","stripe")),Object(i.createElement)(c.TextControl,{label:Object(o.__)("Your Email Address:","stripe"),value:x,className:"simpay-setup-wizard-large-input",onChange:function(e){return w(e)},help:Object(o.__)("Your email is needed so you receive recommendations.","stripe"),ref:N,disabled:k}),Object(i.createElement)("hr",null),Object(i.createElement)(Xe,null,Object(i.createElement)(Qe,null,Object(o.__)("Help make WP Simple Pay better for everyone","stripe"),Object(i.createElement)("div",null,A&&Object(i.createElement)(Ke,{position:"top center"},Object(o.__)("By allowing us to track usage data we can better help you because we know which WordPress configurations, themes, and plugins we should test.","stripe")),Object(i.createElement)(f.a,{size:20,icon:d.a,onMouseEnter:function(){return M(!0)},onMouseLeave:function(){return M(!1)}}))),Object(i.createElement)(Je,{label:Object(o.__)("Yes, count me in","stripe"),id:"email_payment-confirmation",checked:v,disabled:k,onChange:function(e){O(e)}}))),Object(i.createElement)(lt,{justify:"space-between",align:"center"},Object(i.createElement)("div",null,Object(i.createElement)(c.Button,{isLink:!0,variant:"link",onClick:t,className:"simpay-setup-wizard-subtle-link",disabled:k},Object(o.__)("← Previous Step","stripe"))),Object(i.createElement)("div",{style:{display:"flex",justifyContent:"center"}},Object(i.createElement)(c.Button,{isLink:!0,variant:"link",onClick:function(){p(),n()},style:{marginRight:"16px"},className:"simpay-setup-wizard-subtle-link",disabled:k},Object(o.__)("Skip Step","stripe")),Object(i.createElement)(bt,{onClick:function(){C(!0),b({usage_tracking_opt_in:v?"yes":"no"}),y();var e=new FormData;e.append("action","simpay_setup_wizard_subscribe_email"),e.append("nonce",Gt),e.append("email",x),m()({url:qt,method:"POST",body:e}).finally((function(){C(!1),n()}))},isBusy:k,disabled:k},Object(o.__)("Save and Continue →","stripe")))))}},{id:"next-steps",title:Object(o.__)("🎉 Setup Complete","stripe"),content:function(){return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ut,null,Object(i.createElement)(c.Flex,{justify:"space-between",align:"center",className:"simpay-setup-wizard-content-list"},Object(i.createElement)("div",{className:"simpay-setup-wizard-content-list__content"},Object(i.createElement)("p",null,Object(o.__)("Congratulations, you’re ready to start easily and securely accepting payments with WP Simple Pay!","stripe"))),Object(i.createElement)("div",null,Object(i.createElement)(bt,{href:ln},Object(o.__)("Create a Payment Form →","stripe")))),Object(i.createElement)("hr",null),Object(i.createElement)(an,null,Object(i.createElement)("h4",null,Object(o.__)("Special Upgrade Offer - Save 50%","stripe")),Object(i.createElement)("h3",null,Object(o.__)("Upgrade to WP Simple Pay Pro Today and Save","stripe")),Object(i.createElement)(cn,{className:"simpay-setup-wizard-check-list"},pn.map((function(e){return Object(i.createElement)("li",{key:e},Object(i.createElement)(f.a,{icon:wt.a}),e)}))),Object(i.createElement)(c.Button,{isLarge:!0,isSecondary:!0,variant:"secondary",href:un,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Upgrade to WP Simple Pay Pro","stripe")))),Object(i.createElement)(lt,{justify:"center"},Object(i.createElement)(c.Button,{isLink:!0,variant:"link",href:sn,className:"simpay-setup-wizard-subtle-link",icon:Object(i.createElement)(f.a,{icon:rn})},Object(o.__)("Return to Dashboard","stripe"))))}}]},Cn=simpaySetupWizard,Pn=Cn.license,zn=Cn.adminUrl,An=Pn.is_lite;Object(i.render)(Object(i.createElement)((function(){var e=kn[!0===An?"lite":"pro"],t=Object(s.getQueryArg)(window.location.href,"step"),n=Object(i.useState)(Pn),r=a()(n,2),u=r[0],p=r[1],m=function(e){var t=e.steps,n=e.currentStepId,r=t.findIndex((function(e){return e.id===n}))||0,c=Object(i.useState)(r),o=a()(c,2),l=o[0],u=o[1];function p(e){u(e),window.history.pushState({},"",Object(s.addQueryArgs)(window.location.href,{step:t[e].id}))}return Object(i.useEffect)((function(){var e=function(){var e=Object(s.getQueryArg)(window.location.search,"step"),n=t.findIndex((function(t){return t.id===e}))||0;u(n)};return window.addEventListener("popstate",e),window.addEventListener("pushstate",e),function(){window.removeEventListener("popstate",e),window.removeEventListener("pushstate",e)}}),[]),{currentStep:l,setCurrentStep:u,hasNext:l0}}({steps:e,currentStepId:t}),f=m.currentStep,d=m.goNext,b=m.goPrev,y=m.hasNext,h=m.hasPrev;if(-1===f)return Object(i.createElement)(Sn,{steps:e,goNext:d});var g=e[f],v=g.content;return Object(i.createElement)(c.SlotFillProvider,null,Object(i.createElement)(l.EntityProvider,{kind:"root",type:"site"},Object(i.createElement)(Nt,null,Object(i.createElement)("a",{href:zn},Object(i.createElement)(yt,{width:"250px"})),Object(i.createElement)(zt,{current:f+1,total:e.length}),Object(i.createElement)(ot,{isRounded:!0},Object(i.createElement)(st,{supTitle:Object(o.sprintf)(/* translators: %1$d current step count. %2$d total step count*/ +Object(o.__)("Step %1$d of %2$d","stripe"),f+1,e.length),title:g.title}),Object(i.createElement)(v,{steps:e,currentStep:f,goPrev:b,goNext:d,hasNext:y,hasPrev:h,licenseData:u,setLicenseData:p})),y&&Object(i.createElement)(ft,null)),Object(i.createElement)(gt,{className:"simpay-setup-wizard-toasts"}),Object(i.createElement)(c.Popover.Slot,null)))}),null),document.getElementById("simpay-setup-wizard"))}]); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-page-smtp.min.js b/includes/core/assets/js/dist/simpay-admin-page-smtp.js similarity index 100% rename from includes/core/assets/js/simpay-admin-page-smtp.min.js rename to includes/core/assets/js/dist/simpay-admin-page-smtp.js diff --git a/includes/core/assets/js/simpay-admin.min.js b/includes/core/assets/js/dist/simpay-admin.js similarity index 100% rename from includes/core/assets/js/simpay-admin.min.js rename to includes/core/assets/js/dist/simpay-admin.js diff --git a/includes/core/assets/js/simpay-block-button.min.asset.php b/includes/core/assets/js/dist/simpay-block-button.asset.php similarity index 64% rename from includes/core/assets/js/simpay-block-button.min.asset.php rename to includes/core/assets/js/dist/simpay-block-button.asset.php index fd543547..15dc1975 100644 --- a/includes/core/assets/js/simpay-block-button.min.asset.php +++ b/includes/core/assets/js/dist/simpay-block-button.asset.php @@ -1 +1 @@ - array('wp-block-editor', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives'), 'version' => 'bf79cb1cb483089e7230e9c0017617ee'); \ No newline at end of file + array('wp-block-editor', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives'), 'version' => 'f832a397ccab62027d2aab6dcfeae955'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-block-button.min.js b/includes/core/assets/js/dist/simpay-block-button.js similarity index 72% rename from includes/core/assets/js/simpay-block-button.min.js rename to includes/core/assets/js/dist/simpay-block-button.js index 45496598..3d964eed 100644 --- a/includes/core/assets/js/simpay-block-button.min.js +++ b/includes/core/assets/js/dist/simpay-block-button.js @@ -1 +1 @@ -!function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=84)}({0:function(e,t){e.exports=window.wp.element},11:function(e,t,r){var o=r(30);e.exports=function(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},2:function(e,t){e.exports=window.wp.i18n},20:function(e,t){e.exports=window.wp.compose},21:function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);re.length)&&(t=e.length);for(var r=0,o=new Array(t);r array(), 'version' => '1334fe88e4b24843d98aa4ae04c0275a'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-block-payment-form.min.asset.php b/includes/core/assets/js/dist/simpay-block-payment-form.asset.php similarity index 58% rename from includes/core/assets/js/simpay-block-payment-form.min.asset.php rename to includes/core/assets/js/dist/simpay-block-payment-form.asset.php index b17476b4..6e425254 100644 --- a/includes/core/assets/js/simpay-block-payment-form.min.asset.php +++ b/includes/core/assets/js/dist/simpay-block-payment-form.asset.php @@ -1 +1 @@ - array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-server-side-render'), 'version' => 'eb46f9e5c8b96af9cd61e0e5dfa9fb5d'); \ No newline at end of file + array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-server-side-render'), 'version' => '0e00c2ad55cf5fb0e7e38ffbc8efe143'); \ No newline at end of file diff --git a/includes/core/assets/js/dist/simpay-block-payment-form.js b/includes/core/assets/js/dist/simpay-block-payment-form.js new file mode 100644 index 00000000..92e5fdf8 --- /dev/null +++ b/includes/core/assets/js/dist/simpay-block-payment-form.js @@ -0,0 +1 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=84)}({0:function(e,t){e.exports=window.wp.element},16:function(e,t){e.exports=window.wp.data},2:function(e,t){e.exports=window.wp.i18n},21:function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r3&&void 0!==arguments[3]?arguments[3]:10;if(o(e)&&n(r))if("function"==typeof i)if("number"==typeof a){var u={callback:i,priority:a,namespace:r};if(t[e]){var c,s=t[e].handlers;for(c=s.length;c>0&&!(a>=s[c-1].priority);c--);c===s.length?s[c]=u:s.splice(c,0,u),(t.__current||[]).forEach((function(t){t.name===e&&t.currentIndex>=c&&t.currentIndex++}))}else t[e]={handlers:[u],runs:0};"hookAdded"!==e&&h("hookAdded",e,r,i,a)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}},a=function(t,e){return function(r,i){if(o(r)&&(e||n(i))){if(!t[r])return 0;var a=0;if(e)a=t[r].handlers.length,t[r]={runs:t[r].runs,handlers:[]};else for(var u=t[r].handlers,c=function(e){u[e].namespace===i&&(u.splice(e,1),a++,(t.__current||[]).forEach((function(t){t.name===r&&t.currentIndex>=e&&t.currentIndex--})))},s=u.length-1;s>=0;s--)c(s);return"hookRemoved"!==r&&h("hookRemoved",r,i),a}}},u=function(t){return function(e,r){return void 0!==r?e in t&&t[e].handlers.some((function(t){return t.namespace===r})):e in t}},c=function(t,e){return function(r){t[r]||(t[r]={handlers:[],runs:0}),t[r].runs++;for(var n=t[r].handlers,o=arguments.length,i=new Array(o>1?o-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,r=e.id,n=e.getFormData;return Object(i.a)("v2/customer",f({form_values:s()(e[0],{hash:!0}),form_data:n(),form_id:r},t))}function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,r=e.id,n=e.getFormData;return Object(i.a)("v2/checkout-session",h({form_values:s()(e[0],{hash:!0}),form_data:n(),form_id:r},t))}r(9),r(5),r(11)},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),M(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;M(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},r}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(6).default;t.exports=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},,,,function(t,e,r){var n=r(47);t.exports=function(t,e){if(null==t)return{};var r,o,i=n(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";(function(t){var r=window.spShared,n=r.convertToDollars,o=r.formatCurrency;e.a={init:_.noop,setupCoreForm:_.noop,isStripeCheckoutForm:function(t){return void 0===t.formDisplayType||"stripe_checkout"===t.formDisplayType},setCoreFinalAmount:function(e,r){r.finalAmount=e.cart.getTotalDueToday(),t(document.body).trigger("simpayFinalizeCoreAmount",[e,r])},disableForm:function(t,e,r){var n=t.find(".simpay-payment-btn"),o=e.paymentButtonLoadingText;t.addClass("simpay-checkout-form--loading"),window.simpayApp.isStripeCheckoutForm(e)||(n=t.find(".simpay-checkout-btn"),o=e.checkoutButtonLoadingText),n.prop("disabled",!0),!0===r&&n.addClass("simpay-disabled").find("span").html(o)},enableForm:function(e,r){var i=e.cart;if(void 0!==i){var a=e.find(".simpay-payment-btn"),u=r.paymentButtonLoadingText,c=r.paymentButtonText;e.removeClass("simpay-checkout-form--loading"),window.simpayApp.isStripeCheckoutForm(r)||(a=e.find(".simpay-checkout-btn"),u=r.checkoutButtonLoadingText,c=r.checkoutButtonText),a.prop("disabled",!1).removeClass("simpay-disabled");var s=document.createElement("div");if(s.innerHTML=u,t(s).html()===a.find("span").html())if(0===i.getTotalDueToday()){var l=r.checkoutButtonTrialText;a.find("span").text(l)}else{var f=o(i.isZeroDecimal()?i.getTotalDueToday():n(i.getTotalDueToday()),!0,i.getCurrencySymbol(),i.isZeroDecimal()),p=''.concat(f,"");c=c.replace("{{amount}}",p),a.find("span").html(c)}}},showError:function(t,e,r){return t.find(".simpay-errors").html(r)},triggerBrowserValidation:function(e,r){return t("").attr({type:"submit",style:{display:"none"}}).appendTo(e).click().remove()}}}).call(this,r(7))},,,,,,,,,,,,,,,function(t,e,r){"use strict";r.r(e),function(t){var e=r(30),n=r.n(e),o=r(2),i=r.n(o),a=r(8),u=r(14),c=r(31),s=(r(58),["order","customer","paymentMethods"]);function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;e1&&void 0!==arguments[1]&&arguments[1],c=window.simpayApp.formCount;if(e.attr("data-simpay-form-instance",c),!1===i){var l=window.simplePayForms;r=l[o=e.data("simpay-form-id")]}else r=i,o=i.id;var p=r,d=p.type,h=p.form,m=h.prices,y=h.livemode,v=h.config,g=void 0===v?{}:v,b=g.taxRates,x=void 0===b?[]:b,w=g.paymentMethods,O=void 0===w?[]:w,T=g.taxStatus,j=void 0===T?"fixed-global":T,P=f(f(f(f(f({formId:o,formInstance:c,quantity:1,isValid:!0,stripeParams:f(f({},r.stripe.strings),r.stripe.bools),prices:m},r.form.bools),r.form.integers),r.form.i18n),r.form.strings),r.form.config);e.__unstableLegacyFormData=P;var F=u.getPaymentFormType(d);_.each(F,(function(t,r){e[r]=_.isFunction(t)?_.bind(t,e,e):t})),e.id=o,e.state={isValid:!0,customAmount:!1,coupon:!1,price:_.find(m,(function(t){return!0===t.default})),paymentMethod:_.first(O),taxRates:x,taxStatus:j,paymentMethods:O,livemode:y,displayType:P.formDisplayType},e.setState=function(t){e.state=f(f({},e.state),t)},e.getFormData=function(){var t=f(f({},e.__unstableLegacyFormData),e.state),r=(t.order,t.customer,t.paymentMethods,n()(t,s));return JSON.stringify(r)};var k=r.stripe.strings,S=k.key,A=k.stripe_api_version,M=k.elementsLocale;e.stripeInstance=Stripe(S,{apiVersion:A,locale:M||"auto"}),Object(a.c)("simpaySetupPaymentForm",e),window.simpayApp.spFormData[o]=P,window.simpayApp.spFormElems[o]=e,t(document.body).trigger("simpayCoreFormVarsInitialized",[e,P]).trigger("simpayBindCoreFormEventsAndTriggers",[e,P]).trigger("simpaySetupCoreForm",[e])}window.wpsp={hooks:a.b,paymentForms:u,initPaymentForm:p},window.simpayApp=f({formCount:0,spFormElList:{},spFormData:{},spFormElems:{}},c.a),t((function(){return e=t(document.body).find(".simpay-checkout-form:not(.simpay-update-payment-method)"),window.simpayApp.spFormElList=e,void e.each((function(){window.simpayApp.formCount++,p(t(this))}));var e}))}.call(this,r(7))},function(t,e){t.exports=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n=0||(o[r]=t[r]);return o},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,r(e,n)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},,,,,,,,,function(t,e,r){"use strict";var n=r(9),o=r.n(n),i=r(5),a=r.n(i),u=r(14),c=r(8),s=r(12),l=r.n(s),f=r(13),p=r.n(f),d=r(19),h=r.n(d),m=r(16),y=r.n(m),v=r(20),g=r.n(v),b=r(10),x=r.n(b),_=r(6),w=r.n(_),O=r(2),T=r.n(O);function j(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function P(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:M,e=this.getLineItems().reduce((function(t,e){return t+e.getTotal()}),0),r=t.includeFeeRecovery?this.getFeeRecoveryForAmount(e):0;return e+r}},{key:"getTotalDueToday",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M,e=0;"exclusive"===this.taxBehavior&&this.automaticTax&&0!==this.getSubtotal()&&(e=parseInt(this.automaticTax.amount_tax||e));var r=this.getLineItems().reduce((function(t,e){return e.hasFreeTrial()?t:t+e.getTotal()}),e),n=0!==r&&t.includeFeeRecovery?this.getFeeRecoveryForAmount(r):0;return r+n}},{key:"getRecurringTotal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M,e=this.getLineItem("base"),r=e.getUnitPrice()*e.getQuantity();r=Math.round(r-this.getDiscount());var n=this.getTaxRates(),o=this.getTaxPercent("inclusive")/100,i=Math.round(r-r/(1+o)),a=Math.round(r-i),u=n.reduce((function(t,e){var r=e.percentage;return"inclusive"===e.calculation?t:t+Math.round(a*(r/100))}),0),c=Math.round(r+u),s=t.includeFeeRecovery?this.getFeeRecoveryForAmount(c):0;return c+s}},{key:"getRecurringNoDiscountTotal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M,e=this.getLineItem("base"),r=e.getUnitPrice()*e.getQuantity(),n=0;if("automatic"!==this.taxStatus&&"none"!==this.taxStatus){var o=this.getTaxRates(),i=this.getTaxPercent("inclusive")/100,a=Math.round(r-r/(1+i)),u=Math.round(r-a);n=o.reduce((function(t,e){var r=e.percentage;return"inclusive"===e.calculation?t:t+Math.round(u*(r/100))}),0)}else if("automatic"===this.taxStatus&&"exclusive"===this.taxBehavior&&this.automaticTax){var c;n=(null===(c=this.automaticTax.upcomingInvoice)||void 0===c?void 0:c.amount_tax)||0}var s=Math.round(r+n),l=t.includeFeeRecovery?this.getFeeRecoveryForAmount(s):0;return s+l}},{key:"getNextInvoiceTotal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M,e=this.getLineItem("base"),r=this.getCoupon(),n=r.percent_off,o=r.amount_off,i=r.duration,a=e.getUnitPrice()*e.getQuantity();if(r&&"once"!==i){var u=0;n?u+=Math.round(a*(n/100)):o&&(u+=o),a=Math.round(a-u)}var c=0;if("automatic"!==this.taxStatus&&"none"!==this.taxStatus){var s=this.getTaxRates(),l=this.getTaxPercent("inclusive")/100,f=Math.round(a-a/(1+l)),p=Math.round(a-f);c=s.reduce((function(t,e){var r=e.percentage;return"inclusive"===e.calculation?t:t+Math.round(p*(r/100))}),0)}else if("automatic"===this.taxStatus&&"exclusive"===this.taxBehavior&&this.automaticTax){var d;c=(null===(d=this.automaticTax.upcomingInvoice)||void 0===d?void 0:d.amount_tax)||0}var h=Math.round(a+c),m=t.includeFeeRecovery?this.getFeeRecoveryForAmount(h):0;return h+m}},{key:"getLineItem",value:function(t){var e=this.getLineItems().filter((function(e){return e.id===t}));if(0===e.length)throw{id:"invalid-line-item",message:'Unable to retrieve line item "'.concat(t,'"')};return e[0]}},{key:"addLineItem",value:function(t){var e;return e=1==t instanceof k?t:new this.LineItem(t,this),this.items.push(e),e}},{key:"hasFreeTrial",value:function(){return this.getLineItems().filter((function(t){return t.hasFreeTrial()})).length>0}},{key:"getFeeRecoveryForAmount",value:function(t){var e=this.paymentForm.state,r=e.paymentMethod,n=e.isCoveringFees;if(!r||!r.config)return 0;var o=r.config.fee_recovery;return o&&n?Math.round((t+parseInt(o.amount))/(1-parseFloat(o.percent)/100)-t):0}}]),t}();function I(t,e,r){return e=y()(e),h()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return!!t}()?Reflect.construct(e,r||[],y()(t).constructor):e.apply(t,r))}var D=function(t){function e(){return p()(this,e),I(this,e,arguments)}return g()(e,t),l()(e)}(F);var E=function(t){function e(t){var r,n,o,i;return p()(this,e),(n=this,o=e,i=[t],o=y()(o),r=h()(n,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return!!t}()?Reflect.construct(o,i||[],y()(n).constructor):o.apply(n,i))).LineItem=D,r}return g()(e,t),l()(e)}(L),C=r(15);function R(){return(R=o()(a.a.mark((function t(e){var r,n,o,i,u,c,s,l,f,p;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.error,n=e.disable,o=e.__unstableLegacyFormData,i=null,u=o.hasCustomerFields,r(""),n(),!u){t.next=13;break}return t.next=8,C.a.create({},e).catch(r);case 8:if(c=t.sent){t.next=11;break}return t.abrupt("return");case 11:s=c.customer.id,i=s;case 13:return t.next=15,C.b.create({customer_id:i,payment_method_type:o.paymentMethods?o.paymentMethods[0].id:"card"},e).catch(r);case 15:if(l=t.sent){t.next=18;break}return t.abrupt("return");case 18:if(f=l.sessionId,p=l.session.url,"stripe"!==l.redirect_type){t.next=21;break}return t.abrupt("return",e.stripeInstance.redirectToCheckout({sessionId:f}).then((function(t){return t.error&&r(t.error),t})));case 21:window.location.href=p;case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var B=window.spShared,N=B.convertToDollars,U=B.formatCurrency,q="stripe-checkout";Object(u.registerPaymentFormType)(q,{type:q,setup:function(t){var e=t.enable;(0,t.disable)(),t.cart=Object(u.__unstableUpdatePaymentFormCart)(t,new E({paymentForm:t}));var r=t.find(".simpay-payment-btn")[0];r&&(r.addEventListener("click",(function(e){e.preventDefault();var r=window.simpayApp.triggerBrowserValidation;t[0].checkValidity()?Object(c.c)("simpaySubmitPaymentForm",t):r(t)})),e())},submit:function(_x){return R.apply(this,arguments)},enable:function(t){var e=t.cart,r=t.__unstableLegacyFormData,n=r.paymentButtonText,o=r.paymentButtonTrialText;t.removeClass("simpay-checkout-form--loading");var i=t.find(".simpay-payment-btn");if(i.prop("disabled",!1).removeClass("simpay-disabled"),0===e.getTotalDueToday())i.find("span").text(o);else{var a=U(e.isZeroDecimal()?e.getTotalDueToday():N(e.getTotalDueToday()),!0,e.getCurrencySymbol(),e.isZeroDecimal()),u=''.concat(a,"");i.find("span").html(n.replace("{{amount}}",u))}},disable:function(t){var e=t.__unstableLegacyFormData.paymentButtonLoadingText;t.addClass("simpay-checkout-form--loading"),t.find(".simpay-payment-btn").prop("disabled",!0).addClass("simpay-disabled").find("span").html(e)},error:function(t,e){var r,n=t.enable,o=t.__unstableLegacyFormData,i=o.stripeErrorMessages,a=o.unknownError;if(e&&""===e)r="";else if(void 0!==e){var u=e.message,c=e.code;r=u||e,c&&i[c]&&(r=i[c])}else r=a;t.find(".simpay-errors").html(r),n()}});var G=r(11);function Z(){return(Z=o()(a.a.mark((function t(e){var r,n,o,i,u,c,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.id,n=e.setState,o=e.submit,i=e.disable,u=e.enable,c=e.error,s=e.__unstableLegacyFormData,i(),e.trigger("simpayBeforeStripePayment",[e,s]),s.isValid){t.next=6;break}return u(),t.abrupt("return");case 6:return t.prev=6,t.next=9,Object(G.a)("simple_pay_form_".concat(r,"_customer")).then((function(t){n({customerCaptchaToken:t})}));case 9:return t.next=11,Object(G.a)("simple_pay_form_".concat(r,"_payment")).then((function(t){n({paymentCaptchaToken:t})}));case 11:o(),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(6),c(t.t0);case 17:case"end":return t.stop()}}),t,null,[[6,14]])})))).apply(this,arguments)}Object(c.a)("simpaySetupPaymentForm","wpsp/paymentForm",(function(t){return(0,t.setup)()})),Object(c.a)("simpaySubmitPaymentForm","wpsp/paymentForm",(function(_x){return Z.apply(this,arguments)}))}]); \ No newline at end of file +!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=46)}([,function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return u}));var n=r(9),o=r.n(n),i=r(5),a=r.n(i);function u(_x,t){return c.apply(this,arguments)}function c(){return(c=o()(a.a.mark((function e(r,n){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.ajax({data:n,method:"POST",url:"".concat(wpApiSettings.root,"wpsp/").concat(r),beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",wpApiSettings.nonce)}});case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),e.t0.responseJSON;case 10:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}}).call(this,r(7))},function(t,e,r){var n=r(18);t.exports=function(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},,function(t,e){var r=/^(?:submit|button|image|reset|file)$/i,n=/^(?:input|select|textarea|keygen)/i,o=/(\[[^\[\]]*\])/g;function i(t,e,r){if(e.match(o))!function t(e,r,n){if(0===r.length)return n;var o=r.shift(),i=o.match(/^\[(.+?)\]$/);if("[]"===o)return e=e||[],Array.isArray(e)?e.push(t(null,r,n)):(e._values=e._values||[],e._values.push(t(null,r,n))),e;if(i){var a=i[1],u=+a;isNaN(u)?(e=e||{})[a]=t(e[a],r,n):(e=e||[])[u]=t(e[u],r,n)}else e[o]=t(e[o],r,n);return e}(t,function(t){var e=[],r=new RegExp(o),n=/^([^\[\]]*)/.exec(t);for(n[1]&&e.push(n[1]);null!==(n=r.exec(t));)e.push(n[1]);return e}(e),r);else{var n=t[e];n?(Array.isArray(n)||(t[e]=[n]),t[e].push(r)):t[e]=r}return t}function a(t,e,r){return r=r.replace(/(\r)?\n/g,"\r\n"),r=(r=encodeURIComponent(r)).replace(/%20/g,"+"),t+(t?"&":"")+encodeURIComponent(e)+"="+r}t.exports=function(t,e){"object"!=typeof e?e={hash:!!e}:void 0===e.hash&&(e.hash=!0);for(var o=e.hash?{}:"",u=e.serializer||(e.hash?i:a),c=t&&t.elements?t.elements:[],s=Object.create(null),l=0;l3&&void 0!==arguments[3]?arguments[3]:10;if(o(e)&&n(r))if("function"==typeof i)if("number"==typeof a){var u={callback:i,priority:a,namespace:r};if(t[e]){var c,s=t[e].handlers;for(c=s.length;c>0&&!(a>=s[c-1].priority);c--);c===s.length?s[c]=u:s.splice(c,0,u),(t.__current||[]).forEach((function(t){t.name===e&&t.currentIndex>=c&&t.currentIndex++}))}else t[e]={handlers:[u],runs:0};"hookAdded"!==e&&h("hookAdded",e,r,i,a)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}},a=function(t,e){return function(r,i){if(o(r)&&(e||n(i))){if(!t[r])return 0;var a=0;if(e)a=t[r].handlers.length,t[r]={runs:t[r].runs,handlers:[]};else for(var u=t[r].handlers,c=function(e){u[e].namespace===i&&(u.splice(e,1),a++,(t.__current||[]).forEach((function(t){t.name===r&&t.currentIndex>=e&&t.currentIndex--})))},s=u.length-1;s>=0;s--)c(s);return"hookRemoved"!==r&&h("hookRemoved",r,i),a}}},u=function(t){return function(e,r){return void 0!==r?e in t&&t[e].handlers.some((function(t){return t.namespace===r})):e in t}},c=function(t,e){return function(r){t[r]||(t[r]={handlers:[],runs:0}),t[r].runs++;for(var n=t[r].handlers,o=arguments.length,i=new Array(o>1?o-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,r=e.id,n=e.getFormData;return Object(i.a)("v2/customer",f({form_values:s()(e[0],{hash:!0}),form_data:n(),form_id:r},t))}function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,r=e.id,n=e.getFormData;return Object(i.a)("v2/checkout-session",h({form_values:s()(e[0],{hash:!0}),form_data:n(),form_id:r},t))}r(9),r(5),r(11)},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),M(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;M(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},r}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(6).default;t.exports=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},,,,function(t,e,r){var n=r(47);t.exports=function(t,e){if(null==t)return{};var r,o,i=n(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";(function(t){var r=window.spShared,n=r.convertToDollars,o=r.formatCurrency;e.a={init:_.noop,setupCoreForm:_.noop,isStripeCheckoutForm:function(t){return void 0===t.formDisplayType||"stripe_checkout"===t.formDisplayType},setCoreFinalAmount:function(e,r){r.finalAmount=e.cart.getTotalDueToday(),t(document.body).trigger("simpayFinalizeCoreAmount",[e,r])},disableForm:function(t,e,r){var n=t.find(".simpay-payment-btn"),o=e.paymentButtonLoadingText;t.addClass("simpay-checkout-form--loading"),window.simpayApp.isStripeCheckoutForm(e)||(n=t.find(".simpay-checkout-btn"),o=e.checkoutButtonLoadingText),n.prop("disabled",!0),!0===r&&n.addClass("simpay-disabled").find("span").html(o)},enableForm:function(e,r){var i=e.cart;if(void 0!==i){var a=e.find(".simpay-payment-btn"),u=r.paymentButtonLoadingText,c=r.paymentButtonText;e.removeClass("simpay-checkout-form--loading"),window.simpayApp.isStripeCheckoutForm(r)||(a=e.find(".simpay-checkout-btn"),u=r.checkoutButtonLoadingText,c=r.checkoutButtonText),a.prop("disabled",!1).removeClass("simpay-disabled");var s=document.createElement("div");if(s.innerHTML=u,t(s).html()===a.find("span").html())if(0===i.getTotalDueToday()){var l=r.checkoutButtonTrialText;a.find("span").text(l)}else{var f=o(i.isZeroDecimal()?i.getTotalDueToday():n(i.getTotalDueToday()),!0,i.getCurrencySymbol(),i.isZeroDecimal()),p=''.concat(f,"");c=c.replace("{{amount}}",p),a.find("span").html(c)}}},showError:function(t,e,r){return t.find(".simpay-errors").html(r)},triggerBrowserValidation:function(e,r){return t("").attr({type:"submit",style:{display:"none"}}).appendTo(e).click().remove()}}}).call(this,r(7))},,,,,,,,,,,,,,,function(t,e,r){"use strict";r.r(e),function(t){var e=r(30),n=r.n(e),o=r(2),i=r.n(o),a=r(8),u=r(14),c=r(31),s=(r(58),["order","customer","paymentMethods"]);function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;e1&&void 0!==arguments[1]&&arguments[1],c=window.simpayApp.formCount;if(e.attr("data-simpay-form-instance",c),!1===i){var l=window.simplePayForms;r=l[o=e.data("simpay-form-id")]}else r=i,o=i.id;var p=r,d=p.type,h=p.form,m=h.prices,y=h.livemode,v=h.config,g=void 0===v?{}:v,b=g.taxRates,x=void 0===b?[]:b,w=g.paymentMethods,O=void 0===w?[]:w,T=g.taxStatus,j=void 0===T?"fixed-global":T,P=f(f(f(f(f({formId:o,formInstance:c,quantity:1,isValid:!0,stripeParams:f(f({},r.stripe.strings),r.stripe.bools),prices:m},r.form.bools),r.form.integers),r.form.i18n),r.form.strings),r.form.config);e.__unstableLegacyFormData=P;var F=u.getPaymentFormType(d);_.each(F,(function(t,r){e[r]=_.isFunction(t)?_.bind(t,e,e):t})),e.id=o,e.state={isValid:!0,customAmount:!1,coupon:!1,price:_.find(m,(function(t){return!0===t.default})),paymentMethod:_.first(O),taxRates:x,taxStatus:j,paymentMethods:O,livemode:y,displayType:P.formDisplayType},e.setState=function(t){e.state=f(f({},e.state),t)},e.getFormData=function(){var t=f(f({},e.__unstableLegacyFormData),e.state),r=(t.order,t.customer,t.paymentMethods,n()(t,s));return JSON.stringify(r)};var k=r.stripe.strings,S=k.key,A=k.stripe_api_version,M=k.elementsLocale;e.stripeInstance=Stripe(S,{apiVersion:A,locale:M||"auto"}),Object(a.c)("simpaySetupPaymentForm",e),window.simpayApp.spFormData[o]=P,window.simpayApp.spFormElems[o]=e,t(document.body).trigger("simpayCoreFormVarsInitialized",[e,P]).trigger("simpayBindCoreFormEventsAndTriggers",[e,P]).trigger("simpaySetupCoreForm",[e])}window.wpsp={hooks:a.b,paymentForms:u,initPaymentForm:p},window.simpayApp=f({formCount:0,spFormElList:{},spFormData:{},spFormElems:{}},c.a),t((function(){return e=t(document.body).find(".simpay-checkout-form:not(.simpay-update-payment-method)"),window.simpayApp.spFormElList=e,void e.each((function(){window.simpayApp.formCount++,p(t(this))}));var e}))}.call(this,r(7))},function(t,e){t.exports=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n=0||(o[r]=t[r]);return o},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,r(e,n)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},,,,,,,,,function(t,e,r){"use strict";var n=r(9),o=r.n(n),i=r(5),a=r.n(i),u=r(14),c=r(8),s=r(12),l=r.n(s),f=r(13),p=r.n(f),d=r(19),h=r.n(d),m=r(16),y=r.n(m),v=r(20),g=r.n(v),b=r(10),x=r.n(b),_=r(6),w=r.n(_),O=r(2),T=r.n(O);function j(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function P(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:M,e=this.getLineItems().reduce((function(t,e){return t+e.getTotal()}),0),r=t.includeFeeRecovery?this.getFeeRecoveryForAmount(e):0;return e+r}},{key:"getTotalDueToday",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M,e=0;"exclusive"===this.taxBehavior&&this.automaticTax&&0!==this.getSubtotal()&&(e=parseInt(this.automaticTax.amount_tax||e));var r=this.getLineItems().reduce((function(t,e){return e.hasFreeTrial()?t:t+e.getTotal()}),e),n=0!==r&&t.includeFeeRecovery?this.getFeeRecoveryForAmount(r):0;return r+n}},{key:"getRecurringTotal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M,e=this.getLineItem("base"),r=e.getUnitPrice()*e.getQuantity();r=Math.round(r-this.getDiscount());var n=this.getTaxRates(),o=this.getTaxPercent("inclusive")/100,i=Math.round(r-r/(1+o)),a=Math.round(r-i),u=n.reduce((function(t,e){var r=e.percentage;return"inclusive"===e.calculation?t:t+Math.round(a*(r/100))}),0),c=Math.round(r+u),s=t.includeFeeRecovery?this.getFeeRecoveryForAmount(c):0;return c+s}},{key:"getRecurringNoDiscountTotal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M,e=this.getLineItem("base"),r=e.getUnitPrice()*e.getQuantity(),n=0;if("automatic"!==this.taxStatus&&"none"!==this.taxStatus){var o=this.getTaxRates(),i=this.getTaxPercent("inclusive")/100,a=Math.round(r-r/(1+i)),u=Math.round(r-a);n=o.reduce((function(t,e){var r=e.percentage;return"inclusive"===e.calculation?t:t+Math.round(u*(r/100))}),0)}else if("automatic"===this.taxStatus&&"exclusive"===this.taxBehavior&&this.automaticTax){var c;n=(null===(c=this.automaticTax.upcomingInvoice)||void 0===c?void 0:c.amount_tax)||0}var s=Math.round(r+n),l=t.includeFeeRecovery?this.getFeeRecoveryForAmount(s):0;return s+l}},{key:"getNextInvoiceTotal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M,e=this.getLineItem("base"),r=this.getCoupon(),n=r.percent_off,o=r.amount_off,i=r.duration,a=e.getUnitPrice()*e.getQuantity();if(r&&"once"!==i){var u=0;n?u+=Math.round(a*(n/100)):o&&(u+=o),a=Math.round(a-u)}var c=0;if("automatic"!==this.taxStatus&&"none"!==this.taxStatus){var s=this.getTaxRates(),l=this.getTaxPercent("inclusive")/100,f=Math.round(a-a/(1+l)),p=Math.round(a-f);c=s.reduce((function(t,e){var r=e.percentage;return"inclusive"===e.calculation?t:t+Math.round(p*(r/100))}),0)}else if("automatic"===this.taxStatus&&"exclusive"===this.taxBehavior&&this.automaticTax){var d;c=(null===(d=this.automaticTax.upcomingInvoice)||void 0===d?void 0:d.amount_tax)||0}var h=Math.round(a+c),m=t.includeFeeRecovery?this.getFeeRecoveryForAmount(h):0;return h+m}},{key:"getLineItem",value:function(t){var e=this.getLineItems().filter((function(e){return e.id===t}));if(0===e.length)throw{id:"invalid-line-item",message:'Unable to retrieve line item "'.concat(t,'"')};return e[0]}},{key:"addLineItem",value:function(t){var e;return e=1==t instanceof k?t:new this.LineItem(t,this),this.items.push(e),e}},{key:"hasFreeTrial",value:function(){return this.getLineItems().filter((function(t){return t.hasFreeTrial()})).length>0}},{key:"getFeeRecoveryForAmount",value:function(t){var e=this.paymentForm.state,r=e.paymentMethod,n=e.isCoveringFees;if(!r||!r.config)return 0;var o=r.config.fee_recovery;return o&&n?Math.round((t+parseInt(o.amount))/(1-parseFloat(o.percent)/100)-t):0}}]),t}();function I(t,e,r){return e=y()(e),h()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return!!t}()?Reflect.construct(e,r||[],y()(t).constructor):e.apply(t,r))}var D=function(t){function e(){return p()(this,e),I(this,e,arguments)}return g()(e,t),l()(e)}(F);var E=function(t){function e(t){var r,n,o,i;return p()(this,e),(n=this,o=e,i=[t],o=y()(o),r=h()(n,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return!!t}()?Reflect.construct(o,i||[],y()(n).constructor):o.apply(n,i))).LineItem=D,r}return g()(e,t),l()(e)}(L),C=r(15);function R(){return(R=o()(a.a.mark((function t(e){var r,n,o,i,u,c,s,l,f,p;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.error,n=e.disable,o=e.__unstableLegacyFormData,i=null,u=o.hasCustomerFields,r(""),n(),!u){t.next=13;break}return t.next=8,C.a.create({},e).catch(r);case 8:if(c=t.sent){t.next=11;break}return t.abrupt("return");case 11:s=c.customer.id,i=s;case 13:return t.next=15,C.b.create({customer_id:i,payment_method_type:o.paymentMethods?o.paymentMethods[0].id:"card"},e).catch(r);case 15:if(l=t.sent){t.next=18;break}return t.abrupt("return");case 18:if(f=l.sessionId,p=l.session.url,"stripe"!==l.redirect_type){t.next=21;break}return t.abrupt("return",e.stripeInstance.redirectToCheckout({sessionId:f}).then((function(t){return t.error&&r(t.error),t})));case 21:window.location.href=p;case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var B=window.spShared,N=B.convertToDollars,U=B.formatCurrency,q="stripe-checkout";Object(u.registerPaymentFormType)(q,{type:q,setup:function(t){var e=t.enable;(0,t.disable)(),t.cart=Object(u.__unstableUpdatePaymentFormCart)(t,new E({paymentForm:t}));var r=t.find(".simpay-payment-btn")[0];r&&(r.addEventListener("click",(function(e){e.preventDefault();var r=window.simpayApp.triggerBrowserValidation;t[0].checkValidity()?Object(c.c)("simpaySubmitPaymentForm",t):r(t)})),e())},submit:function(_x){return R.apply(this,arguments)},enable:function(t){var e=t.cart,r=t.__unstableLegacyFormData,n=r.paymentButtonText,o=r.paymentButtonTrialText;t.removeClass("simpay-checkout-form--loading");var i=t.find(".simpay-payment-btn");if(i.prop("disabled",!1).removeClass("simpay-disabled"),0===e.getTotalDueToday())i.find("span").text(o);else{var a=U(e.isZeroDecimal()?e.getTotalDueToday():N(e.getTotalDueToday()),!0,e.getCurrencySymbol(),e.isZeroDecimal()),u=''.concat(a,"");i.find("span").html(n.replace("{{amount}}",u))}},disable:function(t){var e=t.__unstableLegacyFormData.paymentButtonLoadingText;t.addClass("simpay-checkout-form--loading"),t.find(".simpay-payment-btn").prop("disabled",!0).addClass("simpay-disabled").find("span").html(e)},error:function(t,e){var r,n=t.enable,o=t.__unstableLegacyFormData,i=o.stripeErrorMessages,a=o.unknownError;if(e&&""===e)r="";else if(void 0!==e){var u=e.message,c=e.code;r=u||e,c&&i[c]&&(r=i[c])}else r=a;t.find(".simpay-errors").html(r),n()}});var G=r(11);function Z(){return(Z=o()(a.a.mark((function t(e){var r,n,o,i,u,c,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.id,n=e.setState,o=e.submit,i=e.disable,u=e.enable,c=e.error,s=e.__unstableLegacyFormData,i(),e.trigger("simpayBeforeStripePayment",[e,s]),s.isValid){t.next=6;break}return u(),t.abrupt("return");case 6:return t.prev=6,t.next=9,Object(G.a)("simple_pay_form_".concat(r,"_customer")).then((function(t){n({customerCaptchaToken:t})}));case 9:return t.next=11,Object(G.a)("simple_pay_form_".concat(r,"_payment")).then((function(t){n({paymentCaptchaToken:t})}));case 11:o(),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(6),c(t.t0);case 17:case"end":return t.stop()}}),t,null,[[6,14]])})))).apply(this,arguments)}Object(c.a)("simpaySetupPaymentForm","wpsp/paymentForm",(function(t){return(0,t.setup)()})),Object(c.a)("simpaySubmitPaymentForm","wpsp/paymentForm",(function(_x){return Z.apply(this,arguments)}))}]); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-dashboard-widget-report-css.min.asset.php b/includes/core/assets/js/simpay-admin-dashboard-widget-report-css.min.asset.php deleted file mode 100644 index de07b6ad..00000000 --- a/includes/core/assets/js/simpay-admin-dashboard-widget-report-css.min.asset.php +++ /dev/null @@ -1 +0,0 @@ - array(), 'version' => '3723c4c8f256209bc8a447dca61a65dd'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-dashboard-widget-report.min.js b/includes/core/assets/js/simpay-admin-dashboard-widget-report.min.js deleted file mode 100644 index 2ed88485..00000000 --- a/includes/core/assets/js/simpay-admin-dashboard-widget-report.min.js +++ /dev/null @@ -1,5 +0,0 @@ -!function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=82)}([function(t,e){t.exports=window.wp.element},,function(t,e){t.exports=window.wp.i18n},function(t,e){t.exports=window.wp.components},function(t,e,i){"use strict";function n(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}i.d(e,"a",(function(){return n}))},function(t,e){t.exports=window.React},function(t,e,i){var n=i(26),s=i(27),r=i(22),o=i(28);t.exports=function(t,e){return n(t)||s(t,e)||r(t,e)||o()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){"use strict";function n(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i(4);function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){Object(n.a)(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===s(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},function(t,e){t.exports=window.wp.primitives},function(t,e){t.exports=window.wp.url},function(t,e,i){var n=i(30);t.exports=function(t,e,i){return(e=n(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=window.lodash},function(t,e,i){var n;!function(){"use strict";var i={}.hasOwnProperty;function s(){for(var t=[],e=0;eArray.prototype.slice.call(t));let s=!1,r=[];return function(...i){r=n(i),s||(s=!0,l.call(window,()=>{s=!1,t.apply(e,r)}))}}const h=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function d(){}const u=function(){let t=0;return function(){return t++}}();function f(t){return null==t}function g(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function p(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const m=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function b(t,e){return m(t)?t:e}function x(t,e){return void 0===t?e:t}const y=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function v(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function _(t,e,i,n){let s,r,o;if(g(t))if(r=t.length,n)for(s=r-1;s>=0;s--)e.call(i,t[s],s);else for(s=0;si;)t=t[e.substr(i,n-i)],i=n+1,n=C(e,i);return t}function E(t){return t.charAt(0).toUpperCase()+t.slice(1)}const j=t=>void 0!==t,A=t=>"function"==typeof t,L=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},R=Math.PI,F=2*R,z=F+R,I=Number.POSITIVE_INFINITY,N=R/180,V=R/2,W=R/4,B=2*R/3,H=Math.log10,U=Math.sign;function Y(t){const e=Math.round(t);t=X(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(H(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function $(t){return!isNaN(parseFloat(t))&&isFinite(t)}function X(t,e,i){return Math.abs(t-e)l&&c=Math.min(e,i)-n&&t<=Math.max(e,i)+n}const rt=t=>0===t||1===t,ot=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*F/i),at=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*F/i)+1,lt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*V),easeOutSine:t=>Math.sin(t*V),easeInOutSine:t=>-.5*(Math.cos(R*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>rt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>rt(t)?t:ot(t,.075,.3),easeOutElastic:t=>rt(t)?t:at(t,.075,.3),easeInOutElastic(t){const e=.1125;return rt(t)?t:t<.5?.5*ot(2*t,e,.45):.5+.5*at(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-lt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*lt.easeInBounce(2*t):.5*lt.easeOutBounce(2*t-1)+.5},ct={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ht="0123456789ABCDEF",dt=t=>ht[15&t],ut=t=>ht[(240&t)>>4]+ht[15&t],ft=t=>(240&t)>>4==(15&t);function gt(t){return t+.5|0}const pt=(t,e,i)=>Math.max(Math.min(t,i),e);function mt(t){return pt(gt(2.55*t),0,255)}function bt(t){return pt(gt(255*t),0,255)}function xt(t){return pt(gt(t/2.55)/100,0,1)}function yt(t){return pt(gt(100*t),0,100)}const vt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,_t=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function wt(t,e,i){const n=e*Math.min(i,1-i),s=(e,s=(e+t/30)%12)=>i-n*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function Mt(t,e,i){const n=(n,s=(n+t/60)%6)=>i-i*e*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function Ot(t,e,i){const n=wt(t,1,.5);let s;for(e+i>1&&(s=1/(e+i),e*=s,i*=s),s=0;s<3;s++)n[s]*=1-e-i,n[s]+=e;return n}function kt(t){const e=t.r/255,i=t.g/255,n=t.b/255,s=Math.max(e,i,n),r=Math.min(e,i,n),o=(s+r)/2;let a,l,c;return s!==r&&(c=s-r,l=o>.5?c/(2-s-r):c/(s+r),a=s===e?(i-n)/c+(i=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=bt(t[3]))):(e=At(t,{r:0,g:0,b:0,a:1})).a=bt(e.a),e}function Rt(t){return"r"===t.charAt(0)?function(t){const e=vt.exec(t);let i,n,s,r=255;if(e){if(e[7]!==i){const t=+e[7];r=255&(e[8]?mt(t):255*t)}return i=+e[1],n=+e[3],s=+e[5],i=255&(e[2]?mt(i):i),n=255&(e[4]?mt(n):n),s=255&(e[6]?mt(s):s),{r:i,g:n,b:s,a:r}}}(t):function(t){const e=_t.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?mt(+e[5]):bt(+e[5]));const s=Dt(+e[2]),r=+e[3]/100,o=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return St(Ot,t,e,i)}(s,r,o):"hsv"===e[1]?function(t,e,i){return St(Mt,t,e,i)}(s,r,o):Pt(s,r,o),{r:i[0],g:i[1],b:i[2],a:n}}(t)}class Ft{constructor(t){if(t instanceof Ft)return t;const e=typeof t;let i;var n,s,r;"object"===e?i=Lt(t):"string"===e&&(r=(n=t).length,"#"===n[0]&&(4===r||5===r?s={r:255&17*ct[n[1]],g:255&17*ct[n[2]],b:255&17*ct[n[3]],a:5===r?17*ct[n[4]]:255}:7!==r&&9!==r||(s={r:ct[n[1]]<<4|ct[n[2]],g:ct[n[3]]<<4|ct[n[4]],b:ct[n[5]]<<4|ct[n[6]],a:9===r?ct[n[7]]<<4|ct[n[8]]:255})),i=s||function(t){Et||(Et=function(){const t={},e=Object.keys(Tt),i=Object.keys(Ct);let n,s,r,o,a;for(n=0;n>16&255,r>>8&255,255&r]}return t}(),Et.transparent=[0,0,0,0]);const e=Et[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||Rt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=At(this._rgb);return t&&(t.a=xt(t.a)),t}set rgb(t){this._rgb=Lt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${xt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?(t=this._rgb,e=function(t){return ft(t.r)&&ft(t.g)&&ft(t.b)&&ft(t.a)}(t)?dt:ut,t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t):this._rgb;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=kt(t),i=e[0],n=yt(e[1]),s=yt(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${s}%, ${xt(t.a)})`:`hsl(${i}, ${n}%, ${s}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,s=t.rgb;let r;const o=e===r?.5:e,a=2*o-1,l=n.a-s.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;r=1-c,n.r=255&c*n.r+r*s.r+.5,n.g=255&c*n.g+r*s.g+.5,n.b=255&c*n.b+r*s.b+.5,n.a=o*n.a+(1-o)*s.a,i.rgb=n}return i}clone(){return new Ft(this.rgb)}alpha(t){return this._rgb.a=bt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=gt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return jt(this._rgb,2,t),this}darken(t){return jt(this._rgb,2,-t),this}saturate(t){return jt(this._rgb,1,t),this}desaturate(t){return jt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=kt(t);i[0]=Dt(i[0]+e),i=Pt(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function zt(t){return new Ft(t)}const It=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Nt(t){return It(t)?t:zt(t)}function Vt(t){return It(t)?t:zt(t).saturate(.5).darken(.1).hexString()}const Wt=Object.create(null),Bt=Object.create(null);function Ht(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Vt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Vt(e.borderColor),this.hoverColor=(t,e)=>Vt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return Ut(this,t,e)}get(t){return Ht(this,t)}describe(t,e){return Ut(Bt,t,e)}override(t,e){return Ut(Wt,t,e)}route(t,e,i,n){const s=Ht(this,t),r=Ht(this,i),o="_"+e;Object.defineProperties(s,{[o]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[o],e=r[n];return p(t)?Object.assign({},e,t):x(t,e)},set(t){this[o]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function $t(t,e,i,n,s){let r=e[s];return r||(r=e[s]=t.measureText(s).width,i.push(s)),r>n&&(n=r),n}function Xt(t,e,i,n){let s=(n=n||{}).data=n.data||{},r=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(s=n.data={},r=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let o=0;const a=i.length;let l,c,h,d,u;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function Kt(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==r.strokeColor;let l,c;for(t.save(),t.font=s.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),f(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,r),l=0;lx(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of s)i[t]=+r(t)||0;return i}function ce(t){return le(t,{top:"y",right:"x",bottom:"y",left:"x"})}function he(t){return le(t,["topLeft","topRight","bottomLeft","bottomRight"])}function de(t){const e=ce(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ue(t,e){t=t||{},e=e||Yt.font;let i=x(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=x(t.style,e.style);n&&!(""+n).match(oe)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const s={family:x(t.family,e.family),lineHeight:ae(x(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:x(t.weight,e.weight),string:""};return s.string=function(t){return!t||f(t.size)||f(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(s),s}function fe(t,e,i,n){let s,r,o,a=!0;for(s=0,r=t.length;st[i]1;)n=r+s>>1,i(n)?r=n:s=n;return{lo:r,hi:s}}const me=(t,e,i)=>pe(t,i,n=>t[n][e]pe(t,i,n=>t[n][e]>=i),xe=["push","pop","shift","splice","unshift"];function ye(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,s=n.indexOf(e);-1!==s&&n.splice(s,1),n.length>0||(xe.forEach(e=>{delete t[e]}),delete t._chartjs)}function ve(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){j(n)||(n=je("_fallback",t));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:s,override:s=>_e([s,...t],e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Se(i,n,()=>function(t,e,i,n){let s;for(const r of e)if(s=je(Oe(r,t),i),j(s))return ke(t,s)?Te(i,n,t,s):s}(n,e,t,i)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ae(t).includes(e),ownKeys:t=>Ae(t),set(t,e,i){const n=t._storage||(t._storage=s());return t[e]=n[e]=i,delete t._keys,!0}})}function we(t,e,i,n){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Me(t,n),setContext:e=>we(t,e,i,n),override:s=>we(t.override(s),e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Se(t,e,()=>function(t,e,i){const{_proxy:n,_context:s,_subProxy:r,_descriptors:o}=t;let a=n[e];return A(a)&&o.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:s,_context:r,_subProxy:o,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);return a.add(t),e=e(r,o||n),a.delete(t),ke(t,e)&&(e=Te(s._scopes,s,t,e)),e}(e,a,t,i)),g(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:s,_context:r,_subProxy:o,_descriptors:a}=i;if(j(r.index)&&n(t))e=e[r.index%e.length];else if(p(e[0])){const i=e,n=s._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=Te(n,s,t,l);e.push(we(i,r,o&&o[t],a))}}return e}(e,a,t,o.isIndexable)),ke(e,a)&&(a=we(a,s,r&&r[e],o)),a}(t,e,i)),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Me(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:i,indexable:n,isScriptable:A(i)?i:()=>i,isIndexable:A(n)?n:()=>n}}const Oe=(t,e)=>t?t+E(e):e,ke=(t,e)=>p(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Se(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Pe(t,e,i){return A(t)?t(e,i):t}const De=(t,e)=>!0===t?e:"string"==typeof t?T(e,t):void 0;function Ce(t,e,i,n,s){for(const r of e){const e=De(i,r);if(e){t.add(e);const r=Pe(e._fallback,i,s);if(j(r)&&r!==i&&r!==n)return r}else if(!1===e&&j(n)&&i!==n)return null}return!1}function Te(t,e,i,n){const s=e._rootScopes,r=Pe(e._fallback,i,n),o=[...t,...s],a=new Set;a.add(n);let l=Ee(a,o,i,r||i,n);return null!==l&&(!j(r)||r===i||(l=Ee(a,o,r,l,n),null!==l))&&_e(Array.from(a),[""],s,r,()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const s=n[e];return g(s)&&p(i)?i:s}(e,i,n))}function Ee(t,e,i,n,s){for(;i;)i=Ce(t,e,i,n,s);return i}function je(t,e){for(const i of e){if(!i)continue;const e=i[t];if(j(e))return e}}function Ae(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}const Le=Number.EPSILON||1e-14,Re=(t,e)=>e"x"===t?"y":"x";function ze(t,e,i,n){const s=t.skip?e:t,r=e,o=i.skip?e:i,a=J(r,s),l=J(o,r);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:r.x-d*(o.x-s.x),y:r.y-d*(o.y-s.y)},next:{x:r.x+u*(o.x-s.x),y:r.y+u*(o.y-s.y)}}}function Ie(t,e,i){return Math.max(Math.min(t,i),e)}function Ne(t,e,i,n,s){let r,o,a,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const i=Fe(e),n=t.length,s=Array(n).fill(0),r=Array(n);let o,a,l,c=Re(t,0);for(o=0;owindow.getComputedStyle(t,null),Ue=["top","right","bottom","left"];function Ye(t,e,i){const n={};i=i?"-"+i:"";for(let s=0;s<4;s++){const r=Ue[s];n[r]=parseFloat(t[e+"-"+r+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function $e(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,s=He(i),r="border-box"===s.boxSizing,o=Ye(s,"padding"),a=Ye(s,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,s=n&&n.length?n[0]:i,{offsetX:r,offsetY:o}=s;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(r,o,i.target))a=r,l=o;else{const t=e.getBoundingClientRect();a=s.clientX-t.left,l=s.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),d=o.left+(h&&a.left),u=o.top+(h&&a.top);let{width:f,height:g}=e;return r&&(f-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/g*i.height/n)}}const Xe=t=>Math.round(10*t)/10;function qe(t,e,i){const n=e||1,s=Math.floor(t.height*n),r=Math.floor(t.width*n);t.height=s/n,t.width=r/n;const o=t.canvas;return o.style&&(i||!o.style.height&&!o.style.width)&&(o.style.height=t.height+"px",o.style.width=t.width+"px"),(t.currentDevicePixelRatio!==n||o.height!==s||o.width!==r)&&(t.currentDevicePixelRatio=n,o.height=s,o.width=r,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Ge=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Qe(t,e){const i=function(t,e){return He(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Ke(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Ze(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function Je(t,e,i,n){const s={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},o=Ke(t,s,i),a=Ke(s,r,i),l=Ke(r,e,i),c=Ke(o,a,i),h=Ke(a,l,i);return Ke(c,h,i)}const ti=new Map;function ei(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ti.get(i);return n||(n=new Intl.NumberFormat(t,e),ti.set(i,n)),n}(e,i).format(t)}function ii(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function ni(t){return"angle"===t?{between:it,compare:tt,normalize:et}:{between:st,compare:(t,e)=>t-e,normalize:t=>t}}function si({start:t,end:e,count:i,loop:n,style:s}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:s}}function ri(t,e,i){if(!i)return[t];const{property:n,start:s,end:r}=i,o=e.length,{compare:a,between:l,normalize:c}=ni(n),{start:h,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:s,end:r}=i,{between:o,normalize:a}=ni(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;cn({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(i-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=l.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const s=i.items;let r,o=s.length-1,a=!1;for(;o>=0;--o)r=s[o],r._active?(r._total>i.duration&&(i.duration=r._total),r.tick(t),a=!0):(s[o]=s[s.length-1],s.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),s.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=s.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const hi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Nt(t||"transparent"),s=n.valid&&Nt(e||"transparent");return s&&s.valid?s.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class di{constructor(t,e,i,n){const s=e[i];n=fe([t.to,n,s,t.from]);const r=fe([t.from,s,n]);this._active=!0,this._fn=t.fn||hi[t.type||typeof r],this._easing=lt[t.easing]||lt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],s=i-this._start,r=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=fe([t.to,e,n,t.from]),this._from=fe([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,s=this._from,r=this._loop,o=this._to;let a;if(this._active=s!==o&&(r||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(s,o,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),Yt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),Yt.describe("animations",{_fallback:"animation"}),Yt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class fi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!p(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const n=t[i];if(!p(n))return;const s={};for(const t of ui)s[t]=n[t];(g(n.properties)&&n.properties||[i]).forEach(t=>{t!==i&&e.has(t)||e.set(t,s)})})}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const s=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i},()=>{}),s}_createAnimations(t,e){const i=this._properties,n=[],s=t.$animations||(t.$animations={}),r=Object.keys(e),o=Date.now();let a;for(a=r.length-1;a>=0;--a){const l=r[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=s[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,o);continue}h.cancel()}d&&d.duration?(s[l]=h=new di(d,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ci.add(this._chart,i),!0):void 0}}function gi(t,e){const i=t&&t.options||{},n=i.reverse,s=void 0===i.min?e:0,r=void 0===i.max?e:0;return{start:n?r:s,end:n?s:r}}function pi(t,e){const i=[],n=t._getSortedDatasetMetas(e);let s,r;for(s=0,r=n.length;s0||!i&&e<0)return s.index}return null}function vi(t,e){const{chart:i,_cachedMeta:n}=t,s=i._stacks||(i._stacks={}),{iScale:r,vScale:o,index:a}=n,l=r.axis,c=o.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(r,o,n),d=e.length;let u;for(let t=0;ti[t].axis===e).shift()}function wi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const Mi=t=>"reset"===t||"none"===t,Oi=(t,e)=>e?t:Object.assign({},t);class ki{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=bi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&wi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=e.xAxisID=x(i.xAxisID,_i(t,"x")),r=e.yAxisID=x(i.yAxisID,_i(t,"y")),o=e.rAxisID=x(i.rAxisID,_i(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,s,r,o),c=e.vAxisID=n(a,r,s,o);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ye(this._data,this),t._stacked&&wi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(p(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,s,r;for(n=0,s=e.length;n{const e="_onData"+E(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const s=i.apply(this,t);return n._chartjs.listeners.forEach(i=>{"function"==typeof i[e]&&i[e](...t)}),s}})}))),this._syncList=[],this._data=e}var n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const s=e._stacked;e._stacked=bi(e.vScale,e),e.stack!==i.stack&&(n=!0,wi(e),e.stack=i.stack),this._resyncElements(t),(n||s!==e._stacked)&&vi(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:s,_stacked:r}=i,o=s.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=g(n[t])?this.parseArrayData(i,n,t,e):p(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const s=()=>null===l[o]||d&&l[o]t&&!e.hidden&&e._stacked&&{keys:pi(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:s}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:s?i:Number.POSITIVE_INFINITY}}(o);let d,u;function f(){u=n[d];const e=u[o.axis];return!m(u[t.axis])||c>e||h=0;--d)if(!f()){this.updateRangeFromParsed(l,t,u,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,s,r;for(n=0,s=e.length;n=0&&tthis.getContext(i,n),h);return f.$shared&&(f.$shared=a,s[r]=Object.freeze(Oi(f,a))),f}_resolveAnimations(t,e,i){const n=this.chart,s=this._cachedDataOpts,r="animation-"+e,o=s[r];if(o)return o;let a;if(!1!==n.options.animation){const n=this.chart.config,s=n.datasetAnimationScopeKeys(this._type,e),r=n.getOptionScopes(this.getDataset(),s);a=n.createResolver(r,this.getContext(t,i,e))}const l=new fi(n,a&&a.animations);return a&&a._cacheable&&(s[r]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Mi(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){Mi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Mi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const s=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,s=e.length,r=Math.min(s,n);r&&this.parse(0,r),s>n?this._insertElements(n,s-n,t):s{for(t.length+=e,o=t.length-1;o>=r;o--)t[o]=t[o-e]};for(a(s),o=t;ot-e))}return t._cache.$bar}(e,t.type);let n,s,r,o,a=e._length;const l=()=>{32767!==r&&-32768!==r&&(j(o)&&(a=Math.min(a,Math.abs(r-o)||a)),o=r)};for(n=0,s=i.length;nMath.abs(a)&&(l=a,c=o),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:r,min:o,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Di(t,e,i,n){const s=t.iScale,r=t.vScale,o=s.getLabels(),a=s===r,l=[];let c,h,d,u;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,r)*s,d===r&&(m-=h/2),c=m+h),m===e.getPixelForValue(r)){const t=U(h)*e.getLineWidthForValue(r)/2;m+=t,h-=t}return{size:h,base:m,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,s=n.skipNull,r=x(n.maxBarThickness,1/0);let o,a;if(e.grouped){const i=s?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const s=e.pixels,r=s[t];let o=t>0?s[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,s=this.getParsed(t),r=i.getLabelForValue(s.x),o=n.getLabelForValue(s.y),a=s._custom;return{label:e.label,value:"("+r+", "+o+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:r,vScale:o}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=r.axis,d=o.axis;for(let a=e;a""}}}};class Fi extends ki{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let s,r,o=t=>+i[t];if(p(i[t])){const{key:t="value"}=this._parsing;o=e=>+T(i[e],t)}for(s=t,r=t+e;sit(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),g=(t,e,n)=>it(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),p=f(0,c,d),m=f(V,h,u),b=g(R,c,d),x=g(R+V,h,u);n=(p-b)/2,s=(m-x)/2,r=-(p+b)/2,o=-(m+x)/2}return{ratioX:n,ratioY:s,offsetX:r,offsetY:o}}(u,d,a),b=(i.width-r)/f,x=(i.height-r)/g,v=Math.max(Math.min(b,x)/2,0),_=y(this.options.radius,v),w=(_-Math.max(_*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*_,this.offsetY=m*_,n.total=this.calculateTotal(),this.outerRadius=_-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*h,0),this.updateElements(s,0,s.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,s=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*s/F)}updateElements(t,e,i,n){const s="reset"===n,r=this.chart,o=r.chartArea,a=r.options.animation,l=(o.left+o.right)/2,c=(o.top+o.bottom)/2,h=s&&a.animateScale,d=h?0:this.innerRadius,u=h?0:this.outerRadius,f=this.resolveDataElementOptions(e,n),g=this.getSharedOptions(f),p=this.includeOptions(n,g);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?F*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],s=ei(e._parsed[t],i.options.locale);return{label:n[t]||"",value:s}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,s,r,o,a;if(!t)for(n=0,s=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Fi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,n)=>{const s=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return g(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class zi extends ki{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:s}=e,r=this.chart._animationsDisabled;let{start:o,count:a}=function(t,e,i){const n=e.length;let s=0,r=n;if(t._sorted){const{iScale:o,_parsed:a}=t,l=o.axis,{min:c,max:h,minDefined:d,maxDefined:u}=o.getUserBounds();d&&(s=nt(Math.min(me(a,o.axis,c).lo,i?n:me(e,l,o.getPixelForValue(c)).lo),0,n-1)),r=u?nt(Math.max(me(a,o.axis,h).hi+1,i?0:me(e,l,o.getPixelForValue(h)).hi+1),s,n)-s:n-s}return{start:s,count:r}}(e,n,r);this._drawStart=o,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,s={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=s,!0;const r=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,s),r}(e)&&(o=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!s._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!r,options:l},t),this.updateElements(n,o,a,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:r,vScale:o,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),d=this.includeOptions(n,h),u=r.axis,g=o.axis,{spanGaps:p,segment:m}=this.options,b=$(p)?p:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||s||"none"===n;let y=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[u]-y[u]>b,m&&(p.parsed=i,p.raw=l.data[c]),d&&(p.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),x||this.updateElement(e,c,p,n),y=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}zi.id="line",zi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},zi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Ii extends ki{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],s=ei(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:s}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),s=Math.max(n/2,0),r=(s-Math.max(i.cutoutPercentage?s/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=s-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,i,n){const s="reset"===n,r=this.chart,o=this.getDataset(),a=r.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,d=l.getIndexAngle(0)-.5*R;let u,f=d;const g=360/this.countVisibleElements();for(u=0;u{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++}),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?G(this.resolveDataElementOptions(t,e).angle||i):0}}Ii.id="polarArea",Ii.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Ii.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,n)=>{const s=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Ni extends Fi{}Ni.id="pie",Ni.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Vi extends ki{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],s=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const r={_loop:!0,_fullLoop:s.length===n.length,options:e};this.updateElement(i,void 0,r,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const s=this.getDataset(),r=this._cachedMeta.rScale,o="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};class Hi{constructor(t){this.options=t||{}}formats(){return Bi()}parse(t,e){return Bi()}format(t,e){return Bi()}add(t,e,i){return Bi()}diff(t,e,i){return Bi()}startOf(t,e,i){return Bi()}endOf(t,e){return Bi()}}Hi.override=function(t){Object.assign(Hi.prototype,t)};var Ui={_date:Hi};function Yi(t,e){return"native"in t?{x:t.x,y:t.y}:$e(t,e)}function $i(t,e,i,n){const{controller:s,data:r,_sorted:o}=t,a=s._cachedMeta.iScale;if(a&&e===a.axis&&"r"!==e&&o&&r.length){const t=a._reversePixels?be:me;if(!n)return t(r,e,i);if(s._sharedOptions){const n=r[0],s="function"==typeof n.getRange&&n.getRange(e);if(s){const n=t(r,e,i-s),o=t(r,e,i+s);return{lo:n.lo,hi:o.hi}}}}return{lo:0,hi:r.length-1}}function Xi(t,e,i,n,s){const r=t.getSortedVisibleDatasetMetas(),o=i[e];for(let t=0,i=r.length;t{t[a](s[o],n)&&r.push({element:t,datasetIndex:e,index:i}),t.inRange(s.x,s.y,n)&&(l=!0)}),i.intersect&&!l?[]:r}var Ki={modes:{index(t,e,i,n){const s=Yi(e,t),r=i.axis||"x",o=i.intersect?qi(t,s,r,n):Gi(t,s,r,!1,n),a=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=o[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})}),a):[]},dataset(t,e,i,n){const s=Yi(e,t),r=i.axis||"xy";let o=i.intersect?qi(t,s,r,n):Gi(t,s,r,!1,n);if(o.length>0){const e=o[0].datasetIndex,i=t.getDatasetMeta(e).data;o=[];for(let t=0;tqi(t,Yi(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>Gi(t,Yi(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>Qi(t,e,{axis:"x",intersect:i.intersect},n),y:(t,e,i,n)=>Qi(t,e,{axis:"y",intersect:i.intersect},n)}};const Zi=["left","top","right","bottom"];function Ji(t,e){return t.filter(t=>t.pos===e)}function tn(t,e){return t.filter(t=>-1===Zi.indexOf(t.pos)&&t.box.axis===e)}function en(t,e){return t.sort((t,i)=>{const n=e?i:t,s=e?t:i;return n.weight===s.weight?n.index-s.index:n.weight-s.weight})}function nn(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function sn(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function rn(t,e,i,n){const{pos:s,box:r}=i,o=t.maxPadding;if(!p(s)){i.size&&(t[s]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?r.height:r.width),i.size=e.size/e.count,t[s]+=i.size}r.getPadding&&sn(o,r.getPadding());const a=Math.max(0,e.outerWidth-nn(o,t,"left","right")),l=Math.max(0,e.outerHeight-nn(o,t,"top","bottom")),c=a!==t.w,h=l!==t.h;return t.w=a,t.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function on(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{n[t]=Math.max(e[t],i[t])}),n}(t?["left","right"]:["top","bottom"])}function an(t,e,i,n){const s=[];let r,o,a,l,c,h;for(r=0,o=t.length,c=0;rt.box.fullSize),!0),n=en(Ji(e,"left"),!0),s=en(Ji(e,"right")),r=en(Ji(e,"top"),!0),o=en(Ji(e,"bottom")),a=tn(e,"x"),l=tn(e,"y");return{fullSize:i,leftAndTop:n.concat(r),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:Ji(e,"chartArea"),vertical:n.concat(s).concat(l),horizontal:r.concat(o).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;_(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const h=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:s,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/h,hBoxMaxHeight:o/2}),u=Object.assign({},s);sn(u,de(n));const f=Object.assign({maxPadding:u,w:r,h:o,x:s.left,y:s.top},s),g=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:s}=i;if(!t||!Zi.includes(n))continue;const r=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=s}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:s}=e;let r,o,a;for(r=0,o=t.length;r{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class dn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class un extends dn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const fn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},gn=t=>null===t||""===t,pn=!!Ge&&{passive:!0};function mn(t,e,i){t.canvas.removeEventListener(e,i,pn)}function bn(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function xn(t,e,i){const n=t.canvas,s=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||bn(i.addedNodes,n),e=e&&!bn(i.removedNodes,n);e&&i()});return s.observe(document,{childList:!0,subtree:!0}),s}function yn(t,e,i){const n=t.canvas,s=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||bn(i.removedNodes,n),e=e&&!bn(i.addedNodes,n);e&&i()});return s.observe(document,{childList:!0,subtree:!0}),s}const vn=new Map;let wn=0;function Mn(){const t=window.devicePixelRatio;t!==wn&&(wn=t,vn.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function On(t,e,i){const n=t.canvas,s=n&&We(n);if(!s)return;const r=c((t,e)=>{const n=s.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||r(i,n)});return o.observe(s),function(t,e){vn.size||window.addEventListener("resize",Mn),vn.set(t,e)}(t,r),o}function kn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){vn.delete(t),vn.size||window.removeEventListener("resize",Mn)}(t)}function Sn(t,e,i){const n=t.canvas,s=c(e=>{null!==t.ctx&&i(function(t,e){const i=fn[t.type]||t.type,{x:n,y:s}=$e(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==s?s:null}}(e,t))},t,t=>{const e=t[0];return[e,e.offsetX,e.offsetY]});return function(t,e,i){t.addEventListener(e,i,pn)}(n,e,s),s}class Pn extends dn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),s=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:s,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",gn(s)){const e=Qe(t,"width");void 0!==e&&(t.width=e)}if(gn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Qe(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach(t=>{const n=i[t];f(n)?e.removeAttribute(t):e.setAttribute(t,n)});const n=i.style||{};return Object.keys(n).forEach(t=>{e.style[t]=n[t]}),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),s={attach:xn,detach:yn,resize:On}[e]||Sn;n[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:kn,detach:kn,resize:kn}[e]||mn)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return function(t,e,i,n){const s=He(t),r=Ye(s,"margin"),o=Be(s.maxWidth,t,"clientWidth")||I,a=Be(s.maxHeight,t,"clientHeight")||I,l=function(t,e,i){let n,s;if(void 0===e||void 0===i){const r=We(t);if(r){const t=r.getBoundingClientRect(),o=He(r),a=Ye(o,"border","width"),l=Ye(o,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Be(o.maxWidth,r,"clientWidth"),s=Be(o.maxHeight,r,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||I,maxHeight:s||I}}(t,e,i);let{width:c,height:h}=l;if("content-box"===s.boxSizing){const t=Ye(s,"border","width"),e=Ye(s,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-r.width),h=Math.max(0,n?Math.floor(c/n):h-r.height),c=Xe(Math.min(c,o,l.maxWidth)),h=Xe(Math.min(h,a,l.maxHeight)),c&&!h&&(h=Xe(c/2)),{width:c,height:h}}(t,e,i,n)}isAttached(t){const e=We(t);return!(!e||!e.isConnected)}}class Dn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return $(this.x)&&$(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),n}}Dn.defaults={},Dn.defaultRoutes=void 0;const Cn={values:t=>g(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let s,r=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),r=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const o=H(Math.abs(r)),a=Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),ei(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(H(t)));return 1===n||2===n||5===n?Cn.numeric.call(this,t,e,i):""}};var Tn={formatters:Cn};function En(t,e,i,n,s){const r=x(n,0),o=Math.min(x(s,t.length),t.length);let a,l,c,h=0;for(i=Math.ceil(i),s&&(a=s-n,i=a/Math.floor(a/i)),c=r;c<0;)h++,c=Math.round(r+h*i);for(l=Math.max(r,0);le.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Tn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),Yt.route("scale.ticks","color","","color"),Yt.route("scale.grid","color","","borderColor"),Yt.route("scale.grid","borderColor","","borderColor"),Yt.route("scale.title","color","","color"),Yt.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),Yt.describe("scales",{_fallback:"scale"}),Yt.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const jn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function An(t,e){const i=[],n=t.length/e,s=t.length;let r=0;for(;ro+1e-6)))return l}function Rn(t){return t.drawTicks?t.tickLength:0}function Fn(t,e){if(!t.display)return 0;const i=ue(t.font,e),n=de(t.padding);return(g(t.text)?t.text.length:1)*i.lineHeight+n.height}function zn(t,e,i){let n=(t=>"start"===t?"left":"end"===t?"right":"center")(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class In extends Dn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=b(t,Number.POSITIVE_INFINITY),e=b(e,Number.NEGATIVE_INFINITY),i=b(i,Number.POSITIVE_INFINITY),n=b(n,Number.NEGATIVE_INFINITY),{min:b(t,i),max:b(e,n),minDefined:m(t),maxDefined:m(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:s,maxDefined:r}=this.getUserBounds();if(s&&r)return{min:i,max:n};const o=this.getMatchingVisibleMetas();for(let a=0,l=o.length;an?n:i,n=s&&i>n?i:n,{min:b(i,b(n,i)),max:b(n,b(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){v(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:s,ticks:r}=this.options,o=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:s}=t,r=y(e,(s-n)/2),o=(t,e)=>i&&0===t?0:t+e;return{min:o(n,-Math.abs(r)),max:o(s,r)}}(this,s,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=on)return function(t,e,i,n){let s,r=0,o=i[0];for(n=Math.ceil(n),s=0;st-e).pop(),e}(n);for(let t=0,e=r.length-1;ts)return e}return Math.max(s,1)}(s,e,n);if(r>0){let t,i;const n=r>1?Math.round((a-o)/(r-1)):null;for(En(e,l,c,f(n)?0:o-n,o),t=0,i=r-1;t=s||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,d=c.highest.height,u=nt(this.chart.width-h,0,this.maxWidth);r=t.offset?this.maxWidth/i:u/(i-1),h+6>r&&(r=u/(i-(t.offset?.5:1)),o=this.maxHeight-Rn(t.grid)-e.padding-Fn(t.title,this.chart.options.font),a=Math.sqrt(h*h+d*d),l=Q(Math.min(Math.asin(nt((c.highest.height+6)/r,-1,1)),Math.asin(nt(o/a,-1,1))-Math.asin(nt(d/a,-1,1)))),l=Math.max(n,Math.min(s,l))),this.labelRotation=l}afterCalculateLabelRotation(){v(this.options.afterCalculateLabelRotation,[this])}beforeFit(){v(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:s}}=this,r=this._isVisible(),o=this.isHorizontal();if(r){const r=Fn(n,e.options.font);if(o?(t.width=this.maxWidth,t.height=Rn(s)+r):(t.height=this.maxHeight,t.width=Rn(s)+r),i.display&&this.ticks.length){const{first:e,last:n,widest:s,highest:r}=this._getLabelSizes(),a=2*i.padding,l=G(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(o){const e=i.mirror?0:h*s.width+c*r.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*s.width+h*r.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:s,padding:r},position:o}=this.options,a=0!==this.labelRotation,l="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;a?l?(h=n*t.width,d=i*e.height):(h=i*t.height,d=n*e.width):"start"===s?d=e.width:"end"===s?h=t.width:(h=t.width/2,d=e.width/2),this.paddingLeft=Math.max((h-o+r)*this.width/(this.width-o),0),this.paddingRight=Math.max((d-c+r)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),this.paddingTop=i+r,this.paddingBottom=n+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){v(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let s;if(n>e){for(s=0;s({width:s[t]||0,height:r[t]||0});return{first:O(0),last:O(e-1),widest:O(w),highest:O(M),widths:s,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return nt(this._alignToPixels?qt(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&to*n?o/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:s,position:r}=n,o=s.offset,a=this.isHorizontal(),l=this.ticks.length+(o?1:0),c=Rn(s),h=[],d=s.setContext(this.getContext()),u=d.drawBorder?d.borderWidth:0,f=u/2,g=function(t){return qt(i,t,u)};let m,b,y,v,_,w,M,O,k,S,P,D;if("top"===r)m=g(this.bottom),w=this.bottom-c,O=m-f,S=g(t.top)+f,D=t.bottom;else if("bottom"===r)m=g(this.top),S=t.top,D=g(t.bottom)-f,w=m+f,O=this.top+c;else if("left"===r)m=g(this.right),_=this.right-c,M=m-f,k=g(t.left)+f,P=t.right;else if("right"===r)m=g(this.left),k=t.left,P=g(t.right)-f,_=m+f,M=this.left+c;else if("x"===e){if("center"===r)m=g((t.top+t.bottom)/2+.5);else if(p(r)){const t=Object.keys(r)[0],e=r[t];m=g(this.chart.scales[t].getPixelForValue(e))}S=t.top,D=t.bottom,w=m+f,O=w+c}else if("y"===e){if("center"===r)m=g((t.left+t.right)/2);else if(p(r)){const t=Object.keys(r)[0],e=r[t];m=g(this.chart.scales[t].getPixelForValue(e))}_=m-f,M=_-c,k=t.left,P=t.right}const C=x(n.ticks.maxTicksLimit,l),T=Math.max(1,Math.ceil(l/C));for(b=0;be.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,r;const o=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(s=0,r=n.length;s{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let s,r;for(s=0,r=e.length;s{const n=i.split("."),s=n.pop(),r=[t].concat(n).join("."),o=e[i].split("."),a=o.pop(),l=o.join(".");Yt.route(r,s,l,a)})}(e,t.defaultRoutes),t.descriptors&&Yt.describe(e,t.descriptors)}(t,r,i),this.override&&Yt.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in Yt[n]&&(delete Yt[n][i],this.override&&delete Wt[i])}}var Vn=new class{constructor(){this.controllers=new Nn(ki,"datasets",!0),this.elements=new Nn(Dn,"elements"),this.plugins=new Nn(Object,"plugins"),this.scales=new Nn(In,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):_(e,e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)})})}_exec(t,e,i){const n=E(t);v(i["before"+n],[],i),e[t](i),v(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Bn(t,e){return e||!1!==t?!0===t?{}:t:null}function Hn(t,e,i,n){const s=t.pluginScopeKeys(e),r=t.getOptionScopes(i,s);return t.createResolver(r,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Un(t,e){const i=Yt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Yn(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function $n(t){const e=t.options||(t.options={});e.plugins=x(e.plugins,{}),e.scales=function(t,e){const i=Wt[t.type]||{scales:{}},n=e.scales||{},s=Un(t.type,e),r=Object.create(null),o=Object.create(null);return Object.keys(n).forEach(t=>{const e=n[t];if(!p(e))return console.error("Invalid scale configuration for scale: "+t);if(e._proxy)return console.warn("Ignoring resolver passed as options for scale: "+t);const a=Yn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,s),c=i.scales||{};r[a]=r[a]||t,o[t]=P(Object.create(null),[{axis:a},e,c[a],c[l]])}),t.data.datasets.forEach(i=>{const s=i.type||t.type,a=i.indexAxis||Un(s,e),l=(Wt[s]||{}).scales||{};Object.keys(l).forEach(t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),s=i[e+"AxisID"]||r[e]||e;o[s]=o[s]||Object.create(null),P(o[s],[{axis:e},n[s],l[t]])})}),Object.keys(o).forEach(t=>{const e=o[t];P(e,[Yt.scales[e.type],Yt.scale])}),o}(t,e)}function Xn(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const qn=new Map,Gn=new Set;function Qn(t,e){let i=qn.get(t);return i||(i=e(),qn.set(t,i),Gn.add(i)),i}const Kn=(t,e,i)=>{const n=T(e,i);void 0!==n&&t.add(n)};class Zn{constructor(t){this._config=function(t){return(t=t||{}).data=Xn(t.data),$n(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Xn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),$n(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Qn(t,()=>[["datasets."+t,""]])}datasetAnimationScopeKeys(t,e){return Qn(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,"transitions."+e],["datasets."+t,""]])}datasetElementScopeKeys(t,e){return Qn(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,"datasets."+t,"elements."+e,""]])}pluginScopeKeys(t){const e=t.id;return Qn(`${this.type}-plugin-${e}`,()=>[["plugins."+e,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:s}=this,r=this._cachedScopes(t,i),o=r.get(e);if(o)return o;const a=new Set;e.forEach(e=>{t&&(a.add(t),e.forEach(e=>Kn(a,t,e))),e.forEach(t=>Kn(a,n,t)),e.forEach(t=>Kn(a,Wt[s]||{},t)),e.forEach(t=>Kn(a,Yt,t)),e.forEach(t=>Kn(a,Bt,t))});const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),Gn.has(e)&&r.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Wt[e]||{},Yt.datasets[e]||{},{type:e},Yt,Bt]}resolveNamedOptions(t,e,i,n=[""]){const s={$shared:!0},{resolver:r,subPrefixes:o}=Jn(this._resolverCache,t,n);let a=r;(function(t,e){const{isScriptable:i,isIndexable:n}=Me(t);for(const s of e){const e=i(s),r=n(s),o=(r||e)&&t[s];if(e&&(A(o)||ts(o))||r&&g(o))return!0}return!1})(r,e)&&(s.$shared=!1,a=we(r,i=A(i)?i():i,this.createResolver(t,i,o)));for(const t of e)s[t]=a[t];return s}createResolver(t,e,i=[""],n){const{resolver:s}=Jn(this._resolverCache,t,i);return p(e)?we(s,e,void 0,n):s}}function Jn(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const s=i.join();let r=n.get(s);return r||(r={resolver:_e(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},n.set(s,r)),r}const ts=t=>p(t)&&Object.getOwnPropertyNames(t).reduce((e,i)=>e||A(t[i]),!1),es=["top","bottom","left","right","chartArea"];function is(t,e){return"top"===t||"bottom"===t||-1===es.indexOf(t)&&"x"===e}function ns(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function ss(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),v(i&&i.onComplete,[t],e)}function rs(t){const e=t.chart,i=e.options.animation;v(i&&i.onProgress,[t],e)}function os(t){return Ve()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const as={},ls=t=>{const e=os(t);return Object.values(as).filter(t=>t.canvas===e).pop()};function cs(t,e,i){const n=Object.keys(t);for(const s of n){const n=+s;if(n>=e){const r=t[s];delete t[s],(i>0||n>e)&&(t[n+i]=r)}}}class hs{constructor(t,e){const i=this.config=new Zn(e),n=os(t),s=ls(n);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas can be reused.");const r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ve()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?un:Pn}(n)),this.platform.updateConfig(i);const o=this.platform.acquireContext(n,r.aspectRatio),a=o&&o.canvas,l=a&&a.height,c=a&&a.width;this.id=u(),this.ctx=o,this.canvas=a,this.width=c,this.height=l,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Wn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}(t=>this.update(t),r.resizeDelay||0),this._dataChanges=[],as[this.id]=this,o&&a?(ci.listen(this,"complete",ss),ci.listen(this,"progress",rs),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:s}=this;return f(t)?e&&s?s:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():qe(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Gt(this.canvas,this.ctx),this}stop(){return ci.stop(this),this}resize(t,e){ci.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(n,t,e,s),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,qe(this,o,!0)&&(this.notifyPlugins("resize",{size:r}),v(i.onResize,[this,r],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){_(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{});let s=[];e&&(s=s.concat(Object.keys(e).map(t=>{const i=e[t],n=Yn(t,i),s="r"===n,r="x"===n;return{options:i,dposition:s?"chartArea":r?"bottom":"left",dtype:s?"radialLinear":r?"category":"linear"}}))),_(s,e=>{const s=e.options,r=s.id,o=Yn(r,s),a=x(s.type,e.dtype);void 0!==s.position&&is(s.position,o)===is(e.dposition)||(s.position=e.dposition),n[r]=!0;let l=null;r in i&&i[r].type===a?l=i[r]:(l=new(Vn.getScale(a))({id:r,type:a,ctx:this.ctx,chart:this}),i[l.id]=l),l.init(s,t)}),_(n,(t,e)=>{t||delete i[e]}),_(i,t=>{hn.configure(this,t,t.options),hn.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let t=0,e=this.data.datasets.length;t{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ns("z","_idx"));const{_active:o,_lastEvent:a}=this;a?this._eventHandler(a,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){_(this.scales,t=>{hn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);L(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:s}of e)cs(t,n,"_removeElements"===i?-s:s)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),n=i(0);for(let t=1;tt.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;hn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],_(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,s=this.chartArea,r={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",r)&&(n&&Zt(e,{left:!1===i.left?0:s.left-i.left,right:!1===i.right?this.width:s.right+i.right,top:!1===i.top?0:s.top-i.top,bottom:!1===i.bottom?this.height:s.bottom+i.bottom}),t.controller.draw(),n&&Jt(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}getElementsAtEventForMode(t,e,i,n){const s=Ki.modes[e];return"function"==typeof s?s(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(t=>t&&t._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=ge(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",s=this.getDatasetMeta(t),r=s.controller._resolveAnimations(void 0,n);j(e)?(s.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(s,{visible:i}),this.update(e=>e.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ci.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};_(this.options.events,t=>i(t,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},s=(t,e)=>{this.canvas&&this.resize(t,e)};let r;const o=()=>{n("attach",o),this.attached=!0,this.resize(),i("resize",s),i("detach",r)};r=()=>{this.attached=!1,n("resize",s),this._stop(),this._resize(0,0),i("attach",o)},e.isAttached(this.canvas)?o():r()}unbindEvents(){_(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},_(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let s,r,o,a;for("dataset"===e&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+n+"DatasetHoverStyle"]()),o=0,a=t.length;o{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}});!w(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,s=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),r=s(e,t),o=i?t:s(t,e);r.length&&this.updateHoverStyle(r,n.mode,!1),o.length&&n.mode&&this.updateHoverStyle(o,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:Kt(t,this.chartArea,this._minPadding)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const s=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(s||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:s}=this,r=e,o=this._getActiveElements(t,n,i,r),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,a);i&&(this._lastEvent=null,v(s.onHover,[t,o,this],this),a&&v(s.onClick,[t,o,this],this));const c=!w(o,n);return(c||e)&&(this._active=o,this._updateHoverStyles(o,n,e)),this._lastEvent=l,c}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,n)}}const ds=()=>_(hs.instances,t=>t._plugins.invalidate());function us(t,e,i){const{startAngle:n,pixelMargin:s,x:r,y:o,outerRadius:a,innerRadius:l}=e;let c=s/a;t.beginPath(),t.arc(r,o,a,n-c,i+c),l>s?(c=s/l,t.arc(r,o,l,i+c,n-c,!0)):t.arc(r,o,s,i+V,n-V),t.closePath(),t.clip()}function fs(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function gs(t,e,i,n,s){const{x:r,y:o,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),d=c>0?c+n+i+l:0;let u=0;const f=s-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;u=(f-(0!==t?f*t/(t+n):f))/2}const g=(f-Math.max(.001,f*h-i/R)/h)/2,p=a+g+u,m=s-g-u,{outerStart:b,outerEnd:x,innerStart:y,innerEnd:v}=function(t,e,i,n){const s=le(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),r=(i-e)/2,o=Math.min(r,n*e/2),a=t=>{const e=(i-Math.min(r,t))*n/2;return nt(t,0,Math.min(r,e))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:nt(s.innerStart,0,o),innerEnd:nt(s.innerEnd,0,o)}}(e,d,h,m-p),_=h-b,w=h-x,M=p+b/_,O=m-x/w,k=d+y,S=d+v,P=p+y/k,D=m-v/S;if(t.beginPath(),t.arc(r,o,h,M,O),x>0){const e=fs(w,O,r,o);t.arc(e.x,e.y,x,O,m+V)}const C=fs(S,m,r,o);if(t.lineTo(C.x,C.y),v>0){const e=fs(S,D,r,o);t.arc(e.x,e.y,v,m+V,D+Math.PI)}if(t.arc(r,o,d,m-v/d,p+y/d,!0),y>0){const e=fs(k,P,r,o);t.arc(e.x,e.y,y,P+Math.PI,p-V)}const T=fs(_,p,r,o);if(t.lineTo(T.x,T.y),b>0){const e=fs(_,M,r,o);t.arc(e.x,e.y,b,p-V,M)}t.closePath()}Object.defineProperties(hs,{defaults:{enumerable:!0,value:Yt},instances:{enumerable:!0,value:as},overrides:{enumerable:!0,value:Wt},registry:{enumerable:!0,value:Vn},version:{enumerable:!0,value:"3.7.1"},getChart:{enumerable:!0,value:ls},register:{enumerable:!0,value:(...t)=>{Vn.add(...t),ds()}},unregister:{enumerable:!0,value:(...t)=>{Vn.remove(...t),ds()}}});class ps extends Dn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:s,distance:r}=Z(n,{x:t,y:e}),{startAngle:o,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2,u=x(h,a-o)>=F||it(s,o,a),f=st(r,l+d,c+d);return u&&f}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:s,innerRadius:r,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+s)/2,h=(r+o+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,s=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>F?Math.floor(i/F):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let r=0;if(n){r=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*r,Math.sin(e)*r),this.circumference>=R&&(r=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const o=function(t,e,i,n){const{fullCircles:s,startAngle:r,circumference:o}=e;let a=e.endAngle;if(s){gs(t,e,i,n,r+F);for(let e=0;ea&&r>a;return{count:n,start:l,loop:e.loop,ilen:c(o+(c?a-t:t))%r,y=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=s[x(0)],t.moveTo(d.x,d.y)),h=0;h<=a;++h){if(d=s[x(h)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(ig&&(g=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),u=n,b=0,f=g=i),p=i}y()}function _s(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?ys:vs}ps.id="arc",ps.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},ps.defaultRoutes={backgroundColor:"backgroundColor"};const ws="function"==typeof Path2D;class Ms extends Dn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ne(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,s=i.length;if(!s)return[];const r=!!t._loop,{start:o,end:a}=function(t,e,i,n){let s=0,r=e-1;if(i&&!n)for(;ss&&t[r%e].skip;)r--;return r%=e,{start:s,end:r}}(i,s,r,n);return function(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const s=t._chart.getContext(),r=ai(t.options),{_datasetIndex:o,options:{spanGaps:a}}=t,l=i.length,c=[];let h=r,d=e[0].start,u=d;function f(t,e,n,s){const r=a?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=r;for(;i[e%l].skip;)e+=r;t%l!=e%l&&(c.push({start:t%l,end:e%l,loop:n,style:s}),h=s,d=e%l)}}for(const t of e){d=a?d:t.start;let e,r=i[d%l];for(u=d+1;u<=t.end;u++){const a=i[u%l];e=ai(n.setContext(ge(s,{type:"segment",p0:r,p1:a,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:o}))),li(e,h)&&f(d,u-1,t.loop,h),r=a,h=e}d"borderDash"!==t&&"fill"!==t};class ks extends Dn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:s,y:r}=this.getProps(["x","y"],i);return Math.pow(t-s,2)+Math.pow(e-r,2)=i)&&s):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}Es.id="bar",Es.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Es.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class As{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:s,radius:r}=this;return e=e||{start:0,end:F},t.arc(n,s,r,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,s=t.angle;return{x:e+Math.cos(s)*n,y:i+Math.sin(s)*n,angle:s}}}function Ls(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Rs(t,e,i){const n=[];for(let s=0;s{e=Ls(t,e,s);const o=s[t],a=s[e];null!==n?(r.push({x:o.x,y:n}),r.push({x:a.x,y:n})):null!==i&&(r.push({x:i,y:o.y}),r.push({x:i,y:a.y}))}),r}(t,e),i.length?new Ms({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Ns(t,e,i){let n=t[e].fill;const s=[e];let r;if(!i)return n;for(;!1!==n&&-1===s.indexOf(n);){if(!m(n))return n;if(r=t[n],!r)return!1;if(r.visible)return n;s.push(n),n=r.fill}return!1}function Vs(t,e,i){const{segments:n,points:s}=e;let r=!0,o=!1;t.beginPath();for(const a of n){const{start:n,end:l}=a,c=s[n],h=s[Ls(n,l,s)];r?(t.moveTo(c.x,c.y),r=!1):(t.lineTo(c.x,i),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,a,{move:o}),o?t.closePath():t.lineTo(h.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function Ws(t,e,i,n){if(n)return;let s=e[t],r=i[t];return"angle"===t&&(s=et(s),r=et(r)),{property:t,start:s,end:r}}function Bs(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Hs(t,e,i){const{top:n,bottom:s}=e.chart.chartArea,{property:r,start:o,end:a}=i||{};"x"===r&&(t.beginPath(),t.rect(o,n,a-o,s-n),t.clip())}function Us(t,e,i,n){const s=e.interpolate(i,n);s&&t.lineTo(s.x,s.y)}function Ys(t,e){const{line:i,target:n,property:s,color:r,scale:o}=e,a=function(t,e,i){const n=t.segments,s=t.points,r=e.points,o=[];for(const t of n){let{start:n,end:a}=t;a=Ls(n,a,s);const l=Ws(i,s[n],s[a],t.loop);if(!e.segments){o.push({source:t,target:l,start:s[n],end:s[a]});continue}const c=oi(e,l);for(const e of c){const n=Ws(i,r[e.start],r[e.end],e.loop),a=ri(t,s,n);for(const t of a)o.push({source:t,target:e,start:{[i]:Bs(l,n,"start",Math.max)},end:{[i]:Bs(l,n,"end",Math.min)}})}}return o}(i,n,s);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=r}={}}=e,d=!0!==n;t.save(),t.fillStyle=a,Hs(t,o,d&&Ws(s,c,h)),t.beginPath();const u=!!i.pathSegment(t,e);let f;if(d){u?t.closePath():Us(t,n,h,s);const e=!!n.pathSegment(t,l,{move:u,reverse:!0});f=u&&e,f||Us(t,n,c,s)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function $s(t,e,i){const n=zs(e),{line:s,scale:r,axis:o}=e,a=s.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:d=c}=l||{};n&&s.points.length&&(Zt(t,i),function(t,e){const{line:i,target:n,above:s,below:r,area:o,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&r!==s&&(Vs(t,n,o.top),Ys(t,{line:i,target:n,color:s,scale:a,property:l}),t.restore(),t.save(),Vs(t,n,o.bottom)),Ys(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore()}(t,{line:s,target:n,above:h,below:d,area:i,scale:r,axis:o}),Jt(t))}var Xs={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,s=[];let r,o,a,l;for(o=0;o=0;--e){const i=s[e].$filler;i&&(i.line.updateControlPoints(r,i.axis),n&&$s(t.ctx,i,r))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&$s(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&$s(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};new WeakMap;const qs={average(t){if(!t.length)return!1;let e,i,n=0,s=0,r=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Ks(t,e){const{element:i,datasetIndex:n,index:s}=e,r=t.getDatasetMeta(n).controller,{label:o,value:a}=r.getLabelAndValue(s);return{chart:t,label:o,parsed:r.getParsed(s),raw:t.data.datasets[n].data[s],formattedValue:a,dataset:r.getDataset(),dataIndex:s,datasetIndex:n,element:i}}function Zs(t,e){const i=t.chart.ctx,{body:n,footer:s,title:r}=t,{boxWidth:o,boxHeight:a}=e,l=ue(e.bodyFont),c=ue(e.titleFont),h=ue(e.footerFont),d=r.length,u=s.length,f=n.length,g=de(e.padding);let p=g.height,m=0,b=n.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);b+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),b&&(p+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing),u&&(p+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let x=0;const y=function(t){m=Math.max(m,i.measureText(t).width+x)};return i.save(),i.font=c.string,_(t.title,y),i.font=l.string,_(t.beforeBody.concat(t.afterBody),y),x=e.displayColors?o+2+e.boxPadding:0,_(n,t=>{_(t.before,y),_(t.lines,y),_(t.after,y)}),x=0,i.font=h.string,_(t.footer,y),i.restore(),m+=g.width,{width:m,height:p}}function Js(t,e,i,n){const{x:s,width:r}=i,{width:o,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=s<=(a+l)/2?"left":"right":s<=r/2?c="left":s>=o-r/2&&(c="right"),function(t,e,i,n){const{x:s,width:r}=n,o=i.caretSize+i.caretPadding;return"left"===t&&s+r+o>e.width||"right"===t&&s-r-o<0||void 0}(c,t,e,i)&&(c="center"),c}function tr(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||Js(t,e,i,n),yAlign:n}}function er(t,e,i,n){const{caretSize:s,caretPadding:r,cornerRadius:o}=t,{xAlign:a,yAlign:l}=i,c=s+r,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=he(o);let g=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const p=function(t,e,i){let{y:n,height:s}=t;return"top"===e?n+=i:n-="bottom"===e?s+i:s/2,n}(e,l,c);return"center"===l?"left"===a?g+=c:"right"===a&&(g-=c):"left"===a?g-=Math.max(h,u)+s:"right"===a&&(g+=Math.max(d,f)+s),{x:nt(g,0,n.width-e.width),y:nt(p,0,n.height-e.height)}}function ir(t,e,i){const n=de(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function nr(t){return Gs([],Qs(t))}function sr(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class rr extends Dn{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,s=new fi(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=(this,ge(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"})))}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),s=i.title.apply(this,[t]),r=i.afterTitle.apply(this,[t]);let o=[];return o=Gs(o,Qs(n)),o=Gs(o,Qs(s)),o=Gs(o,Qs(r)),o}getBeforeBody(t,e){return nr(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return _(t,t=>{const e={before:[],lines:[],after:[]},s=sr(i,t);Gs(e.before,Qs(s.beforeLabel.call(this,t))),Gs(e.lines,s.label.call(this,t)),Gs(e.after,Qs(s.afterLabel.call(this,t))),n.push(e)}),n}getAfterBody(t,e){return nr(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),s=i.footer.apply(this,[t]),r=i.afterFooter.apply(this,[t]);let o=[];return o=Gs(o,Qs(n)),o=Gs(o,Qs(s)),o=Gs(o,Qs(r)),o}_createItems(t){const e=this._active,i=this.chart.data,n=[],s=[],r=[];let o,a,l=[];for(o=0,a=e.length;ot.filter(e,n,s,i))),t.itemSort&&(l=l.sort((e,n)=>t.itemSort(e,n,i))),_(l,e=>{const i=sr(t.callbacks,e);n.push(i.labelColor.call(this,e)),s.push(i.labelPointStyle.call(this,e)),r.push(i.labelTextColor.call(this,e))}),this.labelColors=n,this.labelPointStyles=s,this.labelTextColors=r,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let s,r=[];if(n.length){const t=qs[i.position].call(this,n,this._eventPosition);r=this._createItems(i),this.title=this.getTitle(r,i),this.beforeBody=this.getBeforeBody(r,i),this.body=this.getBody(r,i),this.afterBody=this.getAfterBody(r,i),this.footer=this.getFooter(r,i);const e=this._size=Zs(this,i),o=Object.assign({},t,e),a=tr(this.chart,i,o),l=er(i,o,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,s={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(s={opacity:0});this._tooltipItems=r,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const s=this.getCaretPosition(t,i,n);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:s}=this,{caretSize:r,cornerRadius:o}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=he(o),{x:d,y:u}=t,{width:f,height:g}=e;let p,m,b,x,y,v;return"center"===s?(y=u+g/2,"left"===n?(p=d,m=p-r,x=y+r,v=y-r):(p=d+f,m=p+r,x=y-r,v=y+r),b=p):(m="left"===n?d+Math.max(a,c)+r:"right"===n?d+f-Math.max(l,h)-r:this.caretX,"top"===s?(x=u,y=x-r,p=m-r,b=m+r):(x=u+g,y=x+r,p=m+r,b=m-r),v=x),{x1:p,x2:m,x3:b,y1:x,y2:y,y3:v}}drawTitle(t,e,i){const n=this.title,s=n.length;let r,o,a;if(s){const l=ii(i.rtl,this.x,this.width);for(t.x=ir(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",r=ue(i.titleFont),o=i.titleSpacing,e.fillStyle=i.titleColor,e.font=r.string,a=0;a0!==t)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,se(t,{x:e,y:g,w:l,h:a,radius:o}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),se(t,{x:i,y:g+1,w:l-2,h:a-2,radius:o}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(e,g,l,a),t.strokeRect(e,g,l,a),t.fillStyle=r.backgroundColor,t.fillRect(i,g+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:s,bodyAlign:r,displayColors:o,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=ue(i.bodyFont);let d=h.lineHeight,u=0;const f=ii(i.rtl,this.x,this.width),g=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+s},p=f.textAlign(r);let m,b,x,y,v,w,M;for(e.textAlign=r,e.textBaseline="middle",e.font=h.string,t.x=ir(this,p,i),e.fillStyle=i.bodyColor,_(this.beforeBody,g),u=o&&"right"!==p?"center"===r?l/2+c:l+2+c:0,y=0,w=n.length;y0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,s=i&&i.y;if(n||s){const i=qs[t.position].call(this,this._active,this._eventPosition);if(!i)return;const r=this._size=Zs(this,t),o=Object.assign({},i,this._size),a=tr(e,t,o),l=er(t,o,a,e);n._to===l.x&&s._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=r.width,this.height=r.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},s={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const r=de(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(s,t,n,e),function(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}(t,e.textDirection),s.y+=r.top,this.drawTitle(s,t,e),this.drawBody(s,t,e),this.drawFooter(s,t,e),function(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map(({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),s=!w(i,n),r=this._positionChanged(n,e);(s||r)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,s=this._active||[],r=this._getActiveElements(t,s,e,i),o=this._positionChanged(r,t),a=e||!w(r,s)||o;return a&&(this._active=r,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,i,n){const s=this.options;if("mouseout"===t.type)return[];if(!n)return e;const r=this.chart.getElementsAtEventForMode(t,s.mode,s,i);return s.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:s}=this,r=qs[s.position].call(this,t,e);return!1!==r&&(i!==r.x||n!==r.y)}}rr.positioners=qs;var or={id:"tooltip",_element:rr,positioners:qs,afterInit(t,e,i){i&&(t.tooltip=new rr({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:d,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};class ar extends In{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(f(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:nt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,i,n){const s=t.indexOf(e);return-1===s?((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n):s!==t.lastIndexOf(e)?i:s}(i,t,x(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let s=this.getLabels();s=0===t&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function lr(t,e,{horizontal:i,minRotation:n}){const s=G(n),r=(i?Math.sin(s):Math.cos(s))||.001,o=.75*e*(""+t).length;return Math.min(e/r,o)}ar.id="category",ar.defaults={ticks:{callback:ar.prototype.getLabelForValue}};class cr extends In{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return f(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:s}=this;const r=t=>n=e?n:t,o=t=>s=i?s:t;if(t){const t=U(n),e=U(s);t<0&&e<0?o(0):t>0&&e>0&&r(0)}if(n===s){let e=1;(s>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*s)),o(s+e),t||r(n-e)}this.min=n,this.max=s}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=function(t,e){const i=[],{bounds:n,step:s,min:r,max:o,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:d}=t,u=s||1,g=c-1,{min:p,max:m}=e,b=!f(r),x=!f(o),y=!f(l),v=(m-p)/(h+1);let _,w,M,O,k=Y((m-p)/g/u)*u;if(k<1e-14&&!b&&!x)return[{value:p},{value:m}];O=Math.ceil(m/k)-Math.floor(p/k),O>g&&(k=Y(O*k/g/u)*u),f(a)||(_=Math.pow(10,a),k=Math.ceil(k*_)/_),"ticks"===n?(w=Math.floor(p/k)*k,M=Math.ceil(m/k)*k):(w=p,M=m),b&&x&&s&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((o-r)/s,k/1e3)?(O=Math.round(Math.min((o-r)/k,c)),k=(o-r)/O,w=r,M=o):y?(w=b?r:w,M=x?o:M,O=l-1,k=(M-w)/O):(O=(M-w)/k,O=X(O,Math.round(O),k/1e3)?Math.round(O):Math.ceil(O));const S=Math.max(K(k),K(w));_=Math.pow(10,f(a)?S:a),w=Math.round(w*_)/_,M=Math.round(M*_)/_;let P=0;for(b&&(d&&w!==r?(i.push({value:r}),w0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=m(t)?Math.max(0,t):null,this.max=m(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const s=e=>i=t?i:e,r=t=>n=e?n:t,o=(t,e)=>Math.pow(10,Math.floor(H(t))+e);i===n&&(i<=0?(s(1),r(10)):(s(o(i,-1)),r(o(n,1)))),i<=0&&s(o(n,-1)),n<=0&&r(o(i,1)),this._zero&&this.min!==this._suggestedMin&&i===o(this.min,0)&&s(o(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(H(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),s=[];let r=b(t.min,Math.pow(10,Math.floor(H(e.min)))),o=Math.floor(H(r)),a=Math.floor(r/Math.pow(10,o)),l=o<0?Math.pow(10,Math.abs(o)):1;do{s.push({value:r,major:dr(r)}),++a,10===a&&(a=1,++o,l=o>=0?1:l),r=Math.round(a*Math.pow(10,o)*l)/l}while(os?{start:e-i,end:e}:{start:e,end:e+i}}function pr(t,e,i,n,s){const r=Math.abs(Math.sin(i)),o=Math.abs(Math.cos(i));let a=0,l=0;n.starte.r&&(a=(n.end-e.r)/r,t.r=Math.max(t.r,e.r+a)),s.starte.b&&(l=(s.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function mr(t){return 0===t||180===t?"center":t<180?"left":"right"}function br(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function xr(t,e,i,n){const{ctx:s}=t;if(i)s.arc(t.xCenter,t.yCenter,e,0,F);else{let i=t.getPointPosition(0,e);s.moveTo(i.x,i.y);for(let r=1;r{const i=v(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){const t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],s=[],r=t._pointLabels.length,o=t.options.pointLabels,a=o.centerPointLabels?R/r:0;for(let d=0;d=0&&t=0;s--){const e=n.setContext(t.getPointLabelContext(s)),r=ue(e.font),{x:o,y:a,textAlign:l,left:c,top:h,right:d,bottom:u}=t._pointLabelItems[s],{backdropColor:g}=e;if(!f(g)){const t=de(e.backdropPadding);i.fillStyle=g,i.fillRect(c-t.left,h-t.top,d-c+t.width,u-h+t.height)}ie(i,t._pointLabels[s],o,a+r.lineHeight/2,r,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,s),n.display&&this.ticks.forEach((t,e)=>{0!==e&&(o=this.getDistanceFromCenterForValue(t.value),function(t,e,i,n){const s=t.ctx,r=e.circular,{color:o,lineWidth:a}=e;!r&&!n||!o||!a||i<0||(s.save(),s.strokeStyle=o,s.lineWidth=a,s.setLineDash(e.borderDash),s.lineDashOffset=e.borderDashOffset,s.beginPath(),xr(t,i,r,n),s.closePath(),s.stroke(),s.restore())}(this,n.setContext(this.getContext(e-1)),o,s))}),i.display){for(t.save(),r=s-1;r>=0;r--){const n=i.setContext(this.getPointLabelContext(r)),{color:s,lineWidth:l}=n;l&&s&&(t.lineWidth=l,t.strokeStyle=s,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,o=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(r,o),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let s,r;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((n,o)=>{if(0===o&&!e.reverse)return;const a=i.setContext(this.getContext(o)),l=ue(a.font);if(s=this.getDistanceFromCenterForValue(this.ticks[o].value),a.showLabelBackdrop){t.font=l.string,r=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=de(a.backdropPadding);t.fillRect(-r/2-e.left,-s-l.size/2-e.top,r+e.width,l.size+e.height)}ie(t,n.label,0,-s,l,{color:a.color})}),t.restore()}drawTitle(){}}yr.id="radialLinear",yr.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Tn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},yr.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},yr.descriptors={angleLines:{_fallback:"grid"}};const vr={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},_r=Object.keys(vr);function wr(t,e){return t-e}function Mr(t,e){if(f(e))return null;const i=t._adapter,{parser:n,round:s,isoWeekday:r}=t._parseOpts;let o=e;return"function"==typeof n&&(o=n(o)),m(o)||(o="string"==typeof n?i.parse(o,n):i.parse(o)),null===o?null:(s&&(o="week"!==s||!$(r)&&!0!==r?i.startOf(o,s):i.startOf(o,"isoWeek",r)),+o)}function Or(t,e,i,n){const s=_r.length;for(let r=_r.indexOf(t);r=e?i[n]:i[s]]=!0}}else t[e]=!0}function Sr(t,e,i){const n=[],s={},r=e.length;let o,a;for(o=0;o=0&&(e[l].major=!0);return e}(t,n,s,i):n}class Pr extends In{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new Ui._date(t.adapters.date);P(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Mr(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:s,minDefined:r,maxDefined:o}=this.getUserBounds();function a(t){r||isNaN(t.min)||(n=Math.min(n,t.min)),o||isNaN(t.max)||(s=Math.max(s,t.max))}r&&o||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=m(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),s=m(s)&&!isNaN(s)?s:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,s-1),this.max=Math.max(n+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const s=this.min,r=function(t,e,i){let n=0,s=t.length;for(;nn&&t[s-1]>i;)s--;return n>0||s=_r.indexOf(i);r--){const i=_r[r];if(vr[i].common&&t._adapter.diff(s,n,i)>=e-1)return i}return _r[i?_r.indexOf(i):0]}(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=_r.indexOf(t)+1,i=_r.length;e1e5*o)throw new Error(e+" and "+i+" are too far apart with stepSize of "+o+" "+r);const f="data"===n.ticks.source&&this.getDataTimestamps();for(h=u,d=0;ht-e).map(t=>+t)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const s=this.options,r=s.time.displayFormats,o=this._unit,a=this._majorUnit,l=o&&r[o],c=a&&r[a],h=i[e],d=a&&c&&h&&h.major,u=this._adapter.format(t,n||(d?c:l)),f=s.ticks.callback;return f?v(f,[u,e,i],this):u}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?o:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=me(t,"pos",e)),({pos:n,time:r}=t[a]),({pos:s,time:o}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=me(t,"time",e)),({time:n,pos:r}=t[a]),({time:s,pos:o}=t[l]));const c=s-n;return c?r+(o-r)*(e-n)/c:r}Pr.id="time",Pr.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Cr extends Pr{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Dr(e,this.min),this._tableRange=Dr(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],s=[];let r,o,a,l,c;for(r=0,o=t.length;r=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(r=0,o=n.length;r2&&void 0!==arguments[2]?arguments[2]:"label";const n=[];t.datasets=e.map(e=>{const s=t.datasets.find(t=>t[i]===e[i]);return s&&e.data&&!n.includes(s)?(n.push(s),Object.assign(s,e),s):{...e}})}function Rr(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label";const i={labels:[],datasets:[]};return Ar(i,t.labels),Lr(i,t.datasets,e),i}function Fr(t,e){let{height:i=150,width:n=300,redraw:s=!1,datasetIdKey:r,type:o,data:a,options:l,plugins:c=[],fallbackContent:h,...d}=t;const u=Object(Tr.useRef)(null),f=Object(Tr.useRef)(),g=()=>{u.current&&(f.current=new hs(u.current,{type:o,data:Rr(a,r),options:l,plugins:c}),jr(e,f.current))},p=()=>{jr(e,null),f.current&&(f.current.destroy(),f.current=null)};return Object(Tr.useEffect)(()=>{var t,e;!s&&f.current&&l&&(t=f.current,e=l,t.options={...e})},[s,l]),Object(Tr.useEffect)(()=>{!s&&f.current&&Ar(f.current.config.data,a.labels)},[s,a.labels]),Object(Tr.useEffect)(()=>{!s&&f.current&&a.datasets&&Lr(f.current.config.data,a.datasets,r)},[s,a.datasets]),Object(Tr.useEffect)(()=>{f.current&&(s?(p(),setTimeout(g)):f.current.update())},[s,l,a.labels,a.datasets]),Object(Tr.useEffect)(()=>(g(),()=>p()),[]),Er.a.createElement("canvas",Object.assign({ref:u,role:"img",height:i,width:n},d),h)}const zr=Object(Tr.forwardRef)(Fr);var Ir=i(3),Nr=i(2),Vr=i(16),Wr=i(7),Br=i(8),Hr=i(4);function Ur(t,e){Object(Hr.a)(2,arguments);var i=Object(Br.a)(t),n=Object(Wr.a)(e);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}function Yr(t,e){Object(Hr.a)(2,arguments);var i=Object(Wr.a)(e);return Ur(t,-i)}function $r(t,e){Object(Hr.a)(2,arguments);var i=Object(Br.a)(t),n=Object(Wr.a)(e);if(isNaN(n))return new Date(NaN);if(!n)return i;var s=i.getDate(),r=new Date(i.getTime());r.setMonth(i.getMonth()+n+1,0);var o=r.getDate();return s>=o?r:(i.setFullYear(r.getFullYear(),r.getMonth(),s),i)}function Xr(t,e){Object(Hr.a)(2,arguments);var i=Object(Wr.a)(e);return $r(t,-i)}function qr(t){return(qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Gr(t,e){if(Object(Hr.a)(2,arguments),!e||"object"!==qr(e))return new Date(NaN);var i=e.years?Object(Wr.a)(e.years):0,n=e.months?Object(Wr.a)(e.months):0,s=e.weeks?Object(Wr.a)(e.weeks):0,r=e.days?Object(Wr.a)(e.days):0,o=e.hours?Object(Wr.a)(e.hours):0,a=e.minutes?Object(Wr.a)(e.minutes):0,l=e.seconds?Object(Wr.a)(e.seconds):0,c=Xr(t,n+12*i),h=Yr(c,r+7*s),d=a+60*o,u=l+60*d,f=1e3*u,g=new Date(h.getTime()-f);return g}function Qr(t){return(Qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Kr(t,e){if(Object(Hr.a)(2,arguments),!e||"object"!==Qr(e))return new Date(NaN);var i=e.years?Object(Wr.a)(e.years):0,n=e.months?Object(Wr.a)(e.months):0,s=e.weeks?Object(Wr.a)(e.weeks):0,r=e.days?Object(Wr.a)(e.days):0,o=e.hours?Object(Wr.a)(e.hours):0,a=e.minutes?Object(Wr.a)(e.minutes):0,l=e.seconds?Object(Wr.a)(e.seconds):0,c=Object(Br.a)(t),h=n||i?$r(c,n+12*i):c,d=r||s?Ur(h,r+7*s):h,u=a+60*o,f=l+60*u,g=1e3*f,p=new Date(d.getTime()+g);return p}function Zr(t,e){var i;Object(Hr.a)(1,arguments);var n=Object(Wr.a)(null!==(i=null==e?void 0:e.additionalDigits)&&void 0!==i?i:2);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var s,r=no(t);if(r.date){var o=so(r.date,n);s=ro(o.restDateString,o.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);var a,l=s.getTime(),c=0;if(r.time&&(c=ao(r.time),isNaN(c)))return new Date(NaN);if(!r.timezone){var h=new Date(l+c),d=new Date(0);return d.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),d.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),d}return a=co(r.timezone),isNaN(a)?new Date(NaN):new Date(l+c+a)}Math.pow(10,8);var Jr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},to=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,eo=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,io=/^([+-])(\d{2})(?::?(\d{2}))?$/;function no(t){var e,i={},n=t.split(Jr.dateTimeDelimiter);if(n.length>2)return i;if(/:/.test(n[0])?e=n[0]:(i.date=n[0],e=n[1],Jr.timeZoneDelimiter.test(i.date)&&(i.date=t.split(Jr.timeZoneDelimiter)[0],e=t.substr(i.date.length,t.length))),e){var s=Jr.timezone.exec(e);s?(i.time=e.replace(s[1],""),i.timezone=s[1]):i.time=e}return i}function so(t,e){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(i);if(!n)return{year:NaN,restDateString:""};var s=n[1]?parseInt(n[1]):null,r=n[2]?parseInt(n[2]):null;return{year:null===r?s:100*r,restDateString:t.slice((n[1]||n[2]).length)}}function ro(t,e){if(null===e)return new Date(NaN);var i=t.match(to);if(!i)return new Date(NaN);var n=!!i[4],s=oo(i[1]),r=oo(i[2])-1,o=oo(i[3]),a=oo(i[4]),l=oo(i[5])-1;if(n)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,a,l)?function(t,e,i){var n=new Date(0);n.setUTCFullYear(t,0,4);var s=7*(e-1)+i+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+s),n}(e,a,l):new Date(NaN);var c=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(ho[e]||(uo(t)?29:28))}(e,r,o)&&function(t,e){return e>=1&&e<=(uo(t)?366:365)}(e,s)?(c.setUTCFullYear(e,r,Math.max(s,o)),c):new Date(NaN)}function oo(t){return t?parseInt(t):1}function ao(t){var e=t.match(eo);if(!e)return NaN;var i=lo(e[1]),n=lo(e[2]),s=lo(e[3]);return function(t,e,i){return 24===t?0===e&&0===i:i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,n,s)?36e5*i+6e4*n+1e3*s:NaN}function lo(t){return t&&parseFloat(t.replace(",","."))||0}function co(t){if("Z"===t)return 0;var e=t.match(io);if(!e)return 0;var i="+"===e[1]?-1:1,n=parseInt(e[2]),s=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,s)?i*(36e5*n+6e4*s):NaN}var ho=[31,null,31,30,31,30,31,31,30,31,30,31];function uo(t){return t%400==0||t%4==0&&t%100!=0}var fo=i(77);function go(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function po(t){for(var e=1;e0,"is-negative":e<0});return Object(a.createElement)("div",{className:r},Object(a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"simpay-admin-charts-badge__icon",width:"16",height:"16"},e>0?Object(a.createElement)("path",{d:"M16.004 9.414l-8.607 8.607-1.414-1.414L14.589 8H7.004V6h11v11h-2V9.414z"}):Object(a.createElement)("path",{d:"M14.59 16.004L5.982 7.397l1.414-1.414 8.607 8.606V7.004h2v11h-11v-2z"})),!n&&Object(a.createElement)("span",null,Math.abs(e),"%"))},To="simpay-admin-charts-period-over-period__tooltip",Eo=function(t){var e=t.position,i=t.opacity,n=t.data,s=t.delta;if(!n.length)return null;var r=e.top,o=e.left,l=e.right,c=Do()("simpay-admin-charts-badge",{"is-positive":s>0,"is-negative":s<0});return Object(a.createElement)("div",{className:To,style:{top:r,left:o||"auto",right:l||"auto",opacity:i}},n.map((function(t,e){var i=t.label,n=t.value;return Object(a.createElement)("div",{className:"".concat(To,"-data"),"data-dataset":e,key:i+Math.random()},Object(a.createElement)("strong",null,i)," ",Object(a.createElement)("em",null,Object(Vr.decodeEntities)(n)))})),0!==s&&Object(a.createElement)("div",{className:"".concat(To,"-delta")},Object(a.createElement)("div",{className:c},Object(a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"simpay-admin-charts-badge__icon"},s>0?Object(a.createElement)("path",{fillRule:"evenodd",d:"M5.22 14.78a.75.75 0 001.06 0l7.22-7.22v5.69a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75h-7.5a.75.75 0 000 1.5h5.69l-7.22 7.22a.75.75 0 000 1.06z",clipRule:"evenodd"}):Object(a.createElement)("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06l7.22 7.22H6.75a.75.75 0 000 1.5h7.5a.747.747 0 00.75-.75v-7.5a.75.75 0 00-1.5 0v5.69L6.28 5.22z"}))),Object(a.createElement)("span",null,Object(a.createInterpolateElement)(Object(Nr.sprintf)(/* translators: %s: delta percentage */ -Object(Nr.__)("%1$s%% vs. previous period","simple-pay"),Math.abs(s)),{delta:Object(a.createElement)("strong",{className:s>0?"is-positive":"is-negative"})}))))},jo=function(t){var e=t.chart,i=function(t,e){var i=Object(a.useState)({marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}),n=o()(i,2),s=n[0],r=s.marginTop,l=s.marginRight,c=s.marginBottom,h=s.marginLeft,d=n[1];return Object(a.useEffect)((function(){t.current&&d({marginTop:Math.floor(t.current.chartArea.top),marginRight:Math.floor(t.current.width-t.current.chartArea.right),marginBottom:Math.floor(t.current.chartArea.bottom),marginLeft:Math.floor(t.current.chartArea.left)})}),[t,e]),{marginTop:r,marginRight:l,marginBottom:c,marginLeft:h}}(t.chartRef,e),n=i.marginLeft,s=i.marginRight;return Object(a.createElement)("div",{style:{width:"100%",position:"relative",fontSize:"12px",display:"flex",justifyContent:"space-between",marginTop:"-2px"}},Object(a.createElement)("div",{style:{marginLeft:n,textAlign:"left"}},e.datasets[0].data[0].x),Object(a.createElement)("div",{style:{marginRight:s,textAlign:"right"}},e.datasets[0].data[e.datasets[0].data.length-1].x))};function Ao(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Lo(t){for(var e=1;e0}))}));return Object(a.createElement)("div",{className:"simpay-admin-charts-period-over-period",style:s},!_&&Object(a.createElement)("div",{className:"simpay-admin-charts-no-data",style:Lo(Lo({},s),{},{height:"calc(".concat(s.height," + 15px)")})},Object(a.createElement)("div",null,Object(a.createElement)("strong",null,Object(Nr.sprintf)(/* translators: %s Currency code. */ -Object(Nr.__)("No %s transactions found.","simple-pay"),d.code.toUpperCase())),Object(a.createElement)("div",null,Object(Nr.__)("Please select a different currency, date range, or check back later.","simple-pay")))),Object(a.createElement)(zr,{type:"line",ref:u,options:v,plugins:[vo,(x="rgb(".concat(h.primary_color.join(","),")"),{id:"YGridLineHover",afterDraw:function(t){var e;if(null!==(e=t.tooltip)&&void 0!==e&&null!==(e=e._active)&&void 0!==e&&e.length){var i=t.tooltip._active[0].element.x,n=t.scales.yAxis,s=t.ctx;s.save(),s.beginPath(),s.moveTo(i,n.top),s.lineTo(i,n.bottom),s.lineWidth=2,s.strokeStyle=x,s.stroke(),s.restore()}}})],data:{datasets:f}}),Object(a.createElement)(jo,{chartRef:u,chart:h}),Object(a.createElement)(Eo,m),Object(a.createElement)(Ir.Popover.Slot,null))}},function(t,e){t.exports=window.wp.data},function(t,e){t.exports=window.wp.htmlEntities},,,function(t,e){function i(){return t.exports=i=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var i=0,n=new Array(e);i=r.getTime()?i+1:e.getTime()>=l.getTime()?i:i-1}function f(t){Object(n.a)(1,arguments);var e=u(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var s=d(i);return s}var g={};function p(){return g}function m(t,e){var i,s,r,a,c,h,d,u;Object(n.a)(1,arguments);var f=p(),g=Object(l.a)(null!==(i=null!==(s=null!==(r=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(c=e.locale)||void 0===c||null===(h=c.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==r?r:f.weekStartsOn)&&void 0!==s?s:null===(d=f.locale)||void 0===d||null===(u=d.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==i?i:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Object(o.a)(t),b=m.getUTCDay(),x=(b=1&&x<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(g+1,0,x),y.setUTCHours(0,0,0,0);var v=m(y,e),_=new Date(0);_.setUTCFullYear(g,0,x),_.setUTCHours(0,0,0,0);var w=m(_,e);return f.getTime()>=v.getTime()?g+1:f.getTime()>=w.getTime()?g:g-1}function x(t,e){var i,s,r,o,a,c,h,d;Object(n.a)(1,arguments);var u=p(),f=Object(l.a)(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(a=e.locale)||void 0===a||null===(c=a.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==r?r:u.firstWeekContainsDate)&&void 0!==s?s:null===(h=u.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==i?i:1),g=b(t,e),x=new Date(0);x.setUTCFullYear(g,0,f),x.setUTCHours(0,0,0,0);var y=m(x,e);return y}function y(t,e){for(var i=t<0?"-":"",n=Math.abs(t).toString();n.length0?i:1-i;return y("yy"===e?n%100:n,e.length)},_=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):y(i+1,2)},w=function(t,e){return y(t.getUTCDate(),e.length)},M=function(t,e){return y(t.getUTCHours()%12||12,e.length)},O=function(t,e){return y(t.getUTCHours(),e.length)},k=function(t,e){return y(t.getUTCMinutes(),e.length)},S=function(t,e){return y(t.getUTCSeconds(),e.length)},P=function(t,e){var i=e.length,n=t.getUTCMilliseconds();return y(Math.floor(n*Math.pow(10,i-3)),e.length)};function D(t,e){var i=t>0?"-":"+",n=Math.abs(t),s=Math.floor(n/60),r=n%60;if(0===r)return i+String(s);var o=e||"";return i+String(s)+o+y(r,2)}function C(t,e){return t%60==0?(t>0?"-":"+")+y(Math.abs(t)/60,2):T(t,e)}function T(t,e){var i=e||"",n=t>0?"-":"+",s=Math.abs(t);return n+y(Math.floor(s/60),2)+i+y(s%60,2)}var E={G:function(t,e,i){var n=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"});case"GGGGG":return i.era(n,{width:"narrow"});case"GGGG":default:return i.era(n,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var n=t.getUTCFullYear(),s=n>0?n:1-n;return i.ordinalNumber(s,{unit:"year"})}return v(t,e)},Y:function(t,e,i,n){var s=b(t,n),r=s>0?s:1-s;return"YY"===e?y(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):y(r,e.length)},R:function(t,e){return y(u(t),e.length)},u:function(t,e){return y(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return y(n,2);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return y(n,2);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,i){var n=t.getUTCMonth();switch(e){case"M":case"MM":return _(t,e);case"Mo":return i.ordinalNumber(n+1,{unit:"month"});case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,i){var n=t.getUTCMonth();switch(e){case"L":return String(n+1);case"LL":return y(n+1,2);case"Lo":return i.ordinalNumber(n+1,{unit:"month"});case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var r=function(t,e){Object(n.a)(1,arguments);var i=Object(o.a)(t),s=m(i,e).getTime()-x(i,e).getTime();return Math.round(s/6048e5)+1}(t,s);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):y(r,e.length)},I:function(t,e,i){var s=function(t){Object(n.a)(1,arguments);var e=Object(o.a)(t),i=d(e).getTime()-f(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):y(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):w(t,e)},D:function(t,e,i){var s=function(t){Object(n.a)(1,arguments);var e=Object(o.a)(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime(),r=i-s;return Math.floor(r/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):y(s,e.length)},E:function(t,e,i){var n=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"});case"EEEE":default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,i,n){var s=t.getUTCDay(),r=(s-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return y(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(s,{width:"short",context:"formatting"});case"eeee":default:return i.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,i,n){var s=t.getUTCDay(),r=(s-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return y(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(s,{width:"narrow",context:"standalone"});case"cccccc":return i.day(s,{width:"short",context:"standalone"});case"cccc":default:return i.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,i){var n=t.getUTCDay(),s=0===n?7:n;switch(e){case"i":return String(s);case"ii":return y(s,e.length);case"io":return i.ordinalNumber(s,{unit:"day"});case"iii":return i.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(n,{width:"short",context:"formatting"});case"iiii":default:return i.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,i){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(t,e,i){var n,s=t.getUTCHours();switch(n=12===s?"noon":0===s?"midnight":s/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(t,e,i){var n,s=t.getUTCHours();switch(n=s>=17?"evening":s>=12?"afternoon":s>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var n=t.getUTCHours()%12;return 0===n&&(n=12),i.ordinalNumber(n,{unit:"hour"})}return M(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):O(t,e)},K:function(t,e,i){var n=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(n,{unit:"hour"}):y(n,e.length)},k:function(t,e,i){var n=t.getUTCHours();return 0===n&&(n=24),"ko"===e?i.ordinalNumber(n,{unit:"hour"}):y(n,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):k(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):S(t,e)},S:function(t,e){return P(t,e)},X:function(t,e,i,n){var s=(n._originalDate||t).getTimezoneOffset();if(0===s)return"Z";switch(e){case"X":return C(s);case"XXXX":case"XX":return T(s);case"XXXXX":case"XXX":default:return T(s,":")}},x:function(t,e,i,n){var s=(n._originalDate||t).getTimezoneOffset();switch(e){case"x":return C(s);case"xxxx":case"xx":return T(s);case"xxxxx":case"xxx":default:return T(s,":")}},O:function(t,e,i,n){var s=(n._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+D(s,":");case"OOOO":default:return"GMT"+T(s,":")}},z:function(t,e,i,n){var s=(n._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+D(s,":");case"zzzz":default:return"GMT"+T(s,":")}},t:function(t,e,i,n){var s=n._originalDate||t;return y(Math.floor(s.getTime()/1e3),e.length)},T:function(t,e,i,n){return y((n._originalDate||t).getTime(),e.length)}},j=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},A=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},L={p:A,P:function(t,e){var i,n=t.match(/(P+)(p+)?/)||[],s=n[1],r=n[2];if(!r)return j(t,e);switch(s){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",j(s,e)).replace("{{time}}",A(r,e))}};function R(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var F=["D","DD"],z=["YY","YYYY"];function I(t){return-1!==F.indexOf(t)}function N(t){return-1!==z.indexOf(t)}function V(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var W={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function B(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth,n=t.formats[i]||t.formats[t.defaultWidth];return n}}var H={date:B({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:B({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:B({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},U={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Y(t){return function(e,i){var n;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):s;n=t.formattingValues[r]||t.formattingValues[s]}else{var o=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;n=t.values[a]||t.values[o]}return n[t.argumentCallback?t.argumentCallback(e):e]}}function $(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,s=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],r=e.match(s);if(!r)return null;var o,a=r[0],l=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?q(l,(function(t){return t.test(a)})):X(l,(function(t){return t.test(a)}));o=t.valueCallback?t.valueCallback(c):c,o=i.valueCallback?i.valueCallback(o):o;var h=e.slice(a.length);return{value:o,rest:h}}}function X(t,e){for(var i in t)if(t.hasOwnProperty(i)&&e(t[i]))return i}function q(t,e){for(var i=0;i0?"in "+n:n+" ago":n},formatLong:H,formatRelative:function(t,e,i,n){return U[t]},localize:{ordinalNumber:function(t,e){var i=Number(t),n=i%100;if(n>20||n<10)switch(n%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:Y({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Y({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Y({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Y({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Y({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(G={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(G.matchPattern);if(!i)return null;var n=i[0],s=t.match(G.parsePattern);if(!s)return null;var r=G.valueCallback?G.valueCallback(s[0]):s[0];r=e.valueCallback?e.valueCallback(r):r;var o=t.slice(n.length);return{value:r,rest:o}}),era:$({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:$({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:$({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:$({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:$({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},K=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Z=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,J=/^'([^]*?)'?$/,tt=/''/g,et=/[a-zA-Z]/;function it(t,e,i){var s,r,c,d,u,f,g,m,b,x,y,v,_,w,M,O,k,S;Object(n.a)(2,arguments);var P=String(e),D=p(),C=null!==(s=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:D.locale)&&void 0!==s?s:Q,T=Object(l.a)(null!==(c=null!==(d=null!==(u=null!==(f=null==i?void 0:i.firstWeekContainsDate)&&void 0!==f?f:null==i||null===(g=i.locale)||void 0===g||null===(m=g.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==u?u:D.firstWeekContainsDate)&&void 0!==d?d:null===(b=D.locale)||void 0===b||null===(x=b.options)||void 0===x?void 0:x.firstWeekContainsDate)&&void 0!==c?c:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=Object(l.a)(null!==(y=null!==(v=null!==(_=null!==(w=null==i?void 0:i.weekStartsOn)&&void 0!==w?w:null==i||null===(M=i.locale)||void 0===M||null===(O=M.options)||void 0===O?void 0:O.weekStartsOn)&&void 0!==_?_:D.weekStartsOn)&&void 0!==v?v:null===(k=D.locale)||void 0===k||null===(S=k.options)||void 0===S?void 0:S.weekStartsOn)&&void 0!==y?y:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!C.localize)throw new RangeError("locale must contain localize property");if(!C.formatLong)throw new RangeError("locale must contain formatLong property");var A=Object(o.a)(t);if(!a(A))throw new RangeError("Invalid time value");var F=R(A),z=h(A,F),W={firstWeekContainsDate:T,weekStartsOn:j,locale:C,_originalDate:A},B=P.match(Z).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,L[e])(t,C.formatLong):t})).join("").match(K).map((function(n){if("''"===n)return"'";var s=n[0];if("'"===s)return nt(n);var r=E[s];if(r)return null!=i&&i.useAdditionalWeekYearTokens||!N(n)||V(n,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!I(n)||V(n,e,String(t)),r(z,n,C.localize,W);if(s.match(et))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");return n})).join("");return B}function nt(t){var e=t.match(J);return e?e[1].replace(tt,"'"):t}},,,,,function(t,e,i){"use strict";i.r(e);var n=i(6),s=i.n(n),r=i(0),o=(i(37),i(10)),a=i(25),l=i.n(a),c=i(11),h=i.n(c);function d(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function u(t){for(var e=1;ewebhooks to be properly configured to populate correctly.","simple-pay"),{url:Object(r.createElement)("a",{href:y})})),Object(r.createElement)(g.Flex,null,Object(r.createElement)(g.Button,{variant:"link",onClick:function(){return e(!1)}},Object(p.__)("Close","simple-pay")),Object(r.createElement)(g.Button,{variant:"primary",isPrimary:!0,href:"https://dashboard.stripe.com/reports/hub",target:"_blank"},Object(p.__)("View advanced reports in Stripe →","simple-pay"))))},w=i(14),M=simpayAdminDashboardWidgetReport.currencies,O=new Date,k=function(t){var e=t.report,i=t.currency,n=t.setCurrency,o=t.range,a=t.setRange,l=e.data.delta,c=Object(r.useState)(!1),h=s()(c,2),d=h[0],u=h[1];return Object(r.createElement)("div",{className:"simpay-admin-dashboard-widget-report__data-filter"},Object(r.createElement)("div",{className:"simpay-admin-dashboard-widget-report__data-filter-title"},Object(r.createElement)("strong",null,Object(p.__)("Top Forms","simple-pay")),d&&Object(r.createElement)(_,{setIsOpen:u}),Object(r.createElement)(g.Button,{variant:"link",onClick:function(){return u(!0)}},Object(r.createElement)(m.a,{size:20,icon:b.a}))),Object(r.createElement)("div",{className:"simpay-admin-dashboard-widget-report__data-filter-controls"},!e.isLoading&&0!==l&&Object(r.createElement)(w.a,{delta:l}),Object(r.createElement)(g.SelectControl,{label:Object(p.__)("Currency","simple-pay"),hideLabelFromVision:!0,value:i,onChange:n,options:M.map((function(t){return{label:t,value:t.toLowerCase()}}))}),Object(r.createElement)(g.SelectControl,{label:Object(p.__)("Range","simple-pay"),hideLabelFromVision:!0,value:o.type,onChange:function(t){return a({type:t,start:Object(w.d)(t,O),end:Object(w.c)(t,o.end)})},options:[{label:"Today",value:"today"},{label:"Last 7 days",value:"7days"},{label:"Last 4 weeks",value:"4weeks"}]})))},S=i(19),P=i.n(S),D=i(16),C=function(t){var e=t.id,i=t.title,n=t.total_formatted,s=Object(o.addQueryArgs)("post.php",{post:e,action:"edit"});return Object(r.createElement)("div",{style:{display:"flex",justifyContent:"space-between"}},Object(r.createElement)("span",null,i?Object(r.createElement)("a",{href:s,target:"_blank",rel:"noreferrer"},i):Object(p.sprintf)(/* translators: %d Form ID. */ -Object(p.__)("Payment form %d (deleted)","simple-pay"),e)),Object(r.createElement)("div",null,Object(r.createElement)("strong",null,Object(D.decodeEntities)(n))))},T=function(t){var e=t.report;if(e.isLoading)return Object(r.createElement)("div",{className:"simpay-admin-dashboard-widget-report__data-list"});var i=e.data.top_forms,n=i.top,s=i.remaining;return Object(r.createElement)("div",{className:"simpay-admin-dashboard-widget-report__data-list"},n.map((function(t){return Object(r.createElement)(C,P()({key:t.id},t))})),s.count>0&&Object(r.createElement)("div",{style:{display:"flex",justifyContent:"space-between"}},Object(r.createElement)("div",null,Object(p.sprintf)(/* translators: %d The number of forms included in results that are not shown. */ -Object(p.__)("…and %d more","simple-pay"),s.count)),Object(r.createElement)("div",null,Object(D.decodeEntities)(s.total_formatted))))},E=simpayAdminDashboardWidgetReport,j=E.user_id,A=E.default_range,L=A.type,R=A.start,F=A.end,z=E.default_currency;Object(r.render)(Object(r.createElement)((function(){var t=Object(w.e)(j,"simpay_dashboard_widget_report_range",{start:Object(w.d)(L,R),end:Object(w.c)(L,F),type:L}),e=s()(t,2),i=e[0],n=e[1],a=Object(w.e)(j,"simpay_dashboard_widget_report_currency",z),c=s()(a,2),h=c[0],d=c[1],u=Object(r.useReducer)(f,{data:!1,isLoading:!0}),g=s()(u,2),p=g[0],m=g[1];return Object(r.useEffect)((function(){var t=Object(o.addQueryArgs)("/wpsp/__internal__/report/dashboard-widget",{range:i,currency:h});m({type:"START_RESOLUTION"}),l()({path:t}).then((function(t){m({type:"RECEIVE",data:t}),m({type:"FINISH_RESOLUTION"})}))}),[i,h]),Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"simpay-admin-dashboard-widget-report__chart"},Object(r.createElement)(w.b,{report:p,style:{width:"100%",height:"300px"},config:{yAxisIsCurrency:!0}})),Object(r.createElement)("div",{className:"simpay-admin-dashboard-widget-report__data"},Object(r.createElement)(k,{currency:h,range:i,setCurrency:d,setRange:n,report:p}),Object(r.createElement)(T,{report:p})))}),null),document.getElementById("simpay-admin-dashboard-widget-report"))}]); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-form-template-explorer-css.min.asset.php b/includes/core/assets/js/simpay-admin-form-template-explorer-css.min.asset.php deleted file mode 100644 index 56500617..00000000 --- a/includes/core/assets/js/simpay-admin-form-template-explorer-css.min.asset.php +++ /dev/null @@ -1 +0,0 @@ - array(), 'version' => '0dd31f8eefa5e32199af5e43b992d7ef'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-form-template-explorer.min.js b/includes/core/assets/js/simpay-admin-form-template-explorer.min.js deleted file mode 100644 index 07aaaff0..00000000 --- a/includes/core/assets/js/simpay-admin-form-template-explorer.min.js +++ /dev/null @@ -1,4 +0,0 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=80)}([function(e,t){e.exports=window.wp.element},,function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},,,function(e,t,r){var n=r(26),a=r(27),o=r(22),l=r(28);e.exports=function(e,t){return n(e)||a(e,t)||o(e,t)||l()},e.exports.__esModule=!0,e.exports.default=e.exports},,,function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.url},,function(e,t){e.exports=window.lodash},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rbasic form. Have a suggestion for a new template? We'd love to hear it!","simple-pay"),{blank:Object(o.createElement)("a",{href:b}),suggest:Object(o.createElement)("a",{href:p,target:"_blank",rel:"noopener noreferrer"})})))},O=r(13),_=r.n(O),v=r(20),h=r(65),E=r(43),x=r(66),w=function e(t){var r=t.className,n=t.onChange,a=t.value,c=t.label,s=t.placeholder,u=void 0===s?Object(i.__)("Search"):s,p=t.hideLabelFromVision,m=void 0===p||p,d=t.help,f=Object(v.useInstanceId)(e),b=Object(o.useRef)(),g="components-search-control-".concat(f);return Object(o.createElement)(l.BaseControl,{label:c,id:g,hideLabelFromVision:m,help:d,className:_()(r,"components-search-control")},Object(o.createElement)("div",{className:"components-search-control__input-wrapper"},Object(o.createElement)("input",{ref:b,className:"components-search-control__input",id:g,type:"search",placeholder:u,onChange:function(e){return n(e.target.value)},autoComplete:"off",value:a||""}),Object(o.createElement)("div",{className:"components-search-control__icon"},!!a&&Object(o.createElement)(l.Button,{icon:h.a,label:Object(i.__)("Reset search","simple-pay"),onClick:function(){n(""),b.current.focus()}}),!a&&Object(o.createElement)(E.a,{icon:x.a}))))},C="simpay-form-template-explorer-main__sidebar";function S(e){var t=e.selectedCategory,r=e.templateCategories,n=e.onClickCategory;return Object(o.createElement)(l.NavigableMenu,{orientation:"vertical",className:"".concat(C,"-categories")},Object.keys(r).map((function(e){var a=_()("category-".concat(e),"".concat(C,"-categories_category"));return Object(o.createElement)(l.Button,{key:e,label:r[e],className:a,isPressed:t===e,onClick:function(){n(e)}},r[e])})))}function k(e){var t=e.filterValue,r=e.setFilterValue;return Object(o.createElement)("div",{className:"".concat(C,"-search")},Object(o.createElement)(w,{onChange:r,value:t,label:Object(i.__)("Search for templates","simple-pay"),placeholder:Object(i.__)("Search","simple-pay")}))}var N=function(e){var t=e.selectedCategory,r=e.templateCategories,n=e.onClickCategory,a=e.filterValue,l=e.setFilterValue;return Object(o.createElement)("div",{className:C},Object(o.createElement)(k,{filterValue:a,setFilterValue:l}),!a&&Object(o.createElement)(S,{selectedCategory:t,templateCategories:r,onClickCategory:n}))},M=r(39),P=r(9),V=Object(o.createElement)(P.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(P.Path,{d:"M8 5C8 3.34315 9.34315 2 11 2H13C14.6569 2 16 3.34315 16 5V9H18C19.2624 9 20 9.9804 20 11V19C20 20.0196 19.2624 21 18 21H6C4.73763 21 4 20.0196 4 19V11C4 9.9804 4.73763 9 6 9H8V5ZM9.5 9H14.5V5C14.5 4.17157 13.8284 3.5 13 3.5H11C10.1716 3.5 9.5 4.17157 9.5 5V9Z"})),L=r(63),B=simpayFormBuilderTemplateExplorer,A=B.alreadyPurchasedUrl,U=B.licenseLevel,F=B.upgradeUrl,I="simpay-form-template-explorer-upgrade",T=function(e){var t=e.template,r=e.setIsShowingUpgradeModal;return Object(o.createElement)(l.Modal,{title:Object(i.__)("Upgrade Required","simple-pay"),onRequestClose:function(){return r(!1)},className:I},Object(o.createElement)("div",{className:"".concat(I,"__content")},Object(o.createElement)(E.a,{icon:V,size:"48px"}),Object(o.createElement)("h3",{className:"".concat(I,"__title")},Object(i.sprintf)(/* translators: %s Template name */ -Object(i.__)('Unlock the "%s" Template',"simple-pay"),t.name)),Object(o.createElement)("p",{className:"".concat(I,"__description")},Object(o.createInterpolateElement)(Object(i.sprintf)(/* translators: %$ss Template name. %2$s Minimum license level. */ -Object(i.__)('We\'re sorry, the "%1$s" template is not available on your plan. Please upgrade to the %2$s plan or higher to unlock this and other awesome features.',"simple-pay"),t.name,Object(c.upperFirst)(t.license[0])),{strong:Object(o.createElement)("strong",null)})),Object(o.createElement)(l.Button,{isPrimary:!0,variant:"primary",href:Object(s.addQueryArgs)(F,{utm_content:t.name}),target:"_blank",rel:"noopener noreferrer"},"lite"===U?Object(i.__)("Upgrade to Pro","simple-pay"):Object(i.__)("See Upgrade Options","simple-pay")),Object(o.createElement)("a",{href:A,target:"_blank",rel:"noopener noreferrer",className:"".concat(I,"__purchased")},Object(i.__)("Already purchased?","simple-pay")),Object(o.createElement)("p",{className:"".concat(I,"__discount")},Object(o.createElement)(E.a,{icon:L.a}),"lite"===U?Object(o.createInterpolateElement)(Object(i.__)("Bonus: WP Simple Pay Lite users get 50% off regular price, automatically applied at checkout. Upgrade to Pro →","simple-pay"),{strong:Object(o.createElement)("strong",null),highlight:Object(o.createElement)("u",null),upgrade:Object(o.createElement)("a",{href:Object(s.addQueryArgs)(F,{utm_content:t.name}),target:"_blank",rel:"noopener noreferrer"})}):Object(o.createInterpolateElement)(Object(i.__)("Bonus: WP Simple Pay Pro users get 50% off upgrade pricing, automatically applied at checkout. See Upgrade Options →","simple-pay"),{strong:Object(o.createElement)("strong",null),highlight:Object(o.createElement)("u",null),upgrade:Object(o.createElement)("a",{href:Object(s.addQueryArgs)(F,{utm_content:t.name}),target:"_blank",rel:"noopener noreferrer"})}))))},H=simpayFormBuilderTemplateExplorer,W=H.licenseLevel,z=H.addNewUrl,G=H.isLite,Q="simpay-form-template-explorer-main__content",R=["payment-button","donate-button","payment-form","product-installment-plan-form","product-purchse-form","product-subscription-form","product-subscription-form-coupon","recurring-service-setup-fee-form","recurring-service-trial-period-form","recurring-services-form","alipay-payment-button","giropay-payment-button","ideal-payment-button","przelewy24-payment-button"],Z=function(e){var t=e.template,r=Object(o.useState)(!1),n=a()(r,2),c=n[0],u=n[1],p=!t.license.includes(W),m=Object(s.addQueryArgs)(z,{"simpay-template":t.id}),d=Object(s.addQueryArgs)("https://wpsimplepay.com/templates/".concat(t.slug,"/"),{utm_source:"WordPress",utm_campaign:"1"===G?"lite-plugin":"pro-plugin",utm_medium:"template-explorer",utm_content:t.name});return Object(o.createElement)(o.Fragment,null,c&&Object(o.createElement)(T,{template:t,setIsShowingUpgradeModal:u}),Object(o.createElement)("div",{key:t.id,className:"".concat(Q,"-list-item")},p&&Object(o.createElement)("div",{className:"".concat(Q,"-list-item__badge")},Object(o.createElement)(E.a,{icon:V,size:"16px"})),Object(o.createElement)("div",{id:t.id,className:"".concat(Q,"-list-item__name ").concat(p?"".concat(Q,"-list-item__name--is-locked"):"")},t.name),Object(o.createElement)("div",{className:"".concat(Q,"-list-item__description")},t.description),Object(o.createElement)("div",{className:"".concat(Q,"-list-item__actions")},Object(o.createElement)(l.Button,{isPrimary:!0,variant:"primary",href:p?void 0:m,onClick:function(){return p?u(!0):null}},Object(i.__)("Use Template","simple-pay")),!R.includes(t.slug)&&Object(o.createElement)(l.Button,{isSecondary:!0,variant:"secondary",href:d,style:{marginLeft:"10px"},target:"_blank"},Object(i.__)("View Demo","simple-pay")))))},q=Object(o.createElement)(P.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(P.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"})),D=simpayFormBuilderTemplateExplorer.suggestUrl,$=function(){return Object(o.createElement)("div",{className:"".concat("simpay-form-template-explorer-main__content","-suggest")},Object(o.createElement)("div",{style:{flexGrow:0}},Object(o.createElement)(E.a,{icon:q,size:"42px"})),Object(o.createElement)("div",null,Object(o.createElement)("h4",null,Object(i.__)("We need your help!","simple-pay")),Object(o.createElement)("p",null,Object(o.createInterpolateElement)(Object(i.__)("We're constantly building more pre-made payment form templates to get you up and running even faster. If you have ideas for future templates, please let us know!","simple-pay"),{suggest:Object(o.createElement)("a",{href:D,target:"_blank",rel:"noopener noreferrer"})})),Object(o.createElement)(l.Button,{isSecondary:!0,variant:"secondary",isLink:!0,href:D,target:"_blank"},Object(i.__)("Suggest a Template","simple-pay"))))},K=simpayFormBuilderTemplateExplorer,J=K.isLite,X=K.upgradeUrl,Y=function(){return Object(o.createElement)("div",{className:"".concat("simpay-form-template-explorer-main__content","-upgrade")},Object(o.createElement)("div",null,Object(o.createElement)("h4",null,Object(i.__)("Get Access to All of Our Pre-Made Payment Form Templates","simple-pay")),Object(o.createElement)("p",null,Object(i.__)("Never start from scratch again! Upgrade to gain access to every payment form template we make and unlock powerful new features.","simple-pay"))),Object(o.createElement)(l.Button,{isSecondary:!0,variant:"primary",isLink:!0,size:"large",href:X,target:"_blank"},J?Object(i.__)("Upgrade to Pro","simple-pay"):Object(i.__)("Upgrade Now","simple-pay")))},ee=r(29),te=r.n(ee),re=function(e){return e.name||""},ne=function(e){return e.description||""},ae=function(e){return e.keywords||[]},oe=function(e){return e.category};function le(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(e=(e=Object(c.deburr)(e)).replace(/^\//,"")).toLowerCase()}var ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(c.words)(le(e))},ie=function(e,t){return Object(c.differenceWith)(e,ce(t),(function(e,t){return t.includes(e)}))};function se(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.getName,a=void 0===n?re:n,o=r.getDescription,l=void 0===o?ne:o,i=r.getKeywords,s=void 0===i?ae:i,u=r.getCategory,p=void 0===u?oe:u,m=a(e),d=l(e),f=s(e),b=p(e),g=le(t),y=le(m),j=0;if(g===y)j+=30;else if(y.startsWith(g))j+=20;else{var O=[m,d].concat(te()(f),[b]).join(" "),_=Object(c.words)(g),v=ie(_,O);0===v.length&&(j+=10)}return j}var ue=simpayFormBuilderTemplateExplorer,pe=ue.suggestUrl,me=ue.licenseLevel,de=function(e){var t=e.filterValue,r=e.selectedCategory,n=e.templates,l=Object(v.useDebounce)(M.speak,500),s=Object(o.useMemo)((function(){var e=n;return t?e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=ce(t);if(0===n.length)return e;var o=e.map((function(e){return[e,se(e,t,r)]})).filter((function(e){return a()(e,2)[1]>0}));return o.sort((function(e,t){var r=a()(e,2)[1];return a()(t,2)[1]-r})),o.map((function(e){return a()(e,1)[0]}))}(n,t):""!==r&&(e=n.filter((function(e){return e.categories.includes(r)}))),Object(c.sortBy)(e,(function(e){return!e.license.includes(me)}))}),[t,r,n]);Object(o.useEffect)((function(){if(t){var e=s.length,r=Object(i.sprintf)(/* translators: %d: number of results. */ -Object(i._n)("%d result found.","%d results found.",e,"simple-pay"),e);l(r)}}),[t,l]);var u=!(null==s||!s.length),p=_()("simpay-form-template-explorer-main__content",{"is-empty":!u});return Object(o.createElement)("div",{className:p},!u&&Object(o.createElement)("p",null,Object(o.createInterpolateElement)(Object(i.__)("No results found. Have a suggestion for a new template? We'd love to hear it!","simple-pay"),{suggest:Object(o.createElement)("a",{href:pe,target:"_blank",rel:"noopener noreferrer"})})),u&&Object(o.createElement)(o.Fragment,null,s.map((function(e,r){var n=Object(o.createElement)(Z,{key:e.slug,template:e});return""===t&&["lite","personal","plus"].includes(me)&&5===r?Object(o.createElement)(o.Fragment,{key:"upgrade-frag"},n,Object(o.createElement)(Y,null)):n})),Object(o.createElement)($,null)))},fe=simpayFormBuilderTemplateExplorer,be=fe.hasNew,ge=fe.templates,ye=fe.categories;Object(o.render)(Object(o.createElement)((function(){var e=Object(o.useState)(""),t=a()(e,2),r=t[0],n=t[1],c=Object(o.useState)(be?"new":""),i=a()(c,2),s=i[0],u=i[1];return Object(o.useEffect)((function(){document.querySelector("body").classList.add("simpay-template-explorer-open")}),[]),Object(o.createElement)(l.SlotFillProvider,null,Object(o.createElement)("div",{className:"simpay-form-template-explorer"},Object(o.createElement)(j,null),Object(o.createElement)("div",{className:"".concat("simpay-form-template-explorer","-main")},Object(o.createElement)(N,{selectedCategory:s,templateCategories:ye,onClickCategory:u,filterValue:r,setFilterValue:function(e){n(e),u("")}}),Object(o.createElement)(de,{templates:ge,templateCategories:ye,selectedCategory:s,filterValue:r}))),Object(o.createElement)(l.Popover.Slot,null))}),null),document.getElementById("simpay-form-template-explorer"))}]); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-help-css.min.asset.php b/includes/core/assets/js/simpay-admin-help-css.min.asset.php deleted file mode 100644 index 140e8a09..00000000 --- a/includes/core/assets/js/simpay-admin-help-css.min.asset.php +++ /dev/null @@ -1 +0,0 @@ - array(), 'version' => '9b4801c47b93802aa2267402ce8683e9'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-help.min.js b/includes/core/assets/js/simpay-admin-help.min.js deleted file mode 100644 index 375ec976..00000000 --- a/includes/core/assets/js/simpay-admin-help.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=79)}([function(e,t){e.exports=window.wp.element},,function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},,,function(e,t,n){var r=n(26),o=n(27),c=n(22),a=n(28);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},,,function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.url},,function(e,t){e.exports=window.lodash},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n5&&Object(c.createElement)(a.Button,{variant:"secondary",isSecondary:!0,isSmall:!0,onClick:function(){return f(!0)}},Object(s.__)("View all","simple-pay"))))},R=simpayHelp,I=R.docs,G=R.docsCategories,D=function(){var e,t=Object(c.useState)("getting-started"),n=o()(t,2),r=n[0],a=n[1];return Object(c.createElement)("div",{className:"simpay-help-panel__categories"},(e=Object(V.groupBy)(I,"categories"),Object(V.map)(e,(function(e,t){return{slug:t,title:G[t]||"",docs:e}}))).map((function(e){return Object(c.createElement)(H,k()({key:e.slug,openCategory:r,setOpenCategory:a},e))})))},F=n(29),W=n.n(F);function U(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(e=(e=Object(V.deburr)(e)).replace(/^\//,"")).toLowerCase()}var Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(V.words)(U(e))};function $(e,t){var n,r,o=e.title||"",c=e.excerpt||"",a=e.categories||[],l=e.tags||[],i=U(t),s=U(o),u=0;if(i===s)u+=30;else if(s.startsWith(i))u+=20;else{var p=[o,c].concat(W()(a),W()(l)).join(" ");0===(n=Object(V.words)(i),r=p,Object(V.differenceWith)(n,Z(r),(function(e,t){return t.includes(e)}))).length&&(u+=10)}return u}var Q=simpayHelp.docs,K=function(e){var t=e.searchTerm,n=Object(c.useMemo)((function(){var e=[];return""!==t&&(e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Z(t);if(0===n.length)return e;var r=e.map((function(e){return[e,$(e,t)]})).filter((function(e){return o()(e,2)[1]>0}));return r.sort((function(e,t){var n=o()(e,2)[1];return o()(t,2)[1]-n})),r.map((function(e){return o()(e,1)[0]}))}(Q,t)),e}),[t]),r=Object(b.useDebounce)(P.speak,500);Object(c.useEffect)((function(){if(t){var e=n.length,o=Object(s.sprintf)(/* translators: %d: number of results. */ -Object(s._n)("%d result found.","%d results found.",e,"simple-pay"),e);r(o)}}),[t,r]);var a=!(null==n||!n.length);return Object(c.createElement)("div",{className:"simpay-help-panel__results"},!a&&Object(c.createElement)(D,null),a&&n.map((function(e){return Object(c.createElement)(N,k()({key:e.id,searchTerm:t},e))})))},q=function(e){var t=e.onClose,n=e.onSearch,r=e.searchTerm,o=Object(b.useFocusOnMount)("firstElement"),l=function(e){var t=Object(c.useRef)(),n=Object(c.useRef)(!1),r=Object(c.useRef)([]),o=Object(c.useRef)(e);return o.current=e,Object(c.useLayoutEffect)((function(){!1===n.current&&e.forEach((function(e,n){var o=r.current[n];e!==o&&(h(o,null),h(e,t.current))})),r.current=e}),e),Object(c.useLayoutEffect)((function(){n.current=!1})),Object(c.useCallback)((function(e){h(t,e),n.current=!0;var c,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return d(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,c=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw c}}}}(e?o.current:r.current);try{for(a.s();!(c=a.n()).done;)h(c.value,e)}catch(e){a.e(e)}finally{a.f()}}),[])}([Object(b.useConstrainedTabbing)(),Object(b.useFocusReturn)(),o]);return Object(c.createElement)(a.Animate,{type:"slide-in",options:{origin:"left"}},(function(e){var o=e.className,a=f()("simpay-help-panel",o);return Object(c.createElement)("div",{ref:l,className:a},Object(c.createElement)(v,{onClose:t}),Object(c.createElement)("div",{className:"simpay-help-panel__search"},Object(c.createElement)(M,{label:Object(s.__)("Search the documentation","simple-pay"),placeholder:Object(s.__)("Search","simple-pay"),onChange:n,value:r}),Object(c.createElement)(K,{searchTerm:r})),Object(c.createElement)(x,{searchTerm:r}))}))},J=function(e){var t=e.isOpen,n=e.onClose;return Object(c.useEffect)((function(){return document.body.classList.toggle("simpay-help-body-locked"),function(){document.body.classList.remove("simpay-help-body-locked")}}),[t]),Object(c.createElement)("button",{className:"simpay-help-backdrop",onClick:n})},X=simpayHelp,Y=X.docsSearchTerm,ee=X.docs;function te(e){var t=Object(i.getFragment)(e),n=Y;if(t&&t.includes("/")){var r=t.split("/");t=r[0],n=Object(i.safeDecodeURI)(r[1])}return{hash:t,searchTerm:n}}Object(c.render)(Object(c.createElement)((function(){var e=te(window.location.href),t=e.hash,n=e.searchTerm,r=Object(c.useState)(n),i=o()(r,2),s=i[0],u=i[1],m=Object(c.useState)("#help"===t),f=o()(m,2),b=f[0],d=f[1];function h(){d(!1),window.history.pushState("",document.title,window.location.pathname+window.location.search)}return Object(c.useEffect)((function(){function e(e){var t=te(e.newURL),r=t.hash,o=t.searchTerm;"#help"===r&&d(!0),o!==n&&u(o)}return window.addEventListener("hashchange",e),function(){window.removeEventListener("hashchange",e)}}),[]),Object(c.createElement)("div",{onKeyDown:function(e){e.keyCode!==l.ESCAPE||e.defaultPrevented||(e.preventDefault(),d(!1))},role:"region"},Object(c.createElement)(p,{isOpen:b,onOpen:function(){u(Y),d(!0),window.history.pushState("",document.title,window.location.pathname+window.location.search+"#help")}}),b&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)(q,{onClose:h,onSearch:u,searchTerm:s,docs:ee}),Object(c.createElement)(J,{onClose:h})),Object(c.createElement)(a.Popover.Slot,null))}),null),document.getElementById("simpay-branding-bar-help"))}]); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-notifications-css.min.asset.php b/includes/core/assets/js/simpay-admin-notifications-css.min.asset.php deleted file mode 100644 index f580bd36..00000000 --- a/includes/core/assets/js/simpay-admin-notifications-css.min.asset.php +++ /dev/null @@ -1 +0,0 @@ - array(), 'version' => 'cffa58289bb7bee5d392b67ace878074'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-notifications.min.js b/includes/core/assets/js/simpay-admin-notifications.min.js deleted file mode 100644 index ea4247bc..00000000 --- a/includes/core/assets/js/simpay-admin-notifications.min.js +++ /dev/null @@ -1,3 +0,0 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var s=e[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(r,s,function(e){return t[e]}.bind(null,s));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=81)}([function(t,e){t.exports=window.wp.element},function(t,e,n){"use strict";n.d(e,"w",(function(){return s})),n.d(e,"a",(function(){return Ot})),n.d(e,"b",(function(){return q})),n.d(e,"c",(function(){return jt})),n.d(e,"d",(function(){return yt})),n.d(e,"e",(function(){return H})),n.d(e,"f",(function(){return dt})),n.d(e,"g",(function(){return Rt})),n.d(e,"h",(function(){return _})),n.d(e,"i",(function(){return zt})),n.d(e,"j",(function(){return qt})),n.d(e,"k",(function(){return S})),n.d(e,"l",(function(){return E})),n.d(e,"m",(function(){return M})),n.d(e,"n",(function(){return A})),n.d(e,"o",(function(){return U})),n.d(e,"p",(function(){return gt})),n.d(e,"q",(function(){return bt})),n.d(e,"r",(function(){return mt})),n.d(e,"s",(function(){return x})),n.d(e,"t",(function(){return Lt})),n.d(e,"u",(function(){return k})),n.d(e,"v",(function(){return w})),n.d(e,"x",(function(){return wt})),n.d(e,"y",(function(){return P})),n.d(e,"z",(function(){return Ut})),n.d(e,"A",(function(){return Ft})),n.d(e,"B",(function(){return $t})),n.d(e,"C",(function(){return Qt})),n.d(e,"D",(function(){return Gt}));let r=O();const s=t=>m(t,r);let o=O();s.write=t=>m(t,o);let i=O();s.onStart=t=>m(t,i);let a=O();s.onFrame=t=>m(t,a);let c=O();s.onFinish=t=>m(t,c);let u=[];s.setTimeout=(t,e)=>{let n=s.now()+e,r=()=>{let t=u.findIndex(t=>t.cancel==r);~t&&u.splice(t,1),p-=~t?1:0},o={time:n,handler:t,cancel:r};return u.splice(l(n),0,o),p+=1,b(),o};let l=t=>~(~u.findIndex(e=>e.time>t)||~u.length);s.cancel=t=>{i.delete(t),a.delete(t),r.delete(t),o.delete(t),c.delete(t)},s.sync=t=>{h=!0,s.batchedUpdates(t),h=!1},s.throttle=t=>{let e;function n(){try{t(...e)}finally{e=null}}function r(...t){e=t,s.onStart(n)}return r.handler=t,r.cancel=()=>{i.delete(n),e=null},r};let d="undefined"!=typeof window?window.requestAnimationFrame:()=>{};s.use=t=>d=t,s.now="undefined"!=typeof performance?()=>performance.now():Date.now,s.batchedUpdates=t=>t(),s.catch=console.error,s.frameLoop="always",s.advance=()=>{"demand"!==s.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):y()};let f=-1,p=0,h=!1;function m(t,e){h?(e.delete(t),t(0)):(e.add(t),b())}function b(){f<0&&(f=0,"demand"!==s.frameLoop&&d(g))}function g(){~f&&(d(g),s.batchedUpdates(y))}function y(){let t=f;f=s.now();let e=l(f);e&&(v(u.splice(0,e),t=>t.handler()),p-=e),i.flush(),r.flush(t?Math.min(64,f-t):16.667),a.flush(),o.flush(),c.flush(),p||(f=-1)}function O(){let t=new Set,e=t;return{add(n){p+=e!=t||t.has(n)?0:1,t.add(n)},delete:n=>(p-=e==t&&t.has(n)?1:0,t.delete(n)),flush(n){e.size&&(t=new Set,p-=e.size,v(e,e=>e(n)&&t.add(e)),p+=t.size,e=t)}}}function v(t,e){t.forEach(t=>{try{e(t)}catch(t){s.catch(t)}})}var j=n(5);function w(){}const _=(t,e,n)=>Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0}),x={arr:Array.isArray,obj:t=>!!t&&"Object"===t.constructor.name,fun:t=>"function"==typeof t,str:t=>"string"==typeof t,num:t=>"number"==typeof t,und:t=>void 0===t};function k(t,e){if(x.arr(t)){if(!x.arr(e)||t.length!==e.length)return!1;for(let n=0;nt.forEach(e);function E(t,e,n){if(x.arr(t))for(let r=0;rx.und(t)?[]:x.arr(t)?t:[t];function M(t,e){if(t.size){const n=Array.from(t);t.clear(),S(n,e)}}const A=(t,...e)=>M(t,t=>t(...e)),I=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let C,R,T=null,N=!1,V=w;var q=Object.freeze({__proto__:null,get createStringInterpolator(){return C},get to(){return R},get colors(){return T},get skipAnimation(){return N},get willAdvance(){return V},assign:t=>{t.to&&(R=t.to),t.now&&(s.now=t.now),void 0!==t.colors&&(T=t.colors),null!=t.skipAnimation&&(N=t.skipAnimation),t.createStringInterpolator&&(C=t.createStringInterpolator),t.requestAnimationFrame&&s.use(t.requestAnimationFrame),t.batchedUpdates&&(s.batchedUpdates=t.batchedUpdates),t.willAdvance&&(V=t.willAdvance),t.frameLoop&&(s.frameLoop=t.frameLoop)}});const D=new Set;let z=[],L=[],F=0;const U={get idle(){return!D.size&&!z.length},start(t){F>t.priority?(D.add(t),s.onStart($)):(Q(t),s(G))},advance:G,sort(t){if(F)s.onFrame(()=>U.sort(t));else{const e=z.indexOf(t);~e&&(z.splice(e,1),B(t))}},clear(){z=[],D.clear()}};function $(){D.forEach(Q),D.clear(),s(G)}function Q(t){z.includes(t)||B(t)}function B(t){z.splice(function(e,n){const r=e.findIndex(e=>e.priority>t.priority);return r<0?e.length:r}(z),0,t)}function G(t){const e=L;for(let n=0;n0}const H={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},W="[-+]?\\d*\\.?\\d+";function Z(...t){return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}const Y=new RegExp("rgb"+Z(W,W,W)),J=new RegExp("rgba"+Z(W,W,W,W)),K=new RegExp("hsl"+Z(W,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),X=new RegExp("hsla"+Z(W,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",W)),tt=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,et=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,nt=/^#([0-9a-fA-F]{6})$/,rt=/^#([0-9a-fA-F]{8})$/;function st(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ot(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,s=2*n-r,o=st(s,r,t+1/3),i=st(s,r,t),a=st(s,r,t-1/3);return Math.round(255*o)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function it(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function at(t){return(parseFloat(t)%360+360)%360/360}function ct(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(255*e)}function ut(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function lt(t){let e=function(t){let e;return"number"==typeof t?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=nt.exec(t))?parseInt(e[1]+"ff",16)>>>0:T&&void 0!==T[t]?T[t]:(e=Y.exec(t))?(it(e[1])<<24|it(e[2])<<16|it(e[3])<<8|255)>>>0:(e=J.exec(t))?(it(e[1])<<24|it(e[2])<<16|it(e[3])<<8|ct(e[4]))>>>0:(e=tt.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=rt.exec(t))?parseInt(e[1],16)>>>0:(e=et.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=K.exec(t))?(255|ot(at(e[1]),ut(e[2]),ut(e[3])))>>>0:(e=X.exec(t))?(ot(at(e[1]),ut(e[2]),ut(e[3]))|ct(e[4]))>>>0:null}(t);return null===e?t:(e=e||0,`rgba(${(4278190080&e)>>>24}, ${(16711680&e)>>>16}, ${(65280&e)>>>8}, ${(255&e)/255})`)}const dt=(t,e,n)=>{if(x.fun(t))return t;if(x.arr(t))return dt({range:t,output:e,extrapolate:n});if(x.str(t.output[0]))return C(t);const r=t,s=r.output,o=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(t=>t);return t=>{const e=function(t,e){for(var n=1;n=t);++n);return n-1}(t,o);return function(t,e,n,r,s,o,i,a,c){let u=c?c(t):t;if(un){if("identity"===a)return u;"clamp"===a&&(u=n)}return r===s?r:e===n?t<=e?r:s:(e===-1/0?u=-u:n===1/0?u-=e:u=(u-e)/(n-e),u=o(u),r===-1/0?u=-u:s===1/0?u+=r:u=u*(s-r)+r,u)}(t,o[e],o[e+1],s[e],s[e+1],c,i,a,r.map)}};function ft(){return(ft=Object.assign||function(t){for(var e=1;eBoolean(t&&t[pt]),bt=t=>t&&t[pt]?t[pt]():t,gt=t=>t[ht]||null;function yt(t,e){let n=t[ht];n&&n.forEach(t=>{!function(t,e){t.eventObserved?t.eventObserved(e):t(e)}(t,e)})}class Ot{constructor(t){if(this[pt]=void 0,this[ht]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");vt(this,t)}}const vt=(t,e)=>_t(t,pt,e);function jt(t,e){if(t[pt]){let n=t[ht];n||_t(t,ht,n=new Set),n.has(e)||(n.add(e),t.observerAdded&&t.observerAdded(n.size,e))}return e}function wt(t,e){let n=t[ht];if(n&&n.has(e)){const r=n.size-1;r?n.delete(e):t[ht]=null,t.observerRemoved&&t.observerRemoved(r,e)}}const _t=(t,e,n)=>Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0}),xt=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,kt=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,St=new RegExp(`(${xt.source})(%|[a-z]+)`,"i"),Et=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Pt=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Mt=t=>{const[e,n]=At(t);if(!e||I())return t;const r=window.getComputedStyle(document.documentElement).getPropertyValue(e);if(r)return r.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||t}return n&&Pt.test(n)?Mt(n):n||t},At=t=>{const e=Pt.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]};let It;const Ct=(t,e,n,r,s)=>`rgba(${Math.round(e)}, ${Math.round(n)}, ${Math.round(r)}, ${s})`,Rt=t=>{It||(It=T?new RegExp(`(${Object.keys(T).join("|")})(?!\\w)`,"g"):/^\b$/);const e=t.output.map(t=>bt(t).replace(Pt,Mt).replace(kt,lt).replace(It,lt)),n=e.map(t=>t.match(xt).map(Number)),r=n[0].map((t,e)=>n.map(t=>{if(!(e in t))throw Error('The arity of each "output" value must be equal');return t[e]})).map(e=>dt(ft({},t,{output:e})));return t=>{var n;const s=!St.test(e[0])&&(null==(n=e.find(t=>St.test(t)))?void 0:n.replace(xt,""));let o=0;return e[0].replace(xt,()=>`${r[o++](t)}${s||""}`).replace(Et,Ct)}},Tt="react-spring: ",Nt=t=>{const e=t;let n=!1;if("function"!=typeof e)throw new TypeError(Tt+"once requires a function parameter");return(...t)=>{n||(e(...t),n=!0)}},Vt=Nt(console.warn);function qt(){Vt(Tt+'The "interpolate" function is deprecated in v9 (use "to" instead)')}const Dt=Nt(console.warn);function zt(){Dt(Tt+'Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions')}function Lt(t){return x.str(t)&&("#"==t[0]||/\d/.test(t)||!I()&&Pt.test(t)||t in(T||{}))}const Ft="undefined"!=typeof window&&window.document&&window.document.createElement?j.useLayoutEffect:j.useEffect;function Ut(){const t=Object(j.useState)()[1],e=(()=>{const t=Object(j.useRef)(!1);return Ft(()=>(t.current=!0,()=>{t.current=!1}),[]),t})();return()=>{e.current&&t(Math.random())}}function $t(t,e){const[n]=Object(j.useState)(()=>({inputs:e,result:t()})),r=Object(j.useRef)(),s=r.current;let o=s;return o?Boolean(e&&o.inputs&&function(t,e){if(t.length!==e.length)return!1;for(let n=0;n{r.current=o,s==n&&(n.inputs=n.result=void 0)},[o]),o.result}const Qt=t=>Object(j.useEffect)(t,Bt),Bt=[];function Gt(t){const e=Object(j.useRef)();return Object(j.useEffect)(()=>{e.current=t}),e.current}},function(t,e){t.exports=window.wp.i18n},function(t,e){t.exports=window.wp.components},,function(t,e){t.exports=window.React},function(t,e,n){var r=n(26),s=n(27),o=n(22),i=n(28);t.exports=function(t,e){return r(t)||s(t,e)||o(t,e)||i()},t.exports.__esModule=!0,t.exports.default=t.exports},,,function(t,e){t.exports=window.wp.primitives},function(t,e){t.exports=window.wp.url},function(t,e,n){var r=n(30);t.exports=function(t,e,n){return(e=r(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=window.lodash},function(t,e,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function s(){for(var t=[],e=0;et&&t[o],a=(t,e)=>Object(r.h)(t,o,e),c=t=>t&&t[o]&&t[o].getPayload();class u{constructor(){this.payload=void 0,a(this,this)}getPayload(){return this.payload||[]}}class l extends u{constructor(t){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=t,r.s.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new l(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,e){return r.s.num(t)&&(this.lastPosition=t,e&&(t=Math.round(t/e)*e,this.done&&(this.lastPosition=t))),this._value!==t&&(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,r.s.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}}class d extends l{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=Object(r.f)({output:[t,t]})}static create(t){return new d(t)}getValue(){let t=this._string;return null==t?this._string=this._toString(this._value):t}setValue(t){if(r.s.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else{if(!super.setValue(t))return!1;this._string=null}return!0}reset(t){t&&(this._toString=Object(r.f)({output:[this.getValue(),t]})),this._value=0,super.reset()}}const f={dependencies:null};class p extends u{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){const e={};return Object(r.l)(this.source,(n,s)=>{var i;(i=n)&&i[o]===i?e[s]=n.getValue(t):Object(r.r)(n)?e[s]=Object(r.q)(n):t||(e[s]=n)}),e}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&Object(r.k)(this.payload,t=>t.reset())}_makePayload(t){if(t){const e=new Set;return Object(r.l)(t,this._addToPayload,e),Array.from(e)}}_addToPayload(t){f.dependencies&&Object(r.r)(t)&&f.dependencies.add(t);const e=c(t);e&&Object(r.k)(e,t=>this.add(t))}}class h extends p{constructor(t){super(t)}static create(t){return new h(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const e=this.getPayload();return t.length==e.length?e.map((e,n)=>e.setValue(t[n])).some(Boolean):(super.setValue(t.map(m)),!0)}}function m(t){return(Object(r.t)(t)?d:l).create(t)}function b(t){const e=i(t);return e?e.constructor:r.s.arr(t)?h:Object(r.t)(t)?d:l}function g(){return(g=Object.assign||function(t){for(var e=1;e{const n=!r.s.fun(t)||t.prototype&&t.prototype.isReactComponent;return Object(s.forwardRef)((o,i)=>{const a=Object(s.useRef)(null),c=n&&Object(s.useCallback)(t=>{a.current=function(t,e){return t&&(r.s.fun(t)?t(e):t.current=e),e}(i,t)},[i]),[u,l]=function(t,e){const n=new Set;return f.dependencies=n,t.style&&(t=g({},t,{style:e.createAnimatedStyle(t.style)})),t=new p(t),f.dependencies=null,[t,n]}(o,e),d=Object(r.z)(),h=()=>{const t=a.current;n&&!t||!1===(!!t&&e.applyAnimatedValues(t,u.getValue(!0)))&&d()},m=new O(h,l),b=Object(s.useRef)();Object(r.A)(()=>(b.current=m,Object(r.k)(l,t=>Object(r.c)(t,m)),()=>{b.current&&(Object(r.k)(b.current.deps,t=>Object(r.x)(t,b.current)),r.w.cancel(b.current.update))})),Object(s.useEffect)(h,[]),Object(r.C)(()=>()=>{const t=b.current;Object(r.k)(t.deps,e=>Object(r.x)(e,t))});const y=e.getComponentProps(u.getValue());return s.createElement(t,g({},y,{ref:c}))})};class O{constructor(t,e){this.update=t,this.deps=e}eventObserved(t){"change"==t.type&&r.w.write(this.update)}}const v=Symbol.for("AnimatedComponent"),j=(t,{applyAnimatedValues:e=(()=>!1),createAnimatedStyle:n=(t=>new p(t)),getComponentProps:s=(t=>t)}={})=>{const o={applyAnimatedValues:e,createAnimatedStyle:n,getComponentProps:s},i=t=>{const e=w(t)||"Anonymous";return(t=r.s.str(t)?i[t]||(i[t]=y(t,o)):t[v]||(t[v]=y(t,o))).displayName=`Animated(${e})`,t};return Object(r.l)(t,(e,n)=>{r.s.arr(t)&&(n=w(e)),i[n]=i(e)}),{animated:i}},w=t=>r.s.str(t)?t:t&&r.s.str(t.displayName)?t.displayName:r.s.fun(t)&&t.name||null},,function(t,e){t.exports=window.wp.compose},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n!0===t||!!(e&&t&&(r.s.fun(t)?t(e):Object(r.y)(t).includes(e))),u=(t,e)=>r.s.obj(t)?e&&t[e]:t,l=(t,e)=>!0===t.default?t[e]:t.default?t.default[e]:void 0,d=t=>t,f=(t,e=d)=>{let n=p;t.default&&!0!==t.default&&(t=t.default,n=Object.keys(t));const s={};for(const o of n){const n=e(t[o],o);r.s.und(n)||(s[o]=n)}return s},p=["config","onProps","onStart","onChange","onPause","onResume","onRest"],h={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function m(t){const e=function(t){const e={};let n=0;if(Object(r.l)(t,(t,r)=>{h[r]||(e[r]=t,n++)}),n)return e}(t);if(e){const n={to:e};return Object(r.l)(t,(t,r)=>r in e||(n[r]=t)),n}return i({},t)}function b(t){return t=Object(r.q)(t),r.s.arr(t)?t.map(b):Object(r.t)(t)?r.b.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function g(t){for(const e in t)return!0;return!1}function y(t){return r.s.fun(t)||r.s.arr(t)&&r.s.obj(t[0])}function O(t,e){var n;null==(n=t.ref)||n.delete(t),null==e||e.delete(t)}function v(t,e){var n;e&&t.ref!==e&&(null==(n=t.ref)||n.delete(t),e.add(t),t.ref=e)}const j={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},w=1.70158,_=1.525*w,x=2*Math.PI/3,k=2*Math.PI/4.5,S=t=>{const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},E={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>1-(1-t)*(1-t),easeInOutQuad:t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2,easeInCubic:t=>t*t*t,easeOutCubic:t=>1-Math.pow(1-t,3),easeInOutCubic:t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1-Math.pow(1-t,4),easeInOutQuart:t=>t<.5?8*t*t*t*t:1-Math.pow(-2*t+2,4)/2,easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>1-Math.pow(1-t,5),easeInOutQuint:t=>t<.5?16*t*t*t*t*t:1-Math.pow(-2*t+2,5)/2,easeInSine:t=>1-Math.cos(t*Math.PI/2),easeOutSine:t=>Math.sin(t*Math.PI/2),easeInOutSine:t=>-(Math.cos(Math.PI*t)-1)/2,easeInExpo:t=>0===t?0:Math.pow(2,10*t-10),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>0===t?0:1===t?1:t<.5?Math.pow(2,20*t-10)/2:(2-Math.pow(2,-20*t+10))/2,easeInCirc:t=>1-Math.sqrt(1-Math.pow(t,2)),easeOutCirc:t=>Math.sqrt(1-Math.pow(t-1,2)),easeInOutCirc:t=>t<.5?(1-Math.sqrt(1-Math.pow(2*t,2)))/2:(Math.sqrt(1-Math.pow(-2*t+2,2))+1)/2,easeInBack:t=>2.70158*t*t*t-w*t*t,easeOutBack:t=>1+2.70158*Math.pow(t-1,3)+w*Math.pow(t-1,2),easeInOutBack:t=>t<.5?Math.pow(2*t,2)*(7.189819*t-_)/2:(Math.pow(2*t-2,2)*((_+1)*(2*t-2)+_)+2)/2,easeInElastic:t=>0===t?0:1===t?1:-Math.pow(2,10*t-10)*Math.sin((10*t-10.75)*x),easeOutElastic:t=>0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin((10*t-.75)*x)+1,easeInOutElastic:t=>0===t?0:1===t?1:t<.5?-Math.pow(2,20*t-10)*Math.sin((20*t-11.125)*k)/2:Math.pow(2,-20*t+10)*Math.sin((20*t-11.125)*k)/2+1,easeInBounce:t=>1-S(1-t),easeOutBounce:S,easeInOutBounce:t=>t<.5?(1-S(1-2*t))/2:(1+S(2*t-1))/2},P=i({},j.default,{mass:1,damping:1,easing:E.linear,clamp:!1});class M{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,P)}}function A(t,e){if(r.s.und(e.decay)){const n=!r.s.und(e.tension)||!r.s.und(e.friction);!n&&r.s.und(e.frequency)&&r.s.und(e.damping)&&r.s.und(e.mass)||(t.duration=void 0,t.decay=void 0),n&&(t.frequency=void 0)}else t.duration=void 0}const I=[];class C{constructor(){this.changed=!1,this.values=I,this.toValues=null,this.fromValues=I,this.to=void 0,this.from=void 0,this.config=new M,this.immediate=!1}}function R(t,{key:e,props:n,defaultProps:s,state:o,actions:u}){return new Promise((l,d)=>{var f;let p,h,m=c(null!=(f=n.cancel)?f:null==s?void 0:s.cancel,e);if(m)y();else{r.s.und(n.pause)||(o.paused=c(n.pause,e));let t=null==s?void 0:s.pause;!0!==t&&(t=o.paused||c(t,e)),p=a(n.delay||0,e),t?(o.resumeQueue.add(g),u.pause()):(u.resume(),g())}function b(){o.resumeQueue.add(g),o.timeouts.delete(h),h.cancel(),p=h.time-r.w.now()}function g(){p>0&&!r.b.skipAnimation?(o.delayed=!0,h=r.w.setTimeout(y,p),o.pauseQueue.add(b),o.timeouts.add(h)):y()}function y(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(b),o.timeouts.delete(h),t<=(o.cancelId||0)&&(m=!0);try{u.start(i({},n,{callId:t,cancel:m}),l)}catch(t){d(t)}}})}const T=(t,e)=>1==e.length?e[0]:e.some(t=>t.cancelled)?q(t.get()):e.every(t=>t.noop)?N(t.get()):V(t.get(),e.every(t=>t.finished)),N=t=>({value:t,noop:!0,finished:!0,cancelled:!1}),V=(t,e,n=!1)=>({value:t,finished:e,cancelled:n}),q=t=>({value:t,cancelled:!0,finished:!1});function D(t,e,n,s){const{callId:o,parentId:a,onRest:c}=e,{asyncTo:u,promise:l}=n;return a||t!==u||e.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=t;const d=f(e,(t,e)=>"onRest"===e?void 0:t);let p,h;const m=new Promise((t,e)=>(p=t,h=e)),b=t=>{const e=o<=(n.cancelId||0)&&q(s)||o!==n.asyncId&&V(s,!1);if(e)throw t.result=e,h(t),t},g=(t,e)=>{const a=new L,c=new F;return(async()=>{if(r.b.skipAnimation)throw z(n),c.result=V(s,!1),h(c),c;b(a);const u=r.s.obj(t)?i({},t):i({},e,{to:t});u.parentId=o,Object(r.l)(d,(t,e)=>{r.s.und(u[e])&&(u[e]=t)});const l=await s.start(u);return b(a),n.paused&&await new Promise(t=>{n.resumeQueue.add(t)}),l})()};let y;if(r.b.skipAnimation)return z(n),V(s,!1);try{let e;e=r.s.arr(t)?(async t=>{for(const e of t)await g(e)})(t):Promise.resolve(t(g,s.stop.bind(s))),await Promise.all([e.then(p),m]),y=V(s.get(),!0,!1)}catch(t){if(t instanceof L)y=t.result;else{if(!(t instanceof F))throw t;y=t.result}}finally{o==n.asyncId&&(n.asyncId=a,n.asyncTo=a?u:void 0,n.promise=a?l:void 0)}return r.s.fun(c)&&r.w.batchedUpdates(()=>{c(y,s,s.item)}),y})():l}function z(t,e){Object(r.m)(t.timeouts,t=>t.cancel()),t.pauseQueue.clear(),t.resumeQueue.clear(),t.asyncId=t.asyncTo=t.promise=void 0,e&&(t.cancelId=e)}class L extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}}class F extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const U=t=>t instanceof Q;let $=1;class Q extends r.a{constructor(...t){super(...t),this.id=$++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){const t=Object(o.e)(this);return t&&t.getValue()}to(...t){return r.b.to(this,t)}interpolate(...t){return Object(r.j)(),r.b.to(this,t)}toJSON(){return this.get()}observerAdded(t){1==t&&this._attach()}observerRemoved(t){0==t&&this._detach()}_attach(){}_detach(){}_onChange(t,e=!1){Object(r.d)(this,{type:"change",parent:this,value:t,idle:e})}_onPriorityChange(t){this.idle||r.o.sort(this),Object(r.d)(this,{type:"priority",parent:this,priority:t})}}const B=Symbol.for("SpringPhase"),G=t=>(1&t[B])>0,H=t=>(2&t[B])>0,W=t=>(4&t[B])>0,Z=(t,e)=>e?t[B]|=3:t[B]&=-3,Y=(t,e)=>e?t[B]|=4:t[B]&=-5;class J extends Q{constructor(t,e){if(super(),this.key=void 0,this.animation=new C,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!r.s.und(t)||!r.s.und(e)){const n=r.s.obj(t)?i({},t):i({},e,{from:t});r.s.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(H(this)||this._state.asyncTo)||W(this)}get goal(){return Object(r.q)(this.animation.to)}get velocity(){const t=Object(o.e)(this);return t instanceof o.c?t.lastVelocity||0:t.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return G(this)}get isAnimating(){return H(this)}get isPaused(){return W(this)}get isDelayed(){return this._state.delayed}advance(t){let e=!0,n=!1;const s=this.animation;let{config:i,toValues:a}=s;const c=Object(o.g)(s.to);!c&&Object(r.r)(s.to)&&(a=Object(r.y)(Object(r.q)(s.to))),s.values.forEach((u,l)=>{if(u.done)return;const d=u.constructor==o.b?1:c?c[l].lastPosition:a[l];let f=s.immediate,p=d;if(!f){if(p=u.lastPosition,i.tension<=0)return void(u.done=!0);let e=u.elapsedTime+=t;const n=s.fromValues[l],o=null!=u.v0?u.v0:u.v0=r.s.arr(i.velocity)?i.velocity[l]:i.velocity;let a;if(r.s.und(i.duration))if(i.decay){const t=!0===i.decay?.998:i.decay,r=Math.exp(-(1-t)*e);p=n+o/(1-t)*(1-r),f=Math.abs(u.lastPosition-p)<.1,a=o*r}else{a=null==u.lastVelocity?o:u.lastVelocity;const e=i.precision||(n==d?.005:Math.min(1,.001*Math.abs(d-n))),s=i.restVelocity||e/10,c=i.clamp?0:i.bounce,l=!r.s.und(c),h=n==d?u.v0>0:ns,m||(f=Math.abs(d-p)<=e,!f));++t)l&&(b=p==d||p>d==h,b&&(a=-a*c,p=d)),a+=(1e-6*-i.tension*(p-d)+.001*-i.friction*a)/i.mass*g,p+=a*g}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,u.durationProgress>0&&(u.elapsedTime=i.duration*u.durationProgress,e=u.elapsedTime+=t)),r=(i.progress||0)+e/this._memoizedDuration,r=r>1?1:r<0?0:r,u.durationProgress=r),p=n+i.easing(r)*(d-n),a=(p-u.lastPosition)/t,f=1==r}u.lastVelocity=a,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),f=!0)}c&&!c[l].done&&(f=!1),f?u.done=!0:e=!1,u.setValue(p,i.round)&&(n=!0)});const u=Object(o.e)(this),l=u.getValue();if(e){const t=Object(r.q)(s.to);l===t&&!n||i.decay?n&&i.decay&&this._onChange(l):(u.setValue(t),this._onChange(t)),this._stop()}else n&&this._onChange(l)}set(t){return r.w.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(H(this)){const{to:t,config:e}=this.animation;r.w.batchedUpdates(()=>{this._onStart(),e.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,e){let n;return r.s.und(t)?(n=this.queue||[],this.queue=[]):n=[r.s.obj(t)?t:i({},e,{to:t})],Promise.all(n.map(t=>this._update(t))).then(t=>T(this,t))}stop(t){const{to:e}=this.animation;return this._focus(this.get()),z(this._state,t&&this._lastCallId),r.w.batchedUpdates(()=>this._stop(e,t)),this}reset(){this._update({reset:!0})}eventObserved(t){"change"==t.type?this._start():"priority"==t.type&&(this.priority=t.priority+1)}_prepareNode(t){const e=this.key||"";let{to:n,from:s}=t;n=r.s.obj(n)?n[e]:n,(null==n||y(n))&&(n=void 0),s=r.s.obj(s)?s[e]:s,null==s&&(s=void 0);const i={to:n,from:s};return G(this)||(t.reverse&&([n,s]=[s,n]),s=Object(r.q)(s),r.s.und(s)?Object(o.e)(this)||this._set(n):this._set(s)),i}_update(t,e){let n=i({},t);const{key:s,defaultProps:o}=this;n.default&&Object.assign(o,f(n,(t,e)=>/^on/.test(e)?u(t,s):t)),st(this,n,"onProps"),ot(this,"onProps",n,this);const a=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const c=this._state;return R(++this._lastCallId,{key:s,props:n,defaultProps:o,state:c,actions:{pause:()=>{W(this)||(Y(this,!0),Object(r.n)(c.pauseQueue),ot(this,"onPause",V(this,K(this,this.animation.to)),this))},resume:()=>{W(this)&&(Y(this,!1),H(this)&&this._resume(),Object(r.n)(c.resumeQueue),ot(this,"onResume",V(this,K(this,this.animation.to)),this))},start:this._merge.bind(this,a)}}).then(t=>{if(n.loop&&t.finished&&(!e||!t.noop)){const t=X(n);if(t)return this._update(t,!0)}return t})}_merge(t,e,n){if(e.cancel)return this.stop(!0),n(q(this));const s=!r.s.und(t.to),u=!r.s.und(t.from);if(s||u){if(!(e.callId>this._lastToId))return n(q(this));this._lastToId=e.callId}const{key:l,defaultProps:d,animation:f}=this,{to:p,from:h}=f;let{to:m=p,from:g=h}=t;!u||s||e.default&&!r.s.und(m)||(m=g),e.reverse&&([m,g]=[g,m]);const O=!Object(r.u)(g,h);O&&(f.from=g),g=Object(r.q)(g);const v=!Object(r.u)(m,p);v&&this._focus(m);const j=y(e.to),{config:w}=f,{decay:_,velocity:x}=w;(s||u)&&(w.velocity=0),e.config&&!j&&function(t,e,n){n&&(A(n=i({},n),e),e=i({},n,e)),A(t,e),Object.assign(t,e);for(const e in P)null==t[e]&&(t[e]=P[e]);let{mass:s,frequency:o,damping:a}=t;r.s.und(o)||(o<.01&&(o=.01),a<0&&(a=0),t.tension=Math.pow(2*Math.PI/o,2)*s,t.friction=4*Math.PI*a*s/o)}(w,a(e.config,l),e.config!==d.config?a(d.config,l):void 0);let k=Object(o.e)(this);if(!k||r.s.und(m))return n(V(this,!0));const S=r.s.und(e.reset)?u&&!e.default:!r.s.und(g)&&c(e.reset,l),E=S?g:this.get(),M=b(m),I=r.s.num(M)||r.s.arr(M)||Object(r.t)(M),C=!j&&(!I||c(d.immediate||e.immediate,l));if(v){const t=Object(o.f)(m);if(t!==k.constructor){if(!C)throw Error(`Cannot animate between ${k.constructor.name} and ${t.name}, as the "to" prop suggests`);k=this._set(M)}}const R=k.constructor;let T=Object(r.r)(m),z=!1;if(!T){const t=S||!G(this)&&O;(v||t)&&(z=Object(r.u)(b(E),M),T=!z),(Object(r.u)(f.immediate,C)||C)&&Object(r.u)(w.decay,_)&&Object(r.u)(w.velocity,x)||(T=!0)}if(z&&H(this)&&(f.changed&&!S?T=!0:T||this._stop(p)),!j&&((T||Object(r.r)(p))&&(f.values=k.getPayload(),f.toValues=Object(r.r)(m)?null:R==o.b?[1]:Object(r.y)(M)),f.immediate!=C&&(f.immediate=C,C||S||this._set(p)),T)){const{onRest:t}=f;Object(r.k)(rt,t=>st(this,e,t));const s=V(this,K(this,p));Object(r.n)(this._pendingCalls,s),this._pendingCalls.add(n),f.changed&&r.w.batchedUpdates(()=>{f.changed=!S,null==t||t(s,this),S?a(d.onRest,s):null==f.onStart||f.onStart(s,this)})}S&&this._set(E),j?n(D(e.to,e,this._state,this)):T?this._start():H(this)&&!v?this._pendingCalls.add(n):n(N(E))}_focus(t){const e=this.animation;t!==e.to&&(Object(r.p)(this)&&this._detach(),e.to=t,Object(r.p)(this)&&this._attach())}_attach(){let t=0;const{to:e}=this.animation;Object(r.r)(e)&&(Object(r.c)(e,this),U(e)&&(t=e.priority+1)),this.priority=t}_detach(){const{to:t}=this.animation;Object(r.r)(t)&&Object(r.x)(t,this)}_set(t,e=!0){const n=Object(r.q)(t);if(!r.s.und(n)){const t=Object(o.e)(this);if(!t||!Object(r.u)(n,t.getValue())){const s=Object(o.f)(n);t&&t.constructor==s?t.setValue(n):Object(o.h)(this,s.create(n)),t&&r.w.batchedUpdates(()=>{this._onChange(n,e)})}}return Object(o.e)(this)}_onStart(){const t=this.animation;t.changed||(t.changed=!0,ot(this,"onStart",V(this,K(this,t.to)),this))}_onChange(t,e){e||(this._onStart(),a(this.animation.onChange,t,this)),a(this.defaultProps.onChange,t,this),super._onChange(t,e)}_start(){const t=this.animation;Object(o.e)(this).reset(Object(r.q)(t.to)),t.immediate||(t.fromValues=t.values.map(t=>t.lastPosition)),H(this)||(Z(this,!0),W(this)||this._resume())}_resume(){r.b.skipAnimation?this.finish():r.o.start(this)}_stop(t,e){if(H(this)){Z(this,!1);const n=this.animation;Object(r.k)(n.values,t=>{t.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Object(r.d)(this,{type:"idle",parent:this});const s=e?q(this.get()):V(this.get(),K(this,null!=t?t:n.to));Object(r.n)(this._pendingCalls,s),n.changed&&(n.changed=!1,ot(this,"onRest",s,this))}}}function K(t,e){const n=b(e),s=b(t.get());return Object(r.u)(s,n)}function X(t,e=t.loop,n=t.to){let r=a(e);if(r){const s=!0!==r&&m(r),o=(s||t).reverse,a=!s||s.reset;return tt(i({},t,{loop:e,default:!1,pause:void 0,to:!o||y(n)?n:void 0,from:a?t.from:void 0,reset:a},s))}}function tt(t){const{to:e,from:n}=t=m(t),s=new Set;return r.s.obj(e)&&nt(e,s),r.s.obj(n)&&nt(n,s),t.keys=s.size?Array.from(s):null,t}function et(t){const e=tt(t);return r.s.und(e.default)&&(e.default=f(e)),e}function nt(t,e){Object(r.l)(t,(t,n)=>null!=t&&e.add(n))}const rt=["onStart","onRest","onChange","onPause","onResume"];function st(t,e,n){t.animation[n]=e[n]!==l(e,n)?u(e[n],t.key):void 0}function ot(t,e,...n){var r,s,o,i;null==(r=(s=t.animation)[e])||r.call(s,...n),null==(o=(i=t.defaultProps)[e])||o.call(i,...n)}const it=["onStart","onChange","onRest"];let at=1;class ct{constructor(t,e){this.id=at++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),e&&(this._flush=e),t&&this.start(i({default:!0},t))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((e,n)=>t[n]=e.get()),t}set(t){for(const e in t){const n=t[e];r.s.und(n)||this.springs[e].set(n)}}update(t){return t&&this.queue.push(tt(t)),this}start(t){let{queue:e}=this;return t?e=Object(r.y)(t).map(tt):this.queue=[],this._flush?this._flush(this,e):(ht(this,e),ut(this,e))}stop(t,e){if(t!==!!t&&(e=t),e){const n=this.springs;Object(r.k)(Object(r.y)(e),e=>n[e].stop(!!t))}else z(this._state,this._lastAsyncId),this.each(e=>e.stop(!!t));return this}pause(t){if(r.s.und(t))this.start({pause:!0});else{const e=this.springs;Object(r.k)(Object(r.y)(t),t=>e[t].pause())}return this}resume(t){if(r.s.und(t))this.start({pause:!1});else{const e=this.springs;Object(r.k)(Object(r.y)(t),t=>e[t].resume())}return this}each(t){Object(r.l)(this.springs,t)}_onFrame(){const{onStart:t,onChange:e,onRest:n}=this._events,s=this._active.size>0,o=this._changed.size>0;(s&&!this._started||o&&!this._started)&&(this._started=!0,Object(r.m)(t,([t,e])=>{e.value=this.get(),t(e,this,this._item)}));const i=!s&&this._started,a=o||i&&n.size?this.get():null;o&&e.size&&Object(r.m)(e,([t,e])=>{e.value=a,t(e,this,this._item)}),i&&(this._started=!1,Object(r.m)(n,([t,e])=>{e.value=a,t(e,this,this._item)}))}eventObserved(t){if("change"==t.type)this._changed.add(t.parent),t.idle||this._active.add(t.parent);else{if("idle"!=t.type)return;this._active.delete(t.parent)}r.w.onFrame(this._onFrame)}}function ut(t,e){return Promise.all(e.map(e=>async function t(e,n,s){const{keys:o,to:i,from:a,loop:c,onRest:u,onResolve:d}=n,f=r.s.obj(n.default)&&n.default;c&&(n.loop=!1),!1===i&&(n.to=null),!1===a&&(n.from=null);const p=r.s.arr(i)||r.s.fun(i)?i:void 0;p?(n.to=void 0,n.onRest=void 0,f&&(f.onRest=void 0)):Object(r.k)(it,t=>{const s=n[t];if(r.s.fun(s)){const r=e._events[t];n[t]=({finished:t,cancelled:e})=>{const n=r.get(s);n?(t||(n.finished=!1),e&&(n.cancelled=!0)):r.set(s,{value:null,finished:t||!1,cancelled:e||!1})},f&&(f[t]=n[t])}});const h=e._state;n.pause===!h.paused?(h.paused=n.pause,Object(r.n)(n.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(n.pause=!0);const m=(o||Object.keys(e.springs)).map(t=>e.springs[t].start(n)),b=!0===n.cancel||!0===l(n,"cancel");(p||b&&h.asyncId)&&m.push(R(++e._lastAsyncId,{props:n,state:h,actions:{pause:r.v,resume:r.v,start(t,n){b?(z(h,e._lastAsyncId),n(q(e))):(t.onRest=u,n(D(p,t,h,e)))}}})),h.paused&&await new Promise(t=>{h.resumeQueue.add(t)});const g=T(e,await Promise.all(m));if(c&&g.finished&&(!s||!g.noop)){const r=X(n,c,i);if(r)return ht(e,[r]),t(e,r,!0)}return d&&r.w.batchedUpdates(()=>d(g,e,e.item)),g}(t,e))).then(e=>T(t,e))}function lt(t,e){const n=i({},t.springs);return e&&Object(r.k)(Object(r.y)(e),t=>{r.s.und(t.keys)&&(t=tt(t)),r.s.obj(t.to)||(t=i({},t,{to:void 0})),pt(n,t,t=>ft(t))}),dt(t,n),n}function dt(t,e){Object(r.l)(e,(e,n)=>{t.springs[n]||(t.springs[n]=e,Object(r.c)(e,t))})}function ft(t,e){const n=new J;return n.key=t,e&&Object(r.c)(n,e),n}function pt(t,e,n){e.keys&&Object(r.k)(e.keys,r=>{(t[r]||(t[r]=n(r)))._prepareNode(e)})}function ht(t,e){Object(r.k)(e,e=>{pt(t.springs,e,e=>ft(e,t))})}const mt=["children"],bt=t=>{let{children:e}=t,n=function(t,e){if(null==t)return{};var n,r,s={},o=Object.keys(t);for(r=0;r=0||(s[n]=t[n]);return s}(t,mt);const o=Object(s.useContext)(gt),i=n.pause||!!o.pause,a=n.immediate||!!o.immediate;n=Object(r.B)(()=>({pause:i,immediate:a}),[i,a]);const{Provider:c}=gt;return s.createElement(c,{value:n},e)},gt=(yt=bt,Ot={},Object.assign(yt,s.createContext(Ot)),yt.Provider._context=yt,yt.Consumer._context=yt,yt);var yt,Ot;bt.Provider=gt.Provider,bt.Consumer=gt.Consumer;const vt=()=>{const t=[],e=function(e){Object(r.i)();const s=[];return Object(r.k)(t,(t,o)=>{if(r.s.und(e))s.push(t.start());else{const r=n(e,t,o);r&&s.push(t.start(r))}}),s};e.current=t,e.add=function(e){t.includes(e)||t.push(e)},e.delete=function(e){const n=t.indexOf(e);~n&&t.splice(n,1)},e.pause=function(){return Object(r.k)(t,t=>t.pause(...arguments)),this},e.resume=function(){return Object(r.k)(t,t=>t.resume(...arguments)),this},e.set=function(e){Object(r.k)(t,t=>t.set(e))},e.start=function(e){const n=[];return Object(r.k)(t,(t,s)=>{if(r.s.und(e))n.push(t.start());else{const r=this._getProps(e,t,s);r&&n.push(t.start(r))}}),n},e.stop=function(){return Object(r.k)(t,t=>t.stop(...arguments)),this},e.update=function(e){return Object(r.k)(t,(t,n)=>t.update(this._getProps(e,t,n))),this};const n=function(t,e,n){return r.s.fun(t)?t(n,e):t};return e._getProps=n,e};function jt(t,e,n){const o=r.s.fun(e)&&e;o&&!n&&(n=[]);const a=Object(s.useMemo)(()=>o||3==arguments.length?vt():void 0,[]),c=Object(s.useRef)(0),u=Object(r.z)(),l=Object(s.useMemo)(()=>({ctrls:[],queue:[],flush(t,e){const n=lt(t,e);return c.current>0&&!l.queue.length&&!Object.keys(n).some(e=>!t.springs[e])?ut(t,e):new Promise(r=>{dt(t,n),l.queue.push(()=>{r(ut(t,e))}),u()})}}),[]),d=Object(s.useRef)([...l.ctrls]),f=[],p=Object(r.D)(t)||0;function h(t,n){for(let r=t;r{Object(r.k)(d.current.slice(t,p),t=>{O(t,a),t.stop(!0)}),d.current.length=t,h(p,t)},[t]),Object(s.useMemo)(()=>{h(0,Math.min(p,t))},n);const m=d.current.map((t,e)=>lt(t,f[e])),b=Object(s.useContext)(bt),y=Object(r.D)(b),j=b!==y&&g(b);Object(r.A)(()=>{c.current++,l.ctrls=d.current;const{queue:t}=l;t.length&&(l.queue=[],Object(r.k)(t,t=>t())),Object(r.k)(d.current,(t,e)=>{null==a||a.add(t),j&&t.start({default:b});const n=f[e];n&&(v(t,n.ref),t.ref?t.queue.push(n):t.start(n))})}),Object(r.C)(()=>()=>{Object(r.k)(l.ctrls,t=>t.stop(!0))});const w=m.map(t=>i({},t));return a?[w,a]:w}function wt(t,e){const n=r.s.fun(t),[[s],o]=jt(1,n?t:[t],n?e||[]:e);return n||2==arguments.length?[s,o]:s}let _t;function xt(t,e,n){const o=r.s.fun(e)&&e,{reset:c,sort:u,trail:l=0,expires:d=!0,exitBeforeEnter:p=!1,onDestroyed:h,ref:b,config:y}=o?o():e,j=Object(s.useMemo)(()=>o||3==arguments.length?vt():void 0,[]),w=Object(r.y)(t),_=[],x=Object(s.useRef)(null),k=c?null:x.current;Object(r.A)(()=>{x.current=_}),Object(r.C)(()=>(Object(r.k)(x.current,t=>{var e;null==(e=t.ctrl.ref)||e.add(t.ctrl);const n=C.get(t);n&&t.ctrl.start(n.payload)}),()=>{Object(r.k)(x.current,t=>{t.expired&&clearTimeout(t.expirationId),O(t.ctrl,j),t.ctrl.stop(!0)})}));const S=St(w,o?o():e,k),E=c&&x.current||[];Object(r.A)(()=>Object(r.k)(E,({ctrl:t,item:e,key:n})=>{O(t,j),a(h,e,n)}));const P=[];if(k&&Object(r.k)(k,(t,e)=>{t.expired?(clearTimeout(t.expirationId),E.push(t)):~(e=P[e]=S.indexOf(t.key))&&(_[e]=t)}),Object(r.k)(w,(t,e)=>{_[e]||(_[e]={key:S[e],item:t,phase:_t.MOUNT,ctrl:new ct},_[e].ctrl.item=t)}),P.length){let t=-1;const{leave:n}=o?o():e;Object(r.k)(P,(e,r)=>{const s=k[r];~e?(t=_.indexOf(s),_[t]=i({},s,{item:w[e]})):n&&_.splice(++t,0,s)})}r.s.fun(u)&&_.sort((t,e)=>u(t.item,e.item));let M=-l;const A=Object(r.z)(),I=f(e),C=new Map,R=Object(s.useRef)(new Map),T=Object(s.useRef)(!1);Object(r.k)(_,(t,n)=>{const s=t.key,c=t.phase,u=o?o():e;let f,h,g=a(u.delay||0,s);if(c==_t.MOUNT)f=u.enter,h=_t.ENTER;else{const t=S.indexOf(s)<0;if(c!=_t.LEAVE)if(t)f=u.leave,h=_t.LEAVE;else{if(!(f=u.update))return;h=_t.UPDATE}else{if(t)return;f=u.enter,h=_t.ENTER}}if(f=a(f,t.item,n),f=r.s.obj(f)?m(f):{to:f},!f.config){const e=y||I.config;f.config=a(e,t.item,n,h)}M+=l;const O=i({},I,{delay:g+M,ref:b,immediate:u.immediate,reset:!1},f);if(h==_t.ENTER&&r.s.und(O.from)){const s=o?o():e,i=r.s.und(s.initial)||k?s.from:s.initial;O.from=a(i,t.item,n)}const{onResolve:v}=O;O.onResolve=t=>{a(v,t);const e=x.current,n=e.find(t=>t.key===s);if(n&&(!t.cancelled||n.phase==_t.UPDATE)&&n.ctrl.idle){const t=e.every(t=>t.ctrl.idle);if(n.phase==_t.LEAVE){const e=a(d,n.item);if(!1!==e){const r=!0===e?0:e;if(n.expired=!0,!t&&r>0)return void(r<=2147483647&&(n.expirationId=setTimeout(A,r)))}}t&&e.some(t=>t.expired)&&(R.current.delete(n),p&&(T.current=!0),A())}};const j=lt(t.ctrl,O);h===_t.LEAVE&&p?R.current.set(t,{phase:h,springs:j,payload:O}):C.set(t,{phase:h,springs:j,payload:O})});const N=Object(s.useContext)(bt),V=Object(r.D)(N),q=N!==V&&g(N);Object(r.A)(()=>{q&&Object(r.k)(_,t=>{t.ctrl.start({default:N})})},[N]),Object(r.k)(C,(t,e)=>{if(R.current.size){const t=_.findIndex(t=>t.key===e.key);_.splice(t,1)}}),Object(r.A)(()=>{Object(r.k)(R.current.size?R.current:C,({phase:t,payload:e},n)=>{const{ctrl:r}=n;n.phase=t,null==j||j.add(r),q&&t==_t.ENTER&&r.start({default:N}),e&&(v(r,e.ref),r.ref&&!T.current?r.update(e):(r.start(e),T.current&&(T.current=!1)))})},c?void 0:n);const D=t=>s.createElement(s.Fragment,null,_.map((e,n)=>{const{springs:o}=C.get(e)||e.ctrl,a=t(i({},o),e.item,e,n);return a&&a.type?s.createElement(a.type,i({},a.props,{key:r.s.str(e.key)||r.s.num(e.key)?e.key:e.ctrl.id,ref:a.ref})):a}));return j?[D,j]:D}!function(t){t.MOUNT="mount",t.ENTER="enter",t.UPDATE="update",t.LEAVE="leave"}(_t||(_t={}));let kt=1;function St(t,{key:e,keys:n=e},s){if(null===n){const e=new Set;return t.map(t=>{const n=s&&s.find(n=>n.item===t&&n.phase!==_t.LEAVE&&!e.has(n));return n?(e.add(n),n.key):kt++})}return r.s.und(n)?t:r.s.fun(n)?t.map(n):Object(r.y)(n)}class Et extends Q{constructor(t,e){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=Object(r.f)(...e);const n=this._get(),s=Object(o.f)(n);Object(o.h)(this,s.create(n))}advance(t){const e=this._get(),n=this.get();Object(r.u)(e,n)||(Object(o.e)(this).setValue(e),this._onChange(e,this.idle)),!this.idle&&Mt(this._active)&&At(this)}_get(){const t=r.s.arr(this.source)?this.source.map(r.q):Object(r.y)(Object(r.q)(this.source));return this.calc(...t)}_start(){this.idle&&!Mt(this._active)&&(this.idle=!1,Object(r.k)(Object(o.g)(this),t=>{t.done=!1}),r.b.skipAnimation?(r.w.batchedUpdates(()=>this.advance()),At(this)):r.o.start(this))}_attach(){let t=1;Object(r.k)(Object(r.y)(this.source),e=>{Object(r.r)(e)&&Object(r.c)(e,this),U(e)&&(e.idle||this._active.add(e),t=Math.max(t,e.priority+1))}),this.priority=t,this._start()}_detach(){Object(r.k)(Object(r.y)(this.source),t=>{Object(r.r)(t)&&Object(r.x)(t,this)}),this._active.clear(),At(this)}eventObserved(t){"change"==t.type?t.idle?this.advance():(this._active.add(t.parent),this._start()):"idle"==t.type?this._active.delete(t.parent):"priority"==t.type&&(this.priority=Object(r.y)(this.source).reduce((t,e)=>Math.max(t,(U(e)?e.priority:0)+1),0))}}function Pt(t){return!1!==t.idle}function Mt(t){return!t.size||Array.from(t).every(Pt)}function At(t){t.idle||(t.idle=!0,Object(r.k)(Object(o.g)(t),t=>{t.done=!0}),Object(r.d)(t,{type:"idle",parent:t}))}r.b.assign({createStringInterpolator:r.g,to:(t,e)=>new Et(t,e)}),r.o.advance},,function(t,e){t.exports=window.regeneratorRuntime},,,function(t,e,n){"use strict";n.d(e,"animated",(function(){return _}));var r=n(42);n.o(r,"config")&&n.d(e,"config",(function(){return r.config})),n.o(r,"useSpring")&&n.d(e,"useSpring",(function(){return r.useSpring})),n.o(r,"useTransition")&&n.d(e,"useTransition",(function(){return r.useTransition}));var s=n(54),o=n(1),i=n(18);function a(t,e){if(null==t)return{};var n,r,s={},o=Object.keys(t);for(r=0;r=0||(s[n]=t[n]);return s}const c=["style","children","scrollTop","scrollLeft"],u=/^--/;function l(t,e){return null==e||"boolean"==typeof e||""===e?"":"number"!=typeof e||0===e||u.test(t)||f.hasOwnProperty(t)&&f[t]?(""+e).trim():e+"px"}const d={};let f={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const p=["Webkit","Ms","Moz","O"];f=Object.keys(f).reduce((t,e)=>(p.forEach(n=>t[((t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1))(n,e)]=t[e]),t),f);const h=["x","y","z"],m=/^(matrix|translate|scale|rotate|skew)/,b=/^(translate)/,g=/^(rotate|skew)/,y=(t,e)=>o.s.num(t)&&0!==t?t+e:t,O=(t,e)=>o.s.arr(t)?t.every(t=>O(t,e)):o.s.num(t)?t===e:parseFloat(t)===e;class v extends i.a{constructor(t){let{x:e,y:n,z:r}=t,s=a(t,h);const i=[],c=[];(e||n||r)&&(i.push([e||0,n||0,r||0]),c.push(t=>[`translate3d(${t.map(t=>y(t,"px")).join(",")})`,O(t,0)])),Object(o.l)(s,(t,e)=>{if("transform"===e)i.push([t||""]),c.push(t=>[t,""===t]);else if(m.test(e)){if(delete s[e],o.s.und(t))return;const n=b.test(e)?"px":g.test(e)?"deg":"";i.push(Object(o.y)(t)),c.push("rotate3d"===e?([t,e,r,s])=>[`rotate3d(${t},${e},${r},${y(s,n)})`,O(s,0)]:t=>[`${e}(${t.map(t=>y(t,n)).join(",")})`,O(t,e.startsWith("scale")?1:0)])}}),i.length&&(s.transform=new j(i,c)),super(s)}}class j extends o.a{constructor(t,e){super(),this._value=null,this.inputs=t,this.transforms=e}get(){return this._value||(this._value=this._get())}_get(){let t="",e=!0;return Object(o.k)(this.inputs,(n,r)=>{const s=Object(o.q)(n[0]),[i,a]=this.transforms[r](o.s.arr(s)?s:n.map(o.q));t+=" "+i,e=e&&a}),e?"none":t}observerAdded(t){1==t&&Object(o.k)(this.inputs,t=>Object(o.k)(t,t=>Object(o.r)(t)&&Object(o.c)(t,this)))}observerRemoved(t){0==t&&Object(o.k)(this.inputs,t=>Object(o.k)(t,t=>Object(o.r)(t)&&Object(o.x)(t,this)))}eventObserved(t){"change"==t.type&&(this._value=null),Object(o.d)(this,t)}}const w=["scrollTop","scrollLeft"];r.Globals.assign({batchedUpdates:s.unstable_batchedUpdates,createStringInterpolator:o.g,colors:o.e});const _=Object(i.d)(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(t,e){if(!t.nodeType||!t.setAttribute)return!1;const n="filter"===t.nodeName||t.parentNode&&"filter"===t.parentNode.nodeName,r=e,{style:s,children:o,scrollTop:i,scrollLeft:f}=r,p=a(r,c),h=Object.values(p),m=Object.keys(p).map(e=>n||t.hasAttribute(e)?e:d[e]||(d[e]=e.replace(/([A-Z])/g,t=>"-"+t.toLowerCase())));void 0!==o&&(t.textContent=o);for(let e in s)if(s.hasOwnProperty(e)){const n=l(e,s[e]);u.test(e)?t.style.setProperty(e,n):t.style[e]=n}m.forEach((e,n)=>{t.setAttribute(e,h[n])}),void 0!==i&&(t.scrollTop=i),void 0!==f&&(t.scrollLeft=f)},createAnimatedStyle:t=>new v(t),getComponentProps:t=>a(t,w)}).animated},function(t,e){},function(t,e){},,,,,function(t,e){t.exports=window.ReactDOM},function(t,e){t.exports=window.moment},function(t,e){t.exports=window.wp.autop},function(t,e){function n(t,e,n,r,s,o,i){try{var a=t[o](i),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,s)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(s,o){var i=t.apply(e,r);function a(t){n(i,s,o,a,c,"next",t)}function c(t){n(i,s,o,a,c,"throw",t)}a(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},,,,,,,,,,,function(t,e,n){"use strict";var r=n(0),s=n(9);const o=Object(r.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(s.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));e.a=o},,,,,,,,,,,,,function(t,e,n){"use strict";n.r(e);var r=n(6),s=n.n(r),o=n(0),i=n(25),a=n.n(i),c=n(41),u=n(10),l=n(11),d=n.n(l);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e0&&Object(o.createElement)(m.animated.span,{style:r,className:"simpay-branding-bar__actions-button-count","aria-label":Object(b.sprintf)(/* translators: %d Unread notification count. */ -Object(b.__)("%d unread notifications","simple-pay"),e)},Object(o.createElement)("span",null,e)),Object(o.createElement)("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.8333 2.5H4.16667C3.25 2.5 2.5 3.25 2.5 4.16667V15.8333c0 .9167.74167 1.6667 1.66667 1.6667H15.8333c.9167 0 1.6667-.75 1.6667-1.6667V4.16667C17.5 3.25 16.75 2.5 15.8333 2.5Zm0 13.3333H4.16667v-2.5h2.96666C7.70833 14.325 8.775 15 10.0083 15c1.2334 0 2.2917-.675 2.875-1.6667h2.95v2.5Zm-4.1583-4.1666h4.1583V4.16667H4.16667v7.50003h4.175c0 .9166.75 1.6666 1.66663 1.6666.9167 0 1.6667-.75 1.6667-1.6666Z",fill:"currentColor"})))},y=n(55),O=n.n(y),v=n(3),j=n(56),w="simpay-notifications-notification",_=simpayNotifications.isLite;function x(t){switch(t){case"warning":return"warning";case"error":return"dismiss";case"info":return"admin-generic";case"success":default:return"yes-alt"}}function k(t){return Object(u.getAuthority)(window.location.href)!==Object(u.getAuthority)(t)}function S(t,e,n){return!1===k(t)?t:Object(u.addQueryArgs)(t.replace(/\/?$/,"/"),{utm_source:"WordPress",utm_campaign:"1"===_?"lite-plugin":"pro-plugin",utm_medium:e,utm_content:n})}var E=function(t){var e=t.notification,n=t.onDismissNotification,r=e.id,s=e.title,i=e.content,a=e.type,c=e.start,u=e.actions,l=e.is_dismissible;return Object(o.createElement)("div",{className:w,style:{backgroundColor:l?"transparent":"#fafafa"}},Object(o.createElement)("div",{className:"".concat(w,"__icon ").concat(w,"__icon-").concat(a||"success")},Object(o.createElement)("span",{className:"dashicons dashicons-".concat(x(a))})),Object(o.createElement)("div",{className:"".concat(w,"__body")},Object(o.createElement)("div",{className:"".concat(w,"__header")},Object(o.createElement)("div",{className:"".concat(w,"__title")},s),l&&Object(o.createElement)("div",{className:"".concat(w,"__date")},O.a.unix(c).fromNow())),Object(o.createElement)("div",{className:"".concat(w,"__content"),dangerouslySetInnerHTML:{__html:Object(j.autop)(i)}}),Object(o.createElement)("div",{className:"".concat(w,"__actions")},u.map((function(t){var e=t.type,n=t.text,r=t.url;return Object(o.createElement)(v.Button,{key:n,href:S(r,"notification-inbox",s),isPrimary:"primary"===e,isSecondary:"secondary"===e,variant:e,target:k(r)?"_blank":"_self"},n)})),l&&Object(o.createElement)(v.Button,{isLink:!0,variant:"link",onClick:function(){return n(r)}},Object(b.__)("Dismiss","simple-pay")))))},P=n(57),M=n.n(P),A=n(44),I=n.n(A),C=n(13),R=n.n(C),T=n(12),N=n(20);function V(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){a=!0,o=t},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}(t?s.current:r.current);try{for(i.s();!(o=i.n()).done;)q(o.value,t)}catch(t){i.e(t)}finally{i.f()}}),[])}([Object(N.useConstrainedTabbing)(),Object(N.useFocusReturn)(),c]),l=Object(o.useState)((function(){return new WeakMap})),d=s()(l,1)[0],f=Object(T.sortBy)(i,"is_dismissible"),p=Object(m.useTransition)(f,{config:m.config.default,enter:function(t){return function(){var e=M()(I.a.mark((function e(n){return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({height:d.get(t).offsetHeight,transform:"translate3d(0%, 0px, 0px)"});case 2:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}()},leave:[{transform:"translate3d(150%, 0px, 0px)"},{height:0}],keys:function(t){return t.id},trail:100});return Object(o.createElement)(v.Animate,{type:"slide-in",options:{origin:"left"}},(function(t){var s=t.className,c=R()("simpay-notifications-panel",s);return Object(o.createElement)("div",{ref:u,className:c},Object(o.createElement)(z,{count:e.data.length,onClose:n}),Object(o.createElement)("div",{className:"simpay-notifications-panel__notifications"},a&&Object(o.createElement)("div",{className:"simpay-notifications-panel__none"},Object(o.createElement)(v.Spinner,null)),0===i.length&&!a&&Object(o.createElement)("div",{className:"simpay-notifications-panel__none"},Object(o.createElement)("span",null,Object(b.__)("You have no new notifications.","simple-pay"))),p((function(t,e){return Object(o.createElement)(m.animated.div,{style:F(F({},t),{},{overflow:"hidden"}),ref:function(t){return t&&d.set(e,t)}},Object(o.createElement)(E,{onDismissNotification:r,notification:e}))}))))}))},$=function(t){var e=t.isOpen,n=t.onClose;return Object(o.useEffect)((function(){return document.body.classList.toggle("simpay-notifications-body-locked"),function(){document.body.classList.remove("simpay-notifications-body-locked")}}),[e]),Object(o.createElement)("button",{className:"simpay-notifications-backdrop",onClick:n})};Object(o.render)(Object(o.createElement)((function(){var t=Object(o.useReducer)(h,{data:[],isLoading:!0}),e=s()(t,2),n=e[0],r=e[1],i=Object(o.useState)("#notifications"===Object(u.getFragment)(window.location.href)),l=s()(i,2),d=l[0],f=l[1];function p(){f(!1),window.history.pushState("",document.title,window.location.pathname+window.location.search)}return Object(o.useEffect)((function(){function t(){"#notifications"===Object(u.getFragment)(window.location.href)&&f(!0)}return window.addEventListener("hashchange",t),function(){window.removeEventListener("hashchange",t)}}),[]),Object(o.useEffect)((function(){if(!n.isLoading){var t=document.querySelector("#wp-admin-bar-simpay-admin-bar-test-mode .wp-ui-notification");if(0===n.data.length){t&&t.remove();var e=document.getElementById("wp-admin-bar-simpay-notifications");e&&e.remove();var r=document.querySelector('#menu-posts-simple-pay .wp-submenu a[href$="#notifications"]');r&&r.remove()}else t&&(t.textContent=n.data.length)}}),[n.data]),Object(o.useEffect)((function(){r({type:"START_RESOLUTION"}),a()({path:"/wpsp/__internal__/notifications"}).then((function(t){var e=t.data;r({type:"SET",notifications:e}),r({type:"FINISH_RESOLUTION"})}))}),[]),Object(o.createElement)("div",{onKeyDown:function(t){t.keyCode!==c.ESCAPE||t.defaultPrevented||(t.preventDefault(),f(!1))},role:"region"},Object(o.createElement)(g,{count:n.data.length,isOpen:d,onOpen:function(){f(!0),window.history.pushState("",document.title,window.location.pathname+window.location.search+"#notifications")}}),d&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(U,{notifications:n,onDismissNotification:function(t){r({type:"DISMISS",id:t}),a()({path:"/wpsp/__internal__/notifications/"+t,method:"DELETE"})},onClose:p}),Object(o.createElement)($,{onClose:p})))}),null),document.getElementById("simpay-branding-bar-notifications"))}]); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-page-activity-reports-css.min.asset.php b/includes/core/assets/js/simpay-admin-page-activity-reports-css.min.asset.php deleted file mode 100644 index 9bade784..00000000 --- a/includes/core/assets/js/simpay-admin-page-activity-reports-css.min.asset.php +++ /dev/null @@ -1 +0,0 @@ - array(), 'version' => '84c6370e57483fcf81c166f7bf531dbe'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-page-activity-reports.min.js b/includes/core/assets/js/simpay-admin-page-activity-reports.min.js deleted file mode 100644 index 5fdbe003..00000000 --- a/includes/core/assets/js/simpay-admin-page-activity-reports.min.js +++ /dev/null @@ -1,4 +0,0 @@ -!function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,function(e){return t[e]}.bind(null,a));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=78)}([function(t,e){t.exports=window.wp.element},,function(t,e){t.exports=window.wp.i18n},function(t,e){t.exports=window.wp.components},function(t,e,i){"use strict";function n(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}i.d(e,"a",(function(){return n}))},function(t,e){t.exports=window.React},function(t,e,i){var n=i(26),a=i(27),s=i(22),r=i(28);t.exports=function(t,e){return n(t)||a(t,e)||s(t,e)||r()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){"use strict";function n(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i(4);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){Object(n.a)(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===a(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},function(t,e){t.exports=window.wp.primitives},function(t,e){t.exports=window.wp.url},function(t,e,i){var n=i(30);t.exports=function(t,e,i){return(e=n(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=window.lodash},function(t,e,i){var n;!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var t=[],e=0;eArray.prototype.slice.call(t));let a=!1,s=[];return function(...i){s=n(i),a||(a=!0,l.call(window,()=>{a=!1,t.apply(e,s)}))}}const h=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function d(){}const u=function(){let t=0;return function(){return t++}}();function f(t){return null==t}function p(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function g(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const m=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function b(t,e){return m(t)?t:e}function y(t,e){return void 0===t?e:t}const x=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function v(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function _(t,e,i,n){let a,s,r;if(p(t))if(s=t.length,n)for(a=s-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;ai;)t=t[e.substr(i,n-i)],i=n+1,n=D(e,i);return t}function C(t){return t.charAt(0).toUpperCase()+t.slice(1)}const T=t=>void 0!==t,A=t=>"function"==typeof t,L=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},R=Math.PI,N=2*R,F=N+R,I=Number.POSITIVE_INFINITY,z=R/180,B=R/2,V=R/4,W=2*R/3,H=Math.log10,U=Math.sign;function Y(t){const e=Math.round(t);t=X(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(H(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function $(t){return!isNaN(parseFloat(t))&&isFinite(t)}function X(t,e,i){return Math.abs(t-e)l&&c=Math.min(e,i)-n&&t<=Math.max(e,i)+n}const st=t=>0===t||1===t,rt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*N/i),ot=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*N/i)+1,lt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*B),easeOutSine:t=>Math.sin(t*B),easeInOutSine:t=>-.5*(Math.cos(R*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>st(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>st(t)?t:rt(t,.075,.3),easeOutElastic:t=>st(t)?t:ot(t,.075,.3),easeInOutElastic(t){const e=.1125;return st(t)?t:t<.5?.5*rt(2*t,e,.45):.5+.5*ot(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-lt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*lt.easeInBounce(2*t):.5*lt.easeOutBounce(2*t-1)+.5},ct={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ht="0123456789ABCDEF",dt=t=>ht[15&t],ut=t=>ht[(240&t)>>4]+ht[15&t],ft=t=>(240&t)>>4==(15&t);function pt(t){return t+.5|0}const gt=(t,e,i)=>Math.max(Math.min(t,i),e);function mt(t){return gt(pt(2.55*t),0,255)}function bt(t){return gt(pt(255*t),0,255)}function yt(t){return gt(pt(t/2.55)/100,0,1)}function xt(t){return gt(pt(100*t),0,100)}const vt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,_t=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function wt(t,e,i){const n=e*Math.min(i,1-i),a=(e,a=(e+t/30)%12)=>i-n*Math.max(Math.min(a-3,9-a,1),-1);return[a(0),a(8),a(4)]}function Ot(t,e,i){const n=(n,a=(n+t/60)%6)=>i-i*e*Math.max(Math.min(a,4-a,1),0);return[n(5),n(3),n(1)]}function Mt(t,e,i){const n=wt(t,1,.5);let a;for(e+i>1&&(a=1/(e+i),e*=a,i*=a),a=0;a<3;a++)n[a]*=1-e-i,n[a]+=e;return n}function kt(t){const e=t.r/255,i=t.g/255,n=t.b/255,a=Math.max(e,i,n),s=Math.min(e,i,n),r=(a+s)/2;let o,l,c;return a!==s&&(c=a-s,l=r>.5?c/(2-a-s):c/(a+s),o=a===e?(i-n)/c+(i=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=bt(t[3]))):(e=At(t,{r:0,g:0,b:0,a:1})).a=bt(e.a),e}function Rt(t){return"r"===t.charAt(0)?function(t){const e=vt.exec(t);let i,n,a,s=255;if(e){if(e[7]!==i){const t=+e[7];s=255&(e[8]?mt(t):255*t)}return i=+e[1],n=+e[3],a=+e[5],i=255&(e[2]?mt(i):i),n=255&(e[4]?mt(n):n),a=255&(e[6]?mt(a):a),{r:i,g:n,b:a,a:s}}}(t):function(t){const e=_t.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?mt(+e[5]):bt(+e[5]));const a=Pt(+e[2]),s=+e[3]/100,r=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return jt(Mt,t,e,i)}(a,s,r):"hsv"===e[1]?function(t,e,i){return jt(Ot,t,e,i)}(a,s,r):St(a,s,r),{r:i[0],g:i[1],b:i[2],a:n}}(t)}class Nt{constructor(t){if(t instanceof Nt)return t;const e=typeof t;let i;var n,a,s;"object"===e?i=Lt(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?a={r:255&17*ct[n[1]],g:255&17*ct[n[2]],b:255&17*ct[n[3]],a:5===s?17*ct[n[4]]:255}:7!==s&&9!==s||(a={r:ct[n[1]]<<4|ct[n[2]],g:ct[n[3]]<<4|ct[n[4]],b:ct[n[5]]<<4|ct[n[6]],a:9===s?ct[n[7]]<<4|ct[n[8]]:255})),i=a||function(t){Ct||(Ct=function(){const t={},e=Object.keys(Et),i=Object.keys(Dt);let n,a,s,r,o;for(n=0;n>16&255,s>>8&255,255&s]}return t}(),Ct.transparent=[0,0,0,0]);const e=Ct[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||Rt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=At(this._rgb);return t&&(t.a=yt(t.a)),t}set rgb(t){this._rgb=Lt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${yt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?(t=this._rgb,e=function(t){return ft(t.r)&&ft(t.g)&&ft(t.b)&&ft(t.a)}(t)?dt:ut,t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t):this._rgb;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=kt(t),i=e[0],n=xt(e[1]),a=xt(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${a}%, ${yt(t.a)})`:`hsl(${i}, ${n}%, ${a}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,a=t.rgb;let s;const r=e===s?.5:e,o=2*r-1,l=n.a-a.a,c=((o*l==-1?o:(o+l)/(1+o*l))+1)/2;s=1-c,n.r=255&c*n.r+s*a.r+.5,n.g=255&c*n.g+s*a.g+.5,n.b=255&c*n.b+s*a.b+.5,n.a=r*n.a+(1-r)*a.a,i.rgb=n}return i}clone(){return new Nt(this.rgb)}alpha(t){return this._rgb.a=bt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=pt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Tt(this._rgb,2,t),this}darken(t){return Tt(this._rgb,2,-t),this}saturate(t){return Tt(this._rgb,1,t),this}desaturate(t){return Tt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=kt(t);i[0]=Pt(i[0]+e),i=St(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function Ft(t){return new Nt(t)}const It=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function zt(t){return It(t)?t:Ft(t)}function Bt(t){return It(t)?t:Ft(t).saturate(.5).darken(.1).hexString()}const Vt=Object.create(null),Wt=Object.create(null);function Ht(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Bt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Bt(e.borderColor),this.hoverColor=(t,e)=>Bt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return Ut(this,t,e)}get(t){return Ht(this,t)}describe(t,e){return Ut(Wt,t,e)}override(t,e){return Ut(Vt,t,e)}route(t,e,i,n){const a=Ht(this,t),s=Ht(this,i),r="_"+e;Object.defineProperties(a,{[r]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=s[n];return g(t)?Object.assign({},e,t):y(t,e)},set(t){this[r]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function $t(t,e,i,n,a){let s=e[a];return s||(s=e[a]=t.measureText(a).width,i.push(a)),s>n&&(n=s),n}function Xt(t,e,i,n){let a=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(a=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let r=0;const o=i.length;let l,c,h,d,u;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function Kt(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==s.strokeColor;let l,c;for(t.save(),t.font=a.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),f(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),l=0;ly(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of a)i[t]=+s(t)||0;return i}function ce(t){return le(t,{top:"y",right:"x",bottom:"y",left:"x"})}function he(t){return le(t,["topLeft","topRight","bottomLeft","bottomRight"])}function de(t){const e=ce(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ue(t,e){t=t||{},e=e||Yt.font;let i=y(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=y(t.style,e.style);n&&!(""+n).match(re)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const a={family:y(t.family,e.family),lineHeight:oe(y(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:y(t.weight,e.weight),string:""};return a.string=function(t){return!t||f(t.size)||f(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(a),a}function fe(t,e,i,n){let a,s,r,o=!0;for(a=0,s=t.length;at[i]1;)n=s+a>>1,i(n)?s=n:a=n;return{lo:s,hi:a}}const me=(t,e,i)=>ge(t,i,n=>t[n][e]ge(t,i,n=>t[n][e]>=i),ye=["push","pop","shift","splice","unshift"];function xe(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,a=n.indexOf(e);-1!==a&&n.splice(a,1),n.length>0||(ye.forEach(e=>{delete t[e]}),delete t._chartjs)}function ve(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){T(n)||(n=Te("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:a,override:a=>_e([a,...t],e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>je(i,n,()=>function(t,e,i,n){let a;for(const s of e)if(a=Te(Me(s,t),i),T(a))return ke(t,a)?Ee(i,n,t,a):a}(n,e,t,i)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ae(t).includes(e),ownKeys:t=>Ae(t),set(t,e,i){const n=t._storage||(t._storage=a());return t[e]=n[e]=i,delete t._keys,!0}})}function we(t,e,i,n){const a={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Oe(t,n),setContext:e=>we(t,e,i,n),override:a=>we(t.override(a),e,i,n)};return new Proxy(a,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>je(t,e,()=>function(t,e,i){const{_proxy:n,_context:a,_subProxy:s,_descriptors:r}=t;let o=n[e];return A(o)&&r.isScriptable(e)&&(o=function(t,e,i,n){const{_proxy:a,_context:s,_subProxy:r,_stack:o}=i;if(o.has(t))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);return o.add(t),e=e(s,r||n),o.delete(t),ke(t,e)&&(e=Ee(a._scopes,a,t,e)),e}(e,o,t,i)),p(o)&&o.length&&(o=function(t,e,i,n){const{_proxy:a,_context:s,_subProxy:r,_descriptors:o}=i;if(T(s.index)&&n(t))e=e[s.index%e.length];else if(g(e[0])){const i=e,n=a._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=Ee(n,a,t,l);e.push(we(i,s,r&&r[t],o))}}return e}(e,o,t,r.isIndexable)),ke(e,o)&&(o=we(o,a,s&&s[e],r)),o}(t,e,i)),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Oe(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:a=e.allKeys}=t;return{allKeys:a,scriptable:i,indexable:n,isScriptable:A(i)?i:()=>i,isIndexable:A(n)?n:()=>n}}const Me=(t,e)=>t?t+C(e):e,ke=(t,e)=>g(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function je(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Se(t,e,i){return A(t)?t(e,i):t}const Pe=(t,e)=>!0===t?e:"string"==typeof t?E(e,t):void 0;function De(t,e,i,n,a){for(const s of e){const e=Pe(i,s);if(e){t.add(e);const s=Se(e._fallback,i,a);if(T(s)&&s!==i&&s!==n)return s}else if(!1===e&&T(n)&&i!==n)return null}return!1}function Ee(t,e,i,n){const a=e._rootScopes,s=Se(e._fallback,i,n),r=[...t,...a],o=new Set;o.add(n);let l=Ce(o,r,i,s||i,n);return null!==l&&(!T(s)||s===i||(l=Ce(o,r,s,l,n),null!==l))&&_e(Array.from(o),[""],a,s,()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const a=n[e];return p(a)&&g(i)?i:a}(e,i,n))}function Ce(t,e,i,n,a){for(;i;)i=De(t,e,i,n,a);return i}function Te(t,e){for(const i of e){if(!i)continue;const e=i[t];if(T(e))return e}}function Ae(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}const Le=Number.EPSILON||1e-14,Re=(t,e)=>e"x"===t?"y":"x";function Fe(t,e,i,n){const a=t.skip?e:t,s=e,r=i.skip?e:i,o=J(s,a),l=J(r,s);let c=o/(o+l),h=l/(o+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:s.x-d*(r.x-a.x),y:s.y-d*(r.y-a.y)},next:{x:s.x+u*(r.x-a.x),y:s.y+u*(r.y-a.y)}}}function Ie(t,e,i){return Math.max(Math.min(t,i),e)}function ze(t,e,i,n,a){let s,r,o,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const i=Ne(e),n=t.length,a=Array(n).fill(0),s=Array(n);let r,o,l,c=Re(t,0);for(r=0;rwindow.getComputedStyle(t,null),Ue=["top","right","bottom","left"];function Ye(t,e,i){const n={};i=i?"-"+i:"";for(let a=0;a<4;a++){const s=Ue[a];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function $e(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,a=He(i),s="border-box"===a.boxSizing,r=Ye(a,"padding"),o=Ye(a,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,a=n&&n.length?n[0]:i,{offsetX:s,offsetY:r}=a;let o,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,r,i.target))o=s,l=r;else{const t=e.getBoundingClientRect();o=a.clientX-t.left,l=a.clientY-t.top,c=!0}return{x:o,y:l,box:c}}(t,i),d=r.left+(h&&o.left),u=r.top+(h&&o.top);let{width:f,height:p}=e;return s&&(f-=r.width+o.width,p-=r.height+o.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/p*i.height/n)}}const Xe=t=>Math.round(10*t)/10;function qe(t,e,i){const n=e||1,a=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=a/n,t.width=s/n;const r=t.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=t.height+"px",r.style.width=t.width+"px"),(t.currentDevicePixelRatio!==n||r.height!==a||r.width!==s)&&(t.currentDevicePixelRatio=n,r.height=a,r.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Ge=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Qe(t,e){const i=function(t,e){return He(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Ke(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Ze(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function Je(t,e,i,n){const a={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},r=Ke(t,a,i),o=Ke(a,s,i),l=Ke(s,e,i),c=Ke(r,o,i),h=Ke(o,l,i);return Ke(c,h,i)}const ti=new Map;function ei(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ti.get(i);return n||(n=new Intl.NumberFormat(t,e),ti.set(i,n)),n}(e,i).format(t)}function ii(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function ni(t){return"angle"===t?{between:it,compare:tt,normalize:et}:{between:at,compare:(t,e)=>t-e,normalize:t=>t}}function ai({start:t,end:e,count:i,loop:n,style:a}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:a}}function si(t,e,i){if(!i)return[t];const{property:n,start:a,end:s}=i,r=e.length,{compare:o,between:l,normalize:c}=ni(n),{start:h,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:a,end:s}=i,{between:r,normalize:o}=ni(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;cn({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=l.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const a=i.items;let s,r=a.length-1,o=!1;for(;r>=0;--r)s=a[r],s._active?(s._total>i.duration&&(i.duration=s._total),s.tick(t),o=!0):(a[r]=a[a.length-1],a.pop());o&&(n.draw(),this._notify(n,i,t,"progress")),a.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=a.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const hi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=zt(t||"transparent"),a=n.valid&&zt(e||"transparent");return a&&a.valid?a.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class di{constructor(t,e,i,n){const a=e[i];n=fe([t.to,n,a,t.from]);const s=fe([t.from,a,n]);this._active=!0,this._fn=t.fn||hi[t.type||typeof s],this._easing=lt[t.easing]||lt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],a=i-this._start,s=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=fe([t.to,e,n,t.from]),this._from=fe([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,a=this._from,s=this._loop,r=this._to;let o;if(this._active=a!==r&&(s||e1?2-o:o,o=this._easing(Math.min(1,Math.max(0,o))),this._target[n]=this._fn(a,r,o))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),Yt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),Yt.describe("animations",{_fallback:"animation"}),Yt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class fi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!g(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const n=t[i];if(!g(n))return;const a={};for(const t of ui)a[t]=n[t];(p(n.properties)&&n.properties||[i]).forEach(t=>{t!==i&&e.has(t)||e.set(t,a)})})}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const a=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i},()=>{}),a}_createAnimations(t,e){const i=this._properties,n=[],a=t.$animations||(t.$animations={}),s=Object.keys(e),r=Date.now();let o;for(o=s.length-1;o>=0;--o){const l=s[o];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=a[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,r);continue}h.cancel()}d&&d.duration?(a[l]=h=new di(d,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ci.add(this._chart,i),!0):void 0}}function pi(t,e){const i=t&&t.options||{},n=i.reverse,a=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:a,end:n?a:s}}function gi(t,e){const i=[],n=t._getSortedDatasetMetas(e);let a,s;for(a=0,s=n.length;a0||!i&&e<0)return a.index}return null}function vi(t,e){const{chart:i,_cachedMeta:n}=t,a=i._stacks||(i._stacks={}),{iScale:s,vScale:r,index:o}=n,l=s.axis,c=r.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,r,n),d=e.length;let u;for(let t=0;ti[t].axis===e).shift()}function wi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const Oi=t=>"reset"===t||"none"===t,Mi=(t,e)=>e?t:Object.assign({},t);class ki{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=bi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&wi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,a=e.xAxisID=y(i.xAxisID,_i(t,"x")),s=e.yAxisID=y(i.yAxisID,_i(t,"y")),r=e.rAxisID=y(i.rAxisID,_i(t,"r")),o=e.indexAxis,l=e.iAxisID=n(o,a,s,r),c=e.vAxisID=n(o,s,a,r);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&xe(this._data,this),t._stacked&&wi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(g(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,a,s;for(n=0,a=e.length;n{const e="_onData"+C(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const a=i.apply(this,t);return n._chartjs.listeners.forEach(i=>{"function"==typeof i[e]&&i[e](...t)}),a}})}))),this._syncList=[],this._data=e}var n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const a=e._stacked;e._stacked=bi(e.vScale,e),e.stack!==i.stack&&(n=!0,wi(e),e.stack=i.stack),this._resyncElements(t),(n||a!==e._stacked)&&vi(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:a,_stacked:s}=i,r=a.axis;let o,l,c,h=0===t&&e===n.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=p(n[t])?this.parseArrayData(i,n,t,e):g(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const a=()=>null===l[r]||d&&l[r]t&&!e.hidden&&e._stacked&&{keys:gi(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:a}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:a?i:Number.POSITIVE_INFINITY}}(r);let d,u;function f(){u=n[d];const e=u[r.axis];return!m(u[t.axis])||c>e||h=0;--d)if(!f()){this.updateRangeFromParsed(l,t,u,o);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,a,s;for(n=0,a=e.length;n=0&&tthis.getContext(i,n),h);return f.$shared&&(f.$shared=o,a[s]=Object.freeze(Mi(f,o))),f}_resolveAnimations(t,e,i){const n=this.chart,a=this._cachedDataOpts,s="animation-"+e,r=a[s];if(r)return r;let o;if(!1!==n.options.animation){const n=this.chart.config,a=n.datasetAnimationScopeKeys(this._type,e),s=n.getOptionScopes(this.getDataset(),a);o=n.createResolver(s,this.getContext(t,i,e))}const l=new fi(n,o&&o.animations);return o&&o._cacheable&&(a[s]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Oi(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){Oi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Oi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const a=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,a=e.length,s=Math.min(a,n);s&&this.parse(0,s),a>n?this._insertElements(n,a-n,t):a{for(t.length+=e,r=t.length-1;r>=s;r--)t[r]=t[r-e]};for(o(a),r=t;rt-e))}return t._cache.$bar}(e,t.type);let n,a,s,r,o=e._length;const l=()=>{32767!==s&&-32768!==s&&(T(r)&&(o=Math.min(o,Math.abs(s-r)||o)),r=s)};for(n=0,a=i.length;nMath.abs(o)&&(l=o,c=r),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:a,end:s,min:r,max:o}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Pi(t,e,i,n){const a=t.iScale,s=t.vScale,r=a.getLabels(),o=a===s,l=[];let c,h,d,u;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,s)*a,d===s&&(m-=h/2),c=m+h),m===e.getPixelForValue(s)){const t=U(h)*e.getLineWidthForValue(s)/2;m+=t,h-=t}return{size:h,base:m,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,a=n.skipNull,s=y(n.maxBarThickness,1/0);let r,o;if(e.grouped){const i=a?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const a=e.pixels,s=a[t];let r=t>0?a[t-1]:null,o=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,a=this.getParsed(t),s=i.getLabelForValue(a.x),r=n.getLabelForValue(a.y),o=a._custom;return{label:e.label,value:"("+s+", "+r+(o?", "+o:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const a="reset"===n,{iScale:s,vScale:r}=this._cachedMeta,o=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(o),c=this.includeOptions(n,l),h=s.axis,d=r.axis;for(let o=e;o""}}}};class Ni extends ki{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let a,s,r=t=>+i[t];if(g(i[t])){const{key:t="value"}=this._parsing;r=e=>+E(i[e],t)}for(a=t,s=t+e;ait(t,o,l,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>it(t,o,l,!0)?-1:Math.min(e,e*i,n,n*i),g=f(0,c,d),m=f(B,h,u),b=p(R,c,d),y=p(R+B,h,u);n=(g-b)/2,a=(m-y)/2,s=-(g+b)/2,r=-(m+y)/2}return{ratioX:n,ratioY:a,offsetX:s,offsetY:r}}(u,d,o),b=(i.width-s)/f,y=(i.height-s)/p,v=Math.max(Math.min(b,y)/2,0),_=x(this.options.radius,v),w=(_-Math.max(_*o,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*_,this.offsetY=m*_,n.total=this.calculateTotal(),this.outerRadius=_-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*h,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,a=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*a/N)}updateElements(t,e,i,n){const a="reset"===n,s=this.chart,r=s.chartArea,o=s.options.animation,l=(r.left+r.right)/2,c=(r.top+r.bottom)/2,h=a&&o.animateScale,d=h?0:this.innerRadius,u=h?0:this.outerRadius,f=this.resolveDataElementOptions(e,n),p=this.getSharedOptions(f),g=this.includeOptions(n,p);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?N*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=ei(e._parsed[t],i.options.locale);return{label:n[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,a,s,r,o;if(!t)for(n=0,a=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ni.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,n)=>{const a=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return p(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Fi extends ki{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:a}=e,s=this.chart._animationsDisabled;let{start:r,count:o}=function(t,e,i){const n=e.length;let a=0,s=n;if(t._sorted){const{iScale:r,_parsed:o}=t,l=r.axis,{min:c,max:h,minDefined:d,maxDefined:u}=r.getUserBounds();d&&(a=nt(Math.min(me(o,r.axis,c).lo,i?n:me(e,l,r.getPixelForValue(c)).lo),0,n-1)),s=u?nt(Math.max(me(o,r.axis,h).hi+1,i?0:me(e,l,r.getPixelForValue(h)).hi+1),a,n)-a:n-a}return{start:a,count:s}}(e,n,s);this._drawStart=r,this._drawCount=o,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,a={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=a,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,a),s}(e)&&(r=0,o=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:l},t),this.updateElements(n,r,o,t)}updateElements(t,e,i,n){const a="reset"===n,{iScale:s,vScale:r,_stacked:o,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),d=this.includeOptions(n,h),u=s.axis,p=r.axis,{spanGaps:g,segment:m}=this.options,b=$(g)?g:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||"none"===n;let x=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[u]-x[u]>b,m&&(g.parsed=i,g.raw=l.data[c]),d&&(g.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),y||this.updateElement(e,c,g,n),x=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const a=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Fi.id="line",Fi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Fi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Ii extends ki{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=ei(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:a}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(n/2,0),s=(a-Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=a-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,e,i,n){const a="reset"===n,s=this.chart,r=this.getDataset(),o=s.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,d=l.getIndexAngle(0)-.5*R;let u,f=d;const p=360/this.countVisibleElements();for(u=0;u{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++}),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?G(this.resolveDataElementOptions(t,e).angle||i):0}}Ii.id="polarArea",Ii.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Ii.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,n)=>{const a=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class zi extends Ni{}zi.id="pie",zi.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Bi extends ki{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],a=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const s={_loop:!0,_fullLoop:a.length===n.length,options:e};this.updateElement(i,void 0,s,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const a=this.getDataset(),s=this._cachedMeta.rScale,r="reset"===n;for(let o=e;o"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};class Hi{constructor(t){this.options=t||{}}formats(){return Wi()}parse(t,e){return Wi()}format(t,e){return Wi()}add(t,e,i){return Wi()}diff(t,e,i){return Wi()}startOf(t,e,i){return Wi()}endOf(t,e){return Wi()}}Hi.override=function(t){Object.assign(Hi.prototype,t)};var Ui={_date:Hi};function Yi(t,e){return"native"in t?{x:t.x,y:t.y}:$e(t,e)}function $i(t,e,i,n){const{controller:a,data:s,_sorted:r}=t,o=a._cachedMeta.iScale;if(o&&e===o.axis&&"r"!==e&&r&&s.length){const t=o._reversePixels?be:me;if(!n)return t(s,e,i);if(a._sharedOptions){const n=s[0],a="function"==typeof n.getRange&&n.getRange(e);if(a){const n=t(s,e,i-a),r=t(s,e,i+a);return{lo:n.lo,hi:r.hi}}}}return{lo:0,hi:s.length-1}}function Xi(t,e,i,n,a){const s=t.getSortedVisibleDatasetMetas(),r=i[e];for(let t=0,i=s.length;t{t[o](a[r],n)&&s.push({element:t,datasetIndex:e,index:i}),t.inRange(a.x,a.y,n)&&(l=!0)}),i.intersect&&!l?[]:s}var Ki={modes:{index(t,e,i,n){const a=Yi(e,t),s=i.axis||"x",r=i.intersect?qi(t,a,s,n):Gi(t,a,s,!1,n),o=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&o.push({element:i,datasetIndex:t.index,index:e})}),o):[]},dataset(t,e,i,n){const a=Yi(e,t),s=i.axis||"xy";let r=i.intersect?qi(t,a,s,n):Gi(t,a,s,!1,n);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;tqi(t,Yi(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>Gi(t,Yi(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>Qi(t,e,{axis:"x",intersect:i.intersect},n),y:(t,e,i,n)=>Qi(t,e,{axis:"y",intersect:i.intersect},n)}};const Zi=["left","top","right","bottom"];function Ji(t,e){return t.filter(t=>t.pos===e)}function tn(t,e){return t.filter(t=>-1===Zi.indexOf(t.pos)&&t.box.axis===e)}function en(t,e){return t.sort((t,i)=>{const n=e?i:t,a=e?t:i;return n.weight===a.weight?n.index-a.index:n.weight-a.weight})}function nn(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function an(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function sn(t,e,i,n){const{pos:a,box:s}=i,r=t.maxPadding;if(!g(a)){i.size&&(t[a]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?s.height:s.width),i.size=e.size/e.count,t[a]+=i.size}s.getPadding&&an(r,s.getPadding());const o=Math.max(0,e.outerWidth-nn(r,t,"left","right")),l=Math.max(0,e.outerHeight-nn(r,t,"top","bottom")),c=o!==t.w,h=l!==t.h;return t.w=o,t.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function rn(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{n[t]=Math.max(e[t],i[t])}),n}(t?["left","right"]:["top","bottom"])}function on(t,e,i,n){const a=[];let s,r,o,l,c,h;for(s=0,r=t.length,c=0;st.box.fullSize),!0),n=en(Ji(e,"left"),!0),a=en(Ji(e,"right")),s=en(Ji(e,"top"),!0),r=en(Ji(e,"bottom")),o=tn(e,"x"),l=tn(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:a.concat(l).concat(r).concat(o),chartArea:Ji(e,"chartArea"),vertical:n.concat(a).concat(l),horizontal:s.concat(r).concat(o)}}(t.boxes),l=o.vertical,c=o.horizontal;_(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const h=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:a,availableWidth:s,availableHeight:r,vBoxMaxWidth:s/2/h,hBoxMaxHeight:r/2}),u=Object.assign({},a);an(u,de(n));const f=Object.assign({maxPadding:u,w:s,h:r,x:a.left,y:a.top},a),p=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:a}=i;if(!t||!Zi.includes(n))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:a}=e;let s,r,o;for(s=0,r=t.length;s{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class dn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class un extends dn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const fn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},pn=t=>null===t||""===t,gn=!!Ge&&{passive:!0};function mn(t,e,i){t.canvas.removeEventListener(e,i,gn)}function bn(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function yn(t,e,i){const n=t.canvas,a=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||bn(i.addedNodes,n),e=e&&!bn(i.removedNodes,n);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}function xn(t,e,i){const n=t.canvas,a=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||bn(i.removedNodes,n),e=e&&!bn(i.addedNodes,n);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}const vn=new Map;let wn=0;function On(){const t=window.devicePixelRatio;t!==wn&&(wn=t,vn.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function Mn(t,e,i){const n=t.canvas,a=n&&Ve(n);if(!a)return;const s=c((t,e)=>{const n=a.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||s(i,n)});return r.observe(a),function(t,e){vn.size||window.addEventListener("resize",On),vn.set(t,e)}(t,s),r}function kn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){vn.delete(t),vn.size||window.removeEventListener("resize",On)}(t)}function jn(t,e,i){const n=t.canvas,a=c(e=>{null!==t.ctx&&i(function(t,e){const i=fn[t.type]||t.type,{x:n,y:a}=$e(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==a?a:null}}(e,t))},t,t=>{const e=t[0];return[e,e.offsetX,e.offsetY]});return function(t,e,i){t.addEventListener(e,i,gn)}(n,e,a),a}class Sn extends dn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),a=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:a,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",pn(a)){const e=Qe(t,"width");void 0!==e&&(t.width=e)}if(pn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Qe(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach(t=>{const n=i[t];f(n)?e.removeAttribute(t):e.setAttribute(t,n)});const n=i.style||{};return Object.keys(n).forEach(t=>{e.style[t]=n[t]}),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),a={attach:yn,detach:xn,resize:Mn}[e]||jn;n[e]=a(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:kn,detach:kn,resize:kn}[e]||mn)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return function(t,e,i,n){const a=He(t),s=Ye(a,"margin"),r=We(a.maxWidth,t,"clientWidth")||I,o=We(a.maxHeight,t,"clientHeight")||I,l=function(t,e,i){let n,a;if(void 0===e||void 0===i){const s=Ve(t);if(s){const t=s.getBoundingClientRect(),r=He(s),o=Ye(r,"border","width"),l=Ye(r,"padding");e=t.width-l.width-o.width,i=t.height-l.height-o.height,n=We(r.maxWidth,s,"clientWidth"),a=We(r.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||I,maxHeight:a||I}}(t,e,i);let{width:c,height:h}=l;if("content-box"===a.boxSizing){const t=Ye(a,"border","width"),e=Ye(a,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-s.width),h=Math.max(0,n?Math.floor(c/n):h-s.height),c=Xe(Math.min(c,r,l.maxWidth)),h=Xe(Math.min(h,o,l.maxHeight)),c&&!h&&(h=Xe(c/2)),{width:c,height:h}}(t,e,i,n)}isAttached(t){const e=Ve(t);return!(!e||!e.isConnected)}}class Pn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return $(this.x)&&$(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),n}}Pn.defaults={},Pn.defaultRoutes=void 0;const Dn={values:t=>p(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let a,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(a="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const r=H(Math.abs(s)),o=Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:a,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),ei(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(H(t)));return 1===n||2===n||5===n?Dn.numeric.call(this,t,e,i):""}};var En={formatters:Dn};function Cn(t,e,i,n,a){const s=y(n,0),r=Math.min(y(a,t.length),t.length);let o,l,c,h=0;for(i=Math.ceil(i),a&&(o=a-n,i=o/Math.floor(o/i)),c=s;c<0;)h++,c=Math.round(s+h*i);for(l=Math.max(s,0);le.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:En.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),Yt.route("scale.ticks","color","","color"),Yt.route("scale.grid","color","","borderColor"),Yt.route("scale.grid","borderColor","","borderColor"),Yt.route("scale.title","color","","color"),Yt.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),Yt.describe("scales",{_fallback:"scale"}),Yt.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Tn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function An(t,e){const i=[],n=t.length/e,a=t.length;let s=0;for(;sr+1e-6)))return l}function Rn(t){return t.drawTicks?t.tickLength:0}function Nn(t,e){if(!t.display)return 0;const i=ue(t.font,e),n=de(t.padding);return(p(t.text)?t.text.length:1)*i.lineHeight+n.height}function Fn(t,e,i){let n=(t=>"start"===t?"left":"end"===t?"right":"center")(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class In extends Pn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=b(t,Number.POSITIVE_INFINITY),e=b(e,Number.NEGATIVE_INFINITY),i=b(i,Number.POSITIVE_INFINITY),n=b(n,Number.NEGATIVE_INFINITY),{min:b(t,i),max:b(e,n),minDefined:m(t),maxDefined:m(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:a,maxDefined:s}=this.getUserBounds();if(a&&s)return{min:i,max:n};const r=this.getMatchingVisibleMetas();for(let o=0,l=r.length;on?n:i,n=a&&i>n?i:n,{min:b(i,b(n,i)),max:b(n,b(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){v(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:a,ticks:s}=this.options,r=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:a}=t,s=x(e,(a-n)/2),r=(t,e)=>i&&0===t?0:t+e;return{min:r(n,-Math.abs(s)),max:r(a,s)}}(this,a,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const o=rn)return function(t,e,i,n){let a,s=0,r=i[0];for(n=Math.ceil(n),a=0;at-e).pop(),e}(n);for(let t=0,e=s.length-1;ta)return e}return Math.max(a,1)}(a,e,n);if(s>0){let t,i;const n=s>1?Math.round((o-r)/(s-1)):null;for(Cn(e,l,c,f(n)?0:r-n,r),t=0,i=s-1;t=a||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,d=c.highest.height,u=nt(this.chart.width-h,0,this.maxWidth);s=t.offset?this.maxWidth/i:u/(i-1),h+6>s&&(s=u/(i-(t.offset?.5:1)),r=this.maxHeight-Rn(t.grid)-e.padding-Nn(t.title,this.chart.options.font),o=Math.sqrt(h*h+d*d),l=Q(Math.min(Math.asin(nt((c.highest.height+6)/s,-1,1)),Math.asin(nt(r/o,-1,1))-Math.asin(nt(d/o,-1,1)))),l=Math.max(n,Math.min(a,l))),this.labelRotation=l}afterCalculateLabelRotation(){v(this.options.afterCalculateLabelRotation,[this])}beforeFit(){v(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:a}}=this,s=this._isVisible(),r=this.isHorizontal();if(s){const s=Nn(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=Rn(a)+s):(t.height=this.maxHeight,t.width=Rn(a)+s),i.display&&this.ticks.length){const{first:e,last:n,widest:a,highest:s}=this._getLabelSizes(),o=2*i.padding,l=G(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(r){const e=i.mirror?0:h*a.width+c*s.height;t.height=Math.min(this.maxHeight,t.height+e+o)}else{const e=i.mirror?0:c*a.width+h*s.height;t.width=Math.min(this.maxWidth,t.width+e+o)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:a,padding:s},position:r}=this.options,o=0!==this.labelRotation,l="top"!==r&&"x"===this.axis;if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;o?l?(h=n*t.width,d=i*e.height):(h=i*t.height,d=n*e.width):"start"===a?d=e.width:"end"===a?h=t.width:(h=t.width/2,d=e.width/2),this.paddingLeft=Math.max((h-r+s)*this.width/(this.width-r),0),this.paddingRight=Math.max((d-c+s)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===a?(i=0,n=t.height):"end"===a&&(i=e.height,n=0),this.paddingTop=i+s,this.paddingBottom=n+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){v(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let a;if(n>e){for(a=0;a({width:a[t]||0,height:s[t]||0});return{first:M(0),last:M(e-1),widest:M(w),highest:M(O),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return nt(this._alignToPixels?qt(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&tr*n?r/i:o/n:o*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:a,position:s}=n,r=a.offset,o=this.isHorizontal(),l=this.ticks.length+(r?1:0),c=Rn(a),h=[],d=a.setContext(this.getContext()),u=d.drawBorder?d.borderWidth:0,f=u/2,p=function(t){return qt(i,t,u)};let m,b,x,v,_,w,O,M,k,j,S,P;if("top"===s)m=p(this.bottom),w=this.bottom-c,M=m-f,j=p(t.top)+f,P=t.bottom;else if("bottom"===s)m=p(this.top),j=t.top,P=p(t.bottom)-f,w=m+f,M=this.top+c;else if("left"===s)m=p(this.right),_=this.right-c,O=m-f,k=p(t.left)+f,S=t.right;else if("right"===s)m=p(this.left),k=t.left,S=p(t.right)-f,_=m+f,O=this.left+c;else if("x"===e){if("center"===s)m=p((t.top+t.bottom)/2+.5);else if(g(s)){const t=Object.keys(s)[0],e=s[t];m=p(this.chart.scales[t].getPixelForValue(e))}j=t.top,P=t.bottom,w=m+f,M=w+c}else if("y"===e){if("center"===s)m=p((t.left+t.right)/2);else if(g(s)){const t=Object.keys(s)[0],e=s[t];m=p(this.chart.scales[t].getPixelForValue(e))}_=m-f,O=_-c,k=t.left,S=t.right}const D=y(n.ticks.maxTicksLimit,l),E=Math.max(1,Math.ceil(l/D));for(b=0;be.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,s;const r=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(a=0,s=n.length;a{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let a,s;for(a=0,s=e.length;a{const n=i.split("."),a=n.pop(),s=[t].concat(n).join("."),r=e[i].split("."),o=r.pop(),l=r.join(".");Yt.route(s,a,l,o)})}(e,t.defaultRoutes),t.descriptors&&Yt.describe(e,t.descriptors)}(t,s,i),this.override&&Yt.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in Yt[n]&&(delete Yt[n][i],this.override&&delete Vt[i])}}var Bn=new class{constructor(){this.controllers=new zn(ki,"datasets",!0),this.elements=new zn(Pn,"elements"),this.plugins=new zn(Object,"plugins"),this.scales=new zn(In,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):_(e,e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)})})}_exec(t,e,i){const n=C(t);v(i["before"+n],[],i),e[t](i),v(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Wn(t,e){return e||!1!==t?!0===t?{}:t:null}function Hn(t,e,i,n){const a=t.pluginScopeKeys(e),s=t.getOptionScopes(i,a);return t.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Un(t,e){const i=Yt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Yn(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function $n(t){const e=t.options||(t.options={});e.plugins=y(e.plugins,{}),e.scales=function(t,e){const i=Vt[t.type]||{scales:{}},n=e.scales||{},a=Un(t.type,e),s=Object.create(null),r=Object.create(null);return Object.keys(n).forEach(t=>{const e=n[t];if(!g(e))return console.error("Invalid scale configuration for scale: "+t);if(e._proxy)return console.warn("Ignoring resolver passed as options for scale: "+t);const o=Yn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(o,a),c=i.scales||{};s[o]=s[o]||t,r[t]=S(Object.create(null),[{axis:o},e,c[o],c[l]])}),t.data.datasets.forEach(i=>{const a=i.type||t.type,o=i.indexAxis||Un(a,e),l=(Vt[a]||{}).scales||{};Object.keys(l).forEach(t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,o),a=i[e+"AxisID"]||s[e]||e;r[a]=r[a]||Object.create(null),S(r[a],[{axis:e},n[a],l[t]])})}),Object.keys(r).forEach(t=>{const e=r[t];S(e,[Yt.scales[e.type],Yt.scale])}),r}(t,e)}function Xn(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const qn=new Map,Gn=new Set;function Qn(t,e){let i=qn.get(t);return i||(i=e(),qn.set(t,i),Gn.add(i)),i}const Kn=(t,e,i)=>{const n=E(e,i);void 0!==n&&t.add(n)};class Zn{constructor(t){this._config=function(t){return(t=t||{}).data=Xn(t.data),$n(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Xn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),$n(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Qn(t,()=>[["datasets."+t,""]])}datasetAnimationScopeKeys(t,e){return Qn(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,"transitions."+e],["datasets."+t,""]])}datasetElementScopeKeys(t,e){return Qn(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,"datasets."+t,"elements."+e,""]])}pluginScopeKeys(t){const e=t.id;return Qn(`${this.type}-plugin-${e}`,()=>[["plugins."+e,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:a}=this,s=this._cachedScopes(t,i),r=s.get(e);if(r)return r;const o=new Set;e.forEach(e=>{t&&(o.add(t),e.forEach(e=>Kn(o,t,e))),e.forEach(t=>Kn(o,n,t)),e.forEach(t=>Kn(o,Vt[a]||{},t)),e.forEach(t=>Kn(o,Yt,t)),e.forEach(t=>Kn(o,Wt,t))});const l=Array.from(o);return 0===l.length&&l.push(Object.create(null)),Gn.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Vt[e]||{},Yt.datasets[e]||{},{type:e},Yt,Wt]}resolveNamedOptions(t,e,i,n=[""]){const a={$shared:!0},{resolver:s,subPrefixes:r}=Jn(this._resolverCache,t,n);let o=s;(function(t,e){const{isScriptable:i,isIndexable:n}=Oe(t);for(const a of e){const e=i(a),s=n(a),r=(s||e)&&t[a];if(e&&(A(r)||ta(r))||s&&p(r))return!0}return!1})(s,e)&&(a.$shared=!1,o=we(s,i=A(i)?i():i,this.createResolver(t,i,r)));for(const t of e)a[t]=o[t];return a}createResolver(t,e,i=[""],n){const{resolver:a}=Jn(this._resolverCache,t,i);return g(e)?we(a,e,void 0,n):a}}function Jn(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const a=i.join();let s=n.get(a);return s||(s={resolver:_e(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},n.set(a,s)),s}const ta=t=>g(t)&&Object.getOwnPropertyNames(t).reduce((e,i)=>e||A(t[i]),!1),ea=["top","bottom","left","right","chartArea"];function ia(t,e){return"top"===t||"bottom"===t||-1===ea.indexOf(t)&&"x"===e}function na(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function aa(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),v(i&&i.onComplete,[t],e)}function sa(t){const e=t.chart,i=e.options.animation;v(i&&i.onProgress,[t],e)}function ra(t){return Be()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const oa={},la=t=>{const e=ra(t);return Object.values(oa).filter(t=>t.canvas===e).pop()};function ca(t,e,i){const n=Object.keys(t);for(const a of n){const n=+a;if(n>=e){const s=t[a];delete t[a],(i>0||n>e)&&(t[n+i]=s)}}}class ha{constructor(t,e){const i=this.config=new Zn(e),n=ra(t),a=la(n);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Be()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?un:Sn}(n)),this.platform.updateConfig(i);const r=this.platform.acquireContext(n,s.aspectRatio),o=r&&r.canvas,l=o&&o.height,c=o&&o.width;this.id=u(),this.ctx=r,this.canvas=o,this.width=c,this.height=l,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Vn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}(t=>this.update(t),s.resizeDelay||0),this._dataChanges=[],oa[this.id]=this,r&&o?(ci.listen(this,"complete",aa),ci.listen(this,"progress",sa),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:a}=this;return f(t)?e&&a?a:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():qe(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Gt(this.canvas,this.ctx),this}stop(){return ci.stop(this),this}resize(t,e){ci.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(n,t,e,a),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),o=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,qe(this,r,!0)&&(this.notifyPlugins("resize",{size:s}),v(i.onResize,[this,s],this),this.attached&&this._doResize(o)&&this.render())}ensureScalesHaveIDs(){_(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{});let a=[];e&&(a=a.concat(Object.keys(e).map(t=>{const i=e[t],n=Yn(t,i),a="r"===n,s="x"===n;return{options:i,dposition:a?"chartArea":s?"bottom":"left",dtype:a?"radialLinear":s?"category":"linear"}}))),_(a,e=>{const a=e.options,s=a.id,r=Yn(s,a),o=y(a.type,e.dtype);void 0!==a.position&&ia(a.position,r)===ia(e.dposition)||(a.position=e.dposition),n[s]=!0;let l=null;s in i&&i[s].type===o?l=i[s]:(l=new(Bn.getScale(o))({id:s,type:o,ctx:this.ctx,chart:this}),i[l.id]=l),l.init(a,t)}),_(n,(t,e)=>{t||delete i[e]}),_(i,t=>{hn.configure(this,t,t.options),hn.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let t=0,e=this.data.datasets.length;t{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(na("z","_idx"));const{_active:r,_lastEvent:o}=this;o?this._eventHandler(o,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){_(this.scales,t=>{hn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);L(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:a}of e)ca(t,n,"_removeElements"===i?-a:a)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),n=i(0);for(let t=1;tt.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;hn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],_(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,a=this.chartArea,s={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",s)&&(n&&Zt(e,{left:!1===i.left?0:a.left-i.left,right:!1===i.right?this.width:a.right+i.right,top:!1===i.top?0:a.top-i.top,bottom:!1===i.bottom?this.height:a.bottom+i.bottom}),t.controller.draw(),n&&Jt(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}getElementsAtEventForMode(t,e,i,n){const a=Ki.modes[e];return"function"==typeof a?a(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(t=>t&&t._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=pe(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,n);T(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(a,{visible:i}),this.update(e=>e.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ci.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};_(this.options.events,t=>i(t,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},a=(t,e)=>{this.canvas&&this.resize(t,e)};let s;const r=()=>{n("attach",r),this.attached=!0,this.resize(),i("resize",a),i("detach",s)};s=()=>{this.attached=!1,n("resize",a),this._stop(),this._resize(0,0),i("attach",r)},e.isAttached(this.canvas)?r():s()}unbindEvents(){_(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},_(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let a,s,r,o;for("dataset"===e&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+n+"DatasetHoverStyle"]()),r=0,o=t.length;r{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}});!w(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,a=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),s=a(e,t),r=i?t:a(t,e);s.length&&this.updateHoverStyle(s,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:Kt(t,this.chartArea,this._minPadding)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:a}=this,s=e,r=this._getActiveElements(t,n,i,s),o=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,o);i&&(this._lastEvent=null,v(a.onHover,[t,r,this],this),o&&v(a.onClick,[t,r,this],this));const c=!w(r,n);return(c||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=l,c}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,n)}}const da=()=>_(ha.instances,t=>t._plugins.invalidate());function ua(t,e,i){const{startAngle:n,pixelMargin:a,x:s,y:r,outerRadius:o,innerRadius:l}=e;let c=a/o;t.beginPath(),t.arc(s,r,o,n-c,i+c),l>a?(c=a/l,t.arc(s,r,l,i+c,n-c,!0)):t.arc(s,r,a,i+B,n-B),t.closePath(),t.clip()}function fa(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function pa(t,e,i,n,a){const{x:s,y:r,startAngle:o,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),d=c>0?c+n+i+l:0;let u=0;const f=a-o;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;u=(f-(0!==t?f*t/(t+n):f))/2}const p=(f-Math.max(.001,f*h-i/R)/h)/2,g=o+p+u,m=a-p-u,{outerStart:b,outerEnd:y,innerStart:x,innerEnd:v}=function(t,e,i,n){const a=le(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),s=(i-e)/2,r=Math.min(s,n*e/2),o=t=>{const e=(i-Math.min(s,t))*n/2;return nt(t,0,Math.min(s,e))};return{outerStart:o(a.outerStart),outerEnd:o(a.outerEnd),innerStart:nt(a.innerStart,0,r),innerEnd:nt(a.innerEnd,0,r)}}(e,d,h,m-g),_=h-b,w=h-y,O=g+b/_,M=m-y/w,k=d+x,j=d+v,S=g+x/k,P=m-v/j;if(t.beginPath(),t.arc(s,r,h,O,M),y>0){const e=fa(w,M,s,r);t.arc(e.x,e.y,y,M,m+B)}const D=fa(j,m,s,r);if(t.lineTo(D.x,D.y),v>0){const e=fa(j,P,s,r);t.arc(e.x,e.y,v,m+B,P+Math.PI)}if(t.arc(s,r,d,m-v/d,g+x/d,!0),x>0){const e=fa(k,S,s,r);t.arc(e.x,e.y,x,S+Math.PI,g-B)}const E=fa(_,g,s,r);if(t.lineTo(E.x,E.y),b>0){const e=fa(_,O,s,r);t.arc(e.x,e.y,b,g-B,O)}t.closePath()}Object.defineProperties(ha,{defaults:{enumerable:!0,value:Yt},instances:{enumerable:!0,value:oa},overrides:{enumerable:!0,value:Vt},registry:{enumerable:!0,value:Bn},version:{enumerable:!0,value:"3.7.1"},getChart:{enumerable:!0,value:la},register:{enumerable:!0,value:(...t)=>{Bn.add(...t),da()}},unregister:{enumerable:!0,value:(...t)=>{Bn.remove(...t),da()}}});class ga extends Pn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:a,distance:s}=Z(n,{x:t,y:e}),{startAngle:r,endAngle:o,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2,u=y(h,o-r)>=N||it(a,r,o),f=at(s,l+d,c+d);return u&&f}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:a,innerRadius:s,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:o,spacing:l}=this.options,c=(n+a)/2,h=(s+r+l+o)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,a=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>N?Math.floor(i/N):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let s=0;if(n){s=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*s,Math.sin(e)*s),this.circumference>=R&&(s=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const r=function(t,e,i,n){const{fullCircles:a,startAngle:s,circumference:r}=e;let o=e.endAngle;if(a){pa(t,e,i,n,s+N);for(let e=0;eo&&s>o;return{count:n,start:l,loop:e.loop,ilen:c(r+(c?o-t:t))%s,x=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(d=a[y(0)],t.moveTo(d.x,d.y)),h=0;h<=o;++h){if(d=a[y(h)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(ip&&(p=i),m=(b*m+e)/++b):(x(),t.lineTo(e,i),u=n,b=0,f=p=i),g=i}x()}function _a(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?xa:va}ga.id="arc",ga.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},ga.defaultRoutes={backgroundColor:"backgroundColor"};const wa="function"==typeof Path2D;class Oa extends Pn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;ze(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,a=i.length;if(!a)return[];const s=!!t._loop,{start:r,end:o}=function(t,e,i,n){let a=0,s=e-1;if(i&&!n)for(;aa&&t[s%e].skip;)s--;return s%=e,{start:a,end:s}}(i,a,s,n);return function(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const a=t._chart.getContext(),s=oi(t.options),{_datasetIndex:r,options:{spanGaps:o}}=t,l=i.length,c=[];let h=s,d=e[0].start,u=d;function f(t,e,n,a){const s=o?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=s;for(;i[e%l].skip;)e+=s;t%l!=e%l&&(c.push({start:t%l,end:e%l,loop:n,style:a}),h=a,d=e%l)}}for(const t of e){d=o?d:t.start;let e,s=i[d%l];for(u=d+1;u<=t.end;u++){const o=i[u%l];e=oi(n.setContext(pe(a,{type:"segment",p0:s,p1:o,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),li(e,h)&&f(d,u-1,t.loop,h),s=o,h=e}d"borderDash"!==t&&"fill"!==t};class ka extends Pn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:a,y:s}=this.getProps(["x","y"],i);return Math.pow(t-a,2)+Math.pow(e-s,2)=i)&&a):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}Ca.id="bar",Ca.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Ca.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Aa{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:a,radius:s}=this;return e=e||{start:0,end:N},t.arc(n,a,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,a=t.angle;return{x:e+Math.cos(a)*n,y:i+Math.sin(a)*n,angle:a}}}function La(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Ra(t,e,i){const n=[];for(let a=0;a{e=La(t,e,a);const r=a[t],o=a[e];null!==n?(s.push({x:r.x,y:n}),s.push({x:o.x,y:n})):null!==i&&(s.push({x:i,y:r.y}),s.push({x:i,y:o.y}))}),s}(t,e),i.length?new Oa({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function za(t,e,i){let n=t[e].fill;const a=[e];let s;if(!i)return n;for(;!1!==n&&-1===a.indexOf(n);){if(!m(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;a.push(n),n=s.fill}return!1}function Ba(t,e,i){const{segments:n,points:a}=e;let s=!0,r=!1;t.beginPath();for(const o of n){const{start:n,end:l}=o,c=a[n],h=a[La(n,l,a)];s?(t.moveTo(c.x,c.y),s=!1):(t.lineTo(c.x,i),t.lineTo(c.x,c.y)),r=!!e.pathSegment(t,o,{move:r}),r?t.closePath():t.lineTo(h.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function Va(t,e,i,n){if(n)return;let a=e[t],s=i[t];return"angle"===t&&(a=et(a),s=et(s)),{property:t,start:a,end:s}}function Wa(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Ha(t,e,i){const{top:n,bottom:a}=e.chart.chartArea,{property:s,start:r,end:o}=i||{};"x"===s&&(t.beginPath(),t.rect(r,n,o-r,a-n),t.clip())}function Ua(t,e,i,n){const a=e.interpolate(i,n);a&&t.lineTo(a.x,a.y)}function Ya(t,e){const{line:i,target:n,property:a,color:s,scale:r}=e,o=function(t,e,i){const n=t.segments,a=t.points,s=e.points,r=[];for(const t of n){let{start:n,end:o}=t;o=La(n,o,a);const l=Va(i,a[n],a[o],t.loop);if(!e.segments){r.push({source:t,target:l,start:a[n],end:a[o]});continue}const c=ri(e,l);for(const e of c){const n=Va(i,s[e.start],s[e.end],e.loop),o=si(t,a,n);for(const t of o)r.push({source:t,target:e,start:{[i]:Wa(l,n,"start",Math.max)},end:{[i]:Wa(l,n,"end",Math.min)}})}}return r}(i,n,a);for(const{source:e,target:l,start:c,end:h}of o){const{style:{backgroundColor:o=s}={}}=e,d=!0!==n;t.save(),t.fillStyle=o,Ha(t,r,d&&Va(a,c,h)),t.beginPath();const u=!!i.pathSegment(t,e);let f;if(d){u?t.closePath():Ua(t,n,h,a);const e=!!n.pathSegment(t,l,{move:u,reverse:!0});f=u&&e,f||Ua(t,n,c,a)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function $a(t,e,i){const n=Fa(e),{line:a,scale:s,axis:r}=e,o=a.options,l=o.fill,c=o.backgroundColor,{above:h=c,below:d=c}=l||{};n&&a.points.length&&(Zt(t,i),function(t,e){const{line:i,target:n,above:a,below:s,area:r,scale:o}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&s!==a&&(Ba(t,n,r.top),Ya(t,{line:i,target:n,color:a,scale:o,property:l}),t.restore(),t.save(),Ba(t,n,r.bottom)),Ya(t,{line:i,target:n,color:s,scale:o,property:l}),t.restore()}(t,{line:a,target:n,above:h,below:d,area:i,scale:s,axis:r}),Jt(t))}var Xa={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,a=[];let s,r,o,l;for(r=0;r=0;--e){const i=a[e].$filler;i&&(i.line.updateControlPoints(s,i.axis),n&&$a(t.ctx,i,s))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&$a(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&$a(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};new WeakMap;const qa={average(t){if(!t.length)return!1;let e,i,n=0,a=0,s=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Ka(t,e){const{element:i,datasetIndex:n,index:a}=e,s=t.getDatasetMeta(n).controller,{label:r,value:o}=s.getLabelAndValue(a);return{chart:t,label:r,parsed:s.getParsed(a),raw:t.data.datasets[n].data[a],formattedValue:o,dataset:s.getDataset(),dataIndex:a,datasetIndex:n,element:i}}function Za(t,e){const i=t.chart.ctx,{body:n,footer:a,title:s}=t,{boxWidth:r,boxHeight:o}=e,l=ue(e.bodyFont),c=ue(e.titleFont),h=ue(e.footerFont),d=s.length,u=a.length,f=n.length,p=de(e.padding);let g=p.height,m=0,b=n.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);b+=t.beforeBody.length+t.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),b&&(g+=f*(e.displayColors?Math.max(o,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing),u&&(g+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let y=0;const x=function(t){m=Math.max(m,i.measureText(t).width+y)};return i.save(),i.font=c.string,_(t.title,x),i.font=l.string,_(t.beforeBody.concat(t.afterBody),x),y=e.displayColors?r+2+e.boxPadding:0,_(n,t=>{_(t.before,x),_(t.lines,x),_(t.after,x)}),y=0,i.font=h.string,_(t.footer,x),i.restore(),m+=p.width,{width:m,height:g}}function Ja(t,e,i,n){const{x:a,width:s}=i,{width:r,chartArea:{left:o,right:l}}=t;let c="center";return"center"===n?c=a<=(o+l)/2?"left":"right":a<=s/2?c="left":a>=r-s/2&&(c="right"),function(t,e,i,n){const{x:a,width:s}=n,r=i.caretSize+i.caretPadding;return"left"===t&&a+s+r>e.width||"right"===t&&a-s-r<0||void 0}(c,t,e,i)&&(c="center"),c}function ts(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||Ja(t,e,i,n),yAlign:n}}function es(t,e,i,n){const{caretSize:a,caretPadding:s,cornerRadius:r}=t,{xAlign:o,yAlign:l}=i,c=a+s,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=he(r);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,o);const g=function(t,e,i){let{y:n,height:a}=t;return"top"===e?n+=i:n-="bottom"===e?a+i:a/2,n}(e,l,c);return"center"===l?"left"===o?p+=c:"right"===o&&(p-=c):"left"===o?p-=Math.max(h,u)+a:"right"===o&&(p+=Math.max(d,f)+a),{x:nt(p,0,n.width-e.width),y:nt(g,0,n.height-e.height)}}function is(t,e,i){const n=de(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function ns(t){return Ga([],Qa(t))}function as(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class ss extends Pn{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,a=new fi(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=(this,pe(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"})))}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),a=i.title.apply(this,[t]),s=i.afterTitle.apply(this,[t]);let r=[];return r=Ga(r,Qa(n)),r=Ga(r,Qa(a)),r=Ga(r,Qa(s)),r}getBeforeBody(t,e){return ns(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return _(t,t=>{const e={before:[],lines:[],after:[]},a=as(i,t);Ga(e.before,Qa(a.beforeLabel.call(this,t))),Ga(e.lines,a.label.call(this,t)),Ga(e.after,Qa(a.afterLabel.call(this,t))),n.push(e)}),n}getAfterBody(t,e){return ns(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),a=i.footer.apply(this,[t]),s=i.afterFooter.apply(this,[t]);let r=[];return r=Ga(r,Qa(n)),r=Ga(r,Qa(a)),r=Ga(r,Qa(s)),r}_createItems(t){const e=this._active,i=this.chart.data,n=[],a=[],s=[];let r,o,l=[];for(r=0,o=e.length;rt.filter(e,n,a,i))),t.itemSort&&(l=l.sort((e,n)=>t.itemSort(e,n,i))),_(l,e=>{const i=as(t.callbacks,e);n.push(i.labelColor.call(this,e)),a.push(i.labelPointStyle.call(this,e)),s.push(i.labelTextColor.call(this,e))}),this.labelColors=n,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let a,s=[];if(n.length){const t=qa[i.position].call(this,n,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const e=this._size=Za(this,i),r=Object.assign({},t,e),o=ts(this.chart,i,r),l=es(i,r,o,this.chart);this.xAlign=o.xAlign,this.yAlign=o.yAlign,a={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(a={opacity:0});this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const a=this.getCaretPosition(t,i,n);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:a}=this,{caretSize:s,cornerRadius:r}=i,{topLeft:o,topRight:l,bottomLeft:c,bottomRight:h}=he(r),{x:d,y:u}=t,{width:f,height:p}=e;let g,m,b,y,x,v;return"center"===a?(x=u+p/2,"left"===n?(g=d,m=g-s,y=x+s,v=x-s):(g=d+f,m=g+s,y=x-s,v=x+s),b=g):(m="left"===n?d+Math.max(o,c)+s:"right"===n?d+f-Math.max(l,h)-s:this.caretX,"top"===a?(y=u,x=y-s,g=m-s,b=m+s):(y=u+p,x=y+s,g=m+s,b=m-s),v=y),{x1:g,x2:m,x3:b,y1:y,y2:x,y3:v}}drawTitle(t,e,i){const n=this.title,a=n.length;let s,r,o;if(a){const l=ii(i.rtl,this.x,this.width);for(t.x=is(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",s=ue(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,o=0;o0!==t)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,ae(t,{x:e,y:p,w:l,h:o,radius:r}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),ae(t,{x:i,y:p+1,w:l-2,h:o-2,radius:r}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(e,p,l,o),t.strokeRect(e,p,l,o),t.fillStyle=s.backgroundColor,t.fillRect(i,p+1,l-2,o-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:a,bodyAlign:s,displayColors:r,boxHeight:o,boxWidth:l,boxPadding:c}=i,h=ue(i.bodyFont);let d=h.lineHeight,u=0;const f=ii(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+a},g=f.textAlign(s);let m,b,y,x,v,w,O;for(e.textAlign=s,e.textBaseline="middle",e.font=h.string,t.x=is(this,g,i),e.fillStyle=i.bodyColor,_(this.beforeBody,p),u=r&&"right"!==g?"center"===s?l/2+c:l+2+c:0,x=0,w=n.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,a=i&&i.y;if(n||a){const i=qa[t.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=Za(this,t),r=Object.assign({},i,this._size),o=ts(e,t,r),l=es(t,r,o,e);n._to===l.x&&a._to===l.y||(this.xAlign=o.xAlign,this.yAlign=o.yAlign,this.width=s.width,this.height=s.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=de(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,n,e),function(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}(t,e.textDirection),a.y+=s.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),function(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map(({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),a=!w(i,n),s=this._positionChanged(n,e);(a||s)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,a=this._active||[],s=this._getActiveElements(t,a,e,i),r=this._positionChanged(s,t),o=e||!w(s,a)||r;return o&&(this._active=s,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),o}_getActiveElements(t,e,i,n){const a=this.options;if("mouseout"===t.type)return[];if(!n)return e;const s=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:i,caretY:n,options:a}=this,s=qa[a.position].call(this,t,e);return!1!==s&&(i!==s.x||n!==s.y)}}ss.positioners=qa;var rs={id:"tooltip",_element:ss,positioners:qa,afterInit(t,e,i){i&&(t.tooltip=new ss({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:d,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};class os extends In{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(f(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:nt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,i,n){const a=t.indexOf(e);return-1===a?((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n):a!==t.lastIndexOf(e)?i:a}(i,t,y(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let a=this.getLabels();a=0===t&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function ls(t,e,{horizontal:i,minRotation:n}){const a=G(n),s=(i?Math.sin(a):Math.cos(a))||.001,r=.75*e*(""+t).length;return Math.min(e/s,r)}os.id="category",os.defaults={ticks:{callback:os.prototype.getLabelForValue}};class cs extends In{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return f(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:a}=this;const s=t=>n=e?n:t,r=t=>a=i?a:t;if(t){const t=U(n),e=U(a);t<0&&e<0?r(0):t>0&&e>0&&s(0)}if(n===a){let e=1;(a>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*a)),r(a+e),t||s(n-e)}this.min=n,this.max=a}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=function(t,e){const i=[],{bounds:n,step:a,min:s,max:r,precision:o,count:l,maxTicks:c,maxDigits:h,includeBounds:d}=t,u=a||1,p=c-1,{min:g,max:m}=e,b=!f(s),y=!f(r),x=!f(l),v=(m-g)/(h+1);let _,w,O,M,k=Y((m-g)/p/u)*u;if(k<1e-14&&!b&&!y)return[{value:g},{value:m}];M=Math.ceil(m/k)-Math.floor(g/k),M>p&&(k=Y(M*k/p/u)*u),f(o)||(_=Math.pow(10,o),k=Math.ceil(k*_)/_),"ticks"===n?(w=Math.floor(g/k)*k,O=Math.ceil(m/k)*k):(w=g,O=m),b&&y&&a&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((r-s)/a,k/1e3)?(M=Math.round(Math.min((r-s)/k,c)),k=(r-s)/M,w=s,O=r):x?(w=b?s:w,O=y?r:O,M=l-1,k=(O-w)/M):(M=(O-w)/k,M=X(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const j=Math.max(K(k),K(w));_=Math.pow(10,f(o)?j:o),w=Math.round(w*_)/_,O=Math.round(O*_)/_;let S=0;for(b&&(d&&w!==s?(i.push({value:s}),w0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=m(t)?Math.max(0,t):null,this.max=m(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const a=e=>i=t?i:e,s=t=>n=e?n:t,r=(t,e)=>Math.pow(10,Math.floor(H(t))+e);i===n&&(i<=0?(a(1),s(10)):(a(r(i,-1)),s(r(n,1)))),i<=0&&a(r(n,-1)),n<=0&&s(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&a(r(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(H(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),a=[];let s=b(t.min,Math.pow(10,Math.floor(H(e.min)))),r=Math.floor(H(s)),o=Math.floor(s/Math.pow(10,r)),l=r<0?Math.pow(10,Math.abs(r)):1;do{a.push({value:s,major:ds(s)}),++o,10===o&&(o=1,++r,l=r>=0?1:l),s=Math.round(o*Math.pow(10,r)*l)/l}while(ra?{start:e-i,end:e}:{start:e,end:e+i}}function gs(t,e,i,n,a){const s=Math.abs(Math.sin(i)),r=Math.abs(Math.cos(i));let o=0,l=0;n.starte.r&&(o=(n.end-e.r)/s,t.r=Math.max(t.r,e.r+o)),a.starte.b&&(l=(a.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}function ms(t){return 0===t||180===t?"center":t<180?"left":"right"}function bs(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function ys(t,e,i,n){const{ctx:a}=t;if(i)a.arc(t.xCenter,t.yCenter,e,0,N);else{let i=t.getPointPosition(0,e);a.moveTo(i.x,i.y);for(let s=1;s{const i=v(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){const t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],a=[],s=t._pointLabels.length,r=t.options.pointLabels,o=r.centerPointLabels?R/s:0;for(let d=0;d=0&&t=0;a--){const e=n.setContext(t.getPointLabelContext(a)),s=ue(e.font),{x:r,y:o,textAlign:l,left:c,top:h,right:d,bottom:u}=t._pointLabelItems[a],{backdropColor:p}=e;if(!f(p)){const t=de(e.backdropPadding);i.fillStyle=p,i.fillRect(c-t.left,h-t.top,d-c+t.width,u-h+t.height)}ie(i,t._pointLabels[a],r,o+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,a),n.display&&this.ticks.forEach((t,e)=>{0!==e&&(r=this.getDistanceFromCenterForValue(t.value),function(t,e,i,n){const a=t.ctx,s=e.circular,{color:r,lineWidth:o}=e;!s&&!n||!r||!o||i<0||(a.save(),a.strokeStyle=r,a.lineWidth=o,a.setLineDash(e.borderDash),a.lineDashOffset=e.borderDashOffset,a.beginPath(),ys(t,i,s,n),a.closePath(),a.stroke(),a.restore())}(this,n.setContext(this.getContext(e-1)),r,a))}),i.display){for(t.save(),s=a-1;s>=0;s--){const n=i.setContext(this.getPointLabelContext(s)),{color:a,lineWidth:l}=n;l&&a&&(t.lineWidth=l,t.strokeStyle=a,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),o=this.getPointPosition(s,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(o.x,o.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let a,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((n,r)=>{if(0===r&&!e.reverse)return;const o=i.setContext(this.getContext(r)),l=ue(o.font);if(a=this.getDistanceFromCenterForValue(this.ticks[r].value),o.showLabelBackdrop){t.font=l.string,s=t.measureText(n.label).width,t.fillStyle=o.backdropColor;const e=de(o.backdropPadding);t.fillRect(-s/2-e.left,-a-l.size/2-e.top,s+e.width,l.size+e.height)}ie(t,n.label,0,-a,l,{color:o.color})}),t.restore()}drawTitle(){}}xs.id="radialLinear",xs.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:En.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},xs.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},xs.descriptors={angleLines:{_fallback:"grid"}};const vs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},_s=Object.keys(vs);function ws(t,e){return t-e}function Os(t,e){if(f(e))return null;const i=t._adapter,{parser:n,round:a,isoWeekday:s}=t._parseOpts;let r=e;return"function"==typeof n&&(r=n(r)),m(r)||(r="string"==typeof n?i.parse(r,n):i.parse(r)),null===r?null:(a&&(r="week"!==a||!$(s)&&!0!==s?i.startOf(r,a):i.startOf(r,"isoWeek",s)),+r)}function Ms(t,e,i,n){const a=_s.length;for(let s=_s.indexOf(t);s=e?i[n]:i[a]]=!0}}else t[e]=!0}function js(t,e,i){const n=[],a={},s=e.length;let r,o;for(r=0;r=0&&(e[l].major=!0);return e}(t,n,a,i):n}class Ss extends In{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new Ui._date(t.adapters.date);S(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Os(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:a,minDefined:s,maxDefined:r}=this.getUserBounds();function o(t){s||isNaN(t.min)||(n=Math.min(n,t.min)),r||isNaN(t.max)||(a=Math.max(a,t.max))}s&&r||(o(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||o(this.getMinMax(!1))),n=m(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),a=m(a)&&!isNaN(a)?a:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,a-1),this.max=Math.max(n+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const a=this.min,s=function(t,e,i){let n=0,a=t.length;for(;nn&&t[a-1]>i;)a--;return n>0||a=_s.indexOf(i);s--){const i=_s[s];if(vs[i].common&&t._adapter.diff(a,n,i)>=e-1)return i}return _s[i?_s.indexOf(i):0]}(this,s.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=_s.indexOf(t)+1,i=_s.length;e1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+s);const f="data"===n.ticks.source&&this.getDataTimestamps();for(h=u,d=0;ht-e).map(t=>+t)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const a=this.options,s=a.time.displayFormats,r=this._unit,o=this._majorUnit,l=r&&s[r],c=o&&s[o],h=i[e],d=o&&c&&h&&h.major,u=this._adapter.format(t,n||(d?c:l)),f=a.ticks.callback;return f?v(f,[u,e,i],this):u}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?r:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[o].pos&&e<=t[l].pos&&({lo:o,hi:l}=me(t,"pos",e)),({pos:n,time:s}=t[o]),({pos:a,time:r}=t[l])):(e>=t[o].time&&e<=t[l].time&&({lo:o,hi:l}=me(t,"time",e)),({time:n,pos:s}=t[o]),({time:a,pos:r}=t[l]));const c=a-n;return c?s+(r-s)*(e-n)/c:s}Ss.id="time",Ss.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Ds extends Ss{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Ps(e,this.min),this._tableRange=Ps(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],a=[];let s,r,o,l,c;for(s=0,r=t.length;s=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,r=n.length;s2&&void 0!==arguments[2]?arguments[2]:"label";const n=[];t.datasets=e.map(e=>{const a=t.datasets.find(t=>t[i]===e[i]);return a&&e.data&&!n.includes(a)?(n.push(a),Object.assign(a,e),a):{...e}})}function Rs(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label";const i={labels:[],datasets:[]};return As(i,t.labels),Ls(i,t.datasets,e),i}function Ns(t,e){let{height:i=150,width:n=300,redraw:a=!1,datasetIdKey:s,type:r,data:o,options:l,plugins:c=[],fallbackContent:h,...d}=t;const u=Object(Es.useRef)(null),f=Object(Es.useRef)(),p=()=>{u.current&&(f.current=new ha(u.current,{type:r,data:Rs(o,s),options:l,plugins:c}),Ts(e,f.current))},g=()=>{Ts(e,null),f.current&&(f.current.destroy(),f.current=null)};return Object(Es.useEffect)(()=>{var t,e;!a&&f.current&&l&&(t=f.current,e=l,t.options={...e})},[a,l]),Object(Es.useEffect)(()=>{!a&&f.current&&As(f.current.config.data,o.labels)},[a,o.labels]),Object(Es.useEffect)(()=>{!a&&f.current&&o.datasets&&Ls(f.current.config.data,o.datasets,s)},[a,o.datasets]),Object(Es.useEffect)(()=>{f.current&&(a?(g(),setTimeout(p)):f.current.update())},[a,l,o.labels,o.datasets]),Object(Es.useEffect)(()=>(p(),()=>g()),[]),Cs.a.createElement("canvas",Object.assign({ref:u,role:"img",height:i,width:n},d),h)}const Fs=Object(Es.forwardRef)(Ns);var Is=i(3),zs=i(2),Bs=i(16),Vs=i(7),Ws=i(8),Hs=i(4);function Us(t,e){Object(Hs.a)(2,arguments);var i=Object(Ws.a)(t),n=Object(Vs.a)(e);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}function Ys(t,e){Object(Hs.a)(2,arguments);var i=Object(Vs.a)(e);return Us(t,-i)}function $s(t,e){Object(Hs.a)(2,arguments);var i=Object(Ws.a)(t),n=Object(Vs.a)(e);if(isNaN(n))return new Date(NaN);if(!n)return i;var a=i.getDate(),s=new Date(i.getTime());s.setMonth(i.getMonth()+n+1,0);var r=s.getDate();return a>=r?s:(i.setFullYear(s.getFullYear(),s.getMonth(),a),i)}function Xs(t,e){Object(Hs.a)(2,arguments);var i=Object(Vs.a)(e);return $s(t,-i)}function qs(t){return(qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Gs(t,e){if(Object(Hs.a)(2,arguments),!e||"object"!==qs(e))return new Date(NaN);var i=e.years?Object(Vs.a)(e.years):0,n=e.months?Object(Vs.a)(e.months):0,a=e.weeks?Object(Vs.a)(e.weeks):0,s=e.days?Object(Vs.a)(e.days):0,r=e.hours?Object(Vs.a)(e.hours):0,o=e.minutes?Object(Vs.a)(e.minutes):0,l=e.seconds?Object(Vs.a)(e.seconds):0,c=Xs(t,n+12*i),h=Ys(c,s+7*a),d=o+60*r,u=l+60*d,f=1e3*u,p=new Date(h.getTime()-f);return p}function Qs(t){return(Qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ks(t,e){if(Object(Hs.a)(2,arguments),!e||"object"!==Qs(e))return new Date(NaN);var i=e.years?Object(Vs.a)(e.years):0,n=e.months?Object(Vs.a)(e.months):0,a=e.weeks?Object(Vs.a)(e.weeks):0,s=e.days?Object(Vs.a)(e.days):0,r=e.hours?Object(Vs.a)(e.hours):0,o=e.minutes?Object(Vs.a)(e.minutes):0,l=e.seconds?Object(Vs.a)(e.seconds):0,c=Object(Ws.a)(t),h=n||i?$s(c,n+12*i):c,d=s||a?Us(h,s+7*a):h,u=o+60*r,f=l+60*u,p=1e3*f,g=new Date(d.getTime()+p);return g}function Zs(t,e){var i;Object(Hs.a)(1,arguments);var n=Object(Vs.a)(null!==(i=null==e?void 0:e.additionalDigits)&&void 0!==i?i:2);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var a,s=nr(t);if(s.date){var r=ar(s.date,n);a=sr(r.restDateString,r.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var o,l=a.getTime(),c=0;if(s.time&&(c=or(s.time),isNaN(c)))return new Date(NaN);if(!s.timezone){var h=new Date(l+c),d=new Date(0);return d.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),d.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),d}return o=cr(s.timezone),isNaN(o)?new Date(NaN):new Date(l+c+o)}Math.pow(10,8);var Js={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},tr=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,er=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ir=/^([+-])(\d{2})(?::?(\d{2}))?$/;function nr(t){var e,i={},n=t.split(Js.dateTimeDelimiter);if(n.length>2)return i;if(/:/.test(n[0])?e=n[0]:(i.date=n[0],e=n[1],Js.timeZoneDelimiter.test(i.date)&&(i.date=t.split(Js.timeZoneDelimiter)[0],e=t.substr(i.date.length,t.length))),e){var a=Js.timezone.exec(e);a?(i.time=e.replace(a[1],""),i.timezone=a[1]):i.time=e}return i}function ar(t,e){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(i);if(!n)return{year:NaN,restDateString:""};var a=n[1]?parseInt(n[1]):null,s=n[2]?parseInt(n[2]):null;return{year:null===s?a:100*s,restDateString:t.slice((n[1]||n[2]).length)}}function sr(t,e){if(null===e)return new Date(NaN);var i=t.match(tr);if(!i)return new Date(NaN);var n=!!i[4],a=rr(i[1]),s=rr(i[2])-1,r=rr(i[3]),o=rr(i[4]),l=rr(i[5])-1;if(n)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,o,l)?function(t,e,i){var n=new Date(0);n.setUTCFullYear(t,0,4);var a=7*(e-1)+i+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+a),n}(e,o,l):new Date(NaN);var c=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(hr[e]||(dr(t)?29:28))}(e,s,r)&&function(t,e){return e>=1&&e<=(dr(t)?366:365)}(e,a)?(c.setUTCFullYear(e,s,Math.max(a,r)),c):new Date(NaN)}function rr(t){return t?parseInt(t):1}function or(t){var e=t.match(er);if(!e)return NaN;var i=lr(e[1]),n=lr(e[2]),a=lr(e[3]);return function(t,e,i){return 24===t?0===e&&0===i:i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,n,a)?36e5*i+6e4*n+1e3*a:NaN}function lr(t){return t&&parseFloat(t.replace(",","."))||0}function cr(t){if("Z"===t)return 0;var e=t.match(ir);if(!e)return 0;var i="+"===e[1]?-1:1,n=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,a)?i*(36e5*n+6e4*a):NaN}var hr=[31,null,31,30,31,30,31,31,30,31,30,31];function dr(t){return t%400==0||t%4==0&&t%100!=0}var ur=i(77);function fr(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function pr(t){for(var e=1;e0,"is-negative":e<0});return Object(o.createElement)("div",{className:s},Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"simpay-admin-charts-badge__icon",width:"16",height:"16"},e>0?Object(o.createElement)("path",{d:"M16.004 9.414l-8.607 8.607-1.414-1.414L14.589 8H7.004V6h11v11h-2V9.414z"}):Object(o.createElement)("path",{d:"M14.59 16.004L5.982 7.397l1.414-1.414 8.607 8.606V7.004h2v11h-11v-2z"})),!n&&Object(o.createElement)("span",null,Math.abs(e),"%"))},Dr="simpay-admin-charts-period-over-period__tooltip",Er=function(t){var e=t.position,i=t.opacity,n=t.data,a=t.delta;if(!n.length)return null;var s=e.top,r=e.left,l=e.right,c=Sr()("simpay-admin-charts-badge",{"is-positive":a>0,"is-negative":a<0});return Object(o.createElement)("div",{className:Dr,style:{top:s,left:r||"auto",right:l||"auto",opacity:i}},n.map((function(t,e){var i=t.label,n=t.value;return Object(o.createElement)("div",{className:"".concat(Dr,"-data"),"data-dataset":e,key:i+Math.random()},Object(o.createElement)("strong",null,i)," ",Object(o.createElement)("em",null,Object(Bs.decodeEntities)(n)))})),0!==a&&Object(o.createElement)("div",{className:"".concat(Dr,"-delta")},Object(o.createElement)("div",{className:c},Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"simpay-admin-charts-badge__icon"},a>0?Object(o.createElement)("path",{fillRule:"evenodd",d:"M5.22 14.78a.75.75 0 001.06 0l7.22-7.22v5.69a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75h-7.5a.75.75 0 000 1.5h5.69l-7.22 7.22a.75.75 0 000 1.06z",clipRule:"evenodd"}):Object(o.createElement)("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06l7.22 7.22H6.75a.75.75 0 000 1.5h7.5a.747.747 0 00.75-.75v-7.5a.75.75 0 00-1.5 0v5.69L6.28 5.22z"}))),Object(o.createElement)("span",null,Object(o.createInterpolateElement)(Object(zs.sprintf)(/* translators: %s: delta percentage */ -Object(zs.__)("%1$s%% vs. previous period","simple-pay"),Math.abs(a)),{delta:Object(o.createElement)("strong",{className:a>0?"is-positive":"is-negative"})}))))},Cr=function(t){var e=t.chart,i=function(t,e){var i=Object(o.useState)({marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}),n=r()(i,2),a=n[0],s=a.marginTop,l=a.marginRight,c=a.marginBottom,h=a.marginLeft,d=n[1];return Object(o.useEffect)((function(){t.current&&d({marginTop:Math.floor(t.current.chartArea.top),marginRight:Math.floor(t.current.width-t.current.chartArea.right),marginBottom:Math.floor(t.current.chartArea.bottom),marginLeft:Math.floor(t.current.chartArea.left)})}),[t,e]),{marginTop:s,marginRight:l,marginBottom:c,marginLeft:h}}(t.chartRef,e),n=i.marginLeft,a=i.marginRight;return Object(o.createElement)("div",{style:{width:"100%",position:"relative",fontSize:"12px",display:"flex",justifyContent:"space-between",marginTop:"-2px"}},Object(o.createElement)("div",{style:{marginLeft:n,textAlign:"left"}},e.datasets[0].data[0].x),Object(o.createElement)("div",{style:{marginRight:a,textAlign:"right"}},e.datasets[0].data[e.datasets[0].data.length-1].x))};function Tr(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ar(t){for(var e=1;e0}))}));return Object(o.createElement)("div",{className:"simpay-admin-charts-period-over-period",style:a},!_&&Object(o.createElement)("div",{className:"simpay-admin-charts-no-data",style:Ar(Ar({},a),{},{height:"calc(".concat(a.height," + 15px)")})},Object(o.createElement)("div",null,Object(o.createElement)("strong",null,Object(zs.sprintf)(/* translators: %s Currency code. */ -Object(zs.__)("No %s transactions found.","simple-pay"),d.code.toUpperCase())),Object(o.createElement)("div",null,Object(zs.__)("Please select a different currency, date range, or check back later.","simple-pay")))),Object(o.createElement)(Fs,{type:"line",ref:u,options:v,plugins:[xr,(y="rgb(".concat(h.primary_color.join(","),")"),{id:"YGridLineHover",afterDraw:function(t){var e;if(null!==(e=t.tooltip)&&void 0!==e&&null!==(e=e._active)&&void 0!==e&&e.length){var i=t.tooltip._active[0].element.x,n=t.scales.yAxis,a=t.ctx;a.save(),a.beginPath(),a.moveTo(i,n.top),a.lineTo(i,n.bottom),a.lineWidth=2,a.strokeStyle=y,a.stroke(),a.restore()}}})],data:{datasets:f}}),Object(o.createElement)(Cr,{chartRef:u,chart:h}),Object(o.createElement)(Er,m),Object(o.createElement)(Is.Popover.Slot,null))}},function(t,e){t.exports=window.wp.data},function(t,e){t.exports=window.wp.htmlEntities},,,function(t,e){function i(){return t.exports=i=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var i=0,n=new Array(e);i=s.getTime()?i+1:e.getTime()>=l.getTime()?i:i-1}function f(t){Object(n.a)(1,arguments);var e=u(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var a=d(i);return a}var p={};function g(){return p}function m(t,e){var i,a,s,o,c,h,d,u;Object(n.a)(1,arguments);var f=g(),p=Object(l.a)(null!==(i=null!==(a=null!==(s=null!==(o=null==e?void 0:e.weekStartsOn)&&void 0!==o?o:null==e||null===(c=e.locale)||void 0===c||null===(h=c.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==s?s:f.weekStartsOn)&&void 0!==a?a:null===(d=f.locale)||void 0===d||null===(u=d.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==i?i:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Object(r.a)(t),b=m.getUTCDay(),y=(b=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var x=new Date(0);x.setUTCFullYear(p+1,0,y),x.setUTCHours(0,0,0,0);var v=m(x,e),_=new Date(0);_.setUTCFullYear(p,0,y),_.setUTCHours(0,0,0,0);var w=m(_,e);return f.getTime()>=v.getTime()?p+1:f.getTime()>=w.getTime()?p:p-1}function y(t,e){var i,a,s,r,o,c,h,d;Object(n.a)(1,arguments);var u=g(),f=Object(l.a)(null!==(i=null!==(a=null!==(s=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(o=e.locale)||void 0===o||null===(c=o.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==s?s:u.firstWeekContainsDate)&&void 0!==a?a:null===(h=u.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==i?i:1),p=b(t,e),y=new Date(0);y.setUTCFullYear(p,0,f),y.setUTCHours(0,0,0,0);var x=m(y,e);return x}function x(t,e){for(var i=t<0?"-":"",n=Math.abs(t).toString();n.length0?i:1-i;return x("yy"===e?n%100:n,e.length)},_=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):x(i+1,2)},w=function(t,e){return x(t.getUTCDate(),e.length)},O=function(t,e){return x(t.getUTCHours()%12||12,e.length)},M=function(t,e){return x(t.getUTCHours(),e.length)},k=function(t,e){return x(t.getUTCMinutes(),e.length)},j=function(t,e){return x(t.getUTCSeconds(),e.length)},S=function(t,e){var i=e.length,n=t.getUTCMilliseconds();return x(Math.floor(n*Math.pow(10,i-3)),e.length)};function P(t,e){var i=t>0?"-":"+",n=Math.abs(t),a=Math.floor(n/60),s=n%60;if(0===s)return i+String(a);var r=e||"";return i+String(a)+r+x(s,2)}function D(t,e){return t%60==0?(t>0?"-":"+")+x(Math.abs(t)/60,2):E(t,e)}function E(t,e){var i=e||"",n=t>0?"-":"+",a=Math.abs(t);return n+x(Math.floor(a/60),2)+i+x(a%60,2)}var C={G:function(t,e,i){var n=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"});case"GGGGG":return i.era(n,{width:"narrow"});case"GGGG":default:return i.era(n,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var n=t.getUTCFullYear(),a=n>0?n:1-n;return i.ordinalNumber(a,{unit:"year"})}return v(t,e)},Y:function(t,e,i,n){var a=b(t,n),s=a>0?a:1-a;return"YY"===e?x(s%100,2):"Yo"===e?i.ordinalNumber(s,{unit:"year"}):x(s,e.length)},R:function(t,e){return x(u(t),e.length)},u:function(t,e){return x(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return x(n,2);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return x(n,2);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,i){var n=t.getUTCMonth();switch(e){case"M":case"MM":return _(t,e);case"Mo":return i.ordinalNumber(n+1,{unit:"month"});case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,i){var n=t.getUTCMonth();switch(e){case"L":return String(n+1);case"LL":return x(n+1,2);case"Lo":return i.ordinalNumber(n+1,{unit:"month"});case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,i,a){var s=function(t,e){Object(n.a)(1,arguments);var i=Object(r.a)(t),a=m(i,e).getTime()-y(i,e).getTime();return Math.round(a/6048e5)+1}(t,a);return"wo"===e?i.ordinalNumber(s,{unit:"week"}):x(s,e.length)},I:function(t,e,i){var a=function(t){Object(n.a)(1,arguments);var e=Object(r.a)(t),i=d(e).getTime()-f(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(a,{unit:"week"}):x(a,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):w(t,e)},D:function(t,e,i){var a=function(t){Object(n.a)(1,arguments);var e=Object(r.a)(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var a=e.getTime(),s=i-a;return Math.floor(s/864e5)+1}(t);return"Do"===e?i.ordinalNumber(a,{unit:"dayOfYear"}):x(a,e.length)},E:function(t,e,i){var n=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"});case"EEEE":default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,i,n){var a=t.getUTCDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return x(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(a,{width:"short",context:"formatting"});case"eeee":default:return i.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,i,n){var a=t.getUTCDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return x(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(a,{width:"narrow",context:"standalone"});case"cccccc":return i.day(a,{width:"short",context:"standalone"});case"cccc":default:return i.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,i){var n=t.getUTCDay(),a=0===n?7:n;switch(e){case"i":return String(a);case"ii":return x(a,e.length);case"io":return i.ordinalNumber(a,{unit:"day"});case"iii":return i.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(n,{width:"short",context:"formatting"});case"iiii":default:return i.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,i){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(t,e,i){var n,a=t.getUTCHours();switch(n=12===a?"noon":0===a?"midnight":a/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(t,e,i){var n,a=t.getUTCHours();switch(n=a>=17?"evening":a>=12?"afternoon":a>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var n=t.getUTCHours()%12;return 0===n&&(n=12),i.ordinalNumber(n,{unit:"hour"})}return O(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):M(t,e)},K:function(t,e,i){var n=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(n,{unit:"hour"}):x(n,e.length)},k:function(t,e,i){var n=t.getUTCHours();return 0===n&&(n=24),"ko"===e?i.ordinalNumber(n,{unit:"hour"}):x(n,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):k(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):j(t,e)},S:function(t,e){return S(t,e)},X:function(t,e,i,n){var a=(n._originalDate||t).getTimezoneOffset();if(0===a)return"Z";switch(e){case"X":return D(a);case"XXXX":case"XX":return E(a);case"XXXXX":case"XXX":default:return E(a,":")}},x:function(t,e,i,n){var a=(n._originalDate||t).getTimezoneOffset();switch(e){case"x":return D(a);case"xxxx":case"xx":return E(a);case"xxxxx":case"xxx":default:return E(a,":")}},O:function(t,e,i,n){var a=(n._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+P(a,":");case"OOOO":default:return"GMT"+E(a,":")}},z:function(t,e,i,n){var a=(n._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+P(a,":");case"zzzz":default:return"GMT"+E(a,":")}},t:function(t,e,i,n){var a=n._originalDate||t;return x(Math.floor(a.getTime()/1e3),e.length)},T:function(t,e,i,n){return x((n._originalDate||t).getTime(),e.length)}},T=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},A=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},L={p:A,P:function(t,e){var i,n=t.match(/(P+)(p+)?/)||[],a=n[1],s=n[2];if(!s)return T(t,e);switch(a){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",T(a,e)).replace("{{time}}",A(s,e))}};function R(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var N=["D","DD"],F=["YY","YYYY"];function I(t){return-1!==N.indexOf(t)}function z(t){return-1!==F.indexOf(t)}function B(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var V={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function W(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth,n=t.formats[i]||t.formats[t.defaultWidth];return n}}var H={date:W({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:W({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:W({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},U={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Y(t){return function(e,i){var n;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,s=null!=i&&i.width?String(i.width):a;n=t.formattingValues[s]||t.formattingValues[a]}else{var r=t.defaultWidth,o=null!=i&&i.width?String(i.width):t.defaultWidth;n=t.values[o]||t.values[r]}return n[t.argumentCallback?t.argumentCallback(e):e]}}function $(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,a=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],s=e.match(a);if(!s)return null;var r,o=s[0],l=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?q(l,(function(t){return t.test(o)})):X(l,(function(t){return t.test(o)}));r=t.valueCallback?t.valueCallback(c):c,r=i.valueCallback?i.valueCallback(r):r;var h=e.slice(o.length);return{value:r,rest:h}}}function X(t,e){for(var i in t)if(t.hasOwnProperty(i)&&e(t[i]))return i}function q(t,e){for(var i=0;i0?"in "+n:n+" ago":n},formatLong:H,formatRelative:function(t,e,i,n){return U[t]},localize:{ordinalNumber:function(t,e){var i=Number(t),n=i%100;if(n>20||n<10)switch(n%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:Y({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Y({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Y({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Y({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Y({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(G={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(G.matchPattern);if(!i)return null;var n=i[0],a=t.match(G.parsePattern);if(!a)return null;var s=G.valueCallback?G.valueCallback(a[0]):a[0];s=e.valueCallback?e.valueCallback(s):s;var r=t.slice(n.length);return{value:s,rest:r}}),era:$({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:$({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:$({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:$({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:$({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},K=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Z=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,J=/^'([^]*?)'?$/,tt=/''/g,et=/[a-zA-Z]/;function it(t,e,i){var a,s,c,d,u,f,p,m,b,y,x,v,_,w,O,M,k,j;Object(n.a)(2,arguments);var S=String(e),P=g(),D=null!==(a=null!==(s=null==i?void 0:i.locale)&&void 0!==s?s:P.locale)&&void 0!==a?a:Q,E=Object(l.a)(null!==(c=null!==(d=null!==(u=null!==(f=null==i?void 0:i.firstWeekContainsDate)&&void 0!==f?f:null==i||null===(p=i.locale)||void 0===p||null===(m=p.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==u?u:P.firstWeekContainsDate)&&void 0!==d?d:null===(b=P.locale)||void 0===b||null===(y=b.options)||void 0===y?void 0:y.firstWeekContainsDate)&&void 0!==c?c:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=Object(l.a)(null!==(x=null!==(v=null!==(_=null!==(w=null==i?void 0:i.weekStartsOn)&&void 0!==w?w:null==i||null===(O=i.locale)||void 0===O||null===(M=O.options)||void 0===M?void 0:M.weekStartsOn)&&void 0!==_?_:P.weekStartsOn)&&void 0!==v?v:null===(k=P.locale)||void 0===k||null===(j=k.options)||void 0===j?void 0:j.weekStartsOn)&&void 0!==x?x:0);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!D.localize)throw new RangeError("locale must contain localize property");if(!D.formatLong)throw new RangeError("locale must contain formatLong property");var A=Object(r.a)(t);if(!o(A))throw new RangeError("Invalid time value");var N=R(A),F=h(A,N),V={firstWeekContainsDate:E,weekStartsOn:T,locale:D,_originalDate:A},W=S.match(Z).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,L[e])(t,D.formatLong):t})).join("").match(K).map((function(n){if("''"===n)return"'";var a=n[0];if("'"===a)return nt(n);var s=C[a];if(s)return null!=i&&i.useAdditionalWeekYearTokens||!z(n)||B(n,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!I(n)||B(n,e,String(t)),s(F,n,D.localize,V);if(a.match(et))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return n})).join("");return W}function nt(t){var e=t.match(J);return e?e[1].replace(tt,"'"):t}},function(t,e,i){"use strict";i.r(e);var n=i(0),a=(i(37),i(3)),s=i(6),r=i.n(s),o=i(2),l=i(9),c=Object(n.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(l.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})),h=i(10),d=i(14),u=simpayAdminPageActivityReports,f=u.user_id,p=u.currencies,g=u.default_currency,m=i(19),b=i.n(m),y=i(16),x=i(11),v=i.n(x),_=i(25),w=i.n(_);function O(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function M(t){for(var e=1;e0&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.CardDivider,null),Object(n.createElement)("h3",{className:"".concat("simpay-activity-reports-card-today","-today-misc-title")},Object(o.__)("Top Forms","simple-pay")),Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-today","-forms")},s.map((function(t){return Object(n.createElement)(P,b()({key:t.id},t))})))),r&&Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-today","-tip")},Object(n.createElement)("strong",null,Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M11.7 2.805a.75.75 0 01.6 0A60.65 60.65 0 0122.83 8.72a.75.75 0 01-.231 1.337 49.949 49.949 0 00-9.902 3.912l-.003.002-.34.18a.75.75 0 01-.707 0A50.009 50.009 0 007.5 12.174v-.224c0-.131.067-.248.172-.311a54.614 54.614 0 014.653-2.52.75.75 0 00-.65-1.352 56.129 56.129 0 00-4.78 2.589 1.858 1.858 0 00-.859 1.228 49.803 49.803 0 00-4.634-1.527.75.75 0 01-.231-1.337A60.653 60.653 0 0111.7 2.805z"}),Object(n.createElement)("path",{d:"M13.06 15.473a48.45 48.45 0 017.666-3.282c.134 1.414.22 2.843.255 4.285a.75.75 0 01-.46.71 47.878 47.878 0 00-8.105 4.342.75.75 0 01-.832 0 47.877 47.877 0 00-8.104-4.342.75.75 0 01-.461-.71c.035-1.442.121-2.87.255-4.286A48.4 48.4 0 016 13.18v1.27a1.5 1.5 0 00-.14 2.508c-.09.38-.222.753-.397 1.11.452.213.901.434 1.346.661a6.729 6.729 0 00.551-1.608 1.5 1.5 0 00.14-2.67v-.645a48.549 48.549 0 013.44 1.668 2.25 2.25 0 002.12 0z"}),Object(n.createElement)("path",{d:"M4.462 19.462c.42-.419.753-.89 1-1.394.453.213.902.434 1.347.661a6.743 6.743 0 01-1.286 1.794.75.75 0 11-1.06-1.06z"})),r.title),Object(n.createElement)("p",null,r.text," ",Object(n.createElement)("a",{href:Object(y.decodeEntities)(r.href),target:"_blank",rel:"noreferrer"},Object(o.__)("Learn More →","simple-pay")))))))},C=function(t){var e=t.currency;return Object(n.createElement)("div",{className:"simpay-admin-charts-no-data",style:{width:"100%",height:"100%"}},Object(n.createElement)("div",null,Object(n.createElement)("strong",null,Object(o.sprintf)(/* translators: %s Currency code. */ -Object(o.__)("No %s transactions found.","simple-pay"),e.toUpperCase())),Object(n.createElement)("div",null,Object(o.__)("Please select a different currency or check back later.","simple-pay"))))},T=i(13),A=i.n(T),L=function(t){var e=t.currency,i=t.amount_total_formatted,s=t.status,r=t.status_formatted,l=t.email,c=t.payment_method_type_icon,h=t.date_created_human_time_diff,d=t.links,u=d.customer,f=d.payment,p="simpay-activity-reports-card-latest-payment",g=A()("simpay-activity-reports-badge",{"is-succeeded":"succeeded"===s,"is-failed":"failed"===s});return Object(n.createElement)("tr",{className:p},Object(n.createElement)("td",{className:"".concat(p,"__amount")},Object(y.decodeEntities)(i)," ",Object(n.createElement)("small",{style:{fontWeight:"normal"}},e.toUpperCase())),Object(n.createElement)("td",{className:"".concat(p,"__type")},""!==c&&Object(n.createElement)("span",{dangerouslySetInnerHTML:{__html:c}})),Object(n.createElement)("td",{className:"".concat(p,"__status")},Object(n.createElement)("div",{className:g},Object(n.createElement)("span",null,r),Object(n.createElement)("svg",{"aria-hidden":"true",className:"simpay-activity-reports-badge__icon",height:"12",width:"12",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",style:{marginLeft:"4px"}},"succeeded"===s?Object(n.createElement)("path",{d:"M5.297 13.213.293 8.255c-.39-.394-.39-1.033 0-1.426s1.024-.394 1.414 0l4.294 4.224 8.288-8.258c.39-.393 1.024-.393 1.414 0s.39 1.033 0 1.426L6.7 13.208a.994.994 0 0 1-1.402.005z",fillRule:"evenodd"}):Object(n.createElement)("path",{d:"m8 6.585 4.593-4.592a1 1 0 0 1 1.415 1.416L9.417 8l4.591 4.591a1 1 0 0 1-1.415 1.416L8 9.415l-4.592 4.592a1 1 0 0 1-1.416-1.416L6.584 8l-4.59-4.591a1 1 0 1 1 1.415-1.416z",fillRule:"evenodd"})))),Object(n.createElement)("td",{className:"".concat(p,"__email")},Object(n.createElement)(a.Tooltip,{text:Object(o.__)("View customer records","simple-pay")},Object(n.createElement)("a",{href:u,target:"_blank",rel:"noreferrer noopener"},l))),Object(n.createElement)("td",{className:"".concat(p,"__date")},Object(n.createElement)(a.Tooltip,{text:Object(o.__)("View payment record","simple-pay")},Object(n.createElement)("a",{href:f,target:"_blank",rel:"noreferrer noopener"},h))))},R=simpayAdminPageActivityReports,N=R.default_currency,F=R.links.all_payments,I=function(){var t=j("/wpsp/__internal__/report/latest-payments",{currency:N},[]),e=t.data.payments;return Object(n.createElement)(a.Card,{elevation:2,className:"simpay-activity-reports-card-latest"},Object(n.createElement)(a.CardHeader,null,Object(n.createElement)("h2",{className:"simpay-activity-reports-card-title"},Object(o.__)("Latest Payments","simple-pay")),Object(n.createElement)(a.Button,{className:"simpay-activity-reports-card-title-link",href:F,variant:"link",isSmall:!0,target:"_blank"},Object(o.__)("View More →","simple-pay"))),Object(n.createElement)(a.CardBody,null,t.isLoading&&Object(n.createElement)(a.Spinner,null),!t.isLoading&&e.length>0&&Object(n.createElement)("table",{className:"".concat("simpay-activity-reports-card-latest","-payments")},Object(n.createElement)("tbody",null,e.map((function(t){return Object(n.createElement)(L,b()({key:t.id},t))})))),!t.isLoading&&0===e.length&&Object(n.createElement)(C,{currency:N})))},z=i(8),B=i(4);function V(t,e){Object(B.a)(2,arguments);var i=Object(z.a)(t),n=Object(z.a)(e),a=i.getFullYear()-n.getFullYear(),s=i.getMonth()-n.getMonth();return 12*a+s}function W(t,e){Object(B.a)(2,arguments);var i=Object(z.a)(t),n=Object(z.a)(e),a=i.getTime()-n.getTime();return a<0?-1:a>0?1:a}function H(t){Object(B.a)(1,arguments);var e=Object(z.a)(t);return e.setHours(23,59,59,999),e}function U(t){Object(B.a)(1,arguments);var e=Object(z.a)(t),i=e.getMonth();return e.setFullYear(e.getFullYear(),i+1,0),e.setHours(23,59,59,999),e}function Y(t){Object(B.a)(1,arguments);var e=Object(z.a)(t);return H(e).getTime()===U(e).getTime()}var $=i(77),X=i(33);function q(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function G(t){for(var e=1;e27&&n.setDate(30),n.setMonth(n.getMonth()-s*r);var o=W(n,a)===-s;Y(Object(z.a)(t))&&1===r&&1===W(t,a)&&(o=!1),i=s*(r-Number(o))}return 0===i?0:i}(new Date(s.end),new Date(s.start))>12?(e=Object(X.dateI18n)("F Y",s.start),i=Object(X.dateI18n)("F Y",s.end)):"today"===s.type?(e=Object(X.dateI18n)(l.formats.date,K),i=e):(e=Object(X.dateI18n)(l.formats.date,s.start),i=Object(X.dateI18n)(l.formats.date,s.end)),Object(n.createElement)("div",{className:"simpay-activity-reports-card-reports-date-range"},Object(n.createElement)(a.SelectControl,{label:Object(o.__)("Report range","simple-pay"),value:s.type,options:"custom"===s.type?[].concat(c,[{label:Object(o.__)("Custom","simple-pay"),value:"custom"}]):c,onChange:function(t){r(G(G({},s),{},{type:t,start:Object(d.d)(t,K),end:Object(d.c)(t,s.end)}))},hideLabelFromVision:!0}),Object(n.createElement)(a.Dropdown,{position:"bottom center",popoverProps:{noArrow:!1},renderToggle:function(t){var i=t.isOpen,s=t.onToggle;return Object(n.createElement)(a.Button,{variant:"tertiary",onClick:s,"aria-expanded":i},e)},renderContent:function(t){var e=t.onToggle;return Object(n.createElement)(a.DatePicker,{currentDate:new Date(s.start),onChange:function(t){r(G(G({},s),{},{start:Object($.a)(new Date(t),"yyyy-MM-dd 00:00:00"),type:"custom"})),e()},startOfWeek:l.l10n.startOfWeek,isInvalidDate:function(t){return t>new Date(s.end)}})}}),Object(n.createElement)("span",{style:{color:"#ccc"}},"–"),Object(n.createElement)(a.Dropdown,{position:"bottom center",popoverProps:{noArrow:!1},renderToggle:function(t){var e=t.isOpen,s=t.onToggle;return Object(n.createElement)(a.Button,{variant:"tertiary",onClick:s,"aria-expanded":e},i)},renderContent:function(t){var e=t.onToggle;return Object(n.createElement)(a.DatePicker,{currentDate:new Date(s.end),onChange:function(t){r(G(G({},s),{},{end:Object($.a)(new Date(t),"yyyy-MM-dd 23:59:59"),type:"custom"})),e()},startOfWeek:l.l10n.startOfWeek,isInvalidDate:function(t){return tnew Date}})}}))},J="simpay-activity-reports-data-bar",tt=function(t){var e=t.isLoading,i=t.label,s=t.data;return Object(n.createElement)("div",{className:J},Object(n.createElement)("div",{className:"".concat(J,"__header")},Object(n.createElement)("h3",{className:"".concat(J,"__label")},i),!e&&Object(n.createElement)("div",{className:"".concat(J,"__legend")},s.map((function(t){var e=t.label,i=t.color;return Object(n.createElement)("div",{key:e,className:"".concat(J,"__legend-item"),style:{color:i}},Object(n.createElement)("span",null,e))})))),Object(n.createElement)("div",{className:"".concat(J,"__bar")},!e&&s.length>0&&s.map((function(t){return Object(n.createElement)(a.Button,{key:t.label,label:"".concat(t.label,": ").concat(t.value,"%"),showTooltip:!0,className:"".concat(J,"__bar-item"),style:{backgroundColor:t.color,flexBasis:"".concat(t.value,"%"),flexGrow:1}},Object(n.createElement)("div",{className:"screen-reader-text"},t.label))})),!e&&0===s.length&&Object(n.createElement)("div",{className:"".concat(J,"__bar-item-none")},Object(o.__)("n/a","simple-pay"))))},et=function(t){var e=t.currency,i=t.range,a=j("/wpsp/__internal__/report/payment-info",{range:i,currency:e},[i]),s=a.data,r=s.payment_method_types,l=s.payment_statuses;return Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-reports","-payment-breakdown")},Object(n.createElement)(tt,{label:Object(o.__)("Payment Methods","simple-pay"),data:r,isLoading:a.isLoading}),Object(n.createElement)(tt,{label:Object(o.__)("Payments","simple-pay"),data:l,isLoading:a.isLoading}))},it=function(t){var e=t.currency,i=t.range,a=j("/wpsp/__internal__/report/gross-volume-period-over-period",{range:i,currency:e},[i]),s=a.data,r=s.delta,l=s.total_formatted;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-reports","-report-title")},Object(n.createElement)("h3",null,Object(o.__)("Gross Volume","simple-pay"),!a.isLoading&&Object(n.createElement)(n.Fragment,null,": ",Object(n.createElement)("em",null,Object(y.decodeEntities)(l)))),!a.isLoading&&Object(n.createElement)(d.a,{delta:r})),Object(n.createElement)(d.b,{report:a,style:{width:"100%",height:"300px"},config:{yAxisIsCurrency:!0}}))},nt=simpayAdminPageActivityReports.default_currency,at=function(t){var e=t.range,i=j("/wpsp/__internal__/report/successful-payments-period-over-period",{range:e,currency:nt},[e]),a=i.data,s=a.delta,r=a.total_formatted;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"".concat("simpay-activity-reports-card-reports","-report-title")},Object(n.createElement)("h3",null,Object(o.__)("Successful Payments","simple-pay"),!i.isLoading&&Object(n.createElement)(n.Fragment,null,": ",Object(n.createElement)("em",null,r))),!i.isLoading&&Object(n.createElement)(d.a,{delta:s})),Object(n.createElement)(d.b,{report:i,style:{width:"100%",height:"300px"},config:{yAxisIsCurrency:!1}}))},st=simpayAdminPageActivityReports,rt=st.user_id,ot=st.default_range,lt=ot.start,ct=ot.end,ht=ot.type,dt=st.default_currency,ut=function(){var t=Object(d.e)(rt,"simpay_activity_reports_range",{start:Object(d.d)(ht,lt),end:Object(d.c)(ht,ct),type:ht}),e=r()(t,2),i=e[0],s=e[1];return Object(n.createElement)(a.Card,{elevation:2,className:"simpay-activity-reports-card-reports"},Object(n.createElement)(a.CardHeader,{className:"".concat("simpay-activity-reports-card-reports","-header")},Object(n.createElement)("h2",{className:"simpay-activity-reports-card-title"},Object(o.__)("Reports","simple-pay")),Object(n.createElement)(Z,{range:i,setRange:s})),Object(n.createElement)(a.CardBody,null,Object(n.createElement)(et,{range:i,currency:dt}),Object(n.createElement)(a.CardDivider,null),Object(n.createElement)(it,{range:i,currency:dt}),Object(n.createElement)(a.CardDivider,null),Object(n.createElement)(at,{range:i,currency:dt})))};Object(n.render)(Object(n.createElement)((function(){var t=Object(d.e)(f,"simpay_activity_reports_currency",g),e=r()(t,3),i=e[0],s=e[1],l=e[2];function u(){var t=Object(h.addQueryArgs)(window.location.href,{currency:i});window.location.href=t}return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.Dropdown,{position:"bottom center",popoverProps:{noArrow:!1},renderToggle:function(t){var e=t.isOpen,i=t.onToggle;return Object(n.createElement)(a.Button,{variant:"secondary",onClick:i,"aria-expanded":e,icon:c,tooltip:Object(o.__)("Settings","simple-pay")})},renderContent:function(){return Object(n.createElement)("div",{style:{width:"200px",padding:"8px"}},Object(n.createElement)(a.SelectControl,{label:Object(o.__)("Currency","simple-pay"),value:i,onChange:s,options:p.map((function(t){return{label:t,value:t.toLowerCase()}})),help:Object(o.__)("Activity with the selected currency and global payment mode will be shown.","simple-pay")}),Object(n.createElement)(a.Button,{type:"submit",variant:"primary",onClick:u,isBusy:l,disabled:l},Object(o.__)("Update","simple-pay")))}}),Object(n.createElement)(a.Popover.Slot,null))}),null),document.getElementById("simpay-admin-page-activity-reports-config")),Object(n.render)(Object(n.createElement)((function(){return Object(n.createElement)("div",{className:"simpay-activity-reports"},Object(n.createElement)(E,null),Object(n.createElement)(I,null),Object(n.createElement)(ut,null),Object(n.createElement)(a.Popover.Slot,null))}),null),document.getElementById("simpay-admin-page-activity-reports"))}]); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-page-setup-wizard-css.min.asset.php b/includes/core/assets/js/simpay-admin-page-setup-wizard-css.min.asset.php deleted file mode 100644 index 8d01e16d..00000000 --- a/includes/core/assets/js/simpay-admin-page-setup-wizard-css.min.asset.php +++ /dev/null @@ -1 +0,0 @@ - array(), 'version' => 'e39ad941d113c7896bed785b47f7101b'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-admin-page-setup-wizard.min.js b/includes/core/assets/js/simpay-admin-page-setup-wizard.min.js deleted file mode 100644 index a5fd49e3..00000000 --- a/includes/core/assets/js/simpay-admin-page-setup-wizard.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=76)}([function(e,t){e.exports=window.wp.element},,function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},,function(e,t){e.exports=window.React},function(e,t,n){var r=n(26),a=n(27),i=n(22),c=n(28);e.exports=function(e,t){return r(e)||a(e,t)||i(e,t)||c()},e.exports.__esModule=!0,e.exports.default=e.exports},,,function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.url},function(e,t,n){var r=n(30);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.lodash},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.__esModule=!0,e.exports.default=e.exports},,,,,,,,function(e,t){e.exports=window.wp.notices},function(e,t,n){"use strict";e.exports=n(61)},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for,a=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,c=r?Symbol.for("react.fragment"):60107,o=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,m=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,b=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,j=r?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case p:case m:case c:case s:case o:case d:return e;default:switch(e=e&&e.$$typeof){case u:case f:case h:case y:case l:return e;default:return t}}case i:return t}}}function x(e){return _(e)===m}t.AsyncMode=p,t.ConcurrentMode=m,t.ContextConsumer=u,t.ContextProvider=l,t.Element=a,t.ForwardRef=f,t.Fragment=c,t.Lazy=h,t.Memo=y,t.Portal=i,t.Profiler=s,t.StrictMode=o,t.Suspense=d,t.isAsyncMode=function(e){return x(e)||_(e)===p},t.isConcurrentMode=x,t.isContextConsumer=function(e){return _(e)===u},t.isContextProvider=function(e){return _(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return _(e)===f},t.isFragment=function(e){return _(e)===c},t.isLazy=function(e){return _(e)===h},t.isMemo=function(e){return _(e)===y},t.isPortal=function(e){return _(e)===i},t.isProfiler=function(e){return _(e)===s},t.isStrictMode=function(e){return _(e)===o},t.isSuspense=function(e){return _(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===c||e===m||e===s||e===o||e===d||e===b||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===y||e.$$typeof===l||e.$$typeof===u||e.$$typeof===f||e.$$typeof===v||e.$$typeof===O||e.$$typeof===j||e.$$typeof===g)},t.typeOf=_},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(0),a=n(9);const i=Object(r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(a.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));t.a=i},function(e,t,n){"use strict";var r=n(0),a=n(9);const i=Object(r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(a.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));t.a=i},,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(6),a=n.n(r),i=n(0),c=(n(59),n(3)),o=n(2),s=n(10),l=n(37),u=n(12),p=n(25),m=n.n(p),f=n(43),d=n(64),b=n(17),y=n.n(b),h=n(19),g=n.n(h),v=n(5);function O(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var j=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,_=O((function(e){return j.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;t2||J(V)>3?"":" "}function ae(e,t){for(;--t&&Y()&&!(V<48||V>102||V>57&&V<65||V>70&&V<97););return K(e,Q()+(t<6&&32==X()&&32==Y()))}function ie(e,t){for(;Y()&&e+V!==57&&(e+V!==84||47!==X()););return"/*"+K(t,Z-1)+"*"+A(47===e?e:Y())}function ce(e){for(;!J(X());)Y();return K(e,Z)}function oe(e,t,n,r,a,i,c,o,s,l,u){for(var p=a-1,m=0===a?i:[""],f=D(m),d=0,b=0,y=0;d0?m[h]+" "+g:$(g,/&\f/g,m[h])))&&(s[y++]=v);return G(e,t,n,0===a?k:o,s,l,u)}function se(e,t,n){return G(e,t,n,S,A(V),F(e,2,-2),0)}function le(e,t,n,r){return G(e,t,n,C,F(e,0,r),F(e,r+1,-1),r)}function ue(e,t){for(var n="",r=D(e),a=0;a-1&&!e.return)switch(e.type){case C:e.return=function e(t,n){switch(a=n,45^T(r=t,0)?(((a<<2^T(r,0))<<2^T(r,1))<<2^T(r,2))<<2^T(r,3):0){case 5103:return E+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return E+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return E+t+"-moz-"+t+"-ms-"+t+t;case 6828:case 4268:return E+t+"-ms-"+t+t;case 6165:return E+t+"-ms-flex-"+t+t;case 5187:return E+t+$(t,/(\w+).+(:[^]+)/,E+"box-$1$2-ms-flex-$1$2")+t;case 5443:return E+t+"-ms-flex-item-"+$(t,/flex-|-self/,"")+t;case 4675:return E+t+"-ms-flex-line-pack"+$(t,/align-content|flex-|-self/,"")+t;case 5548:return E+t+"-ms-"+$(t,"shrink","negative")+t;case 5292:return E+t+"-ms-"+$(t,"basis","preferred-size")+t;case 6060:return E+"box-"+$(t,"-grow","")+E+t+"-ms-"+$(t,"grow","positive")+t;case 4554:return E+$(t,/([^-])(transform)/g,"$1"+E+"$2")+t;case 6187:return $($($(t,/(zoom-|grab)/,E+"$1"),/(image-set)/,E+"$1"),t,"")+t;case 5495:case 3959:return $(t,/(image-set\([^]*)/,E+"$1$`$1");case 4968:return $($(t,/(.+:)(flex-)?(.*)/,E+"box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+E+t+t;case 4095:case 3583:case 4068:case 2532:return $(t,/(.+)-inline(.+)/,E+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(L(t)-1-n>6)switch(T(t,n+1)){case 109:if(45!==T(t,n+4))break;case 102:return $(t,/(.+:)(.+)-([^]+)/,"$1"+E+"$2-$3$1-moz-"+(108==T(t,n+3)?"$3":"$2-$3"))+t;case 115:return~R(t,"stretch")?e($(t,"stretch","fill-available"),n)+t:t}break;case 4949:if(115!==T(t,n+1))break;case 6444:switch(T(t,L(t)-3-(~R(t,"!important")&&10))){case 107:return $(t,":",":"+E)+t;case 101:return $(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+E+(45===T(t,14)?"inline-":"")+"box$3$1"+E+"$2$3$1-ms-$2box$3")+t}break;case 5936:switch(T(t,n+11)){case 114:return E+t+"-ms-"+$(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return E+t+"-ms-"+$(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return E+t+"-ms-"+$(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return E+t+"-ms-"+t+t}var r,a;return t}(e.value,e.length);break;case P:return ue([q(e,{value:$(e.value,"@","@"+E)})],r);case k:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch((n=/(::plac\w+|:read-\w+)/.exec(n=t))?n[0]:n){case":read-only":case":read-write":return ue([q(e,{props:[$(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ue([q(e,{props:[$(t,/:(plac\w+)/,":"+E+"input-$1")]}),q(e,{props:[$(t,/:(plac\w+)/,":-moz-$1")]}),q(e,{props:[$(t,/:(plac\w+)/,"-ms-input-$1")]})],r)}var n;return""}))}}],ge=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,a,i=e.stylisPlugins||he,c={},o=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n0&&L(w)-m&&B(d>32?le(w+";",a,r,m-1):le($(w," ","")+";",a,r,m-2),l);break;case 59:w+=";";default:if(B(x=oe(w,n,r,u,p,i,s,O,j=[],_=[],m),c),123===v)if(0===p)e(w,n,x,x,j,c,m,s,_);else switch(99===f&&110===T(w,3)?100:f){case 100:case 108:case 109:case 115:e(t,x,x,a&&B(oe(t,x,x,0,0,i,s,O,i,j=[],m),_),i,_,m,s,a?j:_);break;default:e(w,x,x,x,[""],_,0,s,_)}}u=p=d=0,y=g=1,O=w="",m=o;break;case 58:m=1+L(w),d=b;default:if(y<1)if(123==v)--y;else if(125==v&&0==y++&&125==(V=Z>0?T(H,--Z):0,W--,10===V&&(W=1,U--),V))continue;switch(w+=A(v),v*y){case 38:g=p>0?1:(w+="\f",-1);break;case 44:s[u++]=(L(w)-1)*g,g=1;break;case 64:45===X()&&(w+=ne(Y())),f=X(),p=m=L(O=w+=ce(Q())),v++;break;case 45:45===b&&2==L(w)&&(y=0)}}return c}("",null,null,null,[""],e=ee(e),0,[0],e))}(e?e+"{"+t.styles+"}":t.styles),p),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new w({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:c,registered:{},insert:a};return m.sheet.hydrate(o),m};function ve(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}n(50);var Oe=function(e,t,n){!function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)}(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do{e.insert(t===a?"."+r:"",a,e.sheet,!0),a=a.next}while(void 0!==a)}},je={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_e=/[A-Z]|^ms/g,xe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,we=function(e){return 45===e.charCodeAt(1)},Ee=function(e){return null!=e&&"boolean"!=typeof e},Se=O((function(e){return we(e)?e:e.replace(_e,"-$&").toLowerCase()})),ke=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(xe,(function(e,t,n){return Pe={name:t,styles:n,next:Pe},t}))}return 1===je[e]||we(e)||"number"!=typeof t||0===t?t:t+"px"};function Ce(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Pe={name:n.name,styles:n.styles,next:Pe},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Pe={name:r.name,styles:r.styles,next:Pe},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a=4;++r,a-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(a){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(a)+s,styles:a,next:Pe}},Me=(!!v.useInsertionEffect&&v.useInsertionEffect||v.useLayoutEffect,v.createContext("undefined"!=typeof HTMLElement?ge({key:"css"}):null));Me.Provider;var Ne=function(e){return Object(v.forwardRef)((function(t,n){var r=Object(v.useContext)(Me);return e(t,r,n)}))},$e=v.createContext({}),Re=_,Te=function(e){return"theme"!==e},Fe=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Re:Te},Le=function(e,t,n){var r;if(t){var a=t.shouldForwardProp;r=e.__emotion_forwardProp&&a?function(t){return e.__emotion_forwardProp(t)&&a(t)}:a}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},De=function(){return null},Be=function e(t,n){var r,a,i=t.__emotion_real===t,c=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,a=n.target);var o=Le(t,n,i),s=o||Fe(c),l=!s("as");return function(){var u=arguments,p=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&p.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)p.push.apply(p,u);else{p.push(u[0][0]);for(var m=u.length,f=1;f div {\n\t\tmargin-left: 8px;\n\t}\n\n\tsvg {\n\t\tdisplay: block;\n\n\t\t&:hover {\n\t\t\tcursor: pointer;\n\t\t}\n\t}\n"]))),Ke=Ye(c.Popover)(Ie||(Ie=y()(["\n\t.components-popover__content {\n\t\tpadding: 20px;\n\t\twidth: 200px;\n\t}\n"]))),Je=Ye(c.ToggleControl)(Ze||(Ze=y()(["\n\t&& {\n\t\t.components-base-control__field {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t}\n"]))),et=n(51),tt=n.n(et),nt=Ye(c.Card)(Ve||(Ve=y()(["\n\tpadding: 30px;\n\n\t&& {\n\t\tbox-shadow: 0 2px 6px 0 rgba( 0, 0, 0, 0.05 );\n\t\tborder: 1px solid #ccc;\n\t\twidth: 100%;\n\t}\n"]))),rt=Ye(c.CardHeader)(He||(He=y()(["\n\t&&& {\n\t\tpadding: 0 0 30px;\n\t}\n\n\th1 {\n\t\tfont-size: 26px;\n\t\tline-height: 1;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\tsmall {\n\t\tcolor: #c0c0c0;\n\t\tfont-size: 13px;\n\t\tfont-weight: normal;\n\t\tdisplay: block;\n\t\tmargin: 0 0 3px;\n\t}\n"]))),at=Ye(c.CardFooter)(Ge||(Ge=y()(["\n\t&&& {\n\t\tpadding: 30px 0 0;\n\t}\n"]))),it=Ye(c.CardBody)(qe||(qe=y()(["\n\t&&& {\n\t\tpadding: 30px 0;\n\t}\n\n\t> * {\n\t\tmargin: 0 0 2rem;\n\n\t\t&:last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t}\n\n\t> p {\n\t\tcolor: #555555;\n\t\tfont-size: 15px;\n\t}\n"]))),ct=["title","supTitle","children"];function ot(e){return Object(i.createElement)(nt,e)}function st(e){var t=e.title,n=e.supTitle,r=e.children,a=tt()(e,ct);return Object(i.createElement)(rt,a,Object(i.createElement)("div",null,n&&Object(i.createElement)("small",null,n),t&&Object(i.createElement)("h1",null,t)),r)}function lt(e){return Object(i.createElement)(at,e)}function ut(e){return Object(i.createElement)(it,e)}var pt,mt=simpaySetupWizard.adminUrl;function ft(e){var t=e.isFirst,n=Object(i.useState)(!1),r=a()(n,2),s=r[0],l=r[1];return Object(i.createElement)(c.Flex,{justify:"center"},s&&Object(i.createElement)(c.Modal,{title:Object(o.__)("Are you sure you want to exit the wizard?","simple-pay"),onRequestClose:function(){return l(!1)}},Object(i.createElement)("p",{style:{marginBottom:"2rem"}},Object(o.__)("Manual setup is only recommended for experienced users.","simple-pay")),Object(i.createElement)(c.Flex,null,Object(i.createElement)(c.Button,{href:mt,isDestructive:!0,variant:"destructive"},Object(o.__)("Exit Setup Wizard","simple-pay")),Object(i.createElement)(c.Button,{variant:"primary",isPrimary:!0,onClick:function(){return l(!1)}},Object(o.__)("Continue Setup","simple-pay")))),Object(i.createElement)(c.Button,{isLink:!0,variant:"link",className:"simpay-setup-wizard-subtle-link",onClick:function(){return l(!0)}},t?Object(o.__)("Go back to the Dashboard","simple-pay"):Object(o.__)("Close and exit the Setup Wizard","simple-pay")))}var dt=Ye(c.Button)(pt||(pt=y()(["\n\t&& {\n\t\tfont-size: 16px;\n\t\tfont-weight: bold;\n\t\tpadding: 15px 30px !important;\n\t\theight: auto;\n\t}\n"]))),bt=Object(i.forwardRef)((function(e,t){return Object(i.createElement)(dt,g()({isPrimary:!0,variant:"primary"},e,{ref:t}))}));function yt(e){return e.width,Object(i.createElement)("svg",{width:"311",height:"41",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.352 0C1.052 0 0 1.02 0 2.277v30.746C0 34.281 1.053 35.3 2.352 35.3h28.806c.975 0 1.764-.764 1.764-1.708 0-.943-.79-1.708-1.763-1.708H5.29c-.974 0-1.764-.765-1.764-1.708v-17.08c0-.944.79-1.709 1.764-1.709h44.092c1.299 0 2.352-1.02 2.352-2.277V2.277C51.735 1.02 50.682 0 49.383 0H2.352Zm55.262 24.198h-1.47v-1.993c0-4.088-3.422-7.402-7.643-7.402-4.22 0-7.642 3.314-7.642 7.402v1.993H38.8c-1.299 0-2.352 1.02-2.352 2.277v11.387c0 1.258 1.053 2.278 2.352 2.278h18.813c1.299 0 2.351-1.02 2.351-2.278V26.475c0-1.258-1.053-2.277-2.351-2.277Zm-4.997-1.993v1.993h-8.23v-1.993c0-2.201 1.842-3.985 4.114-3.985 2.273 0 4.116 1.784 4.116 3.985ZM8.23 20.497c0-.629.526-1.139 1.175-1.139H28.22c.65 0 1.176.51 1.176 1.139s-.527 1.139-1.176 1.139H9.406c-.649 0-1.175-.51-1.175-1.139Zm0 5.124c0-.629.526-1.138 1.175-1.138h7.055c.65 0 1.176.51 1.176 1.138 0 .63-.527 1.139-1.176 1.139H9.406c-.649 0-1.175-.51-1.175-1.139Zm31.158 11.672V27.045h17.637v10.248H39.389Z",fill:"#428BCA"}),Object(i.createElement)("path",{d:"M81.08 30.745h5.288l5.41-17.186 5.596 17.187h5.289l7.84-24.29h-5.288l-5.289 17.956L94.7 6.457h-5.842L83.785 24.38 78.528 6.457h-5.289l7.84 24.288Zm31.511 0h4.796v-8.793h6.456c5.319 0 8.302-3.228 8.302-7.963 0-4.735-2.983-7.532-8.302-7.532h-11.252v24.288Zm4.796-13.405V11.1h5.288c2.952 0 4.52 1.168 4.52 3.104 0 1.968-1.507 3.136-4.366 3.136h-5.442Zm35.473 13.897c6.303 0 10.023-3.197 10.023-7.747 0-10.3-14.789-4.581-14.789-10.085 0-1.906 1.599-3.013 4.52-3.013 2.859 0 4.519 1.322 4.704 3.567h5.288c0-4.92-4.089-7.994-9.9-7.994-5.872 0-9.562 2.89-9.562 7.502 0 10.268 14.758 4.642 14.758 10.084 0 1.998-1.752 3.26-4.919 3.26-3.228 0-5.073-1.6-5.165-4.305h-5.381c0 5.503 4.274 8.731 10.423 8.731Zm15.137-18.447c1.66 0 2.89-1.23 2.89-2.89 0-1.66-1.23-2.829-2.89-2.829-1.691 0-2.921 1.169-2.921 2.83 0 1.66 1.23 2.89 2.921 2.89Zm-2.306 17.956h4.581V14.758h-4.581v15.988Zm7.696-.001h4.55v-8.178c0-2.644 1.384-4.366 3.597-4.366 1.968 0 3.136 1.415 3.136 3.751v8.793h4.612v-8.178c0-2.644 1.384-4.366 3.597-4.366 1.968 0 3.136 1.415 3.136 3.751v8.793h4.643v-9.039c0-4.888-1.968-7.44-5.965-7.44-2.459 0-4.642.86-6.21 3.044-.892-2.03-2.583-3.044-5.135-3.044-2.552 0-4.335 1.076-5.411 2.798v-2.306h-4.55v15.988Zm30.183 6.15h4.551v-8.24c1.106 1.63 2.859 2.582 5.38 2.582 4.028 0 6.887-3.504 6.887-8.424 0-5.011-2.859-8.547-6.887-8.547-2.521 0-4.274.953-5.38 2.583v-2.091h-4.551v22.137Zm8.363-9.593c-2.244 0-3.843-1.875-3.843-4.52 0-2.674 1.599-4.58 3.843-4.58 2.275 0 3.874 1.906 3.874 4.58 0 2.645-1.599 4.52-3.874 4.52Zm10.651 3.443h4.551V6.457h-4.551v24.288Zm15.443.492c3.905 0 6.918-2.213 7.41-5.688h-4.551c-.184 1.107-1.229 1.968-2.828 1.968-2.368 0-3.536-1.353-3.751-3.412h11.222v-1.476c0-5.104-3.259-8.363-7.502-8.363-4.919 0-8.363 3.505-8.363 8.455 0 4.98 3.444 8.516 8.363 8.516Zm-3.689-9.93c.276-1.845 1.352-3.106 3.505-3.106 1.937 0 3.013 1.322 3.105 3.106h-6.61Zm22.358 9.438h4.796v-8.793h6.457c5.319 0 8.301-3.228 8.301-7.963 0-4.735-2.982-7.532-8.301-7.532h-11.253v24.288Zm4.796-13.405V11.1h5.288c2.952 0 4.52 1.168 4.52 3.104 0 1.968-1.507 3.136-4.366 3.136h-5.442Zm20.704 13.897c2.736 0 4.458-1.23 5.257-3.228.4 2.183 2.152 3.413 5.688 2.613v-3.259c-1.261.123-1.507-.338-1.507-1.66v-5.411c0-3.782-2.644-6.026-7.317-6.026-4.612 0-7.317 2.275-7.317 6.118h4.488c0-1.383 1.015-2.183 2.768-2.183 1.906 0 2.859.769 2.828 2.091v.492l-3.659.43c-4.519.523-7.071 2.368-7.071 5.258 0 2.429 1.722 4.765 5.842 4.765Zm.922-3.382c-1.414 0-2.183-.645-2.183-1.63 0-1.167 1.507-1.629 4.397-1.998l1.568-.153c-.277 2.152-1.599 3.781-3.782 3.781Zm11.126 9.04h1.967c3.936 0 6.641-1.077 8.271-4.981L311 14.758h-4.766l-3.996 10.669-4.797-10.67h-4.796l7.225 16.234c-1.014 1.446-2.06 1.907-4.058 1.876h-1.568v4.028Z",fill:"#428BCA"}))}var ht=n(15);function gt(e){var t=Object(ht.useSelect)((function(e){return Object(u.filter)(e("core/notices").getNotices(),{type:"snackbar"})}),[]),n=Object(ht.useDispatch)("core/notices").removeNotice;return 0===t.length?null:Object(i.createElement)(c.SnackbarList,g()({onRemove:n,notices:t},e))}var vt,Ot,jt,_t,xt,wt=n(63),Et=Ye.div(vt||(vt=y()(["\n\tmax-width: 80%;\n\tdisplay: flex;\n\talign-items: center;\n\n\t> * {\n\t\tmargin-right: 8px;\n\n\t\t&:last-child {\n\t\t\tmargin-right: 0;\n\t\t}\n\t}\n"]))),St={current:"var(--wp-admin-theme-color)",complete:"var(--wp-admin-theme-color)",incomplete:"#c0c0c0"},kt=Ye.div(Ot||(Ot=y()(["\n\twidth: 16px;\n\theight: 16px;\n\tborder-radius: 50%;\n\tbackground-color: ",";\n\tflex-shrink: 0;\n\tposition: relative;\n\ttransition: backgroundColor 0.2s ease-in-out;\n\n\tsvg {\n\t\tfill: #fff;\n\t\tposition: absolute;\n\t\tleft: -1px;\n\t\ttop: -1px;\n\t\ttransition: opacity 0.2s ease-in-out;\n\t\topacity: ",";\n\t}\n\n\tdiv {\n\t\topacity: ",";\n\t}\n\n\tpath {\n\t\tstroke: #fff;\n\t}\n"])),(function(e){return St[e.status]}),(function(e){return e.isComplete?"1":"0"}),(function(e){var t=e.isCurrent,n=e.isComplete;return t&&!n?"1":"0"})),Ct=Ye.div(jt||(jt=y()(["\n\twidth: 6px;\n\theight: 6px;\n\tbackground-color: #f0f0f1;\n\tborder-radius: 50%;\n\tposition: absolute;\n\ttop: 5px;\n\tleft: 5px;\n\ttransition: opacity 0.2s ease-in-out;\n"]))),Pt=Ye.div(_t||(_t=y()(["\n\twidth: 100%;\n\theight: 2px;\n\tbackground-color: rgba( 192, 192, 192, 0.5 );\n\twidth: 100px;\n"])));function zt(e){for(var t=e.current,n=e.total,r=[],a=1;a<=n;a++){var c="incomplete";a * {\n\t\tmargin: 25px 0;\n\t}\n"])));function Nt(e){return Object(i.createElement)(Mt,e)}var $t=Ye(c.Button)(At||(At=y()(["\n\t&&&& {\n\t\tfont-size: 16px;\n\t\tfont-weight: bold;\n\t\tpadding: 13px 30px 12px !important;\n\t\theight: auto;\n\t\tbackground-color: #635bff;\n\n\t\t&:focus {\n\t\t\tbackground-color: #635bff;\n\t\t\tbox-shadow: inset 0 0 0 1px #fff,\n\t\t\t\t0 0 0 var( --wp-admin-border-width-focus ) #635bff;\n\t\t}\n\n\t\t&:hover {\n\t\t\tbackground-color: #0a2540 !important;\n\t\t}\n\n\t\t&:focus:hover {\n\t\t\tbox-shadow: inset 0 0 0 1px #fff,\n\t\t\t\t0 0 0 var( --wp-admin-border-width-focus ) #0a2540;\n\t\t}\n\n\t\tsvg {\n\t\t\tmargin-left: 5px;\n\t\t}\n\t}\n"]))),Rt=Object(i.forwardRef)((function(e,t){return Object(i.createElement)($t,g()({isPrimary:!0,variant:"primary"},e,{ref:t}))}));function Tt(){return Object(i.createElement)("svg",{width:56,height:23,fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M55.742 11.884c0-3.93-1.92-7.032-5.59-7.032-3.684 0-5.914 3.101-5.914 7.001 0 4.622 2.632 6.955 6.41 6.955 1.843 0 3.236-.414 4.29-.998v-3.07c-1.053.522-2.261.844-3.794.844-1.502 0-2.834-.522-3.004-2.334h7.572c0-.2.03-.998.03-1.366Zm-7.649-1.459c0-1.735 1.069-2.456 2.044-2.456.945 0 1.951.721 1.951 2.456h-3.995Zm-9.832-5.573c-1.517 0-2.493.706-3.035 1.197l-.201-.952h-3.407V23l3.871-.814.016-4.345c.557.4 1.378.967 2.74.967 2.772 0 5.296-2.21 5.296-7.078-.015-4.452-2.57-6.878-5.28-6.878Zm-.929 10.579c-.913 0-1.456-.323-1.827-.722l-.016-5.696c.403-.446.96-.753 1.843-.753 1.41 0 2.385 1.566 2.385 3.578 0 2.057-.96 3.593-2.385 3.593ZM26.292 3.946l3.886-.83V0l-3.886.814v3.132Zm0 1.167h3.886v13.434h-3.886V5.113Zm-4.165 1.136-.248-1.136h-3.345v13.434h3.871V9.443c.914-1.183 2.462-.968 2.942-.799V5.113c-.495-.184-2.307-.522-3.22 1.136Zm-7.742-4.468-3.778.798-.016 12.299c0 2.272 1.719 3.946 4.01 3.946 1.27 0 2.2-.23 2.71-.507V15.2c-.495.2-2.942.906-2.942-1.366v-5.45h2.942V5.112H14.37l.016-3.332ZM3.917 9.013c0-.6.496-.83 1.317-.83 1.176 0 2.663.354 3.84.983V5.558c-1.286-.507-2.555-.706-3.84-.706C2.09 4.852 0 6.479 0 9.197c0 4.238 5.884 3.562 5.884 5.39 0 .705-.62.936-1.487.936-1.285 0-2.926-.522-4.227-1.229v3.655c1.44.614 2.896.875 4.227.875 3.221 0 5.435-1.582 5.435-4.33-.015-4.575-5.915-3.762-5.915-5.481Z",fill:"#fff"}))}var Ft=n(11),Lt=n.n(Ft);function Dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;tWP Simple Pay account or purchase receipt email.","simple-pay"),{strong:Object(i.createElement)("strong",null),a:Object(i.createElement)("a",{href:Jt,target:"_blank",rel:"noopener noreferrer"})})),Object(i.createElement)(c.TextControl,{label:Object(o.__)("License Key","simple-pay"),value:l,className:_,onChange:function(e){return u(e)},disabled:d,help:g||Object(o.__)("An active license ensures automatic updates and the latest features.","simple-pay"),ref:j})),Object(i.createElement)(lt,{justify:"flex-end",align:"center"},Object(i.createElement)(bt,{onClick:function(){b(!0);var e=new FormData;e.append("action","simpay_activate_license"),e.append("nonce",en),e.append("license",l),m()({url:Kt,method:"POST",body:e}).then((function(e){var r=e.success,a=e.data,i=a.message,c=a.license;if(!r)throw{message:i};n(c),O(Object(o.__)("License activated","simple-pay"),{type:"snackbar"}),b(!1),t()})).catch((function(e){var t=e.message;v(t),b(!1)}))},disabled:""===l||d,isBusy:d},Object(o.__)("Activate and Continue →","simple-pay"))))}},{id:"stripe",title:Object(o.__)("Connect to Stripe","simple-pay"),content:wn},{id:"emails",title:Object(o.__)("Configure Emails","simple-pay"),content:function(e){var t=e.goPrev,n=e.goNext,r=e.licenseData,a=Wt(),s=a.settings,l=a.rawSettings,p=a.discardChanges,m=a.editSettings,f=a.saveSettings,d=Object(i.useRef)();if(Object(i.useLayoutEffect)((function(){d.current&&d.current.focus()}),[l]),Object(u.isEmpty)(s))return Object(i.createElement)(ut,null,Object(i.createElement)(c.Spinner,null));var b=s["email_payment-confirmation"],y=s["email_payment-notification"],h=s["email_payment-notification_to"],g=s["email_upcoming-invoice"],v=s["email_invoice-confirmation"],O=r.features,j=O.subscriptions,_=O.enhanced_subscriptions;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ut,null,Object(i.createElement)("ul",{className:"simpay-setup-wizard-toggle-list"},Object(i.createElement)("li",null,Object(i.createElement)("label",{htmlFor:"email_payment-confirmation"},Object(i.createElement)("h3",null,Object(o.__)("Payment Receipt","simple-pay")),Object(i.createElement)("p",null,Object(o.__)("Send a payment receipt email to the customer upon successful payment.","simple-pay"))),Object(i.createElement)(c.FormToggle,{id:"email_payment-confirmation",checked:"no"!==b,onChange:function(e){var t=e.target;return m({"email_payment-confirmation":t.checked?"yes":"no"})}})),Object(i.createElement)("li",null,Object(i.createElement)("label",{htmlFor:"email_payment-notification"},Object(i.createElement)("h3",null,Object(o.__)("Payment Notification","simple-pay")),Object(i.createElement)("p",null,Object(o.__)("Receive an email notification when a new payment is made.","simple-pay"))),Object(i.createElement)(c.FormToggle,{id:"email_payment-notification",checked:"no"!==y,onChange:function(e){var t=e.target;return m({"email_payment-notification":t.checked?"yes":"no"})}})),"no"!==y&&Object(i.createElement)("li",{className:"simpay-setup-wizard-toggle-list__child"},Object(i.createElement)(c.TextControl,{label:Object(o.__)("Send to:","simple-pay"),value:h,onChange:function(e){return m({"email_payment-notification_to":e})}})),_&&Object(i.createElement)("li",null,Object(i.createElement)("label",{htmlFor:"email_invoice-confirmation"},Object(i.createElement)("h3",null,Object(o.__)("Invoice Receipt","simple-pay")),Object(i.createElement)("p",null,Object(o.__)("Send a payment receipt email to the customer upon successful invoice.","simple-pay"))),Object(i.createElement)(c.FormToggle,{id:"email_payment-confirmation",checked:"no"!==v,onChange:function(e){var t=e.target;return m({"email_invoice-confirmation":t.checked?"yes":"no"})}})),j&&Object(i.createElement)("li",null,Object(i.createElement)("label",{htmlFor:"email_upcoming-invoice"},Object(i.createElement)("h3",null,Object(o.__)("Upcoming Invoice","simple-pay")),Object(i.createElement)("p",null,Object(o.__)("Remind customers of upcoming invoices and allow payment method changes.","simple-pay"))),Object(i.createElement)(c.FormToggle,{id:"email_upcoming-invoice",checked:"no"!==g,onChange:function(e){var t=e.target;return m({"email_upcoming-invoice":t.checked?"yes":"no"})}})))),Object(i.createElement)(lt,{justify:"space-between",align:"center"},Object(i.createElement)("div",null,Object(i.createElement)(c.Button,{isLink:!0,variant:"link",onClick:t,className:"simpay-setup-wizard-subtle-link"},Object(o.__)("← Previous Step","simple-pay"))),Object(i.createElement)("div",{style:{display:"flex",justifyContent:"center"}},Object(i.createElement)(c.Button,{isLink:!0,variant:"link",onClick:function(){p(),n()},style:{marginRight:"16px"},className:"simpay-setup-wizard-subtle-link"},Object(o.__)("Skip Step","simple-pay")),Object(i.createElement)(bt,{onClick:function(){f(),n()},ref:d},Object(o.__)("Save and Continue →","simple-pay")))))}},{id:"next-steps",title:Object(o.__)("🎉 Setup Complete","simple-pay"),content:function(){return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ut,null,Object(i.createElement)("div",{className:"simpay-setup-wizard-content-list"},Object(i.createElement)("div",{className:"simpay-setup-wizard-content-list__content"},Object(i.createElement)("p",null,Object(o.__)("Congratulations, you’re ready to start accepting payments!","simple-pay")),Object(i.createElement)("p",null,Object(o.__)("WP Simple Pay is just that: simple. Create your first payment form below to start collecting payments, or fine-tune your setup through some of these suggestions:","simple-pay"))),Object(i.createElement)("div",{className:"simpay-setup-wizard-content-list__list"},Object(i.createElement)("ul",{className:"simpay-setup-wizard-bullet-list"},Object(i.createElement)("li",null,Object(i.createElement)("a",{href:bn,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Collect tax or GST","simple-pay"))),Object(i.createElement)("li",null,Object(i.createElement)("a",{href:yn,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Add anti-spam protection","simple-pay"))),Object(i.createElement)("li",null,Object(i.createElement)("a",{href:hn,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Change the default currency","simple-pay"))),Object(i.createElement)("li",null,Object(i.createElement)("a",{href:gn,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Customize receipts","simple-pay")))))),Object(i.createElement)("hr",null),Object(i.createElement)("div",{className:"simpay-setup-wizard-doc-suggestions"},Object(i.createElement)("div",null,Object(i.createElement)("h3",null,Object(o.__)("Accept Donations","simple-pay")),Object(i.createElement)("p",null,Object(o.__)("Easily fundraise or accept donations online via 135+ supported currencies. Offer one-time or recurring donations of fixed or user-defined amounts.","simple-pay")),Object(i.createElement)(c.Button,{href:vn,variant:"secondary",isSecondary:!0,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("View Walkthrough","simple-pay"))),Object(i.createElement)("div",null,Object(i.createElement)("h3",null,Object(o.__)("Reconcile Invoices","simple-pay")),Object(i.createElement)("p",null,Object(o.__)("Collect additional custom data on your payment forms such as an Invoice ID to reconcile invoices against your own invoicing system.","simple-pay")),Object(i.createElement)(c.Button,{href:On,variant:"secondary",isSecondary:!0,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("View Walkthrough","simple-pay"))))),Object(i.createElement)(lt,{justify:"space-between",align:"center"},Object(i.createElement)("div",{style:{flexBasis:"100%"}},Object(i.createElement)(c.Button,{isLink:!0,variant:"link",href:fn,className:"simpay-setup-wizard-subtle-link",icon:Object(i.createElement)(f.a,{icon:rn})},Object(o.__)("Return to Dashboard","simple-pay"))),Object(i.createElement)(c.Flex,{justify:"flex-end",gap:4},Object(i.createElement)(bt,{href:dn},Object(o.__)("Create a Payment Form →","simple-pay")))))}}],lite:[{id:"stripe",title:Object(o.__)("Connect to Stripe","simple-pay"),content:wn},{id:"analytics",title:Object(o.__)("Help Improve WP Simple Pay + Smart Recommendations","simple-pay"),content:function(e){var t=e.goPrev,n=e.goNext,r=Wt(),s=r.settings,l=r.rawSettings,p=r.discardChanges,b=r.editSettings,y=r.saveSettings,h=Object(i.useState)(!0),g=a()(h,2),v=g[0],O=g[1],j=Object(i.useState)(Ht),_=a()(j,2),x=_[0],w=_[1],E=Object(i.useState)(!1),S=a()(E,2),k=S[0],C=S[1],P=Object(i.useState)(!1),z=a()(P,2),A=z[0],M=z[1],N=Object(i.useRef)();return Object(i.useLayoutEffect)((function(){N.current&&N.current.focus()}),[l]),Object(u.isEmpty)(s)?Object(i.createElement)(ut,null,Object(i.createElement)(c.Spinner,null)):Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ut,null,Object(i.createElement)("p",null,Object(o.__)("Get helpful suggestions from WP Simple Pay on how to optimize your payment forms and grow your business or increase donations.","simple-pay")),Object(i.createElement)(c.TextControl,{label:Object(o.__)("Your Email Address:","simple-pay"),value:x,className:"simpay-setup-wizard-large-input",onChange:function(e){return w(e)},help:Object(o.__)("Your email is needed so you receive recommendations.","simple-pay"),ref:N,disabled:k}),Object(i.createElement)("hr",null),Object(i.createElement)(Xe,null,Object(i.createElement)(Qe,null,Object(o.__)("Help make WP Simple Pay better for everyone","simple-pay"),Object(i.createElement)("div",null,A&&Object(i.createElement)(Ke,{position:"top center"},Object(o.__)("By allowing us to track usage data we can better help you because we know which WordPress configurations, themes, and plugins we should test.","simple-pay")),Object(i.createElement)(f.a,{size:20,icon:d.a,onMouseEnter:function(){return M(!0)},onMouseLeave:function(){return M(!1)}}))),Object(i.createElement)(Je,{label:Object(o.__)("Yes, count me in","simple-pay"),id:"email_payment-confirmation",checked:v,disabled:k,onChange:function(e){O(e)}}))),Object(i.createElement)(lt,{justify:"space-between",align:"center"},Object(i.createElement)("div",null,Object(i.createElement)(c.Button,{isLink:!0,variant:"link",onClick:t,className:"simpay-setup-wizard-subtle-link",disabled:k},Object(o.__)("← Previous Step","simple-pay"))),Object(i.createElement)("div",{style:{display:"flex",justifyContent:"center"}},Object(i.createElement)(c.Button,{isLink:!0,variant:"link",onClick:function(){p(),n()},style:{marginRight:"16px"},className:"simpay-setup-wizard-subtle-link",disabled:k},Object(o.__)("Skip Step","simple-pay")),Object(i.createElement)(bt,{onClick:function(){C(!0),b({usage_tracking_opt_in:v?"yes":"no"}),y();var e=new FormData;e.append("action","simpay_setup_wizard_subscribe_email"),e.append("nonce",Gt),e.append("email",x),m()({url:qt,method:"POST",body:e}).finally((function(){C(!1),n()}))},isBusy:k,disabled:k},Object(o.__)("Save and Continue →","simple-pay")))))}},{id:"next-steps",title:Object(o.__)("🎉 Setup Complete","simple-pay"),content:function(){return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ut,null,Object(i.createElement)(c.Flex,{justify:"space-between",align:"center",className:"simpay-setup-wizard-content-list"},Object(i.createElement)("div",{className:"simpay-setup-wizard-content-list__content"},Object(i.createElement)("p",null,Object(o.__)("Congratulations, you’re ready to start easily and securely accepting payments with WP Simple Pay!","simple-pay"))),Object(i.createElement)("div",null,Object(i.createElement)(bt,{href:ln},Object(o.__)("Create a Payment Form →","simple-pay")))),Object(i.createElement)("hr",null),Object(i.createElement)(an,null,Object(i.createElement)("h4",null,Object(o.__)("Special Upgrade Offer - Save 50%","simple-pay")),Object(i.createElement)("h3",null,Object(o.__)("Upgrade to WP Simple Pay Pro Today and Save","simple-pay")),Object(i.createElement)(cn,{className:"simpay-setup-wizard-check-list"},pn.map((function(e){return Object(i.createElement)("li",{key:e},Object(i.createElement)(f.a,{icon:wt.a}),e)}))),Object(i.createElement)(c.Button,{isLarge:!0,isSecondary:!0,variant:"secondary",href:un,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Upgrade to WP Simple Pay Pro","simple-pay")))),Object(i.createElement)(lt,{justify:"center"},Object(i.createElement)(c.Button,{isLink:!0,variant:"link",href:sn,className:"simpay-setup-wizard-subtle-link",icon:Object(i.createElement)(f.a,{icon:rn})},Object(o.__)("Return to Dashboard","simple-pay"))))}}]},Cn=simpaySetupWizard,Pn=Cn.license,zn=Cn.adminUrl,An=Pn.is_lite;Object(i.render)(Object(i.createElement)((function(){var e=kn[!0===An?"lite":"pro"],t=Object(s.getQueryArg)(window.location.href,"step"),n=Object(i.useState)(Pn),r=a()(n,2),u=r[0],p=r[1],m=function(e){var t=e.steps,n=e.currentStepId,r=t.findIndex((function(e){return e.id===n}))||0,c=Object(i.useState)(r),o=a()(c,2),l=o[0],u=o[1];function p(e){u(e),window.history.pushState({},"",Object(s.addQueryArgs)(window.location.href,{step:t[e].id}))}return Object(i.useEffect)((function(){var e=function(){var e=Object(s.getQueryArg)(window.location.search,"step"),n=t.findIndex((function(t){return t.id===e}))||0;u(n)};return window.addEventListener("popstate",e),window.addEventListener("pushstate",e),function(){window.removeEventListener("popstate",e),window.removeEventListener("pushstate",e)}}),[]),{currentStep:l,setCurrentStep:u,hasNext:l0}}({steps:e,currentStepId:t}),f=m.currentStep,d=m.goNext,b=m.goPrev,y=m.hasNext,h=m.hasPrev;if(-1===f)return Object(i.createElement)(Sn,{steps:e,goNext:d});var g=e[f],v=g.content;return Object(i.createElement)(c.SlotFillProvider,null,Object(i.createElement)(l.EntityProvider,{kind:"root",type:"site"},Object(i.createElement)(Nt,null,Object(i.createElement)("a",{href:zn},Object(i.createElement)(yt,{width:"250px"})),Object(i.createElement)(zt,{current:f+1,total:e.length}),Object(i.createElement)(ot,{isRounded:!0},Object(i.createElement)(st,{supTitle:Object(o.sprintf)(/* translators: %1$d current step count. %2$d total step count*/ -Object(o.__)("Step %1$d of %2$d","simple-pay"),f+1,e.length),title:g.title}),Object(i.createElement)(v,{steps:e,currentStep:f,goPrev:b,goNext:d,hasNext:y,hasPrev:h,licenseData:u,setLicenseData:p})),y&&Object(i.createElement)(ft,null)),Object(i.createElement)(gt,{className:"simpay-setup-wizard-toasts"}),Object(i.createElement)(c.Popover.Slot,null)))}),null),document.getElementById("simpay-setup-wizard"))}]); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-block-payment-form-css.min.asset.php b/includes/core/assets/js/simpay-block-payment-form-css.min.asset.php deleted file mode 100644 index f9a72193..00000000 --- a/includes/core/assets/js/simpay-block-payment-form-css.min.asset.php +++ /dev/null @@ -1 +0,0 @@ - array(), 'version' => '93eb125b6da966a58be6cddde67360d0'); \ No newline at end of file diff --git a/includes/core/assets/js/simpay-block-payment-form.min.js b/includes/core/assets/js/simpay-block-payment-form.min.js deleted file mode 100644 index eba93947..00000000 --- a/includes/core/assets/js/simpay-block-payment-form.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=83)}({0:function(e,t){e.exports=window.wp.element},15:function(e,t){e.exports=window.wp.data},2:function(e,t){e.exports=window.wp.i18n},21:function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?i(e(t),9007199254740991):0}},,function(t,n){var r=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=r)},function(t,n,r){t.exports=!r(5)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,r){var e=r(6),i=r(115),o=r(38),u=Object.defineProperty;n.f=r(15)?Object.defineProperty:function(t,n,r){if(e(t),n=o(n,!0),e(r),i)try{return u(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},,,function(t,n,r){var e=r(35);t.exports=function(t){return Object(e(t))}},,function(t,n,r){var e=r(4),i=r(24),o=r(23),u=r(43)("src"),c=r(157),f=(""+c).split("toString");r(14).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,r,c){var a="function"==typeof r;a&&(o(r,"name")||i(r,"name",n)),t[n]!==r&&(a&&(o(r,u)||i(r,u,t[n]?""+t[n]:f.join(String(n)))),t===e?t[n]=r:c?t[n]?t[n]=r:i(t,n,r):(delete t[n],i(t,n,r)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[u]||c.call(this)}))},function(t,n,r){var e=r(0),i=r(5),o=r(35),u=/"/g,c=function(t,n,r,e){var i=String(o(t)),c="<"+n;return""!==r&&(c+=" "+r+'="'+String(e).replace(u,""")+'"'),c+">"+i+""};t.exports=function(t,n){var r={};r[t]=n(c),e(e.P+e.F*i((function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3})),"String",r)}},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n,r){var e=r(16),i=r(42);t.exports=r(15)?function(t,n,r){return e.f(t,n,i(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n,r){var e=r(61),i=r(35);t.exports=function(t){return e(i(t))}},function(t,n,r){"use strict";var e=r(5);t.exports=function(t,n){return!!t&&e((function(){n?t.call(null,(function(){}),1):t.call(null)}))}},function(t,n,r){var e=r(28);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,i){return t.call(n,r,e,i)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){var e=r(62),i=r(42),o=r(25),u=r(38),c=r(23),f=r(115),a=Object.getOwnPropertyDescriptor;n.f=r(15)?a:function(t,n){if(t=o(t),n=u(n,!0),f)try{return a(t,n)}catch(t){}if(c(t,n))return i(!e.f.call(t,n),t[n])}},function(t,n,r){var e=r(0),i=r(14),o=r(5);t.exports=function(t,n){var r=(i.Object||{})[t]||Object[t],u={};u[t]=n(r),e(e.S+e.F*o((function(){r(1)})),"Object",u)}},function(t,n,r){var e=r(27),i=r(61),o=r(19),u=r(12),c=r(131);t.exports=function(t,n){var r=1==t,f=2==t,a=3==t,s=4==t,l=6==t,h=5==t||l,p=n||c;return function(n,c,v){for(var y,d,g=o(n),x=i(g),b=e(c,v,3),m=u(x.length),S=0,w=r?p(n,m):f?p(n,0):void 0;m>S;S++)if((h||S in x)&&(d=b(y=x[S],S,g),t))if(r)w[S]=d;else if(d)switch(t){case 3:return!0;case 5:return y;case 6:return S;case 2:w.push(y)}else if(s)return!1;return l?-1:a||s?s:w}}},,function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,r){"use strict";if(r(15)){var e=r(44),i=r(4),o=r(5),u=r(0),c=r(77),f=r(105),a=r(27),s=r(57),l=r(42),h=r(24),p=r(58),v=r(29),y=r(12),d=r(142),g=r(46),x=r(38),b=r(23),m=r(63),S=r(7),w=r(19),_=r(97),E=r(47),O=r(49),P=r(48).f,F=r(99),M=r(43),A=r(9),j=r(32),I=r(67),N=r(64),T=r(101),L=r(55),R=r(70),k=r(56),C=r(100),D=r(133),W=r(16),G=r(30),U=W.f,B=G.f,V=i.RangeError,z=i.TypeError,Y=i.Uint8Array,q=Array.prototype,$=f.ArrayBuffer,K=f.DataView,J=j(0),X=j(2),H=j(3),Z=j(4),Q=j(5),tt=j(6),nt=I(!0),rt=I(!1),et=T.values,it=T.keys,ot=T.entries,ut=q.lastIndexOf,ct=q.reduce,ft=q.reduceRight,at=q.join,st=q.sort,lt=q.slice,ht=q.toString,pt=q.toLocaleString,vt=A("iterator"),yt=A("toStringTag"),dt=M("typed_constructor"),gt=M("def_constructor"),xt=c.CONSTR,bt=c.TYPED,mt=c.VIEW,St=j(1,(function(t,n){return Pt(N(t,t[gt]),n)})),wt=o((function(){return 1===new Y(new Uint16Array([1]).buffer)[0]})),_t=!!Y&&!!Y.prototype.set&&o((function(){new Y(1).set({})})),Et=function(t,n){var r=v(t);if(r<0||r%n)throw V("Wrong offset!");return r},Ot=function(t){if(S(t)&&bt in t)return t;throw z(t+" is not a typed array!")},Pt=function(t,n){if(!S(t)||!(dt in t))throw z("It is not a typed array constructor!");return new t(n)},Ft=function(t,n){return Mt(N(t,t[gt]),n)},Mt=function(t,n){for(var r=0,e=n.length,i=Pt(t,e);e>r;)i[r]=n[r++];return i},At=function(t,n,r){U(t,n,{get:function(){return this._d[r]}})},jt=function(t){var n,r,e,i,o,u,c=w(t),f=arguments.length,s=f>1?arguments[1]:void 0,l=void 0!==s,h=F(c);if(null!=h&&!_(h)){for(u=h.call(c),e=[],n=0;!(o=u.next()).done;n++)e.push(o.value);c=e}for(l&&f>2&&(s=a(s,arguments[2],2)),n=0,r=y(c.length),i=Pt(this,r);r>n;n++)i[n]=l?s(c[n],n):c[n];return i},It=function(){for(var t=0,n=arguments.length,r=Pt(this,n);n>t;)r[t]=arguments[t++];return r},Nt=!!Y&&o((function(){pt.call(new Y(1))})),Tt=function(){return pt.apply(Nt?lt.call(Ot(this)):Ot(this),arguments)},Lt={copyWithin:function(t,n){return D.call(Ot(this),t,n,arguments.length>2?arguments[2]:void 0)},every:function(t){return Z(Ot(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return C.apply(Ot(this),arguments)},filter:function(t){return Ft(this,X(Ot(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Ot(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Ot(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){J(Ot(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return rt(Ot(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return nt(Ot(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return at.apply(Ot(this),arguments)},lastIndexOf:function(t){return ut.apply(Ot(this),arguments)},map:function(t){return St(Ot(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ct.apply(Ot(this),arguments)},reduceRight:function(t){return ft.apply(Ot(this),arguments)},reverse:function(){for(var t,n=Ot(this).length,r=Math.floor(n/2),e=0;e1?arguments[1]:void 0)},sort:function(t){return st.call(Ot(this),t)},subarray:function(t,n){var r=Ot(this),e=r.length,i=g(t,e);return new(N(r,r[gt]))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,y((void 0===n?e:g(n,e))-i))}},Rt=function(t,n){return Ft(this,lt.call(Ot(this),t,n))},kt=function(t){Ot(this);var n=Et(arguments[1],1),r=this.length,e=w(t),i=y(e.length),o=0;if(i+n>r)throw V("Wrong length!");for(;o255?255:255&e),i.v[p](r*n+i.o,e,wt)}(this,r,t)},enumerable:!0})};b?(v=r((function(t,r,e,i){s(t,v,a,"_d");var o,u,c,f,l=0,p=0;if(S(r)){if(!(r instanceof $||"ArrayBuffer"==(f=m(r))||"SharedArrayBuffer"==f))return bt in r?Mt(v,r):jt.call(v,r);o=r,p=Et(e,n);var g=r.byteLength;if(void 0===i){if(g%n)throw V("Wrong length!");if((u=g-p)<0)throw V("Wrong length!")}else if((u=y(i)*n)+p>g)throw V("Wrong length!");c=u/n}else c=d(r),o=new $(u=c*n);for(h(t,"_d",{b:o,o:p,l:u,e:c,v:new K(o)});ldocument.F=Object<\/script>"),t.close(),f=t.F;e--;)delete f.prototype[o[e]];return f()};t.exports=Object.create||function(t,n){var r;return null!==t?(c.prototype=e(t),r=new c,c.prototype=null,r[u]=t):r=f(),void 0===n?r:i(r,n)}},function(t,n,r){var e=r(117),i=r(84).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return e(t,i)}},function(t,n,r){var e=r(23),i=r(19),o=r(83)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),e(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,r){var e=r(9)("unscopables"),i=Array.prototype;null==i[e]&&r(24)(i,e,{}),t.exports=function(t){i[e][t]=!0}},function(t,n,r){var e=r(7);t.exports=function(t,n){if(!e(t)||t._t!==n)throw TypeError("Incompatible receiver, "+n+" required!");return t}},,function(t,n,r){var e=r(16).f,i=r(23),o=r(9)("toStringTag");t.exports=function(t,n,r){t&&!i(t=r?t:t.prototype,o)&&e(t,o,{configurable:!0,value:n})}},function(t,n,r){var e=r(0),i=r(35),o=r(5),u=r(87),c="["+u+"]",f=RegExp("^"+c+c+"*"),a=RegExp(c+c+"*$"),s=function(t,n,r){var i={},c=o((function(){return!!u[t]()||"​…"!="​…"[t]()})),f=i[t]=c?n(l):u[t];r&&(i[r]=f),e(e.P+e.F*c,"String",i)},l=s.trim=function(t,n){return t=String(i(t)),1&n&&(t=t.replace(f,"")),2&n&&(t=t.replace(a,"")),t};t.exports=s},function(t,n){t.exports={}},function(t,n,r){"use strict";var e=r(4),i=r(16),o=r(15),u=r(9)("species");t.exports=function(t){var n=e[t];o&&n&&!n[u]&&i.f(n,u,{configurable:!0,get:function(){return this}})}},function(t,n){t.exports=function(t,n,r,e){if(!(t instanceof n)||void 0!==e&&e in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,n,r){var e=r(21);t.exports=function(t,n,r){for(var i in n)e(t,i,n[i],r);return t}},,,function(t,n,r){var e=r(34);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==e(t)?t.split(""):Object(t)}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,r){var e=r(34),i=r(9)("toStringTag"),o="Arguments"==e(function(){return arguments}());t.exports=function(t){var n,r,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),i))?r:o?e(n):"Object"==(u=e(n))&&"function"==typeof n.callee?"Arguments":u}},function(t,n,r){var e=r(6),i=r(28),o=r(9)("species");t.exports=function(t,n){var r,u=e(t).constructor;return void 0===u||null==(r=e(u)[o])?n:i(r)}},,function(t,n,r){var e=r(14),i=r(4),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:e.version,mode:r(44)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,n,r){var e=r(25),i=r(12),o=r(46);t.exports=function(t){return function(n,r,u){var c,f=e(n),a=i(f.length),s=o(u,a);if(t&&r!=r){for(;a>s;)if((c=f[s++])!=c)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===r)return t||s||0;return!t&&-1}}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,r){var e=r(34);t.exports=Array.isArray||function(t){return"Array"==e(t)}},function(t,n,r){var e=r(9)("iterator"),i=!1;try{var o=[7][e]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,n){if(!n&&!i)return!1;var r=!1;try{var o=[7],u=o[e]();u.next=function(){return{done:r=!0}},o[e]=function(){return u},t(o)}catch(t){}return r}},function(t,n,r){"use strict";var e=r(6);t.exports=function(){var t=e(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},function(t,n,r){"use strict";var e=r(63),i=RegExp.prototype.exec;t.exports=function(t,n){var r=t.exec;if("function"==typeof r){var o=r.call(t,n);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==e(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,n)}},function(t,n,r){"use strict";r(135);var e=r(21),i=r(24),o=r(5),u=r(35),c=r(9),f=r(102),a=c("species"),s=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),l=function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var r="ab".split(t);return 2===r.length&&"a"===r[0]&&"b"===r[1]}();t.exports=function(t,n,r){var h=c(t),p=!o((function(){var n={};return n[h]=function(){return 7},7!=""[t](n)})),v=p?!o((function(){var n=!1,r=/a/;return r.exec=function(){return n=!0,null},"split"===t&&(r.constructor={},r.constructor[a]=function(){return r}),r[h](""),!n})):void 0;if(!p||!v||"replace"===t&&!s||"split"===t&&!l){var y=/./[h],d=r(u,h,""[t],(function(t,n,r,e,i){return n.exec===f?p&&!i?{done:!0,value:y.call(n,r,e)}:{done:!0,value:t.call(r,n,e)}:{done:!1}})),g=d[0],x=d[1];e(String.prototype,t,g),i(RegExp.prototype,h,2==n?function(t,n){return x.call(t,this,n)}:function(t){return x.call(t,this)})}}},function(t,n,r){var e=r(27),i=r(130),o=r(97),u=r(6),c=r(12),f=r(99),a={},s={};(n=t.exports=function(t,n,r,l,h){var p,v,y,d,g=h?function(){return t}:f(t),x=e(r,l,n?2:1),b=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(p=c(t.length);p>b;b++)if((d=n?x(u(v=t[b])[0],v[1]):x(t[b]))===a||d===s)return d}else for(y=g.call(t);!(v=y.next()).done;)if((d=i(y,x,v.value,n))===a||d===s)return d}).BREAK=a,n.RETURN=s},function(t,n,r){var e=r(4).navigator;t.exports=e&&e.userAgent||""},function(t,n,r){"use strict";var e=r(4),i=r(0),o=r(21),u=r(58),c=r(39),f=r(74),a=r(57),s=r(7),l=r(5),h=r(70),p=r(53),v=r(88);t.exports=function(t,n,r,y,d,g){var x=e[t],b=x,m=d?"set":"add",S=b&&b.prototype,w={},_=function(t){var n=S[t];o(S,t,"delete"==t||"has"==t?function(t){return!(g&&!s(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!s(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,r){return n.call(this,0===t?0:t,r),this})};if("function"==typeof b&&(g||S.forEach&&!l((function(){(new b).entries().next()})))){var E=new b,O=E[m](g?{}:-0,1)!=E,P=l((function(){E.has(1)})),F=h((function(t){new b(t)})),M=!g&&l((function(){for(var t=new b,n=5;n--;)t[m](n,n);return!t.has(-0)}));F||((b=n((function(n,r){a(n,b,t);var e=v(new x,n,b);return null!=r&&f(r,d,e[m],e),e}))).prototype=S,S.constructor=b),(P||M)&&(_("delete"),_("has"),d&&_("get")),(M||O)&&_(m),g&&S.clear&&delete S.clear}else b=y.getConstructor(n,t,d,m),u(b.prototype,r),c.NEED=!0;return p(b,t),w[t]=b,i(i.G+i.W+i.F*(b!=x),w),g||y.setStrong(b,t,d),b}},function(t,n,r){for(var e,i=r(4),o=r(24),u=r(43),c=u("typed_array"),f=u("view"),a=!(!i.ArrayBuffer||!i.DataView),s=a,l=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(e=i[h[l++]])?(o(e.prototype,c,!0),o(e.prototype,f,!0)):s=!1;t.exports={ABV:a,CONSTR:s,TYPED:c,VIEW:f}},,,,function(t,n,r){var e=r(7),i=r(4).document,o=e(i)&&e(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,r){n.f=r(9)},function(t,n,r){var e=r(66)("keys"),i=r(43);t.exports=function(t){return e[t]||(e[t]=i(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,r){var e=r(4).document;t.exports=e&&e.documentElement},function(t,n,r){var e=r(7),i=r(6),o=function(t,n){if(i(t),!e(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,e){try{(e=r(27)(Function.call,r(30).f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,r){return o(t,r),n?t.__proto__=r:e(t,r),t}}({},!1):void 0),check:o}},function(t,n){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,n,r){var e=r(7),i=r(86).set;t.exports=function(t,n,r){var o,u=n.constructor;return u!==r&&"function"==typeof u&&(o=u.prototype)!==r.prototype&&e(o)&&i&&i(t,o),t}},function(t,n,r){"use strict";var e=r(29),i=r(35);t.exports=function(t){var n=String(i(this)),r="",o=e(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(n+=n))1&o&&(r+=n);return r}},function(t,n){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n){var r=Math.expm1;t.exports=!r||r(10)>22025.465794806718||r(10)<22025.465794806718||-2e-17!=r(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:r},function(t,n,r){var e=r(29),i=r(35);t.exports=function(t){return function(n,r){var o,u,c=String(i(n)),f=e(r),a=c.length;return f<0||f>=a?t?"":void 0:(o=c.charCodeAt(f))<55296||o>56319||f+1===a||(u=c.charCodeAt(f+1))<56320||u>57343?t?c.charAt(f):o:t?c.slice(f,f+2):u-56320+(o-55296<<10)+65536}}},function(t,n,r){"use strict";var e=r(44),i=r(0),o=r(21),u=r(24),c=r(55),f=r(129),a=r(53),s=r(49),l=r(9)("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,n,r,v,y,d,g){f(r,n,v);var x,b,m,S=function(t){if(!h&&t in O)return O[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},w=n+" Iterator",_="values"==y,E=!1,O=t.prototype,P=O[l]||O["@@iterator"]||y&&O[y],F=P||S(y),M=y?_?S("entries"):F:void 0,A="Array"==n&&O.entries||P;if(A&&(m=s(A.call(new t)))!==Object.prototype&&m.next&&(a(m,w,!0),e||"function"==typeof m[l]||u(m,l,p)),_&&P&&"values"!==P.name&&(E=!0,F=function(){return P.call(this)}),e&&!g||!h&&!E&&O[l]||u(O,l,F),c[n]=F,c[w]=p,y)if(x={values:_?F:S("values"),keys:d?F:S("keys"),entries:M},g)for(b in x)b in O||o(O,b,x[b]);else i(i.P+i.F*(h||E),n,x);return x}},function(t,n,r){var e=r(95),i=r(35);t.exports=function(t,n,r){if(e(n))throw TypeError("String#"+r+" doesn't accept regex!");return String(i(t))}},function(t,n,r){var e=r(7),i=r(34),o=r(9)("match");t.exports=function(t){var n;return e(t)&&(void 0!==(n=t[o])?!!n:"RegExp"==i(t))}},function(t,n,r){var e=r(9)("match");t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(r){try{return n[e]=!1,!"/./"[t](n)}catch(t){}}return!0}},function(t,n,r){var e=r(55),i=r(9)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(e.Array===t||o[i]===t)}},function(t,n,r){"use strict";var e=r(16),i=r(42);t.exports=function(t,n,r){n in t?e.f(t,n,i(0,r)):t[n]=r}},function(t,n,r){var e=r(63),i=r(9)("iterator"),o=r(55);t.exports=r(14).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[e(t)]}},function(t,n,r){"use strict";var e=r(19),i=r(46),o=r(12);t.exports=function(t){for(var n=e(this),r=o(n.length),u=arguments.length,c=i(u>1?arguments[1]:void 0,r),f=u>2?arguments[2]:void 0,a=void 0===f?r:i(f,r);a>c;)n[c++]=t;return n}},function(t,n,r){"use strict";var e=r(50),i=r(134),o=r(55),u=r(25);t.exports=r(93)(Array,"Array",(function(t,n){this._t=u(t),this._i=0,this._k=n}),(function(){var t=this._t,n=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,i(1)):i(0,"keys"==n?r:"values"==n?t[r]:[r,t[r]])}),"values"),o.Arguments=o.Array,e("keys"),e("values"),e("entries")},function(t,n,r){"use strict";var e,i,o=r(71),u=RegExp.prototype.exec,c=String.prototype.replace,f=u,a=(e=/a/,i=/b*/g,u.call(e,"a"),u.call(i,"a"),0!==e.lastIndex||0!==i.lastIndex),s=void 0!==/()??/.exec("")[1];(a||s)&&(f=function(t){var n,r,e,i,f=this;return s&&(r=new RegExp("^"+f.source+"$(?!\\s)",o.call(f))),a&&(n=f.lastIndex),e=u.call(f,t),a&&e&&(f.lastIndex=f.global?e.index+e[0].length:n),s&&e&&e.length>1&&c.call(e[0],r,(function(){for(i=1;ir;)n.push(arguments[r++]);return g[++d]=function(){c("function"==typeof t?t:Function(t),n)},e(d),d},p=function(t){delete g[t]},"process"==r(34)(l)?e=function(t){l.nextTick(u(x,t,1))}:y&&y.now?e=function(t){y.now(u(x,t,1))}:v?(o=(i=new v).port2,i.port1.onmessage=b,e=u(o.postMessage,o,1)):s.addEventListener&&"function"==typeof postMessage&&!s.importScripts?(e=function(t){s.postMessage(t+"","*")},s.addEventListener("message",b,!1)):e="onreadystatechange"in a("script")?function(t){f.appendChild(a("script")).onreadystatechange=function(){f.removeChild(this),x.call(t)}}:function(t){setTimeout(u(x,t,1),0)}),t.exports={set:h,clear:p}},function(t,n,r){"use strict";var e=r(4),i=r(15),o=r(44),u=r(77),c=r(24),f=r(58),a=r(5),s=r(57),l=r(29),h=r(12),p=r(142),v=r(48).f,y=r(16).f,d=r(100),g=r(53),x=e.ArrayBuffer,b=e.DataView,m=e.Math,S=e.RangeError,w=e.Infinity,_=x,E=m.abs,O=m.pow,P=m.floor,F=m.log,M=m.LN2,A=i?"_b":"buffer",j=i?"_l":"byteLength",I=i?"_o":"byteOffset";function N(t,n,r){var e,i,o,u=new Array(r),c=8*r-n-1,f=(1<>1,s=23===n?O(2,-24)-O(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=E(t))!=t||t===w?(i=t!=t?1:0,e=f):(e=P(F(t)/M),t*(o=O(2,-e))<1&&(e--,o*=2),(t+=e+a>=1?s/o:s*O(2,1-a))*o>=2&&(e++,o/=2),e+a>=f?(i=0,e=f):e+a>=1?(i=(t*o-1)*O(2,n),e+=a):(i=t*O(2,a-1)*O(2,n),e=0));n>=8;u[l++]=255&i,i/=256,n-=8);for(e=e<0;u[l++]=255&e,e/=256,c-=8);return u[--l]|=128*h,u}function T(t,n,r){var e,i=8*r-n-1,o=(1<>1,c=i-7,f=r-1,a=t[f--],s=127&a;for(a>>=7;c>0;s=256*s+t[f],f--,c-=8);for(e=s&(1<<-c)-1,s>>=-c,c+=n;c>0;e=256*e+t[f],f--,c-=8);if(0===s)s=1-u;else{if(s===o)return e?NaN:a?-w:w;e+=O(2,n),s-=u}return(a?-1:1)*e*O(2,s-n)}function L(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function R(t){return[255&t]}function k(t){return[255&t,t>>8&255]}function C(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function D(t){return N(t,52,8)}function W(t){return N(t,23,4)}function G(t,n,r){y(t.prototype,n,{get:function(){return this[r]}})}function U(t,n,r,e){var i=p(+r);if(i+n>t[j])throw S("Wrong index!");var o=t[A]._b,u=i+t[I],c=o.slice(u,u+n);return e?c:c.reverse()}function B(t,n,r,e,i,o){var u=p(+r);if(u+n>t[j])throw S("Wrong index!");for(var c=t[A]._b,f=u+t[I],a=e(+i),s=0;sq;)(V=Y[q++])in x||c(x,V,_[V]);o||(z.constructor=x)}var $=new b(new x(2)),K=b.prototype.setInt8;$.setInt8(0,2147483648),$.setInt8(1,2147483649),!$.getInt8(0)&&$.getInt8(1)||f(b.prototype,{setInt8:function(t,n){K.call(this,t,n<<24>>24)},setUint8:function(t,n){K.call(this,t,n<<24>>24)}},!0)}else x=function(t){s(this,x,"ArrayBuffer");var n=p(t);this._b=d.call(new Array(n),0),this[j]=n},b=function(t,n,r){s(this,b,"DataView"),s(t,x,"DataView");var e=t[j],i=l(n);if(i<0||i>e)throw S("Wrong offset!");if(i+(r=void 0===r?e-i:h(r))>e)throw S("Wrong length!");this[A]=t,this[I]=i,this[j]=r},i&&(G(x,"byteLength","_l"),G(b,"buffer","_b"),G(b,"byteLength","_l"),G(b,"byteOffset","_o")),f(b.prototype,{getInt8:function(t){return U(this,1,t)[0]<<24>>24},getUint8:function(t){return U(this,1,t)[0]},getInt16:function(t){var n=U(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function(t){var n=U(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function(t){return L(U(this,4,t,arguments[1]))},getUint32:function(t){return L(U(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return T(U(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return T(U(this,8,t,arguments[1]),52,8)},setInt8:function(t,n){B(this,1,t,R,n)},setUint8:function(t,n){B(this,1,t,R,n)},setInt16:function(t,n){B(this,2,t,k,n,arguments[2])},setUint16:function(t,n){B(this,2,t,k,n,arguments[2])},setInt32:function(t,n){B(this,4,t,C,n,arguments[2])},setUint32:function(t,n){B(this,4,t,C,n,arguments[2])},setFloat32:function(t,n){B(this,4,t,W,n,arguments[2])},setFloat64:function(t,n){B(this,8,t,D,n,arguments[2])}});g(x,"ArrayBuffer"),g(b,"DataView"),c(b.prototype,u.VIEW,!0),n.ArrayBuffer=x,n.DataView=b},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){t.exports=!r(147)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},,,,,,,function(t,n,r){t.exports=!r(15)&&!r(5)((function(){return 7!=Object.defineProperty(r(81)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,r){var e=r(4),i=r(14),o=r(44),u=r(82),c=r(16).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:e.Symbol||{});"_"==t.charAt(0)||t in n||c(n,t,{value:u.f(t)})}},function(t,n,r){var e=r(23),i=r(25),o=r(67)(!1),u=r(83)("IE_PROTO");t.exports=function(t,n){var r,c=i(t),f=0,a=[];for(r in c)r!=u&&e(c,r)&&a.push(r);for(;n.length>f;)e(c,r=n[f++])&&(~o(a,r)||a.push(r));return a}},function(t,n,r){var e=r(16),i=r(6),o=r(45);t.exports=r(15)?Object.defineProperties:function(t,n){i(t);for(var r,u=o(n),c=u.length,f=0;c>f;)e.f(t,r=u[f++],n[r]);return t}},function(t,n,r){var e=r(25),i=r(48).f,o={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return u.slice()}}(t):i(e(t))}},function(t,n,r){"use strict";var e=r(15),i=r(45),o=r(68),u=r(62),c=r(19),f=r(61),a=Object.assign;t.exports=!a||r(5)((function(){var t={},n={},r=Symbol(),e="abcdefghijklmnopqrst";return t[r]=7,e.split("").forEach((function(t){n[t]=t})),7!=a({},t)[r]||Object.keys(a({},n)).join("")!=e}))?function(t,n){for(var r=c(t),a=arguments.length,s=1,l=o.f,h=u.f;a>s;)for(var p,v=f(arguments[s++]),y=l?i(v).concat(l(v)):i(v),d=y.length,g=0;d>g;)p=y[g++],e&&!h.call(v,p)||(r[p]=v[p]);return r}:a},function(t,n){t.exports=Object.is||function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}},function(t,n,r){"use strict";var e=r(28),i=r(7),o=r(123),u=[].slice,c={},f=function(t,n,r){if(!(n in c)){for(var e=[],i=0;i>>0||(u.test(r)?16:10))}:e},function(t,n,r){var e=r(4).parseFloat,i=r(54).trim;t.exports=1/e(r(87)+"-0")!=-1/0?function(t){var n=i(String(t),3),r=e(n);return 0===r&&"-"==n.charAt(0)?-0:r}:e},function(t,n,r){var e=r(34);t.exports=function(t,n){if("number"!=typeof t&&"Number"!=e(t))throw TypeError(n);return+t}},function(t,n,r){var e=r(7),i=Math.floor;t.exports=function(t){return!e(t)&&isFinite(t)&&i(t)===t}},function(t,n){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,r){"use strict";var e=r(47),i=r(42),o=r(53),u={};r(24)(u,r(9)("iterator"),(function(){return this})),t.exports=function(t,n,r){t.prototype=e(u,{next:i(1,r)}),o(t,n+" Iterator")}},function(t,n,r){var e=r(6);t.exports=function(t,n,r,i){try{return i?n(e(r)[0],r[1]):n(r)}catch(n){var o=t.return;throw void 0!==o&&e(o.call(t)),n}}},function(t,n,r){var e=r(247);t.exports=function(t,n){return new(e(t))(n)}},function(t,n,r){var e=r(28),i=r(19),o=r(61),u=r(12);t.exports=function(t,n,r,c,f){e(n);var a=i(t),s=o(a),l=u(a.length),h=f?l-1:0,p=f?-1:1;if(r<2)for(;;){if(h in s){c=s[h],h+=p;break}if(h+=p,f?h<0:l<=h)throw TypeError("Reduce of empty array with no initial value")}for(;f?h>=0:l>h;h+=p)h in s&&(c=n(c,s[h],h,a));return c}},function(t,n,r){"use strict";var e=r(19),i=r(46),o=r(12);t.exports=[].copyWithin||function(t,n){var r=e(this),u=o(r.length),c=i(t,u),f=i(n,u),a=arguments.length>2?arguments[2]:void 0,s=Math.min((void 0===a?u:i(a,u))-f,u-c),l=1;for(f0;)f in r?r[c]=r[f]:delete r[c],c+=l,f+=l;return r}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,r){"use strict";var e=r(102);r(0)({target:"RegExp",proto:!0,forced:e!==/./.exec},{exec:e})},function(t,n,r){r(15)&&"g"!=/./g.flags&&r(16).f(RegExp.prototype,"flags",{configurable:!0,get:r(71)})},function(t,n,r){"use strict";var e,i,o,u,c=r(44),f=r(4),a=r(27),s=r(63),l=r(0),h=r(7),p=r(28),v=r(57),y=r(74),d=r(64),g=r(104).set,x=r(267)(),b=r(138),m=r(268),S=r(75),w=r(139),_=f.TypeError,E=f.process,O=E&&E.versions,P=O&&O.v8||"",F=f.Promise,M="process"==s(E),A=function(){},j=i=b.f,I=!!function(){try{var t=F.resolve(1),n=(t.constructor={})[r(9)("species")]=function(t){t(A,A)};return(M||"function"==typeof PromiseRejectionEvent)&&t.then(A)instanceof n&&0!==P.indexOf("6.6")&&-1===S.indexOf("Chrome/66")}catch(t){}}(),N=function(t){var n;return!(!h(t)||"function"!=typeof(n=t.then))&&n},T=function(t,n){if(!t._n){t._n=!0;var r=t._c;x((function(){for(var e=t._v,i=1==t._s,o=0,u=function(n){var r,o,u,c=i?n.ok:n.fail,f=n.resolve,a=n.reject,s=n.domain;try{c?(i||(2==t._h&&k(t),t._h=1),!0===c?r=e:(s&&s.enter(),r=c(e),s&&(s.exit(),u=!0)),r===n.promise?a(_("Promise-chain cycle")):(o=N(r))?o.call(r,f,a):f(r)):a(e)}catch(t){s&&!u&&s.exit(),a(t)}};r.length>o;)u(r[o++]);t._c=[],t._n=!1,n&&!t._h&&L(t)}))}},L=function(t){g.call(f,(function(){var n,r,e,i=t._v,o=R(t);if(o&&(n=m((function(){M?E.emit("unhandledRejection",i,t):(r=f.onunhandledrejection)?r({promise:t,reason:i}):(e=f.console)&&e.error&&e.error("Unhandled promise rejection",i)})),t._h=M||R(t)?2:1),t._a=void 0,o&&n.e)throw n.v}))},R=function(t){return 1!==t._h&&0===(t._a||t._c).length},k=function(t){g.call(f,(function(){var n;M?E.emit("rejectionHandled",t):(n=f.onrejectionhandled)&&n({promise:t,reason:t._v})}))},C=function(t){var n=this;n._d||(n._d=!0,(n=n._w||n)._v=t,n._s=2,n._a||(n._a=n._c.slice()),T(n,!0))},D=function(t){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw _("Promise can't be resolved itself");(n=N(t))?x((function(){var e={_w:r,_d:!1};try{n.call(t,a(D,e,1),a(C,e,1))}catch(t){C.call(e,t)}})):(r._v=t,r._s=1,T(r,!1))}catch(t){C.call({_w:r,_d:!1},t)}}};I||(F=function(t){v(this,F,"Promise","_h"),p(t),e.call(this);try{t(a(D,this,1),a(C,this,1))}catch(t){C.call(this,t)}},(e=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r(58)(F.prototype,{then:function(t,n){var r=j(d(this,F));return r.ok="function"!=typeof t||t,r.fail="function"==typeof n&&n,r.domain=M?E.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&T(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new e;this.promise=t,this.resolve=a(D,t,1),this.reject=a(C,t,1)},b.f=j=function(t){return t===F||t===u?new o(t):i(t)}),l(l.G+l.W+l.F*!I,{Promise:F}),r(53)(F,"Promise"),r(56)("Promise"),u=r(14).Promise,l(l.S+l.F*!I,"Promise",{reject:function(t){var n=j(this);return(0,n.reject)(t),n.promise}}),l(l.S+l.F*(c||!I),"Promise",{resolve:function(t){return w(c&&this===u?F:this,t)}}),l(l.S+l.F*!(I&&r(70)((function(t){F.all(t).catch(A)}))),"Promise",{all:function(t){var n=this,r=j(n),e=r.resolve,i=r.reject,o=m((function(){var r=[],o=0,u=1;y(t,!1,(function(t){var c=o++,f=!1;r.push(void 0),u++,n.resolve(t).then((function(t){f||(f=!0,r[c]=t,--u||e(r))}),i)})),--u||e(r)}));return o.e&&i(o.v),r.promise},race:function(t){var n=this,r=j(n),e=r.reject,i=m((function(){y(t,!1,(function(t){n.resolve(t).then(r.resolve,e)}))}));return i.e&&e(i.v),r.promise}})},function(t,n,r){"use strict";var e=r(28);function i(t){var n,r;this.promise=new t((function(t,e){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=t,r=e})),this.resolve=e(n),this.reject=e(r)}t.exports.f=function(t){return new i(t)}},function(t,n,r){var e=r(6),i=r(7),o=r(138);t.exports=function(t,n){if(e(t),i(n)&&n.constructor===t)return n;var r=o.f(t);return(0,r.resolve)(n),r.promise}},function(t,n,r){"use strict";var e=r(16).f,i=r(47),o=r(58),u=r(27),c=r(57),f=r(74),a=r(93),s=r(134),l=r(56),h=r(15),p=r(39).fastKey,v=r(51),y=h?"_s":"size",d=function(t,n){var r,e=p(n);if("F"!==e)return t._i[e];for(r=t._f;r;r=r.n)if(r.k==n)return r};t.exports={getConstructor:function(t,n,r,a){var s=t((function(t,e){c(t,s,n,"_i"),t._t=n,t._i=i(null),t._f=void 0,t._l=void 0,t[y]=0,null!=e&&f(e,r,t[a],t)}));return o(s.prototype,{clear:function(){for(var t=v(this,n),r=t._i,e=t._f;e;e=e.n)e.r=!0,e.p&&(e.p=e.p.n=void 0),delete r[e.i];t._f=t._l=void 0,t[y]=0},delete:function(t){var r=v(this,n),e=d(r,t);if(e){var i=e.n,o=e.p;delete r._i[e.i],e.r=!0,o&&(o.n=i),i&&(i.p=o),r._f==e&&(r._f=i),r._l==e&&(r._l=o),r[y]--}return!!e},forEach:function(t){v(this,n);for(var r,e=u(t,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(e(r.v,r.k,this);r&&r.r;)r=r.p},has:function(t){return!!d(v(this,n),t)}}),h&&e(s.prototype,"size",{get:function(){return v(this,n)[y]}}),s},def:function(t,n,r){var e,i,o=d(t,n);return o?o.v=r:(t._l=o={i:i=p(n,!0),k:n,v:r,p:e=t._l,n:void 0,r:!1},t._f||(t._f=o),e&&(e.n=o),t[y]++,"F"!==i&&(t._i[i]=o)),t},getEntry:d,setStrong:function(t,n,r){a(t,n,(function(t,r){this._t=v(t,n),this._k=r,this._l=void 0}),(function(){for(var t=this._k,n=this._l;n&&n.r;)n=n.p;return this._t&&(this._l=n=n?n.n:this._t._f)?s(0,"keys"==t?n.k:"values"==t?n.v:[n.k,n.v]):(this._t=void 0,s(1))}),r?"entries":"values",!r,!0),l(n)}}},function(t,n,r){"use strict";var e=r(58),i=r(39).getWeak,o=r(6),u=r(7),c=r(57),f=r(74),a=r(32),s=r(23),l=r(51),h=a(5),p=a(6),v=0,y=function(t){return t._l||(t._l=new d)},d=function(){this.a=[]},g=function(t,n){return h(t.a,(function(t){return t[0]===n}))};d.prototype={get:function(t){var n=g(this,t);if(n)return n[1]},has:function(t){return!!g(this,t)},set:function(t,n){var r=g(this,t);r?r[1]=n:this.a.push([t,n])},delete:function(t){var n=p(this.a,(function(n){return n[0]===t}));return~n&&this.a.splice(n,1),!!~n}},t.exports={getConstructor:function(t,n,r,o){var a=t((function(t,e){c(t,a,n,"_i"),t._t=n,t._i=v++,t._l=void 0,null!=e&&f(e,r,t[o],t)}));return e(a.prototype,{delete:function(t){if(!u(t))return!1;var r=i(t);return!0===r?y(l(this,n)).delete(t):r&&s(r,this._i)&&delete r[this._i]},has:function(t){if(!u(t))return!1;var r=i(t);return!0===r?y(l(this,n)).has(t):r&&s(r,this._i)}}),a},def:function(t,n,r){var e=i(o(n),!0);return!0===e?y(t).set(n,r):e[t._i]=r,t},ufstore:y}},function(t,n,r){var e=r(29),i=r(12);t.exports=function(t){if(void 0===t)return 0;var n=e(t),r=i(n);if(n!==r)throw RangeError("Wrong length!");return r}},function(t,n,r){var e=r(48),i=r(68),o=r(6),u=r(4).Reflect;t.exports=u&&u.ownKeys||function(t){var n=e.f(o(t)),r=i.f;return r?n.concat(r(t)):n}},function(t,n,r){var e=r(12),i=r(89),o=r(35);t.exports=function(t,n,r,u){var c=String(o(t)),f=c.length,a=void 0===r?" ":String(r),s=e(n);if(s<=f||""==a)return c;var l=s-f,h=i.call(a,Math.ceil(l/a.length));return h.length>l&&(h=h.slice(0,l)),u?h+c:c+h}},function(t,n,r){var e=r(15),i=r(45),o=r(25),u=r(62).f;t.exports=function(t){return function(n){for(var r,c=o(n),f=i(c),a=f.length,s=0,l=[];a>s;)r=f[s++],e&&!u.call(c,r)||l.push(t?[r,c[r]]:c[r]);return l}}},function(t,n){var r=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=r)},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},,,,,,function(t,n,r){"use strict";r(154);var e,i=(e=r(326))&&e.__esModule?e:{default:e};i.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),i.default._babelPolyfill=!0},function(t,n,r){"use strict";r(155),r(298),r(300),r(303),r(305),r(307),r(309),r(311),r(313),r(315),r(317),r(319),r(321),r(325)},function(t,n,r){r(156),r(159),r(160),r(161),r(162),r(163),r(164),r(165),r(166),r(167),r(168),r(169),r(170),r(171),r(172),r(173),r(174),r(175),r(176),r(177),r(178),r(179),r(180),r(181),r(182),r(183),r(184),r(185),r(186),r(187),r(188),r(189),r(190),r(191),r(192),r(193),r(194),r(195),r(196),r(197),r(198),r(199),r(200),r(202),r(203),r(204),r(205),r(206),r(207),r(208),r(209),r(210),r(211),r(212),r(213),r(214),r(215),r(216),r(217),r(218),r(219),r(220),r(221),r(222),r(223),r(224),r(225),r(226),r(227),r(228),r(229),r(230),r(231),r(232),r(233),r(234),r(235),r(237),r(238),r(240),r(241),r(242),r(243),r(244),r(245),r(246),r(248),r(249),r(250),r(251),r(252),r(253),r(254),r(255),r(256),r(257),r(258),r(259),r(260),r(101),r(261),r(135),r(262),r(136),r(263),r(264),r(265),r(266),r(137),r(269),r(270),r(271),r(272),r(273),r(274),r(275),r(276),r(277),r(278),r(279),r(280),r(281),r(282),r(283),r(284),r(285),r(286),r(287),r(288),r(289),r(290),r(291),r(292),r(293),r(294),r(295),r(296),r(297),t.exports=r(14)},function(t,n,r){"use strict";var e=r(4),i=r(23),o=r(15),u=r(0),c=r(21),f=r(39).KEY,a=r(5),s=r(66),l=r(53),h=r(43),p=r(9),v=r(82),y=r(116),d=r(158),g=r(69),x=r(6),b=r(7),m=r(19),S=r(25),w=r(38),_=r(42),E=r(47),O=r(119),P=r(30),F=r(68),M=r(16),A=r(45),j=P.f,I=M.f,N=O.f,T=e.Symbol,L=e.JSON,R=L&&L.stringify,k=p("_hidden"),C=p("toPrimitive"),D={}.propertyIsEnumerable,W=s("symbol-registry"),G=s("symbols"),U=s("op-symbols"),B=Object.prototype,V="function"==typeof T&&!!F.f,z=e.QObject,Y=!z||!z.prototype||!z.prototype.findChild,q=o&&a((function(){return 7!=E(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a}))?function(t,n,r){var e=j(B,n);e&&delete B[n],I(t,n,r),e&&t!==B&&I(B,n,e)}:I,$=function(t){var n=G[t]=E(T.prototype);return n._k=t,n},K=V&&"symbol"==typeof T.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof T},J=function(t,n,r){return t===B&&J(U,n,r),x(t),n=w(n,!0),x(r),i(G,n)?(r.enumerable?(i(t,k)&&t[k][n]&&(t[k][n]=!1),r=E(r,{enumerable:_(0,!1)})):(i(t,k)||I(t,k,_(1,{})),t[k][n]=!0),q(t,n,r)):I(t,n,r)},X=function(t,n){x(t);for(var r,e=d(n=S(n)),i=0,o=e.length;o>i;)J(t,r=e[i++],n[r]);return t},H=function(t){var n=D.call(this,t=w(t,!0));return!(this===B&&i(G,t)&&!i(U,t))&&(!(n||!i(this,t)||!i(G,t)||i(this,k)&&this[k][t])||n)},Z=function(t,n){if(t=S(t),n=w(n,!0),t!==B||!i(G,n)||i(U,n)){var r=j(t,n);return!r||!i(G,n)||i(t,k)&&t[k][n]||(r.enumerable=!0),r}},Q=function(t){for(var n,r=N(S(t)),e=[],o=0;r.length>o;)i(G,n=r[o++])||n==k||n==f||e.push(n);return e},tt=function(t){for(var n,r=t===B,e=N(r?U:S(t)),o=[],u=0;e.length>u;)!i(G,n=e[u++])||r&&!i(B,n)||o.push(G[n]);return o};V||(c((T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),n=function(r){this===B&&n.call(U,r),i(this,k)&&i(this[k],t)&&(this[k][t]=!1),q(this,t,_(1,r))};return o&&Y&&q(B,t,{configurable:!0,set:n}),$(t)}).prototype,"toString",(function(){return this._k})),P.f=Z,M.f=J,r(48).f=O.f=Q,r(62).f=H,F.f=tt,o&&!r(44)&&c(B,"propertyIsEnumerable",H,!0),v.f=function(t){return $(p(t))}),u(u.G+u.W+u.F*!V,{Symbol:T});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),rt=0;nt.length>rt;)p(nt[rt++]);for(var et=A(p.store),it=0;et.length>it;)y(et[it++]);u(u.S+u.F*!V,"Symbol",{for:function(t){return i(W,t+="")?W[t]:W[t]=T(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var n in W)if(W[n]===t)return n},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),u(u.S+u.F*!V,"Object",{create:function(t,n){return void 0===n?E(t):X(E(t),n)},defineProperty:J,defineProperties:X,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:tt});var ot=a((function(){F.f(1)}));u(u.S+u.F*ot,"Object",{getOwnPropertySymbols:function(t){return F.f(m(t))}}),L&&u(u.S+u.F*(!V||a((function(){var t=T();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))}))),"JSON",{stringify:function(t){for(var n,r,e=[t],i=1;arguments.length>i;)e.push(arguments[i++]);if(r=n=e[1],(b(n)||void 0!==t)&&!K(t))return g(n)||(n=function(t,n){if("function"==typeof r&&(n=r.call(this,t,n)),!K(n))return n}),e[1]=n,R.apply(L,e)}}),T.prototype[C]||r(24)(T.prototype,C,T.prototype.valueOf),l(T,"Symbol"),l(Math,"Math",!0),l(e.JSON,"JSON",!0)},function(t,n,r){t.exports=r(66)("native-function-to-string",Function.toString)},function(t,n,r){var e=r(45),i=r(68),o=r(62);t.exports=function(t){var n=e(t),r=i.f;if(r)for(var u,c=r(t),f=o.f,a=0;c.length>a;)f.call(t,u=c[a++])&&n.push(u);return n}},function(t,n,r){var e=r(0);e(e.S,"Object",{create:r(47)})},function(t,n,r){var e=r(0);e(e.S+e.F*!r(15),"Object",{defineProperty:r(16).f})},function(t,n,r){var e=r(0);e(e.S+e.F*!r(15),"Object",{defineProperties:r(118)})},function(t,n,r){var e=r(25),i=r(30).f;r(31)("getOwnPropertyDescriptor",(function(){return function(t,n){return i(e(t),n)}}))},function(t,n,r){var e=r(19),i=r(49);r(31)("getPrototypeOf",(function(){return function(t){return i(e(t))}}))},function(t,n,r){var e=r(19),i=r(45);r(31)("keys",(function(){return function(t){return i(e(t))}}))},function(t,n,r){r(31)("getOwnPropertyNames",(function(){return r(119).f}))},function(t,n,r){var e=r(7),i=r(39).onFreeze;r(31)("freeze",(function(t){return function(n){return t&&e(n)?t(i(n)):n}}))},function(t,n,r){var e=r(7),i=r(39).onFreeze;r(31)("seal",(function(t){return function(n){return t&&e(n)?t(i(n)):n}}))},function(t,n,r){var e=r(7),i=r(39).onFreeze;r(31)("preventExtensions",(function(t){return function(n){return t&&e(n)?t(i(n)):n}}))},function(t,n,r){var e=r(7);r(31)("isFrozen",(function(t){return function(n){return!e(n)||!!t&&t(n)}}))},function(t,n,r){var e=r(7);r(31)("isSealed",(function(t){return function(n){return!e(n)||!!t&&t(n)}}))},function(t,n,r){var e=r(7);r(31)("isExtensible",(function(t){return function(n){return!!e(n)&&(!t||t(n))}}))},function(t,n,r){var e=r(0);e(e.S+e.F,"Object",{assign:r(120)})},function(t,n,r){var e=r(0);e(e.S,"Object",{is:r(121)})},function(t,n,r){var e=r(0);e(e.S,"Object",{setPrototypeOf:r(86).set})},function(t,n,r){"use strict";var e=r(63),i={};i[r(9)("toStringTag")]="z",i+""!="[object z]"&&r(21)(Object.prototype,"toString",(function(){return"[object "+e(this)+"]"}),!0)},function(t,n,r){var e=r(0);e(e.P,"Function",{bind:r(122)})},function(t,n,r){var e=r(16).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||r(15)&&e(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,n,r){"use strict";var e=r(7),i=r(49),o=r(9)("hasInstance"),u=Function.prototype;o in u||r(16).f(u,o,{value:function(t){if("function"!=typeof this||!e(t))return!1;if(!e(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,n,r){var e=r(0),i=r(124);e(e.G+e.F*(parseInt!=i),{parseInt:i})},function(t,n,r){var e=r(0),i=r(125);e(e.G+e.F*(parseFloat!=i),{parseFloat:i})},function(t,n,r){"use strict";var e=r(4),i=r(23),o=r(34),u=r(88),c=r(38),f=r(5),a=r(48).f,s=r(30).f,l=r(16).f,h=r(54).trim,p=e.Number,v=p,y=p.prototype,d="Number"==o(r(47)(y)),g="trim"in String.prototype,x=function(t){var n=c(t,!1);if("string"==typeof n&&n.length>2){var r,e,i,o=(n=g?n.trim():h(n,3)).charCodeAt(0);if(43===o||45===o){if(88===(r=n.charCodeAt(2))||120===r)return NaN}else if(48===o){switch(n.charCodeAt(1)){case 66:case 98:e=2,i=49;break;case 79:case 111:e=8,i=55;break;default:return+n}for(var u,f=n.slice(2),a=0,s=f.length;ai)return NaN;return parseInt(f,e)}}return+n};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var n=arguments.length<1?0:t,r=this;return r instanceof p&&(d?f((function(){y.valueOf.call(r)})):"Number"!=o(r))?u(new v(x(n)),r,p):x(n)};for(var b,m=r(15)?a(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),S=0;m.length>S;S++)i(v,b=m[S])&&!i(p,b)&&l(p,b,s(v,b));p.prototype=y,y.constructor=p,r(21)(e,"Number",p)}},function(t,n,r){"use strict";var e=r(0),i=r(29),o=r(126),u=r(89),c=1..toFixed,f=Math.floor,a=[0,0,0,0,0,0],s="Number.toFixed: incorrect invocation!",l=function(t,n){for(var r=-1,e=n;++r<6;)e+=t*a[r],a[r]=e%1e7,e=f(e/1e7)},h=function(t){for(var n=6,r=0;--n>=0;)r+=a[n],a[n]=f(r/t),r=r%t*1e7},p=function(){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==a[t]){var r=String(a[t]);n=""===n?r:n+u.call("0",7-r.length)+r}return n},v=function(t,n,r){return 0===n?r:n%2==1?v(t,n-1,r*t):v(t*t,n/2,r)};e(e.P+e.F*(!!c&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!r(5)((function(){c.call({})}))),"Number",{toFixed:function(t){var n,r,e,c,f=o(this,s),a=i(t),y="",d="0";if(a<0||a>20)throw RangeError(s);if(f!=f)return"NaN";if(f<=-1e21||f>=1e21)return String(f);if(f<0&&(y="-",f=-f),f>1e-21)if(r=(n=function(t){for(var n=0,r=t;r>=4096;)n+=12,r/=4096;for(;r>=2;)n+=1,r/=2;return n}(f*v(2,69,1))-69)<0?f*v(2,-n,1):f/v(2,n,1),r*=4503599627370496,(n=52-n)>0){for(l(0,r),e=a;e>=7;)l(1e7,0),e-=7;for(l(v(10,e,1),0),e=n-1;e>=23;)h(1<<23),e-=23;h(1<0?y+((c=d.length)<=a?"0."+u.call("0",a-c)+d:d.slice(0,c-a)+"."+d.slice(c-a)):y+d}})},function(t,n,r){"use strict";var e=r(0),i=r(5),o=r(126),u=1..toPrecision;e(e.P+e.F*(i((function(){return"1"!==u.call(1,void 0)}))||!i((function(){u.call({})}))),"Number",{toPrecision:function(t){var n=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?u.call(n):u.call(n,t)}})},function(t,n,r){var e=r(0);e(e.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,n,r){var e=r(0),i=r(4).isFinite;e(e.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,n,r){var e=r(0);e(e.S,"Number",{isInteger:r(127)})},function(t,n,r){var e=r(0);e(e.S,"Number",{isNaN:function(t){return t!=t}})},function(t,n,r){var e=r(0),i=r(127),o=Math.abs;e(e.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,n,r){var e=r(0);e(e.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,r){var e=r(0);e(e.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,n,r){var e=r(0),i=r(125);e(e.S+e.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,n,r){var e=r(0),i=r(124);e(e.S+e.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,n,r){var e=r(0),i=r(128),o=Math.sqrt,u=Math.acosh;e(e.S+e.F*!(u&&710==Math.floor(u(Number.MAX_VALUE))&&u(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,n,r){var e=r(0),i=Math.asinh;e(e.S+e.F*!(i&&1/i(0)>0),"Math",{asinh:function t(n){return isFinite(n=+n)&&0!=n?n<0?-t(-n):Math.log(n+Math.sqrt(n*n+1)):n}})},function(t,n,r){var e=r(0),i=Math.atanh;e(e.S+e.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,n,r){var e=r(0),i=r(90);e(e.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,r){var e=r(0),i=Math.exp;e(e.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,n,r){var e=r(0),i=r(91);e(e.S+e.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,r){var e=r(0);e(e.S,"Math",{fround:r(201)})},function(t,n,r){var e=r(90),i=Math.pow,o=i(2,-52),u=i(2,-23),c=i(2,127)*(2-u),f=i(2,-126);t.exports=Math.fround||function(t){var n,r,i=Math.abs(t),a=e(t);return ic||r!=r?a*(1/0):a*r}},function(t,n,r){var e=r(0),i=Math.abs;e(e.S,"Math",{hypot:function(t,n){for(var r,e,o=0,u=0,c=arguments.length,f=0;u0?(e=r/f)*e:r;return f===1/0?1/0:f*Math.sqrt(o)}})},function(t,n,r){var e=r(0),i=Math.imul;e(e.S+e.F*r(5)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(t,n){var r=+t,e=+n,i=65535&r,o=65535&e;return 0|i*o+((65535&r>>>16)*o+i*(65535&e>>>16)<<16>>>0)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log1p:r(128)})},function(t,n,r){var e=r(0);e(e.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,n,r){var e=r(0);e(e.S,"Math",{sign:r(90)})},function(t,n,r){var e=r(0),i=r(91),o=Math.exp;e(e.S+e.F*r(5)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,r){var e=r(0),i=r(91),o=Math.exp;e(e.S,"Math",{tanh:function(t){var n=i(t=+t),r=i(-t);return n==1/0?1:r==1/0?-1:(n-r)/(o(t)+o(-t))}})},function(t,n,r){var e=r(0);e(e.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,n,r){var e=r(0),i=r(46),o=String.fromCharCode,u=String.fromCodePoint;e(e.S+e.F*(!!u&&1!=u.length),"String",{fromCodePoint:function(t){for(var n,r=[],e=arguments.length,u=0;e>u;){if(n=+arguments[u++],i(n,1114111)!==n)throw RangeError(n+" is not a valid code point");r.push(n<65536?o(n):o(55296+((n-=65536)>>10),n%1024+56320))}return r.join("")}})},function(t,n,r){var e=r(0),i=r(25),o=r(12);e(e.S,"String",{raw:function(t){for(var n=i(t.raw),r=o(n.length),e=arguments.length,u=[],c=0;r>c;)u.push(String(n[c++])),c=n.length?{value:void 0,done:!0}:(t=e(n,r),this._i+=t.length,{value:t,done:!1})}))},function(t,n,r){"use strict";var e=r(0),i=r(92)(!1);e(e.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,n,r){"use strict";var e=r(0),i=r(12),o=r(94),u="".endsWith;e(e.P+e.F*r(96)("endsWith"),"String",{endsWith:function(t){var n=o(this,t,"endsWith"),r=arguments.length>1?arguments[1]:void 0,e=i(n.length),c=void 0===r?e:Math.min(i(r),e),f=String(t);return u?u.call(n,f,c):n.slice(c-f.length,c)===f}})},function(t,n,r){"use strict";var e=r(0),i=r(94);e(e.P+e.F*r(96)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,n,r){var e=r(0);e(e.P,"String",{repeat:r(89)})},function(t,n,r){"use strict";var e=r(0),i=r(12),o=r(94),u="".startsWith;e(e.P+e.F*r(96)("startsWith"),"String",{startsWith:function(t){var n=o(this,t,"startsWith"),r=i(Math.min(arguments.length>1?arguments[1]:void 0,n.length)),e=String(t);return u?u.call(n,e,r):n.slice(r,r+e.length)===e}})},function(t,n,r){"use strict";r(22)("anchor",(function(t){return function(n){return t(this,"a","name",n)}}))},function(t,n,r){"use strict";r(22)("big",(function(t){return function(){return t(this,"big","","")}}))},function(t,n,r){"use strict";r(22)("blink",(function(t){return function(){return t(this,"blink","","")}}))},function(t,n,r){"use strict";r(22)("bold",(function(t){return function(){return t(this,"b","","")}}))},function(t,n,r){"use strict";r(22)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},function(t,n,r){"use strict";r(22)("fontcolor",(function(t){return function(n){return t(this,"font","color",n)}}))},function(t,n,r){"use strict";r(22)("fontsize",(function(t){return function(n){return t(this,"font","size",n)}}))},function(t,n,r){"use strict";r(22)("italics",(function(t){return function(){return t(this,"i","","")}}))},function(t,n,r){"use strict";r(22)("link",(function(t){return function(n){return t(this,"a","href",n)}}))},function(t,n,r){"use strict";r(22)("small",(function(t){return function(){return t(this,"small","","")}}))},function(t,n,r){"use strict";r(22)("strike",(function(t){return function(){return t(this,"strike","","")}}))},function(t,n,r){"use strict";r(22)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,n,r){"use strict";r(22)("sup",(function(t){return function(){return t(this,"sup","","")}}))},function(t,n,r){var e=r(0);e(e.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,n,r){"use strict";var e=r(0),i=r(19),o=r(38);e(e.P+e.F*r(5)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var n=i(this),r=o(n);return"number"!=typeof r||isFinite(r)?n.toISOString():null}})},function(t,n,r){var e=r(0),i=r(236);e(e.P+e.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,n,r){"use strict";var e=r(5),i=Date.prototype.getTime,o=Date.prototype.toISOString,u=function(t){return t>9?t:"0"+t};t.exports=e((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-50000000000001))}))||!e((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,n=t.getUTCFullYear(),r=t.getUTCMilliseconds(),e=n<0?"-":n>9999?"+":"";return e+("00000"+Math.abs(n)).slice(e?-6:-4)+"-"+u(t.getUTCMonth()+1)+"-"+u(t.getUTCDate())+"T"+u(t.getUTCHours())+":"+u(t.getUTCMinutes())+":"+u(t.getUTCSeconds())+"."+(r>99?r:"0"+u(r))+"Z"}:o},function(t,n,r){var e=Date.prototype,i=e.toString,o=e.getTime;new Date(NaN)+""!="Invalid Date"&&r(21)(e,"toString",(function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"}))},function(t,n,r){var e=r(9)("toPrimitive"),i=Date.prototype;e in i||r(24)(i,e,r(239))},function(t,n,r){"use strict";var e=r(6),i=r(38);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(e(this),"number"!=t)}},function(t,n,r){var e=r(0);e(e.S,"Array",{isArray:r(69)})},function(t,n,r){"use strict";var e=r(27),i=r(0),o=r(19),u=r(130),c=r(97),f=r(12),a=r(98),s=r(99);i(i.S+i.F*!r(70)((function(t){Array.from(t)})),"Array",{from:function(t){var n,r,i,l,h=o(t),p="function"==typeof this?this:Array,v=arguments.length,y=v>1?arguments[1]:void 0,d=void 0!==y,g=0,x=s(h);if(d&&(y=e(y,v>2?arguments[2]:void 0,2)),null==x||p==Array&&c(x))for(r=new p(n=f(h.length));n>g;g++)a(r,g,d?y(h[g],g):h[g]);else for(l=x.call(h),r=new p;!(i=l.next()).done;g++)a(r,g,d?u(l,y,[i.value,g],!0):i.value);return r.length=g,r}})},function(t,n,r){"use strict";var e=r(0),i=r(98);e(e.S+e.F*r(5)((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,n=arguments.length,r=new("function"==typeof this?this:Array)(n);n>t;)i(r,t,arguments[t++]);return r.length=n,r}})},function(t,n,r){"use strict";var e=r(0),i=r(25),o=[].join;e(e.P+e.F*(r(61)!=Object||!r(26)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,n,r){"use strict";var e=r(0),i=r(85),o=r(34),u=r(46),c=r(12),f=[].slice;e(e.P+e.F*r(5)((function(){i&&f.call(i)})),"Array",{slice:function(t,n){var r=c(this.length),e=o(this);if(n=void 0===n?r:n,"Array"==e)return f.call(this,t,n);for(var i=u(t,r),a=u(n,r),s=c(a-i),l=new Array(s),h=0;h1&&(e=Math.min(e,o(arguments[1]))),e<0&&(e=r+e);e>=0;e--)if(e in n&&n[e]===t)return e||0;return-1}})},function(t,n,r){var e=r(0);e(e.P,"Array",{copyWithin:r(133)}),r(50)("copyWithin")},function(t,n,r){var e=r(0);e(e.P,"Array",{fill:r(100)}),r(50)("fill")},function(t,n,r){"use strict";var e=r(0),i=r(32)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),e(e.P+e.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(50)("find")},function(t,n,r){"use strict";var e=r(0),i=r(32)(6),o="findIndex",u=!0;o in[]&&Array(1)[o]((function(){u=!1})),e(e.P+e.F*u,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(50)(o)},function(t,n,r){r(56)("Array")},function(t,n,r){var e=r(4),i=r(88),o=r(16).f,u=r(48).f,c=r(95),f=r(71),a=e.RegExp,s=a,l=a.prototype,h=/a/g,p=/a/g,v=new a(h)!==h;if(r(15)&&(!v||r(5)((function(){return p[r(9)("match")]=!1,a(h)!=h||a(p)==p||"/a/i"!=a(h,"i")})))){a=function(t,n){var r=this instanceof a,e=c(t),o=void 0===n;return!r&&e&&t.constructor===a&&o?t:i(v?new s(e&&!o?t.source:t,n):s((e=t instanceof a)?t.source:t,e&&o?f.call(t):n),r?this:l,a)};for(var y=function(t){t in a||o(a,t,{configurable:!0,get:function(){return s[t]},set:function(n){s[t]=n}})},d=u(s),g=0;d.length>g;)y(d[g++]);l.constructor=a,a.prototype=l,r(21)(e,"RegExp",a)}r(56)("RegExp")},function(t,n,r){"use strict";r(136);var e=r(6),i=r(71),o=r(15),u=/./.toString,c=function(t){r(21)(RegExp.prototype,"toString",t,!0)};r(5)((function(){return"/a/b"!=u.call({source:"a",flags:"b"})}))?c((function(){var t=e(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=u.name&&c((function(){return u.call(this)}))},function(t,n,r){"use strict";var e=r(6),i=r(12),o=r(103),u=r(72);r(73)("match",1,(function(t,n,r,c){return[function(r){var e=t(this),i=null==r?void 0:r[n];return void 0!==i?i.call(r,e):new RegExp(r)[n](String(e))},function(t){var n=c(r,t,this);if(n.done)return n.value;var f=e(t),a=String(this);if(!f.global)return u(f,a);var s=f.unicode;f.lastIndex=0;for(var l,h=[],p=0;null!==(l=u(f,a));){var v=String(l[0]);h[p]=v,""===v&&(f.lastIndex=o(a,i(f.lastIndex),s)),p++}return 0===p?null:h}]}))},function(t,n,r){"use strict";var e=r(6),i=r(19),o=r(12),u=r(29),c=r(103),f=r(72),a=Math.max,s=Math.min,l=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;r(73)("replace",2,(function(t,n,r,v){return[function(e,i){var o=t(this),u=null==e?void 0:e[n];return void 0!==u?u.call(e,o,i):r.call(String(o),e,i)},function(t,n){var i=v(r,t,this,n);if(i.done)return i.value;var l=e(t),h=String(this),p="function"==typeof n;p||(n=String(n));var d=l.global;if(d){var g=l.unicode;l.lastIndex=0}for(var x=[];;){var b=f(l,h);if(null===b)break;if(x.push(b),!d)break;""===String(b[0])&&(l.lastIndex=c(h,o(l.lastIndex),g))}for(var m,S="",w=0,_=0;_=w&&(S+=h.slice(w,O)+j,w=O+E.length)}return S+h.slice(w)}];function y(t,n,e,o,u,c){var f=e+t.length,a=o.length,s=p;return void 0!==u&&(u=i(u),s=h),r.call(c,s,(function(r,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,e);case"'":return n.slice(f);case"<":c=u[i.slice(1,-1)];break;default:var s=+i;if(0===s)return r;if(s>a){var h=l(s/10);return 0===h?r:h<=a?void 0===o[h-1]?i.charAt(1):o[h-1]+i.charAt(1):r}c=o[s-1]}return void 0===c?"":c}))}}))},function(t,n,r){"use strict";var e=r(6),i=r(121),o=r(72);r(73)("search",1,(function(t,n,r,u){return[function(r){var e=t(this),i=null==r?void 0:r[n];return void 0!==i?i.call(r,e):new RegExp(r)[n](String(e))},function(t){var n=u(r,t,this);if(n.done)return n.value;var c=e(t),f=String(this),a=c.lastIndex;i(a,0)||(c.lastIndex=0);var s=o(c,f);return i(c.lastIndex,a)||(c.lastIndex=a),null===s?-1:s.index}]}))},function(t,n,r){"use strict";var e=r(95),i=r(6),o=r(64),u=r(103),c=r(12),f=r(72),a=r(102),s=r(5),l=Math.min,h=[].push,p="length",v=!s((function(){RegExp(4294967295,"y")}));r(73)("split",2,(function(t,n,r,s){var y;return y="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[p]||2!="ab".split(/(?:ab)*/)[p]||4!=".".split(/(.?)(.?)/)[p]||".".split(/()()/)[p]>1||"".split(/.?/)[p]?function(t,n){var i=String(this);if(void 0===t&&0===n)return[];if(!e(t))return r.call(i,t,n);for(var o,u,c,f=[],s=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,v=void 0===n?4294967295:n>>>0,y=new RegExp(t.source,s+"g");(o=a.call(y,i))&&!((u=y.lastIndex)>l&&(f.push(i.slice(l,o.index)),o[p]>1&&o.index=v));)y.lastIndex===o.index&&y.lastIndex++;return l===i[p]?!c&&y.test("")||f.push(""):f.push(i.slice(l)),f[p]>v?f.slice(0,v):f}:"0".split(void 0,0)[p]?function(t,n){return void 0===t&&0===n?[]:r.call(this,t,n)}:r,[function(r,e){var i=t(this),o=null==r?void 0:r[n];return void 0!==o?o.call(r,i,e):y.call(String(i),r,e)},function(t,n){var e=s(y,t,this,n,y!==r);if(e.done)return e.value;var a=i(t),h=String(this),p=o(a,RegExp),d=a.unicode,g=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(v?"y":"g"),x=new p(v?a:"^(?:"+a.source+")",g),b=void 0===n?4294967295:n>>>0;if(0===b)return[];if(0===h.length)return null===f(x,h)?[h]:[];for(var m=0,S=0,w=[];S0?arguments[0]:void 0)}}),{get:function(t){var n=e.getEntry(i(this,"Map"),t);return n&&n.v},set:function(t,n){return e.def(i(this,"Map"),0===t?0:t,n)}},e,!0)},function(t,n,r){"use strict";var e=r(140),i=r(51);t.exports=r(76)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return e.def(i(this,"Set"),t=0===t?0:t,t)}},e)},function(t,n,r){"use strict";var e,i=r(4),o=r(32)(0),u=r(21),c=r(39),f=r(120),a=r(141),s=r(7),l=r(51),h=r(51),p=!i.ActiveXObject&&"ActiveXObject"in i,v=c.getWeak,y=Object.isExtensible,d=a.ufstore,g=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},x={get:function(t){if(s(t)){var n=v(t);return!0===n?d(l(this,"WeakMap")).get(t):n?n[this._i]:void 0}},set:function(t,n){return a.def(l(this,"WeakMap"),t,n)}},b=t.exports=r(76)("WeakMap",g,x,a,!0,!0);h&&p&&(f((e=a.getConstructor(g,"WeakMap")).prototype,x),c.NEED=!0,o(["delete","has","get","set"],(function(t){var n=b.prototype,r=n[t];u(n,t,(function(n,i){if(s(n)&&!y(n)){this._f||(this._f=new e);var o=this._f[t](n,i);return"set"==t?this:o}return r.call(this,n,i)}))})))},function(t,n,r){"use strict";var e=r(141),i=r(51);r(76)("WeakSet",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return e.def(i(this,"WeakSet"),t,!0)}},e,!1,!0)},function(t,n,r){"use strict";var e=r(0),i=r(77),o=r(105),u=r(6),c=r(46),f=r(12),a=r(7),s=r(4).ArrayBuffer,l=r(64),h=o.ArrayBuffer,p=o.DataView,v=i.ABV&&s.isView,y=h.prototype.slice,d=i.VIEW;e(e.G+e.W+e.F*(s!==h),{ArrayBuffer:h}),e(e.S+e.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return v&&v(t)||a(t)&&d in t}}),e(e.P+e.U+e.F*r(5)((function(){return!new h(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(t,n){if(void 0!==y&&void 0===n)return y.call(u(this),t);for(var r=u(this).byteLength,e=c(t,r),i=c(void 0===n?r:n,r),o=new(l(this,h))(f(i-e)),a=new p(this),s=new p(o),v=0;e=n.length)return{value:void 0,done:!0}}while(!((t=n[this._i++])in this._t));return{value:t,done:!1}})),e(e.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,n,r){var e=r(30),i=r(49),o=r(23),u=r(0),c=r(7),f=r(6);u(u.S,"Reflect",{get:function t(n,r){var u,a,s=arguments.length<3?n:arguments[2];return f(n)===s?n[r]:(u=e.f(n,r))?o(u,"value")?u.value:void 0!==u.get?u.get.call(s):void 0:c(a=i(n))?t(a,r,s):void 0}})},function(t,n,r){var e=r(30),i=r(0),o=r(6);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,n){return e.f(o(t),n)}})},function(t,n,r){var e=r(0),i=r(49),o=r(6);e(e.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,n,r){var e=r(0);e(e.S,"Reflect",{has:function(t,n){return n in t}})},function(t,n,r){var e=r(0),i=r(6),o=Object.isExtensible;e(e.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,n,r){var e=r(0);e(e.S,"Reflect",{ownKeys:r(143)})},function(t,n,r){var e=r(0),i=r(6),o=Object.preventExtensions;e(e.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,n,r){var e=r(16),i=r(30),o=r(49),u=r(23),c=r(0),f=r(42),a=r(6),s=r(7);c(c.S,"Reflect",{set:function t(n,r,c){var l,h,p=arguments.length<4?n:arguments[3],v=i.f(a(n),r);if(!v){if(s(h=o(n)))return t(h,r,c,p);v=f(0)}if(u(v,"value")){if(!1===v.writable||!s(p))return!1;if(l=i.f(p,r)){if(l.get||l.set||!1===l.writable)return!1;l.value=c,e.f(p,r,l)}else e.f(p,r,f(0,c));return!0}return void 0!==v.set&&(v.set.call(p,c),!0)}})},function(t,n,r){var e=r(0),i=r(86);i&&e(e.S,"Reflect",{setPrototypeOf:function(t,n){i.check(t,n);try{return i.set(t,n),!0}catch(t){return!1}}})},function(t,n,r){r(299),t.exports=r(14).Array.includes},function(t,n,r){"use strict";var e=r(0),i=r(67)(!0);e(e.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(50)("includes")},function(t,n,r){r(301),t.exports=r(14).Array.flatMap},function(t,n,r){"use strict";var e=r(0),i=r(302),o=r(19),u=r(12),c=r(28),f=r(131);e(e.P,"Array",{flatMap:function(t){var n,r,e=o(this);return c(t),n=u(e.length),r=f(e,0),i(r,e,e,n,0,1,t,arguments[1]),r}}),r(50)("flatMap")},function(t,n,r){"use strict";var e=r(69),i=r(7),o=r(12),u=r(27),c=r(9)("isConcatSpreadable");t.exports=function t(n,r,f,a,s,l,h,p){for(var v,y,d=s,g=0,x=!!h&&u(h,p,3);g0)d=t(n,r,v,o(v.length),d,l-1)-1;else{if(d>=9007199254740991)throw TypeError();n[d]=v}d++}g++}return d}},function(t,n,r){r(304),t.exports=r(14).String.padStart},function(t,n,r){"use strict";var e=r(0),i=r(144),o=r(75),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);e(e.P+e.F*u,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,n,r){r(306),t.exports=r(14).String.padEnd},function(t,n,r){"use strict";var e=r(0),i=r(144),o=r(75),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);e(e.P+e.F*u,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,n,r){r(308),t.exports=r(14).String.trimLeft},function(t,n,r){"use strict";r(54)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,n,r){r(310),t.exports=r(14).String.trimRight},function(t,n,r){"use strict";r(54)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,n,r){r(312),t.exports=r(82).f("asyncIterator")},function(t,n,r){r(116)("asyncIterator")},function(t,n,r){r(314),t.exports=r(14).Object.getOwnPropertyDescriptors},function(t,n,r){var e=r(0),i=r(143),o=r(25),u=r(30),c=r(98);e(e.S,"Object",{getOwnPropertyDescriptors:function(t){for(var n,r,e=o(t),f=u.f,a=i(e),s={},l=0;a.length>l;)void 0!==(r=f(e,n=a[l++]))&&c(s,n,r);return s}})},function(t,n,r){r(316),t.exports=r(14).Object.values},function(t,n,r){var e=r(0),i=r(145)(!1);e(e.S,"Object",{values:function(t){return i(t)}})},function(t,n,r){r(318),t.exports=r(14).Object.entries},function(t,n,r){var e=r(0),i=r(145)(!0);e(e.S,"Object",{entries:function(t){return i(t)}})},function(t,n,r){"use strict";r(137),r(320),t.exports=r(14).Promise.finally},function(t,n,r){"use strict";var e=r(0),i=r(14),o=r(4),u=r(64),c=r(139);e(e.P+e.R,"Promise",{finally:function(t){var n=u(this,i.Promise||o.Promise),r="function"==typeof t;return this.then(r?function(r){return c(n,t()).then((function(){return r}))}:t,r?function(r){return c(n,t()).then((function(){throw r}))}:t)}})},function(t,n,r){r(322),r(323),r(324),t.exports=r(14)},function(t,n,r){var e=r(4),i=r(0),o=r(75),u=[].slice,c=/MSIE .\./.test(o),f=function(t){return function(n,r){var e=arguments.length>2,i=!!e&&u.call(arguments,2);return t(e?function(){("function"==typeof n?n:Function(n)).apply(this,i)}:n,r)}};i(i.G+i.B+i.F*c,{setTimeout:f(e.setTimeout),setInterval:f(e.setInterval)})},function(t,n,r){var e=r(0),i=r(104);e(e.G+e.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,n,r){for(var e=r(101),i=r(45),o=r(21),u=r(4),c=r(24),f=r(55),a=r(9),s=a("iterator"),l=a("toStringTag"),h=f.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=i(p),y=0;y=0;--i){var o=this.tryEntries[i],u=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),f=r.call(o,"finallyLoc");if(c&&f){if(this.prev=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--n){var r=this.tryEntries[n];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc===t){var e=r.completion;if("throw"===e.type){var i=e.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},function(t,n,r){r(327),t.exports=r(146).global},function(t,n,r){var e=r(328);e(e.G,{global:r(106)})},function(t,n,r){var e=r(106),i=r(146),o=r(329),u=r(331),c=r(338),f=function(t,n,r){var a,s,l,h=t&f.F,p=t&f.G,v=t&f.S,y=t&f.P,d=t&f.B,g=t&f.W,x=p?i:i[n]||(i[n]={}),b=x.prototype,m=p?e:v?e[n]:(e[n]||{}).prototype;for(a in p&&(r=n),r)(s=!h&&m&&void 0!==m[a])&&c(x,a)||(l=s?m[a]:r[a],x[a]=p&&"function"!=typeof m[a]?r[a]:d&&s?o(l,e):g&&m[a]==l?function(t){var n=function(n,r,e){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,e)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(l):y&&"function"==typeof l?o(Function.call,l):l,y&&((x.virtual||(x.virtual={}))[a]=l,t&f.R&&b&&!b[a]&&u(b,a,l)))};f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,n,r){var e=r(330);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,i){return t.call(n,r,e,i)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,r){var e=r(332),i=r(337);t.exports=r(108)?function(t,n,r){return e.f(t,n,i(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n,r){var e=r(333),i=r(334),o=r(336),u=Object.defineProperty;n.f=r(108)?Object.defineProperty:function(t,n,r){if(e(t),n=o(n,!0),e(r),i)try{return u(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){var e=r(107);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n,r){t.exports=!r(108)&&!r(147)((function(){return 7!=Object.defineProperty(r(335)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,r){var e=r(107),i=r(106).document,o=e(i)&&e(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,r){var e=r(107);t.exports=function(t,n){if(!e(t))return t;var r,i;if(n&&"function"==typeof(r=t.toString)&&!e(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!e(i=r.call(t)))return i;if(!n&&"function"==typeof(r=t.toString)&&!e(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}}]); \ No newline at end of file diff --git a/includes/core/assets/js/admin/addons.js b/includes/core/assets/js/src/admin/addons.js similarity index 100% rename from includes/core/assets/js/admin/addons.js rename to includes/core/assets/js/src/admin/addons.js diff --git a/includes/core/assets/js/admin/dashboard-widget-report/components/index.js b/includes/core/assets/js/src/admin/dashboard-widget-report/components/index.js similarity index 100% rename from includes/core/assets/js/admin/dashboard-widget-report/components/index.js rename to includes/core/assets/js/src/admin/dashboard-widget-report/components/index.js diff --git a/includes/core/assets/js/admin/dashboard-widget-report/components/report-filter/index.js b/includes/core/assets/js/src/admin/dashboard-widget-report/components/report-filter/index.js similarity index 100% rename from includes/core/assets/js/admin/dashboard-widget-report/components/report-filter/index.js rename to includes/core/assets/js/src/admin/dashboard-widget-report/components/report-filter/index.js diff --git a/includes/core/assets/js/admin/dashboard-widget-report/components/report-filter/more-info.js b/includes/core/assets/js/src/admin/dashboard-widget-report/components/report-filter/more-info.js similarity index 100% rename from includes/core/assets/js/admin/dashboard-widget-report/components/report-filter/more-info.js rename to includes/core/assets/js/src/admin/dashboard-widget-report/components/report-filter/more-info.js diff --git a/includes/core/assets/js/admin/dashboard-widget-report/components/report-list/form-row.js b/includes/core/assets/js/src/admin/dashboard-widget-report/components/report-list/form-row.js similarity index 100% rename from includes/core/assets/js/admin/dashboard-widget-report/components/report-list/form-row.js rename to includes/core/assets/js/src/admin/dashboard-widget-report/components/report-list/form-row.js diff --git a/includes/core/assets/js/admin/dashboard-widget-report/components/report-list/index.js b/includes/core/assets/js/src/admin/dashboard-widget-report/components/report-list/index.js similarity index 100% rename from includes/core/assets/js/admin/dashboard-widget-report/components/report-list/index.js rename to includes/core/assets/js/src/admin/dashboard-widget-report/components/report-list/index.js diff --git a/includes/core/assets/js/admin/dashboard-widget-report/index.js b/includes/core/assets/js/src/admin/dashboard-widget-report/index.js similarity index 69% rename from includes/core/assets/js/admin/dashboard-widget-report/index.js rename to includes/core/assets/js/src/admin/dashboard-widget-report/index.js index 55027670..408c990c 100644 --- a/includes/core/assets/js/admin/dashboard-widget-report/index.js +++ b/includes/core/assets/js/src/admin/dashboard-widget-report/index.js @@ -4,9 +4,15 @@ * WordPress dependencies */ import '@wordpress/core-data'; -import { render, useEffect, useReducer } from '@wordpress/element'; +import { + createInterpolateElement, + render, + useEffect, + useReducer, +} from '@wordpress/element'; import { addQueryArgs } from '@wordpress/url'; import apiFetch from '@wordpress/api-fetch'; +import { __, sprintf } from '@wordpress/i18n'; /** * Internal dependencies @@ -97,6 +103,49 @@ function DashboardWidgetReport() { config={ { yAxisIsCurrency: true, } } + noData={ +
+ + { sprintf( + /* translators: %s Currency code. */ + __( + 'No %s transactions found.', + 'simple-pay' + ), + currency.toUpperCase() + ) } + +
+ { __( + 'Please select a different currency, date range, or check back later.', + 'simple-pay' + ) } +
+
+ } + deltaChangedString={ ( tooltip ) => + createInterpolateElement( + sprintf( + /* translators: %s: delta percentage */ + __( + '%1$s%% vs. previous period', + 'simple-pay' + ), + Math.abs( tooltip.delta ) + ), + { + delta: ( + 0 + ? 'is-positive' + : 'is-negative' + } + /> + ), + } + ) + } /> diff --git a/includes/core/assets/js/admin/dashboard-widget-report/reducer.js b/includes/core/assets/js/src/admin/dashboard-widget-report/reducer.js similarity index 100% rename from includes/core/assets/js/admin/dashboard-widget-report/reducer.js rename to includes/core/assets/js/src/admin/dashboard-widget-report/reducer.js diff --git a/includes/core/assets/js/admin/help/components/action-button/index.js b/includes/core/assets/js/src/admin/help/components/action-button/index.js similarity index 97% rename from includes/core/assets/js/admin/help/components/action-button/index.js rename to includes/core/assets/js/src/admin/help/components/action-button/index.js index 342f8840..cc40067a 100644 --- a/includes/core/assets/js/admin/help/components/action-button/index.js +++ b/includes/core/assets/js/src/admin/help/components/action-button/index.js @@ -37,7 +37,7 @@ function HelpActionButton( { onOpen } ) { { isPopoverOpen && ( - +

{ __( 'Need help with something?', 'simple-pay' ) } diff --git a/includes/core/assets/js/admin/help/components/index.js b/includes/core/assets/js/src/admin/help/components/index.js similarity index 100% rename from includes/core/assets/js/admin/help/components/index.js rename to includes/core/assets/js/src/admin/help/components/index.js diff --git a/includes/core/assets/js/admin/help/components/panel/backdrop.js b/includes/core/assets/js/src/admin/help/components/panel/backdrop.js similarity index 100% rename from includes/core/assets/js/admin/help/components/panel/backdrop.js rename to includes/core/assets/js/src/admin/help/components/panel/backdrop.js diff --git a/includes/core/assets/js/admin/help/components/panel/footer.js b/includes/core/assets/js/src/admin/help/components/panel/footer.js similarity index 100% rename from includes/core/assets/js/admin/help/components/panel/footer.js rename to includes/core/assets/js/src/admin/help/components/panel/footer.js diff --git a/includes/core/assets/js/admin/help/components/panel/header.js b/includes/core/assets/js/src/admin/help/components/panel/header.js similarity index 100% rename from includes/core/assets/js/admin/help/components/panel/header.js rename to includes/core/assets/js/src/admin/help/components/panel/header.js diff --git a/includes/core/assets/js/admin/help/components/panel/index.js b/includes/core/assets/js/src/admin/help/components/panel/index.js similarity index 100% rename from includes/core/assets/js/admin/help/components/panel/index.js rename to includes/core/assets/js/src/admin/help/components/panel/index.js diff --git a/includes/core/assets/js/admin/help/components/panel/panel.js b/includes/core/assets/js/src/admin/help/components/panel/panel.js similarity index 100% rename from includes/core/assets/js/admin/help/components/panel/panel.js rename to includes/core/assets/js/src/admin/help/components/panel/panel.js diff --git a/includes/core/assets/js/admin/help/components/panel/search-categories.js b/includes/core/assets/js/src/admin/help/components/panel/search-categories.js similarity index 100% rename from includes/core/assets/js/admin/help/components/panel/search-categories.js rename to includes/core/assets/js/src/admin/help/components/panel/search-categories.js diff --git a/includes/core/assets/js/admin/help/components/panel/search-category.js b/includes/core/assets/js/src/admin/help/components/panel/search-category.js similarity index 100% rename from includes/core/assets/js/admin/help/components/panel/search-category.js rename to includes/core/assets/js/src/admin/help/components/panel/search-category.js diff --git a/includes/core/assets/js/admin/help/components/panel/search-control.js b/includes/core/assets/js/src/admin/help/components/panel/search-control.js similarity index 100% rename from includes/core/assets/js/admin/help/components/panel/search-control.js rename to includes/core/assets/js/src/admin/help/components/panel/search-control.js diff --git a/includes/core/assets/js/admin/help/components/panel/search-result.js b/includes/core/assets/js/src/admin/help/components/panel/search-result.js similarity index 100% rename from includes/core/assets/js/admin/help/components/panel/search-result.js rename to includes/core/assets/js/src/admin/help/components/panel/search-result.js diff --git a/includes/core/assets/js/admin/help/components/panel/search-results.js b/includes/core/assets/js/src/admin/help/components/panel/search-results.js similarity index 100% rename from includes/core/assets/js/admin/help/components/panel/search-results.js rename to includes/core/assets/js/src/admin/help/components/panel/search-results.js diff --git a/includes/core/assets/js/admin/help/hooks/index.js b/includes/core/assets/js/src/admin/help/hooks/index.js similarity index 100% rename from includes/core/assets/js/admin/help/hooks/index.js rename to includes/core/assets/js/src/admin/help/hooks/index.js diff --git a/includes/core/assets/js/admin/help/hooks/use-merge-refs.js b/includes/core/assets/js/src/admin/help/hooks/use-merge-refs.js similarity index 100% rename from includes/core/assets/js/admin/help/hooks/use-merge-refs.js rename to includes/core/assets/js/src/admin/help/hooks/use-merge-refs.js diff --git a/includes/core/assets/js/admin/help/index.js b/includes/core/assets/js/src/admin/help/index.js similarity index 100% rename from includes/core/assets/js/admin/help/index.js rename to includes/core/assets/js/src/admin/help/index.js diff --git a/includes/core/assets/js/admin/help/search-utils.js b/includes/core/assets/js/src/admin/help/search-utils.js similarity index 100% rename from includes/core/assets/js/admin/help/search-utils.js rename to includes/core/assets/js/src/admin/help/search-utils.js diff --git a/includes/core/assets/js/admin/help/utils.js b/includes/core/assets/js/src/admin/help/utils.js similarity index 100% rename from includes/core/assets/js/admin/help/utils.js rename to includes/core/assets/js/src/admin/help/utils.js diff --git a/includes/core/assets/js/admin/index.js b/includes/core/assets/js/src/admin/index.js similarity index 100% rename from includes/core/assets/js/admin/index.js rename to includes/core/assets/js/src/admin/index.js diff --git a/includes/core/assets/js/admin/notices.js b/includes/core/assets/js/src/admin/notices.js similarity index 100% rename from includes/core/assets/js/admin/notices.js rename to includes/core/assets/js/src/admin/notices.js diff --git a/includes/core/assets/js/admin/notifications/components/action-button/index.js b/includes/core/assets/js/src/admin/notifications/components/action-button/index.js similarity index 100% rename from includes/core/assets/js/admin/notifications/components/action-button/index.js rename to includes/core/assets/js/src/admin/notifications/components/action-button/index.js diff --git a/includes/core/assets/js/admin/notifications/components/index.js b/includes/core/assets/js/src/admin/notifications/components/index.js similarity index 100% rename from includes/core/assets/js/admin/notifications/components/index.js rename to includes/core/assets/js/src/admin/notifications/components/index.js diff --git a/includes/core/assets/js/admin/notifications/components/notification/index.js b/includes/core/assets/js/src/admin/notifications/components/notification/index.js similarity index 100% rename from includes/core/assets/js/admin/notifications/components/notification/index.js rename to includes/core/assets/js/src/admin/notifications/components/notification/index.js diff --git a/includes/core/assets/js/admin/notifications/components/panel/backdrop.js b/includes/core/assets/js/src/admin/notifications/components/panel/backdrop.js similarity index 100% rename from includes/core/assets/js/admin/notifications/components/panel/backdrop.js rename to includes/core/assets/js/src/admin/notifications/components/panel/backdrop.js diff --git a/includes/core/assets/js/admin/notifications/components/panel/header.js b/includes/core/assets/js/src/admin/notifications/components/panel/header.js similarity index 100% rename from includes/core/assets/js/admin/notifications/components/panel/header.js rename to includes/core/assets/js/src/admin/notifications/components/panel/header.js diff --git a/includes/core/assets/js/admin/notifications/components/panel/index.js b/includes/core/assets/js/src/admin/notifications/components/panel/index.js similarity index 100% rename from includes/core/assets/js/admin/notifications/components/panel/index.js rename to includes/core/assets/js/src/admin/notifications/components/panel/index.js diff --git a/includes/core/assets/js/admin/notifications/components/panel/panel.js b/includes/core/assets/js/src/admin/notifications/components/panel/panel.js similarity index 100% rename from includes/core/assets/js/admin/notifications/components/panel/panel.js rename to includes/core/assets/js/src/admin/notifications/components/panel/panel.js diff --git a/includes/core/assets/js/admin/notifications/hooks/index.js b/includes/core/assets/js/src/admin/notifications/hooks/index.js similarity index 100% rename from includes/core/assets/js/admin/notifications/hooks/index.js rename to includes/core/assets/js/src/admin/notifications/hooks/index.js diff --git a/includes/core/assets/js/admin/notifications/hooks/use-merge-refs.js b/includes/core/assets/js/src/admin/notifications/hooks/use-merge-refs.js similarity index 100% rename from includes/core/assets/js/admin/notifications/hooks/use-merge-refs.js rename to includes/core/assets/js/src/admin/notifications/hooks/use-merge-refs.js diff --git a/includes/core/assets/js/admin/notifications/index.js b/includes/core/assets/js/src/admin/notifications/index.js similarity index 100% rename from includes/core/assets/js/admin/notifications/index.js rename to includes/core/assets/js/src/admin/notifications/index.js diff --git a/includes/core/assets/js/admin/notifications/reducer.js b/includes/core/assets/js/src/admin/notifications/reducer.js similarity index 100% rename from includes/core/assets/js/admin/notifications/reducer.js rename to includes/core/assets/js/src/admin/notifications/reducer.js diff --git a/includes/core/assets/js/admin/pages/activity-reports/components/card-latest-payments/empty-state.js b/includes/core/assets/js/src/admin/pages/activity-reports/components/card-latest-payments/empty-state.js similarity index 100% rename from includes/core/assets/js/admin/pages/activity-reports/components/card-latest-payments/empty-state.js rename to includes/core/assets/js/src/admin/pages/activity-reports/components/card-latest-payments/empty-state.js diff --git a/includes/core/assets/js/admin/pages/activity-reports/components/card-latest-payments/index.js b/includes/core/assets/js/src/admin/pages/activity-reports/components/card-latest-payments/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/activity-reports/components/card-latest-payments/index.js rename to includes/core/assets/js/src/admin/pages/activity-reports/components/card-latest-payments/index.js diff --git a/includes/core/assets/js/admin/pages/activity-reports/components/card-latest-payments/payment.js b/includes/core/assets/js/src/admin/pages/activity-reports/components/card-latest-payments/payment.js similarity index 100% rename from includes/core/assets/js/admin/pages/activity-reports/components/card-latest-payments/payment.js rename to includes/core/assets/js/src/admin/pages/activity-reports/components/card-latest-payments/payment.js diff --git a/includes/core/assets/js/admin/pages/activity-reports/components/card-reports/data-bar.js b/includes/core/assets/js/src/admin/pages/activity-reports/components/card-reports/data-bar.js similarity index 100% rename from includes/core/assets/js/admin/pages/activity-reports/components/card-reports/data-bar.js rename to includes/core/assets/js/src/admin/pages/activity-reports/components/card-reports/data-bar.js diff --git a/includes/core/assets/js/admin/pages/activity-reports/components/card-reports/date-range-picker.js b/includes/core/assets/js/src/admin/pages/activity-reports/components/card-reports/date-range-picker.js similarity index 100% rename from includes/core/assets/js/admin/pages/activity-reports/components/card-reports/date-range-picker.js rename to includes/core/assets/js/src/admin/pages/activity-reports/components/card-reports/date-range-picker.js diff --git a/includes/core/assets/js/admin/pages/activity-reports/components/card-reports/index.js b/includes/core/assets/js/src/admin/pages/activity-reports/components/card-reports/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/activity-reports/components/card-reports/index.js rename to includes/core/assets/js/src/admin/pages/activity-reports/components/card-reports/index.js diff --git a/includes/core/assets/js/admin/pages/activity-reports/components/card-reports/report-gross-volume.js b/includes/core/assets/js/src/admin/pages/activity-reports/components/card-reports/report-gross-volume.js similarity index 53% rename from includes/core/assets/js/admin/pages/activity-reports/components/card-reports/report-gross-volume.js rename to includes/core/assets/js/src/admin/pages/activity-reports/components/card-reports/report-gross-volume.js index 129482f9..b870b10d 100644 --- a/includes/core/assets/js/admin/pages/activity-reports/components/card-reports/report-gross-volume.js +++ b/includes/core/assets/js/src/admin/pages/activity-reports/components/card-reports/report-gross-volume.js @@ -1,8 +1,9 @@ /** * WordPress dependencies */ -import { __ } from '@wordpress/i18n'; +import { __, sprintf } from '@wordpress/i18n'; import { decodeEntities } from '@wordpress/html-entities'; +import { createInterpolateElement } from '@wordpress/element'; /** * Internal dependencies @@ -45,6 +46,46 @@ function GrossVolumeReport( { currency, range } ) { height: '300px', } } config={ { yAxisIsCurrency: true } } + noData={ +
+ + { sprintf( + /* translators: %s Currency code. */ + __( 'No %s transactions found.', 'simple-pay' ), + currency.toUpperCase() + ) } + +
+ { __( + 'Please select a different currency, date range, or check back later.', + 'simple-pay' + ) } +
+
+ } + deltaChangedString={ ( tooltip ) => + createInterpolateElement( + sprintf( + /* translators: %s: delta percentage */ + __( + '%1$s%% vs. previous period', + 'simple-pay' + ), + Math.abs( tooltip.delta ) + ), + { + delta: ( + 0 + ? 'is-positive' + : 'is-negative' + } + /> + ), + } + ) + } /> ); diff --git a/includes/core/assets/js/admin/pages/activity-reports/components/card-reports/report-payment-info.js b/includes/core/assets/js/src/admin/pages/activity-reports/components/card-reports/report-payment-info.js similarity index 100% rename from includes/core/assets/js/admin/pages/activity-reports/components/card-reports/report-payment-info.js rename to includes/core/assets/js/src/admin/pages/activity-reports/components/card-reports/report-payment-info.js diff --git a/includes/core/assets/js/admin/pages/activity-reports/components/card-reports/report-successful-payments.js b/includes/core/assets/js/src/admin/pages/activity-reports/components/card-reports/report-successful-payments.js similarity index 54% rename from includes/core/assets/js/admin/pages/activity-reports/components/card-reports/report-successful-payments.js rename to includes/core/assets/js/src/admin/pages/activity-reports/components/card-reports/report-successful-payments.js index 9910b59c..9ce9c0ba 100644 --- a/includes/core/assets/js/admin/pages/activity-reports/components/card-reports/report-successful-payments.js +++ b/includes/core/assets/js/src/admin/pages/activity-reports/components/card-reports/report-successful-payments.js @@ -3,7 +3,8 @@ /** * WordPress dependencies */ -import { __ } from '@wordpress/i18n'; +import { __, sprintf } from '@wordpress/i18n'; +import { createInterpolateElement } from '@wordpress/element'; /** * Internal dependencies @@ -48,6 +49,46 @@ function SuccessfulPaymentsReport( { range } ) { height: '300px', } } config={ { yAxisIsCurrency: false } } + noData={ +
+ + { sprintf( + /* translators: %s Currency code. */ + __( 'No %s transactions found.', 'simple-pay' ), + currency.toUpperCase() + ) } + +
+ { __( + 'Please select a different currency, date range, or check back later.', + 'simple-pay' + ) } +
+
+ } + deltaChangedString={ ( tooltip ) => + createInterpolateElement( + sprintf( + /* translators: %s: delta percentage */ + __( + '%1$s%% vs. previous period', + 'simple-pay' + ), + Math.abs( tooltip.delta ) + ), + { + delta: ( + 0 + ? 'is-positive' + : 'is-negative' + } + /> + ), + } + ) + } /> ); diff --git a/includes/core/assets/js/admin/pages/activity-reports/components/card-today/index.js b/includes/core/assets/js/src/admin/pages/activity-reports/components/card-today/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/activity-reports/components/card-today/index.js rename to includes/core/assets/js/src/admin/pages/activity-reports/components/card-today/index.js diff --git a/includes/core/assets/js/admin/pages/activity-reports/components/card-today/stat.js b/includes/core/assets/js/src/admin/pages/activity-reports/components/card-today/stat.js similarity index 100% rename from includes/core/assets/js/admin/pages/activity-reports/components/card-today/stat.js rename to includes/core/assets/js/src/admin/pages/activity-reports/components/card-today/stat.js diff --git a/includes/core/assets/js/admin/pages/activity-reports/components/card-today/top-form.js b/includes/core/assets/js/src/admin/pages/activity-reports/components/card-today/top-form.js similarity index 100% rename from includes/core/assets/js/admin/pages/activity-reports/components/card-today/top-form.js rename to includes/core/assets/js/src/admin/pages/activity-reports/components/card-today/top-form.js diff --git a/includes/core/assets/js/admin/pages/activity-reports/components/config/index.js b/includes/core/assets/js/src/admin/pages/activity-reports/components/config/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/activity-reports/components/config/index.js rename to includes/core/assets/js/src/admin/pages/activity-reports/components/config/index.js diff --git a/includes/core/assets/js/admin/pages/activity-reports/components/index.js b/includes/core/assets/js/src/admin/pages/activity-reports/components/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/activity-reports/components/index.js rename to includes/core/assets/js/src/admin/pages/activity-reports/components/index.js diff --git a/includes/core/assets/js/admin/pages/activity-reports/hooks/index.js b/includes/core/assets/js/src/admin/pages/activity-reports/hooks/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/activity-reports/hooks/index.js rename to includes/core/assets/js/src/admin/pages/activity-reports/hooks/index.js diff --git a/includes/core/assets/js/admin/pages/activity-reports/hooks/use-rest-api-report.js b/includes/core/assets/js/src/admin/pages/activity-reports/hooks/use-rest-api-report.js similarity index 100% rename from includes/core/assets/js/admin/pages/activity-reports/hooks/use-rest-api-report.js rename to includes/core/assets/js/src/admin/pages/activity-reports/hooks/use-rest-api-report.js diff --git a/includes/core/assets/js/admin/pages/activity-reports/index.js b/includes/core/assets/js/src/admin/pages/activity-reports/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/activity-reports/index.js rename to includes/core/assets/js/src/admin/pages/activity-reports/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/components/card/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/components/card/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/components/card/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/components/card/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/components/card/styles.js b/includes/core/assets/js/src/admin/pages/setup-wizard/components/card/styles.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/components/card/styles.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/components/card/styles.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/components/close-wizard/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/components/close-wizard/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/components/close-wizard/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/components/close-wizard/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/components/continue-button/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/components/continue-button/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/components/continue-button/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/components/continue-button/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/components/continue-button/styles.js b/includes/core/assets/js/src/admin/pages/setup-wizard/components/continue-button/styles.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/components/continue-button/styles.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/components/continue-button/styles.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/components/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/components/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/components/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/components/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/components/logo/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/components/logo/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/components/logo/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/components/logo/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/components/notices/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/components/notices/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/components/notices/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/components/notices/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/components/notices/toasts.js b/includes/core/assets/js/src/admin/pages/setup-wizard/components/notices/toasts.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/components/notices/toasts.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/components/notices/toasts.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/components/progress/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/components/progress/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/components/progress/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/components/progress/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/components/progress/styles.js b/includes/core/assets/js/src/admin/pages/setup-wizard/components/progress/styles.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/components/progress/styles.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/components/progress/styles.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/components/setup-wizard/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/components/setup-wizard/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/components/setup-wizard/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/components/setup-wizard/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/components/setup-wizard/styles.js b/includes/core/assets/js/src/admin/pages/setup-wizard/components/setup-wizard/styles.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/components/setup-wizard/styles.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/components/setup-wizard/styles.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/components/stripe-button/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/components/stripe-button/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/components/stripe-button/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/components/stripe-button/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/components/stripe-button/styles.js b/includes/core/assets/js/src/admin/pages/setup-wizard/components/stripe-button/styles.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/components/stripe-button/styles.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/components/stripe-button/styles.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/constants.js b/includes/core/assets/js/src/admin/pages/setup-wizard/constants.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/constants.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/constants.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/hooks/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/hooks/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/hooks/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/hooks/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/hooks/use-settings.js b/includes/core/assets/js/src/admin/pages/setup-wizard/hooks/use-settings.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/hooks/use-settings.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/hooks/use-settings.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/hooks/use-step-navigation.js b/includes/core/assets/js/src/admin/pages/setup-wizard/hooks/use-step-navigation.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/hooks/use-step-navigation.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/hooks/use-step-navigation.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/steps/analytics/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/steps/analytics/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/steps/analytics/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/steps/analytics/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/steps/analytics/styles.js b/includes/core/assets/js/src/admin/pages/setup-wizard/steps/analytics/styles.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/steps/analytics/styles.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/steps/analytics/styles.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/steps/emails/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/steps/emails/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/steps/emails/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/steps/emails/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/steps/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/steps/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/steps/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/steps/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/steps/license/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/steps/license/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/steps/license/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/steps/license/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/steps/next-steps/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/steps/next-steps/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/steps/next-steps/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/steps/next-steps/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/steps/next-steps/lite.js b/includes/core/assets/js/src/admin/pages/setup-wizard/steps/next-steps/lite.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/steps/next-steps/lite.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/steps/next-steps/lite.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/steps/next-steps/pro.js b/includes/core/assets/js/src/admin/pages/setup-wizard/steps/next-steps/pro.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/steps/next-steps/pro.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/steps/next-steps/pro.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/steps/next-steps/styles.js b/includes/core/assets/js/src/admin/pages/setup-wizard/steps/next-steps/styles.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/steps/next-steps/styles.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/steps/next-steps/styles.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/steps/stripe/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/steps/stripe/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/steps/stripe/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/steps/stripe/index.js diff --git a/includes/core/assets/js/admin/pages/setup-wizard/steps/welcome/index.js b/includes/core/assets/js/src/admin/pages/setup-wizard/steps/welcome/index.js similarity index 100% rename from includes/core/assets/js/admin/pages/setup-wizard/steps/welcome/index.js rename to includes/core/assets/js/src/admin/pages/setup-wizard/steps/welcome/index.js diff --git a/includes/core/assets/js/admin/pages/smtp.js b/includes/core/assets/js/src/admin/pages/smtp.js similarity index 100% rename from includes/core/assets/js/admin/pages/smtp.js rename to includes/core/assets/js/src/admin/pages/smtp.js diff --git a/includes/core/assets/js/admin/payment-form/automations.js b/includes/core/assets/js/src/admin/payment-form/automations.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/automations.js rename to includes/core/assets/js/src/admin/payment-form/automations.js diff --git a/includes/core/assets/js/admin/payment-form/custom-fields.js b/includes/core/assets/js/src/admin/payment-form/custom-fields.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/custom-fields.js rename to includes/core/assets/js/src/admin/payment-form/custom-fields.js diff --git a/includes/core/assets/js/admin/payment-form/general.js b/includes/core/assets/js/src/admin/payment-form/general.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/general.js rename to includes/core/assets/js/src/admin/payment-form/general.js diff --git a/includes/core/assets/js/admin/payment-form/index.js b/includes/core/assets/js/src/admin/payment-form/index.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/index.js rename to includes/core/assets/js/src/admin/payment-form/index.js diff --git a/includes/core/assets/js/admin/payment-form/notifications.js b/includes/core/assets/js/src/admin/payment-form/notifications.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/notifications.js rename to includes/core/assets/js/src/admin/payment-form/notifications.js diff --git a/includes/core/assets/js/admin/payment-form/payment-methods.js b/includes/core/assets/js/src/admin/payment-form/payment-methods.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/payment-methods.js rename to includes/core/assets/js/src/admin/payment-form/payment-methods.js diff --git a/includes/core/assets/js/admin/payment-form/payment-page.js b/includes/core/assets/js/src/admin/payment-form/payment-page.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/payment-page.js rename to includes/core/assets/js/src/admin/payment-form/payment-page.js diff --git a/includes/core/assets/js/admin/payment-form/prices.js b/includes/core/assets/js/src/admin/payment-form/prices.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/prices.js rename to includes/core/assets/js/src/admin/payment-form/prices.js diff --git a/includes/core/assets/js/admin/payment-form/purchase-restrictions.js b/includes/core/assets/js/src/admin/payment-form/purchase-restrictions.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/purchase-restrictions.js rename to includes/core/assets/js/src/admin/payment-form/purchase-restrictions.js diff --git a/includes/core/assets/js/admin/payment-form/stripe-checkout.js b/includes/core/assets/js/src/admin/payment-form/stripe-checkout.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/stripe-checkout.js rename to includes/core/assets/js/src/admin/payment-form/stripe-checkout.js diff --git a/includes/core/assets/js/admin/payment-form/taxes.js b/includes/core/assets/js/src/admin/payment-form/taxes.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/taxes.js rename to includes/core/assets/js/src/admin/payment-form/taxes.js diff --git a/includes/core/assets/js/admin/payment-form/template-explorer/content.js b/includes/core/assets/js/src/admin/payment-form/template-explorer/content.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/template-explorer/content.js rename to includes/core/assets/js/src/admin/payment-form/template-explorer/content.js diff --git a/includes/core/assets/js/admin/payment-form/template-explorer/header.js b/includes/core/assets/js/src/admin/payment-form/template-explorer/header.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/template-explorer/header.js rename to includes/core/assets/js/src/admin/payment-form/template-explorer/header.js diff --git a/includes/core/assets/js/admin/payment-form/template-explorer/index.js b/includes/core/assets/js/src/admin/payment-form/template-explorer/index.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/template-explorer/index.js rename to includes/core/assets/js/src/admin/payment-form/template-explorer/index.js diff --git a/includes/core/assets/js/admin/payment-form/template-explorer/list-item.js b/includes/core/assets/js/src/admin/payment-form/template-explorer/list-item.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/template-explorer/list-item.js rename to includes/core/assets/js/src/admin/payment-form/template-explorer/list-item.js diff --git a/includes/core/assets/js/admin/payment-form/template-explorer/search-control.js b/includes/core/assets/js/src/admin/payment-form/template-explorer/search-control.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/template-explorer/search-control.js rename to includes/core/assets/js/src/admin/payment-form/template-explorer/search-control.js diff --git a/includes/core/assets/js/admin/payment-form/template-explorer/search-utils.js b/includes/core/assets/js/src/admin/payment-form/template-explorer/search-utils.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/template-explorer/search-utils.js rename to includes/core/assets/js/src/admin/payment-form/template-explorer/search-utils.js diff --git a/includes/core/assets/js/admin/payment-form/template-explorer/sidebar.js b/includes/core/assets/js/src/admin/payment-form/template-explorer/sidebar.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/template-explorer/sidebar.js rename to includes/core/assets/js/src/admin/payment-form/template-explorer/sidebar.js diff --git a/includes/core/assets/js/admin/payment-form/template-explorer/suggest-cta.js b/includes/core/assets/js/src/admin/payment-form/template-explorer/suggest-cta.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/template-explorer/suggest-cta.js rename to includes/core/assets/js/src/admin/payment-form/template-explorer/suggest-cta.js diff --git a/includes/core/assets/js/admin/payment-form/template-explorer/upgrade-cta.js b/includes/core/assets/js/src/admin/payment-form/template-explorer/upgrade-cta.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/template-explorer/upgrade-cta.js rename to includes/core/assets/js/src/admin/payment-form/template-explorer/upgrade-cta.js diff --git a/includes/core/assets/js/admin/payment-form/template-explorer/upgrade-modal.js b/includes/core/assets/js/src/admin/payment-form/template-explorer/upgrade-modal.js similarity index 100% rename from includes/core/assets/js/admin/payment-form/template-explorer/upgrade-modal.js rename to includes/core/assets/js/src/admin/payment-form/template-explorer/upgrade-modal.js diff --git a/includes/core/assets/js/admin/settings/emails.js b/includes/core/assets/js/src/admin/settings/emails.js similarity index 100% rename from includes/core/assets/js/admin/settings/emails.js rename to includes/core/assets/js/src/admin/settings/emails.js diff --git a/includes/core/assets/js/admin/settings/license.js b/includes/core/assets/js/src/admin/settings/license.js similarity index 100% rename from includes/core/assets/js/admin/settings/license.js rename to includes/core/assets/js/src/admin/settings/license.js diff --git a/includes/core/assets/js/admin/settings/recaptcha.js b/includes/core/assets/js/src/admin/settings/recaptcha.js similarity index 100% rename from includes/core/assets/js/admin/settings/recaptcha.js rename to includes/core/assets/js/src/admin/settings/recaptcha.js diff --git a/includes/core/assets/js/admin/settings/stripe-connect.js b/includes/core/assets/js/src/admin/settings/stripe-connect.js similarity index 100% rename from includes/core/assets/js/admin/settings/stripe-connect.js rename to includes/core/assets/js/src/admin/settings/stripe-connect.js diff --git a/includes/core/assets/js/admin/settings/test-mode.js b/includes/core/assets/js/src/admin/settings/test-mode.js similarity index 100% rename from includes/core/assets/js/admin/settings/test-mode.js rename to includes/core/assets/js/src/admin/settings/test-mode.js diff --git a/includes/core/assets/js/admin/settings/toggles.js b/includes/core/assets/js/src/admin/settings/toggles.js similarity index 100% rename from includes/core/assets/js/admin/settings/toggles.js rename to includes/core/assets/js/src/admin/settings/toggles.js diff --git a/includes/core/assets/js/admin/utils.js b/includes/core/assets/js/src/admin/utils.js similarity index 100% rename from includes/core/assets/js/admin/utils.js rename to includes/core/assets/js/src/admin/utils.js diff --git a/includes/core/assets/js/blocks/button/edit.js b/includes/core/assets/js/src/blocks/button/edit.js similarity index 100% rename from includes/core/assets/js/blocks/button/edit.js rename to includes/core/assets/js/src/blocks/button/edit.js diff --git a/includes/core/assets/js/blocks/button/icon.js b/includes/core/assets/js/src/blocks/button/icon.js similarity index 100% rename from includes/core/assets/js/blocks/button/icon.js rename to includes/core/assets/js/src/blocks/button/icon.js diff --git a/includes/core/assets/js/blocks/button/index.js b/includes/core/assets/js/src/blocks/button/index.js similarity index 100% rename from includes/core/assets/js/blocks/button/index.js rename to includes/core/assets/js/src/blocks/button/index.js diff --git a/includes/core/assets/js/blocks/button/save.js b/includes/core/assets/js/src/blocks/button/save.js similarity index 100% rename from includes/core/assets/js/blocks/button/save.js rename to includes/core/assets/js/src/blocks/button/save.js diff --git a/includes/core/assets/js/src/blocks/payment-form/block.json b/includes/core/assets/js/src/blocks/payment-form/block.json new file mode 100644 index 00000000..7a89ed5e --- /dev/null +++ b/includes/core/assets/js/src/blocks/payment-form/block.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "simpay/payment-form", + "title": "WP Simple Pay - Payment Form", + "category": "widgets", + "description": "Display a WP Simple Pay payment form.", + "textdomain": "simple-pay" +} \ No newline at end of file diff --git a/includes/core/assets/js/blocks/payment-form/edit.js b/includes/core/assets/js/src/blocks/payment-form/edit.js similarity index 100% rename from includes/core/assets/js/blocks/payment-form/edit.js rename to includes/core/assets/js/src/blocks/payment-form/edit.js diff --git a/includes/core/assets/js/blocks/payment-form/hooks/index.js b/includes/core/assets/js/src/blocks/payment-form/hooks/index.js similarity index 100% rename from includes/core/assets/js/blocks/payment-form/hooks/index.js rename to includes/core/assets/js/src/blocks/payment-form/hooks/index.js diff --git a/includes/core/assets/js/blocks/payment-form/hooks/use-payment-form-initialization.js b/includes/core/assets/js/src/blocks/payment-form/hooks/use-payment-form-initialization.js similarity index 100% rename from includes/core/assets/js/blocks/payment-form/hooks/use-payment-form-initialization.js rename to includes/core/assets/js/src/blocks/payment-form/hooks/use-payment-form-initialization.js diff --git a/includes/core/assets/js/blocks/payment-form/hooks/use-payment-forms.js b/includes/core/assets/js/src/blocks/payment-form/hooks/use-payment-forms.js similarity index 100% rename from includes/core/assets/js/blocks/payment-form/hooks/use-payment-forms.js rename to includes/core/assets/js/src/blocks/payment-form/hooks/use-payment-forms.js diff --git a/includes/core/assets/js/blocks/payment-form/icon.js b/includes/core/assets/js/src/blocks/payment-form/icon.js similarity index 100% rename from includes/core/assets/js/blocks/payment-form/icon.js rename to includes/core/assets/js/src/blocks/payment-form/icon.js diff --git a/includes/core/assets/js/blocks/payment-form/index.js b/includes/core/assets/js/src/blocks/payment-form/index.js similarity index 78% rename from includes/core/assets/js/blocks/payment-form/index.js rename to includes/core/assets/js/src/blocks/payment-form/index.js index 0bb06694..16ac870c 100644 --- a/includes/core/assets/js/blocks/payment-form/index.js +++ b/includes/core/assets/js/src/blocks/payment-form/index.js @@ -8,9 +8,13 @@ import { registerBlockType } from '@wordpress/blocks'; */ import Edit from './edit.js'; import icon from './icon.js'; +import { name, title, description, category } from './block.json'; -registerBlockType( 'simpay/payment-form', { +registerBlockType( name, { edit: Edit, + title, + description, + category, icon, transforms: { from: [ diff --git a/includes/core/assets/js/frontend/index.js b/includes/core/assets/js/src/frontend/index.js similarity index 100% rename from includes/core/assets/js/frontend/index.js rename to includes/core/assets/js/src/frontend/index.js diff --git a/includes/core/assets/js/frontend/payment-forms/index.js b/includes/core/assets/js/src/frontend/payment-forms/index.js similarity index 100% rename from includes/core/assets/js/frontend/payment-forms/index.js rename to includes/core/assets/js/src/frontend/payment-forms/index.js diff --git a/includes/core/assets/js/frontend/payment-forms/stripe-checkout/cart/index.js b/includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/cart/index.js similarity index 100% rename from includes/core/assets/js/frontend/payment-forms/stripe-checkout/cart/index.js rename to includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/cart/index.js diff --git a/includes/core/assets/js/frontend/payment-forms/stripe-checkout/cart/line-item.js b/includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/cart/line-item.js similarity index 100% rename from includes/core/assets/js/frontend/payment-forms/stripe-checkout/cart/line-item.js rename to includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/cart/line-item.js diff --git a/includes/core/assets/js/frontend/payment-forms/stripe-checkout/cart/test/index.js b/includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/cart/test/index.js similarity index 100% rename from includes/core/assets/js/frontend/payment-forms/stripe-checkout/cart/test/index.js rename to includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/cart/test/index.js diff --git a/includes/core/assets/js/frontend/payment-forms/stripe-checkout/disable.js b/includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/disable.js similarity index 100% rename from includes/core/assets/js/frontend/payment-forms/stripe-checkout/disable.js rename to includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/disable.js diff --git a/includes/core/assets/js/frontend/payment-forms/stripe-checkout/enable.js b/includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/enable.js similarity index 100% rename from includes/core/assets/js/frontend/payment-forms/stripe-checkout/enable.js rename to includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/enable.js diff --git a/includes/core/assets/js/frontend/payment-forms/stripe-checkout/error.js b/includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/error.js similarity index 100% rename from includes/core/assets/js/frontend/payment-forms/stripe-checkout/error.js rename to includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/error.js diff --git a/includes/core/assets/js/frontend/payment-forms/stripe-checkout/index.js b/includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/index.js similarity index 100% rename from includes/core/assets/js/frontend/payment-forms/stripe-checkout/index.js rename to includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/index.js diff --git a/includes/core/assets/js/frontend/payment-forms/stripe-checkout/setup.js b/includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/setup.js similarity index 100% rename from includes/core/assets/js/frontend/payment-forms/stripe-checkout/setup.js rename to includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/setup.js diff --git a/includes/core/assets/js/frontend/payment-forms/stripe-checkout/submit.js b/includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/submit.js similarity index 100% rename from includes/core/assets/js/frontend/payment-forms/stripe-checkout/submit.js rename to includes/core/assets/js/src/frontend/payment-forms/stripe-checkout/submit.js diff --git a/includes/core/assets/js/frontend/upe/index.js b/includes/core/assets/js/src/frontend/upe/index.js similarity index 100% rename from includes/core/assets/js/frontend/upe/index.js rename to includes/core/assets/js/src/frontend/upe/index.js diff --git a/includes/core/assets/js/frontend/utils/legacy.js b/includes/core/assets/js/src/frontend/utils/legacy.js similarity index 100% rename from includes/core/assets/js/frontend/utils/legacy.js rename to includes/core/assets/js/src/frontend/utils/legacy.js diff --git a/includes/core/assets/js/frontend/utils/recaptcha.js b/includes/core/assets/js/src/frontend/utils/recaptcha.js similarity index 100% rename from includes/core/assets/js/frontend/utils/recaptcha.js rename to includes/core/assets/js/src/frontend/utils/recaptcha.js diff --git a/includes/core/class-assets.php b/includes/core/class-assets.php index 738b4a55..9c32df98 100644 --- a/includes/core/class-assets.php +++ b/includes/core/class-assets.php @@ -91,8 +91,9 @@ public static function get_instance() { */ public function setup() { $public_js = simpay_is_upe() - ? SIMPLE_PAY_INC_URL . 'core/assets/js/simpay-public-upe.min.js' - : SIMPLE_PAY_INC_URL . 'core/assets/js/simpay-public.min.js'; + ? SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-public-upe.js' + : SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-public.js'; + $public_deps = simpay_is_upe() ? array( 'jquery', @@ -134,7 +135,7 @@ public function setup() { if ( ! simpay_is_upe() ) { $this->scripts['simpay-shared'] = array( - 'src' => SIMPLE_PAY_INC_URL . 'core/assets/js/simpay-public-shared.min.js', + 'src' => SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-public-shared.js', 'deps' => array( 'jquery', 'simpay-accounting' ), 'ver' => SIMPLE_PAY_VERSION, 'footer' => true, diff --git a/includes/core/class-shortcodes.php b/includes/core/class-shortcodes.php index 8ac8ba85..13f98680 100644 --- a/includes/core/class-shortcodes.php +++ b/includes/core/class-shortcodes.php @@ -179,6 +179,7 @@ private function form_html( $form_id, $atts ) { // Check schedule for output. if ( false === $form->has_available_schedule() ) { $out_of_schedule_message = sprintf( + /* translators: Form title */ __( 'Sorry, "%s" is not available for purchase.', 'stripe' @@ -205,6 +206,7 @@ private function form_html( $form_id, $atts ) { // Check inventory for output. } elseif ( false === $form->has_available_inventory() ) { $out_of_stock_message = sprintf( + /* translators: Form title */ __( 'Sorry, "%s" is not available for purchase.', 'stripe' diff --git a/includes/core/class-simplepay.php b/includes/core/class-simplepay.php index a6a8874b..6f003b5d 100644 --- a/includes/core/class-simplepay.php +++ b/includes/core/class-simplepay.php @@ -103,87 +103,82 @@ public function __construct() { */ public function load() { // Vendors. - require_once( SIMPLE_PAY_INC . 'core/utils/class-persistent-dismissible.php' ); + require_once SIMPLE_PAY_INC . 'core/utils/class-persistent-dismissible.php'; // i18n. - require_once( SIMPLE_PAY_INC . 'core/i18n/functions.php' ); - require_once( SIMPLE_PAY_INC . 'core/i18n/countries.php' ); - require_once( SIMPLE_PAY_INC . 'core/i18n/stripe.php' ); + require_once SIMPLE_PAY_INC . 'core/i18n/functions.php'; + require_once SIMPLE_PAY_INC . 'core/i18n/countries.php'; + require_once SIMPLE_PAY_INC . 'core/i18n/stripe.php'; // Migrations. - require_once( SIMPLE_PAY_INC . 'core/utils/migrations/admin.php' ); - require_once( SIMPLE_PAY_INC . 'core/utils/migrations/functions.php' ); - require_once( SIMPLE_PAY_INC . 'core/utils/migrations/register.php' ); + require_once SIMPLE_PAY_INC . 'core/utils/migrations/admin.php'; + require_once SIMPLE_PAY_INC . 'core/utils/migrations/functions.php'; + require_once SIMPLE_PAY_INC . 'core/utils/migrations/register.php'; // Settings. - require_once( SIMPLE_PAY_INC . 'core/settings/register.php' ); - require_once( SIMPLE_PAY_INC . 'core/settings/register-stripe.php' ); - require_once( SIMPLE_PAY_INC . 'core/settings/register-general.php' ); - require_once( SIMPLE_PAY_INC . 'core/settings/register-payment-confirmations.php' ); - require_once( SIMPLE_PAY_INC . 'core/settings/register-emails.php' ); - require_once( SIMPLE_PAY_INC . 'core/settings/functions.php' ); - require_once( SIMPLE_PAY_INC . 'core/settings/display.php' ); - require_once( SIMPLE_PAY_INC . 'core/settings/compat.php' ); + require_once SIMPLE_PAY_INC . 'core/settings/register.php'; + require_once SIMPLE_PAY_INC . 'core/settings/register-stripe.php'; + require_once SIMPLE_PAY_INC . 'core/settings/register-general.php'; + require_once SIMPLE_PAY_INC . 'core/settings/register-payment-confirmations.php'; + require_once SIMPLE_PAY_INC . 'core/settings/register-emails.php'; + require_once SIMPLE_PAY_INC . 'core/settings/functions.php'; + require_once SIMPLE_PAY_INC . 'core/settings/display.php'; + require_once SIMPLE_PAY_INC . 'core/settings/compat.php'; // Emails. - require_once( SIMPLE_PAY_INC . 'core/class-smtp.php' ); + require_once SIMPLE_PAY_INC . 'core/class-smtp.php'; // Post types. - require_once( SIMPLE_PAY_INC . 'core/post-types/simple-pay/register.php' ); - require_once( SIMPLE_PAY_INC . 'core/post-types/simple-pay/meta.php' ); + require_once SIMPLE_PAY_INC . 'core/post-types/simple-pay/register.php'; + require_once SIMPLE_PAY_INC . 'core/post-types/simple-pay/meta.php'; // Load core shared back-end & front-end functions. - require_once( SIMPLE_PAY_INC . 'core/utils/functions.php' ); - require_once( SIMPLE_PAY_INC . 'core/utils/exceptions.php' ); - require_once( SIMPLE_PAY_INC . 'core/utils/collections.php' ); - require_once( SIMPLE_PAY_INC . 'core/functions/template.php' ); - require_once( SIMPLE_PAY_INC . 'core/functions/shared.php' ); - require_once( SIMPLE_PAY_INC . 'core/functions/countries.php' ); + require_once SIMPLE_PAY_INC . 'core/utils/functions.php'; + require_once SIMPLE_PAY_INC . 'core/utils/exceptions.php'; + require_once SIMPLE_PAY_INC . 'core/utils/collections.php'; + require_once SIMPLE_PAY_INC . 'core/functions/template.php'; + require_once SIMPLE_PAY_INC . 'core/functions/shared.php'; + require_once SIMPLE_PAY_INC . 'core/functions/countries.php'; // Payment form. - require_once( SIMPLE_PAY_INC . 'core/forms/functions.php' ); - require_once( SIMPLE_PAY_INC . 'core/forms/class-price-option.php' ); - require_once( SIMPLE_PAY_INC . 'core/forms/class-price-options.php' ); + require_once SIMPLE_PAY_INC . 'core/forms/functions.php'; + require_once SIMPLE_PAY_INC . 'core/forms/class-price-option.php'; + require_once SIMPLE_PAY_INC . 'core/forms/class-price-options.php'; // Payments/Purchase Flow. - require_once( SIMPLE_PAY_INC . 'core/payments/customer.php' ); - require_once( SIMPLE_PAY_INC . 'core/payments/paymentintent.php' ); - require_once( SIMPLE_PAY_INC . 'core/payments/payment-confirmation.php' ); - require_once( SIMPLE_PAY_INC . 'core/payments/payment-confirmation-template-tags.php' ); + require_once SIMPLE_PAY_INC . 'core/payments/customer.php'; + require_once SIMPLE_PAY_INC . 'core/payments/paymentintent.php'; + require_once SIMPLE_PAY_INC . 'core/payments/payment-confirmation.php'; + require_once SIMPLE_PAY_INC . 'core/payments/payment-confirmation-template-tags.php'; // API. - require_once( SIMPLE_PAY_INC . 'core/api/charges.php' ); - require_once( SIMPLE_PAY_INC . 'core/api/coupons.php' ); - require_once( SIMPLE_PAY_INC . 'core/api/customers.php' ); - require_once( SIMPLE_PAY_INC . 'core/api/paymentintents.php' ); - require_once( SIMPLE_PAY_INC . 'core/api/paymentmethods.php' ); - require_once( SIMPLE_PAY_INC . 'core/api/prices.php' ); - require_once( SIMPLE_PAY_INC . 'core/api/plans.php' ); - require_once( SIMPLE_PAY_INC . 'core/api/products.php' ); - require_once( SIMPLE_PAY_INC . 'core/api/sessions.php' ); - require_once( SIMPLE_PAY_INC . 'core/api/setupintents.php' ); - require_once( SIMPLE_PAY_INC . 'core/api/subscriptions.php' ); - require_once( SIMPLE_PAY_INC . 'core/api/tax-rates.php' ); + require_once SIMPLE_PAY_INC . 'core/api/charges.php'; + require_once SIMPLE_PAY_INC . 'core/api/coupons.php'; + require_once SIMPLE_PAY_INC . 'core/api/customers.php'; + require_once SIMPLE_PAY_INC . 'core/api/paymentintents.php'; + require_once SIMPLE_PAY_INC . 'core/api/paymentmethods.php'; + require_once SIMPLE_PAY_INC . 'core/api/prices.php'; + require_once SIMPLE_PAY_INC . 'core/api/plans.php'; + require_once SIMPLE_PAY_INC . 'core/api/products.php'; + require_once SIMPLE_PAY_INC . 'core/api/sessions.php'; + require_once SIMPLE_PAY_INC . 'core/api/setupintents.php'; + require_once SIMPLE_PAY_INC . 'core/api/subscriptions.php'; + require_once SIMPLE_PAY_INC . 'core/api/tax-rates.php'; // REST API. new REST_API(); - require_once( SIMPLE_PAY_INC . 'core/rest-api/functions.php' ); + require_once SIMPLE_PAY_INC . 'core/rest-api/functions.php'; // Stripe Checkout functionality. - require_once( SIMPLE_PAY_INC . 'core/payments/stripe-checkout/functions.php' ); - require_once( SIMPLE_PAY_INC . 'core/payments/stripe-checkout/session.php' ); + require_once SIMPLE_PAY_INC . 'core/payments/stripe-checkout/functions.php'; + require_once SIMPLE_PAY_INC . 'core/payments/stripe-checkout/session.php'; // Stripe Connect functionality. - require_once( SIMPLE_PAY_INC . 'core/stripe-connect/functions.php' ); + require_once SIMPLE_PAY_INC . 'core/stripe-connect/functions.php'; // reCAPTCHA. - require_once( SIMPLE_PAY_INC . 'core/recaptcha/index.php' ); - require_once( SIMPLE_PAY_INC . 'core/recaptcha/settings.php' ); - - // Legacy. - require_once( SIMPLE_PAY_INC . 'core/legacy/functions.php' ); - require_once( SIMPLE_PAY_INC . 'core/legacy/hooks.php' ); - require_once( SIMPLE_PAY_INC . 'core/legacy/class-payment-form.php' ); + require_once SIMPLE_PAY_INC . 'core/recaptcha/index.php'; + require_once SIMPLE_PAY_INC . 'core/recaptcha/settings.php'; // Rate Limiting. $rate_limiting = new Utils\Rate_Limiting(); @@ -208,23 +203,23 @@ public function load() { */ public function load_admin() { // Post types. - require_once( SIMPLE_PAY_INC . 'core/post-types/simple-pay/compat.php' ); - require_once( SIMPLE_PAY_INC . 'core/post-types/simple-pay/menu.php' ); - require_once( SIMPLE_PAY_INC . 'core/post-types/simple-pay/list-table.php' ); - require_once( SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form.php' ); - require_once( SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form-payment-options.php' ); - require_once( SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form-stripe-checkout.php' ); - require_once( SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form-custom-fields.php' ); - require_once( SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form-payment-page.php' ); - require_once( SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form-purchase-restrictions.php' ); - require_once( SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form-automations.php' ); - require_once( SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form-confirmation.php' ); - require_once( SIMPLE_PAY_INC . 'core/post-types/simple-pay/actions.php' ); + require_once SIMPLE_PAY_INC . 'core/post-types/simple-pay/compat.php'; + require_once SIMPLE_PAY_INC . 'core/post-types/simple-pay/menu.php'; + require_once SIMPLE_PAY_INC . 'core/post-types/simple-pay/list-table.php'; + require_once SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form.php'; + require_once SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form-payment-options.php'; + require_once SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form-stripe-checkout.php'; + require_once SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form-custom-fields.php'; + require_once SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form-payment-page.php'; + require_once SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form-purchase-restrictions.php'; + require_once SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form-automations.php'; + require_once SIMPLE_PAY_INC . 'core/post-types/simple-pay/edit-form-confirmation.php'; + require_once SIMPLE_PAY_INC . 'core/post-types/simple-pay/actions.php'; // Load core back-end only functions. - require_once( SIMPLE_PAY_INC . 'core/functions/admin.php' ); - require_once( SIMPLE_PAY_INC . 'core/admin/functions/notices.php' ); - require_once( SIMPLE_PAY_INC . 'core/admin/functions/plugin-upgrade-notice.php' ); + require_once SIMPLE_PAY_INC . 'core/functions/admin.php'; + require_once SIMPLE_PAY_INC . 'core/admin/functions/notices.php'; + require_once SIMPLE_PAY_INC . 'core/admin/functions/plugin-upgrade-notice.php'; new Admin\Assets(); new Admin\Menus(); diff --git a/includes/core/class-smtp.php b/includes/core/class-smtp.php index 6e12be3f..5738fb4f 100644 --- a/includes/core/class-smtp.php +++ b/includes/core/class-smtp.php @@ -309,7 +309,7 @@ public function enqueue_assets() { wp_enqueue_script( 'simpay-smtp', - SIMPLE_PAY_INC_URL . 'core/assets/js/simpay-admin-page-smtp.min.js', + SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-admin-page-smtp.js', array( 'jquery' ), SIMPLE_PAY_VERSION, true @@ -449,7 +449,7 @@ private function output_section_screenshot() { esc_url( SIMPLE_PAY_INC_URL . 'core/assets/images/smtp/screenshot-full.png' ), esc_html__( 'Improves email deliverability in WordPress.', 'stripe' ), esc_html__( 'Used by 2+ million websites.', 'stripe' ), - esc_html__( 'Free mailers: SMTP.com, Sendinblue, Google Workspace/ Gmail, Mailgun, Postmark, SendGrid.', 'stripe' ), + esc_html__( 'Free mailers: SMTP.com, Brevo, Google Workspace/ Gmail, Mailgun, Postmark, SendGrid.', 'stripe' ), esc_html__( 'Pro mailers: Amazon SES, Microsoft 365/ Outlook.com, Zoho Mail.', 'stripe' ) ); } diff --git a/includes/core/forms/class-price-option.php b/includes/core/forms/class-price-option.php index 83ad6036..9bc41a3e 100644 --- a/includes/core/forms/class-price-option.php +++ b/includes/core/forms/class-price-option.php @@ -508,7 +508,7 @@ public function get_generated_label( $args = array() ) { $count = $this->recurring['interval_count']; $label = sprintf( - /* translators: %1$s Price option amount. %2$s Recurring interval count. %3$s Recurring interval. */ + /* translators: %1$s Recurring amount. %2$s Recurring interval count. %3$s Recurring interval. */ esc_html_x( '%1$s every %2$s %3$s', 'recurring interval', @@ -556,7 +556,7 @@ function( $amount, $line_item ) { if ( null !== $this->unit_amount_min ) { $label = sprintf( - /* translators: %s Minimum price. */ + /* translators: %s: Minimum payment amount. */ __( 'starting at %s', 'stripe' ), $label ); @@ -645,7 +645,7 @@ public function get_simplified_label() { ); } else { $label = sprintf( - /* translators: %1$s Price option amount. %2$s Price option currency code. %3$s Recurring interval count. %4$s Recurring interval. */ + /* translators: %1$s Recurring amount. %2$s Recurring interval count. %3$s Recurring interval. */ esc_html_x( '%1$s every %2$s %3$s', 'recurring interval', diff --git a/includes/core/forms/class-price-options.php b/includes/core/forms/class-price-options.php index 06b6f923..879088d9 100644 --- a/includes/core/forms/class-price-options.php +++ b/includes/core/forms/class-price-options.php @@ -616,7 +616,7 @@ private function get_product_args( $form ) { // https://github.com/wpsimplepay/wp-simple-pay-pro/issues/1598 if ( empty( $name ) ) { $name = sprintf( - /* translators: %d payment form ID. */ + /* translators: %d: Payment Form ID. */ __( 'WP Simple Pay - Form %d', 'stripe' ), $form->id ); diff --git a/includes/core/forms/functions.php b/includes/core/forms/functions.php index 7116daac..25d41f8c 100644 --- a/includes/core/forms/functions.php +++ b/includes/core/forms/functions.php @@ -266,6 +266,18 @@ function simpay_payment_form_add_missing_custom_fields( switch ( $form_display_type ) { case 'overlay': + if ( ! isset( $fields['payment_button'] ) ) { + $fields['payment_button'][] = array( + 'uid' => $count, + 'id' => 'simpay_' . $form_id . '_payment_button', + ); + + $changes[] = __( + 'Payment Button field is required, and has been added to the payment form.', + 'stripe' + ); + ++$count; + } break; case 'stripe_checkout': if ( isset( $fields['coupon'] ) ) { diff --git a/includes/core/functions/shared.php b/includes/core/functions/shared.php index 8a2a866a..b46b11c0 100644 --- a/includes/core/functions/shared.php +++ b/includes/core/functions/shared.php @@ -542,7 +542,7 @@ function simpay_shared_script_variables() { 'decimalSeparator' => simpay_get_decimal_separator(), 'thousandSeparator' => simpay_get_thousand_separator(), 'ajaxurl' => admin_url( 'admin-ajax.php' ), - /* translators: Minimum payment amount. */ + /* translators: %s: Minimum payment amount. */ 'customAmountLabel' => esc_html__( 'starting at %s', 'stripe' ), 'recurringIntervals' => simpay_get_recurring_intervals(), /* translators: %1$s Recurring amount. %2$s Recurring interval count. %3$s Recurring interval. */ diff --git a/includes/core/i18n/countries.php b/includes/core/i18n/countries.php index ed083707..e6bf021b 100644 --- a/includes/core/i18n/countries.php +++ b/includes/core/i18n/countries.php @@ -46,7 +46,6 @@ function get_countries() { 'BB' => __( 'Barbados', 'stripe' ), 'BY' => __( 'Belarus', 'stripe' ), 'BE' => __( 'Belgium', 'stripe' ), - 'PW' => __( 'Belau', 'stripe' ), 'BZ' => __( 'Belize', 'stripe' ), 'BJ' => __( 'Benin', 'stripe' ), 'BM' => __( 'Bermuda', 'stripe' ), @@ -191,6 +190,7 @@ function get_countries() { 'NO' => __( 'Norway', 'stripe' ), 'OM' => __( 'Oman', 'stripe' ), 'PK' => __( 'Pakistan', 'stripe' ), + 'PW' => __( 'Palau', 'stripe' ), 'PS' => __( 'Palestinian Territory', 'stripe' ), 'PA' => __( 'Panama', 'stripe' ), 'PG' => __( 'Papua New Guinea', 'stripe' ), diff --git a/includes/core/legacy/class-payment-form.php b/includes/core/legacy/class-payment-form.php deleted file mode 100644 index b64e12a9..00000000 --- a/includes/core/legacy/class-payment-form.php +++ /dev/null @@ -1,66 +0,0 @@ -currency = $form->currency; - $this->company_name = $form->company_name; - $this->item_description = $form->item_description; - $this->locale = $form->locale; - $this->decimal_places = simpay_get_decimal_places(); - - /** - * Allow additional attributes to be set. - * - * @since unknown - */ - do_action( 'simpay_payment_attributes', $this ); - } -} diff --git a/includes/core/legacy/functions.php b/includes/core/legacy/functions.php deleted file mode 100644 index e189e9da..00000000 --- a/includes/core/legacy/functions.php +++ /dev/null @@ -1,93 +0,0 @@ -payment = new Payment( $form ); - - // Save old $_POST. - $post_vars = $_POST; - - // Shim $_POST so existing actions have access to the same values. - $_POST = $form_values; - - // Make form available. - global $simpay_form; - $simpay_form = $form; - - /** - * Filter the arguments passed to charge creation in Stripe. - * - * @since 3.5.0 - * - * @param array $charge_args Arguments passed to charge creation in Stripe. - * @param Payment $charge Payment object. - */ - $charge_args = apply_filters( 'simpay_stripe_charge_args', $paymentintent_args, $charge ); - - $paymentintent_args = wp_parse_args( $charge_args, $paymentintent_args ); - - // Reset. - $_POST = $post_vars; - unset( $simpay_form ); - unset( $post_vars ); - - return $paymentintent_args; -} - -/** - * Handle legacy `simpay_charge_created` hook. - * - * Finds the first charge in the PaymentIntent to mock the previous arguments. - * - * @since 3.6.0 - * - * @param \SimplePay\Vendor\Stripe\PaymentIntent $paymentintent Stripe PaymentIntent. - * @param SimplePay\Core\Abstracts\Form $form Form instance. - * @param array $form_values POSTed form values that can be shimmed in to $_POST. - */ -function simpay_charge_created( $paymentintent, $form, $form_values ) { - if ( ! has_action( 'simpay_charge_created' ) ) { - return; - } - - // Retrieve the first charge so the action can be called to maintain compatibility. - $charges = $paymentintent->charges; - $charge = current( $charges->data ); - - // Save old $_POST. - $post_vars = $_POST; - - // Shim $_POST so existing actions have access to the same values. - $_POST = $form_values; - - // Make form available. - global $simpay_form; - $simpay_form = $form; - - /** - * Allow processing to happen when a charge is created. - * - * @since unknown - * @deprecated 3.6.0 - * - * @param Stripe\Charge $charge First charge (now associated with a PaymentIntent). - * @param array $metadata - */ - do_action( 'simpay_charge_created', $charge, $paymentintent->metadata ); - - // Reset. - $_POST = $post_vars; - unset( $simpay_form ); - unset( $post_vars ); -} - -/** - * Accesses a payment confirmation's data to run the legacy `simpay_charge_created` hook. - * - * New implementations should use Webhooks to verify that action is only taken - * when an object reaches the proper status. - * - * @since 3.6.0 - * - * @param array $payment_confirmation_data Array of data to send to the Payment Confirmation smart tags. - */ -function _transform_payment_confirmation_for_legacy_charge( $payment_confirmation_data, $form, $form_values ) { - if ( ! has_action( 'simpay_charge_created' ) ) { - return; - } - - if ( ! isset( $payment_confirmation_data['paymentintents'] ) ) { - return; - } - - if ( $form->is_subscription() ) { - return; - } - - $payment_intent = current( $payment_confirmation_data['paymentintents'] ); - - if ( $payment_intent ) { - simpay_charge_created( $payment_intent, $form, $form_values ); - } -} -add_action( '_simpay_payment_confirmation', __NAMESPACE__ . '\\_transform_payment_confirmation_for_legacy_charge', 10, 3 ); - -/** - * Handle legacy `simpay_payment_metadata` filter. - * - * @since 3.6.0 - * - * @param SimplePay\Core\Abstracts\Form $form Form instance. - * @param array $form_data Form data generated by the client. - * @param array $form_values Values of named fields in the payment form. - * @param string $customer_id Stripe Customer ID. - * @return array Empty array. - */ -function simpay_payment_metadata( $form, $form_data, $form_values, $customer_id ) { - $metadata = array(); - - if ( ! has_filter( 'simpay_payment_metadata' ) ) { - return $metadata; - } - - /** - * Filter the metadata attached to a Paymen. - * - * @since unknown - * @deprecated 3.6.0 - * - * @param array $metadata Current metadata. - */ - $metadata = apply_filters( 'simpay_payment_metadata', $metadata ); - - return $metadata; -} - -/** - * Handle legacy `simpay_payment_description` filter. - * - * @since 3.6.0 - * - * @param SimplePay\Core\Abstracts\Form $form Form instance. - * @param array $form_data Form data generated by the client. - * @param array $form_values Values of named fields in the payment form. - * @return string - */ -function simpay_payment_description( $form, $form_data, $form_values, $customer_id ) { - $description = $form->item_description; - - // Remove blank values. - if ( '' === $description ) { - $description = null; - } - - if ( ! has_filter( 'simpay_payment_description' ) ) { - return $description; - } - - /** - * Filter the PaymentIntent description. - * - * @since unknown - * @deprecated 3.6.0 - * - * @param array $description Current description. - */ - $description = apply_filters( 'simpay_payment_description', $description ); - - // Remove blank values. - if ( '' === $description ) { - $description = null; - } - - return $description; -} - -/** - * Handle legacy `simpay_pre_process_form` hook. - * - * Called in REST API requests to mimic the original form processing. - * Avoid using `do_action_deprecated` to avoid notices breaking AJAX response. - * - * @since 3.6.0 - * - * @param SimplePay\Core\Abstracts\Form $form Form instance. - * @param array $form_data Form data generated by the client. - * @param array $form_values Values of named fields in the payment form. - * @param string $customer_id Stripe Customer ID. - */ -function simpay_pre_process_form( $form, $form_data, $form_values ) { - if ( ! has_action( 'simpay_pre_process_form' ) ) { - return; - } - - $post_vars = $_POST; - - // Shim $_POST so existing actions have access to the same values. - $_POST = $form_values; - - global $simpay_form; - $simpay_form = $form; - - /** - * Allow further action before a form is processed. - * - * @since unknown - * @deprecated 3.6.0 - */ - do_action( 'simpay_pre_process_form' ); - - // Reset. - $_POST = $post_vars; - unset( $simpay_form ); - unset( $post_vars ); -} - -/** - * Handle legacy `simpay_process_form` hook. - * - * Called in REST API requests to mimic the original form processing. - * Avoid using `do_action_deprecated` to avoid notices breaking AJAX response. - * - * @since 3.6.0 - * - * @param SimplePay\Core\Abstracts\Form $form Form instance. - * @param array $form_data Form data generated by the client. - * @param array $form_values Values of named fields in the payment form. - * @param string $customer_id Stripe Customer ID. - */ -function simpay_process_form( $form, $form_data, $form_values, $customer_id ) { - if ( ! has_action( 'simpay_process_form' ) ) { - return; - } - - $customer = API\Customers\retrieve( - $customer_id, - $form->get_api_request_args() - ); - - $amount = isset( $form_values['simpay_amount'] ) - ? $form_values['simpay_amount'] - : simpay_convert_amount_to_cents( $form->amount ); - - $payment = new Payment( $form ); - $payment->customer = $customer; - $payment->customer_id = $customer->id; - $payment->email = $customer->email; - $payment->email = $customer->email; - $payment->amount = $amount; - - /** - * Allow further processing when a Payment Form is processing. - * - * @since unknown - * @deprecated 3.6.0 - * - * @param \SimplePay\Core\Payments\Payment - */ - do_action( 'simpay_process_form', $payment ); - - // Handle metadata that might be added here. - // @link https://github.com/wpsimplepay/WP-Simple-Pay-Snippet-Library/blob/master/add-payment-metadata.php - if ( $payment->metadata && is_array( $payment->metadata ) ) { - $type = $form->is_subscription() || isset( $form_data['isRecurring'] ) ? 'subscription' : 'paymentintent'; - - /** This filter is documented in includes/core/payments/paymentintent.php */ - add_filter( - "simpay_get_{$type}_args_from_payment_form_request", - function( $object_args ) use ( $payment ) { - $object_args['metadata'] = array_merge( $object_args['metadata'], $payment->metadata ); - - return $object_args; - } - ); - } -} diff --git a/includes/core/payments/customer.php b/includes/core/payments/customer.php index cc762238..0afb38f6 100644 --- a/includes/core/payments/customer.php +++ b/includes/core/payments/customer.php @@ -235,7 +235,7 @@ function get_args_from_payment_form_request( $form, $form_data, $form_values ) { // Do this before Shipping, because we need a value for Shipping Name. $customer_args = array_filter( $customer_args, - function( $var ) { + function ( $var ) { return ! is_null( $var ); } ); @@ -250,9 +250,6 @@ function( $var ) { $customer_args['shipping']['phone'] = isset( $customer_args['phone'] ) ? $customer_args['phone'] : ''; } - // Handle legacy filter. - $customer_args = Legacy\Hooks\simpay_stripe_customer_args( $customer_args, $form, $form_values ); - /** * Filters arguments used to create a Customer from a payment form request. * diff --git a/includes/core/payments/payment-confirmation-template-tags.php b/includes/core/payments/payment-confirmation-template-tags.php index 275f799c..2b8da8db 100644 --- a/includes/core/payments/payment-confirmation-template-tags.php +++ b/includes/core/payments/payment-confirmation-template-tags.php @@ -54,6 +54,7 @@ function get_tags( $payment_confirmation_data ) { 'total-amount', 'payment-type', 'payment-url', + 'subtotal-amount', ); /** @@ -220,13 +221,11 @@ function get_object_property_deep( $keys, $ref ) { $value = ''; break; } - } else { - if ( isset( $value->$key ) ) { + } elseif ( isset( $value->$key ) ) { $value = $value->$key; - } else { - $value = ''; - break; - } + } else { + $value = ''; + break; } } @@ -547,16 +546,23 @@ function charge_date( $value, $payment_confirmation_data ) { * @return string */ function charge_amount( $value, $payment_confirmation_data ) { - if ( empty( $payment_confirmation_data['paymentintents'] ) ) { - return $value; - } - + $value = ''; $paymentintent = current( $payment_confirmation_data['paymentintents'] ); + if ( empty( $paymentintent ) ) { + // Get the amount from the Subscription. + $subscription = current( $payment_confirmation_data['subscriptions'] ); + $value = simpay_format_currency( + $subscription->latest_invoice->amount_paid, + $subscription->currency + ); - $value = simpay_format_currency( - $paymentintent->amount, - $paymentintent->currency - ); + } else { + // Get the amount from the PaymentIntent. + $value = simpay_format_currency( + $paymentintent->amount, + $paymentintent->currency + ); + } return esc_html( $value ); } @@ -650,6 +656,49 @@ function payment_type( $value, $payment_confirmation_data ) { 3 ); +/** + * Replaces {subtotal-amount} with the payment subtotal. + * + * @since 4.9.0 + * + * @param string $value Default value (empty string). + * @param array $payment_confirmation_data { + * Contextual information about this payment confirmation. + * + * @type \SimplePay\Vendor\Stripe\Customer $customer Stripe Customer + * @type \SimplePay\Core\Abstracts\Form $form Payment form. + * @type object $subscriptions Subscriptions associated with the Customer. + * @type object $paymentintents PaymentIntents associated with the Customer. + * } + * @return string + */ +function subtotal_amount( $value, $payment_confirmation_data ) { + if ( ! simpay_is_upe() ) { + return $value; + } + + $subscription = current( $payment_confirmation_data['subscriptions'] ); + + if ( $subscription ) { + $payment = $subscription->latest_invoice->subscription_details; + $currency = $subscription->currency; + } else { + $payment = current( $payment_confirmation_data['paymentintents'] ); + $currency = $payment->currency; + } + + return simpay_format_currency( + $payment->metadata->simpay_unit_amount * $payment->metadata->simpay_quantity, + $currency + ); +} +add_filter( + 'simpay_payment_confirmation_template_tag_subtotal-amount', + __NAMESPACE__ . '\\subtotal_amount', + 10, + 2 +); + /** * Returns a list of available smart tags and their descriptions. * @@ -687,6 +736,13 @@ function __unstable_get_tags_and_descriptions() { // phpcs:ignore PHPCompatibili ), ); + if ( simpay_is_upe() ) { + $tags['subtotal-amount'] = esc_html__( + 'The cumulative cost of selected items.', + 'stripe' + ); + } + if ( class_exists( 'SimplePay\Pro\SimplePayPro' ) ) { $tags['payment-type'] = esc_html__( 'The type of payment (one-time or recurring).', @@ -707,6 +763,18 @@ function __unstable_get_tags_and_descriptions() { // phpcs:ignore PHPCompatibili 'The calculated tax amount based on the total and the tax percent setting.', 'stripe' ); + + $tags['fee-recovery-amount'] = esc_html__( + 'The calculated fee recovery amount based on the total and the fee recovery percent setting.', + 'stripe' + ); + + if ( simpay_is_upe() ) { + $tags['coupon-amount'] = esc_html__( + 'The amount of the coupon applied to the payment.', + 'stripe' + ); + } } return $tags; diff --git a/includes/core/payments/payment-confirmation.php b/includes/core/payments/payment-confirmation.php index 5d6f7a34..78ca8d65 100644 --- a/includes/core/payments/payment-confirmation.php +++ b/includes/core/payments/payment-confirmation.php @@ -216,6 +216,7 @@ function get_confirmation_data( $customer_id = false, $session_id = false, $form 'expand' => array( 'customer', 'customer.subscriptions', + 'customer.subscriptions.data.latest_invoice', ), ), $form->get_api_request_args(), @@ -232,6 +233,7 @@ function get_confirmation_data( $customer_id = false, $session_id = false, $form 'id' => $customer_id, 'expand' => array( 'subscriptions', + 'subscriptions.data.latest_invoice', ), ), $form->get_api_request_args(), @@ -300,9 +302,18 @@ function get_one_time_amount_message_default() { $message = ''; if ( true === $has_email ) { - $message = 'Thank you. Your payment of {total-amount} has been received. Please check your email for additional information.'; + $message = sprintf( + /* translators: %s: Total amount */ + esc_html__( 'Thank you. Your payment of %s has been received. Please check your email for additional information.', 'stripe' ), + '{total-amount}' + ); } else { - $message = 'Thank you. Your payment of {total-amount} has been received.'; + $message = sprintf( + /* translators: %s: Total amount */ + esc_html__( 'Thank you. Your payment of %s has been received.', 'stripe' ), + '{total-amount}' + ); + } return $message; diff --git a/includes/core/payments/paymentintent.php b/includes/core/payments/paymentintent.php index 032ff9d1..de0121f3 100644 --- a/includes/core/payments/paymentintent.php +++ b/includes/core/payments/paymentintent.php @@ -162,15 +162,7 @@ function get_args_from_payment_form_request( $paymentintent_args = array( 'amount' => $amount, 'currency' => $payment_args['currency'], - 'metadata' => array_merge( - $metadata, - Legacy\Hooks\simpay_payment_metadata( - $form, - $form_data, - $form_values, - $customer_id - ) - ), + 'metadata' => $metadata, ); // Use price option label if one is set. @@ -180,23 +172,10 @@ function get_args_from_payment_form_request( // Fall back to Payment Form title if set. // This is a change in behavior in 4.1, but matches the Stripe Checkout // usage that falls back to the Product title (Payment Form title). - } else { - if ( ! empty( $form->company_name ) ) { + } elseif ( ! empty( $form->company_name ) ) { $paymentintent_args['description'] = $form->company_name; - } - } - - if ( ! empty( $form->statement_descriptor ) ) { - $paymentintent_args['statement_descriptor'] = $form->statement_descriptor; } - // Legacy filter. - $paymentintent_args = Legacy\Hooks\simpay_stripe_charge_args( - $paymentintent_args, - $form, - $form_values - ); - /** * Filters arguments used to create a PaymentIntent from a payment form request. * @@ -344,7 +323,7 @@ function_exists( 'simpay_get_payment_form_tax_rates' ) && // Remove inclusive tax amount. $inclusive_tax_amount = array_reduce( $tax_rates, - function( $amount, $tax_rate ) use ( $unit_amount ) { + function ( $amount, $tax_rate ) use ( $unit_amount ) { if ( 'exclusive' === $tax_rate->calculation ) { return $amount; } @@ -358,7 +337,7 @@ function( $amount, $tax_rate ) use ( $unit_amount ) { $tax = array_reduce( $tax_rates, - function( $tax, $tax_rate ) use ( $post_inclusive_unit_amount ) { + function ( $tax, $tax_rate ) use ( $post_inclusive_unit_amount ) { if ( 'inclusive' === $tax_rate->calculation ) { return $tax; } diff --git a/includes/core/post-types/simple-pay/edit-form-custom-fields/custom-fields-dropdown-html.php b/includes/core/post-types/simple-pay/edit-form-custom-fields/custom-fields-dropdown-html.php index 8f0fb56c..0e15dbf5 100644 --- a/includes/core/post-types/simple-pay/edit-form-custom-fields/custom-fields-dropdown-html.php +++ b/includes/core/post-types/simple-pay/edit-form-custom-fields/custom-fields-dropdown-html.php @@ -66,7 +66,7 @@ 'attributes' => array( 'data-field-key' => $counter, ), - 'description' => esc_html( 'Options to choose from separated by a comma.', 'simple-pay' ), + 'description' => esc_html__( 'Options to choose from separated by a comma.', 'stripe' ), ) ); ?> diff --git a/includes/core/post-types/simple-pay/edit-form.php b/includes/core/post-types/simple-pay/edit-form.php index bba7ca0d..9790341c 100644 --- a/includes/core/post-types/simple-pay/edit-form.php +++ b/includes/core/post-types/simple-pay/edit-form.php @@ -506,10 +506,8 @@ function settings_tabs( $post ) { $tabs['confirmation'] = array( 'label' => wp_kses( - __( 'Confirmation Page New!', 'stripe' ), - array( - 'span' => array(), - ) + __( 'Confirmation Page', 'stripe' ), + array() ), 'target' => 'confirmation-settings-panel', 'icon' => '', diff --git a/includes/core/recaptcha/settings.php b/includes/core/recaptcha/settings.php index af223500..9bdb9d7b 100644 --- a/includes/core/recaptcha/settings.php +++ b/includes/core/recaptcha/settings.php @@ -357,7 +357,7 @@ function choose_captcha_type() { /* translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. */ __( 'Learn more about CAPTCHA and how to choose the best option for your website in our %1$sdocumentation%2$s', 'stripe' ), sprintf( - '
', + '', simpay_docs_link( '', 'recaptcha', diff --git a/includes/core/rest-api/v2/class-checkout-session-controller.php b/includes/core/rest-api/v2/class-checkout-session-controller.php index aba078bc..c9643f9b 100644 --- a/includes/core/rest-api/v2/class-checkout-session-controller.php +++ b/includes/core/rest-api/v2/class-checkout-session-controller.php @@ -124,9 +124,6 @@ public function create_item( $request ) { ); } - // Handle legacy form processing. - Legacy\Hooks\simpay_process_form( $form, $form_data, $form_values, $customer_id ); - $session_args = $this->get_args_from_payment_form_request( $form, $form_data, @@ -372,10 +369,8 @@ function get_args_from_payment_form_request( // Fall back to Payment Form title if set. // This is a change in behavior in 4.1, but matches the Stripe Checkout // usage that falls back to the Product title (Payment Form title). - } else { - if ( ! empty( $form->company_name ) ) { + } elseif ( ! empty( $form->company_name ) ) { $item['description'] = $form->company_name; - } } $session_args['line_items'] = array( $item ); diff --git a/includes/core/rest-api/v2/class-customer-controller.php b/includes/core/rest-api/v2/class-customer-controller.php index 254fe0d7..3b87d1fb 100644 --- a/includes/core/rest-api/v2/class-customer-controller.php +++ b/includes/core/rest-api/v2/class-customer-controller.php @@ -128,9 +128,6 @@ public function create_item( $request ) { ); } - // Handle legacy hook. - Legacy\Hooks\simpay_pre_process_form( $form, $form_data, $form_values ); - $customer_args = Payments\Customer\get_args_from_payment_form_request( $form, $form_data, diff --git a/includes/core/rest-api/v2/class-paymentintent-controller.php b/includes/core/rest-api/v2/class-paymentintent-controller.php index 523e82d8..436ca4c0 100644 --- a/includes/core/rest-api/v2/class-paymentintent-controller.php +++ b/includes/core/rest-api/v2/class-paymentintent-controller.php @@ -144,9 +144,6 @@ public function create_item( $request ) { ); } - // Handle legacy form processing. - Legacy\Hooks\simpay_process_form( $form, $form_data, $form_values, $customer_id ); - // Generate arguments based on form data. $paymentintent_args = array_merge( Payments\PaymentIntent\get_args_from_payment_form_request( @@ -230,5 +227,4 @@ public function create_item( $request ) { ); } } - } diff --git a/includes/core/settings/register-general.php b/includes/core/settings/register-general.php index ce583d52..491eba0d 100644 --- a/includes/core/settings/register-general.php +++ b/includes/core/settings/register-general.php @@ -104,6 +104,8 @@ function register_currency_settings( $settings ) { ); } + asort( $currency_list ); // Sort by currency label. + $license = simpay_get_license(); $settings->add( diff --git a/includes/core/settings/register-stripe.php b/includes/core/settings/register-stripe.php index 1250602c..074c1290 100644 --- a/includes/core/settings/register-stripe.php +++ b/includes/core/settings/register-stripe.php @@ -111,7 +111,7 @@ function register_account_settings( $settings ) { 'setting label', 'stripe' ), - 'output' => function() { + 'output' => function () { $html = ''; $mode = simpay_is_test_mode() @@ -205,7 +205,7 @@ function register_account_settings( $settings ) { ) ); - $priority++; + ++$priority; } // Test Mode. @@ -274,7 +274,8 @@ function register_account_settings( $settings ) { if ( empty( simpay_get_secret_key() ) && false === simpay_can_site_manage_stripe_keys() ) { return; } - + $countries = i18n\get_stripe_countries(); + asort( $countries ); // Country. $settings->add( new Settings\Setting_Select( @@ -283,7 +284,7 @@ function register_account_settings( $settings ) { 'section' => 'stripe', 'subsection' => 'account', 'label' => esc_html_x( 'Country', 'setting label', 'stripe' ), - 'options' => i18n\get_stripe_countries(), + 'options' => $countries, 'value' => simpay_get_setting( 'account_country', 'US' ), 'description' => wpautop( esc_html__( @@ -309,6 +310,13 @@ function register_account_settings( $settings ) { */ function register_locale_settings( $settings ) { // Stripe Checkout locale. + $locals = i18n\get_stripe_checkout_locales(); + // Keep auto detect at the top. + $auto_detect = $locals['auto']; + unset( $locals['auto'] ); + asort( $locals ); + $locals = array_merge( array( 'auto' => $auto_detect ), $locals ); + $settings->add( new Settings\Setting_Select( array( @@ -316,7 +324,7 @@ function register_locale_settings( $settings ) { 'section' => 'stripe', 'subsection' => 'locale', 'label' => esc_html_x( 'Stripe Checkout', 'setting label', 'stripe' ), - 'options' => i18n\get_stripe_checkout_locales(), + 'options' => $locals, 'value' => simpay_get_setting( 'stripe_checkout_locale', '' ), 'description' => wpautop( esc_html__( @@ -324,7 +332,7 @@ function register_locale_settings( $settings ) { 'stripe' ) ), - 'schema' => array( + 'schema' => array( 'type' => 'string', ), ) diff --git a/includes/core/utils/migrations/routines/class-prices-api.php b/includes/core/utils/migrations/routines/class-prices-api.php index 69466b4b..b6bb999b 100644 --- a/includes/core/utils/migrations/routines/class-prices-api.php +++ b/includes/core/utils/migrations/routines/class-prices-api.php @@ -122,7 +122,7 @@ public function create_product( $form ) { // https://github.com/wpsimplepay/wp-simple-pay-pro/issues/1598. if ( empty( $name ) ) { $name = sprintf( - /* translators: %d Payment Form ID. */ + /* translators: %d: Payment Form ID. */ __( 'WP Simple Pay - Form %d', 'stripe' ), $form->id ); diff --git a/languages/stripe.pot b/languages/stripe.pot index 02510320..9e747f30 100644 --- a/languages/stripe.pot +++ b/languages/stripe.pot @@ -2,14 +2,14 @@ # This file is distributed under the same license as the WP Simple Pay Lite plugin. msgid "" msgstr "" -"Project-Id-Version: WP Simple Pay Lite 4.7.11\n" +"Project-Id-Version: WP Simple Pay Lite 4.8.0\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-simple-pay-lite\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-01-25T15:48:15+00:00\n" +"POT-Creation-Date: 2024-04-01T19:04:40+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.8.1\n" "X-Domain: stripe\n" @@ -32,6 +32,7 @@ msgstr "" #: src/AdminBar/AdminBarSubscriber.php:108 #: src/Integration/Divi/ExtensionSubscriber.php:333 #: src/Integration/Elementor/PaymentFormControl.php:35 +#: includes/core/assets/js/dist/simpay-block-button.js:1 msgid "WP Simple Pay" msgstr "" @@ -44,90 +45,87 @@ msgstr "" msgid "Pay %s" msgstr "" -#: includes/core/admin/class-assets.php:185 +#: includes/core/admin/class-assets.php:186 #: includes/core/functions/shared.php:590 msgid "Insert Media" msgstr "" -#: includes/core/admin/class-assets.php:189 +#: includes/core/admin/class-assets.php:190 #: includes/core/functions/shared.php:591 msgid "Use Image" msgstr "" -#: includes/core/admin/class-assets.php:193 +#: includes/core/admin/class-assets.php:194 msgid "The changes you made will be lost if you navigate away from this page." msgstr "" -#: includes/core/admin/class-assets.php:197 +#: includes/core/admin/class-assets.php:198 msgid "Disconnect" msgstr "" -#: includes/core/admin/class-assets.php:201 +#: includes/core/admin/class-assets.php:202 #: includes/core/functions/admin.php:108 #: includes/core/functions/admin.php:117 msgid "Cancel" msgstr "" -#: includes/core/admin/class-assets.php:205 -#: includes/core/admin/class-assets.php:241 +#: includes/core/admin/class-assets.php:206 +#: includes/core/admin/class-assets.php:242 #: src/AdminPage/AboutUsPage.php:459 #: views/admin-setting-license.php:79 msgid "Activate" msgstr "" -#: includes/core/admin/class-assets.php:209 +#: includes/core/admin/class-assets.php:210 #: src/AdminPage/AboutUsPage.php:450 msgid "Activated" msgstr "" -#: includes/core/admin/class-assets.php:213 +#: includes/core/admin/class-assets.php:214 #: src/AdminPage/AboutUsPage.php:446 msgid "Active" msgstr "" -#: includes/core/admin/class-assets.php:217 +#: includes/core/admin/class-assets.php:218 #: views/admin-setting-license.php:87 msgid "Deactivate" msgstr "" -#: includes/core/admin/class-assets.php:221 +#: includes/core/admin/class-assets.php:222 #: src/AdminPage/AboutUsPage.php:455 msgid "Inactive" msgstr "" -#: includes/core/admin/class-assets.php:225 +#: includes/core/admin/class-assets.php:226 msgid "Install Addon" msgstr "" -#: includes/core/admin/class-assets.php:229 +#: includes/core/admin/class-assets.php:230 #: src/Admin/Addon/AddonInstaller.php:180 msgid "Could not install the addon. Please download it from wpforms.com and install it manually." msgstr "" -#: includes/core/admin/class-assets.php:233 +#: includes/core/admin/class-assets.php:234 msgid "Could not install the plugin automatically. Please download and install it manually." msgstr "" -#: includes/core/admin/class-assets.php:237 +#: includes/core/admin/class-assets.php:238 msgid "Install and Activate" msgstr "" -#: includes/core/admin/class-assets.php:245 +#: includes/core/admin/class-assets.php:246 msgid "Warning: Removing a payment form will prevent active subscriptions from sending upcoming invoice and invoice receipt emails. It is recommended to leave payment forms that have accepted Live Mode payments published." msgstr "" -#. translators: Minimum payment amount. -#. translators: %s Minimum price. -#: includes/core/admin/class-assets.php:250 +#. translators: %s: Minimum payment amount. +#: includes/core/admin/class-assets.php:251 #: includes/core/forms/class-price-option.php:560 #: includes/core/functions/shared.php:546 msgid "starting at %s" msgstr "" #. translators: %1$s Recurring amount. %2$s Recurring interval count. %3$s Recurring interval. -#. translators: %1$s Price option amount. %2$s Recurring interval count. %3$s Recurring interval. -#. translators: %1$s Price option amount. %2$s Price option currency code. %3$s Recurring interval count. %4$s Recurring interval. -#: includes/core/admin/class-assets.php:253 +#: includes/core/admin/class-assets.php:254 #: includes/core/forms/class-price-option.php:512 #: includes/core/forms/class-price-option.php:649 #: includes/core/functions/shared.php:549 @@ -161,6 +159,7 @@ msgstr "" #: includes/core/admin/class-menus.php:148 #: includes/core/post-types/simple-pay/menu.php:67 #: views/admin-education-upgrade-modal.php:25 +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:3 msgid "Upgrade to Pro" msgstr "" @@ -168,6 +167,7 @@ msgstr "" #: includes/core/post-types/simple-pay/menu.php:25 #: includes/core/settings/display.php:166 #: src/AdminBar/AdminBarSubscriber.php:161 +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:6 msgid "Settings" msgstr "" @@ -339,12 +339,13 @@ msgstr "" msgid "Attention: The payment form does not have prices configured. %1$sAdd price options%2$s to collect payments." msgstr "" -#: includes/core/class-shortcodes.php:182 -#: includes/core/class-shortcodes.php:208 +#. translators: Form title +#: includes/core/class-shortcodes.php:183 +#: includes/core/class-shortcodes.php:210 msgid "Sorry, \"%s\" is not available for purchase." msgstr "" -#: includes/core/class-shortcodes.php:340 +#: includes/core/class-shortcodes.php:342 msgid "Your payment is still processing. This page will reload in 5 seconds…" msgstr "" @@ -442,7 +443,7 @@ msgid "Used by 2+ million websites." msgstr "" #: includes/core/class-smtp.php:452 -msgid "Free mailers: SMTP.com, Sendinblue, Google Workspace/ Gmail, Mailgun, Postmark, SendGrid." +msgid "Free mailers: SMTP.com, Brevo, Google Workspace/ Gmail, Mailgun, Postmark, SendGrid." msgstr "" #: includes/core/class-smtp.php:453 @@ -554,14 +555,72 @@ msgctxt "recurring interval" msgid "%1$s/%2$s" msgstr "" -#. translators: %d payment form ID. #. translators: %d: Payment Form ID. #: includes/core/forms/class-price-options.php:620 -#: includes/core/post-types/simple-pay/actions.php:284 -#: includes/core/utils/migrations/routines/class-prices-api.php:125 +#: includes/core/post-types/simple-pay/actions.php:283 +#: includes/core/utils/migrations/routines/class-prices-api.php:126 msgid "WP Simple Pay - Form %d" msgstr "" +#: includes/core/forms/functions.php:275 +#: includes/core/forms/functions.php:500 +#: includes/core/forms/functions.php:534 +msgid "Payment Button field is required, and has been added to the payment form." +msgstr "" + +#: includes/core/forms/functions.php:285 +msgid "The coupon field has been removed since you selected Off-site Stripe Checkout. " +msgstr "" + +#: includes/core/forms/functions.php:332 +msgid "Customer Name field is required for one or more payment methods, and has been added to the payment form." +msgstr "" + +#: includes/core/forms/functions.php:348 +msgid "Customer Email field is required, and has been added to the payment form." +msgstr "" + +#: includes/core/forms/functions.php:404 +msgid "Address field is required, and has been added to the payment form." +msgstr "" + +#: includes/core/forms/functions.php:468 +msgid "Payment Methods is required, and has been added to the payment form." +msgstr "" + +#: includes/core/forms/functions.php:484 +msgid "Checkout Button field is required, and has been added to the payment form." +msgstr "" + +#: includes/core/forms/functions.php:509 +msgid "Payment Button has been removed from the payment form." +msgstr "" + +#: includes/core/forms/functions.php:557 +msgid "Price Selector is required, and has been added to the payment form. " +msgstr "" + +#: includes/core/forms/functions.php:571 +msgid "The Custom Amount Input field is required because you have set a custom amount on your price list, and has been added to the payment form." +msgstr "" + +#: includes/core/forms/functions.php:580 +msgid "Custom Amount Input has been removed from the payment form. A price option with that allows user-defined amounts is required. " +msgstr "" + +#: includes/core/forms/functions.php:594 +msgid "Recurring Amount Toggle is required, and has been added to the payment form." +msgstr "" + +#: includes/core/forms/functions.php:603 +msgid "Recurring Amount Toggle has been removed from the payment form. An optionally recurring price option is required." +msgstr "" + +#: includes/core/forms/functions.php:615 +#: includes/core/forms/functions.php:632 +msgid "Coupon field has been removed from the payment form." +msgstr "" + #: includes/core/functions/admin.php:56 #: includes/core/functions/admin.php:57 #: includes/core/functions/admin.php:116 @@ -804,616 +863,616 @@ msgid "Belgium" msgstr "" #: includes/core/i18n/countries.php:49 -msgid "Belau" -msgstr "" - -#: includes/core/i18n/countries.php:50 msgid "Belize" msgstr "" -#: includes/core/i18n/countries.php:51 +#: includes/core/i18n/countries.php:50 msgid "Benin" msgstr "" -#: includes/core/i18n/countries.php:52 +#: includes/core/i18n/countries.php:51 msgid "Bermuda" msgstr "" -#: includes/core/i18n/countries.php:53 +#: includes/core/i18n/countries.php:52 msgid "Bhutan" msgstr "" -#: includes/core/i18n/countries.php:54 +#: includes/core/i18n/countries.php:53 msgid "Bolivia" msgstr "" -#: includes/core/i18n/countries.php:55 +#: includes/core/i18n/countries.php:54 msgid "Bonaire, Saint Eustatius and Saba" msgstr "" -#: includes/core/i18n/countries.php:56 +#: includes/core/i18n/countries.php:55 msgid "Bosnia and Herzegovina" msgstr "" -#: includes/core/i18n/countries.php:57 +#: includes/core/i18n/countries.php:56 msgid "Botswana" msgstr "" -#: includes/core/i18n/countries.php:58 +#: includes/core/i18n/countries.php:57 msgid "Bouvet Island" msgstr "" -#: includes/core/i18n/countries.php:59 +#: includes/core/i18n/countries.php:58 #: includes/core/i18n/stripe.php:30 msgid "Brazil" msgstr "" -#: includes/core/i18n/countries.php:60 +#: includes/core/i18n/countries.php:59 msgid "British Indian Ocean Territory" msgstr "" -#: includes/core/i18n/countries.php:61 +#: includes/core/i18n/countries.php:60 msgid "Brunei" msgstr "" -#: includes/core/i18n/countries.php:62 +#: includes/core/i18n/countries.php:61 #: includes/core/i18n/stripe.php:31 msgid "Bulgaria" msgstr "" -#: includes/core/i18n/countries.php:63 +#: includes/core/i18n/countries.php:62 msgid "Burkina Faso" msgstr "" -#: includes/core/i18n/countries.php:64 +#: includes/core/i18n/countries.php:63 msgid "Burundi" msgstr "" -#: includes/core/i18n/countries.php:65 +#: includes/core/i18n/countries.php:64 msgid "Cambodia" msgstr "" -#: includes/core/i18n/countries.php:66 +#: includes/core/i18n/countries.php:65 msgid "Cameroon" msgstr "" -#: includes/core/i18n/countries.php:67 +#: includes/core/i18n/countries.php:66 #: includes/core/i18n/stripe.php:32 msgid "Canada" msgstr "" -#: includes/core/i18n/countries.php:68 +#: includes/core/i18n/countries.php:67 msgid "Cape Verde" msgstr "" -#: includes/core/i18n/countries.php:69 +#: includes/core/i18n/countries.php:68 msgid "Cayman Islands" msgstr "" -#: includes/core/i18n/countries.php:70 +#: includes/core/i18n/countries.php:69 msgid "Central African Republic" msgstr "" -#: includes/core/i18n/countries.php:71 +#: includes/core/i18n/countries.php:70 msgid "Chad" msgstr "" -#: includes/core/i18n/countries.php:72 +#: includes/core/i18n/countries.php:71 msgid "Chile" msgstr "" -#: includes/core/i18n/countries.php:73 +#: includes/core/i18n/countries.php:72 msgid "China" msgstr "" -#: includes/core/i18n/countries.php:74 +#: includes/core/i18n/countries.php:73 msgid "Christmas Island" msgstr "" -#: includes/core/i18n/countries.php:75 +#: includes/core/i18n/countries.php:74 msgid "Cocos (Keeling) Islands" msgstr "" -#: includes/core/i18n/countries.php:76 +#: includes/core/i18n/countries.php:75 msgid "Colombia" msgstr "" -#: includes/core/i18n/countries.php:77 +#: includes/core/i18n/countries.php:76 msgid "Comoros" msgstr "" -#: includes/core/i18n/countries.php:78 +#: includes/core/i18n/countries.php:77 msgid "Congo (Brazzaville)" msgstr "" -#: includes/core/i18n/countries.php:79 +#: includes/core/i18n/countries.php:78 msgid "Congo (Kinshasa)" msgstr "" -#: includes/core/i18n/countries.php:80 +#: includes/core/i18n/countries.php:79 msgid "Cook Islands" msgstr "" -#: includes/core/i18n/countries.php:81 +#: includes/core/i18n/countries.php:80 msgid "Costa Rica" msgstr "" -#: includes/core/i18n/countries.php:82 +#: includes/core/i18n/countries.php:81 #: includes/core/i18n/stripe.php:33 msgid "Croatia" msgstr "" -#: includes/core/i18n/countries.php:83 +#: includes/core/i18n/countries.php:82 msgid "Cuba" msgstr "" -#: includes/core/i18n/countries.php:84 +#: includes/core/i18n/countries.php:83 msgid "Curaçao" msgstr "" -#: includes/core/i18n/countries.php:85 +#: includes/core/i18n/countries.php:84 #: includes/core/i18n/stripe.php:34 msgid "Cyprus" msgstr "" -#: includes/core/i18n/countries.php:86 +#: includes/core/i18n/countries.php:85 #: includes/core/i18n/stripe.php:35 msgid "Czech Republic" msgstr "" -#: includes/core/i18n/countries.php:87 +#: includes/core/i18n/countries.php:86 #: includes/core/i18n/stripe.php:36 msgid "Denmark" msgstr "" -#: includes/core/i18n/countries.php:88 +#: includes/core/i18n/countries.php:87 msgid "Djibouti" msgstr "" -#: includes/core/i18n/countries.php:89 +#: includes/core/i18n/countries.php:88 msgid "Dominica" msgstr "" -#: includes/core/i18n/countries.php:90 +#: includes/core/i18n/countries.php:89 msgid "Dominican Republic" msgstr "" -#: includes/core/i18n/countries.php:91 +#: includes/core/i18n/countries.php:90 msgid "Ecuador" msgstr "" -#: includes/core/i18n/countries.php:92 +#: includes/core/i18n/countries.php:91 msgid "Egypt" msgstr "" -#: includes/core/i18n/countries.php:93 +#: includes/core/i18n/countries.php:92 msgid "El Salvador" msgstr "" -#: includes/core/i18n/countries.php:94 +#: includes/core/i18n/countries.php:93 msgid "Equatorial Guinea" msgstr "" -#: includes/core/i18n/countries.php:95 +#: includes/core/i18n/countries.php:94 msgid "Eritrea" msgstr "" -#: includes/core/i18n/countries.php:96 +#: includes/core/i18n/countries.php:95 #: includes/core/i18n/stripe.php:37 msgid "Estonia" msgstr "" -#: includes/core/i18n/countries.php:97 +#: includes/core/i18n/countries.php:96 msgid "Ethiopia" msgstr "" -#: includes/core/i18n/countries.php:98 +#: includes/core/i18n/countries.php:97 msgid "Falkland Islands" msgstr "" -#: includes/core/i18n/countries.php:99 +#: includes/core/i18n/countries.php:98 msgid "Faroe Islands" msgstr "" -#: includes/core/i18n/countries.php:100 +#: includes/core/i18n/countries.php:99 msgid "Fiji" msgstr "" -#: includes/core/i18n/countries.php:101 +#: includes/core/i18n/countries.php:100 #: includes/core/i18n/stripe.php:38 msgid "Finland" msgstr "" -#: includes/core/i18n/countries.php:102 +#: includes/core/i18n/countries.php:101 #: includes/core/i18n/stripe.php:39 msgid "France" msgstr "" -#: includes/core/i18n/countries.php:103 +#: includes/core/i18n/countries.php:102 msgid "French Guiana" msgstr "" -#: includes/core/i18n/countries.php:104 +#: includes/core/i18n/countries.php:103 msgid "French Polynesia" msgstr "" -#: includes/core/i18n/countries.php:105 +#: includes/core/i18n/countries.php:104 msgid "French Southern Territories" msgstr "" -#: includes/core/i18n/countries.php:106 +#: includes/core/i18n/countries.php:105 msgid "Gabon" msgstr "" -#: includes/core/i18n/countries.php:107 +#: includes/core/i18n/countries.php:106 msgid "Gambia" msgstr "" -#: includes/core/i18n/countries.php:108 +#: includes/core/i18n/countries.php:107 msgid "Georgia" msgstr "" -#: includes/core/i18n/countries.php:109 +#: includes/core/i18n/countries.php:108 #: includes/core/i18n/stripe.php:40 msgid "Germany" msgstr "" -#: includes/core/i18n/countries.php:110 +#: includes/core/i18n/countries.php:109 msgid "Ghana" msgstr "" -#: includes/core/i18n/countries.php:111 +#: includes/core/i18n/countries.php:110 #: includes/core/i18n/stripe.php:41 msgid "Gibraltar" msgstr "" -#: includes/core/i18n/countries.php:112 +#: includes/core/i18n/countries.php:111 #: includes/core/i18n/stripe.php:42 msgid "Greece" msgstr "" -#: includes/core/i18n/countries.php:113 +#: includes/core/i18n/countries.php:112 msgid "Greenland" msgstr "" -#: includes/core/i18n/countries.php:114 +#: includes/core/i18n/countries.php:113 msgid "Grenada" msgstr "" -#: includes/core/i18n/countries.php:115 +#: includes/core/i18n/countries.php:114 msgid "Guadeloupe" msgstr "" -#: includes/core/i18n/countries.php:116 +#: includes/core/i18n/countries.php:115 msgid "Guam" msgstr "" -#: includes/core/i18n/countries.php:117 +#: includes/core/i18n/countries.php:116 #: includes/core/i18n/states.php:655 msgid "Guatemala" msgstr "" -#: includes/core/i18n/countries.php:118 +#: includes/core/i18n/countries.php:117 msgid "Guernsey" msgstr "" -#: includes/core/i18n/countries.php:119 +#: includes/core/i18n/countries.php:118 msgid "Guinea" msgstr "" -#: includes/core/i18n/countries.php:120 +#: includes/core/i18n/countries.php:119 msgid "Guinea-Bissau" msgstr "" -#: includes/core/i18n/countries.php:121 +#: includes/core/i18n/countries.php:120 msgid "Guyana" msgstr "" -#: includes/core/i18n/countries.php:122 +#: includes/core/i18n/countries.php:121 msgid "Haiti" msgstr "" -#: includes/core/i18n/countries.php:123 +#: includes/core/i18n/countries.php:122 msgid "Heard Island and McDonald Islands" msgstr "" -#: includes/core/i18n/countries.php:124 +#: includes/core/i18n/countries.php:123 msgid "Honduras" msgstr "" -#: includes/core/i18n/countries.php:125 +#: includes/core/i18n/countries.php:124 #: includes/core/i18n/stripe.php:43 msgid "Hong Kong" msgstr "" -#: includes/core/i18n/countries.php:126 +#: includes/core/i18n/countries.php:125 #: includes/core/i18n/stripe.php:44 msgid "Hungary" msgstr "" -#: includes/core/i18n/countries.php:127 +#: includes/core/i18n/countries.php:126 msgid "Iceland" msgstr "" -#: includes/core/i18n/countries.php:128 +#: includes/core/i18n/countries.php:127 #: includes/core/i18n/stripe.php:45 msgid "India" msgstr "" -#: includes/core/i18n/countries.php:129 +#: includes/core/i18n/countries.php:128 msgid "Indonesia" msgstr "" -#: includes/core/i18n/countries.php:130 +#: includes/core/i18n/countries.php:129 msgid "Iran" msgstr "" -#: includes/core/i18n/countries.php:131 +#: includes/core/i18n/countries.php:130 msgid "Iraq" msgstr "" -#: includes/core/i18n/countries.php:132 +#: includes/core/i18n/countries.php:131 #: includes/core/i18n/stripe.php:46 msgid "Ireland" msgstr "" -#: includes/core/i18n/countries.php:133 +#: includes/core/i18n/countries.php:132 msgid "Isle of Man" msgstr "" -#: includes/core/i18n/countries.php:134 +#: includes/core/i18n/countries.php:133 msgid "Israel" msgstr "" -#: includes/core/i18n/countries.php:135 +#: includes/core/i18n/countries.php:134 #: includes/core/i18n/stripe.php:47 msgid "Italy" msgstr "" -#: includes/core/i18n/countries.php:136 +#: includes/core/i18n/countries.php:135 msgid "Ivory Coast" msgstr "" -#: includes/core/i18n/countries.php:137 +#: includes/core/i18n/countries.php:136 msgid "Jamaica" msgstr "" -#: includes/core/i18n/countries.php:138 +#: includes/core/i18n/countries.php:137 #: includes/core/i18n/stripe.php:48 msgid "Japan" msgstr "" -#: includes/core/i18n/countries.php:139 +#: includes/core/i18n/countries.php:138 msgid "Jersey" msgstr "" -#: includes/core/i18n/countries.php:140 +#: includes/core/i18n/countries.php:139 msgid "Jordan" msgstr "" -#: includes/core/i18n/countries.php:141 +#: includes/core/i18n/countries.php:140 msgid "Kazakhstan" msgstr "" -#: includes/core/i18n/countries.php:142 +#: includes/core/i18n/countries.php:141 msgid "Kenya" msgstr "" -#: includes/core/i18n/countries.php:143 +#: includes/core/i18n/countries.php:142 msgid "Kiribati" msgstr "" -#: includes/core/i18n/countries.php:144 +#: includes/core/i18n/countries.php:143 msgid "Kuwait" msgstr "" -#: includes/core/i18n/countries.php:145 +#: includes/core/i18n/countries.php:144 msgid "Kyrgyzstan" msgstr "" -#: includes/core/i18n/countries.php:146 +#: includes/core/i18n/countries.php:145 msgid "Laos" msgstr "" -#: includes/core/i18n/countries.php:147 +#: includes/core/i18n/countries.php:146 #: includes/core/i18n/stripe.php:49 msgid "Latvia" msgstr "" -#: includes/core/i18n/countries.php:148 +#: includes/core/i18n/countries.php:147 msgid "Lebanon" msgstr "" -#: includes/core/i18n/countries.php:149 +#: includes/core/i18n/countries.php:148 msgid "Lesotho" msgstr "" -#: includes/core/i18n/countries.php:150 +#: includes/core/i18n/countries.php:149 msgid "Liberia" msgstr "" -#: includes/core/i18n/countries.php:151 +#: includes/core/i18n/countries.php:150 msgid "Libya" msgstr "" -#: includes/core/i18n/countries.php:152 +#: includes/core/i18n/countries.php:151 #: includes/core/i18n/stripe.php:50 msgid "Liechtenstein" msgstr "" -#: includes/core/i18n/countries.php:153 +#: includes/core/i18n/countries.php:152 #: includes/core/i18n/stripe.php:51 msgid "Lithuania" msgstr "" -#: includes/core/i18n/countries.php:154 +#: includes/core/i18n/countries.php:153 #: includes/core/i18n/stripe.php:52 msgid "Luxembourg" msgstr "" -#: includes/core/i18n/countries.php:155 +#: includes/core/i18n/countries.php:154 msgid "Macao" msgstr "" -#: includes/core/i18n/countries.php:156 +#: includes/core/i18n/countries.php:155 msgid "North Macedonia" msgstr "" -#: includes/core/i18n/countries.php:157 +#: includes/core/i18n/countries.php:156 msgid "Madagascar" msgstr "" -#: includes/core/i18n/countries.php:158 +#: includes/core/i18n/countries.php:157 msgid "Malawi" msgstr "" -#: includes/core/i18n/countries.php:159 +#: includes/core/i18n/countries.php:158 #: includes/core/i18n/stripe.php:53 msgid "Malaysia" msgstr "" -#: includes/core/i18n/countries.php:160 +#: includes/core/i18n/countries.php:159 msgid "Maldives" msgstr "" -#: includes/core/i18n/countries.php:161 +#: includes/core/i18n/countries.php:160 msgid "Mali" msgstr "" -#: includes/core/i18n/countries.php:162 +#: includes/core/i18n/countries.php:161 #: includes/core/i18n/stripe.php:54 msgid "Malta" msgstr "" -#: includes/core/i18n/countries.php:163 +#: includes/core/i18n/countries.php:162 msgid "Marshall Islands" msgstr "" -#: includes/core/i18n/countries.php:164 +#: includes/core/i18n/countries.php:163 msgid "Martinique" msgstr "" -#: includes/core/i18n/countries.php:165 +#: includes/core/i18n/countries.php:164 msgid "Mauritania" msgstr "" -#: includes/core/i18n/countries.php:166 +#: includes/core/i18n/countries.php:165 msgid "Mauritius" msgstr "" -#: includes/core/i18n/countries.php:167 +#: includes/core/i18n/countries.php:166 msgid "Mayotte" msgstr "" -#: includes/core/i18n/countries.php:168 +#: includes/core/i18n/countries.php:167 #: includes/core/i18n/stripe.php:55 msgid "Mexico" msgstr "" -#: includes/core/i18n/countries.php:169 +#: includes/core/i18n/countries.php:168 msgid "Micronesia" msgstr "" -#: includes/core/i18n/countries.php:170 +#: includes/core/i18n/countries.php:169 msgid "Moldova" msgstr "" -#: includes/core/i18n/countries.php:171 +#: includes/core/i18n/countries.php:170 msgid "Monaco" msgstr "" -#: includes/core/i18n/countries.php:172 +#: includes/core/i18n/countries.php:171 msgid "Mongolia" msgstr "" -#: includes/core/i18n/countries.php:173 +#: includes/core/i18n/countries.php:172 msgid "Montenegro" msgstr "" -#: includes/core/i18n/countries.php:174 +#: includes/core/i18n/countries.php:173 msgid "Montserrat" msgstr "" -#: includes/core/i18n/countries.php:175 +#: includes/core/i18n/countries.php:174 msgid "Morocco" msgstr "" -#: includes/core/i18n/countries.php:176 +#: includes/core/i18n/countries.php:175 msgid "Mozambique" msgstr "" -#: includes/core/i18n/countries.php:177 +#: includes/core/i18n/countries.php:176 msgid "Myanmar" msgstr "" -#: includes/core/i18n/countries.php:178 +#: includes/core/i18n/countries.php:177 msgid "Namibia" msgstr "" -#: includes/core/i18n/countries.php:179 +#: includes/core/i18n/countries.php:178 msgid "Nauru" msgstr "" -#: includes/core/i18n/countries.php:180 +#: includes/core/i18n/countries.php:179 msgid "Nepal" msgstr "" -#: includes/core/i18n/countries.php:181 +#: includes/core/i18n/countries.php:180 #: includes/core/i18n/stripe.php:56 msgid "Netherlands" msgstr "" -#: includes/core/i18n/countries.php:182 +#: includes/core/i18n/countries.php:181 msgid "New Caledonia" msgstr "" -#: includes/core/i18n/countries.php:183 +#: includes/core/i18n/countries.php:182 #: includes/core/i18n/stripe.php:57 msgid "New Zealand" msgstr "" -#: includes/core/i18n/countries.php:184 +#: includes/core/i18n/countries.php:183 msgid "Nicaragua" msgstr "" -#: includes/core/i18n/countries.php:185 +#: includes/core/i18n/countries.php:184 #: includes/core/i18n/states.php:1278 msgid "Niger" msgstr "" -#: includes/core/i18n/countries.php:186 +#: includes/core/i18n/countries.php:185 msgid "Nigeria" msgstr "" -#: includes/core/i18n/countries.php:187 +#: includes/core/i18n/countries.php:186 msgid "Niue" msgstr "" -#: includes/core/i18n/countries.php:188 +#: includes/core/i18n/countries.php:187 msgid "Norfolk Island" msgstr "" -#: includes/core/i18n/countries.php:189 +#: includes/core/i18n/countries.php:188 msgid "Northern Mariana Islands" msgstr "" -#: includes/core/i18n/countries.php:190 +#: includes/core/i18n/countries.php:189 msgid "North Korea" msgstr "" -#: includes/core/i18n/countries.php:191 +#: includes/core/i18n/countries.php:190 #: includes/core/i18n/stripe.php:58 msgid "Norway" msgstr "" -#: includes/core/i18n/countries.php:192 +#: includes/core/i18n/countries.php:191 msgid "Oman" msgstr "" -#: includes/core/i18n/countries.php:193 +#: includes/core/i18n/countries.php:192 msgid "Pakistan" msgstr "" +#: includes/core/i18n/countries.php:193 +msgid "Palau" +msgstr "" + #: includes/core/i18n/countries.php:194 msgid "Palestinian Territory" msgstr "" @@ -10243,18 +10302,6 @@ msgstr "" msgid "Invalid email address, please correct and try again." msgstr "" -#: includes/core/legacy/functions.php:29 -msgid "Access form properties directly" -msgstr "" - -#: includes/core/legacy/functions.php:46 -msgid "Use simpay_get_setting() directly." -msgstr "" - -#: includes/core/legacy/functions.php:63 -msgid "Access amount through form properties." -msgstr "" - #. translators: %s Stripe API function. #: includes/core/payments/class-stripe-api.php:65 msgid "Calling %s directly is discouraged. Please use API wrappers or pass the Stripe API key via the ::request() static method." @@ -10274,68 +10321,90 @@ msgstr "" msgid "Please select a valid Tax ID type." msgstr "" -#: includes/core/payments/payment-confirmation-template-tags.php:641 +#: includes/core/payments/payment-confirmation-template-tags.php:647 #: includes/core/post-types/simple-pay/edit-form-payment-options.php:490 #: includes/core/post-types/simple-pay/edit-form-payment-options.php:498 msgid "Subscription" msgstr "" -#: includes/core/payments/payment-confirmation-template-tags.php:643 +#: includes/core/payments/payment-confirmation-template-tags.php:649 #: includes/core/post-types/simple-pay/edit-form-payment-options.php:481 #: includes/core/post-types/simple-pay/edit-form-payment-options.php:485 msgid "One time" msgstr "" -#: includes/core/payments/payment-confirmation-template-tags.php:664 +#: includes/core/payments/payment-confirmation-template-tags.php:713 msgid "The form's title." msgstr "" -#: includes/core/payments/payment-confirmation-template-tags.php:668 +#: includes/core/payments/payment-confirmation-template-tags.php:717 msgid "The form's description." msgstr "" -#: includes/core/payments/payment-confirmation-template-tags.php:672 +#: includes/core/payments/payment-confirmation-template-tags.php:721 msgid "The total price of the payment." msgstr "" -#: includes/core/payments/payment-confirmation-template-tags.php:676 +#: includes/core/payments/payment-confirmation-template-tags.php:725 msgid "The value of the Name form field." msgstr "" -#: includes/core/payments/payment-confirmation-template-tags.php:680 +#: includes/core/payments/payment-confirmation-template-tags.php:729 msgid "The charge date returned from Stripe." msgstr "" -#: includes/core/payments/payment-confirmation-template-tags.php:684 +#: includes/core/payments/payment-confirmation-template-tags.php:733 msgid "The unique charge ID returned from Stripe." msgstr "" -#: includes/core/payments/payment-confirmation-template-tags.php:691 +#: includes/core/payments/payment-confirmation-template-tags.php:740 +msgid "The cumulative cost of selected items." +msgstr "" + +#: includes/core/payments/payment-confirmation-template-tags.php:747 msgid "The type of payment (one-time or recurring)." msgstr "" -#: includes/core/payments/payment-confirmation-template-tags.php:696 +#: includes/core/payments/payment-confirmation-template-tags.php:752 msgid "The brand of the card used. Visa, Amex, etc." msgstr "" -#: includes/core/payments/payment-confirmation-template-tags.php:701 +#: includes/core/payments/payment-confirmation-template-tags.php:757 msgid "The last four digits of the card used." msgstr "" -#: includes/core/payments/payment-confirmation-template-tags.php:706 +#: includes/core/payments/payment-confirmation-template-tags.php:762 msgid "The calculated tax amount based on the total and the tax percent setting." msgstr "" -#: includes/core/payments/payment-confirmation-template-tags.php:733 +#: includes/core/payments/payment-confirmation-template-tags.php:767 +msgid "The calculated fee recovery amount based on the total and the fee recovery percent setting." +msgstr "" + +#: includes/core/payments/payment-confirmation-template-tags.php:773 +msgid "The amount of the coupon applied to the payment." +msgstr "" + +#: includes/core/payments/payment-confirmation-template-tags.php:801 msgid "Available smart tags:" msgstr "" -#: includes/core/payments/payment-confirmation.php:354 +#. translators: %s: Total amount +#: includes/core/payments/payment-confirmation.php:307 +msgid "Thank you. Your payment of %s has been received. Please check your email for additional information." +msgstr "" + +#. translators: %s: Total amount +#: includes/core/payments/payment-confirmation.php:313 +msgid "Thank you. Your payment of %s has been received." +msgstr "" + +#: includes/core/payments/payment-confirmation.php:370 msgid "Unable to locate payment record." msgstr "" #: includes/core/payments/paymentintent.php:121 -#: includes/core/rest-api/v2/class-checkout-session-controller.php:232 +#: includes/core/rest-api/v2/class-checkout-session-controller.php:229 msgid "Unable to locate payment form price." msgstr "" @@ -10344,7 +10413,7 @@ msgid "Sorry, this item is no longer in stock." msgstr "" #. translators: %s Payment form name. -#: includes/core/post-types/simple-pay/actions.php:848 +#: includes/core/post-types/simple-pay/actions.php:847 msgid "%s - Duplicate" msgstr "" @@ -10478,6 +10547,7 @@ msgstr "" #: includes/core/post-types/simple-pay/edit-form-custom-fields.php:130 #: includes/core/post-types/simple-pay/edit-form-payment-options.php:835 #: src/Help/HelpDocsContext.php:74 +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 msgid "Payment Methods" msgstr "" @@ -10562,6 +10632,10 @@ msgstr "" msgid "Options" msgstr "" +#: includes/core/post-types/simple-pay/edit-form-custom-fields/custom-fields-dropdown-html.php:69 +msgid "Options to choose from separated by a comma." +msgstr "" + #: includes/core/post-types/simple-pay/edit-form-custom-fields/custom-fields-dropdown-html.php:79 #: includes/core/post-types/simple-pay/edit-form-custom-fields/custom-fields-number-html.php:50 #: includes/core/post-types/simple-pay/edit-form-custom-fields/custom-fields-text-html.php:52 @@ -10980,7 +11054,7 @@ msgid "Learn more" msgstr "" #: includes/core/post-types/simple-pay/edit-form-stripe-checkout.php:288 -#: includes/core/settings/register-emails.php:443 +#: includes/core/settings/register-emails.php:444 msgid "Other" msgstr "" @@ -11019,6 +11093,7 @@ msgstr "" #: includes/core/post-types/simple-pay/edit-form.php:141 #: src/Integration/Elementor/PaymentFormControl.php:43 #: views/email-internal-summary-report.php:106 +#: includes/core/assets/js/dist/simpay-block-button.js:1 msgid "Payment Form" msgstr "" @@ -11052,74 +11127,74 @@ msgid "Payment Page" msgstr "" #: includes/core/post-types/simple-pay/edit-form.php:509 -msgid "Confirmation Page New!" +msgid "Confirmation Page" msgstr "" -#: includes/core/post-types/simple-pay/edit-form.php:520 +#: includes/core/post-types/simple-pay/edit-form.php:518 msgid "Email Notifications" msgstr "" -#: includes/core/post-types/simple-pay/edit-form.php:531 +#: includes/core/post-types/simple-pay/edit-form.php:529 msgid "Automations" msgstr "" -#: includes/core/post-types/simple-pay/edit-form.php:692 +#: includes/core/post-types/simple-pay/edit-form.php:690 msgid "Title" msgstr "" -#: includes/core/post-types/simple-pay/edit-form.php:723 +#: includes/core/post-types/simple-pay/edit-form.php:721 msgid "A payment form title is required." msgstr "" -#: includes/core/post-types/simple-pay/edit-form.php:735 +#: includes/core/post-types/simple-pay/edit-form.php:733 msgid "Description" msgstr "" -#: includes/core/post-types/simple-pay/edit-form.php:768 +#: includes/core/post-types/simple-pay/edit-form.php:766 msgid "Type" msgstr "" -#: includes/core/post-types/simple-pay/edit-form.php:781 +#: includes/core/post-types/simple-pay/edit-form.php:779 msgid "Unlock On-Site Payment Forms" msgstr "" #. translators: %s Payment form type. -#: includes/core/post-types/simple-pay/edit-form.php:787 +#: includes/core/post-types/simple-pay/edit-form.php:785 msgid "We're sorry, on-site payment forms are not available in WP Simple Pay Lite. Please upgrade to WP Simple Pay Pro to unlock this and other awesome features." msgstr "" -#: includes/core/post-types/simple-pay/edit-form.php:822 +#: includes/core/post-types/simple-pay/edit-form.php:820 msgid "On-site payment form" msgstr "" -#: includes/core/post-types/simple-pay/edit-form.php:833 +#: includes/core/post-types/simple-pay/edit-form.php:831 msgid "Off-site Stripe Checkout form" msgstr "" -#: includes/core/post-types/simple-pay/edit-form.php:853 +#: includes/core/post-types/simple-pay/edit-form.php:851 msgid "Open in an overlay modal" msgstr "" -#: includes/core/post-types/simple-pay/edit-form.php:906 +#: includes/core/post-types/simple-pay/edit-form.php:904 msgid "Spam & Fraud Protection" msgstr "" -#: includes/core/post-types/simple-pay/edit-form.php:924 +#: includes/core/post-types/simple-pay/edit-form.php:922 #: src/Admin/SiteHealth/SiteHealthDebugInformation.php:469 msgid "CAPTCHA" msgstr "" #. translators: %1$s opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. -#: includes/core/post-types/simple-pay/edit-form.php:932 +#: includes/core/post-types/simple-pay/edit-form.php:930 msgid "%1$sConfigure CAPTCHA settings%2$s to adjust anti-spam protection." msgstr "" -#: includes/core/post-types/simple-pay/edit-form.php:956 +#: includes/core/post-types/simple-pay/edit-form.php:954 #: src/AntiSpam/EmailVerification.php:326 msgid "Additional protection enabled!" msgstr "" -#: includes/core/post-types/simple-pay/edit-form.php:961 +#: includes/core/post-types/simple-pay/edit-form.php:959 #: src/AntiSpam/EmailVerification.php:331 msgid "Disabled — missing additional protection!" msgstr "" @@ -11234,6 +11309,7 @@ msgid "Search Payment Forms" msgstr "" #: includes/core/post-types/simple-pay/register.php:58 +#: includes/core/assets/js/dist/simpay-block-payment-form.js:1 msgid "No payment forms found." msgstr "" @@ -11309,61 +11385,66 @@ msgstr "" msgid "Payment Form updated." msgstr "" +#. translators: %1$s Opening anchor, do not translate. %2$s Closing anchor, do not translate. %3$s list of field changes. +#: includes/core/post-types/simple-pay/register.php:231 +msgid "Payment form updated. %1$sPreview payment form%2$s. %3$s" +msgstr "" + #. translators: %1$s Opening anchor, do not translate. %2$s Closing anchor, do not translate. -#: includes/core/post-types/simple-pay/register.php:223 -#: includes/core/post-types/simple-pay/register.php:229 +#: includes/core/post-types/simple-pay/register.php:243 +#: includes/core/post-types/simple-pay/register.php:249 msgid "Payment form updated. %1$sPreview payment form%2$s." msgstr "" #. translators: %1$s Opening anchor, do not translate. %2$s Closing anchor, do not translate. -#: includes/core/post-types/simple-pay/register.php:235 +#: includes/core/post-types/simple-pay/register.php:255 msgid "Payment form published. %1$sPreview payment form%2$s." msgstr "" #. translators: %1$s Opening anchor, do not translate. %2$s Closing anchor, do not translate. -#: includes/core/post-types/simple-pay/register.php:241 +#: includes/core/post-types/simple-pay/register.php:261 msgid "Payment form saved. %1$sPreview payment form%2$s." msgstr "" #. translators: %1$s Opening anchor, do not translate. %2$s Closing anchor, do not translate. -#: includes/core/post-types/simple-pay/register.php:247 +#: includes/core/post-types/simple-pay/register.php:267 msgid "Payment form submitted. %1$sPreview payment form%2$s." msgstr "" -#: includes/core/post-types/simple-pay/register.php:251 +#: includes/core/post-types/simple-pay/register.php:271 msgid "New payment form created." msgstr "" #. translators: %1$s count. -#: includes/core/post-types/simple-pay/register.php:271 +#: includes/core/post-types/simple-pay/register.php:292 msgid "%1$s payment form updated." msgid_plural "%1$s payment forms updated." msgstr[0] "" msgstr[1] "" #. translators: %1$s count. -#: includes/core/post-types/simple-pay/register.php:276 +#: includes/core/post-types/simple-pay/register.php:297 msgid "%1$s payment form not updated, somebody is editing it." msgid_plural "%1$s payment forms not updated, somebody is editing them." msgstr[0] "" msgstr[1] "" #. translators: %1$s count. -#: includes/core/post-types/simple-pay/register.php:281 +#: includes/core/post-types/simple-pay/register.php:302 msgid "%1$s payment form permanently deleted." msgid_plural "%1$s payment forms permanently deleted." msgstr[0] "" msgstr[1] "" #. translators: %1$s count. -#: includes/core/post-types/simple-pay/register.php:286 +#: includes/core/post-types/simple-pay/register.php:307 msgid "%1$s payment forms moved to the Trash." msgid_plural "%1$s payment forms moved to the Trash." msgstr[0] "" msgstr[1] "" #. translators: %1$s count. -#: includes/core/post-types/simple-pay/register.php:291 +#: includes/core/post-types/simple-pay/register.php:312 msgid "%1$s payment form restored from the Trash." msgid_plural "%1$s payment forms restored from the Trash." msgstr[0] "" @@ -11371,6 +11452,7 @@ msgstr[1] "" #: includes/core/recaptcha/index.php:96 #: includes/core/recaptcha/settings.php:649 +#: src/AntiSpam/Captcha/ScriptUtils.php:65 msgid "Unable to generate and validate reCAPTCHA token. Please verify your Site and Secret keys." msgstr "" @@ -11576,7 +11658,7 @@ msgstr "" #: src/AntiSpam/EmailVerification.php:578 #: src/AntiSpam/EmailVerification.php:672 #: src/RestApi/Internal/Payment/Traits/PaymentIntentTrait.php:142 -#: src/RestApi/Internal/Payment/Utils/CouponUtils.php:129 +#: src/RestApi/Internal/Payment/Utils/CouponUtils.php:119 msgid "Invalid request. Please try again." msgstr "" @@ -11737,24 +11819,25 @@ msgid "Upload or choose a header image to be displayed at the top of templated e msgstr "" #: includes/core/settings/register-emails.php:434 +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 msgid "Payments" msgstr "" -#: includes/core/settings/register-emails.php:460 +#: includes/core/settings/register-emails.php:461 msgid "Select an email to configure…" msgstr "" #. translators: Email label. -#: includes/core/settings/register-emails.php:470 +#: includes/core/settings/register-emails.php:471 msgid "Unlock \"%s\" Email" msgstr "" #. translators: %1$s Email label. %2$s License level required. -#: includes/core/settings/register-emails.php:479 +#: includes/core/settings/register-emails.php:480 msgid "We're sorry, sending and customizing the \"%1$s\" email is not available on your plan. Please upgrade to the %2$s plan or higher to unlock this and other awesome features." msgstr "" -#: includes/core/settings/register-emails.php:533 +#: includes/core/settings/register-emails.php:534 msgid "Configure" msgstr "" @@ -11773,104 +11856,104 @@ msgctxt "settings subsection label" msgid "Advanced" msgstr "" -#: includes/core/settings/register-general.php:116 +#: includes/core/settings/register-general.php:118 msgctxt "setting label" msgid "Currency" msgstr "" -#: includes/core/settings/register-general.php:121 +#: includes/core/settings/register-general.php:123 msgctxt "setting label" msgid "Default Currency" msgstr "" -#: includes/core/settings/register-general.php:152 +#: includes/core/settings/register-general.php:154 msgctxt "setting label" msgid "Currency Position" msgstr "" #. translators: %1$s Currency symbol. %2$s Sample amount. -#: includes/core/settings/register-general.php:157 +#: includes/core/settings/register-general.php:159 msgid "Left (%1$s%2$s)" msgstr "" #. translators: %1$s Currency symbol. %2$s Sample amount. -#: includes/core/settings/register-general.php:165 +#: includes/core/settings/register-general.php:167 msgid "Right (%1$s%2$s)" msgstr "" #. translators: %1$s Currency symbol. %2$s Sample amount. -#: includes/core/settings/register-general.php:173 +#: includes/core/settings/register-general.php:175 msgid "Left with Space (%1$s %2$s)" msgstr "" #. translators: %1$s Currency symbol. %2$s Sample amount. -#: includes/core/settings/register-general.php:181 +#: includes/core/settings/register-general.php:183 msgid "Right with Space (%1$s %2$s)" msgstr "" -#: includes/core/settings/register-general.php:203 +#: includes/core/settings/register-general.php:205 msgctxt "setting label" msgid "Separator" msgstr "" -#: includes/core/settings/register-general.php:204 +#: includes/core/settings/register-general.php:206 msgid "Use a comma when formatting decimal amounts and use a period to separate thousands." msgstr "" -#: includes/core/settings/register-general.php:210 +#: includes/core/settings/register-general.php:212 msgid "If enabled, amounts will be formatted as \"1.234,56\" instead of \"1,234.56\"." msgstr "" -#: includes/core/settings/register-general.php:243 +#: includes/core/settings/register-general.php:245 msgctxt "setting label" msgid "Use the Latest API Version" msgstr "" -#: includes/core/settings/register-general.php:248 +#: includes/core/settings/register-general.php:250 msgctxt "setting label" msgid "New Payment Experience" msgstr "" -#: includes/core/settings/register-general.php:254 +#: includes/core/settings/register-general.php:256 msgctxt "setting input label" msgid "Use Stripe API version 2022-11-15" msgstr "" -#: includes/core/settings/register-general.php:259 +#: includes/core/settings/register-general.php:261 msgctxt "setting input label" msgid "✨ Use the new payment experience ✨" msgstr "" #. translators: %1$s Opening tag, do not translate. %2$s Closing tag, do not translate. -#: includes/core/settings/register-general.php:274 +#: includes/core/settings/register-general.php:276 msgid "Enable the new, smarter payment experience. Have questions about opting in or managing customizations? %1$sContact us%2$s" msgstr "" -#: includes/core/settings/register-general.php:320 +#: includes/core/settings/register-general.php:322 msgctxt "setting label" msgid "Usage Analytics" msgstr "" -#: includes/core/settings/register-general.php:325 +#: includes/core/settings/register-general.php:327 msgid "Allow usage analytics" msgstr "" -#: includes/core/settings/register-general.php:331 +#: includes/core/settings/register-general.php:333 msgid "Your site will be considered as we evaluate new features and determine the best improvements to make. No sensitive data is tracked." msgstr "" -#: includes/core/settings/register-general.php:354 +#: includes/core/settings/register-general.php:356 msgctxt "setting label" msgid "Save Plugin Settings" msgstr "" -#: includes/core/settings/register-general.php:359 +#: includes/core/settings/register-general.php:361 msgctxt "setting input label" msgid "Save plugin settings" msgstr "" #. translators: %s Plugin name. -#: includes/core/settings/register-general.php:369 +#: includes/core/settings/register-general.php:371 msgid "If UN-checked, all %s plugin data will be removed when the plugin is deleted. However, your data saved with Stripe will not be deleted." msgstr "" @@ -12038,21 +12121,21 @@ msgstr "" msgid "While in Test Mode no live payments are processed. Make sure Test mode is enabled in your %1$sStripe dashboard%2$s to view your test transactions." msgstr "" -#: includes/core/settings/register-stripe.php:285 +#: includes/core/settings/register-stripe.php:286 msgctxt "setting label" msgid "Country" msgstr "" -#: includes/core/settings/register-stripe.php:289 +#: includes/core/settings/register-stripe.php:290 msgid "The country associated with the connected Stripe account." msgstr "" -#: includes/core/settings/register-stripe.php:318 +#: includes/core/settings/register-stripe.php:326 msgctxt "setting label" msgid "Stripe Checkout" msgstr "" -#: includes/core/settings/register-stripe.php:322 +#: includes/core/settings/register-stripe.php:330 msgid "Specify \"Auto-detect\" to display Stripe Checkout in the user's preferred language, if available." msgstr "" @@ -12062,6 +12145,7 @@ msgstr "" #. translators: Text before Stripe logo for "Connect with Stripe" button. #: includes/core/stripe-connect/functions.php:134 +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 msgid "Connect with" msgstr "" @@ -12094,7 +12178,7 @@ msgid "Retrieve a migration object and use the `run()` method directly." msgstr "" #. translators: %s Payment Form ID. -#: includes/core/utils/migrations/routines/class-prices-api.php:163 +#: includes/core/utils/migrations/routines/class-prices-api.php:165 msgid "Unable to create Stripe Product container for %s." msgstr "" @@ -12179,10 +12263,12 @@ msgstr "" #: src/Admin/Education/AbstractProductEducation.php:54 #: src/AdminPage/AboutUsPage.php:114 #: views/admin-setting-lite-license.php:151 +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 msgid "Upgrade to WP Simple Pay Pro" msgstr "" #: src/Admin/Education/AbstractProductEducation.php:56 +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:3 msgid "See Upgrade Options" msgstr "" @@ -12692,9 +12778,39 @@ msgstr "" msgid "Please log in to make a payment." msgstr "" +#: src/Block/ManageSubscriptionsBlock.php:60 +msgid "Please wait..." +msgstr "" + +#: src/Block/ManageSubscriptionsBlock.php:61 +msgid "Please enter a valid email address." +msgstr "" + +#: src/Block/ManageSubscriptionsBlock.php:62 +msgid "Request failed." +msgstr "" + +#: src/Block/ManageSubscriptionsBlock.php:63 +#: src/RestApi/Internal/Payment/LitePaymentCreateRoute.php:82 +#: src/RestApi/Internal/SubscriptionsManagement/SendSubscriptions.php:146 +msgid "Invalid CAPTCHA. Please try again." +msgstr "" + +#: src/Block/ManageSubscriptionsBlock.php:89 +msgid "Purchase Email Address" +msgstr "" + +#: src/Block/ManageSubscriptionsBlock.php:91 +msgid "Enter your email" +msgstr "" + +#: src/Block/ManageSubscriptionsBlock.php:93 +msgid "Manage Subscription" +msgstr "" + #: src/Block/PaymentFormBlock.php:44 msgctxt "block title" -msgid "WP Simple Pay" +msgid "WP Simple Pay - Payment Form" msgstr "" #: src/Block/PaymentFormBlock.php:49 @@ -12770,6 +12886,19 @@ msgstr "" msgid "Payment Received for %s" msgstr "" +#: src/Emails/Email/ManageSubscriptionsEmail.php:54 +msgid "Manage Subscriptions" +msgstr "" + +#: src/Emails/Email/ManageSubscriptionsEmail.php:61 +msgid "Allow customers to retrieve a password-free secure URL to update their subscription." +msgstr "" + +#. translators: %s Site name +#: src/Emails/Email/ManageSubscriptionsEmail.php:81 +msgid "Manage your subscription(s) for %s" +msgstr "" + #: src/Emails/Email/PaymentConfirmationEmail.php:51 msgid "Send a payment receipt email to the customer upon successful payment" msgstr "" @@ -12780,6 +12909,7 @@ msgid "Payment Receipt for %s" msgstr "" #: src/Emails/Email/PaymentNotificationEmail.php:44 +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 msgid "Payment Notification" msgstr "" @@ -12792,6 +12922,25 @@ msgstr "" msgid "New Payment on %s" msgstr "" +#: src/Emails/Email/PaymentNotificationEmail.php:118 +msgid "🎉 Congrats! You just received {total-amount}" +msgstr "" + +#. translators: %1$s: Customer email, %2$s: Form title, %3$s: Charge date +#: src/Emails/Email/PaymentNotificationEmail.php:121 +msgid "A payment from %1$s for %2$s has been received on %3$s." +msgstr "" + +#. translators: %s: Total amount +#: src/Emails/Email/PaymentNotificationEmail.php:131 +msgid "View %s payment in Stripe →" +msgstr "" + +#. translators: %s: Customer email +#: src/Emails/Email/PaymentNotificationEmail.php:140 +msgid "View %s in Stripe →" +msgstr "" + #: src/Emails/Email/SummaryReportEmail.php:47 msgid "Summary Report" msgstr "" @@ -12814,6 +12963,7 @@ msgid "Your %1$s WP Simple Pay Summary for %2$s" msgstr "" #: src/Emails/Email/UpcomingInvoiceEmail.php:44 +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 msgid "Upcoming Invoice" msgstr "" @@ -12902,7 +13052,6 @@ msgid "Complete Activation" msgstr "" #. translators: License extension date. -#. translators: End of license grace period. #: src/License/LicenseNotificationSubscriber.php:136 #: views/admin-notice-expired-license.php:37 msgid "We have extended WP Simple Pay Pro functionality until %s, at which point functionality will become limited. Renew your license to continue receiving automatic updates, technical support, and access to WP Simple Pay Pro features and functionality." @@ -12927,6 +13076,7 @@ msgid "License" msgstr "" #: src/License/LicenseSettingSubscriber.php:79 +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 msgid "License Key" msgstr "" @@ -12946,10 +13096,13 @@ msgstr "" #: src/Report/ActivityOverviewReport.php:111 #: views/email-internal-summary-report.php:107 +#: includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js:1 +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 msgid "Gross Volume" msgstr "" #: src/Report/ActivityOverviewReport.php:131 +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:4 msgid "Successful Payments" msgstr "" @@ -12965,12 +13118,56 @@ msgstr "" msgid "(no title)" msgstr "" -#: src/Repository/BerlinDbRepository.php:166 -msgid "Counting results via a query is not allowed. Use the ::count() method." +#: src/Report/ActivityOverviewReport.php:415 +msgid "Set up automatic tax collection" msgstr "" -#: src/RestApi/Internal/Payment/LitePaymentCreateRoute.php:82 -msgid "Invalid CAPTCHA. Please try again." +#: src/Report/ActivityOverviewReport.php:420 +msgid "Charge a fixed tax rate to everyone or collect different taxes dynamically based on customer location" +msgstr "" + +#: src/Report/ActivityOverviewReport.php:426 +msgid "Dynamically customize payment receipts" +msgstr "" + +#: src/Report/ActivityOverviewReport.php:431 +msgid "Customize every single detail based on the data collected from users." +msgstr "" + +#: src/Report/ActivityOverviewReport.php:437 +msgid "We support 10+ payment methods" +msgstr "" + +#: src/Report/ActivityOverviewReport.php:442 +msgid "Offer multiple payment methods and allow users to pay with their favorite." +msgstr "" + +#: src/Report/ActivityOverviewReport.php:448 +msgid "Smart inventory management" +msgstr "" + +#: src/Report/ActivityOverviewReport.php:453 +msgid "Automatically hide your payment form after a set number of payments." +msgstr "" + +#: src/Report/ActivityOverviewReport.php:459 +msgid "Encourage payments with discount codes" +msgstr "" + +#: src/Report/ActivityOverviewReport.php:464 +msgid "Offer a fixed amount or a percentage discount for a specified duration or forever." +msgstr "" + +#: src/Report/ActivityOverviewReport.php:470 +msgid "Remove Stripe processing fees" +msgstr "" + +#: src/Report/ActivityOverviewReport.php:475 +msgid "Charge an additional fee to ensure you receive the full payment amount." +msgstr "" + +#: src/Repository/BerlinDbRepository.php:166 +msgid "Counting results via a query is not allowed. Use the ::count() method." msgstr "" #: src/RestApi/Internal/Payment/Traits/SubscriptionTrait.php:407 @@ -12987,20 +13184,17 @@ msgstr "" msgid "Sorry, this coupon not valid." msgstr "" -#: src/RestApi/Internal/Payment/Utils/CouponUtils.php:98 -msgid "Sorry, this coupon amount (100%) is not valid." -msgstr "" - -#: src/RestApi/Internal/Payment/Utils/CouponUtils.php:115 +#: src/RestApi/Internal/Payment/Utils/CouponUtils.php:105 msgid "Sorry, this coupon not valid for the selected currency." msgstr "" +#: src/RestApi/Internal/Payment/Utils/CouponUtils.php:133 #: src/RestApi/Internal/Payment/Utils/CouponUtils.php:143 msgid "Sorry, this coupon puts the total below the required minimum amount." msgstr "" #. translators: %1$s Coupon code. %2$s discount amount. -#: src/RestApi/Internal/Payment/Utils/CouponUtils.php:154 +#: src/RestApi/Internal/Payment/Utils/CouponUtils.php:155 msgid "%1$s: %2$s off" msgstr "" @@ -13081,7 +13275,7 @@ msgid "The payment's subscription ID." msgstr "" #: src/RestApi/Internal/Payment/Utils/SchemaUtils.php:479 -msgid "The payment's setup intent ID." +msgid "The payment's SetupIntent ID." msgstr "" #: src/RestApi/Internal/Payment/Utils/SchemaUtils.php:503 @@ -13124,6 +13318,53 @@ msgstr "" msgid "Country/Region code in ISO 3166-1 alpha-2 format." msgstr "" +#: src/RestApi/Internal/Payment/Utils/SchemaValidationUtils.php:367 +msgid "The provided form ID is invalid." +msgstr "" + +#. translators: %s is replaced with the required field. +#: src/RestApi/Internal/Payment/Utils/SchemaValidationUtils.php:395 +msgid "The required field \"%s\" is missing." +msgstr "" + +#. translators: %s is replaced with the required field. +#: src/RestApi/Internal/Payment/Utils/SchemaValidationUtils.php:401 +msgid "The required field \"%s\" cannot be empty." +msgstr "" + +#: src/RestApi/Internal/Payment/Utils/SchemaValidationUtils.php:409 +msgid "Tax ID and Tax ID Type are required fields." +msgstr "" + +#: src/RestApi/Internal/Payment/Utils/SchemaValidationUtils.php:420 +msgid "Tax ID and Tax ID Type cannot be empty." +msgstr "" + +#. translators: %s is replaced with the address type (billing or shipping). +#: src/RestApi/Internal/Payment/Utils/SchemaValidationUtils.php:431 +msgid "The %s address name is required." +msgstr "" + +#. translators: %s is replaced with the address type (billing or shipping). +#: src/RestApi/Internal/Payment/Utils/SchemaValidationUtils.php:436 +msgid "The %s address country is required." +msgstr "" + +#. translators: %s is replaced with the address type (billing or shipping). +#: src/RestApi/Internal/Payment/Utils/SchemaValidationUtils.php:441 +msgid "The %s address postal code is required." +msgstr "" + +#. translators: %s is replaced with the field type (email, customer_name, or telephone). +#: src/RestApi/Internal/Payment/Utils/SchemaValidationUtils.php:451 +msgid "The %s field is required." +msgstr "" + +#. translators: %s is replaced with the field type (email, customer_name, or telephone). +#: src/RestApi/Internal/Payment/Utils/SchemaValidationUtils.php:460 +msgid "The %s field can not be empty." +msgstr "" + #: src/RestApi/Internal/Report/GrossVolumePeriodOverPeriodReport.php:152 #: src/RestApi/Internal/Report/SuccessfulPaymentsPeriodOverPeriodReport.php:142 msgid "Current period" @@ -13162,12 +13403,27 @@ msgstr "" msgid "The currency to use for the report." msgstr "" +#: src/RestApi/Internal/SubscriptionsManagement/SendSubscriptions.php:157 +msgid "Something went wrong" +msgstr "" + +#: src/RestApi/Internal/SubscriptionsManagement/SendSubscriptions.php:310 +#: src/RestApi/Internal/SubscriptionsManagement/SendSubscriptions.php:320 +#: src/RestApi/Internal/SubscriptionsManagement/SendSubscriptions.php:332 +msgid "No purchases were found for the supplied email address." +msgstr "" + +#. Translators: %s is a placeholder for the customer's email. +#: src/RestApi/Internal/SubscriptionsManagement/SendSubscriptions.php:347 +msgid "Secure password-free links to manage your past purchases for %s have been sent to your inbox. " +msgstr "" + #: src/RestApi/__UnstableNotifications.php:74 msgid "The number of notifications to return." msgstr "" #: src/RestApi/__UnstableNotifications.php:83 -msgid "Notification dismissisal status." +msgid "Notification dismissal status." msgstr "" #: src/RestApi/__UnstableNotifications.php:107 @@ -13297,6 +13553,7 @@ msgstr "" #: views/admin-dashboard-widget-lite-upgrade.php:38 #: views/admin-education-upgrade-modal.php:27 +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:3 msgid "Upgrade Now" msgstr "" @@ -13329,6 +13586,7 @@ msgstr "" #: views/admin-education-payment-form-confirmation-settings.php:59 #: views/admin-education-payment-form-instant-payouts-settings.php:61 #: views/admin-education-payment-form-notifications-settings.php:59 +#: includes/core/assets/js/dist/simpay-admin-notifications.js:2 msgid "Dismiss" msgstr "" @@ -13379,6 +13637,7 @@ msgstr "" #: views/admin-education-plugin-email-settings.php:64 #: views/admin-education-plugin-taxes-settings.php:64 #: views/admin-education-upgrade-modal.php:33 +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:3 msgid "Already purchased?" msgstr "" @@ -13502,11 +13761,7 @@ msgstr "" msgid "Learn How to Test Live Mode Payment Forms →" msgstr "" -#: views/admin-footer-promo.php:41 -msgid "Facebook" -msgstr "" - -#: views/admin-footer-promo.php:51 +#: views/admin-footer-promo.php:38 msgid "Twitter" msgstr "" @@ -13620,10 +13875,12 @@ msgid "Using Test Mode" msgstr "" #: views/admin-page-about-us-getting-started.php:68 +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 msgid "Accept Donations" msgstr "" #: views/admin-page-about-us-getting-started.php:73 +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 msgid "Easily fundraise or accept donations online via 135+ supported currencies. Offer one-time or recurring donations of fixed or user-defined amounts." msgstr "" @@ -13642,10 +13899,12 @@ msgid "Collect payments indefinitely, bill users through installment plans, coll msgstr "" #: views/admin-page-about-us-getting-started.php:110 +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 msgid "Reconcile Invoices" msgstr "" #: views/admin-page-about-us-getting-started.php:115 +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 msgid "Collect additional custom data on your payment forms such as an Invoice ID to reconcile invoices against your own invoicing system." msgstr "" @@ -13839,6 +14098,8 @@ msgid "vs. previous period" msgstr "" #: views/email-internal-summary-report.php:100 +#: includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js:1 +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:1 msgid "Top Forms" msgstr "" @@ -13849,3 +14110,601 @@ msgstr "" #: views/payment-page-output.php:86 msgid "powered by" msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js:1 +msgid "Estimated gross amounts for transactions in the selected currency and time period. Amounts do not represent verified financial data." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js:1 +msgid "Transaction data requires webhooks to be properly configured to populate correctly." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js:1 +msgid "Close" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js:1 +msgid "View advanced reports in Stripe →" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js:1 +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:6 +msgid "Currency" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js:1 +msgid "Range" +msgstr "" + +#. translators: %d Form ID. +#: includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js:2 +msgid "Payment form %d (deleted)" +msgstr "" + +#. translators: %d The number of forms included in results that are not shown. +#: includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js:3 +msgid "…and %d more" +msgstr "" + +#. translators: %s Currency code. +#: includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js:4 +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:3 +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:5 +msgid "No %s transactions found." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js:4 +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:3 +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:5 +msgid "Please select a different currency, date range, or check back later." +msgstr "" + +#. translators: %s: delta percentage +#: includes/core/assets/js/dist/simpay-admin-dashboard-widget-report.js:5 +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:4 +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:6 +msgid "%1$s%% vs. previous period" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:1 +msgid "Get a Head Start With Our Pre-Made Form Templates" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:1 +msgid "Select a template" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:1 +msgid "To speed up the process you can select from one of our pre-made templates or start with a basic form. Have a suggestion for a new template? We'd love to hear it!" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:1 +#: includes/core/assets/js/dist/simpay-admin-help.js:1 +msgid "Reset search" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:1 +msgid "Search for templates" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:1 +#: includes/core/assets/js/dist/simpay-admin-help.js:2 +msgid "Search" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:1 +msgid "Upgrade Required" +msgstr "" + +#. translators: %s Template name +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:2 +msgid "Unlock the \"%s\" Template" +msgstr "" + +#. translators: %$ss Template name. %2$s Minimum license level. +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:3 +msgid "We're sorry, the \"%1$s\" template is not available on your plan. Please upgrade to the %2$s plan or higher to unlock this and other awesome features." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:3 +msgid "Bonus: WP Simple Pay Lite users get 50% off regular price, automatically applied at checkout. Upgrade to Pro →" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:3 +msgid "Bonus: WP Simple Pay Pro users get 50% off upgrade pricing, automatically applied at checkout. See Upgrade Options →" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:3 +msgid "Use Template" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:3 +msgid "View Demo" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:3 +msgid "We need your help!" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:3 +msgid "We're constantly building more pre-made payment form templates to get you up and running even faster. If you have ideas for future templates, please let us know!" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:3 +msgid "Suggest a Template" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:3 +msgid "Get Access to All of Our Pre-Made Payment Form Templates" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:3 +msgid "Never start from scratch again! Upgrade to gain access to every payment form template we make and unlock powerful new features." +msgstr "" + +#. translators: %d: number of results. +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:4 +#: includes/core/assets/js/dist/simpay-admin-help.js:2 +msgid "%d result found." +msgid_plural "%d results found." +msgstr[0] "" +msgstr[1] "" + +#: includes/core/assets/js/dist/simpay-admin-form-template-explorer.js:4 +msgid "No results found. Have a suggestion for a new template? We'd love to hear it!" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-help.js:1 +msgid "Need help with something?" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-help.js:1 +msgid "Answers are at your fingertips with the WP Simple Pay help panel. Quickly view suggested articles, search for a specific feature, or submit a support ticket." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-help.js:1 +msgid "Got it!" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-help.js:1 +msgid "We're Here to Help" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-help.js:1 +msgid "Close help" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-help.js:1 +msgid "View Documentation" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-help.js:1 +msgid "Browse documentation, references, and tutorials for WP Simple Pay." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-help.js:1 +msgid "View All Documentation" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-help.js:1 +msgid "Get Support" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-help.js:1 +msgid "Submit a ticket and our world class support team will be in touch soon." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-help.js:1 +msgid "Submit a Support Ticket" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-help.js:1 +msgid "View all" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-help.js:2 +msgid "Search the documentation" +msgstr "" + +#. translators: %d Unread notification count. +#: includes/core/assets/js/dist/simpay-admin-notifications.js:2 +msgid "%d unread notifications" +msgstr "" + +#. translators: %d Unread notification count. +#: includes/core/assets/js/dist/simpay-admin-notifications.js:3 +msgid "%d Unread Notification" +msgid_plural "%d Unread Notifications" +msgstr[0] "" +msgstr[1] "" + +#: includes/core/assets/js/dist/simpay-admin-notifications.js:3 +msgid "Close notifications" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-notifications.js:3 +msgid "You have no new notifications." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:1 +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +msgid "Today" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:1 +msgid "Learn More →" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +msgid "Please select a different currency or check back later." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +msgid "View customer records" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +msgid "View payment record" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +msgid "Latest Payments" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +msgid "View More →" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +msgid "Last 7 days" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +msgid "Last 4 weeks" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +msgid "Last 3 months" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +msgid "Last 12 months" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +msgid "Month to date" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +msgid "Year to date" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +msgid "Report range" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +msgid "Custom" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:2 +msgid "n/a" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:6 +msgid "Reports" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:6 +msgid "Activity with the selected currency and global payment mode will be shown." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-activity-reports.js:6 +msgid "Update" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Are you sure you want to exit the wizard?" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Manual setup is only recommended for experienced users." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Exit Setup Wizard" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Continue Setup" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Go back to the Dashboard" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Close and exit the Setup Wizard" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Settings saved" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Unlimited Custom Form Fields" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "On-Site Payment Forms" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "User-Entered Amounts" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Apple Pay & Google Pay" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Accept Recurring Payments" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Drag & Drop Payment Form Builder" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Custom Payment Receipt Emails" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Coupon Codes" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "ACH Debit Payments" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Plus much more…" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Secure payments" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Transparent pricing" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "135+ currencies" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "35+ countries, 40+ languages" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Optimized for conversions" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Connected to Stripe" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Unable to connect to Stripe. Please try again." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Millions of companies of all sizes—from startups to Fortune 500s—use Stripe's software and APIs to accept payments, send payouts, and manage their businesses online." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Create or connect an existing account to instantly start accepting payments." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "← Previous Step" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Connecting…" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Welcome to the WP Simple Pay Setup Wizard!" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "We'll guide you through getting WP Simple Pay set up on your site and ready to start accepting payments." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Let's Get Started →" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Activate Your License" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "To get started, please enter your license key. Retrieve your license key from your WP Simple Pay account or purchase receipt email." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "An active license ensures automatic updates and the latest features." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "License activated" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Activate and Continue →" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Connect to Stripe" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Configure Emails" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Payment Receipt" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Send a payment receipt email to the customer upon successful payment." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Receive an email notification when a new payment is made." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Send to:" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Invoice Receipt" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Send a payment receipt email to the customer upon successful invoice." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Remind customers of upcoming invoices and allow payment method changes." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Skip Step" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Save and Continue →" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "🎉 Setup Complete" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Congratulations, you’re ready to start accepting payments!" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "WP Simple Pay is just that: simple. Create your first payment form below to start collecting payments, or fine-tune your setup through some of these suggestions:" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Collect tax or GST" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Add anti-spam protection" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Change the default currency" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Customize receipts" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "View Walkthrough" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Return to Dashboard" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Create a Payment Form →" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Help Improve WP Simple Pay + Smart Recommendations" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Get helpful suggestions from WP Simple Pay on how to optimize your payment forms and grow your business or increase donations." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Your Email Address:" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Your email is needed so you receive recommendations." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Help make WP Simple Pay better for everyone" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "By allowing us to track usage data we can better help you because we know which WordPress configurations, themes, and plugins we should test." +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Yes, count me in" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Congratulations, you’re ready to start easily and securely accepting payments with WP Simple Pay!" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Special Upgrade Offer - Save 50%" +msgstr "" + +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:1 +msgid "Upgrade to WP Simple Pay Pro Today and Save" +msgstr "" + +#. translators: %1$d current step count. %2$d total step count +#: includes/core/assets/js/dist/simpay-admin-page-setup-wizard.js:2 +msgid "Step %1$d of %2$d" +msgstr "" + +#: includes/core/assets/js/dist/simpay-block-button.js:1 +msgid "Select a form…" +msgstr "" + +#: includes/core/assets/js/dist/simpay-block-button.js:1 +msgid "Select an overlay or Stripe Checkout payment form to launch." +msgstr "" + +#: includes/core/assets/js/dist/simpay-block-payment-form.js:1 +msgid "Select a form" +msgstr "" + +#: includes/core/assets/js/dist/simpay-block-payment-form.js:1 +msgid "Select a payment form" +msgstr "" + +#: includes/core/assets/js/dist/simpay-block-payment-form.js:1 +msgid "Form Settings" +msgstr "" + +#: includes/core/assets/js/dist/simpay-block-payment-form.js:1 +msgid "Show Title" +msgstr "" + +#: includes/core/assets/js/dist/simpay-block-payment-form.js:1 +msgid "Show Description" +msgstr "" + +#: includes/core/assets/js/dist/simpay-block-payment-form.js:1 +msgid "WP Simple Pay - Payment Form" +msgstr "" diff --git a/package-lock.json b/package-lock.json index 5e4f3452..e0e82d83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "wp-simple-pay-lite", - "version": "4.7.0", + "version": "4.8.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1282,6 +1282,15 @@ "which": "~1.3.0" } }, + "grunt-sed": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/grunt-sed/-/grunt-sed-0.1.1.tgz", + "integrity": "sha512-70jT0SJrvYWtgZ6pzG/rOFEZtV8bmC4YhkutSkQ38osv8lumb+UkFIrdN49ArlJSmfUo+SqdIKQsMtzpy8fOaw==", + "dev": true, + "requires": { + "replace": "~0.2.4" + } + }, "grunt-wp-i18n": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/grunt-wp-i18n/-/grunt-wp-i18n-1.0.3.tgz", @@ -1684,6 +1693,12 @@ "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", "dev": true }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha512-WpibWJ60c3AgAz8a2iYErDrcT2C7OmKnsWhIcHOjkUHFjkXncJhtLxNSqUmxRxRunpb5I8Vprd7aNSd2NtksJQ==", + "dev": true + }, "make-iterator": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", @@ -1872,6 +1887,24 @@ } } }, + "nomnom": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.6.2.tgz", + "integrity": "sha512-mscrcqifc/QKP6/afmtoC84/mK6SKcDTDEfKPMSgJKeV5dtshiw5+AF90uwHyAqHkMIYIEcGkSAJnV6+T9PY/g==", + "dev": true, + "requires": { + "colors": "0.5.x", + "underscore": "~1.4.4" + }, + "dependencies": { + "colors": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.5.1.tgz", + "integrity": "sha512-XjsuUwpDeY98+yz959OlUK6m7mLBM+1MEG5oaenfuQnNnrQk1WvtcvFgN3FNDP3f2NmZ211t0mNEfSEN1h0eIg==", + "dev": true + } + } + }, "noop-logger": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", @@ -2245,6 +2278,35 @@ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", "dev": true }, + "replace": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/replace/-/replace-0.2.10.tgz", + "integrity": "sha512-CTu46uJCtYGGfDVQL64zqkhN7nD6KRao7e5IaYiPiPwF69/XX4QHhAPV08YWaODrgBiwVbp9Pua436WMp2tdOw==", + "dev": true, + "requires": { + "colors": "0.5.x", + "minimatch": "~0.2.9", + "nomnom": "1.6.x" + }, + "dependencies": { + "colors": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.5.1.tgz", + "integrity": "sha512-XjsuUwpDeY98+yz959OlUK6m7mLBM+1MEG5oaenfuQnNnrQk1WvtcvFgN3FNDP3f2NmZ211t0mNEfSEN1h0eIg==", + "dev": true + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha512-zZ+Jy8lVWlvqqeM8iZB7w7KmQkoJn8djM585z88rywrEbzoqawVa9FR5p2hwD+y74nfuKOjmNvi9gtWJNLqHvA==", + "dev": true, + "requires": { + "lru-cache": "2", + "sigmund": "~1.0.0" + } + } + } + }, "resolve": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", @@ -2358,6 +2420,12 @@ } } }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==", + "dev": true + }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -2751,6 +2819,12 @@ "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", "dev": true }, + "underscore": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz", + "integrity": "sha512-ZqGrAgaqqZM7LGRzNjLnw5elevWb5M8LEoDMadxIW3OWbcv72wMMgKdwOKpd5Fqxe8choLD8HN3iSj3TUh/giQ==", + "dev": true + }, "underscore.string": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.5.tgz", diff --git a/package.json b/package.json index 4deab3e9..bdcba82d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "wp-simple-pay-lite", "title": "WP Simple Pay Lite for Stripe", "description": "Add high conversion Stripe Checkout forms to your WordPress site and start accepting payments in minutes. **Lite Version**", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "homepage": "https://wpsimplepay.com/", "repository": { @@ -10,7 +10,8 @@ "url": "https://github.com/wpsimplepay/wp-simple-pay-lite" }, "scripts": { - "i18n": "grunt checktextdomain && wp i18n make-pot --include='*.min.js,*.php' --exclude='build,*.js' . languages/stripe.pot --domain=stripe && wp i18n make-json languages --no-purge" + "build": "grunt build", + "i18n": "grunt sed && grunt checktextdomain && wp i18n make-pot . languages/stripe.pot --domain=stripe --exclude='*/js/src/*' && wp i18n make-json languages --no-purge" }, "devDependencies": { "grunt": "^1.0.4", @@ -19,6 +20,7 @@ "grunt-contrib-clean": "2.x", "grunt-contrib-compress": "^1.5.0", "grunt-contrib-copy": "1.x", + "grunt-sed": "^0.1.1", "grunt-wp-i18n": "^1.0.3", "load-grunt-tasks": "4.x" } diff --git a/readme.txt b/readme.txt index 56a0cabe..88f21cd8 100644 --- a/readme.txt +++ b/readme.txt @@ -1,9 +1,9 @@ -=== Stripe Payment Forms by WP Simple Pay - Accept Payments with Stripe === +=== Stripe Payment Forms by WP Simple Pay - Accept Credit Card Payments + Subscriptions with Stripe === Contributors: wpsimplepay, pderksen, spencerfinnell, adamjlea, mordauk, cklosows, sdavis2702, dgoldak, nickyoung87, nekojira, smub, am, griffinjt Tags: stripe, stripe checkout, stripe payments, credit card payments, stripe gateway Requires at least: 5.2 -Tested up to: 6.4 -Stable tag: 4.8.0 +Tested up to: 6.5 +Stable tag: 4.9.0 Requires PHP: 5.6 License: GPLv2 or later @@ -249,6 +249,20 @@ No. WP Simple Pay is a standalone Stripe payments plugin and does not integrate == Changelog == += Stripe Payment Forms v4.9.0 - April 2, 2024 = + +* New: WP Simple Pay is now translated in 10 additional languages. +* New: Do not send a dynamic statement descriptor to Stripe. https://support.stripe.com/questions/statement-descriptor-information +* Fix: Setup Wizard - Ensure "Help Panel" popover is hidden until completion. +* Fix: Blocks - Add block.json for better compatibility. +* Fix: Ensure CAPTCHA Documentation opens in new tab. +* Fix: Admin - Ensure `common.js` WordPress Script is Enqueued. +* Fix: Payment Form - Improve "Invalid Parameters" REST API messaging. +* Fix: Form Builder - Remove "New!" From "Confirmation Page" tab. +* i18n: Various changes for improved translations. +* Dev: Remove legacy action: `simpay_subscription_created` → `simpay_webhook_subscription_created`. +* Dev: Remove legacy action: `simpay_charge_created` → `simpay_webhook_payment_intent_succeeded`. + = Stripe Payment Forms v4.8.0 - February 26, 2024 = * New: Improve payment confirmation page performance. diff --git a/src/Admin/DashboardWidget/ProductEducationDashboardWidget.php b/src/Admin/DashboardWidget/ProductEducationDashboardWidget.php index 5282beb5..b47dbe79 100644 --- a/src/Admin/DashboardWidget/ProductEducationDashboardWidget.php +++ b/src/Admin/DashboardWidget/ProductEducationDashboardWidget.php @@ -191,7 +191,7 @@ public function render() { * @return void */ private function get_report_view() { - $asset = SIMPLE_PAY_INC . 'core/assets/js/simpay-admin-dashboard-widget-report.min.asset.php'; // @phpstan-ignore-line + $asset = SIMPLE_PAY_INC . 'core/assets/js/dist/simpay-admin-dashboard-widget-report.asset.php'; // @phpstan-ignore-line if ( ! file_exists( $asset ) ) { return; @@ -201,7 +201,7 @@ private function get_report_view() { wp_enqueue_script( 'simpay-admin-dashboard-widget-report', - SIMPLE_PAY_INC_URL . 'core/assets/js/simpay-admin-dashboard-widget-report.min.js', // @phpstan-ignore-line + SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-admin-dashboard-widget-report.js', // @phpstan-ignore-line array_merge( array( 'simpay-accounting', diff --git a/src/Admin/FormBuilder/TemplateExplorer.php b/src/Admin/FormBuilder/TemplateExplorer.php index b8f6c373..b0a7f1b3 100644 --- a/src/Admin/FormBuilder/TemplateExplorer.php +++ b/src/Admin/FormBuilder/TemplateExplorer.php @@ -157,7 +157,7 @@ public function maybe_show_template_explorer( $post ) { * @return void */ public function render() { - $asset_file = SIMPLE_PAY_INC . '/core/assets/js/simpay-admin-form-template-explorer.min.asset.php'; // @phpstan-ignore-line + $asset_file = SIMPLE_PAY_INC . 'core/assets/js/dist/simpay-admin-form-template-explorer.asset.php'; // @phpstan-ignore-line if ( ! file_exists( $asset_file ) ) { return; @@ -167,7 +167,7 @@ public function render() { wp_enqueue_script( 'simpay-admin-form-template-explorer', - SIMPLE_PAY_INC_URL . '/core/assets/js/simpay-admin-form-template-explorer.min.js', // @phpstan-ignore-line + SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-admin-form-template-explorer.js', // @phpstan-ignore-line $asset_data['dependencies'], $asset_data['version'], true @@ -236,7 +236,7 @@ public function render() { wp_enqueue_style( 'simpay-admin-form-template-explorer', - SIMPLE_PAY_INC_URL . '/core/assets/css/simpay-admin-form-template-explorer.min.css', // @phpstan-ignore-line + SIMPLE_PAY_INC_URL . 'core/assets/css/simpay-admin-form-template-explorer.min.css', // @phpstan-ignore-line array( 'wp-components', ), diff --git a/src/Admin/Translations/LanguagePacks.php b/src/Admin/Translations/LanguagePacks.php new file mode 100644 index 00000000..01954b08 --- /dev/null +++ b/src/Admin/Translations/LanguagePacks.php @@ -0,0 +1,369 @@ + + */ + private $installed_translations = array(); + + /** + * The instance of the core class used for updating/installing language packs (translations). + * + * @since 4.9.0 + * + * @var \Language_Pack_Upgrader + */ + private $upgrader; + + /** + * Upgrader Skin for Automatic WordPress Upgrades. + * + * @since 4.9.0 + * + * @var \Automatic_Upgrader_Skin + */ + private $skin; + + /** + * {@inheritdoc} + */ + public function get_subscribed_events() { + // Lite works automatically with .org. + if ( $this->license->is_lite() ) { + return array(); + } + + if ( ! is_admin() ) { + return array(); + } + + if ( ! current_user_can( 'install_languages' ) ) { + return array(); + } + + require_once ABSPATH . 'wp-admin/includes/file.php'; + require_once ABSPATH . 'wp-admin/includes/translation-install.php'; + + if ( false === wp_can_install_language_pack() ) { + return array(); + } + + return array( + // Stub in our language packs when looking for plugin updates. + 'site_transient_update_plugins' => 'add_available_language_packs', + + // Clear our language pack cache when updating plugins. + 'set_site_transient_update_plugins' => 'clear_language_pack_manifest_cache', + + // Download language packs on plugin activation. + // See method for details. + 'admin_init' => 'on_activate_plugin', + + // Download language packs when changing languages. + 'add_option_WPLANG' => array( 'on_language_set', 10, 2 ), + 'update_option_WPLANG' => array( 'on_language_change', 10, 2 ), + ); + } + + /** + * Attaches the available language packs to the update_plugins transient. + * + * @since 4.9.0 + * + * @param \stdClass $value Transient data. + * @return \stdClass + */ + public function add_available_language_packs( $value ) { + if ( ! $value ) { + $value = new stdClass; + } + + if ( ! isset( $value->translations ) ) { + $value->translations = array(); + } + + $translations = $this->get_available_translations(); + + if ( ! empty( $translations ) ) { + $value->translations = array_merge( $value->translations, $translations ); + } + + return $value; + } + + /** + * Clear the language pack cache. + * + * @since 4.9.0 + * + * @param array $transient Transient data. + * @return void + */ + public function clear_language_pack_manifest_cache( $transient ) { + global $pagenow; + + if ( 'update-core.php' === $pagenow ) { + delete_site_transient( self::API_RESPONSE_CACHE_KEY ); + } + } + + /** + * Downloads language packs when the site language is initially set. + * + * @since 4.9.0 + * + * @param string $option_name The previous language. + * @param string $locale The new locale. + * @return void + */ + public function on_language_set( $option_name, $locale ) { + if ( '' === $locale ) { + return; + } + + $this->install_language_pack( $locale ); + } + + /** + * Downloads language packs when the site language is changed. + * + * @since 4.9.0 + * + * @param string $old_value The previous language. + * @param string $locale The new locale. + * @return void + */ + public function on_language_change( $old_value, $locale ) { + if ( '' === $locale ) { + return; + } + + $this->install_language_pack( $locale ); + } + + /** + * Downloads language packs when the plugin is activated. + * + * We cannot use the simpay_activated hook because the plugin container is + * loaded too late. Instead, we use the admin_init hook to check for the + * simpay_activation_redirect transient which is set in the main plugin file. + * + * @since 4.9.0 + * + * @return void + */ + public function on_activate_plugin() { + global $pagenow; + + if ( 'plugins.php' !== $pagenow ) { + return; + } + + if ( ! get_transient( 'simpay_activation_redirect' ) ) { + return; + } + + $this->install_language_pack( get_locale() ); + } + + /** + * Downloads language packs based on available core translations. + * + * @since 4.9.0 + * + * @param string $locale The locale to install. + * @return void + */ + private function install_language_pack( $locale ) { + $available_translations = $this->get_available_translations(); + + if ( empty( $available_translations ) || ! isset( $available_translations[ $locale ] ) ) { + return; + } + + $language_pack = (object) $available_translations[ $locale ]; + + $this->skin = new Automatic_Upgrader_Skin(); + $this->skin->language_update = $language_pack; // @phpstan-ignore-line + + $this->upgrader = new Language_Pack_Upgrader( $this->skin ); + $this->upgrader->run( + array( + 'package' => $language_pack->package, + 'destination' => WP_LANG_DIR . '/plugins', + 'abort_if_destination_exists' => false, + 'is_multi' => true, + 'hook_extra' => array( + 'language_update_type' => $language_pack->type, + 'language_update' => $language_pack, + ), + ) + ); + } + + /** + * Get a list of translations available for the plugin, keyed by locale. + * + * @since 4.9.0 + * + * @return array> + */ + private function get_available_translations() { + $manifest = $this->get_manifest_data(); + + if ( false === $manifest ) { + return array(); + } + + $available_remote_translations = $manifest['translations']; + + if ( empty( $available_remote_translations ) ) { + return array(); + } + + $installed_translations = $this->get_installed_translations(); + $available_translations = array(); + + foreach ( $available_remote_translations as $remote_translation_data ) { + if ( empty( $remote_translation_data['language'] ) ) { + continue; + } + + $language = $remote_translation_data['language']; + + /** @var array{"PO-Revision-Date"?: string} */ + $local_translation_data = isset( + $installed_translations[ self::TEXT_DOMAIN ], + $installed_translations[ self::TEXT_DOMAIN ][ $language ] // @phpstan-ignore-line + ) + ? $installed_translations[ self::TEXT_DOMAIN ][ $language ] + : array(); + + // Skip languages which were updated locally so they are not overwritten. + if ( isset( + $local_translation_data['PO-Revision-Date'], + $remote_translation_data['updated'] + ) ) { + $local = strtotime( $local_translation_data['PO-Revision-Date'] ); + $remote = strtotime( $remote_translation_data['updated'] ); + + if ( $local >= $remote ) { + continue; + } + } + + // Key a new array by the language code. + $available_translations[ $language ] = $remote_translation_data; + } + + return $available_translations; + } + + /** + * Get installed translations. + * + * @since 4.9.0 + * + * @return array Language data. + */ + private function get_installed_translations() { + if ( $this->installed_translations ) { + return $this->installed_translations; + } + + $this->installed_translations = wp_get_installed_translations( 'plugins' ); + + return $this->installed_translations; + } + + /** + * Returns the translation language packs manifest data. + * + * @since 4.9.0 + * + * @return array{translations: array{language: string, version:string, updated: string, package: string, type: string, slug: string, iso: array}[]}|false + */ + private function get_manifest_data() { + /** @var array{translations: array{language: string, version:string, updated: string, package: string, type: string, slug: string, iso: array}[]}|false $manifest */ + $manifest = get_site_transient( self::API_RESPONSE_CACHE_KEY ); + + if ( false !== $manifest ) { + return $manifest; + } + + $request = wp_remote_get( + self::API_URL, + array( + 'timeout' => 2, + ) + ); + + $response = wp_remote_retrieve_response_code( $request ); + + $empty_manifest = array( + 'translations' => array(), + ); + + if ( 200 !== $response ) { + $manifest = $empty_manifest; + } else { + $response = wp_remote_retrieve_body( $request ); + $manifest = json_decode( $response, true ); + + if ( ! is_array( $manifest ) || empty( $manifest['translations'] ) ) { + $manifest = $empty_manifest; + } + } + + /** @var array{translations: array{language: string, version:string, updated: string, package: string, type: string, slug: string, iso: array}[]}|false $manifest */ + + set_site_transient( self::API_RESPONSE_CACHE_KEY, $manifest ); + + return $manifest; + } +} diff --git a/src/Admin/Translations/TranslationsServiceProvider.php b/src/Admin/Translations/TranslationsServiceProvider.php new file mode 100644 index 00000000..c95648f2 --- /dev/null +++ b/src/Admin/Translations/TranslationsServiceProvider.php @@ -0,0 +1,52 @@ +getContainer(); + + // Connection. + $container->share( + 'translation-language-packs', + LanguagePacks::class + ); + } + +} diff --git a/src/AdminPage/AboutUsPage.php b/src/AdminPage/AboutUsPage.php index 95932572..215ad89c 100644 --- a/src/AdminPage/AboutUsPage.php +++ b/src/AdminPage/AboutUsPage.php @@ -130,7 +130,7 @@ public function render() { private function get_am_plugins() { /** @var array $all_plugins */ $all_plugins = get_plugins(); - $images_url = SIMPLE_PAY_INC_URL . '/core/assets/images/about/'; // @phpstan-ignore-line + $images_url = SIMPLE_PAY_INC_URL . 'core/assets/images/about/'; // @phpstan-ignore-line $am_plugins = array( // OptinMonster. 'optinmonster/optin-monster-wp-api.php' => array( diff --git a/src/AdminPage/ActivityReportsPage.php b/src/AdminPage/ActivityReportsPage.php index 33493e9e..0ab95147 100644 --- a/src/AdminPage/ActivityReportsPage.php +++ b/src/AdminPage/ActivityReportsPage.php @@ -76,14 +76,14 @@ public function is_block_editor() { * {@inheritdoc} */ public function render() { - $asset = SIMPLE_PAY_INC . 'core/assets/js/simpay-admin-page-activity-reports.min.asset.php'; // @phpstan-ignore-line + $asset = SIMPLE_PAY_INC . 'core/assets/js/dist/simpay-admin-page-activity-reports.asset.php'; // @phpstan-ignore-line if ( file_exists( $asset ) ) { $asset_data = include_once $asset; wp_enqueue_script( 'simpay-admin-page-activity-reports', - SIMPLE_PAY_INC_URL . 'core/assets/js/simpay-admin-page-activity-reports.min.js', // @phpstan-ignore-line + SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-admin-page-activity-reports.js', // @phpstan-ignore-line $asset_data['dependencies'], $asset_data['version'], true diff --git a/src/AdminPage/SetupWizardPage.php b/src/AdminPage/SetupWizardPage.php index da70c15f..80e3c3af 100644 --- a/src/AdminPage/SetupWizardPage.php +++ b/src/AdminPage/SetupWizardPage.php @@ -77,14 +77,14 @@ public function is_block_editor() { * {@inheritdoc} */ public function render() { - $asset = SIMPLE_PAY_INC . 'core/assets/js/simpay-admin-page-setup-wizard.min.asset.php'; // @phpstan-ignore-line + $asset = SIMPLE_PAY_INC . 'core/assets/js/dist/simpay-admin-page-setup-wizard.asset.php'; // @phpstan-ignore-line if ( file_exists( $asset ) ) { $asset_data = include_once $asset; wp_enqueue_script( 'simpay-setup-wizard', - SIMPLE_PAY_INC_URL . 'core/assets/js/simpay-admin-page-setup-wizard.min.js', // @phpstan-ignore-line + SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-admin-page-setup-wizard.js', // @phpstan-ignore-line $asset_data['dependencies'], $asset_data['version'], true diff --git a/src/Block/ButtonBlock.php b/src/Block/ButtonBlock.php index 5e2f08b6..0bd2e271 100644 --- a/src/Block/ButtonBlock.php +++ b/src/Block/ButtonBlock.php @@ -55,7 +55,7 @@ public function register() { * @return void */ public function enqueue_block_editor_assets() { - $asset_file = SIMPLE_PAY_INC . '/core/assets/js/simpay-block-button.min.asset.php'; // @phpstan-ignore-line + $asset_file = SIMPLE_PAY_INC . 'core/assets/js/dist/simpay-block-button.asset.php'; // @phpstan-ignore-line if ( ! file_exists( $asset_file ) ) { return; @@ -65,7 +65,7 @@ public function enqueue_block_editor_assets() { wp_enqueue_script( 'simpay-block-button', - SIMPLE_PAY_INC_URL . '/core/assets/js/simpay-block-button.min.js', // @phpstan-ignore-line + SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-block-button.js', // @phpstan-ignore-line $script_data['dependencies'], $script_data['version'] ); diff --git a/src/Block/ManageSubscriptionsBlock.php b/src/Block/ManageSubscriptionsBlock.php index f97e7f97..11173a62 100644 --- a/src/Block/ManageSubscriptionsBlock.php +++ b/src/Block/ManageSubscriptionsBlock.php @@ -23,7 +23,7 @@ class ManageSubscriptionsBlock extends AbstractBlock { */ public function register() { - $asset_file = SIMPLE_PAY_INC . '/pro/assets/js/simpay-block-manage-subscriptions.min.asset.php'; // @phpstan-ignore-line + $asset_file = SIMPLE_PAY_INC . 'pro/assets/js/dist/simpay-block-manage-subscriptions.asset.php'; // @phpstan-ignore-line if ( ! file_exists( $asset_file ) ) { error_log( 'file does not exists' ); @@ -34,7 +34,7 @@ public function register() { wp_register_script( 'simpay-manage-subscriptions', - SIMPLE_PAY_INC_URL . '/pro/assets/js/simpay-block-manage-subscriptions.min.js', // @phpstan-ignore-line + SIMPLE_PAY_INC_URL . 'pro/assets/js/dist/simpay-block-manage-subscriptions.js', // @phpstan-ignore-line $script_data['dependencies'], $script_data['version'] ); @@ -42,7 +42,7 @@ public function register() { // Register the view script. wp_register_script( 'simpay-manage-subscriptions-frontend', - SIMPLE_PAY_INC_URL . '/pro/assets/js/simpay-public-pro-manage-subscriptions.min.js', // @phpstan-ignore-line + SIMPLE_PAY_INC_URL . 'pro/assets/js/dist/simpay-public-pro-manage-subscriptions.js', // @phpstan-ignore-line array( 'wp-api-fetch' ), $script_data['version'], true diff --git a/src/Block/PaymentFormBlock.php b/src/Block/PaymentFormBlock.php index f951d279..0528b15c 100644 --- a/src/Block/PaymentFormBlock.php +++ b/src/Block/PaymentFormBlock.php @@ -30,7 +30,7 @@ class PaymentFormBlock extends AbstractBlock implements LicenseAwareInterface { * {@inheritdoc} */ public function register() { - $asset_file = SIMPLE_PAY_INC . '/core/assets/js/simpay-block-payment-form.min.asset.php'; // @phpstan-ignore-line + $asset_file = SIMPLE_PAY_INC . 'core/assets/js/dist/simpay-block-payment-form.asset.php'; // @phpstan-ignore-line if ( ! file_exists( $asset_file ) ) { return; @@ -160,7 +160,7 @@ private function register_assets( $asset_file ) { // Register block editor payment form assets. wp_register_script( 'simpay-block-payment-form', - SIMPLE_PAY_INC_URL . '/core/assets/js/simpay-block-payment-form.min.js', // @phpstan-ignore-line + SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-block-payment-form.js', // @phpstan-ignore-line array_merge( $script_data['dependencies'], array_keys( $assets->scripts ) @@ -175,15 +175,15 @@ private function register_assets( $asset_file ) { 'isUpe' => simpay_is_upe(), 'isLite' => $this->license->is_lite() ? 1 : 0, 'previews' => array( - 'pro' => SIMPLE_PAY_INC_URL . '/core/assets/images/blocks/payment-form-preview-pro.png', // @phpstan-ignore-line - 'lite' => SIMPLE_PAY_INC_URL . '/core/assets/images/blocks/payment-form-preview-lite.png', // @phpstan-ignore-line + 'pro' => SIMPLE_PAY_INC_URL . 'core/assets/images/blocks/payment-form-preview-pro.png', // @phpstan-ignore-line + 'lite' => SIMPLE_PAY_INC_URL . 'core/assets/images/blocks/payment-form-preview-lite.png', // @phpstan-ignore-line ), ) ); wp_register_style( 'simpay-block-payment-form', - SIMPLE_PAY_INC_URL . '/core/assets/css/simpay-block-payment-form.min.css', // @phpstan-ignore-line + SIMPLE_PAY_INC_URL . 'core/assets/css/simpay-block-payment-form.min.css', // @phpstan-ignore-line array_keys( $assets->styles ), $script_data['version'] ); diff --git a/src/Emails/Email/AbstractEmail.php b/src/Emails/Email/AbstractEmail.php index fdee768d..2217c4e1 100644 --- a/src/Emails/Email/AbstractEmail.php +++ b/src/Emails/Email/AbstractEmail.php @@ -135,9 +135,9 @@ private function get_template_name() { public function get_template() { switch ( $this->get_template_name() ) { case 'default': - return new DefaultTemplate; + return new DefaultTemplate(); default: - return new PlainTemplate; + return new PlainTemplate(); } } @@ -196,7 +196,7 @@ private function get_internal_header_content() { $links = array_filter( $notification->actions, - function( $action ) { + function ( $action ) { return 'primary' === $action['type']; } ); @@ -210,7 +210,7 @@ function( $action ) { } $logo_url = SIMPLE_PAY_URL . 'includes/core/assets/images/wp-simple-pay.png'; // @phpstan-ignore-line - $image = sprintf( 'WP Simple Pay', $logo_url ); + $image = sprintf( 'WP Simple Pay', $logo_url ); ob_start(); @@ -319,5 +319,4 @@ public function get_external_footer_content() { return $html; } - } diff --git a/src/Emails/Email/ManageSubscriptionsEmail.php b/src/Emails/Email/ManageSubscriptionsEmail.php index b39a58d4..d3efb030 100644 --- a/src/Emails/Email/ManageSubscriptionsEmail.php +++ b/src/Emails/Email/ManageSubscriptionsEmail.php @@ -35,6 +35,18 @@ public function get_type() { return AbstractEmail::EXTERNAL_TYPE; } + /** + * {@inheritdoc} + */ + public function get_licenses() { + return array( + 'plus', + 'professional', + 'ultimate', + 'elite', + ); + } + /** * {@inheritdoc} */ diff --git a/src/Emails/Email/PaymentNotificationEmail.php b/src/Emails/Email/PaymentNotificationEmail.php index 59febbd3..e71eebdb 100644 --- a/src/Emails/Email/PaymentNotificationEmail.php +++ b/src/Emails/Email/PaymentNotificationEmail.php @@ -113,16 +113,35 @@ public function get_body() { * @return string */ public static function get_473_default_body() { - return ( '

🎉 Congrats! You just received {total-amount}

- -A payment from {customer-email} for {form-title} has been received on {charge-date}. - - - -{custom-fields}' ); + return sprintf( + '

%s

%s
    %s%s
%s', + esc_html__( '🎉 Congrats! You just received {total-amount}', 'stripe' ), + sprintf( + /* translators: %1$s: Customer email, %2$s: Form title, %3$s: Charge date */ + esc_html__( 'A payment from %1$s for %2$s has been received on %3$s.', 'stripe' ), + '{customer-email}', + '{form-title}', + '{charge-date}' + ), + sprintf( + '
  • %s
  • ', + esc_url( '{payment-url}' ), + sprintf( + /* translators: %s: Total amount */ + esc_html__( 'View %s payment in Stripe →', 'stripe' ), + '{total-amount}' + ) + ), + sprintf( + '
  • %s
  • ', + esc_url( '{customer-url}' ), + sprintf( + /* translators: %s: Customer email */ + esc_html__( 'View %s in Stripe →', 'stripe' ), + '{customer-email}' + ) + ), + '{custom-fields}' + ); } - } diff --git a/src/Help/HelpUi.php b/src/Help/HelpUi.php index 8e44d6e4..97920dea 100644 --- a/src/Help/HelpUi.php +++ b/src/Help/HelpUi.php @@ -60,11 +60,18 @@ public function get_subscribed_events() { * @return void */ public function output() { + if ( is_admin() ) { + global $pagenow; + + if ( 'edit.php' === $pagenow && isset( $_GET['page'] ) && 'simpay-setup-wizard' === $_GET['page'] ) { + return; + } + } $docs = $this->context->get_all_docs(); wp_enqueue_style( 'simpay-admin-help', - SIMPLE_PAY_INC_URL . '/core/assets/css/simpay-admin-help.min.css', // @phpstan-ignore-line + SIMPLE_PAY_INC_URL . 'core/assets/css/simpay-admin-help.min.css', // @phpstan-ignore-line array( 'wp-components', ), @@ -92,7 +99,7 @@ public function output() { return; } - $asset_file = SIMPLE_PAY_INC . '/core/assets/js/simpay-admin-help.min.asset.php'; // @phpstan-ignore-line + $asset_file = SIMPLE_PAY_INC . 'core/assets/js/dist/simpay-admin-help.asset.php'; // @phpstan-ignore-line // Show an icon and link to external docs. if ( ! file_exists( $asset_file ) ) { @@ -103,7 +110,7 @@ public function output() { wp_enqueue_script( 'simpay-admin-help', - SIMPLE_PAY_INC_URL . '/core/assets/js/simpay-admin-help.min.js', // @phpstan-ignore-line + SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-admin-help.js', // @phpstan-ignore-line $asset_data['dependencies'], $asset_data['version'], true @@ -123,11 +130,16 @@ public function output() { ) ); + wp_set_script_translations( + 'simpay-admin-help', + 'simple-pay', + SIMPLE_PAY_DIR . '/languages' // @phpstan-ignore-line + ); + if ( ! $seen_help ) { update_option( 'simpay_has_seen_help_icon', true ); } echo '
    '; } - } diff --git a/src/NotificationInbox/Database/Query.php b/src/NotificationInbox/Database/Query.php old mode 100644 new mode 100755 diff --git a/src/NotificationInbox/Database/Schema.php b/src/NotificationInbox/Database/Schema.php old mode 100644 new mode 100755 diff --git a/src/NotificationInbox/Database/Table.php b/src/NotificationInbox/Database/Table.php old mode 100644 new mode 100755 diff --git a/src/NotificationInbox/NotificationInboxUi.php b/src/NotificationInbox/NotificationInboxUi.php index 08089496..505df149 100644 --- a/src/NotificationInbox/NotificationInboxUi.php +++ b/src/NotificationInbox/NotificationInboxUi.php @@ -60,7 +60,7 @@ public function output() { return; } - $asset_file = SIMPLE_PAY_INC . '/core/assets/js/simpay-admin-notifications.min.asset.php'; // @phpstan-ignore-line + $asset_file = SIMPLE_PAY_INC . 'core/assets/js/dist/simpay-admin-notifications.asset.php'; // @phpstan-ignore-line if ( ! file_exists( $asset_file ) ) { return; @@ -70,7 +70,7 @@ public function output() { wp_enqueue_script( 'simpay-admin-notifications', - SIMPLE_PAY_INC_URL . '/core/assets/js/simpay-admin-notifications.min.js', // @phpstan-ignore-line + SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-admin-notifications.js', // @phpstan-ignore-line $asset_data['dependencies'], $asset_data['version'], true @@ -84,9 +84,15 @@ public function output() { ) ); + wp_set_script_translations( + 'simpay-admin-notifications', + 'simple-pay', + SIMPLE_PAY_INC . 'core/languages' // @phpstan-ignore-line + ); + wp_enqueue_style( 'simpay-admin-notifications', - SIMPLE_PAY_INC_URL . '/core/assets/css/simpay-admin-notifications.min.css', // @phpstan-ignore-line + SIMPLE_PAY_INC_URL . 'core/assets/css/simpay-admin-notifications.min.css', // @phpstan-ignore-line array( 'wp-components', ), diff --git a/src/Plugin.php b/src/Plugin.php index a61e3861..d3eaa7c1 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -234,6 +234,7 @@ private function get_service_providers() { new Admin\DashboardWidget\DashboardWidgetServiceProvider, new Admin\Education\EducationServiceProvider, new Admin\SiteHealth\SiteHealthServiceProvider, + new Admin\Translations\TranslationsServiceProvider, ); if ( version_compare( $wp_version, '5.5', '>=' ) ) { diff --git a/src/Report/ActivityOverviewReport.php b/src/Report/ActivityOverviewReport.php index 280bc282..5b2e4da9 100644 --- a/src/Report/ActivityOverviewReport.php +++ b/src/Report/ActivityOverviewReport.php @@ -412,34 +412,70 @@ private function get_customers( $period ) { private function get_tips() { $tips = array( array( - 'title' => 'Set up automatic tax collection', + 'title' => __( + 'Set up automatic tax collection', + 'stripe' + ), 'href' => 'https://wpsimplepay.com/how-to-collect-taxes-for-stripe-payments-in-wordpress/', - 'text' => 'Charge a fixed tax rate to everyone or collect different taxes dynamically based on customer location', + 'text' => __( + 'Charge a fixed tax rate to everyone or collect different taxes dynamically based on customer location', + 'stripe' + ), ), array( - 'title' => 'Dynamically customize payment receipts', + 'title' => __( + 'Dynamically customize payment receipts', + 'stripe' + ), 'href' => 'https://wpsimplepay.com/how-to-easily-customize-stripe-email-receipts-in-wordpress/ ', - 'text' => 'Customize every single detail based on the data collected from users.', + 'text' => __( + 'Customize every single detail based on the data collected from users.', + 'stripe' + ), ), array( - 'title' => 'We support 10+ payment methods', + 'title' => __( + 'We support 10+ payment methods', + 'stripe' + ), 'href' => 'https://wpsimplepay.com/how-to-allow-users-to-choose-a-payment-method-in-wordpress/', - 'text' => 'Offer multiple payment methods and allow users to pay with their favorite.', + 'text' => __( + 'Offer multiple payment methods and allow users to pay with their favorite.', + 'stripe' + ), ), array( - 'title' => 'Smart inventory management', + 'title' => __( + 'Smart inventory management', + 'stripe' + ), 'href' => 'https://wpsimplepay.com/how-to-create-an-order-form-with-wordpress-step-by-step/', - 'text' => 'Automatically hide your payment form after a set number of payments.', + 'text' => __( + 'Automatically hide your payment form after a set number of payments.', + 'stripe' + ), ), array( - 'title' => 'Encourage payments with discount codes', + 'title' => __( + 'Encourage payments with discount codes', + 'stripe' + ), 'href' => 'https://wpsimplepay.com/how-to-add-a-coupon-code-field-to-your-wordpress-payment-forms/', - 'text' => 'Offer a fixed amount or a percentage discount for a specified duration or forever.', + 'text' => __( + 'Offer a fixed amount or a percentage discount for a specified duration or forever.', + 'stripe' + ) ), array( - 'title' => 'Remove Stripe processing fees', + 'title' => __( + 'Remove Stripe processing fees', + 'stripe' + ), 'href' => 'https://wpsimplepay.com/how-to-remove-credit-card-processing-fees-in-wordpress/', - 'text' => 'Charge an additional fee to ensure you receive the full payment amount.', + 'text' => __( + 'Charge an additional fee to ensure you receive the full payment amount.', + 'stripe' + ), ), ); diff --git a/src/RestApi/Internal/Payment/Utils/CouponUtils.php b/src/RestApi/Internal/Payment/Utils/CouponUtils.php index dc154824..7c134d80 100644 --- a/src/RestApi/Internal/Payment/Utils/CouponUtils.php +++ b/src/RestApi/Internal/Payment/Utils/CouponUtils.php @@ -35,7 +35,7 @@ class CouponUtils { * @param string $coupon_code The coupon code to get data for. * @param int $amount The amount to apply the coupon to. * @param string $currency The currency the coupon can apply to. - * @return array The coupon data. + * @return array The coupon data. */ public static function get_coupon_data( $request, $coupon_code, $amount, $currency ) { $form = PaymentRequestUtils::get_form( $request ); @@ -92,16 +92,6 @@ public static function get_coupon_data( $request, $coupon_code, $amount, $curren // Determines the discounted amount if percentage-based. if ( ! empty( $coupon->percent_off ) ) { - // We do not support 100% off coupons. - if ( (float) 100 === $coupon->percent_off ) { - return array( - 'error' => esc_html__( - 'Sorry, this coupon amount (100%) is not valid.', - 'stripe' - ), - ); - } - $discount_percent = ( 100 - $coupon->percent_off ) / 100; $discount = ( $amount - round( $amount * $discount_percent ) @@ -133,12 +123,22 @@ public static function get_coupon_data( $request, $coupon_code, $amount, $curren ); } - $min = simpay_convert_amount_to_cents( + $min = simpay_convert_amount_to_cents( simpay_global_minimum_amount() ); + $is_recurring = PaymentRequestUtils::is_recurring( $request ); + // Check if the coupon is not 100% and puts the total below the minimum amount for recurring price. + if ( $is_recurring && $amount > $discount && (float) 100 !== $coupon->percent_off && ( $amount - $discount ) < $min ) { + return array( + 'error' => esc_html__( + 'Sorry, this coupon puts the total below the required minimum amount.', + 'stripe' + ), + ); + } - // Check if the coupon puts the total below the minimum amount. - if ( ( $amount - $discount ) < $min ) { + // Check if the coupon is not 100% and puts the total below the minimum amount for non-recurring price. + if ( ! $is_recurring && ( $amount - $discount ) < $min ) { return array( 'error' => esc_html__( 'Sorry, this coupon puts the total below the required minimum amount.', @@ -148,15 +148,15 @@ public static function get_coupon_data( $request, $coupon_code, $amount, $curren } return array( - 'coupon' => $coupon, - 'message' => sprintf( + 'coupon' => $coupon, + 'discount' => $discount, + 'message' => sprintf( /* translators: %1$s Coupon code. %2$s discount amount. */ __( '%1$s: %2$s off', 'stripe' ), $coupon->id, $discount_formatted ), ); - } /** @@ -210,5 +210,4 @@ public static function get_discount_unit_amount( $request, $amount_to_discount, return (int) round( $unit_amount ); } - } diff --git a/src/RestApi/Internal/Payment/Utils/PaymentRequestUtils.php b/src/RestApi/Internal/Payment/Utils/PaymentRequestUtils.php index cf96f1a3..45c4fa88 100644 --- a/src/RestApi/Internal/Payment/Utils/PaymentRequestUtils.php +++ b/src/RestApi/Internal/Payment/Utils/PaymentRequestUtils.php @@ -248,9 +248,9 @@ public static function get_unit_amount( $request ) { * @return int */ public static function get_amount( $request ) { - $form = PaymentRequestUtils::get_form( $request ); - $unit_amount = PaymentRequestUtils::get_unit_amount( $request ); - $quantity = PaymentRequestUtils::get_quantity( $request ); + $form = self::get_form( $request ); + $unit_amount = self::get_unit_amount( $request ); + $quantity = self::get_quantity( $request ); $tax_status = get_post_meta( $form->id, '_tax_status', true ); $tax_behavior = get_post_meta( $form->id, '_tax_behavior', true ); @@ -321,15 +321,8 @@ public static function get_payment_intent_data( $request ) { // Fall back to Payment Form title if set. // This is a change in behavior in 4.1, but matches the Stripe Checkout // usage that falls back to the Product title (Payment Form title). - } else { - if ( ! empty( $form->company_name ) ) { + } elseif ( ! empty( $form->company_name ) ) { $payment_intent_data['description'] = $form->company_name; - } - } - - // Set the Statement Descriptor. This is empty by default. - if ( ! empty( $form->statement_descriptor ) ) { - $payment_intent_data['statement_descriptor'] = $form->statement_descriptor; } return $payment_intent_data; @@ -453,7 +446,8 @@ public static function get_payment_metadata( $request ) { if ( ! isset( $coupon_data['error'] ) ) { /** @var array $coupon_data */ - $metadata['simpay_coupon_code'] = $coupon_data['coupon']->id; + $metadata['simpay_coupon_code'] = $coupon_data['coupon']->id; + $metadata['simpay_discount_unit_amount'] = $coupon_data['discount']; } } @@ -532,7 +526,7 @@ public static function get_payment_method_types( $request ) { // Remove Payment Methods that do not support the current currency. $payment_methods = array_filter( $payment_methods, - function( $payment_method ) use ( $currency ) { + function ( $payment_method ) use ( $currency ) { return in_array( $currency, $payment_method->currencies, true ); } ); @@ -550,7 +544,7 @@ function( $payment_method ) use ( $currency ) { * @param \SimplePay\Pro\Payment_Methods\Payment_Method $payment_method The Payment Method. * @return bool */ - function( $payment_method ) { + function ( $payment_method ) { // Check for Stripe Checkout-specific overrides first. if ( is_array( $payment_method->stripe_checkout ) && @@ -566,7 +560,7 @@ function( $payment_method ) { } $payment_methods = array_map( - function( $payment_method_id ) { + function ( $payment_method_id ) { switch ( $payment_method_id ) { case 'ach-debit': return 'us_bank_account'; @@ -584,7 +578,7 @@ function( $payment_method_id ) { $emails = array_filter( $custom_fields, - function( $field ) { + function ( $field ) { return 'email' === $field['type']; } ); @@ -652,7 +646,7 @@ public static function get_payment_method_options( $request ) { $ach_direct_debit = array_filter( $payment_methods, - function( $payment_method ) { + function ( $payment_method ) { return 'ach-debit' === $payment_method->id; } ); @@ -682,7 +676,7 @@ function ( $payment_method_options ) use ( $is_recurring ) { // Filter out payment methods that are not available for the given request. return array_filter( $payment_method_options, - function( $payment_method_type ) use ( $payment_method_types ) { + function ( $payment_method_type ) use ( $payment_method_types ) { return in_array( $payment_method_type, $payment_method_types, true ); }, ARRAY_FILTER_USE_KEY @@ -746,5 +740,4 @@ public static function get_cancel_url( $request ) { return $cancel_url; } - } diff --git a/src/RestApi/Internal/Payment/Utils/SchemaUtils.php b/src/RestApi/Internal/Payment/Utils/SchemaUtils.php index 83675ec5..cf8456b8 100644 --- a/src/RestApi/Internal/Payment/Utils/SchemaUtils.php +++ b/src/RestApi/Internal/Payment/Utils/SchemaUtils.php @@ -477,7 +477,7 @@ public static function get_setup_intent_id_schema( $args = array() ) { 'type' => 'string', 'required' => true, 'description' => __( - 'The payment\'s setup intent ID.', + 'The payment\'s SetupIntent ID.', 'stripe' ), 'validate_callback' => 'rest_validate_request_arg', diff --git a/src/RestApi/Internal/Payment/Utils/SchemaValidationUtils.php b/src/RestApi/Internal/Payment/Utils/SchemaValidationUtils.php index 0a1e6a37..c1ddbdb7 100644 --- a/src/RestApi/Internal/Payment/Utils/SchemaValidationUtils.php +++ b/src/RestApi/Internal/Payment/Utils/SchemaValidationUtils.php @@ -329,8 +329,8 @@ public static function validate_coupon_code_arg( $value, $request, $param ) { } if ( - $request->get_param( 'price_id' ) && - false === $coupon->applies_to_form( $form->id ) + $request->get_param( 'price_id' ) && + false === $coupon->applies_to_form( $form->id ) ) { return false; } @@ -347,14 +347,13 @@ public static function validate_coupon_code_arg( $value, $request, $param ) { * @param array> $value The `form_values` parameter value. * @param \WP_REST_Request $request The payment request. * @param string $param The parameter name. - * @return bool + * @return bool|\WP_Error True if the form values are valid, \WP_Error otherwise. */ public static function validate_form_values_arg( $value, $request, $param ) { // First, validate the argument based on its registered schema. $validate = rest_validate_request_arg( $value, $request, $param ); - if ( is_wp_error( $validate ) ) { - return false; + return $validate; // Return the original \WP_Error. } // Next, validate that the form exists. @@ -364,110 +363,92 @@ public static function validate_form_values_arg( $value, $request, $param ) { $form_id = $request->get_param( 'form_id' ); $form_id = intval( $form_id ); $form = simpay_get_form( $form_id ); - if ( false === $form ) { - return false; + return new \WP_Error( 'invalid_form_id', __( 'The provided form ID is invalid.', 'stripe' ) ); } // Next, check for required fields. - /** @var array> $custom_fields */ $custom_fields = simpay_get_saved_meta( $form->id, '_custom_fields' ); - /** @var array $form_values */ - $form_values = $value; - - $always_required = array( - 'email', - 'address', - ); + $form_values = $value; + $always_required = array( 'email', 'address' ); foreach ( $custom_fields as $custom_field_type => $custom_field_types ) { foreach ( $custom_field_types as $field ) { /** @var array $field */ - if ( - ! in_array( $custom_field_type, $always_required, true ) && - ! isset( $field['required'] ) - ) { + if ( ! in_array( $custom_field_type, $always_required, true ) && ! isset( $field['required'] ) ) { continue; } // Check custom fields. if ( isset( $field['metadata'] ) ) { if ( empty( $field['metadata'] ) ) { - $id = isset( $field['uid'] ) - ? $field['uid'] - : ''; - + $id = isset( $field['uid'] ) ? $field['uid'] : ''; $meta_key = 'simpay-form-' . $form->id . '-field-' . $id; } else { $meta_key = $field['metadata']; } if ( ! isset( $form_values['simpay_field'][ $meta_key ] ) ) { - return false; + /* translators: %s is replaced with the required field. */ + return new \WP_Error( 'missing_required_field', sprintf( __( 'The required field "%s" is missing.', 'stripe' ), $meta_key ) ); } $value = trim( $form_values['simpay_field'][ $meta_key ] ); - if ( empty( $value ) ) { - return false; + /* translators: %s is replaced with the required field. */ + return new \WP_Error( 'empty_required_field', sprintf( __( 'The required field "%s" cannot be empty.', 'stripe' ), $meta_key ) ); } } // Check Customer fields. switch ( $custom_field_type ) { case 'tax_id': - if ( - ! isset( $form_values['simpay_tax_id'] ) || - ! isset( $form_values['simpay_tax_id_type'] ) - ) { - return false; + if ( ! isset( $form_values['simpay_tax_id'] ) || ! isset( $form_values['simpay_tax_id_type'] ) ) { + return new \WP_Error( 'missing_tax_id', __( 'Tax ID and Tax ID Type are required fields.', 'stripe' ) ); } /** @var string $tax_id */ $tax_id = $form_values['simpay_tax_id']; - /** @var string $tax_type */ $tax_type = $form_values['simpay_tax_id_type']; - $tax_id = trim( $tax_id ); $tax_type = trim( $tax_type ); if ( empty( $tax_id ) || empty( $tax_type ) ) { - return false; + return new \WP_Error( 'empty_tax_id', __( 'Tax ID and Tax ID Type cannot be empty.', 'stripe' ) ); } - break; - case 'address': - $address_type = ( - isset( $field['collect-shipping'] ) && - 'yes' === $field['collect-shipping'] - ) - ? 'shipping' - : 'billing'; + case 'address': + $address_type = ( isset( $field['collect-shipping'] ) && 'yes' === $field['collect-shipping'] ) ? 'shipping' : 'billing'; /** @var array> $address */ $address = $request->get_param( $address_type . '_address' ); if ( ! isset( $address['name'] ) ) { - return false; + /* translators: %s is replaced with the address type (billing or shipping).*/ + return new \WP_Error( 'missing_address_name', sprintf( __( 'The %s address name is required.', 'stripe' ), $address_type ) ); } if ( ! isset( $address['address']['country'] ) ) { - return false; + /* translators: %s is replaced with the address type (billing or shipping).*/ + return new \WP_Error( 'missing_address_country', sprintf( __( 'The %s address country is required.', 'stripe' ), $address_type ) ); } if ( ! isset( $address['address']['postal_code'] ) ) { - return false; + /* translators: %s is replaced with the address type (billing or shipping). */ + return new \WP_Error( 'missing_address_postal_code', sprintf( __( 'The %s address postal code is required.', 'stripe' ), $address_type ) ); } - break; + case 'email': case 'customer_name': case 'telephone': + $field_name = $field['label']; if ( ! isset( $form_values[ 'simpay_' . $custom_field_type ] ) ) { - return false; + /* translators: %s is replaced with the field type (email, customer_name, or telephone).*/ + return new \WP_Error( 'missing_' . $custom_field_type, sprintf( __( 'The %s field is required.', 'stripe' ), $field_name ) ); } /** @var string $value */ @@ -475,16 +456,17 @@ public static function validate_form_values_arg( $value, $request, $param ) { $value = trim( $value ); if ( empty( $value ) ) { - return false; + /* translators: %s is replaced with the field type (email, customer_name, or telephone). */ + return new \WP_Error( 'empty_' . $custom_field_type, sprintf( __( 'The %s field can not be empty.', 'stripe' ), $field_name ) ); } - break; } } } - // Finally, these values can be used. + /** + * Finally, these values can be used. + */ return true; } - } diff --git a/src/RestApi/Internal/SubscriptionsManagement/SendSubscriptions.php b/src/RestApi/Internal/SubscriptionsManagement/SendSubscriptions.php index 8aea40a3..272468d8 100644 --- a/src/RestApi/Internal/SubscriptionsManagement/SendSubscriptions.php +++ b/src/RestApi/Internal/SubscriptionsManagement/SendSubscriptions.php @@ -229,10 +229,6 @@ private function get_subscriptions( $customers ) { } } - if ( count( $subscriptions ) === 1 ) { - return array(); - } - return $subscriptions; } diff --git a/src/RestApi/__UnstableNotifications.php b/src/RestApi/__UnstableNotifications.php index a4e464bb..e5557dae 100644 --- a/src/RestApi/__UnstableNotifications.php +++ b/src/RestApi/__UnstableNotifications.php @@ -81,7 +81,7 @@ public function register_route() { ), 'status' => array( 'description' => __( - 'Notification dismissisal status.', + 'Notification dismissal status.', 'stripe' ), 'type' => 'string', diff --git a/src/Transaction/Database/Query.php b/src/Transaction/Database/Query.php old mode 100644 new mode 100755 diff --git a/src/Transaction/Database/Schema.php b/src/Transaction/Database/Schema.php old mode 100644 new mode 100755 diff --git a/src/Transaction/Database/Table.php b/src/Transaction/Database/Table.php old mode 100644 new mode 100755 diff --git a/stripe-checkout.php b/stripe-checkout.php index a192f3f5..4d2ea03c 100644 --- a/stripe-checkout.php +++ b/stripe-checkout.php @@ -5,7 +5,7 @@ * Description: Add high conversion Stripe payment forms to your WordPress site in minutes. * Author: WP Simple Pay * Author URI: https://wpsimplepay.com - * Version: 4.8.0 + * Version: 4.9.0 * Text Domain: stripe * Domain Path: /languages */ @@ -54,7 +54,7 @@ // // Lite/Pro-specific. // - define( 'SIMPLE_PAY_VERSION', '4.8.0' ); + define( 'SIMPLE_PAY_VERSION', '4.9.0' ); if ( ! defined( 'SIMPLE_PAY_PLUGIN_NAME' ) ) { define( 'SIMPLE_PAY_PLUGIN_NAME', 'WP Simple Pay Lite' ); diff --git a/vendor/autoload.php b/vendor/autoload.php index 8599f152..6b51f067 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit193cab31a517d11df66121c4f4930776::getLoader(); +return ComposerAutoloaderInit7abf4d20bb7a19977d9816908974e30a::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 34342e3d..4c67691f 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit193cab31a517d11df66121c4f4930776 +class ComposerAutoloaderInit7abf4d20bb7a19977d9816908974e30a { private static $loader; @@ -22,12 +22,12 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit193cab31a517d11df66121c4f4930776', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit7abf4d20bb7a19977d9816908974e30a', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit193cab31a517d11df66121c4f4930776', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit7abf4d20bb7a19977d9816908974e30a', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit193cab31a517d11df66121c4f4930776::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit7abf4d20bb7a19977d9816908974e30a::getInitializer($loader)); $loader->register(true); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 628babbd..7c4d022a 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit193cab31a517d11df66121c4f4930776 +class ComposerStaticInit7abf4d20bb7a19977d9816908974e30a { public static $prefixLengthsPsr4 = array ( 'S' => @@ -37,9 +37,9 @@ class ComposerStaticInit193cab31a517d11df66121c4f4930776 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit193cab31a517d11df66121c4f4930776::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit193cab31a517d11df66121c4f4930776::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit193cab31a517d11df66121c4f4930776::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit7abf4d20bb7a19977d9816908974e30a::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit7abf4d20bb7a19977d9816908974e30a::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit7abf4d20bb7a19977d9816908974e30a::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 45a4d234..4ee40f27 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'wpsimplepay/wp-simple-pay-pro-3', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '53a2e47223c131f7cddefc9090355338181e7c3c', + 'reference' => '1237271e191bfe440c2c61e1d9143af8f5079247', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -103,7 +103,7 @@ 'wpsimplepay/wp-simple-pay-pro-3' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '53a2e47223c131f7cddefc9090355338181e7c3c', + 'reference' => '1237271e191bfe440c2c61e1d9143af8f5079247', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/views/admin-branding-bar.php b/views/admin-branding-bar.php index a09b327c..0a55722d 100644 --- a/views/admin-branding-bar.php +++ b/views/admin-branding-bar.php @@ -19,7 +19,7 @@ diff --git a/views/admin-footer-promo.php b/views/admin-footer-promo.php index a3d466a0..4c1ee357 100644 --- a/views/admin-footer-promo.php +++ b/views/admin-footer-promo.php @@ -16,7 +16,6 @@