MediaWiki:Centralnotice-template-pcoombe 20240418 m sm dialogForm

From Meta, a Wikimedia project coordination wiki

<style> /* css variables */ .frb {

   --wmui-base100: #fff;
   --wmui-base90: #f8f9fa;
   --wmui-base80: #eaecf0;
   --wmui-base70: #c8ccd1;
   --wmui-base50: #a2a9b1;
   --wmui-base30: #72777d;
   --wmui-base20: #54595d;
   --wmui-base10: #202122;
   --wmui-base0: #000;
   --wmui-accent: #36c;
   --wmui-accent-light: #eaf3ff;
   --wmui-accent-dark: #2a4b8d;
   --wmui-red: #d73333;
   --wmui-red-light: #fee7e6;
   --wmui-red-dark: #b32424;
   --wmui-green: #00af89;
   --wmui-green-light: #d5fdf4;
   --wmui-green-dark: #14866d;
   --wmui-yellow: #fc3;
   --wmui-yellow-light: #fef6e7;
   --wmui-yellow-dark: #ac6600;
   --frb-primary: #900;
   --frb-primary-light: #fee7e6;
   --frb-primary-dark: var(--frb-primary);
   --frb-body: var(--wmui-base0);
   --frb-link: var(--wmui-accent);
   --frb-link-hover: #447ff5;
   --frb-message-background: var(--wmui-base100);
   --frb-message: var(--wmui-base0);
   --frb-muted: var(--wmui-base20);
   --frb-muted-hover: var(--wmui-base0);
   --frb-radio: var(--wmui-accent);
   --frb-button: var(--wmui-base90);
   --frb-button-border: var(--wmui-base50);
   --frb-button-hover: var(--wmui-base100);
   --frb-button-border-hover: var(--wmui-base50);
   --frb-button-focus: var(--wmui-base90);
   --frb-button-border-focus: var(--wmui-accent);
   --frb-button-selected: var(--wmui-accent-dark);
   --frb-button-border-selected: #7d8389;
   --frb-submit: var(--wmui-accent);
   --frb-submit-border: var(--wmui-accent);
   --frb-submit-hover: #447ff5;
   --frb-submit-border-hover: #447ff5;
   --frb-error: var(--wmui-red);

}

/* Hide nag when editor overlay enabled, or reference drawer open */ .overlay-enabled #frb-nag, .has-drawer--with-scroll-locked #frb-nag {

   display: none !important;

}

/* Resets */ .frb * {

   margin: 0;
   padding: 0;
   border: 0;
   font: inherit;
   font-size: 100%;
   vertical-align: baseline;
   background: none;

}

.frb button {

   cursor: pointer;

}

/* Box-sizing */ .frb, .frb *, .frb *:before, .frb *:after {

   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;

}

.frb input[type="radio"], .frb input[type="number"], .frb input[type="email"] {

   appearance: none;
   -webkit-appearance: none;
   -moz-appearance: none;

}

.frb input[type="number"] {

   background-color: transparent;
   -moz-appearance:textfield;

}

.frb input[type="number"]::-webkit-outer-spin-button, .frb input[type="number"]::-webkit-inner-spin-button {

   -webkit-appearance: none;
   margin: 0;

}

.frb frb-amt, .frb-replaced {

   white-space: nowrap;

}

/* Hide when printed */ @media print {

   .frb {
       display: none !important;
   }

}

@media (prefers-reduced-motion: reduce) {

   .frb,
   .frb * {
       transition: none;
   }

}

/* Typography


*/

/*Base font*/ .frb {

   font-family: system-ui, -apple-system,BlinkMacSystemFont, "Segoe UI", Roboto, "Oxygen-Sans", Ubuntu, Cantarell, Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
   font-size: 16px;
   line-height: 1.5; /*24px @16px*/

}

.frb-error {

   display: none;
   line-height: 1.25; /*20px @16px*/
   font-weight: 400;
   margin: 4px 0;
   color: var(--frb-error);
   text-align: center;

}

.frb-form legend, .frb-other-txt, .frb-optin-no-prompt {

   font-size: 14px;
   line-height: 1.2857142857; /*18px @14px*/

}

@media all and (min-width: 480px) {

   .frb-other-txt {
       font-size: 15px;
       line-height: 1.2666666667; /*19px @15px*/
   }

}

  1. frb-nag {
   font-size: 15px;
   line-height: 1.2; /*18px @15px*/

}

@media all and (min-width: 720px) {

   #frb-nag {
       font-size: 17px;
   }

}

.frb-btn, .frb-label {

   font-size: 15px;
   line-height: 1;

}

@media all and (min-width: 375px) {

   .frb-btn,
   .frb-label {
       font-size: 16px;
   }

}

/* In-article banner styles


*/

  1. frb-inline {
   display: table;
   position: relative;
   background: var(--wmui-base100);
   color: var(--frb-body);
   margin-top: 14px;
   margin-left: -16px;
   margin-right: -16px;

}

.frb-inline-border {

   position: relative;
   padding: 10px 10px 6px;
   background-color: var(--wmui-base100);
   border: 5px solid var(--frb-primary);
   box-shadow: 2px 2px 6px 0px rgba(0,0,0,0.15);
   margin: 0 10px;

}

.frb-inline-message {

   display: flex;
   flex-wrap: wrap;
   justify-content: space-between;
   align-items: flex-start;

}

.frb-inline-svg-container {

   display: flex;
   flex: 0 0 60px;
   max-width: 60px;
   height: 60px;
   width: 60px;
   background: var(--frb-primary);
   justify-content: center;
   align-items: center;
   float: left;
   margin: 0 15px 5px 0;

}

.frb-inline-svg-container svg {

   width: 40px;

}

.frb-inline-svg-container svg path {

   fill: var(--wmui-base100);

}

.frb-message-wrapper {

   flex: 0 1 auto;
   max-width: 100%;
   display: flex;
   align-items: center;

}

/* consistent responsive sizing */

@media (max-width: 536px) {

   .frb-message-wrapper {
       height: 162px;
   }

}

@media (max-width: 450px) {

   .frb-message-wrapper {
       height: 184px;
   }

}

@media (max-width: 393px) {

   .frb-message-wrapper {
       height: 207px;
   }

}

@media (max-width: 364px) {

   .frb-message-wrapper {
       height: 229px;
   }

}

@media (max-width: 344px) {

   .frb-message-wrapper {
       height: 252px;
   }

}

@media (max-width: 310px) {

   .frb-message-wrapper {
       height: 274px;
   }

}

@media (max-width: 293px) {

   .frb-message-wrapper {
       height: 297px;
   }

}

.frb-message-flex-container {

   max-width: 100%;
   height: 100%;
   display: flex;
   align-items: center;

}

.frb-inline-message-text {

   font-size: 15px;
   font-weight: 600;
   line-height: 1.5;
   display: block;
   margin-bottom: 0.25em;

}

.frb-step-2-message {

   font-size: 15px;
   font-weight: 400;
   line-height: 1.5;
   display: block;
   margin-bottom: 0.25em;

}

.frb-inline-message .frb-icon-info {

   height: 16px;
   margin-bottom: -2px;
   margin-right: 1px;

}

.frb-icon-info circle {

   fill: var(--frb-primary);

}

.frb-icon-info path {

   fill: var(--wmui-base100);

}

.frb-inline-message p:first-of-type {

   margin-top: 0;

}

/* --- Form --- */

.frb-form fieldset {

   margin-top: 20px;

}

.frb-form ul {

   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 8px;

}

.frb-form li {

   display: block;

}

/* --- Form legends --- */

.frb-form legend {

   margin: 0 0 4px 0;
   color: var(--wmui-base20);
   font-weight: bold;
   text-align: center;

}

.frb-form fieldset.frb-haserror .error-highlight {

   color: var(--frb-error);

}

/* --- Common Button Styles --- */

.frb-btn, .frb-label {

   display: flex;
   justify-content: center;
   align-items: center;
   background-color: var(--frb-button);
   color: var(--frb-body);
   border: 1px solid var(--frb-button-border);
   border-radius: 2px;
   padding: 2px 4px;
   min-height: 54px;
   outline: 0;
   text-align: center;
   cursor: pointer;
   font-weight: bold;
   transition: background 100ms, color 100ms, border-color 100ms, box-shadow 100ms;

} .frb-btn:hover, .frb-label:hover {

   background-color: var(--frb-button-hover);
   color: var(--frb-body);
   border-color: var(--frb-button-border-hover);

} .frb-btn:active, .frb-label:active {

   background-color: #d9d9d9;
   color: var(--frb-body);
   border-color: #7d8389;

}

.frb-btn:focus, .frb-label:focus, .frb-form input[type="radio"]:focus + .frb-btn, .frb-form input[type="radio"]:focus + .frb-label {

   border-color: var(--frb-button-border-focus);
   box-shadow: inset 0 0 0 1px var(--frb-button-border-focus);

}

  1. frb-form input[type="radio"]:checked + .frb-btn,
  2. frb-form input[type="radio"]:checked + .frb-label {
   background-color: var(--frb-button-selected);
   color: var(--wmui-base100);

}

.frb-payment-options input[type="radio"]:checked + .frb-label svg.white-on-select {

   filter: brightness(0) invert(1);

}

/* Blue text buttons */ .frb-payment-options .frb-label {

   color: var(--wmui-accent);

} .frb-payment-options .frb-label:active {

   color: var(--wmui-accent-dark);

}

/* Disabled states */ .frb-form input:disabled + label {

   opacity: 0.4 !important;
   cursor: default !important;

}

/* Submit/Continue buttons (blue background) */ .frb-submit {

   display: block;
   width: 100%;
   padding: 17px 6px;
   font-size: 18px;
   line-height: 1.2222222222; /*22px @18px*/
   font-weight: bold;
   color: rgba(84,89,93,0.2);
   background-color: var(--wmui-base100);
   border: 1px solid var(--frb-button-border-hover);
   cursor: default;
   border-radius: 2px;
   transition: background-color 0.5s ease;
   opacity: .5;

}

.frb-submit.active, .frb-rml-form .frb-submit {

   color: var(--wmui-base100);
   background-color: var(--frb-submit);
   border-color: var(--frb-submit-border);
   cursor: pointer;
   opacity: 1;

} .frb-submit.active:hover, .frb-rml-form .frb-submit:hover {

   background-color: var(--frb-submit-hover);
   border-color: var(--frb-submit-border-hover);

}

.frb-submit-txt-once { display: inline; } .form-monthly .frb-submit-txt-once { display: none; }

.frb-submit-txt-monthly { display: none; } .form-monthly .frb-submit-txt-monthly { display: inline; }

/* Hide radio buttons. Based on http://jqueryui.com/button/#radio */ .frb-ptf-checkbox, .frb-form input[type="radio"] {

   position: absolute;
   overflow: hidden;
   height: 1px;
   width: 1px;
   clip: rect(0 0 0 0);
   border: 0;
   margin: -1px;
   padding: 0;

}

/* --- Amount buttons layout --- */

/* 3 per row, Other button double width */ @media (min-width: 375px) {

   .frb-amounts ul {
       grid-template-columns: 1fr 1fr 1fr;
   }
   .frb-amounts ul li:last-of-type {
       grid-column: span 2;
   }

}

/* 4 per row */ @media (min-width: 640px) {

   .frb-amounts ul {
       grid-template-columns: 1fr 1fr 1fr 1fr;
   }
   .frb-amounts ul li:last-of-type {
       grid-column: span 1;
   }

}

/* --- Other amount --- */

.frb-button--other label {

   display: block;

}

/* Other amount field */ .frb-other-txt, .frb-other-input {

   line-height: 1;
   text-align: left;

}

.frb-other-txt {

   display: block;
   text-align: center;
   margin-top: 1px;
   margin-bottom: 3px;

}

.frb-other-input {

   width: 100%;
   max-width: 120px;
   border: none;
   text-align: center !important;
   font-weight: bold;
   color: var(--frb-body);
   box-shadow: 0 2px 0 0 #222;
   text-align: right;
   border-radius: 0; /* Needed for iOS */

}

.frb-button--other .frb-btn {

   padding: 6px;

}

.frb-button--other .frb-label {

   padding: 2px 6px 6px;

}

.frb-radio:checked + .frb-other-txt, .frb-radio:checked + .frb-btn .frb-other-input {

   color: var(--wmui-base100);

}

.frb-radio:checked + .frb-btn .frb-other-input {

   box-shadow: 0 2px 0 0 var(--wmui-base100);

}

.frb-input {

   background: var(--wmui-base100);
   padding: 12px;
   margin: 0;
   color: #000;
   border: 1px solid var(--frb-button-border);
   border-radius: 2px;

}

.frb-input:focus {

   outline: 0;
   border-color: var(--frb-button-border-focus);
   box-shadow: inset 0 0 0 1px var(--frb-button-border-focus);

}

.frb-input.frb-haserror {

   border-color: var(--frb-error);
   box-shadow: inset 0 0 0 1px var(--frb-error);

}

/* --- Pay the fee --- */ .frb-ptf {

   font-size: 15px;
   line-height: 1.25;
   margin-top: 12px;
   margin-bottom: 8px;

}

.frb-ptf-fee {

   white-space: nowrap;

}

.frb-ptf-checkbox:focus + .frb-ptf-label .frb-ptf-img {

   box-shadow: inset 0 0 0 2px var(--frb-button-border-focus), inset 0 0 0 2px var(--wmui-base100);

}

.frb-ptf-checkbox:focus + .frb-ptf-label .frb-ptf-img {

   border-radius: 5px;

}

.frb-ptf-checkbox + .frb-ptf-label .frb-ptf-img {

   display: inline-block;
   margin-bottom: -4px;
   width: 32px;
   height: 32px;
   background-image: url('https://upload.wikimedia.org/wikipedia/donate/b/b1/Wmf-frb-checkbox.png');
   background-size: 64px;
   background-repeat: no-repeat;
   background-position: 0 0;

}

.frb-ptf-checkbox:checked + .frb-ptf-label .frb-ptf-img {

   background-position: -32px 0;

}

.frb-ptf-label {

   display: flex;
   align-items: center;
   cursor: pointer;

}

.frb-ptf-message {

   padding-left: 12px;
   flex: 1;

}

/* --- Payment method buttons layout --- */

/* Always horizontal */ .frb-payment-options {

   display: flex;
   flex-wrap: wrap;
   width: calc(100% + 8px);
   margin: -4px;

}

.frb-payment-options .frb-button {

   display: inline-block;
   flex: 1 0 0;
   padding: 4px;
   margin: 0;

}

/* 5 or 6 methods, go to 2 rows */ .frb-payment-options .frb-button:first-child:nth-last-child(5), .frb-payment-options .frb-button:first-child:nth-last-child(5) ~ .frb-button, .frb-payment-options .frb-button:first-child:nth-last-child(6), .frb-payment-options .frb-button:first-child:nth-last-child(6) ~ .frb-button {

   min-width: 33%;

}

/* If there are 5 buttons, make the first one of the wider ones */ .frb-payment-options .frb-button:first-child:nth-last-child(5) {

   min-width: 50%;

}

/* -- Credit card logos -- */

.frb-cc-logo-wrapper {

   display: none;
   margin: 0 auto;
   font-size: 0; /* Remove spacing between icons */

}

.frb-pm-cc svg {

   width: 28px;
   height: 18px;
   margin: 2px;
   display: none;

}

.frb-cctypes-vmad .frb-cc-logo-wrapper, .frb-cctypes-vmaj .frb-cc-logo-wrapper, .frb-cctypes-vma .frb-cc-logo-wrapper, .frb-cctypes-vm .frb-cc-logo-wrapper {

   display: block;

}

.frb-cctypes-vmad .frb-pm-cc-label, .frb-cctypes-vmaj .frb-pm-cc-label, .frb-cctypes-vma .frb-pm-cc-label, .frb-cctypes-vm .frb-pm-cc-label {

   display: none;

}

.frb-cctypes-vmad .frb-cc-logo-visa, .frb-cctypes-vmad .frb-cc-logo-mastercard, .frb-cctypes-vmad .frb-cc-logo-amex, .frb-cctypes-vmad .frb-cc-logo-discover,

.frb-cctypes-vmaj .frb-cc-logo-visa, .frb-cctypes-vmaj .frb-cc-logo-mastercard, .frb-cctypes-vmaj .frb-cc-logo-amex, .frb-cctypes-vmaj .frb-cc-logo-jcb,

.frb-cctypes-vma .frb-cc-logo-visa, .frb-cctypes-vma .frb-cc-logo-mastercard, .frb-cctypes-vma .frb-cc-logo-amex,

.frb-cctypes-vm .frb-cc-logo-visa, .frb-cctypes-vm .frb-cc-logo-mastercard {

   display: inline-block;

}

/* Payment method buttons logo sizing */ .frb-payment-options .frb-logo-payments {

   width: 100%;
   height: 100%;
   max-height: 24px;

}

/* --- Top bar --- */

.frb-inline-topbar {

   width: 100%;
   text-align: left;
   background-color: var(--wmui-base100);
   color: var(--wmui-base0);
   display: inline-block;
   z-index: 888;
   font-weight: 600;
   font-size: 15.5px;
   line-height: 1.125; /* 18px @16px */
   position: relative;
   padding: 0 0 10px;

}

.frb-payment-options .frb-logo-payments--venmo {

   max-height: 16px;

}

.frb-logo-payments--paypal-usd {

   margin-bottom: -4px; /* visual tweak */

}

/* --- Close and RML Options --- */

.frb-inline-bottombar {

   text-align: center;
   display: flex;
   justify-content: center;
   align-items: center;
   flex-wrap: wrap;

}

.frb-footer-button {

   color: var(--frb-muted);
   font-size: 12px;
   text-transform: uppercase;
   padding: 8px 10px;
   height: 45px;

}

.frb-footer-button:hover {

   color: var(--wmui-base0);

}

/* Close button icon */ .frb-close-x {

   margin-bottom: -3px;
   width: 13px;
   height: 13px;

} .frb-close-x {

   stroke: currentColor;

}

/* RML link */

  1. frb-inline .frb-rml-link {
   color: var(--frb-link);
   font-weight: bold;

}

  1. frb-inline .frb-rml-link:hover,
  2. frb-inline .frb-rml-link:focus {
   color: var(--frb-link-hover);

}

/* RML clock icon */ .frb-inline-rml-icon {

   margin-bottom: -2px;
   width: 13px;
   height: 13px;

} .frb-inline-rml-icon path {

   fill: currentColor;

} .frb-inline-rml-icon circle {

   stroke: currentColor;

}

/* --- Smallprint --- */

.frb-smallprint {

   font-size: 12px;
   line-height: 1.5;
   color: var(--frb-muted);
   font-weight: normal;

}

.frb-smallprint a {

   color: var(--frb-muted);
   text-decoration: underline

}

.frb-smallprint a:hover, .frb-smallprint a:focus {

   color: var(--frb-muted-hover);
   text-decoration: underline

}

  1. frb-inline .recurring-details {
   display: none;

}

/* Bottom "nag" banner styles


*/

  1. frb-nag {
   z-index: 100;
   position: fixed;
   left: 2.5%;
   bottom: 0;
   width: 95%;
   display: block;
   color: var(--frb-body);
   background-color: var(--wmui-base100);
   box-shadow: 0 0 15px 0 rgba(0,0,0,.7);
   border-radius: 10px 10px 0 0;
   padding: 16px;
   text-align: center;
   font-weight: bold;
   cursor: pointer;

}

  1. frb-nag:hover {
   text-decoration: none;

}

  1. frb-nag .frb-icon-info {
   height: 19px;
   width: 19px;
   margin-bottom: -3px;
   padding-right: 4px;

}

body.rtl #frb-nag .frb-icon-info {

   padding-right: 0;
   padding-left: 4px;

}

  1. frb-nag .frb-btn {
   display: inline-block;
   padding: 8px 10px;
   min-height: 44px;
   font-size: 14px;

}

.frb-nag-message {

   vertical-align: middle;
   margin-bottom: 10px;
   padding: 0 20px;

} .frb-nag-message:hover {

   text-decoration: underline;

}

.frb-nag-close {

   position: absolute;
   display: block;
   top: -6px;
   right: -6px;
   width: 44px;
   height: 44px;
   padding: 10px;
   cursor: pointer;
   transition: all .25s ease-in-out;

} body.rtl .frb-nag-close {

   right: auto;
   left: 0;

} .frb-nag-close g {

   fill: var(--frb-muted);

}

.frb-icon-nag-close {

   width: 21px;
   height: 21px;

}

/* give the footer padding so it's visible above the nag */ .minerva-footer {

   padding-bottom: 140px;

}

/*!--- Focus styles ----*/

/*Outline reset*/ .frb-submit:focus,

  1. frb-amt-other-input:focus,

.email_input:focus {

   outline: 0;

}

.frb-submit:focus, .frb-form input[type="radio"]:checked:focus + label, .email_input:focus,

  1. frb-form .frb-amt-other.is-focused .frb-btn,
  2. frb-form .frb-button--is-focused .frb-btn {
   border-color: var(--frb-button-border-focus);
   box-shadow: inset 0 0 0 2px var(--frb-button-border-focus), inset 0 0 0 3px var(--wmui-base100);

}

/* Email optin */ .frb-optin-no-prompt {

   display: none;
   clear: both;
   padding: 6px 8px;
   border: 1px solid var(--wmui-red-dark);
   background-color: var(--wmui-red-light);
   border-radius: 2px;
   font-weight: normal;
   margin-top: 8px;

}

.frb-optin-no-prompt.is-positive {

   border-color: var(--wmui-green-dark);
   background-color: var(--wmui-green-light);
   font-weight: bold;

}

.frb-optin-no-prompt__yes {

   display: none;

}

.frb-optin-no-prompt__no {

   display: block;

}

.frb-optin-no-prompt.is-positive .frb-optin-no-prompt__yes {

   display: block;

}

.frb-optin-no-prompt.is-positive .frb-optin-no-prompt__no {

   display: none;

}

.frb-optin-legal {

   font-size: 14px;
   margin-top: 8px !important;

}

/* Monthly convert step */

.frb-step-upsell, .frb-step-monthly-diff-amt {

   text-align: center;

}

.frb-step-upsell .frb-submit, .frb-step-upsell .frb-btn-simple {

   margin-top: 12px;

}

.frb-step-upsell .frb-btn-simple {

   font-weight: bold;

}

.frb-step-monthly-diff-amt .frb-amt-monthly {

   display: block;
   padding: 0 4px 10px 4px;

}

.frb-icon-heart path {

   fill: #900;

}

.frb-step-monthly-diff-amt .frb-amt-monthly label {

   display: block;
   font-size: 15px;
   line-height: 1.3;
   font-weight: normal;
   margin: .5em 0;

}

  1. frb-amt-monthly-other-input {
   text-align: center;
   font-size: 18px;

}

.frb-step-monthly-diff-amt {

   display: none;
   text-align: center;

}

/* New RML Nag Styles */

  1. frb-nag .frb-btn-btxt {
   background-color: var(--frb-primary);
   border: 1px solid var(--frb-primary);
   color: var(--wmui-base100);
   transition: background 100ms, color 100ms;
   text-transform: uppercase;

}

  1. frb-nag .frb-btn-btxt:active {
   background-color: var(--wmui-base0);
   color: var(--wmui-base100);

}

  1. frb-nag.active .frb-nag-action {
   display: none;

}

/* --- Disable I already donated --- */ .frb.frb-iad-disabled .frb-iad {

   display: none;

}


/* CTA first */

.frb-cta-first {

   display: flex;
   flex-wrap: wrap;
   justify-content: center;
   align-items: center;

}

