File: /home/frenchy/refonte2023/wordpress/wp-content/plugins/give/build/donationConfirmationReceiptApp.js
!function(){"use strict";var e=window.wp.element;window.React;const t=window.givewp.form.templates,n=t.layouts.wrapper;const o=function(o,i="div",r){const{nodeType:a,type:s}=function(e){let n=null,o=null;return Object.entries(t).forEach((t=>{if("object"==typeof t[1]){const i=t[0],r=Object.keys(t[1]).find((n=>t[1][n]===e));r&&(o=r,n=i)}})),{nodeType:n,type:o}}(o);return t=>(0,e.createElement)(n,{nodeType:a,type:s,htmlTag:i,name:r},(0,e.createElement)(o,{...t}))}(window.givewp.form.templates.layouts.receipt),{receipt:i}=window.givewpDonationConfirmationReceiptExports,r=e=>"string"==typeof e?e:e?.amount?(e=>{const t=parseFloat(e),n=(o=i.settings.currency,r={},new Intl.NumberFormat(navigator.language,{style:"currency",currency:o,...r})).format(t);var o,r;const a=e.replace(/^[\d|.,]+/,"").trim();return a?`${n} ${a}`:n})(e.amount):JSON.stringify(e),a=e=>e?.map((({label:e,value:t})=>({label:e,value:r(t)})));function s(){return(0,e.createElement)(o,{heading:i.settings.heading,description:i.settings.description,donorDashboardUrl:i.settings.donorDashboardUrl,pdfReceiptLink:i.settings.pdfReceiptLink,donorDetails:i.donorDetails,donationDetails:a(i.donationDetails),subscriptionDetails:a(i.subscriptionDetails),additionalDetails:a(i.additionalDetails)})}const l=document.getElementById("root-givewp-donation-confirmation-receipt");e.createRoot?(0,e.createRoot)(l).render((0,e.createElement)(s,null)):(0,e.render)((0,e.createElement)(s,null),l),l.scrollIntoView({behavior:"smooth"})}();