Version Description
Download this release
Release Info
Developer | NoseGraze |
Plugin | Easy Digital Downloads |
Version | 2.10.6 |
Comparing to | |
See all releases |
Code changes from version 2.10.5 to 2.10.6
- assets/css/edd-admin.css +56 -0
- assets/css/edd-admin.min.css +1 -1
- assets/js/admin-scripts.js +42 -0
- assets/js/admin-scripts.min.js +1 -1
- assets/js/edd-ajax.min.js +1 -1
- assets/js/edd-checkout-global.min.js +1 -1
- easy-digital-downloads.php +7 -3
- includes/admin/class-pass-manager.php +162 -0
- includes/admin/promos/class-promo-handler.php +129 -0
- includes/admin/promos/notices/abstract-notice.php +115 -0
- includes/admin/promos/notices/class-license-upgrade-notice.php +212 -0
- includes/api/class-edd-api.php +2 -0
- includes/class-edd-download.php +1 -1
- includes/class-edd-license-handler.php +71 -0
- includes/deprecated-functions.php +1 -1
- includes/formatting.php +1 -1
- includes/gateways/stripe/assets/js/build/app.min.js +1 -1
- includes/gateways/stripe/assets/js/src/frontend/stripe-elements/index.js +6 -3
- includes/gateways/stripe/edd-stripe.php +2 -2
- includes/gateways/stripe/includes/admin/settings/stripe-connect.php +1 -1
- includes/gateways/stripe/includes/admin/upgrade-functions.php +1 -1
- includes/gateways/stripe/includes/elements.php +1 -1
- includes/gateways/stripe/includes/functions.php +12 -6
- includes/gateways/stripe/includes/payment-actions.php +7 -5
- includes/gateways/stripe/vendor/composer/InstalledVersions.php +2 -2
- includes/gateways/stripe/vendor/composer/installed.php +2 -2
- includes/libraries/class-persistent-dismissible.php +270 -0
- includes/plugin-compatibility.php +2 -2
- languages/easy-digital-downloads.pot +80 -39
- readme.txt +15 -3
- templates/edd.min.css +1 -1
assets/css/edd-admin.css
CHANGED
@@ -2048,3 +2048,59 @@ td.edd_order_price {
|
|
2048 |
font-style: italic;
|
2049 |
width: 150px;
|
2050 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2048 |
font-style: italic;
|
2049 |
width: 150px;
|
2050 |
}
|
2051 |
+
|
2052 |
+
|
2053 |
+
/* Promo Notices
|
2054 |
+
-------------------------------------------------------------- */
|
2055 |
+
.edd-admin-notice-top-of-page {
|
2056 |
+
font-size: 15px;
|
2057 |
+
line-height: 1.4;
|
2058 |
+
color: #fff;
|
2059 |
+
margin-left: -20px;
|
2060 |
+
padding: 12px 32px 12px 20px;
|
2061 |
+
background: #2d6ca2;
|
2062 |
+
display: none;
|
2063 |
+
}
|
2064 |
+
@media screen and ( min-width: 783px ) {
|
2065 |
+
.edd-admin-notice-top-of-page {
|
2066 |
+
padding: 10px 46px 10px 22px;
|
2067 |
+
}
|
2068 |
+
}
|
2069 |
+
@media screen and ( min-width: 961px ) {
|
2070 |
+
.edd-admin-notice-top-of-page {
|
2071 |
+
text-align: center;
|
2072 |
+
}
|
2073 |
+
}
|
2074 |
+
.edd-admin-notice-top-of-page a {
|
2075 |
+
color: #fff;
|
2076 |
+
}
|
2077 |
+
.edd-admin-notice-top-of-page a:hover {
|
2078 |
+
text-decoration: none;
|
2079 |
+
}
|
2080 |
+
.edd-admin-notice-top-of-page .button-link {
|
2081 |
+
position: absolute;
|
2082 |
+
top: 48px;
|
2083 |
+
right: -1px;
|
2084 |
+
font-size: 20px;
|
2085 |
+
color: #fff;
|
2086 |
+
font-weight: bold;
|
2087 |
+
text-decoration: none;
|
2088 |
+
margin-left: 5px;
|
2089 |
+
padding: 6px 10px;
|
2090 |
+
}
|
2091 |
+
.edd-admin-notice-top-of-page .button-link:hover,
|
2092 |
+
.edd-admin-notice-top-of-page .button-link:active,
|
2093 |
+
.edd-admin-notice-top-of-page .button-link:focus {
|
2094 |
+
color: #fff;
|
2095 |
+
text-decoration: none;
|
2096 |
+
}
|
2097 |
+
@media screen and ( min-width: 601px ) {
|
2098 |
+
.edd-admin-notice-top-of-page .button-link {
|
2099 |
+
top: 1px;
|
2100 |
+
}
|
2101 |
+
}
|
2102 |
+
@media screen and ( min-width: 783px ) {
|
2103 |
+
.edd-admin-notice-top-of-page .button-link {
|
2104 |
+
right: 9px;
|
2105 |
+
}
|
2106 |
+
}
|
assets/css/edd-admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.edd-hidden{display:none}.edd-clearfix:after{content:".";display:block;height:0;text-indent:-9999px;visibility:hidden}.edd-notice .notice-dismiss,.edd-wrap a{text-decoration:none}a.edd-delete{color:#a00}a.edd-delete:hover{color:red}.download_page_edd-settings .form-table label{color:#666;font-size:14px;font-style:italic;margin:4px 0 0}.download_page_edd-settings .form-table input.small-text~label,.download_page_edd-settings .form-table input[type=checkbox]+label{display:inline}.download_page_edd-settings .form-table tr>th>h3,.download_page_edd-settings .form-table tr>th>strong{font-size:1.2em;font-weight:600;margin:0 auto}.edd-help-tip{cursor:help}.edd-ui-tooltip{position:absolute;background:#333!important;border-width:1px!important;border-radius:3px!important;box-shadow:1px 1px 2px 1px rgba(214,214,214,.5)!important;color:#dedede!important;max-width:300px!important;padding:7px!important;text-rendering:optimizeLegibility;text-shadow:none!important;z-index:9999!important}.download_page_edd-settings .edd-settings-payment-icon-wrapper{margin-right:10px;line-height:16px;height:16px;display:table}#edd-add-ons h2.nav-tab-wrapper{position:relative}.edd-tab-span{top:-6px;right:0;position:absolute}.edd-add-ons-footer{padding-top:10px}#edd-add-ons h2{margin:0 0 15px}.edd-add-ons-view-wrapper{height:50px}#edd-add-ons h2 .button-primary{position:absolute}#edd-add-ons .edd-extension{background:#fff;border:1px solid #ccc;float:left;padding:14px;position:relative;margin:0 15px 15px 0;width:320px;height:315px}#edd-add-ons .edd-extension h3{font-size:13px;margin:0 0 8px}#edd-add-ons .edd-extension .button-secondary{position:absolute;bottom:14px;left:14px}#edd-add-ons .edd-browse-all{clear:both;width:100%}#edd-add-ons .edd-extension .third-party{display:none}#edd-add-ons .edd-starter-package{background-color:#85c0e5;border-color:#62a9d7;color:#fff}#edd-add-ons .edd-starter-package h3{color:#fff}#edd-add-ons .edd-extension .wp-post-image{width:100%;height:auto;vertical-align:bottom}#edd-products{height:100px;min-width:200px}#edd-add-discount input[type=text],#edd-edit-discount input[type=text]{width:300px}#edd-add-discount input.edd-price-field,#edd-edit-discount input.edd-price-field{padding:3px 5px;width:75px}.download_page_edd-addons .wrap .wp-heading-inline,.edit-php.post-type-download .wrap .wp-heading-inline{display:none}.download_page_edd-addons .wrap>.page-title-action,.edit-php.post-type-download .wrap>.page-title-action{display:none}.download_page_edd-addons .wrap .nav-tab-wrapper .page-title-action,.edit-php.post-type-download .wrap .nav-tab-wrapper .page-title-action{top:7px;margin-left:5px}#edd-payment-filters{background:#f5f5f5;clear:both;background-image:-webkit-gradient(linear,left bottom,left top,from(#f5f5f5),to(#fafafa));background-image:-webkit-linear-gradient(bottom,#f5f5f5,#fafafa);background-image:-moz-linear-gradient(bottom,#f5f5f5,#fafafa);background-image:-o-linear-gradient(bottom,#f5f5f5,#fafafa);background-image:linear-gradient(to top,#f5f5f5,#fafafa);border-color:#dfdfdf;border-width:1px;border-style:solid;border-radius:3px;font-size:13px;line-height:2.1em;overflow:auto;padding:12px;margin:8px 0}#edd-payments-filter ul.subsubsub{margin-bottom:8px}#edd-payment-filters p{color:#777}#edd-payment-date-filters input{vertical-align:middle}tr.status-refunded td{background:#cecece;border-top-color:#ccc}.wp-list-table.downloads th#ID{width:80px}.wp-list-table.downloads th#details{width:130px}.wp-list-table.downloads th#date{width:140px}.wp-list-table.downloads th#user{width:130px}.edd-mobile-link{line-height:32px;vertical-align:middle}.edd-mobile-link img{max-width:80%;height:auto;float:left}@media handheld,only screen and (max-width:640px){.wp-list-table.downloads th{width:auto!important}}.download_page_edd-payment-history .ui-dialog .ui-dialog-titlebar-close span{margin-left:-8px;margin-top:-8px}#edd-download-link-textarea{width:100%}.edd_files_name_label{width:225px;float:left}.edd_files_url_label{width:220px;float:left}#postbox-container-1 .edd_files_name_label{width:80px}#postbox-container-1 .edd_files_url_label{width:80px}.edd-add-repeatable-row{margin:10px 0}.edd-add-repeatable-row .submit{padding:0!important}.edd_repeatable_upload_wrapper:not(:first-child),.edd_variable_prices_wrapper:not(:first-child){margin-top:12px}.edd-repeatable-row-actions{color:#777;font-size:12px}.edd-repeatable-row-actions a{text-decoration:none;width:auto;cursor:pointer;vertical-align:middle}.edd-repeatable-row-actions .toggle-custom-price-option-section{color:#777}.edd-repeatable-row-actions .toggle-custom-price-option-section:hover{color:#444}.edd-bundle-products-header,.edd-repeatable-row-header{clear:both;background:#f1f1f1;border:1px solid #e5e5e5}.edd-repeatable-row-header{cursor:move}.edd-bundled-product-row:after,.edd-bundled-product-row:before,.edd-repeatable-row-header:after,.edd-repeatable-row-header:before{content:'';display:table}.edd-bundled-product-row:after,.edd-repeatable-row-header:after{clear:both}.edd-repeatable-row-title{float:left;font-weight:600}.edd-bundled-product-item-reorder .edd-product-file-reorder{color:#e5e5e5;font-family:dashicons;content:"\f545";font-size:18px;font-weight:300;margin-left:4px;vertical-align:top;transition:.2s color}.edd-bundled-product-item-reorder .edd-product-file-reorder:hover{color:#bbb}.edd-repeatable-row-actions,.edd-repeatable-row-title{padding:8px;box-sizing:border-box}.edd-repeatable-row-actions{float:right;text-align:right;padding:8px}.edd-bundled-product-row .edd-remove-row,.edd-repeatable-row-actions .edd-remove-row{font-size:12px;width:auto;cursor:pointer}.edd-bundled-product-row,.edd-repeatable-row-standard-fields{background:#f9f9f9;padding:8px;border-width:0 1px 1px;border-style:solid;border-color:#e5e5e5}.edd-repeatable-row-setting-label{display:block;margin-bottom:4px}.edd-repeatable-row-setting-label .edd-help-tip{display:inline-block;margin-left:4px}.edd-bundled-product-row .edd-bundled-product-actions,.edd-bundled-product-row .edd-bundled-product-item,.edd-bundled-product-row .edd-bundled-product-item-reorder,.edd-bundled-product-row .edd-bundled-product-price-assignment,.edd-file-assignment,.edd-file-name,.edd-file-url,.edd-option-name,.edd-option-price,.edd_repeatable_default{display:inline-block;vertical-align:top}.edd-option-name{width:38%;margin-right:5%}.edd-option-price{min-width:100px}.edd_repeatable_default{text-align:center;min-width:80px}.edd-file-name{width:18%;margin-right:3%}.edd-file-url{width:65%}.edd-repeatable-row-standard-fields.has-variable-pricing .edd-file-url{width:38%;margin-right:5%}.edd-file-assignment{width:27%}.edd-file-assignment .edd-repeatable-row-setting-label{margin-bottom:0}.edd-custom-price-option-sections-wrap{display:none;border-width:0 1px 1px;border-style:solid;border-color:#e5e5e5;box-sizing:border-box;width:100%}.edd-custom-price-option-section{display:block;padding:10px 8px;border-bottom:1px solid rgba(222,222,222,.3)}.edd-custom-price-option-section:last-child{border-bottom:none}label.edd_prices_shipping{display:none!important}.edd-custom-price-option-section-title{display:block;font-size:14px;font-weight:600;padding:0 0 10px}.edd-custom-price-option-section>:not(.edd-custom-price-option-section-title){display:inline-block;padding-right:20px;vertical-align:top;margin-bottom:4px}.edd-custom-price-option-section>:not(.edd-custom-price-option-section-title) label{display:block;margin-bottom:2px}.edd-bundle-products-header{font-weight:600;padding:8px}.edd-bundled-product-row .edd-bundled-product-item-reorder{min-width:30px;margin-right:8px}.edd-bundled-product-row .edd-bundled-product-item-reorder .edd-product-file-reorder{font-size:20px;font-weight:300;padding:16px 4px 0;cursor:move}.edd-bundled-product-row .edd-bundled-product-item{width:60%;margin-right:3%}.edd-bundled-product-row.has-variable-pricing .edd-bundled-product-item{width:47%}.edd-bundled-product-row .edd-bundled-product-price-assignment{width:23%;margin-right:3%}.edd-bundled-product-row .edd-bundled-product-actions{float:right}.edd_repeatable_upload_wrapper .edd_repeatable_upload_field_container{position:relative}.edd_upload_file{background:#fff;display:block;padding:2px 8px 2px;position:absolute;top:3px;right:7px}.edd_upload_field{padding-right:8em!important}textarea#edd-payment-note{width:100%;height:4em;margin:0}#edd-purchased-files .row .edd-purchased-files-list-wrapper .download{line-height:1.4}#edd-purchased-files .edd-purchased-files-list-wrapper .edd-purchased-option{color:#666}input[class*=edd-price-field]{padding:3px 5px;width:75px}#edd-order-download-quantity[type=number].small-text,#edd-order-download-tax[type=text].small-text,[class*=item_] [class*=edd-payment-details-download-][type=number].small-text{height:25px}#edd-order-download-quantity[type=number].small-text,.item_price .edd-payment-details-download-quantity[type=number].small-text{width:55px}#edd-order-download-tax[type=text].small-text,.item_tax .edd-payment-details-download-item-tax[type=number].small-text{width:75px}.edd_repeatable_product_wrapper .edd-select,.edd_repeatable_upload_wrapper .pricing select{min-width:100%}#edd_product_notes_field{display:block;margin:12px 0 0;height:4em;width:100%}.edd_remove_repeatable{border:none;cursor:pointer;display:inline-block;padding:0;overflow:hidden;margin:8px 0 0 0;text-indent:-9999px;width:10px;height:10px}.edd_remove_repeatable:active,.edd_remove_repeatable:focus,.edd_remove_repeatable:hover{background-position:-10px 0!important}#edd-edit-order-form .column{width:32%}.edd-edit-purchase-element[class*=columns-] ul li{padding-right:1%}#edd-edit-order-form .column:nth-child(2n+1),#edd-edit-order-form .columns-4 .column:nth-child(2n+1),#edd-edit-order-form .columns-5 .column:nth-child(3n+1){margin-right:0}#edd-edit-order-form input.large-text{width:90%}.edd-edit-purchase-element ul li.download{width:35%}.edd-edit-purchase-element ul li.item_price{width:15%}.edd-edit-purchase-element ul li.item_price.item_quantity{width:25%}.edd-edit-purchase-element ul li.item_tax{width:15%}.edd-edit-purchase-element ul li.price{width:20%}.edd-admin-box .label{font-weight:600}.edd-admin-box-inside{border-bottom:1px solid #eee;clear:both;padding:3px 12px;margin:0;word-break:break-word}.rtl .edd-admin-box-inside{padding:5px 10px 5px 0}.edd-admin-box-inside .strong{font-weight:600}.edd-payment-fees .fee-label{color:#666;font-weight:400}.edd-admin-box .right{float:right}.rtl .edd-admin-box .right{float:left;margin-left:10px}#edd-order-details .inside,#edd-order-update .inside{margin:0;padding:0}#edd-order-update input.edd_datepicker{width:180px}#edd-order-update input[type=number].edd-payment-time-hour,#edd-order-update input[type=number].edd-payment-time-min{width:50px}#edd-order-update .edd-tax-rate{color:#9c9c9c;font-style:italic}#edd-order-resend-receipt .inside{margin-top:11px}#edd-order-resend-receipt .edd-order-resend-receipt-addresses{margin-top:10px}.edd-admin-box-inside:last-child{border-bottom:0}#edd-edit-order-form .data-payment-key{word-break:break-all}.edd-order-update-box #major-publishing-actions .button-secondary{margin-right:10px}.edd-edit-purchase-element .edd-select-chosen{width:196px}#edd-customer-details .order-data-address input,#edd-customer-details .order-data-column p.data input,#edd-edit-order-form .column input,#edd-order-address-country-wrap select,.edd-edit-purchase-element ul{clear:both;display:block}#edd-customer-details .customer-info .column{width:49%}#edd-customer-details .actions{float:right}.edd-order-data input.small-text{margin:0}.edd-order-data input.med-text{margin:0;width:100px}#edd-order-update span.label{display:inline;width:50px}.edd-order-update-box .button-primary{margin-right:0}#edd-edit-order-form .column .description{padding-right:10px}#edd-edit-order-form .column,.edd-edit-purchase-element ul li{display:inline-block;line-height:1.4;position:relative;margin:0;vertical-align:middle}.edd-edit-purchase-element .row{padding:12px}.edd-edit-purchase-element .row:not(:last-child){border-bottom:1px solid #eee}.edd-edit-purchase-element .row:nth-child(odd):not(.header){background-color:#f9f9f9}.edd-edit-purchase-element .row.header{padding:6px 12px;font-weight:600;vertical-align:top}.edd-edit-purchase-element ul{font-size:0}.edd-edit-purchase-element ul li{font-size:13px}#edd-order-data .data span{color:#666;font-weight:600}.edd-edit-purchase-element .inside{padding:12px}.edd-edit-purchase-element .edd-purchased-download-title{font-size:14px;font-weight:500}.edd-edit-purchase-element .edd-purchased-download-title .deleted{color:#777}.edd-edit-purchase-element .edd-purchased-download-actions{color:#777;line-height:1.4}.edd-edit-purchase-element .edd-purchased-download-actions .edd-purchased-download-actions-label{font-weight:500}.edd-edit-purchase-element .edd-purchased-download-actions a{color:#777;font-size:12px}.edd-edit-purchase-element .edd-purchased-download-actions a:hover{color:#444}.edd-edit-purchase-element .edd-purchased-download-actions .edd-order-remove-download{color:#a00}.edd-edit-purchase-element .edd-purchased-download-actions .edd-order-remove-download:hover{color:red}#edd-order-recalc-total{float:right}#edd_products .edd-select,.edd_repeatable_product_wrapper .edd-select,.edd_repeatable_upload_wrapper .pricing select{min-width:100%;max-width:200px}.edd_repeatable_product_wrapper td{overflow:visible}.edd-payment-details-label-mobile{display:none}@media screen and (max-width:1284px){.edd-edit-purchase-element ul li.download{padding-bottom:15px;width:100%}.edd-edit-purchase-element .edd-purchased-download-title{font-size:16px}.edd-edit-purchase-element ul li.item_price{width:22%}.edd-edit-purchase-element ul li.item_price.item_quantity{width:35%}.edd-edit-purchase-element ul li.item_tax{width:25%}.edd-edit-purchase-element ul li.price{width:20%}.edd-edit-purchase-element .edd-purchased-download-actions{padding-top:10px}.edd-add-download-to-purchase-header,.edd-purchased-files-header{display:none}.edd-payment-details-label-mobile{display:block;font-weight:500;padding-bottom:6px}}@media screen and (max-width:1024px){.edd-edit-purchase-element ul li.item_price.item_quantity{width:40%}.edd-edit-purchase-element ul li.price{width:24%}.edd-edit-purchase-element .edd-purchased-download-actions{padding-top:15px}.edd-edit-purchase-element .edd-purchased-download-actions,.edd-edit-purchase-element .edd-purchased-download-actions a{font-size:14px}}@media screen and (max-width:782px){#edd-edit-order-form .column{width:49%}.edd-edit-purchase-element ul li.item_price,.edd-edit-purchase-element ul li.item_price.item_quantity{padding-bottom:10px}.edd-edit-purchase-element ul li.item_price.item_quantity{width:35%}.edd-edit-purchase-element ul li.item_tax,.edd-edit-purchase-element ul li.price{width:20%;padding-bottom:10px}.edd-payment-details-label-mobile{font-size:14px;font-weight:500}.edd-payment-details-download-amount,.edd-price-currency{font-size:16px}.order-data-column input[type=email]{padding:6px 10px}}@media screen and (max-width:600px){.edd-edit-purchase-element ul li.item_price,.edd-edit-purchase-element ul li.item_price.item_quantity,.edd-edit-purchase-element ul li.item_tax{width:100%;padding-bottom:20px}.edd-edit-purchase-element .edd-add-download-to-purchase ul li.item_tax,.edd-edit-purchase-element ul li.price{width:100%;padding-bottom:0}.edd-edit-purchase-element .edd-add-download-to-purchase-actions{padding-top:15px}#edd-edit-order-form .column{width:100%}}#edd_product_stats .label{display:inline-block}#edd_product_stats hr{border-style:solid;border-width:1px;border-color:#ccc #fff #fff #ccc}#edd_product_stats .product-earnings-stats:before,#edd_product_stats .product-sales-stats:before{color:#82878c;font:normal 20px/1 dashicons;display:inline-block;padding:0 2px 0 0;position:relative;top:0;left:-1px;speak:none;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#edd_product_stats .product-sales-stats:before{content:'\f174'}#edd_product_stats .product-earnings-stats:before{content:'\f239'}.edd_dashboard_widget table thead td{border-bottom:1px solid #ececec;color:#777}.edd_dashboard_widget .table_left{float:left;width:45%}.edd_dashboard_widget .table_right{float:right;width:45%}.edd_dashboard_widget .inside{font-size:12px}.edd_dashboard_widget td{padding:3px 0}.edd_dashboard_widget .b,.edd_dashboard_widget .t{line-height:1.5;vertical-align:middle}.edd_dashboard_widget .b{font-size:14px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;padding-right:6px;width:auto}.edd_dashboard_widget .t{font-size:12px;padding-right:12px;color:#777;width:100%}.edd_dashboard_widget .label_heading{border-top:1px solid #ececec;color:#8f8f8f;font-family:Helvetica,Arial,sans-serif;font-size:12px;font-weight:400;display:block;padding-top:10px;margin:0 0 8px 12px}.edd_dashboard_widget .edd_dashboard_widget_subheading{border-top:1px solid #ececec;color:#8f8f8f;font-size:14px;padding-top:10px;margin:1em 0 0 0}.edd_dashboard_widget .edd_dashboard_widget_subheading+.table{margin:8px 0 0 0}.edd_dashboard_widget .edd_price_label{background:#00769c;border-radius:3px;color:#fff;font-size:10px;padding:2px 4px;margin-right:2px}.edd_dashboard_widget table{width:100%;margin-left:0;margin-bottom:1em}td.edd_order_label{width:80%}td.edd_order_price{text-align:right}@media handheld,only screen and (max-width:1000px){.edd_dashboard_widget .edd-recent-email{display:none}}#edd-dashboard-widgets-wrap .postbox h3{cursor:default}#edd-date-range-options,#edd-graphs-date-options{float:left}#edd-date-range-options span{float:left;line-height:24px;height:24px;margin-right:6px}.edd-import-export-form{position:relative}.edd-import-export-form .edd-progress{background:#ddd;position:absolute;bottom:15px;width:95%;height:15px}.edd-import-export-form .edd-progress div{background:#ccc;height:100%;width:0}.edd-import-export-form .notice-wrap{background-color:#f4f4f4;border-style:solid;border-width:1px 0;border-color:#eae9e9;padding:12px 12px 4px;overflow:auto;margin:20px -12px -23px;position:relative;width:100%}.edd-import-export-form .notice-wrap .spinner{margin:4px 10px 8px;float:right}.admin-color-fresh .edd-import-export-form .edd-progress div{background:#0073aa}.admin-color-light .edd-import-export-form .edd-progress div{background:#888}.admin-color-blue .edd-import-export-form .edd-progress div{background:#096484}.admin-color-coffee .edd-import-export-form .edd-progress div{background:#c7a589}.admin-color-ectoplasm .edd-import-export-form .edd-progress div{background:#a3b745}.admin-color-midnight .edd-import-export-form .edd-progress div{background:#e14d43}.admin-color-sunrise .edd-import-export-form .edd-progress div{background:#dd823b}#edd-graphs-filter label{vertical-align:inherit}#edd-graphs-filter .graph-option-section{float:left;line-height:2.5em;padding-right:5px}.edd-mix-totals{background-color:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:10px}.edd-mix-chart{display:inline-block;width:49%;vertical-align:top}.edd-graph-notes{color:#9c9c9c}.edd-graph-notes span{display:block}.edd-pie-graph .legend{display:none}.edd-pie-legend{overflow:auto;margin-top:10px}.edd-legend-item-wrapper{color:#333;display:inline-block;font-size:8pt;padding:2px 5px 0 5px;width:48%;height:20px}.edd-legend-color{border:1px solid #cfcfcf;display:inline-block;margin-right:5px;width:20px;height:15px}.edd-pie-legend-item{display:inline-block;vertical-align:top;width:80%}[id*=edd-recapture-].button,[id*=edd-sendwp-].button{font-size:16px;height:auto;padding:8px 14px;margin:6px 0 0}[id*=edd-recapture-].button .dashicons,[id*=edd-sendwp-].button .dashicons{line-height:29px;margin-right:8px}[id*=edd-recapture-].button .edd-loading,[id*=edd-recapture-].button .edd-loading:after,[id*=edd-sendwp-].button .edd-loading,[id*=edd-sendwp-].button .edd-loading:after{border-radius:50%;display:inline-block;width:14px;height:14px}[id*=edd-recapture-].button .edd-loading,[id*=edd-sendwp-].button .edd-loading{position:relative;top:3px;margin-left:4px;box-shadow:0 0 2px rgba(0,0,0,.2)}[id*=edd-recapture-].button .edd-loading,[id*=edd-sendwp-].button .edd-loading{-webkit-animation:edd-spinning 1.1s infinite linear;animation:edd-spinning 1.1s infinite linear;border-top:2px solid rgba(255,255,255,.5);border-right:2px solid rgba(255,255,255,.5);border-bottom:2px solid rgba(255,255,255,.5);border-left:2px solid #fff;font-size:14px;-ms-transform:translateZ(0);transform:translateZ(0)}#edd-recapture-disconnect.button .edd-loading.dark,#edd-sendwp-disconnect.button .edd-loading.dark{border-top-color:rgba(0,0,0,.2);border-right-color:rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.2);border-left-color:#666;box-shadow:none}.recapture-notice{position:relative}@-webkit-keyframes edd-spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes edd-spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}#edd_tax_rates{margin:1em 0 0}#edd_tax_rates .edd_tax_country *,#edd_tax_rates .edd_tax_state *{max-width:100%}#edd_tax_rates .edd_tax_country,#edd_tax_rates .edd_tax_state{width:180px}#edd_tax_rates .edd_tax_rate{width:80px}#edd_tax_rates th{padding:15px 10px}.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tbody,.wrap-licenses td,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:block}.wrap-licenses .form-table tr{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:30.5%;max-width:350px;padding:14px;min-height:220px;position:relative;box-sizing:border-box}.wrap-licenses .form-table th{background:#f9f9f9;padding:14px;border-bottom:1px solid #ccc;margin:-14px -14px 20px;width:100%}.wrap-licenses .form-table td{padding:0}.wrap-licenses td input.regular-text{margin:0 0 8px;width:100%}.wrap-licenses .edd-license-data[class*=edd-license-]{position:absolute;background:#fafafa;padding:14px;border-top:1px solid #eee;margin:20px -14px -14px;min-height:67px;width:100%;bottom:14px;box-sizing:border-box}.wrap-licenses .edd-license-data[class*=edd-license-] a{color:#444}.wrap-licenses .edd-license-data[class*=edd-license-] a:hover{text-decoration:none}.wrap-licenses .edd-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}.wrap-licenses .edd-license-data.edd-license-expired{background-color:#e24e4e;color:#fff;border-color:#e24e4e}.wrap-licenses .edd-license-data.edd-license-error,.wrap-licenses .edd-license-data.edd-license-invalid,.wrap-licenses .edd-license-data.edd-license-item_name_mismatch,.wrap-licenses .edd-license-data.edd-license-missing,.wrap-licenses .edd-license-data.edd-license-site_inactive{background-color:#ffebcd;border-color:#ffebcd}.wrap-licenses .edd-license-data p{font-size:13px;margin-top:0}.wrap-licenses .edd-license-data.edd-license-expired a,.wrap-licenses .edd-license-data.license-expires-soon-notice a{color:#fff}.wrap-licenses .edd-license-data.edd-license-expired a:hover,.wrap-licenses .edd-license-data.license-expires-soon-notice a:hover{text-decoration:none}.wrap-licenses p.submit{clear:both}#system-info-textarea{background:0 0;font-family:Menlo,Monaco,monospace;display:block;overflow:auto;white-space:pre;width:800px;height:400px}#TB_window #edd-add-download:active,#TB_window #edd-add-download:focus,#TB_window #edd-add-download:hover{color:#fff}.edd-graph .y1Axis{color:#edc240!important}.edd-graph .y2Axis{color:#afd8f8!important}.download_page_edd-tools .apikeys .column-user{width:192px}.edd-select-chosen{width:100%;max-width:300px}.chosen-container-multi .chosen-choices{background-image:none;border-color:#dfdfdf;-webkit-border-radius:3px;border-radius:3px}.chosen-container-multi .chosen-choices input{border-color:#dfdfdf;height:27px!important;margin:2px}.chosen-container .chosen-drop{border-color:#aaa;-webkit-box-shadow:1px 1px 2px rgba(0,0,0,.1);box-shadow:1px 1px 2px rgba(0,0,0,.1)}.chosen-container .search-field{float:none!important}.chosen-container .search-field input{width:90%!important}.chosen-container-active .chosen-choices{border-color:#aaa;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;-webkit-box-shadow:1px 1px 2px rgba(0,0,0,.1);box-shadow:1px 1px 2px rgba(0,0,0,.1)}.download_page_edd-tools .tablenav .actions{overflow:visible}.edd_user_search_wrap{position:relative;overflow:visible}.edd_user_search_results{position:absolute;left:0;top:27px}.edd_user_search_results a.edd-ajax-user-cancel{position:absolute;right:6px;top:2px}.edd_user_search_results ul{background:#f0f0f0;border:1px solid #dfdfdf;overflow-y:scroll;padding:10px 10px 4px;margin:0;max-height:200px;width:300px}.wp-list-table .type-download .row-actions{color:#999}@media screen and (max-width:1100px){.edd-mix-chart{display:block;width:100%}.wrap-licenses .form-table tr{width:46%;max-width:none;min-height:230px}}@media screen and (max-width:782px){.post-type-download .nav-tab-wrapper a{font-size:70%;padding:2px 4px}.download_page_edd-tools .apikeys .column-user{width:80px}.license-expiration-date-notice,.license-lifetime-notice,.license-null{padding-left:0}[class^=license-] input[type=text]{margin-bottom:3px}}@media screen and (max-width:600px){.wrap-licenses .form-table tr{width:100%;min-height:230px}#edd-edit-order-form input.large-text{width:100%}}#edd-item-wrapper{background:#f5f5f5;border:1px solid #e5e5e5;webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);max-width:830px}#edd-item-wrapper:after{content:"";display:block;clear:both;visibility:hidden;font-size:0;height:0}#edd-item-tab-wrapper{float:left;width:18%;z-index:1}#edd-item-tab-wrapper-list{background:#fff;margin:0}#edd-item-tab-wrapper-list li{display:block;background-color:#eaeaea;color:#444;font-size:12px;border-bottom:1px solid #e5e5e5;margin-bottom:0;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;word-wrap:break-word}#edd-item-tab-wrapper-list li a{display:block;padding:8px 10px 8px 6px}#edd-item-tab-wrapper-list li.active{display:block;background-color:#fff;padding:8px 10px 8px 6px}#edd-item-tab-wrapper-list .inactive a,#edd-item-tab-wrapper-list .inactive a:visited{background-color:#f5f5f5;color:#444;text-decoration:none}#edd-item-tab-wrapper-list .inactive a:hover{background-color:#fff}#edd-item-tab-wrapper-list .dashicons{color:#444;font-size:16px;min-width:24px;height:auto}#edd-item-card-wrapper .left{float:left}#edd-item-card-wrapper .right{float:right}#edd-item-card-wrapper input{font-weight:400}#edd-item-card-wrapper{background-color:#fff;border:1px solid #e5e5e5;display:inline-block;margin-left:-1px;min-height:200px;width:700px;z-index:2}.edd-item-has-tabs #edd-item-card-wrapper{border-width:0 0 0 1px;width:82%}#edd-item-card-wrapper .customer-section{border-bottom:1px solid #eee;margin-bottom:10px;overflow:auto}#edd-item-card-wrapper .customer-section table{margin-bottom:20px}#edd-item-card-wrapper>div{padding:0 20px}#edd-item-card-wrapper>div:first-child{padding-top:20px}#edd-item-card-wrapper>div:last-child{border:none;padding-bottom:20px}#edd-item-card-wrapper .avatar-wrap{padding-right:10px;text-align:center}#edd-item-card-wrapper .customer-id{font-size:24px;font-weight:600}#edd-item-card-wrapper .customer-main-wrapper input{width:200px}#edd-item-card-wrapper .customer-address-wrapper{margin-right:25px;max-width:33%;width:202px}#edd-item-card-wrapper .customer-address-wrapper select{width:200px}#edd-item-card-wrapper .customer-info{margin-top:5px;margin-bottom:10px;min-height:185px}#edd-item-card-wrapper .info-wrapper{min-height:125px;overflow:visible}#edd-item-card-wrapper a.delete{color:red;margin-right:5px;text-decoration:none}.customer-info .customer-name{font-size:24px;font-weight:600}.customer-edit-link a,.disconnect-user a{font-size:12px;font-weight:400;text-decoration:none}#customer-edit-actions{line-height:28px;margin-bottom:20px;text-align:center}#customer-edit-actions .button-secondary{margin-right:10px}#edd-item-card-wrapper .row-title{width:30%}#edd-item-card-wrapper .info-item{display:block;line-height:16px;padding-bottom:5px}#edd-item-card-wrapper .edit-item{display:none}#edd-item-card-wrapper .edd_user_search_results{left:1px;top:16px}#edd-item-card-wrapper .edd_user_search_results ul{width:200px}#edd-item-stats-wrapper{margin:0 auto;min-height:30px;text-align:center}#edd-item-stats-wrapper li{font-size:14px;float:left;line-height:22px;width:50%}#edd-item-stats-wrapper a{text-decoration:none}#edd-item-stats-wrapper .dashicons{color:#888}#edd-item-tables-wrapper table{text-align:center;width:100%}#edd-item-tables-wrapper th{text-align:center}#edd-item-tables-wrapper .downloads tr>td:first-child,#edd-item-tables-wrapper .downloads tr>th:first-child,#edd-item-tables-wrapper .emails tr>td:first-child,#edd-item-tables-wrapper .emails tr>th:first-child{text-align:left}#edd-item-tables-wrapper .downloads tr>td:only-child{text-align:center}#edd-item-tables-wrapper .emails .add-customer-email-row td{background-color:#f9f9f9;border-top:1px solid #e5e5e5}#edd-item-tables-wrapper .emails .primary-email-icon{font-size:13px;vertical-align:middle;line-height:1.5em}#edd-item-tables-wrapper .emails input{vertical-align:middle;margin:6px 0}#edd-item-tables-wrapper .emails .spinner{float:none}#edd-item-notes-wrapper{min-height:50px}.edd-item-notes-header img,.edd-item-notes-header span{font-weight:600;line-height:30px;vertical-align:middle}.customer-note-input{margin-bottom:5px;width:100%}#edd-customer-notes div:nth-of-type(even){background-color:#fcfcfc}.customer-note-wrapper{border-bottom:1px solid #f9f9f9;min-height:38px;padding:7px 0 7px 7px}.customer-note-wrapper span{display:block}.note-content-wrap{padding-top:7px}.delete-customer{text-align:center}#edd-item-card-wrapper .notice-container{padding-left:20px;padding-right:20px;margin-left:-20px;margin-right:-20px}#edd-item-card-wrapper .add-customer-email-wrapper>#add-customer-email{vertical-align:middle}@media screen and (max-width:810px) and (min-width:656px){.customer-info .customer-name{font-size:16px}#edd-item-card-wrapper .widefat td,.widefat th{padding:4px 6px;max-width:100px!important;display:table-cell}}@media screen and (max-width:781px){#edd-item-card-wrapper,#edd-item-tab-wrapper{margin:0;width:100%}#edd-item-tab-wrapper-list{background:#fff;margin:0}#edd-item-tab-wrapper-list li{float:left;display:inline;font-size:14px;box-sizing:border-box;border-width:0 1px 1px 0;border-style:solid;border-color:#e5e5e5;width:33.33333%}#edd-item-tab-wrapper-list li:nth-child(3n+3){border-width:0 0 1px 0}#edd-item-tab-wrapper-list .dashicons{font-size:18px}.edd-item-has-tabs #edd-item-card-wrapper{border-top:1px solid #e5e5e5;border-left:0;margin-top:-1px;width:100%}}@media screen and (max-width:656px){#edd-item-card-wrapper .customer-info{min-height:220px}.edd-item-info.customer-info{position:relative}#edd-item-card-wrapper .customer-address-wrapper{float:none;position:absolute;top:84px;left:110px;max-width:200px}#edd-item-card-wrapper .customer-main-wrapper{float:none;position:absolute;left:110px}.customer-info .customer-name{font-size:16px}#edd-item-card-wrapper #edd-item-stats-wrapper{padding-left:0;padding-right:0}#edd-item-card-wrapper .customer-section{margin-bottom:0}#edd-item-card-wrapper .widefat td,#edd-item-card-wrapper .widefat th{padding:4px 6px;max-width:100px!important;display:table-cell;overflow:hidden}#edd-item-card-wrapper .customer-id{font-size:16px}}@media screen and (max-width:480px){#edd-item-tab-wrapper-list li{width:50%}#edd-item-tab-wrapper-list li:nth-child(3n+3){border-width:0 1px 1px 0}#edd-item-tab-wrapper-list li:nth-child(even){border-width:0 0 1px 0}.edd-repeatable-row-actions,.edd-repeatable-row-title{text-align:left;width:100%}.edd-repeatable-row-title{padding-bottom:0}.edd-bundled-product-item-reorder,.edd-bundled-product-row .edd-bundled-product-item,.edd-bundled-product-row .edd-bundled-product-price-assignment,.edd-file-assignment,.edd-file-name,.edd-file-url,.edd-option-name,.edd-option-price,.edd_repeatable_default{float:none;text-align:left;width:100%!important;margin:10px 0}.edd-bundled-product-row .edd-bundled-product-actions{float:none}.edd-bundled-product-row .edd-bundled-product-item-reorder .edd-product-file-reorder{padding:0}#edd-payment-filters span{display:block;margin:2px 0}#edd-payment-filters a,.download_page_edd-reports .button{text-align:center}#edd-payment-date-filters span{display:block}#edd-payment-date-filters span>input{float:right}#edd-add-discount select[multiple] option,#edd-edit-discount select[multiple] option{height:20px}#edd-add-discount input[type=text],#edd-edit-discount input[type=text],#edd-payment-filters a,#edd-payment-filters input:not([type=radio]),#edd-payment-filters select,#system-info-textarea,.download_page_edd-reports .inside .button,.download_page_edd-reports .inside input[type=submit],.download_page_edd-reports .inside input[type=text],.download_page_edd-reports .inside select,.download_page_edd-settings .inside input[type=button],.download_page_edd-tools .inside input[type=submit],.download_page_edd-tools .inside input[type=text],.download_page_edd-tools .inside select{width:100%}#edd-add-discount select[multiple],#edd-edit-discount select[multiple],.download_page_edd-tools select[multiple]{height:200px!important}.download_page_edd-settings input[type=checkbox]{margin:2px 0}.post-type-download input[type=checkbox]{margin-left:2px}}.recount-stats-controls form{display:inline}.edd-recount-stats-descriptions span{display:none;line-height:24px}#edd-debug-log p.submit{margin:20px 0 0;padding:0}#edd-debug-log .edd-inline-button{margin-left:5px}.edd-settings-sidebar{padding-top:27px}.edd-settings-sidebar-content{background-color:#fff;text-align:center;border:1px solid #ddd;box-sizing:border-box;max-width:300px}.edd-settings-sidebar-content p{font-size:14px;line-height:1.5;margin-top:0}.edd-sidebar-header-section{background-color:#35495c;line-height:1;padding:26px 20px 24px;border-bottom:3px dashed #fafafa}.edd-sidebar-description-section{background-color:#fafafa;padding:16px 20px;border-bottom:1px solid #ddd}.edd-sidebar-description-section .edd-sidebar-description{margin:0}.edd-sidebar-coupon-section{font-size:14px;padding:16px 20px}.edd-sidebar-coupon-section label{display:block;line-height:1.4;margin-bottom:6px}.edd-sidebar-coupon-section label strong{color:#253b51;font-weight:700}.edd-sidebar-coupon-section input{background:#f4f7fa;font-size:22px;font-weight:600;text-align:center;padding:10px;border:2px dashed #2794da;border-radius:4px;margin-bottom:16px;box-shadow:none;width:100%}.edd-sidebar-coupon-section input:focus{border:2px dashed #2794da;box-shadow:none}.edd-settings-sidebar-content .edd-coupon-note{color:#6c7883;font-size:13px;font-style:italic;margin:0}.edd-settings-sidebar-content .edd-coupon-note a{color:#253b51}.edd-settings-sidebar-content .edd-coupon-note a:hover{text-decoration:none}.edd-sidebar-footer-section{background-color:#fafafa;padding:16px 20px;border-top:1px solid #ddd}.edd-sidebar-footer-section .edd-cta-button{display:block;background-color:#2794da;color:#fff;text-decoration:none;font-size:20px;font-weight:700;text-transform:uppercase;padding:17px 10px;border:none;border-radius:4px;width:100%;box-sizing:border-box;box-shadow:none;transition:background-color .2s}.edd-sidebar-footer-section .edd-cta-button:hover{background-color:#2386c5}@media all and (min-width:1080px){.edd-has-sidebar .edd-settings-content{float:left;width:67%}.edd-has-sidebar .edd-settings-sidebar{float:right;width:31%}}@media all and (min-width:1240px){.edd-has-sidebar .edd-settings-content{width:74%}.edd-has-sidebar .edd-settings-sidebar{width:23%}}.taxes-tab .edd-has-sidebar .edd-settings-content,.taxes-tab .edd-has-sidebar .edd-settings-sidebar{float:none;width:100%}.bfcm-promo-img-container{background-color:#35495c;width:100%;height:160px}.bfcm-code{color:#2794da;font-weight:700}.sale-ends{position:absolute;bottom:9px;right:14px;display:inline-block;color:#6c7883;font-size:12px;text-align:right;font-style:italic;width:150px}
|
1 |
+
.edd-hidden{display:none}.edd-clearfix:after{content:".";display:block;height:0;text-indent:-9999px;visibility:hidden}.edd-notice .notice-dismiss,.edd-wrap a{text-decoration:none}a.edd-delete{color:#a00}a.edd-delete:hover{color:red}.download_page_edd-settings .form-table label{color:#666;font-size:14px;font-style:italic;margin:4px 0 0}.download_page_edd-settings .form-table input.small-text~label,.download_page_edd-settings .form-table input[type=checkbox]+label{display:inline}.download_page_edd-settings .form-table tr>th>h3,.download_page_edd-settings .form-table tr>th>strong{font-size:1.2em;font-weight:600;margin:0 auto}.edd-help-tip{cursor:help}.edd-ui-tooltip{position:absolute;background:#333!important;border-width:1px!important;border-radius:3px!important;box-shadow:1px 1px 2px 1px rgba(214,214,214,.5)!important;color:#dedede!important;max-width:300px!important;padding:7px!important;text-rendering:optimizeLegibility;text-shadow:none!important;z-index:9999!important}.download_page_edd-settings .edd-settings-payment-icon-wrapper{margin-right:10px;line-height:16px;height:16px;display:table}#edd-add-ons h2.nav-tab-wrapper{position:relative}.edd-tab-span{top:-6px;right:0;position:absolute}.edd-add-ons-footer{padding-top:10px}#edd-add-ons h2{margin:0 0 15px}.edd-add-ons-view-wrapper{height:50px}#edd-add-ons h2 .button-primary{position:absolute}#edd-add-ons .edd-extension{background:#fff;border:1px solid #ccc;float:left;padding:14px;position:relative;margin:0 15px 15px 0;width:320px;height:315px}#edd-add-ons .edd-extension h3{font-size:13px;margin:0 0 8px}#edd-add-ons .edd-extension .button-secondary{position:absolute;bottom:14px;left:14px}#edd-add-ons .edd-browse-all{clear:both;width:100%}#edd-add-ons .edd-extension .third-party{display:none}#edd-add-ons .edd-starter-package{background-color:#85c0e5;border-color:#62a9d7;color:#fff}#edd-add-ons .edd-starter-package h3{color:#fff}#edd-add-ons .edd-extension .wp-post-image{width:100%;height:auto;vertical-align:bottom}#edd-products{height:100px;min-width:200px}#edd-add-discount input[type=text],#edd-edit-discount input[type=text]{width:300px}#edd-add-discount input.edd-price-field,#edd-edit-discount input.edd-price-field{padding:3px 5px;width:75px}.download_page_edd-addons .wrap .wp-heading-inline,.edit-php.post-type-download .wrap .wp-heading-inline{display:none}.download_page_edd-addons .wrap>.page-title-action,.edit-php.post-type-download .wrap>.page-title-action{display:none}.download_page_edd-addons .wrap .nav-tab-wrapper .page-title-action,.edit-php.post-type-download .wrap .nav-tab-wrapper .page-title-action{top:7px;margin-left:5px}#edd-payment-filters{background:#f5f5f5;clear:both;background-image:-webkit-gradient(linear,left bottom,left top,from(#f5f5f5),to(#fafafa));background-image:-webkit-linear-gradient(bottom,#f5f5f5,#fafafa);background-image:-moz-linear-gradient(bottom,#f5f5f5,#fafafa);background-image:-o-linear-gradient(bottom,#f5f5f5,#fafafa);background-image:linear-gradient(to top,#f5f5f5,#fafafa);border-color:#dfdfdf;border-width:1px;border-style:solid;border-radius:3px;font-size:13px;line-height:2.1em;overflow:auto;padding:12px;margin:8px 0}#edd-payments-filter ul.subsubsub{margin-bottom:8px}#edd-payment-filters p{color:#777}#edd-payment-date-filters input{vertical-align:middle}tr.status-refunded td{background:#cecece;border-top-color:#ccc}.wp-list-table.downloads th#ID{width:80px}.wp-list-table.downloads th#details{width:130px}.wp-list-table.downloads th#date{width:140px}.wp-list-table.downloads th#user{width:130px}.edd-mobile-link{line-height:32px;vertical-align:middle}.edd-mobile-link img{max-width:80%;height:auto;float:left}@media handheld,only screen and (max-width:640px){.wp-list-table.downloads th{width:auto!important}}.download_page_edd-payment-history .ui-dialog .ui-dialog-titlebar-close span{margin-left:-8px;margin-top:-8px}#edd-download-link-textarea{width:100%}.edd_files_name_label{width:225px;float:left}.edd_files_url_label{width:220px;float:left}#postbox-container-1 .edd_files_name_label{width:80px}#postbox-container-1 .edd_files_url_label{width:80px}.edd-add-repeatable-row{margin:10px 0}.edd-add-repeatable-row .submit{padding:0!important}.edd_repeatable_upload_wrapper:not(:first-child),.edd_variable_prices_wrapper:not(:first-child){margin-top:12px}.edd-repeatable-row-actions{color:#777;font-size:12px}.edd-repeatable-row-actions a{text-decoration:none;width:auto;cursor:pointer;vertical-align:middle}.edd-repeatable-row-actions .toggle-custom-price-option-section{color:#777}.edd-repeatable-row-actions .toggle-custom-price-option-section:hover{color:#444}.edd-bundle-products-header,.edd-repeatable-row-header{clear:both;background:#f1f1f1;border:1px solid #e5e5e5}.edd-repeatable-row-header{cursor:move}.edd-bundled-product-row:after,.edd-bundled-product-row:before,.edd-repeatable-row-header:after,.edd-repeatable-row-header:before{content:'';display:table}.edd-bundled-product-row:after,.edd-repeatable-row-header:after{clear:both}.edd-repeatable-row-title{float:left;font-weight:600}.edd-bundled-product-item-reorder .edd-product-file-reorder{color:#e5e5e5;font-family:dashicons;content:"\f545";font-size:18px;font-weight:300;margin-left:4px;vertical-align:top;transition:.2s color}.edd-bundled-product-item-reorder .edd-product-file-reorder:hover{color:#bbb}.edd-repeatable-row-actions,.edd-repeatable-row-title{padding:8px;box-sizing:border-box}.edd-repeatable-row-actions{float:right;text-align:right;padding:8px}.edd-bundled-product-row .edd-remove-row,.edd-repeatable-row-actions .edd-remove-row{font-size:12px;width:auto;cursor:pointer}.edd-bundled-product-row,.edd-repeatable-row-standard-fields{background:#f9f9f9;padding:8px;border-width:0 1px 1px;border-style:solid;border-color:#e5e5e5}.edd-repeatable-row-setting-label{display:block;margin-bottom:4px}.edd-repeatable-row-setting-label .edd-help-tip{display:inline-block;margin-left:4px}.edd-bundled-product-row .edd-bundled-product-actions,.edd-bundled-product-row .edd-bundled-product-item,.edd-bundled-product-row .edd-bundled-product-item-reorder,.edd-bundled-product-row .edd-bundled-product-price-assignment,.edd-file-assignment,.edd-file-name,.edd-file-url,.edd-option-name,.edd-option-price,.edd_repeatable_default{display:inline-block;vertical-align:top}.edd-option-name{width:38%;margin-right:5%}.edd-option-price{min-width:100px}.edd_repeatable_default{text-align:center;min-width:80px}.edd-file-name{width:18%;margin-right:3%}.edd-file-url{width:65%}.edd-repeatable-row-standard-fields.has-variable-pricing .edd-file-url{width:38%;margin-right:5%}.edd-file-assignment{width:27%}.edd-file-assignment .edd-repeatable-row-setting-label{margin-bottom:0}.edd-custom-price-option-sections-wrap{display:none;border-width:0 1px 1px;border-style:solid;border-color:#e5e5e5;box-sizing:border-box;width:100%}.edd-custom-price-option-section{display:block;padding:10px 8px;border-bottom:1px solid rgba(222,222,222,.3)}.edd-custom-price-option-section:last-child{border-bottom:none}label.edd_prices_shipping{display:none!important}.edd-custom-price-option-section-title{display:block;font-size:14px;font-weight:600;padding:0 0 10px}.edd-custom-price-option-section>:not(.edd-custom-price-option-section-title){display:inline-block;padding-right:20px;vertical-align:top;margin-bottom:4px}.edd-custom-price-option-section>:not(.edd-custom-price-option-section-title) label{display:block;margin-bottom:2px}.edd-bundle-products-header{font-weight:600;padding:8px}.edd-bundled-product-row .edd-bundled-product-item-reorder{min-width:30px;margin-right:8px}.edd-bundled-product-row .edd-bundled-product-item-reorder .edd-product-file-reorder{font-size:20px;font-weight:300;padding:16px 4px 0;cursor:move}.edd-bundled-product-row .edd-bundled-product-item{width:60%;margin-right:3%}.edd-bundled-product-row.has-variable-pricing .edd-bundled-product-item{width:47%}.edd-bundled-product-row .edd-bundled-product-price-assignment{width:23%;margin-right:3%}.edd-bundled-product-row .edd-bundled-product-actions{float:right}.edd_repeatable_upload_wrapper .edd_repeatable_upload_field_container{position:relative}.edd_upload_file{background:#fff;display:block;padding:2px 8px 2px;position:absolute;top:3px;right:7px}.edd_upload_field{padding-right:8em!important}textarea#edd-payment-note{width:100%;height:4em;margin:0}#edd-purchased-files .row .edd-purchased-files-list-wrapper .download{line-height:1.4}#edd-purchased-files .edd-purchased-files-list-wrapper .edd-purchased-option{color:#666}input[class*=edd-price-field]{padding:3px 5px;width:75px}#edd-order-download-quantity[type=number].small-text,#edd-order-download-tax[type=text].small-text,[class*=item_] [class*=edd-payment-details-download-][type=number].small-text{height:25px}#edd-order-download-quantity[type=number].small-text,.item_price .edd-payment-details-download-quantity[type=number].small-text{width:55px}#edd-order-download-tax[type=text].small-text,.item_tax .edd-payment-details-download-item-tax[type=number].small-text{width:75px}.edd_repeatable_product_wrapper .edd-select,.edd_repeatable_upload_wrapper .pricing select{min-width:100%}#edd_product_notes_field{display:block;margin:12px 0 0;height:4em;width:100%}.edd_remove_repeatable{border:none;cursor:pointer;display:inline-block;padding:0;overflow:hidden;margin:8px 0 0 0;text-indent:-9999px;width:10px;height:10px}.edd_remove_repeatable:active,.edd_remove_repeatable:focus,.edd_remove_repeatable:hover{background-position:-10px 0!important}#edd-edit-order-form .column{width:32%}.edd-edit-purchase-element[class*=columns-] ul li{padding-right:1%}#edd-edit-order-form .column:nth-child(2n+1),#edd-edit-order-form .columns-4 .column:nth-child(2n+1),#edd-edit-order-form .columns-5 .column:nth-child(3n+1){margin-right:0}#edd-edit-order-form input.large-text{width:90%}.edd-edit-purchase-element ul li.download{width:35%}.edd-edit-purchase-element ul li.item_price{width:15%}.edd-edit-purchase-element ul li.item_price.item_quantity{width:25%}.edd-edit-purchase-element ul li.item_tax{width:15%}.edd-edit-purchase-element ul li.price{width:20%}.edd-admin-box .label{font-weight:600}.edd-admin-box-inside{border-bottom:1px solid #eee;clear:both;padding:3px 12px;margin:0;word-break:break-word}.rtl .edd-admin-box-inside{padding:5px 10px 5px 0}.edd-admin-box-inside .strong{font-weight:600}.edd-payment-fees .fee-label{color:#666;font-weight:400}.edd-admin-box .right{float:right}.rtl .edd-admin-box .right{float:left;margin-left:10px}#edd-order-details .inside,#edd-order-update .inside{margin:0;padding:0}#edd-order-update input.edd_datepicker{width:180px}#edd-order-update input[type=number].edd-payment-time-hour,#edd-order-update input[type=number].edd-payment-time-min{width:50px}#edd-order-update .edd-tax-rate{color:#9c9c9c;font-style:italic}#edd-order-resend-receipt .inside{margin-top:11px}#edd-order-resend-receipt .edd-order-resend-receipt-addresses{margin-top:10px}.edd-admin-box-inside:last-child{border-bottom:0}#edd-edit-order-form .data-payment-key{word-break:break-all}.edd-order-update-box #major-publishing-actions .button-secondary{margin-right:10px}.edd-edit-purchase-element .edd-select-chosen{width:196px}#edd-customer-details .order-data-address input,#edd-customer-details .order-data-column p.data input,#edd-edit-order-form .column input,#edd-order-address-country-wrap select,.edd-edit-purchase-element ul{clear:both;display:block}#edd-customer-details .customer-info .column{width:49%}#edd-customer-details .actions{float:right}.edd-order-data input.small-text{margin:0}.edd-order-data input.med-text{margin:0;width:100px}#edd-order-update span.label{display:inline;width:50px}.edd-order-update-box .button-primary{margin-right:0}#edd-edit-order-form .column .description{padding-right:10px}#edd-edit-order-form .column,.edd-edit-purchase-element ul li{display:inline-block;line-height:1.4;position:relative;margin:0;vertical-align:middle}.edd-edit-purchase-element .row{padding:12px}.edd-edit-purchase-element .row:not(:last-child){border-bottom:1px solid #eee}.edd-edit-purchase-element .row:nth-child(odd):not(.header){background-color:#f9f9f9}.edd-edit-purchase-element .row.header{padding:6px 12px;font-weight:600;vertical-align:top}.edd-edit-purchase-element ul{font-size:0}.edd-edit-purchase-element ul li{font-size:13px}#edd-order-data .data span{color:#666;font-weight:600}.edd-edit-purchase-element .inside{padding:12px}.edd-edit-purchase-element .edd-purchased-download-title{font-size:14px;font-weight:500}.edd-edit-purchase-element .edd-purchased-download-title .deleted{color:#777}.edd-edit-purchase-element .edd-purchased-download-actions{color:#777;line-height:1.4}.edd-edit-purchase-element .edd-purchased-download-actions .edd-purchased-download-actions-label{font-weight:500}.edd-edit-purchase-element .edd-purchased-download-actions a{color:#777;font-size:12px}.edd-edit-purchase-element .edd-purchased-download-actions a:hover{color:#444}.edd-edit-purchase-element .edd-purchased-download-actions .edd-order-remove-download{color:#a00}.edd-edit-purchase-element .edd-purchased-download-actions .edd-order-remove-download:hover{color:red}#edd-order-recalc-total{float:right}#edd_products .edd-select,.edd_repeatable_product_wrapper .edd-select,.edd_repeatable_upload_wrapper .pricing select{min-width:100%;max-width:200px}.edd_repeatable_product_wrapper td{overflow:visible}.edd-payment-details-label-mobile{display:none}@media screen and (max-width:1284px){.edd-edit-purchase-element ul li.download{padding-bottom:15px;width:100%}.edd-edit-purchase-element .edd-purchased-download-title{font-size:16px}.edd-edit-purchase-element ul li.item_price{width:22%}.edd-edit-purchase-element ul li.item_price.item_quantity{width:35%}.edd-edit-purchase-element ul li.item_tax{width:25%}.edd-edit-purchase-element ul li.price{width:20%}.edd-edit-purchase-element .edd-purchased-download-actions{padding-top:10px}.edd-add-download-to-purchase-header,.edd-purchased-files-header{display:none}.edd-payment-details-label-mobile{display:block;font-weight:500;padding-bottom:6px}}@media screen and (max-width:1024px){.edd-edit-purchase-element ul li.item_price.item_quantity{width:40%}.edd-edit-purchase-element ul li.price{width:24%}.edd-edit-purchase-element .edd-purchased-download-actions{padding-top:15px}.edd-edit-purchase-element .edd-purchased-download-actions,.edd-edit-purchase-element .edd-purchased-download-actions a{font-size:14px}}@media screen and (max-width:782px){#edd-edit-order-form .column{width:49%}.edd-edit-purchase-element ul li.item_price,.edd-edit-purchase-element ul li.item_price.item_quantity{padding-bottom:10px}.edd-edit-purchase-element ul li.item_price.item_quantity{width:35%}.edd-edit-purchase-element ul li.item_tax,.edd-edit-purchase-element ul li.price{width:20%;padding-bottom:10px}.edd-payment-details-label-mobile{font-size:14px;font-weight:500}.edd-payment-details-download-amount,.edd-price-currency{font-size:16px}.order-data-column input[type=email]{padding:6px 10px}}@media screen and (max-width:600px){.edd-edit-purchase-element ul li.item_price,.edd-edit-purchase-element ul li.item_price.item_quantity,.edd-edit-purchase-element ul li.item_tax{width:100%;padding-bottom:20px}.edd-edit-purchase-element .edd-add-download-to-purchase ul li.item_tax,.edd-edit-purchase-element ul li.price{width:100%;padding-bottom:0}.edd-edit-purchase-element .edd-add-download-to-purchase-actions{padding-top:15px}#edd-edit-order-form .column{width:100%}}#edd_product_stats .label{display:inline-block}#edd_product_stats hr{border-style:solid;border-width:1px;border-color:#ccc #fff #fff #ccc}#edd_product_stats .product-earnings-stats:before,#edd_product_stats .product-sales-stats:before{color:#82878c;font:normal 20px/1 dashicons;display:inline-block;padding:0 2px 0 0;position:relative;top:0;left:-1px;speak:none;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#edd_product_stats .product-sales-stats:before{content:'\f174'}#edd_product_stats .product-earnings-stats:before{content:'\f239'}.edd_dashboard_widget table thead td{border-bottom:1px solid #ececec;color:#777}.edd_dashboard_widget .table_left{float:left;width:45%}.edd_dashboard_widget .table_right{float:right;width:45%}.edd_dashboard_widget .inside{font-size:12px}.edd_dashboard_widget td{padding:3px 0}.edd_dashboard_widget .b,.edd_dashboard_widget .t{line-height:1.5;vertical-align:middle}.edd_dashboard_widget .b{font-size:14px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;padding-right:6px;width:auto}.edd_dashboard_widget .t{font-size:12px;padding-right:12px;color:#777;width:100%}.edd_dashboard_widget .label_heading{border-top:1px solid #ececec;color:#8f8f8f;font-family:Helvetica,Arial,sans-serif;font-size:12px;font-weight:400;display:block;padding-top:10px;margin:0 0 8px 12px}.edd_dashboard_widget .edd_dashboard_widget_subheading{border-top:1px solid #ececec;color:#8f8f8f;font-size:14px;padding-top:10px;margin:1em 0 0 0}.edd_dashboard_widget .edd_dashboard_widget_subheading+.table{margin:8px 0 0 0}.edd_dashboard_widget .edd_price_label{background:#00769c;border-radius:3px;color:#fff;font-size:10px;padding:2px 4px;margin-right:2px}.edd_dashboard_widget table{width:100%;margin-left:0;margin-bottom:1em}td.edd_order_label{width:80%}td.edd_order_price{text-align:right}@media handheld,only screen and (max-width:1000px){.edd_dashboard_widget .edd-recent-email{display:none}}#edd-dashboard-widgets-wrap .postbox h3{cursor:default}#edd-date-range-options,#edd-graphs-date-options{float:left}#edd-date-range-options span{float:left;line-height:24px;height:24px;margin-right:6px}.edd-import-export-form{position:relative}.edd-import-export-form .edd-progress{background:#ddd;position:absolute;bottom:15px;width:95%;height:15px}.edd-import-export-form .edd-progress div{background:#ccc;height:100%;width:0}.edd-import-export-form .notice-wrap{background-color:#f4f4f4;border-style:solid;border-width:1px 0;border-color:#eae9e9;padding:12px 12px 4px;overflow:auto;margin:20px -12px -23px;position:relative;width:100%}.edd-import-export-form .notice-wrap .spinner{margin:4px 10px 8px;float:right}.admin-color-fresh .edd-import-export-form .edd-progress div{background:#0073aa}.admin-color-light .edd-import-export-form .edd-progress div{background:#888}.admin-color-blue .edd-import-export-form .edd-progress div{background:#096484}.admin-color-coffee .edd-import-export-form .edd-progress div{background:#c7a589}.admin-color-ectoplasm .edd-import-export-form .edd-progress div{background:#a3b745}.admin-color-midnight .edd-import-export-form .edd-progress div{background:#e14d43}.admin-color-sunrise .edd-import-export-form .edd-progress div{background:#dd823b}#edd-graphs-filter label{vertical-align:inherit}#edd-graphs-filter .graph-option-section{float:left;line-height:2.5em;padding-right:5px}.edd-mix-totals{background-color:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:10px}.edd-mix-chart{display:inline-block;width:49%;vertical-align:top}.edd-graph-notes{color:#9c9c9c}.edd-graph-notes span{display:block}.edd-pie-graph .legend{display:none}.edd-pie-legend{overflow:auto;margin-top:10px}.edd-legend-item-wrapper{color:#333;display:inline-block;font-size:8pt;padding:2px 5px 0 5px;width:48%;height:20px}.edd-legend-color{border:1px solid #cfcfcf;display:inline-block;margin-right:5px;width:20px;height:15px}.edd-pie-legend-item{display:inline-block;vertical-align:top;width:80%}[id*=edd-recapture-].button,[id*=edd-sendwp-].button{font-size:16px;height:auto;padding:8px 14px;margin:6px 0 0}[id*=edd-recapture-].button .dashicons,[id*=edd-sendwp-].button .dashicons{line-height:29px;margin-right:8px}[id*=edd-recapture-].button .edd-loading,[id*=edd-recapture-].button .edd-loading:after,[id*=edd-sendwp-].button .edd-loading,[id*=edd-sendwp-].button .edd-loading:after{border-radius:50%;display:inline-block;width:14px;height:14px}[id*=edd-recapture-].button .edd-loading,[id*=edd-sendwp-].button .edd-loading{position:relative;top:3px;margin-left:4px;box-shadow:0 0 2px rgba(0,0,0,.2)}[id*=edd-recapture-].button .edd-loading,[id*=edd-sendwp-].button .edd-loading{-webkit-animation:edd-spinning 1.1s infinite linear;animation:edd-spinning 1.1s infinite linear;border-top:2px solid rgba(255,255,255,.5);border-right:2px solid rgba(255,255,255,.5);border-bottom:2px solid rgba(255,255,255,.5);border-left:2px solid #fff;font-size:14px;-ms-transform:translateZ(0);transform:translateZ(0)}#edd-recapture-disconnect.button .edd-loading.dark,#edd-sendwp-disconnect.button .edd-loading.dark{border-top-color:rgba(0,0,0,.2);border-right-color:rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.2);border-left-color:#666;box-shadow:none}.recapture-notice{position:relative}@-webkit-keyframes edd-spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes edd-spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}#edd_tax_rates{margin:1em 0 0}#edd_tax_rates .edd_tax_country *,#edd_tax_rates .edd_tax_state *{max-width:100%}#edd_tax_rates .edd_tax_country,#edd_tax_rates .edd_tax_state{width:180px}#edd_tax_rates .edd_tax_rate{width:80px}#edd_tax_rates th{padding:15px 10px}.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tbody,.wrap-licenses td,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:block}.wrap-licenses .form-table tr{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:30.5%;max-width:350px;padding:14px;min-height:220px;position:relative;box-sizing:border-box}.wrap-licenses .form-table th{background:#f9f9f9;padding:14px;border-bottom:1px solid #ccc;margin:-14px -14px 20px;width:100%}.wrap-licenses .form-table td{padding:0}.wrap-licenses td input.regular-text{margin:0 0 8px;width:100%}.wrap-licenses .edd-license-data[class*=edd-license-]{position:absolute;background:#fafafa;padding:14px;border-top:1px solid #eee;margin:20px -14px -14px;min-height:67px;width:100%;bottom:14px;box-sizing:border-box}.wrap-licenses .edd-license-data[class*=edd-license-] a{color:#444}.wrap-licenses .edd-license-data[class*=edd-license-] a:hover{text-decoration:none}.wrap-licenses .edd-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}.wrap-licenses .edd-license-data.edd-license-expired{background-color:#e24e4e;color:#fff;border-color:#e24e4e}.wrap-licenses .edd-license-data.edd-license-error,.wrap-licenses .edd-license-data.edd-license-invalid,.wrap-licenses .edd-license-data.edd-license-item_name_mismatch,.wrap-licenses .edd-license-data.edd-license-missing,.wrap-licenses .edd-license-data.edd-license-site_inactive{background-color:#ffebcd;border-color:#ffebcd}.wrap-licenses .edd-license-data p{font-size:13px;margin-top:0}.wrap-licenses .edd-license-data.edd-license-expired a,.wrap-licenses .edd-license-data.license-expires-soon-notice a{color:#fff}.wrap-licenses .edd-license-data.edd-license-expired a:hover,.wrap-licenses .edd-license-data.license-expires-soon-notice a:hover{text-decoration:none}.wrap-licenses p.submit{clear:both}#system-info-textarea{background:0 0;font-family:Menlo,Monaco,monospace;display:block;overflow:auto;white-space:pre;width:800px;height:400px}#TB_window #edd-add-download:active,#TB_window #edd-add-download:focus,#TB_window #edd-add-download:hover{color:#fff}.edd-graph .y1Axis{color:#edc240!important}.edd-graph .y2Axis{color:#afd8f8!important}.download_page_edd-tools .apikeys .column-user{width:192px}.edd-select-chosen{width:100%;max-width:300px}.chosen-container-multi .chosen-choices{background-image:none;border-color:#dfdfdf;-webkit-border-radius:3px;border-radius:3px}.chosen-container-multi .chosen-choices input{border-color:#dfdfdf;height:27px!important;margin:2px}.chosen-container .chosen-drop{border-color:#aaa;-webkit-box-shadow:1px 1px 2px rgba(0,0,0,.1);box-shadow:1px 1px 2px rgba(0,0,0,.1)}.chosen-container .search-field{float:none!important}.chosen-container .search-field input{width:90%!important}.chosen-container-active .chosen-choices{border-color:#aaa;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;-webkit-box-shadow:1px 1px 2px rgba(0,0,0,.1);box-shadow:1px 1px 2px rgba(0,0,0,.1)}.download_page_edd-tools .tablenav .actions{overflow:visible}.edd_user_search_wrap{position:relative;overflow:visible}.edd_user_search_results{position:absolute;left:0;top:27px}.edd_user_search_results a.edd-ajax-user-cancel{position:absolute;right:6px;top:2px}.edd_user_search_results ul{background:#f0f0f0;border:1px solid #dfdfdf;overflow-y:scroll;padding:10px 10px 4px;margin:0;max-height:200px;width:300px}.wp-list-table .type-download .row-actions{color:#999}@media screen and (max-width:1100px){.edd-mix-chart{display:block;width:100%}.wrap-licenses .form-table tr{width:46%;max-width:none;min-height:230px}}@media screen and (max-width:782px){.post-type-download .nav-tab-wrapper a{font-size:70%;padding:2px 4px}.download_page_edd-tools .apikeys .column-user{width:80px}.license-expiration-date-notice,.license-lifetime-notice,.license-null{padding-left:0}[class^=license-] input[type=text]{margin-bottom:3px}}@media screen and (max-width:600px){.wrap-licenses .form-table tr{width:100%;min-height:230px}#edd-edit-order-form input.large-text{width:100%}}#edd-item-wrapper{background:#f5f5f5;border:1px solid #e5e5e5;webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,.04);max-width:830px}#edd-item-wrapper:after{content:"";display:block;clear:both;visibility:hidden;font-size:0;height:0}#edd-item-tab-wrapper{float:left;width:18%;z-index:1}#edd-item-tab-wrapper-list{background:#fff;margin:0}#edd-item-tab-wrapper-list li{display:block;background-color:#eaeaea;color:#444;font-size:12px;border-bottom:1px solid #e5e5e5;margin-bottom:0;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;word-wrap:break-word}#edd-item-tab-wrapper-list li a{display:block;padding:8px 10px 8px 6px}#edd-item-tab-wrapper-list li.active{display:block;background-color:#fff;padding:8px 10px 8px 6px}#edd-item-tab-wrapper-list .inactive a,#edd-item-tab-wrapper-list .inactive a:visited{background-color:#f5f5f5;color:#444;text-decoration:none}#edd-item-tab-wrapper-list .inactive a:hover{background-color:#fff}#edd-item-tab-wrapper-list .dashicons{color:#444;font-size:16px;min-width:24px;height:auto}#edd-item-card-wrapper .left{float:left}#edd-item-card-wrapper .right{float:right}#edd-item-card-wrapper input{font-weight:400}#edd-item-card-wrapper{background-color:#fff;border:1px solid #e5e5e5;display:inline-block;margin-left:-1px;min-height:200px;width:700px;z-index:2}.edd-item-has-tabs #edd-item-card-wrapper{border-width:0 0 0 1px;width:82%}#edd-item-card-wrapper .customer-section{border-bottom:1px solid #eee;margin-bottom:10px;overflow:auto}#edd-item-card-wrapper .customer-section table{margin-bottom:20px}#edd-item-card-wrapper>div{padding:0 20px}#edd-item-card-wrapper>div:first-child{padding-top:20px}#edd-item-card-wrapper>div:last-child{border:none;padding-bottom:20px}#edd-item-card-wrapper .avatar-wrap{padding-right:10px;text-align:center}#edd-item-card-wrapper .customer-id{font-size:24px;font-weight:600}#edd-item-card-wrapper .customer-main-wrapper input{width:200px}#edd-item-card-wrapper .customer-address-wrapper{margin-right:25px;max-width:33%;width:202px}#edd-item-card-wrapper .customer-address-wrapper select{width:200px}#edd-item-card-wrapper .customer-info{margin-top:5px;margin-bottom:10px;min-height:185px}#edd-item-card-wrapper .info-wrapper{min-height:125px;overflow:visible}#edd-item-card-wrapper a.delete{color:red;margin-right:5px;text-decoration:none}.customer-info .customer-name{font-size:24px;font-weight:600}.customer-edit-link a,.disconnect-user a{font-size:12px;font-weight:400;text-decoration:none}#customer-edit-actions{line-height:28px;margin-bottom:20px;text-align:center}#customer-edit-actions .button-secondary{margin-right:10px}#edd-item-card-wrapper .row-title{width:30%}#edd-item-card-wrapper .info-item{display:block;line-height:16px;padding-bottom:5px}#edd-item-card-wrapper .edit-item{display:none}#edd-item-card-wrapper .edd_user_search_results{left:1px;top:16px}#edd-item-card-wrapper .edd_user_search_results ul{width:200px}#edd-item-stats-wrapper{margin:0 auto;min-height:30px;text-align:center}#edd-item-stats-wrapper li{font-size:14px;float:left;line-height:22px;width:50%}#edd-item-stats-wrapper a{text-decoration:none}#edd-item-stats-wrapper .dashicons{color:#888}#edd-item-tables-wrapper table{text-align:center;width:100%}#edd-item-tables-wrapper th{text-align:center}#edd-item-tables-wrapper .downloads tr>td:first-child,#edd-item-tables-wrapper .downloads tr>th:first-child,#edd-item-tables-wrapper .emails tr>td:first-child,#edd-item-tables-wrapper .emails tr>th:first-child{text-align:left}#edd-item-tables-wrapper .downloads tr>td:only-child{text-align:center}#edd-item-tables-wrapper .emails .add-customer-email-row td{background-color:#f9f9f9;border-top:1px solid #e5e5e5}#edd-item-tables-wrapper .emails .primary-email-icon{font-size:13px;vertical-align:middle;line-height:1.5em}#edd-item-tables-wrapper .emails input{vertical-align:middle;margin:6px 0}#edd-item-tables-wrapper .emails .spinner{float:none}#edd-item-notes-wrapper{min-height:50px}.edd-item-notes-header img,.edd-item-notes-header span{font-weight:600;line-height:30px;vertical-align:middle}.customer-note-input{margin-bottom:5px;width:100%}#edd-customer-notes div:nth-of-type(even){background-color:#fcfcfc}.customer-note-wrapper{border-bottom:1px solid #f9f9f9;min-height:38px;padding:7px 0 7px 7px}.customer-note-wrapper span{display:block}.note-content-wrap{padding-top:7px}.delete-customer{text-align:center}#edd-item-card-wrapper .notice-container{padding-left:20px;padding-right:20px;margin-left:-20px;margin-right:-20px}#edd-item-card-wrapper .add-customer-email-wrapper>#add-customer-email{vertical-align:middle}@media screen and (max-width:810px) and (min-width:656px){.customer-info .customer-name{font-size:16px}#edd-item-card-wrapper .widefat td,.widefat th{padding:4px 6px;max-width:100px!important;display:table-cell}}@media screen and (max-width:781px){#edd-item-card-wrapper,#edd-item-tab-wrapper{margin:0;width:100%}#edd-item-tab-wrapper-list{background:#fff;margin:0}#edd-item-tab-wrapper-list li{float:left;display:inline;font-size:14px;box-sizing:border-box;border-width:0 1px 1px 0;border-style:solid;border-color:#e5e5e5;width:33.33333%}#edd-item-tab-wrapper-list li:nth-child(3n+3){border-width:0 0 1px 0}#edd-item-tab-wrapper-list .dashicons{font-size:18px}.edd-item-has-tabs #edd-item-card-wrapper{border-top:1px solid #e5e5e5;border-left:0;margin-top:-1px;width:100%}}@media screen and (max-width:656px){#edd-item-card-wrapper .customer-info{min-height:220px}.edd-item-info.customer-info{position:relative}#edd-item-card-wrapper .customer-address-wrapper{float:none;position:absolute;top:84px;left:110px;max-width:200px}#edd-item-card-wrapper .customer-main-wrapper{float:none;position:absolute;left:110px}.customer-info .customer-name{font-size:16px}#edd-item-card-wrapper #edd-item-stats-wrapper{padding-left:0;padding-right:0}#edd-item-card-wrapper .customer-section{margin-bottom:0}#edd-item-card-wrapper .widefat td,#edd-item-card-wrapper .widefat th{padding:4px 6px;max-width:100px!important;display:table-cell;overflow:hidden}#edd-item-card-wrapper .customer-id{font-size:16px}}@media screen and (max-width:480px){#edd-item-tab-wrapper-list li{width:50%}#edd-item-tab-wrapper-list li:nth-child(3n+3){border-width:0 1px 1px 0}#edd-item-tab-wrapper-list li:nth-child(even){border-width:0 0 1px 0}.edd-repeatable-row-actions,.edd-repeatable-row-title{text-align:left;width:100%}.edd-repeatable-row-title{padding-bottom:0}.edd-bundled-product-item-reorder,.edd-bundled-product-row .edd-bundled-product-item,.edd-bundled-product-row .edd-bundled-product-price-assignment,.edd-file-assignment,.edd-file-name,.edd-file-url,.edd-option-name,.edd-option-price,.edd_repeatable_default{float:none;text-align:left;width:100%!important;margin:10px 0}.edd-bundled-product-row .edd-bundled-product-actions{float:none}.edd-bundled-product-row .edd-bundled-product-item-reorder .edd-product-file-reorder{padding:0}#edd-payment-filters span{display:block;margin:2px 0}#edd-payment-filters a,.download_page_edd-reports .button{text-align:center}#edd-payment-date-filters span{display:block}#edd-payment-date-filters span>input{float:right}#edd-add-discount select[multiple] option,#edd-edit-discount select[multiple] option{height:20px}#edd-add-discount input[type=text],#edd-edit-discount input[type=text],#edd-payment-filters a,#edd-payment-filters input:not([type=radio]),#edd-payment-filters select,#system-info-textarea,.download_page_edd-reports .inside .button,.download_page_edd-reports .inside input[type=submit],.download_page_edd-reports .inside input[type=text],.download_page_edd-reports .inside select,.download_page_edd-settings .inside input[type=button],.download_page_edd-tools .inside input[type=submit],.download_page_edd-tools .inside input[type=text],.download_page_edd-tools .inside select{width:100%}#edd-add-discount select[multiple],#edd-edit-discount select[multiple],.download_page_edd-tools select[multiple]{height:200px!important}.download_page_edd-settings input[type=checkbox]{margin:2px 0}.post-type-download input[type=checkbox]{margin-left:2px}}.recount-stats-controls form{display:inline}.edd-recount-stats-descriptions span{display:none;line-height:24px}#edd-debug-log p.submit{margin:20px 0 0;padding:0}#edd-debug-log .edd-inline-button{margin-left:5px}.edd-settings-sidebar{padding-top:27px}.edd-settings-sidebar-content{background-color:#fff;text-align:center;border:1px solid #ddd;box-sizing:border-box;max-width:300px}.edd-settings-sidebar-content p{font-size:14px;line-height:1.5;margin-top:0}.edd-sidebar-header-section{background-color:#35495c;line-height:1;padding:26px 20px 24px;border-bottom:3px dashed #fafafa}.edd-sidebar-description-section{background-color:#fafafa;padding:16px 20px;border-bottom:1px solid #ddd}.edd-sidebar-description-section .edd-sidebar-description{margin:0}.edd-sidebar-coupon-section{font-size:14px;padding:16px 20px}.edd-sidebar-coupon-section label{display:block;line-height:1.4;margin-bottom:6px}.edd-sidebar-coupon-section label strong{color:#253b51;font-weight:700}.edd-sidebar-coupon-section input{background:#f4f7fa;font-size:22px;font-weight:600;text-align:center;padding:10px;border:2px dashed #2794da;border-radius:4px;margin-bottom:16px;box-shadow:none;width:100%}.edd-sidebar-coupon-section input:focus{border:2px dashed #2794da;box-shadow:none}.edd-settings-sidebar-content .edd-coupon-note{color:#6c7883;font-size:13px;font-style:italic;margin:0}.edd-settings-sidebar-content .edd-coupon-note a{color:#253b51}.edd-settings-sidebar-content .edd-coupon-note a:hover{text-decoration:none}.edd-sidebar-footer-section{background-color:#fafafa;padding:16px 20px;border-top:1px solid #ddd}.edd-sidebar-footer-section .edd-cta-button{display:block;background-color:#2794da;color:#fff;text-decoration:none;font-size:20px;font-weight:700;text-transform:uppercase;padding:17px 10px;border:none;border-radius:4px;width:100%;box-sizing:border-box;box-shadow:none;transition:background-color .2s}.edd-sidebar-footer-section .edd-cta-button:hover{background-color:#2386c5}@media all and (min-width:1080px){.edd-has-sidebar .edd-settings-content{float:left;width:67%}.edd-has-sidebar .edd-settings-sidebar{float:right;width:31%}}@media all and (min-width:1240px){.edd-has-sidebar .edd-settings-content{width:74%}.edd-has-sidebar .edd-settings-sidebar{width:23%}}.taxes-tab .edd-has-sidebar .edd-settings-content,.taxes-tab .edd-has-sidebar .edd-settings-sidebar{float:none;width:100%}.bfcm-promo-img-container{background-color:#35495c;width:100%;height:160px}.bfcm-code{color:#2794da;font-weight:700}.sale-ends{position:absolute;bottom:9px;right:14px;display:inline-block;color:#6c7883;font-size:12px;text-align:right;font-style:italic;width:150px}.edd-admin-notice-top-of-page{font-size:15px;line-height:1.4;color:#fff;margin-left:-20px;padding:12px 32px 12px 20px;background:#2d6ca2;display:none}@media screen and (min-width:783px){.edd-admin-notice-top-of-page{padding:10px 46px 10px 22px}}@media screen and (min-width:961px){.edd-admin-notice-top-of-page{text-align:center}}.edd-admin-notice-top-of-page a{color:#fff}.edd-admin-notice-top-of-page a:hover{text-decoration:none}.edd-admin-notice-top-of-page .button-link{position:absolute;top:48px;right:-1px;font-size:20px;color:#fff;font-weight:700;text-decoration:none;margin-left:5px;padding:6px 10px}.edd-admin-notice-top-of-page .button-link:active,.edd-admin-notice-top-of-page .button-link:focus,.edd-admin-notice-top-of-page .button-link:hover{color:#fff;text-decoration:none}@media screen and (min-width:601px){.edd-admin-notice-top-of-page .button-link{top:1px}}@media screen and (min-width:783px){.edd-admin-notice-top-of-page .button-link{right:9px}}
|
assets/js/admin-scripts.js
CHANGED
@@ -2038,6 +2038,48 @@ jQuery(document).ready(function ($) {
|
|
2038 |
};
|
2039 |
EDD_Customer.init();
|
2040 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2041 |
// AJAX user search
|
2042 |
$('.edd-ajax-user-search').keyup(function() {
|
2043 |
var user_search = $(this).val();
|
2038 |
};
|
2039 |
EDD_Customer.init();
|
2040 |
|
2041 |
+
var EDD_Promo_Notices = {
|
2042 |
+
init: function() {
|
2043 |
+
EDD_Promo_Notices.displayNotices();
|
2044 |
+
EDD_Promo_Notices.dismissNotices();
|
2045 |
+
},
|
2046 |
+
|
2047 |
+
displayNotices: function() {
|
2048 |
+
var topOfPageNotice = $( '.edd-admin-notice-top-of-page' );
|
2049 |
+
if ( topOfPageNotice ) {
|
2050 |
+
var topOfPageNoticeEl = topOfPageNotice.detach();
|
2051 |
+
|
2052 |
+
$( '#wpbody-content' ).prepend( topOfPageNoticeEl );
|
2053 |
+
topOfPageNotice.delay( 1000 ).slideDown();
|
2054 |
+
}
|
2055 |
+
},
|
2056 |
+
|
2057 |
+
dismissNotices: function() {
|
2058 |
+
$( '.edd-promo-notice' ).each( function() {
|
2059 |
+
var notice = $( this );
|
2060 |
+
|
2061 |
+
notice.on( 'click', '.edd-promo-notice-dismiss', function( e ) {
|
2062 |
+
e.preventDefault();
|
2063 |
+
|
2064 |
+
$.ajax( {
|
2065 |
+
type: 'POST',
|
2066 |
+
data: {
|
2067 |
+
action: 'edd_dismiss_promo_notice',
|
2068 |
+
notice_id: notice.data( 'id' ),
|
2069 |
+
nonce: notice.data( 'nonce' ),
|
2070 |
+
lifespan: notice.data( 'lifespan' )
|
2071 |
+
},
|
2072 |
+
url: ajaxurl,
|
2073 |
+
success: function( response ) {
|
2074 |
+
notice.slideUp();
|
2075 |
+
}
|
2076 |
+
} );
|
2077 |
+
} );
|
2078 |
+
} );
|
2079 |
+
}
|
2080 |
+
};
|
2081 |
+
EDD_Promo_Notices.init();
|
2082 |
+
|
2083 |
// AJAX user search
|
2084 |
$('.edd-ajax-user-search').keyup(function() {
|
2085 |
var user_search = $(this).val();
|
assets/js/admin-scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function($){edd_attach_tooltips($(".edd-help-tip"));var EDD_Download_Configuration={init:function(){this.add(),this.move(),this.remove(),this.type(),this.prices(),this.files(),this.updatePrices()},clone_repeatable:function(row){var key=highest=1;return row.parent().find(".edd_repeatable_row").each(function(){var current=$(this).data("key");parseInt(current)>highest&&(highest=current)}),key=highest+=1,clone=row.clone(),clone.removeClass("edd_add_blank"),clone.attr("data-key",key),clone.find("input, select, textarea").val("").each(function(){var name=$(this).attr("name"),id=$(this).attr("id");name&&(name=name.replace(/\[(\d+)\]/,"["+parseInt(key)+"]"),$(this).attr("name",name)),$(this).attr("data-key",key),void 0!==id&&(id=id.replace(/(\d+)/,parseInt(key)),$(this).attr("id",id))}),clone.find("select").each(function(){$(this).val(row.find('select[name="'+$(this).attr("name")+'"]').val())}),clone.find('input[type="checkbox"]').each(function(){$(this).is(":checked")&&$(this).prop("checked",!1),$(this).val(1)}),clone.find("span.edd_price_id").each(function(){$(this).text(parseInt(key))}),clone.find("span.edd_file_id").each(function(){$(this).text(parseInt(key))}),clone.find(".edd_repeatable_default_input").each(function(){$(this).val(parseInt(key)).removeAttr("checked")}),clone.find(".edd_repeatable_condition_field").each(function(){$(this).find("option:eq(0)").prop("selected","selected")}),clone.find(".search-choice").remove(),clone.find(".chosen-container").remove(),edd_attach_tooltips(clone.find(".edd-help-tip")),clone},add:function(){$(document.body).on("click",".submit .edd_add_repeatable",function(e){e.preventDefault();var row=$(this).parent().parent().prev(".edd_repeatable_row"),clone=EDD_Download_Configuration.clone_repeatable(row);clone.insertAfter(row).find("input, textarea, select").filter(":visible").eq(0).focus(),clone.find(".edd-select-chosen").chosen({inherit_select_classes:!0,placeholder_text_single:edd_vars.one_option,placeholder_text_multiple:edd_vars.one_or_more_option}),clone.find(".edd-select-chosen").css("width","100%"),clone.find(".edd-select-chosen .chosen-search input").attr("placeholder",edd_vars.search_placeholder)})},move:function(){$(".edd_repeatable_table .edd-repeatables-wrap").sortable({handle:".edd-draghandle-anchor",items:".edd_repeatable_row",opacity:.6,cursor:"move",axis:"y",update:function(){var count=0;$(this).find(".edd_repeatable_row").each(function(){$(this).find("input.edd_repeatable_index").each(function(){$(this).val(count)}),count++})}})},remove:function(){$(document.body).on("click",".edd-remove-row, .edd_remove_repeatable",function(e){e.preventDefault();var firstFocusable,row=$(this).parents(".edd_repeatable_row"),count=row.parent().find(".edd_repeatable_row").length,type=$(this).data("type"),repeatable="div.edd_repeatable_"+type+"s";if(firstFocusable=($(this).is(".ui-sortable .edd_repeatable_row:first-child .edd-remove-row, .ui-sortable .edd_repeatable_row:first-child .edd_remove_repeatable")?row.next(".edd_repeatable_row"):row.prev(".edd_repeatable_row")).find("select, input, textarea, button").filter(":visible").eq(0),"price"===type){var price_row_id=row.data("key");$('.edd_repeatable_condition_field option[value="'+price_row_id+'"]').remove()}if(1<count)$("input, select",row).val(""),row.fadeOut("fast").remove(),firstFocusable.focus();else switch(type){case"price":alert(edd_vars.one_price_min);break;case"file":$("input, select",row).val("");break;default:alert(edd_vars.one_field_min)}$(repeatable).each(function(rowIndex){$(this).find("input, select").each(function(){var name=$(this).attr("name");name=name.replace(/\[(\d+)\]/,"["+rowIndex+"]"),$(this).attr("name",name).attr("id",name)})})})},type:function(){$(document.body).on("change","#_edd_product_type",function(e){var edd_products=$("#edd_products"),edd_download_files=$("#edd_download_files"),edd_download_limit_wrap=$("#edd_download_limit_wrap");"bundle"===$(this).val()?(edd_products.show(),edd_download_files.hide(),edd_download_limit_wrap.hide()):(edd_products.hide(),edd_download_files.show(),edd_download_limit_wrap.show())})},prices:function(){$(document.body).on("change","#edd_variable_pricing",function(e){var checked=$(this).is(":checked"),single=$("#edd_regular_price_field"),variable=$("#edd_variable_price_fields, .edd_repeatable_table .pricing"),bundleRow=$(".edd-bundled-product-row, .edd-repeatable-row-standard-fields");checked?(single.hide(),variable.show(),bundleRow.addClass("has-variable-pricing")):(single.show(),variable.hide(),bundleRow.removeClass("has-variable-pricing"))})},files:function(){var file_frame;window.formfield="",$(document.body).on("click",".edd_upload_file_button",function(e){e.preventDefault();var button=$(this);window.formfield=$(this).closest(".edd_repeatable_upload_wrapper"),file_frame||((file_frame=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:button.data("uploader-title"),button:{text:button.data("uploader-button-text")},multiple:"0"!=$(this).data("multiple")})).on("menu:render:default",function(view){view.unset("library-separator"),view.unset("gallery"),view.unset("featured-image"),view.unset("embed"),view.set({})}),file_frame.on("insert",function(){file_frame.state().get("selection").each(function(attachment,index){var selectedSize="image"===(attachment=attachment.toJSON()).type&&$(".attachment-display-settings .size option:selected").val(),selectedURL=attachment.url,selectedName=0<attachment.title.length?attachment.title:attachment.filename;if(selectedSize&&void 0!==attachment.sizes[selectedSize]&&(selectedURL=attachment.sizes[selectedSize].url),"image"===attachment.type&&(selectedName=selectedSize&&void 0!==attachment.sizes[selectedSize]?selectedName+"-"+attachment.sizes[selectedSize].width+"x"+attachment.sizes[selectedSize].height:selectedName+"-"+attachment.width+"x"+attachment.height),0===index)window.formfield.find(".edd_repeatable_attachment_id_field").val(attachment.id),window.formfield.find(".edd_repeatable_thumbnail_size_field").val(selectedSize),window.formfield.find(".edd_repeatable_upload_field").val(selectedURL),window.formfield.find(".edd_repeatable_name_field").val(selectedName);else{var row=window.formfield,clone=EDD_Download_Configuration.clone_repeatable(row);clone.find(".edd_repeatable_attachment_id_field").val(attachment.id),clone.find(".edd_repeatable_thumbnail_size_field").val(selectedSize),clone.find(".edd_repeatable_upload_field").val(selectedURL),clone.find(".edd_repeatable_name_field").val(selectedName),clone.insertAfter(row)}})})),file_frame.open()}),window.formfield=""},updatePrices:function(){$("#edd_price_fields").on("keyup",".edd_variable_prices_name",function(){var key=$(this).parents(".edd_repeatable_row").data("key"),name=$(this).val(),field_option=$(".edd_repeatable_condition_field option[value="+key+"]");0<field_option.length?field_option.text(name):$(".edd_repeatable_condition_field").append($("<option></option>").attr("value",key).text(name))})}};$(document.body).on("click",".toggle-custom-price-option-section",function(e){e.preventDefault();var show=$(this).html()==edd_vars.show_advanced_settings;show?$(this).html(edd_vars.hide_advanced_settings):$(this).html(edd_vars.show_advanced_settings);var header=$(this).parents(".edd-repeatable-row-header");header.siblings(".edd-custom-price-option-sections-wrap").slideToggle(),$(":input:not(input[type=button],input[type=submit],button):visible:first",show?header.siblings(".edd-custom-price-option-sections-wrap"):header.siblings(".edd-repeatable-row-standard-fields")).focus()}),EDD_Download_Configuration.init();var typingTimer,edd_datepicker=$(".edd_datepicker");if(0<edd_datepicker.length){edd_datepicker.datepicker({dateFormat:"mm/dd/yy"})}({init:function(){this.edit_address(),this.remove_download(),this.add_download(),this.change_customer(),this.new_customer(),this.edit_price(),this.recalculate_total(),this.variable_prices_check(),this.add_note(),this.remove_note(),this.resend_receipt(),this.copy_download_link()},edit_address:function(){$('select[name="edd-payment-address[0][country]"]').change(function(){var $this=$(this),data={action:"edd_get_shop_states",country:$this.val(),nonce:$this.data("nonce"),field_name:"edd-payment-address[0][state]"};return $.post(ajaxurl,data,function(response){var state_wrapper=$("#edd-order-address-state-wrap select, #edd-order-address-state-wrap input");$("#edd-order-address-state-wrap .chosen-container").remove(),"nostates"==response?state_wrapper.replaceWith('<input type="text" name="edd-payment-address[0][state]" value="" class="edd-edit-toggles medium-text"/>'):state_wrapper.replaceWith(response)}),!1})},remove_download:function(){$("#edd-purchased-files").on("click",".edd-order-remove-download",function(){if(1===$(document.body).find("#edd-purchased-files > .row:not(.header)").length)return alert(edd_vars.one_download_min),!1;if(confirm(edd_vars.delete_payment_download)){var key=$(this).data("key"),download_id=($(".edd-payment-id").val(),$('input[name="edd-payment-details-downloads['+key+'][id]"]').val()),price_id=$('input[name="edd-payment-details-downloads['+key+'][price_id]"]').val(),quantity=$('input[name="edd-payment-details-downloads['+key+'][quantity]"]').val(),amount=$('input[name="edd-payment-details-downloads['+key+'][amount]"]').val();if($('input[name="edd-payment-details-downloads['+key+'][tax]"]').length)var fees=$('input[name="edd-payment-details-downloads['+key+'][tax]"]').val();if($('input[name="edd-payment-details-downloads['+key+'][fees]"]').length)fees=$.parseJSON($('input[name="edd-payment-details-downloads['+key+'][fees]"]').val());var currently_removed=$('input[name="edd-payment-removed"]').val();(currently_removed=$.parseJSON(currently_removed)).length<1&&(currently_removed={});var removed_item=[{id:download_id,price_id:price_id,quantity:quantity,amount:amount,cart_index:key}];currently_removed[key]=removed_item,$('input[name="edd-payment-removed"]').val(JSON.stringify(currently_removed)),$(this).parent().parent().remove(),fees&&fees.length&&$.each(fees,function(key,value){$('*li[data-fee-id="'+value+'"]').remove()}),$("#edd-payment-downloads-changed").val(1),$(".edd-order-payment-recalc-totals").show()}return!1})},change_customer:function(){$("#edd-customer-details").on("click",".edd-payment-change-customer, .edd-payment-change-customer-cancel",function(e){e.preventDefault();var change_customer=$(this).hasClass("edd-payment-change-customer"),cancel=$(this).hasClass("edd-payment-change-customer-cancel");change_customer?($(".customer-info").hide(),$(".change-customer").show(),$(".edd-payment-change-customer-input").css("width","auto")):cancel&&($(".customer-info").show(),$(".change-customer").hide())})},new_customer:function(){$("#edd-customer-details").on("click",".edd-payment-new-customer, .edd-payment-new-customer-cancel",function(e){e.preventDefault();var new_customer=$(this).hasClass("edd-payment-new-customer"),cancel=$(this).hasClass("edd-payment-new-customer-cancel");new_customer?($(".customer-info").hide(),$(".new-customer").show()):cancel&&($(".customer-info").show(),$(".new-customer").hide());new_customer=$("#edd-new-customer");$(".new-customer").is(":visible")?new_customer.val(1):new_customer.val(0)})},add_download:function(){$(".edd-edit-purchase-element").on("click","#edd-order-add-download",function(e){e.preventDefault();var order_download_select=$("#edd_order_download_select"),order_download_quantity=$("#edd-order-download-quantity"),order_download_price=$("#edd-order-download-price"),order_download_tax=$("#edd-order-download-tax"),selected_price_option=$(".edd_price_options_select option:selected"),download_id=order_download_select.val(),download_title=order_download_select.find(":selected").text(),quantity=order_download_quantity.val(),item_price=order_download_price.val(),item_tax=order_download_tax.val(),price_id=selected_price_option.val(),price_name=selected_price_option.text();if(download_id<1)return!1;if(item_price||(item_price=0),item_price=parseFloat(item_price),isNaN(item_price))return alert(edd_vars.numeric_item_price),!1;if(item_tax=parseFloat(item_tax),isNaN(item_tax))return alert(edd_vars.numeric_item_tax),!1;if(isNaN(parseInt(quantity)))return alert(edd_vars.numeric_quantity),!1;price_name&&(download_title=download_title+" - "+price_name);var count=$("#edd-purchased-files div.row:not(.edd-purchased-files-header)").length;0==count&&alert(edd_vars.no_downloads_error);var clone=$("#edd-purchased-files div.row:not(.edd-purchased-files-header):last").clone();clone.find(".download span").html('<a href="post.php?post='+download_id+'&action=edit"></a>'),clone.find(".download span a").text(download_title),clone.find(".edd-payment-details-download-item-price").val(item_price.toFixed(edd_vars.currency_decimals)),clone.find(".edd-payment-details-download-item-tax").val(item_tax.toFixed(edd_vars.currency_decimals)),clone.find("input.edd-payment-details-download-id").val(download_id),clone.find("input.edd-payment-details-download-price-id").val(price_id);var item_total=item_price*quantity+item_tax;item_total=item_total.toFixed(edd_vars.currency_decimals),clone.find("span.edd-payment-details-download-amount").text(item_total),clone.find("input.edd-payment-details-download-amount").val(item_total),clone.find("input.edd-payment-details-download-quantity").val(quantity),clone.find("input.edd-payment-details-download-has-log").val(0),clone.find(".edd-copy-download-link-wrapper").remove(),clone.find("input").each(function(){var name=$(this).attr("name");name=name.replace(/\[(\d+)\]/,"["+parseInt(count)+"]"),$(this).attr("name",name).attr("id",name)}),clone.find("a.edd-order-remove-download").attr("data-key",parseInt(count)),$("#edd-payment-downloads-changed").val(1),$("#edd-purchased-files div.row .edd-purchased-download-title .deleted").length&&$("#edd-purchased-files div.row:last").remove(),$(clone).insertAfter("#edd-purchased-files div.row:last"),$(".edd-order-payment-recalc-totals").show(),$(".edd-add-download-field").val("")})},edit_price:function(){$(document.body).on("change keyup",".edd-payment-item-input",function(){var row=$(this).parents("ul.edd-purchased-files-list-wrapper");$(".edd-order-payment-recalc-totals").show();var quantity=row.find("input.edd-payment-details-download-quantity").val().replace(edd_vars.thousands_separator,""),item_price=row.find("input.edd-payment-details-download-item-price").val().replace(edd_vars.thousands_separator,""),item_tax=row.find("input.edd-payment-details-download-item-tax").val().replace(edd_vars.thousands_separator,"");if(item_price=parseFloat(item_price),isNaN(item_price))return alert(edd_vars.numeric_item_price),!1;item_tax=parseFloat(item_tax),isNaN(item_tax)&&(item_tax=0),isNaN(parseInt(quantity))&&(quantity=1);var item_total=item_price*quantity+item_tax;item_total=item_total.toFixed(edd_vars.currency_decimals),row.find("input.edd-payment-details-download-amount").val(item_total),row.find("span.edd-payment-details-download-amount").text(item_total)})},recalculate_total:function(){$("#edd-order-recalc-total").on("click",function(e){e.preventDefault();var total=0,tax=0,totals=$("#edd-purchased-files .row input.edd-payment-details-download-amount"),taxes=$("#edd-purchased-files .row input.edd-payment-details-download-item-tax");totals.length&&totals.each(function(){total+=parseFloat($(this).val())}),taxes.length&&taxes.each(function(){tax+=parseFloat($(this).val())}),$(".edd-payment-fees").length&&$(".edd-payment-fees span.fee-amount").each(function(){total+=parseFloat($(this).data("fee"))}),$("input[name=edd-payment-total]").val(total.toFixed(edd_vars.currency_decimals)),$("input[name=edd-payment-tax]").val(tax.toFixed(edd_vars.currency_decimals))})},variable_prices_check:function(){$(".edd-edit-purchase-element").on("change","select#edd_order_download_select",function(){var $this=$(this),download_id=$this.val();if(0<parseInt(download_id)){var postData={action:"edd_check_for_download_price_variations",download_id:download_id};$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){$(".edd_price_options_select").remove(),$(response).insertAfter($this.next())}}).fail(function(data){window.console&&window.console.log&&console.log(data)})}})},add_note:function(){$("#edd-add-payment-note").on("click",function(e){e.preventDefault();var postData={action:"edd_insert_payment_note",payment_id:$(this).data("payment-id"),note:$("#edd-payment-note").val()};if(postData.note)$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){$("#edd-payment-notes-inner").append(response),$(".edd-no-payment-notes").hide(),$("#edd-payment-note").val("")}}).fail(function(data){window.console&&window.console.log&&console.log(data)});else{var border_color=$("#edd-payment-note").css("border-color");$("#edd-payment-note").css("border-color","red"),setTimeout(function(){$("#edd-payment-note").css("border-color",border_color)},500)}})},remove_note:function(){$(document.body).on("click",".edd-delete-payment-note",function(e){if(e.preventDefault(),confirm(edd_vars.delete_payment_note)){var postData={action:"edd_delete_payment_note",payment_id:$(this).data("payment-id"),note_id:$(this).data("note-id")};return $.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){return $("#edd-payment-note-"+postData.note_id).remove(),$(".edd-payment-note").length||$(".edd-no-payment-notes").show(),!1}}).fail(function(data){window.console&&window.console.log&&console.log(data)}),!0}})},resend_receipt:function(){var emails_wrap=$(".edd-order-resend-receipt-addresses");$(document.body).on("click","#edd-select-receipt-email",function(e){e.preventDefault(),emails_wrap.slideDown()}),$(document.body).on("change",".edd-order-resend-receipt-email",function(){var href=$("#edd-select-receipt-email").prop("href")+"&email="+$(this).val();confirm(edd_vars.resend_receipt)&&(window.location=href)}),$(document.body).on("click","#edd-resend-receipt",function(e){return confirm(edd_vars.resend_receipt)})},copy_download_link:function(){$(document.body).on("click",".edd-copy-download-link",function(e){e.preventDefault();var $this=$(this),postData={action:"edd_get_file_download_link",payment_id:$('input[name="edd_payment_id"]').val(),download_id:$this.data("download-id"),price_id:$this.data("price-id")};$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(link){return $("#edd-download-link").dialog({width:400}).html('<textarea rows="10" cols="40" id="edd-download-link-textarea">'+link+"</textarea>"),$("#edd-download-link-textarea").focus().select(),!1}}).fail(function(data){window.console&&window.console.log&&console.log(data)})})}}).init(),{init:function(){this.type_select(),this.product_requirements()},type_select:function(){$("#edd-edit-discount #edd-type, #edd-add-discount #edd-type").change(function(){var val=$(this).val();$(".edd-amount-description").hide(),$(".edd-amount-description."+val+"-discount").show()})},product_requirements:function(){$("#products").change(function(){var product_conditions=$("#edd-discount-product-conditions");$(this).val()?product_conditions.show():product_conditions.hide()})}}.init(),{init:function(){this.date_options(),this.customers_export()},date_options:function(){$("#edd-graphs-date-options").change(function(){var $this=$(this),date_range_options=$("#edd-date-range-options");"other"===$this.val()?date_range_options.show():date_range_options.hide()})},customers_export:function(){$("#edd_customer_export_download").change(function(){var $this=$(this),download_id=$("option:selected",$this).val(),customer_export_option=$("#edd_customer_export_option");if("0"===$this.val()?customer_export_option.show():customer_export_option.hide(),0!=parseInt(download_id)){var data={action:"edd_check_for_download_price_variations",download_id:download_id,all_prices:!0},price_options_select=$(".edd_price_options_select");$.post(ajaxurl,data,function(response){price_options_select.remove(),$("#edd_customer_export_download_chosen").after(response)})}else price_options_select.remove()})}}.init(),{init:function(){this.general(),this.taxes(),this.emails(),this.misc()},general:function(){var edd_color_picker=$(".edd-color-picker");if(edd_color_picker.length&&edd_color_picker.wpColorPicker(),"undefined"==typeof wp||"1"!==edd_vars.new_media_ui){var edd_settings_upload_button=$(".edd_settings_upload_button");0<edd_settings_upload_button.length&&(window.formfield="",$(document.body).on("click",edd_settings_upload_button,function(e){e.preventDefault(),window.formfield=$(this).parent().prev(),window.tbframe_interval=setInterval(function(){jQuery("#TB_iframeContent").contents().find(".savesend .button").val(edd_vars.use_this_file).end().find("#insert-gallery, .wp-post-thumbnail").hide()},2e3),tb_show(edd_vars.add_new_download,"media-upload.php?TB_iframe=true")}),window.edd_send_to_editor=window.send_to_editor,window.send_to_editor=function(html){window.formfield?(imgurl=$("a","<div>"+html+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe_interval),tb_remove()):window.edd_send_to_editor(html),window.send_to_editor=window.edd_send_to_editor,window.formfield="",window.imagefield=!1})}else{var file_frame;window.formfield="",$(document.body).on("click",".edd_settings_upload_button",function(e){e.preventDefault();var button=$(this);window.formfield=$(this).parent().prev(),file_frame||((file_frame=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:button.data("uploader_title"),button:{text:button.data("uploader_button_text")},multiple:!1})).on("menu:render:default",function(view){view.unset("library-separator"),view.unset("gallery"),view.unset("featured-image"),view.unset("embed"),view.set({})}),file_frame.on("insert",function(){file_frame.state().get("selection").each(function(attachment,index){attachment=attachment.toJSON(),window.formfield.val(attachment.url)})})),file_frame.open()}),window.formfield=""}},taxes:function(){var no_states=$("select.edd-no-states");no_states.length&&no_states.closest("tr").addClass("hidden"),$('select[name="edd_settings[base_country]"]').change(function(){var $this=$(this),$tr=$this.closest("tr"),data={action:"edd_get_shop_states",country:$this.val(),nonce:$this.data("nonce"),field_name:"edd_settings[base_state]"};return $.post(ajaxurl,data,function(response){"nostates"==response?$tr.next().addClass("hidden"):($tr.next().removeClass("hidden"),$tr.next().find("select").replaceWith(response))}),!1}),$(document.body).on("change","#edd_tax_rates select.edd-tax-country",function(){var $this=$(this),data={action:"edd_get_shop_states",country:$this.val(),nonce:$this.data("nonce"),field_name:$this.attr("name").replace("country","state")};return $.post(ajaxurl,data,function(response){if("nostates"==response){var text_field='<input type="text" name="'+data.field_name+'" value=""/>';$this.parent().next().find("select").replaceWith(text_field)}else $this.parent().next().find("input,select").show(),$this.parent().next().find("input,select").replaceWith(response)}),!1}),$("#edd_add_tax_rate").on("click",function(){var row=$("#edd_tax_rates tr:last"),clone=row.clone(),count=row.parent().find("tr").length;return clone.find("td input").not(":input[type=checkbox]").val(""),clone.find('td [type="checkbox"]').attr("checked",!1),clone.find("input, select").each(function(){var name=$(this).attr("name");name=name.replace(/\[(\d+)\]/,"["+parseInt(count)+"]"),$(this).attr("name",name).attr("id",name)}),clone.find("label").each(function(){var name=$(this).attr("for");name=name.replace(/\[(\d+)\]/,"["+parseInt(count)+"]"),$(this).attr("for",name)}),clone.insertAfter(row),!1}),$(document.body).on("click","#edd_tax_rates .edd_remove_tax_rate",function(){confirm(edd_vars.delete_tax_rate)&&(2===$("#edd_tax_rates tr:visible").length?($("#edd_tax_rates select").val(""),$('#edd_tax_rates input[type="text"]').val(""),$('#edd_tax_rates input[type="number"]').val(""),$('#edd_tax_rates input[type="checkbox"]').attr("checked",!1)):$(this).closest("tr").remove(),$("#edd_tax_rates tr").each(function(rowIndex){$(this).children().find("input, select").each(function(){var name=$(this).attr("name");name=name.replace(/\[(\d+)\]/,"["+(rowIndex-1)+"]"),$(this).attr("name",name).attr("id",name)})}));return!1})},emails:function(){$("#edd-sendwp-connect").on("click",function(e){e.preventDefault(),$(this).html(edd_vars.wait+' <span class="edd-loading"></span>'),document.body.style.cursor="wait",easy_digital_downloads_sendwp_remote_install()}),$("#edd-sendwp-disconnect").on("click",function(e){e.preventDefault(),$(this).html(edd_vars.wait+' <span class="edd-loading dark"></span>'),document.body.style.cursor="wait",easy_digital_downloads_sendwp_disconnect()}),$("#edd-recapture-connect").on("click",function(e){e.preventDefault(),$(this).html(edd_vars.wait+' <span class="edd-loading"></span>'),document.body.style.cursor="wait",easy_digital_downloads_recapture_remote_install()})},misc:function(){var downloadMethod=$('select[name="edd_settings[download_method]"]'),symlink=downloadMethod.parent().parent().next();"direct"==downloadMethod.val()&&(symlink.hide(),symlink.find("input").prop("checked",!1)),downloadMethod.on("change",function(){"direct"==$(this).val()?(symlink.hide(),symlink.find("input").prop("checked",!1)):symlink.show()})}}.init(),$(".download_page_edd-payment-history .row-actions .delete a, a.edd-delete-payment").on("click",function(){return!!confirm(edd_vars.delete_payment)}),$("body").on("click","#the-list .editinline",function(){var post_id=$(this).closest("tr").attr("id");post_id=post_id.replace("post-","");var regprice=$("#post-"+post_id).find(".column-price .downloadprice-"+post_id).val();regprice!=$("#post-"+post_id+".column-price .downloadprice-"+post_id).val()?$(".regprice","#edd-download-data").val(regprice).attr("disabled",!1):$(".regprice","#edd-download-data").val(edd_vars.quick_edit_warning).attr("disabled","disabled")}),$(document.body).on("click","#bulk_edit",function(){var $bulk_row=$("#bulk-edit"),$post_ids=new Array;$bulk_row.find("#bulk-titles").children().each(function(){$post_ids.push($(this).attr("id").replace(/^(ttle)/i,""))});var $price=$('#edd-download-data input[name="_edd_regprice"]').val(),data={action:"edd_save_bulk_edit",edd_bulk_nonce:$post_ids,post_ids:$post_ids,price:$price};$.post(ajaxurl,data)}),$(".edd-select-chosen").chosen({inherit_select_classes:!0,placeholder_text_single:edd_vars.one_option,placeholder_text_multiple:edd_vars.one_or_more_option}),$(".edd-select-chosen .chosen-search input").each(function(){var selectElem=$(this).parent().parent().parent().prev("select.edd-select-chosen"),placeholder=(selectElem.data("search-type"),selectElem.data("search-placeholder"));$(this).attr("placeholder",placeholder)}),$(".chosen-choices").on("click",function(){var placeholder=$(this).parent().prev().data("search-placeholder");void 0===placeholder&&(placeholder=edd_vars.type_to_search),$(this).children("li").children("input").attr("placeholder",placeholder)});$(document.body).on("keyup",".edd-select.chosen-container .chosen-search input, .edd-select.chosen-container .search-field input",function(e){var val=$(this).val(),container=$(this).closest(".edd-select-chosen"),select=(container.attr("id").replace("_chosen",""),container.prev()),no_bundles=container.hasClass("no-bundles"),variations=container.hasClass("variations"),lastKey=e.which,search_type="edd_download_search";if(container.prev().data("search-type")){if("no_ajax"==select.data("search-type"))return;search_type="edd_"+select.data("search-type")+"_search"}val.length<=3&&"edd_download_search"==search_type||16==lastKey||13==lastKey||91==lastKey||17==lastKey||37==lastKey||38==lastKey||39==lastKey||40==lastKey||(clearTimeout(typingTimer),typingTimer=setTimeout(function(){$.ajax({type:"GET",url:ajaxurl,data:{action:search_type,s:val,no_bundles:no_bundles,variations:variations},dataType:"json",beforeSend:function(){select.closest("ul.chosen-results").empty()},success:function(data){$("option:not(:selected)",select).remove(),$.each(data,function(key,item){$('option[value="'+item.id+'"]',select).length||select.prepend('<option value="'+item.id+'">'+item.name+"</option>")}),$(".edd-select-chosen").trigger("chosen:updated"),select.next().find("input").val(val)}}).fail(function(response){window.console&&window.console.log&&console.log(response)}).done(function(response){})},342))}),$("#post").on("click",".edd-thickbox",function(){$(".edd-select-chosen","#choose-download").css("width","100%")}),{init:function(){this.revoke_api_key(),this.regenerate_api_key(),this.create_api_key(),this.recount_stats()},revoke_api_key:function(){$(document.body).on("click",".edd-revoke-api-key",function(e){return confirm(edd_vars.revoke_api_key)})},regenerate_api_key:function(){$(document.body).on("click",".edd-regenerate-api-key",function(e){return confirm(edd_vars.regenerate_api_key)})},create_api_key:function(){$(document.body).on("submit","#api-key-generate-form",function(e){var input=$('input[type="text"][name="user_id"]');input.css("border-color","#ddd");var user_id=input.val();if(user_id.length<1||0==user_id)return input.css("border-color","#ff0000"),!1})},recount_stats:function(){$(document.body).on("change","#recount-stats-type",function(){var export_form=$("#edd-tools-recount-form"),selected_type=$("option:selected",this).data("type"),submit_button=$("#recount-stats-submit"),products=$("#tools-product-dropdown");if(export_form.find(".notice-wrap").remove(),submit_button.removeClass("button-disabled").attr("disabled",!1),products.hide(),$(".edd-recount-stats-descriptions span").hide(),"recount-download"===selected_type)products.show(),products.find(".edd-select-chosen").css("width","auto");else if("reset-stats"===selected_type){export_form.append('<div class="notice-wrap"></div>'),export_form.find(".notice-wrap").html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+edd_vars.reset_stats_warn+"</label></p></div>"),$("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}else products.hide(),products.val(0);$("#"+selected_type).show()}),$(document.body).on("change","#confirm-reset",function(){$(this).is(":checked")?$("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):$("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}),$("#edd-tools-recount-form").submit(function(e){var selection=$("#recount-stats-type").val(),export_form=$(this),selected_type=$("option:selected",this).data("type");if("reset-stats"===selected_type){if($("#confirm-reset").is(":checked"))return!0;has_errors=!0}export_form.find(".notice-wrap").remove(),export_form.append('<div class="notice-wrap"></div>');var notice_wrap=export_form.find(".notice-wrap"),has_errors=!1;(null!==selection&&0!==selection||(notice_wrap.html('<div class="updated error"><p>'+edd_vars.batch_export_no_class+"</p></div>"),has_errors=!0),"recount-download"===selected_type)&&(0==$('select[name="download_id"]').val()&&(notice_wrap.html('<div class="updated error"><p>'+edd_vars.batch_export_no_reqs+"</p></div>"),has_errors=!0));if(has_errors)return export_form.find(".button-disabled").removeClass("button-disabled"),!1})}}.init(),{init:function(){this.submit(),this.dismiss_message()},submit:function(){var self=this;$(document.body).on("submit",".edd-export-form",function(e){e.preventDefault();var submitButton=$(this).find('input[type="submit"]');if(!submitButton.hasClass("button-disabled")){var data=$(this).serialize();submitButton.addClass("button-disabled"),$(this).find(".notice-wrap").remove(),$(this).append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),self.process_step(1,data,self)}})},process_step:function(step,data,self){$.ajax({type:"POST",url:ajaxurl,data:{form:data,action:"edd_do_ajax_export",step:step},dataType:"json",success:function(response){if("done"==response.step||response.error||response.success){var export_form=$(".edd-export-form").find(".edd-progress").parent().parent(),notice_wrap=export_form.find(".notice-wrap");if(export_form.find(".button-disabled").removeClass("button-disabled"),response.error){var error_message=response.message;notice_wrap.html('<div class="updated error"><p>'+error_message+"</p></div>")}else if(response.success){var success_message=response.message;notice_wrap.html('<div id="edd-batch-success" class="updated notice is-dismissible"><p>'+success_message+'<span class="notice-dismiss"></span></p></div>')}else notice_wrap.remove(),window.location=response.url}else $(".edd-progress div").animate({width:response.percentage+"%"},50,function(){}),self.process_step(parseInt(response.step),data,self)}}).fail(function(response){window.console&&window.console.log&&console.log(response)})},dismiss_message:function(){$(document.body).on("click","#edd-batch-success .notice-dismiss",function(){$("#edd-batch-success").parent().slideUp("fast")})}}.init();var EDD_Import={init:function(){this.submit()},submit:function(){$(".edd-import-form").ajaxForm({beforeSubmit:this.before_submit,success:this.success,complete:this.complete,dataType:"json",error:this.error})},before_submit:function(arr,$form,options){if($form.find(".notice-wrap").remove(),$form.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),!(window.File&&window.FileReader&&window.FileList&&window.Blob)){var import_form=$(".edd-import-form").find(".edd-progress").parent().parent(),notice_wrap=import_form.find(".notice-wrap");return import_form.find(".button-disabled").removeClass("button-disabled"),notice_wrap.html('<div class="update error"><p>'+edd_vars.unsupported_browser+"</p></div>"),!1}},success:function(responseText,statusText,xhr,$form){},complete:function(xhr){var response=jQuery.parseJSON(xhr.responseText);if(response.success){var $form=$(".edd-import-form .notice-wrap").parent();$form.find(".edd-import-file-wrap,.notice-wrap").remove(),$form.find(".edd-import-options").slideDown();var select=$form.find("select.edd-import-csv-column"),options=(select.parents("tr").first(),""),columns=response.data.columns.sort(function(a,b){return a<b?-1:b<a?1:0});$.each(columns,function(key,value){options+='<option value="'+value+'">'+value+"</option>"}),select.append(options),select.on("change",function(){var $key=$(this).val();$key&&0!=response.data.first_row[$key]?$(this).parent().next().html(response.data.first_row[$key]):$(this).parent().next().html("")}),$.each(select,function(){$(this).val($(this).attr("data-field")).change()}),$(document.body).on("click",".edd-import-proceed",function(e){e.preventDefault(),$form.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),response.data.mapping=$form.serialize(),EDD_Import.process_step(1,response.data,self)})}else EDD_Import.error(xhr)},error:function(xhr){var response=jQuery.parseJSON(xhr.responseText),import_form=$(".edd-import-form").find(".edd-progress").parent().parent(),notice_wrap=import_form.find(".notice-wrap");import_form.find(".button-disabled").removeClass("button-disabled"),response.data.error?notice_wrap.html('<div class="update error"><p>'+response.data.error+"</p></div>"):notice_wrap.remove()},process_step:function(step,import_data,self){$.ajax({type:"POST",url:ajaxurl,data:{form:import_data.form,nonce:import_data.nonce,class:import_data.class,upload:import_data.upload,mapping:import_data.mapping,action:"edd_do_ajax_import",step:step},dataType:"json",success:function(response){if("done"==response.data.step||response.data.error){var import_form=$(".edd-import-form").find(".edd-progress").parent().parent(),notice_wrap=import_form.find(".notice-wrap");import_form.find(".button-disabled").removeClass("button-disabled"),response.data.error?notice_wrap.html('<div class="update error"><p>'+response.data.error+"</p></div>"):(import_form.find(".edd-import-options").hide(),$("html, body").animate({scrollTop:import_form.parent().offset().top},500),notice_wrap.html('<div class="updated"><p>'+response.data.message+"</p></div>"))}else $(".edd-progress div").animate({width:response.data.percentage+"%"},50,function(){}),EDD_Import.process_step(parseInt(response.data.step),import_data,self)}}).fail(function(response){window.console&&window.console.log&&console.log(response)})}};EDD_Import.init();var EDD_Customer={vars:{customer_card_wrap_editable:$(".edd-customer-card-wrapper .editable"),customer_card_wrap_edit_item:$(".edd-customer-card-wrapper .edit-item"),user_id:$('input[name="customerinfo[user_id]"]'),state_input:$(':input[name="customerinfo[state]"]'),note:$("#customer-note")},init:function(){this.edit_customer(),this.add_email(),this.user_search(),this.remove_user(),this.cancel_edit(),this.change_country(),this.add_note(),this.delete_checked()},edit_customer:function(){$(document.body).on("click","#edit-customer",function(e){e.preventDefault(),EDD_Customer.vars.customer_card_wrap_editable.hide(),EDD_Customer.vars.customer_card_wrap_edit_item.fadeIn().css("display","block")})},add_email:function(){$(document.body).on("click","#add-customer-email",function(e){e.preventDefault();var button=$(this),wrapper=button.parent();wrapper.parent().find(".notice-container").remove(),wrapper.find(".spinner").css("visibility","visible"),button.attr("disabled",!0);var postData={edd_action:"customer-add-email",customer_id:wrapper.find('input[name="customer-id"]').val(),email:wrapper.find('input[name="additional-email"]').val(),primary:wrapper.find('input[name="make-additional-primary"]').is(":checked"),_wpnonce:wrapper.find('input[name="add_email_nonce"]').val()};$.post(ajaxurl,postData,function(response){!0===response.success?window.location.href=response.redirect:(button.attr("disabled",!1),wrapper.after('<div class="notice-container"><div class="notice notice-error inline"><p>'+response.message+"</p></div></div>"),wrapper.find(".spinner").css("visibility","hidden"))},"json")})},user_search:function(){$(document.body).on("click.eddSelectUser",".edd_user_search_results a",function(e){e.preventDefault();var user_id=$(this).data("userid");EDD_Customer.vars.user_id.val(user_id)})},remove_user:function(){$(document.body).on("click","#disconnect-customer",function(e){if(e.preventDefault(),confirm(edd_vars.disconnect_customer)){var postData={edd_action:"disconnect-userid",customer_id:$('input[name="customerinfo[id]"]').val(),_wpnonce:$("#edit-customer-info #_wpnonce").val()};$.post(ajaxurl,postData,function(response){window.location.href=window.location.href},"json")}})},cancel_edit:function(){$(document.body).on("click","#edd-edit-customer-cancel",function(e){e.preventDefault(),EDD_Customer.vars.customer_card_wrap_edit_item.hide(),EDD_Customer.vars.customer_card_wrap_editable.show(),$(".edd_user_search_results").html("")})},change_country:function(){$('select[name="customerinfo[country]"]').change(function(){var $this=$(this),data={action:"edd_get_shop_states",country:$this.val(),nonce:$this.data("nonce"),field_name:"customerinfo[state]"};return $.post(ajaxurl,data,function(response){"nostates"==response?EDD_Customer.vars.state_input.replaceWith('<input type="text" name="'+data.field_name+'" value="" class="edd-edit-toggles medium-text"/>'):EDD_Customer.vars.state_input.replaceWith(response)}),!1})},add_note:function(){$(document.body).on("click","#add-customer-note",function(e){e.preventDefault();var postData={edd_action:"add-customer-note",customer_id:$("#customer-id").val(),customer_note:EDD_Customer.vars.note.val(),add_customer_note_nonce:$("#add_customer_note_nonce").val()};if(postData.customer_note)$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){$("#edd-customer-notes").prepend(response),$(".edd-no-customer-notes").hide(),EDD_Customer.vars.note.val("")}}).fail(function(data){window.console&&window.console.log&&console.log(data)});else{var border_color=EDD_Customer.vars.note.css("border-color");EDD_Customer.vars.note.css("border-color","red"),setTimeout(function(){EDD_Customer.vars.note.css("border-color",border_color)},500)}})},delete_checked:function(){$("#edd-customer-delete-confirm").change(function(){var records_input=$("#edd-customer-delete-records"),submit_button=$("#edd-delete-customer");$(this).prop("checked")?(records_input.attr("disabled",!1),submit_button.attr("disabled",!1)):(records_input.attr("disabled",!0),records_input.prop("checked",!1),submit_button.attr("disabled",!0))})}};EDD_Customer.init(),$(".edd-ajax-user-search").keyup(function(){var user_search=$(this).val(),exclude="";$(this).data("exclude")&&(exclude=$(this).data("exclude")),$(".edd-ajax").show();var data={action:"edd_search_users",user_name:user_search,exclude:exclude};document.body.style.cursor="wait",$.ajax({type:"POST",data:data,dataType:"json",url:ajaxurl,success:function(search_response){$(".edd-ajax").hide(),$(".edd_user_search_results").removeClass("hidden"),$(".edd_user_search_results span").html(""),$(search_response.results).appendTo(".edd_user_search_results span"),document.body.style.cursor="default"}})}),$(document.body).on("click.eddSelectUser",".edd_user_search_results span a",function(e){e.preventDefault();var login=$(this).data("login");$(".edd-ajax-user-search").val(login),$(".edd_user_search_results").addClass("hidden"),$(".edd_user_search_results span").html("")}),$(document.body).on("click.eddCancelUserSearch",".edd_user_search_results a.edd-ajax-user-cancel",function(e){e.preventDefault(),$(".edd-ajax-user-search").val(""),$(".edd_user_search_results").addClass("hidden"),$(".edd_user_search_results span").html("")}),$("#edd_dashboard_sales").length&&$.ajax({type:"GET",data:{action:"edd_load_dashboard_widget"},url:ajaxurl,success:function(response){$("#edd_dashboard_sales .inside").html(response)}}),$(document.body).on("keydown",".customer-note-input",function(e){13==e.keyCode&&(e.metaKey||e.ctrlKey)&&$("#add-customer-note").click()})});var eddFormatCurrency=function(value){var numeric=parseFloat(value),storeCurrency=edd_vars.currency,decimalPlaces=edd_vars.currency_decimals;return numeric.toLocaleString(storeCurrency,{style:"currency",currency:storeCurrency,minimumFractionDigits:decimalPlaces,maximumFractionDigits:decimalPlaces})},eddFormatNumber=function(value){var numeric=parseFloat(value),storeCurrency=edd_vars.currency;edd_vars.currency_decimals;return numeric.toLocaleString(storeCurrency,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})},eddLabelFormatter=function(label,series){return'<div style="font-size:12px; text-align:center; padding:2px">'+label+"</div>"},eddLegendFormatterSales=function(label,series){var slug=label.toLowerCase().replace(/\s/g,"-"),color='<div class="edd-legend-color" style="background-color: '+series.color+'"></div>',value='<div class="edd-pie-legend-item">'+label+": "+Math.round(series.percent)+"% ("+eddFormatNumber(series.data[0][1])+")</div>",item='<div id="'+series.edd_vars.id+slug+'" class="edd-legend-item-wrapper">'+color+value+"</div>";return jQuery("#edd-pie-legend-"+series.edd_vars.id).append(item),item},eddLegendFormatterEarnings=function(label,series){var slug=label.toLowerCase().replace(/\s/g,"-"),color='<div class="edd-legend-color" style="background-color: '+series.color+'"></div>',value='<div class="edd-pie-legend-item">'+label+": "+Math.round(series.percent)+"% ("+eddFormatCurrency(series.data[0][1])+")</div>",item='<div id="'+series.edd_vars.id+slug+'" class="edd-legend-item-wrapper">'+color+value+"</div>";return jQuery("#edd-pie-legend-"+series.edd_vars.id).append(item),item};function edd_attach_tooltips(selector){selector.tooltip({content:function(){return jQuery(this).prop("title")},tooltipClass:"edd-ui-tooltip",position:{my:"center top",at:"center bottom+10",collision:"flipfit"},hide:{duration:200},show:{duration:200}})}function easy_digital_downloads_sendwp_remote_install(){jQuery.post(ajaxurl,{action:"edd_sendwp_remote_install"},function(response){response.success||!confirm(response.data.error)?easy_digital_downloads_sendwp_register_client(response.data.register_url,response.data.client_name,response.data.client_secret,response.data.client_redirect,response.data.partner_id):location.reload()})}function easy_digital_downloads_sendwp_disconnect(){jQuery.post(ajaxurl,{action:"edd_sendwp_disconnect"},function(response){location.reload()})}function easy_digital_downloads_sendwp_register_client(register_url,client_name,client_secret,client_redirect,partner_id){var form=document.createElement("form");function easy_digital_downloads_sendwp_append_form_input(name,value){var input=document.createElement("input");input.setAttribute("type","hidden"),input.setAttribute("name",name),input.setAttribute("value",value),form.appendChild(input)}form.setAttribute("method","POST"),form.setAttribute("action",register_url),easy_digital_downloads_sendwp_append_form_input("client_name",client_name),easy_digital_downloads_sendwp_append_form_input("client_secret",client_secret),easy_digital_downloads_sendwp_append_form_input("client_redirect",client_redirect),easy_digital_downloads_sendwp_append_form_input("partner_id",partner_id),document.body.appendChild(form),form.submit()}function easy_digital_downloads_recapture_remote_install(){jQuery.post(ajaxurl,{action:"edd_recapture_remote_install"},function(response){0==response.success&&confirm(response.data.error)?location.reload():window.location.href="https://recapture.io/register"})}
|
1 |
+
jQuery(document).ready(function($){edd_attach_tooltips($(".edd-help-tip"));var EDD_Download_Configuration={init:function(){this.add(),this.move(),this.remove(),this.type(),this.prices(),this.files(),this.updatePrices()},clone_repeatable:function(row){var key;highest=1;return row.parent().find(".edd_repeatable_row").each(function(){var current=$(this).data("key");parseInt(current)>highest&&(highest=current)}),key=highest+=1,clone=row.clone(),clone.removeClass("edd_add_blank"),clone.attr("data-key",key),clone.find("input, select, textarea").val("").each(function(){var name=$(this).attr("name"),id=$(this).attr("id");name&&(name=name.replace(/\[(\d+)\]/,"["+parseInt(key)+"]"),$(this).attr("name",name)),$(this).attr("data-key",key),void 0!==id&&(id=id.replace(/(\d+)/,parseInt(key)),$(this).attr("id",id))}),clone.find("select").each(function(){$(this).val(row.find('select[name="'+$(this).attr("name")+'"]').val())}),clone.find('input[type="checkbox"]').each(function(){$(this).is(":checked")&&$(this).prop("checked",!1),$(this).val(1)}),clone.find("span.edd_price_id").each(function(){$(this).text(parseInt(key))}),clone.find("span.edd_file_id").each(function(){$(this).text(parseInt(key))}),clone.find(".edd_repeatable_default_input").each(function(){$(this).val(parseInt(key)).removeAttr("checked")}),clone.find(".edd_repeatable_condition_field").each(function(){$(this).find("option:eq(0)").prop("selected","selected")}),clone.find(".search-choice").remove(),clone.find(".chosen-container").remove(),edd_attach_tooltips(clone.find(".edd-help-tip")),clone},add:function(){$(document.body).on("click",".submit .edd_add_repeatable",function(clone){clone.preventDefault();var row=$(this).parent().parent().prev(".edd_repeatable_row"),clone=EDD_Download_Configuration.clone_repeatable(row);clone.insertAfter(row).find("input, textarea, select").filter(":visible").eq(0).focus(),clone.find(".edd-select-chosen").chosen({inherit_select_classes:!0,placeholder_text_single:edd_vars.one_option,placeholder_text_multiple:edd_vars.one_or_more_option}),clone.find(".edd-select-chosen").css("width","100%"),clone.find(".edd-select-chosen .chosen-search input").attr("placeholder",edd_vars.search_placeholder)})},move:function(){$(".edd_repeatable_table .edd-repeatables-wrap").sortable({handle:".edd-draghandle-anchor",items:".edd_repeatable_row",opacity:.6,cursor:"move",axis:"y",update:function(){var count=0;$(this).find(".edd_repeatable_row").each(function(){$(this).find("input.edd_repeatable_index").each(function(){$(this).val(count)}),count++})}})},remove:function(){$(document.body).on("click",".edd-remove-row, .edd_remove_repeatable",function(firstFocusable){firstFocusable.preventDefault();var row=$(this).parents(".edd_repeatable_row"),count=row.parent().find(".edd_repeatable_row").length,type=$(this).data("type"),repeatable="div.edd_repeatable_"+type+"s",price_row_id=$(this).is(".ui-sortable .edd_repeatable_row:first-child .edd-remove-row, .ui-sortable .edd_repeatable_row:first-child .edd_remove_repeatable")?row.next(".edd_repeatable_row"):row.prev(".edd_repeatable_row"),firstFocusable=price_row_id.find("select, input, textarea, button").filter(":visible").eq(0);if("price"===type&&(price_row_id=row.data("key"),$('.edd_repeatable_condition_field option[value="'+price_row_id+'"]').remove()),1<count)$("input, select",row).val(""),row.fadeOut("fast").remove(),firstFocusable.focus();else switch(type){case"price":alert(edd_vars.one_price_min);break;case"file":$("input, select",row).val("");break;default:alert(edd_vars.one_field_min)}$(repeatable).each(function(rowIndex){$(this).find("input, select").each(function(){var name=(name=$(this).attr("name")).replace(/\[(\d+)\]/,"["+rowIndex+"]");$(this).attr("name",name).attr("id",name)})})})},type:function(){$(document.body).on("change","#_edd_product_type",function(e){var edd_products=$("#edd_products"),edd_download_files=$("#edd_download_files"),edd_download_limit_wrap=$("#edd_download_limit_wrap");"bundle"===$(this).val()?(edd_products.show(),edd_download_files.hide(),edd_download_limit_wrap.hide()):(edd_products.hide(),edd_download_files.show(),edd_download_limit_wrap.show())})},prices:function(){$(document.body).on("change","#edd_variable_pricing",function(e){var checked=$(this).is(":checked"),single=$("#edd_regular_price_field"),variable=$("#edd_variable_price_fields, .edd_repeatable_table .pricing"),bundleRow=$(".edd-bundled-product-row, .edd-repeatable-row-standard-fields");checked?(single.hide(),variable.show(),bundleRow.addClass("has-variable-pricing")):(single.show(),variable.hide(),bundleRow.removeClass("has-variable-pricing"))})},files:function(){var file_frame;window.formfield="",$(document.body).on("click",".edd_upload_file_button",function(button){button.preventDefault();button=$(this);window.formfield=$(this).closest(".edd_repeatable_upload_wrapper"),file_frame||((file_frame=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:button.data("uploader-title"),button:{text:button.data("uploader-button-text")},multiple:"0"!=$(this).data("multiple")})).on("menu:render:default",function(view){view.unset("library-separator"),view.unset("gallery"),view.unset("featured-image"),view.unset("embed"),view.set({})}),file_frame.on("insert",function(){file_frame.state().get("selection").each(function(attachment,clone){var row,selectedSize="image"===(attachment=attachment.toJSON()).type&&$(".attachment-display-settings .size option:selected").val(),selectedURL=attachment.url,selectedName=0<attachment.title.length?attachment.title:attachment.filename;selectedSize&&void 0!==attachment.sizes[selectedSize]&&(selectedURL=attachment.sizes[selectedSize].url),"image"===attachment.type&&(selectedName=selectedSize&&void 0!==attachment.sizes[selectedSize]?selectedName+"-"+attachment.sizes[selectedSize].width+"x"+attachment.sizes[selectedSize].height:selectedName+"-"+attachment.width+"x"+attachment.height),0===clone?(window.formfield.find(".edd_repeatable_attachment_id_field").val(attachment.id),window.formfield.find(".edd_repeatable_thumbnail_size_field").val(selectedSize),window.formfield.find(".edd_repeatable_upload_field").val(selectedURL),window.formfield.find(".edd_repeatable_name_field").val(selectedName)):(row=window.formfield,(clone=EDD_Download_Configuration.clone_repeatable(row)).find(".edd_repeatable_attachment_id_field").val(attachment.id),clone.find(".edd_repeatable_thumbnail_size_field").val(selectedSize),clone.find(".edd_repeatable_upload_field").val(selectedURL),clone.find(".edd_repeatable_name_field").val(selectedName),clone.insertAfter(row))})})),file_frame.open()}),window.formfield=""},updatePrices:function(){$("#edd_price_fields").on("keyup",".edd_variable_prices_name",function(){var key=$(this).parents(".edd_repeatable_row").data("key"),name=$(this).val(),field_option=$(".edd_repeatable_condition_field option[value="+key+"]");0<field_option.length?field_option.text(name):$(".edd_repeatable_condition_field").append($("<option></option>").attr("value",key).text(name))})}};$(document.body).on("click",".toggle-custom-price-option-section",function(header){header.preventDefault();var show=$(this).html()==edd_vars.show_advanced_settings;show?$(this).html(edd_vars.hide_advanced_settings):$(this).html(edd_vars.show_advanced_settings);header=$(this).parents(".edd-repeatable-row-header");header.siblings(".edd-custom-price-option-sections-wrap").slideToggle(),$(":input:not(input[type=button],input[type=submit],button):visible:first",show?header.siblings(".edd-custom-price-option-sections-wrap"):header.siblings(".edd-repeatable-row-standard-fields")).focus()}),EDD_Download_Configuration.init();var typingTimer,edd_datepicker=$(".edd_datepicker");0<edd_datepicker.length&&edd_datepicker.datepicker({dateFormat:"mm/dd/yy"}),{init:function(){this.edit_address(),this.remove_download(),this.add_download(),this.change_customer(),this.new_customer(),this.edit_price(),this.recalculate_total(),this.variable_prices_check(),this.add_note(),this.remove_note(),this.resend_receipt(),this.copy_download_link()},edit_address:function(){$('select[name="edd-payment-address[0][country]"]').change(function(){var data=$(this),data={action:"edd_get_shop_states",country:data.val(),nonce:data.data("nonce"),field_name:"edd-payment-address[0][state]"};return $.post(ajaxurl,data,function(response){var state_wrapper=$("#edd-order-address-state-wrap select, #edd-order-address-state-wrap input");$("#edd-order-address-state-wrap .chosen-container").remove(),"nostates"==response?state_wrapper.replaceWith('<input type="text" name="edd-payment-address[0][state]" value="" class="edd-edit-toggles medium-text"/>'):state_wrapper.replaceWith(response)}),!1})},remove_download:function(){$("#edd-purchased-files").on("click",".edd-order-remove-download",function(){var key,download_id,price_id,quantity,amount,fees,currently_removed;return 1===$(document.body).find("#edd-purchased-files > .row:not(.header)").length?alert(edd_vars.one_download_min):confirm(edd_vars.delete_payment_download)&&(key=$(this).data("key"),$(".edd-payment-id").val(),download_id=$('input[name="edd-payment-details-downloads['+key+'][id]"]').val(),price_id=$('input[name="edd-payment-details-downloads['+key+'][price_id]"]').val(),quantity=$('input[name="edd-payment-details-downloads['+key+'][quantity]"]').val(),amount=$('input[name="edd-payment-details-downloads['+key+'][amount]"]').val(),$('input[name="edd-payment-details-downloads['+key+'][tax]"]').length&&(fees=$('input[name="edd-payment-details-downloads['+key+'][tax]"]').val()),$('input[name="edd-payment-details-downloads['+key+'][fees]"]').length&&(fees=$.parseJSON($('input[name="edd-payment-details-downloads['+key+'][fees]"]').val())),currently_removed=$('input[name="edd-payment-removed"]').val(),(currently_removed=(currently_removed=$.parseJSON(currently_removed)).length<1?{}:currently_removed)[key]=[{id:download_id,price_id:price_id,quantity:quantity,amount:amount,cart_index:key}],$('input[name="edd-payment-removed"]').val(JSON.stringify(currently_removed)),$(this).parent().parent().remove(),fees&&fees.length&&$.each(fees,function(key,value){$('*li[data-fee-id="'+value+'"]').remove()}),$("#edd-payment-downloads-changed").val(1),$(".edd-order-payment-recalc-totals").show()),!1})},change_customer:function(){$("#edd-customer-details").on("click",".edd-payment-change-customer, .edd-payment-change-customer-cancel",function(cancel){cancel.preventDefault();var change_customer=$(this).hasClass("edd-payment-change-customer"),cancel=$(this).hasClass("edd-payment-change-customer-cancel");change_customer?($(".customer-info").hide(),$(".change-customer").show(),$(".edd-payment-change-customer-input").css("width","auto")):cancel&&($(".customer-info").show(),$(".change-customer").hide())})},new_customer:function(){$("#edd-customer-details").on("click",".edd-payment-new-customer, .edd-payment-new-customer-cancel",function(cancel){cancel.preventDefault();var new_customer=$(this).hasClass("edd-payment-new-customer"),cancel=$(this).hasClass("edd-payment-new-customer-cancel");new_customer?($(".customer-info").hide(),$(".new-customer").show()):cancel&&($(".customer-info").show(),$(".new-customer").hide());new_customer=$("#edd-new-customer");$(".new-customer").is(":visible")?new_customer.val(1):new_customer.val(0)})},add_download:function(){$(".edd-edit-purchase-element").on("click","#edd-order-add-download",function(download_title){download_title.preventDefault();var quantity=$("#edd_order_download_select"),item_price=$("#edd-order-download-quantity"),item_total=$("#edd-order-download-price"),price_id=$("#edd-order-download-tax"),clone=$(".edd_price_options_select option:selected"),download_id=quantity.val(),download_title=quantity.find(":selected").text(),quantity=item_price.val(),item_price=item_total.val(),item_total=price_id.val(),price_id=clone.val(),clone=clone.text();if(download_id<1)return!1;if(item_price=item_price||0,item_price=parseFloat(item_price),isNaN(item_price))return alert(edd_vars.numeric_item_price),!1;if(item_total=parseFloat(item_total),isNaN(item_total))return alert(edd_vars.numeric_item_tax),!1;if(isNaN(parseInt(quantity)))return alert(edd_vars.numeric_quantity),!1;clone&&(download_title=download_title+" - "+clone);var count=$("#edd-purchased-files div.row:not(.edd-purchased-files-header)").length;0==count&&alert(edd_vars.no_downloads_error);clone=$("#edd-purchased-files div.row:not(.edd-purchased-files-header):last").clone();clone.find(".download span").html('<a href="post.php?post='+download_id+'&action=edit"></a>'),clone.find(".download span a").text(download_title),clone.find(".edd-payment-details-download-item-price").val(item_price.toFixed(edd_vars.currency_decimals)),clone.find(".edd-payment-details-download-item-tax").val(item_total.toFixed(edd_vars.currency_decimals)),clone.find("input.edd-payment-details-download-id").val(download_id),clone.find("input.edd-payment-details-download-price-id").val(price_id);item_total=(item_total=item_price*quantity+item_total).toFixed(edd_vars.currency_decimals);clone.find("span.edd-payment-details-download-amount").text(item_total),clone.find("input.edd-payment-details-download-amount").val(item_total),clone.find("input.edd-payment-details-download-quantity").val(quantity),clone.find("input.edd-payment-details-download-has-log").val(0),clone.find(".edd-copy-download-link-wrapper").remove(),clone.find("input").each(function(){var name=(name=$(this).attr("name")).replace(/\[(\d+)\]/,"["+parseInt(count)+"]");$(this).attr("name",name).attr("id",name)}),clone.find("a.edd-order-remove-download").attr("data-key",parseInt(count)),$("#edd-payment-downloads-changed").val(1),$("#edd-purchased-files div.row .edd-purchased-download-title .deleted").length&&$("#edd-purchased-files div.row:last").remove(),$(clone).insertAfter("#edd-purchased-files div.row:last"),$(".edd-order-payment-recalc-totals").show(),$(".edd-add-download-field").val("")})},edit_price:function(){$(document.body).on("change keyup",".edd-payment-item-input",function(){var row=$(this).parents("ul.edd-purchased-files-list-wrapper");$(".edd-order-payment-recalc-totals").show();var quantity=row.find("input.edd-payment-details-download-quantity").val().replace(edd_vars.thousands_separator,""),item_price=row.find("input.edd-payment-details-download-item-price").val().replace(edd_vars.thousands_separator,""),item_total=row.find("input.edd-payment-details-download-item-tax").val().replace(edd_vars.thousands_separator,""),item_price=parseFloat(item_price);if(isNaN(item_price))return alert(edd_vars.numeric_item_price),!1;item_total=parseFloat(item_total),isNaN(item_total)&&(item_total=0);item_total=(item_total=item_price*(quantity=isNaN(parseInt(quantity))?1:quantity)+item_total).toFixed(edd_vars.currency_decimals);row.find("input.edd-payment-details-download-amount").val(item_total),row.find("span.edd-payment-details-download-amount").text(item_total)})},recalculate_total:function(){$("#edd-order-recalc-total").on("click",function(taxes){taxes.preventDefault();var total=0,tax=0,totals=$("#edd-purchased-files .row input.edd-payment-details-download-amount"),taxes=$("#edd-purchased-files .row input.edd-payment-details-download-item-tax");totals.length&&totals.each(function(){total+=parseFloat($(this).val())}),taxes.length&&taxes.each(function(){tax+=parseFloat($(this).val())}),$(".edd-payment-fees").length&&$(".edd-payment-fees span.fee-amount").each(function(){total+=parseFloat($(this).data("fee"))}),$("input[name=edd-payment-total]").val(total.toFixed(edd_vars.currency_decimals)),$("input[name=edd-payment-tax]").val(tax.toFixed(edd_vars.currency_decimals))})},variable_prices_check:function(){$(".edd-edit-purchase-element").on("change","select#edd_order_download_select",function(){var $this=$(this),download_id=$this.val();0<parseInt(download_id)&&$.ajax({type:"POST",data:{action:"edd_check_for_download_price_variations",download_id:download_id},url:ajaxurl,success:function(response){$(".edd_price_options_select").remove(),$(response).insertAfter($this.next())}}).fail(function(data){window.console&&window.console.log&&console.log(data)})})},add_note:function(){$("#edd-add-payment-note").on("click",function(postData){postData.preventDefault();var border_color,postData={action:"edd_insert_payment_note",payment_id:$(this).data("payment-id"),note:$("#edd-payment-note").val()};postData.note?$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){$("#edd-payment-notes-inner").append(response),$(".edd-no-payment-notes").hide(),$("#edd-payment-note").val("")}}).fail(function(data){window.console&&window.console.log&&console.log(data)}):(border_color=$("#edd-payment-note").css("border-color"),$("#edd-payment-note").css("border-color","red"),setTimeout(function(){$("#edd-payment-note").css("border-color",border_color)},500))})},remove_note:function(){$(document.body).on("click",".edd-delete-payment-note",function(e){if(e.preventDefault(),confirm(edd_vars.delete_payment_note)){var postData={action:"edd_delete_payment_note",payment_id:$(this).data("payment-id"),note_id:$(this).data("note-id")};return $.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){return $("#edd-payment-note-"+postData.note_id).remove(),$(".edd-payment-note").length||$(".edd-no-payment-notes").show(),!1}}).fail(function(data){window.console&&window.console.log&&console.log(data)}),!0}})},resend_receipt:function(){var emails_wrap=$(".edd-order-resend-receipt-addresses");$(document.body).on("click","#edd-select-receipt-email",function(e){e.preventDefault(),emails_wrap.slideDown()}),$(document.body).on("change",".edd-order-resend-receipt-email",function(){var href=$("#edd-select-receipt-email").prop("href")+"&email="+$(this).val();confirm(edd_vars.resend_receipt)&&(window.location=href)}),$(document.body).on("click","#edd-resend-receipt",function(e){return confirm(edd_vars.resend_receipt)})},copy_download_link:function(){$(document.body).on("click",".edd-copy-download-link",function(postData){postData.preventDefault();postData=$(this),postData={action:"edd_get_file_download_link",payment_id:$('input[name="edd_payment_id"]').val(),download_id:postData.data("download-id"),price_id:postData.data("price-id")};$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(link){return $("#edd-download-link").dialog({width:400}).html('<textarea rows="10" cols="40" id="edd-download-link-textarea">'+link+"</textarea>"),$("#edd-download-link-textarea").focus().select(),!1}}).fail(function(data){window.console&&window.console.log&&console.log(data)})})}}.init(),{init:function(){this.type_select(),this.product_requirements()},type_select:function(){$("#edd-edit-discount #edd-type, #edd-add-discount #edd-type").change(function(){var val=$(this).val();$(".edd-amount-description").hide(),$(".edd-amount-description."+val+"-discount").show()})},product_requirements:function(){$("#products").change(function(){var product_conditions=$("#edd-discount-product-conditions");$(this).val()?product_conditions.show():product_conditions.hide()})}}.init(),{init:function(){this.date_options(),this.customers_export()},date_options:function(){$("#edd-graphs-date-options").change(function(){var $this=$(this),date_range_options=$("#edd-date-range-options");"other"===$this.val()?date_range_options.show():date_range_options.hide()})},customers_export:function(){$("#edd_customer_export_download").change(function(){var price_options_select,$this=$(this),data=$("option:selected",$this).val(),customer_export_option=$("#edd_customer_export_option");"0"===$this.val()?customer_export_option.show():customer_export_option.hide(),0!=parseInt(data)?(data={action:"edd_check_for_download_price_variations",download_id:data,all_prices:!0},price_options_select=$(".edd_price_options_select"),$.post(ajaxurl,data,function(response){price_options_select.remove(),$("#edd_customer_export_download_chosen").after(response)})):price_options_select.remove()})}}.init(),{init:function(){this.general(),this.taxes(),this.emails(),this.misc()},general:function(){var file_frame,edd_settings_upload_button=$(".edd-color-picker");edd_settings_upload_button.length&&edd_settings_upload_button.wpColorPicker(),"undefined"==typeof wp||"1"!==edd_vars.new_media_ui?0<(edd_settings_upload_button=$(".edd_settings_upload_button")).length&&(window.formfield="",$(document.body).on("click",edd_settings_upload_button,function(e){e.preventDefault(),window.formfield=$(this).parent().prev(),window.tbframe_interval=setInterval(function(){jQuery("#TB_iframeContent").contents().find(".savesend .button").val(edd_vars.use_this_file).end().find("#insert-gallery, .wp-post-thumbnail").hide()},2e3),tb_show(edd_vars.add_new_download,"media-upload.php?TB_iframe=true")}),window.edd_send_to_editor=window.send_to_editor,window.send_to_editor=function(html){window.formfield?(imgurl=$("a","<div>"+html+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe_interval),tb_remove()):window.edd_send_to_editor(html),window.send_to_editor=window.edd_send_to_editor,window.formfield="",window.imagefield=!1}):(window.formfield="",$(document.body).on("click",".edd_settings_upload_button",function(button){button.preventDefault();button=$(this);window.formfield=$(this).parent().prev(),file_frame||((file_frame=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:button.data("uploader_title"),button:{text:button.data("uploader_button_text")},multiple:!1})).on("menu:render:default",function(view){view.unset("library-separator"),view.unset("gallery"),view.unset("featured-image"),view.unset("embed"),view.set({})}),file_frame.on("insert",function(){file_frame.state().get("selection").each(function(attachment,index){attachment=attachment.toJSON(),window.formfield.val(attachment.url)})})),file_frame.open()}),window.formfield="")},taxes:function(){var no_states=$("select.edd-no-states");no_states.length&&no_states.closest("tr").addClass("hidden"),$('select[name="edd_settings[base_country]"]').change(function(){var data=$(this),$tr=data.closest("tr"),data={action:"edd_get_shop_states",country:data.val(),nonce:data.data("nonce"),field_name:"edd_settings[base_state]"};return $.post(ajaxurl,data,function(response){"nostates"==response?$tr.next().addClass("hidden"):($tr.next().removeClass("hidden"),$tr.next().find("select").replaceWith(response))}),!1}),$(document.body).on("change","#edd_tax_rates select.edd-tax-country",function(){var $this=$(this),data={action:"edd_get_shop_states",country:$this.val(),nonce:$this.data("nonce"),field_name:$this.attr("name").replace("country","state")};return $.post(ajaxurl,data,function(response){var text_field;"nostates"==response?(text_field='<input type="text" name="'+data.field_name+'" value=""/>',$this.parent().next().find("select").replaceWith(text_field)):($this.parent().next().find("input,select").show(),$this.parent().next().find("input,select").replaceWith(response))}),!1}),$("#edd_add_tax_rate").on("click",function(){var row=$("#edd_tax_rates tr:last"),clone=row.clone(),count=row.parent().find("tr").length;return clone.find("td input").not(":input[type=checkbox]").val(""),clone.find('td [type="checkbox"]').attr("checked",!1),clone.find("input, select").each(function(){var name=(name=$(this).attr("name")).replace(/\[(\d+)\]/,"["+parseInt(count)+"]");$(this).attr("name",name).attr("id",name)}),clone.find("label").each(function(){var name=(name=$(this).attr("for")).replace(/\[(\d+)\]/,"["+parseInt(count)+"]");$(this).attr("for",name)}),clone.insertAfter(row),!1}),$(document.body).on("click","#edd_tax_rates .edd_remove_tax_rate",function(){return confirm(edd_vars.delete_tax_rate)&&(2===$("#edd_tax_rates tr:visible").length?($("#edd_tax_rates select").val(""),$('#edd_tax_rates input[type="text"]').val(""),$('#edd_tax_rates input[type="number"]').val(""),$('#edd_tax_rates input[type="checkbox"]').attr("checked",!1)):$(this).closest("tr").remove(),$("#edd_tax_rates tr").each(function(rowIndex){$(this).children().find("input, select").each(function(){var name=(name=$(this).attr("name")).replace(/\[(\d+)\]/,"["+(rowIndex-1)+"]");$(this).attr("name",name).attr("id",name)})})),!1})},emails:function(){$("#edd-sendwp-connect").on("click",function(e){e.preventDefault(),$(this).html(edd_vars.wait+' <span class="edd-loading"></span>'),document.body.style.cursor="wait",easy_digital_downloads_sendwp_remote_install()}),$("#edd-sendwp-disconnect").on("click",function(e){e.preventDefault(),$(this).html(edd_vars.wait+' <span class="edd-loading dark"></span>'),document.body.style.cursor="wait",easy_digital_downloads_sendwp_disconnect()}),$("#edd-recapture-connect").on("click",function(e){e.preventDefault(),$(this).html(edd_vars.wait+' <span class="edd-loading"></span>'),document.body.style.cursor="wait",easy_digital_downloads_recapture_remote_install()})},misc:function(){var downloadMethod=$('select[name="edd_settings[download_method]"]'),symlink=downloadMethod.parent().parent().next();"direct"==downloadMethod.val()&&(symlink.hide(),symlink.find("input").prop("checked",!1)),downloadMethod.on("change",function(){"direct"==$(this).val()?(symlink.hide(),symlink.find("input").prop("checked",!1)):symlink.show()})}}.init(),$(".download_page_edd-payment-history .row-actions .delete a, a.edd-delete-payment").on("click",function(){return!!confirm(edd_vars.delete_payment)}),$("body").on("click","#the-list .editinline",function(){var post_id=(post_id=$(this).closest("tr").attr("id")).replace("post-",""),regprice=$("#post-"+post_id).find(".column-price .downloadprice-"+post_id).val();regprice!=$("#post-"+post_id+".column-price .downloadprice-"+post_id).val()?$(".regprice","#edd-download-data").val(regprice).attr("disabled",!1):$(".regprice","#edd-download-data").val(edd_vars.quick_edit_warning).attr("disabled","disabled")}),$(document.body).on("click","#bulk_edit",function(){var $price=$("#bulk-edit"),$post_ids=new Array;$price.find("#bulk-titles").children().each(function(){$post_ids.push($(this).attr("id").replace(/^(ttle)/i,""))});$price=$('#edd-download-data input[name="_edd_regprice"]').val();$.post(ajaxurl,{action:"edd_save_bulk_edit",edd_bulk_nonce:$post_ids,post_ids:$post_ids,price:$price})}),$(".edd-select-chosen").chosen({inherit_select_classes:!0,placeholder_text_single:edd_vars.one_option,placeholder_text_multiple:edd_vars.one_or_more_option}),$(".edd-select-chosen .chosen-search input").each(function(){var placeholder=$(this).parent().parent().parent().prev("select.edd-select-chosen"),placeholder=(placeholder.data("search-type"),placeholder.data("search-placeholder"));$(this).attr("placeholder",placeholder)}),$(".chosen-choices").on("click",function(){var placeholder=$(this).parent().prev().data("search-placeholder");void 0===placeholder&&(placeholder=edd_vars.type_to_search),$(this).children("li").children("input").attr("placeholder",placeholder)});$(document.body).on("keyup",".edd-select.chosen-container .chosen-search input, .edd-select.chosen-container .search-field input",function(lastKey){var val=$(this).val(),container=$(this).closest(".edd-select-chosen"),select=(container.attr("id").replace("_chosen",""),container.prev()),no_bundles=container.hasClass("no-bundles"),variations=container.hasClass("variations"),lastKey=lastKey.which,search_type="edd_download_search";if(container.prev().data("search-type")){if("no_ajax"==select.data("search-type"))return;search_type="edd_"+select.data("search-type")+"_search"}val.length<=3&&"edd_download_search"==search_type||16==lastKey||13==lastKey||91==lastKey||17==lastKey||37==lastKey||38==lastKey||39==lastKey||40==lastKey||(clearTimeout(typingTimer),typingTimer=setTimeout(function(){$.ajax({type:"GET",url:ajaxurl,data:{action:search_type,s:val,no_bundles:no_bundles,variations:variations},dataType:"json",beforeSend:function(){select.closest("ul.chosen-results").empty()},success:function(data){$("option:not(:selected)",select).remove(),$.each(data,function(key,item){$('option[value="'+item.id+'"]',select).length||select.prepend('<option value="'+item.id+'">'+item.name+"</option>")}),$(".edd-select-chosen").trigger("chosen:updated"),select.next().find("input").val(val)}}).fail(function(response){window.console&&window.console.log&&console.log(response)}).done(function(response){})},342))}),$("#post").on("click",".edd-thickbox",function(){$(".edd-select-chosen","#choose-download").css("width","100%")}),{init:function(){this.revoke_api_key(),this.regenerate_api_key(),this.create_api_key(),this.recount_stats()},revoke_api_key:function(){$(document.body).on("click",".edd-revoke-api-key",function(e){return confirm(edd_vars.revoke_api_key)})},regenerate_api_key:function(){$(document.body).on("click",".edd-regenerate-api-key",function(e){return confirm(edd_vars.regenerate_api_key)})},create_api_key:function(){$(document.body).on("submit","#api-key-generate-form",function(e){var input=$('input[type="text"][name="user_id"]');input.css("border-color","#ddd");var user_id=input.val();if(user_id.length<1||0==user_id)return input.css("border-color","#ff0000"),!1})},recount_stats:function(){$(document.body).on("change","#recount-stats-type",function(){var export_form=$("#edd-tools-recount-form"),selected_type=$("option:selected",this).data("type"),submit_button=$("#recount-stats-submit"),products=$("#tools-product-dropdown");export_form.find(".notice-wrap").remove(),submit_button.removeClass("button-disabled").attr("disabled",!1),products.hide(),$(".edd-recount-stats-descriptions span").hide(),"recount-download"===selected_type?(products.show(),products.find(".edd-select-chosen").css("width","auto")):"reset-stats"===selected_type?(export_form.append('<div class="notice-wrap"></div>'),export_form.find(".notice-wrap").html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+edd_vars.reset_stats_warn+"</label></p></div>"),$("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")):(products.hide(),products.val(0)),$("#"+selected_type).show()}),$(document.body).on("change","#confirm-reset",function(){$(this).is(":checked")?$("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):$("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}),$("#edd-tools-recount-form").submit(function(e){var selection=$("#recount-stats-type").val(),export_form=$(this),selected_type=$("option:selected",this).data("type");if("reset-stats"===selected_type){if($("#confirm-reset").is(":checked"))return!0;has_errors=!0}export_form.find(".notice-wrap").remove(),export_form.append('<div class="notice-wrap"></div>');var notice_wrap=export_form.find(".notice-wrap"),has_errors=!1;if(null!==selection&&0!==selection||(notice_wrap.html('<div class="updated error"><p>'+edd_vars.batch_export_no_class+"</p></div>"),has_errors=!0),"recount-download"===selected_type&&0==$('select[name="download_id"]').val()&&(notice_wrap.html('<div class="updated error"><p>'+edd_vars.batch_export_no_reqs+"</p></div>"),has_errors=!0),has_errors)return export_form.find(".button-disabled").removeClass("button-disabled"),!1})}}.init(),{init:function(){this.submit(),this.dismiss_message()},submit:function(){var self=this;$(document.body).on("submit",".edd-export-form",function(data){data.preventDefault();var submitButton=$(this).find('input[type="submit"]');submitButton.hasClass("button-disabled")||(data=$(this).serialize(),submitButton.addClass("button-disabled"),$(this).find(".notice-wrap").remove(),$(this).append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),self.process_step(1,data,self))})},process_step:function(step,data,self){$.ajax({type:"POST",url:ajaxurl,data:{form:data,action:"edd_do_ajax_export",step:step},dataType:"json",success:function(response){var export_form,notice_wrap,success_message;"done"==response.step||response.error||response.success?(notice_wrap=(export_form=$(".edd-export-form").find(".edd-progress").parent().parent()).find(".notice-wrap"),export_form.find(".button-disabled").removeClass("button-disabled"),response.error?(success_message=response.message,notice_wrap.html('<div class="updated error"><p>'+success_message+"</p></div>")):response.success?(success_message=response.message,notice_wrap.html('<div id="edd-batch-success" class="updated notice is-dismissible"><p>'+success_message+'<span class="notice-dismiss"></span></p></div>')):(notice_wrap.remove(),window.location=response.url)):($(".edd-progress div").animate({width:response.percentage+"%"},50,function(){}),self.process_step(parseInt(response.step),data,self))}}).fail(function(response){window.console&&window.console.log&&console.log(response)})},dismiss_message:function(){$(document.body).on("click","#edd-batch-success .notice-dismiss",function(){$("#edd-batch-success").parent().slideUp("fast")})}}.init();var EDD_Import={init:function(){this.submit()},submit:function(){$(".edd-import-form").ajaxForm({beforeSubmit:this.before_submit,success:this.success,complete:this.complete,dataType:"json",error:this.error})},before_submit:function(arr,notice_wrap,options){if(notice_wrap.find(".notice-wrap").remove(),notice_wrap.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),!(window.File&&window.FileReader&&window.FileList&&window.Blob)){var import_form=$(".edd-import-form").find(".edd-progress").parent().parent(),notice_wrap=import_form.find(".notice-wrap");return import_form.find(".button-disabled").removeClass("button-disabled"),notice_wrap.html('<div class="update error"><p>'+edd_vars.unsupported_browser+"</p></div>"),!1}},success:function(responseText,statusText,xhr,$form){},complete:function(xhr){var $form,select,options,columns,response=jQuery.parseJSON(xhr.responseText);response.success?(($form=$(".edd-import-form .notice-wrap").parent()).find(".edd-import-file-wrap,.notice-wrap").remove(),$form.find(".edd-import-options").slideDown(),(select=$form.find("select.edd-import-csv-column")).parents("tr").first(),options="",columns=response.data.columns.sort(function(a,b){return a<b?-1:b<a?1:0}),$.each(columns,function(key,value){options+='<option value="'+value+'">'+value+"</option>"}),select.append(options),select.on("change",function(){var $key=$(this).val();$key&&0!=response.data.first_row[$key]?$(this).parent().next().html(response.data.first_row[$key]):$(this).parent().next().html("")}),$.each(select,function(){$(this).val($(this).attr("data-field")).change()}),$(document.body).on("click",".edd-import-proceed",function(e){e.preventDefault(),$form.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),response.data.mapping=$form.serialize(),EDD_Import.process_step(1,response.data,self)})):EDD_Import.error(xhr)},error:function(notice_wrap){var response=jQuery.parseJSON(notice_wrap.responseText),import_form=$(".edd-import-form").find(".edd-progress").parent().parent(),notice_wrap=import_form.find(".notice-wrap");import_form.find(".button-disabled").removeClass("button-disabled"),response.data.error?notice_wrap.html('<div class="update error"><p>'+response.data.error+"</p></div>"):notice_wrap.remove()},process_step:function(step,import_data,self){$.ajax({type:"POST",url:ajaxurl,data:{form:import_data.form,nonce:import_data.nonce,class:import_data.class,upload:import_data.upload,mapping:import_data.mapping,action:"edd_do_ajax_import",step:step},dataType:"json",success:function(response){var import_form,notice_wrap;"done"==response.data.step||response.data.error?(notice_wrap=(import_form=$(".edd-import-form").find(".edd-progress").parent().parent()).find(".notice-wrap"),import_form.find(".button-disabled").removeClass("button-disabled"),response.data.error?notice_wrap.html('<div class="update error"><p>'+response.data.error+"</p></div>"):(import_form.find(".edd-import-options").hide(),$("html, body").animate({scrollTop:import_form.parent().offset().top},500),notice_wrap.html('<div class="updated"><p>'+response.data.message+"</p></div>"))):($(".edd-progress div").animate({width:response.data.percentage+"%"},50,function(){}),EDD_Import.process_step(parseInt(response.data.step),import_data,self))}}).fail(function(response){window.console&&window.console.log&&console.log(response)})}};EDD_Import.init();var EDD_Customer={vars:{customer_card_wrap_editable:$(".edd-customer-card-wrapper .editable"),customer_card_wrap_edit_item:$(".edd-customer-card-wrapper .edit-item"),user_id:$('input[name="customerinfo[user_id]"]'),state_input:$(':input[name="customerinfo[state]"]'),note:$("#customer-note")},init:function(){this.edit_customer(),this.add_email(),this.user_search(),this.remove_user(),this.cancel_edit(),this.change_country(),this.add_note(),this.delete_checked()},edit_customer:function(){$(document.body).on("click","#edit-customer",function(e){e.preventDefault(),EDD_Customer.vars.customer_card_wrap_editable.hide(),EDD_Customer.vars.customer_card_wrap_edit_item.fadeIn().css("display","block")})},add_email:function(){$(document.body).on("click","#add-customer-email",function(nonce){nonce.preventDefault();var button=$(this),wrapper=button.parent();wrapper.parent().find(".notice-container").remove(),wrapper.find(".spinner").css("visibility","visible"),button.attr("disabled",!0);var customer_id=wrapper.find('input[name="customer-id"]').val(),email=wrapper.find('input[name="additional-email"]').val(),primary=wrapper.find('input[name="make-additional-primary"]').is(":checked"),nonce=wrapper.find('input[name="add_email_nonce"]').val();$.post(ajaxurl,{edd_action:"customer-add-email",customer_id:customer_id,email:email,primary:primary,_wpnonce:nonce},function(response){!0===response.success?window.location.href=response.redirect:(button.attr("disabled",!1),wrapper.after('<div class="notice-container"><div class="notice notice-error inline"><p>'+response.message+"</p></div></div>"),wrapper.find(".spinner").css("visibility","hidden"))},"json")})},user_search:function(){$(document.body).on("click.eddSelectUser",".edd_user_search_results a",function(user_id){user_id.preventDefault();user_id=$(this).data("userid");EDD_Customer.vars.user_id.val(user_id)})},remove_user:function(){$(document.body).on("click","#disconnect-customer",function(postData){postData.preventDefault(),confirm(edd_vars.disconnect_customer)&&(postData={edd_action:"disconnect-userid",customer_id:$('input[name="customerinfo[id]"]').val(),_wpnonce:$("#edit-customer-info #_wpnonce").val()},$.post(ajaxurl,postData,function(response){window.location.href=window.location.href},"json"))})},cancel_edit:function(){$(document.body).on("click","#edd-edit-customer-cancel",function(e){e.preventDefault(),EDD_Customer.vars.customer_card_wrap_edit_item.hide(),EDD_Customer.vars.customer_card_wrap_editable.show(),$(".edd_user_search_results").html("")})},change_country:function(){$('select[name="customerinfo[country]"]').change(function(){var $this=$(this),data={action:"edd_get_shop_states",country:$this.val(),nonce:$this.data("nonce"),field_name:"customerinfo[state]"};return $.post(ajaxurl,data,function(response){"nostates"==response?EDD_Customer.vars.state_input.replaceWith('<input type="text" name="'+data.field_name+'" value="" class="edd-edit-toggles medium-text"/>'):EDD_Customer.vars.state_input.replaceWith(response)}),!1})},add_note:function(){$(document.body).on("click","#add-customer-note",function(postData){postData.preventDefault();var border_color,postData={edd_action:"add-customer-note",customer_id:$("#customer-id").val(),customer_note:EDD_Customer.vars.note.val(),add_customer_note_nonce:$("#add_customer_note_nonce").val()};postData.customer_note?$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){$("#edd-customer-notes").prepend(response),$(".edd-no-customer-notes").hide(),EDD_Customer.vars.note.val("")}}).fail(function(data){window.console&&window.console.log&&console.log(data)}):(border_color=EDD_Customer.vars.note.css("border-color"),EDD_Customer.vars.note.css("border-color","red"),setTimeout(function(){EDD_Customer.vars.note.css("border-color",border_color)},500))})},delete_checked:function(){$("#edd-customer-delete-confirm").change(function(){var records_input=$("#edd-customer-delete-records"),submit_button=$("#edd-delete-customer");$(this).prop("checked")?(records_input.attr("disabled",!1),submit_button.attr("disabled",!1)):(records_input.attr("disabled",!0),records_input.prop("checked",!1),submit_button.attr("disabled",!0))})}};EDD_Customer.init();var EDD_Promo_Notices={init:function(){EDD_Promo_Notices.displayNotices(),EDD_Promo_Notices.dismissNotices()},displayNotices:function(){var topOfPageNoticeEl,topOfPageNotice=$(".edd-admin-notice-top-of-page");topOfPageNotice&&(topOfPageNoticeEl=topOfPageNotice.detach(),$("#wpbody-content").prepend(topOfPageNoticeEl),topOfPageNotice.delay(1e3).slideDown())},dismissNotices:function(){$(".edd-promo-notice").each(function(){var notice=$(this);notice.on("click",".edd-promo-notice-dismiss",function(e){e.preventDefault(),$.ajax({type:"POST",data:{action:"edd_dismiss_promo_notice",notice_id:notice.data("id"),nonce:notice.data("nonce"),lifespan:notice.data("lifespan")},url:ajaxurl,success:function(response){notice.slideUp()}})})})}};EDD_Promo_Notices.init(),$(".edd-ajax-user-search").keyup(function(){var user_search=$(this).val(),data="";$(this).data("exclude")&&(data=$(this).data("exclude")),$(".edd-ajax").show();data={action:"edd_search_users",user_name:user_search,exclude:data};document.body.style.cursor="wait",$.ajax({type:"POST",data:data,dataType:"json",url:ajaxurl,success:function(search_response){$(".edd-ajax").hide(),$(".edd_user_search_results").removeClass("hidden"),$(".edd_user_search_results span").html(""),$(search_response.results).appendTo(".edd_user_search_results span"),document.body.style.cursor="default"}})}),$(document.body).on("click.eddSelectUser",".edd_user_search_results span a",function(login){login.preventDefault();login=$(this).data("login");$(".edd-ajax-user-search").val(login),$(".edd_user_search_results").addClass("hidden"),$(".edd_user_search_results span").html("")}),$(document.body).on("click.eddCancelUserSearch",".edd_user_search_results a.edd-ajax-user-cancel",function(e){e.preventDefault(),$(".edd-ajax-user-search").val(""),$(".edd_user_search_results").addClass("hidden"),$(".edd_user_search_results span").html("")}),$("#edd_dashboard_sales").length&&$.ajax({type:"GET",data:{action:"edd_load_dashboard_widget"},url:ajaxurl,success:function(response){$("#edd_dashboard_sales .inside").html(response)}}),$(document.body).on("keydown",".customer-note-input",function(e){13==e.keyCode&&(e.metaKey||e.ctrlKey)&&$("#add-customer-note").click()})});var eddFormatCurrency=function(decimalPlaces){var numeric=parseFloat(decimalPlaces),storeCurrency=edd_vars.currency,decimalPlaces=edd_vars.currency_decimals;return numeric.toLocaleString(storeCurrency,{style:"currency",currency:storeCurrency,minimumFractionDigits:decimalPlaces,maximumFractionDigits:decimalPlaces})},eddFormatNumber=function(storeCurrency){var numeric=parseFloat(storeCurrency),storeCurrency=edd_vars.currency;edd_vars.currency_decimals;return numeric.toLocaleString(storeCurrency,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})},eddLabelFormatter=function(label,series){return'<div style="font-size:12px; text-align:center; padding:2px">'+label+"</div>"},eddLegendFormatterSales=function(item,series){var slug=item.toLowerCase().replace(/\s/g,"-"),color='<div class="edd-legend-color" style="background-color: '+series.color+'"></div>',item='<div class="edd-pie-legend-item">'+item+": "+Math.round(series.percent)+"% ("+eddFormatNumber(series.data[0][1])+")</div>",item='<div id="'+series.edd_vars.id+slug+'" class="edd-legend-item-wrapper">'+color+item+"</div>";return jQuery("#edd-pie-legend-"+series.edd_vars.id).append(item),item},eddLegendFormatterEarnings=function(item,series){var slug=item.toLowerCase().replace(/\s/g,"-"),color='<div class="edd-legend-color" style="background-color: '+series.color+'"></div>',item='<div class="edd-pie-legend-item">'+item+": "+Math.round(series.percent)+"% ("+eddFormatCurrency(series.data[0][1])+")</div>",item='<div id="'+series.edd_vars.id+slug+'" class="edd-legend-item-wrapper">'+color+item+"</div>";return jQuery("#edd-pie-legend-"+series.edd_vars.id).append(item),item};function edd_attach_tooltips(selector){selector.tooltip({content:function(){return jQuery(this).prop("title")},tooltipClass:"edd-ui-tooltip",position:{my:"center top",at:"center bottom+10",collision:"flipfit"},hide:{duration:200},show:{duration:200}})}function easy_digital_downloads_sendwp_remote_install(){jQuery.post(ajaxurl,{action:"edd_sendwp_remote_install"},function(response){response.success||!confirm(response.data.error)?easy_digital_downloads_sendwp_register_client(response.data.register_url,response.data.client_name,response.data.client_secret,response.data.client_redirect,response.data.partner_id):location.reload()})}function easy_digital_downloads_sendwp_disconnect(){jQuery.post(ajaxurl,{action:"edd_sendwp_disconnect"},function(response){location.reload()})}function easy_digital_downloads_sendwp_register_client(register_url,client_name,client_secret,client_redirect,partner_id){var form=document.createElement("form");function easy_digital_downloads_sendwp_append_form_input(name,value){var input=document.createElement("input");input.setAttribute("type","hidden"),input.setAttribute("name",name),input.setAttribute("value",value),form.appendChild(input)}form.setAttribute("method","POST"),form.setAttribute("action",register_url),easy_digital_downloads_sendwp_append_form_input("client_name",client_name),easy_digital_downloads_sendwp_append_form_input("client_secret",client_secret),easy_digital_downloads_sendwp_append_form_input("client_redirect",client_redirect),easy_digital_downloads_sendwp_append_form_input("partner_id",partner_id),document.body.appendChild(form),form.submit()}function easy_digital_downloads_recapture_remote_install(){jQuery.post(ajaxurl,{action:"edd_recapture_remote_install"},function(response){0==response.success&&confirm(response.data.error)?location.reload():window.location.href="https://recapture.io/register"})}
|
assets/js/edd-ajax.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var edd_scripts;function edd_load_gateway(payment_mode){jQuery(".edd-cart-ajax").show(),jQuery("#edd_purchase_form_wrap").html('<span class="edd-loading-ajax edd-loading"></span>');var nonce=jQuery("#edd-gateway-"+payment_mode).data(payment_mode+"-nonce"),url=edd_scripts.ajaxurl;0<url.indexOf("?")?url+="&":url+="?",url=url+"payment-mode="+payment_mode,jQuery.post(url,{action:"edd_load_gateway",edd_payment_mode:payment_mode,nonce:nonce},function(response){jQuery("#edd_purchase_form_wrap").html(response),jQuery(".edd-no-js").hide(),jQuery("body").trigger("edd_gateway_loaded",[payment_mode])})}jQuery(document).ready(function($){if($(".edd-no-js").hide(),$("a.edd-add-to-cart").addClass("edd-has-js"),$(document.body).on("click.eddRemoveFromCart",".edd-remove-from-cart",function(event){var $this=$(this),item=$this.data("cart-item"),action=$this.data("action"),id=$this.data("download-id"),nonce=$this.data("nonce"),data={action:action,cart_item:item,nonce:nonce};return $.ajax({type:"POST",data:data,dataType:"json",url:edd_scripts.ajaxurl,xhrFields:{withCredentials:!0},success:function(response){if(response.removed){if(parseInt(edd_scripts.position_in_cart,10)===parseInt(item,10)||edd_scripts.has_purchase_links)return window.location=window.location,!1;$(".edd-cart").each(function(){$(this).find("[data-cart-item='"+item+"']").parent().remove()}),$(".edd-cart").each(function(){var cart_item_counter=0;$(this).find("[data-cart-item]").each(function(){$(this).attr("data-cart-item",cart_item_counter),cart_item_counter+=1})}),$("[id^=edd_purchase_"+id+"]").length&&($("[id^=edd_purchase_"+id+"] .edd_go_to_checkout").hide(),$("[id^=edd_purchase_"+id+"] a.edd-add-to-cart").show().removeAttr("data-edd-loading"),"1"==edd_scripts.quantities_enabled&&$("[id^=edd_purchase_"+id+"] .edd_download_quantity_wrapper").show()),$("span.edd-cart-quantity").text(response.cart_quantity),$(document.body).trigger("edd_quantity_updated",[response.cart_quantity]),edd_scripts.taxes_enabled&&($(".cart_item.edd_subtotal span").html(response.subtotal),$(".cart_item.edd_cart_tax span").html(response.tax)),$(".cart_item.edd_total span").html(response.total),0==response.cart_quantity&&($(".cart_item.edd_subtotal,.edd-cart-number-of-items,.cart_item.edd_checkout,.cart_item.edd_cart_tax,.cart_item.edd_total").hide(),$(".edd-cart").each(function(){var cart_wrapper=$(this).parent();cart_wrapper.length&&(cart_wrapper.addClass("cart-empty"),cart_wrapper.removeClass("cart-not-empty")),$(this).append('<li class="cart_item empty">'+edd_scripts.empty_cart_message+"</li>")})),$(document.body).trigger("edd_cart_item_removed",[response])}}}).fail(function(response){window.console&&window.console.log&&console.log(response)}).done(function(response){}),!1}),$(document.body).on("click.eddAddToCart",".edd-add-to-cart",function(e){e.preventDefault();var $this=$(this),form=$this.closest("form");$this.prop("disabled",!0);$this.find(".edd-loading");var container=$this.closest("div");$this.attr("data-edd-loading","");form=$this.parents("form").last();var download=$this.data("download-id"),variable_price=$this.data("variable-price"),price_mode=$this.data("price-mode"),nonce=$this.data("nonce"),item_price_ids=[],free_items=!0;if("yes"==variable_price)if(0<form.find(".edd_price_option_"+download+'[type="hidden"]').length)item_price_ids[0]=$(".edd_price_option_"+download,form).val(),form.find(".edd-submit").data("price")&&0<form.find(".edd-submit").data("price")&&(free_items=!1);else{if(!form.find(".edd_price_option_"+download+":checked",form).length)return $this.removeAttr("data-edd-loading"),alert(edd_scripts.select_option),e.stopPropagation(),$this.prop("disabled",!1),!1;form.find(".edd_price_option_"+download+":checked",form).each(function(index){if(item_price_ids[index]=$(this).val(),!0===free_items){var item_price=$(this).data("price");item_price&&0<item_price&&(free_items=!1)}})}else item_price_ids[0]=download,$this.data("price")&&0<$this.data("price")&&(free_items=!1);if(free_items&&form.find(".edd_action_input").val("add_to_cart"),"straight_to_gateway"==form.find(".edd_action_input").val())return form.submit(),!0;var data={action:$this.data("action"),download_id:download,price_ids:item_price_ids,post_data:$(form).serialize(),nonce:nonce};return $.ajax({type:"POST",data:data,dataType:"json",url:edd_scripts.ajaxurl,xhrFields:{withCredentials:!0},success:function(response){var store_redirect="1"==edd_scripts.redirect_to_checkout,item_redirect="1"==form.find("#edd_redirect_to_checkout").val();if(store_redirect&&item_redirect||!store_redirect&&item_redirect)window.location=edd_scripts.checkout_page;else{"1"===edd_scripts.taxes_enabled&&($(".cart_item.edd_subtotal").show(),$(".cart_item.edd_cart_tax").show()),$(".cart_item.edd_total").show(),$(".cart_item.edd_checkout").show(),$(".cart_item.empty").length&&$(".cart_item.empty").hide(),$(".widget_edd_cart_widget .edd-cart").each(function(cart){var target=$(this).find(".edd-cart-meta:first");$(response.cart_item).insertBefore(target);var cart_wrapper=$(this).parent();cart_wrapper.length&&(cart_wrapper.addClass("cart-not-empty"),cart_wrapper.removeClass("cart-empty"))}),"1"===edd_scripts.taxes_enabled&&($(".edd-cart-meta.edd_subtotal span").html(response.subtotal),$(".edd-cart-meta.edd_cart_tax span").html(response.tax)),$(".edd-cart-meta.edd_total span").html(response.total);$(".edd-cart-item-title",response.cart_item).length;if($("span.edd-cart-quantity").each(function(){$(this).text(response.cart_quantity),$(document.body).trigger("edd_quantity_updated",[response.cart_quantity])}),"none"==$(".edd-cart-number-of-items").css("display")&&$(".edd-cart-number-of-items").show("slow"),"no"!=variable_price&&"multi"==price_mode||($("a.edd-add-to-cart",container).toggle(),$(".edd_go_to_checkout",container).css("display","inline-block")),"multi"==price_mode&&$this.removeAttr("data-edd-loading"),$(".edd_download_purchase_form").length&&("no"==variable_price||!form.find(".edd_price_option_"+download).is("input:hidden"))){var parent_form=$('.edd_download_purchase_form *[data-download-id="'+download+'"]').parents("form");$("a.edd-add-to-cart",parent_form).hide(),"multi"!=price_mode&&parent_form.find(".edd_download_quantity_wrapper").slideUp(),$(".edd_go_to_checkout",parent_form).show().removeAttr("data-edd-loading")}"incart"!=response&&($(".edd-cart-added-alert",container).fadeIn(),setTimeout(function(){$(".edd-cart-added-alert",container).fadeOut()},3e3)),$this.prop("disabled",!1),$(document.body).trigger("edd_cart_item_added",[response])}}}).fail(function(response){window.console&&window.console.log&&console.log(response)}).done(function(response){}),!1}),$("#edd_checkout_form_wrap").on("click",".edd_checkout_register_login",function(){var $this=$(this),data={action:$this.data("action"),nonce:$this.data("nonce")};return $(".edd-cart-ajax").show(),$.post(edd_scripts.ajaxurl,data,function(checkout_response){$("#edd_checkout_login_register").html(edd_scripts.loading),$("#edd_checkout_login_register").html(checkout_response),$(".edd-cart-ajax").hide()}),!1}),$(document).on("click","#edd_purchase_form #edd_login_fields input[type=submit]",function(e){e.preventDefault();var complete_purchase_val=$(this).val();$(this).val(edd_global_vars.purchase_loading),$(this).after('<span class="edd-loading-ajax edd-loading"></span>');var data={action:"edd_process_checkout_login",edd_ajax:1,edd_user_login:$("#edd_login_fields #edd_user_login").val(),edd_user_pass:$("#edd_login_fields #edd_user_pass").val(),edd_login_nonce:$("#edd_login_nonce").val()};$.post(edd_global_vars.ajaxurl,data,function(data){"success"==$.trim(data)?($(".edd_errors").remove(),window.location=edd_scripts.checkout_page):($("#edd_login_fields input[type=submit]").val(complete_purchase_val),$(".edd-loading-ajax").remove(),$(".edd_errors").remove(),$("#edd-user-login-submit").before(data))})}),$(document).on("change","select#edd-gateway, input.edd-gateway",function(e){var payment_mode=$("#edd-gateway option:selected, input.edd-gateway:checked").val();return"0"==payment_mode||edd_load_gateway(payment_mode),!1}),"1"==edd_scripts.is_checkout){var chosen_gateway=!1,ajax_needed=!1;$("select#edd-gateway, input.edd-gateway").length&&(chosen_gateway=$("meta[name='edd-chosen-gateway']").attr("content"),ajax_needed=!0),chosen_gateway||(chosen_gateway=edd_scripts.default_gateway),ajax_needed?setTimeout(function(){edd_load_gateway(chosen_gateway)},200):$("body").trigger("edd_gateway_loaded",[chosen_gateway])}$(document).on("click","#edd_purchase_form #edd_purchase_submit [type=submit]",function(e){var eddPurchaseform=document.getElementById("edd_purchase_form");if("function"!=typeof eddPurchaseform.checkValidity||!1!==eddPurchaseform.checkValidity()){e.preventDefault();var complete_purchase_val=$(this).val();$(this).val(edd_global_vars.purchase_loading),$(this).prop("disabled",!0),$(this).after('<span class="edd-loading-ajax edd-loading"></span>'),$.post(edd_global_vars.ajaxurl,$("#edd_purchase_form").serialize()+"&action=edd_process_checkout&edd_ajax=true",function(data){"success"==$.trim(data)?($(".edd_errors").remove(),$(".edd-error").hide(),$(eddPurchaseform).submit()):($("#edd-purchase-button").val(complete_purchase_val),$(".edd-loading-ajax").remove(),$(".edd_errors").remove(),$(".edd-error").hide(),$(edd_global_vars.checkout_error_anchor).before(data),$("#edd-purchase-button").prop("disabled",!1),$(document.body).trigger("edd_checkout_error",[data]))})}}),$(document.body).on("change","#edd_cc_address input.card_state, #edd_cc_address select, #edd_address_country",function(){var $form,$this=$(this),is_checkout="undefined"!=typeof edd_global_vars,field_name="card_state";"edd_address_country"==$(this).attr("id")&&(field_name="edd_address_state");var state_inputs=document.getElementById(field_name);if("card_state"!=$this.attr("id")&&null!=state_inputs){var nonce=$(this).data("nonce"),postData={action:"edd_get_shop_states",country:$this.val(),field_name:field_name,nonce:nonce};$.ajax({type:"POST",data:postData,url:edd_scripts.ajaxurl,xhrFields:{withCredentials:!0},success:function(response){$form=is_checkout?$("#edd_purchase_form"):$this.closest("form");var state_inputs='input[name="card_state"], select[name="card_state"], input[name="edd_address_state"], select[name="edd_address_state"]';if("nostates"==$.trim(response)){var text_field='<input type="text" id='+field_name+' name="card_state" class="card-state edd-input required" value=""/>';$form.find(state_inputs).replaceWith(text_field)}else $form.find(state_inputs).replaceWith(response);is_checkout&&$(document.body).trigger("edd_cart_billing_address_updated",[response])}}).fail(function(data){window.console&&window.console.log&&console.log(data)}).done(function(data){is_checkout&&recalculate_taxes()})}else is_checkout&&recalculate_taxes();return!1}),$(document.body).on("change","#edd_cc_address input[name=card_zip]",function(){"undefined"!=typeof edd_global_vars&&recalculate_taxes()})});
|
1 |
+
var edd_scripts;function edd_load_gateway(payment_mode){jQuery(".edd-cart-ajax").show(),jQuery("#edd_purchase_form_wrap").html('<span class="edd-loading-ajax edd-loading"></span>');var nonce=jQuery("#edd-gateway-"+payment_mode).data(payment_mode+"-nonce"),url=edd_scripts.ajaxurl;0<url.indexOf("?")?url+="&":url+="?",url=url+"payment-mode="+payment_mode,jQuery.post(url,{action:"edd_load_gateway",edd_payment_mode:payment_mode,nonce:nonce},function(response){jQuery("#edd_purchase_form_wrap").html(response),jQuery(".edd-no-js").hide(),jQuery("body").trigger("edd_gateway_loaded",[payment_mode])})}jQuery(document).ready(function($){var chosen_gateway,ajax_needed;$(".edd-no-js").hide(),$("a.edd-add-to-cart").addClass("edd-has-js"),$(document.body).on("click.eddRemoveFromCart",".edd-remove-from-cart",function(event){var nonce=$(this),item=nonce.data("cart-item"),action=nonce.data("action"),id=nonce.data("download-id"),nonce=nonce.data("nonce");return $.ajax({type:"POST",data:{action:action,cart_item:item,nonce:nonce},dataType:"json",url:edd_scripts.ajaxurl,xhrFields:{withCredentials:!0},success:function(response){if(response.removed){if(parseInt(edd_scripts.position_in_cart,10)===parseInt(item,10)||edd_scripts.has_purchase_links)return window.location=window.location,!1;$(".edd-cart").each(function(){$(this).find("[data-cart-item='"+item+"']").parent().remove()}),$(".edd-cart").each(function(){var cart_item_counter=0;$(this).find("[data-cart-item]").each(function(){$(this).attr("data-cart-item",cart_item_counter),cart_item_counter+=1})}),$("[id^=edd_purchase_"+id+"]").length&&($("[id^=edd_purchase_"+id+"] .edd_go_to_checkout").hide(),$("[id^=edd_purchase_"+id+"] a.edd-add-to-cart").show().removeAttr("data-edd-loading"),"1"==edd_scripts.quantities_enabled&&$("[id^=edd_purchase_"+id+"] .edd_download_quantity_wrapper").show()),$("span.edd-cart-quantity").text(response.cart_quantity),$(document.body).trigger("edd_quantity_updated",[response.cart_quantity]),edd_scripts.taxes_enabled&&($(".cart_item.edd_subtotal span").html(response.subtotal),$(".cart_item.edd_cart_tax span").html(response.tax)),$(".cart_item.edd_total span").html(response.total),0==response.cart_quantity&&($(".cart_item.edd_subtotal,.edd-cart-number-of-items,.cart_item.edd_checkout,.cart_item.edd_cart_tax,.cart_item.edd_total").hide(),$(".edd-cart").each(function(){var cart_wrapper=$(this).parent();cart_wrapper.length&&(cart_wrapper.addClass("cart-empty"),cart_wrapper.removeClass("cart-not-empty")),$(this).append('<li class="cart_item empty">'+edd_scripts.empty_cart_message+"</li>")})),$(document.body).trigger("edd_cart_item_removed",[response])}}}).fail(function(response){window.console&&window.console.log&&console.log(response)}).done(function(response){}),!1}),$(document.body).on("click.eddAddToCart",".edd-add-to-cart",function(e){e.preventDefault();var $this=$(this),form=$this.closest("form");$this.prop("disabled",!0);$this.find(".edd-loading");var container=$this.closest("div");$this.attr("data-edd-loading","");var form=$this.parents("form").last(),download=$this.data("download-id"),variable_price=$this.data("variable-price"),price_mode=$this.data("price-mode"),data=$this.data("nonce"),item_price_ids=[],free_items=!0;if("yes"==variable_price)if(0<form.find(".edd_price_option_"+download+'[type="hidden"]').length)item_price_ids[0]=$(".edd_price_option_"+download,form).val(),form.find(".edd-submit").data("price")&&0<form.find(".edd-submit").data("price")&&(free_items=!1);else{if(!form.find(".edd_price_option_"+download+":checked",form).length)return $this.removeAttr("data-edd-loading"),alert(edd_scripts.select_option),e.stopPropagation(),$this.prop("disabled",!1),!1;form.find(".edd_price_option_"+download+":checked",form).each(function(item_price){item_price_ids[item_price]=$(this).val(),!0!==free_items||(item_price=$(this).data("price"))&&0<item_price&&(free_items=!1)})}else item_price_ids[0]=download,$this.data("price")&&0<$this.data("price")&&(free_items=!1);if(free_items&&form.find(".edd_action_input").val("add_to_cart"),"straight_to_gateway"==form.find(".edd_action_input").val())return form.submit(),!0;data={action:$this.data("action"),download_id:download,price_ids:item_price_ids,post_data:$(form).serialize(),nonce:data};return $.ajax({type:"POST",data:data,dataType:"json",url:edd_scripts.ajaxurl,xhrFields:{withCredentials:!0},success:function(response){var store_redirect="1"==edd_scripts.redirect_to_checkout,parent_form="1"==form.find("#edd_redirect_to_checkout").val();store_redirect&&parent_form||!store_redirect&&parent_form?window.location=edd_scripts.checkout_page:("1"===edd_scripts.taxes_enabled&&($(".cart_item.edd_subtotal").show(),$(".cart_item.edd_cart_tax").show()),$(".cart_item.edd_total").show(),$(".cart_item.edd_checkout").show(),$(".cart_item.empty").length&&$(".cart_item.empty").hide(),$(".widget_edd_cart_widget .edd-cart").each(function(cart){var cart_wrapper=$(this).find(".edd-cart-meta:first");$(response.cart_item).insertBefore(cart_wrapper);cart_wrapper=$(this).parent();cart_wrapper.length&&(cart_wrapper.addClass("cart-not-empty"),cart_wrapper.removeClass("cart-empty"))}),"1"===edd_scripts.taxes_enabled&&($(".edd-cart-meta.edd_subtotal span").html(response.subtotal),$(".edd-cart-meta.edd_cart_tax span").html(response.tax)),$(".edd-cart-meta.edd_total span").html(response.total),$(".edd-cart-item-title",response.cart_item).length,$("span.edd-cart-quantity").each(function(){$(this).text(response.cart_quantity),$(document.body).trigger("edd_quantity_updated",[response.cart_quantity])}),"none"==$(".edd-cart-number-of-items").css("display")&&$(".edd-cart-number-of-items").show("slow"),"no"!=variable_price&&"multi"==price_mode||($("a.edd-add-to-cart",container).toggle(),$(".edd_go_to_checkout",container).css("display","inline-block")),"multi"==price_mode&&$this.removeAttr("data-edd-loading"),!$(".edd_download_purchase_form").length||"no"!=variable_price&&form.find(".edd_price_option_"+download).is("input:hidden")||(parent_form=$('.edd_download_purchase_form *[data-download-id="'+download+'"]').parents("form"),$("a.edd-add-to-cart",parent_form).hide(),"multi"!=price_mode&&parent_form.find(".edd_download_quantity_wrapper").slideUp(),$(".edd_go_to_checkout",parent_form).show().removeAttr("data-edd-loading")),"incart"!=response&&($(".edd-cart-added-alert",container).fadeIn(),setTimeout(function(){$(".edd-cart-added-alert",container).fadeOut()},3e3)),$this.prop("disabled",!1),$(document.body).trigger("edd_cart_item_added",[response]))}}).fail(function(response){window.console&&window.console.log&&console.log(response)}).done(function(response){}),!1}),$("#edd_checkout_form_wrap").on("click",".edd_checkout_register_login",function(){var data=$(this),data={action:data.data("action"),nonce:data.data("nonce")};return $(".edd-cart-ajax").show(),$.post(edd_scripts.ajaxurl,data,function(checkout_response){$("#edd_checkout_login_register").html(edd_scripts.loading),$("#edd_checkout_login_register").html(checkout_response),$(".edd-cart-ajax").hide()}),!1}),$(document).on("click","#edd_purchase_form #edd_login_fields input[type=submit]",function(data){data.preventDefault();var complete_purchase_val=$(this).val();$(this).val(edd_global_vars.purchase_loading),$(this).after('<span class="edd-loading-ajax edd-loading"></span>');data={action:"edd_process_checkout_login",edd_ajax:1,edd_user_login:$("#edd_login_fields #edd_user_login").val(),edd_user_pass:$("#edd_login_fields #edd_user_pass").val(),edd_login_nonce:$("#edd_login_nonce").val()};$.post(edd_global_vars.ajaxurl,data,function(data){"success"==$.trim(data)?($(".edd_errors").remove(),window.location=edd_scripts.checkout_page):($("#edd_login_fields input[type=submit]").val(complete_purchase_val),$(".edd-loading-ajax").remove(),$(".edd_errors").remove(),$("#edd-user-login-submit").before(data))})}),$(document).on("change","select#edd-gateway, input.edd-gateway",function(e){var payment_mode=$("#edd-gateway option:selected, input.edd-gateway:checked").val();return"0"==payment_mode||edd_load_gateway(payment_mode),!1}),"1"==edd_scripts.is_checkout&&(ajax_needed=chosen_gateway=!1,$("select#edd-gateway, input.edd-gateway").length&&(chosen_gateway=$("meta[name='edd-chosen-gateway']").attr("content"),ajax_needed=!0),chosen_gateway=chosen_gateway||edd_scripts.default_gateway,ajax_needed?setTimeout(function(){edd_load_gateway(chosen_gateway)},200):$("body").trigger("edd_gateway_loaded",[chosen_gateway])),$(document).on("click","#edd_purchase_form #edd_purchase_submit [type=submit]",function(e){var complete_purchase_val,eddPurchaseform=document.getElementById("edd_purchase_form");"function"==typeof eddPurchaseform.checkValidity&&!1===eddPurchaseform.checkValidity()||(e.preventDefault(),complete_purchase_val=$(this).val(),$(this).val(edd_global_vars.purchase_loading),$(this).prop("disabled",!0),$(this).after('<span class="edd-loading-ajax edd-loading"></span>'),$.post(edd_global_vars.ajaxurl,$("#edd_purchase_form").serialize()+"&action=edd_process_checkout&edd_ajax=true",function(data){"success"==$.trim(data)?($(".edd_errors").remove(),$(".edd-error").hide(),$(eddPurchaseform).submit()):($("#edd-purchase-button").val(complete_purchase_val),$(".edd-loading-ajax").remove(),$(".edd_errors").remove(),$(".edd-error").hide(),$(edd_global_vars.checkout_error_anchor).before(data),$("#edd-purchase-button").prop("disabled",!1),$(document.body).trigger("edd_checkout_error",[data]))}))}),$(document.body).on("change","#edd_cc_address input.card_state, #edd_cc_address select, #edd_address_country",function(){var $form,$this=$(this),is_checkout="undefined"!=typeof edd_global_vars,field_name="card_state";"edd_address_country"==$(this).attr("id")&&(field_name="edd_address_state");var postData=document.getElementById(field_name);"card_state"!=$this.attr("id")&&null!=postData?(postData=$(this).data("nonce"),postData={action:"edd_get_shop_states",country:$this.val(),field_name:field_name,nonce:postData},$.ajax({type:"POST",data:postData,url:edd_scripts.ajaxurl,xhrFields:{withCredentials:!0},success:function(response){$form=is_checkout?$("#edd_purchase_form"):$this.closest("form");var text_field,state_inputs='input[name="card_state"], select[name="card_state"], input[name="edd_address_state"], select[name="edd_address_state"]';"nostates"==$.trim(response)?(text_field='<input type="text" id='+field_name+' name="card_state" class="card-state edd-input required" value=""/>',$form.find(state_inputs).replaceWith(text_field)):$form.find(state_inputs).replaceWith(response),is_checkout&&$(document.body).trigger("edd_cart_billing_address_updated",[response])}}).fail(function(data){window.console&&window.console.log&&console.log(data)}).done(function(data){is_checkout&&recalculate_taxes()})):is_checkout&&recalculate_taxes();return!1}),$(document.body).on("change","#edd_cc_address input[name=card_zip]",function(){"undefined"!=typeof edd_global_vars&&recalculate_taxes()})});
|
assets/js/edd-checkout-global.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.EDD_Checkout=function($){"use strict";var $body,$form,$edd_cart_amount,$checkout_form_wrap;function apply_discount(
|
1 |
+
window.EDD_Checkout=function($){"use strict";var $body,$form,$edd_cart_amount,$checkout_form_wrap;function apply_discount(postData){postData.preventDefault();var postData=$("#edd-discount").val(),edd_discount_loader=$("#edd-discount-loader"),required_inputs=$("#edd_cc_address .edd-input, #edd_cc_address .edd-select").filter("[required]");if(""==postData||postData==edd_global_vars.enter_discount)return!1;postData={action:"edd_apply_discount",code:postData,form:$("#edd_purchase_form").serialize()};return $("#edd-discount-error-wrap").html("").hide(),edd_discount_loader.show(),$.ajax({type:"POST",data:postData,dataType:"json",url:edd_global_vars.ajaxurl,xhrFields:{withCredentials:!0},success:function(discount_response){discount_response?"valid"==discount_response.msg?($(".edd_cart_discount").html(discount_response.html),$(".edd_cart_discount_row").show(),$(".edd_cart_amount").each(function(){$(this).text(discount_response.total),$(this).data("total",discount_response.total_plain)}),$("#edd-discount",$checkout_form_wrap).val(""),recalculate_taxes(),"0.00"==discount_response.total_plain?($("#edd_cc_fields,#edd_cc_address,#edd_payment_mode_select").slideUp(),required_inputs.prop("required",!1),$('input[name="edd-gateway"]').val("manual")):(required_inputs.prop("required",!0),$("#edd_cc_fields,#edd_cc_address").slideDown()),$body.trigger("edd_discount_applied",[discount_response])):($("#edd-discount-error-wrap").html('<span class="edd_error">'+discount_response.msg+"</span>"),$("#edd-discount-error-wrap").show(),$body.trigger("edd_discount_invalid",[discount_response])):(window.console&&window.console.log&&console.log(discount_response),$body.trigger("edd_discount_failed",[discount_response])),edd_discount_loader.hide()}}).fail(function(data){window.console&&window.console.log&&console.log(data)}),!1}function remove_discount(event){var postData={action:"edd_remove_discount",code:$(this).data("code")};return $.ajax({type:"POST",data:postData,dataType:"json",url:edd_global_vars.ajaxurl,xhrFields:{withCredentials:!0},success:function(discount_response){var zero="0"+edd_global_vars.decimal_separator+"00";$(".edd_cart_amount").each(function(){edd_global_vars.currency_sign+zero!=$(this).text()&&zero+edd_global_vars.currency_sign!=$(this).text()||window.location.reload(),$(this).text(discount_response.total),$(this).data("total",discount_response.total_plain)}),$(".edd_cart_discount").html(discount_response.html),discount_response.discounts||$(".edd_cart_discount_row").hide(),recalculate_taxes(),$("#edd_cc_fields,#edd_cc_address").slideDown(),$body.trigger("edd_discount_removed",[discount_response])}}).fail(function(data){window.console&&window.console.log&&console.log(data)}),!1}function update_item_quantities(event){var card_state=$(this),quantity=card_state.val(),billing_country=card_state.data("key"),download_id=card_state.closest(".edd_cart_item").data("download-id"),options=card_state.parent().find('input[name="edd-cart-download-'+billing_country+'-options"]').val(),card_state=$("#edd_cc_address"),billing_country=card_state.find("#billing_country").val(),card_state=card_state.find("#card_state").val();return $.ajax({type:"POST",data:{action:"edd_update_quantity",quantity:quantity,download_id:download_id,options:options,billing_country:billing_country,card_state:card_state},dataType:"json",url:edd_global_vars.ajaxurl,xhrFields:{withCredentials:!0},success:function(response){$(".edd_cart_subtotal_amount").each(function(){$(this).text(response.subtotal)}),$(".edd_cart_tax_amount").each(function(){$(this).text(response.taxes)}),$(".edd_cart_amount").each(function(){var float_total=response.total,float_subtotal=response.subtotal;$(this).text(float_total);float_total=parseFloat(float_total.replace(/[^0-9\.-]+/g,"")),float_subtotal=parseFloat(float_subtotal.replace(/[^0-9\.-]+/g,""));$(this).data("total",float_total),$(this).data("subtotal",float_subtotal),$body.trigger("edd_quantity_updated",[response])})}}).fail(function(data){window.console&&window.console.log&&console.log(data)}),!1}return{init:function(){$body=$(document.body),$form=$("#edd_purchase_form"),$edd_cart_amount=$(".edd_cart_amount"),$edd_cart_amount.text(),$checkout_form_wrap=$("#edd_checkout_form_wrap"),$body.on("edd_gateway_loaded",function(e){var card_expiry,card_number,card_cvc;card_number=(card_expiry=$form).find(".card-number"),card_cvc=card_expiry.find(".card-cvc"),card_expiry=card_expiry.find(".card-expiry"),card_number.length&&"function"==typeof card_number.payment&&(card_number.payment("formatCardNumber"),card_cvc.payment("formatCardCVC"),card_expiry.payment("formatCardExpiry"))}),$body.on("keyup change",".edd-do-validate .card-number",function(){var field,card_field;field=$(this),(card_field=field).validateCreditCard(function(result){var $card_type=$(".card-type");null==result.card_type?($card_type.removeClass().addClass("off card-type"),card_field.removeClass("valid"),card_field.addClass("error")):($card_type.removeClass("off"),$card_type.addClass(result.card_type.name),result.length_valid&&result.luhn_valid?(card_field.addClass("valid"),card_field.removeClass("error")):(card_field.removeClass("valid"),card_field.addClass("error")))})}),$body.on("blur change",".card-name",function(){var name_field=$(this);name_field.validateCreditCard(function(result){null!=result.card_type?(name_field.removeClass("valid").addClass("error"),$("#edd-purchase-button").attr("disabled","disabled")):(name_field.removeClass("error").addClass("valid"),$("#edd-purchase-button").removeAttr("disabled"))})}),$body.on("submit","#edd_payment_mode",function(){if(0==$("#edd-gateway option:selected").val())return alert(edd_global_vars.no_gateway),!1}),$body.on("click","#edd_payment_mode_select input",function(){$("#edd_payment_mode_select label.edd-gateway-option-selected").removeClass("edd-gateway-option-selected"),$("#edd_payment_mode_select input:checked").parent().addClass("edd-gateway-option-selected")}),$checkout_form_wrap.on("click",".edd-apply-discount",apply_discount),$checkout_form_wrap.on("keypress","#edd-discount",function(event){if("13"==event.keyCode)return!1}),$checkout_form_wrap.on("keyup","#edd-discount",function(event){"13"==event.keyCode&&$checkout_form_wrap.find(".edd-apply-discount").trigger("click")}),$body.on("click",".edd_discount_remove",remove_discount),$body.on("click",".edd_discount_link",function(e){e.preventDefault(),$(".edd_discount_link").parent().hide(),$("#edd-discount-code-wrap").show().find("#edd-discount").focus()}),$body.find("#edd-discount-code-wrap").hide(),$body.find("#edd_show_discount").show(),$body.on("change",".edd-item-quantity",update_item_quantities),$body.on("click",".edd-amazon-logout #Logout",function(e){e.preventDefault(),amazon.Login.logout(),window.location=edd_amazon.checkoutUri})},recalculate_taxes:recalculate_taxes}}(window.jQuery),window.jQuery(document).ready(EDD_Checkout.init);var ajax_tax_count=0;function recalculate_taxes(state){var $edd_cc_address,postData,current_ajax_count;"1"==edd_global_vars.taxes_enabled&&($edd_cc_address=jQuery("#edd_cc_address"),state=state||$edd_cc_address.find("#card_state").val(),postData={action:"edd_recalculate_taxes",billing_country:$edd_cc_address.find("#billing_country").val(),state:state,card_zip:$edd_cc_address.find("input[name=card_zip]").val(),nonce:jQuery("#edd-checkout-address-fields-nonce").val()},jQuery("#edd_purchase_submit [type=submit]").after('<span class="edd-loading-ajax edd-recalculate-taxes-loading edd-loading"></span>'),current_ajax_count=++ajax_tax_count,jQuery.ajax({type:"POST",data:postData,dataType:"json",url:edd_global_vars.ajaxurl,xhrFields:{withCredentials:!0},success:function(tax_response){var tax_data;current_ajax_count===ajax_tax_count&&(jQuery("#edd_checkout_cart_form").replaceWith(tax_response.html),jQuery(".edd_cart_amount").html(tax_response.total),(tax_data=new Object).postdata=postData,tax_data.response=tax_response,jQuery("body").trigger("edd_taxes_recalculated",[tax_data])),jQuery(".edd-recalculate-taxes-loading").remove()}}).fail(function(data){window.console&&window.console.log&&(console.log(data),current_ajax_count===ajax_tax_count&&jQuery("body").trigger("edd_taxes_recalculated",[tax_data]))}))}
|
easy-digital-downloads.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: The easiest way to sell digital products with WordPress.
|
6 |
* Author: Sandhills Development, LLC
|
7 |
* Author URI: https://sandhillsdev.com
|
8 |
-
* Version: 2.10.
|
9 |
* Text Domain: easy-digital-downloads
|
10 |
* Domain Path: languages
|
11 |
*
|
@@ -25,7 +25,7 @@
|
|
25 |
* @package EDD
|
26 |
* @category Core
|
27 |
* @author Pippin Williamson
|
28 |
-
* @version 2.10.
|
29 |
*/
|
30 |
|
31 |
// Exit if accessed directly.
|
@@ -206,7 +206,7 @@ final class Easy_Digital_Downloads {
|
|
206 |
|
207 |
// Plugin version.
|
208 |
if ( ! defined( 'EDD_VERSION' ) ) {
|
209 |
-
define( 'EDD_VERSION', '2.10.
|
210 |
}
|
211 |
|
212 |
// Plugin Folder Path.
|
@@ -325,6 +325,7 @@ final class Easy_Digital_Downloads {
|
|
325 |
require_once EDD_PLUGIN_DIR . 'includes/admin/admin-footer.php';
|
326 |
require_once EDD_PLUGIN_DIR . 'includes/admin/admin-actions.php';
|
327 |
require_once EDD_PLUGIN_DIR . 'includes/admin/class-edd-notices.php';
|
|
|
328 |
require_once EDD_PLUGIN_DIR . 'includes/admin/admin-pages.php';
|
329 |
require_once EDD_PLUGIN_DIR . 'includes/admin/dashboard-widgets.php';
|
330 |
require_once EDD_PLUGIN_DIR . 'includes/admin/thickbox.php';
|
@@ -357,6 +358,9 @@ final class Easy_Digital_Downloads {
|
|
357 |
require_once EDD_PLUGIN_DIR . 'includes/admin/upgrades/upgrades.php';
|
358 |
require_once EDD_PLUGIN_DIR . 'includes/admin/class-edd-heartbeat.php';
|
359 |
require_once EDD_PLUGIN_DIR . 'includes/admin/tools/tools-actions.php';
|
|
|
|
|
|
|
360 |
} else {
|
361 |
require_once EDD_PLUGIN_DIR . 'includes/process-download.php';
|
362 |
require_once EDD_PLUGIN_DIR . 'includes/theme-compatibility.php';
|
5 |
* Description: The easiest way to sell digital products with WordPress.
|
6 |
* Author: Sandhills Development, LLC
|
7 |
* Author URI: https://sandhillsdev.com
|
8 |
+
* Version: 2.10.6
|
9 |
* Text Domain: easy-digital-downloads
|
10 |
* Domain Path: languages
|
11 |
*
|
25 |
* @package EDD
|
26 |
* @category Core
|
27 |
* @author Pippin Williamson
|
28 |
+
* @version 2.10.6
|
29 |
*/
|
30 |
|
31 |
// Exit if accessed directly.
|
206 |
|
207 |
// Plugin version.
|
208 |
if ( ! defined( 'EDD_VERSION' ) ) {
|
209 |
+
define( 'EDD_VERSION', '2.10.6' );
|
210 |
}
|
211 |
|
212 |
// Plugin Folder Path.
|
325 |
require_once EDD_PLUGIN_DIR . 'includes/admin/admin-footer.php';
|
326 |
require_once EDD_PLUGIN_DIR . 'includes/admin/admin-actions.php';
|
327 |
require_once EDD_PLUGIN_DIR . 'includes/admin/class-edd-notices.php';
|
328 |
+
require_once EDD_PLUGIN_DIR . 'includes/admin/class-pass-manager.php';
|
329 |
require_once EDD_PLUGIN_DIR . 'includes/admin/admin-pages.php';
|
330 |
require_once EDD_PLUGIN_DIR . 'includes/admin/dashboard-widgets.php';
|
331 |
require_once EDD_PLUGIN_DIR . 'includes/admin/thickbox.php';
|
358 |
require_once EDD_PLUGIN_DIR . 'includes/admin/upgrades/upgrades.php';
|
359 |
require_once EDD_PLUGIN_DIR . 'includes/admin/class-edd-heartbeat.php';
|
360 |
require_once EDD_PLUGIN_DIR . 'includes/admin/tools/tools-actions.php';
|
361 |
+
|
362 |
+
require_once EDD_PLUGIN_DIR . 'includes/libraries/class-persistent-dismissible.php';
|
363 |
+
require_once EDD_PLUGIN_DIR . 'includes/admin/promos/class-promo-handler.php';
|
364 |
} else {
|
365 |
require_once EDD_PLUGIN_DIR . 'includes/process-download.php';
|
366 |
require_once EDD_PLUGIN_DIR . 'includes/theme-compatibility.php';
|
includes/admin/class-pass-manager.php
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Pass Manager
|
4 |
+
*
|
5 |
+
* Tool for determining what kind of pass, if any, is activated on the site.
|
6 |
+
*
|
7 |
+
* @package easy-digital-downloads
|
8 |
+
* @copyright Copyright (c) 2021, Sandhills Development, LLC
|
9 |
+
* @license GPL2+
|
10 |
+
* @since 2.10.6
|
11 |
+
*/
|
12 |
+
|
13 |
+
namespace EDD\Admin;
|
14 |
+
|
15 |
+
class Pass_Manager {
|
16 |
+
|
17 |
+
const PERSONAL_PASS_ID = 1245715;
|
18 |
+
const EXTENDED_PASS_ID = 1245716;
|
19 |
+
const PROFESSIONAL_PASS_ID = 1245717;
|
20 |
+
const ALL_ACCESS_PASS_ID = 1150319;
|
21 |
+
const ALL_ACCESS_PASS_LIFETIME_ID = 1464807;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* ID of the highest tier pass that's activated.
|
25 |
+
*
|
26 |
+
* @var int|null
|
27 |
+
*/
|
28 |
+
public $highest_pass_id;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Pass data from the database. This will be an array with
|
32 |
+
* the key being the license key, and the value being another
|
33 |
+
* array with the `pass_id` and `time_checked`.
|
34 |
+
*
|
35 |
+
* @var array|null
|
36 |
+
*/
|
37 |
+
public $pass_data;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Whether or not we've stored any pass data yet.
|
41 |
+
* If no pass data has been stored, then that means the user
|
42 |
+
* might have a pass activated, we just haven't figured it out
|
43 |
+
* yet and we're still waiting for the first cron to run.
|
44 |
+
*
|
45 |
+
* @see \EDD_License::weekly_license_check()
|
46 |
+
* @see \EDD_License::activate_license()
|
47 |
+
* @see \EDD_License::maybe_set_pass_flag()
|
48 |
+
*
|
49 |
+
* @var bool
|
50 |
+
*/
|
51 |
+
public $has_pass_data = false;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Hierarchy of passes. This helps us determine if one pass
|
55 |
+
* is "higher" than another.
|
56 |
+
*
|
57 |
+
* @see Pass_Manager::pass_compare()
|
58 |
+
*
|
59 |
+
* @var int[]
|
60 |
+
*/
|
61 |
+
private static $pass_hierarchy = array(
|
62 |
+
self::PERSONAL_PASS_ID => 10,
|
63 |
+
self::EXTENDED_PASS_ID => 20,
|
64 |
+
self::PROFESSIONAL_PASS_ID => 30,
|
65 |
+
self::ALL_ACCESS_PASS_ID => 40,
|
66 |
+
self::ALL_ACCESS_PASS_LIFETIME_ID => 50
|
67 |
+
);
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Pass_Manager constructor.
|
71 |
+
*/
|
72 |
+
public function __construct() {
|
73 |
+
$pass_data = get_option( 'edd_pass_licenses' );
|
74 |
+
if ( false !== $pass_data ) {
|
75 |
+
$this->pass_data = json_decode( $pass_data, true );
|
76 |
+
$this->has_pass_data = true;
|
77 |
+
}
|
78 |
+
|
79 |
+
$this->highest_pass_id = $this->get_highest_pass_id();
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Returns the ID of the highest tier pass that's activated.
|
84 |
+
*
|
85 |
+
* @since 2.10.6
|
86 |
+
*
|
87 |
+
* @return int|null Pass ID if one is found, null if one was not found.
|
88 |
+
*/
|
89 |
+
private function get_highest_pass_id() {
|
90 |
+
$highest_pass_id = null;
|
91 |
+
|
92 |
+
if ( ! $this->has_pass_data || ! is_array( $this->pass_data ) ) {
|
93 |
+
return $highest_pass_id;
|
94 |
+
}
|
95 |
+
|
96 |
+
foreach ( $this->pass_data as $pass_data ) {
|
97 |
+
/*
|
98 |
+
* If this pass was last verified more than 2 months ago, we're not using it.
|
99 |
+
* This ensures we never deal with a "stale" record for a pass that's no longer
|
100 |
+
* actually activated, but still exists in our DB array for some reason.
|
101 |
+
*
|
102 |
+
* Our cron job should always be updating with active data once per week.
|
103 |
+
*/
|
104 |
+
if ( empty( $pass_data['time_checked'] ) || strtotime( '-2 months' ) > $pass_data['time_checked'] ) {
|
105 |
+
continue;
|
106 |
+
}
|
107 |
+
|
108 |
+
// We need a pass ID.
|
109 |
+
if ( empty( $pass_data['pass_id'] ) ) {
|
110 |
+
continue;
|
111 |
+
}
|
112 |
+
|
113 |
+
// If we don't yet have a "highest pass", then this one is it automatically.
|
114 |
+
if ( empty( $highest_pass_id ) ) {
|
115 |
+
$highest_pass_id = intval( $pass_data['pass_id'] );
|
116 |
+
continue;
|
117 |
+
}
|
118 |
+
|
119 |
+
// Otherwise, this pass only takes over the highest pass if it's actually higher.
|
120 |
+
if ( self::pass_compare( (int) $pass_data['pass_id'], $highest_pass_id, '>' ) ) {
|
121 |
+
$highest_pass_id = intval( $pass_data['pass_id'] );
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
return $highest_pass_id;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Whether or not a pass is activated.
|
130 |
+
*
|
131 |
+
* @since 2.10.6
|
132 |
+
*
|
133 |
+
* @return bool
|
134 |
+
*/
|
135 |
+
public function has_pass() {
|
136 |
+
return ! empty( $this->highest_pass_id );
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Compares two passes with each other according to the supplied operator.
|
141 |
+
*
|
142 |
+
* @since 2.10.6
|
143 |
+
*
|
144 |
+
* @param int $pass_1 ID of the first pass.
|
145 |
+
* @param int $pass_2 ID of the second pass
|
146 |
+
* @param string $comparison Comparison operator.
|
147 |
+
*
|
148 |
+
* @return bool
|
149 |
+
* @throws \InvalidArgumentException
|
150 |
+
*/
|
151 |
+
public static function pass_compare( $pass_1, $pass_2, $comparison = '>' ) {
|
152 |
+
if ( ! array_key_exists( $pass_1, self::$pass_hierarchy ) ) {
|
153 |
+
throw new \InvalidArgumentException( 'Invalid pass 1: ' . $pass_1 );
|
154 |
+
}
|
155 |
+
if ( ! array_key_exists( $pass_2, self::$pass_hierarchy ) ) {
|
156 |
+
throw new \InvalidArgumentException( 'Invalid pass 2: ' . $pass_2 );
|
157 |
+
}
|
158 |
+
|
159 |
+
return version_compare( self::$pass_hierarchy[ $pass_1 ], self::$pass_hierarchy[ $pass_2 ], $comparison );
|
160 |
+
}
|
161 |
+
|
162 |
+
}
|
includes/admin/promos/class-promo-handler.php
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Promo Handler
|
4 |
+
*
|
5 |
+
* Handles logic for displaying and dismissing promotional notices.
|
6 |
+
*
|
7 |
+
* @package easy-digital-downloads
|
8 |
+
* @copyright Copyright (c) 2021, Sandhills Development, LLC
|
9 |
+
* @license GPL2+
|
10 |
+
* @since 2.10.6
|
11 |
+
*/
|
12 |
+
|
13 |
+
namespace EDD\Admin\Promos;
|
14 |
+
|
15 |
+
use EDD\Admin\Promos\Notices\Notice;
|
16 |
+
use Sandhills\Utils\Persistent_Dismissible;
|
17 |
+
|
18 |
+
class PromoHandler {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Registered notices.
|
22 |
+
*
|
23 |
+
* @var string[]
|
24 |
+
*/
|
25 |
+
private $notices = array(
|
26 |
+
'\\EDD\\Admin\\Promos\\Notices\\License_Upgrade_Notice'
|
27 |
+
);
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Notices constructor.
|
31 |
+
*/
|
32 |
+
public function __construct() {
|
33 |
+
add_action( 'wp_ajax_edd_dismiss_promo_notice', array( $this, 'dismiss_notice' ) );
|
34 |
+
|
35 |
+
$this->load_notices();
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Loads and displays all registered promotional notices.
|
40 |
+
*
|
41 |
+
* @since 2.10.6
|
42 |
+
*/
|
43 |
+
private function load_notices() {
|
44 |
+
require_once EDD_PLUGIN_DIR . 'includes/admin/promos/notices/abstract-notice.php';
|
45 |
+
|
46 |
+
foreach ( $this->notices as $notice_class_name ) {
|
47 |
+
if ( ! class_exists( $notice_class_name ) ) {
|
48 |
+
$file_name = strtolower( str_replace( '_', '-', basename( str_replace( '\\', '/', $notice_class_name ) ) ) );
|
49 |
+
$file_path = EDD_PLUGIN_DIR . 'includes/admin/promos/notices/class-' . $file_name . '.php';
|
50 |
+
|
51 |
+
if ( file_exists( $file_path ) ) {
|
52 |
+
require_once $file_path;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
if ( ! class_exists( $notice_class_name ) ) {
|
57 |
+
continue;
|
58 |
+
}
|
59 |
+
|
60 |
+
add_action( $notice_class_name::DISPLAY_HOOK, function () use ( $notice_class_name ) {
|
61 |
+
/** @var Notice $notice */
|
62 |
+
$notice = new $notice_class_name;
|
63 |
+
if ( $notice->should_display() ) {
|
64 |
+
$notice->display();
|
65 |
+
}
|
66 |
+
} );
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Determines whether or not a notice has been dismissed.
|
72 |
+
*
|
73 |
+
* @since 2.10.6
|
74 |
+
*
|
75 |
+
* @param string $id ID of the notice to check.
|
76 |
+
*
|
77 |
+
* @return bool
|
78 |
+
*/
|
79 |
+
public static function is_dismissed( $id ) {
|
80 |
+
$is_dismissed = (bool) Persistent_Dismissible::get( array(
|
81 |
+
'id' => 'edd-' . $id
|
82 |
+
) );
|
83 |
+
|
84 |
+
return true === $is_dismissed;
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Dismisses a notice.
|
89 |
+
*
|
90 |
+
* @since 2.10.6
|
91 |
+
*
|
92 |
+
* @param string $id ID of the notice to dismiss.
|
93 |
+
* @param int $dismissal_length Number of seconds to dismiss the notice for, or `0` for forever.
|
94 |
+
*/
|
95 |
+
public static function dismiss( $id, $dismissal_length = 0 ) {
|
96 |
+
Persistent_Dismissible::set( array(
|
97 |
+
'id' => 'edd-' . $id,
|
98 |
+
'life' => $dismissal_length
|
99 |
+
) );
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* AJAX callback for dismissing a notice.
|
104 |
+
*
|
105 |
+
* @since 2.10.6
|
106 |
+
*/
|
107 |
+
public function dismiss_notice() {
|
108 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
109 |
+
wp_send_json_error( __( 'You do not have permission to perform this action.', 'easy-digital-downloads' ), 403 );
|
110 |
+
}
|
111 |
+
|
112 |
+
if ( empty( $_POST['notice_id'] ) ) {
|
113 |
+
wp_send_json_error( __( 'Missing notice ID.', 'easy-digital-downloads' ), 400 );
|
114 |
+
}
|
115 |
+
|
116 |
+
if ( empty( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'edd-dismiss-notice-' . sanitize_key( $_POST['notice_id'] ) ) ) {
|
117 |
+
wp_send_json_error( __( 'You do not have permission to perform this action.', 'easy-digital-downloads' ), 403 );
|
118 |
+
}
|
119 |
+
|
120 |
+
$dismissal_length = ! empty( $_POST['lifespan'] ) ? absint( $_POST['lifespan'] ) : 0;
|
121 |
+
|
122 |
+
self::dismiss( sanitize_key( $_POST['notice_id'] ), $dismissal_length );
|
123 |
+
|
124 |
+
wp_send_json_success();
|
125 |
+
}
|
126 |
+
|
127 |
+
}
|
128 |
+
|
129 |
+
new PromoHandler();
|
includes/admin/promos/notices/abstract-notice.php
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Notice
|
4 |
+
*
|
5 |
+
* @package easy-digital-downloads
|
6 |
+
* @copyright Copyright (c) 2021, Sandhills Development, LLC
|
7 |
+
* @license GPL2+
|
8 |
+
* @since 2.10.6
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace EDD\Admin\Promos\Notices;
|
12 |
+
|
13 |
+
use EDD\Admin\Promos\PromoHandler;
|
14 |
+
|
15 |
+
abstract class Notice {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Action hook for displaying the notice.
|
19 |
+
*/
|
20 |
+
const DISPLAY_HOOK = 'admin_notices';
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Type of promotional notice.
|
24 |
+
*/
|
25 |
+
const TYPE = 'top-of-page';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Whether or not the notice can be dismissed.
|
29 |
+
*/
|
30 |
+
const DISMISSIBLE = true;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Displays the notice content.
|
34 |
+
*
|
35 |
+
* @return void
|
36 |
+
*/
|
37 |
+
abstract protected function _display();
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Generates a unique ID for this notice.
|
41 |
+
* It's the class name (without the namespace) and with underscores converted to hyphens.
|
42 |
+
*
|
43 |
+
* @since 2.10.6
|
44 |
+
*
|
45 |
+
* @return string
|
46 |
+
*/
|
47 |
+
protected function get_id() {
|
48 |
+
return strtolower( str_replace( '_', '-', basename( str_replace( '\\', '/', get_class( $this ) ) ) ) );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Determines whether or not the notice should be displayed.
|
53 |
+
* Typically individual notices should not override this method, as it combines
|
54 |
+
* a dismissal check and custom display logic (`_should_display()`). Custom logic
|
55 |
+
* should go in `_should_display()`.
|
56 |
+
*
|
57 |
+
* @since 2.10.6
|
58 |
+
*
|
59 |
+
* @return bool
|
60 |
+
*/
|
61 |
+
public function should_display() {
|
62 |
+
return ! PromoHandler::is_dismissed( $this->get_id() ) && $this->_should_display();
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Duration (in seconds) that the notice is dismissed for.
|
67 |
+
* `0` means it's dismissed permanently.
|
68 |
+
*
|
69 |
+
* @return int
|
70 |
+
*/
|
71 |
+
public static function dismiss_duration() {
|
72 |
+
return 0;
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Individual notices can override this method to control display logic.
|
77 |
+
*
|
78 |
+
* @since 2.10.6
|
79 |
+
*
|
80 |
+
* @return bool
|
81 |
+
*/
|
82 |
+
protected function _should_display() {
|
83 |
+
return true;
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Displays the notice.
|
88 |
+
* Individual notices typically should not override this method, as it contains
|
89 |
+
* all the notice wrapper logic. Instead, notices should override `_display()`
|
90 |
+
*
|
91 |
+
* @since 2.10.6
|
92 |
+
* @return void
|
93 |
+
*/
|
94 |
+
public function display() {
|
95 |
+
?>
|
96 |
+
<div
|
97 |
+
id="edd-admin-notice-<?php echo esc_attr( $this->get_id() ); ?>"
|
98 |
+
class="edd-admin-notice-<?php echo esc_attr( sanitize_html_class( static::TYPE ) ); ?> edd-promo-notice"
|
99 |
+
data-nonce="<?php echo esc_attr( wp_create_nonce( 'edd-dismiss-notice-' . $this->get_id() ) ); ?>"
|
100 |
+
data-id="<?php echo esc_attr( $this->get_id() ); ?>"
|
101 |
+
data-lifespan="<?php echo esc_attr( static::dismiss_duration() ); ?>"
|
102 |
+
>
|
103 |
+
<?php $this->_display(); ?>
|
104 |
+
|
105 |
+
<?php if ( static::DISMISSIBLE ) : ?>
|
106 |
+
<button class="button-link edd-promo-notice-dismiss">
|
107 |
+
×
|
108 |
+
<span class="screen-reader-text"><?php esc_html_e( 'Dismiss notice', 'easy-digital-downloads' ); ?></span>
|
109 |
+
</button>
|
110 |
+
<?php endif; ?>
|
111 |
+
</div>
|
112 |
+
<?php
|
113 |
+
}
|
114 |
+
|
115 |
+
}
|
includes/admin/promos/notices/class-license-upgrade-notice.php
ADDED
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* License Upgrade Notice
|
4 |
+
*
|
5 |
+
* @package easy-digital-downloads
|
6 |
+
* @copyright Copyright (c) 2021, Sandhills Development, LLC
|
7 |
+
* @license GPL2+
|
8 |
+
* @since 2.10.6
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace EDD\Admin\Promos\Notices;
|
12 |
+
|
13 |
+
use EDD\Admin\Pass_Manager;
|
14 |
+
|
15 |
+
class License_Upgrade_Notice extends Notice {
|
16 |
+
|
17 |
+
const DISPLAY_HOOK = 'admin_notices';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Number of EDD license keys that have been entered.
|
21 |
+
* Not validated to make sure they're actually active; this is
|
22 |
+
* just an indicator if any licenses exist at all.
|
23 |
+
*
|
24 |
+
* @var array
|
25 |
+
*/
|
26 |
+
private $number_license_keys;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* @var Pass_Manager
|
30 |
+
*/
|
31 |
+
private $pass_manager;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* License_Upgrade_Notice constructor.
|
35 |
+
*/
|
36 |
+
public function __construct() {
|
37 |
+
global $edd_licensed_products;
|
38 |
+
|
39 |
+
$this->number_license_keys = is_array( $edd_licensed_products ) ? count( $edd_licensed_products ) : 0;
|
40 |
+
$this->pass_manager = new Pass_Manager();
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* This notice lasts 90 days.
|
45 |
+
*
|
46 |
+
* @return int
|
47 |
+
*/
|
48 |
+
public static function dismiss_duration() {
|
49 |
+
return 3 * MONTH_IN_SECONDS;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Determines if the current page is an EDD admin page.
|
54 |
+
*
|
55 |
+
* @return bool
|
56 |
+
*/
|
57 |
+
private function is_edd_admin_page() {
|
58 |
+
if ( defined( 'EDD_DOING_TESTS' ) && EDD_DOING_TESTS ) {
|
59 |
+
return true;
|
60 |
+
}
|
61 |
+
|
62 |
+
$screen = get_current_screen();
|
63 |
+
|
64 |
+
if ( ! $screen instanceof \WP_Screen || 'dashboard' === $screen->id || ! edd_is_admin_page() ) {
|
65 |
+
return false;
|
66 |
+
}
|
67 |
+
|
68 |
+
return true;
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* @inheritDoc
|
73 |
+
*
|
74 |
+
* @return bool
|
75 |
+
*/
|
76 |
+
protected function _should_display() {
|
77 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
78 |
+
return false;
|
79 |
+
}
|
80 |
+
|
81 |
+
if ( ! $this->is_edd_admin_page() ) {
|
82 |
+
return false;
|
83 |
+
}
|
84 |
+
|
85 |
+
// Someone with no license keys entered always sees a notice.
|
86 |
+
if ( 0 === $this->number_license_keys ) {
|
87 |
+
return true;
|
88 |
+
}
|
89 |
+
|
90 |
+
// If we have no pass data yet, don't show the notice because we don't yet know what it should say.
|
91 |
+
if ( ! $this->pass_manager->has_pass_data ) {
|
92 |
+
return false;
|
93 |
+
}
|
94 |
+
|
95 |
+
// If someone has an extended pass or higher, and has an active AffiliateWP license, don't show.
|
96 |
+
try {
|
97 |
+
if (
|
98 |
+
$this->pass_manager->has_pass() &&
|
99 |
+
Pass_Manager::pass_compare( $this->pass_manager->highest_pass_id, Pass_Manager::EXTENDED_PASS_ID, '>=' ) &&
|
100 |
+
$this->has_affiliate_wp_license()
|
101 |
+
) {
|
102 |
+
return false;
|
103 |
+
}
|
104 |
+
} catch ( \Exception $e ) {
|
105 |
+
return true;
|
106 |
+
}
|
107 |
+
|
108 |
+
return true;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Determines whether or not AffiliateWP is installed and has a license key.
|
113 |
+
*
|
114 |
+
* @since 2.10.6
|
115 |
+
*
|
116 |
+
* @return bool
|
117 |
+
*/
|
118 |
+
private function has_affiliate_wp_license() {
|
119 |
+
if ( ! function_exists( 'affiliate_wp' ) ) {
|
120 |
+
return false;
|
121 |
+
}
|
122 |
+
|
123 |
+
return (bool) affiliate_wp()->settings->get( 'license_key' );
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* @inheritDoc
|
128 |
+
*/
|
129 |
+
protected function _display() {
|
130 |
+
$screen = get_current_screen();
|
131 |
+
$source = 'settings';
|
132 |
+
if ( $screen instanceof \WP_Screen ) {
|
133 |
+
switch ( $screen->base ) {
|
134 |
+
case 'edit' :
|
135 |
+
$source = 'list-downloads';
|
136 |
+
break;
|
137 |
+
case 'post' :
|
138 |
+
$source = sprintf(
|
139 |
+
'%s-download',
|
140 |
+
'add' === $screen->action ? 'add' : 'edit'
|
141 |
+
);
|
142 |
+
break;
|
143 |
+
default :
|
144 |
+
$source = str_replace( 'download_page_edd-', '', $screen->base );
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
try {
|
149 |
+
if ( 0 === $this->number_license_keys ) {
|
150 |
+
|
151 |
+
// No license keys active at all.
|
152 |
+
printf(
|
153 |
+
/* Translators: %1$s opening anchor tag; %2$s closing anchor tag */
|
154 |
+
__( 'You are using the free version of Easy Digital Downloads. %1$sPurchase a pass%2$s to get email marketing tools and recurring payments.', 'easy-digital-downloads' ),
|
155 |
+
'<a href="' . esc_url( add_query_arg( $this->query_args( 'core', $source ), 'https://easydigitaldownloads.com/pricing/' ) ) . '" target="_blank">',
|
156 |
+
'</a>'
|
157 |
+
);
|
158 |
+
|
159 |
+
} elseif ( ! $this->pass_manager->highest_pass_id ) {
|
160 |
+
|
161 |
+
// Individual product license active, but no pass.
|
162 |
+
printf(
|
163 |
+
/* Translators: %1$s opening anchor tag; %2$s closing anchor tag */
|
164 |
+
__( 'For access to additional Easy Digital Downloads extensions to grow your store, consider %1$spurchasing a pass%2$s.', 'easy-digital-downloads' ),
|
165 |
+
'<a href="' . esc_url( add_query_arg( $this->query_args( 'extension-license', $source ), 'https://easydigitaldownloads.com/pricing/' ) ) . '" target="_blank">',
|
166 |
+
'</a>'
|
167 |
+
);
|
168 |
+
|
169 |
+
} elseif ( Pass_Manager::pass_compare( $this->pass_manager->highest_pass_id, Pass_Manager::PERSONAL_PASS_ID, '=' ) ) {
|
170 |
+
|
171 |
+
// Personal pass active.
|
172 |
+
printf(
|
173 |
+
/* Translators: %1$s opening anchor tag; %2$s closing anchor tag */
|
174 |
+
__( 'You are using Easy Digital Downloads with a Personal Pass. Consider %1$supgrading%2$s to get recurring payments and more.', 'easy-digital-downloads' ),
|
175 |
+
'<a href="' . esc_url( add_query_arg( $this->query_args( 'personal-pass', $source ), 'https://easydigitaldownloads.com/your-account/license-keys/' ) ) . '" target="_blank">',
|
176 |
+
'</a>'
|
177 |
+
);
|
178 |
+
|
179 |
+
} elseif ( Pass_Manager::pass_compare( $this->pass_manager->highest_pass_id, Pass_Manager::EXTENDED_PASS_ID, '>=' ) ) {
|
180 |
+
|
181 |
+
// Extended pass or higher.
|
182 |
+
printf(
|
183 |
+
/* Translators: %1$s opening anchor tag; %2$s closing anchor tag */
|
184 |
+
__( 'Grow your business and make more money with affiliate marketing. %1$sGet AffiliateWP%2$s', 'easy-digital-downloads' ),
|
185 |
+
'<a href="' . esc_url( add_query_arg( $this->query_args( 'extended-pass', $source ), 'https://affiliatewp.com/?ref=743' ) ) . '" target="_blank">',
|
186 |
+
'</a>'
|
187 |
+
);
|
188 |
+
}
|
189 |
+
} catch ( \Exception $e ) {
|
190 |
+
// If we're in here, that means we have an invalid pass ID... what should we do? :thinking:
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Builds the UTM parameters for the URLs.
|
196 |
+
*
|
197 |
+
* @since 2.10.6
|
198 |
+
*
|
199 |
+
* @param string $upgrade_from License type upgraded from.
|
200 |
+
* @param string $source Current page.
|
201 |
+
*
|
202 |
+
* @return string[]
|
203 |
+
*/
|
204 |
+
private function query_args( $upgrade_from, $source = 'settings' ) {
|
205 |
+
return array(
|
206 |
+
'utm_source' => urlencode( $source ),
|
207 |
+
'utm_medium' => 'upgrade-from-' . urlencode( $upgrade_from ),
|
208 |
+
'utm_campaign' => 'admin',
|
209 |
+
'utm_content' => 'top-promo'
|
210 |
+
);
|
211 |
+
}
|
212 |
+
}
|
includes/api/class-edd-api.php
CHANGED
@@ -1581,6 +1581,7 @@ class EDD_API {
|
|
1581 |
$discount_list['discounts'][$count]['product_requirements'] = edd_get_discount_product_reqs( $discount->ID );
|
1582 |
$discount_list['discounts'][$count]['requirement_condition'] = edd_get_discount_product_condition( $discount->ID );
|
1583 |
$discount_list['discounts'][$count]['global_discount'] = edd_is_discount_not_global( $discount->ID );
|
|
|
1584 |
$discount_list['discounts'][$count]['single_use'] = edd_discount_is_single_use( $discount->ID );
|
1585 |
|
1586 |
$count++;
|
@@ -1604,6 +1605,7 @@ class EDD_API {
|
|
1604 |
$discount_list['discounts'][0]['product_requirements'] = edd_get_discount_product_reqs( $discount );
|
1605 |
$discount_list['discounts'][0]['requirement_condition'] = edd_get_discount_product_condition( $discount );
|
1606 |
$discount_list['discounts'][0]['global_discount'] = edd_is_discount_not_global( $discount );
|
|
|
1607 |
$discount_list['discounts'][0]['single_use'] = edd_discount_is_single_use( $discount );
|
1608 |
|
1609 |
} else {
|
1581 |
$discount_list['discounts'][$count]['product_requirements'] = edd_get_discount_product_reqs( $discount->ID );
|
1582 |
$discount_list['discounts'][$count]['requirement_condition'] = edd_get_discount_product_condition( $discount->ID );
|
1583 |
$discount_list['discounts'][$count]['global_discount'] = edd_is_discount_not_global( $discount->ID );
|
1584 |
+
$discount_list['discounts'][$count]['excluded_products'] = edd_get_discount_excluded_products( $discount->ID );
|
1585 |
$discount_list['discounts'][$count]['single_use'] = edd_discount_is_single_use( $discount->ID );
|
1586 |
|
1587 |
$count++;
|
1605 |
$discount_list['discounts'][0]['product_requirements'] = edd_get_discount_product_reqs( $discount );
|
1606 |
$discount_list['discounts'][0]['requirement_condition'] = edd_get_discount_product_condition( $discount );
|
1607 |
$discount_list['discounts'][0]['global_discount'] = edd_is_discount_not_global( $discount );
|
1608 |
+
$discount_list['discounts'][0]['excluded_products'] = edd_get_discount_excluded_products( $discount->ID );
|
1609 |
$discount_list['discounts'][0]['single_use'] = edd_discount_is_single_use( $discount );
|
1610 |
|
1611 |
} else {
|
includes/class-edd-download.php
CHANGED
@@ -339,7 +339,7 @@ class EDD_Download {
|
|
339 |
*/
|
340 |
public function is_single_price_mode() {
|
341 |
|
342 |
-
$ret = get_post_meta( $this->ID, '_edd_price_options_mode', true );
|
343 |
|
344 |
/**
|
345 |
* Override the price mode for a download when checking if is in single price mode.
|
339 |
*/
|
340 |
public function is_single_price_mode() {
|
341 |
|
342 |
+
$ret = $this->has_variable_prices() && get_post_meta( $this->ID, '_edd_price_options_mode', true );
|
343 |
|
344 |
/**
|
345 |
* Override the price mode for a download when checking if is in single price mode.
|
includes/class-edd-license-handler.php
CHANGED
@@ -69,6 +69,23 @@ class EDD_License {
|
|
69 |
$this->includes();
|
70 |
$this->hooks();
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
}
|
73 |
|
74 |
/**
|
@@ -210,6 +227,54 @@ class EDD_License {
|
|
210 |
|
211 |
}
|
212 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
|
214 |
/**
|
215 |
* Activate the license key
|
@@ -292,6 +357,8 @@ class EDD_License {
|
|
292 |
// Decode license data
|
293 |
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
294 |
|
|
|
|
|
295 |
update_option( $this->item_shortname . '_license_active', $license_data );
|
296 |
|
297 |
}
|
@@ -353,6 +420,8 @@ class EDD_License {
|
|
353 |
// Decode the license data
|
354 |
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
355 |
|
|
|
|
|
356 |
delete_option( $this->item_shortname . '_license_active' );
|
357 |
|
358 |
}
|
@@ -404,6 +473,8 @@ class EDD_License {
|
|
404 |
|
405 |
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
406 |
|
|
|
|
|
407 |
update_option( $this->item_shortname . '_license_active', $license_data );
|
408 |
|
409 |
}
|
69 |
$this->includes();
|
70 |
$this->hooks();
|
71 |
|
72 |
+
/**
|
73 |
+
* Maintain an array of active, licensed plugins that have a license key entered.
|
74 |
+
* This is to help us more easily determine if the site has a license key entered
|
75 |
+
* at all. Initializing it this way helps us limit the data to activated plugins only.
|
76 |
+
* If we relied on the options table (`edd_%_license_active`) then we could accidentally
|
77 |
+
* be picking up plugins that have since been deactivated.
|
78 |
+
*
|
79 |
+
* @see \EDD\Admin\Promos\Notices\License_Upgrade_Notice::__construct()
|
80 |
+
*/
|
81 |
+
if ( ! empty( $this->license ) ) {
|
82 |
+
global $edd_licensed_products;
|
83 |
+
if ( ! is_array( $edd_licensed_products ) ) {
|
84 |
+
$edd_licensed_products = array();
|
85 |
+
}
|
86 |
+
$edd_licensed_products[] = $this->item_shortname;
|
87 |
+
}
|
88 |
+
|
89 |
}
|
90 |
|
91 |
/**
|
227 |
|
228 |
}
|
229 |
|
230 |
+
/**
|
231 |
+
* If the supplied license key is for a pass, updates the `edd_pass_licenses` option with
|
232 |
+
* the pass ID and the date it was checked.
|
233 |
+
*
|
234 |
+
* Note: It's intentional that the `edd_pass_licenses` option is always updated, even if
|
235 |
+
* the provided license data is not for a pass. This is so we have a clearer idea
|
236 |
+
* of when the checks started coming through. If the option doesn't exist in the DB
|
237 |
+
* at all, then we haven't checked any licenses.
|
238 |
+
*
|
239 |
+
* @since 2.10.6
|
240 |
+
*
|
241 |
+
* @param string $license
|
242 |
+
* @param object $api_data
|
243 |
+
*/
|
244 |
+
private function maybe_set_pass_flag( $license, $api_data ) {
|
245 |
+
$passes = get_option( 'edd_pass_licenses' );
|
246 |
+
$passes = ! empty( $passes ) ? json_decode( $passes, true ) : array();
|
247 |
+
|
248 |
+
if ( ! empty( $api_data->pass_id ) && ! empty( $api_data->license ) && 'valid' === $api_data->license ) {
|
249 |
+
$passes[ $license ] = array(
|
250 |
+
'pass_id' => intval( $api_data->pass_id ),
|
251 |
+
'time_checked' => time()
|
252 |
+
);
|
253 |
+
} else if ( array_key_exists( $license, $passes ) ) {
|
254 |
+
unset( $passes[ $license ] );
|
255 |
+
}
|
256 |
+
|
257 |
+
update_option( 'edd_pass_licenses', json_encode( $passes ) );
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Removes the pass flag for the supplied license. This happens when a license
|
262 |
+
* is deactivated.
|
263 |
+
*
|
264 |
+
* @since 2.10.6
|
265 |
+
*
|
266 |
+
* @param string $license
|
267 |
+
*/
|
268 |
+
private function maybe_remove_pass_flag( $license ) {
|
269 |
+
$passes = get_option( 'edd_pass_licenses' );
|
270 |
+
$passes = ! empty( $passes ) ? json_decode( $passes, true ) : array();
|
271 |
+
|
272 |
+
if ( array_key_exists( $license, $passes ) ) {
|
273 |
+
unset( $passes[ $license ] );
|
274 |
+
}
|
275 |
+
|
276 |
+
update_option( 'edd_pass_licenses', json_encode( $passes ) );
|
277 |
+
}
|
278 |
|
279 |
/**
|
280 |
* Activate the license key
|
357 |
// Decode license data
|
358 |
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
359 |
|
360 |
+
$this->maybe_set_pass_flag( $this->license, $license_data );
|
361 |
+
|
362 |
update_option( $this->item_shortname . '_license_active', $license_data );
|
363 |
|
364 |
}
|
420 |
// Decode the license data
|
421 |
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
422 |
|
423 |
+
$this->maybe_remove_pass_flag( $this->license );
|
424 |
+
|
425 |
delete_option( $this->item_shortname . '_license_active' );
|
426 |
|
427 |
}
|
473 |
|
474 |
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
475 |
|
476 |
+
$this->maybe_set_pass_flag( $this->license, $license_data );
|
477 |
+
|
478 |
update_option( $this->item_shortname . '_license_active', $license_data );
|
479 |
|
480 |
}
|
includes/deprecated-functions.php
CHANGED
@@ -592,7 +592,7 @@ function edd_undo_purchase_on_refund( $payment_id, $new_status, $old_status ) {
|
|
592 |
* @param int $hour Hour
|
593 |
* @return int $earnings Earnings
|
594 |
*/
|
595 |
-
function edd_get_earnings_by_date( $day = null, $month_num, $year = null, $hour = null, $include_taxes = true ) {
|
596 |
$backtrace = debug_backtrace();
|
597 |
|
598 |
_edd_deprecated_function( __FUNCTION__, '2.7', 'EDD_Payment_Stats()->get_earnings()', $backtrace );
|
592 |
* @param int $hour Hour
|
593 |
* @return int $earnings Earnings
|
594 |
*/
|
595 |
+
function edd_get_earnings_by_date( $day = null, $month_num = null, $year = null, $hour = null, $include_taxes = true ) {
|
596 |
$backtrace = debug_backtrace();
|
597 |
|
598 |
_edd_deprecated_function( __FUNCTION__, '2.7', 'EDD_Payment_Stats()->get_earnings()', $backtrace );
|
includes/formatting.php
CHANGED
@@ -128,7 +128,7 @@ function edd_currency_filter( $price = '', $currency = '' ) {
|
|
128 |
|
129 |
$position = edd_get_option( 'currency_position', 'before' );
|
130 |
|
131 |
-
$negative = $price < 0;
|
132 |
|
133 |
if( $negative ) {
|
134 |
$price = substr( $price, 1 ); // Remove proceeding "-" -
|
128 |
|
129 |
$position = edd_get_option( 'currency_position', 'before' );
|
130 |
|
131 |
+
$negative = is_numeric( $price ) && $price < 0;
|
132 |
|
133 |
if( $negative ) {
|
134 |
$price = substr( $price, 1 ); // Remove proceeding "-" -
|
includes/gateways/stripe/assets/js/build/app.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!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=59)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return r.a})),n.d(t,"e",(function(){return i.a})),n.d(t,"c",(function(){return a})),n.d(t,"g",(function(){return c})),n.d(t,"f",(function(){return u.b})),n.d(t,"i",(function(){return u.c})),n.d(t,"b",(function(){return u.a})),n.d(t,"h",(function(){return s})),n.d(t,"j",(function(){return d})),n.d(t,"d",(function(){return l})),n(25),n(26),n(27),n(28);var r=n(15),o=n(16),i=n.n(o);function a(){i()(arguments,(function(e){document.addEventListener("DOMContentLoaded",e)}))}function c(e){for(var t=[],n=e.nextElementSibling;n;)1===n.nodeType&&t.push(n),n=n.nextElementSibling;return t}var u=n(17);function s(e){var t=!0;return i()(e.querySelectorAll("input"),(function(e){e.checkValidity&&!e.checkValidity()&&(t=!1)})),t}function d(e){var t=document.createElement("input");t.type="submit",t.style.display="none",e.appendChild(t),t.click(),t.remove()}function l(e){return e?""===e.value?null:e.value:null}},function(e,t,n){e.exports=n(93)},function(e,t,n){"use strict";(function(e,r){n.d(t,"c",(function(){return f})),n.d(t,"g",(function(){return p})),n.d(t,"e",(function(){return y})),n.d(t,"d",(function(){return h}));var o=n(3),i=n.n(o),a=n(0),c=n(56);function u(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}n.d(t,"a",(function(){return c.a})),n.d(t,"b",(function(){return c.b})),n.d(t,"f",(function(){return c.c})),n.d(t,"h",(function(){return c.d}));var s={card:"#edd-stripe-card-element"},d={cardNumber:"#edd-stripe-card-element",cardExpiry:"#edd-stripe-card-exp-element",cardCvc:"#edd-stripe-card-cvc-element"},l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},edd_stripe_vars.elementsOptions);function f(e,t){var n;return t||(t="true"===edd_stripe_vars.elementsSplitFields?d:s),Object(a.e)(t,(function(t,r){n=function(e,t,n){var r=document.querySelector(t);if(r){l.style||(l.style=function(){var e=document.querySelector(".card-name.edd-input");if(!e)return null;var t=window.getComputedStyle(e);if(!document.getElementById("edds-stripe-element-styles")){var n=document.createElement("style");n.innerHTML="\n\t\t\t.edd-stripe-card-element.StripeElement,\n\t\t\t.edd-stripe-card-exp-element.StripeElement,\n\t\t\t.edd-stripe-card-cvc-element.StripeElement {\n\t\t\t\tbackground-color: ".concat(t.getPropertyValue("background-color"),";\n\n\t\t\t\t").concat(["top","right","bottom","left"].map((function(e){return"border-".concat(e,"-color: ").concat(t.getPropertyValue("border-".concat(e,"-color")),";\n\t\t\t\t\t\t\t border-").concat(e,"-width: ").concat(t.getPropertyValue("border-".concat(e,"-width")),";\n\t\t\t\t\t\t\t border-").concat(e,"-style: ").concat(t.getPropertyValue("border-".concat(e,"-style")),";\n\t\t\t\t\t\t\t padding-").concat(e,": ").concat(t.getPropertyValue("padding-".concat(e)),";")})).join(""),"\n\t\t\t\t").concat(["top-right","bottom-right","bottom-left","top-left"].map((function(e){return"border-".concat(e,"-radius: ").concat(t.getPropertyValue("border-top-right-radius"),";")})).join(""),"\n\t\t\t}").replace(/\s/g,""),n.id="edds-stripe-element-styles",document.body.appendChild(n)}return{base:{color:t.getPropertyValue("color"),fontFamily:t.getPropertyValue("font-family"),fontSize:t.getPropertyValue("font-size"),fontWeight:t.getPropertyValue("font-weight"),fontSmoothing:t.getPropertyValue("-webkit-font-smoothing")}}}()),"cardNumber"===n&&l.hasOwnProperty("hidePostalCode")&&delete l.hidePostalCode,delete l.i18n;var o=e.create(n,l);return o.addEventListener("change",(function(e){!function(e,t){var n=t.closest(".edd-stripe-new-card").querySelector("#edd-stripe-card-errors");if(n.innerHTML="",e.error){var r=e.error,o=r.code,i=r.message,c=window.edd_stripe_vars.elementsOptions.i18n.errorMessages,u=c[o]?c[o]:i;n.appendChild(Object(a.f)(u))}}(e,r),function(e){var t=e.brand;if(e.elementType,"cardNumber"===e.elementType){var n=document.querySelector(".card-type");"unknown"===t?n.className="card-type":n.classList.add(t)}}(e)})).mount(r),o}}(e,t,r)})),window.eddStripe.cardElement=n,n}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#edd-stripe-card-element",n=f(e,{card:t}),r=document.getElementById("edd-card-details-wrap");return r&&(r.style.display="none"),n}function y(t,n){var o=e('input[name="edd_stripe_existing_card"]:checked');return o.length>0&&"new"!==o.val()?r.resolve({id:o.val(),exists:!0}):window.eddStripe.createPaymentMethod("card",n,{billing_details:h(t)}).then((function(e){if(e.error)throw e.error;return{id:e.paymentMethod.id,exists:!1}}))}function h(e){return{name:Object(a.d)(e.querySelector(".card-name")),address:{line1:Object(a.d)(e.querySelector(".card-address")),line2:Object(a.d)(e.querySelector(".card-address-2")),city:Object(a.d)(e.querySelector(".card-city")),state:Object(a.d)(e.querySelector(".card_state")),postal_code:Object(a.d)(e.querySelector(".card-zip")),country:Object(a.d)(e.querySelector("#billing_country"))}}}}).call(this,n(5),n(24))},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){(function(t){function n(e,n,r,o,i,a,c){try{var u=e[a](c),s=u.value}catch(e){return void r(e)}u.done?n(s):t.resolve(s).then(o,i)}e.exports=function(e){return function(){var r=this,o=arguments;return new t((function(t,i){var a=e.apply(r,o);function c(e){n(a,t,i,c,u,"next",e)}function u(e){n(a,t,i,c,u,"throw",e)}c(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0}).call(this,n(24))},function(e,t){e.exports=jQuery},function(e,t,n){"use strict";n.d(t,"d",(function(){return r.d})),n.d(t,"b",(function(){return r.b})),n.d(t,"a",(function(){return r.a})),n.d(t,"h",(function(){return w})),n.d(t,"g",(function(){return I})),n.d(t,"c",(function(){return C})),n.d(t,"f",(function(){return D.c})),n.d(t,"e",(function(){return D.b}));var r=n(12),o=n(3),i=n.n(o),a=n(0);function c(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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(a.a)(e,u({payment_method:t,nonce:document.getElementById("card_update_nonce_"+t).value},n)).fail((function(e){y(t,e)})).done((function(e){y(t,e,"success"),setTimeout((function(){location.reload()}),1500)}))}function d(e){e.preventDefault();var t=e.target.dataset.source,n=document.getElementById(t+"-update-form"),r=document.getElementById(t+"-card-actions"),o="block"===n.style.display;n.style.display=o?"none":"block",r.style.display=o?"block":"none"}function l(e){e.preventDefault();var t=e.target,n={};["address_city","address_country","address_line1","address_line2","address_zip","address_state","exp_month","exp_year"].forEach((function(e){var r=t.querySelector('[name="'+e+'"]');n[e]=Object(a.d)(r)}));var r=t.querySelector('input[type="submit"]');r.disabled=!0,r.value=r.dataset.loading,s("edds_update_payment_method",e.target.dataset.source,n).fail((function(e){r.disabled=!1,r.value=r.dataset.submit}))}function f(e){e.preventDefault();var t=e.target.innerText;e.target.innerHTML='<span class="edd-loading-ajax edd-loading"></span>',s("edds_delete_payment_method",e.target.dataset.source).fail((function(n){e.target.innerText=t}))}function p(e){e.preventDefault();var t=e.target.innerText;e.target.innerHTML='<span class="edd-loading-ajax edd-loading"></span>',s("edds_set_payment_method_default",e.target.dataset.source).fail((function(n){e.target.innerText=t}))}function y(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"error",r=Object(a.f)(t&&t.message?t.message:edd_stripe_vars.generic_error,n);Object(a.e)(document.querySelectorAll(".edd-stripe-alert"),(function(e){e.remove()}));var o=document.getElementById(e+"_card_item");o.insertBefore(r,o.querySelector(".card-details"))}var h=n(2);function v(e){e.preventDefault();var t=document.getElementById("edd-stripe-add-new-card"),n=t.querySelector(".edd-stripe-add-new-card"),r="block"===n.style.display,o=t.querySelector("#edd-stripe-add-new-cancel");if(r&&o!==e.target){var i=document.createEvent("Event");i.initEvent("submit",!0,!0),t.dispatchEvent(i)}else n.style.display=r?"none":"block",o.style.display=r?"none":"inline-block"}function m(e){e.preventDefault();var t,n,r=e.target;if(Object(a.h)(r))try{(n=document.querySelector(".edd-stripe-add-new")).value=n.dataset.loading,n.disabled=!0,(t=r,window.eddStripe.createPaymentMethod("card",window.eddStripe.cardElement,{billing_details:Object(h.d)(t)}).then((function(e){if(e.error)throw e.error;return e.paymentMethod}))).then(b).catch((function(e){_(e),g()}))}catch(e){_(e),g()}else Object(a.j)(r)}function b(e){Object(a.a)("edds_add_payment_method",{payment_method_id:e.id,nonce:document.getElementById("edd-stripe-add-card-nonce").value}).fail(_).done((function(e){_(e,"success"),setTimeout((function(){location.reload()}),1500)}))}function g(){var e=document.querySelector(".edd-stripe-add-new");e.value=e.dataset.submit,e.disabled=!1}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"error",n=Object(a.f)(e&&e.message?e.message:edd_stripe_vars.generic_error,t);Object(a.e)(document.querySelectorAll(".edd-stripe-alert"),(function(e){e.remove()})),document.querySelector(".edd-stripe-add-card-actions").insertBefore(n,document.querySelector(".edd-stripe-add-new"))}function w(){document.getElementById("edd-stripe-manage-cards")&&(Object(a.e)(document.querySelectorAll(".edd-stripe-update-card"),(function(e){e.addEventListener("click",d)})),Object(a.e)(document.querySelectorAll(".edd-stripe-cancel-update"),(function(e){e.addEventListener("click",d)})),Object(a.e)(document.querySelectorAll(".card-update-form"),(function(e){e.addEventListener("submit",l)})),Object(a.e)(document.querySelectorAll(".edd-stripe-delete-card"),(function(e){e.addEventListener("click",f)})),Object(a.e)(document.querySelectorAll(".edd-stripe-default-card"),(function(e){e.addEventListener("click",p)})),Object(h.c)(window.eddStripe.elements()),document.querySelector(".edd-stripe-add-new").addEventListener("click",v),document.getElementById("edd-stripe-add-new-cancel").addEventListener("click",v),document.getElementById("edd-stripe-add-new-card").addEventListener("submit",m),document.getElementById("card_name").required=!0)}var O=n(13),j=n(4),x=n.n(j),S=n(1),E=n.n(S);function k(e){return P.apply(this,arguments)}function P(){return(P=x()(E.a.mark((function e(t){var n,r,o,i,a;return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),n=document.getElementById("edds-update-payment-method"),L(),e.prev=3,e.next=6,Object(h.e)(n,window.eddStripe.cardElement);case 6:return r=e.sent,e.next=9,Object(h.h)(n.dataset.paymentIntent,"payment_method");case 9:return o=e.sent,e.next=12,Object(h.f)(o,{payment_method:r.id});case 12:return i=e.sent,e.next=15,q(i.id);case 15:if(!(a=e.sent).payment){e.next=20;break}window.location.reload(),e.next=21;break;case 20:throw a;case 21:e.next=27;break;case 23:e.prev=23,e.t0=e.catch(3),T(e.t0),M();case 27:case"end":return e.stop()}}),e,null,[[3,23]])})))).apply(this,arguments)}function q(e){return Object(a.a)("edds_complete_payment_authorization",{intent_id:e,"edds-complete-payment-authorization":document.getElementById("edds-complete-payment-authorization").value})}function L(){var e=document.getElementById("edds-update-payment-method-submit");e.value=e.dataset.loading,e.disabled=!0}function M(){var e=document.getElementById("edds-update-payment-method-submit");e.value=e.dataset.submit,e.disabled=!1}function T(e){var t=Object(a.f)(e&&e.message?e.message:edd_stripe_vars.generic_error,"error"),n=document.getElementById("edds-update-payment-method-errors");n.innerHTML="",n.appendChild(t)}function I(){document.getElementById("edds-update-payment-method")&&(Object(h.c)(window.eddStripe.elements()),document.getElementById("edds-update-payment-method").addEventListener("submit",k),Object(O.a)())}var A=n(14);function C(){Object(a.e)(document.querySelectorAll(".edds-buy-now"),(function(e){e.classList.contains("edd-free-download")||e.addEventListener("click",(function(e){var t,n,o=e.currentTarget.dataset,i=o.downloadId,c=o.nonce;if(i){e.preventDefault(),e.stopImmediatePropagation();var u=0,s=1,d=e.currentTarget.closest(".edd_download_purchase_form"),l=d.querySelector(".edd_price_option_".concat(i,":checked"));l&&(u=l.value);var f=d.querySelector('input[name="edd_download_quantity"]');f&&(s=f.value),t={downloadId:i,priceId:u,quantity:s,nonce:c,addToCartForm:d},n=document.querySelector("#edds-buy-now-modal-content"),A.a.open("edds-buy-now",{onShow:function(){var e,o,i,c,u,s;n.innerHTML='<span class="edd-loading-ajax edd-loading"></span>',(e=t.downloadId,o=t.priceId,i=t.quantity,c=t.nonce,u=t.addToCartForm,s={download_id:e,price_id:o,quantity:i,nonce:c,post_data:jQuery(u).serialize()},Object(a.a)("edds_add_to_cart",s)).then((function(e){var t=e.checkout;n.innerHTML=t,window.EDD_Checkout.init();var o=document.querySelector("#edds-buy-now-modal-content .edd_cart_amount");parseFloat(o.dataset.total)>0&&(Object(r.c)(),Object(A.b)())})).fail((function(e){var t=e.message;document.querySelector("#edds-buy-now-modal-content").innerHTML=t}))},onClose:function(){Object(a.a)("edds_empty_cart")}})}}))})),jQuery(document.body).on("edd_checkout_error",(function(){var e=document.querySelector("#edds-buy-now #edd-purchase-button");if(e){var t=edd_stripe_vars.i18n.completePurchase,n=document.querySelector(".edd_cart_amount").dataset,r=n.total,o=n.totalCurrency;"0"!==r&&setTimeout((function(){e.value="".concat(o," - ").concat(t)}),10)}}))}var D=n(20)},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(36))},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(99);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return i}));var r=n(14),o=n(21);function i(){if("1"===edd_scripts.is_checkout){var t=document.querySelector('input[name="edd-gateway"]');t&&"stripe"===t.value&&(Object(o.c)(),Object(r.b)()),e(document.body).on("edd_gateway_loaded",(function(e,t){"stripe"===t&&(Object(o.c)(),Object(r.b)())}))}}n.d(t,"a",(function(){return o.a})),n.d(t,"b",(function(){return o.b})),n.d(t,"c",(function(){return o.c}))}).call(this,n(5))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(0);function o(){i()&&(a(!1),i().addEventListener("change",(function(e){return a(e.target.checked)})));var t=document.querySelectorAll(".edd-stripe-existing-card");if(0!==t.length){Object(r.e)(t,(function(t){return t.addEventListener("change",(function(t){return function(t){var n="new"===t.value,r=document.querySelector(".edd-stripe-new-card"),o=document.querySelector(".edd-stripe-update-billing-address-wrapper");r.style.display=n?"block":"none",o&&(o.style.display=n?"none":"block"),e(".edd-stripe-card-radio-item").removeClass("selected"),e(t).closest(".edd-stripe-card-radio-item").addClass("selected");var c={card_address:"address_line1",card_address_2:"address_line2",card_city:"address_city",card_state:"address_state",card_zip:"address_zip",billing_country:"address_country"};if(n){for(var u in c){if(!c.hasOwnProperty(u))return;var s=document.getElementById(u);s&&(s.value="",s.selected="")}window.EDD_Checkout.recalculate_taxes&&window.EDD_Checkout.recalculate_taxes(),a(!0)}else{var d=[],l=document.getElementById(t.id+"-billing-details");if(!l)return;a(!1),i()&&(i().checked=!1);var f=l.dataset;for(var p in c)if(c.hasOwnProperty(p)){var y=document.getElementById(p);if(y){var h=f[c[p]];if(y.value=h,""!==h&&d.push(h),y.required&&""===h&&(a(!0),i()&&(i().checked=!0),o&&(o.style.display="none")),"billing_country"===p){var v=document.createEvent("Event");v.initEvent("change",!0,!0),y.dispatchEvent(v)}}}e(document).ajaxSuccess((function(e,t,n){if(n&&n.data&&t&&n.data.includes("action=edd_get_shop_states")&&n.data.includes("field_name=card_state")&&t.responseText&&t.responseText.includes("card_state")){var r=document.getElementById("card_state");r&&(r.value=f.address_state,window.EDD_Checkout.recalculate_taxes&&window.EDD_Checkout.recalculate_taxes(r.value))}}));var m=document.querySelector(".edd-stripe-update-billing-address-current");if(m){m.innerText=d.join(", ");var b=f.brand,g=f.last4;document.querySelector(".edd-stripe-update-billing-address-brand").innerHTML=b,document.querySelector(".edd-stripe-update-billing-address-last4").innerHTML=g}}}(t.target)}))}));var n=document.querySelector(".edd-stripe-existing-card:checked");n||((n=document.querySelector(".edd-stripe-existing-card:first-of-type")).checked=!0);var o=document.createEvent("Event");o.initEvent("change",!0,!1),n.dispatchEvent(o)}}function i(){return document.getElementById("edd-stripe-update-billing-address")}function a(e){var t=document.querySelector(".edd-stripe-update-billing-address-wrapper");if(t){var n=Object(r.g)(t),o=document.querySelector(".edd-stripe-update-billing-address-current");n.forEach((function(t){t.style.display=e?"block":"none"})),o&&(o.style.display=e?"none":"block")}}}).call(this,n(5))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return g.a}));var r=n(3),o=n.n(r);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,void 0):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n(61),n(78);var u,s,d,l,f,p=(u=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'],s=function(){function e(t){var n=t.targetModal,r=t.triggers,o=void 0===r?[]:r,i=t.onShow,c=void 0===i?function(){}:i,u=t.onClose,s=void 0===u?function(){}:u,d=t.openTrigger,l=void 0===d?"data-micromodal-trigger":d,f=t.closeTrigger,p=void 0===f?"data-micromodal-close":f,y=t.openClass,h=void 0===y?"is-open":y,v=t.disableScroll,m=void 0!==v&&v,b=t.disableFocus,g=void 0!==b&&b,_=t.awaitCloseAnimation,w=void 0!==_&&_,O=t.awaitOpenAnimation,j=void 0!==O&&O,x=t.debugMode,S=void 0!==x&&x;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modal=document.getElementById(n),this.config={debugMode:S,disableScroll:m,openTrigger:l,closeTrigger:p,openClass:h,onShow:c,onClose:s,awaitCloseAnimation:w,awaitOpenAnimation:j,disableFocus:g},o.length>0&&this.registerTriggers.apply(this,a(o)),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var t,n;return t=e,(n=[{key:"registerTriggers",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.filter(Boolean).forEach((function(t){t.addEventListener("click",(function(t){return e.showModal(t)}))}))}},{key:"showModal",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.activeElement=document.activeElement,this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),this.scrollBehaviour("disable"),this.addEventListeners(),this.config.awaitOpenAnimation){var n=function t(){e.modal.removeEventListener("animationend",t,!1),e.setFocusToFirstNode()};this.modal.addEventListener("animationend",n,!1)}else this.setFocusToFirstNode();this.config.onShow(this.modal,this.activeElement,t)}},{key:"closeModal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.modal;if(this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),this.scrollBehaviour("enable"),this.activeElement&&this.activeElement.focus&&this.activeElement.focus(),this.config.onClose(this.modal,this.activeElement,e),this.config.awaitCloseAnimation){var n=this.config.openClass;this.modal.addEventListener("animationend",(function e(){t.classList.remove(n),t.removeEventListener("animationend",e,!1)}),!1)}else t.classList.remove(this.config.openClass)}},{key:"closeModalById",value:function(e){this.modal=document.getElementById(e),this.modal&&this.closeModal()}},{key:"scrollBehaviour",value:function(e){if(this.config.disableScroll){var t=document.querySelector("body");switch(e){case"enable":Object.assign(t.style,{overflow:""});break;case"disable":Object.assign(t.style,{overflow:"hidden"})}}}},{key:"addEventListeners",value:function(){this.modal.addEventListener("touchstart",this.onClick),this.modal.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown)}},{key:"removeEventListeners",value:function(){this.modal.removeEventListener("touchstart",this.onClick),this.modal.removeEventListener("click",this.onClick),document.removeEventListener("keydown",this.onKeydown)}},{key:"onClick",value:function(e){e.target.hasAttribute(this.config.closeTrigger)&&this.closeModal(e)}},{key:"onKeydown",value:function(e){27===e.keyCode&&this.closeModal(e),9===e.keyCode&&this.retainFocus(e)}},{key:"getFocusableNodes",value:function(){var e=this.modal.querySelectorAll(u);return Array.apply(void 0,a(e))}},{key:"setFocusToFirstNode",value:function(){var e=this;if(!this.config.disableFocus){var t=this.getFocusableNodes();if(0!==t.length){var n=t.filter((function(t){return!t.hasAttribute(e.config.closeTrigger)}));n.length>0&&n[0].focus(),0===n.length&&t[0].focus()}}}},{key:"retainFocus",value:function(e){var t=this.getFocusableNodes();if(0!==t.length)if(t=t.filter((function(e){return null!==e.offsetParent})),this.modal.contains(document.activeElement)){var n=t.indexOf(document.activeElement);e.shiftKey&&0===n&&(t[t.length-1].focus(),e.preventDefault()),!e.shiftKey&&t.length>0&&n===t.length-1&&(t[0].focus(),e.preventDefault())}else t[0].focus()}}])&&i(t.prototype,n),e}(),d=null,l=function(e){if(!document.getElementById(e))return console.warn("MicroModal: ❗Seems like you have missed %c'".concat(e,"'"),"background-color: #f8f9fa;color: #50596c;font-weight: bold;","ID somewhere in your code. Refer example below to resolve it."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<div class="modal" id="'.concat(e,'"></div>')),!1},f=function(e,t){if(function(e){e.length<=0&&(console.warn("MicroModal: ❗Please specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<a href="#" data-micromodal-trigger="my-modal"></a>'))}(e),!t)return!0;for(var n in t)l(n);return!0},{init:function(e){var t=Object.assign({},{openTrigger:"data-micromodal-trigger"},e),n=a(document.querySelectorAll("[".concat(t.openTrigger,"]"))),r=function(e,t){var n=[];return e.forEach((function(e){var r=e.attributes[t].value;void 0===n[r]&&(n[r]=[]),n[r].push(e)})),n}(n,t.openTrigger);if(!0!==t.debugMode||!1!==f(n,r))for(var o in r){var i=r[o];t.targetModal=o,t.triggers=a(i),d=new s(t)}},show:function(e,t){var n=t||{};n.targetModal=e,!0===n.debugMode&&!1===l(e)||(d&&d.removeEventListeners(),(d=new s(n)).showModal())},close:function(e){e?d.closeModalById(e):d.closeModal()}});window.MicroModal=p;var y=p;function h(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 v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m={disableScroll:!0,awaitOpenAnimation:!0,awaitCloseAnimation:!0},b={setup:function(e){var t=v(v({},m),e);y.init(t)},open:function(e,t){var n=v(v({},m),t);y.show(e,n)},close:function(e){y.close(e)}},g=n(13)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s}));var r=n(8),o=n.n(r),i=n(3),a=n.n(i);function c(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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(t,n){var r={type:"POST",dataType:"json",xhrFields:{withCredentials:!0},url:window.edd_scripts&&window.edd_scripts.ajaxurl||window.ajaxurl,data:u({action:t},n)},i=e.Deferred((function(t){t.jqXHR=e.ajax(r).done((function(e){"1"!==e&&1!==e||(e={success:!0}),"object"===o()(e)&&void 0!==o()(e.success)?t[e.success?"resolveWith":"rejectWith"](this,[e.data]):t.rejectWith(this,[e])})).fail((function(){t.rejectWith(this,arguments)}))})),a=i.promise();return a.abort=function(){return i.jqXHR.abort(),this},a}}).call(this,n(5))},function(e,t){var n=/^(?:0|[1-9]\d*)$/;function r(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););return e}var o,i,a=Object.prototype,c=a.hasOwnProperty,u=a.toString,s=a.propertyIsEnumerable,d=(o=Object.keys,i=Object,function(e){return o(i(e))});var l,f=(l=function(e,t){return e&&p(e,t,m)},function(e,t){if(null==e)return e;if(!v(e))return l(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e}),p=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var c=i[++r];if(!1===t(o[c],c,o))break}return e};function y(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||n.test(e))&&e>-1&&e%1==0&&e<t}var h=Array.isArray;function v(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?u.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}function m(e){return v(e)?function(e,t){var n=h(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&v(e)}(e)&&c.call(e,"callee")&&(!s.call(e,"callee")||"[object Arguments]"==u.call(e))}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,o=!!r;for(var i in e)!t&&!c.call(e,i)||o&&("length"==i||y(i,r))||n.push(i);return n}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||a))return d(e);var t,n,r=[];for(var o in Object(e))c.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e)}function b(e){return e}e.exports=function(e,t){return(h(e)?r:f)(e,"function"==typeof t?t:b)}},function(e,t,n){"use strict";(function(e){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"error",n=document.createElement("p");return n.classList.add("edd-alert"),n.classList.add("edd-stripe-alert"),n.style.clear="both","error"===t?n.classList.add("edd-alert-error"):n.classList.add("edd-alert-success"),n.innerHTML=e||edd_stripe_vars.generic_error,n}function o(t){var n=t.errorType,o=t.errorMessage,i=t.errorContainer,a=t.errorContainerReplace,c=void 0===a||a,u=e(i),s=r(o,n);!0===c?u.html(s):u.before(s)}function i(t){e(t).html("")}n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i}))}).call(this,n(5))},function(e,t,n){var r=n(10);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(7),o=n(45),i=n(11),a=n(46),c=n(54),u=n(84),s=o("wks"),d=r.Symbol,l=u?d:d&&d.withoutSetter||a;e.exports=function(e){return i(s,e)||(c&&i(d,e)?s[e]=d[e]:s[e]=l("Symbol."+e)),s[e]}},function(e,t,n){"use strict";n.d(t,"c",(function(){return x})),n.d(t,"b",(function(){return S.a})),n.d(t,"a",(function(){return E}));var r=n(58),o=n.n(r),i=n(3),a=n.n(i),c=n(9),u=n.n(c),s=n(4),d=n.n(s),l=n(1),f=n.n(l),p=n(0),y=(n(2),n(6));function h(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 v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e){var t,n=!1,r=1,o=e.querySelector('[name="download_id"]');t=parseFloat(o.value);var i=e.querySelector(".edd_price_option_".concat(t,":checked"));i&&(n=parseFloat(i.value));var a=e.querySelector('input[name="edd_download_quantity"]');return a&&(r=parseFloat(a.value)),{downloadId:t,priceId:n,quantity:r}}function b(e,t){return g.apply(this,arguments)}function g(){return(g=d()(f.a.mark((function e(t,n){var r,o,i,a,c,s,d;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=m(n),o=r.downloadId,i=r.priceId,a=r.quantity,e.prev=1,e.next=4,Object(p.a)("edds_prb_ajax_get_options",{downloadId:o,priceId:i,quantity:a});case 4:c=e.sent,s=c["display-items"],d=u()(c,["display-items"]),t.update(v({displayItems:s},d)),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(1),Object(p.i)({errorMessage:"",errorContainer:n,errorContainerReplace:!1});case 13:case"end":return e.stop()}}),e,null,[[1,10]])})))).apply(this,arguments)}function _(){return(_=d()(f.a.mark((function e(t,n,r){var o,i,a,c,s,d,l,y,h,b,g;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.dataset.price,i=m(r),a=i.downloadId,c=i.priceId,s=i.quantity,e.prev=2,e.next=5,Object(p.a)("edds_prb_ajax_get_options",{downloadId:a,priceId:c,quantity:s});case 5:d=e.sent,l=d["display-items"],y=u()(d,["display-items"]),h=edd_stripe_vars,b=h.is_zero_decimal,g=parseFloat(o),"false"===b&&(g=Math.round(100*g)),n.update(v(v({displayItems:l.map((function(e){return{label:e.label,amount:g}}))},y),{},{total:{label:y.total.label,amount:g}})),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),Object(p.i)({errorMessage:"",errorContainer:r,errorContainerReplace:!1});case 17:case"end":return e.stop()}}),e,null,[[2,14]])})))).apply(this,arguments)}function w(e,t,n){e.complete("success"),n.classList.remove("loading"),Object(p.i)({errorMessage:t.message,errorContainer:n,errorContainerReplace:!1}),jQuery("a.edd-add-to-cart",n).hide(),jQuery(".edd_download_quantity_wrapper",n).hide(),jQuery(".edd_price_options",n).hide(),jQuery(".edd_go_to_checkout",n).show().removeAttr("data-edd-loading")}function O(){return(O=d()(f.a.mark((function e(t,n,r){var o,i,a,c,u,s,l,h,v,b,g,_,O;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o=m(n),i=o.downloadId,a=o.priceId,c=o.quantity,u=r.paymentMethod,s=r.payerEmail,l=r.payerName,e.next=5,Object(p.a)("edds_prb_ajax_process_checkout",{email:s,name:l,paymentMethod:u,downloadId:i,priceId:a,quantity:c,context:"download",post_data:jQuery(n).serialize()});case 5:h=e.sent,v=h.intent,b=h.intent,g=b.client_secret,_=b.object,r.complete("success"),n.classList.add("loading"),O="setup_intent"===_?"confirmCardSetup":"confirmCardPayment",eddStripe[O](g,{payment_method:u.id},{handleActions:!1}).then((function(e){var t=e.error;if(t)throw t;eddStripe[O](g).then(function(){var e=d()(f.a.mark((function e(t){var o,i,a,c;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.error,e.prev=1,!o){e.next=4;break}throw o;case 4:return e.next=6,Object(y.b)(v);case 6:return i=e.sent,a=i.intent,c=i.nonce,e.next=11,Object(y.a)(a,c);case 11:window.location.replace(edd_stripe_vars.successPageUri),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(1),w(r,e.t0,n);case 17:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t){return e.apply(this,arguments)}}())})).catch((function(e){w(r,e,n)})),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),w(r,e.t0,n);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})))).apply(this,arguments)}function j(e){var t=window.eddStripe;try{var n=E(e.dataset),r=n["display-items"],o=u()(n,["display-items"]),i=e.closest(".edd_download_purchase_form"),a=t.paymentRequest(v({requestPayerEmail:!0,displayItems:r},o)),c=t.elements().create("paymentRequestButton",{paymentRequest:a}),s=document.querySelector("#".concat(e.id));a.canMakePayment().then((function(t){t&&(!0===t.applePay&&"true"===edd_stripe_vars.isTestMode||(s.style.display="block",i.classList.add("edd-prb--is-active"),c.mount("#".concat(e.id," .edds-prb__button")),function(e,t){var n=t.querySelectorAll('.edd_price_options input[type="radio"]');Object(p.e)(n,(function(n){n.addEventListener("change",(function(){return b(e,t)}))}));var r=t.querySelector('input[name="edd_download_quantity"]');r&&r.addEventListener("change",(function(){return b(e,t)})),function(e,t){var n=t.querySelector(".edd-add-to-cart");n&&new MutationObserver((function(n){n.forEach((function(n){var r=n.type,o=n.attributeName,i=n.target;"attributes"===r&&"data-price"===o&&function(e,t,n){_.apply(this,arguments)}(i,e,t)}))})).observe(n,{attributes:!0})}(e,t)}(a,i)))})),a.on("paymentmethod",(function(e){!function(e,t,n){O.apply(this,arguments)}(a,i,e)}))}catch(e){Object(p.i)({errorMessage:e.message,errorContainer:purchaseLink,errorContainerReplace:!1})}}function x(){Object(p.e)(document.querySelectorAll(".edds-prb.edds-prb--download"),j)}var S=n(57);function E(e){for(var t={},n=0,r=Object.entries(e);n<r.length;n++){var i=o()(r[n],2),a=i[0],c=i[1],u=c;try{u=JSON.parse(c)}catch(e){}t[a]=u}return t}},function(e,t,n){"use strict";(function(e){n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return p}));var r=n(4),o=n.n(r),i=n(1),a=n.n(i),c=n(2),u=n(0);function s(){Object(c.c)(window.eddStripe.elements()),e("#edd_purchase_form").off("submit",h),e("#edd_purchase_form").on("submit",h),e(document).off("ajaxSuccess",y),e(document).on("ajaxSuccess",y)}function d(){return(d=o()(a.a.mark((function t(){var n,r,o,i,u,s,d,y,h,b;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=e("#edd_purchase_form").serialize(),t.next=4,Object(c.e)(document.getElementById("edd_purchase_form"),window.eddStripe.cardElement);case 4:return r=t.sent,t.next=7,l(r.id,r.exists);case 7:return o=t.sent,i=o.intent,u=o.nonce,e("#edd-process-checkout-nonce").val(u),t.next=13,Object(c.f)(i,{form_data:n+="&edd-process-checkout-nonce=".concat(u)});case 13:return s=t.sent,t.next=16,f(s);case 16:return d=t.sent,y=d.intent,h=d.nonce,t.next=21,Object(c.a)(y,{},h);case 21:if("succeeded"!==(b=t.sent).status&&("canceled"!==b.status||"abandoned"!==b.cancellation_reason)){t.next=28;break}return t.next=25,p(b,h);case 25:window.location.replace(edd_stripe_vars.successPageUri),t.next=29;break;case 28:window.location.replace(edd_stripe_vars.failurePageUri);case 29:t.next=35;break;case 31:t.prev=31,t.t0=t.catch(0),m(t.t0),v();case 35:case"end":return t.stop()}}),t,null,[[0,31]])})))).apply(this,arguments)}function l(t,n){return Object(u.a)("edds_process_purchase_form",{form_data:e("#edd_purchase_form").serialize(),payment_method_id:t,payment_method_exists:n})}function f(t){var n=e("#edd_purchase_form"),r=n.serialize();if(0===n.length){var o=e("#edd-process-checkout-nonce").val();r="edd-process-checkout-nonce=".concat(o)}return Object(u.a)("edds_create_payment",{form_data:r,intent:t})}function p(t,n){var r=e("#edd_purchase_form"),o=r.serialize();if(0===r.length){var i=e("#edd-process-checkout-nonce").val();o="edd-process-checkout-nonce=".concat(i)}return n&&(o+="&edd-process-checkout-nonce=".concat(n)),Object(u.a)("edds_complete_payment",{form_data:o,intent:t})}function y(e,t,n){if(n&&n.data&&t)return n.data.includes("action=edd_process_checkout")&&n.data.includes("edd-gateway=stripe")&&t.responseText&&"success"===t.responseText.trim()?function(){return d.apply(this,arguments)}():void 0}function h(t){"stripe"===e('input[name="edd-gateway"]').val()&&e(".edd_cart_total .edd_cart_amount").data("total")>0&&(t.preventDefault(),e("#edd_purchase_form #edd_purchase_submit [type=submit]").trigger("click"))}function v(){document.querySelector("#edd_purchase_form #edd_purchase_submit [type=submit]").value=edd_global_vars.complete_purchase,e(".edd-loading-ajax").remove(),e(".edd_errors").remove(),e(".edd-error").hide(),e("#edd-purchase-button").attr("disabled",!1)}function m(t){var n=t.code,r=t.message,o=window.edd_stripe_vars.elementsOptions.i18n.errorMessages;r||(r=edd_stripe_vars.generic_error);var i=n&&o[n]?o[n]:r,a=Object(u.f)(i);e(".edd-stripe-alert").remove(),e(edd_global_vars.checkout_error_anchor).before(a),e(document.body).trigger("edd_checkout_error",[t]),window.console&&t.responseText&&window.console.error(t.responseText)}}).call(this,n(5))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(18),o=n(32),i=n(29);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=n(90).Promise},function(e,t){String.prototype.includes||(String.prototype.includes=function(e,t){"use strict";return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)})},function(e,t){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(Element.prototype.matches.call(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null})},function(e,t){Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r})},function(e,t){[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})}))},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(39),o=n(41);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(22);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(18),o=n(42),i=n(33),a=n(31),c=Object.defineProperty;t.f=r?c:function(e,t,n){if(i(e),t=a(t,!0),i(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(22);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var r=n(7),o=n(23);e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(7),o=n(37).f,i=n(23),a=n(63),c=n(34),u=n(68),s=n(75);e.exports=function(e,t){var n,d,l,f,p,y=e.target,h=e.global,v=e.stat;if(n=h?r:v?r[y]||c(y,{}):(r[y]||{}).prototype)for(d in t){if(f=t[d],l=e.noTargetGet?(p=o(n,d))&&p.value:n[d],!s(h?d:y+(v?".":"#")+d,e.forced)&&void 0!==l){if(typeof f==typeof l)continue;u(f,l)}(e.sham||l&&l.sham)&&i(f,"sham",!0),a(n,d,f,e)}}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(18),o=n(38),i=n(29),a=n(30),c=n(31),u=n(11),s=n(42),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=a(e),t=c(t,!0),s)try{return d(e,t)}catch(e){}if(u(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(10),o=n(40),i="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(18),o=n(10),i=n(62);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(44),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r=n(7),o=n(34),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},function(e,t,n){var r=n(67),o=n(44);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t){e.exports={}},function(e,t,n){var r=n(11),o=n(30),i=n(73).indexOf,a=n(47);e.exports=function(e,t){var n,c=o(e),u=0,s=[];for(n in c)!r(a,n)&&r(c,n)&&s.push(n);for(;t.length>u;)r(c,n=t[u++])&&(~i(s,n)||s.push(n));return s}},function(e,t,n){var r=n(50),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(41);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(10);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t){e.exports={}},function(e,t,n){"use strict";(function(e,r){n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return m}));var o=n(4),i=n.n(o),a=n(3),c=n.n(a),u=n(1),s=n.n(u),d=n(0);function l(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 f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"payment_intent",r=e(window.eddStripe.cardElement._parent).closest("form");return Object(d.a)("edds_get_intent",{intent_id:t,intent_type:n,form_data:r.serialize()}).then((function(e){return e.intent}))}function y(t){var n=e(window.eddStripe.cardElement._parent).closest("form");return Object(d.a)("edds_confirm_intent",{intent_id:t.id,intent_type:t.object,form_data:n.serialize()}).then((function(e){return e.intent}))}function h(t,n,o){var i=e(window.eddStripe.cardElement._parent).closest("form");if("requires_capture"!==t.status)return r.resolve(t);var a=i.serialize();return o&&(a+="&edd-process-checkout-nonce=".concat(o)),Object(d.a)("edds_capture_intent",f({intent_id:t.id,intent_type:t.object,form_data:a},n)).then((function(e){return e.intent}))}function v(t,n){var r=e(window.eddStripe.cardElement._parent).closest("form");return Object(d.a)("edds_update_intent",f({intent_id:t.id,intent_type:t.object,form_data:r.serialize()},n)).then((function(e){return e.intent}))}function m(e,t){return b.apply(this,arguments)}function b(){return(b=i()(s.a.mark((function e(t,n){var r,o,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("requires_confirmation"!==t.status){e.next=7;break}return e.next=3,y(t);case 3:return r=e.sent,e.next=6,m(r);case 6:return e.abrupt("return",e.sent);case 7:if("requires_payment_method"!==t.status&&"requires_source"!==t.status){e.next=14;break}return e.next=10,v(t,n);case 10:return o=e.sent,e.next=13,m(o,n);case 13:return e.abrupt("return",e.sent);case 14:if(!("requires_action"===t.status&&"use_stripe_sdk"===t.next_action.type||"requires_source_action"===t.status&&"use_stripe_sdk"===t.next_action.type)){e.next=18;break}return a="setup_intent"===t.object?"handleCardSetup":"handleCardAction","automatic"===t.confirmation_method&&(a="handleCardPayment"),e.abrupt("return",window.eddStripe[a](t.client_secret).then(function(){var e=i()(s.a.mark((function e(t){var n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.error){e.next=2;break}throw t.error;case 2:return n=t.setupIntent,r=t.paymentIntent,e.next=5,m(n||r);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}}).call(this,n(5),n(24))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return x}));var r,o=n(3),i=n.n(o),a=n(9),c=n.n(a),u=n(4),s=n.n(u),d=n(1),l=n.n(d),f=n(20),p=n(0),y=(n(2),n(6));function h(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 v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(){r=!1;var e=document.getElementById("edd-gateway-option-stripe-prb");if(e){e.remove();var t=document.querySelectorAll(".edd-gateway-option"),n=t[0],o=n.querySelector("input");o.checked=!0,n.classList.add("edd-gateway-option-selected"),edd_load_gateway(o.value),1===t.length&&document.getElementById("edd_payment_mode_select_wrap").remove()}}function b(e){var t=document.getElementById("edds-prb-error-wrap"),n=edd_stripe_vars,r=n.checkout_agree_to_terms,o=n.checkout_agree_to_privacy,i=document.getElementById("edd_agree_to_terms");i&&(!1===i.checked?(e.preventDefault(),Object(p.i)({errorMessage:r,errorContainer:t})):Object(p.b)(t));var a=document.getElementById("edd-agree-to-privacy-policy");a&&!1===a.checked&&(!1===a.checked?(e.preventDefault(),Object(p.i)({errorMessage:o,errorContainer:t})):Object(p.b)(t))}function g(e,t){return _.apply(this,arguments)}function _(){return(_=s()(l.a.mark((function e(t,n){var r,o,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(p.a)("edds_prb_ajax_get_options");case 3:r=e.sent,o=r["display-items"],i=c()(r,["display-items"]),t.update(v({displayItems:o},i)),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),Object(p.i)({errorMessage:"",errorContainer:document.getElementById("edds-prb-checkout"),errorContainerReplace:!1});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function w(e,t,n){e.complete("success");var r=n.querySelector(".edds-prb-spinner");r&&r.parentNode.removeChild(r),n.classList.remove("loading"),Object(p.i)({errorMessage:t.message,errorContainer:document.getElementById("edds-prb-checkout"),errorContainerReplace:!1})}function O(){return(O=s()(l.a.mark((function t(n,r,o){var i,a,c,u,d,f,h,v,m,b;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i=o.paymentMethod,o.payerEmail,a=o.payerName,r.classList.add("loading"),c=document.createElement("span"),["edd-loading-ajax","edd-loading","edds-prb-spinner"].forEach((function(e){return c.classList.add(e)})),r.appendChild(c),t.next=9,Object(p.a)("edds_prb_ajax_process_checkout",{name:a,paymentMethod:i,form_data:e("#edd_purchase_form").serialize()});case 9:u=t.sent,d=u.intent,f=u.intent,h=f.client_secret,v=f.object,m=u.nonce,e("#edd-process-checkout-nonce").val(m),o.complete("success"),b="setup_intent"===v?"confirmCardSetup":"confirmCardPayment",eddStripe[b](h,{payment_method:i.id},{handleActions:!1}).then((function(e){var t=e.error;if(t)throw t;eddStripe[b](h).then(function(){var e=s()(l.a.mark((function e(t){var n,i,a,c;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.error,e.prev=1,!n){e.next=4;break}throw n;case 4:return e.next=6,Object(y.b)(d);case 6:return i=e.sent,a=i.intent,c=i.nonce,e.next=11,Object(y.a)(a,c);case 11:window.location.replace(edd_stripe_vars.successPageUri),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(1),w(o,e.t0,r);case 17:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t){return e.apply(this,arguments)}}())})).catch((function(e){w(o,e,r)})),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(0),w(o,t.t0,r);case 24:case"end":return t.stop()}}),t,null,[[0,21]])})))).apply(this,arguments)}function j(e,t){var n=t.total_plain;!0===r&&0===n&&window.location.reload()}function x(){"1"===edd_scripts.is_checkout&&jQuery(document.body).on("edd_gateway_loaded",(function(e,t){if("stripe-prb"!==t)return r=!1,void function(){var e=window,t=e.eddStripe,n=e.edd_stripe_vars;if(n&&t){var r=n.currency,o=n.country;"false"!==n.checkoutHasPaymentRequest&&t.paymentRequest({country:o,currency:r.toLowerCase(),total:{label:"Easy Digital Downloads",amount:100}}).canMakePayment().then((function(e){null===e&&m(),document.getElementById("edd_checkout_form_wrap").classList.add("edd-prb--is-active")}))}}();var n=document.querySelector(".edds-prb.edds-prb--checkout");n&&(r=!0,function(e){var t=window.eddStripe,n=document.getElementById("edd_checkout_form_wrap");try{var r=Object(f.a)(e.dataset),o=r["display-items"],i=c()(r,["display-items"]),a=t.paymentRequest(v({requestPayerName:!0,displayItems:o},i)),u=t.elements().create("paymentRequestButton",{paymentRequest:a}),s=document.querySelector("#".concat(e.id));a.canMakePayment().then((function(t){return t?!0===t.applePay&&"true"===edd_stripe_vars.isTestMode?m():(s.style.display="block",n.classList.add("edd-prb--is-active"),u.mount("#".concat(e.id," .edds-prb__button")),function(e,t){var n=jQuery(document.body);n.on("edd_quantity_updated",(function(){return g(e,t)})),n.on("edd_discount_applied",(function(){return g(e,t)})),n.on("edd_discount_removed",(function(){return g(e,t)})),e.on("paymentmethod",(function(n){!function(e,t,n){O.apply(this,arguments)}(e,t,n)})),n.on("edd_discount_applied",j)}(a,n),void u.on("click",b)):m()}))}catch(e){Object(p.i)({errorMessage:e.message,errorContainer:document.querySelector("#edds-prb-checkout"),errorContainerReplace:!1})}}(n))}))}}).call(this,n(5))},function(e,t,n){var r=n(94),o=n(95),i=n(96),a=n(98);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.r(t),n(60);var r=n(0),o=n(6),i=n(13),a=n(2);!function(){try{window.eddStripe=new Stripe(edd_stripe_vars.publishable_key),window.eddStripe._plugin={domReady:r.c,apiRequest:r.a,generateNotice:r.f,mountCardElement:a.g,createElementsPaymentForm:a.c,getBillingDetails:a.d,getPaymentMethod:a.e,confirmIntent:a.b,handleIntent:a.f,retrieveIntent:a.h,paymentMethods:i.a},Object(r.c)(o.d,o.h,o.g,o.c,o.f,o.e)}catch(e){alert(e.message)}}()},function(e,t,n){},function(e,t,n){var r=n(35),o=n(76);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){var r=n(7),o=n(22),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(7),o=n(23),i=n(11),a=n(34),c=n(43),u=n(64),s=u.get,d=u.enforce,l=String(String).split("String");(e.exports=function(e,t,n,c){var u=!!c&&!!c.unsafe,s=!!c&&!!c.enumerable,f=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof t||i(n,"name")||o(n,"name",t),d(n).source=l.join("string"==typeof t?t:"")),e!==r?(u?!f&&e[t]&&(s=!0):delete e[t],s?e[t]=n:o(e,t,n)):s?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||c(this)}))},function(e,t,n){var r,o,i,a=n(65),c=n(7),u=n(22),s=n(23),d=n(11),l=n(66),f=n(47),p=c.WeakMap;if(a){var y=new p,h=y.get,v=y.has,m=y.set;r=function(e,t){return m.call(y,e,t),t},o=function(e){return h.call(y,e)||{}},i=function(e){return v.call(y,e)}}else{var b=l("state");f[b]=!0,r=function(e,t){return s(e,b,t),t},o=function(e){return d(e,b)?e[b]:{}},i=function(e){return d(e,b)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(7),o=n(43),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,n){var r=n(45),o=n(46),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t){e.exports=!1},function(e,t,n){var r=n(11),o=n(69),i=n(37),a=n(32);e.exports=function(e,t){for(var n=o(t),c=a.f,u=i.f,s=0;s<n.length;s++){var d=n[s];r(e,d)||c(e,d,u(t,d))}}},function(e,t,n){var r=n(70),o=n(72),i=n(52),a=n(33);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(71),o=n(7),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t,n){var r=n(7);e.exports=r},function(e,t,n){var r=n(48),o=n(51).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(30),o=n(49),i=n(74),a=function(e){return function(t,n,a){var c,u=r(t),s=o(u.length),d=i(a,s);if(e&&n!=n){for(;s>d;)if((c=u[d++])!=c)return!0}else for(;s>d;d++)if((e||d in u)&&u[d]===n)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var r=n(50),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},function(e,t,n){var r=n(10),o=/#|\.prototype\./,i=function(e,t){var n=c[a(e)];return n==s||n!=u&&("function"==typeof t?r(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},c=i.data={},u=i.NATIVE="N",s=i.POLYFILL="P";e.exports=i},function(e,t,n){"use strict";var r=n(18),o=n(10),i=n(77),a=n(52),c=n(38),u=n(53),s=n(39),d=Object.assign,l=Object.defineProperty;e.exports=!d||o((function(){if(r&&1!==d({b:1},d(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=d({},e)[n]||"abcdefghijklmnopqrst"!=i(d({},t)).join("")}))?function(e,t){for(var n=u(e),o=arguments.length,d=1,l=a.f,f=c.f;o>d;)for(var p,y=s(arguments[d++]),h=l?i(y).concat(l(y)):i(y),v=h.length,m=0;v>m;)p=h[m++],r&&!f.call(y,p)||(n[p]=y[p]);return n}:d},function(e,t,n){var r=n(48),o=n(51);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(35),o=n(79);r({target:"Array",stat:!0,forced:!n(89)((function(e){Array.from(e)}))},{from:o})},function(e,t,n){"use strict";var r=n(80),o=n(53),i=n(82),a=n(83),c=n(49),u=n(85),s=n(86);e.exports=function(e){var t,n,d,l,f,p,y=o(e),h="function"==typeof this?this:Array,v=arguments.length,m=v>1?arguments[1]:void 0,b=void 0!==m,g=s(y),_=0;if(b&&(m=r(m,v>2?arguments[2]:void 0,2)),null==g||h==Array&&a(g))for(n=new h(t=c(y.length));t>_;_++)p=b?m(y[_],_):y[_],u(n,_,p);else for(f=(l=g.call(y)).next,n=new h;!(d=f.call(l)).done;_++)p=b?i(l,m,[d.value,_],!0):d.value,u(n,_,p);return n.length=_,n}},function(e,t,n){var r=n(81);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r=n(33);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(19),o=n(55),i=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},function(e,t,n){var r=n(54);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var r=n(31),o=n(32),i=n(29);e.exports=function(e,t,n){var a=r(t);a in e?o.f(e,a,i(0,n)):e[a]=n}},function(e,t,n){var r=n(87),o=n(55),i=n(19)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(88),o=n(40),i=n(19)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){var r={};r[n(19)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(19)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},function(e,t,n){(function(t,r){var o;o=function(){"use strict";function e(e){return"function"==typeof e}var o=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,a=void 0,c=void 0,u=function(e,t){h[i]=e,h[i+1]=t,2===(i+=2)&&(c?c(v):w())},s="undefined"!=typeof window?window:void 0,d=s||{},l=d.MutationObserver||d.WebKitMutationObserver,f="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function y(){var e=setTimeout;return function(){return e(v,1)}}var h=new Array(1e3);function v(){for(var e=0;e<i;e+=2)(0,h[e])(h[e+1]),h[e]=void 0,h[e+1]=void 0;i=0}var m,b,g,_,w=void 0;function O(e,t){var n=arguments,r=this,o=new this.constructor(S);void 0===o[x]&&N(o);var i,a=r._state;return a?(i=n[a-1],u((function(){return B(a,o,i,r._result)}))):I(r,o,e,t),o}function j(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(S);return q(t,e),t}f?w=function(){return t.nextTick(v)}:l?(b=0,g=new l(v),_=document.createTextNode(""),g.observe(_,{characterData:!0}),w=function(){_.data=b=++b%2}):p?((m=new MessageChannel).port1.onmessage=v,w=function(){return m.port2.postMessage(0)}):w=void 0===s?function(){try{var e=n(92);return a=e.runOnLoop||e.runOnContext,function(){a(v)}}catch(e){return y()}}():y();var x=Math.random().toString(36).substring(16);function S(){}var E=new C;function k(e){try{return e.then}catch(e){return E.error=e,E}}function P(t,n,r){n.constructor===t.constructor&&r===O&&n.constructor.resolve===j?function(e,t){1===t._state?M(e,t._result):2===t._state?T(e,t._result):I(t,void 0,(function(t){return q(e,t)}),(function(t){return T(e,t)}))}(t,n):r===E?T(t,E.error):void 0===r?M(t,n):e(r)?function(e,t,n){u((function(e){var r=!1,o=function(n,o,i,a){try{n.call(o,(function(n){r||(r=!0,t!==n?q(e,n):M(e,n))}),(function(t){r||(r=!0,T(e,t))}))}catch(e){return e}}(n,t,0,0,e._label);!r&&o&&(r=!0,T(e,o))}),e)}(t,n,r):M(t,n)}function q(e,t){var n;e===t?T(e,new TypeError("You cannot resolve a promise with itself")):"function"==typeof(n=t)||"object"==typeof n&&null!==n?P(e,t,k(t)):M(e,t)}function L(e){e._onerror&&e._onerror(e._result),A(e)}function M(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&u(A,e))}function T(e,t){void 0===e._state&&(e._state=2,e._result=t,u(L,e))}function I(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=n,o[i+2]=r,0===i&&e._state&&u(A,e)}function A(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?B(n,r,o,i):o(i);e._subscribers.length=0}}function C(){this.error=null}var D=new C;function B(t,n,r,o){var i=e(r),a=void 0,c=void 0,u=void 0,s=void 0;if(i){if((a=function(e,t){try{return e(t)}catch(e){return D.error=e,D}}(r,o))===D?(s=!0,c=a.error,a=null):u=!0,n===a)return void T(n,new TypeError("A promises callback cannot return that same promise."))}else a=o,u=!0;void 0!==n._state||(i&&u?q(n,a):s?T(n,c):1===t?M(n,a):2===t&&T(n,a))}var F=0;function N(e){e[x]=F++,e._state=void 0,e._result=void 0,e._subscribers=[]}function z(e,t){this._instanceConstructor=e,this.promise=new e(S),this.promise[x]||N(this.promise),o(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?M(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&M(this.promise,this._result))):T(this.promise,new Error("Array Methods must be provided an Array"))}function R(e){this[x]=F++,this._result=this._state=void 0,this._subscribers=[],S!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof R?function(e,t){try{t((function(t){q(e,t)}),(function(t){T(e,t)}))}catch(t){T(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}function H(){var e=void 0;if(void 0!==r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=R}return z.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;void 0===this._state&&n<e;n++)this._eachEntry(t[n],n)},z.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===j){var o=k(e);if(o===O&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===R){var i=new n(S);P(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},z.prototype._settledAt=function(e,t,n){var r=this.promise;void 0===r._state&&(this._remaining--,2===e?T(r,n):this._result[t]=n),0===this._remaining&&M(r,this._result)},z.prototype._willSettleAt=function(e,t){var n=this;I(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},R.all=function(e){return new z(this,e).promise},R.race=function(e){var t=this;return o(e)?new t((function(n,r){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},R.resolve=j,R.reject=function(e){var t=new this(S);return T(t,e),t},R._setScheduler=function(e){c=e},R._setAsap=function(e){u=e},R._asap=u,R.prototype={constructor:R,then:O,catch:function(e){return this.then(null,e)}},H(),R.polyfill=H,R.Promise=R,R},e.exports=o()}).call(this,n(91),n(36))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,s=[],d=!1,l=-1;function f(){d&&u&&(d=!1,u.length?s=u.concat(s):l=-1,s.length&&p())}function p(){if(!d){var e=c(f);d=!0;for(var t=s.length;t;){for(u=s,s=[];++l<t;)u&&u[l].run();l=-1,t=s.length}u=null,d=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new y(e,t)),1!==s.length||d||c(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){},function(e,t,n){(function(t){var n=function(e){"use strict";var n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new x(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===l)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=d(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var l={};function f(){}function p(){}function y(){}var h={};h[i]=function(){return this};var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==n&&r.call(m,i)&&(h=m);var b=y.prototype=f.prototype=Object.create(h);function g(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var n;this._invoke=function(o,i){function a(){return new t((function(n,a){!function n(o,i,a,c){var u=d(e[o],e,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(l).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,c)}))}c(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=d(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function S(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=b.constructor=y,y.constructor=p,p.displayName=u(y,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,c,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},g(_.prototype),_.prototype[a]=function(){return this},e.AsyncIterator=_,e.async=function(n,r,o,i,a){void 0===a&&(a=t);var c=new _(s(n,r,o,i),a);return e.isGeneratorFunction(r)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},g(b),u(b,c,"Generator"),b[i]=function(){return this},b.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}}).call(this,n(24))},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(97);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);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)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0}]);
|
1 |
+
!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=59)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return r.a})),n.d(t,"e",(function(){return i.a})),n.d(t,"c",(function(){return a})),n.d(t,"g",(function(){return c})),n.d(t,"f",(function(){return u.b})),n.d(t,"i",(function(){return u.c})),n.d(t,"b",(function(){return u.a})),n.d(t,"h",(function(){return s})),n.d(t,"j",(function(){return d})),n.d(t,"d",(function(){return l})),n(25),n(26),n(27),n(28);var r=n(15),o=n(16),i=n.n(o);function a(){i()(arguments,(function(e){document.addEventListener("DOMContentLoaded",e)}))}function c(e){for(var t=[],n=e.nextElementSibling;n;)1===n.nodeType&&t.push(n),n=n.nextElementSibling;return t}var u=n(17);function s(e){var t=!0;return i()(e.querySelectorAll("input"),(function(e){e.checkValidity&&!e.checkValidity()&&(t=!1)})),t}function d(e){var t=document.createElement("input");t.type="submit",t.style.display="none",e.appendChild(t),t.click(),t.remove()}function l(e){return e?""===e.value?null:e.value:null}},function(e,t,n){e.exports=n(93)},function(e,t,n){"use strict";(function(e,r){n.d(t,"c",(function(){return f})),n.d(t,"g",(function(){return p})),n.d(t,"e",(function(){return y})),n.d(t,"d",(function(){return h}));var o=n(3),i=n.n(o),a=n(0),c=n(56);function u(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}n.d(t,"a",(function(){return c.a})),n.d(t,"b",(function(){return c.b})),n.d(t,"f",(function(){return c.c})),n.d(t,"h",(function(){return c.d}));var s={card:"#edd-stripe-card-element"},d={cardNumber:"#edd-stripe-card-element",cardExpiry:"#edd-stripe-card-exp-element",cardCvc:"#edd-stripe-card-cvc-element"},l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},edd_stripe_vars.elementsOptions);function f(e,t){var n;return t||(t="true"===edd_stripe_vars.elementsSplitFields?d:s),Object(a.e)(t,(function(t,r){n=function(e,t,n){var r=document.querySelector(t);if(r){l.style=jQuery.extend(!0,{},function(){var e=document.querySelector(".card-name.edd-input");if(!e)return null;var t=window.getComputedStyle(e);if(!document.getElementById("edds-stripe-element-styles")){var n=document.createElement("style");n.innerHTML="\n\t\t\t.edd-stripe-card-element.StripeElement,\n\t\t\t.edd-stripe-card-exp-element.StripeElement,\n\t\t\t.edd-stripe-card-cvc-element.StripeElement {\n\t\t\t\tbackground-color: ".concat(t.getPropertyValue("background-color"),";\n\n\t\t\t\t").concat(["top","right","bottom","left"].map((function(e){return"border-".concat(e,"-color: ").concat(t.getPropertyValue("border-".concat(e,"-color")),";\n\t\t\t\t\t\t\t border-").concat(e,"-width: ").concat(t.getPropertyValue("border-".concat(e,"-width")),";\n\t\t\t\t\t\t\t border-").concat(e,"-style: ").concat(t.getPropertyValue("border-".concat(e,"-style")),";\n\t\t\t\t\t\t\t padding-").concat(e,": ").concat(t.getPropertyValue("padding-".concat(e)),";")})).join(""),"\n\t\t\t\t").concat(["top-right","bottom-right","bottom-left","top-left"].map((function(e){return"border-".concat(e,"-radius: ").concat(t.getPropertyValue("border-top-right-radius"),";")})).join(""),"\n\t\t\t}").replace(/\s/g,""),n.id="edds-stripe-element-styles",document.body.appendChild(n)}return{base:{color:t.getPropertyValue("color"),fontFamily:t.getPropertyValue("font-family"),fontSize:t.getPropertyValue("font-size"),fontWeight:t.getPropertyValue("font-weight"),fontSmoothing:t.getPropertyValue("-webkit-font-smoothing")}}}(),l.style),"cardNumber"===n&&l.hasOwnProperty("hidePostalCode")&&delete l.hidePostalCode,delete l.i18n;var o=e.create(n,l);return o.addEventListener("change",(function(e){!function(e,t){var n=t.closest(".edd-stripe-new-card").querySelector("#edd-stripe-card-errors");if(n.innerHTML="",e.error){var r=e.error,o=r.code,i=r.message,c=window.edd_stripe_vars.elementsOptions.i18n.errorMessages,u=c[o]?c[o]:i;n.appendChild(Object(a.f)(u))}}(e,r),function(e){var t=e.brand;if(e.elementType,"cardNumber"===e.elementType){var n=document.querySelector(".card-type");"unknown"===t?n.className="card-type":n.classList.add(t)}}(e)})).mount(r),o}}(e,t,r)})),window.eddStripe.cardElement=n,n}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#edd-stripe-card-element",n=f(e,{card:t}),r=document.getElementById("edd-card-details-wrap");return r&&(r.style.display="none"),n}function y(t,n){var o=e('input[name="edd_stripe_existing_card"]:checked');return o.length>0&&"new"!==o.val()?r.resolve({id:o.val(),exists:!0}):window.eddStripe.createPaymentMethod("card",n,{billing_details:h(t)}).then((function(e){if(e.error)throw e.error;return{id:e.paymentMethod.id,exists:!1}}))}function h(e){return{name:Object(a.d)(e.querySelector(".card-name")),address:{line1:Object(a.d)(e.querySelector(".card-address")),line2:Object(a.d)(e.querySelector(".card-address-2")),city:Object(a.d)(e.querySelector(".card-city")),state:Object(a.d)(e.querySelector(".card_state")),postal_code:Object(a.d)(e.querySelector(".card-zip")),country:Object(a.d)(e.querySelector("#billing_country"))}}}}).call(this,n(5),n(24))},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){(function(t){function n(e,n,r,o,i,a,c){try{var u=e[a](c),s=u.value}catch(e){return void r(e)}u.done?n(s):t.resolve(s).then(o,i)}e.exports=function(e){return function(){var r=this,o=arguments;return new t((function(t,i){var a=e.apply(r,o);function c(e){n(a,t,i,c,u,"next",e)}function u(e){n(a,t,i,c,u,"throw",e)}c(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0}).call(this,n(24))},function(e,t){e.exports=jQuery},function(e,t,n){"use strict";n.d(t,"d",(function(){return r.d})),n.d(t,"b",(function(){return r.b})),n.d(t,"a",(function(){return r.a})),n.d(t,"h",(function(){return w})),n.d(t,"g",(function(){return I})),n.d(t,"c",(function(){return C})),n.d(t,"f",(function(){return D.c})),n.d(t,"e",(function(){return D.b}));var r=n(12),o=n(3),i=n.n(o),a=n(0);function c(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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(a.a)(e,u({payment_method:t,nonce:document.getElementById("card_update_nonce_"+t).value},n)).fail((function(e){y(t,e)})).done((function(e){y(t,e,"success"),setTimeout((function(){location.reload()}),1500)}))}function d(e){e.preventDefault();var t=e.target.dataset.source,n=document.getElementById(t+"-update-form"),r=document.getElementById(t+"-card-actions"),o="block"===n.style.display;n.style.display=o?"none":"block",r.style.display=o?"block":"none"}function l(e){e.preventDefault();var t=e.target,n={};["address_city","address_country","address_line1","address_line2","address_zip","address_state","exp_month","exp_year"].forEach((function(e){var r=t.querySelector('[name="'+e+'"]');n[e]=Object(a.d)(r)}));var r=t.querySelector('input[type="submit"]');r.disabled=!0,r.value=r.dataset.loading,s("edds_update_payment_method",e.target.dataset.source,n).fail((function(e){r.disabled=!1,r.value=r.dataset.submit}))}function f(e){e.preventDefault();var t=e.target.innerText;e.target.innerHTML='<span class="edd-loading-ajax edd-loading"></span>',s("edds_delete_payment_method",e.target.dataset.source).fail((function(n){e.target.innerText=t}))}function p(e){e.preventDefault();var t=e.target.innerText;e.target.innerHTML='<span class="edd-loading-ajax edd-loading"></span>',s("edds_set_payment_method_default",e.target.dataset.source).fail((function(n){e.target.innerText=t}))}function y(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"error",r=Object(a.f)(t&&t.message?t.message:edd_stripe_vars.generic_error,n);Object(a.e)(document.querySelectorAll(".edd-stripe-alert"),(function(e){e.remove()}));var o=document.getElementById(e+"_card_item");o.insertBefore(r,o.querySelector(".card-details"))}var h=n(2);function v(e){e.preventDefault();var t=document.getElementById("edd-stripe-add-new-card"),n=t.querySelector(".edd-stripe-add-new-card"),r="block"===n.style.display,o=t.querySelector("#edd-stripe-add-new-cancel");if(r&&o!==e.target){var i=document.createEvent("Event");i.initEvent("submit",!0,!0),t.dispatchEvent(i)}else n.style.display=r?"none":"block",o.style.display=r?"none":"inline-block"}function m(e){e.preventDefault();var t,n,r=e.target;if(Object(a.h)(r))try{(n=document.querySelector(".edd-stripe-add-new")).value=n.dataset.loading,n.disabled=!0,(t=r,window.eddStripe.createPaymentMethod("card",window.eddStripe.cardElement,{billing_details:Object(h.d)(t)}).then((function(e){if(e.error)throw e.error;return e.paymentMethod}))).then(b).catch((function(e){_(e),g()}))}catch(e){_(e),g()}else Object(a.j)(r)}function b(e){Object(a.a)("edds_add_payment_method",{payment_method_id:e.id,nonce:document.getElementById("edd-stripe-add-card-nonce").value}).fail(_).done((function(e){_(e,"success"),setTimeout((function(){location.reload()}),1500)}))}function g(){var e=document.querySelector(".edd-stripe-add-new");e.value=e.dataset.submit,e.disabled=!1}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"error",n=Object(a.f)(e&&e.message?e.message:edd_stripe_vars.generic_error,t);Object(a.e)(document.querySelectorAll(".edd-stripe-alert"),(function(e){e.remove()})),document.querySelector(".edd-stripe-add-card-actions").insertBefore(n,document.querySelector(".edd-stripe-add-new"))}function w(){document.getElementById("edd-stripe-manage-cards")&&(Object(a.e)(document.querySelectorAll(".edd-stripe-update-card"),(function(e){e.addEventListener("click",d)})),Object(a.e)(document.querySelectorAll(".edd-stripe-cancel-update"),(function(e){e.addEventListener("click",d)})),Object(a.e)(document.querySelectorAll(".card-update-form"),(function(e){e.addEventListener("submit",l)})),Object(a.e)(document.querySelectorAll(".edd-stripe-delete-card"),(function(e){e.addEventListener("click",f)})),Object(a.e)(document.querySelectorAll(".edd-stripe-default-card"),(function(e){e.addEventListener("click",p)})),Object(h.c)(window.eddStripe.elements()),document.querySelector(".edd-stripe-add-new").addEventListener("click",v),document.getElementById("edd-stripe-add-new-cancel").addEventListener("click",v),document.getElementById("edd-stripe-add-new-card").addEventListener("submit",m),document.getElementById("card_name").required=!0)}var O=n(13),j=n(4),x=n.n(j),S=n(1),E=n.n(S);function k(e){return P.apply(this,arguments)}function P(){return(P=x()(E.a.mark((function e(t){var n,r,o,i,a;return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),n=document.getElementById("edds-update-payment-method"),L(),e.prev=3,e.next=6,Object(h.e)(n,window.eddStripe.cardElement);case 6:return r=e.sent,e.next=9,Object(h.h)(n.dataset.paymentIntent,"payment_method");case 9:return o=e.sent,e.next=12,Object(h.f)(o,{payment_method:r.id});case 12:return i=e.sent,e.next=15,q(i.id);case 15:if(!(a=e.sent).payment){e.next=20;break}window.location.reload(),e.next=21;break;case 20:throw a;case 21:e.next=27;break;case 23:e.prev=23,e.t0=e.catch(3),T(e.t0),M();case 27:case"end":return e.stop()}}),e,null,[[3,23]])})))).apply(this,arguments)}function q(e){return Object(a.a)("edds_complete_payment_authorization",{intent_id:e,"edds-complete-payment-authorization":document.getElementById("edds-complete-payment-authorization").value})}function L(){var e=document.getElementById("edds-update-payment-method-submit");e.value=e.dataset.loading,e.disabled=!0}function M(){var e=document.getElementById("edds-update-payment-method-submit");e.value=e.dataset.submit,e.disabled=!1}function T(e){var t=Object(a.f)(e&&e.message?e.message:edd_stripe_vars.generic_error,"error"),n=document.getElementById("edds-update-payment-method-errors");n.innerHTML="",n.appendChild(t)}function I(){document.getElementById("edds-update-payment-method")&&(Object(h.c)(window.eddStripe.elements()),document.getElementById("edds-update-payment-method").addEventListener("submit",k),Object(O.a)())}var A=n(14);function C(){Object(a.e)(document.querySelectorAll(".edds-buy-now"),(function(e){e.classList.contains("edd-free-download")||e.addEventListener("click",(function(e){var t,n,o=e.currentTarget.dataset,i=o.downloadId,c=o.nonce;if(i){e.preventDefault(),e.stopImmediatePropagation();var u=0,s=1,d=e.currentTarget.closest(".edd_download_purchase_form"),l=d.querySelector(".edd_price_option_".concat(i,":checked"));l&&(u=l.value);var f=d.querySelector('input[name="edd_download_quantity"]');f&&(s=f.value),t={downloadId:i,priceId:u,quantity:s,nonce:c,addToCartForm:d},n=document.querySelector("#edds-buy-now-modal-content"),A.a.open("edds-buy-now",{onShow:function(){var e,o,i,c,u,s;n.innerHTML='<span class="edd-loading-ajax edd-loading"></span>',(e=t.downloadId,o=t.priceId,i=t.quantity,c=t.nonce,u=t.addToCartForm,s={download_id:e,price_id:o,quantity:i,nonce:c,post_data:jQuery(u).serialize()},Object(a.a)("edds_add_to_cart",s)).then((function(e){var t=e.checkout;n.innerHTML=t,window.EDD_Checkout.init();var o=document.querySelector("#edds-buy-now-modal-content .edd_cart_amount");parseFloat(o.dataset.total)>0&&(Object(r.c)(),Object(A.b)())})).fail((function(e){var t=e.message;document.querySelector("#edds-buy-now-modal-content").innerHTML=t}))},onClose:function(){Object(a.a)("edds_empty_cart")}})}}))})),jQuery(document.body).on("edd_checkout_error",(function(){var e=document.querySelector("#edds-buy-now #edd-purchase-button");if(e){var t=edd_stripe_vars.i18n.completePurchase,n=document.querySelector(".edd_cart_amount").dataset,r=n.total,o=n.totalCurrency;"0"!==r&&setTimeout((function(){e.value="".concat(o," - ").concat(t)}),10)}}))}var D=n(20)},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(36))},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(99);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return i}));var r=n(14),o=n(21);function i(){if("1"===edd_scripts.is_checkout){var t=document.querySelector('input[name="edd-gateway"]');t&&"stripe"===t.value&&(Object(o.c)(),Object(r.b)()),e(document.body).on("edd_gateway_loaded",(function(e,t){"stripe"===t&&(Object(o.c)(),Object(r.b)())}))}}n.d(t,"a",(function(){return o.a})),n.d(t,"b",(function(){return o.b})),n.d(t,"c",(function(){return o.c}))}).call(this,n(5))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(0);function o(){i()&&(a(!1),i().addEventListener("change",(function(e){return a(e.target.checked)})));var t=document.querySelectorAll(".edd-stripe-existing-card");if(0!==t.length){Object(r.e)(t,(function(t){return t.addEventListener("change",(function(t){return function(t){var n="new"===t.value,r=document.querySelector(".edd-stripe-new-card"),o=document.querySelector(".edd-stripe-update-billing-address-wrapper");r.style.display=n?"block":"none",o&&(o.style.display=n?"none":"block"),e(".edd-stripe-card-radio-item").removeClass("selected"),e(t).closest(".edd-stripe-card-radio-item").addClass("selected");var c={card_address:"address_line1",card_address_2:"address_line2",card_city:"address_city",card_state:"address_state",card_zip:"address_zip",billing_country:"address_country"};if(n){for(var u in c){if(!c.hasOwnProperty(u))return;var s=document.getElementById(u);s&&(s.value="",s.selected="")}window.EDD_Checkout.recalculate_taxes&&window.EDD_Checkout.recalculate_taxes(),a(!0)}else{var d=[],l=document.getElementById(t.id+"-billing-details");if(!l)return;a(!1),i()&&(i().checked=!1);var f=l.dataset;for(var p in c)if(c.hasOwnProperty(p)){var y=document.getElementById(p);if(y){var h=f[c[p]];if(y.value=h,""!==h&&d.push(h),y.required&&""===h&&(a(!0),i()&&(i().checked=!0),o&&(o.style.display="none")),"billing_country"===p){var v=document.createEvent("Event");v.initEvent("change",!0,!0),y.dispatchEvent(v)}}}e(document).ajaxSuccess((function(e,t,n){if(n&&n.data&&t&&n.data.includes("action=edd_get_shop_states")&&n.data.includes("field_name=card_state")&&t.responseText&&t.responseText.includes("card_state")){var r=document.getElementById("card_state");r&&(r.value=f.address_state,window.EDD_Checkout.recalculate_taxes&&window.EDD_Checkout.recalculate_taxes(r.value))}}));var m=document.querySelector(".edd-stripe-update-billing-address-current");if(m){m.innerText=d.join(", ");var b=f.brand,g=f.last4;document.querySelector(".edd-stripe-update-billing-address-brand").innerHTML=b,document.querySelector(".edd-stripe-update-billing-address-last4").innerHTML=g}}}(t.target)}))}));var n=document.querySelector(".edd-stripe-existing-card:checked");n||((n=document.querySelector(".edd-stripe-existing-card:first-of-type")).checked=!0);var o=document.createEvent("Event");o.initEvent("change",!0,!1),n.dispatchEvent(o)}}function i(){return document.getElementById("edd-stripe-update-billing-address")}function a(e){var t=document.querySelector(".edd-stripe-update-billing-address-wrapper");if(t){var n=Object(r.g)(t),o=document.querySelector(".edd-stripe-update-billing-address-current");n.forEach((function(t){t.style.display=e?"block":"none"})),o&&(o.style.display=e?"none":"block")}}}).call(this,n(5))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return g.a}));var r=n(3),o=n.n(r);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,void 0):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n(61),n(78);var u,s,d,l,f,p=(u=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'],s=function(){function e(t){var n=t.targetModal,r=t.triggers,o=void 0===r?[]:r,i=t.onShow,c=void 0===i?function(){}:i,u=t.onClose,s=void 0===u?function(){}:u,d=t.openTrigger,l=void 0===d?"data-micromodal-trigger":d,f=t.closeTrigger,p=void 0===f?"data-micromodal-close":f,y=t.openClass,h=void 0===y?"is-open":y,v=t.disableScroll,m=void 0!==v&&v,b=t.disableFocus,g=void 0!==b&&b,_=t.awaitCloseAnimation,w=void 0!==_&&_,O=t.awaitOpenAnimation,j=void 0!==O&&O,x=t.debugMode,S=void 0!==x&&x;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modal=document.getElementById(n),this.config={debugMode:S,disableScroll:m,openTrigger:l,closeTrigger:p,openClass:h,onShow:c,onClose:s,awaitCloseAnimation:w,awaitOpenAnimation:j,disableFocus:g},o.length>0&&this.registerTriggers.apply(this,a(o)),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var t,n;return t=e,(n=[{key:"registerTriggers",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.filter(Boolean).forEach((function(t){t.addEventListener("click",(function(t){return e.showModal(t)}))}))}},{key:"showModal",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.activeElement=document.activeElement,this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),this.scrollBehaviour("disable"),this.addEventListeners(),this.config.awaitOpenAnimation){var n=function t(){e.modal.removeEventListener("animationend",t,!1),e.setFocusToFirstNode()};this.modal.addEventListener("animationend",n,!1)}else this.setFocusToFirstNode();this.config.onShow(this.modal,this.activeElement,t)}},{key:"closeModal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.modal;if(this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),this.scrollBehaviour("enable"),this.activeElement&&this.activeElement.focus&&this.activeElement.focus(),this.config.onClose(this.modal,this.activeElement,e),this.config.awaitCloseAnimation){var n=this.config.openClass;this.modal.addEventListener("animationend",(function e(){t.classList.remove(n),t.removeEventListener("animationend",e,!1)}),!1)}else t.classList.remove(this.config.openClass)}},{key:"closeModalById",value:function(e){this.modal=document.getElementById(e),this.modal&&this.closeModal()}},{key:"scrollBehaviour",value:function(e){if(this.config.disableScroll){var t=document.querySelector("body");switch(e){case"enable":Object.assign(t.style,{overflow:""});break;case"disable":Object.assign(t.style,{overflow:"hidden"})}}}},{key:"addEventListeners",value:function(){this.modal.addEventListener("touchstart",this.onClick),this.modal.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown)}},{key:"removeEventListeners",value:function(){this.modal.removeEventListener("touchstart",this.onClick),this.modal.removeEventListener("click",this.onClick),document.removeEventListener("keydown",this.onKeydown)}},{key:"onClick",value:function(e){e.target.hasAttribute(this.config.closeTrigger)&&this.closeModal(e)}},{key:"onKeydown",value:function(e){27===e.keyCode&&this.closeModal(e),9===e.keyCode&&this.retainFocus(e)}},{key:"getFocusableNodes",value:function(){var e=this.modal.querySelectorAll(u);return Array.apply(void 0,a(e))}},{key:"setFocusToFirstNode",value:function(){var e=this;if(!this.config.disableFocus){var t=this.getFocusableNodes();if(0!==t.length){var n=t.filter((function(t){return!t.hasAttribute(e.config.closeTrigger)}));n.length>0&&n[0].focus(),0===n.length&&t[0].focus()}}}},{key:"retainFocus",value:function(e){var t=this.getFocusableNodes();if(0!==t.length)if(t=t.filter((function(e){return null!==e.offsetParent})),this.modal.contains(document.activeElement)){var n=t.indexOf(document.activeElement);e.shiftKey&&0===n&&(t[t.length-1].focus(),e.preventDefault()),!e.shiftKey&&t.length>0&&n===t.length-1&&(t[0].focus(),e.preventDefault())}else t[0].focus()}}])&&i(t.prototype,n),e}(),d=null,l=function(e){if(!document.getElementById(e))return console.warn("MicroModal: ❗Seems like you have missed %c'".concat(e,"'"),"background-color: #f8f9fa;color: #50596c;font-weight: bold;","ID somewhere in your code. Refer example below to resolve it."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<div class="modal" id="'.concat(e,'"></div>')),!1},f=function(e,t){if(function(e){e.length<=0&&(console.warn("MicroModal: ❗Please specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<a href="#" data-micromodal-trigger="my-modal"></a>'))}(e),!t)return!0;for(var n in t)l(n);return!0},{init:function(e){var t=Object.assign({},{openTrigger:"data-micromodal-trigger"},e),n=a(document.querySelectorAll("[".concat(t.openTrigger,"]"))),r=function(e,t){var n=[];return e.forEach((function(e){var r=e.attributes[t].value;void 0===n[r]&&(n[r]=[]),n[r].push(e)})),n}(n,t.openTrigger);if(!0!==t.debugMode||!1!==f(n,r))for(var o in r){var i=r[o];t.targetModal=o,t.triggers=a(i),d=new s(t)}},show:function(e,t){var n=t||{};n.targetModal=e,!0===n.debugMode&&!1===l(e)||(d&&d.removeEventListeners(),(d=new s(n)).showModal())},close:function(e){e?d.closeModalById(e):d.closeModal()}});window.MicroModal=p;var y=p;function h(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 v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m={disableScroll:!0,awaitOpenAnimation:!0,awaitCloseAnimation:!0},b={setup:function(e){var t=v(v({},m),e);y.init(t)},open:function(e,t){var n=v(v({},m),t);y.show(e,n)},close:function(e){y.close(e)}},g=n(13)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s}));var r=n(8),o=n.n(r),i=n(3),a=n.n(i);function c(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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(t,n){var r={type:"POST",dataType:"json",xhrFields:{withCredentials:!0},url:window.edd_scripts&&window.edd_scripts.ajaxurl||window.ajaxurl,data:u({action:t},n)},i=e.Deferred((function(t){t.jqXHR=e.ajax(r).done((function(e){"1"!==e&&1!==e||(e={success:!0}),"object"===o()(e)&&void 0!==o()(e.success)?t[e.success?"resolveWith":"rejectWith"](this,[e.data]):t.rejectWith(this,[e])})).fail((function(){t.rejectWith(this,arguments)}))})),a=i.promise();return a.abort=function(){return i.jqXHR.abort(),this},a}}).call(this,n(5))},function(e,t){var n=/^(?:0|[1-9]\d*)$/;function r(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););return e}var o,i,a=Object.prototype,c=a.hasOwnProperty,u=a.toString,s=a.propertyIsEnumerable,d=(o=Object.keys,i=Object,function(e){return o(i(e))});var l,f=(l=function(e,t){return e&&p(e,t,m)},function(e,t){if(null==e)return e;if(!v(e))return l(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e}),p=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var c=i[++r];if(!1===t(o[c],c,o))break}return e};function y(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||n.test(e))&&e>-1&&e%1==0&&e<t}var h=Array.isArray;function v(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?u.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}function m(e){return v(e)?function(e,t){var n=h(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&v(e)}(e)&&c.call(e,"callee")&&(!s.call(e,"callee")||"[object Arguments]"==u.call(e))}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,o=!!r;for(var i in e)!t&&!c.call(e,i)||o&&("length"==i||y(i,r))||n.push(i);return n}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||a))return d(e);var t,n,r=[];for(var o in Object(e))c.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e)}function b(e){return e}e.exports=function(e,t){return(h(e)?r:f)(e,"function"==typeof t?t:b)}},function(e,t,n){"use strict";(function(e){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"error",n=document.createElement("p");return n.classList.add("edd-alert"),n.classList.add("edd-stripe-alert"),n.style.clear="both","error"===t?n.classList.add("edd-alert-error"):n.classList.add("edd-alert-success"),n.innerHTML=e||edd_stripe_vars.generic_error,n}function o(t){var n=t.errorType,o=t.errorMessage,i=t.errorContainer,a=t.errorContainerReplace,c=void 0===a||a,u=e(i),s=r(o,n);!0===c?u.html(s):u.before(s)}function i(t){e(t).html("")}n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i}))}).call(this,n(5))},function(e,t,n){var r=n(10);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(7),o=n(45),i=n(11),a=n(46),c=n(54),u=n(84),s=o("wks"),d=r.Symbol,l=u?d:d&&d.withoutSetter||a;e.exports=function(e){return i(s,e)||(c&&i(d,e)?s[e]=d[e]:s[e]=l("Symbol."+e)),s[e]}},function(e,t,n){"use strict";n.d(t,"c",(function(){return x})),n.d(t,"b",(function(){return S.a})),n.d(t,"a",(function(){return E}));var r=n(58),o=n.n(r),i=n(3),a=n.n(i),c=n(9),u=n.n(c),s=n(4),d=n.n(s),l=n(1),f=n.n(l),p=n(0),y=(n(2),n(6));function h(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 v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e){var t,n=!1,r=1,o=e.querySelector('[name="download_id"]');t=parseFloat(o.value);var i=e.querySelector(".edd_price_option_".concat(t,":checked"));i&&(n=parseFloat(i.value));var a=e.querySelector('input[name="edd_download_quantity"]');return a&&(r=parseFloat(a.value)),{downloadId:t,priceId:n,quantity:r}}function b(e,t){return g.apply(this,arguments)}function g(){return(g=d()(f.a.mark((function e(t,n){var r,o,i,a,c,s,d;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=m(n),o=r.downloadId,i=r.priceId,a=r.quantity,e.prev=1,e.next=4,Object(p.a)("edds_prb_ajax_get_options",{downloadId:o,priceId:i,quantity:a});case 4:c=e.sent,s=c["display-items"],d=u()(c,["display-items"]),t.update(v({displayItems:s},d)),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(1),Object(p.i)({errorMessage:"",errorContainer:n,errorContainerReplace:!1});case 13:case"end":return e.stop()}}),e,null,[[1,10]])})))).apply(this,arguments)}function _(){return(_=d()(f.a.mark((function e(t,n,r){var o,i,a,c,s,d,l,y,h,b,g;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.dataset.price,i=m(r),a=i.downloadId,c=i.priceId,s=i.quantity,e.prev=2,e.next=5,Object(p.a)("edds_prb_ajax_get_options",{downloadId:a,priceId:c,quantity:s});case 5:d=e.sent,l=d["display-items"],y=u()(d,["display-items"]),h=edd_stripe_vars,b=h.is_zero_decimal,g=parseFloat(o),"false"===b&&(g=Math.round(100*g)),n.update(v(v({displayItems:l.map((function(e){return{label:e.label,amount:g}}))},y),{},{total:{label:y.total.label,amount:g}})),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),Object(p.i)({errorMessage:"",errorContainer:r,errorContainerReplace:!1});case 17:case"end":return e.stop()}}),e,null,[[2,14]])})))).apply(this,arguments)}function w(e,t,n){e.complete("success"),n.classList.remove("loading"),Object(p.i)({errorMessage:t.message,errorContainer:n,errorContainerReplace:!1}),jQuery("a.edd-add-to-cart",n).hide(),jQuery(".edd_download_quantity_wrapper",n).hide(),jQuery(".edd_price_options",n).hide(),jQuery(".edd_go_to_checkout",n).show().removeAttr("data-edd-loading")}function O(){return(O=d()(f.a.mark((function e(t,n,r){var o,i,a,c,u,s,l,h,v,b,g,_,O;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o=m(n),i=o.downloadId,a=o.priceId,c=o.quantity,u=r.paymentMethod,s=r.payerEmail,l=r.payerName,e.next=5,Object(p.a)("edds_prb_ajax_process_checkout",{email:s,name:l,paymentMethod:u,downloadId:i,priceId:a,quantity:c,context:"download",post_data:jQuery(n).serialize()});case 5:h=e.sent,v=h.intent,b=h.intent,g=b.client_secret,_=b.object,r.complete("success"),n.classList.add("loading"),O="setup_intent"===_?"confirmCardSetup":"confirmCardPayment",eddStripe[O](g,{payment_method:u.id},{handleActions:!1}).then((function(e){var t=e.error;if(t)throw t;eddStripe[O](g).then(function(){var e=d()(f.a.mark((function e(t){var o,i,a,c;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.error,e.prev=1,!o){e.next=4;break}throw o;case 4:return e.next=6,Object(y.b)(v);case 6:return i=e.sent,a=i.intent,c=i.nonce,e.next=11,Object(y.a)(a,c);case 11:window.location.replace(edd_stripe_vars.successPageUri),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(1),w(r,e.t0,n);case 17:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t){return e.apply(this,arguments)}}())})).catch((function(e){w(r,e,n)})),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),w(r,e.t0,n);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})))).apply(this,arguments)}function j(e){var t=window.eddStripe;try{var n=E(e.dataset),r=n["display-items"],o=u()(n,["display-items"]),i=e.closest(".edd_download_purchase_form"),a=t.paymentRequest(v({requestPayerEmail:!0,displayItems:r},o)),c=t.elements().create("paymentRequestButton",{paymentRequest:a}),s=document.querySelector("#".concat(e.id));a.canMakePayment().then((function(t){t&&(!0===t.applePay&&"true"===edd_stripe_vars.isTestMode||(s.style.display="block",i.classList.add("edd-prb--is-active"),c.mount("#".concat(e.id," .edds-prb__button")),function(e,t){var n=t.querySelectorAll('.edd_price_options input[type="radio"]');Object(p.e)(n,(function(n){n.addEventListener("change",(function(){return b(e,t)}))}));var r=t.querySelector('input[name="edd_download_quantity"]');r&&r.addEventListener("change",(function(){return b(e,t)})),function(e,t){var n=t.querySelector(".edd-add-to-cart");n&&new MutationObserver((function(n){n.forEach((function(n){var r=n.type,o=n.attributeName,i=n.target;"attributes"===r&&"data-price"===o&&function(e,t,n){_.apply(this,arguments)}(i,e,t)}))})).observe(n,{attributes:!0})}(e,t)}(a,i)))})),a.on("paymentmethod",(function(e){!function(e,t,n){O.apply(this,arguments)}(a,i,e)}))}catch(e){Object(p.i)({errorMessage:e.message,errorContainer:purchaseLink,errorContainerReplace:!1})}}function x(){Object(p.e)(document.querySelectorAll(".edds-prb.edds-prb--download"),j)}var S=n(57);function E(e){for(var t={},n=0,r=Object.entries(e);n<r.length;n++){var i=o()(r[n],2),a=i[0],c=i[1],u=c;try{u=JSON.parse(c)}catch(e){}t[a]=u}return t}},function(e,t,n){"use strict";(function(e){n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return p}));var r=n(4),o=n.n(r),i=n(1),a=n.n(i),c=n(2),u=n(0);function s(){Object(c.c)(window.eddStripe.elements()),e("#edd_purchase_form").off("submit",h),e("#edd_purchase_form").on("submit",h),e(document).off("ajaxSuccess",y),e(document).on("ajaxSuccess",y)}function d(){return(d=o()(a.a.mark((function t(){var n,r,o,i,u,s,d,y,h,b;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=e("#edd_purchase_form").serialize(),t.next=4,Object(c.e)(document.getElementById("edd_purchase_form"),window.eddStripe.cardElement);case 4:return r=t.sent,t.next=7,l(r.id,r.exists);case 7:return o=t.sent,i=o.intent,u=o.nonce,e("#edd-process-checkout-nonce").val(u),t.next=13,Object(c.f)(i,{form_data:n+="&edd-process-checkout-nonce=".concat(u)});case 13:return s=t.sent,t.next=16,f(s);case 16:return d=t.sent,y=d.intent,h=d.nonce,t.next=21,Object(c.a)(y,{},h);case 21:if("succeeded"!==(b=t.sent).status&&("canceled"!==b.status||"abandoned"!==b.cancellation_reason)){t.next=28;break}return t.next=25,p(b,h);case 25:window.location.replace(edd_stripe_vars.successPageUri),t.next=29;break;case 28:window.location.replace(edd_stripe_vars.failurePageUri);case 29:t.next=35;break;case 31:t.prev=31,t.t0=t.catch(0),m(t.t0),v();case 35:case"end":return t.stop()}}),t,null,[[0,31]])})))).apply(this,arguments)}function l(t,n){return Object(u.a)("edds_process_purchase_form",{form_data:e("#edd_purchase_form").serialize(),payment_method_id:t,payment_method_exists:n})}function f(t){var n=e("#edd_purchase_form"),r=n.serialize();if(0===n.length){var o=e("#edd-process-checkout-nonce").val();r="edd-process-checkout-nonce=".concat(o)}return Object(u.a)("edds_create_payment",{form_data:r,intent:t})}function p(t,n){var r=e("#edd_purchase_form"),o=r.serialize();if(0===r.length){var i=e("#edd-process-checkout-nonce").val();o="edd-process-checkout-nonce=".concat(i)}return n&&(o+="&edd-process-checkout-nonce=".concat(n)),Object(u.a)("edds_complete_payment",{form_data:o,intent:t})}function y(e,t,n){if(n&&n.data&&t)return n.data.includes("action=edd_process_checkout")&&n.data.includes("edd-gateway=stripe")&&t.responseText&&"success"===t.responseText.trim()?function(){return d.apply(this,arguments)}():void 0}function h(t){"stripe"===e('input[name="edd-gateway"]').val()&&e(".edd_cart_total .edd_cart_amount").data("total")>0&&(t.preventDefault(),e("#edd_purchase_form #edd_purchase_submit [type=submit]").trigger("click"))}function v(){document.querySelector("#edd_purchase_form #edd_purchase_submit [type=submit]").value=edd_global_vars.complete_purchase,e(".edd-loading-ajax").remove(),e(".edd_errors").remove(),e(".edd-error").hide(),e("#edd-purchase-button").attr("disabled",!1)}function m(t){var n=t.code,r=t.message,o=window.edd_stripe_vars.elementsOptions.i18n.errorMessages;r||(r=edd_stripe_vars.generic_error);var i=n&&o[n]?o[n]:r,a=Object(u.f)(i);e(".edd-stripe-alert").remove(),e(edd_global_vars.checkout_error_anchor).before(a),e(document.body).trigger("edd_checkout_error",[t]),window.console&&t.responseText&&window.console.error(t.responseText)}}).call(this,n(5))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(18),o=n(32),i=n(29);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=n(90).Promise},function(e,t){String.prototype.includes||(String.prototype.includes=function(e,t){"use strict";return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)})},function(e,t){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(Element.prototype.matches.call(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null})},function(e,t){Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r})},function(e,t){[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})}))},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(39),o=n(41);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(22);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(18),o=n(42),i=n(33),a=n(31),c=Object.defineProperty;t.f=r?c:function(e,t,n){if(i(e),t=a(t,!0),i(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(22);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var r=n(7),o=n(23);e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(7),o=n(37).f,i=n(23),a=n(63),c=n(34),u=n(68),s=n(75);e.exports=function(e,t){var n,d,l,f,p,y=e.target,h=e.global,v=e.stat;if(n=h?r:v?r[y]||c(y,{}):(r[y]||{}).prototype)for(d in t){if(f=t[d],l=e.noTargetGet?(p=o(n,d))&&p.value:n[d],!s(h?d:y+(v?".":"#")+d,e.forced)&&void 0!==l){if(typeof f==typeof l)continue;u(f,l)}(e.sham||l&&l.sham)&&i(f,"sham",!0),a(n,d,f,e)}}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(18),o=n(38),i=n(29),a=n(30),c=n(31),u=n(11),s=n(42),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=a(e),t=c(t,!0),s)try{return d(e,t)}catch(e){}if(u(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(10),o=n(40),i="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(18),o=n(10),i=n(62);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(44),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r=n(7),o=n(34),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},function(e,t,n){var r=n(67),o=n(44);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t){e.exports={}},function(e,t,n){var r=n(11),o=n(30),i=n(73).indexOf,a=n(47);e.exports=function(e,t){var n,c=o(e),u=0,s=[];for(n in c)!r(a,n)&&r(c,n)&&s.push(n);for(;t.length>u;)r(c,n=t[u++])&&(~i(s,n)||s.push(n));return s}},function(e,t,n){var r=n(50),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(41);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(10);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t){e.exports={}},function(e,t,n){"use strict";(function(e,r){n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return m}));var o=n(4),i=n.n(o),a=n(3),c=n.n(a),u=n(1),s=n.n(u),d=n(0);function l(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 f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"payment_intent",r=e(window.eddStripe.cardElement._parent).closest("form");return Object(d.a)("edds_get_intent",{intent_id:t,intent_type:n,form_data:r.serialize()}).then((function(e){return e.intent}))}function y(t){var n=e(window.eddStripe.cardElement._parent).closest("form");return Object(d.a)("edds_confirm_intent",{intent_id:t.id,intent_type:t.object,form_data:n.serialize()}).then((function(e){return e.intent}))}function h(t,n,o){var i=e(window.eddStripe.cardElement._parent).closest("form");if("requires_capture"!==t.status)return r.resolve(t);var a=i.serialize();return o&&(a+="&edd-process-checkout-nonce=".concat(o)),Object(d.a)("edds_capture_intent",f({intent_id:t.id,intent_type:t.object,form_data:a},n)).then((function(e){return e.intent}))}function v(t,n){var r=e(window.eddStripe.cardElement._parent).closest("form");return Object(d.a)("edds_update_intent",f({intent_id:t.id,intent_type:t.object,form_data:r.serialize()},n)).then((function(e){return e.intent}))}function m(e,t){return b.apply(this,arguments)}function b(){return(b=i()(s.a.mark((function e(t,n){var r,o,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("requires_confirmation"!==t.status){e.next=7;break}return e.next=3,y(t);case 3:return r=e.sent,e.next=6,m(r);case 6:return e.abrupt("return",e.sent);case 7:if("requires_payment_method"!==t.status&&"requires_source"!==t.status){e.next=14;break}return e.next=10,v(t,n);case 10:return o=e.sent,e.next=13,m(o,n);case 13:return e.abrupt("return",e.sent);case 14:if(!("requires_action"===t.status&&"use_stripe_sdk"===t.next_action.type||"requires_source_action"===t.status&&"use_stripe_sdk"===t.next_action.type)){e.next=18;break}return a="setup_intent"===t.object?"handleCardSetup":"handleCardAction","automatic"===t.confirmation_method&&(a="handleCardPayment"),e.abrupt("return",window.eddStripe[a](t.client_secret).then(function(){var e=i()(s.a.mark((function e(t){var n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.error){e.next=2;break}throw t.error;case 2:return n=t.setupIntent,r=t.paymentIntent,e.next=5,m(n||r);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}}).call(this,n(5),n(24))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return x}));var r,o=n(3),i=n.n(o),a=n(9),c=n.n(a),u=n(4),s=n.n(u),d=n(1),l=n.n(d),f=n(20),p=n(0),y=(n(2),n(6));function h(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 v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(){r=!1;var e=document.getElementById("edd-gateway-option-stripe-prb");if(e){e.remove();var t=document.querySelectorAll(".edd-gateway-option"),n=t[0],o=n.querySelector("input");o.checked=!0,n.classList.add("edd-gateway-option-selected"),edd_load_gateway(o.value),1===t.length&&document.getElementById("edd_payment_mode_select_wrap").remove()}}function b(e){var t=document.getElementById("edds-prb-error-wrap"),n=edd_stripe_vars,r=n.checkout_agree_to_terms,o=n.checkout_agree_to_privacy,i=document.getElementById("edd_agree_to_terms");i&&(!1===i.checked?(e.preventDefault(),Object(p.i)({errorMessage:r,errorContainer:t})):Object(p.b)(t));var a=document.getElementById("edd-agree-to-privacy-policy");a&&!1===a.checked&&(!1===a.checked?(e.preventDefault(),Object(p.i)({errorMessage:o,errorContainer:t})):Object(p.b)(t))}function g(e,t){return _.apply(this,arguments)}function _(){return(_=s()(l.a.mark((function e(t,n){var r,o,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(p.a)("edds_prb_ajax_get_options");case 3:r=e.sent,o=r["display-items"],i=c()(r,["display-items"]),t.update(v({displayItems:o},i)),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),Object(p.i)({errorMessage:"",errorContainer:document.getElementById("edds-prb-checkout"),errorContainerReplace:!1});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function w(e,t,n){e.complete("success");var r=n.querySelector(".edds-prb-spinner");r&&r.parentNode.removeChild(r),n.classList.remove("loading"),Object(p.i)({errorMessage:t.message,errorContainer:document.getElementById("edds-prb-checkout"),errorContainerReplace:!1})}function O(){return(O=s()(l.a.mark((function t(n,r,o){var i,a,c,u,d,f,h,v,m,b;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i=o.paymentMethod,o.payerEmail,a=o.payerName,r.classList.add("loading"),c=document.createElement("span"),["edd-loading-ajax","edd-loading","edds-prb-spinner"].forEach((function(e){return c.classList.add(e)})),r.appendChild(c),t.next=9,Object(p.a)("edds_prb_ajax_process_checkout",{name:a,paymentMethod:i,form_data:e("#edd_purchase_form").serialize()});case 9:u=t.sent,d=u.intent,f=u.intent,h=f.client_secret,v=f.object,m=u.nonce,e("#edd-process-checkout-nonce").val(m),o.complete("success"),b="setup_intent"===v?"confirmCardSetup":"confirmCardPayment",eddStripe[b](h,{payment_method:i.id},{handleActions:!1}).then((function(e){var t=e.error;if(t)throw t;eddStripe[b](h).then(function(){var e=s()(l.a.mark((function e(t){var n,i,a,c;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.error,e.prev=1,!n){e.next=4;break}throw n;case 4:return e.next=6,Object(y.b)(d);case 6:return i=e.sent,a=i.intent,c=i.nonce,e.next=11,Object(y.a)(a,c);case 11:window.location.replace(edd_stripe_vars.successPageUri),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(1),w(o,e.t0,r);case 17:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t){return e.apply(this,arguments)}}())})).catch((function(e){w(o,e,r)})),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(0),w(o,t.t0,r);case 24:case"end":return t.stop()}}),t,null,[[0,21]])})))).apply(this,arguments)}function j(e,t){var n=t.total_plain;!0===r&&0===n&&window.location.reload()}function x(){"1"===edd_scripts.is_checkout&&jQuery(document.body).on("edd_gateway_loaded",(function(e,t){if("stripe-prb"!==t)return r=!1,void function(){var e=window,t=e.eddStripe,n=e.edd_stripe_vars;if(n&&t){var r=n.currency,o=n.country;"false"!==n.checkoutHasPaymentRequest&&t.paymentRequest({country:o,currency:r.toLowerCase(),total:{label:"Easy Digital Downloads",amount:100}}).canMakePayment().then((function(e){null===e&&m(),document.getElementById("edd_checkout_form_wrap").classList.add("edd-prb--is-active")}))}}();var n=document.querySelector(".edds-prb.edds-prb--checkout");n&&(r=!0,function(e){var t=window.eddStripe,n=document.getElementById("edd_checkout_form_wrap");try{var r=Object(f.a)(e.dataset),o=r["display-items"],i=c()(r,["display-items"]),a=t.paymentRequest(v({requestPayerName:!0,displayItems:o},i)),u=t.elements().create("paymentRequestButton",{paymentRequest:a}),s=document.querySelector("#".concat(e.id));a.canMakePayment().then((function(t){return t?!0===t.applePay&&"true"===edd_stripe_vars.isTestMode?m():(s.style.display="block",n.classList.add("edd-prb--is-active"),u.mount("#".concat(e.id," .edds-prb__button")),function(e,t){var n=jQuery(document.body);n.on("edd_quantity_updated",(function(){return g(e,t)})),n.on("edd_discount_applied",(function(){return g(e,t)})),n.on("edd_discount_removed",(function(){return g(e,t)})),e.on("paymentmethod",(function(n){!function(e,t,n){O.apply(this,arguments)}(e,t,n)})),n.on("edd_discount_applied",j)}(a,n),void u.on("click",b)):m()}))}catch(e){Object(p.i)({errorMessage:e.message,errorContainer:document.querySelector("#edds-prb-checkout"),errorContainerReplace:!1})}}(n))}))}}).call(this,n(5))},function(e,t,n){var r=n(94),o=n(95),i=n(96),a=n(98);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.r(t),n(60);var r=n(0),o=n(6),i=n(13),a=n(2);!function(){try{window.eddStripe=new Stripe(edd_stripe_vars.publishable_key),window.eddStripe._plugin={domReady:r.c,apiRequest:r.a,generateNotice:r.f,mountCardElement:a.g,createElementsPaymentForm:a.c,getBillingDetails:a.d,getPaymentMethod:a.e,confirmIntent:a.b,handleIntent:a.f,retrieveIntent:a.h,paymentMethods:i.a},Object(r.c)(o.d,o.h,o.g,o.c,o.f,o.e)}catch(e){alert(e.message)}}()},function(e,t,n){},function(e,t,n){var r=n(35),o=n(76);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){var r=n(7),o=n(22),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(7),o=n(23),i=n(11),a=n(34),c=n(43),u=n(64),s=u.get,d=u.enforce,l=String(String).split("String");(e.exports=function(e,t,n,c){var u=!!c&&!!c.unsafe,s=!!c&&!!c.enumerable,f=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof t||i(n,"name")||o(n,"name",t),d(n).source=l.join("string"==typeof t?t:"")),e!==r?(u?!f&&e[t]&&(s=!0):delete e[t],s?e[t]=n:o(e,t,n)):s?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||c(this)}))},function(e,t,n){var r,o,i,a=n(65),c=n(7),u=n(22),s=n(23),d=n(11),l=n(66),f=n(47),p=c.WeakMap;if(a){var y=new p,h=y.get,v=y.has,m=y.set;r=function(e,t){return m.call(y,e,t),t},o=function(e){return h.call(y,e)||{}},i=function(e){return v.call(y,e)}}else{var b=l("state");f[b]=!0,r=function(e,t){return s(e,b,t),t},o=function(e){return d(e,b)?e[b]:{}},i=function(e){return d(e,b)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(7),o=n(43),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,n){var r=n(45),o=n(46),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t){e.exports=!1},function(e,t,n){var r=n(11),o=n(69),i=n(37),a=n(32);e.exports=function(e,t){for(var n=o(t),c=a.f,u=i.f,s=0;s<n.length;s++){var d=n[s];r(e,d)||c(e,d,u(t,d))}}},function(e,t,n){var r=n(70),o=n(72),i=n(52),a=n(33);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(71),o=n(7),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t,n){var r=n(7);e.exports=r},function(e,t,n){var r=n(48),o=n(51).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(30),o=n(49),i=n(74),a=function(e){return function(t,n,a){var c,u=r(t),s=o(u.length),d=i(a,s);if(e&&n!=n){for(;s>d;)if((c=u[d++])!=c)return!0}else for(;s>d;d++)if((e||d in u)&&u[d]===n)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var r=n(50),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},function(e,t,n){var r=n(10),o=/#|\.prototype\./,i=function(e,t){var n=c[a(e)];return n==s||n!=u&&("function"==typeof t?r(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},c=i.data={},u=i.NATIVE="N",s=i.POLYFILL="P";e.exports=i},function(e,t,n){"use strict";var r=n(18),o=n(10),i=n(77),a=n(52),c=n(38),u=n(53),s=n(39),d=Object.assign,l=Object.defineProperty;e.exports=!d||o((function(){if(r&&1!==d({b:1},d(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=d({},e)[n]||"abcdefghijklmnopqrst"!=i(d({},t)).join("")}))?function(e,t){for(var n=u(e),o=arguments.length,d=1,l=a.f,f=c.f;o>d;)for(var p,y=s(arguments[d++]),h=l?i(y).concat(l(y)):i(y),v=h.length,m=0;v>m;)p=h[m++],r&&!f.call(y,p)||(n[p]=y[p]);return n}:d},function(e,t,n){var r=n(48),o=n(51);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(35),o=n(79);r({target:"Array",stat:!0,forced:!n(89)((function(e){Array.from(e)}))},{from:o})},function(e,t,n){"use strict";var r=n(80),o=n(53),i=n(82),a=n(83),c=n(49),u=n(85),s=n(86);e.exports=function(e){var t,n,d,l,f,p,y=o(e),h="function"==typeof this?this:Array,v=arguments.length,m=v>1?arguments[1]:void 0,b=void 0!==m,g=s(y),_=0;if(b&&(m=r(m,v>2?arguments[2]:void 0,2)),null==g||h==Array&&a(g))for(n=new h(t=c(y.length));t>_;_++)p=b?m(y[_],_):y[_],u(n,_,p);else for(f=(l=g.call(y)).next,n=new h;!(d=f.call(l)).done;_++)p=b?i(l,m,[d.value,_],!0):d.value,u(n,_,p);return n.length=_,n}},function(e,t,n){var r=n(81);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r=n(33);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(19),o=n(55),i=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},function(e,t,n){var r=n(54);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var r=n(31),o=n(32),i=n(29);e.exports=function(e,t,n){var a=r(t);a in e?o.f(e,a,i(0,n)):e[a]=n}},function(e,t,n){var r=n(87),o=n(55),i=n(19)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(88),o=n(40),i=n(19)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){var r={};r[n(19)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(19)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},function(e,t,n){(function(t,r){var o;o=function(){"use strict";function e(e){return"function"==typeof e}var o=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,a=void 0,c=void 0,u=function(e,t){h[i]=e,h[i+1]=t,2===(i+=2)&&(c?c(v):w())},s="undefined"!=typeof window?window:void 0,d=s||{},l=d.MutationObserver||d.WebKitMutationObserver,f="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function y(){var e=setTimeout;return function(){return e(v,1)}}var h=new Array(1e3);function v(){for(var e=0;e<i;e+=2)(0,h[e])(h[e+1]),h[e]=void 0,h[e+1]=void 0;i=0}var m,b,g,_,w=void 0;function O(e,t){var n=arguments,r=this,o=new this.constructor(S);void 0===o[x]&&N(o);var i,a=r._state;return a?(i=n[a-1],u((function(){return B(a,o,i,r._result)}))):I(r,o,e,t),o}function j(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(S);return q(t,e),t}f?w=function(){return t.nextTick(v)}:l?(b=0,g=new l(v),_=document.createTextNode(""),g.observe(_,{characterData:!0}),w=function(){_.data=b=++b%2}):p?((m=new MessageChannel).port1.onmessage=v,w=function(){return m.port2.postMessage(0)}):w=void 0===s?function(){try{var e=n(92);return a=e.runOnLoop||e.runOnContext,function(){a(v)}}catch(e){return y()}}():y();var x=Math.random().toString(36).substring(16);function S(){}var E=new C;function k(e){try{return e.then}catch(e){return E.error=e,E}}function P(t,n,r){n.constructor===t.constructor&&r===O&&n.constructor.resolve===j?function(e,t){1===t._state?M(e,t._result):2===t._state?T(e,t._result):I(t,void 0,(function(t){return q(e,t)}),(function(t){return T(e,t)}))}(t,n):r===E?T(t,E.error):void 0===r?M(t,n):e(r)?function(e,t,n){u((function(e){var r=!1,o=function(n,o,i,a){try{n.call(o,(function(n){r||(r=!0,t!==n?q(e,n):M(e,n))}),(function(t){r||(r=!0,T(e,t))}))}catch(e){return e}}(n,t,0,0,e._label);!r&&o&&(r=!0,T(e,o))}),e)}(t,n,r):M(t,n)}function q(e,t){var n;e===t?T(e,new TypeError("You cannot resolve a promise with itself")):"function"==typeof(n=t)||"object"==typeof n&&null!==n?P(e,t,k(t)):M(e,t)}function L(e){e._onerror&&e._onerror(e._result),A(e)}function M(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&u(A,e))}function T(e,t){void 0===e._state&&(e._state=2,e._result=t,u(L,e))}function I(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=n,o[i+2]=r,0===i&&e._state&&u(A,e)}function A(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?B(n,r,o,i):o(i);e._subscribers.length=0}}function C(){this.error=null}var D=new C;function B(t,n,r,o){var i=e(r),a=void 0,c=void 0,u=void 0,s=void 0;if(i){if((a=function(e,t){try{return e(t)}catch(e){return D.error=e,D}}(r,o))===D?(s=!0,c=a.error,a=null):u=!0,n===a)return void T(n,new TypeError("A promises callback cannot return that same promise."))}else a=o,u=!0;void 0!==n._state||(i&&u?q(n,a):s?T(n,c):1===t?M(n,a):2===t&&T(n,a))}var F=0;function N(e){e[x]=F++,e._state=void 0,e._result=void 0,e._subscribers=[]}function z(e,t){this._instanceConstructor=e,this.promise=new e(S),this.promise[x]||N(this.promise),o(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?M(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&M(this.promise,this._result))):T(this.promise,new Error("Array Methods must be provided an Array"))}function R(e){this[x]=F++,this._result=this._state=void 0,this._subscribers=[],S!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof R?function(e,t){try{t((function(t){q(e,t)}),(function(t){T(e,t)}))}catch(t){T(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}function H(){var e=void 0;if(void 0!==r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=R}return z.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;void 0===this._state&&n<e;n++)this._eachEntry(t[n],n)},z.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===j){var o=k(e);if(o===O&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===R){var i=new n(S);P(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},z.prototype._settledAt=function(e,t,n){var r=this.promise;void 0===r._state&&(this._remaining--,2===e?T(r,n):this._result[t]=n),0===this._remaining&&M(r,this._result)},z.prototype._willSettleAt=function(e,t){var n=this;I(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},R.all=function(e){return new z(this,e).promise},R.race=function(e){var t=this;return o(e)?new t((function(n,r){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},R.resolve=j,R.reject=function(e){var t=new this(S);return T(t,e),t},R._setScheduler=function(e){c=e},R._setAsap=function(e){u=e},R._asap=u,R.prototype={constructor:R,then:O,catch:function(e){return this.then(null,e)}},H(),R.polyfill=H,R.Promise=R,R},e.exports=o()}).call(this,n(91),n(36))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,s=[],d=!1,l=-1;function f(){d&&u&&(d=!1,u.length?s=u.concat(s):l=-1,s.length&&p())}function p(){if(!d){var e=c(f);d=!0;for(var t=s.length;t;){for(u=s,s=[];++l<t;)u&&u[l].run();l=-1,t=s.length}u=null,d=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new y(e,t)),1!==s.length||d||c(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){},function(e,t,n){(function(t){var n=function(e){"use strict";var n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new x(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===l)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=d(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var l={};function f(){}function p(){}function y(){}var h={};h[i]=function(){return this};var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==n&&r.call(m,i)&&(h=m);var b=y.prototype=f.prototype=Object.create(h);function g(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var n;this._invoke=function(o,i){function a(){return new t((function(n,a){!function n(o,i,a,c){var u=d(e[o],e,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(l).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,c)}))}c(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=d(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function S(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=b.constructor=y,y.constructor=p,p.displayName=u(y,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,c,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},g(_.prototype),_.prototype[a]=function(){return this},e.AsyncIterator=_,e.async=function(n,r,o,i,a){void 0===a&&(a=t);var c=new _(s(n,r,o,i),a);return e.isGeneratorFunction(r)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},g(b),u(b,c,"Generator"),b[i]=function(){return this},b.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}}).call(this,n(24))},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(97);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);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)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0}]);
|
includes/gateways/stripe/assets/js/src/frontend/stripe-elements/index.js
CHANGED
@@ -146,9 +146,12 @@ function createAndMountElement( elementsInstance, selector, element ) {
|
|
146 |
return undefined;
|
147 |
}
|
148 |
|
149 |
-
|
150 |
-
|
151 |
-
|
|
|
|
|
|
|
152 |
|
153 |
// Remove hidePostalCode if not using a combined `card` Element.
|
154 |
if ( 'cardNumber' === element && ELEMENTS_OPTIONS.hasOwnProperty( 'hidePostalCode' ) ) {
|
146 |
return undefined;
|
147 |
}
|
148 |
|
149 |
+
ELEMENTS_OPTIONS.style = jQuery.extend(
|
150 |
+
true,
|
151 |
+
{},
|
152 |
+
generateElementStyles(),
|
153 |
+
ELEMENTS_OPTIONS.style
|
154 |
+
);
|
155 |
|
156 |
// Remove hidePostalCode if not using a combined `card` Element.
|
157 |
if ( 'cardNumber' === element && ELEMENTS_OPTIONS.hasOwnProperty( 'hidePostalCode' ) ) {
|
includes/gateways/stripe/edd-stripe.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Easy Digital Downloads - Stripe Pro Payment Gateway
|
4 |
* Plugin URL: https://easydigitaldownloads.com/downloads/stripe-gateway/
|
5 |
* Description: Adds a payment gateway for Stripe.com
|
6 |
-
* Version: 2.8.
|
7 |
* Author: Sandhills Development, LLC
|
8 |
* Author URI: https://sandhillsdev.com
|
9 |
* Text Domain: edds
|
@@ -42,7 +42,7 @@ function edd_stripe_core_bootstrap() {
|
|
42 |
}
|
43 |
|
44 |
if ( ! defined( 'EDD_STRIPE_VERSION' ) ) {
|
45 |
-
define( 'EDD_STRIPE_VERSION', '2.8.
|
46 |
}
|
47 |
|
48 |
if ( ! defined( 'EDD_STRIPE_API_VERSION' ) ) {
|
3 |
* Plugin Name: Easy Digital Downloads - Stripe Pro Payment Gateway
|
4 |
* Plugin URL: https://easydigitaldownloads.com/downloads/stripe-gateway/
|
5 |
* Description: Adds a payment gateway for Stripe.com
|
6 |
+
* Version: 2.8.8
|
7 |
* Author: Sandhills Development, LLC
|
8 |
* Author URI: https://sandhillsdev.com
|
9 |
* Text Domain: edds
|
42 |
}
|
43 |
|
44 |
if ( ! defined( 'EDD_STRIPE_VERSION' ) ) {
|
45 |
+
define( 'EDD_STRIPE_VERSION', '2.8.8' );
|
46 |
}
|
47 |
|
48 |
if ( ! defined( 'EDD_STRIPE_API_VERSION' ) ) {
|
includes/gateways/stripe/includes/admin/settings/stripe-connect.php
CHANGED
@@ -302,7 +302,7 @@ function edds_stripe_connect_account_info_ajax_response() {
|
|
302 |
}
|
303 |
|
304 |
// Nonce validation, show error on fail.
|
305 |
-
if ( ! wp_verify_nonce( $_POST['nonce'], 'edds-stripe-connect-account-information' ) ) {
|
306 |
return wp_send_json_error( $unknown_error );
|
307 |
}
|
308 |
|
302 |
}
|
303 |
|
304 |
// Nonce validation, show error on fail.
|
305 |
+
if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'edds-stripe-connect-account-information' ) ) {
|
306 |
return wp_send_json_error( $unknown_error );
|
307 |
}
|
308 |
|
includes/gateways/stripe/includes/admin/upgrade-functions.php
CHANGED
@@ -66,7 +66,7 @@ function edd_stripe_customer_id_migration() {
|
|
66 |
$total = isset( $_GET['total'] ) ? absint( $_GET['total'] ) : false;
|
67 |
if ( empty( $total ) || $total <= 1 ) {
|
68 |
$total_sql = "SELECT COUNT(user_id) as total_users FROM $wpdb->usermeta WHERE meta_key IN ( '_edd_stripe_customer_id', '_edd_stripe_customer_id_test' )";
|
69 |
-
$results = $wpdb->get_row( $total_sql
|
70 |
$total = $results->total_users;
|
71 |
}
|
72 |
|
66 |
$total = isset( $_GET['total'] ) ? absint( $_GET['total'] ) : false;
|
67 |
if ( empty( $total ) || $total <= 1 ) {
|
68 |
$total_sql = "SELECT COUNT(user_id) as total_users FROM $wpdb->usermeta WHERE meta_key IN ( '_edd_stripe_customer_id', '_edd_stripe_customer_id_test' )";
|
69 |
+
$results = $wpdb->get_row( $total_sql );
|
70 |
$total = $results->total_users;
|
71 |
}
|
72 |
|
includes/gateways/stripe/includes/elements.php
CHANGED
@@ -55,7 +55,7 @@ function edds_get_stripe_elements_options() {
|
|
55 |
$elements_styles = edds_get_stripe_elements_styles();
|
56 |
|
57 |
if ( ! empty( $elements_styles ) ) {
|
58 |
-
$elements_options['style'] = $
|
59 |
}
|
60 |
|
61 |
/**
|
55 |
$elements_styles = edds_get_stripe_elements_styles();
|
56 |
|
57 |
if ( ! empty( $elements_styles ) ) {
|
58 |
+
$elements_options['style'] = $elements_styles;
|
59 |
}
|
60 |
|
61 |
/**
|
includes/gateways/stripe/includes/functions.php
CHANGED
@@ -376,14 +376,20 @@ function edd_stripe_get_customer_key() {
|
|
376 |
}
|
377 |
|
378 |
/**
|
379 |
-
* Determines if the
|
380 |
*
|
381 |
-
* @access
|
382 |
-
* @since
|
383 |
-
* @
|
|
|
|
|
384 |
*/
|
385 |
-
function edds_is_zero_decimal_currency() {
|
386 |
-
|
|
|
|
|
|
|
|
|
387 |
|
388 |
$currencies = array(
|
389 |
'bif',
|
376 |
}
|
377 |
|
378 |
/**
|
379 |
+
* Determines if the provided currency is a zero-decimal currency
|
380 |
*
|
381 |
+
* @access public
|
382 |
+
* @since 1.8.4
|
383 |
+
* @param string $currency Three-letter ISO currency code or an empty string. If empty, the shop's currency is used.
|
384 |
+
* @since 2.8.8 $currency parameter added
|
385 |
+
* @return bool
|
386 |
*/
|
387 |
+
function edds_is_zero_decimal_currency( $currency = '' ) {
|
388 |
+
if ( empty( $currency ) ) {
|
389 |
+
$currency = edd_get_currency();
|
390 |
+
}
|
391 |
+
|
392 |
+
$currency = strtolower( $currency );
|
393 |
|
394 |
$currencies = array(
|
395 |
'bif',
|
includes/gateways/stripe/includes/payment-actions.php
CHANGED
@@ -831,10 +831,6 @@ function edds_create_payment() {
|
|
831 |
// Record the pending payment.
|
832 |
$payment_id = edd_insert_payment( $payment_data );
|
833 |
|
834 |
-
if ( class_exists( 'EDD_Auto_Register' ) ) {
|
835 |
-
remove_action( 'set_logged_in_cookie', 'edds_set_logged_in_cookie_global' );
|
836 |
-
}
|
837 |
-
|
838 |
if ( false === $payment_id ) {
|
839 |
throw new \EDD_Stripe_Gateway_Exception(
|
840 |
esc_html__(
|
@@ -884,7 +880,13 @@ function edds_create_payment() {
|
|
884 |
$edd_customer->update_meta( edd_stripe_get_customer_key(), $intent->customer );
|
885 |
}
|
886 |
|
887 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
888 |
/**
|
889 |
* Allows further processing after a payment is created.
|
890 |
*
|
831 |
// Record the pending payment.
|
832 |
$payment_id = edd_insert_payment( $payment_data );
|
833 |
|
|
|
|
|
|
|
|
|
834 |
if ( false === $payment_id ) {
|
835 |
throw new \EDD_Stripe_Gateway_Exception(
|
836 |
esc_html__(
|
880 |
$edd_customer->update_meta( edd_stripe_get_customer_key(), $intent->customer );
|
881 |
}
|
882 |
|
883 |
+
$saved = $payment->save();
|
884 |
+
|
885 |
+
if ( class_exists( 'EDD_Auto_Register' ) ) {
|
886 |
+
remove_action( 'set_logged_in_cookie', 'edds_set_logged_in_cookie_global' );
|
887 |
+
}
|
888 |
+
|
889 |
+
if ( true === $saved ) {
|
890 |
/**
|
891 |
* Allows further processing after a payment is created.
|
892 |
*
|
includes/gateways/stripe/vendor/composer/InstalledVersions.php
CHANGED
@@ -30,7 +30,7 @@ private static $installed = array (
|
|
30 |
'aliases' =>
|
31 |
array (
|
32 |
),
|
33 |
-
'reference' => '
|
34 |
'name' => 'easy-digital-downloads/edd-stripe',
|
35 |
),
|
36 |
'versions' =>
|
@@ -51,7 +51,7 @@ private static $installed = array (
|
|
51 |
'aliases' =>
|
52 |
array (
|
53 |
),
|
54 |
-
'reference' => '
|
55 |
),
|
56 |
'roundcube/plugin-installer' =>
|
57 |
array (
|
30 |
'aliases' =>
|
31 |
array (
|
32 |
),
|
33 |
+
'reference' => '15351f43939ecb36e4acc5b0cf5477c28f232632',
|
34 |
'name' => 'easy-digital-downloads/edd-stripe',
|
35 |
),
|
36 |
'versions' =>
|
51 |
'aliases' =>
|
52 |
array (
|
53 |
),
|
54 |
+
'reference' => '15351f43939ecb36e4acc5b0cf5477c28f232632',
|
55 |
),
|
56 |
'roundcube/plugin-installer' =>
|
57 |
array (
|
includes/gateways/stripe/vendor/composer/installed.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
9 |
-
'reference' => '
|
10 |
'name' => 'easy-digital-downloads/edd-stripe',
|
11 |
),
|
12 |
'versions' =>
|
@@ -27,7 +27,7 @@
|
|
27 |
'aliases' =>
|
28 |
array (
|
29 |
),
|
30 |
-
'reference' => '
|
31 |
),
|
32 |
'roundcube/plugin-installer' =>
|
33 |
array (
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
9 |
+
'reference' => '15351f43939ecb36e4acc5b0cf5477c28f232632',
|
10 |
'name' => 'easy-digital-downloads/edd-stripe',
|
11 |
),
|
12 |
'versions' =>
|
27 |
'aliases' =>
|
28 |
array (
|
29 |
),
|
30 |
+
'reference' => '15351f43939ecb36e4acc5b0cf5477c28f232632',
|
31 |
),
|
32 |
'roundcube/plugin-installer' =>
|
33 |
array (
|
includes/libraries/class-persistent-dismissible.php
ADDED
@@ -0,0 +1,270 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Sandhills Development Persistent Dismissible Utility
|
4 |
+
*
|
5 |
+
* @package SandhillsDev
|
6 |
+
* @subpackage Utilities
|
7 |
+
*/
|
8 |
+
namespace Sandhills\Utils;
|
9 |
+
|
10 |
+
// Exit if accessed directly
|
11 |
+
defined( 'ABSPATH' ) || exit;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* This class_exists() check avoids a fatal error if this class exists in more
|
15 |
+
* than one included plugin/theme, and should not be removed.
|
16 |
+
*/
|
17 |
+
if ( ! class_exists( 'Sandhills\Utils\Persistent_Dismissible' ) ) :
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Class for encapsulating the logic required to maintain a relationship between
|
21 |
+
* the database, a dismissible UI element with an optional lifespan, and a
|
22 |
+
* user's desire to dismiss that UI element.
|
23 |
+
*
|
24 |
+
* Think of this like a WordPress Transient, but without in-memory cache support
|
25 |
+
* and that uses the `wp_usermeta` database table instead of `wp_options`.
|
26 |
+
*
|
27 |
+
* @version 1.0.0
|
28 |
+
*/
|
29 |
+
class Persistent_Dismissible {
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Get the value of a persistent dismissible.
|
33 |
+
*
|
34 |
+
* @since 1.0.0
|
35 |
+
* @param array $args See parse_args().
|
36 |
+
* @return mixed User meta value on success, false on failure.
|
37 |
+
*/
|
38 |
+
public static function get( $args = array() ) {
|
39 |
+
|
40 |
+
// Parse arguments.
|
41 |
+
$r = self::parse_args( $args );
|
42 |
+
|
43 |
+
// Bail if invalid arguments.
|
44 |
+
if ( ! self::check_args( $r ) ) {
|
45 |
+
return false;
|
46 |
+
}
|
47 |
+
|
48 |
+
// Get prefixed option names.
|
49 |
+
$eol_id = self::get_eol_id( $r );
|
50 |
+
$prefix = self::get_prefix( $r );
|
51 |
+
$prefixed_id = $prefix . $r['id'];
|
52 |
+
$prefixed_eol = $prefix . $eol_id;
|
53 |
+
|
54 |
+
// Get return value & end-of-life.
|
55 |
+
$retval = get_user_meta( $r['user_id'], $prefixed_id, true );
|
56 |
+
$lifespan = get_user_meta( $r['user_id'], $prefixed_eol, true );
|
57 |
+
|
58 |
+
// Prefer false over default return value of get_user_meta()
|
59 |
+
if ( '' === $retval ) {
|
60 |
+
$retval = false;
|
61 |
+
}
|
62 |
+
|
63 |
+
// If end-of-life, delete it. This needs to be inside get() because we
|
64 |
+
// are not relying on WP Cron for garbage collection. This mirrors
|
65 |
+
// behavior found inside of WordPress core.
|
66 |
+
if ( self::is_eol( $lifespan ) ) {
|
67 |
+
delete_user_option( $r['user_id'], $r['id'], $r['global'] );
|
68 |
+
delete_user_option( $r['user_id'], $eol_id, $r['global'] );
|
69 |
+
$retval = false;
|
70 |
+
}
|
71 |
+
|
72 |
+
// Return the value.
|
73 |
+
return $retval;
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Set the value of a persistent dismissible.
|
78 |
+
*
|
79 |
+
* @since 1.0.0
|
80 |
+
* @param array $args See parse_args().
|
81 |
+
* @return int|bool User meta ID if the option didn't exist, true on
|
82 |
+
* successful update, false on failure.
|
83 |
+
*/
|
84 |
+
public static function set( $args = array() ) {
|
85 |
+
|
86 |
+
// Parse arguments.
|
87 |
+
$r = self::parse_args( $args );
|
88 |
+
|
89 |
+
// Bail if invalid arguments.
|
90 |
+
if ( ! self::check_args( $r ) ) {
|
91 |
+
return false;
|
92 |
+
}
|
93 |
+
|
94 |
+
// Get lifespan and prefixed option names.
|
95 |
+
$lifespan = self::get_lifespan( $r );
|
96 |
+
$eol_id = self::get_eol_id( $r );
|
97 |
+
$prefix = self::get_prefix( $r );
|
98 |
+
$prefixed_id = $prefix . $r['id'];
|
99 |
+
$prefixed_eol = $prefix . $eol_id;
|
100 |
+
|
101 |
+
// No dismissible data, so add it.
|
102 |
+
if ( '' === get_user_meta( $r['user_id'], $prefixed_id, true ) ) {
|
103 |
+
|
104 |
+
// Add lifespan.
|
105 |
+
if ( ! empty( $lifespan ) ) {
|
106 |
+
add_user_meta( $r['user_id'], $prefixed_eol, $lifespan, true );
|
107 |
+
}
|
108 |
+
|
109 |
+
// Add dismissible data.
|
110 |
+
$retval = add_user_meta( $r['user_id'], $prefixed_id, $r['value'], true );
|
111 |
+
|
112 |
+
// Dismissible data found in database.
|
113 |
+
} else {
|
114 |
+
|
115 |
+
// Plan to update.
|
116 |
+
$update = true;
|
117 |
+
|
118 |
+
// Dismissible to update has new lifespan.
|
119 |
+
if ( ! empty( $lifespan ) ) {
|
120 |
+
|
121 |
+
// If lifespan is requested but the dismissible has no end-of-life,
|
122 |
+
// delete them both and re-create them, to avoid race conditions.
|
123 |
+
if ( '' === get_user_meta( $r['user_id'], $prefixed_eol, true ) ) {
|
124 |
+
delete_user_option( $r['user_id'], $r['id'], $r['global'] );
|
125 |
+
add_user_meta( $r['user_id'], $prefixed_eol, $lifespan, true );
|
126 |
+
$retval = add_user_meta( $r['user_id'], $prefixed_id, $r['value'], true );
|
127 |
+
$update = false;
|
128 |
+
|
129 |
+
// Update the lifespan.
|
130 |
+
} else {
|
131 |
+
update_user_option( $r['user_id'], $eol_id, $lifespan, $r['global'] );
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
// Update the dismissible value.
|
136 |
+
if ( ! empty( $update ) ) {
|
137 |
+
$retval = update_user_option( $r['user_id'], $r['id'], $r['value'], $r['global'] );
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
// Return the value.
|
142 |
+
return $retval;
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Delete a persistent dismissible.
|
147 |
+
*
|
148 |
+
* @since 1.0.0
|
149 |
+
* @param array $args See parse_args().
|
150 |
+
* @return bool True on success, false on failure.
|
151 |
+
*/
|
152 |
+
public static function delete( $args = array() ) {
|
153 |
+
|
154 |
+
// Parse arguments.
|
155 |
+
$r = self::parse_args( $args );
|
156 |
+
|
157 |
+
// Bail if invalid arguments.
|
158 |
+
if ( ! self::check_args( $r ) ) {
|
159 |
+
return false;
|
160 |
+
}
|
161 |
+
|
162 |
+
// Get the end-of-life ID.
|
163 |
+
$eol_id = self::get_eol_id( $r );
|
164 |
+
|
165 |
+
// Delete.
|
166 |
+
delete_user_option( $r['user_id'], $r['id'], $r['global'] );
|
167 |
+
delete_user_option( $r['user_id'], $eol_id, $r['global'] );
|
168 |
+
|
169 |
+
// Success.
|
170 |
+
return true;
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Parse array of key/value arguments.
|
175 |
+
*
|
176 |
+
* Used by get(), set(), and delete(), to ensure default arguments are set.
|
177 |
+
*
|
178 |
+
* @since 1.0.0
|
179 |
+
* @param array|string $args {
|
180 |
+
* Array or string of arguments to identify the persistent dismissible.
|
181 |
+
*
|
182 |
+
* @type string $id Required. ID of the persistent dismissible.
|
183 |
+
* @type string $user_id Optional. User ID. Default to current user ID.
|
184 |
+
* @type int|string $value Optional. Value to store. Default to true.
|
185 |
+
* @type int|string $life Optional. Lifespan. Default to 0 (infinite)
|
186 |
+
* @type bool $global Optional. Multisite, all sites. Default true.
|
187 |
+
* }
|
188 |
+
* @return array
|
189 |
+
*/
|
190 |
+
private static function parse_args( $args = array() ) {
|
191 |
+
return wp_parse_args( $args, array(
|
192 |
+
'id' => '',
|
193 |
+
'user_id' => get_current_user_id(),
|
194 |
+
'value' => true,
|
195 |
+
'life' => 0,
|
196 |
+
'global' => true,
|
197 |
+
) );
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Check that required arguments exist.
|
202 |
+
*
|
203 |
+
* @since 1.0.0
|
204 |
+
* @param array $args See parse_args().
|
205 |
+
* @return bool True on success, false on failure.
|
206 |
+
*/
|
207 |
+
private static function check_args( $args = array() ) {
|
208 |
+
return ! empty( $args['id'] ) && ! empty( $args['user_id'] );
|
209 |
+
}
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Get the string used to prefix user meta for non-global dismissibles.
|
213 |
+
*
|
214 |
+
* @since 1.0.0
|
215 |
+
* @global WPDB $wpdb
|
216 |
+
* @param array $args See parse_args().
|
217 |
+
* @return string Maybe includes the blog prefix.
|
218 |
+
*/
|
219 |
+
private static function get_prefix( $args = array() ) {
|
220 |
+
global $wpdb;
|
221 |
+
|
222 |
+
// Default value
|
223 |
+
$retval = '';
|
224 |
+
|
225 |
+
// Maybe append the blog prefix for non-global dismissibles
|
226 |
+
if ( empty( $args['global'] ) ) {
|
227 |
+
$retval = $wpdb->get_blog_prefix();
|
228 |
+
}
|
229 |
+
|
230 |
+
// Return
|
231 |
+
return $retval;
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Get the lifespan for a persistent dismissible.
|
236 |
+
*
|
237 |
+
* @since 1.0.0
|
238 |
+
* @param array $args See parse_args().
|
239 |
+
* @return int
|
240 |
+
*/
|
241 |
+
private static function get_lifespan( $args = array() ) {
|
242 |
+
return ! empty( $args['life'] ) && is_numeric( $args['life'] )
|
243 |
+
? time() + absint( $args['life'] )
|
244 |
+
: 0;
|
245 |
+
}
|
246 |
+
|
247 |
+
/**
|
248 |
+
* Get the string used to identify the ID for storing the end-of-life.
|
249 |
+
*
|
250 |
+
* @since 1.0.0
|
251 |
+
* @param array $args See parse_args().
|
252 |
+
* @return string '_eol' appended to the ID (for its end-of-life timestamp).
|
253 |
+
*/
|
254 |
+
private static function get_eol_id( $args = array() ) {
|
255 |
+
return sanitize_key( $args['id'] ) . '_eol';
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Check whether a timestamp is beyond the current time.
|
260 |
+
*
|
261 |
+
* @since 1.0.0
|
262 |
+
* @param int $timestamp A Unix timestamp. Default 0.
|
263 |
+
* @return bool True if end-of-life, false if not.
|
264 |
+
*/
|
265 |
+
private static function is_eol( $timestamp = 0 ) {
|
266 |
+
return is_numeric( $timestamp ) && ( $timestamp < time() );
|
267 |
+
}
|
268 |
+
}
|
269 |
+
|
270 |
+
endif;
|
includes/plugin-compatibility.php
CHANGED
@@ -51,7 +51,7 @@ add_action( 'template_redirect', 'edd_disable_jetpack_og_on_checkout' );
|
|
51 |
* @return bool $caching True if caching plugin is enabled, false otherwise
|
52 |
*/
|
53 |
function edd_is_caching_plugin_active() {
|
54 |
-
$caching = ( function_exists( 'wpsupercache_site_admin' ) || defined( 'W3TC' ) || function_exists( 'rocket_init' ) );
|
55 |
return apply_filters( 'edd_is_caching_plugin_active', $caching );
|
56 |
}
|
57 |
|
@@ -186,4 +186,4 @@ function edd_rsssl_remove_mixed_content_filter() {
|
|
186 |
remove_action( 'shutdown', array( RSSSL()->rsssl_mixed_content_fixer, 'end_buffer' ) );
|
187 |
}
|
188 |
}
|
189 |
-
add_action( 'plugins_loaded', 'edd_rsssl_remove_mixed_content_filter', 999 );
|
51 |
* @return bool $caching True if caching plugin is enabled, false otherwise
|
52 |
*/
|
53 |
function edd_is_caching_plugin_active() {
|
54 |
+
$caching = ( function_exists( 'wpsupercache_site_admin' ) || defined( 'W3TC' ) || function_exists( 'rocket_init' ) ) || defined( 'WPHB_VERSION' );
|
55 |
return apply_filters( 'edd_is_caching_plugin_active', $caching );
|
56 |
}
|
57 |
|
186 |
remove_action( 'shutdown', array( RSSSL()->rsssl_mixed_content_fixer, 'end_buffer' ) );
|
187 |
}
|
188 |
}
|
189 |
+
add_action( 'plugins_loaded', 'edd_rsssl_remove_mixed_content_filter', 999 );
|
languages/easy-digital-downloads.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Easy Digital Downloads package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Easy Digital Downloads 2.10.
|
6 |
"Report-Msgid-Bugs-To: https://easydigitaldownloads.com/\n"
|
7 |
-
"POT-Creation-Date: 2021-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -88,17 +88,17 @@ msgstr ""
|
|
88 |
#: includes/admin/upgrades/upgrade-functions.php:901
|
89 |
#: includes/admin/upgrades/upgrade-functions.php:1029
|
90 |
#: includes/admin/upgrades/upgrade-functions.php:1114
|
91 |
-
#: includes/api/class-edd-api.php:
|
92 |
-
#: includes/api/class-edd-api.php:
|
93 |
#: includes/cart/class-edd-cart.php:1433 includes/cart/class-edd-cart.php:1447
|
94 |
-
#: includes/class-edd-license-handler.php:
|
95 |
#: includes/deprecated-functions.php:517 includes/deprecated-functions.php:532
|
96 |
#: includes/deprecated-functions.php:542 includes/download-functions.php:1277
|
97 |
#: includes/emails/actions.php:53 includes/emails/template.php:243
|
98 |
#: includes/error-tracking.php:40 includes/gateways/functions.php:232
|
99 |
#: includes/gateways/manual.php:33 includes/gateways/paypal-standard.php:168
|
100 |
#: includes/gateways/stripe/includes/admin/upgrade-functions.php:57
|
101 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
102 |
#: includes/process-download.php:303 includes/process-download.php:894
|
103 |
#: includes/query-filters.php:48 includes/user-functions.php:895
|
104 |
#: includes/user-functions.php:920 includes/user-functions.php:973
|
@@ -615,8 +615,8 @@ msgstr ""
|
|
615 |
#: includes/admin/import/import-functions.php:31
|
616 |
#: includes/admin/import/import-functions.php:113
|
617 |
#: includes/admin/reporting/export/export-actions.php:23
|
618 |
-
#: includes/api/class-edd-api.php:
|
619 |
-
#: includes/class-edd-license-handler.php:
|
620 |
msgid "Nonce verification failed"
|
621 |
msgstr ""
|
622 |
|
@@ -2544,6 +2544,47 @@ msgstr ""
|
|
2544 |
msgid "General Settings"
|
2545 |
msgstr ""
|
2546 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2547 |
#: includes/admin/reporting/class-api-requests-logs-list-table.php:87
|
2548 |
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:151
|
2549 |
#: includes/admin/reporting/class-gateway-error-logs-list-table.php:126
|
@@ -5376,43 +5417,43 @@ msgstr ""
|
|
5376 |
msgid "No discounts found!"
|
5377 |
msgstr ""
|
5378 |
|
5379 |
-
#: includes/api/class-edd-api.php:
|
5380 |
msgid "Discount %s not found!"
|
5381 |
msgstr ""
|
5382 |
|
5383 |
-
#: includes/api/class-edd-api.php:
|
5384 |
msgid "No download logs found!"
|
5385 |
msgstr ""
|
5386 |
|
5387 |
-
#: includes/api/class-edd-api.php:
|
5388 |
msgid "Easy Digital Downloads API Keys"
|
5389 |
msgstr ""
|
5390 |
|
5391 |
-
#: includes/api/class-edd-api.php:
|
5392 |
msgid "Generate API Key"
|
5393 |
msgstr ""
|
5394 |
|
5395 |
-
#: includes/api/class-edd-api.php:
|
5396 |
msgid "Public key:"
|
5397 |
msgstr ""
|
5398 |
|
5399 |
-
#: includes/api/class-edd-api.php:
|
5400 |
msgid "Secret key:"
|
5401 |
msgstr ""
|
5402 |
|
5403 |
-
#: includes/api/class-edd-api.php:
|
5404 |
msgid "Token:"
|
5405 |
msgstr ""
|
5406 |
|
5407 |
-
#: includes/api/class-edd-api.php:
|
5408 |
msgid "Revoke API Keys"
|
5409 |
msgstr ""
|
5410 |
|
5411 |
-
#: includes/api/class-edd-api.php:
|
5412 |
msgid "User ID Required"
|
5413 |
msgstr ""
|
5414 |
|
5415 |
-
#: includes/api/class-edd-api.php:
|
5416 |
msgid "You do not have permission to %s API keys for this user"
|
5417 |
msgstr ""
|
5418 |
|
@@ -6135,24 +6176,24 @@ msgstr ""
|
|
6135 |
msgid "Enter username"
|
6136 |
msgstr ""
|
6137 |
|
6138 |
-
#: includes/class-edd-license-handler.php:
|
6139 |
msgid "%1$s"
|
6140 |
msgstr ""
|
6141 |
|
6142 |
-
#: includes/class-edd-license-handler.php:
|
6143 |
msgid ""
|
6144 |
"Enter your extension license keys here to receive updates for purchased "
|
6145 |
"extensions. If your license key has expired, please <a href=\"%s\" "
|
6146 |
"target=\"_blank\">renew your license</a>."
|
6147 |
msgstr ""
|
6148 |
|
6149 |
-
#: includes/class-edd-license-handler.php:
|
6150 |
msgid ""
|
6151 |
"You have invalid or expired license keys for Easy Digital Downloads. Please "
|
6152 |
"go to the <a href=\"%s\">Licenses page</a> to correct this issue."
|
6153 |
msgstr ""
|
6154 |
|
6155 |
-
#: includes/class-edd-license-handler.php:
|
6156 |
msgid "Enter valid license key for automatic updates."
|
6157 |
msgstr ""
|
6158 |
|
@@ -7767,11 +7808,11 @@ msgid ""
|
|
7767 |
"be completed. Please click the link below to take finalize your purchase"
|
7768 |
msgstr ""
|
7769 |
|
7770 |
-
#: includes/gateways/stripe/includes/functions.php:
|
7771 |
msgid "Invalid order ID."
|
7772 |
msgstr ""
|
7773 |
|
7774 |
-
#: includes/gateways/stripe/includes/functions.php:
|
7775 |
#. translators: %1$s the amount refunded; %2$s Stripe Refund ID
|
7776 |
msgid "%1$s refunded in Stripe. Refund ID %2$s"
|
7777 |
msgstr ""
|
@@ -7908,8 +7949,8 @@ msgstr ""
|
|
7908 |
#: includes/gateways/stripe/includes/payment-actions.php:537
|
7909 |
#: includes/gateways/stripe/includes/payment-actions.php:625
|
7910 |
#: includes/gateways/stripe/includes/payment-actions.php:712
|
7911 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
7912 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
7913 |
msgid "Stripe Error"
|
7914 |
msgstr ""
|
7915 |
|
@@ -7931,26 +7972,26 @@ msgstr ""
|
|
7931 |
#: includes/gateways/stripe/includes/payment-actions.php:776
|
7932 |
#: includes/gateways/stripe/includes/payment-actions.php:788
|
7933 |
#: includes/gateways/stripe/includes/payment-actions.php:805
|
7934 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
7935 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
7936 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
7937 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
7938 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
7939 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
7940 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
7941 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
7942 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
7943 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
7944 |
msgid ""
|
7945 |
"An error occurred, but your payment may have gone through. Please contact "
|
7946 |
"the site administrator."
|
7947 |
msgstr ""
|
7948 |
|
7949 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
7950 |
msgid "Unable to create payment."
|
7951 |
msgstr ""
|
7952 |
|
7953 |
-
#: includes/gateways/stripe/includes/payment-actions.php:
|
7954 |
msgid "Charge not refunded in Stripe, as checkbox was not selected."
|
7955 |
msgstr ""
|
7956 |
|
@@ -9627,7 +9668,7 @@ msgstr ""
|
|
9627 |
msgid "Number of items in cart"
|
9628 |
msgstr ""
|
9629 |
|
9630 |
-
#: tests/bootstrap.php:
|
9631 |
msgid "HTTP Requests disabled for unit tests"
|
9632 |
msgstr ""
|
9633 |
|
2 |
# This file is distributed under the same license as the Easy Digital Downloads package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Easy Digital Downloads 2.10.6\n"
|
6 |
"Report-Msgid-Bugs-To: https://easydigitaldownloads.com/\n"
|
7 |
+
"POT-Creation-Date: 2021-06-21 13:06:51+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
88 |
#: includes/admin/upgrades/upgrade-functions.php:901
|
89 |
#: includes/admin/upgrades/upgrade-functions.php:1029
|
90 |
#: includes/admin/upgrades/upgrade-functions.php:1114
|
91 |
+
#: includes/api/class-edd-api.php:1976 includes/api/class-edd-api.php:1981
|
92 |
+
#: includes/api/class-edd-api.php:1993 includes/api/class-edd-api.php:1995
|
93 |
#: includes/cart/class-edd-cart.php:1433 includes/cart/class-edd-cart.php:1447
|
94 |
+
#: includes/class-edd-license-handler.php:382
|
95 |
#: includes/deprecated-functions.php:517 includes/deprecated-functions.php:532
|
96 |
#: includes/deprecated-functions.php:542 includes/download-functions.php:1277
|
97 |
#: includes/emails/actions.php:53 includes/emails/template.php:243
|
98 |
#: includes/error-tracking.php:40 includes/gateways/functions.php:232
|
99 |
#: includes/gateways/manual.php:33 includes/gateways/paypal-standard.php:168
|
100 |
#: includes/gateways/stripe/includes/admin/upgrade-functions.php:57
|
101 |
+
#: includes/gateways/stripe/includes/payment-actions.php:1403
|
102 |
#: includes/process-download.php:303 includes/process-download.php:894
|
103 |
#: includes/query-filters.php:48 includes/user-functions.php:895
|
104 |
#: includes/user-functions.php:920 includes/user-functions.php:973
|
615 |
#: includes/admin/import/import-functions.php:31
|
616 |
#: includes/admin/import/import-functions.php:113
|
617 |
#: includes/admin/reporting/export/export-actions.php:23
|
618 |
+
#: includes/api/class-edd-api.php:1976
|
619 |
+
#: includes/class-edd-license-handler.php:382
|
620 |
msgid "Nonce verification failed"
|
621 |
msgstr ""
|
622 |
|
2544 |
msgid "General Settings"
|
2545 |
msgstr ""
|
2546 |
|
2547 |
+
#: includes/admin/promos/class-promo-handler.php:109
|
2548 |
+
#: includes/admin/promos/class-promo-handler.php:117
|
2549 |
+
msgid "You do not have permission to perform this action."
|
2550 |
+
msgstr ""
|
2551 |
+
|
2552 |
+
#: includes/admin/promos/class-promo-handler.php:113
|
2553 |
+
msgid "Missing notice ID."
|
2554 |
+
msgstr ""
|
2555 |
+
|
2556 |
+
#: includes/admin/promos/notices/abstract-notice.php:108
|
2557 |
+
msgid "Dismiss notice"
|
2558 |
+
msgstr ""
|
2559 |
+
|
2560 |
+
#: includes/admin/promos/notices/class-license-upgrade-notice.php:154
|
2561 |
+
#. Translators: %1$s opening anchor tag; %2$s closing anchor tag
|
2562 |
+
msgid ""
|
2563 |
+
"You are using the free version of Easy Digital Downloads. %1$sPurchase a "
|
2564 |
+
"pass%2$s to get email marketing tools and recurring payments."
|
2565 |
+
msgstr ""
|
2566 |
+
|
2567 |
+
#: includes/admin/promos/notices/class-license-upgrade-notice.php:164
|
2568 |
+
#. Translators: %1$s opening anchor tag; %2$s closing anchor tag
|
2569 |
+
msgid ""
|
2570 |
+
"For access to additional Easy Digital Downloads extensions to grow your "
|
2571 |
+
"store, consider %1$spurchasing a pass%2$s."
|
2572 |
+
msgstr ""
|
2573 |
+
|
2574 |
+
#: includes/admin/promos/notices/class-license-upgrade-notice.php:174
|
2575 |
+
#. Translators: %1$s opening anchor tag; %2$s closing anchor tag
|
2576 |
+
msgid ""
|
2577 |
+
"You are using Easy Digital Downloads with a Personal Pass. Consider "
|
2578 |
+
"%1$supgrading%2$s to get recurring payments and more."
|
2579 |
+
msgstr ""
|
2580 |
+
|
2581 |
+
#: includes/admin/promos/notices/class-license-upgrade-notice.php:184
|
2582 |
+
#. Translators: %1$s opening anchor tag; %2$s closing anchor tag
|
2583 |
+
msgid ""
|
2584 |
+
"Grow your business and make more money with affiliate marketing. %1$sGet "
|
2585 |
+
"AffiliateWP%2$s"
|
2586 |
+
msgstr ""
|
2587 |
+
|
2588 |
#: includes/admin/reporting/class-api-requests-logs-list-table.php:87
|
2589 |
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:151
|
2590 |
#: includes/admin/reporting/class-gateway-error-logs-list-table.php:126
|
5417 |
msgid "No discounts found!"
|
5418 |
msgstr ""
|
5419 |
|
5420 |
+
#: includes/api/class-edd-api.php:1613
|
5421 |
msgid "Discount %s not found!"
|
5422 |
msgstr ""
|
5423 |
|
5424 |
+
#: includes/api/class-edd-api.php:1685
|
5425 |
msgid "No download logs found!"
|
5426 |
msgstr ""
|
5427 |
|
5428 |
+
#: includes/api/class-edd-api.php:1941 includes/user-functions.php:1072
|
5429 |
msgid "Easy Digital Downloads API Keys"
|
5430 |
msgstr ""
|
5431 |
|
5432 |
+
#: includes/api/class-edd-api.php:1950 includes/user-functions.php:1077
|
5433 |
msgid "Generate API Key"
|
5434 |
msgstr ""
|
5435 |
|
5436 |
+
#: includes/api/class-edd-api.php:1952 includes/user-functions.php:1079
|
5437 |
msgid "Public key:"
|
5438 |
msgstr ""
|
5439 |
|
5440 |
+
#: includes/api/class-edd-api.php:1953 includes/user-functions.php:1080
|
5441 |
msgid "Secret key:"
|
5442 |
msgstr ""
|
5443 |
|
5444 |
+
#: includes/api/class-edd-api.php:1954 includes/user-functions.php:1081
|
5445 |
msgid "Token:"
|
5446 |
msgstr ""
|
5447 |
|
5448 |
+
#: includes/api/class-edd-api.php:1956 includes/user-functions.php:1083
|
5449 |
msgid "Revoke API Keys"
|
5450 |
msgstr ""
|
5451 |
|
5452 |
+
#: includes/api/class-edd-api.php:1981
|
5453 |
msgid "User ID Required"
|
5454 |
msgstr ""
|
5455 |
|
5456 |
+
#: includes/api/class-edd-api.php:1993 includes/api/class-edd-api.php:1995
|
5457 |
msgid "You do not have permission to %s API keys for this user"
|
5458 |
msgstr ""
|
5459 |
|
6176 |
msgid "Enter username"
|
6177 |
msgstr ""
|
6178 |
|
6179 |
+
#: includes/class-edd-license-handler.php:190
|
6180 |
msgid "%1$s"
|
6181 |
msgstr ""
|
6182 |
|
6183 |
+
#: includes/class-edd-license-handler.php:222
|
6184 |
msgid ""
|
6185 |
"Enter your extension license keys here to receive updates for purchased "
|
6186 |
"extensions. If your license key has expired, please <a href=\"%s\" "
|
6187 |
"target=\"_blank\">renew your license</a>."
|
6188 |
msgstr ""
|
6189 |
|
6190 |
+
#: includes/class-edd-license-handler.php:509
|
6191 |
msgid ""
|
6192 |
"You have invalid or expired license keys for Easy Digital Downloads. Please "
|
6193 |
"go to the <a href=\"%s\">Licenses page</a> to correct this issue."
|
6194 |
msgstr ""
|
6195 |
|
6196 |
+
#: includes/class-edd-license-handler.php:547
|
6197 |
msgid "Enter valid license key for automatic updates."
|
6198 |
msgstr ""
|
6199 |
|
7808 |
"be completed. Please click the link below to take finalize your purchase"
|
7809 |
msgstr ""
|
7810 |
|
7811 |
+
#: includes/gateways/stripe/includes/functions.php:577
|
7812 |
msgid "Invalid order ID."
|
7813 |
msgstr ""
|
7814 |
|
7815 |
+
#: includes/gateways/stripe/includes/functions.php:645
|
7816 |
#. translators: %1$s the amount refunded; %2$s Stripe Refund ID
|
7817 |
msgid "%1$s refunded in Stripe. Refund ID %2$s"
|
7818 |
msgstr ""
|
7949 |
#: includes/gateways/stripe/includes/payment-actions.php:537
|
7950 |
#: includes/gateways/stripe/includes/payment-actions.php:625
|
7951 |
#: includes/gateways/stripe/includes/payment-actions.php:712
|
7952 |
+
#: includes/gateways/stripe/includes/payment-actions.php:923
|
7953 |
+
#: includes/gateways/stripe/includes/payment-actions.php:1066
|
7954 |
msgid "Stripe Error"
|
7955 |
msgstr ""
|
7956 |
|
7972 |
#: includes/gateways/stripe/includes/payment-actions.php:776
|
7973 |
#: includes/gateways/stripe/includes/payment-actions.php:788
|
7974 |
#: includes/gateways/stripe/includes/payment-actions.php:805
|
7975 |
+
#: includes/gateways/stripe/includes/payment-actions.php:836
|
7976 |
+
#: includes/gateways/stripe/includes/payment-actions.php:957
|
7977 |
+
#: includes/gateways/stripe/includes/payment-actions.php:974
|
7978 |
+
#: includes/gateways/stripe/includes/payment-actions.php:984
|
7979 |
+
#: includes/gateways/stripe/includes/payment-actions.php:1003
|
7980 |
+
#: includes/gateways/stripe/includes/payment-actions.php:1051
|
7981 |
+
#: includes/gateways/stripe/includes/payment-actions.php:1097
|
7982 |
+
#: includes/gateways/stripe/includes/payment-actions.php:1113
|
7983 |
+
#: includes/gateways/stripe/includes/payment-actions.php:1126
|
7984 |
+
#: includes/gateways/stripe/includes/payment-actions.php:1160
|
7985 |
msgid ""
|
7986 |
"An error occurred, but your payment may have gone through. Please contact "
|
7987 |
"the site administrator."
|
7988 |
msgstr ""
|
7989 |
|
7990 |
+
#: includes/gateways/stripe/includes/payment-actions.php:908
|
7991 |
msgid "Unable to create payment."
|
7992 |
msgstr ""
|
7993 |
|
7994 |
+
#: includes/gateways/stripe/includes/payment-actions.php:1445
|
7995 |
msgid "Charge not refunded in Stripe, as checkbox was not selected."
|
7996 |
msgstr ""
|
7997 |
|
9668 |
msgid "Number of items in cart"
|
9669 |
msgstr ""
|
9670 |
|
9671 |
+
#: tests/bootstrap.php:40
|
9672 |
msgid "HTTP Requests disabled for unit tests"
|
9673 |
msgstr ""
|
9674 |
|
readme.txt
CHANGED
@@ -3,11 +3,11 @@ Author URI: https://easydigitaldownloads.com
|
|
3 |
Plugin URI: https://easydigitaldownloads.com
|
4 |
Contributors: easydigitaldownloads, mordauk, sunnyratilal, chriscct7, section214, sumobi, sdavis2702, cklosows, mindctrl, sksmatt, SpencerFinnell, johnstonphilip, brashrebel, drewapicture, johnjamesjacoby, nosegraze, littlerchicken, lisacee
|
5 |
Donate link: https://easydigitaldownloads.com/donate/
|
6 |
-
Tags: ecommerce, sell, checkout,
|
7 |
Requires at least: 4.4
|
8 |
-
Tested up to: 5.
|
9 |
Requires PHP: 5.3
|
10 |
-
Stable Tag: 2.10.
|
11 |
License: GNU Version 2 or Any Later Version
|
12 |
|
13 |
Sell your digital products the simple way. Easily build an online store complete with a cart system, checkout forms, reports, coupons, and more!
|
@@ -247,6 +247,18 @@ Yes, through the use of our commercial addon called [Recurring Payments](https:/
|
|
247 |
11. Google Pay checkout
|
248 |
|
249 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
= 2.10.5, May 20, 2021 =
|
251 |
* Fix: Unexpected checkout fields may become required when they weren't before, after a discount code is applied.
|
252 |
* Fix: Deprecation notices in PHP 8.
|
3 |
Plugin URI: https://easydigitaldownloads.com
|
4 |
Contributors: easydigitaldownloads, mordauk, sunnyratilal, chriscct7, section214, sumobi, sdavis2702, cklosows, mindctrl, sksmatt, SpencerFinnell, johnstonphilip, brashrebel, drewapicture, johnjamesjacoby, nosegraze, littlerchicken, lisacee
|
5 |
Donate link: https://easydigitaldownloads.com/donate/
|
6 |
+
Tags: ecommerce, sell, checkout, digital store, stripe
|
7 |
Requires at least: 4.4
|
8 |
+
Tested up to: 5.8
|
9 |
Requires PHP: 5.3
|
10 |
+
Stable Tag: 2.10.6
|
11 |
License: GNU Version 2 or Any Later Version
|
12 |
|
13 |
Sell your digital products the simple way. Easily build an online store complete with a cart system, checkout forms, reports, coupons, and more!
|
247 |
11. Google Pay checkout
|
248 |
|
249 |
== Changelog ==
|
250 |
+
= 2.10.6, June 22, 2021 =
|
251 |
+
* New: Added license upgrade notices to EDD admin pages.
|
252 |
+
* Improvement: The discount API endpoint now includes `excluded_products`.
|
253 |
+
* Improvement: The Hummingbird cache plugin is now detected in `edd_is_caching_plugin_active()`.
|
254 |
+
* Fix: Currency symbol was prefixed with minus sign in PHP 8 on some interfaces.
|
255 |
+
* Fix: Prevent multi purchase mode from reporting as enabled if a product does not have variable pricing turned on.
|
256 |
+
* Fix: Deprecation notices in PHP 8.
|
257 |
+
* Improvement: Stripe - When using the filter to adjust Stripe Element styles, we now merge those styles with the default generated ones.
|
258 |
+
* Improvement: Stripe - The `edds_is_zero_decimal_currency()` function now accepts an optional `$currency` parameter, so you can check any currency instead of just the shop's selected currency.
|
259 |
+
* Fix: Stripe - Fatal error when attempting to perform old database upgrades.
|
260 |
+
* Fix: Stripe - Undefined index notice with Stripe Connect.
|
261 |
+
|
262 |
= 2.10.5, May 20, 2021 =
|
263 |
* Fix: Unexpected checkout fields may become required when they weren't before, after a discount code is applied.
|
264 |
* Fix: Deprecation notices in PHP 8.
|
templates/edd.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@charset "UTF-8";.edd-icon{display:inline-block;fill:currentColor;position:relative;top:-.0625em;vertical-align:middle;width:1em;height:1em}.edd-icon-lock{top:-.125rem}.edd-icon-spin{display:inline-block;-moz-animation:edd-icon-spin 2s infinite linear;-o-animation:edd-icon-spin 2s infinite linear;-webkit-animation:edd-icon-spin 2s infinite linear;animation:edd-icon-spin 2s infinite linear}@-moz-keyframes edd-icon-spin{0%{-moz-transform:rotate(0)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes edd-icon-spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes edd-icon-spin{0%{-o-transform:rotate(0)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes edd-icon-spin{0%{-ms-transform:rotate(0)}100%{-ms-transform:rotate(359deg)}}@keyframes edd-icon-spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}.edd_clearfix:after{display:block;visibility:hidden;float:none;clear:both;text-indent:-9999px;content:"."}#edd_checkout_cart{text-align:left;width:100%;border:none;margin:0 0 21px;table-layout:auto}#edd_checkout_cart td,#edd_checkout_cart th{text-align:left;border:1px solid #eee;color:#666;padding:.5em 1.387em}#edd_checkout_cart .edd_cart_header_row th{background:#fafafa;padding:1.387em}#edd_checkout_cart .edd_cart_discount_row th,#edd_checkout_cart .edd_cart_tax_row th{background:0 0}#edd_checkout_cart th{font-weight:700}#edd_checkout_cart td{line-height:25px;vertical-align:middle;background:#fff}#edd_checkout_cart td.edd_cart_actions,#edd_checkout_cart td:last-child,#edd_checkout_cart th.edd_cart_actions,#edd_checkout_cart th.edd_cart_total,#edd_checkout_cart th:last-child{text-align:right}#edd_checkout_cart td img{float:left;margin:0 8px 0 0;background:0 0;padding:0;border:none}#edd_checkout_cart input.edd-item-quantity{width:3em;padding:2px}#edd_checkout_cart .edd_discount{display:inline-block;margin-left:5px}.edd_discount_remove{display:inline-block;width:10px;height:11px;background:url(images/xit.gif ) 0 0 no-repeat;position:relative;top:3px}.edd_discount_remove:hover{background-position:-10px 0}#edd_checkout_cart br{display:none}#edd_checkout_cart a.edd-cart-saving-button{font-weight:400;text-decoration:none}#edd_checkout_form_wrap legend{display:block;font-size:120%;line-height:1;font-weight:700;width:100%;margin:0 0 21px;padding:0}#edd_checkout_form_wrap label{font-weight:700;display:block;position:relative;line-height:100%;font-size:95%;margin:0 0 5px}#edd_checkout_form_wrap span.edd-description{color:#666;font-size:80%;display:block;margin:0 0 5px}#edd_checkout_form_wrap input.edd-input,#edd_checkout_form_wrap textarea.edd-input{display:inline-block;width:70%}#edd_checkout_form_wrap select.edd-select{display:block;width:60%}#edd_checkout_form_wrap select.edd-select.edd-select-small{display:inline;width:auto}#edd_checkout_form_wrap input.edd-input.error,#edd_checkout_form_wrap textarea.edd-input.error{border-color:#c4554e}#edd_checkout_form_wrap>p{margin:0 0 21px}#edd_checkout_form_wrap span.edd-required-indicator{color:#b94a48;display:inline}#edd_checkout_form_wrap input[type=email],#edd_checkout_form_wrap input[type=password],#edd_checkout_form_wrap input[type=tel],#edd_checkout_form_wrap input[type=text],#edd_checkout_form_wrap textarea{padding:4px 6px}#edd_checkout_form_wrap input[type=radio]{border:none;margin-right:5px}#edd_checkout_form_wrap input[type=checkbox]{display:inline-block;margin:0 5px 0 0}#edd_checkout_form_wrap input[type=checkbox]+label,#edd_checkout_form_wrap input[type=checkbox]+label:after{display:inline}#edd_checkout_form_wrap .edd-payment-icons{height:32px;display:block;margin:0 0 8px}#edd_checkout_form_wrap .edd-payment-icons img.payment-icon{max-height:32px;width:auto;margin:0 3px 0 0;float:left;background:0 0;padding:0;border:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#edd_checkout_form_wrap #edd-payment-mode-wrap label{display:inline-block;margin:0 20px 0 0}#edd_checkout_form_wrap #edd-payment-mode-wrap .edd-payment-mode-label{font-weight:700;display:inline-block;position:relative;margin-bottom:5px}#edd_checkout_form_wrap fieldset{border:1px solid #eee;padding:1.387em;margin:0 0 21px}#edd_checkout_form_wrap #edd_discount_code,#edd_checkout_form_wrap #edd_purchase_submit,#edd_checkout_form_wrap #edd_register_account_fields{padding:0;border:none}#edd_checkout_form_wrap fieldset fieldset{margin:0;border:none;padding:0}#edd_checkout_form_wrap #edd-login-account-wrap,#edd_checkout_form_wrap #edd-new-account-wrap,#edd_checkout_form_wrap #edd_final_total_wrap,#edd_checkout_form_wrap #edd_show_discount,#edd_checkout_form_wrap .edd-cart-adjustment{background:#fafafa;color:#666;padding:.5em 1.387em}#edd_checkout_form_wrap #edd-discount-code-wrap,#edd_checkout_form_wrap #edd_final_total_wrap,#edd_checkout_form_wrap #edd_show_discount{border:1px solid #eee}#edd_checkout_form_wrap .edd-cart-adjustment{padding:1.387em}#edd_checkout_form_wrap .edd-cart-adjustment input.edd-input,#edd_checkout_form_wrap .edd-cart-adjustment input.edd-submit{display:inline-block}#edd_checkout_form_wrap .edd-cart-adjustment input.edd-submit{padding:3px 12px;margin-bottom:2px}#edd_checkout_form_wrap #edd-discount-error-wrap{width:100%;display:inline-block;margin:1em 0 0}#edd_checkout_form_wrap #edd-login-account-wrap,#edd_checkout_form_wrap #edd-new-account-wrap{margin:-1.387em -1.387em 21px;border-left:none;border-right:none;border-top:none}#edd_checkout_form_wrap #edd_payment_mode_select{margin-bottom:21px}#edd_checkout_form_wrap fieldset#edd_register_fields #edd_checkout_user_info{margin-bottom:21px}#edd_checkout_form_wrap fieldset#edd_register_account_fields legend{padding-top:11px}#edd_checkout_form_wrap fieldset#edd_register_account_fields p.edd_login_password,#edd_checkout_form_wrap fieldset#edd_register_account_fields p.edd_register_password{margin:0}#edd_checkout_form_wrap fieldset#edd_cc_fields{border:1px solid #f0f0f0;background:#f9f9f9;position:relative}#edd_checkout_form_wrap fieldset#edd_cc_fields legend{border:none;padding:0}#edd_checkout_form_wrap fieldset p:last-child{margin-bottom:0}#edd_checkout_form_wrap fieldset#edd_cc_fields #edd-card-number-wrap{margin-top:5px}#edd_checkout_form_wrap #edd_purchase_final_total{margin:21px 0}#edd_checkout_form_wrap #edd_purchase_final_total p{margin:0}#edd_secure_site_wrapper{padding:4px 4px 4px 0;font-weight:700}#edd_checkout_form_wrap input.edd-input.card-number.valid{background-image:url(images/tick.png);background-repeat:no-repeat;background-position:98% 50%}#edd_checkout_form_wrap span.exp-divider{display:inline}#edd_checkout_form_wrap span.card-type{position:absolute;top:-2px;right:0;width:43px;height:32px;background-size:43px 32px!important}#edd_checkout_form_wrap span.card-type.off{display:none}#edd_checkout_form_wrap span.card-type.visa{background:url(images/icons/visa.png ) no-repeat}#edd_checkout_form_wrap span.card-type.mastercard{background:url(images/icons/mastercard.png ) no-repeat}#edd_checkout_form_wrap span.card-type.discover{background:url(images/icons/discover.png ) no-repeat}#edd_checkout_form_wrap span.card-type.amex{background:url(images/icons/americanexpress.png ) no-repeat}#edd_checkout_form_wrap .edd-cart-ajax{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.edd-amazon-profile-wrapper{font-size:12px}.edd-amazon-profile-name{font-weight:600}.edd-amazon-logout{font-size:10px;line-height:12px}.edd-amazon-logout a{cursor:pointer}#edd-amazon-address-box,#edd-amazon-wallet-box{height:228px;width:350px}#edd-amazon-address-box{margin-bottom:15px}@media only screen and (min-width:768px){#edd-amazon-address-box,#edd-amazon-wallet-box{width:100%;height:228px}}.edd_purchase_submit_wrapper{position:relative}.edd_purchase_submit_wrapper a.edd-add-to-cart{text-decoration:none;display:none;position:relative;overflow:hidden}.edd_purchase_submit_wrapper a.edd-add-to-cart.edd-has-js{display:inline-block}.edd_purchase_submit_wrapper .edd-cart-ajax{display:none;position:relative;left:-35px}.edd-submit.button.edd-ajax-loading{padding-right:30px}.edd-add-to-cart .edd-add-to-cart-label{opacity:1}.edd-loading,.edd-loading:after{border-radius:50%;display:block;width:1.5em;height:1.5em}.edd-loading{-webkit-animation:edd-spinning 1.1s infinite linear;animation:edd-spinning 1.1s infinite linear;border-top:.2em solid rgba(255,255,255,.2);border-right:.2em solid rgba(255,255,255,.2);border-bottom:.2em solid rgba(255,255,255,.2);border-left:.2em solid #fff;font-size:.75em;position:absolute;left:calc(50% - .75em);top:calc(50% - .75em);opacity:0;-ms-transform:translateZ(0);transform:translateZ(0)}.edd-discount-loader.edd-loading,.edd-loading-ajax.edd-loading,a.edd-add-to-cart.white .edd-loading{border-top-color:rgba(0,0,0,.2);border-right-color:rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.2);border-left-color:#000}.edd-loading-ajax.edd-loading{display:inline-block;position:relative;top:0;left:.25em;vertical-align:middle}#edd_checkout_form_wrap .edd-cart-adjustment .edd-apply-discount.edd-submit{display:inline-block}.edd-discount-loader.edd-loading{display:inline-block;position:relative;left:auto;vertical-align:middle;width:1.25em;height:1.25em}.edd-loading-ajax.edd-loading{opacity:1}@-webkit-keyframes edd-spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes edd-spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.edd-loading,a.edd-add-to-cart .edd-add-to-cart-label{-webkit-transition:.1s opacity!important;-moz-transition:.1s opacity!important;-ms-transition:.1s opacity!important;-o-transition:.1s opacity!important;transition:.1s opacity!important}.edd-add-to-cart[data-edd-loading] .edd-add-to-cart-label{opacity:0}.edd-add-to-cart[data-edd-loading] .edd-loading,.edd-discount-loader.edd-loading{opacity:1}.edd-cart-added-alert{color:#567622;display:block;position:absolute}.edd_form input.edd-input.required,.edd_form select.edd-select.required{color:#000}body.edd_receipt_page{background-color:#fff;color:#141412;margin:0;font-family:Helvetica,sans-serif;font-size:12px}body.edd_receipt_page:before{position:relative}body.edd_receipt_page #edd_receipt_wrapper{width:660px;margin:0 auto;padding:50px 0}body.edd_receipt_page table{display:table;width:100%;border-bottom:1px solid #ededed;border-collapse:collapse;border-spacing:0;font-size:14px;line-height:2;margin:0 0 20px}body.edd_receipt_page td,body.edd_receipt_page th{display:table-cell;text-align:left;border-top:1px solid #ededed;padding:6px 10px;font-weight:400}body.edd_receipt_page th{font-weight:700;text-transform:uppercase}body.edd_receipt_page h3{font-size:22px;margin:40px 0 5px;clear:both;display:block;font-weight:700}body.edd_receipt_page li{list-style:none}table#edd_purchase_receipt,table#edd_purchase_receipt_products{width:100%}table#edd_purchase_receipt td,table#edd_purchase_receipt th,table#edd_purchase_receipt_products td,table#edd_purchase_receipt_products th{text-align:left}table#edd_purchase_receipt .edd_receipt_payment_status.cancelled,table#edd_purchase_receipt .edd_receipt_payment_status.failed,table#edd_purchase_receipt .edd_receipt_payment_status.pending,table#edd_purchase_receipt .edd_receipt_payment_status.revoked{color:#f73f2e}table#edd_purchase_receipt_products li{list-style:none;margin:0 0 8px 10px}table#edd_purchase_receipt ul,table#edd_purchase_receipt_products ul.edd_purchase_receipt_files{margin:0;padding:0}table#edd_purchase_receipt li.edd_download_file{list-style:none;margin:0 0 8px 0}table#edd_purchase_receipt_products .edd_purchase_receipt_product_notes{font-style:italic}table#edd_purchase_receipt_products .edd_purchase_receipt_product_name{font-weight:700}table#edd_purchase_receipt_products .edd_bundled_product_name{font-style:italic;font-weight:700}#edd_user_history{text-align:left;width:100%;border-top:1px solid #f0f0f0;border-bottom:none}#edd_user_history td,#edd_user_history th{text-align:left;padding:3px 5px;border-bottom:1px solid #f0f0f0;border-top:none}#edd_user_history th{font-weight:700;background:#f5f5f5}#edd_user_history td{line-height:25px;vertical-align:middle}#edd_user_history .edd_purchase_status.cancelled,#edd_user_history .edd_purchase_status.failed,#edd_user_history .edd_purchase_status.pending,#edd_user_history .edd_purchase_status.revoked{color:#f73f2e}#edd_login_form legend,#edd_register_form legend{font-size:120%;margin-bottom:1em}#edd_login_form fieldset,#edd_register_form fieldset{border:none}#edd_login_form .edd-input,#edd_register_form .edd-input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#edd_login_form label,#edd_register_form label{cursor:pointer}#edd_profile_editor_form p{margin-bottom:8px}#edd_profile_editor_form label{display:inline-block}#edd_profile_editor_form .edd-profile-emails{list-style-type:none;display:inline-table;margin-left:0;margin-bottom:0}#edd_profile_editor_form .edd-profile-email{width:auto}#edd_profile_editor_form .edd-profile-email .actions{display:none}#edd_profile_editor_form .edd-profile-email:hover>span{display:inline-block}.edd_added_to_cart_alert{padding:5px;font-size:14px;border:1px solid #046a9e;background:#9ecce2;color:#333;margin:8px 0}.edd_added_to_cart_alert a.edd_alert_checkout_link{color:#000!important}input.edd_submit_plain{background:0 0!important;border:none!important;padding:0!important;display:inline;cursor:pointer}.single-download .edd_download_purchase_form{margin-bottom:1.387em}.edd_download_purchase_form .edd_download_quantity_wrapper{margin:0 0 .5em}.edd_download_purchase_form .edd_download_quantity_wrapper .edd-item-quantity{width:75px}.edd_download_purchase_form .edd_price_options{margin:0 0 15px}.edd_download_purchase_form .edd_price_options ul{margin:0;padding:0;list-style:none}.edd_download_purchase_form .edd_price_options li{display:block;padding:0;margin:0}.edd_download_purchase_form .edd_price_options span{display:inline;padding:0;margin:0}.edd_download_purchase_form .edd_price_options .edd_download_quantity_wrapper{padding-left:18px}.edd_download_purchase_form .edd_price_options .edd_download_quantity_wrapper *{font-size:80%}.edd_download_purchase_form .edd_price_options input.edd-item-quantity{display:inline;width:50px;max-width:90%}#edd-purchase-button,.edd-submit,[type=submit].edd-submit{display:inline-block;padding:6px 12px;margin:0;font-size:14px;font-weight:400;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.edd-submit.button:focus,[type=submit].edd-submit:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.edd-submit.button:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.edd-submit.plain{padding:0;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.edd-submit.button,.edd-submit.button.gray,.edd-submit.button:visited{color:#333;background:#f0f0f0;border-color:#ccc}.edd-submit.button.gray:active,.edd-submit.button.gray:focus,.edd-submit.button.gray:hover,.edd-submit.button:active,.edd-submit.button:focus,.edd-submit.button:hover{color:#333;background:#ebebeb;border-color:#adadad}.edd-submit.button.gray:active{background-image:none}.edd-submit.button.white{color:#333;background:#fff;border-color:#ccc}.edd-submit.button.white:active,.edd-submit.button.white:focus,.edd-submit.button.white:hover{color:#333;background:#ebebeb;border-color:#adadad}.edd-submit.button.white:active{background-image:none}.edd-submit.button.blue{color:#fff;background:#428bca;border-color:#357ebd}.edd-submit.button.blue.active,.edd-submit.button.blue:focus,.edd-submit.button.blue:hover{color:#fff;background:#3276b1;border-color:#285e8e}.edd-submit.button.blue.active{background-image:none}.edd-submit.button.red{color:#fff;background:#d9534f;border-color:#d43f3a}.edd-submit.button.red:active,.edd-submit.button.red:focus,.edd-submit.button.red:hover{color:#fff;background:#d2322d;border-color:#ac2925}.edd-submit.button.red:active{background-image:none}.edd-submit.button.green{color:#fff;background:#5cb85c;border-color:#4cae4c}.edd-submit.button.green:active,.edd-submit.button.green:focus,.edd-submit.button.green:hover{color:#fff;background:#47a447;border-color:#398439}.edd-submit.button.green:active{background-image:none}.edd-submit.button.yellow{color:#fff;background:#f0ad4e;border-color:#eea236}.edd-submit.button.yellow:active,.edd-submit.button.yellow:focus,.edd-submit.button.yellow:hover{color:#fff;background:#ed9c28;border-color:#d58512}.edd-submit.button.yellow:active{background-image:none}.edd-submit.button.orange{color:#fff;background:#ed9c28;border-color:#e3921e}.edd-submit.button.orange:active,.edd-submit.button.orange:focus,.edd-submit.button.orange:hover{color:#fff;background:#e59016;border-color:#d58512}.edd-submit.button.orange:active{background-image:none}.edd-submit.button.dark-gray{color:#fff;background:#363636;border-color:#222}.edd-submit.button.dark-gray:active,.edd-submit.button.dark-gray:focus,.edd-submit.button.dark-gray:hover{color:#fff;background:#333;border-color:#adadad}.edd-submit.button.dark-gray:active{background-image:none}.edd_downloads_list:after{content:"";display:table;clear:both}.edd_download{float:left}.edd_download_columns_1 .edd_download{width:100%}.edd_download_columns_2 .edd_download{width:50%}.edd_download_columns_0 .edd_download,.edd_download_columns_3 .edd_download{width:33%}.edd_download_columns_4 .edd_download{width:25%}.edd_download_columns_5 .edd_download{width:20%}.edd_download_columns_6 .edd_download{width:16.6%}.edd_download_inner{padding:0 8px 8px;margin:0 0 10px}.edd_download_columns_2 .edd_download:nth-child(2n+1),.edd_download_columns_3 .edd_download:nth-child(3n+1),.edd_download_columns_4 .edd_download:nth-child(4n+1),.edd_download_columns_5 .edd_download:nth-child(5n+1),.edd_download_columns_6 .edd_download:nth-child(6n+1){clear:left}.edd_download_image{max-width:100%}.edd_download .edd_price{margin-bottom:10px}.edd-hide-on-empty.cart-empty{display:none}edd-hide-on-empty.cart-not.empty{display:block}.edd-cart-ajax{margin:0 8px 0 4px;position:relative;top:2px;background:0 0;border:none;padding:0}.edd-cart-number-of-items{font-style:italic;color:grey}.edd-cart-meta.edd_subtotal{font-weight:700;font-style:italic}.edd-cart-meta.edd_cart_tax{font-size:1em;font-style:italic}.edd-cart-meta.edd_cart_tax::before{font-style:normal}.edd-cart-meta.edd_total{font-weight:700}.edd-cart-meta{padding:2px 5px}.edd-cart-meta.edd_subtotal,.edd-cart-meta.edd_total{background-color:#f9f9f9}.edd_errors:not(.edd-alert){-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #e6db55;margin:0 0 21px;background:#ffffe0;color:#333}.edd_error{padding:10px}p.edd_error{margin:0!important}.edd_success:not(.edd-alert){-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #b3ce89;margin:20px 0;background:#d5eab3;color:#567622;padding:6px 8px;box-shadow:inset 0 1px 0 rgba(255,255,255,.7)}.edd-alert{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;margin-bottom:20px;padding:10px;border:1px solid transparent;vertical-align:middle}.edd-alert p{padding:0}.edd-alert p:not(:last-child){margin-bottom:5px}.edd-alert p:last-child{margin-bottom:0}.edd-alert-error{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.edd-alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.edd-alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.edd-alert-warn{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}
|
1 |
+
@charset "UTF-8";.edd-icon{display:inline-block;fill:currentColor;position:relative;top:-.0625em;vertical-align:middle;width:1em;height:1em}.edd-icon-lock{top:-.125rem}.edd-icon-spin{display:inline-block;-moz-animation:edd-icon-spin 2s infinite linear;-o-animation:edd-icon-spin 2s infinite linear;-webkit-animation:edd-icon-spin 2s infinite linear;animation:edd-icon-spin 2s infinite linear}@-moz-keyframes edd-icon-spin{0%{-moz-transform:rotate(0)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes edd-icon-spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes edd-icon-spin{0%{-o-transform:rotate(0)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes edd-icon-spin{0%{-ms-transform:rotate(0)}100%{-ms-transform:rotate(359deg)}}@keyframes edd-icon-spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}.edd_clearfix:after{display:block;visibility:hidden;float:none;clear:both;text-indent:-9999px;content:"."}#edd_checkout_cart{text-align:left;width:100%;border:none;margin:0 0 21px;table-layout:auto}#edd_checkout_cart td,#edd_checkout_cart th{text-align:left;border:1px solid #eee;color:#666;padding:.5em 1.387em}#edd_checkout_cart .edd_cart_header_row th{background:#fafafa;padding:1.387em}#edd_checkout_cart .edd_cart_discount_row th,#edd_checkout_cart .edd_cart_tax_row th{background:0 0}#edd_checkout_cart th{font-weight:700}#edd_checkout_cart td{line-height:25px;vertical-align:middle;background:#fff}#edd_checkout_cart td.edd_cart_actions,#edd_checkout_cart td:last-child,#edd_checkout_cart th.edd_cart_actions,#edd_checkout_cart th.edd_cart_total,#edd_checkout_cart th:last-child{text-align:right}#edd_checkout_cart td img{float:left;margin:0 8px 0 0;background:0 0;padding:0;border:none}#edd_checkout_cart input.edd-item-quantity{width:3em;padding:2px}#edd_checkout_cart .edd_discount{display:inline-block;margin-left:5px}.edd_discount_remove{display:inline-block;width:10px;height:11px;background:url(images/xit.gif) 0 0 no-repeat;position:relative;top:3px}.edd_discount_remove:hover{background-position:-10px 0}#edd_checkout_cart br{display:none}#edd_checkout_cart a.edd-cart-saving-button{font-weight:400;text-decoration:none}#edd_checkout_form_wrap legend{display:block;font-size:120%;line-height:1;font-weight:700;width:100%;margin:0 0 21px;padding:0}#edd_checkout_form_wrap label{font-weight:700;display:block;position:relative;line-height:100%;font-size:95%;margin:0 0 5px}#edd_checkout_form_wrap span.edd-description{color:#666;font-size:80%;display:block;margin:0 0 5px}#edd_checkout_form_wrap input.edd-input,#edd_checkout_form_wrap textarea.edd-input{display:inline-block;width:70%}#edd_checkout_form_wrap select.edd-select{display:block;width:60%}#edd_checkout_form_wrap select.edd-select.edd-select-small{display:inline;width:auto}#edd_checkout_form_wrap input.edd-input.error,#edd_checkout_form_wrap textarea.edd-input.error{border-color:#c4554e}#edd_checkout_form_wrap>p{margin:0 0 21px}#edd_checkout_form_wrap span.edd-required-indicator{color:#b94a48;display:inline}#edd_checkout_form_wrap input[type=email],#edd_checkout_form_wrap input[type=password],#edd_checkout_form_wrap input[type=tel],#edd_checkout_form_wrap input[type=text],#edd_checkout_form_wrap textarea{padding:4px 6px}#edd_checkout_form_wrap input[type=radio]{border:none;margin-right:5px}#edd_checkout_form_wrap input[type=checkbox]{display:inline-block;margin:0 5px 0 0}#edd_checkout_form_wrap input[type=checkbox]+label,#edd_checkout_form_wrap input[type=checkbox]+label:after{display:inline}#edd_checkout_form_wrap .edd-payment-icons{height:32px;display:block;margin:0 0 8px}#edd_checkout_form_wrap .edd-payment-icons img.payment-icon{max-height:32px;width:auto;margin:0 3px 0 0;float:left;background:0 0;padding:0;border:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#edd_checkout_form_wrap #edd-payment-mode-wrap label{display:inline-block;margin:0 20px 0 0}#edd_checkout_form_wrap #edd-payment-mode-wrap .edd-payment-mode-label{font-weight:700;display:inline-block;position:relative;margin-bottom:5px}#edd_checkout_form_wrap fieldset{border:1px solid #eee;padding:1.387em;margin:0 0 21px}#edd_checkout_form_wrap #edd_discount_code,#edd_checkout_form_wrap #edd_purchase_submit,#edd_checkout_form_wrap #edd_register_account_fields{padding:0;border:none}#edd_checkout_form_wrap fieldset fieldset{margin:0;border:none;padding:0}#edd_checkout_form_wrap #edd-login-account-wrap,#edd_checkout_form_wrap #edd-new-account-wrap,#edd_checkout_form_wrap #edd_final_total_wrap,#edd_checkout_form_wrap #edd_show_discount,#edd_checkout_form_wrap .edd-cart-adjustment{background:#fafafa;color:#666;padding:.5em 1.387em}#edd_checkout_form_wrap #edd-discount-code-wrap,#edd_checkout_form_wrap #edd_final_total_wrap,#edd_checkout_form_wrap #edd_show_discount{border:1px solid #eee}#edd_checkout_form_wrap .edd-cart-adjustment{padding:1.387em}#edd_checkout_form_wrap .edd-cart-adjustment input.edd-input,#edd_checkout_form_wrap .edd-cart-adjustment input.edd-submit{display:inline-block}#edd_checkout_form_wrap .edd-cart-adjustment input.edd-submit{padding:3px 12px;margin-bottom:2px}#edd_checkout_form_wrap #edd-discount-error-wrap{width:100%;display:inline-block;margin:1em 0 0}#edd_checkout_form_wrap #edd-login-account-wrap,#edd_checkout_form_wrap #edd-new-account-wrap{margin:-1.387em -1.387em 21px;border-left:none;border-right:none;border-top:none}#edd_checkout_form_wrap #edd_payment_mode_select{margin-bottom:21px}#edd_checkout_form_wrap fieldset#edd_register_fields #edd_checkout_user_info{margin-bottom:21px}#edd_checkout_form_wrap fieldset#edd_register_account_fields legend{padding-top:11px}#edd_checkout_form_wrap fieldset#edd_register_account_fields p.edd_login_password,#edd_checkout_form_wrap fieldset#edd_register_account_fields p.edd_register_password{margin:0}#edd_checkout_form_wrap fieldset#edd_cc_fields{border:1px solid #f0f0f0;background:#f9f9f9;position:relative}#edd_checkout_form_wrap fieldset#edd_cc_fields legend{border:none;padding:0}#edd_checkout_form_wrap fieldset p:last-child{margin-bottom:0}#edd_checkout_form_wrap fieldset#edd_cc_fields #edd-card-number-wrap{margin-top:5px}#edd_checkout_form_wrap #edd_purchase_final_total{margin:21px 0}#edd_checkout_form_wrap #edd_purchase_final_total p{margin:0}#edd_secure_site_wrapper{padding:4px 4px 4px 0;font-weight:700}#edd_checkout_form_wrap input.edd-input.card-number.valid{background-image:url(images/tick.png);background-repeat:no-repeat;background-position:98% 50%}#edd_checkout_form_wrap span.exp-divider{display:inline}#edd_checkout_form_wrap span.card-type{position:absolute;top:-2px;right:0;width:43px;height:32px;background-size:43px 32px!important}#edd_checkout_form_wrap span.card-type.off{display:none}#edd_checkout_form_wrap span.card-type.visa{background:url(images/icons/visa.png) no-repeat}#edd_checkout_form_wrap span.card-type.mastercard{background:url(images/icons/mastercard.png) no-repeat}#edd_checkout_form_wrap span.card-type.discover{background:url(images/icons/discover.png) no-repeat}#edd_checkout_form_wrap span.card-type.amex{background:url(images/icons/americanexpress.png) no-repeat}#edd_checkout_form_wrap .edd-cart-ajax{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.edd-amazon-profile-wrapper{font-size:12px}.edd-amazon-profile-name{font-weight:600}.edd-amazon-logout{font-size:10px;line-height:12px}.edd-amazon-logout a{cursor:pointer}#edd-amazon-address-box,#edd-amazon-wallet-box{height:228px;width:350px}#edd-amazon-address-box{margin-bottom:15px}@media only screen and (min-width:768px){#edd-amazon-address-box,#edd-amazon-wallet-box{width:100%;height:228px}}.edd_purchase_submit_wrapper{position:relative}.edd_purchase_submit_wrapper a.edd-add-to-cart{text-decoration:none;display:none;position:relative;overflow:hidden}.edd_purchase_submit_wrapper a.edd-add-to-cart.edd-has-js{display:inline-block}.edd_purchase_submit_wrapper .edd-cart-ajax{display:none;position:relative;left:-35px}.edd-submit.button.edd-ajax-loading{padding-right:30px}.edd-add-to-cart .edd-add-to-cart-label{opacity:1}.edd-loading,.edd-loading:after{border-radius:50%;display:block;width:1.5em;height:1.5em}.edd-loading{-webkit-animation:edd-spinning 1.1s infinite linear;animation:edd-spinning 1.1s infinite linear;border-top:.2em solid rgba(255,255,255,.2);border-right:.2em solid rgba(255,255,255,.2);border-bottom:.2em solid rgba(255,255,255,.2);border-left:.2em solid #fff;font-size:.75em;position:absolute;left:calc(50% - .75em);top:calc(50% - .75em);opacity:0;-ms-transform:translateZ(0);transform:translateZ(0)}.edd-discount-loader.edd-loading,.edd-loading-ajax.edd-loading,a.edd-add-to-cart.white .edd-loading{border-top-color:rgba(0,0,0,.2);border-right-color:rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.2);border-left-color:#000}.edd-loading-ajax.edd-loading{display:inline-block;position:relative;top:0;left:.25em;vertical-align:middle}#edd_checkout_form_wrap .edd-cart-adjustment .edd-apply-discount.edd-submit{display:inline-block}.edd-discount-loader.edd-loading{display:inline-block;position:relative;left:auto;vertical-align:middle;width:1.25em;height:1.25em}.edd-loading-ajax.edd-loading{opacity:1}@-webkit-keyframes edd-spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes edd-spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.edd-loading,a.edd-add-to-cart .edd-add-to-cart-label{-webkit-transition:.1s opacity!important;-moz-transition:.1s opacity!important;-ms-transition:.1s opacity!important;-o-transition:.1s opacity!important;transition:.1s opacity!important}.edd-add-to-cart[data-edd-loading] .edd-add-to-cart-label{opacity:0}.edd-add-to-cart[data-edd-loading] .edd-loading,.edd-discount-loader.edd-loading{opacity:1}.edd-cart-added-alert{color:#567622;display:block;position:absolute}.edd_form input.edd-input.required,.edd_form select.edd-select.required{color:#000}body.edd_receipt_page{background-color:#fff;color:#141412;margin:0;font-family:Helvetica,sans-serif;font-size:12px}body.edd_receipt_page:before{position:relative}body.edd_receipt_page #edd_receipt_wrapper{width:660px;margin:0 auto;padding:50px 0}body.edd_receipt_page table{display:table;width:100%;border-bottom:1px solid #ededed;border-collapse:collapse;border-spacing:0;font-size:14px;line-height:2;margin:0 0 20px}body.edd_receipt_page td,body.edd_receipt_page th{display:table-cell;text-align:left;border-top:1px solid #ededed;padding:6px 10px;font-weight:400}body.edd_receipt_page th{font-weight:700;text-transform:uppercase}body.edd_receipt_page h3{font-size:22px;margin:40px 0 5px;clear:both;display:block;font-weight:700}body.edd_receipt_page li{list-style:none}table#edd_purchase_receipt,table#edd_purchase_receipt_products{width:100%}table#edd_purchase_receipt td,table#edd_purchase_receipt th,table#edd_purchase_receipt_products td,table#edd_purchase_receipt_products th{text-align:left}table#edd_purchase_receipt .edd_receipt_payment_status.cancelled,table#edd_purchase_receipt .edd_receipt_payment_status.failed,table#edd_purchase_receipt .edd_receipt_payment_status.pending,table#edd_purchase_receipt .edd_receipt_payment_status.revoked{color:#f73f2e}table#edd_purchase_receipt_products li{list-style:none;margin:0 0 8px 10px}table#edd_purchase_receipt ul,table#edd_purchase_receipt_products ul.edd_purchase_receipt_files{margin:0;padding:0}table#edd_purchase_receipt li.edd_download_file{list-style:none;margin:0 0 8px 0}table#edd_purchase_receipt_products .edd_purchase_receipt_product_notes{font-style:italic}table#edd_purchase_receipt_products .edd_purchase_receipt_product_name{font-weight:700}table#edd_purchase_receipt_products .edd_bundled_product_name{font-style:italic;font-weight:700}#edd_user_history{text-align:left;width:100%;border-top:1px solid #f0f0f0;border-bottom:none}#edd_user_history td,#edd_user_history th{text-align:left;padding:3px 5px;border-bottom:1px solid #f0f0f0;border-top:none}#edd_user_history th{font-weight:700;background:#f5f5f5}#edd_user_history td{line-height:25px;vertical-align:middle}#edd_user_history .edd_purchase_status.cancelled,#edd_user_history .edd_purchase_status.failed,#edd_user_history .edd_purchase_status.pending,#edd_user_history .edd_purchase_status.revoked{color:#f73f2e}#edd_login_form legend,#edd_register_form legend{font-size:120%;margin-bottom:1em}#edd_login_form fieldset,#edd_register_form fieldset{border:none}#edd_login_form .edd-input,#edd_register_form .edd-input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#edd_login_form label,#edd_register_form label{cursor:pointer}#edd_profile_editor_form p{margin-bottom:8px}#edd_profile_editor_form label{display:inline-block}#edd_profile_editor_form .edd-profile-emails{list-style-type:none;display:inline-table;margin-left:0;margin-bottom:0}#edd_profile_editor_form .edd-profile-email{width:auto}#edd_profile_editor_form .edd-profile-email .actions{display:none}#edd_profile_editor_form .edd-profile-email:hover>span{display:inline-block}.edd_added_to_cart_alert{padding:5px;font-size:14px;border:1px solid #046a9e;background:#9ecce2;color:#333;margin:8px 0}.edd_added_to_cart_alert a.edd_alert_checkout_link{color:#000!important}input.edd_submit_plain{background:0 0!important;border:none!important;padding:0!important;display:inline;cursor:pointer}.single-download .edd_download_purchase_form{margin-bottom:1.387em}.edd_download_purchase_form .edd_download_quantity_wrapper{margin:0 0 .5em}.edd_download_purchase_form .edd_download_quantity_wrapper .edd-item-quantity{width:75px}.edd_download_purchase_form .edd_price_options{margin:0 0 15px}.edd_download_purchase_form .edd_price_options ul{margin:0;padding:0;list-style:none}.edd_download_purchase_form .edd_price_options li{display:block;padding:0;margin:0}.edd_download_purchase_form .edd_price_options span{display:inline;padding:0;margin:0}.edd_download_purchase_form .edd_price_options .edd_download_quantity_wrapper{padding-left:18px}.edd_download_purchase_form .edd_price_options .edd_download_quantity_wrapper *{font-size:80%}.edd_download_purchase_form .edd_price_options input.edd-item-quantity{display:inline;width:50px;max-width:90%}#edd-purchase-button,.edd-submit,[type=submit].edd-submit{display:inline-block;padding:6px 12px;margin:0;font-size:14px;font-weight:400;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.edd-submit.button:focus,[type=submit].edd-submit:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.edd-submit.button:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.edd-submit.plain{padding:0;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.edd-submit.button,.edd-submit.button.gray,.edd-submit.button:visited{color:#333;background:#f0f0f0;border-color:#ccc}.edd-submit.button.gray:active,.edd-submit.button.gray:focus,.edd-submit.button.gray:hover,.edd-submit.button:active,.edd-submit.button:focus,.edd-submit.button:hover{color:#333;background:#ebebeb;border-color:#adadad}.edd-submit.button.gray:active{background-image:none}.edd-submit.button.white{color:#333;background:#fff;border-color:#ccc}.edd-submit.button.white:active,.edd-submit.button.white:focus,.edd-submit.button.white:hover{color:#333;background:#ebebeb;border-color:#adadad}.edd-submit.button.white:active{background-image:none}.edd-submit.button.blue{color:#fff;background:#428bca;border-color:#357ebd}.edd-submit.button.blue.active,.edd-submit.button.blue:focus,.edd-submit.button.blue:hover{color:#fff;background:#3276b1;border-color:#285e8e}.edd-submit.button.blue.active{background-image:none}.edd-submit.button.red{color:#fff;background:#d9534f;border-color:#d43f3a}.edd-submit.button.red:active,.edd-submit.button.red:focus,.edd-submit.button.red:hover{color:#fff;background:#d2322d;border-color:#ac2925}.edd-submit.button.red:active{background-image:none}.edd-submit.button.green{color:#fff;background:#5cb85c;border-color:#4cae4c}.edd-submit.button.green:active,.edd-submit.button.green:focus,.edd-submit.button.green:hover{color:#fff;background:#47a447;border-color:#398439}.edd-submit.button.green:active{background-image:none}.edd-submit.button.yellow{color:#fff;background:#f0ad4e;border-color:#eea236}.edd-submit.button.yellow:active,.edd-submit.button.yellow:focus,.edd-submit.button.yellow:hover{color:#fff;background:#ed9c28;border-color:#d58512}.edd-submit.button.yellow:active{background-image:none}.edd-submit.button.orange{color:#fff;background:#ed9c28;border-color:#e3921e}.edd-submit.button.orange:active,.edd-submit.button.orange:focus,.edd-submit.button.orange:hover{color:#fff;background:#e59016;border-color:#d58512}.edd-submit.button.orange:active{background-image:none}.edd-submit.button.dark-gray{color:#fff;background:#363636;border-color:#222}.edd-submit.button.dark-gray:active,.edd-submit.button.dark-gray:focus,.edd-submit.button.dark-gray:hover{color:#fff;background:#333;border-color:#adadad}.edd-submit.button.dark-gray:active{background-image:none}.edd_downloads_list:after{content:"";display:table;clear:both}.edd_download{float:left}.edd_download_columns_1 .edd_download{width:100%}.edd_download_columns_2 .edd_download{width:50%}.edd_download_columns_0 .edd_download,.edd_download_columns_3 .edd_download{width:33%}.edd_download_columns_4 .edd_download{width:25%}.edd_download_columns_5 .edd_download{width:20%}.edd_download_columns_6 .edd_download{width:16.6%}.edd_download_inner{padding:0 8px 8px;margin:0 0 10px}.edd_download_columns_2 .edd_download:nth-child(2n+1),.edd_download_columns_3 .edd_download:nth-child(3n+1),.edd_download_columns_4 .edd_download:nth-child(4n+1),.edd_download_columns_5 .edd_download:nth-child(5n+1),.edd_download_columns_6 .edd_download:nth-child(6n+1){clear:left}.edd_download_image{max-width:100%}.edd_download .edd_price{margin-bottom:10px}.edd-hide-on-empty.cart-empty{display:none}edd-hide-on-empty.cart-not.empty{display:block}.edd-cart-ajax{margin:0 8px 0 4px;position:relative;top:2px;background:0 0;border:none;padding:0}.edd-cart-number-of-items{font-style:italic;color:grey}.edd-cart-meta.edd_subtotal{font-weight:700;font-style:italic}.edd-cart-meta.edd_cart_tax{font-size:1em;font-style:italic}.edd-cart-meta.edd_cart_tax::before{font-style:normal}.edd-cart-meta.edd_total{font-weight:700}.edd-cart-meta{padding:2px 5px}.edd-cart-meta.edd_subtotal,.edd-cart-meta.edd_total{background-color:#f9f9f9}.edd_errors:not(.edd-alert){-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #e6db55;margin:0 0 21px;background:#ffffe0;color:#333}.edd_error{padding:10px}p.edd_error{margin:0!important}.edd_success:not(.edd-alert){-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #b3ce89;margin:20px 0;background:#d5eab3;color:#567622;padding:6px 8px;box-shadow:inset 0 1px 0 rgba(255,255,255,.7)}.edd-alert{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;margin-bottom:20px;padding:10px;border:1px solid transparent;vertical-align:middle}.edd-alert p{padding:0}.edd-alert p:not(:last-child){margin-bottom:5px}.edd-alert p:last-child{margin-bottom:0}.edd-alert-error{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.edd-alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.edd-alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.edd-alert-warn{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}
|