.frb-cta-first .frb-btn-cta {

   margin-top: 0;
   padding: 10px 25px 10px 10px;
   font-size: 16px;
   font-weight: 600;
   height: 45px;
   width: auto;
   position: relative;

}

.frb-cta-first .frb-btn-cta::after {

   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6.7 12'%3E%3Cpath d='M.9 0L0 .9 5.1 6 0 11.1l.9.9 5.5-5.5c.3-.3.3-.7 0-.9L.9 0z' fill='%23fff'/%3E%3C/svg%3E");
   content: ' ';
   position: absolute;
   top: 50%;
   right: 10px;
   width: 7px;
   height: 12px;
   transform: translateY(-50%);

}

.frb-btn-simple {

   background-color: transparent;
   border: 0;
   color: var(--frb-link);
   font-weight: normal;
   padding: 10px 12px;
   font-size: 15px;

}

.frb-btn-simple:hover {

   text-decoration: underline;
   color: var(--frb-link-hover);

}

.frb-btn-simple:focus {

   box-shadow: none;
   text-decoration: underline;
   color: var(--frb-link-hover);

}

.frb-updating-time {

   font-variant-numeric: tabular-nums;
   white-space: nowrap;

}

/* wmf identity */

.frb-wmf-identity {

   position: relative;
   clear: both;
   padding: 0 10px;
   color: var(--wmui-base0);
   line-height: 1.3;
   display: flex;
   justify-content: center;
   margin: 5px 0 6px;

}

.frb-wmf-identity-logo {

   flex: 0 0 85px;
   max-width: 85px;
   display: flex;
   align-items: center;
   margin: 0 10px 0 0;

}

.frb-wmf-identity-logo img {

   width: 100%;
   max-width: 100%;

}

.frb-wmf-identity-message {

   flex: 0 1 auto;
   align-items: center;
   padding-left: 5px;
   color: var(--wmui-base20);
   font-size: 13px;
   line-height: 1.3;
   margin: 5px;
   text-align: center;

}

.frb-submit-txt-donate { display: none; } .frb-submit-txt-once { display: inline; } .frb-submit-txt-monthly { display: none; } .form-monthly .frb-submit-txt-once { display: none; } .form-monthly .frb-submit-txt-monthly { display: inline; }

/* -- Dialogs -- */

/* Don't allow scrolling body when a dialog is open */ body:has( .frb-dialog[open] ) {

   overflow: hidden;

}

.frb-dialog {

   display: none; /* needed for unsupported browsers */
   background: var(--wmui-base100);
   color: var(--wmui-base0);
   border: 1px solid var(--wmui-base50);;
   border-radius: 2px;
   box-shadow: 0 2px 2px #0003;
   width: 90%;
   max-width: 600px;
   padding: 50px 20px 20px;

}

@media (min-width: 720px) {

   .frb-dialog {
       padding: 50px 40px 40px;
   }

}

.frb-dialog[open] {

   display: block;

}

.frb-dialog::backdrop {

   background: #ffffffa6;

}

.frb-dialog-back {

   border: none;
   background: none;
   margin: 0;
   padding: 0;
   cursor: pointer;
   position: absolute;
   top: 20px;
   left: 20px;
   width: 20px;
   height: 20px;
   opacity: 0.5;

} .frb-dialog-back:hover {

   opacity: 1;

}

.frb-dialog-title {

   font-size: 17px;
   color: var(--wmui-base10);
   font-weight: bold;
   border: 0;
   text-align: center;
   margin-bottom: 20px;

}

.frb-dialog-text {

   font-size: 15px;
   line-height: 1.44;
   margin-bottom: 20px;
   max-width: 530px;

}

/* -- I already donated -- */

.frb-iad-buttons {

   display: flex;
   flex-wrap: wrap;
   justify-content: center;

}

.frb-iad-buttons .frb-btn {

   width: 100%;
   margin: 8px 0;
   line-height: 1.2;
   color: #007de2;

}

.frb-iad-buttons .frb-btn:hover{

   background-color: #eaf3ff;
   color: #007de2;

}

@media (min-width: 720px) {

   #frb-dialog-iad {
       text-align: center;
   }
   .frb-iad-buttons .frb-btn {
       margin: 0 8px;
       width: 165px;
   }

}

/* --- Maybe later --- */

.frb-rml-disabled .frb-rml, .frb-rml-disabled .frb-rml-link, .frb-rml-disabled #nag-rml-btn {

   display: none !important;

}

.frb-rml-form-legend {

   display: block;
   margin: 0 0 4px;
   padding: 0;
   font-weight: normal;
   text-align: inherit;
   font-size: 14px;
   line-height: 1.2142857143;
   color: var(--frb-muted);

}

.frb-rml-form input {

   width: 100%;
   padding: 4px 8px;
   border: 1px solid var(--wmui-base50);
   border-radius: 2px;
   color: var(--wmui-base0);
   font-size: 16px;
   height: 45px;
   margin-bottom: 20px;

}

  1. frb-rml-email.frb-haserror {
   border-color: var(--frb-error) !important;
   box-shadow: inset 0 0 0 1px var(--frb-error) !important;

}

.frb-error-invalidemail {

   margin: 2px 0 0 !important;

}

.frb-dialog .frb-smallprint {

   margin-top: 20px;

}

.frb-rml-ty {

   text-align: center;
   font-size: 15px;
   line-height: 1.44;

}

/* --- Monthly Pitch --- */

/* latin-ext */ @font-face {

   font-family: 'Caveat Brush';
   font-style: normal;
   font-weight: 400;
   font-display: block;
   src: url('https://upload.wikimedia.org/wikipedia/donate/5/51/Caveat-brush-v6-latin-ext-regular.woff2') format('woff2');
   unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;

} /* latin */ @font-face {

   font-family: 'Caveat Brush';
   font-style: normal;
   font-weight: 400;
   font-display: block;
   src: url('https://upload.wikimedia.org/wikipedia/donate/7/75/Caveat-brush-v6-latin-regular.woff2') format('woff2');
   unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;

}

.frb-monthly-pitch, .frb-monthly-pitch-thanks {

   font-size: 18px;
   line-height: 1.2;
   color: #3e54b7;
   padding-top: 8px !important;
   padding-bottom: 15px;
   font-family: 'Caveat Brush', auto;
   text-align: center;
   margin: auto;

}

.frb-monthly-pitch {

   max-width: 100%;
   padding: 0 65px 15px 20px;
   text-align: right;
   margin: 0;
   position: relative;

}

.frb-monthly-pitch-arrow {

   width: 18px;
   height: 18px;
   position: absolute;
   right: 40px;
   margin: 0;
   top: 6px;

}

.frb-monthly-pitch-thanks {

   display: none;
   text-align: center;
   padding-right: 32px;
   padding-left: 24px;
   max-width: 310px;
   margin: auto;

}

.frb-monthly-pitch-thanks-heart {

   width: 26px;
   height: 26px;
   margin-left: 0;
   margin-right: 3px;
   margin-top: -2px;
   float: left;

}

.form-monthly .frb-monthly-pitch { display: none; } .form-monthly .frb-monthly-pitch-thanks { display: block; }

</style>

<dialog id="frb-dialog-form" class="frb frb-dialog">

   <form id="frb-form" class="frb-form">
           <button class="frb-dialog-close frb-dialog-back" aria-label="{{{FR2015_translations,back}}}">
               <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 16"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.778" d="M7.181 13.285L.753 7 7.181.715"></path><rect fill="#000" width="18.182" height="1.778" x=".818" y="6.111" rx=".889"></rect></g></svg>
           </button>
               There are 60 million articles and counting on Wikipedia in different languages. It's the biggest free educational resource in human history. While Wikipedia is written by volunteers, hosting isn't free, and neither is all the other work we do to make sure Wikipedia continues growing for many years to come. We're building this not just for today, but for generations to come. That's why we're inviting you to support the not-for-profit organization that keeps Wikipedia online. Just 2% of Wikipedia readers donate each year. Join us, and support this free resource forever. Thank you.
           <fieldset class="frb-amounts">
               <legend>
                   {{{FR2015_translations,please-select-amount}}} (). {{{FR2015_translations,average-donation}}}
               </legend>
  • <input name="amount" type="radio" id="frb-amt-ps1" value="2.75"> <label for="frb-amt-ps1" class="frb-btn">$2.75</label>
  • <input name="amount" type="radio" id="frb-amt-ps2" value="5"> <label for="frb-amt-ps2" class="frb-btn">$5</label>
  • <input name="amount" type="radio" id="frb-amt-ps3" value="10"> <label for="frb-amt-ps3" class="frb-btn">$10</label>
  • <input name="amount" type="radio" id="frb-amt-ps4" value="20"> <label for="frb-amt-ps4" class="frb-btn">$20</label>
  • <input name="amount" type="radio" id="frb-amt-ps5" value="30"> <label for="frb-amt-ps5" class="frb-btn">$30</label>
  • <input name="amount" type="radio" id="frb-amt-ps6" value="50"> <label for="frb-amt-ps6" class="frb-btn">$50</label>
  • <input name="amount" type="radio" id="frb-amt-ps7" value="100"> <label for="frb-amt-ps7" class="frb-btn">$100</label>
  • <input id="frb-input-other" class="frb-radio" type="radio" name="amount" value="Other" /> <label class="frb-btn"> {{{FR2015_translations,other}}} ($) <input name="otherAmount" id="frb-amt-other-input" class="frb-other-input" type="text" inputmode="decimal" value="" tabindex="-1" dir="ltr" /> </label>
           </fieldset>
           <fieldset class="frb-frequency">
               <legend class="error-highlight">{{{FR2015_translations,how-often}}}</legend>
  • <input class="frb-radio" id="frb-frequency-onetime" type="radio" name="frequency" onchange="frb.toggleMonthly(false);" value="onetime" checked /> <label for="frb-frequency-onetime" class="frb-btn">{{{FR2015_translations,one-time}}}</label>
  • <input class="frb-radio" id="frb-frequency-monthly" type="radio" name="frequency" onchange="frb.toggleMonthly(true);" value="monthly"/> <label for="frb-frequency-monthly" class="frb-btn">{{{FR2015_translations,give-monthly}}}</label>
                   <svg class="frb-monthly-pitch-arrow" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="18" width="18" viewBox="0 0 57.3 50.8">
                       <path fill="currentColor" d="M-.1 46.2c0 2.1 1.7 3.8 3.9 4 3.4.3 6.8.5 10.2.5 2.2 0 4.4-.1 6.5-.2 2.8-.2 5.2-.4 7.4-.7 2.7-.4 4.7-1.2 6.4-2.7 3.3-2.9 4-7.5 4.4-11.5.7-6.5.9-13.2.7-20 3.5 3.8 7.3 7.4 11.1 10.8 1.7 1.4 4.1 1.4 5.6-.1.8-.8 1.2-1.9 1.2-3s-.5-2-1.2-2.7C49.8 15 43.8 8.8 38.2 2.3c-.3-.7-.9-1.4-1.6-1.8-1.8-1-4.2-.4-5.4 1.4-2.4 3.7-5.1 7.1-8.1 10.3-.8.8-1.7 1.6-2.6 2.5-2.4 2.3-4.8 4.5-6.2 7.6-.9 2-.3 4.2 1.5 5.3.9.5 2.2.7 3.3.3 1-.3 1.8-1 2.2-1.9.7-1.6 1.9-2.8 3.2-4.1 1.5-1.4 3.2-3 4.7-4.7l2.1-2.4c.1 2.3.1 4.6.1 6.9-.1 4.4-.3 8.8-.7 13.2v.5c-.2 2-.5 5.2-2.1 6.1-.9.5-2.3.6-3.6.7-.4 0-.7.1-1 .1-2.1.2-4.3.3-6.5.4-4.3.1-8.8 0-13.3-.4-1-.1-2 .3-2.8 1-.7.8-1.3 1.9-1.5 2.9z" />
                   </svg>
                   {{{FR2015_translations,monthly-pitch}}}
                   <svg class="frb-monthly-pitch-thanks-heart" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 31 31">
                       <circle fill="#e8e9eb" cx="15.5" cy="15.5" r="15"/>
                       <path fill="#ff3079" d="M26.71 16.039h-1.756a.618.618 0 0 1 0-1.237h1.756a.618.618 0 0 1 0 1.237zm-3.332 7.92a.618.618 0 0 1-.433-.18l-1.237-1.236a.618.618 0 1 1 .878-.872l1.237 1.237a.618.618 0 0 1-.439 1.057l-.006-.006zM22.333 9.41a.618.618 0 0 1-.445-.191.618.618 0 0 1 0-.872l1.236-1.237a.645.645 0 0 1 .897.928l-1.237 1.236a.618.618 0 0 1-.451.136zM5.96 16.113H4.204a.618.618 0 0 1 0-1.237H5.96a.618.618 0 0 1 0 1.237zm2.82-6.684a.618.618 0 0 1-.44-.18L7.105 8.014a.618.618 0 1 1 .872-.878l1.237 1.237c.24.24.24.63 0 .872a.618.618 0 0 1-.433.185zm-1.46 14.53a.618.618 0 0 1-.426-1.082l1.237-1.237a.619.619 0 0 1 .859.89l-1.237 1.237a.618.618 0 0 1-.432.192z"/>
                       <path fill="#336bf2" d="M18.462 10.765c-1.923.222-2.776 2.077-2.961 2.553a.043.043 0 1 1-.087 0c-.185-.476-1.039-2.33-2.962-2.553-1.28-.155-3.66.513-3.66 3.95 0 4.329 6.251 7.797 6.647 8.038a.037.037 0 0 0 .037 0c.396-.216 6.647-3.666 6.647-8.038 0-3.437-2.38-4.105-3.66-3.95Z"/>
                   </svg>
                   {{{FR2015_translations,monthly-pitch-thankyou}}}
           </fieldset>
           <fieldset class="frb-methods">
               <legend>{{{FR2015_translations,select-payment-method-please}}}</legend>
                       <input id="frb-pm-cc" type="radio" name="frb-methods" class="frb-radio" onchange="frb.setMethod({ method:'cc' });"/>
                       <label for="frb-pm-cc" class="frb-label">
                           {{{FR2015_translations,pm-creditcard}}}
                           
                               <svg class="frb-cc-logo-visa" xmlns="http://www.w3.org/2000/svg" aria-labelledby="frb-cc-logo-visa-title" viewBox="0 0 200 120"><title id="frb-cc-logo-visa-title">Visa</title><path fill="#FFFFFF" d="M7.7 0h184.6c4.2 0 7.7 3.3 7.7 7.5v105c0 4.1-3.4 7.5-7.7 7.5H7.7c-4.2 0-7.7-3.3-7.7-7.5V7.5C0 3.3 3.4 0 7.7 0z"/><path fill="#F7B600" d="M0 98v14.3c0 4.2 3.4 7.7 7.7 7.7h184.6c4.2 0 7.7-3.4 7.7-7.7V98H0z"/><path fill="#1A1F71" d="M200 22V7.7c0-4.2-3.4-7.7-7.7-7.7H7.7C3.4 0 0 3.4 0 7.7V22h200zM81.9 36.9L62.3 83.4H49.4l-9.6-37.2c-.6-2.3-1.1-3.1-2.8-4.1-3.8-1.8-7.8-3.1-12-3.9l.2-1.4h20.6c2.8 0 5.1 2 5.6 4.8l5.1 26.9 12.6-31.7h12.8zm50.3 31.3c0-12.3-17-13-16.9-18.4 0-1.7 1.6-3.4 5.2-3.9 4.1-.4 8.2.3 12 2.1l2.1-9.8c-3.6-1.4-7.5-2.1-11.4-2.1-12 0-20.4 6.4-20.5 15.3-.1 6.8 6 10.4 10.6 12.6s6.3 3.8 6.3 5.8c0 3.1-3.8 4.5-7.3 4.5-4.3.1-8.6-.9-12.5-2.9l-2.2 10.2c4.3 1.7 8.9 2.5 13.5 2.5 12.7 0 20.9-6.2 21.1-15.9m31.6 15.2H175l-9.8-46.5h-10.4c-2.3 0-4.3 1.3-5.2 3.4l-18.3 43.1H144l2.5-7h15.6l1.7 7zm-13.6-16.5l6.4-17.4 3.7 17.4h-10.1zm-51-30l-10 46.5H77.1l10-46.5h12.1z"/></svg>
                               <svg class="frb-cc-logo-mastercard" xmlns="http://www.w3.org/2000/svg" aria-labelledby="frb-cc-logo-mastercard-title" viewBox="0 0 200 120"><title id="frb-cc-logo-mastercard-title">MasterCard</title><path d="M192.3 120H7.7c-4.2 0-7.7-3.4-7.7-7.5V7.5C0 3.4 3.5 0 7.7 0h184.6c4.2 0 7.7 3.4 7.7 7.5v105c0 4.1-3.5 7.5-7.7 7.5z"/><g id="Layer_1-2"><path id="_Compound_Path_" fill="#FFFFFF" d="M61.9 106.5v-6.2c.2-2-1.3-3.7-3.3-3.9h-.5c-1.4-.1-2.7.6-3.5 1.8-.7-1.1-1.9-1.8-3.3-1.8-1.2-.1-2.3.5-3 1.5v-1.2h-2v9.9h2v-5.7c-.1-1.3.8-2.5 2.1-2.6h.4c1.4 0 2.2.9 2.2 2.6v5.7h2v-5.7c-.1-1.3.8-2.5 2.1-2.6h.4c1.5 0 2.2.9 2.2 2.6v5.7l2.2-.1zm32.1-10h-3.6v-3h-2v3h-2.1v1.8h2.1v4.7c0 2.3.8 3.7 3.3 3.7.9 0 1.9-.3 2.7-.8l-.6-1.8c-.6.3-1.2.5-1.9.6-1 0-1.5-.7-1.5-1.7v-4.8H94v-1.7zm18.3-.2c-1.1 0-2.1.5-2.7 1.5v-1.2h-2v9.9h2v-5.6c0-1.6.8-2.7 2.2-2.7.5 0 .9.1 1.3.2l.7-1.9c-.5-.1-1-.2-1.5-.2zm-27.7 1c-1.2-.7-2.6-1.1-4-1-2.5 0-4 1.2-4 3.1 0 1.6 1.1 2.6 3.3 2.9l1 .1c1.2.2 1.8.6 1.8 1.1 0 .8-.9 1.3-2.3 1.3-1.2 0-2.3-.3-3.3-1l-1 1.6c1.3.9 2.7 1.3 4.3 1.3 2.8 0 4.4-1.3 4.4-3.2 0-1.9-1.2-2.6-3.3-2.9l-1-.1c-.9-.1-1.8-.4-1.8-1s.8-1.2 2-1.2c1.1 0 2.1.3 3.1.9l.8-1.9zm29.9 4.2c-.1 2.7 2 5.1 4.7 5.2h.5c1.3.1 2.6-.4 3.5-1.2l-1-1.6c-.7.6-1.6.9-2.6.9-1.8-.2-3.2-1.8-3-3.7.2-1.6 1.4-2.9 3-3 .9 0 1.8.3 2.6.9l1-1.6c-1-.8-2.3-1.2-3.5-1.2-2.7-.1-5 2-5.2 4.7v.6zm-13.9-5.2c-2.9 0-4.9 2.1-4.9 5.2-.2 2.7 1.9 5 4.5 5.2h.5c1.5.1 2.9-.4 4-1.4l-1-1.5c-.8.7-1.8 1-2.9 1-1.5.1-2.8-1-3-2.5h7.4v-.8c.1-3.1-1.8-5.2-4.6-5.2zm0 1.8c1.4 0 2.5 1 2.6 2.4v.1h-5.3c.1-1.4 1.3-2.5 2.7-2.5zm-26.7 3.4v-4.9h-2v1.2c-.8-1-2-1.5-3.2-1.5-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2 1.2.1 2.4-.5 3.2-1.5v1.2h2v-4.9zm-7.9 0c-.1-1.7 1.1-3.2 2.8-3.4h.3c1.8.2 3.2 1.8 3 3.7-.2 1.6-1.4 2.9-3 3-1.7 0-3.1-1.4-3.1-3.1-.1 0-.1-.1 0-.2zm76.1-5.2c-1.1 0-2.1.5-2.7 1.5v-1.2h-2v9.9h2v-5.6c0-1.6.8-2.7 2.2-2.7.5 0 .9.1 1.3.2l.7-1.9c-.5-.1-1-.2-1.5-.2zm15.8 8.7c.1 0 .3 0 .4.1.1 0 .2.1.3.2.1.1.2.2.2.3.1.2.1.5 0 .8-.1.1-.1.2-.2.3-.1.1-.2.2-.3.2-.1.1-.3.1-.4.1-.4 0-.8-.2-.9-.6-.1-.2-.1-.5 0-.8.1-.1.1-.2.2-.3.1-.1.2-.2.3-.2.2 0 .3-.1.4-.1zm0 1.8c.1 0 .2 0 .3-.1.1 0 .2-.1.2-.2.3-.3.3-.7 0-1l-.2-.2c-.1 0-.2-.1-.3-.1-.1 0-.2 0-.3.1-.1 0-.2.1-.2.2-.3.3-.3.7 0 1 .1.1.2.1.2.2.1.1.2.1.3.1zm.1-1.2c.1 0 .2 0 .3.1.1.1.1.1.1.2s0 .1-.1.2-.1.1-.2.1l.3.3h-.2l-.3-.3h-.1v.3h-.2v-.9h.4zm-.2.1v.2h.3v-.2h-.3zm-23.3-4.2v-5h-2v1.2c-.8-1-2-1.5-3.2-1.5-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2 1.2.1 2.4-.5 3.2-1.5v1.2h2v-4.8zm-8 0c-.1-1.7 1.1-3.2 2.8-3.4h.3c1.8.2 3.2 1.8 3 3.7-.2 1.6-1.4 2.9-3 3-1.7 0-3.1-1.4-3.1-3.1v-.2zm27.9 0v-9h-2v5.2c-.8-1-2-1.5-3.2-1.5-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2 1.2.1 2.4-.5 3.2-1.5v1.2h2v-4.8zm-8 0c-.1-1.7 1.1-3.2 2.8-3.4h.3c1.8.3 3.1 2 2.8 3.9-.2 1.5-1.4 2.6-2.8 2.8-1.7 0-3.1-1.4-3.1-3.1-.1 0-.1-.1 0-.2z"/><g id="_Group_"><path fill="#FF5F00" d="M83.9 21h32.4v58.7H83.9z"/><path id="_Path_2" fill="#EB001B" d="M86 50.3C86 38.8 91.2 28 100.2 21c-16.1-12.7-39.4-9.9-52.1 6.3S38.2 67 54.3 79.7c13.4 10.6 32.4 10.6 45.8 0C91.2 72.6 86 61.8 86 50.3z"/><path fill="#F79E1B" d="M156.6 73.5v-1.2h.5V72h-1.2v.2h.5v1.2h.2zm2.4 0V72h-.4l-.4 1-.4-1h-.4v1.5h.3v-1.1l.4.9h.3l.4-.9v1.1h.2zm1.2-23.2c0 20.6-16.6 37.3-37.1 37.3-8.3 0-16.4-2.8-22.9-8 16.1-12.7 18.9-36.2 6.2-52.4-1.8-2.3-3.9-4.4-6.2-6.3 16.1-12.7 39.4-9.9 52.1 6.3 5.1 6.6 7.9 14.8 7.9 23.1z"/></g></g></svg>
                               <svg class="frb-cc-logo-amex" xmlns="http://www.w3.org/2000/svg" aria-labelledby="frb-cc-logo-amex-title" viewBox="0 0 200 120"><title id="frb-cc-logo-amex-title">Amex</title><linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="187.342" y1="3564.816" x2="13.247" y2="3503.596" gradientTransform="translate(0 -3474.102)"><stop offset="0" stop-color="#51BCEA"/><stop offset="1" stop-color="#3078BC"/></linearGradient><path fill="url(#SVGID_1_)" d="M192.3 120H7.7c-4.2 0-7.7-3.5-7.7-7.7V7.7C0 3.5 3.5 0 7.7 0h184.6c4.2 0 7.7 3.5 7.7 7.7v104.7c0 4.1-3.5 7.6-7.7 7.6z"/><path fill="#FFFFFF" d="M162.8 60.1L179 42.5h-11L157.4 54l-10.2-11.5h-33.4v35h32.9l10.6-11.6 10.2 11.6h10.8l-15.5-17.4zm-20.3 10.1H122v-7h18.2V56H122v-6.4h20.8l9.1 10.2-9.4 10.4zm-95-7.7l-5.6-13.9-5.6 13.9m74.4 15h-8.5V50.1L90.1 77.5h-7.3L70.7 50.1v27.4h-17l-3.2-7.8H33.2L30 77.5h-9l14.9-35h12.3l14.1 33.1V42.5H76l10.9 23.7 10-23.7h13.8v35z"/></svg>
                               <svg class="frb-cc-logo-jcb" xmlns="http://www.w3.org/2000/svg" aria-labelledby="frb-cc-logo-jcb-title" viewBox="0 0 200 120"><title id="frb-cc-logo-jcb-title">JCB</title><path fill="#FFFFFF" d="M193.1 0H7.7C3.4 0 0 3.3 0 7.5v105c0 3.9 3.1 7.1 6.9 7.5h185.4c4.3 0 7.7-3.4 7.7-7.5V7.5c0-3.9-3.1-7.1-6.9-7.5z"/><linearGradient id="path6338_1_" gradientUnits="userSpaceOnUse" x1="-227.894" y1="959.936" x2="-209.808" y2="959.936" gradientTransform="matrix(2.0492 0 0 -2.0492 590.04 2032.794)"><stop offset="0" stop-color="#007940"/><stop offset=".229" stop-color="#00873F"/><stop offset=".743" stop-color="#40A737"/><stop offset="1" stop-color="#5CB531"/></linearGradient><path id="path6338" fill="url(#path6338_1_)" d="M130.4 69.6h8.7c.2 0 .8-.1 1.1-.1 1.6-.3 3.1-1.8 3.1-3.9 0-2-1.4-3.5-3.1-3.9-.2-.1-.7-.1-1.1-.1h-8.7v8z"/><linearGradient id="path6349_1_" gradientUnits="userSpaceOnUse" x1="-227.894" y1="962.732" x2="-209.823" y2="962.732" gradientTransform="matrix(2.0492 0 0 -2.0492 590.04 2032.794)"><stop offset="0" stop-color="#007940"/><stop offset=".229" stop-color="#00873F"/><stop offset=".743" stop-color="#40A737"/><stop offset="1" stop-color="#5CB531"/></linearGradient><path id="path6349" fill="url(#path6349_1_)" d="M138.1 15c-8.2 0-15 6.7-15 15v15.6h21.2c.5 0 1.1 0 1.5.1 4.8.2 8.3 2.7 8.3 7 0 3.4-2.4 6.3-6.8 6.8v.2c4.9.3 8.6 3 8.6 7.3 0 4.5-4.1 7.5-9.6 7.5H123V105h22c8.2 0 15-6.7 15-15V15h-21.9z"/><linearGradient id="path6360_1_" gradientUnits="userSpaceOnUse" x1="-227.894" y1="965.808" x2="-209.807" y2="965.808" gradientTransform="matrix(2.0492 0 0 -2.0492 590.04 2032.794)"><stop offset="0" stop-color="#007940"/><stop offset=".229" stop-color="#00873F"/><stop offset=".743" stop-color="#40A737"/><stop offset="1" stop-color="#5CB531"/></linearGradient><path id="path6360" fill="url(#path6360_1_)" d="M142.1 53.7c0-2-1.4-3.3-3.1-3.5-.2 0-.6-.1-.8-.1h-7.8v7.3h7.8c.2 0 .7 0 .8-.1 1.7-.3 3.1-1.7 3.1-3.6z"/><linearGradient id="path6371_1_" gradientUnits="userSpaceOnUse" x1="-268.384" y1="962.752" x2="-250.018" y2="962.752" gradientTransform="matrix(2.0492 0 0 -2.0492 590.04 2032.794)"><stop offset="0" stop-color="#1F286F"/><stop offset=".475" stop-color="#004E94"/><stop offset=".826" stop-color="#0066B1"/><stop offset="1" stop-color="#006FBC"/></linearGradient><path id="path6371" fill="url(#path6371_1_)" d="M55.1 15c-8.2 0-15 6.7-15 15v37c4.2 2.1 8.6 3.4 12.9 3.4 5.2 0 8-3.1 8-7.4V45.5h12.9v17.4c0 6.8-4.2 12.3-18.5 12.3-8.7 0-15.4-1.9-15.4-1.9v31.6h22c8.2 0 15-6.7 15-15V15H55.1z"/><linearGradient id="path6384_1_" gradientUnits="userSpaceOnUse" x1="-248.235" y1="962.712" x2="-230.398" y2="962.712" gradientTransform="matrix(2.0492 0 0 -2.0492 590.04 2032.794)"><stop offset="0" stop-color="#6C2C2F"/><stop offset=".173" stop-color="#882730"/><stop offset=".573" stop-color="#BE1833"/><stop offset=".859" stop-color="#DC0436"/><stop offset="1" stop-color="#E60039"/></linearGradient><path id="path6384" fill="url(#path6384_1_)" d="M96.6 15c-8.2 0-15 6.7-15 15v19.6c3.8-3.2 10.4-5.3 21-4.8 5.7.2 11.8 1.8 11.8 1.8V53c-3.1-1.6-6.7-3-11.4-3.3-8.1-.6-12.9 3.4-12.9 10.3 0 7 4.9 11 12.9 10.3 4.7-.3 8.3-1.8 11.4-3.3v6.3s-6 1.6-11.8 1.8c-10.6.5-17.2-1.6-21-4.8V105h22c8.2 0 15-6.7 15-15V15h-22z"/></svg>
                               <svg class="frb-cc-logo-discover" xmlns="http://www.w3.org/2000/svg" aria-labelledby="frb-cc-logo-discover-title" viewBox="0 0 200 120"><title id="frb-cc-logo-discover-title">Discover</title><path fill="#FFFFFF" d="M192.3 120H7.7c-4.2 0-7.7-3.5-7.7-7.7V7.7C0 3.5 3.5 0 7.7 0h184.6c4.2 0 7.7 3.5 7.7 7.7v104.7c0 4.1-3.5 7.6-7.7 7.6z"/><path fill="#E77730" d="M47.5 120h144.8c4.2 0 7.7-3.5 7.7-7.7V64.6s-21.5 15.4-61.9 31C104 108.9 57 118.2 47.5 120z"/><path fill="#211E1E" d="M26.6 54.2c-1.8 1.6-4 2.3-7.6 2.3h-1.5V37.8H19c3.6 0 5.8.6 7.6 2.3 1.9 1.7 3.1 4.4 3.1 7 0 2.7-1.2 5.4-3.1 7.1m-6.5-21.3h-8.2v28.2H20c4.3 0 7.4-1 10.2-3.3 3.3-2.7 5.2-6.7 5.2-10.8 0-8.2-6.3-14.1-15.3-14.1M38 61.3h5.6V32.9H38v28.4zm19.1-17.5c-3.3-1.2-4.3-2-4.3-3.6 0-1.8 1.8-3.2 4.1-3.2 1.7 0 3 .7 4.5 2.3l2.9-3.8c-2.4-2.1-5.3-3.2-8.4-3.2-5.1 0-8.9 3.5-8.9 8.1 0 3.9 1.8 5.9 7 7.7 2.2.8 3.3 1.3 3.8 1.6 1.1.7 1.7 1.8 1.7 2.9 0 2.3-1.9 4-4.3 4-2.7 0-4.8-1.3-6.1-3.8l-3.6 3.5c2.6 3.8 5.6 5.3 9.9 5.3 5.8 0 9.8-3.8 9.8-9.2.2-4.3-1.7-6.3-8.1-8.6m10 3.3c0 8.3 6.6 14.8 15.1 14.8 2.4 0 4.5-.5 7-1.7v-6.5c-2.2 2.2-4.2 3.1-6.7 3.1-5.6 0-9.6-4.1-9.6-9.7 0-5.4 4.1-9.7 9.3-9.7 2.7 0 4.7 1 7 3.2V34c-2.4-1.2-4.5-1.8-6.9-1.8-8.4.1-15.2 6.7-15.2 14.9m66.2 4.9l-7.6-19h-6.1l12.1 29h3l12.4-29h-6l-7.8 19m16.3 9.3h15.8v-4.8h-10.2v-7.7h9.8V44h-9.8v-6.2h10.2v-4.9h-15.8M176.3 46h-1.6v-8.5h1.7c3.5 0 5.4 1.4 5.4 4.2-.1 2.7-2 4.3-5.5 4.3m11.1-4.6c0-5.2-3.7-8.3-10.1-8.3H169v28.2h5.6V49.9h.7l7.7 11.4h6.9l-9-11.9c4.2-.9 6.5-3.8 6.5-8"/><path fill="#E77731" d="M121.2 47.1c0 8.2-6.8 15-15.1 15S91 55.3 91 47.1s6.8-15 15.1-15c8.4 0 15.1 6.8 15.1 15"/><path fill="none" d="M106.3 32c-.6 0-1.2 0-1.8.1.2 0 .4 0 .6-.1.5.1.9.1 1.2 0h.8-.8M91.4 43.6c-.1.5-.2 1.1-.3 1.6 0 .2 0 .4-.1.5.1-.5.1-1 .2-1.5.1-.1.1-.3.2-.6"/></svg>
                           
                       </label>
                       <input id="frb-pm-pp" type="radio" name="frb-methods" class="frb-radio" onchange="frb.setMethod({ method:'paypal' });"/>
                       <label for="frb-pm-pp" class="frb-label">
                           <svg class="frb-logo-payments frb-logo-payments--paypal white-on-select" role="img" aria-labelledby="frb-logo-paypal-title" width="80" height="24" viewBox="0 0 80 24" xmlns="http://www.w3.org/2000/svg"><title id="frb-logo-paypal-title">{{{FR2015_translations,pm-paypal}}}</title><g fill-rule="nonzero" fill="none"><path d="M12.444 5.085H6.97a.763.763 0 0 0-.752.648L4.006 19.891c-.044.279.17.53.451.53H7.07a.762.762 0 0 0 .751-.647l.597-3.819a.762.762 0 0 1 .75-.648h1.733c3.606 0 5.686-1.76 6.23-5.248.245-1.526.01-2.724-.698-3.564-.778-.922-2.158-1.41-3.99-1.41zm.631 5.171c-.3 1.981-1.8 1.981-3.25 1.981h-.826l.579-3.7a.457.457 0 0 1 .45-.388h.379c.988 0 1.92 0 2.402.569.288.339.376.842.266 1.538zM28.803 10.193h-2.62a.458.458 0 0 0-.451.388l-.116.74-.184-.269c-.567-.83-1.832-1.108-3.095-1.108-2.896 0-5.37 2.213-5.851 5.317-.25 1.548.105 3.029.976 4.061.799.95 1.941 1.345 3.301 1.345 2.334 0 3.628-1.513 3.628-1.513l-.117.734c-.044.281.17.533.45.533h2.36a.763.763 0 0 0 .752-.648l1.416-9.05a.457.457 0 0 0-.449-.53zm-3.653 5.145c-.253 1.51-1.441 2.525-2.957 2.525-.76 0-1.37-.246-1.76-.713-.387-.464-.534-1.123-.411-1.858.236-1.497 1.444-2.544 2.937-2.544.744 0 1.35.25 1.748.72.399.475.557 1.139.443 1.87zM42.761 10.193h-2.634a.761.761 0 0 0-.63.336l-3.632 5.398-1.54-5.187a.764.764 0 0 0-.73-.547h-2.587a.46.46 0 0 0-.433.608l2.9 8.588-2.726 3.884a.46.46 0 0 0 .372.727h2.63c.25 0 .483-.123.625-.33l8.76-12.755a.46.46 0 0 0-.375-.722" fill="#283B82"/><path d="M51.48 5.085h-5.473a.762.762 0 0 0-.75.648l-2.214 14.158c-.044.279.17.53.45.53H46.3c.261 0 .485-.191.525-.453l.628-4.013a.762.762 0 0 1 .751-.648h1.732c3.606 0 5.686-1.76 6.23-5.248.246-1.526.01-2.724-.699-3.564-.777-.922-2.156-1.41-3.987-1.41zm.632 5.171c-.299 1.981-1.799 1.981-3.25 1.981h-.826l.58-3.7a.456.456 0 0 1 .45-.388h.379c.987 0 1.92 0 2.402.569.287.339.375.842.265 1.538zM67.84 10.193h-2.62a.455.455 0 0 0-.45.388l-.116.74-.184-.269c-.567-.83-1.832-1.108-3.094-1.108-2.897 0-5.37 2.213-5.851 5.317-.25 1.548.105 3.029.976 4.061.8.95 1.94 1.345 3.3 1.345 2.334 0 3.628-1.513 3.628-1.513l-.117.734c-.044.281.17.533.452.533h2.36a.762.762 0 0 0 .75-.648l1.417-9.05a.46.46 0 0 0-.452-.53zm-3.654 5.145c-.251 1.51-1.441 2.525-2.957 2.525-.76 0-1.37-.246-1.76-.713-.387-.464-.533-1.123-.41-1.858.237-1.497 1.444-2.544 2.936-2.544.744 0 1.35.25 1.748.72.4.475.56 1.139.443 1.87zM70.929 5.474L68.683 19.89c-.044.279.17.53.45.53h2.258a.761.761 0 0 0 .751-.647l2.215-14.157a.459.459 0 0 0-.45-.532H71.38a.458.458 0 0 0-.45.389" fill="#469BDB"/></g></svg>
                       </label>
                       <input id="frb-pm-applepay" type="radio" name="frb-methods" class="frb-radio" onchange="frb.setMethod({ method:'apple' });"/>
                       <label for="frb-pm-applepay" class="frb-label">
                           <svg class="frb-logo-payments frb-logo-payments--applepay white-on-select" role="img" aria-labelledby="frb-logo-applepay-title" width="58" height="24" viewBox="0 0 512 210.2" xmlns="http://www.w3.org/2000/svg"><title id="frb-logo-applepay-title">Apple Pay</title><path d="M93.6 27.1C87.6 34.2 78 39.8 68.4 39c-1.2-9.6 3.5-19.8 9-26.1 6-7.3 16.5-12.5 25-12.9 1 10-2.9 19.8-8.8 27.1m8.7 13.8c-13.9-.8-25.8 7.9-32.4 7.9-6.7 0-16.8-7.5-27.8-7.3-14.3.2-27.6 8.3-34.9 21.2-15 25.8-3.9 64 10.6 85 7.1 10.4 15.6 21.8 26.8 21.4 10.6-.4 14.8-6.9 27.6-6.9 12.9 0 16.6 6.9 27.8 6.7 11.6-.2 18.9-10.4 26-20.8 8.1-11.8 11.4-23.3 11.6-23.9-.2-.2-22.4-8.7-22.6-34.3-.2-21.4 17.5-31.6 18.3-32.2-10-14.8-25.6-16.4-31-16.8m80.3-29v155.9h24.2v-53.3h33.5c30.6 0 52.1-21 52.1-51.4s-21.1-51.2-51.3-51.2h-58.5zm24.2 20.4h27.9c21 0 33 11.2 33 30.9s-12 31-33.1 31h-27.8V32.3zM336.6 169c15.2 0 29.3-7.7 35.7-19.9h.5v18.7h22.4V90.2c0-22.5-18-37-45.7-37-25.7 0-44.7 14.7-45.4 34.9h21.8c1.8-9.6 10.7-15.9 22.9-15.9 14.8 0 23.1 6.9 23.1 19.6v8.6l-30.2 1.8c-28.1 1.7-43.3 13.2-43.3 33.2 0 20.2 15.7 33.6 38.2 33.6zm6.5-18.5c-12.9 0-21.1-6.2-21.1-15.7 0-9.8 7.9-15.5 23-16.4l26.9-1.7v8.8c0 14.6-12.4 25-28.8 25zm82 59.7c23.6 0 34.7-9 44.4-36.3L512 54.7h-24.6l-28.5 92.1h-.5l-28.5-92.1h-25.3l41 113.5-2.2 6.9c-3.7 11.7-9.7 16.2-20.4 16.2-1.9 0-5.6-.2-7.1-.4v18.7c1.4.4 7.4.6 9.2.6z"/></svg>
                       </label>
                       <input id="frb-pm-google" type="radio" name="frb-methods" class="frb-radio" onchange="frb.setMethod({ method:'google' });"/>
                       <label for="frb-pm-google" class="frb-label">
                           <svg class="frb-logo-payments frb-logo-payments--google" role="img" aria-labelledby="frb-logo-google-title" xmlns="http://www.w3.org/2000/svg" viewBox="170.7 170 752 400" width="48" height="24">
                               <title id="frb-logo-google-title">Google Pay</title>
                               <path fill="#FFF" d="M722.7 170h-352c-110 0-200 90-200 200s90 200 200 200h352c110 0 200-90 200-200s-90-200-200-200z"/><path fill="#3C4043" d="M722.7 186.2c24.7 0 48.7 4.9 71.3 14.5 21.9 9.3 41.5 22.6 58.5 39.5 16.9 16.9 30.2 36.6 39.5 58.5 9.6 22.6 14.5 46.6 14.5 71.3s-4.9 48.7-14.5 71.3c-9.3 21.9-22.6 41.5-39.5 58.5-16.9 16.9-36.6 30.2-58.5 39.5-22.6 9.6-46.6 14.5-71.3 14.5h-352c-24.7 0-48.7-4.9-71.3-14.5-21.9-9.3-41.5-22.6-58.5-39.5-16.9-16.9-30.2-36.6-39.5-58.5-9.6-22.6-14.5-46.6-14.5-71.3s4.9-48.7 14.5-71.3c9.3-21.9 22.6-41.5 39.5-58.5 16.9-16.9 36.6-30.2 58.5-39.5 22.6-9.6 46.6-14.5 71.3-14.5h352m0-16.2h-352c-110 0-200 90-200 200s90 200 200 200h352c110 0 200-90 200-200s-90-200-200-200z"/><g fill="#3C4043"><path d="M529.3 384.2v60.5h-19.2V295.3H561c12.9 0 23.9 4.3 32.9 12.9 9.2 8.6 13.8 19.1 13.8 31.5 0 12.7-4.6 23.2-13.8 31.7-8.9 8.5-19.9 12.7-32.9 12.7h-31.7v.1zm0-70.5v52.1h32.1c7.6 0 14-2.6 19-7.7 5.1-5.1 7.7-11.3 7.7-18.3 0-6.9-2.6-13-7.7-18.1-5-5.3-11.3-7.9-19-7.9h-32.1v-.1zM657.9 339.1c14.2 0 25.4 3.8 33.6 11.4 8.2 7.6 12.3 18 12.3 31.2v63h-18.3v-14.2h-.8c-7.9 11.7-18.5 17.5-31.7 17.5-11.3 0-20.7-3.3-28.3-10s-11.4-15-11.4-25c0-10.6 4-19 12-25.2 8-6.3 18.7-9.4 32-9.4 11.4 0 20.8 2.1 28.1 6.3v-4.4c0-6.7-2.6-12.3-7.9-17-5.3-4.7-11.5-7-18.6-7-10.7 0-19.2 4.5-25.4 13.6l-16.9-10.6c9.3-13.5 23.1-20.2 41.3-20.2zm-24.8 74.2c0 5 2.1 9.2 6.4 12.5 4.2 3.3 9.2 5 14.9 5 8.1 0 15.3-3 21.6-9s9.5-13 9.5-21.1c-6-4.7-14.3-7.1-25-7.1-7.8 0-14.3 1.9-19.5 5.6-5.3 3.9-7.9 8.6-7.9 14.1zM808.2 342.4l-64 147.2h-19.8l23.8-51.5-42.2-95.7h20.9l30.4 73.4h.4l29.6-73.4h20.9z"/></g><path fill="#4285F4" d="M452.93 372c0-6.26-.56-12.25-1.6-18.01h-80.48v33l46.35.01c-1.88 10.98-7.93 20.34-17.2 26.58v21.41h27.59c16.11-14.91 25.34-36.95 25.34-62.99z"/><path fill="#34A853" d="M400.01 413.58c-7.68 5.18-17.57 8.21-29.14 8.21-22.35 0-41.31-15.06-48.1-35.36h-28.46v22.08c14.1 27.98 43.08 47.18 76.56 47.18 23.14 0 42.58-7.61 56.73-20.71l-27.59-21.4z"/><path fill="#FABB05" d="M320.09 370.05c0-5.7.95-11.21 2.68-16.39v-22.08h-28.46c-5.83 11.57-9.11 24.63-9.11 38.47s3.29 26.9 9.11 38.47l28.46-22.08a51.657 51.657 0 0 1-2.68-16.39z"/><path fill="#E94235" d="M370.87 318.3c12.63 0 23.94 4.35 32.87 12.85l24.45-24.43c-14.85-13.83-34.21-22.32-57.32-22.32-33.47 0-62.46 19.2-76.56 47.18l28.46 22.08c6.79-20.3 25.75-35.36 48.1-35.36z"/>
                           </svg>
                       </label>
           </fieldset>
           <fieldset class="frb-ptf" style="display: none;">
               <input class="frb-ptf-checkbox" type="checkbox" name="ptf" id="frb-ptf-checkbox" value="true" onclick="frb.updateFeeDisplay();">
               <label class="frb-ptf-label" for="frb-ptf-checkbox">
                   
                   {{{FR2015_translations,generously-add}}}
               </label>
           </fieldset>
           <fieldset class="frb-optin" style="display: none;">
               <legend>
                   {{{FR2015_translations,optin-can-we-follow}}}
               </legend>
  • <input class="frb-radio" type="radio" name="opt_in" id="frb-optin-yes" value="1"> <label class="frb-btn" for="frb-optin-yes">{{{FR2015_translations,optin-yes}}}</label>
  • <input class="frb-radio" type="radio" name="opt_in" id="frb-optin-no" value="0"> <label class="frb-btn" for="frb-optin-no">{{{FR2015_translations,optin-no}}}</label>
{{{FR2015_translations,optin-we-sorry}}}
{{{FR2015_translations,optin-thanks-changing}}}
           </fieldset>
           <fieldset class="frb-continue">
               <button id="frb-btn-first-submit" class="frb-submit">
                   
                       {{{FR2015_translations,continue}}}
                       
                           {{{FR2015_translations,continue-amt-onetime}}}
                           {{{FR2015_translations,continue-amt-monthly}}}
                       
                   
               </button>
           </fieldset>
{{{FR2015_translations,smallamount-error}}}
{{{FR2015_translations,bigamount-error}}}
{{{FR2015_translations,select-payment-method-please}}}
{{{FR2015_translations,optin-please-select-email-option}}}
   </form>

</dialog>

<dialog id="frb-dialog-rml" class="frb frb-dialog">

   <button class="frb-dialog-close frb-dialog-back" aria-label="{{{FR2015_translations,back}}}">
       <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 16"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.778" d="M7.181 13.285L.753 7 7.181.715"></path><rect fill="#000" width="18.182" height="1.778" x=".818" y="6.111" rx=".889"></rect></g></svg>
   </button>
   <form method="post" action="https://www.pages04.net/wikimedia/remind/Form?sp_source={{{banner}}}" class="frb-rml-form" id="frb-rml-form">
       <input type="hidden" name="formSourceName" value="StandardForm" />
       <input type="hidden" name="sp_exp" value="yes" />
       <input type="hidden" name="rml_source" value="{{{banner}}}" />
       <input type="hidden" name="rml_group" value="dsk_sm" />
       <input type="hidden" name="rml_country" value="" />
       <input type="hidden" name="rml_language" value="" />
       <input type="hidden" name="rml_submitDate" value="" />
       <input type="hidden" name="rml_segment" value="" />
{{{FR2015_translations,remind-me-email}}}
{{{FR2015_translations,remind-me-gladly}}}
       <label class="frb-rml-form-legend" for="frb-rml-email">{{{FR2015_translations,remind-me-donor-email}}}</label>
       <input type="email" name="Email" id="frb-rml-email" dir="ltr" autocomplete="email" autofocus />
       <button class="frb-submit active" id="frb-rml-submit" type="submit">{{{FR2015_translations,remind-me-submit}}}</button>
   </form>

</dialog>

<dialog id="frb-dialog-iad" class="frb frb-dialog">

   <button class="frb-dialog-close frb-dialog-back" aria-label="{{{FR2015_translations,back}}}">
       <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 16"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.778" d="M7.181 13.285L.753 7 7.181.715"></path><rect fill="#000" width="18.182" height="1.778" x=".818" y="6.111" rx=".889"></rect></g></svg>
   </button>
{{{FR2015_translations,iad-thank-you}}}
       {{{FR2015_translations,iad-subtitle}}}
       <button class="frb-btn frb-dialog-close" name="frb-iad-hide-button">{{{FR2015_translations,iad-hide}}}</button>
       <button class="frb-btn frb-dialog-close" name="frb-iad-back-button">{{{FR2015_translations,iad-back}}}</button>

</dialog>

<script> var frb = frb || {};

/* jshint maxerr: 600 */ frb.amounts = frb.amounts || {};

// Hard minimum amounts that can be given // From https://github.com/wikimedia/wikimedia-fundraising-SmashPig/blob/master/PaymentData/ReferenceData/CurrencyRates.php // Updated 2023-12-12 frb.amounts.minimums = {

   'USD' : 1,
   'CAD' : 1.36,
   'AUD' : 1.52,
   'NZD' : 1.63,
   'GBP' : 0.80,
   'EUR' : 0.93,
   'DKK' : 6.91,
   'HUF' : 355,
   'ILS' : 3.71,
   'INR' : 10, // T309818
   'JPY' : 146,
   'MYR' : 4.68,
   'NOK' : 11,
   'PLN' : 4.02,
   'CZK' : 23,
   'RON' : 4.61,
   'SEK' : 10,
   'UAH' : 37,
   'ZAR' : 19,
   // Latin America
   'BRL' : 4.95,
   'ARS' : 366,
   'CLP' : 880,
   'COP' : 3970,
   'MXN' : 17,
   'PEN' : 3.74,
   'UYU' : 39,
   'CHF' : 0.88

};

frb.amounts.options7 = {

   // Big English
   'USD' : [2.75, 10, 15, 25, 50, 75, 100],
   'CAD' : [2.75, 10, 15, 25, 50, 75, 100],
   'AUD' : [2.75, 10, 15, 25, 50, 75, 100],
   'NZD' : [2.75, 10, 15, 25, 50, 75, 100],
   'GBP' : [2, 10, 15, 25, 50, 75, 100],
   'EUR' : {
       'default' : [2, 10, 15, 25, 50, 75, 100]
   },
   // Others
   'DKK' : [20, 75, 100, 200, 300, 500, 700],
   'HUF' : [500, 1000, 2000, 4000, 5000, 7000, 10000],
   'ILS' : [10, 35, 50, 100, 200, 300, 400],
   'INR' : [25, 300, 500, 1000, 1500, 3000, 5000],
   'JPY' : [300, 1000, 1500, 2000, 3000, 5000, 10000],
   'MYR' : [10, 30, 50, 100, 200, 300, 500],
   'NOK' : [30, 100, 150, 200, 500, 750, 1000],
   'PLN' : [10, 20, 50, 100, 200, 300, 500],
   'CZK' : [50, 100, 250, 500, 1000, 1500, 2500],
   'RON' : [10, 50, 75, 100, 200, 300, 500],
   'SEK' : [30, 100, 150, 200, 500, 750, 1000],
   'UAH' : [50, 75, 150, 300, 500, 750, 1000],
   'ZAR' : [30, 50, 100, 200, 300, 500, 1000],
   // Latin America
   'BRL' : [10, 20, 30, 50, 100, 200, 300],
   'ARS' : [200, 250, 500, 750, 1000, 1500, 2000],
   'CLP' : [2000, 3000, 5000, 10000, 20000, 30000, 50000],
   'COP' : [10000, 15000, 25000, 50000, 100000, 150000, 200000],
   'MXN' : [40, 70, 150, 250, 500, 700, 1000],
   'PEN' : [10, 15, 25, 50, 100, 150, 200],
   'UYU' : [100, 200, 300, 500, 1000, 1500, 2000],
   'CHF' : [3, 5, 10, 25, 50, 100, 200]

};

// 5 amount options. Since 2020 6C, no longer used frb.amounts.options5 = {

   // Big English
   'USD' : [2.75, 15, 20, 50, 100],
   'CAD' : [2.75, 15, 20, 50, 100],
   'AUD' : [2.75, 15, 20, 50, 100],
   'NZD' : [2.75, 15, 20, 50, 100],
   'GBP' : [2, 10, 20, 50, 100],
   'EUR' : [2, 10, 20, 50, 100],
   // Others
   'DKK' : [20, 100, 200, 500, 1000],
   'HUF' : [500, 2500, 4000, 7000, 10000],
   'ILS' : [10, 50, 200, 600, 1000],
   'INR' : [150, 500, 1000, 3000, 5000],
   'JPY' : [300, 1500, 2000, 5000, 10000],
   'MYR' : [10, 50, 100, 300, 500],
   'NOK' : [20, 100, 200, 500, 1000],
   'PLN' : [10, 50, 100, 300, 500],
   'RON' : [10, 50, 100, 200, 1000],
   'SEK' : [30, 100, 200, 500, 1000],
   'UAH' : [50, 150, 300, 750, 1000],
   'ZAR' : [30, 100, 200, 500, 1000],
   // Latin America
   'BRL' : [10, 30, 50, 100, 250],
   'ARS' : [60, 200, 400, 1000, 2000],
   'CLP' : [1500, 5000, 10000, 25000, 50000],
   'COP' : [7000, 20000, 50000, 150000, 200000],
   'MXN' : [35, 100, 200, 750, 1000],
   'PEN' : [10, 50, 150, 300, 700],
   'UYU' : [70, 200, 400, 1500, 2000],
   'CHF' : [3, 10, 25, 50, 100]

};

// "Average" donation frb.amounts.averages = {

   'USD' : 13,
   'CAD' : 12,
   'AUD' : 11,
   'NZD' : 12,
   'GBP' : 6,
   'EUR' : 8,
   // Others
   'DKK' : 60,
   'HUF' : 2500,
   'ILS' : 50,
   'INR' : 229,
   'JPY' : 800,
   'MYR' : 30,
   'NOK' : 75,
   'PLN' : 50,
   'CZK' : 150,
   'RON' : 50,
   'SEK' : 85,
   'UAH' : 150,
   'ZAR' : 65,
   // Latin America
   'BRL' : 25,
   'ARS' : 780,
   'CLP' : 10200,
   'COP' : 35000,
   'MXN' : 140,
   'PEN' : 30,
   'UYU' : 525,
   'CHF' : 25

};

// 'If everyone gave X'. Mostly the same as first asks option. frb.amounts.ifEveryone = {

   // Big English
   'USD' : 2.75,
   'CAD' : 2.75,
   'AUD' : 2.75,
   'NZD' : 2.75,
   'GBP' : 2,
   'EUR' : {
       'default' : 2
   },
   // Others
   'DKK' : 20,
   'HUF' : 500,
   'ILS' : 10,
   'INR' : 25,
   'JPY' : 300,
   'MYR' : 10,
   'NOK' : 30,
   'PLN' : 10,
   'CZK' : 50,
   'RON' : 10,
   'SEK' : 30,
   'UAH' : 50,
   'ZAR' : 30,
   // Latin America
   'BRL' : 10,
   'ARS' : 175,
   'CLP' : 1500,
   'COP' : 7000,
   'MXN' : 40,
   'PEN' : 10,
   'UYU' : 100,
   'CHF' : 5

};

// Minimum fee/PTF amounts. Default is 0.35. // Updated 2018-07-05 based on Ppena's feedback // Updated 2019-05-21 to approx 0.35 USD equivalent frb.amounts.feeMinimums = {

   'DKK' : 2,
   'HUF' : 100,
   'ILS' : 1.2,
   'INR' : 4,
   'JPY' : 35,
   'MYR' : 1,
   'NOK' : 3,
   'PLN' : 1.35,
   'CZK' : 7.5,
   'RON' : 1.5,
   'SEK' : 3,
   'UAH' : 10,
   'ZAR' : 5,
   // Latin America // Updated 2023-01-17 to approx 0.35 USD equivalent
   'BRL' : 1.75,
   'ARS' : 32,
   'CLP' : 322,
   'COP' : 1385,
   'MXN' : 6,
   'PEN' : 1.3,
   'UYU' : 13.7

};

// If one-time amount <= left amount, suggest right amount for monthly // If changing these, please update spreadsheet // https://docs.google.com/spreadsheets/d/1z36zi8EegPLAvR5FYAgwz8ywKZ50QNB82SpwpTdk-xQ/edit#gid=1258723967 frb.amounts.monthlySuggest = {

   'EUR' : [ // also GBP
       [ 1.99, 0 ],
       [ 2.35, 1.40 ],
       [ 9, 1.75 ],
       [ 12, 2 ],
       [ 15, 2.5 ],
       [ 18, 3 ],
       [ 21, 3.5 ],
       [ 24, 4 ],
       [ 27, 4.5 ],
       [ 30, 5 ],
       [ 33, 5.5 ],
       [ 36, 6 ],
       [ 39, 6.5 ],
       [ 42, 7 ],
       [ 45, 7.5 ],
       [ 48, 8 ],
       [ 51, 8.5 ],
       [ 54, 9 ],
       [ 57, 9.5 ],
       [ 60, 10 ],
       [ 63, 10.5 ],
       [ 66, 11 ],
       [ 69, 11.5 ],
       [ 72, 12 ],
       [ 75, 12.5 ],
       [ 102, 17 ],
       [ 250, 25 ],
       [ 499, 50 ],
       [ Infinity, 0 ]
   ],
   'USD' : [ // also CAD, AUD, NZD
       [ 2.74, 0 ],
       [ 9, 1.75 ],
       [ 12, 2 ],
       [ 15, 2.5 ],
       [ 18, 3 ],
       [ 21, 3.5 ],
       [ 24, 4 ],
       [ 27, 4.5 ],
       [ 30, 5 ],
       [ 33, 5.5 ],
       [ 36, 6 ],
       [ 39, 6.5 ],
       [ 42, 7 ],
       [ 45, 7.5 ],
       [ 48, 8 ],
       [ 51, 8.5 ],
       [ 54, 9 ],
       [ 57, 9.5 ],
       [ 60, 10 ],
       [ 63, 10.5 ],
       [ 66, 11 ],
       [ 69, 11.5 ],
       [ 72, 12 ],
       [ 75, 12.5 ],
       [ 102, 17 ],
       [ 250, 25 ],
       [ 499, 50 ],
       [ Infinity, 0 ]
   ],
   'JPY' : [
       [ 299, 0 ],
       [ 900, 150 ],
       [ 1200, 200 ],
       [ 1500, 250 ],
       [ 1800, 300 ],
       [ 2100, 350 ],
       [ 2400, 400 ],
       [ 2700, 450 ],
       [ 3000, 500 ],
       [ 3300, 550 ],
       [ 3600, 600 ],
       [ 3900, 650 ],
       [ 4200, 700 ],
       [ 4500, 750 ],
       [ 4800, 800 ],
       [ 5100, 850 ],
       [ 5400, 900 ],
       [ 5700, 950 ],
       [ 6000, 1000 ],
       [ 6300, 1050 ],
       [ 6600, 1100 ],
       [ 6900, 1150 ],
       [ 7200, 1200 ],
       [ 7500, 1250 ],
       [ 10800, 1800 ],
       [ 18000, 3000 ],
       [ 50000, 6000 ],
       [ Infinity, 0 ]
   ],
   'SEK' : [ // Also NOK
       [ 29, 0 ],
       [ 35, 20 ],
       [ 55, 25 ],
       [ 105, 30 ],
       [ 160, 40 ],
       [ 210, 50 ],
       [ 360, 60 ],
       [ 450, 75 ],
       [ 600, 100 ],
       [ 800, 125 ],
       [ 900, 150 ],
       [ 1200, 200 ],
       [ 1500, 250 ],
       [ 1800, 300 ],
       [ 2100, 350 ],
       [ Infinity, 0 ]
   ],
   'HUF' : [
       [ 499, 0 ],
       [ 3000, 500 ],
       [ 6000, 1000 ],
       [ 9000, 1500 ],
       [ 12000, 2000 ],
       [ 18000, 3000 ],
       [ 24000, 4000 ],
       [ 30000, 5000 ],
       [ 36000, 6000 ],
       [ 42000, 7000 ],
       [ 48000, 8000 ],
       [ 54000, 9000 ],
       [ 60000, 10000 ],
       [ Infinity, 0 ]
   ],
   'ILS' : [
       [ 9, 0 ],
       [ 10, 5 ],
       [ 60, 10 ],
       [ 90, 15 ],
       [ 120, 20 ],
       [ 180, 30 ],
       [ 240, 40 ],
       [ 300, 50 ],
       [ 360, 60 ],
       [ 420, 70 ],
       [ 480, 80 ],
       [ 540, 90 ],
       [ 600, 100 ],
       [ Infinity, 0 ]
   ],
   'ZAR' : [
       [ 29, 0 ],
       [ 30, 20 ],
       [ 50, 30 ],
       [ 100, 40 ],
       [ 300, 50 ],
       [ 450, 75 ],
       [ 600, 100 ],
       [ 900, 150 ],
       [ 1200, 200 ],
       [ 1500, 250 ],
       [ 1800, 300 ],
       [ 2400, 400 ],
       [ 3000, 500 ],
       [ 3600, 600 ],
       [ Infinity, 0 ]
   ],
   'MYR' : [ // Also RON, PLN
       [ 9, 0 ],
       [ 30, 5 ],
       [ 50, 10 ],
       [ 120, 20 ],
       [ 180, 30 ],
       [ 240, 40 ],
       [ 300, 50 ],
       [ 360, 60 ],
       [ 420, 70 ],
       [ 480, 80 ],
       [ 540, 90 ],
       [ 600, 100 ],
       [ 900, 150 ],
       [ Infinity, 0 ]
   ],
   'DKK' : [
       [ 19, 0 ],
       [ 25, 10 ],
       [ 120, 20 ],
       [ 250, 40 ],
       [ 350, 50 ],
       [ 450, 75 ],
       [ 600, 100 ],
       [ 750, 125 ],
       [ 900, 150 ],
       [ 1200, 200 ],
       [ 1500, 250 ],
       [ 1800, 300 ],
       [ 2100, 350 ],
       [ Infinity, 0 ]
   ],
   'CZK' : [
       [ 49, 0 ],
       [ 180, 30 ],
       [ 300, 50 ],
       [ 600, 100 ],
       [ 900, 150 ],
       [ 1200, 200 ],
       [ 1500, 250 ],
       [ 1800, 300 ],
       [ 2100, 350 ],
       [ 2400, 400 ],
       [ 3000, 500 ],
       [ 3600, 600 ],
       [ 4200, 700 ],
       [ 4800, 800 ],
       [ Infinity, 0 ]
   ],
   'CLP' : [
       [ 1999, 0 ],
       [ 2300, 1000 ],
       [ 2700, 1100 ],
       [ 3300, 1200 ],
       [ 4200, 1300 ],
       [ 5500, 1400 ],
       [ 9000, 1500 ],
       [ 10500, 1700 ],
       [ 16000, 2600 ],
       [ 20800, 3400 ],
       [ 26000, 4200 ],
       [ 31200, 5000 ],
       [ 38400, 6400 ],
       [ 55000, 8500 ],
       [ Infinity, 0 ]
   ],
   'UYU' : [
       [ 99, 0 ],
       [ 120, 50 ],
       [ 170, 65 ],
       [ 220, 70 ],
       [ 320, 75 ],
       [ 480, 85 ],
       [ 520, 90 ],
       [ 750, 125 ],
       [ 1050, 170 ],
       [ 1350, 225 ],
       [ 1600, 250 ],
       [ 1800, 300 ],
       [ 2100, 320 ],
       [ Infinity, 0 ]
   ],
   'PEN' : [
       [ 9, 0 ],
       [ 12, 5 ],
       [ 17, 6 ],
       [ 26, 7 ],
       [ 48, 8 ],
       [ 55, 9 ],
       [ 78, 13 ],
       [ 105, 17 ],
       [ 130, 21 ],
       [ 160, 26 ],
       [ 180, 30 ],
       [ 210, 32 ],
       [ Infinity, 0 ]
   ],
   'COP' : [
       [ 9999, 0 ],
       [ 11300, 5000 ],
       [ 17000, 5200 ],
       [ 22000, 5500 ],
       [ 27000, 5800 ],
       [ 45000, 7500 ],
       [ 55000, 9000 ],
       [ 75000, 12500 ],
       [ 105000, 17000 ],
       [ 120000, 20000 ],
       [ 160000, 25000 ],
       [ 180000, 30000 ],
       [ 250000, 34000 ],
       [ Infinity, 0 ]
   ],
   'BRL' : [
       [ 9, 0 ],
       [ 12, 6 ],
       [ 22, 7 ],
       [ 35, 8 ],
       [ 45, 9 ],
       [ 55, 10 ],
       [ 80, 12 ],
       [ 105, 16 ],
       [ 160, 25 ],
       [ 210, 35 ],
       [ 270, 45 ],
       [ 320, 50 ],
       [ Infinity, 0 ]
   ],
   'MXN' : [
       [ 39, 0 ],
       [ 48, 25 ],
       [ 60, 28 ],
       [ 110, 30 ],
       [ 160, 35 ],
       [ 260, 45 ],
       [ 270, 50 ],
       [ 350, 60 ],
       [ 550, 85 ],
       [ 650, 90 ],
       [ 750, 120 ],
       [ 1500, 160 ],
       [ Infinity, 0 ]
   ]
   

}; frb.amounts.monthlySuggest.GBP = frb.amounts.monthlySuggest.EUR; frb.amounts.monthlySuggest.CAD = frb.amounts.monthlySuggest.USD; frb.amounts.monthlySuggest.AUD = frb.amounts.monthlySuggest.USD; frb.amounts.monthlySuggest.NZD = frb.amounts.monthlySuggest.USD;

frb.amounts.monthlySuggest.RON = frb.amounts.monthlySuggest.MYR; frb.amounts.monthlySuggest.PLN = frb.amounts.monthlySuggest.MYR; frb.amounts.monthlySuggest.NOK = frb.amounts.monthlySuggest.SEK;

frb.amounts.test = function() {

   /**
    * Check if amounts are less than minimum acceptable
    * 
    * @param {string}   desc - description for error message e.g. 'amount option' 
    * @param {Object}   dataObject - data to check e.g. frb.amounts.options7
    * @param {Function} extractFunction - function to get test value e.g. d => d[0] for 1st amount
    */
   var testMinimums = function( desc, dataObject, extractFunction = d => d ) {
       const errorMessage = 'Error %s %s %s is less than minimum %s';
       for ( const currency in dataObject ) {
           let data = dataObject[currency].default || dataObject[currency], // need default for some EUR
               value = extractFunction(data),
               minimum = frb.amounts.minimums[currency];
           console.assert( value >= minimum, errorMessage, currency, desc, value, minimum );
       }
   };
   testMinimums( 'if everyone', frb.amounts.ifEveryone, d => d );
   testMinimums( 'average', frb.amounts.averages, d => d );
   testMinimums( 'amount option', frb.amounts.options7, d => d[0] );
   testMinimums( 'monthly suggestion', frb.amounts.monthlySuggest, d => d[1][1] );

};

frb.currencyFormats = {

   'USD' : '$\t',
   'CAD' : {
       'fr' : '$\t',
       'default' : '$\t'
   },
   'AUD' : '$\t',
   'NZD' : '$\t',
   'GBP' : '£\t',
   'EUR' : {
       'en' : '€\t',
       'cy' : '€\t',
       'ga' : '€\t',
       'mt' : '€\t',
       'nl' : '€ \t',
       'lv' : '€ \t',
       'tr' : '€ \t',
       'default' : '\t €'
   },
   // Others
   'CZK' : '\t Kč',
   'DKK' : '\t kr.',
   'HUF' : '\t Ft',
   'ILS' : {
       'he' : '\t ₪',
       'yi' : '\t ₪',
       'ar' : '\t ₪',
       'default' : '₪ \t'
   },
   'INR' : '₹ \t',
   'JPY' : '¥\t',
   'MYR' : 'RM\t',
   'NOK' : '\t kr',
   'PLN' : '\t zł',
   'RON' : '\t lei',
   'SEK' : '\t kr',
   'UAH' : '₴\t',
   'ZAR' : 'R \t',
   // Latin America
   'BRL' : {
       'en' : 'R$\t',
       'default' : 'R$ \t'
   },
   'ARS' : '$\t',
   'CLP' : '$\t',
   'COP' : '$\t',
   'MXN' : '$\t',
   'PEN' : 'S/. \t',
   'UYU' : '$U \t',
   'CHF' : '\t CHF'

};

// Check in user language first, then fall back to English frb.countryNames = {

   'af' : {
       'ZA' : 'Suid-Afrika'
   },
   'en' : {
       'US' : 'the United States',
       'CA' : 'Canada',
       'GB' : 'the UK',
       'IE' : 'Ireland',
       'AU' : 'Australia',
       'NZ' : 'New Zealand',
       'AR' : 'Argentina',
       'AT' : 'Austria',
       'BE' : 'Belgium',
       'BR' : 'Brazil',
       'CH' : 'Switzerland',
       'CL' : 'Chile',
       'CO' : 'Colombia',
       'CZ' : 'the Czech Republic',
       'DK' : 'Denmark',
       'ES' : 'Spain',
       'FR' : 'France',
       'GR' : 'Greece',
       'HK' : 'Hong Kong',
       'HU' : 'Hungary',
       'IL' : 'Israel',
       'IN' : 'India',
       'IT' : 'Italy',
       'JP' : 'Japan',
       'LU' : 'Luxembourg',
       'LV' : 'Latvia',
       'MX' : 'Mexico',
       'MY' : 'Malaysia',
       'NL' : 'the Netherlands',
       'NO' : 'Norway',
       'PE' : 'Peru',
       'PL' : 'Poland',
       'PT' : 'Portugal',
       'RO' : 'Romania',
       'SE' : 'Sweden',
       'SK' : 'Slovakia',
       'UA' : 'Ukraine',
       'UY' : 'Uruguay',
       'ZA' : 'South Africa'
   },
   'ca' : {
       'AT' : 'd’Àustria',
       'BE' : 'de Bèlgica',
       'DK' : 'de Dinamarca',
       'ES' : 'a Espanya',
       'HU' : 'd’Hongria',
       'IL' : 'd’Israel',
       'LV' : 'de Letònia',
       'LU' : 'de Luxemburg',
       'MY' : 'de Malàisia',
       'NO' : 'de Noruega',
       'PL' : 'de Polònia',
       'PT' : 'de Portugal',
       'RO' : 'de Romania',
       'SK' : 'd’Eslovàquia',
       'ZA' : 'de Sud-àfrica',
       'UA' : 'd’Ucraïna'
   },
   'cs' : {
       'CZ' : 'v České republice',
       'AT' : 'v Rakousku',
       'BE' : 'v Belgii',
       'DK' : 'v Dánsku',
       'GR' : 'v Řecku',
       'IL' : 'v Izraeli',
       'LU' : 'v Lucembursku',
       'MY' : 'v Malajsii',
       'NO' : 'v Norsku',
       'PT' : 'v Portugalsku',
       'SE' : 've Švédsku',
       'ZA' : 'v Jihoafrické republice'
   },
   'es' : {
       'AR' : 'en Argentina',
       'AT' : 'en Austria',
       'BE' : 'en Bélgica',
       'BR' : 'en Brasil',
       'CL' : 'en Chile',
       'CO' : 'en Colombia',
       'DK' : 'en Dinamarca',
       'ES' : 'en España',
       'HU' : 'en Hungría',
       'IL' : 'en Israel',
       'LU' : 'en Luxemburgo',
       'LV' : 'en Letonia',
       'MX' : 'en México',
       'MY' : 'en Malasia ',
       'NO' : 'en Noruega',
       'PE' : 'en Perú',
       'PL' : 'en Polonia',
       'PT' : 'en Portugal',
       'RO' : 'en Rumania',
       'SK' : 'en Eslovaquia',
       'UA' : 'en Ucrania',
       'US' : 'en los Estados Unidos',
       'UY' : 'en Uruguay',
       'ZA' : 'en Sudafrica'
   },
   'da' : {
       'AT' : 'i Østrig',
       'BE' : 'i Belgien',
       'CZ' : 'i Tjekkiet',
       'DK' : 'i Danmark',
       'ES' : 'i Spanien',
       'GR' : 'i Grækenland',
       'HU' : 'i Ungarn',
       'IL' : 'i Israel',
       'LV' : 'i Letland',
       'LU' : 'i Luxembourg',
       'MY' : 'i Malaysia',
       'NO' : 'i Norge',
       'PL' : 'i Polen',
       'PT' : 'i Portugal',
       'RO' : 'i Rumænien',
       'SE' : 'i Sverige',
       'SK' : 'i Slovakiet',
       'ZA' : 'i Sydafrika',
       'UA' : 'i Ukraine'
   },
   'nl' : {
       'NL' : 'in Nederland',
       'AT' : 'in Oostenrijk',
       'BE' : 'in België',
       'DK' : 'in Denemarken',
       'CZ' : 'in Tsjechië',
       'ES' : 'in Spanje',
       'GR' : 'in Griekenland',
       'HU' : 'in Hongarije',
       'IL' : 'in Israël',
       'LV' : 'in Letland',
       'LU' : 'in Luxemburg',
       'MY' : 'in Maleisië',
       'NO' : 'in Noorwegen',
       'PL' : 'in Polen',
       'PT' : 'in Portugal',
       'RO' : 'in Roemenië',
       'SE' : 'in Zweden',
       'SK' : 'in Slowakije',
       'ZA' : 'in Zuid-Afrika',
       'UA' : 'in Oekraïne'
   },
   'fr' : {
       'AT' : 'en Autriche',
       'BE' : 'en Belgique',
       'CH' : 'en Suisse',
       'CA' : 'au Canada',
       'CZ' : 'en République tchèque',
       'DK' : 'au Danemark',
       'ES' : 'en Espagne',
       'FR' : 'en France',
       'GR' : 'en Grèce',
       'HU' : 'en Hongrie',
       'IL' : 'en Israël',
       'LV' : 'en Lettonie',
       'LU' : 'au Luxembourg',
       'MY' : 'en Malaisie',
       'NO' : 'en Norvège',
       'PL' : 'en Pologne',
       'PT' : 'au Portugal',
       'RO' : 'en Roumanie',
       'SE' : 'en Suède',
       'SK' : 'en Slovaquie',
       'ZA' : 'en Afrique du Sud',
       'UA' : 'en Ukraine'
   },
   'de' : {
       'AT' : 'in Österreich',
       'BE' : 'in Belgien',
       'CH' : 'in der Schweiz',
       'CZ' : 'in Tschechien',
       'DK' : 'in Dänemark',
       'ES' : 'in Spanien',
       'GR' : 'in Griechenland',
       'HU' : 'in Ungarn',
       'IL' : 'in Israel',
       'LV' : 'in Lettland',
       'LU' : 'in Luxemburg',
       'MY' : 'in Malaysia',
       'NO' : 'in Norwegen',
       'PL' : 'in Polen',
       'PT' : 'in Portugal',
       'RO' : 'in Rumänien',
       'SE' : 'in Schweden',
       'SK' : 'in der Slowakei',
       'ZA' : 'in Südafrika',
       'UA' : 'in der Ukraine'
   },
   'el' : {
       'AT' : 'στην Αυστρία',
       'BE' : 'στο Βέλγιο',
       'CZ' : 'στην Τσεχία',
       'DK' : 'στη Δανία',
       'ES' : 'στην Ισπανία',
       'GR' : 'στην Ελλάδα',
       'HU' : 'στην Ουγγαρία',
       'IL' : 'στο Ισραήλ',
       'LV' : 'στη Λετονία',
       'LU' : 'στο Λουξεμβούργο',
       'MY' : 'στη Μαλαισία',
       'NO' : 'στη Νορβηγία',
       'PL' : 'στην Πολωνία',
       'PT' : 'στην Πορτογαλία',
       'RO' : 'στη Ρουμανία',
       'SE' : 'στη Σουηδία',
       'SK' : 'στη Σλοβακία',
       'ZA' : 'στη Νότια Αφρική',
       'UA' : 'στην Ουκρανία'
   },
   'he' : {
       'AT' : 'אוסטרליה',
       'BE' : 'בלגיה',
       'CZ' : "בצ'כיה",
       'DK' : 'דנמרק',
       'ES' : 'ספרד',
       'GR' : 'ביוון',
       'HU' : 'הונגריה',
       'IL' : 'ישראל',
       'LV' : 'לטביה',
       'LU' : 'לוקסמבורג',
       'MY' : 'מלזיה',
       'NO' : 'נורווגיה',
       'PL' : 'פולין',
       'PT' : 'פורטוגל',
       'RO' : 'רומניה',
       'SE' : 'בשוודיה',
       'SK' : 'סלובקיה',
       'ZA' : 'דרום אפריקה',
       'UA' : 'אוקראינה'
   },
   'hu' : {
       'AT' : 'ausztriai',
       'BE' : 'belgiumi',
       'DK' : 'dániai',
       'ES' : 'spanyolországi',
       'HU' : 'magyarországi',
       'IL' : 'izraeli',
       'LV' : 'lettországi',
       'LU' : 'luxemburgi',
       'MY' : 'malajziai',
       'NO' : 'norvégiai',
       'PL' : 'lengyelországi',
       'PT' : 'portugáliai',
       'RO' : 'romániai',
       'SK' : 'szlovákiai',
       'ZA' : 'dél-afrikai',
       'UA' : 'ukrajnai'
   },
   'it' : {
       'IT' : 'Italia',
       'CH' : 'Svizzera'
   },
   'lv' : {
       'AT' : 'valstī Austrijā',
       'BE' : 'valstī Beļģijā',
       'DK' : 'valstī Dānijā',
       'ES' : 'valstī Spānijā',
       'HU' : 'valstī Ungārijā',
       'IL' : 'Izraēlas valstī',
       'LV' : 'valstī Latvijā',
       'LU' : 'valstī Luksemburgā',
       'MY' : 'valstī Malaizijā',
       'NO' : 'valstī Norvēģijā',
       'PL' : 'valstī Polijā',
       'PT' : 'valstī Portugālē',
       'RO' : 'valstī Rumānijā',
       'SK' : 'valstī Slovākijā',
       'ZA' : 'Dienvidāfrikas valstī',
       'UA' : 'valstī Ukrainā'
   },
   'nb' : {
       'AT' : 'i Østerrike',
       'BE' : 'i Belgia',
       'CZ' : 'i Tsjekkia',
       'DK' : 'i Danmark',
       'ES' : 'i Spania',
       'GR' : 'i Hellas',
       'HU' : 'i Ungarn',
       'IL' : 'i Israel',
       'LV' : 'i Latvia',
       'LU' : 'i Luxembourg',
       'MY' : 'i Malaysia',
       'NO' : 'i Norge',
       'PL' : 'i Polen',
       'PT' : 'i Portugal',
       'RO' : 'i Romania',
       'SE' : 'i Sverige',
       'SK' : 'i Slovakia',
       'ZA' : 'i Sør-Afrika',
       'UA' : 'i Ukraina'
   },
   'pl' : {
       'AT' : 'w Austrii',
       'BE' : 'w Belgii',
       'DK' : 'w Danii',
       'ES' : 'w Hiszpanii',
       'HU' : 'na Węgrzech',
       'IL' : 'w Izraelu',
       'LV' : 'na Łotwie',
       'LU' : 'w Luksemburgu',
       'MY' : 'w Malezji',
       'NO' : 'w Norwegii',
       'PL' : 'w Polsce',
       'PT' : 'w Portugalii',
       'RO' : 'w Rumunii',
       'SK' : 'na Słowacji',
       'ZA' : 'w Republice Południowej Afryki',
       'UA' : 'na Ukrainie'
   },
   'pt' : {
       'AT' : 'na Áustria',
       'BE' : 'na Bélgica',
       'BR' : 'no Brasil',
       'CZ' : 'na República Checa',
       'DK' : 'na Dinamarca',
       'ES' : 'na Espanha',
       'GR' : 'na Grécia',
       'HU' : 'na Hungria',
       'IL' : 'em Israel',
       'LV' : 'na Letónia',
       'LU' : 'no Luxemburgo',
       'MY' : 'na Malásia',
       'NO' : 'na Noruega',
       'PL' : 'na Polónia',
       'PT' : 'em Portugal',
       'RO' : 'na Roménia',
       'SE' : 'na Suécia',
       'SK' : 'na Eslováquia',
       'ZA' : 'na África do Sul',
       'UA' : 'na Ucrânia'
   },
   'ro' : {
       'AT' : 'din Austria',
       'BE' : 'din Belgia',
       'DK' : 'din Danemarca',
       'ES' : 'în Spania',
       'HU' : 'din Ungaria',
       'IL' : 'din Israel',
       'LV' : 'din Latvia',
       'LU' : 'din Luxemburg',
       'MY' : 'din Malaezia',
       'NO' : 'din Norvegia',
       'PL' : 'din Polonia',
       'PT' : 'din Portugalia',
       'RO' : 'din România',
       'SK' : 'din Slovacia',
       'ZA' : 'din Africa de Sud',
       'UA' : 'din Ucraina'
   },
   'ru' : {
       'AT' : 'в Австрии',
       'BE' : 'в Бельгии',
       'DK' : 'в Дании',
       'ES' : 'в Испании',
       'HU' : 'в Венгрии',
       'IL' : 'в Израиле',
       'LV' : 'в Латвии',
       'LU' : 'в Люксембурге',
       'MY' : 'в Малайзии',
       'NO' : 'в Норвегии',
       'PL' : 'в Польше',
       'PT' : 'в Португалии',
       'RO' : 'в Румынии',
       'SK' : 'в Словакии',
       'ZA' : 'в Южной Африке',
       'UA' : 'в Украине'
   },
   'sk' : {
       'AT' : 'v Rakúsku',
       'BE' : 'v Belgicku',
       'DK' : 'v Dánsku',
       'ES' : 'v Španielsku',
       'HU' : 'v Maďarsku',
       'IL' : 'v Izraeli',
       'LV' : 'v Lotyšsku',
       'LU' : 'v Luxembursku',
       'MY' : 'v Malajzii',
       'NO' : 'v Nórsku',
       'PL' : 'v Poľsku',
       'PT' : 'v Portugalsku',
       'RO' : 'v Rumunsku',
       'SK' : 'na Slovensku',
       'ZA' : 'v Juhoafrickej republike',
       'UA' : 'na Ukrajine'
   },
   'sv' : {
       'SE' : 'i Sverige',
       'AT' : 'i Österrike',
       'BE' : 'i Belgien',
       'CZ' : 'i Tjeckien',
       'DK' : 'i Danmark',
       'ES' : 'i Spanien',
       'GR' : 'i Grekland',
       'HU' : 'i Ungern',
       'IL' : 'i Israel',
       'LV' : 'i Lettland',
       'LU' : 'i Luxemburg',
       'MY' : 'i Malaysia',
       'NO' : 'i Norge',
       'PL' : 'i Polen',
       'PT' : 'i Portugal',
       'RO' : 'i Rumänien',
       'SK' : 'i Slovakien',
       'ZA' : 'i Sydafrika',
       'UA' : 'i Ukraina'
   },
   'uk' : {
       'AT' : 'у Австрії',
       'BE' : 'у Бельгії',
       'DK' : 'у Данії',
       'ES' : 'в Іспанії',
       'HU' : 'в Угорщині',
       'IL' : 'в Ізраїлі',
       'LV' : 'у Латвії',
       'LU' : 'у Люксембургу',
       'MY' : 'у Малайзії',
       'NO' : 'у Норвегії',
       'PL' : 'у Польщі',
       'PT' : 'у Португалії',
       'RO' : 'у Румунії',
       'SK' : 'у Словаччині',
       'ZA' : 'у ПАР',
       'UA' : 'в Україні'
   }

};

/* Most of the translations are actually using "in COUNTRY" or similar to account for grammar differences. So this makes English do the same, and allows us to use a clearer %in-country% variable, while avoiding breaking old content using %country%.

  • /

frb.inCountryNames = JSON.parse( JSON.stringify( frb.countryNames ) ); // deep copy frb.inCountryNames.en = {

   'US' : 'in the United States',
   'CA' : 'in Canada',
   'GB' : 'in the UK',
   'IE' : 'in Ireland',
   'AU' : 'in Australia',
   'NZ' : 'in New Zealand',
   'AR' : 'in Argentina',
   'AT' : 'in Austria',
   'BE' : 'in Belgium',
   'BR' : 'in Brazil',
   'CH' : 'in Switzerland',
   'CL' : 'in Chile',
   'CO' : 'in Colombia',
   'CZ' : 'in the Czech Republic',
   'DK' : 'in Denmark',
   'ES' : 'in Spain',
   'FR' : 'in France',
   'GR' : 'in Greece',
   'HK' : 'in Hong Kong',
   'HU' : 'in Hungary',
   'IL' : 'in Israel',
   'IN' : 'in India',
   'IT' : 'in Italy',
   'JP' : 'in Japan',
   'LU' : 'in Luxembourg',
   'LV' : 'in Latvia',
   'MX' : 'in Mexico',
   'MY' : 'in Malaysia',
   'NL' : 'in the Netherlands',
   'NO' : 'in Norway',
   'PE' : 'in Peru',
   'PL' : 'in Poland',
   'PT' : 'in Portugal',
   'RO' : 'in Romania',
   'SE' : 'in Sweden',
   'SK' : 'in Slovakia',
   'UA' : 'in Ukraine',
   'UY' : 'in Uruguay',
   'ZA' : 'in South Africa'

};

frb.dayNames = {

   'en' : [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ],
   'ca' : [ 'diumenge', 'dilluns', 'dimarts', 'dimecres', 'dijous', 'divendres', 'dissabte' ],
   'ja' : [ '日', '月', '火', '水', '木', '金', '土' ],
   'es' : [ 'domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado' ],
   'sv' : [ 'söndag', 'måndag', 'tisdag', 'onsdag', 'torsdag', 'fredag', 'lördag' ],
   'da' : [ 'søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag' ],
   'nb' : [ 'søndagen', 'mandagen', 'tirsdagen', 'onsdagen', 'torsdagen', 'fredagen', 'lørdagen' ],
   'it' : [ 'domenica', 'lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato' ],
   'nl' : [ 'zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag' ],
   'fr' : [ 'dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi' ],
   'de' : [ 'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag' ],
   'he' : [ 'ראשון', 'שני', 'שלישי', 'רביעי', 'חמישי', 'שישי', 'שבת' ],
   'lv' : [ 'svētdienā', 'pirmdienā', 'otrdienā', 'trešdienā', 'ceturtdienā', 'piektdienā', 'sestdienā' ],
   'pl' : [ 'niedzielę', 'poniedziałek', 'wtorek', 'środę', 'czwartek', 'piątek', 'sobotę' ],
   'pt' : [ 'neste domingo', 'nesta segunda-feira', 'nesta terça-feira', 'nesta quarta-feira', 'nesta  quinta-feira', 'nesta sexta-feira', 'neste sábado' ],
   'ru' : [ 'воскресенье', 'понедельник', 'вторник', 'среду', 'четверг', 'пятницу', 'субботу' ],
   'uk' : [ 'неділі', 'понеділка', 'вівторка', 'середи', 'четверга', 'п’ятниц', 'суботи' ],
   'hu' : [ 'vasárnap', 'hétfő', 'kedd', 'szerda', 'csütörtök', 'péntek', 'szombat' ],
   'ro' : [ 'duminică', 'luni', 'marți', 'miercuri', 'joi', 'vineri', 'sâmbătă' ],
   'af' : [ 'Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag' ],
   'aa' : [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ]

};

// "This fooday" translations. Needed for some languages where gender varies and "this" must agree frb.dayNamesThis = {

   'en' : [ 'this Sunday', 'this Monday', 'this Tuesday', 'this Wednesday', 'this Thursday', 'this Friday', 'this Saturday' ],
   'el' : [ 'Αυτήν την	Κυριακή', 'Αυτή τη Δευτέρα', 'Αυτήν την	Τρίτη', 'Αυτήν την Τετάρτη', 'Αυτήν την	Πέμπτη', 'Αυτήν την Παρασκευή', 'Αυτό το Σάββατο' ],
   'jp' : [ 'この日曜日', 'この月曜日', 'この火曜日', 'この水曜日', 'この木曜日', 'この金曜日', 'この土曜日' ],
   'it' : [ 'questa domenica', 'questo lunedì', 'questo martedì', 'questo mercoledì', 'questo giovedì', 'questo venerdì', 'questo sabato'],
   'pl' : [ 'w tę niedzielę', 'w ten poniedziałek', 'w ten wtorek', 'w tę środę', 'w ten czwartek', 'w ten piątek', 'w tę sobotę' ],
   'ru' : [ 'в это воскресенье', 'в этот понедельник', 'в этот вторник', 'в эту среду', 'в этот четверг', 'в эту пятницу', 'в эту субботу' ],
   'uk' : [ 'цієї неділі', 'цього понеділка', 'цього вівторка', 'цієї середи', 'цього четверга', 'цієї п’ятниці', 'цієї суботи' ],
   'pt' : [ 'este domingo', 'esta segunda-feira', 'esta terça-feira', 'esta quarta-feira', 'esta quinta-feira', 'esta sexta-feira', 'este sábado'],
   'sk' : [ 'túto nedeľu', 'tento pondelok', 'tento utorok', 'túto stredu', 'tento štvrtok', 'tento piatok', 'túto sobotu'],
   'cs' : [ 'tuto neděli', 'toto pondělí', 'toto úterý', 'tuto středu', 'tento čtvrtek', 'tento pátek', 'tuto sobotu']

};

frb.iPadTranslations = {

   'en' : 'iPad'

};

// Insert any localize data overrides here

/* jshint maxerr: 600 */ /* MediaWiki:FundraisingBanners/CoreJS-2018.js

* Core code for banner forms, with new inline error messages
*/

var frb = frb || {};

/**

* Test for general ES6 and <dialog> support
*
* Checks for arrow functions, default parameters, NodeList.prototype.forEach(), <dialog> support
* Should be roughly Chrome 51+, Firefox 98+, Edge 79+, Safari 15.4+
* Based on https://gist.github.com/bendc/d7f3dbc83d0f65ca0433caf90378cd95
* @return {boolean}
*/

frb.supportedBrowser = function() {

   try {
       new Function('(a = 0) => a');
       document.querySelectorAll('.frb').forEach(a => a);
       if ( typeof HTMLDialogElement === 'function' ) {
           return true;
       } else {
           return false;
       }
   }
   catch (err) {
       return false;
   }

}();

if ( !mw.centralNotice.adminUi ) { // T262693

   frb.loadedTime = Date.now();
   frb.didSelectAmount = false;
   frb.optinRequiredCountries =
       [ 'AR', 'AT', 'BE', 'BR', 'CL', 'CO', 'CZ', 'DK', 'ES', 'FR', 'GB', 'GR', 'HU', 'IE', 'IT', 'IL',
         'LU', 'LV', 'MX', 'NL', 'NO', 'PE', 'PL', 'PT', 'RO', 'SE', 'SK', 'UA', 'UY' ];
   frb.optinRequired = frb.optinRequiredCountries.indexOf(mw.centralNotice.data.country) !== -1;
   frb.maxUSD = 25000;
   frb.reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;

}

// Keyboard shortcut to go from banner preview to editor - Ctrl+Shift+E if ( mw.config.get('wgUserName') ) {

   if ( mw.config.get('wgUserName').match(/\(WMF\)/) ) {
       window.addEventListener('keydown', function(e) {
           if ( e.ctrlKey && e.shiftKey && e.keyCode === 69 ) {
               window.open( 'https://meta.wikimedia.org/wiki/Special:CentralNoticeBanners/Edit/' + mw.centralNotice.data.banner );
           }
       });
   }

}

/**

* Main function to submit to paymentswiki
*
* @param  {Object} options
* - method (required)
* - submethod (optional)
* - gateway (optional)
* - skipValidation (optional boolean, for pp-usd. Not yet implemented.)
* @param  {Boolean} isEndowment - deprecated, set frb.isEndowment instead
*/

frb.submitForm = function( options, isEndowment ) {

   var uri = new mw.Uri('https://payments.wikimedia.org/index.php/Special:GatewayChooser');
   var params = {};
   if ( !frb.validateForm( options ) ) {
       frb.extraData.validateError = 1; // Flag they had an error, even if fixed later
       return false; // Error, bail out of submitting
   }
   // Skip form chooser for Apple Pay / Google Pay
   if ( options.method === 'apple' || options.method === 'google' ) {
       uri = new mw.Uri('https://payments.wikimedia.org/index.php/Special:AdyenCheckoutGateway');
   }
   // Skip form chooser for Venmo
   if ( options.method === 'venmo' ) {
       uri = new mw.Uri('https://payments.wikimedia.org/index.php/Special:BraintreeGateway');
   }
   // Form selection data
   params.payment_method = options.method;
   if ( options.submethod ) {
       params.payment_submethod = options.submethod;
   }
   if ( options.gateway ) {
       params.gateway = options.gateway;
   }
   if ( options.variant ) {
       params.variant = options.variant;
   }
   params.recurring = frb.getRecurring();
   if ( params.recurring && params.variant && params.variant.match( /monthlyConvert/ ) ) {
       // Post-payments monthly convert makes no sense if it's already recurring
       // Avoid things like T312905
       delete params.variant;
   }
   params.currency = frb.getCurrency(mw.centralNotice.data.country) || 'USD';
   params.uselang = mw.centralNotice.data.uselang || 'en';
   params.country = mw.centralNotice.data.country || 'XX';
   if ( params.uselang === 'pt' && params.country === 'BR' ) {
       params.uselang = 'pt-br';
   }
   if ( params.uselang === 'es' &&
       ( params.country === 'AR' || params.country === 'CL' ||
         params.country === 'CO' || params.country === 'MX' ||
         params.country === 'PE' || params.country === 'UY' ||
         params.country === 'US' )
   ) {
       params.uselang = 'es-419';
   }
   // dLocal override for South Africa
   if ( params.payment_method === 'cc' && params.country === 'ZA' ) {
       params.gateway = 'astropay';
   }
   // Amount
   var amount = frb.getAmount();
   if ( $('#frb-ptf-checkbox').prop('checked') ) {
       amount = amount + frb.calculateFee(amount);
       frb.extraData.ptf = 1;
   }
   params.amount = amount;
   // Email optin
   if ( frb.optinRequired && $('input[name="opt_in"]').length > 0 ) {
       var opt_inValue = $('input[name="opt_in"]:checked').val();
       params.opt_in   = opt_inValue; // frb.validateForm() already checked it's 1 or 0
   }
   // Tracking info
   if ( isEndowment || frb.isEndowment ) {
       params.utm_medium = 'endowment';
       params.appeal = 'EndowmentQuote';
   } else {
       params.utm_medium = 'sitenotice';
   }
   params.utm_campaign = mw.centralNotice.data.campaign || 'test';
   params.utm_source   = frb.buildUtmSource(params);
   frb.extraData.time = Math.round( (Date.now() - frb.loadedTime)/1000 );
   if ( !$.isEmptyObject( frb.extraData ) ) {
       params.utm_key = frb.buildUtmKey( frb.extraData );
   }
   // Link to Banner History if enabled
   var mixins = mw.centralNotice.getDataProperty( 'mixins' );
   if ( mixins && mixins.bannerHistoryLogger ) {
       params.bannerhistlog = mw.centralNotice.bannerHistoryLogger.id;
   }
   uri.extend(params);
   // Set a cookie with current location so we can return here from TY page
   mw.loader.using( [ 'mediawiki.cookie', 'mediawiki.util' ] ).then( function () {
       // Exclude URL parameters like banner, but cope with paths like /w/index.php?title=Foo
       var returnToUrl = window.location.origin + mw.util.getUrl();
       mw.cookie.set(
           'fundraising_returnTo',
           returnToUrl,
           { expires: 300, prefix: , domain: '.wikipedia.org', secure: true }
       );
   });
   if ( mixins && mixins.bannerHistoryLogger ) {
       mw.centralNotice.bannerHistoryLogger.ensureLogSent().always(function() {
           frb.goToPayments( uri );
       });
   } else {
       frb.goToPayments( uri );
   }

};

frb.goToPayments = function( uri ) {

   if ( window.top !== window.self ) {
       // banner is in a frame, open payments in a new tab
       window.open( uri.toString() );
   } else {
       window.location.href = uri.toString();
   }

};

/**

* Check the form for errors.
*
* Called on submission, can also be called on input
*
* @param {object} options
* @return {boolean} Whether form is error-free
*/

frb.validateForm = function( options ) {

   var error = false;
   /* Reset all errors */
   $('.frb-haserror').removeClass('frb-haserror');
   $('.frb-error').hide();
   if ( !options.method ) {
       error = true;
       $('.frb-methods').addClass('frb-haserror');
       $('.frb-error-method').show();
   }
   if ( !frb.validateAmount() ) {
       error = true;
   }
   /* Email optin */
   if ( frb.optinRequired && $('.frb-optin').is(':visible') ) {
       var opt_inValue = $('input[name="opt_in"]:checked').val();
       if ( opt_inValue !== '1' && opt_inValue !== '0' ) {
           $('.frb-optin').addClass('frb-haserror');
           $('.frb-error-optin').show();
           error = true;
       }
   }
   return !error;

};

/**

* Check if selected amount is valid i.e. a positive number, between minimum and maximum.
* If not, show an error and return false.
*/

frb.validateAmount = function() {

   var amount = frb.getAmount(),
       currency  = frb.getCurrency( mw.centralNotice.data.country ),
       minAmount = frb.amounts.minimums[ currency ],
       maxAmount = Math.round( frb.maxUSD * minAmount );
       // Math.round to account for floating point math errors: https://phabricator.wikimedia.org/T246262
   if ( amount === null || isNaN(amount) || amount <= 0 || amount < minAmount ) {
       $('fieldset.frb-amounts').addClass('frb-haserror');
       $('.frb-error-bigamount').hide();
       $('.frb-error-smallamount').show();
       return false;
   } else if ( amount > Math.round( maxAmount ) ) {
       $('fieldset.frb-amounts').addClass('frb-haserror');
       $('.frb-error-bigamount').show();
       return false;
   } else {
       $('fieldset.frb-amounts').removeClass('frb-haserror');
       $('.frb-error-smallamount, .frb-error-bigamount').hide();
       return true;
   }

};

/**

* Build the utm_source for analytics.
*
* Own function so it can be overriden for weird tests
*
* @param  {Object} params
* @return {string} utm_source
*/

frb.buildUtmSource = function(params) {

   var utm_source;
   var fullDottedPaymentMethod = params.payment_method;
   if ( params.recurring ) {
       fullDottedPaymentMethod = 'r' + fullDottedPaymentMethod;
   }
   if ( params.payment_submethod ) {
       fullDottedPaymentMethod = fullDottedPaymentMethod + '.' + params.payment_submethod;
   }
   utm_source = mw.centralNotice.data.banner;
   // Keeping opt-in in utm_source for safety for now
   // Eventually remove it, or move to utm_key?
   if ( params.opt_in ) {
       utm_source += '_optIn' + params.opt_in;
   }
   utm_source += '.no-LP.' + fullDottedPaymentMethod;
   return utm_source;

};

/**

* Build a string for utm_key from extra tracking data
*
* @param  {Object} data
* @return {string} utm_key
*/

frb.buildUtmKey = function(data) {

   var dataArray = [];
   for (var key in data) {
       if (data.hasOwnProperty(key)) {
           dataArray.push( key + '_' + data[key] );
       }
   }
   return dataArray.join('~');

};

/**

* Determine if we should show recurring choice on step 2
* 
* NOTE 2023-12-07: we don't currently use this for step 2, since there are no
*	banners where users select method before frequency. However it is used by
*	frb.shouldShowMonthlyConvert()
*
* @param  {Object} options     Including method and optional gateway
* @param  {String} country
* @return {boolean}
*/

frb.shouldShowRecurring = function( options, country ) {

   if ( frb.isEndowment ) {
       return false;
   }
   if ( frb.noRecurringCountries.indexOf( country ) !== -1 ) { // Defined in LocalizeJS-2017.js
       return false;
   }
   if ( options.method === undefined ) {
       return true; // Show if a method hasn't been selected yet
   }
   if ( [ 'cc', 'venmo', 'apple', 'google' ].indexOf( options.method ) !== -1 ) {
       return true;
   }
   if ( options.method === 'paypal' ) {
   	if ( [ 'AR', 'BR', 'CL', 'CO', 'MX', 'PE', 'UY' ].includes( country ) ) {
   		return false;
   	} else {
   		return true;
   	}
   }
   // Adyen iDEAL
   if ( options.submethod === 'rtbt_ideal' ) {
       return true;
   }
   if ( options.submethod === 'upi' || options.submethod === 'paytmwallet' ) {
       return true;
   }
   return false;

};

/* Is recurring method selected? This function can be overriden for different forms */ frb.getRecurring = function() {

   // Can't use simple form.frequency.value, doesn't work in IE
   var selected = $('#frb-form input[name="frequency"]:checked').val();
   return selected === 'monthly';

};

/* Return amount selected */ frb.getAmount = function() {

   var form = document.getElementById('frb-form');
   var amount = null;
   frb.extraData.otherAmt = 0;
   // If there are some amount radio buttons, then look for the checked one
   if (form.amount) {
       for (var i = 0; i < form.amount.length; i++) {
           if (form.amount[i].checked) {
               amount = form.amount[i].value;
           }
       }
   }
   // Check the "other" amount box
   if (form.otherAmount.value !== ) {
       var otherAmount = form.otherAmount.value;
       otherAmount = otherAmount.replace(/[,.](\d)$/, ':$10');
       otherAmount = otherAmount.replace(/[,.](\d)(\d)$/, ':$1$2');
       otherAmount = otherAmount.replace(/[$£€¥,.]/g, );
       otherAmount = otherAmount.replace(/:/, '.');
       amount = otherAmount;
       frb.extraData.otherAmt = 1;
   }
   amount = parseFloat(amount);
   if ( isNaN(amount) ) {
       return 0;
   } else {
       return amount;
   }

};

/* Localize the amount errors. Call when initialising banner. */ frb.localizeErrors = function() {

   var currency  = frb.getCurrency( mw.centralNotice.data.country ),
       language = mw.centralNotice.data.uselang,
       minAmount = frb.amounts.minimums[ currency ],
       maxAmount = Math.round( frb.maxUSD * minAmount );
       // Math.round to account for floating point math errors: https://phabricator.wikimedia.org/T246262
   $('.frb-error-smallamount').text( function( index, oldText ) {
       return oldText.replace( '$1', frb.formatCurrency(currency, minAmount, language)  );
   });
   $('.frb-error-bigamount').text( function( index, oldText ) {
       // We cannot accept donations greater than $1 $2 through our website. Please contact our major gifts staff at $3.
       return oldText.replace( '$1', maxAmount )
                     .replace( '$2', currency )
                     .replace( '$3', 'benefactors@wikimedia.org' );
   });

};

/**

* Shared code for amount input handling
*/

frb.initAmountOptions = function() {

   // Reset "Other" input if user clicks a preset amount
   $('#frb-form [id^=frb-amt-ps]').click(function() {
       $('#frb-amt-other-input').val();
   });
   // Track if they selected and then later changed amount
   var checkAmountChange = function(e) {
       if ( frb.didSelectAmount ) {
           frb.extraData.changedAmt = 1;
       }
       // check if amount radio button is selected OR there is a value in the other amount
       if ( $('.frb-amounts input[type="radio"]:checked').val() !== 'Other' || $('#frb-amt-other-input').val().length > 0 ) {
           frb.didSelectAmount = true;
       }
       return;
   };
   $('.frb-amounts input[type="radio"]').on('change', checkAmountChange);
   $('#frb-amt-other-input').on('focusout', checkAmountChange);
   // Block typing non-numerics in input field, otherwise Safari allows them and then chokes
   // https://phabricator.wikimedia.org/T118741, https://phabricator.wikimedia.org/T173431
   var blockNonNumeric = function(e) {
       // Allow special keys in Firefox
       if ((e.code == 'ArrowLeft') || (e.code == 'ArrowRight') ||
           (e.code == 'ArrowUp') || (e.code == 'ArrowDown') ||
           (e.code == 'Delete') || (e.code == 'Backspace')) {
           return;
       }
       var chr = String.fromCharCode(e.which);
       if ("0123456789., ".indexOf(chr) === -1) {
           return false;
       }
   };
   $('#frb-amt-other-input').on('keypress', blockNonNumeric);
   $('#frb-amt-monthly-other-input').on('keypress', blockNonNumeric);

};

/**

* Calculate approximate transaction fee on given amount
*
* @param  {number} amount
* @return {number}        Rounded to 2 decimal places
*/

frb.calculateFee = function(amount) {

   var currency = frb.getCurrency(mw.centralNotice.data.country),
       feeMultiplier = 0.04,
       feeMinimum = frb.amounts.feeMinimums[currency] || 0.35,
       feeAmount = amount * feeMultiplier;
   if ( feeAmount < feeMinimum ) {
     feeAmount = feeMinimum;
   }
   return parseFloat(feeAmount.toFixed(2));

};

frb.updateFeeDisplay = function() {

   var currency = frb.getCurrency(mw.centralNotice.data.country),
       language = mw.centralNotice.data.uselang,
       amount, feeAmount, totalAmount;
   amount = frb.getAmount();
   feeAmount = frb.calculateFee(amount);
   if ( $('#frb-ptf-checkbox').prop('checked') ) {
       totalAmount = amount + feeAmount;
   } else {
       totalAmount = amount;
   }
   var feeAmountFormatted = frb.formatCurrency(currency, feeAmount, language);
   $('.frb-ptf-fee').text(feeAmountFormatted);
   var totalAmountFormatted = frb.formatCurrency(currency, totalAmount, language);
   $('.frb-ptf-total').text(totalAmountFormatted);
   $('.frb-ptf').slideDown( frb.reduceMotion ? 0 : 400 );

};

/**

* Custom hide cookie function
*
* Purposely sets only for this domain.
* CentralNotice builtin method seems buggy - see T270401
*
* @param {string} reason Reason to store in the hide cookie
* @param {number} duration Cookie duration, in seconds
*/

frb.altSetHideCookie = function ( reason, duration ) {

   mw.loader.using( 'mediawiki.cookie' ).then( function () {
       var cookieName = 'centralnotice_hide_fundraising',
           date = new Date(),
           hideData = {
               v: 1,
               created: Math.floor( date.getTime() / 1000 ),
               reason: reason
           };
       // Re-use the same date object to set the cookie's expiry time
       date.setSeconds( date.getSeconds() + duration );
       mw.cookie.set(
           cookieName,
           JSON.stringify( hideData ),
           { expires: date, path: '/', domain: 'wikipedia.org', prefix:  }
       );
   });

};

/**

* Determine if banner should be shown, and set correct data for impression logging
*
* @return {boolean} Show banner?
*/

frb.shouldShowBanner = function() {

   mw.centralNotice.bannerData.hideResult = false;
   /* Hide in unsupported browsers */
   if ( !frb.supportedBrowser ) {
       mw.centralNotice.bannerData.hideResult = true;
       mw.centralNotice.bannerData.hideReason = 'browser';
   }
   /* Hide outside main namespace (except Main Page, for sites where it isn't in main namespace) */
   if ( mw.config.get('wgNamespaceNumber') > 0 && !mw.config.get('wgIsMainPage') ) {
       mw.centralNotice.bannerData.hideResult = true;
       mw.centralNotice.bannerData.hideReason = 'namespace';
   }
   // Hide banner on sensitive articles
   // TODO - possibly add wgWikibaseItemId for multilingual support and resilience to moves?
   var hideTitles = [ 'Murder of Don Banfield' ];
   if ( hideTitles.indexOf( mw.config.values.wgTitle ) !== -1 ) {
       mw.centralNotice.bannerData.hideResult = true;
       mw.centralNotice.bannerData.hideReason = 'article';
   }
   /* Hide banner if on wrong site (desktop/mobile) in case wrong device settings were chosen */
   var bannerName = mw.centralNotice.data.banner,
       skin = mw.config.get('skin');
   if (
        ( bannerName.indexOf('_dsk_') !== -1 && skin === 'minerva' ) ||
        ( bannerName.indexOf('_m_') !== -1 && skin !== 'minerva' )
   ) {
       mw.centralNotice.bannerData.hideResult = true;
       mw.centralNotice.bannerData.hideReason = 'other';
       console.warn('Hiding fundraising banner on wrong site (desktop/mobile)');
   }
   return !mw.centralNotice.bannerData.hideResult;

};

/* Debug function to highlight dynamically replaced elements */ frb.highlightReplacements = function() {

   $('.frb [class^="frb-replace"], .frb-ptf-fee, .frb-ptf-total, .frb-upsell-ask, frb-amt').css('background-color', '#fa0');

};

if ( !mw.centralNotice.adminUi ) { // T262693

   /**
    * Provides alterImpressionData hook for CentralNotice
    * This info will be sent back with Special:RecordImpression
    * TODO: check if/when we can remove this (and RecordImpression)
    */
   mediaWiki.centralNotice.bannerData.alterImpressionData = function( impressionData ) {
       // Returning true from this function indicates the banner was shown
       if (mediaWiki.centralNotice.bannerData.hideReason) {
           impressionData.reason = mediaWiki.centralNotice.bannerData.hideReason;
       }
       if (mediaWiki.centralNotice.bannerData.cookieCount) {
           impressionData.banner_count = mediaWiki.centralNotice.bannerData.cookieCount;
       }
       return !mediaWiki.centralNotice.bannerData.hideResult;
   };

}

/* End of MediaWiki:FundraisingBanners/CoreJS-2018.js */ /* jshint maxerr: 600 */ /* == MediaWiki:FundraisingBanners/LocalizeJS-2022.js == */

/**

* Get the currency for a given country
*
* NOTE: The following currency mapping is WMF-specific based on payment
* provider availability, NOT necessarily the official currency of the country
*
* @param  {string} country code
* @return {string} currency code
*/

frb.getCurrency = function(country) {

   switch ( country ) {
       // Big 6
       case 'US': return 'USD';
       case 'CA': return 'CAD';
       case 'AU': return 'AUD';
       case 'NZ': return 'NZD';
       case 'GB': return 'GBP';
       case 'IE': return 'EUR';
       // Euro countries
       case 'AT':
       case 'BE':
       case 'ES':
       case 'FR':
       case 'GR':
       case 'IE':
       case 'IT':
       case 'LU':
       case 'LV':
       case 'NL':
       case 'PT':
       case 'SK':
           return 'EUR';
       // Others
       case 'DK': return 'DKK';
       case 'HU': return 'HUF';
       case 'IL': return 'ILS';
       case 'IN': return 'INR';
       case 'JP': return 'JPY';
       case 'MY': return 'MYR';
       case 'NO': return 'NOK';
       case 'PL': return 'PLN';
       case 'CZ': return 'CZK';
       case 'RO': return 'RON';
       case 'SE': return 'SEK';
       case 'UA': return 'UAH';
       case 'ZA': return 'ZAR';
       // Latin America
       case 'BR': return 'BRL';
       case 'AR': return 'ARS';
       case 'CL': return 'CLP';
       case 'CO': return 'COP';
       case 'MX': return 'MXN';
       case 'PE': return 'PEN';
       case 'UY': return 'UYU';
       case 'CH': return 'CHF';
       case 'LI': return 'CHF';
       // Fall back to USD
       default:
           return 'USD';
   }

};

/**

* Format a currency value
*
* TODO: make this handle the ISO code overrides?
*
* @param  {string} currency code. Leave undefined to get without symbol.
* @param  {number} amount
* @param  {string} language code
* @return {string} formatted string e.g. '$3', '£5', '10 €'
*/

frb.formatCurrency = function(currency, amount, language) {

   var locale, formatterOptions, formatter, fmAmount, supportsIntl;
   if ( isNaN(amount) || amount ===  ) {
       // Not a number, it's probably the 'other' string or box
       // TODO: better way of doing this?
       fmAmount = amount;
   } else {
       // Check browser support
       try {
           supportsIntl = typeof window.Intl === 'object';
       } catch (e) {
           supportsIntl = false; // T265396
       }
       if ( supportsIntl ) {
           // Use Intl for fancy number formatting - thousands separators etc
           locale = language + '-' + mw.centralNotice.data.country;
           if ( amount % 1 !== 0 ) {
               formatterOptions = { minimumFractionDigits: 2 };
           } else {
               formatterOptions = {};
           }
           formatter = new Intl.NumberFormat(locale, formatterOptions);
       } else {
           // Bad browser i.e. IE. Just do the basics: 2 decimal places if needed, or none
           formatter = {};
           formatter.format = function(number) {
               if ( amount % 1 !== 0 ) {
                   return number.toFixed(2);
               } else {
                   return number.toString();
               }
           };
       }
       fmAmount = formatter.format(amount);
   }
   // No symbol needed
   if ( currency === undefined ) {
       return fmAmount;
   }
   // Better dive into the formatting object
   if ( frb.currencyFormats[currency] === undefined ) {
       return currency + ' ' + fmAmount;
   }
   if ( frb.currencyFormats[currency] instanceof Object ) { // not a string
       if ( frb.currencyFormats[currency][language] !== undefined ) {
           return frb.currencyFormats[currency][language].replace('\t', fmAmount);
       }
       return frb.currencyFormats[currency]['default'].replace('\t', fmAmount);
   }
   return frb.currencyFormats[currency].replace('\t', fmAmount);

};

/*

* Select the correct amount or array of amounts from object in "source"
*
* @param {Object} source   - the amounts data object e.g. frb.amounts.options7, frb.amounts.averages
* @param {string} currency - ISO code of currency
* @param {string} country  - ISO code of country (optional)
* @return {array/number}   - depending on source
*/

frb.pickAmounts = function(source, currency, country) {

   if ( source[currency]['default'] ) { // we need to go deeper
       if ( source[currency][country] !== undefined ) {
           return source[currency][country];
       } else {
           return source[currency]['default'];
       }
   } else {
       return source[currency];
   }

};

/* Credit card types so we can show the correct logos */ frb.cardTypes = {

   // Big 6
   'US' : 'vmad',
   'CA' : 'vma',
   'GB' : 'vmaj',
   'IE' : 'vmaj',
   'AU' : 'vmaj',
   'NZ' : 'vma',
   // Euro countries
   'AT' : 'vmaj',
   'BE' : 'vmaj',
   'ES' : 'vmaj',
   'FR' : 'vma',
   'GR' : 'vma',
   'IT' : 'vmaj',
   'LU' : 'vmaj',
   'LV' : 'vma',
   'NL' : 'vmaj',
   'PT' : 'vmaj',
   'SK' : 'vmaj',
   // Others
   'CZ' : 'vmad',
   'DK' : 'vma',
   'HU' : 'vma',
   'IL' : 'vmad',
   'JP' : 'vmaj',
   'MY' : 'vmaj',
   'NO' : 'vma',
   'PL' : 'vma',
   'RO' : 'vma',
   'SE' : 'vma',
   'UA' : 'vma',
   'ZA' : 'vm',
   'IN' : 'vmar', // dLocal - RuPay
   'CH' : 'vma',
   'LI' : 'vma'

};

/**

* Should we show Apple Pay?
*
* Note there is a ~500ms delay in Safari when checking, so only call this if needed
*
* @param  {string} country
* @return {boolean}
*/

frb.shouldShowApplePay = function ( country ) {

   // https://support.apple.com/en-us/HT207957 - minus China mainland
   var appleCountries = [
       'ZA',
       'AU', 'HK', 'JP', 'MO', 'NZ', 'SG', 'TW',
       'AM', 'AT', 'AZ', 'BY', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 
       'EE', 'FO', 'FI', 'FR', 'GE', 'DE', 'GR', 'GL', 'GG', 'HU', 
       'IS', 'IE', 'IM', 'IT', 'KZ', 'JE', 'LV', 'LI', 'LT', 'LU', 
       'MT', 'MC', 'ME', 'NL', 'NO', 'PL', 'PT', 'RO', 'RU', 'SM', 
       'RS', 'SK', 'SI', 'ES', 'SE', 'CH', 'UA', 'GB', 'VA', 
       'CO', 'CR', 'BR', 'MX', 
       'BH', 'IL', 'PS', 'QA', 'SA', 'AE', 
       'CA', 'US'
   ];
   if ( appleCountries.indexOf( country ) === -1 ) {
       return false;
   }
   if ( location.search.match('forceApplePay') ) {
       return true;
   }
   if ( window.ApplePaySession ) {
       if ( ApplePaySession.canMakePayments() ) {
           return true;
       }
   }
   return false;

};

/**

* Display the correct payment methods for current country
*
* Methods should be labeled with class 'frb-pm-xxxx'
* TODO: clean this function up more
*
* @param  {string} country
*/

frb.localizeMethods = function(country) {

   // Test country with *all the methods*
   if ( country === 'ZZ' ) {
       $('.frb-payment-options > div').show();
       return;
   }
   // Hide recurring completely for some countries and endowment
   if ( frb.isEndowment || frb.noRecurringCountries.indexOf(country) !== -1 ) {
       $('.frb-frequency, .recurring-details').hide();
   }
   // Remove any leftover WorldPay and Adyen
   $('.frb-pm-cc-wp').remove();
   $('.frb-pm-cc-adyen').remove();
   // Countries with no PayPal option
   var noPP = ['IN', 'RU', 'SG', 'AE', 'QA', 'OM', 'BD', 'BO', 'PA',
               'PY', 'GT', 'JM', 'TT', 'DZ'];
   if ($.inArray(country, noPP) !== -1) {
       $('.frb-pm-pp').remove();
       $('.frb-pm-pp-usd').remove();
   }
   // Countries with no PayPal for mobile only - https://phabricator.wikimedia.org/T173001
   var noPPmobile = ['PH', 'ID', 'TH', 'KR', 'MY', 'VN'];
   var mobileRegex = /(_mob_|_ipd_|_m_)/;
   if ($.inArray(country, noPPmobile) !== -1) {
       if (mw.centralNotice.data.banner.search(mobileRegex) !== -1) {
           $('.frb-pm-pp').remove();
           $('.frb-pm-pp-usd').remove();
       }
   }
   // Countries where PayPal must be in USD
   var ppUSD = ['BG', 'HR', 'LT', 'MK', 'RO', 'UA', 'SA', 'CN', 'ID', 'KR',
                'KZ', 'MY', 'VN', 'AR', 'CL', 'DO', 'CO', 'NI', 'UY', 'ZA',
                'BH', 'LB', 'VE', 'TR', 'IS', 'BA', 'MV', 'BB', 'BM', 'BZ',
                'CR', 'CW', 'SX', 'HN', 'KN', 'DM', 'AG', 'LC', 'GD', 'FJ',
                'TN', 'BJ', 'BF', 'CI', 'GW', 'ML', 'NE', 'SN', 'TG', 'BR',
                'PE'];
   if ($.inArray(country, ppUSD) !== -1) {
       $('.frb-pm-pp').remove();
       $('.frb-pm-pp-usd').show();
   } else {
       $('.frb-pm-pp').show();
       $('.frb-pm-pp-usd').remove();
   }
   // Show any extra local payment methods, or remove them if not needed
   var extrapaymentmethods = {
       'amazon'   : ['US'], // Note Amazon was removed from current best 2023-10-20
       'bpay'     : [],
       'ideal'    : ['NL'],
       'bt'       : ['BR', 'AR', 'CO', 'CL', 'PE', 'MX', 'IN', 'ZA', 'CZ'], // Bank Transfer (dLocal/Adyen)
       'cash'     : ['MX', 'AR', 'CO', 'CL', 'PE', 'UY'],  // 'Cash' methods (dLocal)
       'pix'      : ['BR'],
       'boleto'   : ['BR']
   };
   // Methods with different labels per country
   var language = mw.config.get('wgUserLanguage');
   var btTranslation = 'Bank Transfer';
   if (language === 'pt') {
       if (country === 'BR') {
           btTranslation = 'Transferência bancária';
       }
   } else if (language === 'es') {
       if (country === 'CL') {
           btTranslation = 'WebPay';
       } else if (country === 'CO') {
           btTranslation = 'PSE Pagos';
       } else {
           btTranslation = 'Transferencia bancaria';
       }
   }
   if (country === 'CZ') {
       if (language === 'en') {
           btTranslation = 'Online Banking';
       }
       if (language === 'cs') {
           btTranslation = 'Internetové Bankovnictví';
       }
   }
   $( '.frb-pm-bt button, .frb-pm-bt label, button.frb-pm-bt' ).text( btTranslation );
   for (var method in extrapaymentmethods) {
       var $methodbutton = $('.frb-pm-' + method);
       if ( $.inArray(country, extrapaymentmethods[method]) !== -1 && !frb.isEndowment ) {
           $methodbutton.show();
       } else {
           $methodbutton.remove();
       }
   }
   // Google Pay - separated from extrapaymentmethods as we want to show on Endowment too
   var googlePayCountries = [
       'AE', 'AT', 'AR', 'AU', 'BE', 'BG', 'BR', 'CA', 'CH', 'CL', 'CO',
       'CZ', 'DE', 'DK', 'EE', 'ES', 'FR', 'GB', 'GR', 'HK', 'HR',
       'HU', 'IE', 'IL', 'IT', 'JP', 'LU', 'LV', 'MX', 'MY', 'NL',
       'NO', 'NZ', 'OM', 'PE', 'PL', 'PT', 'QA', 'RO', 'RU', 'SA', 'SE',
       'SG', 'SK', 'TH', 'TR', 'TW', 'UA', 'US', 'UY', 'VN', 'ZA'
   ];
   if ( $.inArray(country, googlePayCountries) !== -1 ) {
       $('.frb-pm-google').show();
   } else {
       $('.frb-pm-google').remove();
   }
   // Apple Pay
   if ( $('.frb-pm-applepay').length > 0 ) {
       if ( !frb.shouldShowApplePay( country ) ) {
           $('.frb-pm-applepay').remove();
       }
   }

// Venmo var $venmo = $('.frb-pm-venmo'); if ( country === 'US' && $venmo.length > 0 ) { // From MediaWiki:FundraisingBanners/VenmoBrowserCheck.js if ( frb.isVenmoSupported() ) { $venmo.show(); } else { $venmo.remove(); } } else { $venmo.remove(); }

   /* Add card types class to credit card button, so we can show correct logos */
   if ( frb.cardTypes[country] ) {
       $('.frb-pm-cc').addClass('frb-cctypes-' + frb.cardTypes[country] );
   }

};

/**

* Check scheduled payment method outages and hide buttons if needed
*
* Data at https://meta.wikimedia.org/wiki/MediaWiki:FR2013/Resources/PaymentOutages.js
* Methods should be labeled with class 'frb-pm-xxxx'
*
* @param  {string} country code
*/

frb.checkMethodOutages = function(country) {

   // TODO - can we load this a better way?
   /* This file can be used to schedule hiding of individual payment methods from banners
* e.g. if they have scheduled downtime.
*
* Valid methods are:
*	ideal, cc, pp, amazon, bpay, webmoney, cash, pp-usd
* (most of the time it's 'ideal'...)
* Can also limit outage to a specific country with country: "XX" (where XX is an ISO code)
*
* Note that in JavaScript dates the months (and only the months) start at 0.
* Jan=0, Feb=1, Mar=2, Apr=3 etc. How hateful.
*
* Be sure to also update donatewiki if needed e.g. by commenting the method templates
* found at https://donate.wikimedia.org/wiki/Template:2012FR/Form-section/Paymentmethods
* 
*/

var outages = [

   {
       start:      new Date(Date.UTC(2016, 8, 18, 1)),
       end:        new Date(Date.UTC(2016, 8, 18, 7)),
       method:     "ideal"
   }

]; // jshint ignore:line

   var now = new Date();
   for (var i = outages.length - 1; i >= 0; i--) {
       if ( now > outages[i].start && now < outages[i].end ) {
           if (outages[i].country === undefined || outages[i].country == country) {
               $('.frb-pm-' + outages[i].method).hide();
           }
       }
   }

};

/**

* Adjust the amount options and their labels
*
* Inputs should have id frb-amt-psX where X is the index number (starting from 1)
*
* @param  {Object}  source     - object with amounts e.g. frb.amounts.options7
* @param  {string}  currency   - currency code e.g. 'USD'
* @param  {string}  country    - country code  e.g. 'FR' Some currencies can have different options per country.
* @param  {string}  language   - language code e.g. 'en' For symbol formatting
* @param  {boolean} useSymbols - use currency symbols on labels or not? (3 vs $3)
*/

frb.localizeAmountOptions = function(source, currency, country, language, useSymbols) {

   var amountOptions = frb.pickAmounts(source, currency, country);
   $('#frb-form input[name="amount"]').each(function(index) {
       var $input = $(this);
       var $label = $input.siblings('label');
       var i = $input.attr('id').replace('frb-amt-ps', );
       var amount = amountOptions[i-1]; // because IDs start from 1
       if ( amount ) {
           $input.val( amount );
           if ( useSymbols ) {
               $label.text( frb.formatCurrency( currency, amount, language) );
           } else {
               $label.text( frb.formatCurrency( undefined, amount, language) );
           }
       }
   });

};

/**

* Make an element into a link
*
* @param  {string} selector    CSS selector for elements to convert to a link
* @param  {string} language    Code of language (could be es-419 or pt-br)
* @param  {string} baseUrl     URL of link (function will add language parameter)
*/

frb.makeLink = function( selector, language, baseUrl ) {

   var url = baseUrl + '&language=' + language;
   $( selector ).each( function() {
       var $link = $( '<a></a>' );
       $link.html( $( this ).html() );
       $link.attr( { href: url, target: '_blank' } );
       $( this ).replaceWith( $link );
   });

};

/**

* Get the number of banners seen from localStorage
* @return {number} Number of banners seen
*/

frb.getSeenCount = function () {

   // Force with URL parameter 'impression'
   if ( typeof URLSearchParams === 'function' ) { // not available in old browsers
       var urlParams = new URLSearchParams( window.location.search );
       if ( urlParams.has( 'impression' ) ) {
           return urlParams.get( 'impression' );
       }
   }
   try {
       if ( localStorage ) {
           var identifier = mw.centralNotice.internal.state.campaign.mixins.impressionDiet.cookieName,
               lsName = 'CentralNoticeKV|global|impression_diet_' + identifier,
               diet = JSON.parse( localStorage.getItem( lsName ) );
           if ( diet ) {
               return diet.val.seenCount;
           }
       }
   } catch ( ex ) {
       // do nothing - localStorage is configured not to let us read it, or mixin not set
       return;
   }

};

/**

* Helper function to do text replacements and wrap them in correct class
* 
* @param  {RegExp} regex       Regular expression to replace
* @param  {string} replacement String to replace it with
*/

frb.textReplace = function( regex, replacement ) {

   $( '.frb' ).each( function( index ) {
       var newHtml = $( this ).html();
       newHtml = newHtml.replace( regex, '' + replacement + '' );
       $( this ).html( newHtml );
   });

};

/**

* Replace elements with preset ask string amounts
*
* e.g. class="frb-replace-amt-ps4" will be replaced with amount #4, currently $25 in the US
*
* @param  {string} currency - currency code e.g. 'USD'
* @param  {string} country  - country code  e.g. 'FR'
* @param  {string} language - language code e.g. 'en' For symbol formatting
*/

frb.replaceCustomAmounts = function( currency, country, language ) {

   var amountOptions = frb.pickAmounts( frb.amounts.options7, currency, country );
   // Old style element replacements
   $( '.frb [class^="frb-replace-amt-ps"]' ).each( function() {
       var i = $( this ).attr( 'class' ).replace( 'frb-replace-amt-ps',  ),
           amount = amountOptions[ i - 1 ],
           formattedAmount = frb.formatCurrency( currency, amount, language );
       $( this ).html( '<frb-amt>' + formattedAmount + '</frb-amt>' );
   });
   // Text replacements e.g. %amount-4%
   // There is probably a more efficient way to do this, but it's at least fairly simple
   for (var i = 0; i < amountOptions.length; i++) {
       var amount = amountOptions[i],
           formattedAmount,
           regex = new RegExp( '%amount-' + (i+1) + '%', 'gi' );
       if ( frb.textAmountIsoCountries.includes( country ) ) {
           formattedAmount = frb.formatCurrency( undefined, amount, language ) + ' ' + currency;
       } else {
           formattedAmount = frb.formatCurrency( currency, amount, language );
       }
       frb.textReplace( regex, formattedAmount );
   }

};

/**

* Get today's date like "December 3" - English only for now
* 
* @return {string} Today's date as a string
*/

frb.getDateString = function() {

   var date = new Date(),
       locale = mw.centralNotice.data.uselang + '-' + mw.centralNotice.data.country;
   return date.toLocaleString( locale, { day: 'numeric', month: 'long' } );

};

frb.noRecurringCountries = ['AR'];

/* These countries use potentially ambiguous $ sign. Use ISO code instead in text (but still $ for buttons) */ frb.textAmountIsoCountries = ['AR', 'CL', 'CO', 'MX'];

$(function() {

   if ( mw.centralNotice.adminUi ) { // T262693
       return;
   }
   var language = mw.centralNotice.data.uselang;
   var variantLanguage; // for pt-br and es-419, note we can only use these for certain links
   var country  = mw.centralNotice.data.country;
   var currency = frb.getCurrency(country);
   if ( language === 'pt' && country === 'BR' ) {
       variantLanguage = 'pt-br';
   } else if ( language === 'es' && ['AR', 'CL', 'CO', 'PE', 'MX', 'UY'].indexOf( country ) !== -1 ) {
       variantLanguage = 'es-419';
   } else {
       variantLanguage = language;
   }
   // Payment methods
   frb.localizeMethods(country);
   frb.checkMethodOutages(country);
   // Preset amounts
   frb.replaceCustomAmounts( currency, country, language );
   // Basic replacements
   $('.frb-replace-currencysymbol').text( frb.formatCurrency( currency, , language ).replace(' ', ) );
   $('.frb-replace-currencycode').text( currency );
   // Country name
   var countryName;
   if ( frb.countryNames[language] ) {
       countryName = frb.countryNames[language][country] || frb.countryNames.en[country];
   } else {
       countryName = frb.countryNames.en[country];
   }
   $( '.frb-replace-countryname' ).text( countryName );
   frb.textReplace( /%country%/gi, countryName );
   // "in COUNTRY" or equivalent
   var inCountryName;
   if ( frb.inCountryNames[language] ) {
       inCountryName = frb.inCountryNames[language][country] || frb.inCountryNames.en[country];
   } else {
       inCountryName = frb.inCountryNames.en[country];
   }
   $( '.frb-replace-incountryname' ).text( inCountryName );
   frb.textReplace( /%in-country%/gi, inCountryName );
   // Day of week
   // TODO: Replace these with date.toLocaleString so we can drop frb.dayNames? 
   //       Might still need some ways to deal with "this" and capitalization
   var now = new Date();
   var dayNumber = now.getDay();
   var capitalizeText = function( text ) {
       // Capitalize first letter, for use at start of sentence
       return text.charAt(0).toUpperCase() + text.slice(1);
   };
   if ( $('.frb-replace-dayofweek, .frb-replace-dayofweek-capitalize').length > 0 ) {
       if ( frb.dayNames[language] ) {
           $('.frb-replace-dayofweek').text( frb.dayNames[language][dayNumber] );
           $('.frb-replace-dayofweek-capitalize').text( capitalizeText( frb.dayNames[language][dayNumber] ) );
       } else {
           console.log('Warning: banner should contain a day of the week, but no translations found.');
       }
   }
   if ( $('.frb-replace-dayofweek-this, .frb-replace-dayofweek-this-capitalize').length > 0 ) {
       if ( frb.dayNamesThis[language] ) {
           $('.frb-replace-dayofweek-this').text( frb.dayNamesThis[language][dayNumber] );
           $('.frb-replace-dayofweek-this-capitalize').text( capitalizeText( frb.dayNamesThis[language][dayNumber] ) );
       } else {
           console.log('Warning: banner should contain "this DAY", but no translations found.');
       }
   }
   // Simple %weekday% text replacement
   try {
       if ( frb.dayNames[language] ) {
           frb.textReplace( /%weekday%/gi, frb.dayNames[language][dayNumber] );
       } else {
           frb.textReplace( /%weekday%/gi, frb.dayNames['en'][dayNumber] );
       }
   } catch ( error ) {
       console.error( error );
   }
   // Replace %date% with today's date e.g. "December 3"
   try {
       frb.textReplace( /%date%/gi, frb.getDateString() );
   } catch ( error ) {
   	console.log( error );
   }
   // Capitalize
   $('.frb-capitalize').text(function( index, text ) {
       return text.charAt(0).toUpperCase() + text.slice(1);
   });
   // Replace %average%, %minimum% and %amount%
   var average = frb.pickAmounts( frb.amounts.averages, currency, country ),
       ifEveryone = frb.pickAmounts( frb.amounts.ifEveryone, currency, country ),
       avgString,
       ifString;
   if ( frb.textAmountIsoCountries.indexOf(country) !== -1 ) {
       avgString = frb.formatCurrency( undefined, average, language ) + ' ' + currency;
       ifString  = frb.formatCurrency( undefined, ifEveryone, language ) + ' ' + currency;
   } else {
       avgString = frb.formatCurrency( currency, average, language ).replace( /\.$/,  ); // strip any period from end for use in running text
       ifString  = frb.formatCurrency( currency, ifEveryone, language ).replace( /\.$/,  );
   }
   frb.textReplace( /%average%/gi, avgString );
   frb.textReplace( /%minimum%/gi, ifString );
   frb.textReplace( /%amount%/gi,  ifString );
   /**
    * Call a function on every text node contained by a root node.
    *
    * Used so we can do text replacements without accidentally clobbering html and scripts
    *
    * @param  {Node}     rootNode The Node object whose descendants will be recursed through
    * @param  {Function} callback Callback function that receives a Node as its only argument
    */
   function eachTextNode( rootNode, callback ) {
       for ( var node = rootNode.firstChild; node !== null; node = node.nextSibling ) {
           if ( node.nodeType === Node.TEXT_NODE ) {
               callback( node );
           } else if ( node.nodeType === Node.ELEMENT_NODE ) {
               eachTextNode( node, callback );
           }
       }
   }
   // French spacing: replace space before punctuation with  
   if ( language === 'fr' ) {
       var bannerRootElements = document.getElementsByClassName( 'frb' );
       for ( var i = 0; i < bannerRootElements.length; i++ ) {
           eachTextNode( bannerRootElements[i], function( node ) {
               node.textContent = node.textContent.replace( / ([!?;:%])/g, '\u00a0$1' );
           });
       }
   }
   // Links (in smallprint) TODO: merge with frb.makeLink()
   $('.frb-localize-links a').each(function() {
       // Add parameters for LandingCheck
       var uri = new mw.Uri( $(this).attr('href') );
       uri.extend({
           country:      country,
           language:     variantLanguage,
           uselang:      variantLanguage,
           utm_medium:   'sitenotice',
           utm_campaign: mw.centralNotice.data.campaign || 'test',
           utm_source:   mw.centralNotice.data.banner
       });
       $(this).attr('href', uri.toString());
       $(this).attr('target', '_blank'); // Make links open in new tab
   });
   // Add links
   frb.makeLink( '.frb-link-privacy', variantLanguage, 'https://foundation.wikimedia.org/wiki/Special:LandingCheck?basic=true&landing_page=Donor_privacy_policy' );
   frb.makeLink( '.frb-link-tax',     variantLanguage, 'https://donate.wikimedia.org/wiki/Special:LandingCheck?basic=true&landing_page=Tax_deductibility' );
   frb.makeLink( '.frb-link-cancel',  variantLanguage, 'https://donate.wikimedia.org/wiki/Special:LandingCheck?basic=true&landing_page=Cancel_or_change_recurring_giving' );
   // Legal text variants
   if (country === 'US') {
       $('.frb-legal-US').show();
       $('.frb-legal-nonUS, .frb-legal-NL').hide();
   } else if (country === 'NL') {
       $('.frb-legal-NL').show();
       $('.frb-legal-US, .frb-legal-nonUS').hide();
   } else {
       $('.frb-legal-nonUS').show();
       $('.frb-legal-US, .frb-legal-NL').hide();
   }
   // Quick hack for American/British/Commonwealth English differences
   if ( country === 'US' ) {
       $('.frb-lang-enUS').show();
       $('.frb-lang-en5C').hide();
   } else {
       $('.frb-lang-enUS').hide();
       $('.frb-lang-en5C').show();
   }
   // Add this so they get white-space: nowrap from CSS
   $('.frb-ptf-fee, .frb-ptf-total, .frb-upsell-ask').addClass('frb-replaced');
   // Where Remind Me Later should be shown
   var rmlCountries = ['US', 'CA', 'GB', 'IE', 'AU', 'NZ',
                       'IN', 'FR', 'NL', 'BR', 'CL', 'CO', 'MX', 'PE', 'UY'];
   var rmlLanguages = ['en', 'nl', 'ja', 'it', 'sv', 'pt', 'cs', 'es'];
   var rmlEnabled = !frb.isEndowment && rmlCountries.indexOf(country) !== -1 && rmlLanguages.indexOf(language) !== -1;
   if ( rmlEnabled ) {
       $('.frb').addClass('frb-rml-enabled');
   } else {
       $('.frb').addClass('frb-rml-disabled');
   }

});

/* == end of MediaWiki:FundraisingBanners/LocalizeJS-2022.js == */ /* eslint-env es6 */ var frb = frb || {};

/* Based on github:braintree/braintree-web/src/venmo/shared/supports-venmo.js */ frb.isVenmoSupported = function(options) {

 var options = options || {
   allowNewBrowserTab: false,
   allowWebviews: true,
   allowDesktop: true,
   allowDesktopWebLogin: true
 };
 var ua = window.navigator.userAgent;
 var merchantAllowsReturningToNewBrowserTab,
   merchantAllowsWebviews,
   merchantAllowsDesktopBrowsers;
 var isMobileDevice = isAndroid() || isIos();
 var isAndroidChrome = isAndroid() && isChrome();
 var isMobileDeviceThatSupportsReturnToSameTab = isIosSafari() || isAndroidChrome;
 var isKnownUnsupportedMobileBrowser = isIosChrome() || isFacebookOwnedBrowserOnAndroid() || isSamsung();
 options = options || {};
 // NEXT_MAJOR_VERSION allowDesktop will default to true, but can be opted out
 merchantAllowsDesktopBrowsers =
   (options.allowDesktopWebLogin || options.allowDesktop) === true;
 merchantAllowsReturningToNewBrowserTab = options.hasOwnProperty(
   "allowNewBrowserTab"
 )
   ? options.allowNewBrowserTab
   : true;
 // NEXT_MAJOR_VERSION webviews are not supported, except for the case where
 // the merchant themselves is presenting venmo in a webview using the deep
 // link url to get back to their app. For the next major version, we should
 // just not have this option and instead require the merchant to determine
 // if the venmo button should be displayed when presenting it in the
 // merchant's app via a webview.
 merchantAllowsWebviews = options.hasOwnProperty("allowWebviews")
   ? options.allowWebviews
   : true;
 if (isKnownUnsupportedMobileBrowser) {
   return false;
 }
 if (
   !merchantAllowsWebviews &&
   (isAndroidWebview() || isIosWebview())
 ) {
   return false;
 }
 if (!isMobileDevice) {
   return merchantAllowsDesktopBrowsers;
 }
 if (!merchantAllowsReturningToNewBrowserTab) {
   return isMobileDeviceThatSupportsReturnToSameTab;
 }
 return isMobileDevice;
 /* -- functions mostly from github:braintree/browser-detection library -- */
 function isAndroid() {
   return /Android/i.test(ua);
 }
 function isIos(checkIpadOS = true) {
   const iOsTest = /iPhone|iPod|iPad/i.test(ua);
   return checkIpadOS ? iOsTest || isIpadOS() : iOsTest;
 }
 function isIpadOS() {
   // "ontouchend" is used to determine if a browser is on an iPad, otherwise
   // user-agents for iPadOS behave/identify as a desktop browser
   return /Mac|iPad/i.test(ua) && "ontouchend" in window.document;
 }
 function isEdge() {
   return ua.indexOf("Edge/") !== -1 || ua.indexOf("Edg/") !== -1;
 }
 function isSamsung() {
   return /SamsungBrowser/i.test(ua);
 }
 function isDuckDuckGo() {
   return ua.indexOf("DuckDuckGo/") !== -1;
 }
 function isOpera() {
   return (
     ua.indexOf("OPR/") !== -1 ||
     ua.indexOf("Opera/") !== -1 ||
     ua.indexOf("OPT/") !== -1
   );
 }
 function isSilk() {
   return ua.indexOf("Silk/") !== -1;
 }
 function isChrome() {
   return (
     (ua.indexOf("Chrome") !== -1 || ua.indexOf("CriOS") !== -1) &&
     !isEdge() &&
     !isSamsung() &&
     !isDuckDuckGo() &&
     !isOpera() &&
     !isSilk()
   );
 }
 function isIosFirefox() {
   return /FxiOS/i.test(ua);
 }
 function isWebkit() {
   const webkitRegexp = /webkit/i;
   return webkitRegexp.test(ua);
 }
 function isIosChrome() {
   return ua.indexOf("CriOS") > -1;
 }
 function isFacebook() {
   return ua.indexOf("FBAN") > -1;
 }
 function isIosSafari() {
   return (
     isIos() &&
     isWebkit() &&
     !isIosChrome() &&
     !isIosFirefox() &&
     !isFacebook()
   );
 }
 function isFacebookOwnedBrowserOnAndroid() {
   var e = ua.toLowerCase();
   return -1 < e.indexOf("huawei") && -1 < e.indexOf("fban") || isAndroid() && (-1 < e.indexOf("fb_iab") || -1 < e.indexOf("instagram"));
 }
 function isSamsungBrowser() {
   return /SamsungBrowser/i.test(ua);
 }
 function isAndroidWebview() {
   return isAndroid() && -1 < ua.toLowerCase().indexOf("wv");
 }
 function isGoogleSearchApp() {
   return /\bGSA\b/.test(ua);
 }
 function isIosGoogleSearchApp() {
   return isIos() && isGoogleSearchApp();
 }
 function isIosWebview() {
   if (isIos()) {
     // The Google Search iOS app is technically a webview and doesn't support popups.
     if (isIosGoogleSearchApp()) {
       return true;
     }
     // Historically, a webview could be identified by the presence of AppleWebKit and _no_ presence of Safari after.
     return /.+AppleWebKit(?!.*Safari)/i.test(ua);
   }
   return false;
 }

};

frb.HIDE_DURATION_CLOSE = 604800; // 1 week frb.HIDE_DURATION_RML = 604800; // 1 week frb.HIDE_DURATION_CLOSENAG = 86400; // 1 day frb.HIDE_DURATION_ALREADYDONATED = 604800; // 1 week

frb.storedOptions = {};

frb.animationDuration = frb.reduceMotion ? 0 : 400; // slides and scrolls frb.fadeDuration = frb.reduceMotion ? 0 : 600; // transitions between steps

/* Hide banner and nag, and remove related event handlers */ frb.hide = function() {

   $('#centralNotice, .frb').hide();
   $(window).off('.frb');
   clearInterval(frb.updatingTimeInterval);

};

frb.insertInlineBanner = function() {

   // Place frb-inline in article, before first paragraph or at top
   var $inlineBanner = $('#frb-inline');
   var $firstPara    = $('.mw-parser-output > div > p:not(.mw-empty-elt)').first();
   if ( $firstPara.length > 0 && !mw.config.get('wgIsMainPage') ) {
       $firstPara.before( $inlineBanner );
   } else {
       $('#mw-content-text').prepend( $inlineBanner );
   }
   $inlineBanner.show();

};

frb.rml = {

   post: function() {
       /* Create the iframe for the form and use it as the form's target */
       var frameName = 'remindFrame';
       var $form = $('#frb-rml-form');
       if ( $("iframe[name=" + frameName + "]").length === 0 ) {
           var $iframe = $('<iframe style="display: none;" name="' + frameName + '"></iframe>');
           $form.attr('target', $iframe.attr('name'));
           $form.after($iframe);
       }
       $form[0].submit();
   },
   getCurrentDate: function() {
       /* Get current date in correct format for Silverpop */
       var today = new Date();
       var dd = today.getDate();
       var mm = today.getMonth()+1; // January is 0!
       var yyyy = today.getFullYear();
       if( dd < 10 ) {
           dd = '0' + dd;
       }
       if( mm < 10 ) {
           mm = '0' + mm;
       }
       return mm+'/'+dd+'/'+yyyy;
   },
   init: function() {
       /* Prep the reminder form */
       var form = document.getElementById('frb-rml-form'),
           rmlDialog = document.getElementById('frb-dialog-rml');
       form.rml_country.value    = mw.centralNotice.data.country;
       form.rml_language.value   = mw.centralNotice.data.uselang;
       form.rml_submitDate.value = frb.rml.getCurrentDate();
       form.rml_segment.value    = Math.floor((Math.random() * 100) + 1);
       $('#frb-inline .frb-rml-link').on( 'click', function(e) {
           rmlDialog.showModal();
           form.rml_source.value = mw.centralNotice.data.banner;
           return false;
       });
       $('#frb-nag .frb-rml-link').on( 'click', function(e) {
           rmlDialog.showModal();
           form.rml_source.value = mw.centralNotice.data.banner + '_nag';
           return false;
       });
       $('#frb-dialog-rml .frb-dialog-close').on('click', function (e) {
           rmlDialog.close();
       });
       rmlDialog.addEventListener( 'click', frb.closeOnClickOutside );
       $('#frb-rml-submit').click(function() {
           if ( mw.util.validateEmail( form.Email.value ) ) {
               frb.rml.post();
               $('#frb-rml-form').hide();
               $('.frb-rml-ty').show();
               window.setTimeout( function() {
                   rmlDialog.close();
                   frb.hide();
               }, 2500);
               frb.altSetHideCookie( 'close', frb.HIDE_DURATION_RML );
               return false;
           } else {
               $('#frb-rml-email').addClass('frb-haserror').focus();
               $('.frb-error-invalidemail').show();
               return false;
           }
       });
   }

};


frb.initNag = function() {

   /* --- Code for sticky "nag" banner --- */
   var nagHoverTimeout;
   $(window).scroll(function() {
       var nagRevealPosition = $('#frb-inline').offset().top + $('#frb-inline').outerHeight();
       if ( $(window).scrollTop() <= nagRevealPosition ) {
           $('#frb-nag').finish();
           $('#frb-nag').hide();
       } else {
           setTimeout(function(){
               if ( $(window).scrollTop() > nagRevealPosition ) {
                   $('#frb-nag').slideDown( frb.animationDuration );
               }
           }, 1500);
       }
   });
   $('.frb-nag-close').click(function(e) {
       $('#centralNotice').hide(); // Hide nag (but not inline banner)
       frb.altSetHideCookie( 'close', frb.HIDE_DURATION_CLOSENAG );
       clearInterval(frb.updatingTimeInterval);
       e.stopPropagation();
   });

};

frb.showSidebarTooltip = function () {

   mw.loader.using( [ 'oojs-ui-core', 'mediawiki.Uri' ] ).done( function () {
       let $donateLink = $( '#p-donation a' );
       $donateLink.attr( 'href', ( i, oldUrl ) => {
           let uri = new mw.Uri( oldUrl );
           uri.query.utm_source = 'tooltipOnBannerClose';
           return uri.toString();
       });
       let popup = new OO.ui.PopupWidget( {

$content: $( '

{{{FR2015_translations,sidebar-donate-callout}}}

' ),

           padded: true,
           autoclose: true,
           align: 'forwards',
           autoFlip: false,
           $floatableContainer: $( '.navigation-drawer' ),
           position: 'below',
       } );
       $( document.body ).append( popup.$element );
       popup.toggle( true );
       setTimeout( () => {
           popup.$element.fadeOut( frb.fadeDuration );
       }, 5000 );
   } );

};

/* Helper function to close dialog if clicked outside */ frb.closeOnClickOutside = function(e) {

   if ( e.target.tagName !== 'DIALOG' ) {
       return false;
   }
   let rect = e.target.getBoundingClientRect();
   if ( e.clientY < rect.top || e.clientY > rect.bottom || e.clientX < rect.left || e.clientX > rect.right ) {
       e.target.close();
   }

}

$(function() {

   if ( mw.centralNotice.adminUi || !frb.supportedBrowser ) { // T262693
       return;
   }
   frb.toggleMonthly = function( monthly ) {
       if ( monthly.type === 'checkbox' ) {
           monthly = monthly.checked;
       }
       if ( monthly ) {
           $('#frb-frequency-monthly').prop('checked', true);
           $('#frb-monthly-checkbox').prop('checked', true);
           $('.no-monthly input').attr('disabled', true);
           $('#frb-form').addClass('form-monthly');
           if ( $('.form-monthly .no-monthly input[type=radio]').is(':checked') ) {
               $('.form-monthly .no-monthly input[type=radio]').removeAttr('checked');
               frb.setMethod({});
           }
       } else {
           $('#frb-frequency-onetime').prop('checked', true);
           $('#frb-monthly-checkbox').prop('checked', false);
           $('.no-monthly input').attr('disabled', false);
           $('#frb-form').removeClass('form-monthly');
       }
   };
   var language = mw.centralNotice.data.uselang;
   var country  = mw.centralNotice.data.country;
   var currency = frb.getCurrency(country);
   var validAmount, validMethod, validStayInTouch;
   if ( !frb.optinRequired ) {
       validStayInTouch = 1;
   }
   var form = document.getElementById('frb-form');
   frb.extraData = {};
   mw.loader.using(['mediawiki.util']).then(function() {
       frb.rml.init();
   });
   frb.initAmountOptions();
   frb.localizeAmountOptions(frb.amounts.options7, currency, country, language, true);
   frb.localizeErrors();
   // Override
   frb.updateFeeDisplay = function() {
       var currency = frb.getCurrency(mw.centralNotice.data.country),
           language = mw.centralNotice.data.uselang,
           amount, feeAmount, totalAmount;
       amount = frb.getAmount();
       feeAmount = frb.calculateFee(amount);
       if ( $('#frb-ptf-checkbox').prop('checked') ) {
           totalAmount = amount + feeAmount;
       } else {
           totalAmount = amount;
       }
       var feeAmountFormatted = frb.formatCurrency(currency, feeAmount, language);
       $('.frb-ptf-fee').text(feeAmountFormatted);
       var totalAmountFormatted = frb.formatCurrency(currency, totalAmount, language);
       $('.frb-ptf-total').text(totalAmountFormatted);
       if ( validAmount && validMethod ) {
           $('.frb-ptf').slideDown( frb.reduceMotion ? 0 : 400 );
       }
   };
   frb.activateCTA = function () {
       if (validAmount && validMethod && validStayInTouch) {
           $('.frb-form .frb-submit').addClass('active');
           $('.frb-submit-txt-continue').hide();
           $('.frb-submit-txt-donate').show();
       } else {
           $('.frb-form .frb-submit').removeClass('active');
       }
   };
   $('.frb-amounts').on('input change', function() {
       frb.validateAmount();
       validAmount = 1;
       frb.updateFeeDisplay();
       frb.activateCTA();
   });
   frb.setMethod = function (options, frequency) {
       frb.storedOptions = options || { method: 'cc' }; // Default to credit card
       if( frequency === 'no-monthly' ) {
           $('#frb-frequency-monthly').attr('disabled', true);
       } else {
           $('#frb-frequency-monthly').attr('disabled', false);
       }
       validMethod = 1;
       frb.updateFeeDisplay();
       frb.activateCTA();
   };
   // Opt-in requred for certain countries, defined in CoreJS
   if ( frb.optinRequired ) {
       $('.frb-optin').show();
   }
   // Opt-in interaction
   $('.frb-optin').on('change', function() {
       $('.frb-optin').removeClass('frb-haserror');
       validStayInTouch = 1;
       frb.activateCTA();
       $('.frb-error-optin').hide();
       if ( $('#frb-optin-no').is(':checked') ) {
           $('.frb-optin-no-prompt').removeClass('is-positive');
           if ( !$('.frb-optin-no-prompt').is(':visible') ) {
               $('.frb-optin-no-prompt').slideDown( frb.animationDuration );
           }
       } else {
           $('.frb-optin-no-prompt').addClass('is-positive');
       }
   });
   $('.frb-inline-close').on('click', function(e) {
       frb.hide();
       frb.altSetHideCookie( 'close', frb.HIDE_DURATION_CLOSE );
       frb.showSidebarTooltip();
       return false;
   });
   /* -- UPSELL -- */
   frb.updateUpsellAsk = function(isOtherAmountStep) {
       var amount, feeAmount, upsellAmount,
           list = frb.amounts.monthlySuggest[currency];
       if ( list === undefined ) {
           console.log('No monthlySuggest amounts found for ' + currency);
           return;
       }
       // If user is on third step (write a different amount) then get monthly amount if not, the the first form amount
       if (isOtherAmountStep !== undefined) {
           amount = frb.getMonthlyAmount();
       } else {
           amount = frb.getAmount(form);
       }
       // If PTF is checked when we need to calculate the fee for that amount
       if ( $('#frb-ptf-checkbox').prop('checked') ) {
           amount = amount + frb.calculateFee(amount);
       }
       for (var i = list.length - 1; i >= 0; i--) {
           if ( amount <= list[i][0] ) {
               upsellAmount = list[i][1];
           }
       }
       // If user is in the upsell (second step) then the form.otherMonthlyAmount.value will be updated with the upsellAmount calculated
       if (isOtherAmountStep === undefined) {
           form.otherMonthlyAmount.value = upsellAmount;
       }
       // A formatted value will be returned
       var upsellAmountFormatted = frb.formatCurrency(currency, upsellAmount, language);
       // The value of the amount will be updated only if the user is in the upsell (second step)
       if (isOtherAmountStep === undefined) {
           $('.frb-upsell-ask').text(upsellAmountFormatted);
       }
   };
   /**
    * Should we show pre-payment monthly convert?
    *
    * Only if: initial selection is one-time, suggested amount is not 0 (meaning skip),
    * payment method supports monthly, and payment method does not have post-payments monthly convert
    *
    * @returns boolean
    */
   frb.shouldShowMonthlyConvert = function() {
       let postPaymentMethods = [ 'cc', 'apple', 'google' ];
       if (
           frb.getRecurring( document.getElementById( 'frb-form' ) ) ||
           !frb.shouldShowRecurring( frb.storedOptions, mw.centralNotice.data.country ) ||
           form.otherMonthlyAmount.value == 0 ||
           postPaymentMethods.includes( frb.storedOptions.method )
       ) {
           return false;
       } else {
           return true;
       }
   }
   $('#frb-btn-first-submit').on('click', function (e) {
       e.preventDefault();
       if ( frb.validateForm( frb.storedOptions ) ) {
           frb.updateUpsellAsk();
           if ( frb.shouldShowMonthlyConvert() ) {
               $('.frb-step-2').fadeOut( frb.fadeDuration, function () {
                   $('.frb-step-upsell').fadeIn( frb.fadeDuration );
               });
           } else {
               frb.submitForm( frb.storedOptions );
           }
       } else {
           frb.extraData.validateError = 1;
       }
   });
   // Go back to step 2 from upsell
   $('.frb-step-upsell .frb-dialog-back').on('click', function (e) {
       $('.frb-step-upsell').hide();
       $('.frb-step-2').show();
       return false;
   });
   // Go back to upsell from diff-amt
   $('.frb-step-monthly-diff-amt .frb-dialog-back').on('click', function (e) {
       form.otherMonthlyAmount.value = ;
       frb.updateUpsellAsk();
       validAmount = 1;
       frb.activateCTA();
       frb.toggleMonthly(false);
       $('.frb-step-monthly-diff-amt').hide();
       $('.frb-step-upsell').show();
       return false;
   });
   // Donate monthly other amount
   $('.frb-monthly-diff-amt-link').on('click', function (e) {
       form.otherMonthlyAmount.value = ;
       validAmount = 0;
       frb.activateCTA();
       frb.toggleMonthly(true);
       $('.frb-step-upsell').hide();
       $('.frb-step-monthly-diff-amt').show();
       return false;
   });
   // Validate monthly other amount
   $('#frb-amt-monthly-other-input').on('input change', function (e) {
       if (frb.validateMonthlyAmount()) {
           validAmount = 1;
           frb.updateUpsellAsk(true);
       } else {
           validAmount = 0;
       }
       frb.activateCTA();
   });
   // Submit/"Donate now" buttons
   $('#frb-monthly-donate-yes').on('click', function (e) {
       frb.submitMonthly();
       return false;
   });
   $('#frb-monthly-donate-no').on('click', function (e) {
       frb.submitForm(frb.storedOptions);
       return false;
   });
   $('#frb-donate-monthly-other').on('click', function (e) {
       if (frb.validateMonthlyAmount()) {
           frb.submitMonthly();
       }
       return false;
   });


   frb.getMonthlyAmount = function () {
       var form = document.getElementById('frb-form');
       var amount = null;
       // Check the "monthly other" amount box
       if (form.otherMonthlyAmount.value !== ) {
           var otherMonthlyAmount = form.otherMonthlyAmount.value;
           otherMonthlyAmount = otherMonthlyAmount.replace(/[,.](\d)$/, ':$10');
           otherMonthlyAmount = otherMonthlyAmount.replace(/[,.](\d)(\d)$/, ':$1$2');
           otherMonthlyAmount = otherMonthlyAmount.replace(/[$£€¥,.]/g, );
           otherMonthlyAmount = otherMonthlyAmount.replace(/:/, '.');
           amount = otherMonthlyAmount;
       }
       amount = parseFloat(amount);
       if (isNaN(amount)) {
           return 0;
       } else {
           var totalMonthlyAmountFormatted = frb.formatCurrency(currency, amount, language);
           $('.frb-monthly-total').text(totalMonthlyAmountFormatted);
           return amount;
       }
   };
   frb.validateMonthlyAmount = function () {
       var amount = frb.getMonthlyAmount();
       var currency  = frb.getCurrency( mw.centralNotice.data.country );
       var minAmount = frb.amounts.minimums[ currency ];
       if ( amount === null || isNaN(amount) || amount <= 0 || amount < minAmount ) {
           $('.frb-error-bigamount').hide();
           $('.frb-error-smallamount').show();
           return false;
       } else if ( amount > frb.maxUSD * minAmount ) {
           $('.frb-error-bigamount').show();
           return false;
       } else {
           $('.frb-error-smallamount, .frb-error-bigamount').hide();
           return true;
       }
   };
   frb.submitMonthly = function() {
       frb.extraData.monthlyUpsell = 1;
       frb.extraData.originalAmt = frb.getAmount().toString();
       frb.toggleMonthly(true);
       document.getElementById('frb-input-other').checked = true;
       document.getElementById('frb-ptf-checkbox').checked = false;
       form.otherAmount.value = form.otherMonthlyAmount.value;
       frb.submitForm(frb.storedOptions);
   }
   // Focus for Other field
   $('.frb-button--other').on('click keypress', function(e) {
       if ( e.which === 13 || e.type === 'click' ) {
           document.getElementById('frb-input-other').checked = true;
           frb.updateFeeDisplay();
           $('.frb-other-input').focus();
           e.stopPropagation();
       }
   });
   /* Other amount field focus styles */
   $('.frb-other-input')
       .focus(function() {
           $('.frb-button--other').addClass('frb-button--is-focused');
       })
       .blur(function() {
           $('.frb-button--other').removeClass('frb-button--is-focused');
       });
   // Activate #input_amount_other radio when tabbing into #frb-amt-other-input
   // Add focus class to parent
   $('#frb-amt-other-input')
       .blur(function() {
           $(this).closest('.frb-amt-other').removeClass('is-focused');
       })
       .focus(function() {
           document.getElementById('frb-input-other').checked = true;
           frb.updateFeeDisplay();
           $(this).closest('.frb-amt-other').addClass('is-focused');
       });
   /* I already donated */
   var iadDialog = document.getElementById('frb-dialog-iad');
   $('.frb-iad-link').on('click', function(e) {
       iadDialog.showModal();
   });
   $('#frb-dialog-iad .frb-dialog-close').on('click', function(e) {
       iadDialog.close();
       if (e.target.name == 'frb-iad-hide-button') {
           frb.hide();
           frb.altSetHideCookie( 'donate close', frb.HIDE_DURATION_ALREADYDONATED );
           e.target.blur();
       }
       $('.frb-iad-link').focus();
   });
   iadDialog.addEventListener( 'click', frb.closeOnClickOutside );
   // Donation form dialog
   var formDialog = document.getElementById('frb-dialog-form');
   formDialog.addEventListener( 'click', frb.closeOnClickOutside );
   $( '#donate-minimum' ).on( 'click', function(e) {
       e.preventDefault();
       $('#frb-amt-ps1').click();
       formDialog.showModal();
   });
   $( '#donate-custom' ).on( 'click', function(e) {
       e.preventDefault();
       formDialog.showModal();
   });
   $( '#frb-nag .frb-nag-action' ).on( 'click', function(e) {
       e.preventDefault();
       $('#frb-amt-ps1').click();
       formDialog.showModal();
       frb.extraData.clickedNag = 1;
   });
   $( '#frb-dialog-form .frb-dialog-close' ).on( 'click', function(e) {
       e.preventDefault();
       formDialog.close();
   });
   // Text resizing - increase font size until just before it overflows
   const isOverflown = ({ clientHeight, scrollHeight }) => scrollHeight > clientHeight;
   const resizeText = ({ element, elements, minSize = 12, maxSize = 16, step = 1, unit = 'px' }) => {
       (elements || [element]).forEach(el => {
           let i = minSize;
           let overflow = false;
           const parent = el.parentNode;
           while (!overflow && i < maxSize) {
               el.style.fontSize = `${i}${unit}`;
               overflow = isOverflown(parent);
               if (!overflow) {
                   i += step;
               }
           }
           // revert to last state where no overflow happened
           el.style.fontSize = `${i - step}${unit}`
       })
   };
   var throttleResize;
   window.onresize = function(){
       clearTimeout(throttleResize);
       throttleResize = setTimeout(resizeText({
           elements: document.querySelectorAll('.frb-inline-message-text'),
           step: 0.5
       }), 100);
   };
   frb.getTimeString = function() {
       var date = new Date(),
           locale = mw.centralNotice.data.uselang + '-' + mw.centralNotice.data.country;
       return date.toLocaleTimeString( locale, { hour: 'numeric', minute: '2-digit' } );
   };
   $('.frb-updating-time').text( frb.getTimeString );
   frb.updatingTimeInterval = setInterval(function() {
       $('.frb-updating-time').text( frb.getTimeString );
   }, 5000);
   if ( frb.shouldShowBanner() ) {
       frb.insertInlineBanner();
       resizeText({
           elements: document.querySelectorAll('.frb-inline-message-text'),
           step: 0.5
       });
       frb.initNag();
   }

}); </script>