diff --git a/docs/dist/donate-button/0.4/asset-manifest.json b/docs/dist/donate-button/0.4/asset-manifest.json index 7de8eea7..7099e00f 100644 --- a/docs/dist/donate-button/0.4/asset-manifest.json +++ b/docs/dist/donate-button/0.4/asset-manifest.json @@ -1,6 +1,6 @@ { - "bundle.js": "bundle.6f1a2.esm.js", - "bundle.js.map": "bundle.6f1a2.esm.js.map", + "bundle.js": "bundle.a0ac7.esm.js", + "bundle.js.map": "bundle.a0ac7.esm.js.map", "filecoin.svg": "03c114f6e014588a4bde815d9bc85821.svg", "basic-attention-token.svg": "26c9b1d3d7943e6e67cf13e039ba5ac8.svg", "chainlink.svg": "3a5177b76709819ba4663556e60222f8.svg", diff --git a/docs/dist/donate-button/0.4/bundle.4acfa.esm.js b/docs/dist/donate-button/0.4/bundle.4acfa.esm.js new file mode 100644 index 00000000..2b277690 --- /dev/null +++ b/docs/dist/donate-button/0.4/bundle.4acfa.esm.js @@ -0,0 +1,2 @@ +!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(t){return e[t]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="https://assets.every.org/dist/donate-button/0.4/",t(t.s="aBQa")}({"/hs+":function(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function a(e){return Object.entries(e).filter((([,e])=>Boolean(e))).map((e=>e.map((e=>encodeURIComponent(e))).join("="))).join("&")}function i({fundraiserSlug:e,nonprofitSlug:t}){let n=Pe+t;return e&&(n+="/f/"+e),n}function l({methods:e,nonprofitSlug:t,noExit:n,privateNote:r}){return{method:null==e?void 0:e.join(","),utm_campaign:"donate-button",utm_source:t,utm_medium:Xe,no_exit:null!=n?n:1,private_note:r}}function c(e){var t;const n=new URL(e),r=n.pathname.split("/f/")[1],o=n.pathname.split("/")[1],a=new URLSearchParams(n.search),i=function(e){if(e)return e.split(",").filter((e=>et.includes(e)))}(a.get(rt.METHOD)),l=function(e){if(e)return Object.values(Ke).find((t=>t.toUpperCase()===e.toUpperCase()))}(a.get(rt.FREQUENCY)),c=function(e){if(!e)return;const t=Number.parseInt(e,10);return Number.isNaN(t)?void 0:t}(a.get(rt.AMOUNT)),s=null!=(t=a.get(rt.MONTHLY_TITLE))?t:void 0,u=function(e){if(e)return e.split(",").map(Number.parseInt).filter(Boolean).slice(0,nt)}(a.get(rt.SUGGESTED_AMOUNTS));if(o)return{fundraiserSlug:r,nonprofitSlug:o,defaultFrequency:l,methods:i,lockMonthlyFrequency:l===Ke.Monthly,monthlyTitle:s,addAmounts:u,defaultDonationAmount:c}}function s(e,t){xe.options.__h&&xe.options.__h(dt,e,bt||t),bt=0;var n=dt.__H||(dt.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:_t}),n.__[e]}function u(e){return bt=1,p(C,e)}function p(e,t,n){var r=s(pt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):C(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=dt,!dt.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!a||a.call(this,e,t,n);var i=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&r.__c.props===e)&&(!a||a.call(this,e,t,n))};dt.u=!0;var a=dt.shouldComponentUpdate,i=dt.componentWillUpdate;dt.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,o(e,t,n),a=r}i&&i.call(this,e,t,n)},dt.shouldComponentUpdate=o}return r.__N||r.__}function d(e,t){var n=s(pt++,3);!xe.options.__s&&O(n.__H,t)&&(n.__=e,n.i=t,dt.__H.__h.push(n))}function h(e){return bt=5,f((function(){return{current:e}}),[])}function f(e,t){var n=s(pt++,7);return O(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function b(e,t){return bt=8,f((function(){return e}),t)}function m(e){var t=dt.context[e.__c],n=s(pt++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(dt)),t.props.value):e.__}function _(){for(var e;e=mt.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(v),e.__H.__h.forEach(g),e.__H.__h=[]}catch(t){e.__H.__h=[],xe.options.__e(t,e.__v)}}function y(e){var t,n=function(){clearTimeout(r),jt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);jt&&(t=requestAnimationFrame(n))}function v(e){var t=dt,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),dt=t}function g(e){var t=dt;e.__c=e.__(),dt=t}function O(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function C(e,t){return"function"==typeof t?t(e):t}function j(){const e=function(){const[e,t]=u(null);return d((()=>{(async()=>{try{const e=await Ft(Ut,{apiVersion:$t});t(e)}catch(e){}})()}),[]),e}(),[t,n]=u(!1),r=b((async e=>{const t=null==e?void 0:e.paymentRequest({country:"US",currency:"usd",total:{label:"test",amount:0},requestPayerName:!1,requestPayerEmail:!1}),r=Boolean(await(null==t?void 0:t.canMakePayment()));n(r)}),[]);d((()=>{e&&r(e)}),[r,e]);const o=Boolean(window.ApplePaySession);return{googlePay:t,applePay:t&&o}}function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t{try{return[e,t].map(encodeURIComponent).join("=")}catch(e){return null}})).filter(L).join("&");return n?[e,n].join("?"):e}(`mailto:${null!=(t=e.address)?t:""}`,T({},e.subject?{subject:e.subject}:{},e.body?{body:e.body}:{}))}function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;te.cssText)).join("\n"),o=document.createElement("style");o.id="every-shadow-styles",o.innerHTML=dl+r,ml.append(o)}}function Oe(e){let{element:t}=e,n=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,hl);if(!t.parentNode)return;const r=t.parentNode;Object(xe.render)(Object(xe.h)(Ye,n),r,t)}function Ce(){document.querySelectorAll("*[href^='https://www.every.org/']").forEach((e=>{const t=e.getAttribute("href");if(null!=t&&t.includes("#/donate")){const n=c(t);if(!n)return;const r=function(e){ml||ge();const t=document.createElement("div");return ml.append(t),new _l(e,t)}(n);null===e.getAttribute("data-every-style")?e.addEventListener("click",(e=>{e.preventDefault(),r.show()})):Oe(ye({element:e,onClick:()=>{r.show()}},n,{url:t}))}}))}function je(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{withLogo:t=!0,textColor:n="#fff",bgColor:r="#00a380",borderRadius:o="100px",fontSize:c="16px",padding:s="12px 20px",className:u,onClick:p,target:d="_blank",url:h}=e,f=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,Ze);const b=h||`${i(m=f)}?${a(l(m))}#/${We}`;var m;return Object(xe.h)("a",{href:b,style:{background:r,color:n,borderRadius:o,fontSize:c,padding:s},className:[Ae,u].filter(Boolean).join(" "),target:d,onClick:p?e=>{e.preventDefault(),p()}:void 0},t&&Object(xe.h)("svg",{className:Te,style:{color:n,height:c,width:c},width:"64",height:"56",viewBox:"0 0 64 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ve||(Ve=Object(xe.h)("path",{d:"M48.3746 20.9558C48.3746 9.03877 38.4374 0 25.6754 0C11.4001 0 0 12.0685 0 27.0153C0 43.1235 12.8125 56 30.0639 56C47.3153 56 62.7508 42.3156 63.9614 24.3895H56.0924C54.6295 37.8215 43.2799 48.1226 30.0639 48.1226C17.3523 48.1226 7.91952 38.7809 7.91952 27.0153C7.91952 16.4112 15.7886 7.87737 25.6754 7.87737C33.948 7.87737 40.4551 13.5329 40.4551 20.9558C40.4551 27.1163 36.0161 32.2669 30.1143 32.2669V40.1443C40.556 40.1443 48.3746 31.4085 48.3746 20.9558Z"}))),ze||(ze=Object(xe.h)("span",{className:Le},"Donate")))};let Ke=function(e){return e.Monthly="monthly",e.OneTime="once",e.Unselected="",e}({}),Qe=function(e){return e.CREDIT_CARD="card",e.BANK="bank",e.PAYPAL="paypal",e.VENMO="venmo",e.PAYMENT_REQUEST="pay",e.CRYPTO="crypto",e.STOCKS="stocks",e.DAF="daf",e.GIFT_CARD="gift",e}({});const Je=[Qe.VENMO,Qe.DAF,Qe.CRYPTO,Qe.STOCKS],et=Object.values(Qe),tt=et.filter((e=>e!==Qe.GIFT_CARD)),nt=5;var rt=function(e){return e.METHOD="method",e.FREQUENCY="frequency",e.MONTHLY_TITLE="monthlyTitle",e.SUGGESTED_AMOUNTS="suggestedAmounts",e.AMOUNT="amount",e}(rt||{});const ot=()=>{const e=document.createElement("style");e.innerHTML='\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Regular-Pro.woff2) format("woff2");\n font-weight: 400;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Bold-Pro.woff2) format("woff2");\n font-weight: bold;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Medium-Pro.woff2) format("woff2");\n font-weight: 500;\n font-style: normal;\n font-display: swap;\n }\n ',document.head.append(e)};var at=n("nr9d"),it=n.n(at);const lt={methods:Object.values(tt),show:!1,addAmounts:[10,50,100],defaultFrequency:Ke.OneTime,minDonationAmount:5,primaryColor:"#018669",showGiftCardOption:!1},ct={arrayMerge:(e,t)=>t},st=Object(xe.createContext)({}),ut=({options:e,children:t})=>{const n=(e=>{var t;const n=null==(t=e.methods)?void 0:t.filter((e=>et.includes(e))),r=(n&&n.length>0?n:tt).concat(e.showGiftCardOption?[Qe.GIFT_CARD]:[]);return it.a.all([lt,e,{methods:r}],ct)})(e);return Object(xe.h)(st.Provider,{value:n},t)};var pt,dt,ht,ft,bt=0,mt=[],_t=[],yt=xe.options.__b,vt=xe.options.__r,gt=xe.options.diffed,Ot=xe.options.__c,Ct=xe.options.unmount;xe.options.__b=function(e){dt=null,yt&&yt(e)},xe.options.__r=function(e){vt&&vt(e),pt=0;var t=(dt=e.__c).__H;t&&(ht===dt?(t.__h=[],dt.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=_t,e.__N=e.i=void 0}))):(t.__h.forEach(v),t.__h.forEach(g),t.__h=[],pt=0)),ht=dt},xe.options.diffed=function(e){gt&>(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==mt.push(t)&&ft===xe.options.requestAnimationFrame||((ft=xe.options.requestAnimationFrame)||y)(_)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==_t&&(e.__=e.__V),e.i=void 0,e.__V=_t}))),ht=dt=null},xe.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(v),e.__h=e.__h.filter((function(e){return!e.__||g(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],xe.options.__e(n,e.__v)}})),Ot&&Ot(e,t)},xe.options.unmount=function(e){Ct&&Ct(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{v(e)}catch(e){t=e}})),n.__H=void 0,t&&xe.options.__e(t,n.__v))};var jt="function"==typeof requestAnimationFrame;const wt=()=>m(st),xt=Symbol("FundraiserFetchError"),kt=Symbol("FundraiserFetching"),St=Object(xe.createContext)({fundraiser:kt}),Nt=({children:e})=>{const{fundraiserSlug:t,nonprofitSlug:n}=wt(),[r,o]=u(kt),a=b((async()=>{if(t)try{const e=await async function(e,t){const n=`${Me}/${e}/fundraiser/${t}`;return(await fetch(n).then((async e=>e.json()))).data.fundraiser}(n,t);o(e)}catch(e){o(xt)}else o(void 0)}),[n,t]);return d((()=>{a()}),[a]),Object(xe.h)(St.Provider,{value:{fundraiser:r}},e)},At=Symbol("NonprofitFetchError"),Tt=Symbol("NonprofitFetching"),Lt=Object(xe.createContext)({nonprofit:Tt}),Pt=({children:e})=>{const{nonprofitSlug:t}=wt(),[n,r]=u(Tt),o=b((async()=>{try{const e=await async function(e){return(await fetch(`${Me}/${e}`).then((async e=>e.json()))).data.nonprofit}(t);r(e)}catch(e){r(At)}}),[t]);return d((()=>{o()}),[o]),Object(xe.h)(Lt.Provider,{value:{nonprofit:n}},e)};var Mt="https://js.stripe.com/v3",Et=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Dt="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Rt=null,Ht=function(e){return null!==Rt||(Rt=new Promise((function(t,n){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(Dt),window.Stripe)t(window.Stripe);else try{var r=function(){for(var e=document.querySelectorAll('script[src^="'.concat(Mt,'"]')),t=0;t element.");return r.appendChild(n),n}(e)),r.addEventListener("load",(function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))})),r.addEventListener("error",(function(){n(new Error("Failed to load Stripe.js"))}))}catch(e){return void n(e)}else t(null)}))),Rt},It=Promise.resolve().then((function(){return Ht(null)})),Bt=!1;It.catch((function(e){Bt||console.warn(e)}));var Ft=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const n=wt(),[r,o]=u(n.defaultFrequency),[a,i]=u(n.defaultDonationAmount),[l,c]=u(null),[s,p]=u(n.methods[0]),[d,h]=u(),[f,b]=u(),[m,_]=u(),[y,v]=u(),g=j(),[O,C]=u();return Object(xe.h)(qt.Provider,{value:{frequency:r,setFrequency:o,donationAmount:a,setDonationAmount:i,hideWidget:t,submitError:l,setSubmitError:c,selectedPaymentMethod:s,setSelectedPaymentMethod:p,stockAmount:d,setStockAmount:h,stockSymbol:f,setStockSymbol:b,cryptoAmount:m,setCryptoAmount:_,cryptoCurrency:y,setCryptoCurrency:v,paymentRequestAvailable:g,privateNote:O,setPrivateNote:C}},e)},Xt=({options:e,hide:t,children:n})=>Object(xe.h)(ut,{options:e},Object(xe.h)(Gt,{hide:t},Object(xe.h)(Pt,null,Object(xe.h)(Nt,null,n))));let Wt=function(e){return e.PhoneOnly="@media only screen and (max-width: 37.44em)",e.TabletUp="@media only screen and (min-width: 37.5em)",e.TabletLandscapeUp="@media only screen and (min-width: 56.25em)",e.DesktopUp="@media only screen and (min-width: 75em)",e.BigDesktopUp="@media only screen and (min-width: 112.5em)",e}({}),Vt=function(e){return e.LightGray="#EAEDED",e.Gray="#f3f6f6",e.DarkGray="#868A8A",e.Black="#272727",e.Text="#2E3434",e.TextGray="#868383",e.TextOpaque="rgba(46, 52, 52, 0.6)",e.Error="#D95C35",e.ErrorShadow="rgba(217, 92, 53, 0.2)",e.Transparent="transparent",e.White="#fff",e}({});const zt={fontSize:"32px",lineHeight:"36px"},Zt={fontSize:"24px",lineHeight:"32px"},Yt={fontSize:"20px",lineHeight:"24px"},Kt={fontSize:"16px",lineHeight:"24px"},Qt={fontSize:"14px",lineHeight:"20px"};let Jt=function(e){return e.Empty="0",e.XXS="4px",e.XS="8px",e.S="12px",e.M="16px",e.L="20px",e.XL="24px",e.XXL="32px",e.Stack_XXS="0 0 4px 0",e.Stack_XS="0 0 8px 0",e.Stack_S="0 0 12px 0",e.Stack_M="0 0 16px 0",e.Stack_L="0 0 20px 0",e.Stack_XL="0 0 24px 0",e.Stack_XXL="0 0 32px 0",e.Inset_XXS="4px 4px 4px 4px",e.Inset_XS="8px 8px 8px 8px",e.Inset_S="12px 12px 12px 12px",e.Inset_M="16px 16px 16px 16px",e.Inset_L="20px 20px 20px 20px",e.Inset_XL="24px 24px 24px 24px",e.Inset_XXL="32px 32px 32px 32px",e.InsetSquish_XS="8px 16px",e.InsetSquish_S="12px 24px",e.InsetSquish_M="16px 32px",e.InsetSquish_L="20px 40px",e.InsetSquish_XL="24px 48px",e.Inline_XS="0 8px 0 0",e.Inline_S="0 12px 0 0",e.Inline_M="0 16px 0 0",e.Inline_L="0 20px 0 0",e.Inline_XL="0 24px 0 0",e.Inline_XXL="0 24px 0 0",e}({});const en=e=>({display:"flex",flexDirection:"column","> *:not(:last-child)":{marginBottom:"number"==typeof e?`${e}px`:e}}),tn=e=>({display:"flex",flexDirection:"row","> *:not(:last-child)":{marginRight:"number"==typeof e?`${e}px`:e}}),nn=e=>Se()(en(e)),rn=e=>en(e),on=e=>tn(e),an=Se()({display:"flex",flexDirection:"column",gap:Jt.M}),ln={position:"relative",top:"-1px",transform:"rotate(180deg)"},cn={"> p":{marginBottom:Jt.XS}},sn=Se()(w({},cn,{maxHeight:"1000px",transition:"all 1s",opacity:"1"})),un=Se()(w({},cn,{opacity:"0",overflow:"hidden",maxHeight:"0",transition:"all 0.5s"})),pn=e=>Se()(w({},on(Jt.S),Qt,{alignItems:"center",justifyContent:"space-between",width:"100%",border:"none",background:"transparent",textAlign:"start",padding:0,":hover":{cursor:"pointer"},"> svg":w({width:"16px",height:"16px"},e?ln:{})},e?{fontWeight:700}:{fontWeight:500,color:Vt.TextGray})),dn=Se()({color:Vt.Text,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}});var hn,fn,bn,mn,_n,yn,vn,gn,On;const Cn=(e,t)=>{const n=`100% of your donation is tax-deductible to the extent allowed by US law. \n Your donation is made to Every.org, a tax-exempt US 501(c)(3) charity that\n grants unrestricted funds to ${e.name} on your behalf. \n As a legal matter, Every.org must provide any donations to ${e.name} on an\n unrestricted basis, regardless of any designations or restrictions made by\n you.`,r=t&&!function(e){return e.nonprofitId===e.creatorNonprofitId}(t);let o="";return e.hasAdmin&&r?o=`Please note ${e.name} has not reviewed or approved the content of this peer-to-peer fundraiser.`:e.hasAdmin||r?!e.hasAdmin&&r&&(o=`Please note ${e.name} has not provided permission for this solicitation or reviewed or approved the content of this peer-to-peer fundraiser.`):o=`Please note ${e.name} has not provided permission for this solicitation.`,Object(xe.h)("span",null,n," ",o)},jn=Se()({backgroundColor:"white",padding:`${Jt.XL} ${Jt.XL} 0px`,borderRadius:"unset",overflow:"hidden",[Wt.TabletLandscapeUp]:{borderRadius:"16px",padding:Jt.M}});var wn=e=>e.filter((e=>Boolean(e))).join(" ");const xn=({children:e,className:t})=>Object(xe.h)("div",{className:wn([jn,t])},e),kn=()=>m(St).fundraiser,Sn=()=>{const e=kn();if(e!==xt&&e!==kt)return e},Nn=()=>m(Lt).nonprofit,An=()=>{const e=Nn();if(e===At||e===Tt)throw new Error("Nonprofit error");return e},Tn=()=>m(qt);var Ln;const Pn=()=>Ln||(Ln=Object(xe.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Object(xe.h)("path",{d:"M6 9l6 6 6-6"})));var Mn,En,Dn;const Rn=({faqData:e})=>{const[t,n]=u(!1);return Object(xe.h)("div",{className:(r=e.mobileOnly,Se()(w({},Qt,r?{[Wt.TabletLandscapeUp]:{padding:"none"}}:{})))},Object(xe.h)("button",{type:"button",className:pn(t),onClick:()=>{n(!t)}},Object(xe.h)("span",null,e.title),Mn||(Mn=Object(xe.h)(Pn,null))),Object(xe.h)("div",{className:t?sn:un},e.description));var r},Hn=()=>{const e=An(),t=Sn(),{selectedPaymentMethod:n}=Tn(),r=[{id:"intro",title:"How does Every.org accept my donation?",description:Object(xe.h)(xe.Fragment,null,Object(xe.h)("p",null,"Your donation first goes to Every.org, a US 501(c)(3) public charity, and we immediately issue a receipt for your charitable contribution. ",x(e)),En||(En=Object(xe.h)("p",null,"This process ensures your eligibility for a tax-deduction, consolidates records of your giving, and reduces the administrative burden on the nonprofits.")))},{id:"fees",title:"Are there any fees?",description:N(n,e)},{id:"tax",title:"Is this donation tax-deductible?",description:Object(xe.h)("p",null,"Yes, ",Cn(e,t))},{id:"receipt",title:"Will I receive a receipt for my donation?",description:Dn||(Dn=Object(xe.h)(xe.Fragment,null,Object(xe.h)("p",null,"Yes, after your donation payment is confirmed, you will immediately get a receipt emailed to you."),Object(xe.h)("p",null,"Additionally, if you have an Every.org account, you can always get a single itemized receipt that shows all your donations in a given year.")))},{id:"p2p",mobileOnly:!0,title:`How else can I support ${e.name}`,description:Object(xe.h)("p",null,"You can also rally your friends, family, and social networks to support this nonprofit by starting your own fundraiser for them."," ",Object(xe.h)("a",{className:dn,href:Pe+e.primarySlug+"/"+Re},"Start a fundraiser for ",e.name))}];return Object(xe.h)(xn,null,Object(xe.h)("div",{className:an},r.map((e=>Object(xe.h)(Rn,{key:e.id,faqData:e})))))},In=Se()(A({padding:`${Jt.XL} ${Jt.XL} 0px`,backgroundColor:"unset",display:"flex",flexDirection:"column"},Qt,{color:Vt.TextGray,[Wt.TabletLandscapeUp]:{padding:`0px ${Jt.L}`},"> p":{margin:0},"> p:not(:last-child)":{marginBottom:Jt.XS}})),Bn=Se()({color:Vt.TextGray,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}});var Fn,Un,$n,qn;const Gn=["children"],Xn=P({address:"support@every.org"}),Wn=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,Gn);return Object(xe.h)("a",M({className:Bn},n),t)},Vn=()=>{const e=An(),t=Sn();return Object(xe.h)(xn,{className:In},Object(xe.h)("p",null,Cn(e,t)," ",Fn||(Fn=Object(xe.h)(Wn,{href:He},"See Terms"))),Un||(Un=Object(xe.h)("p",null,"Need help? See FAQs or contact us at our"," ",Object(xe.h)(Wn,{href:Ie},"Help Center"),".")),$n||($n=Object(xe.h)("p",null,"Have ideas for how we can build a better donation experience?"," ",Object(xe.h)(Wn,{href:Xn},"Send us feedback"),".")),qn||(qn=Object(xe.h)("p",null,"We respect your privacy. To learn more, check out our"," ",Object(xe.h)(Wn,{href:Be},"Privacy Policy"),".")))},zn=e=>Se()({color:e,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}}),Zn=Se()({display:"none",[Wt.TabletLandscapeUp]:{display:"block"}}),Yn=()=>{const{primaryColor:e,nonprofitSlug:t}=wt(),n=Pe+t+"/"+Re;return Object(xe.h)(xn,{className:Zn},Object(xe.h)("p",null,Object(xe.h)("a",{className:zn(e),href:n},"Start a fundraiser")," ","to rally your friends and family"))},Kn=Se()({display:"grid",gridGap:0,gridTemplateColumns:"1fr",gridTemplateAreas:'"header"\n "promoBanners"\n "nonprofitInfo"\n "paymentProcess"\n "fundraiserLink"\n "faq"\n "footer"',[Wt.TabletLandscapeUp]:{gridColumnGap:Jt.XL,gridTemplateColumns:"1fr 2fr",gridTemplateRows:"auto auto auto auto auto 1fr",gridTemplateAreas:'"header header"\n "promoBanners promoBanners"\n "nonprofitInfo paymentProcess"\n "fundraiserLink paymentProcess"\n "faq paymentProcess"\n "faq footer"',"& > div:not(:last-child):not(:empty)":{marginBottom:Jt.XL}},"& > #every-header":{gridArea:"header",display:"block",[Wt.TabletLandscapeUp]:{display:"none"}},"& > #every-promoBanners":{gridArea:"promoBanners"},"& > #every-nonprofitInfo":{gridArea:"nonprofitInfo"},"& > #every-paymentProcess":{gridArea:"paymentProcess"},"& > #every-faq":{gridArea:"faq"},"& > #every-fundraiserLink":{gridArea:"fundraiserLink"},"& > #every-footer":{gridArea:"footer"}}),Qn=({children:e})=>Object(xe.h)("div",{className:Kn},e),Jn=Se()({cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",backgroundColor:"transparent",fontFamily:Ne.BasisGrotesque}),er=Se()({display:"block",[Wt.TabletLandscapeUp]:{display:"none"}}),tr=Se()({position:"absolute",right:Jt.XL,top:Jt.XL,padding:Jt.XXS,background:"white",borderRadius:"8px",display:"none",[Wt.TabletLandscapeUp]:{display:"block"}}),nr=()=>{const{primaryColor:e}=wt();return Object(xe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M18 6L6 18",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Object(xe.h)("path",{d:"M6 6L18 18",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))};var rr;const or=({className:e})=>{const{hideWidget:t}=Tn();return Object(xe.h)("button",{type:"button",className:wn([Jn,e]),onClick:t},rr||(rr=Object(xe.h)(nr,null)))},ar=Se()({display:"flex",justifyContent:"flex-end",alignItems:"center",padding:`${Jt.M} ${Jt.XL}`,[Wt.TabletLandscapeUp]:{padding:0}});var ir;const lr=()=>ir||(ir=Object(xe.h)("div",{className:ar},Object(xe.h)(or,{className:er})));let cr=function(e){return e.Small="4px",e.Default="8px",e.Medium="24px",e.Big="100px",e.Circle="100%",e}({});const sr=Se()({lineHeight:"20px","> span":{fontWeight:700}}),ur=e=>Se()({borderRadius:cr.Circle,overflow:"hidden",display:"block",backgroundImage:`url(${e})`,backgroundSize:"contain",width:"40px",height:"40px",flexShrink:0,[Wt.TabletLandscapeUp]:{width:"64px",height:"64px"}}),pr=Se()({padding:`${Jt.XL}`,[Wt.TabletLandscapeUp]:E({},rn(Jt.S),{padding:`${Jt.L}`})}),dr=Se()(E({},on(Jt.S),{alignItems:"center"})),hr=Se()(E({},Qt,{color:"rgba(0, 0, 0, 0.7)",display:"none",[Wt.TabletLandscapeUp]:{display:"block"}}));var fr;const br=()=>{const{name:e,logoCloudinaryId:t,hasAdmin:n}=An(),r=`https://res.cloudinary.com/everydotorg/image/upload/f_auto,q_auto/${null!=t?t:"NonprofitAvatarPlaceholder"}`;return Object(xe.h)(xn,{className:pr},Object(xe.h)("div",{className:dr},Object(xe.h)("div",{alt:"nonprofit logo",className:ur(r)}),Object(xe.h)("h1",{className:sr},n?Object(xe.h)(xe.Fragment,null,Object(xe.h)("span",null,e)," is using Every.org to accept this donation"):Object(xe.h)(xe.Fragment,null,"Every.org created this page for ",Object(xe.h)("span",null,e)))),fr||(fr=Object(xe.h)("p",{className:hr},"Every.org is a 501(c)(3) nonprofit building free, accessible giving tools for every person and every organization.")))};var mr;const _r=()=>mr||(mr=Object(xe.h)(br,null));let yr=function(e){return e.Normal="1px solid",e.Big="4px solid",e}({});const vr=(e,t)=>`${e} ${t}`,gr=Se()({"& input":{fontSize:Kt.fontSize,lineHeight:Kt.fontSize,fontWeight:400}}),Or=Se()({background:Vt.White,borderRadius:`0 0 ${cr.Default} ${cr.Default}`,border:vr(yr.Normal,Vt.LightGray),borderTop:"none"}),Cr=Se()({display:"flex",alignItems:"center",gap:Jt.XXS}),jr=Se()({overflowY:"scroll",height:"100%",maxHeight:"200px"}),wr=Se()({borderBottom:vr(yr.Normal,Vt.LightGray)}),xr=Se()(D({border:"none",background:"none",padding:`${Jt.S} ${Jt.M}`},Kt,{width:"100%",display:"flex",alignItems:"center",gap:Jt.XS,":hover":{cursor:"pointer"},"> span:last-of-type":D({marginLeft:"auto"},Qt,{color:Vt.TextGray})})),kr=(e,t)=>Se()(D({marginLeft:"auto"},Qt,{color:Vt.TextGray,display:"flex",gap:Jt.XS,alignItems:"center","> svg":D({color:e},t?ln:{})})),Sr=Se()({borderRadius:`${cr.Default} ${cr.Default} 0 0 `}),Nr=Se()({gap:Jt.XS,"> input":{textAlign:"right"}}),Ar=(Se()({}),Se()({border:vr(yr.Normal,Vt.Error)})),Tr=Se()({fontSize:Zt.fontSize,lineHeight:Zt.fontSize,fontWeight:700}),Lr=Se()(R({},Zt,{fontWeight:700,display:"inline-flex",marginRight:Jt.XXS})),Pr=e=>Se()(R({},Yt,{fontWeight:700,color:e,display:"inline-flex",marginLeft:Jt.XXS})),Mr=Se()(R({},on(Jt.M),{justifyContent:"center"})),Er=e=>Se()(R({},Kt,{color:e,borderRadius:cr.Big,fontWeight:500,border:"none",padding:0,fontFamily:"inherit",cursor:"pointer",background:"unset",[Wt.TabletLandscapeUp]:{border:`1px solid ${Vt.DarkGray}`,padding:`${Jt.XS} ${Jt.L}`}}));(B.prototype=new xe.Component).isPureReactComponent=!0,B.prototype.shouldComponentUpdate=function(e,t){return I(this.props,e)||I(this.state,t)};var Dr=xe.options.__b;xe.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Dr&&Dr(e)};var Rr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911,Hr=xe.options.__e;xe.options.__e=function(e,t,n,r){if(e.then)for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Hr(e,t,n,r)};var Ir=xe.options.unmount;xe.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Ir&&Ir(e)},(q.prototype=new xe.Component).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=G(r.__v),a=!1,i=function(){a||(a=!0,n.__R=null,o?o(l):l())};n.__R=i;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=$(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},q.prototype.componentWillUnmount=function(){this.t=[]},q.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=U(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&Object(xe.createElement)(xe.Fragment,null,e.fallback);return o&&(o.__h=null),[Object(xe.createElement)(xe.Fragment,null,t.__a?null:e.children),o]};var Br=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]Se()({position:"relative",padding:Jt.M,display:"flex",flexDirection:"row",alignItems:"center",borderRadius:cr.Default,color:Vt.Text,backgroundColor:Vt.Gray,border:vr(yr.Normal,Vt.LightGray),cursor:"text",":focus-within":{backgroundColor:"white",borderColor:e}}),Qr=Se()({fontSize:Kt.fontSize,lineHeight:Kt.fontSize,fontFamily:"inherit",flex:1,border:"none",outline:"none",background:"transparent",width:"100%",minWidth:"unset",padding:0,margin:0,"::placeholder":{fontWeight:400},"::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:0},"::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0},"-moz-appearance":"textfield"}),Jr=["containerClassName","inputClassName","containerOnClick"];var eo=F(((e,t)=>{const n=h(),{primaryColor:r}=wt(),{containerClassName:o,inputClassName:a}=e,i=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,Jr);return Object(xe.h)("div",{className:wn([Kr(r),o]),onClick:()=>{var e;null==(e=n.current)||e.focus()}},Object(xe.h)("textarea",Z({ref:e=>{e&&(n.current=e,t&&(t.current=e))},className:wn([Qr,a])},i)))}));const to=["sufix","sufixClassName","prefix","prefixClassName","containerClassName","inputClassName","containerOnClick"];var no=F(((e,t)=>{const{sufix:n,sufixClassName:r,prefix:o,prefixClassName:a,containerClassName:i,inputClassName:l,containerOnClick:c}=e,s=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,to),u=h(),{primaryColor:p}=wt();return Object(xe.h)("div",{className:wn([Kr(p),i]),onClick:()=>{var e;c?c():null==(e=u.current)||e.focus()}},o&&Object(xe.h)("div",{className:a},o),Object(xe.h)("input",Y({ref:e=>{e&&(u.current=e,t&&(t.current=e))},className:wn([Qr,l])},s)),n&&Object(xe.h)("div",{className:r},n))}));let ro=function(e){return e.ALGO="ALGO",e.APE="APE",e.AVAX="AVAX",e.BAT="BAT",e.BTC="BTC",e.DAI="DAI",e.DOGE="DOGE",e.DOT="DOT",e.ETH="ETH",e.FIL="FIL",e.GRT="GRT",e.LINK="LINK",e.LTC="LTC",e.MATIC="MATIC",e.MOB="MOB",e.RAY="RAY",e.SAMO="SAMO",e.SBR="SBR",e.SHIB="SHIB",e.SOL="SOL",e.UNI="UNI",e.USDC="USDC",e.USDT="USDT",e.XTZ="XTZ",e.ZEC="ZEC",e}({}),oo=function(e){return e.ERC20="ERC-20",e.SPL="SPL",e}({});const ao=[ro.ALGO,ro.MOB],io={[ro.ALGO]:{displayName:"Algorand",abbreviation:"ALGO",decimalOffset:6},[ro.APE]:{displayName:"Apecoin",abbreviation:"APE",decimalOffset:18,contractType:oo.ERC20},[ro.AVAX]:{displayName:"Avalanche",abbreviation:"AVAX",decimalOffset:9},[ro.BAT]:{displayName:"Basic Attention Token",abbreviation:"BAT",decimalOffset:18,contractType:oo.ERC20},[ro.BTC]:{displayName:"Bitcoin",abbreviation:"BTC",decimalOffset:8},[ro.DOGE]:{displayName:"DogeCoin",abbreviation:"DOGE",decimalOffset:8},[ro.DAI]:{displayName:"Dai",abbreviation:"DAI",decimalOffset:18,contractType:oo.ERC20},[ro.DOT]:{displayName:"Polkadot",abbreviation:"DOT",decimalOffset:10},[ro.ETH]:{displayName:"Ethereum",abbreviation:"ETH",decimalOffset:18},[ro.FIL]:{displayName:"Filecoin",abbreviation:"FIL",decimalOffset:18},[ro.GRT]:{displayName:"The Graph",abbreviation:"GRT",decimalOffset:18,contractType:oo.ERC20},[ro.LINK]:{displayName:"Chainlink",abbreviation:"LINK",decimalOffset:18,contractType:oo.ERC20},[ro.LTC]:{displayName:"Litecoin",abbreviation:"LTC",decimalOffset:8},[ro.MATIC]:{displayName:"Polygon",abbreviation:"MATIC",decimalOffset:18,contractType:oo.ERC20},[ro.MOB]:{displayName:"MobileCoin",abbreviation:"MOB",decimalOffset:12},[ro.RAY]:{displayName:"Raydium",abbreviation:"RAY",decimalOffset:6,contractType:oo.SPL},[ro.SAMO]:{displayName:"Samoyed",abbreviation:"SAMO",decimalOffset:9,contractType:oo.SPL},[ro.SBR]:{displayName:"Saber",abbreviation:"SBR",decimalOffset:6,contractType:oo.SPL},[ro.SHIB]:{displayName:"Shiba Inu",abbreviation:"SHIB",decimalOffset:18,contractType:oo.ERC20},[ro.SOL]:{displayName:"Solana",abbreviation:"SOL",decimalOffset:9},[ro.UNI]:{displayName:"Uniswap",abbreviation:"UNI",decimalOffset:18,contractType:oo.ERC20},[ro.USDC]:{displayName:"USD Coin",abbreviation:"USDC",decimalOffset:6,contractType:oo.ERC20},[ro.USDT]:{displayName:"Tether",abbreviation:"USDT",decimalOffset:6},[ro.XTZ]:{displayName:"Tezos",abbreviation:"XTZ",decimalOffset:6},[ro.ZEC]:{displayName:"ZCash",abbreviation:"ZEC",decimalOffset:8}},lo=()=>{wt();const{cryptoAmount:e,setCryptoAmount:t,cryptoCurrency:n,submitError:r,setSubmitError:o}=Tn(),a=wn([Nr,...r?[Ar]:[]]);return Object(xe.h)("div",{className:a},Object(xe.h)(no,{id:"donation-input",inputClassName:Tr,containerClassName:a,type:"number",inputMode:"decimal",pattern:"[+-]?(\\d*\\.)?\\d+",step:K(n),value:e,sufix:Object(xe.h)("span",null,n),onInput:e=>{const n=e.currentTarget.value;""===n&&(e.currentTarget.value=n,t(void 0));const r=Number.parseFloat(n);!Number.isNaN(r)&&/[+-]?(\d*\.)?\d+/g.test(n)&&(t(r),o(null))}}))};var co=n("kPAj");const so={[ro.ALGO]:n.p+"58f20393bf2b41f944c6229c2af785b9.svg",[ro.APE]:n.p+"5982461fe2304c26f3a3cf4c50806dad.svg",[ro.AVAX]:n.p+"b31a89ce5555412a0c8a4c6463286584.svg",[ro.BAT]:n.p+"26c9b1d3d7943e6e67cf13e039ba5ac8.svg",[ro.BTC]:n.p+"9052c75387065f76bb3436b7e4ce12cd.svg",[ro.DOGE]:n.p+"4d81ee51fa2520df58ae092aeb3d0bd4.svg",[ro.DAI]:n.p+"f8f4253f02d1fbc4bf04d0959a6e614c.svg",[ro.DOT]:n.p+"f588feb3cbbcc0fb259a3630ec7e34ba.svg",[ro.ETH]:n.p+"8098252f28e93069c75d6010d3ac6bc1.svg",[ro.FIL]:n.p+"03c114f6e014588a4bde815d9bc85821.svg",[ro.GRT]:n.p+"5450d3cada4fd0370ab8d885765f5cc3.svg",[ro.LINK]:n.p+"3a5177b76709819ba4663556e60222f8.svg",[ro.LTC]:n.p+"cc9ce389e9a4e0f518e3caeb7b60912d.svg",[ro.MATIC]:n.p+"3e1eb932bdbaa2318584813bf468be53.svg",[ro.MOB]:n.p+"8f22b294629293d29895fddef0a8baea.svg",[ro.RAY]:n.p+"badb98080214485db486794fb59a95cc.svg",[ro.SAMO]:n.p+"e4bfa8eb04696d4fd5ea04ca4c35469b.svg",[ro.SBR]:n.p+"fc9295a4651c56d5b4e8c3aa13a93208.svg",[ro.SHIB]:n.p+"743324f8e09d34a894c21e91c396f289.svg",[ro.SOL]:n.p+"b9021bb757262a32de6d8931015051d9.svg",[ro.UNI]:n.p+"45bcde5a98dbbdf2a4e0769eca2154f1.svg",[ro.USDC]:n.p+"bc2c9e9d67b73656a6da5dd177aa10a2.svg",[ro.USDT]:n.p+"7ab9396038b4befda4354b2a476d9064.svg",[ro.XTZ]:n.p+"6214ae0b42d798a0c9a51503a27a66bf.svg",[ro.ZEC]:n.p+"88611c6e2f9450f29ece8d2b36641670.svg"},uo=({currency:e})=>Object(xe.h)("img",{src:so[e],alt:e+"_icon",width:24,height:24});var po;const ho=()=>po||(po=Object(xe.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-search"},Object(xe.h)("circle",{cx:"11",cy:"11",r:"8"}),Object(xe.h)("path",{d:"M21 21l-4.35-4.35"})));var fo,bo,mo;const _o=[ro.BTC,ro.ETH,ro.USDC],yo=_o.map((e=>ee(e))),vo=Object.values(ro).filter((e=>!_o.includes(e))).filter((e=>!ao.includes(e))).map((e=>ee(e))),go=Object.values(ro).map((e=>ee(e))),Oo=({onClick:e,option:t})=>Object(xe.h)("li",{key:t.value,role:"option"},Object(xe.h)("button",{type:"button",className:xr,onClick:()=>{e(t)}},Object(xe.h)(uo,{currency:t.value}),Object(xe.h)("span",null,t.label),Object(xe.h)("span",null,t.contractType))),Co=()=>{const e=An(),{primaryColor:t}=wt(),n=`Contents: I would like to make a crypto donation to support https://www.every.org/${e.primarySlug}.\n\nMy name:\nToken name:\nToken symbol:\nToken quantity:\n\nPlease reply back with an address where I can donate, as this is worth over $5,000 USD.`;return Object(xe.h)("a",{className:zn(t),href:P({address:De,subject:`Crypto donation for ${e.name}`,body:n})},De)},jo=()=>{const{submitError:e,cryptoCurrency:t,setCryptoCurrency:n}=Tn(),{primaryColor:r}=wt(),o=h(null),[a,i]=u(go.find((e=>e.value===t))),[l,c]=u(null==a?void 0:a.label),[s,p]=u(!a),d=e=>{i(e),n(e.value),c(e.label),p(!1)},f=()=>{i(void 0),n(void 0),p(!0),c("")},b=wn([Cr,...e?[Ar]:[],...s?[Sr]:[]]),m=e=>Object(xe.h)(Oo,{option:e,onClick:d}),_=l?Object(co.filter)(l,go,{extract:e=>{const t=io[e.value];return[t.displayName,t.abbreviation].join(" ")}}).map((e=>e.original)):void 0;return Object(xe.h)("div",{className:gr},Object(xe.h)(no,{ref:o,inputClassName:Tr,containerOnClick:()=>{var e;null==(e=o.current)||e.focus(),f()},value:l,prefix:a?Object(xe.h)(uo,{currency:a.value}):fo||(fo=Object(xe.h)(ho,null)),prefixClassName:Se()({display:"inline-flex"}),sufixClassName:kr(r,s),containerClassName:b,sufix:Object(xe.h)(xe.Fragment,null,Object(xe.h)("span",null,null==a?void 0:a.contractType)," ",bo||(bo=Object(xe.h)(Pn,null))),onInput:e=>{c(e.currentTarget.value),i(void 0),n(void 0),p(!0)},onFocus:f}),s&&Object(xe.h)("div",{className:Or},Object(xe.h)("div",{className:jr},_?0===_.length?Object(xe.h)("div",{className:Se()({padding:"20px"})},"We don't currently support this coin on our site, but for donations worth over $5,000 USD we can do it manually. Please email ",mo||(mo=Object(xe.h)(Co,null))," to arrange."):Object(xe.h)("ul",null,_.map((e=>m(e)))):Object(xe.h)(xe.Fragment,null,Object(xe.h)("ul",{className:wr},yo.map((e=>m(e)))),Object(xe.h)("ul",null,vo.map((e=>m(e))))))))};var wo;const xo=()=>wo||(wo=Object(xe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M14.9384 5.2052C15.6282 4.34238 16.0964 3.18386 15.9729 2C14.9631 2.05021 13.7308 2.6662 13.0174 3.5297C12.3768 4.26915 11.8098 5.47617 11.9576 6.61041C13.0912 6.70874 14.2237 6.04381 14.9384 5.2052Z",fill:"#2E3434"}),Object(xe.h)("path",{d:"M15.9595 6.83176C14.3133 6.73371 12.9136 7.76606 12.1275 7.76606C11.3409 7.76606 10.1371 6.88118 8.83501 6.90503C7.14031 6.92992 5.56781 7.88812 4.70782 9.41211C2.93897 12.4608 4.24102 16.9832 5.96114 19.4662C6.79647 20.6946 7.80318 22.0472 9.12968 21.9986C10.383 21.9494 10.8743 21.1871 12.3977 21.1871C13.9201 21.1871 14.3626 21.9986 15.6893 21.974C17.0651 21.9494 17.9253 20.745 18.7606 19.5154C19.7189 18.115 20.1111 16.7629 20.1358 16.6887C20.1111 16.6641 17.4828 15.6558 17.4584 12.6324C17.4336 10.1009 19.522 8.89672 19.6203 8.82205C18.441 7.07785 16.5983 6.88118 15.9595 6.83176Z",fill:"#2E3434"})));var ko;var So;const No=({className:e})=>Object(xe.h)("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},So||(So=Object(xe.h)("path",{d:"M20 12v10H4V12M22 7H2v5h20V7zM12 22V7M12 7H7.5a2.5 2.5 0 110-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z",stroke:"#00A37F",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})));var Ao;const To=()=>Ao||(Ao=Object(xe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M22 12.2296C22 11.5499 21.9438 10.8665 21.8238 10.1978H12.2013V14.0483H17.7117C17.483 15.2902 16.7483 16.3887 15.6725 17.0868V19.5853H18.9599C20.8904 17.8437 22 15.2718 22 12.2296Z",fill:"#4285F4"}),Object(xe.h)("path",{d:"M12.2013 21.9998C14.9528 21.9998 17.2731 21.1143 18.9637 19.5859L15.6762 17.0874C14.7616 17.6974 13.5808 18.0427 12.2051 18.0427C9.5436 18.0427 7.28697 16.2828 6.47728 13.9166H3.08484V16.4922C4.81667 19.8688 8.34406 21.9998 12.2013 21.9998Z",fill:"#34A853"}),Object(xe.h)("path",{d:"M6.4739 13.9165C6.04657 12.6747 6.04657 11.3299 6.4739 10.088V7.51245H3.08521C1.63826 10.3379 1.63826 13.6667 3.08521 16.4921L6.4739 13.9165Z",fill:"#FBBC04"}),Object(xe.h)("path",{d:"M12.2013 5.95801C13.6558 5.93596 15.0615 6.47239 16.1148 7.45707L19.0274 4.60224C17.1832 2.90477 14.7353 1.97152 12.2013 2.00092C8.34406 2.00092 4.81667 4.13194 3.08484 7.51218L6.47353 10.0878C7.27947 7.71794 9.53985 5.95801 12.2013 5.95801Z",fill:"#EA4335"})));var Lo;var Po;var Mo,Eo;const Do={[Qe.CREDIT_CARD]:Object(xe.h)((()=>{const{primaryColor:e}=wt();return Object(xe.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M21 4.74316H3C1.89543 4.74316 1 5.63859 1 6.74316V18.7432C1 19.8477 1.89543 20.7432 3 20.7432H21C22.1046 20.7432 23 19.8477 23 18.7432V6.74316C23 5.63859 22.1046 4.74316 21 4.74316Z",stroke:e,strokeWidth:"2",strokeLinecap:"round"}),Object(xe.h)("path",{d:"M1 10.7432H23",stroke:e,strokeWidth:"2",strokeLinecap:"round"}))}),null),[Qe.BANK]:Object(xe.h)((()=>{const{primaryColor:e}=wt();return Object(xe.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M4 8.74348V19.2435M7 19.2435V8.74348M16 8.74348V19.2435M19 19.2435V8.74348M3.5 22.7435H19.5C20.33 22.7435 21 22.7435 21 21.2435C21 19.7435 20.33 19.7435 19.5 19.7435H3.5C2.67 19.7435 2 19.7435 2 21.2435C2 22.7435 2.67 22.7435 3.5 22.7435ZM10.57 2.23348L2.67 6.39348C2.26 6.60348 2 7.03348 2 7.49348C2 8.18348 2.56 8.74348 3.25 8.74348H19.76C20.44 8.74348 21 8.18348 21 7.49348C21 7.03348 20.74 6.60348 20.33 6.39348L12.43 2.23348C11.85 1.92348 11.15 1.92348 10.57 2.23348Z",stroke:e,strokeWidth:"2"}))}),null),[Qe.PAYPAL]:Object(xe.h)((()=>Lo||(Lo=Object(xe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M8.78495 22.0251L9.12912 19.7433L8.36247 19.7248H4.70166L7.24574 2.88757C7.25331 2.83613 7.27835 2.78924 7.31628 2.75545C7.3542 2.72166 7.4025 2.70322 7.45237 2.70349H13.625C15.6742 2.70349 17.0884 3.14858 17.8268 4.02709C18.1729 4.43921 18.3934 4.86988 18.5 5.34382C18.6118 5.84111 18.6138 6.43525 18.5046 7.1599L18.4967 7.21278V7.67711L18.8428 7.88179C19.1071 8.02153 19.3446 8.21056 19.5436 8.43953C19.8398 8.79189 20.0313 9.23973 20.1122 9.77068C20.1958 10.3167 20.1682 10.9665 20.0313 11.7022C19.8733 12.5484 19.618 13.2854 19.2732 13.8885C18.9689 14.4287 18.5599 14.8966 18.0722 15.2622C17.6142 15.6015 17.07 15.8591 16.4547 16.0239C15.8585 16.186 15.1787 16.2678 14.4331 16.2678H13.9527C13.6092 16.2678 13.2756 16.3969 13.0137 16.6284C12.7521 16.8623 12.5786 17.1856 12.5241 17.5405L12.4879 17.7459L11.8798 21.7675L11.8522 21.9152C11.845 21.9619 11.8324 21.9853 11.814 22.0011C11.7962 22.0163 11.7739 22.0248 11.7508 22.0251H8.78495Z",fill:"#253B80"}),Object(xe.h)("path",{d:"M19.1713 7.26611C19.1528 7.38906 19.1318 7.51476 19.1081 7.64389C18.2941 12.0062 15.5091 13.5132 11.9523 13.5132H10.1413C9.70633 13.5132 9.33979 13.8429 9.27201 14.2907L8.3448 20.4286L8.08223 22.1684C8.07177 22.2374 8.07576 22.308 8.09393 22.3752C8.1121 22.4425 8.14402 22.5048 8.18749 22.558C8.23096 22.6111 8.28494 22.6538 8.34572 22.683C8.4065 22.7123 8.47264 22.7275 8.53958 22.7275H11.7516C12.132 22.7275 12.4551 22.439 12.515 22.0475L12.5465 21.8772L13.1513 17.8714L13.1901 17.6516C13.2494 17.2587 13.5731 16.9702 13.9535 16.9702H14.4339C17.5459 16.9702 19.982 15.6514 20.694 11.8352C20.9915 10.2409 20.8375 8.90979 20.0504 7.97359C19.801 7.68398 19.5031 7.44424 19.1713 7.26611Z",fill:"#179BD7"}),Object(xe.h)("path",{d:"M18.3102 6.91227C18.0503 6.83379 17.7858 6.77254 17.5185 6.72888C16.9903 6.64415 16.4565 6.60349 15.9221 6.6073H11.084C10.8998 6.60715 10.7218 6.67576 10.5819 6.80073C10.442 6.9257 10.3496 7.09877 10.3213 7.28867L9.29206 14.0928L9.26245 14.2913C9.29451 14.0747 9.39979 13.8772 9.55924 13.7346C9.71869 13.592 9.92177 13.5136 10.1318 13.5138H11.9427C15.4996 13.5138 18.2845 12.0061 19.0985 7.64447C19.1229 7.51534 19.1433 7.38964 19.1617 7.26669C18.9469 7.14912 18.723 7.05055 18.4925 6.97203C18.432 6.95109 18.3712 6.93117 18.3102 6.91227Z",fill:"#222D65"}),Object(xe.h)("path",{d:"M10.3267 7.2882C10.3547 7.09825 10.4471 6.92509 10.5871 6.80018C10.727 6.67528 10.9053 6.60692 11.0894 6.60752H15.9275C16.5007 6.60752 17.0357 6.64667 17.5239 6.72909C17.8544 6.78329 18.1802 6.86436 18.4985 6.97156C18.7387 7.05467 18.9618 7.15289 19.1678 7.26622C19.41 5.65414 19.1658 4.55653 18.3307 3.56263C17.4101 2.46844 15.7485 2 13.6223 2H7.44964C7.01531 2 6.64482 2.3297 6.5777 2.77822L4.00664 19.7885C3.99467 19.8675 3.99922 19.9482 4.02 20.0252C4.04077 20.1022 4.07727 20.1735 4.12699 20.2344C4.1767 20.2952 4.23845 20.3441 4.30799 20.3776C4.37753 20.4112 4.4532 20.4286 4.5298 20.4287H8.34066L9.29748 14.0923L10.3267 7.2882Z",fill:"#253B80"})))),null),[Qe.VENMO]:Object(xe.h)((()=>Po||(Po=Object(xe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M20.0439 2.17969C20.7029 3.32032 21 4.49518 21 5.97926C21 10.7127 17.1441 16.8618 14.0147 21.1797H6.86672L4 3.21606L10.2588 2.59335L11.7745 15.3756C13.1907 12.9578 14.9383 9.15825 14.9383 6.56776C14.9383 5.14981 14.7065 4.184 14.3443 3.38876L20.0439 2.17969Z",fill:"#3D95CE"})))),null),[Qe.CRYPTO]:Object(xe.h)((()=>{const{primaryColor:e}=wt();return Object(xe.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 7.74316C4.23858 7.74316 2 9.98174 2 12.7432C2 15.5046 4.23858 17.7432 7 17.7432C9.76142 17.7432 12 15.5046 12 12.7432C12 9.98174 9.76142 7.74316 7 7.74316ZM0 12.7432C0 8.87717 3.13401 5.74316 7 5.74316C10.866 5.74316 14 8.87717 14 12.7432C14 16.6092 10.866 19.7432 7 19.7432C3.13401 19.7432 0 16.6092 0 12.7432Z",fill:e}),Object(xe.h)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1577 9.96518C11.5898 10.6788 11.9998 11.762 11.9998 12.7432C11.9998 13.7243 11.5898 14.8076 11.1577 15.5212C11.6896 14.7266 11.9998 13.7711 11.9998 12.7432C11.9998 11.7152 11.6896 10.7597 11.1577 9.96518ZM11.9999 7.84425C12.4759 8.32999 12.8816 8.88479 13.2007 9.49223C14.1189 8.42024 15.4804 7.74316 16.9998 7.74316C19.7613 7.74316 21.9998 9.98174 21.9998 12.7432C21.9998 15.5046 19.7613 17.7432 16.9998 17.7432C15.4804 17.7432 14.1189 17.0661 13.2007 15.9941C12.8816 16.6015 12.4759 17.1563 11.9999 17.6421C13.2696 18.9376 15.0405 19.7432 16.9998 19.7432C20.8658 19.7432 23.9998 16.6092 23.9998 12.7432C23.9998 8.87717 20.8658 5.74316 16.9998 5.74316C15.0405 5.74316 13.2696 6.5487 11.9999 7.84425Z",fill:e}))}),null),[Qe.STOCKS]:Object(xe.h)((()=>{const{primaryColor:e}=wt();return Object(xe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",display:"ACCENT"},Object(xe.h)("path",{d:"M21 4H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z",stroke:e,strokeWidth:"2",strokeLinecap:"round"}),Object(xe.h)("path",{d:"M4.5 16.5L6 14l5 1 2.5-2h3l3-5.5",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}),null),[Qe.DAF]:Object(xe.h)((()=>ko||(ko=Object(xe.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("g",{clipPath:"url(#clip0_6252_22297)"},Object(xe.h)("path",{d:"M16.5765 4.96037C16.6594 5.00932 16.6809 5.11885 16.6232 5.19596L16.5759 5.2593L15.0086 7.35896L14.3138 8.29026C14.1242 8.54394 13.7833 8.62317 13.4831 8.52256C13.0331 8.37178 12.5519 8.29026 12.051 8.29026C11.5273 8.29026 11.025 8.37948 10.5576 8.54425C8.79202 9.1636 7.5255 10.8523 7.5255 12.8374C7.5255 13.6592 7.74264 14.4303 8.12246 15.0959C8.27802 15.3682 8.46016 15.6228 8.66692 15.8559C9.49528 16.7938 10.7048 17.3851 12.051 17.3851C12.3493 17.3851 12.4882 17.7411 12.2551 17.9272C12.1878 17.9808 12.1198 18.0335 12.051 18.0852C10.765 19.0543 9.21333 19.686 7.5255 19.8527C7.23059 19.882 6.93178 19.897 6.62909 19.897C6.44094 19.897 6.25947 19.8288 6.1178 19.705C6.05234 19.6478 5.98768 19.5895 5.92388 19.5304C5.25044 18.9084 4.67162 18.1855 4.21142 17.3845C3.55353 16.2421 3.13611 14.9422 3.02787 13.5557C3.00972 13.3186 3 13.0796 3 12.8374C3 11.1812 3.4414 9.62795 4.21142 8.29026C4.62236 7.57518 5.12793 6.92326 5.70999 6.34951C6.25315 5.81352 6.86243 5.34526 7.5255 4.96037C8.85684 4.18667 10.4021 3.74316 12.051 3.74316C12.1476 3.74316 12.2448 3.74447 12.3407 3.74837C13.8808 3.79657 15.3236 4.23226 16.5765 4.96037Z",fill:"#4DA3B3"}),Object(xe.h)("path",{d:"M19.8329 17.5145C19.8902 17.7092 19.7155 17.893 19.5181 17.8456C19.5181 17.8456 19.5181 17.8456 19.5181 17.8456C19.252 17.7817 19.1303 17.8928 18.9815 18.1224C18.6911 18.5706 18.0776 19.2612 18.0034 19.346C15.5724 22.1292 11.6274 22.1812 8.38852 21.0562C8.37562 21.0516 8.36273 21.0471 8.35048 21.0432C8.06547 20.9438 7.79658 20.8432 7.55155 20.747C7.356 20.6706 7.17601 20.5972 7.01593 20.5295C6.718 20.4036 6.76112 20.2967 7.08212 20.3365C7.24332 20.3567 7.40195 20.3697 7.55155 20.3781C7.84763 20.395 8.11027 20.3938 8.29155 20.3889C8.46291 20.3843 8.63426 20.3771 8.80536 20.3668C9.38849 20.3316 9.97709 20.2206 10.5583 20.0287C11.0948 19.8507 11.5952 19.613 12.0537 19.3246C12.338 19.1473 12.6063 18.9492 12.8578 18.7348C12.9919 18.6205 13.1202 18.5023 13.2446 18.3789C13.5748 18.0515 13.8708 17.6923 14.1268 17.3091C14.253 17.1207 14.3702 16.9266 14.4771 16.7271C14.4989 16.6863 14.4761 16.6361 14.4311 16.6252C14.0905 16.5435 13.965 16.1245 14.2047 15.8691L15.8892 14.0744C15.8895 14.0741 15.8895 14.0741 15.8898 14.0737C15.8988 14.0642 16.3261 13.6097 16.4665 13.4599C16.495 13.4295 16.5266 13.3957 16.5551 13.3652L17.1097 12.7742L17.35 12.5181C17.688 12.1579 18.2894 12.3006 18.4296 12.7742L19.0377 14.8286L19.5259 16.4789C19.5266 16.4813 19.5288 16.4829 19.5312 16.4834C19.5345 16.4841 19.5365 16.4877 19.5356 16.4909C19.5349 16.4935 19.5342 16.496 19.5336 16.4986C19.5332 16.5007 19.5332 16.5028 19.5338 16.5049L19.7715 17.3085L19.7992 17.4001L19.8329 17.5145Z",fill:"#91CCD7"}),Object(xe.h)("path",{d:"M5.42485 14.1279C4.19233 14.3874 2.95172 13.5889 3.00945 12.3307C3.06474 11.1259 3.36198 9.93661 3.89227 8.83616C4.75517 7.04549 6.1866 5.59086 7.96317 4.69928C9.73974 3.80771 11.7615 3.52936 13.7129 3.90767C14.9121 4.14016 16.0433 4.61261 17.0423 5.2883C18.0857 5.99397 17.9844 7.46586 17.0397 8.29894C16.095 9.13202 14.6462 8.96341 13.4564 8.55014C13.2576 8.4811 13.0533 8.42597 12.8448 8.38555C11.8824 8.19897 10.8853 8.33625 10.0091 8.77597C9.13287 9.21569 8.4269 9.9331 8.00132 10.8163C7.90912 11.0076 7.83121 11.2043 7.76777 11.405C7.38804 12.6059 6.65738 13.8683 5.42485 14.1279Z",fill:"#4DA3B3"})),Object(xe.h)("defs",null,Object(xe.h)("clipPath",{id:"clip0_6252_22297"},Object(xe.h)("rect",{width:"18",height:"18",fill:"white",transform:"translate(3 3.74316)"})))))),null),[Qe.GIFT_CARD]:Object(xe.h)(No,null)},Ro=({method:e})=>{const{paymentRequestAvailable:t}=Tn();return function(e,t){return e===Qe.PAYMENT_REQUEST?t.applePay?Mo||(Mo=Object(xe.h)(xo,null)):Eo||(Eo=Object(xe.h)(To,null)):Do[e]}(e,t)},Ho={[Qe.CREDIT_CARD]:"Card",[Qe.BANK]:"Bank",[Qe.PAYPAL]:"PayPal",[Qe.VENMO]:"Venmo",[Qe.GIFT_CARD]:"Gift card",[Qe.CRYPTO]:"Crypto",[Qe.STOCKS]:"Stocks",[Qe.DAF]:"DAF"},Io=({method:e})=>{const{paymentRequestAvailable:t}=Tn(),n=function(e,t){return e===Qe.PAYMENT_REQUEST?t.applePay?"Apple Pay":"Google Pay":Ho[e]}(e,t);return Object(xe.h)("span",{className:Se()(te({},Kt))},n)},Bo=Se()({padding:`${Jt.XL} ${Jt.XL} 0px`,[Wt.TabletLandscapeUp]:{padding:"0px"}}),Fo=Se()({border:"none",padding:0,margin:0,fontSize:"100%",font:"inherit",verticalAlign:"baseline"}),Uo=Se()(ne({fontWeight:700},Kt,{marginBottom:Jt.S})),$o=Se()(ne({},rn(Jt.XL),{padding:"0px",[Wt.TabletLandscapeUp]:{padding:Jt.XXL}})),qo=Se()({display:"grid",gridTemplateColumns:"1fr",[Wt.TabletLandscapeUp]:{gridAutoFlow:"column",gridTemplateColumns:"auto 1fr"}}),Go=Se()({height:"100%",width:"100%",minWidth:"170px",flexGrow:1,backgroundColor:Vt.LightGray,display:"none",[Wt.TabletLandscapeUp]:re({},rn(0))}),Xo=wn([Fo,Se()({display:"block",[Wt.TabletLandscapeUp]:{display:"none"}})]),Wo=Se()({display:"grid",gridTemplateColumns:"1fr 1fr",gridGap:Jt.S}),Vo=re({},on(Jt.XS),{alignItems:"center",justifyContent:"flex-start",width:"100%",background:"transparent"}),zo=(e,t)=>Se()(re({},Vo,{border:`1px solid ${Vt.DarkGray}`,background:"transparent",textAlign:"start",padding:`${Jt.XXS} ${Jt.S}`,borderRadius:cr.Default,":hover":{cursor:"pointer",background:Vt.Gray},"& > svg":{width:"20px",height:"20px"}},e?{background:t,border:`1px solid ${t}`,fontWeight:700,color:"white","& > svg":{filter:"brightness(0) invert(1)",width:"20px",height:"20px"},":hover":{background:t}}:{}));var Zo;const Yo=()=>{const{methods:e,lockMonthlyFrequency:t}=wt(),{paymentRequestAvailable:n}=Tn();return f((()=>e.filter((e=>(!t||!Je.includes(e))&&(e!==Qe.PAYMENT_REQUEST||(n.applePay||n.googlePay))))),[e,t,n])},Ko=()=>{const e=Yo(),{selectedPaymentMethod:t,setSelectedPaymentMethod:n}=Tn();return Object(xe.h)("ul",{className:Go},e.map((e=>{return Object(xe.h)("li",{key:e},Object(xe.h)("button",{type:"button",className:(r=e===t,Se()(re({},Vo,{border:"none",padding:Jt.M,":hover":{cursor:"pointer",background:Vt.Gray}},r?{background:"white",fontWeight:700,":hover":{background:"white"}}:{}))),onClick:()=>{n(e)}},Object(xe.h)(Ro,{method:e}),Object(xe.h)(Io,{method:e})));var r})))},Qo=()=>{const e=Yo(),{primaryColor:t}=wt(),{selectedPaymentMethod:n,setSelectedPaymentMethod:r}=Tn();return Object(xe.h)("fieldset",{className:Xo},Zo||(Zo=Object(xe.h)("legend",{className:Uo},"Payment method")),Object(xe.h)("ul",{className:Wo},e.map((e=>Object(xe.h)("li",{key:e},Object(xe.h)("button",{type:"button",className:zo(e===n,t),onClick:()=>{r(e)}},Object(xe.h)(Ro,{method:e}),Object(xe.h)(Io,{method:e})))))))},Jo=Se()({border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}),ea=({checked:e,primaryColor:t})=>Se()(oe({cursor:"pointer",width:"24px",minWidth:"24px",height:"24px",display:"flex",borderRadius:"4px",justifyContent:"center",alignItems:"center",border:`1.5px solid ${e?t:Vt.DarkGray}`},e?{background:t}:{})),ta=Se()({width:"16px",height:"16px","& > path":{stroke:"white",strokeWidth:"2px"}}),na=Se()({cursor:"pointer"}),ra=Se()({display:"flex",alignItems:"center",gap:Jt.XS});var oa;const aa=({className:e})=>Object(xe.h)("svg",{fill:"none",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:e},oa||(oa=Object(xe.h)("path",{d:"M20 6L9 17l-5-5",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})));var ia;const la=["children","checked","className"],ca=e=>{let{children:t,checked:n}=e,r=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,la);const{primaryColor:o}=wt();return Object(xe.h)("label",{className:ra},Object(xe.h)("div",null,Object(xe.h)("input",ae({className:Jo,type:"checkbox",defaultChecked:n,role:"checkbox"},r)),Object(xe.h)("div",{className:ea({checked:Boolean(n),primaryColor:o})},n&&(ia||(ia=Object(xe.h)(aa,{className:ta}))))),Object(xe.h)("span",{className:na},t))};var sa;const ua=()=>{const e=An(),t=e.hasAdmin,{privateNote:n,setPrivateNote:r}=Tn(),[o,a]=u(Boolean(n));return t?Object(xe.h)("div",{className:nn(Jt.L)},Object(xe.h)(ca,{checked:o,onChange:()=>{a((e=>!e))}},"Add note for ",e.name),o&&Object(xe.h)("fieldset",{className:Se()(ie({fieldSetCss:Fo},rn(Jt.XS)))},sa||(sa=Object(xe.h)("legend",{className:Uo},"Private note")),Object(xe.h)(eo,{rows:3,label:"Note",id:"privateNote",value:n,inputClassName:Se()({resize:"none"}),onChange:({currentTarget:e})=>{r(e.value)}}))):null},pa=Se()({width:"100%",textAlign:"center"}),da=Se()(le({},{fontSize:"12px",lineHeight:"16px",letterSpacing:"0.01em"},{color:Vt.TextOpaque})),ha=()=>{const{primaryColor:e}=wt();return Object(xe.h)("div",{className:pa},Object(xe.h)("span",{className:da},"Every.org will accept your donation."," ",Object(xe.h)("a",{href:Fe,target:"_blank",rel:"noreferrer",className:(t=e,Se()({color:t,textDecoration:"none",cursor:"pointer"}))},"Learn More")));var t},fa=Se()(ce({},{fontSize:"16px",lineHeight:"24px",letterSpacing:"-0.01em"},{outline:"none",width:"100%",border:"none",fontFamily:"inherit",cursor:"pointer",borderRadius:cr.Big,height:"52px",fontWeight:700,padding:Jt.XXS,transition:"opacity .3s"})),ba=Se()({color:Vt.White,backgroundColor:Vt.DarkGray,cursor:"default","& > span":{opacity:"0.6"}}),ma=({handleClick:e,disabled:t,children:n})=>{const{primaryColor:r}=wt();return Object(xe.h)("button",{type:"submit",className:wn([fa,t?ba:(o=r,Se()({color:Vt.White,backgroundColor:o,":hover":{opacity:.9}}))]),disabled:t,onClick:e},Object(xe.h)("span",null,n));var o},_a="USD",ya="$",va=()=>{const e=wt(),{frequency:t,donationAmount:n,setSubmitError:c,selectedPaymentMethod:s,stockAmount:u,stockSymbol:p,cryptoAmount:d,cryptoCurrency:h,privateNote:f}=Tn(),{minDonationAmount:m}=wt();return b((b=>{b.preventDefault();const _=e.completeDonationInNewTab?"_blank":"_self",y={methods:[s],nonprofitSlug:e.nonprofitSlug,fundraiserSlug:e.fundraiserSlug,privateNote:f};switch(s){case Qe.CRYPTO:if(!d||!h){c("Please enter currency and amount");break}window.open(function(e){let{cryptoAmount:t,cryptoCurrency:n}=e,c=o(e,Ge);return`${i(c)}?${a(r({crypto_amount:t,crypto_currency:n},l(c)))}#/${We}`}(se({cryptoAmount:d,cryptoCurrency:h},y)),_);break;case Qe.STOCKS:if(!p||!u){c("Please enter the symbol and amount");break}window.open(function(e){let{stockAmount:t,stockSymbol:n}=e,c=o(e,qe);return`${i(c)}?${a(r({stock_amount:t,stock_symbol:n},l(c)))}#/${We}`}(se({stockSymbol:p,stockAmount:u},y)),_);break;case Qe.GIFT_CARD:window.open(function(e){const t=a({nonprofitSlug:e});return`${Ue}?${t}`}(e.nonprofitSlug),_);break;default:if(!n||n{const e=va(),{cryptoAmount:t,cryptoCurrency:n}=Tn();return Object(xe.h)("form",{className:qo,onSubmit:e},ga||(ga=Object(xe.h)(Ko,null)),Object(xe.h)("div",{className:$o},Oa||(Oa=Object(xe.h)(Qo,null)),Object(xe.h)("fieldset",{className:Se()(pe({fieldSetCss:Fo},rn(Jt.XXL)))},Ca||(Ca=Object(xe.h)("div",null,Object(xe.h)("legend",{className:Uo},"Crypto currency"),Object(xe.h)(jo,null))),n&&(ja||(ja=Object(xe.h)("div",null,Object(xe.h)("legend",{className:Uo},"Amount"),Object(xe.h)(lo,null))))),wa||(wa=Object(xe.h)(ua,null)),Object(xe.h)(ma,{disabled:!t||!n},ue({method:Qe.CRYPTO,cryptoCurrency:n})),xa||(xa=Object(xe.h)(ha,null))))},Sa=e=>Se()(de({outline:"none",border:"none",fontFamily:"inherit",cursor:"pointer",background:"none",fontWeight:500,transition:"opacity .3s",color:e,display:"flex",alignItems:"center",alignSelf:"flex-start"},Kt,{opacity:1,padding:0,gap:Jt.XXS,marginBottom:Jt.XXL,":hover":{opacity:.9},[Wt.TabletLandscapeUp]:{padding:Jt.L,marginBottom:0}})),Na=()=>{const{primaryColor:e}=wt();return Object(xe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{stroke:e,strokeWidth:"2",d:"M19 12H5M12 19l-7-7 7-7"}))};var Aa,Ta;const La=({handleClick:e})=>{const{primaryColor:t}=wt();return Object(xe.h)("button",{type:"button",className:Sa(t),onClick:e},Aa||(Aa=Object(xe.h)(Na,null)),Ta||(Ta=Object(xe.h)("span",null,"Back")))};let Pa=function(e){return e[e.START=0]="START",e[e.MANUAL=1]="MANUAL",e[e.AMOUNT=2]="AMOUNT",e}({});var Ma;const Ea=e=>{"."===e.key&&e.preventDefault()},Da=()=>{const e=h(null),{primaryColor:t,addAmounts:n}=wt(),{setDonationAmount:r,donationAmount:o,setSubmitError:a,submitError:i}=Tn();return d((()=>{Boolean("ontouchstart"in window||navigator.maxTouchPoints)||e.current&&e.current.focus()}),[]),Object(xe.h)("fieldset",{className:Se()(he({fieldSetCss:Fo},rn(Jt.S)))},Ma||(Ma=Object(xe.h)("legend",{className:Uo},"Donation amount")),Object(xe.h)(no,{ref:e,id:"donation-input",type:"number",pattern:"[0-9]*",inputMode:"numeric",min:0,step:1,value:o||void 0,prefix:ya,inputClassName:Tr,prefixClassName:Lr,sufix:_a,sufixClassName:Pr(t),containerClassName:i?Ar:void 0,onKeyDown:Ea,onInput:e=>{r(Number(e.currentTarget.value)),a(null)}}),n&&n.length>0&&Object(xe.h)("div",{className:Mr},n.map((e=>Object(xe.h)("button",{key:e,className:Er(t),type:"button",onClick:()=>{r((t=>"number"==typeof t?t+e:e))}},"+",((e,t)=>{if(e<1e3)return e.toString();let n="",r=1;return e>=1e3&&e<1e6?(r=1e3,n="k"):e>=1e6&&e<1e9?(r=1e6,n="m"):e>=1e9&&e<1e12?(r=1e9,n="b"):e>=1e12&&(r=1e12,n="t"),void 0===t?(e/r).toFixed(3).replace(/\.?0+$/,"")+n:(e/r).toFixed(t)+n})(e))))))},Ra=e=>Se()({position:"relative",cursor:"pointer",display:"flex",width:"100%",height:"36px",alignItems:"center",justifyContent:"center",color:e,fontWeight:500,border:`2px solid ${e}`,borderRight:"none"}),Ha=e=>Se()({cursor:"pointer",display:"flex",flexDirection:"column",flex:"1 1 0px","& > input":{appearance:"none",height:0},"& > input:checked + label":{backgroundColor:e,color:"white"},"& > input:checked + label:hover":{backgroundColor:e,color:"white"}}),Ia=e=>Se()({display:"flex",width:"100%","& > div:first-of-type > label":{borderRadius:"6px 0 0 6px","&::after":{borderRadius:"6px 0 0 6px"}},"& > div:last-of-type > label":{borderRadius:"0 6px 6px 0",borderRight:`2px solid ${e}`,"&::after":{borderRadius:"0 6px 6px 0"}}});var Ba,Fa;const Ua="Monthly donation",$a=()=>{const{primaryColor:e,lockMonthlyFrequency:t,monthlyTitle:n=Ua}=wt(),{frequency:r,selectedPaymentMethod:o,setFrequency:a}=Tn();return t?Object(xe.h)("h4",null,n):Je.includes(o)?Object(xe.h)("fieldset",{className:Fo},Ba||(Ba=Object(xe.h)("legend",{className:Uo},"Frequency")),Object(xe.h)("p",null,o===Qe.DAF?"Chariot":"Venmo"," ","only supports one-time donations")):Object(xe.h)("fieldset",{className:Fo},Fa||(Fa=Object(xe.h)("legend",{className:Uo},"Frequency")),Object(xe.h)("div",{className:Ia(e)},Object(xe.h)("div",{className:Ha(e)},Object(xe.h)("input",{type:"radio",name:"frequency",id:"monthly",checked:r===Ke.Monthly,value:Ke.Monthly}),Object(xe.h)("label",{className:Ra(e),id:"frequency-monthly",htmlFor:"monthly",onClick:()=>{a(Ke.Monthly)}},"Give Monthly")),Object(xe.h)("div",{className:Ha(e)},Object(xe.h)("input",{type:"radio",name:"frequency",id:"once",checked:r===Ke.OneTime,value:Ke.OneTime}),Object(xe.h)("label",{id:"frequency-one-time",htmlFor:"one-time",className:Ra(e),onClick:()=>{a(Ke.OneTime)}},"Once"))))};var qa,Ga,Xa,Wa,Va;const za=({changeView:e})=>{const t=va(),{donationAmount:n}=Tn();return Object(xe.h)("form",{className:qo,onSubmit:t},Object(xe.h)(La,{handleClick:()=>{e(Pa.START)}}),Object(xe.h)("div",{className:$o},qa||(qa=Object(xe.h)("h3",null,"Connect your DAF with Chariot")),Ga||(Ga=Object(xe.h)($a,null)),Xa||(Xa=Object(xe.h)(Da,null)),Wa||(Wa=Object(xe.h)(ua,null)),Object(xe.h)(ma,{disabled:!n||Number.isNaN(n)},ue({method:Qe.DAF})),Va||(Va=Object(xe.h)(ha,null))))};var Za,Ya,Ka,Qa,Ja,ei,ti,ni,ri,oi,ai,ii;const li=({changeView:e})=>{const{primaryColor:t}=wt();return Object(xe.h)("div",{className:qo},Object(xe.h)(La,{handleClick:()=>{e(Pa.START)}}),Object(xe.h)("div",{className:$o},Za||(Za=Object(xe.h)("h3",null,"Manual DAF donation")),Ya||(Ya=Object(xe.h)("p",null,"Please ask your provider to make a one-time or recurring grant to:")),Object(xe.h)("div",{className:nn(Jt.S)},Object(xe.h)("p",{className:nn(0)},Ka||(Ka=Object(xe.h)("span",null,"Every.org (EIN: 61-1913297)")),Qa||(Qa=Object(xe.h)("span",null,"58 West Portal Ave #781 San Francisco, CA 94127")),Ja||(Ja=Object(xe.h)("span",null,"Memo: For every.org/themarshallproject from @darth.vader506")),ei||(ei=Object(xe.h)("span",null,"Contact info: Mark Ulrich, CEO")),ti||(ti=Object(xe.h)("span",null,"Email: team@every.org")),ni||(ni=Object(xe.h)("span",null,"Phone number: +1 (415) 650-0503"))),Object(xe.h)("p",null,"You may also email us at"," ",Object(xe.h)("a",{className:zn(t),href:P({address:Ee,subject:"Donation via DAF"})},Ee)," ","with the memo or to let us know if you wish to share your contact information with the nonprofit/campaign. By default, we do not share your contact information")),Object(xe.h)("div",{className:Se()(fe({color:Vt.TextGray},rn(0)))},Object(xe.h)("p",{className:Se()({paddingBottom:Jt.S})},"We will attribute the donation accordingly:"),ri||(ri=Object(xe.h)("p",null,"If we receive BOTH your @username and a nonprofit/campaign: we will add a donation for that nonprofit/campaign to your account.")),oi||(oi=Object(xe.h)("p",null,"If we receive only your @username, we will credit your account's gift card balance in the amount received, which you can use to support as many nonprofits as you'd like.")),ai||(ai=Object(xe.h)("p",null,"If we receive only a nonprofit/campaign, we will send that amount to that nonprofit/campaign as an anonymous donation.")),ii||(ii=Object(xe.h)("p",null,"If we do not receive any information by the time the wire/ACH is received, we will apply it towards running Every.org.")))))},ci=Se()(be({outline:"none",border:"none",fontFamily:"inherit",background:"#ADEFD1",color:"#00203F",alignSelf:"center",borderRadius:cr.Big,padding:`${Jt.M} ${Jt.XL}`,display:"flex",alignItems:"center",fontWeight:500},Kt,{gap:Jt.XS,cursor:"pointer",":hover":{background:"#7ce6b6"}})),si=e=>Se()(be({outline:"none",border:"none",background:"none",fontFamily:"inherit",color:e,alignSelf:"center",display:"flex",alignItems:"center",fontWeight:500},Kt,{gap:Jt.XS,cursor:"pointer",":hover":{opacity:.9}}));var ui,pi,di,hi,fi,bi,mi,_i;const yi=()=>ui||(ui=Object(xe.h)("svg",{width:"101",height:"16",viewBox:"0 0 101 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M26.5651 0.257543H29.7622V15.2809H26.5651V0.257543ZM20.2894 15.2809H17.0923V0.257543H20.2894V15.2809ZM26.8019 9.12133H20.0525V6.18104H26.8019V9.12133Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M32.2018 15.2809L38.3591 0.257543H41.5168L47.6938 15.2809H44.3389L39.2867 2.01742H40.5497L35.4778 15.2809H32.2018ZM35.2805 12.0616L36.1291 9.4218H43.2337L44.1021 12.0616H35.2805Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M50.1138 15.2809V0.257543H56.0936C57.3303 0.257543 58.396 0.479317 59.2907 0.922864C60.1853 1.3521 60.876 1.9745 61.3628 2.79005C61.8496 3.60561 62.093 4.57855 62.093 5.70888C62.093 6.8249 61.8496 7.79069 61.3628 8.60625C60.876 9.40749 60.1853 10.0227 59.2907 10.452C58.396 10.8812 57.3303 11.0958 56.0936 11.0958H51.89L53.3109 9.57203V15.2809H50.1138ZM58.896 15.2809L55.4423 9.82958H58.8565L62.3496 15.2809H58.896ZM53.3109 9.95835L51.89 8.32724H55.916C56.9027 8.32724 57.6395 8.09831 58.1263 7.64046C58.6131 7.16829 58.8565 6.52444 58.8565 5.70888C58.8565 4.87902 58.6131 4.23516 58.1263 3.77731C57.6395 3.31945 56.9027 3.09052 55.916 3.09052H51.89L53.3109 1.43795V9.95835Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M65.6128 15.2809V0.257543H68.8099V15.2809H65.6128Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M79.7851 15.5385C78.6931 15.5385 77.68 15.3453 76.7459 14.959C75.8249 14.5727 75.0223 14.029 74.3382 13.3279C73.6672 12.6268 73.1409 11.8041 72.7594 10.8598C72.391 9.91543 72.2068 8.88525 72.2068 7.76923C72.2068 6.65321 72.391 5.62303 72.7594 4.67871C73.1409 3.73438 73.6738 2.91167 74.3579 2.21058C75.0421 1.50949 75.8446 0.965787 76.7656 0.579472C77.6866 0.193157 78.6865 0 79.7653 0C80.8573 0 81.8573 0.193157 82.7651 0.579472C83.686 0.965787 84.482 1.50949 85.153 2.21058C85.8372 2.91167 86.37 3.73438 86.7516 4.67871C87.1331 5.60873 87.3239 6.6389 87.3239 7.76923C87.3239 8.88525 87.1331 9.92258 86.7516 10.8812C86.37 11.8255 85.8372 12.6482 85.153 13.3493C84.482 14.0361 83.686 14.5727 82.7651 14.959C81.8573 15.3453 80.8639 15.5385 79.7851 15.5385ZM79.7653 12.5767C80.3837 12.5767 80.9494 12.4622 81.4626 12.2333C81.9888 12.0044 82.4493 11.6753 82.844 11.2461C83.2387 10.8168 83.5413 10.3089 83.7518 9.72227C83.9755 9.13564 84.0873 8.48463 84.0873 7.76923C84.0873 7.05383 83.9755 6.40282 83.7518 5.81619C83.5413 5.22956 83.2387 4.72163 82.844 4.29239C82.4625 3.86315 82.0086 3.53407 81.4823 3.30514C80.956 3.07621 80.3837 2.96175 79.7653 2.96175C79.147 2.96175 78.5747 3.07621 78.0484 3.30514C77.5353 3.53407 77.0814 3.86315 76.6867 4.29239C76.292 4.72163 75.9828 5.22956 75.7591 5.81619C75.5486 6.40282 75.4434 7.05383 75.4434 7.76923C75.4434 8.47032 75.5486 9.12133 75.7591 9.72227C75.9828 10.3089 76.2854 10.8168 76.6669 11.2461C77.0616 11.6753 77.5221 12.0044 78.0484 12.2333C78.5747 12.4622 79.147 12.5767 79.7653 12.5767Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M93.3822 15.2809V3.09052H88.9616V0.257543H101V3.09052H96.5793V15.2809H93.3822Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M11.272 1.05076C11.3408 1.09302 11.3586 1.18757 11.3108 1.25413L11.2714 1.30881L9.3933 3.92529C9.23593 4.14428 8.9529 4.21268 8.70361 4.12582C8.33005 3.99566 7.93049 3.92529 7.51464 3.92529C7.07982 3.92529 6.66276 4.00231 6.27476 4.14455C4.80885 4.6792 3.75732 6.13699 3.75732 7.85057C3.75732 8.56007 3.9376 9.22572 4.25295 9.80028C4.3821 10.0353 4.53332 10.2551 4.70499 10.4564C5.39274 11.2659 6.39692 11.7764 7.51464 11.7764C7.76228 11.7764 7.87763 12.0838 7.68405 12.2443C7.62823 12.2906 7.57176 12.3361 7.51464 12.3808C6.44696 13.2173 5.15865 13.7627 3.75732 13.9066C3.51247 13.9319 3.26438 13.9448 3.01307 13.9448C2.85686 13.9448 2.70619 13.886 2.58857 13.7791C2.53422 13.7297 2.48053 13.6794 2.42757 13.6283C1.86844 13.0914 1.38787 12.4674 1.00579 11.7759C0.459575 10.7898 0.11301 9.6676 0.0231398 8.47068C0.00807176 8.26604 0 8.05971 0 7.85057C0 6.4209 0.366476 5.08005 1.00579 3.92529C1.34697 3.308 1.76673 2.74523 2.24998 2.24993C2.70094 1.78724 3.2068 1.38302 3.75732 1.05076C4.86267 0.382868 6.1456 9.06616e-06 7.51464 9.06616e-06C7.59482 9.06616e-06 7.67555 0.00113271 7.75519 0.00450591C9.03382 0.0461087 10.2317 0.422222 11.272 1.05076Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M13.9754 11.8877C14.023 12.0558 13.8779 12.2145 13.7141 12.1736C13.4931 12.1184 13.3921 12.2143 13.2685 12.4126C13.0274 12.7994 12.5181 13.3956 12.4565 13.4688C10.4382 15.8714 7.16282 15.9162 4.47369 14.9451C4.46298 14.9412 4.45227 14.9373 4.4421 14.9339C4.20547 14.8481 3.98222 14.7612 3.77878 14.6782C3.61643 14.6123 3.46699 14.5489 3.33408 14.4905C3.08673 14.3817 3.12253 14.2895 3.38904 14.3239C3.52288 14.3412 3.65458 14.3525 3.77878 14.3597C4.15457 14.382 4.46549 14.3678 4.56937 14.3616C4.59412 14.3601 4.61885 14.3589 4.64363 14.3582C5.18515 14.3419 5.73401 14.2439 6.27519 14.0581C6.72061 13.9045 7.13605 13.6992 7.51669 13.4503C7.75279 13.2972 7.9755 13.1262 8.18429 12.9412C8.29565 12.8425 8.40219 12.7404 8.50551 12.6339C8.77962 12.3513 9.02535 12.0413 9.23789 11.7105C9.34271 11.5478 9.44004 11.3803 9.52876 11.208C9.5469 11.1728 9.52792 11.1295 9.49058 11.12C9.20779 11.0496 9.10362 10.6878 9.30264 10.4673L10.7012 8.91805L10.7017 8.91751C10.7086 8.90988 11.0638 8.51701 11.1804 8.38764C11.2042 8.36134 11.2303 8.33219 11.2541 8.3059L11.914 7.57461C12.1946 7.26369 12.6939 7.38682 12.8104 7.79567L13.7206 10.9938C13.7212 10.9958 13.7229 10.9972 13.7249 10.9977C13.7277 10.9983 13.7293 11.0014 13.7286 11.0042C13.728 11.0064 13.7275 11.0085 13.727 11.0108C13.7266 11.0126 13.7266 11.0144 13.7271 11.0162L13.9245 11.7099L13.9475 11.7889L13.9754 11.8877Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M2.01325 8.96461C0.989941 9.18868 -0.0400886 8.49938 0.00784723 7.41322C0.0537471 6.37318 0.300533 5.3465 0.740811 4.39654C1.45724 2.85074 2.64569 1.59503 4.1207 0.825379C5.5957 0.0557292 7.27427 -0.184559 8.89443 0.142017C9.8901 0.342713 10.8293 0.750556 11.6587 1.33385C12.5249 1.94302 12.4409 3.21363 11.6566 3.93279C10.8722 4.65194 9.66932 4.50639 8.68146 4.14963C8.51643 4.09003 8.34679 4.04245 8.17368 4.00755C7.37463 3.84649 6.54677 3.965 5.81931 4.34458C5.09184 4.72417 4.50571 5.34348 4.15237 6.10585C4.07582 6.27101 4.01114 6.44087 3.95847 6.61407C3.64319 7.65079 3.03655 8.74054 2.01325 8.96461Z",fill:"#00203F"}))),vi=({changeView:e})=>{const{primaryColor:t}=wt();return Object(xe.h)("div",{className:qo},pi||(pi=Object(xe.h)(Ko,null)),Object(xe.h)("div",{className:$o},di||(di=Object(xe.h)(Qo,null)),hi||(hi=Object(xe.h)("h4",null,"Instant DAF donation")),fi||(fi=Object(xe.h)("p",null,"We use Chariot to verify your account info and automatically initiate a grant from your DAF, or you can get instructions for making the donation manually.")),Object(xe.h)("button",{type:"button",className:ci,onClick:()=>{e(Pa.AMOUNT)}},bi||(bi=Object(xe.h)("span",null,"Donate with")),mi||(mi=Object(xe.h)(yi,null))),Object(xe.h)("button",{type:"button",className:si(t),onClick:()=>{e(Pa.MANUAL)}},"Get instructions for a manual DAF donation"),_i||(_i=Object(xe.h)(ha,null))))},gi=()=>{const[e,t]=u(Pa.START);switch(e){case Pa.START:return Object(xe.h)(vi,{changeView:t});case Pa.MANUAL:return Object(xe.h)(li,{changeView:t});case Pa.AMOUNT:return Object(xe.h)(za,{changeView:t})}};var Oi,Ci,ji,wi,xi,ki;const Si=()=>{const{frequency:e,donationAmount:t,selectedPaymentMethod:n,paymentRequestAvailable:r}=Tn(),o=va();return Object(xe.h)("form",{className:qo,onSubmit:o},Oi||(Oi=Object(xe.h)(Ko,null)),Object(xe.h)("div",{className:$o},Ci||(Ci=Object(xe.h)(Qo,null)),ji||(ji=Object(xe.h)($a,null)),wi||(wi=Object(xe.h)(Da,null)),xi||(xi=Object(xe.h)(ua,null)),Object(xe.h)(ma,{disabled:e===Ke.Unselected||!t||Number.isNaN(t)},ue({method:n,paymentRequestIsApplePay:r.applePay})),ki||(ki=Object(xe.h)(ha,null))))},Ni=Se()({display:"block",width:"80px",height:"80px",alignSelf:"center","& > path":{strokeWidth:"1"}});var Ai,Ti,Li,Pi,Mi;const Ei=()=>{const e=va();return Object(xe.h)("form",{className:qo,onSubmit:e},Ai||(Ai=Object(xe.h)(Ko,null)),Object(xe.h)("div",{className:$o},Ti||(Ti=Object(xe.h)(Qo,null)),Li||(Li=Object(xe.h)(No,{className:Ni})),Pi||(Pi=Object(xe.h)("p",null,"Redeem a gift card to add donation credits to your account.")),Object(xe.h)(ma,null,ue({method:Qe.GIFT_CARD})),Mi||(Mi=Object(xe.h)(ha,null))))};var Di,Ri,Hi,Ii,Bi,Fi,Ui;const $i=()=>{const e=va(),{stockAmount:t,stockSymbol:n,setStockAmount:r,setStockSymbol:o,submitError:a,setSubmitError:i}=(wt(),Tn());return Object(xe.h)("form",{className:qo,onSubmit:e},Di||(Di=Object(xe.h)(Ko,null)),Object(xe.h)("div",{className:$o},Ri||(Ri=Object(xe.h)(Qo,null)),Object(xe.h)("fieldset",{className:Se()(me({fieldSetCss:Fo},rn(Jt.XXL)))},Object(xe.h)("div",null,Hi||(Hi=Object(xe.h)("legend",{className:Uo},"What is the symbol of the shares?")),Ii||(Ii=Object(xe.h)("span",null,"Example: GOOG")),Object(xe.h)(no,{id:"stock-amount-input",inputClassName:Tr,containerClassName:a?Ar:void 0,type:"text",value:n,onInput:e=>{o(e.currentTarget.value),i(null)}})),Object(xe.h)("div",null,Bi||(Bi=Object(xe.h)("legend",{className:Uo},"How many shares are you donating?")),Object(xe.h)(no,{id:"donation-input",inputClassName:Tr,containerClassName:a?Ar:void 0,type:"number",pattern:"[0-9]*",inputMode:"numeric",min:0,step:1,value:t||void 0,onInput:e=>{r(Number(e.currentTarget.value)),i(null)}}))),Fi||(Fi=Object(xe.h)(ua,null)),Object(xe.h)(ma,{disabled:!t||!n},ue({method:Qe.STOCKS})),Ui||(Ui=Object(xe.h)(ha,null))))};var qi,Gi,Xi,Wi,Vi,zi;const Zi=()=>{const{selectedPaymentMethod:e}=Tn();switch(e){case Qe.CRYPTO:return qi||(qi=Object(xe.h)(ka,null));case Qe.STOCKS:return Gi||(Gi=Object(xe.h)($i,null));case Qe.DAF:return Xi||(Xi=Object(xe.h)(gi,null));case Qe.GIFT_CARD:return Wi||(Wi=Object(xe.h)(Ei,null));default:return Vi||(Vi=Object(xe.h)(Si,null))}},Yi=()=>zi||(zi=Object(xe.h)(xn,{className:Bo},Object(xe.h)(Zi,null))),Ki=e=>Se()({background:"white",width:"100%",height:"100%",borderRadius:"unset",position:"relative",overflow:"auto",padding:"0",paddingBottom:Jt.XXL,[Wt.TabletLandscapeUp]:{height:e?`${e}px`:"unset",background:"#f3f6f6",minHeight:"378px",maxHeight:`calc(100vh - 2 * ${Jt.XL})`,width:"1000px",overflow:"unset",overflowY:"scroll","-ms-overflow-style":"none",scrollbarWidth:"none","::-webkit-scrollbar":{display:"none"},borderRadius:cr.Medium,padding:Jt.XL}}),Qi=F((({children:e,height:t},n)=>Object(xe.h)("div",{ref:n,className:Ki(t)},e))),Ji=Se()(_e({},Kt,{position:"fixed",height:"auto",width:"100%",zIndex:999,top:0,bottom:0,left:0,right:0,display:"flex",background:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",color:Vt.Text,fontFamily:Ne.BasisGrotesque,padding:0,[Wt.TabletLandscapeUp]:{padding:Jt.XL},boxSizing:"border-box","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","& *":{boxSizing:"inherit"},"& *:before":{boxSizing:"inherit"},"& *:after":{boxSizing:"inherit"},"h1,h2,h3,h4,h5,h6":{fontWeight:700},h1:_e({},zt),h2:_e({},Zt),"h3,h4,h5,h6":_e({},Yt)})),el=({children:e,onClick:t})=>Object(xe.h)("div",{className:Ji,onClick:t},e),tl="data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath class='logoMask' stroke-dasharray='170px' d='M32.547 43C39.081 43 48 38.895 48 29.5C48 20.104 38.132 12.5 29.5 12.5C20.868 12.5 9 19.506 9 36C9 52.495 23.805 59.345 32.547 59.345C41.288 59.345 62.5 54.104 62.5 29.5' stroke='white' stroke-width='10'/%3E%3Canimate attributeType='XML' attributeName='stroke-dashoffset' from='170px' to='-170px' dur='1.25s' repeatCount='indefinite'/%3E%3C/svg%3E%0A",nl=Se()({display:"inline-block",verticalAlign:"middle",maskImage:`url("${tl}")`,"-webkit-mask-image":`url("${tl}")`,"-webkit-mask-size":"cover",maskSize:"cover"}),rl=({size:e=72,color:t=Vt.LightGray})=>{return Object(xe.h)("svg",{width:e,height:e,viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:nl},Object(xe.h)("path",{className:(n=t,Se()({fill:n})),d:"M51.147 28.97C51.147 17.614 41.667 9 29.493 9C15.875 9 5 20.5 5 34.744C5 50.094 17.223 62.365 33.68 62.365C50.137 62.365 64.862 49.325 66.017 32.242H58.51C57.114 45.042 46.287 54.859 33.68 54.859C21.553 54.859 12.555 45.956 12.555 34.744C12.555 24.639 20.062 16.507 29.493 16.507C37.385 16.507 43.593 21.897 43.593 28.97C43.593 34.84 39.358 39.749 33.728 39.749V47.256C43.688 47.256 51.148 38.931 51.148 28.97"}));var n};var ol,al,il;var ll,cl=()=>{const{fundraiserSlug:e}=wt(),{hideWidget:t}=Tn(),n=kn(),r=Nn(),o=e=>{e.target===e.currentTarget&&t()};return r===At||e&&n===xt?(t(),null):r===Tt||e&&n===kt?Object(xe.h)(el,{onClick:o},ol||(ol=Object(xe.h)(rl,{size:24}))):Object(xe.h)(el,{onClick:o},al||(al=Object(xe.h)(or,{className:tr})),il||(il=Object(xe.h)(Qi,{height:null},Object(xe.h)(Qn,null,Object(xe.h)("div",{id:"every-header"},Object(xe.h)(lr,null)),Object(xe.h)("div",{id:"every-nonprofitInfo"},Object(xe.h)(_r,null)),Object(xe.h)("div",{id:"every-paymentProcess"},Object(xe.h)(Yi,null)),Object(xe.h)("div",{id:"every-faq"},Object(xe.h)(Hn,null)),Object(xe.h)("div",{id:"every-fundraiserLink"},Object(xe.h)(Yn,null)),Object(xe.h)("div",{id:"every-footer"},Object(xe.h)(Vn,null))))))};let sl;const ul=()=>{const e=document.querySelector("body"),t=(()=>{const e=document.querySelector("body");return sl||(sl=null!=e&&e.style.overflow?e.style.overflow:"unset"),sl})();e&&(e.style.overflow=t)},pl=({options:e={},hide:t})=>(ul(),e.show?((()=>{const e=document.querySelector("body");e&&(e.style.overflow="hidden")})(),Object(xe.h)(Xt,{options:e,hide:t},ll||(ll=Object(xe.h)(cl,null)))):null);var dl="\n\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n font-family: 'Basis Grotesque Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Roboto, sans-serif;\n vertical-align: baseline;\n }\n /* HTML5 display-role reset for older browsers */\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n body {\n line-height: 1;\n }\n ol, ul {\n list-style: none;\n }\n blockquote, q {\n quotes: none;\n }\n blockquote:before, blockquote:after,\n q:before, q:after {\n content: '';\n content: none;\n }\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n button {\n color: unset;\n background: unset;\n }\n";const hl=["element"],fl={childList:!0,subtree:!0,attributeFilter:["href"]};let bl,ml;class _l{constructor(e,t){ve(this,"options",void 0),ve(this,"mountPoint",void 0),this.options=e,this.mountPoint=t}hide(){this.options.show=!1,this.render()}show(){this.options.show=!0,this.render()}setOptions(e){this.options=e,this.render()}render(){Object(xe.render)(Object(xe.h)(pl,{options:this.options,hide:()=>{this.hide()}}),this.mountPoint)}}const yl=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,vl=["element","selector"],gl=["element","selector"];(function(){var e;const t=null==(e=document.currentScript)||null==(e=e.getAttribute("src"))?void 0:e.split("?")[1],n=null==t?void 0:t.split("&").map((e=>{const[t,n]=e.split("=");return[t,n]})),r=n&&Object.fromEntries(n);return!r||"1"!==r.explicit})()?(ot(),Ce(),new yl(((e,t)=>{t.disconnect(),Boolean(e.some((e=>"A"===e.target.nodeName)))&&Ce(),t.observe(document,fl)})).observe(document,fl)):function(){function e(...e){console.info("Every.org Donate Button:",...e)}function t(){we(i,{show:!0}),u()}function n(){we(i,{show:!1}),u()}function r(e){var n;const r=we({},e);return we(i,{openAt:null!=(n=r.openAt)?n:o}),e=>{e.preventDefault(),l=r,t()}}const o="donate",a={},i={show:!1,openAt:o};let l={};const c=(e,t)=>e?[e]:t&&document.querySelectorAll(t);let s;ot();const u=()=>{var e,t,r,o,c;s||(()=>{const e=document.createElement("div");e.id="shadow-wrapper",e.style.position="absolute",e.style.zIndex="20000000",document.body.append(e),s=document.createElement("div"),e.attachShadow({mode:"open"}).append(s);const t=document.querySelector("#every-styles");if(t){var n,r;const e=Object.values(null!=(n=null==(r=t.sheet)?void 0:r.cssRules)?n:{}).map((e=>e.cssText)).join("\n"),o=document.createElement("style");o.id="every-shadow-styles",o.innerHTML=dl+e,s.append(o)}})(),(null==(e=window.location)?void 0:e.hash)===`#${null!=(t=null!=(r=null!=(o=null==(c=l)?void 0:c.openAt)?o:null==a?void 0:a.openAt)?r:null==i?void 0:i.openAt)?t:""}`&&we(i,{show:!0});const u=we({},i,a,l);Object(xe.render)(Object(xe.h)(pl,{options:u,hide:n}),s)};window.everyDotOrgDonateButton={createButton:t=>{let{element:n,selector:r}=t,o=je(t,vl);n||r||o.nonprofitSlug||e("createButton():","must provide element or selector or nonprofitSlug");const a=c(n,r);if(a)for(const t of a){var i,s;const n=null!=(i=t.querySelector("a"))?i:void 0;if(!o.nonprofitSlug&&!n)return void e("no link in container",t);const r=null!=(s=null==n?void 0:n.getAttribute("href"))?s:void 0;if(!o.nonprofitSlug&&!r)return void e("link lacks href",n);const a=we({},l,o);Object(xe.render)(Object(xe.h)(Ye,a),t,n)}},showWidget:t,setOptions:function(e){we(a,e),u()},createWidget:t=>{let{element:n,selector:o}=t,i=je(t,gl);n||o||e("createWidget():","must provide element or selector");const l=c(n,o);if(l)if(i.nonprofitSlug){for(const e of l)e.addEventListener("click",r(i));we(a,i),u()}else e("createWidget():","must provide nonprofitSlug")}}}()},"5zHJ":function(e){"use strict";var t={},n="x",r=[],o=function(e){return r.push(e)},a=function e(a){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",l=arguments[2];return Object.keys(a).map((function(c){var s=a[c];if(null===s)return"";if("object"==typeof s){var u=/^@/.test(c)?c:null;return e(s,u?i:i+c,u||l)}var p=c+s+i+l;if(t[p])return t[p];var d=n+r.length.toString(36);return o(function(e,t){return t?t+"{"+e+"}":e}(function(e,t,n){return"."+e+"{"+t.replace(/[A-Z]|^ms/g,"-$&").toLowerCase()+":"+n+"}"}(d+i.replace(/&/g,""),c,s),l)),t[p]=d,d})).join(" ")};if(e.exports=function(){for(var e=arguments.length,t=Array(e),n=0;n2&&(l.children=arguments.length>3?M.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===l[a]&&(l[a]=e.defaultProps[a]);return i(e,l,r,o,null)}function i(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++D:o};return null==o&&null!=E.vnode&&E.vnode(a),a}function l(){return{current:null}}function c(e){return e.children}function s(e,t){this.props=e,this.context=t}function u(e,t){if(null==t)return e.__?u(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&H.sort(F));h.__r=0}function f(e,t,n,r,o,a,l,s,p,d,h){var f,m,v,g,O,C,w,x,N,A=0,T=r&&r.__k||q,L=T.length,P=L,M=t.length;for(n.__k=[],f=0;f0?i(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)?(g.__=n,g.__b=n.__b+1,-1===(x=y(g,T,w=f+A,P))?v=$:(v=T[x]||$,T[x]=void 0,P--),j(e,g,v,o,a,l,s,p,d,h),O=g.__e,(m=g.ref)&&v.ref!=m&&(v.ref&&k(v.ref,null,g),h.push(m,g.__c||O,g)),null!=O&&(null==C&&(C=O),(N=v===$||null===v.__v)?-1==x&&A--:x!==w&&(x===w+1?A++:x>w?P>M-w?A+=x-w:A--:A=x(null!=c?1:0))for(;i>=0||l=0){if((c=t[i])&&o==c.key&&a===c.type)return i;i--}if(l2&&(s.children=arguments.length>3?M.call(arguments,2):n),i(e.type,s,o||e.key,a||e.ref,null)}function P(e,t){var n={__c:t="__cC"+U++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,d(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}n.r(t),n.d(t,"Component",(function(){return s})),n.d(t,"Fragment",(function(){return c})),n.d(t,"cloneElement",(function(){return L})),n.d(t,"createContext",(function(){return P})),n.d(t,"createElement",(function(){return a})),n.d(t,"createRef",(function(){return l})),n.d(t,"h",(function(){return a})),n.d(t,"hydrate",(function(){return T})),n.d(t,"isValidElement",(function(){return R})),n.d(t,"options",(function(){return E})),n.d(t,"render",(function(){return A})),n.d(t,"toChildArray",(function(){return m}));var M,E,D,R,H,I,B,F,U,$={},q=[],G=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,X=Array.isArray;M=q.slice,E={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&null!=a.getDerivedStateFromError&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(t){e=t}throw e}},D=0,R=function(e){return null!=e&&void 0===e.constructor},s.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=r({},this.state),"function"==typeof e&&(e=e(r({},n),this.props)),e&&r(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),d(this))},s.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),d(this))},s.prototype.render=c,H=[],B="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,F=function(e,t){return e.__v.__b-t.__v.__b},h.__r=0,U=0},aBQa:function(e,t,n){"use strict";n.r(t);var r=n("NMMh");const{h:o,render:a,hydrate:i}=r,l=e=>e&&e.default?e.default:e;if("function"==typeof l(n("/hs+"))){let e=document.getElementById("preact_root")||document.body.firstElementChild,t=()=>{let t=l(n("/hs+")),r={};const i=document.querySelector('[type="__PREACT_CLI_DATA__"]');i&&(r=JSON.parse(decodeURI(i.innerHTML)).preRenderData||r);r.url&&(c=r.url);var c;a(o(t,{CLI_DATA:{preRenderData:r}}),document.body,e)};0,t()}},kPAj:function(e){var t;e.exports=t={},t.simpleFilter=function(e,n){return n.filter((function(n){return t.test(e,n)}))},t.test=function(e,n){return null!==t.match(e,n)},t.match=function(e,t,n){var r,o=0,a=[],i=t.length,l=0,c=0,s=(n=n||{}).pre||"",u=n.post||"",p=n.caseSensitive&&t||t.toLowerCase();e=n.caseSensitive&&e||e.toLowerCase();for(var d=0;d\n) {\n\treturn Object.entries(params)\n\t\t.filter(([, value]) => Boolean(value))\n\t\t.map((entry) => entry.map((part) => encodeURIComponent(part!)).join('='))\n\t\t.join('&');\n}\n\nfunction getBaseUrl({\n\tfundraiserSlug,\n\tnonprofitSlug\n}: Pick) {\n\tlet baseUrl = BASE_URL + nonprofitSlug;\n\n\tif (fundraiserSlug) {\n\t\tbaseUrl += '/f/' + fundraiserSlug;\n\t}\n\n\treturn baseUrl;\n}\n\nfunction getBaseParams({\n\tmethods,\n\tnonprofitSlug,\n\tnoExit,\n\tprivateNote\n}: Pick<\n\tBaseUrlParams,\n\t'nonprofitSlug' | 'methods' | 'noExit' | 'privateNote'\n>) {\n\treturn {\n\t\tmethod: methods?.join(','),\n\t\tutm_campaign: 'donate-button',\n\t\tutm_source: nonprofitSlug,\n\t\tutm_medium: UTM_MEDIUM,\n\t\tno_exit: noExit ?? 1,\n\t\tprivate_note: privateNote\n\t};\n}\n\nexport function constructBasicDonateUrl(\n\t// eslint-disable-next-line @typescript-eslint/ban-types\n\tprops: Omit\n) {\n\tconst baseUrl = getBaseUrl(props);\n\tconst params = getBaseParams(props);\n\n\tconst parameters = serializeParams(params);\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateUrl({\n\tfrequency,\n\tamount,\n\t...rest\n}: DonateUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\tfrequency,\n\t\tamount,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateStocksUrl({\n\tstockAmount,\n\tstockSymbol,\n\t...rest\n}: DonateStocksUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\tstock_amount: stockAmount,\n\t\tstock_symbol: stockSymbol,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateCryptoUrl({\n\tcryptoAmount,\n\tcryptoCurrency,\n\t...rest\n}: DonateCryptoUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\tcrypto_amount: cryptoAmount,\n\t\tcrypto_currency: cryptoCurrency,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructGiftCardUrl(nonprofitSlug: string) {\n\tconst parameters = serializeParams({\n\t\tnonprofitSlug\n\t});\n\n\treturn `${GIFT_CARD_URL}?${parameters}`;\n}\n","import {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tAvailablePaymentMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nconst MAX_AMOUNT_SUGGESTIONS = 5;\n\nenum DonateUrlParameters {\n\tMETHOD = 'method',\n\tFREQUENCY = 'frequency',\n\tMONTHLY_TITLE = 'monthlyTitle',\n\tSUGGESTED_AMOUNTS = 'suggestedAmounts',\n\tAMOUNT = 'amount'\n}\n\nfunction methodsFromString(string?: string | null) {\n\tif (!string) return;\n\treturn string\n\t\t.split(',')\n\t\t.filter((method): method is PaymentMethod =>\n\t\t\tAvailablePaymentMethods.includes(method as PaymentMethod)\n\t\t);\n}\n\nfunction frequencyFromString(string?: string | null) {\n\tif (!string) return;\n\treturn Object.values(DonationFrequency).find(\n\t\t(frequency) => frequency.toUpperCase() === string.toUpperCase()\n\t);\n}\n\nfunction addAmountsFromString(string?: string | null) {\n\tif (!string) return;\n\treturn (\n\t\tstring\n\t\t\t.split(',')\n\t\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t\t.map(Number.parseInt)\n\t\t\t.filter(Boolean)\n\t\t\t.slice(0, MAX_AMOUNT_SUGGESTIONS)\n\t);\n}\n\nfunction intFromString(string?: string | null) {\n\tif (!string) return;\n\tconst number = Number.parseInt(string, 10);\n\treturn Number.isNaN(number) ? undefined : number;\n}\n\nexport function parseDonateUrl(\n\turlString: string\n): (Partial & {nonprofitSlug: string}) | undefined {\n\tconst url = new URL(urlString);\n\n\tconst fundraiserSlug = url.pathname.split('/f/')[1];\n\tconst nonprofitSlug = url.pathname.split('/')[1];\n\n\tconst searchParameters = new URLSearchParams(url.search);\n\tconst methods = methodsFromString(\n\t\tsearchParameters.get(DonateUrlParameters.METHOD)\n\t);\n\tconst defaultFrequency = frequencyFromString(\n\t\tsearchParameters.get(DonateUrlParameters.FREQUENCY)\n\t);\n\tconst defaultDonationAmount = intFromString(\n\t\tsearchParameters.get(DonateUrlParameters.AMOUNT)\n\t);\n\tconst monthlyTitle =\n\t\tsearchParameters.get(DonateUrlParameters.MONTHLY_TITLE) ?? undefined;\n\n\tconst addAmounts = addAmountsFromString(\n\t\tsearchParameters.get(DonateUrlParameters.SUGGESTED_AMOUNTS)\n\t);\n\tconst lockMonthlyFrequency = defaultFrequency === DonationFrequency.Monthly;\n\n\tif (!nonprofitSlug) {\n\t\treturn;\n\t}\n\n\treturn {\n\t\tfundraiserSlug,\n\t\tnonprofitSlug,\n\t\tdefaultFrequency,\n\t\tmethods,\n\t\tlockMonthlyFrequency,\n\t\tmonthlyTitle,\n\t\taddAmounts,\n\t\tdefaultDonationAmount\n\t};\n}\n","import { options } from 'preact';\n\n/** @type {number} */\nlet currentIndex;\n\n/** @type {import('./internal').Component} */\nlet currentComponent;\n\n/** @type {import('./internal').Component} */\nlet previousComponent;\n\n/** @type {number} */\nlet currentHook = 0;\n\n/** @type {Array} */\nlet afterPaintEffects = [];\n\nlet EMPTY = [];\n\nlet oldBeforeDiff = options._diff;\nlet oldBeforeRender = options._render;\nlet oldAfterDiff = options.diffed;\nlet oldCommit = options._commit;\nlet oldBeforeUnmount = options.unmount;\n\nconst RAF_TIMEOUT = 100;\nlet prevRaf;\n\noptions._diff = vnode => {\n\tcurrentComponent = null;\n\tif (oldBeforeDiff) oldBeforeDiff(vnode);\n};\n\noptions._render = vnode => {\n\tif (oldBeforeRender) oldBeforeRender(vnode);\n\n\tcurrentComponent = vnode._component;\n\tcurrentIndex = 0;\n\n\tconst hooks = currentComponent.__hooks;\n\tif (hooks) {\n\t\tif (previousComponent === currentComponent) {\n\t\t\thooks._pendingEffects = [];\n\t\t\tcurrentComponent._renderCallbacks = [];\n\t\t\thooks._list.forEach(hookItem => {\n\t\t\t\tif (hookItem._nextValue) {\n\t\t\t\t\thookItem._value = hookItem._nextValue;\n\t\t\t\t}\n\t\t\t\thookItem._pendingValue = EMPTY;\n\t\t\t\thookItem._nextValue = hookItem._pendingArgs = undefined;\n\t\t\t});\n\t\t} else {\n\t\t\thooks._pendingEffects.forEach(invokeCleanup);\n\t\t\thooks._pendingEffects.forEach(invokeEffect);\n\t\t\thooks._pendingEffects = [];\n\t\t\tcurrentIndex = 0;\n\t\t}\n\t}\n\tpreviousComponent = currentComponent;\n};\n\noptions.diffed = vnode => {\n\tif (oldAfterDiff) oldAfterDiff(vnode);\n\n\tconst c = vnode._component;\n\tif (c && c.__hooks) {\n\t\tif (c.__hooks._pendingEffects.length) afterPaint(afterPaintEffects.push(c));\n\t\tc.__hooks._list.forEach(hookItem => {\n\t\t\tif (hookItem._pendingArgs) {\n\t\t\t\thookItem._args = hookItem._pendingArgs;\n\t\t\t}\n\t\t\tif (hookItem._pendingValue !== EMPTY) {\n\t\t\t\thookItem._value = hookItem._pendingValue;\n\t\t\t}\n\t\t\thookItem._pendingArgs = undefined;\n\t\t\thookItem._pendingValue = EMPTY;\n\t\t});\n\t}\n\tpreviousComponent = currentComponent = null;\n};\n\noptions._commit = (vnode, commitQueue) => {\n\tcommitQueue.some(component => {\n\t\ttry {\n\t\t\tcomponent._renderCallbacks.forEach(invokeCleanup);\n\t\t\tcomponent._renderCallbacks = component._renderCallbacks.filter(cb =>\n\t\t\t\tcb._value ? invokeEffect(cb) : true\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tcommitQueue.some(c => {\n\t\t\t\tif (c._renderCallbacks) c._renderCallbacks = [];\n\t\t\t});\n\t\t\tcommitQueue = [];\n\t\t\toptions._catchError(e, component._vnode);\n\t\t}\n\t});\n\n\tif (oldCommit) oldCommit(vnode, commitQueue);\n};\n\noptions.unmount = vnode => {\n\tif (oldBeforeUnmount) oldBeforeUnmount(vnode);\n\n\tconst c = vnode._component;\n\tif (c && c.__hooks) {\n\t\tlet hasErrored;\n\t\tc.__hooks._list.forEach(s => {\n\t\t\ttry {\n\t\t\t\tinvokeCleanup(s);\n\t\t\t} catch (e) {\n\t\t\t\thasErrored = e;\n\t\t\t}\n\t\t});\n\t\tc.__hooks = undefined;\n\t\tif (hasErrored) options._catchError(hasErrored, c._vnode);\n\t}\n};\n\n/**\n * Get a hook's state from the currentComponent\n * @param {number} index The index of the hook to get\n * @param {number} type The index of the hook to get\n * @returns {any}\n */\nfunction getHookState(index, type) {\n\tif (options._hook) {\n\t\toptions._hook(currentComponent, index, currentHook || type);\n\t}\n\tcurrentHook = 0;\n\n\t// Largely inspired by:\n\t// * https://github.com/michael-klein/funcy.js/blob/f6be73468e6ec46b0ff5aa3cc4c9baf72a29025a/src/hooks/core_hooks.mjs\n\t// * https://github.com/michael-klein/funcy.js/blob/650beaa58c43c33a74820a3c98b3c7079cf2e333/src/renderer.mjs\n\t// Other implementations to look at:\n\t// * https://codesandbox.io/s/mnox05qp8\n\tconst hooks =\n\t\tcurrentComponent.__hooks ||\n\t\t(currentComponent.__hooks = {\n\t\t\t_list: [],\n\t\t\t_pendingEffects: []\n\t\t});\n\n\tif (index >= hooks._list.length) {\n\t\thooks._list.push({ _pendingValue: EMPTY });\n\t}\n\treturn hooks._list[index];\n}\n\n/**\n * @param {import('./index').StateUpdater} [initialState]\n */\nexport function useState(initialState) {\n\tcurrentHook = 1;\n\treturn useReducer(invokeOrReturn, initialState);\n}\n\n/**\n * @param {import('./index').Reducer} reducer\n * @param {import('./index').StateUpdater} initialState\n * @param {(initialState: any) => void} [init]\n * @returns {[ any, (state: any) => void ]}\n */\nexport function useReducer(reducer, initialState, init) {\n\t/** @type {import('./internal').ReducerHookState} */\n\tconst hookState = getHookState(currentIndex++, 2);\n\thookState._reducer = reducer;\n\tif (!hookState._component) {\n\t\thookState._value = [\n\t\t\t!init ? invokeOrReturn(undefined, initialState) : init(initialState),\n\n\t\t\taction => {\n\t\t\t\tconst currentValue = hookState._nextValue\n\t\t\t\t\t? hookState._nextValue[0]\n\t\t\t\t\t: hookState._value[0];\n\t\t\t\tconst nextValue = hookState._reducer(currentValue, action);\n\n\t\t\t\tif (currentValue !== nextValue) {\n\t\t\t\t\thookState._nextValue = [nextValue, hookState._value[1]];\n\t\t\t\t\thookState._component.setState({});\n\t\t\t\t}\n\t\t\t}\n\t\t];\n\n\t\thookState._component = currentComponent;\n\n\t\tif (!currentComponent._hasScuFromHooks) {\n\t\t\tcurrentComponent._hasScuFromHooks = true;\n\t\t\tlet prevScu = currentComponent.shouldComponentUpdate;\n\t\t\tconst prevCWU = currentComponent.componentWillUpdate;\n\n\t\t\t// If we're dealing with a forced update `shouldComponentUpdate` will\n\t\t\t// not be called. But we use that to update the hook values, so we\n\t\t\t// need to call it.\n\t\t\tcurrentComponent.componentWillUpdate = function (p, s, c) {\n\t\t\t\tif (this._force) {\n\t\t\t\t\tlet tmp = prevScu;\n\t\t\t\t\t// Clear to avoid other sCU hooks from being called\n\t\t\t\t\tprevScu = undefined;\n\t\t\t\t\tupdateHookState(p, s, c);\n\t\t\t\t\tprevScu = tmp;\n\t\t\t\t}\n\n\t\t\t\tif (prevCWU) prevCWU.call(this, p, s, c);\n\t\t\t};\n\n\t\t\t// This SCU has the purpose of bailing out after repeated updates\n\t\t\t// to stateful hooks.\n\t\t\t// we store the next value in _nextValue[0] and keep doing that for all\n\t\t\t// state setters, if we have next states and\n\t\t\t// all next states within a component end up being equal to their original state\n\t\t\t// we are safe to bail out for this specific component.\n\t\t\t/**\n\t\t\t *\n\t\t\t * @type {import('./internal').Component[\"shouldComponentUpdate\"]}\n\t\t\t */\n\t\t\t// @ts-ignore - We don't use TS to downtranspile\n\t\t\t// eslint-disable-next-line no-inner-declarations\n\t\t\tfunction updateHookState(p, s, c) {\n\t\t\t\tif (!hookState._component.__hooks) return true;\n\n\t\t\t\tconst stateHooks = hookState._component.__hooks._list.filter(\n\t\t\t\t\tx => x._component\n\t\t\t\t);\n\t\t\t\tconst allHooksEmpty = stateHooks.every(x => !x._nextValue);\n\t\t\t\t// When we have no updated hooks in the component we invoke the previous SCU or\n\t\t\t\t// traverse the VDOM tree further.\n\t\t\t\tif (allHooksEmpty) {\n\t\t\t\t\treturn prevScu ? prevScu.call(this, p, s, c) : true;\n\t\t\t\t}\n\n\t\t\t\t// We check whether we have components with a nextValue set that\n\t\t\t\t// have values that aren't equal to one another this pushes\n\t\t\t\t// us to update further down the tree\n\t\t\t\tlet shouldUpdate = false;\n\t\t\t\tstateHooks.forEach(hookItem => {\n\t\t\t\t\tif (hookItem._nextValue) {\n\t\t\t\t\t\tconst currentValue = hookItem._value[0];\n\t\t\t\t\t\thookItem._value = hookItem._nextValue;\n\t\t\t\t\t\thookItem._nextValue = undefined;\n\t\t\t\t\t\tif (currentValue !== hookItem._value[0]) shouldUpdate = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn shouldUpdate || hookState._component.props !== p\n\t\t\t\t\t? prevScu\n\t\t\t\t\t\t? prevScu.call(this, p, s, c)\n\t\t\t\t\t\t: true\n\t\t\t\t\t: false;\n\t\t\t}\n\n\t\t\tcurrentComponent.shouldComponentUpdate = updateHookState;\n\t\t}\n\t}\n\n\treturn hookState._nextValue || hookState._value;\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {any[]} args\n */\nexport function useEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 3);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tcurrentComponent.__hooks._pendingEffects.push(state);\n\t}\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {any[]} args\n */\nexport function useLayoutEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 4);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tcurrentComponent._renderCallbacks.push(state);\n\t}\n}\n\nexport function useRef(initialValue) {\n\tcurrentHook = 5;\n\treturn useMemo(() => ({ current: initialValue }), []);\n}\n\n/**\n * @param {object} ref\n * @param {() => object} createHandle\n * @param {any[]} args\n */\nexport function useImperativeHandle(ref, createHandle, args) {\n\tcurrentHook = 6;\n\tuseLayoutEffect(\n\t\t() => {\n\t\t\tif (typeof ref == 'function') {\n\t\t\t\tref(createHandle());\n\t\t\t\treturn () => ref(null);\n\t\t\t} else if (ref) {\n\t\t\t\tref.current = createHandle();\n\t\t\t\treturn () => (ref.current = null);\n\t\t\t}\n\t\t},\n\t\targs == null ? args : args.concat(ref)\n\t);\n}\n\n/**\n * @param {() => any} factory\n * @param {any[]} args\n */\nexport function useMemo(factory, args) {\n\t/** @type {import('./internal').MemoHookState} */\n\tconst state = getHookState(currentIndex++, 7);\n\tif (argsChanged(state._args, args)) {\n\t\tstate._pendingValue = factory();\n\t\tstate._pendingArgs = args;\n\t\tstate._factory = factory;\n\t\treturn state._pendingValue;\n\t}\n\n\treturn state._value;\n}\n\n/**\n * @param {() => void} callback\n * @param {any[]} args\n */\nexport function useCallback(callback, args) {\n\tcurrentHook = 8;\n\treturn useMemo(() => callback, args);\n}\n\n/**\n * @param {import('./internal').PreactContext} context\n */\nexport function useContext(context) {\n\tconst provider = currentComponent.context[context._id];\n\t// We could skip this call here, but than we'd not call\n\t// `options._hook`. We need to do that in order to make\n\t// the devtools aware of this hook.\n\t/** @type {import('./internal').ContextHookState} */\n\tconst state = getHookState(currentIndex++, 9);\n\t// The devtools needs access to the context object to\n\t// be able to pull of the default value when no provider\n\t// is present in the tree.\n\tstate._context = context;\n\tif (!provider) return context._defaultValue;\n\t// This is probably not safe to convert to \"!\"\n\tif (state._value == null) {\n\t\tstate._value = true;\n\t\tprovider.sub(currentComponent);\n\t}\n\treturn provider.props.value;\n}\n\n/**\n * Display a custom label for a custom hook for the devtools panel\n * @type {(value: T, cb?: (value: T) => string | number) => void}\n */\nexport function useDebugValue(value, formatter) {\n\tif (options.useDebugValue) {\n\t\toptions.useDebugValue(formatter ? formatter(value) : value);\n\t}\n}\n\n/**\n * @param {(error: any, errorInfo: import('preact').ErrorInfo) => void} cb\n */\nexport function useErrorBoundary(cb) {\n\t/** @type {import('./internal').ErrorBoundaryHookState} */\n\tconst state = getHookState(currentIndex++, 10);\n\tconst errState = useState();\n\tstate._value = cb;\n\tif (!currentComponent.componentDidCatch) {\n\t\tcurrentComponent.componentDidCatch = (err, errorInfo) => {\n\t\t\tif (state._value) state._value(err, errorInfo);\n\t\t\terrState[1](err);\n\t\t};\n\t}\n\treturn [\n\t\terrState[0],\n\t\t() => {\n\t\t\terrState[1](undefined);\n\t\t}\n\t];\n}\n\nexport function useId() {\n\tconst state = getHookState(currentIndex++, 11);\n\tif (!state._value) {\n\t\t// Grab either the root node or the nearest async boundary node.\n\t\t/** @type {import('./internal.d').VNode} */\n\t\tlet root = currentComponent._vnode;\n\t\twhile (root !== null && !root._mask && root._parent !== null) {\n\t\t\troot = root._parent;\n\t\t}\n\n\t\tlet mask = root._mask || (root._mask = [0, 0]);\n\t\tstate._value = 'P' + mask[0] + '-' + mask[1]++;\n\t}\n\n\treturn state._value;\n}\n/**\n * After paint effects consumer.\n */\nfunction flushAfterPaintEffects() {\n\tlet component;\n\twhile ((component = afterPaintEffects.shift())) {\n\t\tif (!component._parentDom || !component.__hooks) continue;\n\t\ttry {\n\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeCleanup);\n\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeEffect);\n\t\t\tcomponent.__hooks._pendingEffects = [];\n\t\t} catch (e) {\n\t\t\tcomponent.__hooks._pendingEffects = [];\n\t\t\toptions._catchError(e, component._vnode);\n\t\t}\n\t}\n}\n\nlet HAS_RAF = typeof requestAnimationFrame == 'function';\n\n/**\n * Schedule a callback to be invoked after the browser has a chance to paint a new frame.\n * Do this by combining requestAnimationFrame (rAF) + setTimeout to invoke a callback after\n * the next browser frame.\n *\n * Also, schedule a timeout in parallel to the the rAF to ensure the callback is invoked\n * even if RAF doesn't fire (for example if the browser tab is not visible)\n *\n * @param {() => void} callback\n */\nfunction afterNextFrame(callback) {\n\tconst done = () => {\n\t\tclearTimeout(timeout);\n\t\tif (HAS_RAF) cancelAnimationFrame(raf);\n\t\tsetTimeout(callback);\n\t};\n\tconst timeout = setTimeout(done, RAF_TIMEOUT);\n\n\tlet raf;\n\tif (HAS_RAF) {\n\t\traf = requestAnimationFrame(done);\n\t}\n}\n\n// Note: if someone used options.debounceRendering = requestAnimationFrame,\n// then effects will ALWAYS run on the NEXT frame instead of the current one, incurring a ~16ms delay.\n// Perhaps this is not such a big deal.\n/**\n * Schedule afterPaintEffects flush after the browser paints\n * @param {number} newQueueLength\n */\nfunction afterPaint(newQueueLength) {\n\tif (newQueueLength === 1 || prevRaf !== options.requestAnimationFrame) {\n\t\tprevRaf = options.requestAnimationFrame;\n\t\t(prevRaf || afterNextFrame)(flushAfterPaintEffects);\n\t}\n}\n\n/**\n * @param {import('./internal').EffectHookState} hook\n */\nfunction invokeCleanup(hook) {\n\t// A hook cleanup can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentComponent away.\n\tconst comp = currentComponent;\n\tlet cleanup = hook._cleanup;\n\tif (typeof cleanup == 'function') {\n\t\thook._cleanup = undefined;\n\t\tcleanup();\n\t}\n\n\tcurrentComponent = comp;\n}\n\n/**\n * Invoke a Hook's effect\n * @param {import('./internal').EffectHookState} hook\n */\nfunction invokeEffect(hook) {\n\t// A hook call can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentComponent away.\n\tconst comp = currentComponent;\n\thook._cleanup = hook._value();\n\tcurrentComponent = comp;\n}\n\n/**\n * @param {any[]} oldArgs\n * @param {any[]} newArgs\n */\nfunction argsChanged(oldArgs, newArgs) {\n\treturn (\n\t\t!oldArgs ||\n\t\toldArgs.length !== newArgs.length ||\n\t\tnewArgs.some((arg, index) => arg !== oldArgs[index])\n\t);\n}\n\nfunction invokeOrReturn(arg, f) {\n\treturn typeof f == 'function' ? f(arg) : f;\n}\n","import {Stripe, loadStripe} from '@stripe/stripe-js';\nimport {useState, useCallback, useEffect} from 'preact/hooks';\nimport {PaymentRequestAvailable} from 'src/components/widget/types/PaymentMethod';\nimport {STRIPE_API_VERSION, STRIPE_PUBLIC_KEY} from 'src/constants/stripe';\n\ndeclare global {\n\tinterface Window {\n\t\tApplePaySession: any;\n\t}\n}\n\nfunction useStripe() {\n\tconst [stripePromise, setStripe] = useState(null);\n\tuseEffect(() => {\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tconst stripe = await loadStripe(STRIPE_PUBLIC_KEY, {\n\t\t\t\t\tapiVersion: STRIPE_API_VERSION\n\t\t\t\t});\n\n\t\t\t\tsetStripe(stripe);\n\t\t\t} catch {\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t})();\n\t}, []);\n\treturn stripePromise;\n}\n\nexport function useCheckPaymentRequest(): PaymentRequestAvailable {\n\tconst stripe = useStripe();\n\n\tconst [canMakePayment, setCanMakePayment] = useState(false);\n\n\tconst initializePaymentRequest = useCallback(async (stripe: Stripe) => {\n\t\tconst pr = stripe?.paymentRequest({\n\t\t\tcountry: 'US',\n\t\t\tcurrency: 'usd',\n\t\t\ttotal: {label: 'test', amount: 0},\n\t\t\trequestPayerName: false,\n\t\t\trequestPayerEmail: false\n\t\t});\n\t\tconst canMakePayment = Boolean(await pr?.canMakePayment());\n\t\tsetCanMakePayment(canMakePayment);\n\t}, []);\n\n\tuseEffect(() => {\n\t\tif (!stripe) {\n\t\t\treturn;\n\t\t}\n\n\t\tvoid initializePaymentRequest(stripe);\n\t}, [initializePaymentRequest, stripe]);\n\n\tconst isApplePay = Boolean(window.ApplePaySession);\n\n\treturn {googlePay: canMakePayment, applePay: canMakePayment && isApplePay};\n}\n","import {Fragment} from 'preact/jsx-runtime';\nimport {faqLinkCss} from 'src/components/widget/components/Faq/styles';\nimport {Nonprofit} from 'src/components/widget/types/Nonprofit';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nexport function getDisbursementDescription(nonprofit: Nonprofit) {\n\tif (nonprofit.directDisbursement) {\n\t\treturn (\n\t\t\tWe then grant directly to {nonprofit.name} on a weekly basis.\n\t\t);\n\t}\n\n\treturn (\n\t\t\n\t\t\tWe then partner with Network for Good to grant to {nonprofit.name} on a{' '}\n\t\t\t\n\t\t\t\tmonthly basis\n\t\t\t\n\t\t\t.\n\t\t\n\t);\n}\n\nexport function getNfgDisclaimer(nonprofit: Nonprofit) {\n\tif (!nonprofit.directDisbursement) {\n\t\treturn (\n\t\t\t

\n\t\t\t\t{nonprofit.name} has not added bank deposit info to Every.org yet, so we\n\t\t\t\tcurrently grant to them through Network for Good, who charges a 2.25%\n\t\t\t\tdisbursement fee.\n\t\t\t

\n\t\t);\n\t}\n\n\treturn null;\n}\n\nexport function getFeeDescriptionBody(\n\tpaymentMethod: PaymentMethod,\n\tnonprofit: Nonprofit\n) {\n\tswitch (paymentMethod) {\n\t\tcase PaymentMethod.PAYPAL:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tPayPal charges 1.99% + $0.49 for each transaction. There’s an\n\t\t\t\t\t\tadditional 1.5% fee for non-US donors.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.CREDIT_CARD:\n\t\tcase PaymentMethod.PAYMENT_REQUEST:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tVisa and Mastercard charge 2.2% + $0.30 for each transaction. Amex\n\t\t\t\t\t\tcharges a 3.5% flat fee. There’s an additional 1% fee for non-US\n\t\t\t\t\t\tcards.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.BANK:\n\t\t\treturn (\n\t\t\t\t

\n\t\t\t\t\tEvery.org currently covers all fees for donations made with a bank, so\n\t\t\t\t\t100% of your gift reaches {nonprofit.name}.\n\t\t\t\t

\n\t\t\t);\n\t\tcase PaymentMethod.VENMO:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tVenmo charges 1.99% + $0.49 for each transaction. There’s an\n\t\t\t\t\t\tadditional 1.5% fee for non-US donors.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tOur exchanges generally charge a 1% flat fee to automatically\n\t\t\t\t\t\tliquidate cryptocurrency. For large donations worth over $5k, you\n\t\t\t\t\t\thave the option to email crypto@every.org to request an address and\n\t\t\t\t\t\twe can do a manual conversion to get the best rates possible\n\t\t\t\t\t\t(usually 0.1%-0.4%). Or you are welcome to donate here with the 1%\n\t\t\t\t\t\tfee.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.STOCKS:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tEvery.org covers all brokerage fees for commonly traded stocks! For\n\t\t\t\t\t\tmutual funds, the First Republic brokerage fee is usually 0.1% of\n\t\t\t\t\t\tthe principle, with a $30 minimum and $150 maximum. Some slippage\n\t\t\t\t\t\tmay occur between when you donate and when we sell making the final\n\t\t\t\t\t\tamount different from what you donate.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

We do not charge any fees, but your DAF provider may have fees.

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

However, there are third-party fees.

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t}\n}\n\nexport function encourageBankDonation(nonprofit: Nonprofit) {\n\treturn (\n\t\t

\n\t\t\tDon’t like fees? Neither do we! Donate via bank and then 100% of your gift\n\t\t\twill reach {nonprofit.name}.\n\t\t

\n\t);\n}\n\nexport function getFeeDescription(\n\tpaymentMethod: PaymentMethod,\n\tnonprofit: Nonprofit\n) {\n\treturn (\n\t\t\n\t\t\t

\n\t\t\t\tEvery.org is free for donors and nonprofits, with no platform fees -\n\t\t\t\tinstead we ask for a completely optional tip.\n\t\t\t

\n\t\t\t{getFeeDescriptionBody(paymentMethod, nonprofit)}\n\t\t
\n\t);\n}\n","export function isPresent(value: T): value is Exclude {\n\treturn !(value === null || value === undefined);\n}\n\nfunction addParameters(\n\tlink: string,\n\tparameters: Record\n) {\n\t// We don't use URLSearchParams here because it changes spaces to +s instead\n\t// of %20, and some mail clients like Apple don't handle that well.\n\tconst queryString = Object.entries(parameters)\n\t\t.map(([key, value]) => {\n\t\t\ttry {\n\t\t\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t\t\treturn [key, value].map(encodeURIComponent).join('=');\n\t\t\t} catch {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t})\n\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t.filter(isPresent)\n\t\t.join('&');\n\treturn queryString ? [link, queryString].join('?') : link;\n}\n\nexport function mailToLink(parameters: {\n\taddress?: string;\n\tsubject?: string;\n\tbody?: string;\n}) {\n\treturn addParameters(`mailto:${parameters.address ?? ''}`, {\n\t\t...(parameters.subject ? {subject: parameters.subject} : {}),\n\t\t...(parameters.body ? {body: parameters.body} : {})\n\t});\n}\n","/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Check if two objects have a different shape\n * @param {object} a\n * @param {object} b\n * @returns {boolean}\n */\nexport function shallowDiffers(a, b) {\n\tfor (let i in a) if (i !== '__source' && !(i in b)) return true;\n\tfor (let i in b) if (i !== '__source' && a[i] !== b[i]) return true;\n\treturn false;\n}\n\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\n/**\n * Check if two values are the same value\n * @param {*} x\n * @param {*} y\n * @returns {boolean}\n */\nexport function is(x, y) {\n\treturn (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\n","import { Component } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Component class with a predefined `shouldComponentUpdate` implementation\n */\nexport function PureComponent(p) {\n\tthis.props = p;\n}\nPureComponent.prototype = new Component();\n// Some third-party libraries check if this property is present\nPureComponent.prototype.isPureReactComponent = true;\nPureComponent.prototype.shouldComponentUpdate = function (props, state) {\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n};\n","import { options } from 'preact';\nimport { assign } from './util';\n\nlet oldDiffHook = options._diff;\noptions._diff = vnode => {\n\tif (vnode.type && vnode.type._forwarded && vnode.ref) {\n\t\tvnode.props.ref = vnode.ref;\n\t\tvnode.ref = null;\n\t}\n\tif (oldDiffHook) oldDiffHook(vnode);\n};\n\nexport const REACT_FORWARD_SYMBOL =\n\t(typeof Symbol != 'undefined' &&\n\t\tSymbol.for &&\n\t\tSymbol.for('react.forward_ref')) ||\n\t0xf47;\n\n/**\n * Pass ref down to a child. This is mainly used in libraries with HOCs that\n * wrap components. Using `forwardRef` there is an easy way to get a reference\n * of the wrapped component instead of one of the wrapper itself.\n * @param {import('./index').ForwardFn} fn\n * @returns {import('./internal').FunctionComponent}\n */\nexport function forwardRef(fn) {\n\tfunction Forwarded(props) {\n\t\tlet clone = assign({}, props);\n\t\tdelete clone.ref;\n\t\treturn fn(clone, props.ref || null);\n\t}\n\n\t// mobx-react checks for this being present\n\tForwarded.$$typeof = REACT_FORWARD_SYMBOL;\n\t// mobx-react heavily relies on implementation details.\n\t// It expects an object here with a `render` property,\n\t// and prototype.render will fail. Without this\n\t// mobx-react throws.\n\tForwarded.render = Forwarded;\n\n\tForwarded.prototype.isReactComponent = Forwarded._forwarded = true;\n\tForwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';\n\treturn Forwarded;\n}\n","import { Component, createElement, options, Fragment } from 'preact';\nimport { assign } from './util';\n\nconst oldCatchError = options._catchError;\noptions._catchError = function (error, newVNode, oldVNode, errorInfo) {\n\tif (error.then) {\n\t\t/** @type {import('./internal').Component} */\n\t\tlet component;\n\t\tlet vnode = newVNode;\n\n\t\tfor (; (vnode = vnode._parent); ) {\n\t\t\tif ((component = vnode._component) && component._childDidSuspend) {\n\t\t\t\tif (newVNode._dom == null) {\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t}\n\t\t\t\t// Don't call oldCatchError if we found a Suspense\n\t\t\t\treturn component._childDidSuspend(error, newVNode);\n\t\t\t}\n\t\t}\n\t}\n\toldCatchError(error, newVNode, oldVNode, errorInfo);\n};\n\nconst oldUnmount = options.unmount;\noptions.unmount = function (vnode) {\n\t/** @type {import('./internal').Component} */\n\tconst component = vnode._component;\n\tif (component && component._onResolve) {\n\t\tcomponent._onResolve();\n\t}\n\n\t// if the component is still hydrating\n\t// most likely it is because the component is suspended\n\t// we set the vnode.type as `null` so that it is not a typeof function\n\t// so the unmount will remove the vnode._dom\n\tif (component && vnode._hydrating === true) {\n\t\tvnode.type = null;\n\t}\n\n\tif (oldUnmount) oldUnmount(vnode);\n};\n\nfunction detachedClone(vnode, detachedParent, parentDom) {\n\tif (vnode) {\n\t\tif (vnode._component && vnode._component.__hooks) {\n\t\t\tvnode._component.__hooks._list.forEach(effect => {\n\t\t\t\tif (typeof effect._cleanup == 'function') effect._cleanup();\n\t\t\t});\n\n\t\t\tvnode._component.__hooks = null;\n\t\t}\n\n\t\tvnode = assign({}, vnode);\n\t\tif (vnode._component != null) {\n\t\t\tif (vnode._component._parentDom === parentDom) {\n\t\t\t\tvnode._component._parentDom = detachedParent;\n\t\t\t}\n\t\t\tvnode._component = null;\n\t\t}\n\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tdetachedClone(child, detachedParent, parentDom)\n\t\t\t);\n\t}\n\n\treturn vnode;\n}\n\nfunction removeOriginal(vnode, detachedParent, originalParent) {\n\tif (vnode) {\n\t\tvnode._original = null;\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tremoveOriginal(child, detachedParent, originalParent)\n\t\t\t);\n\n\t\tif (vnode._component) {\n\t\t\tif (vnode._component._parentDom === detachedParent) {\n\t\t\t\tif (vnode._dom) {\n\t\t\t\t\toriginalParent.insertBefore(vnode._dom, vnode._nextDom);\n\t\t\t\t}\n\t\t\t\tvnode._component._force = true;\n\t\t\t\tvnode._component._parentDom = originalParent;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn vnode;\n}\n\n// having custom inheritance instead of a class here saves a lot of bytes\nexport function Suspense() {\n\t// we do not call super here to golf some bytes...\n\tthis._pendingSuspensionCount = 0;\n\tthis._suspenders = null;\n\tthis._detachOnNextRender = null;\n}\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspense.prototype = new Component();\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {Promise} promise The thrown promise\n * @param {import('./internal').VNode} suspendingVNode The suspending component\n */\nSuspense.prototype._childDidSuspend = function (promise, suspendingVNode) {\n\tconst suspendingComponent = suspendingVNode._component;\n\n\t/** @type {import('./internal').SuspenseComponent} */\n\tconst c = this;\n\n\tif (c._suspenders == null) {\n\t\tc._suspenders = [];\n\t}\n\tc._suspenders.push(suspendingComponent);\n\n\tconst resolve = suspended(c._vnode);\n\n\tlet resolved = false;\n\tconst onResolved = () => {\n\t\tif (resolved) return;\n\n\t\tresolved = true;\n\t\tsuspendingComponent._onResolve = null;\n\n\t\tif (resolve) {\n\t\t\tresolve(onSuspensionComplete);\n\t\t} else {\n\t\t\tonSuspensionComplete();\n\t\t}\n\t};\n\n\tsuspendingComponent._onResolve = onResolved;\n\n\tconst onSuspensionComplete = () => {\n\t\tif (!--c._pendingSuspensionCount) {\n\t\t\t// If the suspension was during hydration we don't need to restore the\n\t\t\t// suspended children into the _children array\n\t\t\tif (c.state._suspended) {\n\t\t\t\tconst suspendedVNode = c.state._suspended;\n\t\t\t\tc._vnode._children[0] = removeOriginal(\n\t\t\t\t\tsuspendedVNode,\n\t\t\t\t\tsuspendedVNode._component._parentDom,\n\t\t\t\t\tsuspendedVNode._component._originalParentDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tc.setState({ _suspended: (c._detachOnNextRender = null) });\n\n\t\t\tlet suspended;\n\t\t\twhile ((suspended = c._suspenders.pop())) {\n\t\t\t\tsuspended.forceUpdate();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * We do not set `suspended: true` during hydration because we want the actual markup\n\t * to remain on screen and hydrate it when the suspense actually gets resolved.\n\t * While in non-hydration cases the usual fallback -> component flow would occour.\n\t */\n\tconst wasHydrating = suspendingVNode._hydrating === true;\n\tif (!c._pendingSuspensionCount++ && !wasHydrating) {\n\t\tc.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });\n\t}\n\tpromise.then(onResolved, onResolved);\n};\n\nSuspense.prototype.componentWillUnmount = function () {\n\tthis._suspenders = [];\n};\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {import('./internal').SuspenseComponent[\"props\"]} props\n * @param {import('./internal').SuspenseState} state\n */\nSuspense.prototype.render = function (props, state) {\n\tif (this._detachOnNextRender) {\n\t\t// When the Suspense's _vnode was created by a call to createVNode\n\t\t// (i.e. due to a setState further up in the tree)\n\t\t// it's _children prop is null, in this case we \"forget\" about the parked vnodes to detach\n\t\tif (this._vnode._children) {\n\t\t\tconst detachedParent = document.createElement('div');\n\t\t\tconst detachedComponent = this._vnode._children[0]._component;\n\t\t\tthis._vnode._children[0] = detachedClone(\n\t\t\t\tthis._detachOnNextRender,\n\t\t\t\tdetachedParent,\n\t\t\t\t(detachedComponent._originalParentDom = detachedComponent._parentDom)\n\t\t\t);\n\t\t}\n\n\t\tthis._detachOnNextRender = null;\n\t}\n\n\t// Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:\n\t/** @type {import('./internal').VNode} */\n\tconst fallback =\n\t\tstate._suspended && createElement(Fragment, null, props.fallback);\n\tif (fallback) fallback._hydrating = null;\n\n\treturn [\n\t\tcreateElement(Fragment, null, state._suspended ? null : props.children),\n\t\tfallback\n\t];\n};\n\n/**\n * Checks and calls the parent component's _suspended method, passing in the\n * suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified\n * that one of its children/descendants suspended.\n *\n * The parent MAY return a callback. The callback will get called when the\n * suspension resolves, notifying the parent of the fact.\n * Moreover, the callback gets function `unsuspend` as a parameter. The resolved\n * child descendant will not actually get unsuspended until `unsuspend` gets called.\n * This is a way for the parent to delay unsuspending.\n *\n * If the parent does not return a callback then the resolved vnode\n * gets unsuspended immediately when it resolves.\n *\n * @param {import('./internal').VNode} vnode\n * @returns {((unsuspend: () => void) => void)?}\n */\nexport function suspended(vnode) {\n\t/** @type {import('./internal').Component} */\n\tlet component = vnode._parent._component;\n\treturn component && component._suspended && component._suspended(vnode);\n}\n\nexport function lazy(loader) {\n\tlet prom;\n\tlet component;\n\tlet error;\n\n\tfunction Lazy(props) {\n\t\tif (!prom) {\n\t\t\tprom = loader();\n\t\t\tprom.then(\n\t\t\t\texports => {\n\t\t\t\t\tcomponent = exports.default || exports;\n\t\t\t\t},\n\t\t\t\te => {\n\t\t\t\t\terror = e;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (!component) {\n\t\t\tthrow prom;\n\t\t}\n\n\t\treturn createElement(component, props);\n\t}\n\n\tLazy.displayName = 'Lazy';\n\tLazy._forwarded = true;\n\treturn Lazy;\n}\n","import { Component, toChildArray } from 'preact';\nimport { suspended } from './suspense.js';\n\n// Indexes to linked list nodes (nodes are stored as arrays to save bytes).\nconst SUSPENDED_COUNT = 0;\nconst RESOLVED_COUNT = 1;\nconst NEXT_NODE = 2;\n\n// Having custom inheritance instead of a class here saves a lot of bytes.\nexport function SuspenseList() {\n\tthis._next = null;\n\tthis._map = null;\n}\n\n// Mark one of child's earlier suspensions as resolved.\n// Some pending callbacks may become callable due to this\n// (e.g. the last suspended descendant gets resolved when\n// revealOrder === 'together'). Process those callbacks as well.\nconst resolve = (list, child, node) => {\n\tif (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {\n\t\t// The number a child (or any of its descendants) has been suspended\n\t\t// matches the number of times it's been resolved. Therefore we\n\t\t// mark the child as completely resolved by deleting it from ._map.\n\t\t// This is used to figure out when *all* children have been completely\n\t\t// resolved when revealOrder is 'together'.\n\t\tlist._map.delete(child);\n\t}\n\n\t// If revealOrder is falsy then we can do an early exit, as the\n\t// callbacks won't get queued in the node anyway.\n\t// If revealOrder is 'together' then also do an early exit\n\t// if all suspended descendants have not yet been resolved.\n\tif (\n\t\t!list.props.revealOrder ||\n\t\t(list.props.revealOrder[0] === 't' && list._map.size)\n\t) {\n\t\treturn;\n\t}\n\n\t// Walk the currently suspended children in order, calling their\n\t// stored callbacks on the way. Stop if we encounter a child that\n\t// has not been completely resolved yet.\n\tnode = list._next;\n\twhile (node) {\n\t\twhile (node.length > 3) {\n\t\t\tnode.pop()();\n\t\t}\n\t\tif (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {\n\t\t\tbreak;\n\t\t}\n\t\tlist._next = node = node[NEXT_NODE];\n\t}\n};\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspenseList.prototype = new Component();\n\nSuspenseList.prototype._suspended = function (child) {\n\tconst list = this;\n\tconst delegated = suspended(list._vnode);\n\n\tlet node = list._map.get(child);\n\tnode[SUSPENDED_COUNT]++;\n\n\treturn unsuspend => {\n\t\tconst wrappedUnsuspend = () => {\n\t\t\tif (!list.props.revealOrder) {\n\t\t\t\t// Special case the undefined (falsy) revealOrder, as there\n\t\t\t\t// is no need to coordinate a specific order or unsuspends.\n\t\t\t\tunsuspend();\n\t\t\t} else {\n\t\t\t\tnode.push(unsuspend);\n\t\t\t\tresolve(list, child, node);\n\t\t\t}\n\t\t};\n\t\tif (delegated) {\n\t\t\tdelegated(wrappedUnsuspend);\n\t\t} else {\n\t\t\twrappedUnsuspend();\n\t\t}\n\t};\n};\n\nSuspenseList.prototype.render = function (props) {\n\tthis._next = null;\n\tthis._map = new Map();\n\n\tconst children = toChildArray(props.children);\n\tif (props.revealOrder && props.revealOrder[0] === 'b') {\n\t\t// If order === 'backwards' (or, well, anything starting with a 'b')\n\t\t// then flip the child list around so that the last child will be\n\t\t// the first in the linked list.\n\t\tchildren.reverse();\n\t}\n\t// Build the linked list. Iterate through the children in reverse order\n\t// so that `_next` points to the first linked list node to be resolved.\n\tfor (let i = children.length; i--; ) {\n\t\t// Create a new linked list node as an array of form:\n\t\t// \t[suspended_count, resolved_count, next_node]\n\t\t// where suspended_count and resolved_count are numeric counters for\n\t\t// keeping track how many times a node has been suspended and resolved.\n\t\t//\n\t\t// Note that suspended_count starts from 1 instead of 0, so we can block\n\t\t// processing callbacks until componentDidMount has been called. In a sense\n\t\t// node is suspended at least until componentDidMount gets called!\n\t\t//\n\t\t// Pending callbacks are added to the end of the node:\n\t\t// \t[suspended_count, resolved_count, next_node, callback_0, callback_1, ...]\n\t\tthis._map.set(children[i], (this._next = [1, 0, this._next]));\n\t}\n\treturn props.children;\n};\n\nSuspenseList.prototype.componentDidUpdate =\n\tSuspenseList.prototype.componentDidMount = function () {\n\t\t// Iterate through all children after mounting for two reasons:\n\t\t// 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases\n\t\t// each node[RELEASED_COUNT] by 1, therefore balancing the counters.\n\t\t// The nodes can now be completely consumed from the linked list.\n\t\t// 2. Handle nodes that might have gotten resolved between render and\n\t\t// componentDidMount.\n\t\tthis._map.forEach((node, child) => {\n\t\t\tresolve(this, child, node);\n\t\t});\n\t};\n","import {\n\trender as preactRender,\n\thydrate as preactHydrate,\n\toptions,\n\ttoChildArray,\n\tComponent\n} from 'preact';\n\nexport const REACT_ELEMENT_TYPE =\n\t(typeof Symbol != 'undefined' && Symbol.for && Symbol.for('react.element')) ||\n\t0xeac7;\n\nconst CAMEL_PROPS =\n\t/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;\nconst ON_ANI = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;\nconst CAMEL_REPLACE = /[A-Z0-9]/g;\n\nconst IS_DOM = typeof document !== 'undefined';\n\n// Input types for which onchange should not be converted to oninput.\n// type=\"file|checkbox|radio\", plus \"range\" in IE11.\n// (IE11 doesn't support Symbol, which we use here to turn `rad` into `ra` which matches \"range\")\nconst onChangeInputType = type =>\n\t(typeof Symbol != 'undefined' && typeof Symbol() == 'symbol'\n\t\t? /fil|che|rad/\n\t\t: /fil|che|ra/\n\t).test(type);\n\n// Some libraries like `react-virtualized` explicitly check for this.\nComponent.prototype.isReactComponent = {};\n\n// `UNSAFE_*` lifecycle hooks\n// Preact only ever invokes the unprefixed methods.\n// Here we provide a base \"fallback\" implementation that calls any defined UNSAFE_ prefixed method.\n// - If a component defines its own `componentDidMount()` (including via defineProperty), use that.\n// - If a component defines `UNSAFE_componentDidMount()`, `componentDidMount` is the alias getter/setter.\n// - If anything assigns to an `UNSAFE_*` property, the assignment is forwarded to the unprefixed property.\n// See https://github.com/preactjs/preact/issues/1941\n[\n\t'componentWillMount',\n\t'componentWillReceiveProps',\n\t'componentWillUpdate'\n].forEach(key => {\n\tObject.defineProperty(Component.prototype, key, {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn this['UNSAFE_' + key];\n\t\t},\n\t\tset(v) {\n\t\t\tObject.defineProperty(this, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: v\n\t\t\t});\n\t\t}\n\t});\n});\n\n/**\n * Proxy render() since React returns a Component reference.\n * @param {import('./internal').VNode} vnode VNode tree to render\n * @param {import('./internal').PreactElement} parent DOM node to render vnode tree into\n * @param {() => void} [callback] Optional callback that will be called after rendering\n * @returns {import('./internal').Component | null} The root component reference or null\n */\nexport function render(vnode, parent, callback) {\n\t// React destroys any existing DOM nodes, see #1727\n\t// ...but only on the first render, see #1828\n\tif (parent._children == null) {\n\t\tparent.textContent = '';\n\t}\n\n\tpreactRender(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nexport function hydrate(vnode, parent, callback) {\n\tpreactHydrate(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nlet oldEventHook = options.event;\noptions.event = e => {\n\tif (oldEventHook) e = oldEventHook(e);\n\n\te.persist = empty;\n\te.isPropagationStopped = isPropagationStopped;\n\te.isDefaultPrevented = isDefaultPrevented;\n\treturn (e.nativeEvent = e);\n};\n\nfunction empty() {}\n\nfunction isPropagationStopped() {\n\treturn this.cancelBubble;\n}\n\nfunction isDefaultPrevented() {\n\treturn this.defaultPrevented;\n}\n\nconst classNameDescriptorNonEnumberable = {\n\tenumerable: false,\n\tconfigurable: true,\n\tget() {\n\t\treturn this.class;\n\t}\n};\n\nfunction handleDomVNode(vnode) {\n\tlet props = vnode.props,\n\t\ttype = vnode.type,\n\t\tnormalizedProps = {};\n\n\tfor (let i in props) {\n\t\tlet value = props[i];\n\n\t\tif (\n\t\t\t(i === 'value' && 'defaultValue' in props && value == null) ||\n\t\t\t// Emulate React's behavior of not rendering the contents of noscript tags on the client.\n\t\t\t(IS_DOM && i === 'children' && type === 'noscript') ||\n\t\t\ti === 'class' ||\n\t\t\ti === 'className'\n\t\t) {\n\t\t\t// Skip applying value if it is null/undefined and we already set\n\t\t\t// a default value\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet lowerCased = i.toLowerCase();\n\t\tif (i === 'defaultValue' && 'value' in props && props.value == null) {\n\t\t\t// `defaultValue` is treated as a fallback `value` when a value prop is present but null/undefined.\n\t\t\t// `defaultValue` for Elements with no value prop is the same as the DOM defaultValue property.\n\t\t\ti = 'value';\n\t\t} else if (i === 'download' && value === true) {\n\t\t\t// Calling `setAttribute` with a truthy value will lead to it being\n\t\t\t// passed as a stringified value, e.g. `download=\"true\"`. React\n\t\t\t// converts it to an empty string instead, otherwise the attribute\n\t\t\t// value will be used as the file name and the file will be called\n\t\t\t// \"true\" upon downloading it.\n\t\t\tvalue = '';\n\t\t} else if (lowerCased === 'ondoubleclick') {\n\t\t\ti = 'ondblclick';\n\t\t} else if (\n\t\t\tlowerCased === 'onchange' &&\n\t\t\t(type === 'input' || type === 'textarea') &&\n\t\t\t!onChangeInputType(props.type)\n\t\t) {\n\t\t\tlowerCased = i = 'oninput';\n\t\t} else if (lowerCased === 'onfocus') {\n\t\t\ti = 'onfocusin';\n\t\t} else if (lowerCased === 'onblur') {\n\t\t\ti = 'onfocusout';\n\t\t} else if (ON_ANI.test(i)) {\n\t\t\ti = lowerCased;\n\t\t} else if (type.indexOf('-') === -1 && CAMEL_PROPS.test(i)) {\n\t\t\ti = i.replace(CAMEL_REPLACE, '-$&').toLowerCase();\n\t\t} else if (value === null) {\n\t\t\tvalue = undefined;\n\t\t}\n\n\t\t// Add support for onInput and onChange, see #3561\n\t\t// if we have an oninput prop already change it to oninputCapture\n\t\tif (lowerCased === 'oninput') {\n\t\t\ti = lowerCased;\n\t\t\tif (normalizedProps[i]) {\n\t\t\t\ti = 'oninputCapture';\n\t\t\t}\n\t\t}\n\n\t\tnormalizedProps[i] = value;\n\t}\n\n\t// Add support for array select values: value not being updated.\n\t\t\t\t\t// To avoid a stale select value we need to set the option.value\n\t\t\t\t\t// again, which triggers IE11 to re-evaluate the select value\n\t\t\t\t\t(nodeType === 'option' && i !== oldProps.value))\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'value', i, oldProps.value, false);\n\t\t\t}\n\t\t\tif (\n\t\t\t\t'checked' in newProps &&\n\t\t\t\t(i = newProps.checked) !== undefined &&\n\t\t\t\ti !== dom.checked\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'checked', i, oldProps.checked, false);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/**\n * Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} ref\n * @param {any} value\n * @param {import('../internal').VNode} vnode\n */\nexport function applyRef(ref, value, vnode) {\n\ttry {\n\t\tif (typeof ref == 'function') ref(value);\n\t\telse ref.current = value;\n\t} catch (e) {\n\t\toptions._catchError(e, vnode);\n\t}\n}\n\n/**\n * Unmount a virtual node from the tree and apply DOM changes\n * @param {import('../internal').VNode} vnode The virtual node to unmount\n * @param {import('../internal').VNode} parentVNode The parent of the VNode that\n * initiated the unmount\n * @param {boolean} [skipRemove] Flag that indicates that a parent node of the\n * current element is already detached from the DOM.\n */\nexport function unmount(vnode, parentVNode, skipRemove) {\n\tlet r;\n\tif (options.unmount) options.unmount(vnode);\n\n\tif ((r = vnode.ref)) {\n\t\tif (!r.current || r.current === vnode._dom) {\n\t\t\tapplyRef(r, null, parentVNode);\n\t\t}\n\t}\n\n\tif ((r = vnode._component) != null) {\n\t\tif (r.componentWillUnmount) {\n\t\t\ttry {\n\t\t\t\tr.componentWillUnmount();\n\t\t\t} catch (e) {\n\t\t\t\toptions._catchError(e, parentVNode);\n\t\t\t}\n\t\t}\n\n\t\tr.base = r._parentDom = null;\n\t\tvnode._component = undefined;\n\t}\n\n\tif ((r = vnode._children)) {\n\t\tfor (let i = 0; i < r.length; i++) {\n\t\t\tif (r[i]) {\n\t\t\t\tunmount(\n\t\t\t\t\tr[i],\n\t\t\t\t\tparentVNode,\n\t\t\t\t\tskipRemove || typeof vnode.type !== 'function'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!skipRemove && vnode._dom != null) {\n\t\tremoveNode(vnode._dom);\n\t}\n\n\t// Must be set to `undefined` to properly clean up `_nextDom`\n\t// for which `null` is a valid value. See comment in `create-element.js`\n\tvnode._parent = vnode._dom = vnode._nextDom = undefined;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n","import { EMPTY_OBJ } from './constants';\nimport { commitRoot, diff } from './diff/index';\nimport { createElement, Fragment } from './create-element';\nimport options from './options';\nimport { slice } from './util';\n\n/**\n * Render a Preact virtual node into a DOM element\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * render into\n * @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an\n * existing DOM tree rooted at `replaceNode`\n */\nexport function render(vnode, parentDom, replaceNode) {\n\tif (options._root) options._root(vnode, parentDom);\n\n\t// We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in\n\t// hydration mode or not by passing the `hydrate` function instead of a DOM\n\t// element..\n\tlet isHydrating = typeof replaceNode === 'function';\n\n\t// To be able to support calling `render()` multiple times on the same\n\t// DOM node, we need to obtain a reference to the previous tree. We do\n\t// this by assigning a new `_children` property to DOM nodes which points\n\t// to the last rendered tree. By default this property is not present, which\n\t// means that we are mounting a new tree for the first time.\n\tlet oldVNode = isHydrating\n\t\t? null\n\t\t: (replaceNode && replaceNode._children) || parentDom._children;\n\n\tvnode = ((!isHydrating && replaceNode) || parentDom)._children =\n\t\tcreateElement(Fragment, null, [vnode]);\n\n\t// List of effects that need to be called after diffing.\n\tlet commitQueue = [],\n\t\trefQueue = [];\n\tdiff(\n\t\tparentDom,\n\t\t// Determine the new vnode tree and store it on the DOM element on\n\t\t// our custom `_children` property.\n\t\tvnode,\n\t\toldVNode || EMPTY_OBJ,\n\t\tEMPTY_OBJ,\n\t\tparentDom.ownerSVGElement !== undefined,\n\t\t!isHydrating && replaceNode\n\t\t\t? [replaceNode]\n\t\t\t: oldVNode\n\t\t\t? null\n\t\t\t: parentDom.firstChild\n\t\t\t? slice.call(parentDom.childNodes)\n\t\t\t: null,\n\t\tcommitQueue,\n\t\t!isHydrating && replaceNode\n\t\t\t? replaceNode\n\t\t\t: oldVNode\n\t\t\t? oldVNode._dom\n\t\t\t: parentDom.firstChild,\n\t\tisHydrating,\n\t\trefQueue\n\t);\n\n\t// Flush all queued effects\n\tcommitRoot(commitQueue, vnode, refQueue);\n}\n\n/**\n * Update an existing DOM element with data from a Preact virtual node\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * update\n */\nexport function hydrate(vnode, parentDom) {\n\trender(vnode, parentDom, hydrate);\n}\n","import { assign, slice } from './util';\nimport { createVNode } from './create-element';\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {import('./internal').VNode} vnode The virtual DOM element to clone\n * @param {object} props Attributes/props to add when cloning\n * @param {Array} rest Any additional arguments will be used as replacement children.\n * @returns {import('./internal').VNode}\n */\nexport function cloneElement(vnode, props, children) {\n\tlet normalizedProps = assign({}, vnode.props),\n\t\tkey,\n\t\tref,\n\t\ti;\n\n\tlet defaultProps;\n\n\tif (vnode.type && vnode.type.defaultProps) {\n\t\tdefaultProps = vnode.type.defaultProps;\n\t}\n\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse if (props[i] === undefined && defaultProps !== undefined) {\n\t\t\tnormalizedProps[i] = defaultProps[i];\n\t\t} else {\n\t\t\tnormalizedProps[i] = props[i];\n\t\t}\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\treturn createVNode(\n\t\tvnode.type,\n\t\tnormalizedProps,\n\t\tkey || vnode.key,\n\t\tref || vnode.ref,\n\t\tnull\n\t);\n}\n","import { enqueueRender } from './component';\n\nexport let i = 0;\n\nexport function createContext(defaultValue, contextId) {\n\tcontextId = '__cC' + i++;\n\n\tconst context = {\n\t\t_id: contextId,\n\t\t_defaultValue: defaultValue,\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tConsumer(props, contextValue) {\n\t\t\t// return props.children(\n\t\t\t// \tcontext[contextId] ? context[contextId].props.value : defaultValue\n\t\t\t// );\n\t\t\treturn props.children(contextValue);\n\t\t},\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tProvider(props) {\n\t\t\tif (!this.getChildContext) {\n\t\t\t\t/** @type {import('./internal').Component[]} */\n\t\t\t\tlet subs = [];\n\t\t\t\tlet ctx = {};\n\t\t\t\tctx[contextId] = this;\n\n\t\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t\tif (this.props.value !== _props.value) {\n\t\t\t\t\t\t// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:\n\t\t\t\t\t\t// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358\n\t\t\t\t\t\t// In those cases though, even with the value corrected, we're double-rendering all nodes.\n\t\t\t\t\t\t// It might be better to just tell folks not to use force-sync mode.\n\t\t\t\t\t\t// Currently, using `useContext()` in a class component will overwrite its `this.context` value.\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context[contextId] = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\t\t\t\t\t\tsubs.some(c => {\n\t\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.sub = c => {\n\t\t\t\t\tsubs.push(c);\n\t\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\t\tsubs.splice(subs.indexOf(c), 1);\n\t\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn props.children;\n\t\t}\n\t};\n\n\t// Devtools needs access to the context object when it\n\t// encounters a Provider. This is necessary to support\n\t// setting `displayName` on the context object instead\n\t// of on the component itself. See:\n\t// https://reactjs.org/docs/context.html#contextdisplayname\n\n\treturn (context.Provider._contextRef = context.Consumer.contextType =\n\t\tcontext);\n}\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","export const EMPTY_OBJ = {};\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw\n * the error that was caught (except for unmounting when this parameter\n * is the highest parent that was being unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component, ctor, handled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != null) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != null) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n","/* global __webpack_public_path__ */\n\nimport * as Preact from 'preact';\nconst { h, render, hydrate } = Preact;\n\nconst interopDefault = m => (m && m.default ? m.default : m);\n\nconst normalizeURL = url => (url[url.length - 1] === '/' ? url : url + '/');\n\nif (process.env.NODE_ENV === 'development') {\n\t// enable preact devtools\n\trequire('preact/debug');\n\n\t// only add a debug sw if webpack service worker is not requested.\n\tif (process.env.ADD_SW === undefined && 'serviceWorker' in navigator) {\n\t\tnavigator.serviceWorker.register(\n\t\t\tnormalizeURL(__webpack_public_path__) + 'sw-debug.js'\n\t\t);\n\t} else if (process.env.ADD_SW && 'serviceWorker' in navigator) {\n\t\tnavigator.serviceWorker.register(\n\t\t\tnormalizeURL(__webpack_public_path__) +\n\t\t\t\t(process.env.ES_BUILD ? 'sw-esm.js' : 'sw.js')\n\t\t);\n\t}\n} else if (process.env.ADD_SW && 'serviceWorker' in navigator) {\n\tnavigator.serviceWorker.register(\n\t\tnormalizeURL(__webpack_public_path__) +\n\t\t\t(process.env.ES_BUILD ? 'sw-esm.js' : 'sw.js')\n\t);\n}\n\nlet app = interopDefault(require('preact-cli-entrypoint'));\n\nif (typeof app === 'function') {\n\tlet root =\n\t\tdocument.getElementById('preact_root') || document.body.firstElementChild;\n\n\tlet init = () => {\n\t\tlet app = interopDefault(require('preact-cli-entrypoint'));\n\t\tlet preRenderData = {};\n\t\tconst inlineDataElement = document.querySelector(\n\t\t\t'[type=\"__PREACT_CLI_DATA__\"]'\n\t\t);\n\t\tif (inlineDataElement) {\n\t\t\tpreRenderData =\n\t\t\t\tJSON.parse(decodeURI(inlineDataElement.innerHTML)).preRenderData ||\n\t\t\t\tpreRenderData;\n\t\t}\n\t\t/* An object named CLI_DATA is passed as a prop,\n\t\t * this keeps us future proof if in case we decide,\n\t\t * to send other data like at some point in time.\n\t\t */\n\t\tconst CLI_DATA = { preRenderData };\n\t\tconst currentURL = preRenderData.url ? normalizeURL(preRenderData.url) : '';\n\t\tconst canHydrate =\n\t\t\tprocess.env.PRERENDER &&\n\t\t\tprocess.env.NODE_ENV === 'production' &&\n\t\t\thydrate &&\n\t\t\tcurrentURL === normalizeURL(location.pathname);\n\t\tconst doRender = canHydrate ? hydrate : render;\n\t\tdoRender(h(app, { CLI_DATA }), document.body, root);\n\t};\n\n\tif (module.hot) module.hot.accept('preact-cli-entrypoint', init);\n\n\tinit();\n}\n","/*\n * Fuzzy\n * https://github.com/myork/fuzzy\n *\n * Copyright (c) 2012 Matt York\n * Licensed under the MIT license.\n */\n\n(function() {\n\nvar root = this;\n\nvar fuzzy = {};\n\n// Use in node or in browser\nif (typeof exports !== 'undefined') {\n module.exports = fuzzy;\n} else {\n root.fuzzy = fuzzy;\n}\n\n// Return all elements of `array` that have a fuzzy\n// match against `pattern`.\nfuzzy.simpleFilter = function(pattern, array) {\n return array.filter(function(str) {\n return fuzzy.test(pattern, str);\n });\n};\n\n// Does `pattern` fuzzy match `str`?\nfuzzy.test = function(pattern, str) {\n return fuzzy.match(pattern, str) !== null;\n};\n\n// If `pattern` matches `str`, wrap each matching character\n// in `opts.pre` and `opts.post`. If no match, return null\nfuzzy.match = function(pattern, str, opts) {\n opts = opts || {};\n var patternIdx = 0\n , result = []\n , len = str.length\n , totalScore = 0\n , currScore = 0\n // prefix\n , pre = opts.pre || ''\n // suffix\n , post = opts.post || ''\n // String to compare against. This might be a lowercase version of the\n // raw string\n , compareString = opts.caseSensitive && str || str.toLowerCase()\n , ch;\n\n pattern = opts.caseSensitive && pattern || pattern.toLowerCase();\n\n // For each character in the string, either add it to the result\n // or wrap in template if it's the next string in the pattern\n for(var idx = 0; idx < len; idx++) {\n ch = str[idx];\n if(compareString[idx] === pattern[patternIdx]) {\n ch = pre + ch + post;\n patternIdx += 1;\n\n // consecutive characters should increase the score more than linearly\n currScore += 1 + currScore;\n } else {\n currScore = 0;\n }\n totalScore += currScore;\n result[result.length] = ch;\n }\n\n // return rendered string if we have a match for every char\n if(patternIdx === pattern.length) {\n // if the string is an exact match with pattern, totalScore should be maxed\n totalScore = (compareString === pattern) ? Infinity : totalScore;\n return {rendered: result.join(''), score: totalScore};\n }\n\n return null;\n};\n\n// The normal entry point. Filters `arr` for matches against `pattern`.\n// It returns an array with matching values of the type:\n//\n// [{\n// string: 'lah' // The rendered string\n// , index: 2 // The index of the element in `arr`\n// , original: 'blah' // The original element in `arr`\n// }]\n//\n// `opts` is an optional argument bag. Details:\n//\n// opts = {\n// // string to put before a matching character\n// pre: ''\n//\n// // string to put after matching character\n// , post: ''\n//\n// // Optional function. Input is an entry in the given arr`,\n// // output should be the string to test `pattern` against.\n// // In this example, if `arr = [{crying: 'koala'}]` we would return\n// // 'koala'.\n// , extract: function(arg) { return arg.crying; }\n// }\nfuzzy.filter = function(pattern, arr, opts) {\n if(!arr || arr.length === 0) {\n return [];\n }\n if (typeof pattern !== 'string') {\n return arr;\n }\n opts = opts || {};\n return arr\n .reduce(function(prev, element, idx, arr) {\n var str = element;\n if(opts.extract) {\n str = opts.extract(element);\n }\n var rendered = fuzzy.match(pattern, str, opts);\n if(rendered != null) {\n prev[prev.length] = {\n string: rendered.rendered\n , score: rendered.score\n , index: idx\n , original: element\n };\n }\n return prev;\n }, [])\n\n // Sort by score. Browsers are inconsistent wrt stable/unstable\n // sorting, so force stable by using the index in the case of tie.\n // See http://ofb.net/~sethml/is-sort-stable.html\n .sort(function(a,b) {\n var compare = b.score - a.score;\n if(compare) return compare;\n return a.index - b.index;\n });\n};\n\n\n}());\n\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/dist/donate-button/0.4/bundle.5e29c.esm.js b/docs/dist/donate-button/0.4/bundle.5e29c.esm.js new file mode 100644 index 00000000..aa83bb2d --- /dev/null +++ b/docs/dist/donate-button/0.4/bundle.5e29c.esm.js @@ -0,0 +1,2 @@ +!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(t){return e[t]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="https://assets.every.org/dist/donate-button/0.4/",t(t.s="aBQa")}({"/hs+":function(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function a(e){return Object.entries(e).filter((([,e])=>Boolean(e))).map((e=>e.map((e=>encodeURIComponent(e))).join("="))).join("&")}function i({fundraiserSlug:e,nonprofitSlug:t}){let n=Pe+t;return e&&(n+="/f/"+e),n}function l({methods:e,nonprofitSlug:t,noExit:n,privateNote:r}){return{method:null==e?void 0:e.join(","),utm_campaign:"donate-button",utm_source:t,utm_medium:Xe,no_exit:null!=n?n:1,private_note:r}}function c(e){var t;const n=new URL(e),r=n.pathname.split("/f/")[1],o=n.pathname.split("/")[1],a=new URLSearchParams(n.search),i=function(e){if(e)return e.split(",").filter((e=>et.includes(e)))}(a.get(rt.METHOD)),l=function(e){if(e)return Object.values(Ke).find((t=>t.toUpperCase()===e.toUpperCase()))}(a.get(rt.FREQUENCY)),c=function(e){if(!e)return;const t=Number.parseInt(e,10);return Number.isNaN(t)?void 0:t}(a.get(rt.AMOUNT)),s=null!=(t=a.get(rt.MONTHLY_TITLE))?t:void 0,u=function(e){if(e)return e.split(",").map(Number.parseFloat).filter(Boolean).slice(0,nt)}(a.get(rt.SUGGESTED_AMOUNTS));if(o)return{fundraiserSlug:r,nonprofitSlug:o,defaultFrequency:l,methods:i,lockMonthlyFrequency:l===Ke.Monthly,monthlyTitle:s,addAmounts:u,defaultDonationAmount:c}}function s(e,t){xe.options.__h&&xe.options.__h(dt,e,bt||t),bt=0;var n=dt.__H||(dt.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:_t}),n.__[e]}function u(e){return bt=1,p(C,e)}function p(e,t,n){var r=s(pt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):C(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=dt,!dt.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!a||a.call(this,e,t,n);var i=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&r.__c.props===e)&&(!a||a.call(this,e,t,n))};dt.u=!0;var a=dt.shouldComponentUpdate,i=dt.componentWillUpdate;dt.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,o(e,t,n),a=r}i&&i.call(this,e,t,n)},dt.shouldComponentUpdate=o}return r.__N||r.__}function d(e,t){var n=s(pt++,3);!xe.options.__s&&O(n.__H,t)&&(n.__=e,n.i=t,dt.__H.__h.push(n))}function h(e){return bt=5,f((function(){return{current:e}}),[])}function f(e,t){var n=s(pt++,7);return O(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function b(e,t){return bt=8,f((function(){return e}),t)}function m(e){var t=dt.context[e.__c],n=s(pt++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(dt)),t.props.value):e.__}function _(){for(var e;e=mt.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(v),e.__H.__h.forEach(g),e.__H.__h=[]}catch(t){e.__H.__h=[],xe.options.__e(t,e.__v)}}function y(e){var t,n=function(){clearTimeout(r),jt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);jt&&(t=requestAnimationFrame(n))}function v(e){var t=dt,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),dt=t}function g(e){var t=dt;e.__c=e.__(),dt=t}function O(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function C(e,t){return"function"==typeof t?t(e):t}function j(){const e=function(){const[e,t]=u(null);return d((()=>{(async()=>{try{const e=await Ft(Ut,{apiVersion:$t});t(e)}catch(e){}})()}),[]),e}(),[t,n]=u(!1),r=b((async e=>{const t=null==e?void 0:e.paymentRequest({country:"US",currency:"usd",total:{label:"test",amount:0},requestPayerName:!1,requestPayerEmail:!1}),r=Boolean(await(null==t?void 0:t.canMakePayment()));n(r)}),[]);d((()=>{e&&r(e)}),[r,e]);const o=Boolean(window.ApplePaySession);return{googlePay:t,applePay:t&&o}}function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t{try{return[e,t].map(encodeURIComponent).join("=")}catch(e){return null}})).filter(L).join("&");return n?[e,n].join("?"):e}(`mailto:${null!=(t=e.address)?t:""}`,T({},e.subject?{subject:e.subject}:{},e.body?{body:e.body}:{}))}function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;te.cssText)).join("\n"),o=document.createElement("style");o.id="every-shadow-styles",o.innerHTML=dl+r,ml.append(o)}}function Oe(e){let{element:t}=e,n=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,hl);if(!t.parentNode)return;const r=t.parentNode;Object(xe.render)(Object(xe.h)(Ye,n),r,t)}function Ce(){document.querySelectorAll("*[href^='https://www.every.org/']").forEach((e=>{const t=e.getAttribute("href");if(null!=t&&t.includes("#/donate")){const n=c(t);if(!n)return;const r=function(e){ml||ge();const t=document.createElement("div");return ml.append(t),new _l(e,t)}(n);null===e.getAttribute("data-every-style")?e.addEventListener("click",(e=>{e.preventDefault(),r.show()})):Oe(ye({element:e,onClick:()=>{r.show()}},n,{url:t}))}}))}function je(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{withLogo:t=!0,textColor:n="#fff",bgColor:r="#00a380",borderRadius:o="100px",fontSize:c="16px",padding:s="12px 20px",className:u,onClick:p,target:d="_blank",url:h}=e,f=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,Ze);const b=h||`${i(m=f)}?${a(l(m))}#/${We}`;var m;return Object(xe.h)("a",{href:b,style:{background:r,color:n,borderRadius:o,fontSize:c,padding:s},className:[Ae,u].filter(Boolean).join(" "),target:d,onClick:p?e=>{e.preventDefault(),p()}:void 0},t&&Object(xe.h)("svg",{className:Te,style:{color:n,height:c,width:c},width:"64",height:"56",viewBox:"0 0 64 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ve||(Ve=Object(xe.h)("path",{d:"M48.3746 20.9558C48.3746 9.03877 38.4374 0 25.6754 0C11.4001 0 0 12.0685 0 27.0153C0 43.1235 12.8125 56 30.0639 56C47.3153 56 62.7508 42.3156 63.9614 24.3895H56.0924C54.6295 37.8215 43.2799 48.1226 30.0639 48.1226C17.3523 48.1226 7.91952 38.7809 7.91952 27.0153C7.91952 16.4112 15.7886 7.87737 25.6754 7.87737C33.948 7.87737 40.4551 13.5329 40.4551 20.9558C40.4551 27.1163 36.0161 32.2669 30.1143 32.2669V40.1443C40.556 40.1443 48.3746 31.4085 48.3746 20.9558Z"}))),ze||(ze=Object(xe.h)("span",{className:Le},"Donate")))};let Ke=function(e){return e.Monthly="monthly",e.OneTime="once",e.Unselected="",e}({}),Qe=function(e){return e.CREDIT_CARD="card",e.BANK="bank",e.PAYPAL="paypal",e.VENMO="venmo",e.PAYMENT_REQUEST="pay",e.CRYPTO="crypto",e.STOCKS="stocks",e.DAF="daf",e.GIFT_CARD="gift",e}({});const Je=[Qe.VENMO,Qe.DAF,Qe.CRYPTO,Qe.STOCKS],et=Object.values(Qe),tt=et.filter((e=>e!==Qe.GIFT_CARD)),nt=5;var rt=function(e){return e.METHOD="method",e.FREQUENCY="frequency",e.MONTHLY_TITLE="monthlyTitle",e.SUGGESTED_AMOUNTS="suggestedAmounts",e.AMOUNT="amount",e}(rt||{});const ot=()=>{const e=document.createElement("style");e.innerHTML='\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Regular-Pro.woff2) format("woff2");\n font-weight: 400;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Bold-Pro.woff2) format("woff2");\n font-weight: bold;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Medium-Pro.woff2) format("woff2");\n font-weight: 500;\n font-style: normal;\n font-display: swap;\n }\n ',document.head.append(e)};var at=n("nr9d"),it=n.n(at);const lt={methods:Object.values(tt),show:!1,addAmounts:[10,50,100],defaultFrequency:Ke.OneTime,minDonationAmount:5,primaryColor:"#018669",showGiftCardOption:!1},ct={arrayMerge:(e,t)=>t},st=Object(xe.createContext)({}),ut=({options:e,children:t})=>{const n=(e=>{var t;const n=null==(t=e.methods)?void 0:t.filter((e=>et.includes(e))),r=(n&&n.length>0?n:tt).concat(e.showGiftCardOption?[Qe.GIFT_CARD]:[]);return it.a.all([lt,e,{methods:r}],ct)})(e);return Object(xe.h)(st.Provider,{value:n},t)};var pt,dt,ht,ft,bt=0,mt=[],_t=[],yt=xe.options.__b,vt=xe.options.__r,gt=xe.options.diffed,Ot=xe.options.__c,Ct=xe.options.unmount;xe.options.__b=function(e){dt=null,yt&&yt(e)},xe.options.__r=function(e){vt&&vt(e),pt=0;var t=(dt=e.__c).__H;t&&(ht===dt?(t.__h=[],dt.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=_t,e.__N=e.i=void 0}))):(t.__h.forEach(v),t.__h.forEach(g),t.__h=[],pt=0)),ht=dt},xe.options.diffed=function(e){gt&>(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==mt.push(t)&&ft===xe.options.requestAnimationFrame||((ft=xe.options.requestAnimationFrame)||y)(_)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==_t&&(e.__=e.__V),e.i=void 0,e.__V=_t}))),ht=dt=null},xe.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(v),e.__h=e.__h.filter((function(e){return!e.__||g(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],xe.options.__e(n,e.__v)}})),Ot&&Ot(e,t)},xe.options.unmount=function(e){Ct&&Ct(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{v(e)}catch(e){t=e}})),n.__H=void 0,t&&xe.options.__e(t,n.__v))};var jt="function"==typeof requestAnimationFrame;const wt=()=>m(st),xt=Symbol("FundraiserFetchError"),kt=Symbol("FundraiserFetching"),St=Object(xe.createContext)({fundraiser:kt}),Nt=({children:e})=>{const{fundraiserSlug:t,nonprofitSlug:n}=wt(),[r,o]=u(kt),a=b((async()=>{if(t)try{const e=await async function(e,t){const n=`${Me}/${e}/fundraiser/${t}`;return(await fetch(n).then((async e=>e.json()))).data.fundraiser}(n,t);o(e)}catch(e){o(xt)}else o(void 0)}),[n,t]);return d((()=>{a()}),[a]),Object(xe.h)(St.Provider,{value:{fundraiser:r}},e)},At=Symbol("NonprofitFetchError"),Tt=Symbol("NonprofitFetching"),Lt=Object(xe.createContext)({nonprofit:Tt}),Pt=({children:e})=>{const{nonprofitSlug:t}=wt(),[n,r]=u(Tt),o=b((async()=>{try{const e=await async function(e){return(await fetch(`${Me}/${e}`).then((async e=>e.json()))).data.nonprofit}(t);r(e)}catch(e){r(At)}}),[t]);return d((()=>{o()}),[o]),Object(xe.h)(Lt.Provider,{value:{nonprofit:n}},e)};var Mt="https://js.stripe.com/v3",Et=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Dt="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Rt=null,Ht=function(e){return null!==Rt||(Rt=new Promise((function(t,n){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(Dt),window.Stripe)t(window.Stripe);else try{var r=function(){for(var e=document.querySelectorAll('script[src^="'.concat(Mt,'"]')),t=0;t element.");return r.appendChild(n),n}(e)),r.addEventListener("load",(function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))})),r.addEventListener("error",(function(){n(new Error("Failed to load Stripe.js"))}))}catch(e){return void n(e)}else t(null)}))),Rt},Bt=Promise.resolve().then((function(){return Ht(null)})),It=!1;Bt.catch((function(e){It||console.warn(e)}));var Ft=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const n=wt(),[r,o]=u(n.defaultFrequency),[a,i]=u(n.defaultDonationAmount),[l,c]=u(null),[s,p]=u(n.methods[0]),[d,h]=u(),[f,b]=u(),[m,_]=u(),[y,v]=u(),g=j(),[O,C]=u();return Object(xe.h)(qt.Provider,{value:{frequency:r,setFrequency:o,donationAmount:a,setDonationAmount:i,hideWidget:t,submitError:l,setSubmitError:c,selectedPaymentMethod:s,setSelectedPaymentMethod:p,stockAmount:d,setStockAmount:h,stockSymbol:f,setStockSymbol:b,cryptoAmount:m,setCryptoAmount:_,cryptoCurrency:y,setCryptoCurrency:v,paymentRequestAvailable:g,privateNote:O,setPrivateNote:C}},e)},Xt=({options:e,hide:t,children:n})=>Object(xe.h)(ut,{options:e},Object(xe.h)(Gt,{hide:t},Object(xe.h)(Pt,null,Object(xe.h)(Nt,null,n))));let Wt=function(e){return e.PhoneOnly="@media only screen and (max-width: 37.44em)",e.TabletUp="@media only screen and (min-width: 37.5em)",e.TabletLandscapeUp="@media only screen and (min-width: 56.25em)",e.DesktopUp="@media only screen and (min-width: 75em)",e.BigDesktopUp="@media only screen and (min-width: 112.5em)",e}({}),Vt=function(e){return e.LightGray="#EAEDED",e.Gray="#f3f6f6",e.DarkGray="#868A8A",e.Black="#272727",e.Text="#2E3434",e.TextGray="#868383",e.TextOpaque="rgba(46, 52, 52, 0.6)",e.Error="#D95C35",e.ErrorShadow="rgba(217, 92, 53, 0.2)",e.Transparent="transparent",e.White="#fff",e}({});const zt={fontSize:"32px",lineHeight:"36px"},Zt={fontSize:"24px",lineHeight:"32px"},Yt={fontSize:"20px",lineHeight:"24px"},Kt={fontSize:"16px",lineHeight:"24px"},Qt={fontSize:"14px",lineHeight:"20px"};let Jt=function(e){return e.Empty="0",e.XXS="4px",e.XS="8px",e.S="12px",e.M="16px",e.L="20px",e.XL="24px",e.XXL="32px",e.Stack_XXS="0 0 4px 0",e.Stack_XS="0 0 8px 0",e.Stack_S="0 0 12px 0",e.Stack_M="0 0 16px 0",e.Stack_L="0 0 20px 0",e.Stack_XL="0 0 24px 0",e.Stack_XXL="0 0 32px 0",e.Inset_XXS="4px 4px 4px 4px",e.Inset_XS="8px 8px 8px 8px",e.Inset_S="12px 12px 12px 12px",e.Inset_M="16px 16px 16px 16px",e.Inset_L="20px 20px 20px 20px",e.Inset_XL="24px 24px 24px 24px",e.Inset_XXL="32px 32px 32px 32px",e.InsetSquish_XS="8px 16px",e.InsetSquish_S="12px 24px",e.InsetSquish_M="16px 32px",e.InsetSquish_L="20px 40px",e.InsetSquish_XL="24px 48px",e.Inline_XS="0 8px 0 0",e.Inline_S="0 12px 0 0",e.Inline_M="0 16px 0 0",e.Inline_L="0 20px 0 0",e.Inline_XL="0 24px 0 0",e.Inline_XXL="0 24px 0 0",e}({});const en=e=>({display:"flex",flexDirection:"column","> *:not(:last-child)":{marginBottom:"number"==typeof e?`${e}px`:e}}),tn=e=>({display:"flex",flexDirection:"row","> *:not(:last-child)":{marginRight:"number"==typeof e?`${e}px`:e}}),nn=e=>Se()(en(e)),rn=e=>en(e),on=e=>tn(e),an=Se()({display:"flex",flexDirection:"column",gap:Jt.M}),ln={position:"relative",top:"-1px",transform:"rotate(180deg)"},cn={"> p":{marginBottom:Jt.XS}},sn=Se()(w({},cn,{maxHeight:"1000px",transition:"all 1s",opacity:"1"})),un=Se()(w({},cn,{opacity:"0",overflow:"hidden",maxHeight:"0",transition:"all 0.5s"})),pn=e=>Se()(w({},on(Jt.S),Qt,{alignItems:"center",justifyContent:"space-between",width:"100%",border:"none",background:"transparent",textAlign:"start",padding:0,":hover":{cursor:"pointer"},"> svg":w({width:"16px",height:"16px"},e?ln:{})},e?{fontWeight:700}:{fontWeight:500,color:Vt.TextGray})),dn=Se()({color:Vt.Text,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}});var hn,fn,bn,mn,_n,yn,vn,gn,On;const Cn=(e,t)=>{const n=`100% of your donation is tax-deductible to the extent allowed by US law. \n Your donation is made to Every.org, a tax-exempt US 501(c)(3) charity that\n grants unrestricted funds to ${e.name} on your behalf. \n As a legal matter, Every.org must provide any donations to ${e.name} on an\n unrestricted basis, regardless of any designations or restrictions made by\n you.`,r=t&&!function(e){return e.nonprofitId===e.creatorNonprofitId}(t);let o="";return e.hasAdmin&&r?o=`Please note ${e.name} has not reviewed or approved the content of this peer-to-peer fundraiser.`:e.hasAdmin||r?!e.hasAdmin&&r&&(o=`Please note ${e.name} has not provided permission for this solicitation or reviewed or approved the content of this peer-to-peer fundraiser.`):o=`Please note ${e.name} has not provided permission for this solicitation.`,Object(xe.h)("span",null,n," ",o)},jn=Se()({backgroundColor:"white",padding:`${Jt.XL} ${Jt.XL} 0px`,borderRadius:"unset",overflow:"hidden",[Wt.TabletLandscapeUp]:{borderRadius:"16px",padding:Jt.M}});var wn=e=>e.filter((e=>Boolean(e))).join(" ");const xn=({children:e,className:t})=>Object(xe.h)("div",{className:wn([jn,t])},e),kn=()=>m(St).fundraiser,Sn=()=>{const e=kn();if(e!==xt&&e!==kt)return e},Nn=()=>m(Lt).nonprofit,An=()=>{const e=Nn();if(e===At||e===Tt)throw new Error("Nonprofit error");return e},Tn=()=>m(qt);var Ln;const Pn=()=>Ln||(Ln=Object(xe.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Object(xe.h)("path",{d:"M6 9l6 6 6-6"})));var Mn,En,Dn;const Rn=({faqData:e})=>{const[t,n]=u(!1);return Object(xe.h)("div",{className:(r=e.mobileOnly,Se()(w({},Qt,r?{[Wt.TabletLandscapeUp]:{padding:"none"}}:{})))},Object(xe.h)("button",{type:"button",className:pn(t),onClick:()=>{n(!t)}},Object(xe.h)("span",null,e.title),Mn||(Mn=Object(xe.h)(Pn,null))),Object(xe.h)("div",{className:t?sn:un},e.description));var r},Hn=()=>{const e=An(),t=Sn(),{selectedPaymentMethod:n}=Tn(),r=[{id:"intro",title:"How does Every.org accept my donation?",description:Object(xe.h)(xe.Fragment,null,Object(xe.h)("p",null,"Your donation first goes to Every.org, a US 501(c)(3) public charity, and we immediately issue a receipt for your charitable contribution. ",x(e)),En||(En=Object(xe.h)("p",null,"This process ensures your eligibility for a tax-deduction, consolidates records of your giving, and reduces the administrative burden on the nonprofits.")))},{id:"fees",title:"Are there any fees?",description:N(n,e)},{id:"tax",title:"Is this donation tax-deductible?",description:Object(xe.h)("p",null,"Yes, ",Cn(e,t))},{id:"receipt",title:"Will I receive a receipt for my donation?",description:Dn||(Dn=Object(xe.h)(xe.Fragment,null,Object(xe.h)("p",null,"Yes, after your donation payment is confirmed, you will immediately get a receipt emailed to you."),Object(xe.h)("p",null,"Additionally, if you have an Every.org account, you can always get a single itemized receipt that shows all your donations in a given year.")))},{id:"p2p",mobileOnly:!0,title:`How else can I support ${e.name}`,description:Object(xe.h)("p",null,"You can also rally your friends, family, and social networks to support this nonprofit by starting your own fundraiser for them."," ",Object(xe.h)("a",{className:dn,href:Pe+e.primarySlug+"/"+Re},"Start a fundraiser for ",e.name))}];return Object(xe.h)(xn,null,Object(xe.h)("div",{className:an},r.map((e=>Object(xe.h)(Rn,{key:e.id,faqData:e})))))},Bn=Se()(A({padding:`${Jt.XL} ${Jt.XL} 0px`,backgroundColor:"unset",display:"flex",flexDirection:"column"},Qt,{color:Vt.TextGray,[Wt.TabletLandscapeUp]:{padding:`0px ${Jt.L}`},"> p":{margin:0},"> p:not(:last-child)":{marginBottom:Jt.XS}})),In=Se()({color:Vt.TextGray,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}});var Fn,Un,$n,qn;const Gn=["children"],Xn=P({address:"support@every.org"}),Wn=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,Gn);return Object(xe.h)("a",M({className:In},n),t)},Vn=()=>{const e=An(),t=Sn();return Object(xe.h)(xn,{className:Bn},Object(xe.h)("p",null,Cn(e,t)," ",Fn||(Fn=Object(xe.h)(Wn,{href:He},"See Terms"))),Un||(Un=Object(xe.h)("p",null,"Need help? See FAQs or contact us at our"," ",Object(xe.h)(Wn,{href:Be},"Help Center"),".")),$n||($n=Object(xe.h)("p",null,"Have ideas for how we can build a better donation experience?"," ",Object(xe.h)(Wn,{href:Xn},"Send us feedback"),".")),qn||(qn=Object(xe.h)("p",null,"We respect your privacy. To learn more, check out our"," ",Object(xe.h)(Wn,{href:Ie},"Privacy Policy"),".")))},zn=e=>Se()({color:e,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}}),Zn=Se()({display:"none",[Wt.TabletLandscapeUp]:{display:"block"}}),Yn=()=>{const{primaryColor:e,nonprofitSlug:t}=wt(),n=Pe+t+"/"+Re;return Object(xe.h)(xn,{className:Zn},Object(xe.h)("p",null,Object(xe.h)("a",{className:zn(e),href:n},"Start a fundraiser")," ","to rally your friends and family"))},Kn=Se()({display:"grid",gridGap:0,gridTemplateColumns:"1fr",gridTemplateAreas:'"header"\n "promoBanners"\n "nonprofitInfo"\n "paymentProcess"\n "fundraiserLink"\n "faq"\n "footer"',[Wt.TabletLandscapeUp]:{gridColumnGap:Jt.XL,gridTemplateColumns:"1fr 2fr",gridTemplateRows:"auto auto auto auto auto 1fr",gridTemplateAreas:'"header header"\n "promoBanners promoBanners"\n "nonprofitInfo paymentProcess"\n "fundraiserLink paymentProcess"\n "faq paymentProcess"\n "faq footer"',"& > div:not(:last-child):not(:empty)":{marginBottom:Jt.XL}},"& > #every-header":{gridArea:"header",display:"block",[Wt.TabletLandscapeUp]:{display:"none"}},"& > #every-promoBanners":{gridArea:"promoBanners"},"& > #every-nonprofitInfo":{gridArea:"nonprofitInfo"},"& > #every-paymentProcess":{gridArea:"paymentProcess"},"& > #every-faq":{gridArea:"faq"},"& > #every-fundraiserLink":{gridArea:"fundraiserLink"},"& > #every-footer":{gridArea:"footer"}}),Qn=({children:e})=>Object(xe.h)("div",{className:Kn},e),Jn=Se()({cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",backgroundColor:"transparent",fontFamily:Ne.BasisGrotesque}),er=Se()({display:"block",[Wt.TabletLandscapeUp]:{display:"none"}}),tr=Se()({position:"absolute",right:Jt.XL,top:Jt.XL,padding:Jt.XXS,background:"white",borderRadius:"8px",display:"none",[Wt.TabletLandscapeUp]:{display:"block"}}),nr=()=>{const{primaryColor:e}=wt();return Object(xe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M18 6L6 18",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Object(xe.h)("path",{d:"M6 6L18 18",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))};var rr;const or=({className:e})=>{const{hideWidget:t}=Tn();return Object(xe.h)("button",{type:"button",className:wn([Jn,e]),onClick:t},rr||(rr=Object(xe.h)(nr,null)))},ar=Se()({display:"flex",justifyContent:"flex-end",alignItems:"center",padding:`${Jt.M} ${Jt.XL}`,[Wt.TabletLandscapeUp]:{padding:0}});var ir;const lr=()=>ir||(ir=Object(xe.h)("div",{className:ar},Object(xe.h)(or,{className:er})));let cr=function(e){return e.Small="4px",e.Default="8px",e.Medium="24px",e.Big="100px",e.Circle="100%",e}({});const sr=Se()({lineHeight:"20px","> span":{fontWeight:700}}),ur=e=>Se()({borderRadius:cr.Circle,overflow:"hidden",display:"block",backgroundImage:`url(${e})`,backgroundSize:"contain",width:"40px",height:"40px",flexShrink:0,[Wt.TabletLandscapeUp]:{width:"64px",height:"64px"}}),pr=Se()({padding:`${Jt.XL}`,[Wt.TabletLandscapeUp]:E({},rn(Jt.S),{padding:`${Jt.L}`})}),dr=Se()(E({},on(Jt.S),{alignItems:"center"})),hr=Se()(E({},Qt,{color:"rgba(0, 0, 0, 0.7)",display:"none",[Wt.TabletLandscapeUp]:{display:"block"}}));var fr;const br=()=>{const{name:e,logoCloudinaryId:t,hasAdmin:n}=An(),r=`https://res.cloudinary.com/everydotorg/image/upload/f_auto,q_auto/${null!=t?t:"NonprofitAvatarPlaceholder"}`;return Object(xe.h)(xn,{className:pr},Object(xe.h)("div",{className:dr},Object(xe.h)("div",{alt:"nonprofit logo",className:ur(r)}),Object(xe.h)("h1",{className:sr},n?Object(xe.h)(xe.Fragment,null,Object(xe.h)("span",null,e)," is using Every.org to accept this donation"):Object(xe.h)(xe.Fragment,null,"Every.org created this page for ",Object(xe.h)("span",null,e)))),fr||(fr=Object(xe.h)("p",{className:hr},"Every.org is a 501(c)(3) nonprofit building free, accessible giving tools for every person and every organization.")))};var mr;const _r=()=>mr||(mr=Object(xe.h)(br,null));let yr=function(e){return e.Normal="1px solid",e.Big="4px solid",e}({});const vr=(e,t)=>`${e} ${t}`,gr=Se()({"& input":{fontSize:Kt.fontSize,lineHeight:Kt.fontSize,fontWeight:400}}),Or=Se()({background:Vt.White,borderRadius:`0 0 ${cr.Default} ${cr.Default}`,border:vr(yr.Normal,Vt.LightGray),borderTop:"none"}),Cr=Se()({display:"flex",alignItems:"center",gap:Jt.XXS}),jr=Se()({overflowY:"scroll",height:"100%",maxHeight:"200px"}),wr=Se()({borderBottom:vr(yr.Normal,Vt.LightGray)}),xr=Se()(D({border:"none",background:"none",padding:`${Jt.S} ${Jt.M}`},Kt,{width:"100%",display:"flex",alignItems:"center",gap:Jt.XS,":hover":{cursor:"pointer"},"> span:last-of-type":D({marginLeft:"auto"},Qt,{color:Vt.TextGray})})),kr=(e,t)=>Se()(D({marginLeft:"auto"},Qt,{color:Vt.TextGray,display:"flex",gap:Jt.XS,alignItems:"center","> svg":D({color:e},t?ln:{})})),Sr=Se()({borderRadius:`${cr.Default} ${cr.Default} 0 0 `}),Nr=Se()({gap:Jt.XS,"> input":{textAlign:"right"}}),Ar=(Se()({}),Se()({border:vr(yr.Normal,Vt.Error)})),Tr=Se()({fontSize:Zt.fontSize,lineHeight:Zt.fontSize,fontWeight:700}),Lr=Se()(R({},Zt,{fontWeight:700,display:"inline-flex",marginRight:Jt.XXS})),Pr=e=>Se()(R({},Yt,{fontWeight:700,color:e,display:"inline-flex",marginLeft:Jt.XXS})),Mr=Se()(R({},on(Jt.M),{justifyContent:"center"})),Er=e=>Se()(R({},Kt,{color:e,borderRadius:cr.Big,fontWeight:500,border:"none",padding:0,fontFamily:"inherit",cursor:"pointer",background:"unset",[Wt.TabletLandscapeUp]:{border:`1px solid ${Vt.DarkGray}`,padding:`${Jt.XS} ${Jt.L}`}}));(I.prototype=new xe.Component).isPureReactComponent=!0,I.prototype.shouldComponentUpdate=function(e,t){return B(this.props,e)||B(this.state,t)};var Dr=xe.options.__b;xe.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Dr&&Dr(e)};var Rr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911,Hr=xe.options.__e;xe.options.__e=function(e,t,n,r){if(e.then)for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Hr(e,t,n,r)};var Br=xe.options.unmount;xe.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Br&&Br(e)},(q.prototype=new xe.Component).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=G(r.__v),a=!1,i=function(){a||(a=!0,n.__R=null,o?o(l):l())};n.__R=i;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=$(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},q.prototype.componentWillUnmount=function(){this.t=[]},q.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=U(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&Object(xe.createElement)(xe.Fragment,null,e.fallback);return o&&(o.__h=null),[Object(xe.createElement)(xe.Fragment,null,t.__a?null:e.children),o]};var Ir=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]Se()({position:"relative",padding:Jt.M,display:"flex",flexDirection:"row",alignItems:"center",borderRadius:cr.Default,color:Vt.Text,backgroundColor:Vt.Gray,border:vr(yr.Normal,Vt.LightGray),cursor:"text",":focus-within":{backgroundColor:"white",borderColor:e}}),Qr=Se()({fontSize:Kt.fontSize,lineHeight:Kt.fontSize,fontFamily:"inherit",flex:1,border:"none",outline:"none",background:"transparent",width:"100%",minWidth:"unset",padding:0,margin:0,"::placeholder":{fontWeight:400},"::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:0},"::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0},"-moz-appearance":"textfield"}),Jr=["containerClassName","inputClassName","containerOnClick"];var eo=F(((e,t)=>{const n=h(),{primaryColor:r}=wt(),{containerClassName:o,inputClassName:a}=e,i=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,Jr);return Object(xe.h)("div",{className:wn([Kr(r),o]),onClick:()=>{var e;null==(e=n.current)||e.focus()}},Object(xe.h)("textarea",Z({ref:e=>{e&&(n.current=e,t&&(t.current=e))},className:wn([Qr,a])},i)))}));const to=["sufix","sufixClassName","prefix","prefixClassName","containerClassName","inputClassName","containerOnClick"];var no=F(((e,t)=>{const{sufix:n,sufixClassName:r,prefix:o,prefixClassName:a,containerClassName:i,inputClassName:l,containerOnClick:c}=e,s=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,to),u=h(),{primaryColor:p}=wt();return Object(xe.h)("div",{className:wn([Kr(p),i]),onClick:()=>{var e;c?c():null==(e=u.current)||e.focus()}},o&&Object(xe.h)("div",{className:a},o),Object(xe.h)("input",Y({ref:e=>{e&&(u.current=e,t&&(t.current=e))},className:wn([Qr,l])},s)),n&&Object(xe.h)("div",{className:r},n))}));let ro=function(e){return e.ALGO="ALGO",e.APE="APE",e.AVAX="AVAX",e.BAT="BAT",e.BTC="BTC",e.DAI="DAI",e.DOGE="DOGE",e.DOT="DOT",e.ETH="ETH",e.FIL="FIL",e.GRT="GRT",e.LINK="LINK",e.LTC="LTC",e.MATIC="MATIC",e.MOB="MOB",e.RAY="RAY",e.SAMO="SAMO",e.SBR="SBR",e.SHIB="SHIB",e.SOL="SOL",e.UNI="UNI",e.USDC="USDC",e.USDT="USDT",e.XTZ="XTZ",e.ZEC="ZEC",e}({}),oo=function(e){return e.ERC20="ERC-20",e.SPL="SPL",e}({});const ao=[ro.ALGO,ro.MOB],io={[ro.ALGO]:{displayName:"Algorand",abbreviation:"ALGO",decimalOffset:6},[ro.APE]:{displayName:"Apecoin",abbreviation:"APE",decimalOffset:18,contractType:oo.ERC20},[ro.AVAX]:{displayName:"Avalanche",abbreviation:"AVAX",decimalOffset:9},[ro.BAT]:{displayName:"Basic Attention Token",abbreviation:"BAT",decimalOffset:18,contractType:oo.ERC20},[ro.BTC]:{displayName:"Bitcoin",abbreviation:"BTC",decimalOffset:8},[ro.DOGE]:{displayName:"DogeCoin",abbreviation:"DOGE",decimalOffset:8},[ro.DAI]:{displayName:"Dai",abbreviation:"DAI",decimalOffset:18,contractType:oo.ERC20},[ro.DOT]:{displayName:"Polkadot",abbreviation:"DOT",decimalOffset:10},[ro.ETH]:{displayName:"Ethereum",abbreviation:"ETH",decimalOffset:18},[ro.FIL]:{displayName:"Filecoin",abbreviation:"FIL",decimalOffset:18},[ro.GRT]:{displayName:"The Graph",abbreviation:"GRT",decimalOffset:18,contractType:oo.ERC20},[ro.LINK]:{displayName:"Chainlink",abbreviation:"LINK",decimalOffset:18,contractType:oo.ERC20},[ro.LTC]:{displayName:"Litecoin",abbreviation:"LTC",decimalOffset:8},[ro.MATIC]:{displayName:"Polygon",abbreviation:"MATIC",decimalOffset:18,contractType:oo.ERC20},[ro.MOB]:{displayName:"MobileCoin",abbreviation:"MOB",decimalOffset:12},[ro.RAY]:{displayName:"Raydium",abbreviation:"RAY",decimalOffset:6,contractType:oo.SPL},[ro.SAMO]:{displayName:"Samoyed",abbreviation:"SAMO",decimalOffset:9,contractType:oo.SPL},[ro.SBR]:{displayName:"Saber",abbreviation:"SBR",decimalOffset:6,contractType:oo.SPL},[ro.SHIB]:{displayName:"Shiba Inu",abbreviation:"SHIB",decimalOffset:18,contractType:oo.ERC20},[ro.SOL]:{displayName:"Solana",abbreviation:"SOL",decimalOffset:9},[ro.UNI]:{displayName:"Uniswap",abbreviation:"UNI",decimalOffset:18,contractType:oo.ERC20},[ro.USDC]:{displayName:"USD Coin",abbreviation:"USDC",decimalOffset:6,contractType:oo.ERC20},[ro.USDT]:{displayName:"Tether",abbreviation:"USDT",decimalOffset:6},[ro.XTZ]:{displayName:"Tezos",abbreviation:"XTZ",decimalOffset:6},[ro.ZEC]:{displayName:"ZCash",abbreviation:"ZEC",decimalOffset:8}},lo=()=>{wt();const{cryptoAmount:e,setCryptoAmount:t,cryptoCurrency:n,submitError:r,setSubmitError:o}=Tn(),a=wn([Nr,...r?[Ar]:[]]);return Object(xe.h)("div",{className:a},Object(xe.h)(no,{id:"donation-input",inputClassName:Tr,containerClassName:a,type:"number",inputMode:"decimal",pattern:"[+-]?(\\d*\\.)?\\d+",step:K(n),value:e,sufix:Object(xe.h)("span",null,n),onInput:e=>{const n=e.currentTarget.value;""===n&&(e.currentTarget.value=n,t(void 0));const r=Number.parseFloat(n);!Number.isNaN(r)&&/[+-]?(\d*\.)?\d+/g.test(n)&&(t(r),o(null))}}))};var co=n("kPAj");const so={[ro.ALGO]:n.p+"58f20393bf2b41f944c6229c2af785b9.svg",[ro.APE]:n.p+"5982461fe2304c26f3a3cf4c50806dad.svg",[ro.AVAX]:n.p+"b31a89ce5555412a0c8a4c6463286584.svg",[ro.BAT]:n.p+"26c9b1d3d7943e6e67cf13e039ba5ac8.svg",[ro.BTC]:n.p+"9052c75387065f76bb3436b7e4ce12cd.svg",[ro.DOGE]:n.p+"4d81ee51fa2520df58ae092aeb3d0bd4.svg",[ro.DAI]:n.p+"f8f4253f02d1fbc4bf04d0959a6e614c.svg",[ro.DOT]:n.p+"f588feb3cbbcc0fb259a3630ec7e34ba.svg",[ro.ETH]:n.p+"8098252f28e93069c75d6010d3ac6bc1.svg",[ro.FIL]:n.p+"03c114f6e014588a4bde815d9bc85821.svg",[ro.GRT]:n.p+"5450d3cada4fd0370ab8d885765f5cc3.svg",[ro.LINK]:n.p+"3a5177b76709819ba4663556e60222f8.svg",[ro.LTC]:n.p+"cc9ce389e9a4e0f518e3caeb7b60912d.svg",[ro.MATIC]:n.p+"3e1eb932bdbaa2318584813bf468be53.svg",[ro.MOB]:n.p+"8f22b294629293d29895fddef0a8baea.svg",[ro.RAY]:n.p+"badb98080214485db486794fb59a95cc.svg",[ro.SAMO]:n.p+"e4bfa8eb04696d4fd5ea04ca4c35469b.svg",[ro.SBR]:n.p+"fc9295a4651c56d5b4e8c3aa13a93208.svg",[ro.SHIB]:n.p+"743324f8e09d34a894c21e91c396f289.svg",[ro.SOL]:n.p+"b9021bb757262a32de6d8931015051d9.svg",[ro.UNI]:n.p+"45bcde5a98dbbdf2a4e0769eca2154f1.svg",[ro.USDC]:n.p+"bc2c9e9d67b73656a6da5dd177aa10a2.svg",[ro.USDT]:n.p+"7ab9396038b4befda4354b2a476d9064.svg",[ro.XTZ]:n.p+"6214ae0b42d798a0c9a51503a27a66bf.svg",[ro.ZEC]:n.p+"88611c6e2f9450f29ece8d2b36641670.svg"},uo=({currency:e})=>Object(xe.h)("img",{src:so[e],alt:e+"_icon",width:24,height:24});var po;const ho=()=>po||(po=Object(xe.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-search"},Object(xe.h)("circle",{cx:"11",cy:"11",r:"8"}),Object(xe.h)("path",{d:"M21 21l-4.35-4.35"})));var fo,bo,mo;const _o=[ro.BTC,ro.ETH,ro.USDC],yo=_o.map((e=>ee(e))),vo=Object.values(ro).filter((e=>!_o.includes(e))).filter((e=>!ao.includes(e))).map((e=>ee(e))),go=Object.values(ro).map((e=>ee(e))),Oo=({onClick:e,option:t})=>Object(xe.h)("li",{key:t.value,role:"option"},Object(xe.h)("button",{type:"button",className:xr,onClick:()=>{e(t)}},Object(xe.h)(uo,{currency:t.value}),Object(xe.h)("span",null,t.label),Object(xe.h)("span",null,t.contractType))),Co=()=>{const e=An(),{primaryColor:t}=wt(),n=`Contents: I would like to make a crypto donation to support https://www.every.org/${e.primarySlug}.\n\nMy name:\nToken name:\nToken symbol:\nToken quantity:\n\nPlease reply back with an address where I can donate, as this is worth over $5,000 USD.`;return Object(xe.h)("a",{className:zn(t),href:P({address:De,subject:`Crypto donation for ${e.name}`,body:n})},De)},jo=()=>{const{submitError:e,cryptoCurrency:t,setCryptoCurrency:n}=Tn(),{primaryColor:r}=wt(),o=h(null),[a,i]=u(go.find((e=>e.value===t))),[l,c]=u(null==a?void 0:a.label),[s,p]=u(!a),d=e=>{i(e),n(e.value),c(e.label),p(!1)},f=()=>{i(void 0),n(void 0),p(!0),c("")},b=wn([Cr,...e?[Ar]:[],...s?[Sr]:[]]),m=e=>Object(xe.h)(Oo,{option:e,onClick:d}),_=l?Object(co.filter)(l,go,{extract:e=>{const t=io[e.value];return[t.displayName,t.abbreviation].join(" ")}}).map((e=>e.original)):void 0;return Object(xe.h)("div",{className:gr},Object(xe.h)(no,{ref:o,inputClassName:Tr,containerOnClick:()=>{var e;null==(e=o.current)||e.focus(),f()},value:l,prefix:a?Object(xe.h)(uo,{currency:a.value}):fo||(fo=Object(xe.h)(ho,null)),prefixClassName:Se()({display:"inline-flex"}),sufixClassName:kr(r,s),containerClassName:b,sufix:Object(xe.h)(xe.Fragment,null,Object(xe.h)("span",null,null==a?void 0:a.contractType)," ",bo||(bo=Object(xe.h)(Pn,null))),onInput:e=>{c(e.currentTarget.value),i(void 0),n(void 0),p(!0)},onFocus:f}),s&&Object(xe.h)("div",{className:Or},Object(xe.h)("div",{className:jr},_?0===_.length?Object(xe.h)("div",{className:Se()({padding:"20px"})},"We don't currently support this coin on our site, but for donations worth over $5,000 USD we can do it manually. Please email ",mo||(mo=Object(xe.h)(Co,null))," to arrange."):Object(xe.h)("ul",null,_.map((e=>m(e)))):Object(xe.h)(xe.Fragment,null,Object(xe.h)("ul",{className:wr},yo.map((e=>m(e)))),Object(xe.h)("ul",null,vo.map((e=>m(e))))))))};var wo;const xo=()=>wo||(wo=Object(xe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M14.9384 5.2052C15.6282 4.34238 16.0964 3.18386 15.9729 2C14.9631 2.05021 13.7308 2.6662 13.0174 3.5297C12.3768 4.26915 11.8098 5.47617 11.9576 6.61041C13.0912 6.70874 14.2237 6.04381 14.9384 5.2052Z",fill:"#2E3434"}),Object(xe.h)("path",{d:"M15.9595 6.83176C14.3133 6.73371 12.9136 7.76606 12.1275 7.76606C11.3409 7.76606 10.1371 6.88118 8.83501 6.90503C7.14031 6.92992 5.56781 7.88812 4.70782 9.41211C2.93897 12.4608 4.24102 16.9832 5.96114 19.4662C6.79647 20.6946 7.80318 22.0472 9.12968 21.9986C10.383 21.9494 10.8743 21.1871 12.3977 21.1871C13.9201 21.1871 14.3626 21.9986 15.6893 21.974C17.0651 21.9494 17.9253 20.745 18.7606 19.5154C19.7189 18.115 20.1111 16.7629 20.1358 16.6887C20.1111 16.6641 17.4828 15.6558 17.4584 12.6324C17.4336 10.1009 19.522 8.89672 19.6203 8.82205C18.441 7.07785 16.5983 6.88118 15.9595 6.83176Z",fill:"#2E3434"})));var ko;var So;const No=({className:e})=>Object(xe.h)("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},So||(So=Object(xe.h)("path",{d:"M20 12v10H4V12M22 7H2v5h20V7zM12 22V7M12 7H7.5a2.5 2.5 0 110-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z",stroke:"#00A37F",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})));var Ao;const To=()=>Ao||(Ao=Object(xe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M22 12.2296C22 11.5499 21.9438 10.8665 21.8238 10.1978H12.2013V14.0483H17.7117C17.483 15.2902 16.7483 16.3887 15.6725 17.0868V19.5853H18.9599C20.8904 17.8437 22 15.2718 22 12.2296Z",fill:"#4285F4"}),Object(xe.h)("path",{d:"M12.2013 21.9998C14.9528 21.9998 17.2731 21.1143 18.9637 19.5859L15.6762 17.0874C14.7616 17.6974 13.5808 18.0427 12.2051 18.0427C9.5436 18.0427 7.28697 16.2828 6.47728 13.9166H3.08484V16.4922C4.81667 19.8688 8.34406 21.9998 12.2013 21.9998Z",fill:"#34A853"}),Object(xe.h)("path",{d:"M6.4739 13.9165C6.04657 12.6747 6.04657 11.3299 6.4739 10.088V7.51245H3.08521C1.63826 10.3379 1.63826 13.6667 3.08521 16.4921L6.4739 13.9165Z",fill:"#FBBC04"}),Object(xe.h)("path",{d:"M12.2013 5.95801C13.6558 5.93596 15.0615 6.47239 16.1148 7.45707L19.0274 4.60224C17.1832 2.90477 14.7353 1.97152 12.2013 2.00092C8.34406 2.00092 4.81667 4.13194 3.08484 7.51218L6.47353 10.0878C7.27947 7.71794 9.53985 5.95801 12.2013 5.95801Z",fill:"#EA4335"})));var Lo;var Po;var Mo,Eo;const Do={[Qe.CREDIT_CARD]:Object(xe.h)((()=>{const{primaryColor:e}=wt();return Object(xe.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M21 4.74316H3C1.89543 4.74316 1 5.63859 1 6.74316V18.7432C1 19.8477 1.89543 20.7432 3 20.7432H21C22.1046 20.7432 23 19.8477 23 18.7432V6.74316C23 5.63859 22.1046 4.74316 21 4.74316Z",stroke:e,strokeWidth:"2",strokeLinecap:"round"}),Object(xe.h)("path",{d:"M1 10.7432H23",stroke:e,strokeWidth:"2",strokeLinecap:"round"}))}),null),[Qe.BANK]:Object(xe.h)((()=>{const{primaryColor:e}=wt();return Object(xe.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M4 8.74348V19.2435M7 19.2435V8.74348M16 8.74348V19.2435M19 19.2435V8.74348M3.5 22.7435H19.5C20.33 22.7435 21 22.7435 21 21.2435C21 19.7435 20.33 19.7435 19.5 19.7435H3.5C2.67 19.7435 2 19.7435 2 21.2435C2 22.7435 2.67 22.7435 3.5 22.7435ZM10.57 2.23348L2.67 6.39348C2.26 6.60348 2 7.03348 2 7.49348C2 8.18348 2.56 8.74348 3.25 8.74348H19.76C20.44 8.74348 21 8.18348 21 7.49348C21 7.03348 20.74 6.60348 20.33 6.39348L12.43 2.23348C11.85 1.92348 11.15 1.92348 10.57 2.23348Z",stroke:e,strokeWidth:"2"}))}),null),[Qe.PAYPAL]:Object(xe.h)((()=>Lo||(Lo=Object(xe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M8.78495 22.0251L9.12912 19.7433L8.36247 19.7248H4.70166L7.24574 2.88757C7.25331 2.83613 7.27835 2.78924 7.31628 2.75545C7.3542 2.72166 7.4025 2.70322 7.45237 2.70349H13.625C15.6742 2.70349 17.0884 3.14858 17.8268 4.02709C18.1729 4.43921 18.3934 4.86988 18.5 5.34382C18.6118 5.84111 18.6138 6.43525 18.5046 7.1599L18.4967 7.21278V7.67711L18.8428 7.88179C19.1071 8.02153 19.3446 8.21056 19.5436 8.43953C19.8398 8.79189 20.0313 9.23973 20.1122 9.77068C20.1958 10.3167 20.1682 10.9665 20.0313 11.7022C19.8733 12.5484 19.618 13.2854 19.2732 13.8885C18.9689 14.4287 18.5599 14.8966 18.0722 15.2622C17.6142 15.6015 17.07 15.8591 16.4547 16.0239C15.8585 16.186 15.1787 16.2678 14.4331 16.2678H13.9527C13.6092 16.2678 13.2756 16.3969 13.0137 16.6284C12.7521 16.8623 12.5786 17.1856 12.5241 17.5405L12.4879 17.7459L11.8798 21.7675L11.8522 21.9152C11.845 21.9619 11.8324 21.9853 11.814 22.0011C11.7962 22.0163 11.7739 22.0248 11.7508 22.0251H8.78495Z",fill:"#253B80"}),Object(xe.h)("path",{d:"M19.1713 7.26611C19.1528 7.38906 19.1318 7.51476 19.1081 7.64389C18.2941 12.0062 15.5091 13.5132 11.9523 13.5132H10.1413C9.70633 13.5132 9.33979 13.8429 9.27201 14.2907L8.3448 20.4286L8.08223 22.1684C8.07177 22.2374 8.07576 22.308 8.09393 22.3752C8.1121 22.4425 8.14402 22.5048 8.18749 22.558C8.23096 22.6111 8.28494 22.6538 8.34572 22.683C8.4065 22.7123 8.47264 22.7275 8.53958 22.7275H11.7516C12.132 22.7275 12.4551 22.439 12.515 22.0475L12.5465 21.8772L13.1513 17.8714L13.1901 17.6516C13.2494 17.2587 13.5731 16.9702 13.9535 16.9702H14.4339C17.5459 16.9702 19.982 15.6514 20.694 11.8352C20.9915 10.2409 20.8375 8.90979 20.0504 7.97359C19.801 7.68398 19.5031 7.44424 19.1713 7.26611Z",fill:"#179BD7"}),Object(xe.h)("path",{d:"M18.3102 6.91227C18.0503 6.83379 17.7858 6.77254 17.5185 6.72888C16.9903 6.64415 16.4565 6.60349 15.9221 6.6073H11.084C10.8998 6.60715 10.7218 6.67576 10.5819 6.80073C10.442 6.9257 10.3496 7.09877 10.3213 7.28867L9.29206 14.0928L9.26245 14.2913C9.29451 14.0747 9.39979 13.8772 9.55924 13.7346C9.71869 13.592 9.92177 13.5136 10.1318 13.5138H11.9427C15.4996 13.5138 18.2845 12.0061 19.0985 7.64447C19.1229 7.51534 19.1433 7.38964 19.1617 7.26669C18.9469 7.14912 18.723 7.05055 18.4925 6.97203C18.432 6.95109 18.3712 6.93117 18.3102 6.91227Z",fill:"#222D65"}),Object(xe.h)("path",{d:"M10.3267 7.2882C10.3547 7.09825 10.4471 6.92509 10.5871 6.80018C10.727 6.67528 10.9053 6.60692 11.0894 6.60752H15.9275C16.5007 6.60752 17.0357 6.64667 17.5239 6.72909C17.8544 6.78329 18.1802 6.86436 18.4985 6.97156C18.7387 7.05467 18.9618 7.15289 19.1678 7.26622C19.41 5.65414 19.1658 4.55653 18.3307 3.56263C17.4101 2.46844 15.7485 2 13.6223 2H7.44964C7.01531 2 6.64482 2.3297 6.5777 2.77822L4.00664 19.7885C3.99467 19.8675 3.99922 19.9482 4.02 20.0252C4.04077 20.1022 4.07727 20.1735 4.12699 20.2344C4.1767 20.2952 4.23845 20.3441 4.30799 20.3776C4.37753 20.4112 4.4532 20.4286 4.5298 20.4287H8.34066L9.29748 14.0923L10.3267 7.2882Z",fill:"#253B80"})))),null),[Qe.VENMO]:Object(xe.h)((()=>Po||(Po=Object(xe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M20.0439 2.17969C20.7029 3.32032 21 4.49518 21 5.97926C21 10.7127 17.1441 16.8618 14.0147 21.1797H6.86672L4 3.21606L10.2588 2.59335L11.7745 15.3756C13.1907 12.9578 14.9383 9.15825 14.9383 6.56776C14.9383 5.14981 14.7065 4.184 14.3443 3.38876L20.0439 2.17969Z",fill:"#3D95CE"})))),null),[Qe.CRYPTO]:Object(xe.h)((()=>{const{primaryColor:e}=wt();return Object(xe.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 7.74316C4.23858 7.74316 2 9.98174 2 12.7432C2 15.5046 4.23858 17.7432 7 17.7432C9.76142 17.7432 12 15.5046 12 12.7432C12 9.98174 9.76142 7.74316 7 7.74316ZM0 12.7432C0 8.87717 3.13401 5.74316 7 5.74316C10.866 5.74316 14 8.87717 14 12.7432C14 16.6092 10.866 19.7432 7 19.7432C3.13401 19.7432 0 16.6092 0 12.7432Z",fill:e}),Object(xe.h)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1577 9.96518C11.5898 10.6788 11.9998 11.762 11.9998 12.7432C11.9998 13.7243 11.5898 14.8076 11.1577 15.5212C11.6896 14.7266 11.9998 13.7711 11.9998 12.7432C11.9998 11.7152 11.6896 10.7597 11.1577 9.96518ZM11.9999 7.84425C12.4759 8.32999 12.8816 8.88479 13.2007 9.49223C14.1189 8.42024 15.4804 7.74316 16.9998 7.74316C19.7613 7.74316 21.9998 9.98174 21.9998 12.7432C21.9998 15.5046 19.7613 17.7432 16.9998 17.7432C15.4804 17.7432 14.1189 17.0661 13.2007 15.9941C12.8816 16.6015 12.4759 17.1563 11.9999 17.6421C13.2696 18.9376 15.0405 19.7432 16.9998 19.7432C20.8658 19.7432 23.9998 16.6092 23.9998 12.7432C23.9998 8.87717 20.8658 5.74316 16.9998 5.74316C15.0405 5.74316 13.2696 6.5487 11.9999 7.84425Z",fill:e}))}),null),[Qe.STOCKS]:Object(xe.h)((()=>{const{primaryColor:e}=wt();return Object(xe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",display:"ACCENT"},Object(xe.h)("path",{d:"M21 4H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z",stroke:e,strokeWidth:"2",strokeLinecap:"round"}),Object(xe.h)("path",{d:"M4.5 16.5L6 14l5 1 2.5-2h3l3-5.5",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}),null),[Qe.DAF]:Object(xe.h)((()=>ko||(ko=Object(xe.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("g",{clipPath:"url(#clip0_6252_22297)"},Object(xe.h)("path",{d:"M16.5765 4.96037C16.6594 5.00932 16.6809 5.11885 16.6232 5.19596L16.5759 5.2593L15.0086 7.35896L14.3138 8.29026C14.1242 8.54394 13.7833 8.62317 13.4831 8.52256C13.0331 8.37178 12.5519 8.29026 12.051 8.29026C11.5273 8.29026 11.025 8.37948 10.5576 8.54425C8.79202 9.1636 7.5255 10.8523 7.5255 12.8374C7.5255 13.6592 7.74264 14.4303 8.12246 15.0959C8.27802 15.3682 8.46016 15.6228 8.66692 15.8559C9.49528 16.7938 10.7048 17.3851 12.051 17.3851C12.3493 17.3851 12.4882 17.7411 12.2551 17.9272C12.1878 17.9808 12.1198 18.0335 12.051 18.0852C10.765 19.0543 9.21333 19.686 7.5255 19.8527C7.23059 19.882 6.93178 19.897 6.62909 19.897C6.44094 19.897 6.25947 19.8288 6.1178 19.705C6.05234 19.6478 5.98768 19.5895 5.92388 19.5304C5.25044 18.9084 4.67162 18.1855 4.21142 17.3845C3.55353 16.2421 3.13611 14.9422 3.02787 13.5557C3.00972 13.3186 3 13.0796 3 12.8374C3 11.1812 3.4414 9.62795 4.21142 8.29026C4.62236 7.57518 5.12793 6.92326 5.70999 6.34951C6.25315 5.81352 6.86243 5.34526 7.5255 4.96037C8.85684 4.18667 10.4021 3.74316 12.051 3.74316C12.1476 3.74316 12.2448 3.74447 12.3407 3.74837C13.8808 3.79657 15.3236 4.23226 16.5765 4.96037Z",fill:"#4DA3B3"}),Object(xe.h)("path",{d:"M19.8329 17.5145C19.8902 17.7092 19.7155 17.893 19.5181 17.8456C19.5181 17.8456 19.5181 17.8456 19.5181 17.8456C19.252 17.7817 19.1303 17.8928 18.9815 18.1224C18.6911 18.5706 18.0776 19.2612 18.0034 19.346C15.5724 22.1292 11.6274 22.1812 8.38852 21.0562C8.37562 21.0516 8.36273 21.0471 8.35048 21.0432C8.06547 20.9438 7.79658 20.8432 7.55155 20.747C7.356 20.6706 7.17601 20.5972 7.01593 20.5295C6.718 20.4036 6.76112 20.2967 7.08212 20.3365C7.24332 20.3567 7.40195 20.3697 7.55155 20.3781C7.84763 20.395 8.11027 20.3938 8.29155 20.3889C8.46291 20.3843 8.63426 20.3771 8.80536 20.3668C9.38849 20.3316 9.97709 20.2206 10.5583 20.0287C11.0948 19.8507 11.5952 19.613 12.0537 19.3246C12.338 19.1473 12.6063 18.9492 12.8578 18.7348C12.9919 18.6205 13.1202 18.5023 13.2446 18.3789C13.5748 18.0515 13.8708 17.6923 14.1268 17.3091C14.253 17.1207 14.3702 16.9266 14.4771 16.7271C14.4989 16.6863 14.4761 16.6361 14.4311 16.6252C14.0905 16.5435 13.965 16.1245 14.2047 15.8691L15.8892 14.0744C15.8895 14.0741 15.8895 14.0741 15.8898 14.0737C15.8988 14.0642 16.3261 13.6097 16.4665 13.4599C16.495 13.4295 16.5266 13.3957 16.5551 13.3652L17.1097 12.7742L17.35 12.5181C17.688 12.1579 18.2894 12.3006 18.4296 12.7742L19.0377 14.8286L19.5259 16.4789C19.5266 16.4813 19.5288 16.4829 19.5312 16.4834C19.5345 16.4841 19.5365 16.4877 19.5356 16.4909C19.5349 16.4935 19.5342 16.496 19.5336 16.4986C19.5332 16.5007 19.5332 16.5028 19.5338 16.5049L19.7715 17.3085L19.7992 17.4001L19.8329 17.5145Z",fill:"#91CCD7"}),Object(xe.h)("path",{d:"M5.42485 14.1279C4.19233 14.3874 2.95172 13.5889 3.00945 12.3307C3.06474 11.1259 3.36198 9.93661 3.89227 8.83616C4.75517 7.04549 6.1866 5.59086 7.96317 4.69928C9.73974 3.80771 11.7615 3.52936 13.7129 3.90767C14.9121 4.14016 16.0433 4.61261 17.0423 5.2883C18.0857 5.99397 17.9844 7.46586 17.0397 8.29894C16.095 9.13202 14.6462 8.96341 13.4564 8.55014C13.2576 8.4811 13.0533 8.42597 12.8448 8.38555C11.8824 8.19897 10.8853 8.33625 10.0091 8.77597C9.13287 9.21569 8.4269 9.9331 8.00132 10.8163C7.90912 11.0076 7.83121 11.2043 7.76777 11.405C7.38804 12.6059 6.65738 13.8683 5.42485 14.1279Z",fill:"#4DA3B3"})),Object(xe.h)("defs",null,Object(xe.h)("clipPath",{id:"clip0_6252_22297"},Object(xe.h)("rect",{width:"18",height:"18",fill:"white",transform:"translate(3 3.74316)"})))))),null),[Qe.GIFT_CARD]:Object(xe.h)(No,null)},Ro=({method:e})=>{const{paymentRequestAvailable:t}=Tn();return function(e,t){return e===Qe.PAYMENT_REQUEST?t.applePay?Mo||(Mo=Object(xe.h)(xo,null)):Eo||(Eo=Object(xe.h)(To,null)):Do[e]}(e,t)},Ho={[Qe.CREDIT_CARD]:"Card",[Qe.BANK]:"Bank",[Qe.PAYPAL]:"PayPal",[Qe.VENMO]:"Venmo",[Qe.GIFT_CARD]:"Gift card",[Qe.CRYPTO]:"Crypto",[Qe.STOCKS]:"Stocks",[Qe.DAF]:"DAF"},Bo=({method:e})=>{const{paymentRequestAvailable:t}=Tn(),n=function(e,t){return e===Qe.PAYMENT_REQUEST?t.applePay?"Apple Pay":"Google Pay":Ho[e]}(e,t);return Object(xe.h)("span",{className:Se()(te({},Kt))},n)},Io=Se()({padding:`${Jt.XL} ${Jt.XL} 0px`,[Wt.TabletLandscapeUp]:{padding:"0px"}}),Fo=Se()({border:"none",padding:0,margin:0,fontSize:"100%",font:"inherit",verticalAlign:"baseline"}),Uo=Se()(ne({fontWeight:700},Kt,{marginBottom:Jt.S})),$o=Se()(ne({},rn(Jt.XL),{padding:"0px",[Wt.TabletLandscapeUp]:{padding:Jt.XXL}})),qo=Se()({display:"grid",gridTemplateColumns:"1fr",[Wt.TabletLandscapeUp]:{gridAutoFlow:"column",gridTemplateColumns:"auto 1fr"}}),Go=Se()({height:"100%",width:"100%",minWidth:"170px",flexGrow:1,backgroundColor:Vt.LightGray,display:"none",[Wt.TabletLandscapeUp]:re({},rn(0))}),Xo=wn([Fo,Se()({display:"block",[Wt.TabletLandscapeUp]:{display:"none"}})]),Wo=Se()({display:"grid",gridTemplateColumns:"1fr 1fr",gridGap:Jt.S}),Vo=re({},on(Jt.XS),{alignItems:"center",justifyContent:"flex-start",width:"100%",background:"transparent"}),zo=(e,t)=>Se()(re({},Vo,{border:`1px solid ${Vt.DarkGray}`,background:"transparent",textAlign:"start",padding:`${Jt.XXS} ${Jt.S}`,borderRadius:cr.Default,":hover":{cursor:"pointer",background:Vt.Gray},"& > svg":{width:"20px",height:"20px"}},e?{background:t,border:`1px solid ${t}`,fontWeight:700,color:"white","& > svg":{filter:"brightness(0) invert(1)",width:"20px",height:"20px"},":hover":{background:t}}:{}));var Zo;const Yo=()=>{const{methods:e,lockMonthlyFrequency:t}=wt(),{paymentRequestAvailable:n}=Tn();return f((()=>e.filter((e=>(!t||!Je.includes(e))&&(e!==Qe.PAYMENT_REQUEST||(n.applePay||n.googlePay))))),[e,t,n])},Ko=()=>{const e=Yo(),{selectedPaymentMethod:t,setSelectedPaymentMethod:n}=Tn();return Object(xe.h)("ul",{className:Go},e.map((e=>{return Object(xe.h)("li",{key:e},Object(xe.h)("button",{type:"button",className:(r=e===t,Se()(re({},Vo,{border:"none",padding:Jt.M,":hover":{cursor:"pointer",background:Vt.Gray}},r?{background:"white",fontWeight:700,":hover":{background:"white"}}:{}))),onClick:()=>{n(e)}},Object(xe.h)(Ro,{method:e}),Object(xe.h)(Bo,{method:e})));var r})))},Qo=()=>{const e=Yo(),{primaryColor:t}=wt(),{selectedPaymentMethod:n,setSelectedPaymentMethod:r}=Tn();return Object(xe.h)("fieldset",{className:Xo},Zo||(Zo=Object(xe.h)("legend",{className:Uo},"Payment method")),Object(xe.h)("ul",{className:Wo},e.map((e=>Object(xe.h)("li",{key:e},Object(xe.h)("button",{type:"button",className:zo(e===n,t),onClick:()=>{r(e)}},Object(xe.h)(Ro,{method:e}),Object(xe.h)(Bo,{method:e})))))))},Jo=Se()({border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}),ea=({checked:e,primaryColor:t})=>Se()(oe({cursor:"pointer",width:"24px",minWidth:"24px",height:"24px",display:"flex",borderRadius:"4px",justifyContent:"center",alignItems:"center",border:`1.5px solid ${e?t:Vt.DarkGray}`},e?{background:t}:{})),ta=Se()({width:"16px",height:"16px","& > path":{stroke:"white",strokeWidth:"2px"}}),na=Se()({cursor:"pointer"}),ra=Se()({display:"flex",alignItems:"center",gap:Jt.XS});var oa;const aa=({className:e})=>Object(xe.h)("svg",{fill:"none",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:e},oa||(oa=Object(xe.h)("path",{d:"M20 6L9 17l-5-5",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})));var ia;const la=["children","checked","className"],ca=e=>{let{children:t,checked:n}=e,r=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,la);const{primaryColor:o}=wt();return Object(xe.h)("label",{className:ra},Object(xe.h)("div",null,Object(xe.h)("input",ae({className:Jo,type:"checkbox",defaultChecked:n,role:"checkbox"},r)),Object(xe.h)("div",{className:ea({checked:Boolean(n),primaryColor:o})},n&&(ia||(ia=Object(xe.h)(aa,{className:ta}))))),Object(xe.h)("span",{className:na},t))};var sa;const ua=()=>{const e=An(),t=e.hasAdmin,{privateNote:n,setPrivateNote:r}=Tn(),[o,a]=u(Boolean(n));return t?Object(xe.h)("div",{className:nn(Jt.L)},Object(xe.h)(ca,{checked:o,onChange:()=>{a((e=>!e))}},"Add note for ",e.name),o&&Object(xe.h)("fieldset",{className:Se()(ie({fieldSetCss:Fo},rn(Jt.XS)))},sa||(sa=Object(xe.h)("legend",{className:Uo},"Private note")),Object(xe.h)(eo,{rows:3,label:"Note",id:"privateNote",value:n,inputClassName:Se()({resize:"none"}),onChange:({currentTarget:e})=>{r(e.value)}}))):null},pa=Se()({width:"100%",textAlign:"center"}),da=Se()(le({},{fontSize:"12px",lineHeight:"16px",letterSpacing:"0.01em"},{color:Vt.TextOpaque})),ha=()=>{const{primaryColor:e}=wt();return Object(xe.h)("div",{className:pa},Object(xe.h)("span",{className:da},"Every.org will accept your donation."," ",Object(xe.h)("a",{href:Fe,target:"_blank",rel:"noreferrer",className:(t=e,Se()({color:t,textDecoration:"none",cursor:"pointer"}))},"Learn More")));var t},fa=Se()(ce({},{fontSize:"16px",lineHeight:"24px",letterSpacing:"-0.01em"},{outline:"none",width:"100%",border:"none",fontFamily:"inherit",cursor:"pointer",borderRadius:cr.Big,height:"52px",fontWeight:700,padding:Jt.XXS,transition:"opacity .3s"})),ba=Se()({color:Vt.White,backgroundColor:Vt.DarkGray,cursor:"default","& > span":{opacity:"0.6"}}),ma=({handleClick:e,disabled:t,children:n})=>{const{primaryColor:r}=wt();return Object(xe.h)("button",{type:"submit",className:wn([fa,t?ba:(o=r,Se()({color:Vt.White,backgroundColor:o,":hover":{opacity:.9}}))]),disabled:t,onClick:e},Object(xe.h)("span",null,n));var o},_a="USD",ya="$",va=()=>{const e=wt(),{frequency:t,donationAmount:n,setSubmitError:c,selectedPaymentMethod:s,stockAmount:u,stockSymbol:p,cryptoAmount:d,cryptoCurrency:h,privateNote:f}=Tn(),{minDonationAmount:m}=wt();return b((b=>{b.preventDefault();const _=e.completeDonationInNewTab?"_blank":"_self",y={methods:[s],nonprofitSlug:e.nonprofitSlug,fundraiserSlug:e.fundraiserSlug,privateNote:f};switch(s){case Qe.CRYPTO:if(!d||!h){c("Please enter currency and amount");break}window.open(function(e){let{cryptoAmount:t,cryptoCurrency:n}=e,c=o(e,Ge);return`${i(c)}?${a(r({crypto_amount:t,crypto_currency:n},l(c)))}#/${We}`}(se({cryptoAmount:d,cryptoCurrency:h},y)),_);break;case Qe.STOCKS:if(!p||!u){c("Please enter the symbol and amount");break}window.open(function(e){let{stockAmount:t,stockSymbol:n}=e,c=o(e,qe);return`${i(c)}?${a(r({stock_amount:t,stock_symbol:n},l(c)))}#/${We}`}(se({stockSymbol:p,stockAmount:u},y)),_);break;case Qe.GIFT_CARD:window.open(function(e){const t=a({nonprofitSlug:e});return`${Ue}?${t}`}(e.nonprofitSlug),_);break;default:if(!n||n{const e=va(),{cryptoAmount:t,cryptoCurrency:n}=Tn();return Object(xe.h)("form",{className:qo,onSubmit:e},ga||(ga=Object(xe.h)(Ko,null)),Object(xe.h)("div",{className:$o},Oa||(Oa=Object(xe.h)(Qo,null)),Object(xe.h)("fieldset",{className:Se()(pe({fieldSetCss:Fo},rn(Jt.XXL)))},Ca||(Ca=Object(xe.h)("div",null,Object(xe.h)("legend",{className:Uo},"Crypto currency"),Object(xe.h)(jo,null))),n&&(ja||(ja=Object(xe.h)("div",null,Object(xe.h)("legend",{className:Uo},"Amount"),Object(xe.h)(lo,null))))),wa||(wa=Object(xe.h)(ua,null)),Object(xe.h)(ma,{disabled:!t||!n},ue({method:Qe.CRYPTO,cryptoCurrency:n})),xa||(xa=Object(xe.h)(ha,null))))},Sa=e=>Se()(de({outline:"none",border:"none",fontFamily:"inherit",cursor:"pointer",background:"none",fontWeight:500,transition:"opacity .3s",color:e,display:"flex",alignItems:"center",alignSelf:"flex-start"},Kt,{opacity:1,padding:0,gap:Jt.XXS,marginBottom:Jt.XXL,":hover":{opacity:.9},[Wt.TabletLandscapeUp]:{padding:Jt.L,marginBottom:0}})),Na=()=>{const{primaryColor:e}=wt();return Object(xe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{stroke:e,strokeWidth:"2",d:"M19 12H5M12 19l-7-7 7-7"}))};var Aa,Ta;const La=({handleClick:e})=>{const{primaryColor:t}=wt();return Object(xe.h)("button",{type:"button",className:Sa(t),onClick:e},Aa||(Aa=Object(xe.h)(Na,null)),Ta||(Ta=Object(xe.h)("span",null,"Back")))};let Pa=function(e){return e[e.START=0]="START",e[e.MANUAL=1]="MANUAL",e[e.AMOUNT=2]="AMOUNT",e}({});var Ma;const Ea=e=>{"."===e.key&&e.preventDefault()},Da=()=>{const e=h(null),{primaryColor:t,addAmounts:n}=wt(),{setDonationAmount:r,donationAmount:o,setSubmitError:a,submitError:i}=Tn();return d((()=>{Boolean("ontouchstart"in window||navigator.maxTouchPoints)||e.current&&e.current.focus()}),[]),Object(xe.h)("fieldset",{className:Se()(he({fieldSetCss:Fo},rn(Jt.S)))},Ma||(Ma=Object(xe.h)("legend",{className:Uo},"Donation amount")),Object(xe.h)(no,{ref:e,id:"donation-input",type:"number",pattern:"[0-9]*",inputMode:"numeric",min:0,step:1,value:o||void 0,prefix:ya,inputClassName:Tr,prefixClassName:Lr,sufix:_a,sufixClassName:Pr(t),containerClassName:i?Ar:void 0,onKeyDown:Ea,onInput:e=>{r(Number(e.currentTarget.value)),a(null)}}),n&&n.length>0&&Object(xe.h)("div",{className:Mr},n.map((e=>Object(xe.h)("button",{key:e,className:Er(t),type:"button",onClick:()=>{r((t=>"number"==typeof t?t+e:e))}},"+",((e,t)=>{if(e<1e3)return e.toString();let n="",r=1;return e>=1e3&&e<1e6?(r=1e3,n="k"):e>=1e6&&e<1e9?(r=1e6,n="m"):e>=1e9&&e<1e12?(r=1e9,n="b"):e>=1e12&&(r=1e12,n="t"),void 0===t?(e/r).toFixed(3).replace(/\.?0+$/,"")+n:(e/r).toFixed(t)+n})(e))))))},Ra=e=>Se()({position:"relative",cursor:"pointer",display:"flex",width:"100%",height:"36px",alignItems:"center",justifyContent:"center",color:e,fontWeight:500,border:`2px solid ${e}`,borderRight:"none"}),Ha=e=>Se()({cursor:"pointer",display:"flex",flexDirection:"column",flex:"1 1 0px","& > input":{appearance:"none",height:0},"& > input:checked + label":{backgroundColor:e,color:"white"},"& > input:checked + label:hover":{backgroundColor:e,color:"white"}}),Ba=e=>Se()({display:"flex",width:"100%","& > div:first-of-type > label":{borderRadius:"6px 0 0 6px","&::after":{borderRadius:"6px 0 0 6px"}},"& > div:last-of-type > label":{borderRadius:"0 6px 6px 0",borderRight:`2px solid ${e}`,"&::after":{borderRadius:"0 6px 6px 0"}}});var Ia,Fa;const Ua="Monthly donation",$a=()=>{const{primaryColor:e,lockMonthlyFrequency:t,monthlyTitle:n=Ua}=wt(),{frequency:r,selectedPaymentMethod:o,setFrequency:a}=Tn();return t?Object(xe.h)("h4",null,n):Je.includes(o)?Object(xe.h)("fieldset",{className:Fo},Ia||(Ia=Object(xe.h)("legend",{className:Uo},"Frequency")),Object(xe.h)("p",null,o===Qe.DAF?"Chariot":"Venmo"," ","only supports one-time donations")):Object(xe.h)("fieldset",{className:Fo},Fa||(Fa=Object(xe.h)("legend",{className:Uo},"Frequency")),Object(xe.h)("div",{className:Ba(e)},Object(xe.h)("div",{className:Ha(e)},Object(xe.h)("input",{type:"radio",name:"frequency",id:"monthly",checked:r===Ke.Monthly,value:Ke.Monthly}),Object(xe.h)("label",{className:Ra(e),id:"frequency-monthly",htmlFor:"monthly",onClick:()=>{a(Ke.Monthly)}},"Give Monthly")),Object(xe.h)("div",{className:Ha(e)},Object(xe.h)("input",{type:"radio",name:"frequency",id:"once",checked:r===Ke.OneTime,value:Ke.OneTime}),Object(xe.h)("label",{id:"frequency-one-time",htmlFor:"one-time",className:Ra(e),onClick:()=>{a(Ke.OneTime)}},"Once"))))};var qa,Ga,Xa,Wa,Va;const za=({changeView:e})=>{const t=va(),{donationAmount:n}=Tn();return Object(xe.h)("form",{className:qo,onSubmit:t},Object(xe.h)(La,{handleClick:()=>{e(Pa.START)}}),Object(xe.h)("div",{className:$o},qa||(qa=Object(xe.h)("h3",null,"Connect your DAF with Chariot")),Ga||(Ga=Object(xe.h)($a,null)),Xa||(Xa=Object(xe.h)(Da,null)),Wa||(Wa=Object(xe.h)(ua,null)),Object(xe.h)(ma,{disabled:!n||Number.isNaN(n)},ue({method:Qe.DAF})),Va||(Va=Object(xe.h)(ha,null))))};var Za,Ya,Ka,Qa,Ja,ei,ti,ni,ri,oi,ai,ii;const li=({changeView:e})=>{const{primaryColor:t}=wt();return Object(xe.h)("div",{className:qo},Object(xe.h)(La,{handleClick:()=>{e(Pa.START)}}),Object(xe.h)("div",{className:$o},Za||(Za=Object(xe.h)("h3",null,"Manual DAF donation")),Ya||(Ya=Object(xe.h)("p",null,"Please ask your provider to make a one-time or recurring grant to:")),Object(xe.h)("div",{className:nn(Jt.S)},Object(xe.h)("p",{className:nn(0)},Ka||(Ka=Object(xe.h)("span",null,"Every.org (EIN: 61-1913297)")),Qa||(Qa=Object(xe.h)("span",null,"58 West Portal Ave #781 San Francisco, CA 94127")),Ja||(Ja=Object(xe.h)("span",null,"Memo: For every.org/themarshallproject from @darth.vader506")),ei||(ei=Object(xe.h)("span",null,"Contact info: Mark Ulrich, CEO")),ti||(ti=Object(xe.h)("span",null,"Email: team@every.org")),ni||(ni=Object(xe.h)("span",null,"Phone number: +1 (415) 650-0503"))),Object(xe.h)("p",null,"You may also email us at"," ",Object(xe.h)("a",{className:zn(t),href:P({address:Ee,subject:"Donation via DAF"})},Ee)," ","with the memo or to let us know if you wish to share your contact information with the nonprofit/campaign. By default, we do not share your contact information")),Object(xe.h)("div",{className:Se()(fe({color:Vt.TextGray},rn(0)))},Object(xe.h)("p",{className:Se()({paddingBottom:Jt.S})},"We will attribute the donation accordingly:"),ri||(ri=Object(xe.h)("p",null,"If we receive BOTH your @username and a nonprofit/campaign: we will add a donation for that nonprofit/campaign to your account.")),oi||(oi=Object(xe.h)("p",null,"If we receive only your @username, we will credit your account's gift card balance in the amount received, which you can use to support as many nonprofits as you'd like.")),ai||(ai=Object(xe.h)("p",null,"If we receive only a nonprofit/campaign, we will send that amount to that nonprofit/campaign as an anonymous donation.")),ii||(ii=Object(xe.h)("p",null,"If we do not receive any information by the time the wire/ACH is received, we will apply it towards running Every.org.")))))},ci=Se()(be({outline:"none",border:"none",fontFamily:"inherit",background:"#ADEFD1",color:"#00203F",alignSelf:"center",borderRadius:cr.Big,padding:`${Jt.M} ${Jt.XL}`,display:"flex",alignItems:"center",fontWeight:500},Kt,{gap:Jt.XS,cursor:"pointer",":hover":{background:"#7ce6b6"}})),si=e=>Se()(be({outline:"none",border:"none",background:"none",fontFamily:"inherit",color:e,alignSelf:"center",display:"flex",alignItems:"center",fontWeight:500},Kt,{gap:Jt.XS,cursor:"pointer",":hover":{opacity:.9}}));var ui,pi,di,hi,fi,bi,mi,_i;const yi=()=>ui||(ui=Object(xe.h)("svg",{width:"101",height:"16",viewBox:"0 0 101 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(xe.h)("path",{d:"M26.5651 0.257543H29.7622V15.2809H26.5651V0.257543ZM20.2894 15.2809H17.0923V0.257543H20.2894V15.2809ZM26.8019 9.12133H20.0525V6.18104H26.8019V9.12133Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M32.2018 15.2809L38.3591 0.257543H41.5168L47.6938 15.2809H44.3389L39.2867 2.01742H40.5497L35.4778 15.2809H32.2018ZM35.2805 12.0616L36.1291 9.4218H43.2337L44.1021 12.0616H35.2805Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M50.1138 15.2809V0.257543H56.0936C57.3303 0.257543 58.396 0.479317 59.2907 0.922864C60.1853 1.3521 60.876 1.9745 61.3628 2.79005C61.8496 3.60561 62.093 4.57855 62.093 5.70888C62.093 6.8249 61.8496 7.79069 61.3628 8.60625C60.876 9.40749 60.1853 10.0227 59.2907 10.452C58.396 10.8812 57.3303 11.0958 56.0936 11.0958H51.89L53.3109 9.57203V15.2809H50.1138ZM58.896 15.2809L55.4423 9.82958H58.8565L62.3496 15.2809H58.896ZM53.3109 9.95835L51.89 8.32724H55.916C56.9027 8.32724 57.6395 8.09831 58.1263 7.64046C58.6131 7.16829 58.8565 6.52444 58.8565 5.70888C58.8565 4.87902 58.6131 4.23516 58.1263 3.77731C57.6395 3.31945 56.9027 3.09052 55.916 3.09052H51.89L53.3109 1.43795V9.95835Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M65.6128 15.2809V0.257543H68.8099V15.2809H65.6128Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M79.7851 15.5385C78.6931 15.5385 77.68 15.3453 76.7459 14.959C75.8249 14.5727 75.0223 14.029 74.3382 13.3279C73.6672 12.6268 73.1409 11.8041 72.7594 10.8598C72.391 9.91543 72.2068 8.88525 72.2068 7.76923C72.2068 6.65321 72.391 5.62303 72.7594 4.67871C73.1409 3.73438 73.6738 2.91167 74.3579 2.21058C75.0421 1.50949 75.8446 0.965787 76.7656 0.579472C77.6866 0.193157 78.6865 0 79.7653 0C80.8573 0 81.8573 0.193157 82.7651 0.579472C83.686 0.965787 84.482 1.50949 85.153 2.21058C85.8372 2.91167 86.37 3.73438 86.7516 4.67871C87.1331 5.60873 87.3239 6.6389 87.3239 7.76923C87.3239 8.88525 87.1331 9.92258 86.7516 10.8812C86.37 11.8255 85.8372 12.6482 85.153 13.3493C84.482 14.0361 83.686 14.5727 82.7651 14.959C81.8573 15.3453 80.8639 15.5385 79.7851 15.5385ZM79.7653 12.5767C80.3837 12.5767 80.9494 12.4622 81.4626 12.2333C81.9888 12.0044 82.4493 11.6753 82.844 11.2461C83.2387 10.8168 83.5413 10.3089 83.7518 9.72227C83.9755 9.13564 84.0873 8.48463 84.0873 7.76923C84.0873 7.05383 83.9755 6.40282 83.7518 5.81619C83.5413 5.22956 83.2387 4.72163 82.844 4.29239C82.4625 3.86315 82.0086 3.53407 81.4823 3.30514C80.956 3.07621 80.3837 2.96175 79.7653 2.96175C79.147 2.96175 78.5747 3.07621 78.0484 3.30514C77.5353 3.53407 77.0814 3.86315 76.6867 4.29239C76.292 4.72163 75.9828 5.22956 75.7591 5.81619C75.5486 6.40282 75.4434 7.05383 75.4434 7.76923C75.4434 8.47032 75.5486 9.12133 75.7591 9.72227C75.9828 10.3089 76.2854 10.8168 76.6669 11.2461C77.0616 11.6753 77.5221 12.0044 78.0484 12.2333C78.5747 12.4622 79.147 12.5767 79.7653 12.5767Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M93.3822 15.2809V3.09052H88.9616V0.257543H101V3.09052H96.5793V15.2809H93.3822Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M11.272 1.05076C11.3408 1.09302 11.3586 1.18757 11.3108 1.25413L11.2714 1.30881L9.3933 3.92529C9.23593 4.14428 8.9529 4.21268 8.70361 4.12582C8.33005 3.99566 7.93049 3.92529 7.51464 3.92529C7.07982 3.92529 6.66276 4.00231 6.27476 4.14455C4.80885 4.6792 3.75732 6.13699 3.75732 7.85057C3.75732 8.56007 3.9376 9.22572 4.25295 9.80028C4.3821 10.0353 4.53332 10.2551 4.70499 10.4564C5.39274 11.2659 6.39692 11.7764 7.51464 11.7764C7.76228 11.7764 7.87763 12.0838 7.68405 12.2443C7.62823 12.2906 7.57176 12.3361 7.51464 12.3808C6.44696 13.2173 5.15865 13.7627 3.75732 13.9066C3.51247 13.9319 3.26438 13.9448 3.01307 13.9448C2.85686 13.9448 2.70619 13.886 2.58857 13.7791C2.53422 13.7297 2.48053 13.6794 2.42757 13.6283C1.86844 13.0914 1.38787 12.4674 1.00579 11.7759C0.459575 10.7898 0.11301 9.6676 0.0231398 8.47068C0.00807176 8.26604 0 8.05971 0 7.85057C0 6.4209 0.366476 5.08005 1.00579 3.92529C1.34697 3.308 1.76673 2.74523 2.24998 2.24993C2.70094 1.78724 3.2068 1.38302 3.75732 1.05076C4.86267 0.382868 6.1456 9.06616e-06 7.51464 9.06616e-06C7.59482 9.06616e-06 7.67555 0.00113271 7.75519 0.00450591C9.03382 0.0461087 10.2317 0.422222 11.272 1.05076Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M13.9754 11.8877C14.023 12.0558 13.8779 12.2145 13.7141 12.1736C13.4931 12.1184 13.3921 12.2143 13.2685 12.4126C13.0274 12.7994 12.5181 13.3956 12.4565 13.4688C10.4382 15.8714 7.16282 15.9162 4.47369 14.9451C4.46298 14.9412 4.45227 14.9373 4.4421 14.9339C4.20547 14.8481 3.98222 14.7612 3.77878 14.6782C3.61643 14.6123 3.46699 14.5489 3.33408 14.4905C3.08673 14.3817 3.12253 14.2895 3.38904 14.3239C3.52288 14.3412 3.65458 14.3525 3.77878 14.3597C4.15457 14.382 4.46549 14.3678 4.56937 14.3616C4.59412 14.3601 4.61885 14.3589 4.64363 14.3582C5.18515 14.3419 5.73401 14.2439 6.27519 14.0581C6.72061 13.9045 7.13605 13.6992 7.51669 13.4503C7.75279 13.2972 7.9755 13.1262 8.18429 12.9412C8.29565 12.8425 8.40219 12.7404 8.50551 12.6339C8.77962 12.3513 9.02535 12.0413 9.23789 11.7105C9.34271 11.5478 9.44004 11.3803 9.52876 11.208C9.5469 11.1728 9.52792 11.1295 9.49058 11.12C9.20779 11.0496 9.10362 10.6878 9.30264 10.4673L10.7012 8.91805L10.7017 8.91751C10.7086 8.90988 11.0638 8.51701 11.1804 8.38764C11.2042 8.36134 11.2303 8.33219 11.2541 8.3059L11.914 7.57461C12.1946 7.26369 12.6939 7.38682 12.8104 7.79567L13.7206 10.9938C13.7212 10.9958 13.7229 10.9972 13.7249 10.9977C13.7277 10.9983 13.7293 11.0014 13.7286 11.0042C13.728 11.0064 13.7275 11.0085 13.727 11.0108C13.7266 11.0126 13.7266 11.0144 13.7271 11.0162L13.9245 11.7099L13.9475 11.7889L13.9754 11.8877Z",fill:"#00203F"}),Object(xe.h)("path",{d:"M2.01325 8.96461C0.989941 9.18868 -0.0400886 8.49938 0.00784723 7.41322C0.0537471 6.37318 0.300533 5.3465 0.740811 4.39654C1.45724 2.85074 2.64569 1.59503 4.1207 0.825379C5.5957 0.0557292 7.27427 -0.184559 8.89443 0.142017C9.8901 0.342713 10.8293 0.750556 11.6587 1.33385C12.5249 1.94302 12.4409 3.21363 11.6566 3.93279C10.8722 4.65194 9.66932 4.50639 8.68146 4.14963C8.51643 4.09003 8.34679 4.04245 8.17368 4.00755C7.37463 3.84649 6.54677 3.965 5.81931 4.34458C5.09184 4.72417 4.50571 5.34348 4.15237 6.10585C4.07582 6.27101 4.01114 6.44087 3.95847 6.61407C3.64319 7.65079 3.03655 8.74054 2.01325 8.96461Z",fill:"#00203F"}))),vi=({changeView:e})=>{const{primaryColor:t}=wt();return Object(xe.h)("div",{className:qo},pi||(pi=Object(xe.h)(Ko,null)),Object(xe.h)("div",{className:$o},di||(di=Object(xe.h)(Qo,null)),hi||(hi=Object(xe.h)("h4",null,"Instant DAF donation")),fi||(fi=Object(xe.h)("p",null,"We use Chariot to verify your account info and automatically initiate a grant from your DAF, or you can get instructions for making the donation manually.")),Object(xe.h)("button",{type:"button",className:ci,onClick:()=>{e(Pa.AMOUNT)}},bi||(bi=Object(xe.h)("span",null,"Donate with")),mi||(mi=Object(xe.h)(yi,null))),Object(xe.h)("button",{type:"button",className:si(t),onClick:()=>{e(Pa.MANUAL)}},"Get instructions for a manual DAF donation"),_i||(_i=Object(xe.h)(ha,null))))},gi=()=>{const[e,t]=u(Pa.START);switch(e){case Pa.START:return Object(xe.h)(vi,{changeView:t});case Pa.MANUAL:return Object(xe.h)(li,{changeView:t});case Pa.AMOUNT:return Object(xe.h)(za,{changeView:t})}};var Oi,Ci,ji,wi,xi,ki;const Si=()=>{const{frequency:e,donationAmount:t,selectedPaymentMethod:n,paymentRequestAvailable:r}=Tn(),o=va();return Object(xe.h)("form",{className:qo,onSubmit:o},Oi||(Oi=Object(xe.h)(Ko,null)),Object(xe.h)("div",{className:$o},Ci||(Ci=Object(xe.h)(Qo,null)),ji||(ji=Object(xe.h)($a,null)),wi||(wi=Object(xe.h)(Da,null)),xi||(xi=Object(xe.h)(ua,null)),Object(xe.h)(ma,{disabled:e===Ke.Unselected||!t||Number.isNaN(t)},ue({method:n,paymentRequestIsApplePay:r.applePay})),ki||(ki=Object(xe.h)(ha,null))))},Ni=Se()({display:"block",width:"80px",height:"80px",alignSelf:"center","& > path":{strokeWidth:"1"}});var Ai,Ti,Li,Pi,Mi;const Ei=()=>{const e=va();return Object(xe.h)("form",{className:qo,onSubmit:e},Ai||(Ai=Object(xe.h)(Ko,null)),Object(xe.h)("div",{className:$o},Ti||(Ti=Object(xe.h)(Qo,null)),Li||(Li=Object(xe.h)(No,{className:Ni})),Pi||(Pi=Object(xe.h)("p",null,"Redeem a gift card to add donation credits to your account.")),Object(xe.h)(ma,null,ue({method:Qe.GIFT_CARD})),Mi||(Mi=Object(xe.h)(ha,null))))};var Di,Ri,Hi,Bi,Ii,Fi,Ui;const $i=()=>{const e=va(),{stockAmount:t,stockSymbol:n,setStockAmount:r,setStockSymbol:o,submitError:a,setSubmitError:i}=(wt(),Tn());return Object(xe.h)("form",{className:qo,onSubmit:e},Di||(Di=Object(xe.h)(Ko,null)),Object(xe.h)("div",{className:$o},Ri||(Ri=Object(xe.h)(Qo,null)),Object(xe.h)("fieldset",{className:Se()(me({fieldSetCss:Fo},rn(Jt.XXL)))},Object(xe.h)("div",null,Hi||(Hi=Object(xe.h)("legend",{className:Uo},"What is the symbol of the shares?")),Bi||(Bi=Object(xe.h)("span",null,"Example: GOOG")),Object(xe.h)(no,{id:"stock-amount-input",inputClassName:Tr,containerClassName:a?Ar:void 0,type:"text",value:n,onInput:e=>{o(e.currentTarget.value),i(null)}})),Object(xe.h)("div",null,Ii||(Ii=Object(xe.h)("legend",{className:Uo},"How many shares are you donating?")),Object(xe.h)(no,{id:"donation-input",inputClassName:Tr,containerClassName:a?Ar:void 0,type:"number",pattern:"[0-9]*",inputMode:"numeric",min:0,step:1,value:t||void 0,onInput:e=>{r(Number(e.currentTarget.value)),i(null)}}))),Fi||(Fi=Object(xe.h)(ua,null)),Object(xe.h)(ma,{disabled:!t||!n},ue({method:Qe.STOCKS})),Ui||(Ui=Object(xe.h)(ha,null))))};var qi,Gi,Xi,Wi,Vi,zi;const Zi=()=>{const{selectedPaymentMethod:e}=Tn();switch(e){case Qe.CRYPTO:return qi||(qi=Object(xe.h)(ka,null));case Qe.STOCKS:return Gi||(Gi=Object(xe.h)($i,null));case Qe.DAF:return Xi||(Xi=Object(xe.h)(gi,null));case Qe.GIFT_CARD:return Wi||(Wi=Object(xe.h)(Ei,null));default:return Vi||(Vi=Object(xe.h)(Si,null))}},Yi=()=>zi||(zi=Object(xe.h)(xn,{className:Io},Object(xe.h)(Zi,null))),Ki=e=>Se()({background:"white",width:"100%",height:"100%",borderRadius:"unset",position:"relative",overflow:"auto",padding:"0",paddingBottom:Jt.XXL,[Wt.TabletLandscapeUp]:{height:e?`${e}px`:"unset",background:"#f3f6f6",minHeight:"378px",maxHeight:`calc(100vh - 2 * ${Jt.XL})`,width:"1000px",overflow:"unset",overflowY:"scroll","-ms-overflow-style":"none",scrollbarWidth:"none","::-webkit-scrollbar":{display:"none"},borderRadius:cr.Medium,padding:Jt.XL}}),Qi=F((({children:e,height:t},n)=>Object(xe.h)("div",{ref:n,className:Ki(t)},e))),Ji=Se()(_e({},Kt,{position:"fixed",height:"auto",width:"100%",zIndex:999,top:0,bottom:0,left:0,right:0,display:"flex",background:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",color:Vt.Text,fontFamily:Ne.BasisGrotesque,padding:0,[Wt.TabletLandscapeUp]:{padding:Jt.XL},boxSizing:"border-box","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","& *":{boxSizing:"inherit"},"& *:before":{boxSizing:"inherit"},"& *:after":{boxSizing:"inherit"},"h1,h2,h3,h4,h5,h6":{fontWeight:700},h1:_e({},zt),h2:_e({},Zt),"h3,h4,h5,h6":_e({},Yt)})),el=({children:e,onClick:t})=>Object(xe.h)("div",{className:Ji,onClick:t},e),tl="data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath class='logoMask' stroke-dasharray='170px' d='M32.547 43C39.081 43 48 38.895 48 29.5C48 20.104 38.132 12.5 29.5 12.5C20.868 12.5 9 19.506 9 36C9 52.495 23.805 59.345 32.547 59.345C41.288 59.345 62.5 54.104 62.5 29.5' stroke='white' stroke-width='10'/%3E%3Canimate attributeType='XML' attributeName='stroke-dashoffset' from='170px' to='-170px' dur='1.25s' repeatCount='indefinite'/%3E%3C/svg%3E%0A",nl=Se()({display:"inline-block",verticalAlign:"middle",maskImage:`url("${tl}")`,"-webkit-mask-image":`url("${tl}")`,"-webkit-mask-size":"cover",maskSize:"cover"}),rl=({size:e=72,color:t=Vt.LightGray})=>{return Object(xe.h)("svg",{width:e,height:e,viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:nl},Object(xe.h)("path",{className:(n=t,Se()({fill:n})),d:"M51.147 28.97C51.147 17.614 41.667 9 29.493 9C15.875 9 5 20.5 5 34.744C5 50.094 17.223 62.365 33.68 62.365C50.137 62.365 64.862 49.325 66.017 32.242H58.51C57.114 45.042 46.287 54.859 33.68 54.859C21.553 54.859 12.555 45.956 12.555 34.744C12.555 24.639 20.062 16.507 29.493 16.507C37.385 16.507 43.593 21.897 43.593 28.97C43.593 34.84 39.358 39.749 33.728 39.749V47.256C43.688 47.256 51.148 38.931 51.148 28.97"}));var n};var ol,al,il;var ll,cl=()=>{const{fundraiserSlug:e}=wt(),{hideWidget:t}=Tn(),n=kn(),r=Nn(),o=e=>{e.target===e.currentTarget&&t()};return r===At||e&&n===xt?(t(),null):r===Tt||e&&n===kt?Object(xe.h)(el,{onClick:o},ol||(ol=Object(xe.h)(rl,{size:24}))):Object(xe.h)(el,{onClick:o},al||(al=Object(xe.h)(or,{className:tr})),il||(il=Object(xe.h)(Qi,{height:null},Object(xe.h)(Qn,null,Object(xe.h)("div",{id:"every-header"},Object(xe.h)(lr,null)),Object(xe.h)("div",{id:"every-nonprofitInfo"},Object(xe.h)(_r,null)),Object(xe.h)("div",{id:"every-paymentProcess"},Object(xe.h)(Yi,null)),Object(xe.h)("div",{id:"every-faq"},Object(xe.h)(Hn,null)),Object(xe.h)("div",{id:"every-fundraiserLink"},Object(xe.h)(Yn,null)),Object(xe.h)("div",{id:"every-footer"},Object(xe.h)(Vn,null))))))};let sl;const ul=()=>{const e=document.querySelector("body"),t=(()=>{const e=document.querySelector("body");return sl||(sl=null!=e&&e.style.overflow?e.style.overflow:"unset"),sl})();e&&(e.style.overflow=t)},pl=({options:e={},hide:t})=>(ul(),e.show?((()=>{const e=document.querySelector("body");e&&(e.style.overflow="hidden")})(),Object(xe.h)(Xt,{options:e,hide:t},ll||(ll=Object(xe.h)(cl,null)))):null);var dl="\n\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n font-family: 'Basis Grotesque Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Roboto, sans-serif;\n vertical-align: baseline;\n }\n /* HTML5 display-role reset for older browsers */\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n body {\n line-height: 1;\n }\n ol, ul {\n list-style: none;\n }\n blockquote, q {\n quotes: none;\n }\n blockquote:before, blockquote:after,\n q:before, q:after {\n content: '';\n content: none;\n }\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n button {\n color: unset;\n background: unset;\n }\n";const hl=["element"],fl={childList:!0,subtree:!0,attributeFilter:["href"]};let bl,ml;class _l{constructor(e,t){ve(this,"options",void 0),ve(this,"mountPoint",void 0),this.options=e,this.mountPoint=t}hide(){this.options.show=!1,this.render()}show(){this.options.show=!0,this.render()}setOptions(e){this.options=e,this.render()}render(){Object(xe.render)(Object(xe.h)(pl,{options:this.options,hide:()=>{this.hide()}}),this.mountPoint)}}const yl=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,vl=["element","selector"],gl=["element","selector"];(function(){var e;const t=null==(e=document.currentScript)||null==(e=e.getAttribute("src"))?void 0:e.split("?")[1],n=null==t?void 0:t.split("&").map((e=>{const[t,n]=e.split("=");return[t,n]})),r=n&&Object.fromEntries(n);return!r||"1"!==r.explicit})()?(ot(),Ce(),new yl(((e,t)=>{t.disconnect(),Boolean(e.some((e=>"A"===e.target.nodeName)))&&Ce(),t.observe(document,fl)})).observe(document,fl)):function(){function e(...e){console.info("Every.org Donate Button:",...e)}function t(){we(i,{show:!0}),u()}function n(){we(i,{show:!1}),u()}function r(e){var n;const r=we({},e);return we(i,{openAt:null!=(n=r.openAt)?n:o}),e=>{e.preventDefault(),l=r,t()}}const o="donate",a={},i={show:!1,openAt:o};let l={};const c=(e,t)=>e?[e]:t&&document.querySelectorAll(t);let s;ot();const u=()=>{var e,t,r,o,c;s||(()=>{const e=document.createElement("div");e.id="shadow-wrapper",e.style.position="absolute",e.style.zIndex="20000000",document.body.append(e),s=document.createElement("div"),e.attachShadow({mode:"open"}).append(s);const t=document.querySelector("#every-styles");if(t){var n,r;const e=Object.values(null!=(n=null==(r=t.sheet)?void 0:r.cssRules)?n:{}).map((e=>e.cssText)).join("\n"),o=document.createElement("style");o.id="every-shadow-styles",o.innerHTML=dl+e,s.append(o)}})(),(null==(e=window.location)?void 0:e.hash)===`#${null!=(t=null!=(r=null!=(o=null==(c=l)?void 0:c.openAt)?o:null==a?void 0:a.openAt)?r:null==i?void 0:i.openAt)?t:""}`&&we(i,{show:!0});const u=we({},i,a,l);Object(xe.render)(Object(xe.h)(pl,{options:u,hide:n}),s)};window.everyDotOrgDonateButton={createButton:t=>{let{element:n,selector:r}=t,o=je(t,vl);n||r||o.nonprofitSlug||e("createButton():","must provide element or selector or nonprofitSlug");const a=c(n,r);if(a)for(const t of a){var i,s;const n=null!=(i=t.querySelector("a"))?i:void 0;if(!o.nonprofitSlug&&!n)return void e("no link in container",t);const r=null!=(s=null==n?void 0:n.getAttribute("href"))?s:void 0;if(!o.nonprofitSlug&&!r)return void e("link lacks href",n);const a=we({},l,o);Object(xe.render)(Object(xe.h)(Ye,a),t,n)}},showWidget:t,setOptions:function(e){we(a,e),u()},createWidget:t=>{let{element:n,selector:o}=t,i=je(t,gl);n||o||e("createWidget():","must provide element or selector");const l=c(n,o);if(l)if(i.nonprofitSlug){for(const e of l)e.addEventListener("click",r(i));we(a,i),u()}else e("createWidget():","must provide nonprofitSlug")}}}()},"5zHJ":function(e){"use strict";var t={},n="x",r=[],o=function(e){return r.push(e)},a=function e(a){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",l=arguments[2];return Object.keys(a).map((function(c){var s=a[c];if(null===s)return"";if("object"==typeof s){var u=/^@/.test(c)?c:null;return e(s,u?i:i+c,u||l)}var p=c+s+i+l;if(t[p])return t[p];var d=n+r.length.toString(36);return o(function(e,t){return t?t+"{"+e+"}":e}(function(e,t,n){return"."+e+"{"+t.replace(/[A-Z]|^ms/g,"-$&").toLowerCase()+":"+n+"}"}(d+i.replace(/&/g,""),c,s),l)),t[p]=d,d})).join(" ")};if(e.exports=function(){for(var e=arguments.length,t=Array(e),n=0;n2&&(l.children=arguments.length>3?M.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===l[a]&&(l[a]=e.defaultProps[a]);return i(e,l,r,o,null)}function i(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++D:o};return null==o&&null!=E.vnode&&E.vnode(a),a}function l(){return{current:null}}function c(e){return e.children}function s(e,t){this.props=e,this.context=t}function u(e,t){if(null==t)return e.__?u(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&H.sort(F));h.__r=0}function f(e,t,n,r,o,a,l,s,p,d,h){var f,m,v,g,O,C,w,x,N,A=0,T=r&&r.__k||q,L=T.length,P=L,M=t.length;for(n.__k=[],f=0;f0?i(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)?(g.__=n,g.__b=n.__b+1,-1===(x=y(g,T,w=f+A,P))?v=$:(v=T[x]||$,T[x]=void 0,P--),j(e,g,v,o,a,l,s,p,d,h),O=g.__e,(m=g.ref)&&v.ref!=m&&(v.ref&&k(v.ref,null,g),h.push(m,g.__c||O,g)),null!=O&&(null==C&&(C=O),(N=v===$||null===v.__v)?-1==x&&A--:x!==w&&(x===w+1?A++:x>w?P>M-w?A+=x-w:A--:A=x(null!=c?1:0))for(;i>=0||l=0){if((c=t[i])&&o==c.key&&a===c.type)return i;i--}if(l2&&(s.children=arguments.length>3?M.call(arguments,2):n),i(e.type,s,o||e.key,a||e.ref,null)}function P(e,t){var n={__c:t="__cC"+U++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,d(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}n.r(t),n.d(t,"Component",(function(){return s})),n.d(t,"Fragment",(function(){return c})),n.d(t,"cloneElement",(function(){return L})),n.d(t,"createContext",(function(){return P})),n.d(t,"createElement",(function(){return a})),n.d(t,"createRef",(function(){return l})),n.d(t,"h",(function(){return a})),n.d(t,"hydrate",(function(){return T})),n.d(t,"isValidElement",(function(){return R})),n.d(t,"options",(function(){return E})),n.d(t,"render",(function(){return A})),n.d(t,"toChildArray",(function(){return m}));var M,E,D,R,H,B,I,F,U,$={},q=[],G=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,X=Array.isArray;M=q.slice,E={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&null!=a.getDerivedStateFromError&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(t){e=t}throw e}},D=0,R=function(e){return null!=e&&void 0===e.constructor},s.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=r({},this.state),"function"==typeof e&&(e=e(r({},n),this.props)),e&&r(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),d(this))},s.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),d(this))},s.prototype.render=c,H=[],I="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,F=function(e,t){return e.__v.__b-t.__v.__b},h.__r=0,U=0},aBQa:function(e,t,n){"use strict";n.r(t);var r=n("NMMh");const{h:o,render:a,hydrate:i}=r,l=e=>e&&e.default?e.default:e;if("function"==typeof l(n("/hs+"))){let e=document.getElementById("preact_root")||document.body.firstElementChild,t=()=>{let t=l(n("/hs+")),r={};const i=document.querySelector('[type="__PREACT_CLI_DATA__"]');i&&(r=JSON.parse(decodeURI(i.innerHTML)).preRenderData||r);r.url&&(c=r.url);var c;a(o(t,{CLI_DATA:{preRenderData:r}}),document.body,e)};0,t()}},kPAj:function(e){var t;e.exports=t={},t.simpleFilter=function(e,n){return n.filter((function(n){return t.test(e,n)}))},t.test=function(e,n){return null!==t.match(e,n)},t.match=function(e,t,n){var r,o=0,a=[],i=t.length,l=0,c=0,s=(n=n||{}).pre||"",u=n.post||"",p=n.caseSensitive&&t||t.toLowerCase();e=n.caseSensitive&&e||e.toLowerCase();for(var d=0;d\n) {\n\treturn Object.entries(params)\n\t\t.filter(([, value]) => Boolean(value))\n\t\t.map((entry) => entry.map((part) => encodeURIComponent(part!)).join('='))\n\t\t.join('&');\n}\n\nfunction getBaseUrl({\n\tfundraiserSlug,\n\tnonprofitSlug\n}: Pick) {\n\tlet baseUrl = BASE_URL + nonprofitSlug;\n\n\tif (fundraiserSlug) {\n\t\tbaseUrl += '/f/' + fundraiserSlug;\n\t}\n\n\treturn baseUrl;\n}\n\nfunction getBaseParams({\n\tmethods,\n\tnonprofitSlug,\n\tnoExit,\n\tprivateNote\n}: Pick<\n\tBaseUrlParams,\n\t'nonprofitSlug' | 'methods' | 'noExit' | 'privateNote'\n>) {\n\treturn {\n\t\tmethod: methods?.join(','),\n\t\tutm_campaign: 'donate-button',\n\t\tutm_source: nonprofitSlug,\n\t\tutm_medium: UTM_MEDIUM,\n\t\tno_exit: noExit ?? 1,\n\t\tprivate_note: privateNote\n\t};\n}\n\nexport function constructBasicDonateUrl(\n\t// eslint-disable-next-line @typescript-eslint/ban-types\n\tprops: Omit\n) {\n\tconst baseUrl = getBaseUrl(props);\n\tconst params = getBaseParams(props);\n\n\tconst parameters = serializeParams(params);\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateUrl({\n\tfrequency,\n\tamount,\n\t...rest\n}: DonateUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\tfrequency,\n\t\tamount,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateStocksUrl({\n\tstockAmount,\n\tstockSymbol,\n\t...rest\n}: DonateStocksUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\tstock_amount: stockAmount,\n\t\tstock_symbol: stockSymbol,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateCryptoUrl({\n\tcryptoAmount,\n\tcryptoCurrency,\n\t...rest\n}: DonateCryptoUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\tcrypto_amount: cryptoAmount,\n\t\tcrypto_currency: cryptoCurrency,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructGiftCardUrl(nonprofitSlug: string) {\n\tconst parameters = serializeParams({\n\t\tnonprofitSlug\n\t});\n\n\treturn `${GIFT_CARD_URL}?${parameters}`;\n}\n","import {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tAvailablePaymentMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nconst MAX_AMOUNT_SUGGESTIONS = 5;\n\nenum DonateUrlParameters {\n\tMETHOD = 'method',\n\tFREQUENCY = 'frequency',\n\tMONTHLY_TITLE = 'monthlyTitle',\n\tSUGGESTED_AMOUNTS = 'suggestedAmounts',\n\tAMOUNT = 'amount'\n}\n\nfunction methodsFromString(string?: string | null) {\n\tif (!string) return;\n\treturn string\n\t\t.split(',')\n\t\t.filter((method): method is PaymentMethod =>\n\t\t\tAvailablePaymentMethods.includes(method as PaymentMethod)\n\t\t);\n}\n\nfunction frequencyFromString(string?: string | null) {\n\tif (!string) return;\n\treturn Object.values(DonationFrequency).find(\n\t\t(frequency) => frequency.toUpperCase() === string.toUpperCase()\n\t);\n}\n\nfunction addAmountsFromString(string?: string | null) {\n\tif (!string) return;\n\treturn (\n\t\tstring\n\t\t\t.split(',')\n\t\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t\t.map(Number.parseFloat)\n\t\t\t.filter(Boolean)\n\t\t\t.slice(0, MAX_AMOUNT_SUGGESTIONS)\n\t);\n}\n\nfunction intFromString(string?: string | null) {\n\tif (!string) return;\n\tconst number = Number.parseInt(string, 10);\n\treturn Number.isNaN(number) ? undefined : number;\n}\n\nexport function parseDonateUrl(\n\turlString: string\n): (Partial & {nonprofitSlug: string}) | undefined {\n\tconst url = new URL(urlString);\n\n\tconst fundraiserSlug = url.pathname.split('/f/')[1];\n\tconst nonprofitSlug = url.pathname.split('/')[1];\n\n\tconst searchParameters = new URLSearchParams(url.search);\n\tconst methods = methodsFromString(\n\t\tsearchParameters.get(DonateUrlParameters.METHOD)\n\t);\n\tconst defaultFrequency = frequencyFromString(\n\t\tsearchParameters.get(DonateUrlParameters.FREQUENCY)\n\t);\n\tconst defaultDonationAmount = intFromString(\n\t\tsearchParameters.get(DonateUrlParameters.AMOUNT)\n\t);\n\tconst monthlyTitle =\n\t\tsearchParameters.get(DonateUrlParameters.MONTHLY_TITLE) ?? undefined;\n\n\tconst addAmounts = addAmountsFromString(\n\t\tsearchParameters.get(DonateUrlParameters.SUGGESTED_AMOUNTS)\n\t);\n\tconst lockMonthlyFrequency = defaultFrequency === DonationFrequency.Monthly;\n\n\tif (!nonprofitSlug) {\n\t\treturn;\n\t}\n\n\treturn {\n\t\tfundraiserSlug,\n\t\tnonprofitSlug,\n\t\tdefaultFrequency,\n\t\tmethods,\n\t\tlockMonthlyFrequency,\n\t\tmonthlyTitle,\n\t\taddAmounts,\n\t\tdefaultDonationAmount\n\t};\n}\n","import { options } from 'preact';\n\n/** @type {number} */\nlet currentIndex;\n\n/** @type {import('./internal').Component} */\nlet currentComponent;\n\n/** @type {import('./internal').Component} */\nlet previousComponent;\n\n/** @type {number} */\nlet currentHook = 0;\n\n/** @type {Array} */\nlet afterPaintEffects = [];\n\nlet EMPTY = [];\n\nlet oldBeforeDiff = options._diff;\nlet oldBeforeRender = options._render;\nlet oldAfterDiff = options.diffed;\nlet oldCommit = options._commit;\nlet oldBeforeUnmount = options.unmount;\n\nconst RAF_TIMEOUT = 100;\nlet prevRaf;\n\noptions._diff = vnode => {\n\tcurrentComponent = null;\n\tif (oldBeforeDiff) oldBeforeDiff(vnode);\n};\n\noptions._render = vnode => {\n\tif (oldBeforeRender) oldBeforeRender(vnode);\n\n\tcurrentComponent = vnode._component;\n\tcurrentIndex = 0;\n\n\tconst hooks = currentComponent.__hooks;\n\tif (hooks) {\n\t\tif (previousComponent === currentComponent) {\n\t\t\thooks._pendingEffects = [];\n\t\t\tcurrentComponent._renderCallbacks = [];\n\t\t\thooks._list.forEach(hookItem => {\n\t\t\t\tif (hookItem._nextValue) {\n\t\t\t\t\thookItem._value = hookItem._nextValue;\n\t\t\t\t}\n\t\t\t\thookItem._pendingValue = EMPTY;\n\t\t\t\thookItem._nextValue = hookItem._pendingArgs = undefined;\n\t\t\t});\n\t\t} else {\n\t\t\thooks._pendingEffects.forEach(invokeCleanup);\n\t\t\thooks._pendingEffects.forEach(invokeEffect);\n\t\t\thooks._pendingEffects = [];\n\t\t\tcurrentIndex = 0;\n\t\t}\n\t}\n\tpreviousComponent = currentComponent;\n};\n\noptions.diffed = vnode => {\n\tif (oldAfterDiff) oldAfterDiff(vnode);\n\n\tconst c = vnode._component;\n\tif (c && c.__hooks) {\n\t\tif (c.__hooks._pendingEffects.length) afterPaint(afterPaintEffects.push(c));\n\t\tc.__hooks._list.forEach(hookItem => {\n\t\t\tif (hookItem._pendingArgs) {\n\t\t\t\thookItem._args = hookItem._pendingArgs;\n\t\t\t}\n\t\t\tif (hookItem._pendingValue !== EMPTY) {\n\t\t\t\thookItem._value = hookItem._pendingValue;\n\t\t\t}\n\t\t\thookItem._pendingArgs = undefined;\n\t\t\thookItem._pendingValue = EMPTY;\n\t\t});\n\t}\n\tpreviousComponent = currentComponent = null;\n};\n\noptions._commit = (vnode, commitQueue) => {\n\tcommitQueue.some(component => {\n\t\ttry {\n\t\t\tcomponent._renderCallbacks.forEach(invokeCleanup);\n\t\t\tcomponent._renderCallbacks = component._renderCallbacks.filter(cb =>\n\t\t\t\tcb._value ? invokeEffect(cb) : true\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tcommitQueue.some(c => {\n\t\t\t\tif (c._renderCallbacks) c._renderCallbacks = [];\n\t\t\t});\n\t\t\tcommitQueue = [];\n\t\t\toptions._catchError(e, component._vnode);\n\t\t}\n\t});\n\n\tif (oldCommit) oldCommit(vnode, commitQueue);\n};\n\noptions.unmount = vnode => {\n\tif (oldBeforeUnmount) oldBeforeUnmount(vnode);\n\n\tconst c = vnode._component;\n\tif (c && c.__hooks) {\n\t\tlet hasErrored;\n\t\tc.__hooks._list.forEach(s => {\n\t\t\ttry {\n\t\t\t\tinvokeCleanup(s);\n\t\t\t} catch (e) {\n\t\t\t\thasErrored = e;\n\t\t\t}\n\t\t});\n\t\tc.__hooks = undefined;\n\t\tif (hasErrored) options._catchError(hasErrored, c._vnode);\n\t}\n};\n\n/**\n * Get a hook's state from the currentComponent\n * @param {number} index The index of the hook to get\n * @param {number} type The index of the hook to get\n * @returns {any}\n */\nfunction getHookState(index, type) {\n\tif (options._hook) {\n\t\toptions._hook(currentComponent, index, currentHook || type);\n\t}\n\tcurrentHook = 0;\n\n\t// Largely inspired by:\n\t// * https://github.com/michael-klein/funcy.js/blob/f6be73468e6ec46b0ff5aa3cc4c9baf72a29025a/src/hooks/core_hooks.mjs\n\t// * https://github.com/michael-klein/funcy.js/blob/650beaa58c43c33a74820a3c98b3c7079cf2e333/src/renderer.mjs\n\t// Other implementations to look at:\n\t// * https://codesandbox.io/s/mnox05qp8\n\tconst hooks =\n\t\tcurrentComponent.__hooks ||\n\t\t(currentComponent.__hooks = {\n\t\t\t_list: [],\n\t\t\t_pendingEffects: []\n\t\t});\n\n\tif (index >= hooks._list.length) {\n\t\thooks._list.push({ _pendingValue: EMPTY });\n\t}\n\treturn hooks._list[index];\n}\n\n/**\n * @param {import('./index').StateUpdater} [initialState]\n */\nexport function useState(initialState) {\n\tcurrentHook = 1;\n\treturn useReducer(invokeOrReturn, initialState);\n}\n\n/**\n * @param {import('./index').Reducer} reducer\n * @param {import('./index').StateUpdater} initialState\n * @param {(initialState: any) => void} [init]\n * @returns {[ any, (state: any) => void ]}\n */\nexport function useReducer(reducer, initialState, init) {\n\t/** @type {import('./internal').ReducerHookState} */\n\tconst hookState = getHookState(currentIndex++, 2);\n\thookState._reducer = reducer;\n\tif (!hookState._component) {\n\t\thookState._value = [\n\t\t\t!init ? invokeOrReturn(undefined, initialState) : init(initialState),\n\n\t\t\taction => {\n\t\t\t\tconst currentValue = hookState._nextValue\n\t\t\t\t\t? hookState._nextValue[0]\n\t\t\t\t\t: hookState._value[0];\n\t\t\t\tconst nextValue = hookState._reducer(currentValue, action);\n\n\t\t\t\tif (currentValue !== nextValue) {\n\t\t\t\t\thookState._nextValue = [nextValue, hookState._value[1]];\n\t\t\t\t\thookState._component.setState({});\n\t\t\t\t}\n\t\t\t}\n\t\t];\n\n\t\thookState._component = currentComponent;\n\n\t\tif (!currentComponent._hasScuFromHooks) {\n\t\t\tcurrentComponent._hasScuFromHooks = true;\n\t\t\tlet prevScu = currentComponent.shouldComponentUpdate;\n\t\t\tconst prevCWU = currentComponent.componentWillUpdate;\n\n\t\t\t// If we're dealing with a forced update `shouldComponentUpdate` will\n\t\t\t// not be called. But we use that to update the hook values, so we\n\t\t\t// need to call it.\n\t\t\tcurrentComponent.componentWillUpdate = function (p, s, c) {\n\t\t\t\tif (this._force) {\n\t\t\t\t\tlet tmp = prevScu;\n\t\t\t\t\t// Clear to avoid other sCU hooks from being called\n\t\t\t\t\tprevScu = undefined;\n\t\t\t\t\tupdateHookState(p, s, c);\n\t\t\t\t\tprevScu = tmp;\n\t\t\t\t}\n\n\t\t\t\tif (prevCWU) prevCWU.call(this, p, s, c);\n\t\t\t};\n\n\t\t\t// This SCU has the purpose of bailing out after repeated updates\n\t\t\t// to stateful hooks.\n\t\t\t// we store the next value in _nextValue[0] and keep doing that for all\n\t\t\t// state setters, if we have next states and\n\t\t\t// all next states within a component end up being equal to their original state\n\t\t\t// we are safe to bail out for this specific component.\n\t\t\t/**\n\t\t\t *\n\t\t\t * @type {import('./internal').Component[\"shouldComponentUpdate\"]}\n\t\t\t */\n\t\t\t// @ts-ignore - We don't use TS to downtranspile\n\t\t\t// eslint-disable-next-line no-inner-declarations\n\t\t\tfunction updateHookState(p, s, c) {\n\t\t\t\tif (!hookState._component.__hooks) return true;\n\n\t\t\t\tconst stateHooks = hookState._component.__hooks._list.filter(\n\t\t\t\t\tx => x._component\n\t\t\t\t);\n\t\t\t\tconst allHooksEmpty = stateHooks.every(x => !x._nextValue);\n\t\t\t\t// When we have no updated hooks in the component we invoke the previous SCU or\n\t\t\t\t// traverse the VDOM tree further.\n\t\t\t\tif (allHooksEmpty) {\n\t\t\t\t\treturn prevScu ? prevScu.call(this, p, s, c) : true;\n\t\t\t\t}\n\n\t\t\t\t// We check whether we have components with a nextValue set that\n\t\t\t\t// have values that aren't equal to one another this pushes\n\t\t\t\t// us to update further down the tree\n\t\t\t\tlet shouldUpdate = false;\n\t\t\t\tstateHooks.forEach(hookItem => {\n\t\t\t\t\tif (hookItem._nextValue) {\n\t\t\t\t\t\tconst currentValue = hookItem._value[0];\n\t\t\t\t\t\thookItem._value = hookItem._nextValue;\n\t\t\t\t\t\thookItem._nextValue = undefined;\n\t\t\t\t\t\tif (currentValue !== hookItem._value[0]) shouldUpdate = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn shouldUpdate || hookState._component.props !== p\n\t\t\t\t\t? prevScu\n\t\t\t\t\t\t? prevScu.call(this, p, s, c)\n\t\t\t\t\t\t: true\n\t\t\t\t\t: false;\n\t\t\t}\n\n\t\t\tcurrentComponent.shouldComponentUpdate = updateHookState;\n\t\t}\n\t}\n\n\treturn hookState._nextValue || hookState._value;\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {any[]} args\n */\nexport function useEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 3);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tcurrentComponent.__hooks._pendingEffects.push(state);\n\t}\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {any[]} args\n */\nexport function useLayoutEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 4);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tcurrentComponent._renderCallbacks.push(state);\n\t}\n}\n\nexport function useRef(initialValue) {\n\tcurrentHook = 5;\n\treturn useMemo(() => ({ current: initialValue }), []);\n}\n\n/**\n * @param {object} ref\n * @param {() => object} createHandle\n * @param {any[]} args\n */\nexport function useImperativeHandle(ref, createHandle, args) {\n\tcurrentHook = 6;\n\tuseLayoutEffect(\n\t\t() => {\n\t\t\tif (typeof ref == 'function') {\n\t\t\t\tref(createHandle());\n\t\t\t\treturn () => ref(null);\n\t\t\t} else if (ref) {\n\t\t\t\tref.current = createHandle();\n\t\t\t\treturn () => (ref.current = null);\n\t\t\t}\n\t\t},\n\t\targs == null ? args : args.concat(ref)\n\t);\n}\n\n/**\n * @param {() => any} factory\n * @param {any[]} args\n */\nexport function useMemo(factory, args) {\n\t/** @type {import('./internal').MemoHookState} */\n\tconst state = getHookState(currentIndex++, 7);\n\tif (argsChanged(state._args, args)) {\n\t\tstate._pendingValue = factory();\n\t\tstate._pendingArgs = args;\n\t\tstate._factory = factory;\n\t\treturn state._pendingValue;\n\t}\n\n\treturn state._value;\n}\n\n/**\n * @param {() => void} callback\n * @param {any[]} args\n */\nexport function useCallback(callback, args) {\n\tcurrentHook = 8;\n\treturn useMemo(() => callback, args);\n}\n\n/**\n * @param {import('./internal').PreactContext} context\n */\nexport function useContext(context) {\n\tconst provider = currentComponent.context[context._id];\n\t// We could skip this call here, but than we'd not call\n\t// `options._hook`. We need to do that in order to make\n\t// the devtools aware of this hook.\n\t/** @type {import('./internal').ContextHookState} */\n\tconst state = getHookState(currentIndex++, 9);\n\t// The devtools needs access to the context object to\n\t// be able to pull of the default value when no provider\n\t// is present in the tree.\n\tstate._context = context;\n\tif (!provider) return context._defaultValue;\n\t// This is probably not safe to convert to \"!\"\n\tif (state._value == null) {\n\t\tstate._value = true;\n\t\tprovider.sub(currentComponent);\n\t}\n\treturn provider.props.value;\n}\n\n/**\n * Display a custom label for a custom hook for the devtools panel\n * @type {(value: T, cb?: (value: T) => string | number) => void}\n */\nexport function useDebugValue(value, formatter) {\n\tif (options.useDebugValue) {\n\t\toptions.useDebugValue(formatter ? formatter(value) : value);\n\t}\n}\n\n/**\n * @param {(error: any, errorInfo: import('preact').ErrorInfo) => void} cb\n */\nexport function useErrorBoundary(cb) {\n\t/** @type {import('./internal').ErrorBoundaryHookState} */\n\tconst state = getHookState(currentIndex++, 10);\n\tconst errState = useState();\n\tstate._value = cb;\n\tif (!currentComponent.componentDidCatch) {\n\t\tcurrentComponent.componentDidCatch = (err, errorInfo) => {\n\t\t\tif (state._value) state._value(err, errorInfo);\n\t\t\terrState[1](err);\n\t\t};\n\t}\n\treturn [\n\t\terrState[0],\n\t\t() => {\n\t\t\terrState[1](undefined);\n\t\t}\n\t];\n}\n\nexport function useId() {\n\tconst state = getHookState(currentIndex++, 11);\n\tif (!state._value) {\n\t\t// Grab either the root node or the nearest async boundary node.\n\t\t/** @type {import('./internal.d').VNode} */\n\t\tlet root = currentComponent._vnode;\n\t\twhile (root !== null && !root._mask && root._parent !== null) {\n\t\t\troot = root._parent;\n\t\t}\n\n\t\tlet mask = root._mask || (root._mask = [0, 0]);\n\t\tstate._value = 'P' + mask[0] + '-' + mask[1]++;\n\t}\n\n\treturn state._value;\n}\n/**\n * After paint effects consumer.\n */\nfunction flushAfterPaintEffects() {\n\tlet component;\n\twhile ((component = afterPaintEffects.shift())) {\n\t\tif (!component._parentDom || !component.__hooks) continue;\n\t\ttry {\n\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeCleanup);\n\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeEffect);\n\t\t\tcomponent.__hooks._pendingEffects = [];\n\t\t} catch (e) {\n\t\t\tcomponent.__hooks._pendingEffects = [];\n\t\t\toptions._catchError(e, component._vnode);\n\t\t}\n\t}\n}\n\nlet HAS_RAF = typeof requestAnimationFrame == 'function';\n\n/**\n * Schedule a callback to be invoked after the browser has a chance to paint a new frame.\n * Do this by combining requestAnimationFrame (rAF) + setTimeout to invoke a callback after\n * the next browser frame.\n *\n * Also, schedule a timeout in parallel to the the rAF to ensure the callback is invoked\n * even if RAF doesn't fire (for example if the browser tab is not visible)\n *\n * @param {() => void} callback\n */\nfunction afterNextFrame(callback) {\n\tconst done = () => {\n\t\tclearTimeout(timeout);\n\t\tif (HAS_RAF) cancelAnimationFrame(raf);\n\t\tsetTimeout(callback);\n\t};\n\tconst timeout = setTimeout(done, RAF_TIMEOUT);\n\n\tlet raf;\n\tif (HAS_RAF) {\n\t\traf = requestAnimationFrame(done);\n\t}\n}\n\n// Note: if someone used options.debounceRendering = requestAnimationFrame,\n// then effects will ALWAYS run on the NEXT frame instead of the current one, incurring a ~16ms delay.\n// Perhaps this is not such a big deal.\n/**\n * Schedule afterPaintEffects flush after the browser paints\n * @param {number} newQueueLength\n */\nfunction afterPaint(newQueueLength) {\n\tif (newQueueLength === 1 || prevRaf !== options.requestAnimationFrame) {\n\t\tprevRaf = options.requestAnimationFrame;\n\t\t(prevRaf || afterNextFrame)(flushAfterPaintEffects);\n\t}\n}\n\n/**\n * @param {import('./internal').EffectHookState} hook\n */\nfunction invokeCleanup(hook) {\n\t// A hook cleanup can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentComponent away.\n\tconst comp = currentComponent;\n\tlet cleanup = hook._cleanup;\n\tif (typeof cleanup == 'function') {\n\t\thook._cleanup = undefined;\n\t\tcleanup();\n\t}\n\n\tcurrentComponent = comp;\n}\n\n/**\n * Invoke a Hook's effect\n * @param {import('./internal').EffectHookState} hook\n */\nfunction invokeEffect(hook) {\n\t// A hook call can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentComponent away.\n\tconst comp = currentComponent;\n\thook._cleanup = hook._value();\n\tcurrentComponent = comp;\n}\n\n/**\n * @param {any[]} oldArgs\n * @param {any[]} newArgs\n */\nfunction argsChanged(oldArgs, newArgs) {\n\treturn (\n\t\t!oldArgs ||\n\t\toldArgs.length !== newArgs.length ||\n\t\tnewArgs.some((arg, index) => arg !== oldArgs[index])\n\t);\n}\n\nfunction invokeOrReturn(arg, f) {\n\treturn typeof f == 'function' ? f(arg) : f;\n}\n","import {Stripe, loadStripe} from '@stripe/stripe-js';\nimport {useState, useCallback, useEffect} from 'preact/hooks';\nimport {PaymentRequestAvailable} from 'src/components/widget/types/PaymentMethod';\nimport {STRIPE_API_VERSION, STRIPE_PUBLIC_KEY} from 'src/constants/stripe';\n\ndeclare global {\n\tinterface Window {\n\t\tApplePaySession: any;\n\t}\n}\n\nfunction useStripe() {\n\tconst [stripePromise, setStripe] = useState(null);\n\tuseEffect(() => {\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tconst stripe = await loadStripe(STRIPE_PUBLIC_KEY, {\n\t\t\t\t\tapiVersion: STRIPE_API_VERSION\n\t\t\t\t});\n\n\t\t\t\tsetStripe(stripe);\n\t\t\t} catch {\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t})();\n\t}, []);\n\treturn stripePromise;\n}\n\nexport function useCheckPaymentRequest(): PaymentRequestAvailable {\n\tconst stripe = useStripe();\n\n\tconst [canMakePayment, setCanMakePayment] = useState(false);\n\n\tconst initializePaymentRequest = useCallback(async (stripe: Stripe) => {\n\t\tconst pr = stripe?.paymentRequest({\n\t\t\tcountry: 'US',\n\t\t\tcurrency: 'usd',\n\t\t\ttotal: {label: 'test', amount: 0},\n\t\t\trequestPayerName: false,\n\t\t\trequestPayerEmail: false\n\t\t});\n\t\tconst canMakePayment = Boolean(await pr?.canMakePayment());\n\t\tsetCanMakePayment(canMakePayment);\n\t}, []);\n\n\tuseEffect(() => {\n\t\tif (!stripe) {\n\t\t\treturn;\n\t\t}\n\n\t\tvoid initializePaymentRequest(stripe);\n\t}, [initializePaymentRequest, stripe]);\n\n\tconst isApplePay = Boolean(window.ApplePaySession);\n\n\treturn {googlePay: canMakePayment, applePay: canMakePayment && isApplePay};\n}\n","import {Fragment} from 'preact/jsx-runtime';\nimport {faqLinkCss} from 'src/components/widget/components/Faq/styles';\nimport {Nonprofit} from 'src/components/widget/types/Nonprofit';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nexport function getDisbursementDescription(nonprofit: Nonprofit) {\n\tif (nonprofit.directDisbursement) {\n\t\treturn (\n\t\t\tWe then grant directly to {nonprofit.name} on a weekly basis.\n\t\t);\n\t}\n\n\treturn (\n\t\t\n\t\t\tWe then partner with Network for Good to grant to {nonprofit.name} on a{' '}\n\t\t\t\n\t\t\t\tmonthly basis\n\t\t\t\n\t\t\t.\n\t\t\n\t);\n}\n\nexport function getNfgDisclaimer(nonprofit: Nonprofit) {\n\tif (!nonprofit.directDisbursement) {\n\t\treturn (\n\t\t\t

\n\t\t\t\t{nonprofit.name} has not added bank deposit info to Every.org yet, so we\n\t\t\t\tcurrently grant to them through Network for Good, who charges a 2.25%\n\t\t\t\tdisbursement fee.\n\t\t\t

\n\t\t);\n\t}\n\n\treturn null;\n}\n\nexport function getFeeDescriptionBody(\n\tpaymentMethod: PaymentMethod,\n\tnonprofit: Nonprofit\n) {\n\tswitch (paymentMethod) {\n\t\tcase PaymentMethod.PAYPAL:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tPayPal charges 1.99% + $0.49 for each transaction. There’s an\n\t\t\t\t\t\tadditional 1.5% fee for non-US donors.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.CREDIT_CARD:\n\t\tcase PaymentMethod.PAYMENT_REQUEST:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tVisa and Mastercard charge 2.2% + $0.30 for each transaction. Amex\n\t\t\t\t\t\tcharges a 3.5% flat fee. There’s an additional 1% fee for non-US\n\t\t\t\t\t\tcards.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.BANK:\n\t\t\treturn (\n\t\t\t\t

\n\t\t\t\t\tEvery.org currently covers all fees for donations made with a bank, so\n\t\t\t\t\t100% of your gift reaches {nonprofit.name}.\n\t\t\t\t

\n\t\t\t);\n\t\tcase PaymentMethod.VENMO:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tVenmo charges 1.99% + $0.49 for each transaction. There’s an\n\t\t\t\t\t\tadditional 1.5% fee for non-US donors.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tOur exchanges generally charge a 1% flat fee to automatically\n\t\t\t\t\t\tliquidate cryptocurrency. For large donations worth over $5k, you\n\t\t\t\t\t\thave the option to email crypto@every.org to request an address and\n\t\t\t\t\t\twe can do a manual conversion to get the best rates possible\n\t\t\t\t\t\t(usually 0.1%-0.4%). Or you are welcome to donate here with the 1%\n\t\t\t\t\t\tfee.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.STOCKS:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tEvery.org covers all brokerage fees for commonly traded stocks! For\n\t\t\t\t\t\tmutual funds, the First Republic brokerage fee is usually 0.1% of\n\t\t\t\t\t\tthe principle, with a $30 minimum and $150 maximum. Some slippage\n\t\t\t\t\t\tmay occur between when you donate and when we sell making the final\n\t\t\t\t\t\tamount different from what you donate.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

We do not charge any fees, but your DAF provider may have fees.

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

However, there are third-party fees.

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t}\n}\n\nexport function encourageBankDonation(nonprofit: Nonprofit) {\n\treturn (\n\t\t

\n\t\t\tDon’t like fees? Neither do we! Donate via bank and then 100% of your gift\n\t\t\twill reach {nonprofit.name}.\n\t\t

\n\t);\n}\n\nexport function getFeeDescription(\n\tpaymentMethod: PaymentMethod,\n\tnonprofit: Nonprofit\n) {\n\treturn (\n\t\t\n\t\t\t

\n\t\t\t\tEvery.org is free for donors and nonprofits, with no platform fees -\n\t\t\t\tinstead we ask for a completely optional tip.\n\t\t\t

\n\t\t\t{getFeeDescriptionBody(paymentMethod, nonprofit)}\n\t\t
\n\t);\n}\n","export function isPresent(value: T): value is Exclude {\n\treturn !(value === null || value === undefined);\n}\n\nfunction addParameters(\n\tlink: string,\n\tparameters: Record\n) {\n\t// We don't use URLSearchParams here because it changes spaces to +s instead\n\t// of %20, and some mail clients like Apple don't handle that well.\n\tconst queryString = Object.entries(parameters)\n\t\t.map(([key, value]) => {\n\t\t\ttry {\n\t\t\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t\t\treturn [key, value].map(encodeURIComponent).join('=');\n\t\t\t} catch {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t})\n\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t.filter(isPresent)\n\t\t.join('&');\n\treturn queryString ? [link, queryString].join('?') : link;\n}\n\nexport function mailToLink(parameters: {\n\taddress?: string;\n\tsubject?: string;\n\tbody?: string;\n}) {\n\treturn addParameters(`mailto:${parameters.address ?? ''}`, {\n\t\t...(parameters.subject ? {subject: parameters.subject} : {}),\n\t\t...(parameters.body ? {body: parameters.body} : {})\n\t});\n}\n","/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Check if two objects have a different shape\n * @param {object} a\n * @param {object} b\n * @returns {boolean}\n */\nexport function shallowDiffers(a, b) {\n\tfor (let i in a) if (i !== '__source' && !(i in b)) return true;\n\tfor (let i in b) if (i !== '__source' && a[i] !== b[i]) return true;\n\treturn false;\n}\n\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\n/**\n * Check if two values are the same value\n * @param {*} x\n * @param {*} y\n * @returns {boolean}\n */\nexport function is(x, y) {\n\treturn (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\n","import { Component } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Component class with a predefined `shouldComponentUpdate` implementation\n */\nexport function PureComponent(p) {\n\tthis.props = p;\n}\nPureComponent.prototype = new Component();\n// Some third-party libraries check if this property is present\nPureComponent.prototype.isPureReactComponent = true;\nPureComponent.prototype.shouldComponentUpdate = function (props, state) {\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n};\n","import { options } from 'preact';\nimport { assign } from './util';\n\nlet oldDiffHook = options._diff;\noptions._diff = vnode => {\n\tif (vnode.type && vnode.type._forwarded && vnode.ref) {\n\t\tvnode.props.ref = vnode.ref;\n\t\tvnode.ref = null;\n\t}\n\tif (oldDiffHook) oldDiffHook(vnode);\n};\n\nexport const REACT_FORWARD_SYMBOL =\n\t(typeof Symbol != 'undefined' &&\n\t\tSymbol.for &&\n\t\tSymbol.for('react.forward_ref')) ||\n\t0xf47;\n\n/**\n * Pass ref down to a child. This is mainly used in libraries with HOCs that\n * wrap components. Using `forwardRef` there is an easy way to get a reference\n * of the wrapped component instead of one of the wrapper itself.\n * @param {import('./index').ForwardFn} fn\n * @returns {import('./internal').FunctionComponent}\n */\nexport function forwardRef(fn) {\n\tfunction Forwarded(props) {\n\t\tlet clone = assign({}, props);\n\t\tdelete clone.ref;\n\t\treturn fn(clone, props.ref || null);\n\t}\n\n\t// mobx-react checks for this being present\n\tForwarded.$$typeof = REACT_FORWARD_SYMBOL;\n\t// mobx-react heavily relies on implementation details.\n\t// It expects an object here with a `render` property,\n\t// and prototype.render will fail. Without this\n\t// mobx-react throws.\n\tForwarded.render = Forwarded;\n\n\tForwarded.prototype.isReactComponent = Forwarded._forwarded = true;\n\tForwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';\n\treturn Forwarded;\n}\n","import { Component, createElement, options, Fragment } from 'preact';\nimport { assign } from './util';\n\nconst oldCatchError = options._catchError;\noptions._catchError = function (error, newVNode, oldVNode, errorInfo) {\n\tif (error.then) {\n\t\t/** @type {import('./internal').Component} */\n\t\tlet component;\n\t\tlet vnode = newVNode;\n\n\t\tfor (; (vnode = vnode._parent); ) {\n\t\t\tif ((component = vnode._component) && component._childDidSuspend) {\n\t\t\t\tif (newVNode._dom == null) {\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t}\n\t\t\t\t// Don't call oldCatchError if we found a Suspense\n\t\t\t\treturn component._childDidSuspend(error, newVNode);\n\t\t\t}\n\t\t}\n\t}\n\toldCatchError(error, newVNode, oldVNode, errorInfo);\n};\n\nconst oldUnmount = options.unmount;\noptions.unmount = function (vnode) {\n\t/** @type {import('./internal').Component} */\n\tconst component = vnode._component;\n\tif (component && component._onResolve) {\n\t\tcomponent._onResolve();\n\t}\n\n\t// if the component is still hydrating\n\t// most likely it is because the component is suspended\n\t// we set the vnode.type as `null` so that it is not a typeof function\n\t// so the unmount will remove the vnode._dom\n\tif (component && vnode._hydrating === true) {\n\t\tvnode.type = null;\n\t}\n\n\tif (oldUnmount) oldUnmount(vnode);\n};\n\nfunction detachedClone(vnode, detachedParent, parentDom) {\n\tif (vnode) {\n\t\tif (vnode._component && vnode._component.__hooks) {\n\t\t\tvnode._component.__hooks._list.forEach(effect => {\n\t\t\t\tif (typeof effect._cleanup == 'function') effect._cleanup();\n\t\t\t});\n\n\t\t\tvnode._component.__hooks = null;\n\t\t}\n\n\t\tvnode = assign({}, vnode);\n\t\tif (vnode._component != null) {\n\t\t\tif (vnode._component._parentDom === parentDom) {\n\t\t\t\tvnode._component._parentDom = detachedParent;\n\t\t\t}\n\t\t\tvnode._component = null;\n\t\t}\n\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tdetachedClone(child, detachedParent, parentDom)\n\t\t\t);\n\t}\n\n\treturn vnode;\n}\n\nfunction removeOriginal(vnode, detachedParent, originalParent) {\n\tif (vnode) {\n\t\tvnode._original = null;\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tremoveOriginal(child, detachedParent, originalParent)\n\t\t\t);\n\n\t\tif (vnode._component) {\n\t\t\tif (vnode._component._parentDom === detachedParent) {\n\t\t\t\tif (vnode._dom) {\n\t\t\t\t\toriginalParent.insertBefore(vnode._dom, vnode._nextDom);\n\t\t\t\t}\n\t\t\t\tvnode._component._force = true;\n\t\t\t\tvnode._component._parentDom = originalParent;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn vnode;\n}\n\n// having custom inheritance instead of a class here saves a lot of bytes\nexport function Suspense() {\n\t// we do not call super here to golf some bytes...\n\tthis._pendingSuspensionCount = 0;\n\tthis._suspenders = null;\n\tthis._detachOnNextRender = null;\n}\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspense.prototype = new Component();\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {Promise} promise The thrown promise\n * @param {import('./internal').VNode} suspendingVNode The suspending component\n */\nSuspense.prototype._childDidSuspend = function (promise, suspendingVNode) {\n\tconst suspendingComponent = suspendingVNode._component;\n\n\t/** @type {import('./internal').SuspenseComponent} */\n\tconst c = this;\n\n\tif (c._suspenders == null) {\n\t\tc._suspenders = [];\n\t}\n\tc._suspenders.push(suspendingComponent);\n\n\tconst resolve = suspended(c._vnode);\n\n\tlet resolved = false;\n\tconst onResolved = () => {\n\t\tif (resolved) return;\n\n\t\tresolved = true;\n\t\tsuspendingComponent._onResolve = null;\n\n\t\tif (resolve) {\n\t\t\tresolve(onSuspensionComplete);\n\t\t} else {\n\t\t\tonSuspensionComplete();\n\t\t}\n\t};\n\n\tsuspendingComponent._onResolve = onResolved;\n\n\tconst onSuspensionComplete = () => {\n\t\tif (!--c._pendingSuspensionCount) {\n\t\t\t// If the suspension was during hydration we don't need to restore the\n\t\t\t// suspended children into the _children array\n\t\t\tif (c.state._suspended) {\n\t\t\t\tconst suspendedVNode = c.state._suspended;\n\t\t\t\tc._vnode._children[0] = removeOriginal(\n\t\t\t\t\tsuspendedVNode,\n\t\t\t\t\tsuspendedVNode._component._parentDom,\n\t\t\t\t\tsuspendedVNode._component._originalParentDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tc.setState({ _suspended: (c._detachOnNextRender = null) });\n\n\t\t\tlet suspended;\n\t\t\twhile ((suspended = c._suspenders.pop())) {\n\t\t\t\tsuspended.forceUpdate();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * We do not set `suspended: true` during hydration because we want the actual markup\n\t * to remain on screen and hydrate it when the suspense actually gets resolved.\n\t * While in non-hydration cases the usual fallback -> component flow would occour.\n\t */\n\tconst wasHydrating = suspendingVNode._hydrating === true;\n\tif (!c._pendingSuspensionCount++ && !wasHydrating) {\n\t\tc.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });\n\t}\n\tpromise.then(onResolved, onResolved);\n};\n\nSuspense.prototype.componentWillUnmount = function () {\n\tthis._suspenders = [];\n};\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {import('./internal').SuspenseComponent[\"props\"]} props\n * @param {import('./internal').SuspenseState} state\n */\nSuspense.prototype.render = function (props, state) {\n\tif (this._detachOnNextRender) {\n\t\t// When the Suspense's _vnode was created by a call to createVNode\n\t\t// (i.e. due to a setState further up in the tree)\n\t\t// it's _children prop is null, in this case we \"forget\" about the parked vnodes to detach\n\t\tif (this._vnode._children) {\n\t\t\tconst detachedParent = document.createElement('div');\n\t\t\tconst detachedComponent = this._vnode._children[0]._component;\n\t\t\tthis._vnode._children[0] = detachedClone(\n\t\t\t\tthis._detachOnNextRender,\n\t\t\t\tdetachedParent,\n\t\t\t\t(detachedComponent._originalParentDom = detachedComponent._parentDom)\n\t\t\t);\n\t\t}\n\n\t\tthis._detachOnNextRender = null;\n\t}\n\n\t// Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:\n\t/** @type {import('./internal').VNode} */\n\tconst fallback =\n\t\tstate._suspended && createElement(Fragment, null, props.fallback);\n\tif (fallback) fallback._hydrating = null;\n\n\treturn [\n\t\tcreateElement(Fragment, null, state._suspended ? null : props.children),\n\t\tfallback\n\t];\n};\n\n/**\n * Checks and calls the parent component's _suspended method, passing in the\n * suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified\n * that one of its children/descendants suspended.\n *\n * The parent MAY return a callback. The callback will get called when the\n * suspension resolves, notifying the parent of the fact.\n * Moreover, the callback gets function `unsuspend` as a parameter. The resolved\n * child descendant will not actually get unsuspended until `unsuspend` gets called.\n * This is a way for the parent to delay unsuspending.\n *\n * If the parent does not return a callback then the resolved vnode\n * gets unsuspended immediately when it resolves.\n *\n * @param {import('./internal').VNode} vnode\n * @returns {((unsuspend: () => void) => void)?}\n */\nexport function suspended(vnode) {\n\t/** @type {import('./internal').Component} */\n\tlet component = vnode._parent._component;\n\treturn component && component._suspended && component._suspended(vnode);\n}\n\nexport function lazy(loader) {\n\tlet prom;\n\tlet component;\n\tlet error;\n\n\tfunction Lazy(props) {\n\t\tif (!prom) {\n\t\t\tprom = loader();\n\t\t\tprom.then(\n\t\t\t\texports => {\n\t\t\t\t\tcomponent = exports.default || exports;\n\t\t\t\t},\n\t\t\t\te => {\n\t\t\t\t\terror = e;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (!component) {\n\t\t\tthrow prom;\n\t\t}\n\n\t\treturn createElement(component, props);\n\t}\n\n\tLazy.displayName = 'Lazy';\n\tLazy._forwarded = true;\n\treturn Lazy;\n}\n","import { Component, toChildArray } from 'preact';\nimport { suspended } from './suspense.js';\n\n// Indexes to linked list nodes (nodes are stored as arrays to save bytes).\nconst SUSPENDED_COUNT = 0;\nconst RESOLVED_COUNT = 1;\nconst NEXT_NODE = 2;\n\n// Having custom inheritance instead of a class here saves a lot of bytes.\nexport function SuspenseList() {\n\tthis._next = null;\n\tthis._map = null;\n}\n\n// Mark one of child's earlier suspensions as resolved.\n// Some pending callbacks may become callable due to this\n// (e.g. the last suspended descendant gets resolved when\n// revealOrder === 'together'). Process those callbacks as well.\nconst resolve = (list, child, node) => {\n\tif (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {\n\t\t// The number a child (or any of its descendants) has been suspended\n\t\t// matches the number of times it's been resolved. Therefore we\n\t\t// mark the child as completely resolved by deleting it from ._map.\n\t\t// This is used to figure out when *all* children have been completely\n\t\t// resolved when revealOrder is 'together'.\n\t\tlist._map.delete(child);\n\t}\n\n\t// If revealOrder is falsy then we can do an early exit, as the\n\t// callbacks won't get queued in the node anyway.\n\t// If revealOrder is 'together' then also do an early exit\n\t// if all suspended descendants have not yet been resolved.\n\tif (\n\t\t!list.props.revealOrder ||\n\t\t(list.props.revealOrder[0] === 't' && list._map.size)\n\t) {\n\t\treturn;\n\t}\n\n\t// Walk the currently suspended children in order, calling their\n\t// stored callbacks on the way. Stop if we encounter a child that\n\t// has not been completely resolved yet.\n\tnode = list._next;\n\twhile (node) {\n\t\twhile (node.length > 3) {\n\t\t\tnode.pop()();\n\t\t}\n\t\tif (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {\n\t\t\tbreak;\n\t\t}\n\t\tlist._next = node = node[NEXT_NODE];\n\t}\n};\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspenseList.prototype = new Component();\n\nSuspenseList.prototype._suspended = function (child) {\n\tconst list = this;\n\tconst delegated = suspended(list._vnode);\n\n\tlet node = list._map.get(child);\n\tnode[SUSPENDED_COUNT]++;\n\n\treturn unsuspend => {\n\t\tconst wrappedUnsuspend = () => {\n\t\t\tif (!list.props.revealOrder) {\n\t\t\t\t// Special case the undefined (falsy) revealOrder, as there\n\t\t\t\t// is no need to coordinate a specific order or unsuspends.\n\t\t\t\tunsuspend();\n\t\t\t} else {\n\t\t\t\tnode.push(unsuspend);\n\t\t\t\tresolve(list, child, node);\n\t\t\t}\n\t\t};\n\t\tif (delegated) {\n\t\t\tdelegated(wrappedUnsuspend);\n\t\t} else {\n\t\t\twrappedUnsuspend();\n\t\t}\n\t};\n};\n\nSuspenseList.prototype.render = function (props) {\n\tthis._next = null;\n\tthis._map = new Map();\n\n\tconst children = toChildArray(props.children);\n\tif (props.revealOrder && props.revealOrder[0] === 'b') {\n\t\t// If order === 'backwards' (or, well, anything starting with a 'b')\n\t\t// then flip the child list around so that the last child will be\n\t\t// the first in the linked list.\n\t\tchildren.reverse();\n\t}\n\t// Build the linked list. Iterate through the children in reverse order\n\t// so that `_next` points to the first linked list node to be resolved.\n\tfor (let i = children.length; i--; ) {\n\t\t// Create a new linked list node as an array of form:\n\t\t// \t[suspended_count, resolved_count, next_node]\n\t\t// where suspended_count and resolved_count are numeric counters for\n\t\t// keeping track how many times a node has been suspended and resolved.\n\t\t//\n\t\t// Note that suspended_count starts from 1 instead of 0, so we can block\n\t\t// processing callbacks until componentDidMount has been called. In a sense\n\t\t// node is suspended at least until componentDidMount gets called!\n\t\t//\n\t\t// Pending callbacks are added to the end of the node:\n\t\t// \t[suspended_count, resolved_count, next_node, callback_0, callback_1, ...]\n\t\tthis._map.set(children[i], (this._next = [1, 0, this._next]));\n\t}\n\treturn props.children;\n};\n\nSuspenseList.prototype.componentDidUpdate =\n\tSuspenseList.prototype.componentDidMount = function () {\n\t\t// Iterate through all children after mounting for two reasons:\n\t\t// 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases\n\t\t// each node[RELEASED_COUNT] by 1, therefore balancing the counters.\n\t\t// The nodes can now be completely consumed from the linked list.\n\t\t// 2. Handle nodes that might have gotten resolved between render and\n\t\t// componentDidMount.\n\t\tthis._map.forEach((node, child) => {\n\t\t\tresolve(this, child, node);\n\t\t});\n\t};\n","import {\n\trender as preactRender,\n\thydrate as preactHydrate,\n\toptions,\n\ttoChildArray,\n\tComponent\n} from 'preact';\n\nexport const REACT_ELEMENT_TYPE =\n\t(typeof Symbol != 'undefined' && Symbol.for && Symbol.for('react.element')) ||\n\t0xeac7;\n\nconst CAMEL_PROPS =\n\t/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;\nconst ON_ANI = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;\nconst CAMEL_REPLACE = /[A-Z0-9]/g;\n\nconst IS_DOM = typeof document !== 'undefined';\n\n// Input types for which onchange should not be converted to oninput.\n// type=\"file|checkbox|radio\", plus \"range\" in IE11.\n// (IE11 doesn't support Symbol, which we use here to turn `rad` into `ra` which matches \"range\")\nconst onChangeInputType = type =>\n\t(typeof Symbol != 'undefined' && typeof Symbol() == 'symbol'\n\t\t? /fil|che|rad/\n\t\t: /fil|che|ra/\n\t).test(type);\n\n// Some libraries like `react-virtualized` explicitly check for this.\nComponent.prototype.isReactComponent = {};\n\n// `UNSAFE_*` lifecycle hooks\n// Preact only ever invokes the unprefixed methods.\n// Here we provide a base \"fallback\" implementation that calls any defined UNSAFE_ prefixed method.\n// - If a component defines its own `componentDidMount()` (including via defineProperty), use that.\n// - If a component defines `UNSAFE_componentDidMount()`, `componentDidMount` is the alias getter/setter.\n// - If anything assigns to an `UNSAFE_*` property, the assignment is forwarded to the unprefixed property.\n// See https://github.com/preactjs/preact/issues/1941\n[\n\t'componentWillMount',\n\t'componentWillReceiveProps',\n\t'componentWillUpdate'\n].forEach(key => {\n\tObject.defineProperty(Component.prototype, key, {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn this['UNSAFE_' + key];\n\t\t},\n\t\tset(v) {\n\t\t\tObject.defineProperty(this, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: v\n\t\t\t});\n\t\t}\n\t});\n});\n\n/**\n * Proxy render() since React returns a Component reference.\n * @param {import('./internal').VNode} vnode VNode tree to render\n * @param {import('./internal').PreactElement} parent DOM node to render vnode tree into\n * @param {() => void} [callback] Optional callback that will be called after rendering\n * @returns {import('./internal').Component | null} The root component reference or null\n */\nexport function render(vnode, parent, callback) {\n\t// React destroys any existing DOM nodes, see #1727\n\t// ...but only on the first render, see #1828\n\tif (parent._children == null) {\n\t\tparent.textContent = '';\n\t}\n\n\tpreactRender(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nexport function hydrate(vnode, parent, callback) {\n\tpreactHydrate(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nlet oldEventHook = options.event;\noptions.event = e => {\n\tif (oldEventHook) e = oldEventHook(e);\n\n\te.persist = empty;\n\te.isPropagationStopped = isPropagationStopped;\n\te.isDefaultPrevented = isDefaultPrevented;\n\treturn (e.nativeEvent = e);\n};\n\nfunction empty() {}\n\nfunction isPropagationStopped() {\n\treturn this.cancelBubble;\n}\n\nfunction isDefaultPrevented() {\n\treturn this.defaultPrevented;\n}\n\nconst classNameDescriptorNonEnumberable = {\n\tenumerable: false,\n\tconfigurable: true,\n\tget() {\n\t\treturn this.class;\n\t}\n};\n\nfunction handleDomVNode(vnode) {\n\tlet props = vnode.props,\n\t\ttype = vnode.type,\n\t\tnormalizedProps = {};\n\n\tfor (let i in props) {\n\t\tlet value = props[i];\n\n\t\tif (\n\t\t\t(i === 'value' && 'defaultValue' in props && value == null) ||\n\t\t\t// Emulate React's behavior of not rendering the contents of noscript tags on the client.\n\t\t\t(IS_DOM && i === 'children' && type === 'noscript') ||\n\t\t\ti === 'class' ||\n\t\t\ti === 'className'\n\t\t) {\n\t\t\t// Skip applying value if it is null/undefined and we already set\n\t\t\t// a default value\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet lowerCased = i.toLowerCase();\n\t\tif (i === 'defaultValue' && 'value' in props && props.value == null) {\n\t\t\t// `defaultValue` is treated as a fallback `value` when a value prop is present but null/undefined.\n\t\t\t// `defaultValue` for Elements with no value prop is the same as the DOM defaultValue property.\n\t\t\ti = 'value';\n\t\t} else if (i === 'download' && value === true) {\n\t\t\t// Calling `setAttribute` with a truthy value will lead to it being\n\t\t\t// passed as a stringified value, e.g. `download=\"true\"`. React\n\t\t\t// converts it to an empty string instead, otherwise the attribute\n\t\t\t// value will be used as the file name and the file will be called\n\t\t\t// \"true\" upon downloading it.\n\t\t\tvalue = '';\n\t\t} else if (lowerCased === 'ondoubleclick') {\n\t\t\ti = 'ondblclick';\n\t\t} else if (\n\t\t\tlowerCased === 'onchange' &&\n\t\t\t(type === 'input' || type === 'textarea') &&\n\t\t\t!onChangeInputType(props.type)\n\t\t) {\n\t\t\tlowerCased = i = 'oninput';\n\t\t} else if (lowerCased === 'onfocus') {\n\t\t\ti = 'onfocusin';\n\t\t} else if (lowerCased === 'onblur') {\n\t\t\ti = 'onfocusout';\n\t\t} else if (ON_ANI.test(i)) {\n\t\t\ti = lowerCased;\n\t\t} else if (type.indexOf('-') === -1 && CAMEL_PROPS.test(i)) {\n\t\t\ti = i.replace(CAMEL_REPLACE, '-$&').toLowerCase();\n\t\t} else if (value === null) {\n\t\t\tvalue = undefined;\n\t\t}\n\n\t\t// Add support for onInput and onChange, see #3561\n\t\t// if we have an oninput prop already change it to oninputCapture\n\t\tif (lowerCased === 'oninput') {\n\t\t\ti = lowerCased;\n\t\t\tif (normalizedProps[i]) {\n\t\t\t\ti = 'oninputCapture';\n\t\t\t}\n\t\t}\n\n\t\tnormalizedProps[i] = value;\n\t}\n\n\t// Add support for array select values: value not being updated.\n\t\t\t\t\t// To avoid a stale select value we need to set the option.value\n\t\t\t\t\t// again, which triggers IE11 to re-evaluate the select value\n\t\t\t\t\t(nodeType === 'option' && i !== oldProps.value))\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'value', i, oldProps.value, false);\n\t\t\t}\n\t\t\tif (\n\t\t\t\t'checked' in newProps &&\n\t\t\t\t(i = newProps.checked) !== undefined &&\n\t\t\t\ti !== dom.checked\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'checked', i, oldProps.checked, false);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/**\n * Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} ref\n * @param {any} value\n * @param {import('../internal').VNode} vnode\n */\nexport function applyRef(ref, value, vnode) {\n\ttry {\n\t\tif (typeof ref == 'function') ref(value);\n\t\telse ref.current = value;\n\t} catch (e) {\n\t\toptions._catchError(e, vnode);\n\t}\n}\n\n/**\n * Unmount a virtual node from the tree and apply DOM changes\n * @param {import('../internal').VNode} vnode The virtual node to unmount\n * @param {import('../internal').VNode} parentVNode The parent of the VNode that\n * initiated the unmount\n * @param {boolean} [skipRemove] Flag that indicates that a parent node of the\n * current element is already detached from the DOM.\n */\nexport function unmount(vnode, parentVNode, skipRemove) {\n\tlet r;\n\tif (options.unmount) options.unmount(vnode);\n\n\tif ((r = vnode.ref)) {\n\t\tif (!r.current || r.current === vnode._dom) {\n\t\t\tapplyRef(r, null, parentVNode);\n\t\t}\n\t}\n\n\tif ((r = vnode._component) != null) {\n\t\tif (r.componentWillUnmount) {\n\t\t\ttry {\n\t\t\t\tr.componentWillUnmount();\n\t\t\t} catch (e) {\n\t\t\t\toptions._catchError(e, parentVNode);\n\t\t\t}\n\t\t}\n\n\t\tr.base = r._parentDom = null;\n\t\tvnode._component = undefined;\n\t}\n\n\tif ((r = vnode._children)) {\n\t\tfor (let i = 0; i < r.length; i++) {\n\t\t\tif (r[i]) {\n\t\t\t\tunmount(\n\t\t\t\t\tr[i],\n\t\t\t\t\tparentVNode,\n\t\t\t\t\tskipRemove || typeof vnode.type !== 'function'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!skipRemove && vnode._dom != null) {\n\t\tremoveNode(vnode._dom);\n\t}\n\n\t// Must be set to `undefined` to properly clean up `_nextDom`\n\t// for which `null` is a valid value. See comment in `create-element.js`\n\tvnode._parent = vnode._dom = vnode._nextDom = undefined;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n","import { EMPTY_OBJ } from './constants';\nimport { commitRoot, diff } from './diff/index';\nimport { createElement, Fragment } from './create-element';\nimport options from './options';\nimport { slice } from './util';\n\n/**\n * Render a Preact virtual node into a DOM element\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * render into\n * @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an\n * existing DOM tree rooted at `replaceNode`\n */\nexport function render(vnode, parentDom, replaceNode) {\n\tif (options._root) options._root(vnode, parentDom);\n\n\t// We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in\n\t// hydration mode or not by passing the `hydrate` function instead of a DOM\n\t// element..\n\tlet isHydrating = typeof replaceNode === 'function';\n\n\t// To be able to support calling `render()` multiple times on the same\n\t// DOM node, we need to obtain a reference to the previous tree. We do\n\t// this by assigning a new `_children` property to DOM nodes which points\n\t// to the last rendered tree. By default this property is not present, which\n\t// means that we are mounting a new tree for the first time.\n\tlet oldVNode = isHydrating\n\t\t? null\n\t\t: (replaceNode && replaceNode._children) || parentDom._children;\n\n\tvnode = ((!isHydrating && replaceNode) || parentDom)._children =\n\t\tcreateElement(Fragment, null, [vnode]);\n\n\t// List of effects that need to be called after diffing.\n\tlet commitQueue = [],\n\t\trefQueue = [];\n\tdiff(\n\t\tparentDom,\n\t\t// Determine the new vnode tree and store it on the DOM element on\n\t\t// our custom `_children` property.\n\t\tvnode,\n\t\toldVNode || EMPTY_OBJ,\n\t\tEMPTY_OBJ,\n\t\tparentDom.ownerSVGElement !== undefined,\n\t\t!isHydrating && replaceNode\n\t\t\t? [replaceNode]\n\t\t\t: oldVNode\n\t\t\t? null\n\t\t\t: parentDom.firstChild\n\t\t\t? slice.call(parentDom.childNodes)\n\t\t\t: null,\n\t\tcommitQueue,\n\t\t!isHydrating && replaceNode\n\t\t\t? replaceNode\n\t\t\t: oldVNode\n\t\t\t? oldVNode._dom\n\t\t\t: parentDom.firstChild,\n\t\tisHydrating,\n\t\trefQueue\n\t);\n\n\t// Flush all queued effects\n\tcommitRoot(commitQueue, vnode, refQueue);\n}\n\n/**\n * Update an existing DOM element with data from a Preact virtual node\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * update\n */\nexport function hydrate(vnode, parentDom) {\n\trender(vnode, parentDom, hydrate);\n}\n","import { assign, slice } from './util';\nimport { createVNode } from './create-element';\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {import('./internal').VNode} vnode The virtual DOM element to clone\n * @param {object} props Attributes/props to add when cloning\n * @param {Array} rest Any additional arguments will be used as replacement children.\n * @returns {import('./internal').VNode}\n */\nexport function cloneElement(vnode, props, children) {\n\tlet normalizedProps = assign({}, vnode.props),\n\t\tkey,\n\t\tref,\n\t\ti;\n\n\tlet defaultProps;\n\n\tif (vnode.type && vnode.type.defaultProps) {\n\t\tdefaultProps = vnode.type.defaultProps;\n\t}\n\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse if (props[i] === undefined && defaultProps !== undefined) {\n\t\t\tnormalizedProps[i] = defaultProps[i];\n\t\t} else {\n\t\t\tnormalizedProps[i] = props[i];\n\t\t}\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\treturn createVNode(\n\t\tvnode.type,\n\t\tnormalizedProps,\n\t\tkey || vnode.key,\n\t\tref || vnode.ref,\n\t\tnull\n\t);\n}\n","import { enqueueRender } from './component';\n\nexport let i = 0;\n\nexport function createContext(defaultValue, contextId) {\n\tcontextId = '__cC' + i++;\n\n\tconst context = {\n\t\t_id: contextId,\n\t\t_defaultValue: defaultValue,\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tConsumer(props, contextValue) {\n\t\t\t// return props.children(\n\t\t\t// \tcontext[contextId] ? context[contextId].props.value : defaultValue\n\t\t\t// );\n\t\t\treturn props.children(contextValue);\n\t\t},\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tProvider(props) {\n\t\t\tif (!this.getChildContext) {\n\t\t\t\t/** @type {import('./internal').Component[]} */\n\t\t\t\tlet subs = [];\n\t\t\t\tlet ctx = {};\n\t\t\t\tctx[contextId] = this;\n\n\t\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t\tif (this.props.value !== _props.value) {\n\t\t\t\t\t\t// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:\n\t\t\t\t\t\t// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358\n\t\t\t\t\t\t// In those cases though, even with the value corrected, we're double-rendering all nodes.\n\t\t\t\t\t\t// It might be better to just tell folks not to use force-sync mode.\n\t\t\t\t\t\t// Currently, using `useContext()` in a class component will overwrite its `this.context` value.\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context[contextId] = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\t\t\t\t\t\tsubs.some(c => {\n\t\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.sub = c => {\n\t\t\t\t\tsubs.push(c);\n\t\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\t\tsubs.splice(subs.indexOf(c), 1);\n\t\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn props.children;\n\t\t}\n\t};\n\n\t// Devtools needs access to the context object when it\n\t// encounters a Provider. This is necessary to support\n\t// setting `displayName` on the context object instead\n\t// of on the component itself. See:\n\t// https://reactjs.org/docs/context.html#contextdisplayname\n\n\treturn (context.Provider._contextRef = context.Consumer.contextType =\n\t\tcontext);\n}\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","export const EMPTY_OBJ = {};\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw\n * the error that was caught (except for unmounting when this parameter\n * is the highest parent that was being unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component, ctor, handled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != null) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != null) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n","/* global __webpack_public_path__ */\n\nimport * as Preact from 'preact';\nconst { h, render, hydrate } = Preact;\n\nconst interopDefault = m => (m && m.default ? m.default : m);\n\nconst normalizeURL = url => (url[url.length - 1] === '/' ? url : url + '/');\n\nif (process.env.NODE_ENV === 'development') {\n\t// enable preact devtools\n\trequire('preact/debug');\n\n\t// only add a debug sw if webpack service worker is not requested.\n\tif (process.env.ADD_SW === undefined && 'serviceWorker' in navigator) {\n\t\tnavigator.serviceWorker.register(\n\t\t\tnormalizeURL(__webpack_public_path__) + 'sw-debug.js'\n\t\t);\n\t} else if (process.env.ADD_SW && 'serviceWorker' in navigator) {\n\t\tnavigator.serviceWorker.register(\n\t\t\tnormalizeURL(__webpack_public_path__) +\n\t\t\t\t(process.env.ES_BUILD ? 'sw-esm.js' : 'sw.js')\n\t\t);\n\t}\n} else if (process.env.ADD_SW && 'serviceWorker' in navigator) {\n\tnavigator.serviceWorker.register(\n\t\tnormalizeURL(__webpack_public_path__) +\n\t\t\t(process.env.ES_BUILD ? 'sw-esm.js' : 'sw.js')\n\t);\n}\n\nlet app = interopDefault(require('preact-cli-entrypoint'));\n\nif (typeof app === 'function') {\n\tlet root =\n\t\tdocument.getElementById('preact_root') || document.body.firstElementChild;\n\n\tlet init = () => {\n\t\tlet app = interopDefault(require('preact-cli-entrypoint'));\n\t\tlet preRenderData = {};\n\t\tconst inlineDataElement = document.querySelector(\n\t\t\t'[type=\"__PREACT_CLI_DATA__\"]'\n\t\t);\n\t\tif (inlineDataElement) {\n\t\t\tpreRenderData =\n\t\t\t\tJSON.parse(decodeURI(inlineDataElement.innerHTML)).preRenderData ||\n\t\t\t\tpreRenderData;\n\t\t}\n\t\t/* An object named CLI_DATA is passed as a prop,\n\t\t * this keeps us future proof if in case we decide,\n\t\t * to send other data like at some point in time.\n\t\t */\n\t\tconst CLI_DATA = { preRenderData };\n\t\tconst currentURL = preRenderData.url ? normalizeURL(preRenderData.url) : '';\n\t\tconst canHydrate =\n\t\t\tprocess.env.PRERENDER &&\n\t\t\tprocess.env.NODE_ENV === 'production' &&\n\t\t\thydrate &&\n\t\t\tcurrentURL === normalizeURL(location.pathname);\n\t\tconst doRender = canHydrate ? hydrate : render;\n\t\tdoRender(h(app, { CLI_DATA }), document.body, root);\n\t};\n\n\tif (module.hot) module.hot.accept('preact-cli-entrypoint', init);\n\n\tinit();\n}\n","/*\n * Fuzzy\n * https://github.com/myork/fuzzy\n *\n * Copyright (c) 2012 Matt York\n * Licensed under the MIT license.\n */\n\n(function() {\n\nvar root = this;\n\nvar fuzzy = {};\n\n// Use in node or in browser\nif (typeof exports !== 'undefined') {\n module.exports = fuzzy;\n} else {\n root.fuzzy = fuzzy;\n}\n\n// Return all elements of `array` that have a fuzzy\n// match against `pattern`.\nfuzzy.simpleFilter = function(pattern, array) {\n return array.filter(function(str) {\n return fuzzy.test(pattern, str);\n });\n};\n\n// Does `pattern` fuzzy match `str`?\nfuzzy.test = function(pattern, str) {\n return fuzzy.match(pattern, str) !== null;\n};\n\n// If `pattern` matches `str`, wrap each matching character\n// in `opts.pre` and `opts.post`. If no match, return null\nfuzzy.match = function(pattern, str, opts) {\n opts = opts || {};\n var patternIdx = 0\n , result = []\n , len = str.length\n , totalScore = 0\n , currScore = 0\n // prefix\n , pre = opts.pre || ''\n // suffix\n , post = opts.post || ''\n // String to compare against. This might be a lowercase version of the\n // raw string\n , compareString = opts.caseSensitive && str || str.toLowerCase()\n , ch;\n\n pattern = opts.caseSensitive && pattern || pattern.toLowerCase();\n\n // For each character in the string, either add it to the result\n // or wrap in template if it's the next string in the pattern\n for(var idx = 0; idx < len; idx++) {\n ch = str[idx];\n if(compareString[idx] === pattern[patternIdx]) {\n ch = pre + ch + post;\n patternIdx += 1;\n\n // consecutive characters should increase the score more than linearly\n currScore += 1 + currScore;\n } else {\n currScore = 0;\n }\n totalScore += currScore;\n result[result.length] = ch;\n }\n\n // return rendered string if we have a match for every char\n if(patternIdx === pattern.length) {\n // if the string is an exact match with pattern, totalScore should be maxed\n totalScore = (compareString === pattern) ? Infinity : totalScore;\n return {rendered: result.join(''), score: totalScore};\n }\n\n return null;\n};\n\n// The normal entry point. Filters `arr` for matches against `pattern`.\n// It returns an array with matching values of the type:\n//\n// [{\n// string: 'lah' // The rendered string\n// , index: 2 // The index of the element in `arr`\n// , original: 'blah' // The original element in `arr`\n// }]\n//\n// `opts` is an optional argument bag. Details:\n//\n// opts = {\n// // string to put before a matching character\n// pre: ''\n//\n// // string to put after matching character\n// , post: ''\n//\n// // Optional function. Input is an entry in the given arr`,\n// // output should be the string to test `pattern` against.\n// // In this example, if `arr = [{crying: 'koala'}]` we would return\n// // 'koala'.\n// , extract: function(arg) { return arg.crying; }\n// }\nfuzzy.filter = function(pattern, arr, opts) {\n if(!arr || arr.length === 0) {\n return [];\n }\n if (typeof pattern !== 'string') {\n return arr;\n }\n opts = opts || {};\n return arr\n .reduce(function(prev, element, idx, arr) {\n var str = element;\n if(opts.extract) {\n str = opts.extract(element);\n }\n var rendered = fuzzy.match(pattern, str, opts);\n if(rendered != null) {\n prev[prev.length] = {\n string: rendered.rendered\n , score: rendered.score\n , index: idx\n , original: element\n };\n }\n return prev;\n }, [])\n\n // Sort by score. Browsers are inconsistent wrt stable/unstable\n // sorting, so force stable by using the index in the case of tie.\n // See http://ofb.net/~sethml/is-sort-stable.html\n .sort(function(a,b) {\n var compare = b.score - a.score;\n if(compare) return compare;\n return a.index - b.index;\n });\n};\n\n\n}());\n\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/dist/donate-button/0.4/bundle.a0ac7.esm.js b/docs/dist/donate-button/0.4/bundle.a0ac7.esm.js new file mode 100644 index 00000000..8514b8b8 --- /dev/null +++ b/docs/dist/donate-button/0.4/bundle.a0ac7.esm.js @@ -0,0 +1,2 @@ +!function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(o,r,function(t){return e[t]}.bind(null,r));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="https://assets.every.org/dist/donate-button/0.4/",t(t.s="Pq/i")}({"/hs+":function(e,t,n){"use strict";function o(e){const t=function({rules:e,cache:t,insert:n,prefix:o}){const r=(i,a="",c)=>Object.keys(i).map((l=>{var s;const u=null!=(s=i[l])?s:"";if(null===u)return"";if("object"==typeof u){const e=l.startsWith("@")?l:null;return r(u,e?a:a+l,null!=e?e:c)}const d=l+u+a+c;if(t[d])return t[d];const p=o+e.length.toString(36);return n(function(e,t){return t?`${t}{${e}}`:e}(function(e,t,n){return`.${e}{${o=t,o.replace(/[A-Z]|^ms/g,"-$&").toLowerCase()}:${n}}`;var o}(p+a.replace(/&/g,""),l,u),c)),t[d]=p,p})).join(" ");return r}(e);return(...e)=>e.map((e=>t(e))).join(" ").trim()}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}function a(e){return Object.entries(e).filter((([,e])=>Boolean(e))).map((e=>e.map((e=>encodeURIComponent(e))).join("="))).join("&")}function c({fundraiserSlug:e,nonprofitSlug:t}){let n=Ve+t;return e&&(n+="/f/"+e),n}function l({methods:e,nonprofitSlug:t,noExit:n,privateNote:o,publicTestimony:r,utmSource:i,webhookToken:a,designation:c,requireShareInfo:l}){return{[qe.METHOD]:null==e?void 0:e.join(","),[qe.NO_EXIT]:null!=n?n:1,[qe.PRIVATE_NOTE]:o,[qe.PUBLIC_TESTIMONY]:r,[qe.PARTNER_WEBHOOK_TOKEN]:a,[qe.DESIGNATION]:c,[qe.REQUIRE_SHARE_INFO]:l,[$e.utm_campaign]:"donate-button",[$e.utm_source]:null!=i?i:t,[$e.utm_medium]:at}}function s(e){if(!e)return;const t=Number.parseInt(e,10);return Number.isNaN(t)?void 0:t}function u(e){var t,n,o,r,i,a;const c=new URL(e),l=c.pathname.split("/f/")[1],u=c.pathname.split("/")[1],d=new URLSearchParams(c.search),p=function(e){if(e)return e.split(",").filter((e=>ht.includes(e)))}(d.get(qe.METHOD)),f=function(e){if(e)return Object.values(dt).find((t=>t.toUpperCase()===e.toUpperCase()))}(d.get(qe.FREQUENCY)),h=s(d.get(qe.AMOUNT)),b=null!=(t=d.get(qe.MONTHLY_TITLE))?t:void 0,m=function(e){if(e)return e.split(",").map(Number.parseFloat).filter(Boolean).slice(0,yt)}(d.get(qe.SUGGESTED_AMOUNTS)),y=null!=(n=d.get($e.utm_source))?n:void 0,g=null!=(o=s(d.get(qe.MIN_VALUE)))?o:s(d.get(gt.MIN_AMOUNT)),v=null!=(r=d.get(qe.DESIGNATION))?r:void 0,_=function(e){if(e)return"true"===e}(d.get(qe.REQUIRE_SHARE_INFO)),O=null!=(i=null!=(a=d.get(qe.THEME_COLOR))?a:d.get(gt.THEME_COLOR))?i:void 0,C=O?O.startsWith("#")?O:`#${O}`:void 0;if(u)return Object.fromEntries(Object.entries({fundraiserSlug:l,nonprofitSlug:u,frequency:f,defaultFrequency:f,methods:p,monthlyTitle:b,addAmounts:m,utmSource:y,amount:h,defaultDonationAmount:h,minDonationAmount:g,primaryColor:C,designation:v,requireShareInfo:_}).filter((([,e])=>void 0!==e)))}function d(e,t){Pe.options.__h&&Pe.options.__h(Ot,e,wt||t),wt=0;var n=Ot.__H||(Ot.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:kt}),n.__[e]}function p(e){return wt=1,f(w,e)}function f(e,t,n){var o=d(_t++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):w(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],n=o.t(t,e);t!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=Ot,!Ot.u)){var r=function(e,t,n){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&o.__c.props===e)&&(!i||i.call(this,e,t,n))};Ot.u=!0;var i=Ot.shouldComponentUpdate,a=Ot.componentWillUpdate;Ot.componentWillUpdate=function(e,t,n){if(this.__e){var o=i;i=void 0,r(e,t,n),i=o}a&&a.call(this,e,t,n)},Ot.shouldComponentUpdate=r}return o.__N||o.__}function h(e,t){var n=d(_t++,3);!Pe.options.__s&&j(n.__H,t)&&(n.__=e,n.i=t,Ot.__H.__h.push(n))}function b(e){return wt=5,m((function(){return{current:e}}),[])}function m(e,t){var n=d(_t++,7);return j(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function y(e,t){return wt=8,m((function(){return e}),t)}function g(e){var t=Ot.context[e.__c],n=d(_t++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Ot)),t.props.value):e.__}function v(){for(var e;e=Nt.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(O),e.__H.__h.forEach(C),e.__H.__h=[]}catch(t){e.__H.__h=[],Pe.options.__e(t,e.__v)}}function _(e){var t,n=function(){clearTimeout(o),Rt&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,100);Rt&&(t=requestAnimationFrame(n))}function O(e){var t=Ot,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Ot=t}function C(e){var t=Ot;e.__c=e.__(),Ot=t}function j(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function w(e,t){return"function"==typeof t?t(e):t}function N(){var e;const t=null==(e=document.currentScript)||null==(e=e.getAttribute("src"))?void 0:e.split("?")[1],n=null==t?void 0:t.split("&").map((e=>{const[t,n]=e.split("=");return[t,n]}));return n&&Object.fromEntries(n)}async function k(e){return(await fetch(`${We}/${e}`).then((async e=>e.json()))).data.nonprofit}function S(){const e=function(){const[e,t]=p(null);return h((()=>{(async()=>{try{const e=await on(rn,{apiVersion:an});t(e)}catch(e){}})()}),[]),e}(),[t,n]=p(!1),[o,r]=p(!1),i=y((async e=>{const t=Boolean(window.ApplePaySession);if(r(t),!e)return;const o=null==e?void 0:e.paymentRequest({country:"US",currency:"usd",total:{label:"test",amount:0},requestPayerName:!1,requestPayerEmail:!1}),i=Boolean(await(null==o?void 0:o.canMakePayment()));n(i)}),[]);return h((()=>{i(e)}),[i,e]),{googlePay:t,applePay:o}}function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t{try{return[e,t].map(encodeURIComponent).join("=")}catch(e){return null}})).filter(P).join("&");return n?[e,n].join("?"):e}(`mailto:${null!=(t=e.address)?t:""}`,L({},e.subject?{subject:e.subject}:{},e.body?{body:e.body}:{}))}function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t=5||2===n&&(r[0]>5||5===r[0]&&(o||r[1]!==ir))),r.length=1,o?(e.e=e.e-t+1,r[0]=1):r[0]=e.e=0;else if(t=5||2===n&&(r[t]>5||5===r[t]&&(o||r[t+1]!==ir||1&r[t-1]))||3===n&&(o||!!r[0]),r.length=t,o)for(;++r[--t]>9;)if(r[t]=0,0===t){++e.e,r.unshift(1);break}for(t=r.length;!r[--t];)r.pop()}return e}function F(e,t,n){var o=e.e,r=e.c.join(""),i=r.length;if(t)r=r.charAt(0)+(i>1?"."+r.slice(1):"")+(o<0?"e":"e+")+o;else if(o<0){for(;++o;)r="0"+r;r="0."+r}else if(o>0)if(++o>i)for(o-=i;o--;)r+="0";else o1&&(r=r.charAt(0)+"."+r.slice(1));return e.s<0&&n?"-"+r:r}function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,os);if(!t.parentNode)return;const o=t.parentNode;Object(Pe.render)(Object(Pe.h)(ut,n),o,t)}function Ie(){document.querySelectorAll("*[href^='https://www.every.org/']").forEach((e=>{const t=e.getAttribute("href");if(null!=t&&t.includes("#/donate")){var n;const o=u(t);if(!o)return;const r=null!=(n=cs.get(t))?n:function(e,t){as||Ae();const n=document.createElement("div");as.append(n);const o=new ss(e,n);return cs.set(t,o),o}(o,t);ls||null!==e.getAttribute("data-every-style")?Ee(Te({element:e,onClick:()=>{r.show()}},o,{bgColor:o.primaryColor,url:t})):e.addEventListener("click",(e=>{e.preventDefault(),r.show()}))}}))}function Re(){return Re=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.push(e)},i=o({rules:n,cache:t,insert:r,prefix:e});if("undefined"!=typeof document){const a=document.createElement("style");a.id="every-styles";const c=document.head.appendChild(a).sheet;r=function(e){n.push(e),null==c||c.insertRule(e,c.cssRules.length)},i=o({rules:n,cache:t,insert:r,prefix:e})}return i}();var Ue=function(){const e="every-embedded-",t={},n=[];let r=e=>{n.push(e)},i=o({rules:n,cache:t,insert:r,prefix:e});return"undefined"!=typeof document&&(r=e=>{var t;const o=document.querySelector("#every-shadow-wrapper"),r=null==o||null==(t=o.shadowRoot)?void 0:t.querySelector("#every-shadow-styles");if(r){if(!r.innerHTML){r.innerHTML=He;for(const e of n)r.innerHTML+=e}r.innerHTML+=e}n.push(e)},i=o({rules:n,cache:t,insert:r,prefix:e})),i}();const Fe=Be({display:"flex",alignItems:"center",width:"max-content",border:"none",outline:"none",fontFamily:De.BasisGrotesque,fontWeight:500,lineHeight:1,cursor:"pointer",textDecoration:"none",backfaceVisibility:"hidden",transition:"background-color 0.25s",padding:"12px 20px",color:"#fff",backgroundColor:"#00a380",borderRadius:"100px",fontSize:"16px","&:hover":{backgroundColor:"#2F806D"}}),Ge=Be({width:"16px",height:"16px",fill:"#fff",marginRight:"8px"}),Xe=Be({transform:"translateY(0.08em)"});let qe=function(e){return e.DONATE_NONPROFIT_ID="donateTo",e.JOIN_DONATION_ID="joinTo",e.JOIN_DONATION_USER_ID="joinUser",e.MATCH_CAMPAIGN="match",e.DONATION_HEADER_TEXT="donation_header_text",e.REDIRECT_URL="redirect_url",e.FUNDRAISER_ID="fundraiser_id",e.MIN_VALUE="min_value",e.FREQUENCY_OPTIONS="frequency_options",e.REQUIRE_SHARE_INFO="require_share_info",e.METHOD="method",e.AMOUNT="amount",e.FREQUENCY="frequency",e.DONOR_FIRST_NAME="first_name",e.DONOR_LAST_NAME="last_name",e.DONOR_EMAIL="email",e.DESCRIPTION="description",e.MONTHLY_TITLE="monthlyTitle",e.PARTNER_DONATION_ID="partner_donation_id",e.PARTNER_WEBHOOK_TOKEN="webhook_token",e.PARTNER_METADATA="partner_metadata",e.TO_NONPROFITS="to_nonprofits",e.TO_NONPROFIT_WEIGHTS="to_nonprofit_weights",e.TO_NONPROFIT_MATCHINGS="to_nonprofit_matchings",e.RECURRING_MATCHES="recurring_matches",e.SHARE_INFO="share_info",e.NO_EXIT="no_exit",e.SUCCESS_URL="success_url",e.EXIT_URL="exit_url",e.GIFT_CARD_AMOUNT="gift_card_amount",e.GIFT_CARD_QUANTITY="gift_card_quantity",e.GIFT_CARD_NONPROFIT_ID="gift_card_nonprofit_ID",e.GIFT_CARD_TAG_ID="gift_card_tag_ID",e.THEME_COLOR="theme_color",e.THEME_COLOR_HIGHLIGHT="theme_color_highlight",e.CRYPTO_AMOUNT="crypto_amount",e.CRYPTO_CURRENCY="crypto_currency",e.STOCK_SYMBOL="stock_symbol",e.STOCK_AMOUNT="stock_amount",e.SUGGESTED_AMOUNTS="suggestedAmounts",e.DESIGNATION="designation",e.PRIVATE_NOTE="private_note",e.PUBLIC_TESTIMONY="public_testimony",e.SEARCH_META="search_meta",e.GIFT_CARD_CODE="gift_card_code",e}({}),$e=function(e){return e.utm_source="utm_source",e.utm_medium="utm_medium",e.utm_campaign="utm_campaign",e.utm_term="utm_term",e.utm_content="utm_content",e}({});const Ve="https://www.every.org/",We="https://partners.every.org/v0.2/nonprofit",ze="team@every.org",Ze="crypto@every.org",Ye="fundraiser",Ke=Ve+"terms",Qe=Ve+"support",Je=Ve+"privacy",et=Ve+"about-us",tt=Ve+"gift",nt=["frequency","amount"],ot=["stockAmount","stockSymbol"],rt=["cryptoAmount","cryptoCurrency"],it=["redeemGiftCardInFlow","giftCardCode"],at="donate-button-0.4",ct="donate";var lt;const st=["withLogo","textColor","bgColor","borderRadius","fontSize","padding","className","onClick","target","url","label"];var ut=e=>{let{withLogo:t=!0,textColor:n="#fff",bgColor:o="#00a380",borderRadius:r="100px",fontSize:i="16px",padding:s="12px 20px",className:u,onClick:d,target:p="_blank",url:f,label:h="Donate"}=e,b=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,st);const m=f||`${c(y=b)}?${a(l(y))}#/${ct}`;var y;return Object(Pe.h)("a",{href:m,style:{background:o,color:n,borderRadius:r,fontSize:i,padding:s},className:[Fe,u].filter(Boolean).join(" "),target:p,onClick:d?e=>{e.preventDefault(),d()}:void 0},t&&Object(Pe.h)("svg",{className:Ge,style:{color:n,height:i,width:i},width:"64",height:"56",viewBox:"0 0 64 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},lt||(lt=Object(Pe.h)("path",{d:"M48.3746 20.9558C48.3746 9.03877 38.4374 0 25.6754 0C11.4001 0 0 12.0685 0 27.0153C0 43.1235 12.8125 56 30.0639 56C47.3153 56 62.7508 42.3156 63.9614 24.3895H56.0924C54.6295 37.8215 43.2799 48.1226 30.0639 48.1226C17.3523 48.1226 7.91952 38.7809 7.91952 27.0153C7.91952 16.4112 15.7886 7.87737 25.6754 7.87737C33.948 7.87737 40.4551 13.5329 40.4551 20.9558C40.4551 27.1163 36.0161 32.2669 30.1143 32.2669V40.1443C40.556 40.1443 48.3746 31.4085 48.3746 20.9558Z"}))),Object(Pe.h)("span",{className:Xe},h))};let dt=function(e){return e.Monthly="monthly",e.OneTime="once",e.Unselected="",e}({}),pt=function(e){return e.CREDIT_CARD="card",e.BANK="bank",e.PAYPAL="paypal",e.VENMO="venmo",e.PAYMENT_REQUEST="pay",e.CRYPTO="crypto",e.STOCKS="stocks",e.DAF="daf",e.GIFT_CARD="gift",e}({});const ft=[pt.VENMO,pt.DAF,pt.CRYPTO,pt.STOCKS],ht=Object.values(pt),bt=ht.filter((e=>e!==pt.GIFT_CARD)),mt=[pt.CREDIT_CARD,pt.PAYPAL,pt.GIFT_CARD,pt.BANK,pt.CRYPTO,pt.DAF,pt.VENMO,pt.STOCKS,pt.PAYMENT_REQUEST],yt=5;var gt=function(e){return e.MIN_AMOUNT="minAmount",e.THEME_COLOR="themeColor",e}(gt||{});const vt=()=>{const e=document.createElement("style");e.innerHTML='\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Regular-Pro.woff2) format("woff2");\n font-weight: 400;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Bold-Pro.woff2) format("woff2");\n font-weight: bold;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Medium-Pro.woff2) format("woff2");\n font-weight: 500;\n font-style: normal;\n font-display: swap;\n }\n ',document.head.append(e)};var _t,Ot,Ct,jt,wt=0,Nt=[],kt=[],St=Pe.options.__b,Tt=Pe.options.__r,xt=Pe.options.diffed,At=Pe.options.__c,Et=Pe.options.unmount;Pe.options.__b=function(e){Ot=null,St&&St(e)},Pe.options.__r=function(e){Tt&&Tt(e),_t=0;var t=(Ot=e.__c).__H;t&&(Ct===Ot?(t.__h=[],Ot.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=kt,e.__N=e.i=void 0}))):(t.__h.forEach(O),t.__h.forEach(C),t.__h=[],_t=0)),Ct=Ot},Pe.options.diffed=function(e){xt&&xt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Nt.push(t)&&jt===Pe.options.requestAnimationFrame||((jt=Pe.options.requestAnimationFrame)||_)(v)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==kt&&(e.__=e.__V),e.i=void 0,e.__V=kt}))),Ct=Ot=null},Pe.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(O),e.__h=e.__h.filter((function(e){return!e.__||C(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Pe.options.__e(n,e.__v)}})),At&&At(e,t)},Pe.options.unmount=function(e){Et&&Et(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{O(e)}catch(e){t=e}})),n.__H=void 0,t&&Pe.options.__e(t,n.__v))};var It,Rt="function"==typeof requestAnimationFrame,Mt=n("nr9d"),Lt=n.n(Mt);const Pt={methods:Object.values(bt),show:!1,addAmounts:[10,50,100],defaultFrequency:dt.Unselected,minDonationAmount:5,primaryColor:"#018669",showGiftCardOption:!1,redeemGiftCardInFlow:!1,previewMode:"1"===(null==(It=N())?void 0:It.previewMode)},Dt={arrayMerge:(e,t)=>t},Ht=Object(Pe.createContext)({}),Bt=({options:e,children:t})=>{const n=(e=>{var t;const n=null==(t=e.methods)?void 0:t.filter((e=>ht.includes(e))),o=(n&&n.length>0?n:bt).concat(e.showGiftCardOption?[pt.GIFT_CARD]:[]);return Lt.a.all([Pt,e,{methods:o}],Dt)})(e);return Object(Pe.h)(Ht.Provider,{value:n},t)},Ut=()=>g(Ht),Ft=Symbol("FundraiserFetchError"),Gt=Symbol("FundraiserFetching"),Xt=Object(Pe.createContext)({fundraiser:Gt}),qt=({children:e})=>{const{fundraiserSlug:t,nonprofitSlug:n}=Ut(),[o,r]=p(Gt),i=y((async()=>{if(t)try{const e=await async function(e,t){const n=`${We}/${e}/fundraiser/${t}`;return(await fetch(n).then((async e=>e.json()))).data.fundraiser}(n,t);r(e)}catch(e){r(Ft)}else r(void 0)}),[n,t]);return h((()=>{i()}),[i]),Object(Pe.h)(Xt.Provider,{value:{fundraiser:o}},e)};let $t=function(e){return e.STRIPE_CONNECT="STRIPE_CONNECT",e.PAYPAL_GRANTS="PAYPAL_GRANTS",e.NFG_BATCH_FILE="NFG_BATCH_FILE",e.MANUAL="MANUAL",e}({});const Vt=Symbol("NonprofitFetchError"),Wt=Symbol("NonprofitFetching"),zt=Object(Pe.createContext)({nonprofit:Wt}),Zt=({children:e})=>{const{nonprofitSlug:t}=Ut(),[n,o]=p(Wt),[r,i]=p(),a=y((async()=>{try{var e;const n=await k(t);o(n);const r=1===(null==(e=n.eligibleDonationRecipientNonprofitIds)?void 0:e.length)?n.eligibleDonationRecipientNonprofitIds[0]:void 0;if(r)try{const e=await k(r);i(e)}catch(e){i(void 0)}}catch(e){o(Vt)}}),[t]);return h((()=>{a()}),[a]),Object(Pe.h)(zt.Provider,{value:{nonprofit:n,parentNonprofit:r}},e)};var Yt="https://js.stripe.com/v3",Kt=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Qt="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Jt=null,en=function(e){return null!==Jt||(Jt=new Promise((function(t,n){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(Qt),window.Stripe)t(window.Stripe);else try{var o=function(){for(var e=document.querySelectorAll('script[src^="'.concat(Yt,'"]')),t=0;t element.");return o.appendChild(n),n}(e)),o.addEventListener("load",(function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))})),o.addEventListener("error",(function(){n(new Error("Failed to load Stripe.js"))}))}catch(e){return void n(e)}else t(null)}))),Jt},tn=Promise.resolve().then((function(){return en(null)})),nn=!1;tn.catch((function(e){nn||console.warn(e)}));var on=function(){for(var e=arguments.length,t=new Array(e),n=0;n{var n;const o=Ut(),[r,i]=p(o.defaultFrequency),[a,c]=p(null!=(n=o.amount)?n:o.defaultDonationAmount);h((()=>{c(o.amount)}),[o.amount]);const[l,s]=p(null),[u,d]=p(o.methods[0]);h((()=>{o.methods.includes(u)||d(o.methods[0])}),[o.methods,u]);const[f,b]=p(),[m,y]=p(),[g,v]=p(),[_,O]=p(),C=S(),[j,w]=p(),[N,k]=p(),[T,x]=p(),[A,E]=p("apple");return Object(Pe.h)(cn.Provider,{value:{frequency:r,setFrequency:i,donationAmount:a,setDonationAmount:c,hideWidget:t,submitError:l,setSubmitError:s,selectedPaymentMethod:u,setSelectedPaymentMethod:d,stockAmount:f,setStockAmount:b,stockSymbol:m,setStockSymbol:y,cryptoAmount:g,setCryptoAmount:v,cryptoCurrency:_,setCryptoCurrency:O,paymentRequestAvailable:C,privateNote:j,setPrivateNote:w,publicTestimony:N,setPublicTestimony:k,giftCardCode:T,setGiftCardCode:x,subMethod:A,setSubMethod:E}},e)},sn=({options:e,hide:t,children:n})=>Object(Pe.h)(Bt,{options:e},Object(Pe.h)(ln,{hide:t},Object(Pe.h)(Zt,null,Object(Pe.h)(qt,null,n))));let un=function(e){return e.PhoneOnly="@media only screen and (max-width: 37.44em)",e.TabletUp="@media only screen and (min-width: 37.5em)",e.TabletLandscapeUp="@media only screen and (min-width: 56.25em)",e.DesktopUp="@media only screen and (min-width: 75em)",e.BigDesktopUp="@media only screen and (min-width: 112.5em)",e}({}),dn=function(e){return e.LightGray="#EAEDED",e.Gray="#f3f6f6",e.DarkGray="#868A8A",e.Black="#272727",e.Text="#2E3434",e.TextGray="#868383",e.TextOpaque="rgba(46, 52, 52, 0.6)",e.Error="#D95C35",e.ErrorShadow="rgba(217, 92, 53, 0.2)",e.Transparent="transparent",e.White="#fff",e}({});const pn={fontSize:"16px",lineHeight:"24px",letterSpacing:"-0.01em"},fn={fontSize:"32px",lineHeight:"36px"},hn={fontSize:"24px",lineHeight:"32px"},bn={fontSize:"20px",lineHeight:"24px"},mn={fontSize:"16px",lineHeight:"24px"},yn={fontSize:"14px",lineHeight:"20px"};let gn=function(e){return e.Empty="0",e.XXS="4px",e.XS="8px",e.S="12px",e.M="16px",e.L="20px",e.XL="24px",e.XXL="32px",e.Stack_XXS="0 0 4px 0",e.Stack_XS="0 0 8px 0",e.Stack_S="0 0 12px 0",e.Stack_M="0 0 16px 0",e.Stack_L="0 0 20px 0",e.Stack_XL="0 0 24px 0",e.Stack_XXL="0 0 32px 0",e.Inset_XXS="4px 4px 4px 4px",e.Inset_XS="8px 8px 8px 8px",e.Inset_S="12px 12px 12px 12px",e.Inset_M="16px 16px 16px 16px",e.Inset_L="20px 20px 20px 20px",e.Inset_XL="24px 24px 24px 24px",e.Inset_XXL="32px 32px 32px 32px",e.InsetSquish_XS="8px 16px",e.InsetSquish_S="12px 24px",e.InsetSquish_M="16px 32px",e.InsetSquish_L="20px 40px",e.InsetSquish_XL="24px 48px",e.Inline_XS="0 8px 0 0",e.Inline_S="0 12px 0 0",e.Inline_M="0 16px 0 0",e.Inline_L="0 20px 0 0",e.Inline_XL="0 24px 0 0",e.Inline_XXL="0 24px 0 0",e}({});const vn=e=>({display:"flex",flexDirection:"column","> *:not(:last-child)":{marginBottom:"number"==typeof e?`${e}px`:e}}),_n=e=>({display:"flex",flexDirection:"row","> *:not(:last-child)":{marginRight:"number"==typeof e?`${e}px`:e}}),On=e=>Ue(vn(e)),Cn=e=>vn(e),jn=e=>_n(e),wn=Ue({display:"flex",flexDirection:"column",gap:gn.M}),Nn={position:"relative",top:"-1px",transform:"rotate(180deg)"},kn={"> p":{marginBottom:gn.XS}},Sn=Ue(T({},kn,{maxHeight:"1000px",transition:"all 1s",opacity:"1"})),Tn=Ue(T({},kn,{opacity:"0",overflow:"hidden",maxHeight:"0",transition:"all 0.5s"})),xn=e=>Ue(T({},jn(gn.S),yn,{alignItems:"center",justifyContent:"space-between",width:"100%",border:"none",background:"transparent",textAlign:"start",padding:0,":hover":{cursor:"pointer"},"> svg":T({width:"16px",height:"16px"},e?Nn:{})},e?{fontWeight:700}:{fontWeight:500,color:dn.TextGray})),An=Ue({color:dn.Text,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}});var En,In,Rn,Mn,Ln,Pn,Dn,Hn,Bn;const Un=(e,t,n)=>{const o=function(e,t){var n;const o=null!=(n=e.metadata)&&n.prefixWithThe?`the ${e.name}`:e.name;return t?`the fund for ${o} hosted at ${t.name}`:o}(e,n),r=`100% of your donation is tax-deductible to the extent allowed by US law. \n Your donation is made to Every.org, a tax-exempt US 501(c)(3) charity that\n grants unrestricted funds to ${o} on your behalf. \n As a legal matter, Every.org must provide any donations to ${o} on an\n unrestricted basis, regardless of any designations or restrictions made by\n you.`,i=t&&!function(e){return e.nonprofitId===e.creatorNonprofitId}(t);let a="";return e.hasAdmin&&i?a=`Please note ${e.name} has not reviewed or approved the content of this peer-to-peer fundraiser.`:e.hasAdmin||i?!e.hasAdmin&&i&&(a=`Please note ${e.name} has not provided permission for this solicitation or reviewed or approved the content of this peer-to-peer fundraiser.`):a=`Please note ${e.name} has not provided permission for this solicitation.`,Object(Pe.h)("span",null,r," ",a)},Fn=Ue({backgroundColor:"white",padding:`${gn.XL} ${gn.XL} 0px`,borderRadius:"unset",overflow:"hidden",[un.TabletLandscapeUp]:{borderRadius:"16px",padding:gn.M}});var Gn=e=>e.filter((e=>Boolean(e))).join(" ");const Xn=({children:e,className:t})=>Object(Pe.h)("div",{className:Gn([Fn,t])},e),qn=()=>g(Xt).fundraiser,$n=()=>{const e=qn();if(e!==Ft&&e!==Gt)return e},Vn=()=>g(zt).nonprofit,Wn=()=>g(zt).parentNonprofit,zn=()=>{const e=Vn();if(e===Vt||e===Wt)throw new Error("Nonprofit error");return e},Zn=()=>g(cn);var Yn;const Kn=()=>Yn||(Yn=Object(Pe.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Object(Pe.h)("path",{d:"M6 9l6 6 6-6"})));var Qn,Jn;const eo=({faqData:e})=>{var t;const[n,o]=p(!1),{nonprofitSlug:r}=Ut();return null!=(t=e.hideSlugList)&&t.includes(r)?null:Object(Pe.h)("div",{className:(i=e.mobileOnly,Ue(T({},yn,i?{[un.TabletLandscapeUp]:{padding:"none"}}:{})))},Object(Pe.h)("button",{type:"button",className:xn(n),onClick:()=>{o(!n)}},Object(Pe.h)("span",null,e.title),Qn||(Qn=Object(Pe.h)(Kn,null))),Object(Pe.h)("div",{className:n?Sn:Tn},e.description));var i},to=()=>{const e=zn(),t=$n(),n=Wn(),{selectedPaymentMethod:o}=Zn(),r=[{id:"intro",title:"How does Every.org accept my donation?",description:Object(Pe.h)(Pe.Fragment,null,Object(Pe.h)("p",null,"Your donation is made to Every.org, a US 501(c)(3) public charity. Every.org will immediately send you a receipt by email."," ",A(e)),Object(Pe.h)("p",null,"This process ensures your eligibility for a tax deduction, enables you to consolidate your gift records, and reduces the burden on"," ",x(e),"."))},{id:"fees",title:"Are there any fees?",description:R(o,e)},{id:"tax",title:"Is this donation tax-deductible?",description:Object(Pe.h)("p",null,"Yes,"," ",Un(e,t,n))},{id:"receipt",title:"Will I receive a receipt for my donation?",description:Jn||(Jn=Object(Pe.h)(Pe.Fragment,null,Object(Pe.h)("p",null,"Yes, after your donation payment is confirmed, you will immediately get a receipt emailed to you."),Object(Pe.h)("p",null,"Additionally, if you have an Every.org account, you can always get a single itemized receipt that shows all your donations in a given year.")))},{id:"p2p",mobileOnly:!0,hideSlugList:["irc"],title:`How else can I support ${e.name}?`,description:Object(Pe.h)("p",null,"You can also rally your friends, family, and social networks to support this nonprofit by starting your own fundraiser for them."," ",Object(Pe.h)("a",{className:An,href:Ve+e.primarySlug+"/"+Ye},"Start a fundraiser for ",e.name))}];return Object(Pe.h)(Xn,null,Object(Pe.h)("div",{className:wn},r.map((e=>Object(Pe.h)(eo,{key:e.id,faqData:e})))))},no=Ue(M({padding:`${gn.XL} ${gn.XL} 0px`,backgroundColor:"unset",display:"flex",flexDirection:"column"},yn,{color:dn.TextGray,[un.TabletLandscapeUp]:{padding:`0px ${gn.L}`},"> p":{margin:0},"> p:not(:last-child)":{marginBottom:gn.XS}})),oo=Ue({color:dn.TextGray,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}});var ro,io,ao,co;const lo=["children"],so=D({address:"support@every.org"}),uo=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,lo);return Object(Pe.h)("a",H({className:oo},n),t)},po=()=>{const e=zn(),t=$n(),n=Wn();return Object(Pe.h)(Xn,{className:no},Object(Pe.h)("p",null,Un(e,t,n)," ",ro||(ro=Object(Pe.h)(uo,{href:Ke},"See Terms"))),io||(io=Object(Pe.h)("p",null,"Need help? See FAQs or contact us at our"," ",Object(Pe.h)(uo,{href:Qe},"Help Center"),".")),ao||(ao=Object(Pe.h)("p",null,"Have ideas for how we can build a better donation experience?"," ",Object(Pe.h)(uo,{href:so},"Send us feedback"),".")),co||(co=Object(Pe.h)("p",null,"We respect your privacy. To learn more, check out our"," ",Object(Pe.h)(uo,{href:Je},"Privacy Policy"),".")))},fo=e=>Ue({color:e,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}}),ho=Ue({display:"none",[un.TabletLandscapeUp]:{display:"block"}}),bo=()=>{var e;const{primaryColor:t,nonprofitSlug:n}=Ut();if(null!=(e=zn().metadata)&&e.hideFundraiseButton)return null;const o=Ve+n+"/"+Ye;return Object(Pe.h)(Xn,{className:ho},Object(Pe.h)("p",null,Object(Pe.h)("a",{className:fo(t),href:o},"Start a fundraiser")," ","to rally your friends and family"))},mo=Ue({display:"grid",gridGap:0,gridTemplateColumns:"1fr",gridTemplateAreas:'"header"\n "promoBanners"\n "nonprofitInfo"\n "paymentProcess"\n "fundraiserLink"\n "faq"\n "footer"',[un.TabletLandscapeUp]:{gridColumnGap:gn.XL,gridTemplateColumns:"1fr 2fr",gridTemplateRows:"auto auto auto auto auto 1fr",gridTemplateAreas:'"header header"\n "promoBanners promoBanners"\n "nonprofitInfo paymentProcess"\n "fundraiserLink paymentProcess"\n "faq paymentProcess"\n "faq footer"',"& > div:not(:last-child):not(:empty)":{marginBottom:gn.XL}},"& > #every-header":{gridArea:"header",display:"block",[un.TabletLandscapeUp]:{display:"none"}},"& > #every-promoBanners":{gridArea:"promoBanners"},"& > #every-nonprofitInfo":{gridArea:"nonprofitInfo"},"& > #every-paymentProcess":{gridArea:"paymentProcess"},"& > #every-faq":{gridArea:"faq"},"& > #every-fundraiserLink":{gridArea:"fundraiserLink"},"& > #every-footer":{gridArea:"footer"}}),yo=({children:e})=>Object(Pe.h)("div",{className:mo},e),go=Ue({cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",backgroundColor:"transparent",fontFamily:De.BasisGrotesque}),vo=Ue({display:"block",[un.TabletLandscapeUp]:{display:"none"}}),_o=Ue({position:"absolute",right:gn.XL,top:gn.XL,padding:gn.XXS,background:"white",borderRadius:"8px",display:"none",[un.TabletLandscapeUp]:{display:"block"}}),Oo=()=>{const{primaryColor:e}=Ut();return Object(Pe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.h)("path",{d:"M18 6L6 18",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Object(Pe.h)("path",{d:"M6 6L18 18",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))};var Co;const jo=({className:e})=>{const{hideWidget:t}=Zn();return Object(Pe.h)("button",{type:"button",className:Gn([go,e]),onClick:t},Co||(Co=Object(Pe.h)(Oo,null)))},wo=Ue({display:"flex",justifyContent:"flex-end",alignItems:"center",padding:`${gn.M} ${gn.XL}`,[un.TabletLandscapeUp]:{padding:0}});var No;const ko=()=>No||(No=Object(Pe.h)("div",{className:wo},Object(Pe.h)(jo,{className:vo})));let So=function(e){return e.Small="4px",e.Default="8px",e.Medium="24px",e.Big="100px",e.Circle="100%",e}({});const To=Ue({lineHeight:"20px",fontWeight:"unset","> span":{fontWeight:700}}),xo=(Ue({lineHeight:"20px",fontWeight:"unset","> span":{fontWeight:700}}),e=>Ue({borderRadius:So.Circle,overflow:"hidden",display:"block",backgroundImage:`url(${e})`,backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundPosition:"center",width:"40px",height:"40px",flexShrink:0,[un.TabletLandscapeUp]:{width:"64px",height:"64px"}})),Ao=e=>Gn([xo(e),Ue({width:"32px",height:"32px",flexShrink:0,[un.TabletLandscapeUp]:{width:"40px",height:"40px"}})]),Eo=Ue({padding:`${gn.XL}`,[un.TabletLandscapeUp]:B({},Cn(gn.S),{padding:`${gn.L}`})}),Io=Ue({display:"none",overflow:"hidden",[un.TabletLandscapeUp]:{display:"flex",gap:`${gn.S}`,flexDirection:"column",padding:`${gn.L}`}}),Ro=Ue({display:"flex",gap:`${gn.S}`,padding:`${gn.XL}`,overflow:"hidden",[un.TabletLandscapeUp]:{display:"none",flexDirection:"column",padding:`${gn.L}`}}),Mo=Ue(B({},jn(gn.S),{alignItems:"center"})),Lo=Ue({display:"flex",gap:`${gn.S}`,alignItems:"center","& > .every-embedded-fundraiser-card__nonprofit-name":{display:"none",[un.TabletLandscapeUp]:{display:"block"}}}),Po=Ue(B({},yn,{color:"rgba(0, 0, 0, 0.7)",display:"none",[un.TabletLandscapeUp]:{display:"block"}})),Do=e=>Ue({overflow:"hidden",overflowWrap:"anywhere",wordBreak:"break-word",textOverflow:"ellipsis",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":e,alignItems:"start"}),Ho="NonprofitAvatarPlaceholder",Bo=(e,t)=>`https://res.cloudinary.com/everydotorg/image/upload/f_auto,q_auto${t?`,${function(e){var t;if(0===e.width||0===e.height)throw new Error("dimensions cannot be 0");return[`c_${null!=(t=e.fillMode)?t:"lfill"}`,e.width?`w_${Math.floor(e.width)}`:void 0,e.height?`h_${Math.floor(e.height)}`:void 0].filter((e=>void 0!==e)).join(",")}(t)}`:""}/${e}`;var Uo;const Fo=({fundraiser:e})=>Object(Pe.h)(Pe.Fragment,null,Object(Pe.h)(Go,{fundraiser:e}),Object(Pe.h)(Xo,{fundraiser:e})),Go=({fundraiser:e})=>{const{name:t,logoCloudinaryId:n,coverImageCloudinaryId:o}=zn(),r=Bo(null!=n?n:Ho),i=o&&Bo(o,{width:320});return Object(Pe.h)(Xn,{className:Io},Object(Pe.h)("div",{className:Lo},Object(Pe.h)("div",{alt:"nonprofit logo",className:Ao(r)}),Object(Pe.h)("div",{className:"every-embedded-fundraiser-card__nonprofit-name"},Object(Pe.h)("h2",{className:Do(1)},t),e.creatorNonprofitId===e.nonprofitId&&(Uo||(Uo=Object(Pe.h)("p",{className:Po},"Official fundraiser"))))),i&&Object(Pe.h)("div",{className:(a=i,Ue({backgroundImage:`url(${a})`,backgroundSize:"cover",width:"calc(100% + 25px + 25px)",height:"160px",position:"relative",left:"-25px"}))}),Object(Pe.h)("h1",{className:To},Object(Pe.h)("span",null,e.title)),e.description&&Object(Pe.h)("p",{className:Gn([Po,Do(3)])},e.description));var a},Xo=({fundraiser:e})=>{const{logoCloudinaryId:t,coverImageCloudinaryId:n}=zn(),o=Bo(null!=t?t:Ho);n&&Bo(n);return Object(Pe.h)(Xn,{className:Ro},Object(Pe.h)("div",{className:Lo},Object(Pe.h)("div",{alt:"nonprofit logo",className:Ao(o)}),Object(Pe.h)("h1",{className:To},Object(Pe.h)("span",null,e.title))))};var qo;const $o=()=>{const{name:e,logoCloudinaryId:t,hasAdmin:n}=zn(),o=Bo(null!=t?t:Ho);return Object(Pe.h)(Xn,{className:Eo},Object(Pe.h)("div",{className:Mo},Object(Pe.h)("div",{alt:"nonprofit logo",className:xo(o)}),Object(Pe.h)("h1",{className:To},n?Object(Pe.h)(Pe.Fragment,null,Object(Pe.h)("span",null,e)," is using Every.org to accept this donation"):Object(Pe.h)(Pe.Fragment,null,"Every.org created this page for ",Object(Pe.h)("span",null,e)))),qo||(qo=Object(Pe.h)("p",{className:Po},"Every.org is a 501(c)(3) nonprofit inspiring generosity and philanthropy for everyone.")))};var Vo;const Wo=()=>{const e=$n();return e?Object(Pe.h)(Fo,{fundraiser:e}):Vo||(Vo=Object(Pe.h)($o,null))};var zo;const Zo=Ue({display:"flex",alignItems:"center",gap:gn.XXS,color:"rgba(196, 83, 48, 1)","& > svg > path":{stroke:"rgba(196, 83, 48, 1)"}}),Yo=({message:e})=>e?Object(Pe.h)("div",{className:Zo},zo||(zo=Object(Pe.h)(Oo,null)),Object(Pe.h)("span",null,e)):null;var Ko=1e6,Qo=1e6,Jo="[big.js] ",er=Jo+"Invalid ",tr=er+"decimal places",nr=er+"rounding mode",or=Jo+"Division by zero",rr={},ir=void 0,ar=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;rr.abs=function(){var e=new this.constructor(this);return e.s=1,e},rr.cmp=function(e){var t,n=this,o=n.c,r=(e=new n.constructor(e)).c,i=n.s,a=e.s,c=n.e,l=e.e;if(!o[0]||!r[0])return o[0]?i:r[0]?-a:0;if(i!=a)return i;if(t=i<0,c!=l)return c>l^t?1:-1;for(a=(c=o.length)<(l=r.length)?c:l,i=-1;++ir[i]^t?1:-1;return c==l?0:c>l^t?1:-1},rr.div=function(e){var t=this,n=t.constructor,o=t.c,r=(e=new n(e)).c,i=t.s==e.s?1:-1,a=n.DP;if(a!==~~a||a<0||a>Ko)throw Error(tr);if(!r[0])throw Error(or);if(!o[0])return e.s=i,e.c=[e.e=0],e;var c,l,s,u,d,p=r.slice(),f=c=r.length,h=o.length,b=o.slice(0,c),m=b.length,y=e,g=y.c=[],v=0,_=a+(y.e=t.e-e.e)+1;for(y.s=i,i=_<0?0:_,p.unshift(0);m++m?1:-1;else for(d=-1,u=0;++db[d]?1:-1;break}if(!(u<0))break;for(l=m==c?r:p;m;){if(b[--m]_&&U(y,_,n.RM,b[0]!==ir),y},rr.eq=function(e){return 0===this.cmp(e)},rr.gt=function(e){return this.cmp(e)>0},rr.gte=function(e){return this.cmp(e)>-1},rr.lt=function(e){return this.cmp(e)<0},rr.lte=function(e){return this.cmp(e)<1},rr.minus=rr.sub=function(e){var t,n,o,r,i=this,a=i.constructor,c=i.s,l=(e=new a(e)).s;if(c!=l)return e.s=-l,i.plus(e);var s=i.c.slice(),u=i.e,d=e.c,p=e.e;if(!s[0]||!d[0])return d[0]?e.s=-l:s[0]?e=new a(i):e.s=1,e;if(c=u-p){for((r=c<0)?(c=-c,o=s):(p=u,o=d),o.reverse(),l=c;l--;)o.push(0);o.reverse()}else for(n=((r=s.length0)for(;l--;)s[t++]=0;for(l=t;n>c;){if(s[--n]0?(l=a,o=s):(t=-t,o=c),o.reverse();t--;)o.push(0);o.reverse()}for(c.length-s.length<0&&(o=s,s=c,c=o),t=s.length,n=0;t;c[t]%=10)n=(c[--t]=c[t]+s[t]+n)/10|0;for(n&&(c.unshift(n),++l),t=c.length;0===c[--t];)c.pop();return e.c=c,e.e=l,e},rr.pow=function(e){var t=this,n=new t.constructor("1"),o=n,r=e<0;if(e!==~~e||e<-1e6||e>Qo)throw Error(er+"exponent");for(r&&(e=-e);1&e&&(o=o.times(t)),e>>=1;)t=t.times(t);return r?n.div(o):o},rr.prec=function(e,t){if(e!==~~e||e<1||e>Ko)throw Error(er+"precision");return U(new this.constructor(this),e,t)},rr.round=function(e,t){if(e===ir)e=0;else if(e!==~~e||e<-Ko||e>Ko)throw Error(tr);return U(new this.constructor(this),e+this.e+1,t)},rr.sqrt=function(){var e,t,n,o=this,r=o.constructor,i=o.s,a=o.e,c=new r("0.5");if(!o.c[0])return new r(o);if(i<0)throw Error(Jo+"No square root");0===(i=Math.sqrt(o+""))||i===1/0?((t=o.c.join("")).length+a&1||(t+="0"),a=((a+1)/2|0)-(a<0||1&a),e=new r(((i=Math.sqrt(t))==1/0?"5e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+a)):e=new r(i+""),a=e.e+(r.DP+=4);do{e=c.times((n=e).plus(o.div(n)))}while(n.c.slice(0,a).join("")!==e.c.slice(0,a).join(""));return U(e,(r.DP-=4)+e.e+1,r.RM)},rr.times=rr.mul=function(e){var t,n=this,o=n.c,r=(e=new(0,n.constructor)(e)).c,i=o.length,a=r.length,c=n.e,l=e.e;if(e.s=n.s==e.s?1:-1,!o[0]||!r[0])return e.c=[e.e=0],e;for(e.e=c+l,ic;)a=t[l]+r[c]*o[l-c-1]+a,t[l--]=a%10,a=a/10|0;t[l]=a}for(a?++e.e:t.shift(),c=t.length;!t[--c];)t.pop();return e.c=t,e},rr.toExponential=function(e,t){var n=this,o=n.c[0];if(e!==ir){if(e!==~~e||e<0||e>Ko)throw Error(tr);for(n=U(new n.constructor(n),++e,t);n.c.lengthKo)throw Error(tr);for(e=e+(n=U(new n.constructor(n),e+n.e+1,t)).e+1;n.c.length=t.PE,!!e.c[0])},rr.toNumber=function(){var e=Number(F(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(e.toString()))throw Error(Jo+"Imprecise conversion");return e},rr.toPrecision=function(e,t){var n=this,o=n.constructor,r=n.c[0];if(e!==ir){if(e!==~~e||e<1||e>Ko)throw Error(er+"precision");for(n=U(new o(n),e,t);n.c.length=o.PE,!!r)},rr.valueOf=function(){var e=this,t=e.constructor;if(!0===t.strict)throw Error(Jo+"valueOf disallowed");return F(e,e.e<=t.NE||e.e>=t.PE,!0)};var cr=function e(){function t(n){var o=this;if(!(o instanceof t))return n===ir?e():new t(n);if(n instanceof t)o.s=n.s,o.e=n.e,o.c=n.c.slice();else{if("string"!=typeof n){if(!0===t.strict&&"bigint"!=typeof n)throw TypeError(er+"value");n=0===n&&1/n<0?"-0":String(n)}!function(e,t){var n,o,r;if(!ar.test(t))throw Error(er+"number");e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(n=t.indexOf("."))>-1&&(t=t.replace(".",""));(o=t.search(/e/i))>0?(n<0&&(n=o),n+=+t.slice(o+1),t=t.substring(0,o)):n<0&&(n=t.length);for(r=t.length,o=0;o0&&"0"==t.charAt(--r););for(e.e=n-o-1,e.c=[],n=0;o<=r;)e.c[n++]=+t.charAt(o++)}}(o,n)}o.constructor=t}return t.prototype=rr,t.DP=20,t.RM=1,t.NE=-7,t.PE=21,t.strict=false,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}(),lr=n("kPAj");let sr=function(e){return e.Normal="1px solid",e.Big="4px solid",e}({});const ur=(e,t)=>`${e} ${t}`,dr=(Ue({border:ur(sr.Normal,dn.Error)}),(e,t)=>Ue({position:"relative",padding:gn.M,display:"flex",flexDirection:"row",alignItems:"center",borderRadius:So.Default,color:dn.Text,backgroundColor:dn.Gray,border:ur(sr.Normal,t?dn.Error:dn.LightGray),cursor:"text",":focus-within":{backgroundColor:"white",borderColor:t?dn.Error:e}})),pr=Ue({fontSize:mn.fontSize,lineHeight:mn.fontSize,fontFamily:"inherit",flex:1,border:"none",outline:"none",background:"transparent",width:"100%",minWidth:"unset",padding:0,margin:0,color:dn.Text,"::placeholder":{fontWeight:400},"::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:0},"::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0},"-moz-appearance":"textfield"}),fr=Ue({maxHeight:"250px","& input":{fontSize:mn.fontSize,lineHeight:mn.fontSize,fontWeight:400}}),hr=Ue({background:dn.White,borderRadius:`0 0 ${So.Default} ${So.Default}`,border:ur(sr.Normal,dn.LightGray),borderTop:"none"}),br=Ue({display:"flex",alignItems:"center",gap:gn.XXS}),mr=Ue({overflowY:"scroll",height:"100%",maxHeight:"200px"}),yr=Ue({borderBottom:ur(sr.Normal,dn.LightGray)}),gr=Ue(G({border:"none",background:"none",padding:`${gn.S} ${gn.M}`},mn,{width:"100%",display:"flex",alignItems:"center",gap:gn.XS,":hover":{cursor:"pointer"},"> span:last-of-type":G({marginLeft:"auto"},yn,{color:dn.TextGray})})),vr=(e,t)=>Ue(G({marginLeft:"auto"},yn,{color:dn.TextGray,display:"flex",gap:gn.XS,alignItems:"center","> svg":G({color:e},t?Nn:{})})),_r=Ue({borderRadius:`${So.Default} ${So.Default} 0 0 `}),Or=e=>Gn([dr(e)]),Cr=Ue({display:"flex",width:"100%",gap:gn.S,alignItems:"flex-end",fontWeight:500}),jr=Ue({display:"flex",flexDirection:"column",width:"100%",gap:gn.XXS,"> input":G({width:"100%",textAlign:"right",fontWeight:700},hn),textAlign:"right"}),wr=Ue({gap:gn.XXS,display:"flex",flexDirection:"column"}),Nr=Ue(G({},pn,{outline:"none",border:"none",fontFamily:"inherit",cursor:"pointer",padding:gn.XXS,transform:"rotate(90deg)",color:dn.TextGray,"> svg":{strokeWidth:"2px"}})),kr=Ue({border:ur(sr.Normal,dn.Error)}),Sr=Ue({fontSize:hn.fontSize,lineHeight:hn.fontSize,fontWeight:700}),Tr=Ue(X({},hn,{fontWeight:700,display:"inline-flex",marginRight:gn.XXS})),xr=e=>Ue(X({},bn,{fontWeight:700,color:e,display:"inline-flex",marginLeft:gn.XXS})),Ar=Ue(X({},jn(gn.M),{justifyContent:"center"})),Er=e=>Ue(X({},mn,{color:e,borderRadius:So.Big,fontWeight:500,border:"none",padding:0,fontFamily:"inherit",cursor:"pointer",background:"unset",[un.TabletLandscapeUp]:{border:`1px solid ${dn.DarkGray}`,padding:`${gn.XS} ${gn.L}`}}));(V.prototype=new Pe.Component).isPureReactComponent=!0,V.prototype.shouldComponentUpdate=function(e,t){return $(this.props,e)||$(this.state,t)};var Ir=Pe.options.__b;Pe.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ir&&Ir(e)};var Rr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911,Mr=Pe.options.__e;Pe.options.__e=function(e,t,n,o){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);Mr(e,t,n,o)};var Lr=Pe.options.unmount;Pe.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Lr&&Lr(e)},(Y.prototype=new Pe.Component).__c=function(e,t){var n=t.__c,o=this;null==o.t&&(o.t=[]),o.t.push(n);var r=K(o.__v),i=!1,a=function(){i||(i=!0,n.__R=null,r?r(c):c())};n.__R=a;var c=function(){if(! --o.__u){if(o.state.__a){var e=o.state.__a;o.__v.__k[0]=Z(e,e.__c.__P,e.__c.__O)}var t;for(o.setState({__a:o.__b=null});t=o.t.pop();)t.forceUpdate()}},l=!0===t.__h;o.__u++||l||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(a,a)},Y.prototype.componentWillUnmount=function(){this.t=[]},Y.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=z(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&Object(Pe.createElement)(Pe.Fragment,null,e.fallback);return r&&(r.__h=null),[Object(Pe.createElement)(Pe.Fragment,null,t.__a?null:e.children),r]};var Pr=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]{const n=b(),{primaryColor:o}=Ut(),{containerClassName:r,inputClassName:i}=e,a=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,zr);return Object(Pe.h)("div",{className:Gn([dr(o),r]),onClick:()=>{var e;null==(e=n.current)||e.focus()}},Object(Pe.h)("textarea",ne({ref:e=>{e&&(n.current=e,t&&(t.current=e))},className:Gn([pr,i])},a)))}));const Yr=["sufix","sufixClassName","prefix","prefixClassName","containerClassName","inputClassName","containerOnClick","error"];var Kr=W(((e,t)=>{const{sufix:n,sufixClassName:o,prefix:r,prefixClassName:i,containerClassName:a,inputClassName:c,containerOnClick:l,error:s}=e,u=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,Yr),d=b(),{primaryColor:p}=Ut();return Object(Pe.h)("div",{className:Gn([dr(p,Boolean(s)),a]),onClick:()=>{var e;l?l():null==(e=d.current)||e.focus()}},r&&Object(Pe.h)("div",{className:i},r),Object(Pe.h)("input",oe({ref:e=>{e&&(d.current=e,t&&(t.current=e))},className:Gn([pr,c])},u)),n&&Object(Pe.h)("div",{className:o},n))})),Qr=n.p+"58f20393bf2b41f944c6229c2af785b9.svg",Jr=n.p+"5982461fe2304c26f3a3cf4c50806dad.svg",ei=n.p+"b31a89ce5555412a0c8a4c6463286584.svg",ti=n.p+"26c9b1d3d7943e6e67cf13e039ba5ac8.svg",ni=n.p+"ddb1f3b63e33585263e5905706d6ff6d.svg",oi=n.p+"ad80427b5a2980f1d19884ede42b29de.svg",ri=n.p+"9052c75387065f76bb3436b7e4ce12cd.svg",ii=n.p+"3a5177b76709819ba4663556e60222f8.svg",ai=n.p+"f8f4253f02d1fbc4bf04d0959a6e614c.svg",ci=n.p+"4d81ee51fa2520df58ae092aeb3d0bd4.svg",li=n.p+"8098252f28e93069c75d6010d3ac6bc1.svg",si=n.p+"03c114f6e014588a4bde815d9bc85821.svg",ui=n.p+"5450d3cada4fd0370ab8d885765f5cc3.svg",di=n.p+"cc9ce389e9a4e0f518e3caeb7b60912d.svg",pi=n.p+"8f22b294629293d29895fddef0a8baea.svg",fi=n.p+"f588feb3cbbcc0fb259a3630ec7e34ba.svg",hi=n.p+"3e1eb932bdbaa2318584813bf468be53.svg",bi=n.p+"badb98080214485db486794fb59a95cc.svg",mi=n.p+"fc9295a4651c56d5b4e8c3aa13a93208.svg",yi=n.p+"e4bfa8eb04696d4fd5ea04ca4c35469b.svg",gi=n.p+"743324f8e09d34a894c21e91c396f289.svg",vi=n.p+"b9021bb757262a32de6d8931015051d9.svg",_i=n.p+"7ab9396038b4befda4354b2a476d9064.svg",Oi=n.p+"bc2c9e9d67b73656a6da5dd177aa10a2.svg",Ci=n.p+"6214ae0b42d798a0c9a51503a27a66bf.svg",ji=n.p+"45bcde5a98dbbdf2a4e0769eca2154f1.svg",wi=n.p+"8798fcc6fd2d5d3aeccea6ee3fcfec89.svg",Ni=n.p+"88611c6e2f9450f29ece8d2b36641670.svg";let ki=function(e){return e.AAVE="AAVE",e.ALCX="ALCX",e.ALGO="ALGO",e.AMP="AMP",e.ANKR="ANKR",e.APE="APE",e.API3="API3",e.AUDIO="AUDIO",e.AVAX="AVAX",e.AXS="AXS",e.BAT="BAT",e.BCH="BCH",e.BNB="BNB",e.BNT="BNT",e.BOND="BOND",e.BTC="BTC",e.CHZ="CHZ",e.COMP="COMP",e.CRV="CRV",e.CUBE="CUBE",e.CVC="CVC",e.DAI="DAI",e.DOGE="DOGE",e.DOT="DOT",e.ELON="ELON",e.ENS="ENS",e.ETH="ETH",e.FET="FET",e.FIL="FIL",e.FTM="FTM",e.GAL="GAL",e.GALA="GALA",e.GMT="GMT",e.GRT="GRT",e.GUSD="GUSD",e.INJ="INJ",e.JAM="JAM",e.KNC="KNC",e.KP3R="KP3R",e.LDO="LDO",e.LINK="LINK",e.LPT="LPT",e.LRC="LRC",e.LTC="LTC",e.MANA="MANA",e.MASK="MASK",e.MATIC="MATIC",e.MCO2="MCO2",e.MKR="MKR",e.MOB="MOB",e.NMR="NMR",e.OXT="OXT",e.PAXG="PAXG",e.QNT="QNT",e.QRDO="QRDO",e.RAY="RAY",e.REN="REN",e.RNDR="RNDR",e.SAMO="SAMO",e.SAND="SAND",e.SBR="SBR",e.SHIB="SHIB",e.SKL="SKL",e.SLP="SLP",e.SNX="SNX",e.SOL="SOL",e.STORJ="STORJ",e.SUSHI="SUSHI",e.UMA="UMA",e.UNI="UNI",e.USDC="USDC",e.USDT="USDT",e.XLM="XLM",e.XRP="XRP",e.XTZ="XTZ",e.YFI="YFI",e.ZBC="ZBC",e.ZEC="ZEC",e.ZRX="ZRX",e}({}),Si=function(e){return e.ERC20="ERC-20",e.SPL="SPL",e}({});const Ti=[ki.ALGO,ki.MOB,ki.XLM,ki.BNB],xi={[ki.AAVE]:{displayName:"Aave",abbreviation:"AAVE",decimalOffset:18,contractType:Si.ERC20,coingeckoId:"aave"},[ki.ALCX]:{displayName:"Alchemix",abbreviation:"ALCX",decimalOffset:18,contractType:Si.ERC20,coingeckoId:"alchemix"},[ki.ALGO]:{displayName:"Algorand",abbreviation:"ALGO",decimalOffset:6,coingeckoId:"algorand"},[ki.AMP]:{displayName:"Amp",abbreviation:"AMP",decimalOffset:18,contractType:Si.ERC20,coingeckoId:"amp-token"},[ki.ANKR]:{displayName:"Ankr",abbreviation:"ANKR",decimalOffset:18,contractType:Si.ERC20,coingeckoId:"ankr"},[ki.APE]:{displayName:"Apecoin",abbreviation:"APE",decimalOffset:18,contractType:Si.ERC20,coingeckoId:"apecoin"},[ki.API3]:{displayName:"API3",abbreviation:"API3",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"api3"},[ki.AUDIO]:{displayName:"Audius",abbreviation:"AUDIO",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"audius"},[ki.AVAX]:{displayName:"Avalanche",abbreviation:"AVAX",decimalOffset:9,coingeckoId:"avalanche-2"},[ki.AXS]:{displayName:"Axie Infinity",abbreviation:"AXS",decimalOffset:18,contractType:Si.ERC20,coingeckoId:"axs"},[ki.BAT]:{displayName:"Basic Attention Token",abbreviation:"BAT",decimalOffset:18,contractType:Si.ERC20,coingeckoId:"basic-attention-token"},[ki.BCH]:{displayName:"Bitcoin Cash",abbreviation:"BCH",decimalOffset:8,coingeckoId:"bitcoin-cash"},[ki.BNB]:{displayName:"Binance Coin",abbreviation:"BNB",decimalOffset:8,coingeckoId:"binancecoin"},[ki.BNT]:{displayName:"Bancor",abbreviation:"BNT",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"bancor"},[ki.BOND]:{displayName:"BarnBridge",abbreviation:"BOND",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"barnbridge"},[ki.BTC]:{displayName:"Bitcoin",abbreviation:"BTC",decimalOffset:8,coingeckoId:"bitcoin"},[ki.CHZ]:{displayName:"Chiliz",abbreviation:"CHZ",decimalOffset:18,contractType:Si.ERC20,coingeckoId:"chiliz"},[ki.COMP]:{displayName:"Compound",abbreviation:"COMP",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"compound-governance-token"},[ki.CRV]:{displayName:"Curve DAO Token",abbreviation:"CRV",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"curve-dao-token"},[ki.CUBE]:{displayName:"Cube",abbreviation:"CUBE",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"somnium-space-cubes"},[ki.CVC]:{displayName:"Civic",abbreviation:"CVC",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"civic"},[ki.DAI]:{displayName:"Dai",abbreviation:"DAI",decimalOffset:18,contractType:Si.ERC20,coingeckoId:"dai"},[ki.DOGE]:{displayName:"DogeCoin",abbreviation:"DOGE",decimalOffset:8,coingeckoId:"dogecoin"},[ki.DOT]:{displayName:"Polkadot",abbreviation:"DOT",decimalOffset:10,coingeckoId:"polkadot"},[ki.ELON]:{displayName:"Dogelon Mars",abbreviation:"ELON",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"dogelon-mars"},[ki.ENS]:{displayName:"Ethereum Name Service",abbreviation:"ENS",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"ethereum-name-service"},[ki.ETH]:{displayName:"Ethereum",abbreviation:"ETH",decimalOffset:18,coingeckoId:"ethereum"},[ki.FET]:{displayName:"Fetch.ai",abbreviation:"FET",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"fetch-ai"},[ki.FIL]:{displayName:"Filecoin",abbreviation:"FIL",decimalOffset:18,coingeckoId:"filecoin"},[ki.FTM]:{displayName:"Fantom",abbreviation:"FTM",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"fantom"},[ki.GAL]:{displayName:"Galaxe",abbreviation:"GAL",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"project-galaxy"},[ki.GALA]:{displayName:"Gala",abbreviation:"GALA",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"gala"},[ki.GMT]:{displayName:"STEPN",abbreviation:"GMT",contractType:Si.SPL,decimalOffset:9,coingeckoId:"stepn"},[ki.GRT]:{displayName:"The Graph",abbreviation:"GRT",decimalOffset:18,contractType:Si.ERC20,coingeckoId:"the-graph"},[ki.GUSD]:{displayName:"Gemini Dollar",abbreviation:"GUSD",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"gemini-dollar"},[ki.INJ]:{displayName:"Injective Protocol",abbreviation:"INJ",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"injective-protocol"},[ki.JAM]:{displayName:"Geojam",abbreviation:"JAM",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"geojam"},[ki.KNC]:{displayName:"Kyber types.Network",abbreviation:"KNC",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"kyber-network-crystal"},[ki.KP3R]:{displayName:"Keep3rV1",abbreviation:"KP3R",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"keep3rv1"},[ki.LDO]:{displayName:"Lido DAO",abbreviation:"LDO",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"lido-dao"},[ki.LINK]:{displayName:"Chainlink",abbreviation:"LINK",decimalOffset:18,contractType:Si.ERC20,coingeckoId:"chainlink"},[ki.LPT]:{displayName:"Livepeer",abbreviation:"LPT",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"livepeer"},[ki.LRC]:{displayName:"Loopring",abbreviation:"LRC",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"loopring"},[ki.LTC]:{displayName:"Litecoin",abbreviation:"LTC",decimalOffset:8,coingeckoId:"litecoin"},[ki.MANA]:{displayName:"Mana",abbreviation:"MANA",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"decentraland"},[ki.MASK]:{displayName:"Mask Network",abbreviation:"MASK",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"mask-network"},[ki.MATIC]:{displayName:"Polygon",abbreviation:"MATIC",decimalOffset:18,contractType:Si.ERC20,coingeckoId:"matic-network"},[ki.MCO2]:{displayName:"Moss Carbon Credit",abbreviation:"MCO2",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"moss-carbon-credit"},[ki.MKR]:{displayName:"Maker",abbreviation:"MKR",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"maker"},[ki.MOB]:{displayName:"MobileCoin",abbreviation:"MOB",decimalOffset:12,coingeckoId:"mobilecoin"},[ki.NMR]:{displayName:"Numeraire",abbreviation:"NMR",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"numeraire"},[ki.OXT]:{displayName:"Orchid",abbreviation:"OXT",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"orchid-protocol"},[ki.PAXG]:{displayName:"PAX Gold",abbreviation:"PAXG",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"pax-gold"},[ki.QNT]:{displayName:"Quant",abbreviation:"QNT",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"quant-network"},[ki.QRDO]:{displayName:"Qredo",abbreviation:"QRDO",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"qredo"},[ki.RAY]:{displayName:"Raydium",abbreviation:"RAY",decimalOffset:6,contractType:Si.SPL,coingeckoId:"raydium"},[ki.REN]:{displayName:"Ren",abbreviation:"REN",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"republic-protocol"},[ki.RNDR]:{displayName:"Render Token",abbreviation:"RNDR",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"render-token"},[ki.SAMO]:{displayName:"Samoyed",abbreviation:"SAMO",decimalOffset:9,contractType:Si.SPL,coingeckoId:"samoyedcoin"},[ki.SAND]:{displayName:"Sandbox",abbreviation:"SAND",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"the-sandbox"},[ki.SBR]:{displayName:"Saber",abbreviation:"SBR",decimalOffset:6,contractType:Si.SPL,coingeckoId:"saber"},[ki.SHIB]:{displayName:"Shiba Inu",abbreviation:"SHIB",decimalOffset:18,contractType:Si.ERC20,coingeckoId:"shiba-inu"},[ki.SKL]:{displayName:"Skale",abbreviation:"SKL",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"skale"},[ki.SLP]:{displayName:"Smooth Love Potion",abbreviation:"SLP",decimalOffset:18,contractType:Si.ERC20,coingeckoId:"smooth-love-potion"},[ki.SNX]:{displayName:"Synthetix",abbreviation:"SNX",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"havven"},[ki.SOL]:{displayName:"Solana",abbreviation:"SOL",decimalOffset:9,coingeckoId:"solana"},[ki.STORJ]:{displayName:"Storj",abbreviation:"STORJ",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"storj"},[ki.SUSHI]:{displayName:"SushiSwap",abbreviation:"SUSHI",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"sushi"},[ki.UMA]:{displayName:"UMA",abbreviation:"UMA",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"uma"},[ki.UNI]:{displayName:"Uniswap",abbreviation:"UNI",decimalOffset:18,contractType:Si.ERC20,coingeckoId:"uniswap"},[ki.USDC]:{displayName:"USD Coin",abbreviation:"USDC",decimalOffset:6,contractType:Si.ERC20,coingeckoId:"usd-coin"},[ki.USDT]:{displayName:"Tether",abbreviation:"USDT",decimalOffset:6,coingeckoId:"tether"},[ki.XLM]:{displayName:"Stellar",abbreviation:"XLM",decimalOffset:7,coingeckoId:"stellar"},[ki.XRP]:{displayName:"XRP",abbreviation:"XRP",decimalOffset:6,coingeckoId:"ripple"},[ki.XTZ]:{displayName:"Tezos",abbreviation:"XTZ",decimalOffset:6,coingeckoId:"tezos"},[ki.YFI]:{displayName:"Yearn Finance",abbreviation:"YFI",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"yearn-finance"},[ki.ZBC]:{displayName:"Zebec Protocol",abbreviation:"ZBC",contractType:Si.SPL,decimalOffset:9,coingeckoId:"zebec-protocol"},[ki.ZEC]:{displayName:"ZCash",abbreviation:"ZEC",decimalOffset:8,coingeckoId:"zcash"},[ki.ZRX]:{displayName:"0x",abbreviation:"ZRX",contractType:Si.ERC20,decimalOffset:18,coingeckoId:"0x"}},Ai={[ki.AAVE]:{iconCloudinaryId:"crypto/aave_oszkzj"},[ki.ALCX]:{iconCloudinaryId:"crypto/alcx_agfvh3"},[ki.AMP]:{iconCloudinaryId:"crypto/amp_zrgutx"},[ki.ANKR]:{iconCloudinaryId:"crypto/ankr_vipelu"},[ki.ALGO]:{icon:Qr},[ki.APE]:{icon:Jr},[ki.AVAX]:{icon:ei},[ki.AXS]:{iconCloudinaryId:"crypto/axs_vdwbc0"},[ki.BAT]:{icon:ti},[ki.BCH]:{icon:oi},[ki.BNB]:{icon:ni},[ki.BTC]:{icon:ri},[ki.CHZ]:{iconCloudinaryId:"crypto/chiliz_j11blm"},[ki.DAI]:{icon:ai},[ki.DOGE]:{icon:ci},[ki.DOT]:{icon:fi},[ki.ETH]:{icon:li},[ki.FIL]:{icon:si},[ki.GRT]:{icon:ui},[ki.LINK]:{icon:ii},[ki.LTC]:{icon:di},[ki.MATIC]:{icon:hi},[ki.MOB]:{icon:pi},[ki.RAY]:{icon:bi},[ki.SAMO]:{icon:yi},[ki.SBR]:{icon:mi},[ki.SHIB]:{icon:gi},[ki.SLP]:{iconCloudinaryId:"crypto/slp_clp71c"},[ki.SOL]:{icon:vi},[ki.UNI]:{icon:ji},[ki.USDC]:{icon:wi},[ki.USDT]:{icon:Oi},[ki.XLM]:{icon:_i},[ki.XRP]:{iconCloudinaryId:"crypto/xrp_uwcehg"},[ki.XTZ]:{icon:Ci},[ki.ZEC]:{icon:Ni},[ki.API3]:{iconCloudinaryId:"crypto/xb8xoz6kxev0uytaejlo"},[ki.AUDIO]:{iconCloudinaryId:"crypto/ucctvvgwedku9hexplp7"},[ki.BNT]:{iconCloudinaryId:"crypto/jgb6ub5gckohghdrt1ig"},[ki.BOND]:{iconCloudinaryId:"crypto/cidlkxmdqdoi2ezygfjj"},[ki.COMP]:{iconCloudinaryId:"crypto/ayjushqknohuz9x3hcx5"},[ki.CRV]:{iconCloudinaryId:"crypto/txyb4aa9a0skuhoyjcti"},[ki.CUBE]:{iconCloudinaryId:"crypto/n8su92fe1atqx79hrhqf"},[ki.CVC]:{iconCloudinaryId:"crypto/cw8ahifxtnfw8pbgh5o9"},[ki.ELON]:{iconCloudinaryId:"crypto/fvsarijyyz1v9j5w1sh2"},[ki.ENS]:{iconCloudinaryId:"crypto/naiw9tgamtvxcxctwxog"},[ki.FET]:{iconCloudinaryId:"crypto/mwfznnuw28qqeia4uwov"},[ki.FTM]:{iconCloudinaryId:"crypto/laq3m7el5wdfmlhwwtk0"},[ki.GAL]:{iconCloudinaryId:"crypto/a5km5rat7dpiz6ckkvfi"},[ki.GALA]:{iconCloudinaryId:"crypto/rifljrw1ry9wu1i7mxji"},[ki.GMT]:{iconCloudinaryId:"crypto/uyyddnskoabbpei7olin"},[ki.GUSD]:{iconCloudinaryId:"crypto/w8zltgl5ngsz1lqch17g"},[ki.INJ]:{iconCloudinaryId:"crypto/gi0voz42gn33azwaa11a"},[ki.JAM]:{iconCloudinaryId:"crypto/xmn1xxzccz84xiej1esw"},[ki.KNC]:{iconCloudinaryId:"crypto/mqdyhpc07mle6dkfomye"},[ki.KP3R]:{iconCloudinaryId:"crypto/eoabgtxyhpqqfhv1bxud"},[ki.LDO]:{iconCloudinaryId:"crypto/thmvnuxks9z3gthhypwb"},[ki.LPT]:{iconCloudinaryId:"crypto/setl154mkwd9kpfly7om"},[ki.LRC]:{iconCloudinaryId:"crypto/sazpx9zyfsgbmprmfag9"},[ki.MANA]:{iconCloudinaryId:"crypto/ekefdi1p3jgoeb08oszc"},[ki.MASK]:{iconCloudinaryId:"crypto/ykwym7djaofb2q6lcn5n"},[ki.MCO2]:{iconCloudinaryId:"crypto/ysuyysfrukryu1jw2wrh"},[ki.MKR]:{iconCloudinaryId:"crypto/tpdipvaap6m150j2hdec"},[ki.NMR]:{iconCloudinaryId:"crypto/bqecgq3rawel0k99tohj"},[ki.OXT]:{iconCloudinaryId:"crypto/ietkmjcp0yj71vlg0zjy"},[ki.PAXG]:{iconCloudinaryId:"crypto/yb5x1aizhhdn8mprrn2m"},[ki.QNT]:{iconCloudinaryId:"crypto/dwdx02ifn9fsvbw1pgfz"},[ki.QRDO]:{iconCloudinaryId:"crypto/jzbmlpvwoogroaaazkxz"},[ki.REN]:{iconCloudinaryId:"crypto/ili8nkjwnifmbfra20ly"},[ki.RNDR]:{iconCloudinaryId:"crypto/tm0klwno0hqjbcxsuvrp"},[ki.SAND]:{iconCloudinaryId:"crypto/w6g6ep4ghqpsz54vqzmy"},[ki.SKL]:{iconCloudinaryId:"crypto/zccvwa5yin8r32s4sfqy"},[ki.SNX]:{iconCloudinaryId:"crypto/sxvudvsjujuhdupwssvz"},[ki.STORJ]:{iconCloudinaryId:"crypto/le1ikh3apsrxyttjxg64"},[ki.SUSHI]:{iconCloudinaryId:"crypto/iivxx5mfdz1bckmhom1f"},[ki.UMA]:{iconCloudinaryId:"crypto/imxydvsf4mydmyjukbel"},[ki.YFI]:{iconCloudinaryId:"crypto/mal5muwn4fcsbuuyhohz"},[ki.ZBC]:{iconCloudinaryId:"crypto/hhiopvuac8qbpcnupgle"},[ki.ZRX]:{iconCloudinaryId:"crypto/ge5jqonw89ffg200z0in"}},Ei=Object.fromEntries(Object.values(ki).map((e=>[e,re({},xi[e],Ai[e])]))),Ii=({currency:e})=>Object(Pe.h)("img",{src:ie(e),alt:e+"_icon",width:24,height:24});var Ri;const Mi=()=>Ri||(Ri=Object(Pe.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-search"},Object(Pe.h)("circle",{cx:"11",cy:"11",r:"8"}),Object(Pe.h)("path",{d:"M21 21l-4.35-4.35"})));var Li,Pi,Di;const Hi=new Set([ki.BTC,ki.ETH,ki.USDC]),Bi=[],Ui=[],Fi=[];Object.values(ki).forEach((e=>{const t={value:n=e,label:ae(n),contractType:ce(n)};var n;Ti.includes(e)||(Bi.push(t),Hi.has(e)?Ui.push(t):Fi.push(t))}));const Gi=({onClick:e,option:t})=>Object(Pe.h)("li",{key:t.value,role:"option"},Object(Pe.h)("button",{type:"button",className:gr,onClick:()=>{e(t)}},Object(Pe.h)(Ii,{currency:t.value}),Object(Pe.h)("span",null,t.label),Object(Pe.h)("span",null,t.contractType))),Xi=()=>{const e=zn(),{primaryColor:t}=Ut(),n=`Contents: I would like to make a crypto donation to support https://www.every.org/${e.primarySlug}.\n\nMy name:\nToken name:\nToken symbol:\nToken quantity:\n\nPlease reply back with an address where I can donate, as this is worth over $5,000 USD.`;return Object(Pe.h)("a",{className:fo(t),href:D({address:Ze,subject:`Crypto donation for ${e.name}`,body:n})},Ze)},qi=()=>{const{submitError:e,cryptoCurrency:t,setCryptoCurrency:n}=Zn(),{primaryColor:o}=Ut(),r=b(null),[i,a]=p(Bi.find((e=>e.value===t))),[c,l]=p(null==i?void 0:i.label),[s,u]=p(!i),d=e=>{a(e),n(e.value),l(e.label),u(!1)},f=()=>{a(void 0),n(void 0),u(!0),l("")},h=Gn([br,...e?[kr]:[],...s?[_r]:[]]),m=e=>Object(Pe.h)(Gi,{option:e,onClick:d}),y=c?Object(lr.filter)(c,Bi,{extract:e=>{const t=xi[e.value];return[t.displayName,t.abbreviation].join(" ")}}).map((e=>e.original)):void 0;return Object(Pe.h)("div",{className:fr},Object(Pe.h)(Kr,{ref:r,inputClassName:Sr,containerOnClick:()=>{var e;null==(e=r.current)||e.focus(),f()},value:c,prefix:i?Object(Pe.h)(Ii,{currency:i.value}):Li||(Li=Object(Pe.h)(Mi,null)),prefixClassName:Ue({display:"inline-flex"}),sufixClassName:vr(o,s),containerClassName:h,sufix:Object(Pe.h)(Pe.Fragment,null,Object(Pe.h)("span",null,null==i?void 0:i.contractType)," ",Pi||(Pi=Object(Pe.h)(Kn,null))),onInput:e=>{l(e.currentTarget.value),a(void 0),n(void 0),u(!0)},onFocus:f}),s&&Object(Pe.h)("div",{className:hr},Object(Pe.h)("div",{className:mr},y?0===y.length?Object(Pe.h)("div",{className:Ue({padding:"20px"})},"We don't currently support this coin on our site, but for donations worth over $5,000 USD we can do it manually. Please email ",Di||(Di=Object(Pe.h)(Xi,null))," to arrange."):Object(Pe.h)("ul",null,y.map((e=>m(e)))):Object(Pe.h)(Pe.Fragment,null,Object(Pe.h)("ul",{className:yr},Ui.map((e=>m(e)))),Object(Pe.h)("ul",null,Fi.map((e=>m(e))))))))},$i="data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath class='logoMask' stroke-dasharray='170px' d='M32.547 43C39.081 43 48 38.895 48 29.5C48 20.104 38.132 12.5 29.5 12.5C20.868 12.5 9 19.506 9 36C9 52.495 23.805 59.345 32.547 59.345C41.288 59.345 62.5 54.104 62.5 29.5' stroke='white' stroke-width='10'/%3E%3Canimate attributeType='XML' attributeName='stroke-dashoffset' from='170px' to='-170px' dur='1.25s' repeatCount='indefinite'/%3E%3C/svg%3E%0A",Vi=Ue({display:"inline-block",verticalAlign:"middle",maskImage:`url("${$i}")`,"-webkit-mask-image":`url("${$i}")`,"-webkit-mask-size":"cover",maskSize:"cover"}),Wi=({size:e=72,color:t=dn.LightGray})=>{return Object(Pe.h)("svg",{width:e,height:e,viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:Vi},Object(Pe.h)("path",{className:(n=t,Ue({fill:n})),d:"M51.147 28.97C51.147 17.614 41.667 9 29.493 9C15.875 9 5 20.5 5 34.744C5 50.094 17.223 62.365 33.68 62.365C50.137 62.365 64.862 49.325 66.017 32.242H58.51C57.114 45.042 46.287 54.859 33.68 54.859C21.553 54.859 12.555 45.956 12.555 34.744C12.555 24.639 20.062 16.507 29.493 16.507C37.385 16.507 43.593 21.897 43.593 28.97C43.593 34.84 39.358 39.749 33.728 39.749V47.256C43.688 47.256 51.148 38.931 51.148 28.97"}));var n};var zi;const Zi=({})=>zi||(zi=Object(Pe.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-repeat"},Object(Pe.h)("path",{d:"M17 1l4 4-4 4"}),Object(Pe.h)("path",{d:"M3 11V9a4 4 0 014-4h14M7 23l-4-4 4-4"}),Object(Pe.h)("path",{d:"M21 13v2a4 4 0 01-4 4H3"})));var Yi,Ki;const Qi=({cryptoTokenLoading:e,cryptoTokenRate:t})=>{const[n,o]=p(""),{cryptoAmount:r,setCryptoAmount:i,cryptoCurrency:a,submitError:c}=Zn(),{primaryColor:l}=Ut(),s=Gn([Or(l),...c?[kr]:[]]),[u,d]=p(void 0),[f,m]=p(!0),g=b(null);h((()=>{a&&g&&g.current&&g.current.focus()}),[a]);const v=y((e=>{const n=e&&""!==e?new cr(e):void 0;if(f){var r,a;o(null!=(r=null==n?void 0:n.toString())?r:""),i(null!=(a=null==n?void 0:n.toNumber())?a:0)}else{const e=n&&t?n.div(t).round(7):new cr(0);o(e.toString()),i(e.toNumber())}}),[i,f,t]),_=t&&r&&new cr(r).times(t).round(2).toString();h((()=>{if(!u)return;const e=setTimeout((()=>{d(void 0)}),1e3);return()=>{clearTimeout(e)}}),[u]);const O=y((e=>{if(d(void 0),""===e)return v(""),!1;d(void 0);try{const t=new cr(e);if(t.lt(0))return!1;if(t.gt(Number.MAX_SAFE_INTEGER))return d("Amount is too large"),!1}catch(e){return!1}return v(e),!0}),[v]),C=0===t;return Object(Pe.h)("div",{className:s},Object(Pe.h)("div",{className:Cr},Object(Pe.h)("div",{className:jr},Object(Pe.h)("input",{ref:g,className:pr,value:f?n:null!=_?_:"",type:"text",pattern:"[+-]?(\\d*\\.)?\\d+",name:"donateAmountInput",id:"donateAmountInput",inputMode:"decimal",onChange:e=>O(e.currentTarget.value)}),!C&&Object(Pe.h)("div",{className:Ue({color:dn.TextGray})},null===t&&e?Yi||(Yi=Object(Pe.h)(Wi,{size:16})):f?le(null!=_?_:0,"USD",{showCurrency:!1}):null!=r?r:0)),Object(Pe.h)("div",{className:wr},Object(Pe.h)("div",null,f?a:"USD"),!C&&Object(Pe.h)("div",{className:Ue({color:dn.TextGray})},f?"USD":a,"*"))),!C&&Object(Pe.h)("button",{className:Nr,type:"button",disabled:void 0===t,onClick:()=>{m(!f)}},Ki||(Ki=Object(Pe.h)(Zi,null))))};var Ji;const ea=()=>Ji||(Ji=Object(Pe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.h)("path",{d:"M14.9384 5.2052C15.6282 4.34238 16.0964 3.18386 15.9729 2C14.9631 2.05021 13.7308 2.6662 13.0174 3.5297C12.3768 4.26915 11.8098 5.47617 11.9576 6.61041C13.0912 6.70874 14.2237 6.04381 14.9384 5.2052Z",fill:"#2E3434"}),Object(Pe.h)("path",{d:"M15.9595 6.83176C14.3133 6.73371 12.9136 7.76606 12.1275 7.76606C11.3409 7.76606 10.1371 6.88118 8.83501 6.90503C7.14031 6.92992 5.56781 7.88812 4.70782 9.41211C2.93897 12.4608 4.24102 16.9832 5.96114 19.4662C6.79647 20.6946 7.80318 22.0472 9.12968 21.9986C10.383 21.9494 10.8743 21.1871 12.3977 21.1871C13.9201 21.1871 14.3626 21.9986 15.6893 21.974C17.0651 21.9494 17.9253 20.745 18.7606 19.5154C19.7189 18.115 20.1111 16.7629 20.1358 16.6887C20.1111 16.6641 17.4828 15.6558 17.4584 12.6324C17.4336 10.1009 19.522 8.89672 19.6203 8.82205C18.441 7.07785 16.5983 6.88118 15.9595 6.83176Z",fill:"#2E3434"})));var ta;const na=({className:e})=>{const{primaryColor:t}=Ut();return Object(Pe.h)("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.h)("path",{d:"M20 12v10H4V12M22 7H2v5h20V7zM12 22V7M12 7H7.5a2.5 2.5 0 110-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))};var oa;const ra=()=>oa||(oa=Object(Pe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.h)("path",{d:"M22 12.2296C22 11.5499 21.9438 10.8665 21.8238 10.1978H12.2013V14.0483H17.7117C17.483 15.2902 16.7483 16.3887 15.6725 17.0868V19.5853H18.9599C20.8904 17.8437 22 15.2718 22 12.2296Z",fill:"#4285F4"}),Object(Pe.h)("path",{d:"M12.2013 21.9998C14.9528 21.9998 17.2731 21.1143 18.9637 19.5859L15.6762 17.0874C14.7616 17.6974 13.5808 18.0427 12.2051 18.0427C9.5436 18.0427 7.28697 16.2828 6.47728 13.9166H3.08484V16.4922C4.81667 19.8688 8.34406 21.9998 12.2013 21.9998Z",fill:"#34A853"}),Object(Pe.h)("path",{d:"M6.4739 13.9165C6.04657 12.6747 6.04657 11.3299 6.4739 10.088V7.51245H3.08521C1.63826 10.3379 1.63826 13.6667 3.08521 16.4921L6.4739 13.9165Z",fill:"#FBBC04"}),Object(Pe.h)("path",{d:"M12.2013 5.95801C13.6558 5.93596 15.0615 6.47239 16.1148 7.45707L19.0274 4.60224C17.1832 2.90477 14.7353 1.97152 12.2013 2.00092C8.34406 2.00092 4.81667 4.13194 3.08484 7.51218L6.47353 10.0878C7.27947 7.71794 9.53985 5.95801 12.2013 5.95801Z",fill:"#EA4335"})));var ia;var aa;var ca,la;const sa={[pt.CREDIT_CARD]:Object(Pe.h)((()=>{const{primaryColor:e}=Ut();return Object(Pe.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.h)("path",{d:"M21 4.74316H3C1.89543 4.74316 1 5.63859 1 6.74316V18.7432C1 19.8477 1.89543 20.7432 3 20.7432H21C22.1046 20.7432 23 19.8477 23 18.7432V6.74316C23 5.63859 22.1046 4.74316 21 4.74316Z",stroke:e,strokeWidth:"2",strokeLinecap:"round"}),Object(Pe.h)("path",{d:"M1 10.7432H23",stroke:e,strokeWidth:"2",strokeLinecap:"round"}))}),null),[pt.BANK]:Object(Pe.h)((()=>{const{primaryColor:e}=Ut();return Object(Pe.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.h)("path",{d:"M4 8.74348V19.2435M7 19.2435V8.74348M16 8.74348V19.2435M19 19.2435V8.74348M3.5 22.7435H19.5C20.33 22.7435 21 22.7435 21 21.2435C21 19.7435 20.33 19.7435 19.5 19.7435H3.5C2.67 19.7435 2 19.7435 2 21.2435C2 22.7435 2.67 22.7435 3.5 22.7435ZM10.57 2.23348L2.67 6.39348C2.26 6.60348 2 7.03348 2 7.49348C2 8.18348 2.56 8.74348 3.25 8.74348H19.76C20.44 8.74348 21 8.18348 21 7.49348C21 7.03348 20.74 6.60348 20.33 6.39348L12.43 2.23348C11.85 1.92348 11.15 1.92348 10.57 2.23348Z",stroke:e,strokeWidth:"2"}))}),null),[pt.PAYPAL]:Object(Pe.h)((()=>ia||(ia=Object(Pe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.h)("path",{d:"M8.78495 22.0251L9.12912 19.7433L8.36247 19.7248H4.70166L7.24574 2.88757C7.25331 2.83613 7.27835 2.78924 7.31628 2.75545C7.3542 2.72166 7.4025 2.70322 7.45237 2.70349H13.625C15.6742 2.70349 17.0884 3.14858 17.8268 4.02709C18.1729 4.43921 18.3934 4.86988 18.5 5.34382C18.6118 5.84111 18.6138 6.43525 18.5046 7.1599L18.4967 7.21278V7.67711L18.8428 7.88179C19.1071 8.02153 19.3446 8.21056 19.5436 8.43953C19.8398 8.79189 20.0313 9.23973 20.1122 9.77068C20.1958 10.3167 20.1682 10.9665 20.0313 11.7022C19.8733 12.5484 19.618 13.2854 19.2732 13.8885C18.9689 14.4287 18.5599 14.8966 18.0722 15.2622C17.6142 15.6015 17.07 15.8591 16.4547 16.0239C15.8585 16.186 15.1787 16.2678 14.4331 16.2678H13.9527C13.6092 16.2678 13.2756 16.3969 13.0137 16.6284C12.7521 16.8623 12.5786 17.1856 12.5241 17.5405L12.4879 17.7459L11.8798 21.7675L11.8522 21.9152C11.845 21.9619 11.8324 21.9853 11.814 22.0011C11.7962 22.0163 11.7739 22.0248 11.7508 22.0251H8.78495Z",fill:"#253B80"}),Object(Pe.h)("path",{d:"M19.1713 7.26611C19.1528 7.38906 19.1318 7.51476 19.1081 7.64389C18.2941 12.0062 15.5091 13.5132 11.9523 13.5132H10.1413C9.70633 13.5132 9.33979 13.8429 9.27201 14.2907L8.3448 20.4286L8.08223 22.1684C8.07177 22.2374 8.07576 22.308 8.09393 22.3752C8.1121 22.4425 8.14402 22.5048 8.18749 22.558C8.23096 22.6111 8.28494 22.6538 8.34572 22.683C8.4065 22.7123 8.47264 22.7275 8.53958 22.7275H11.7516C12.132 22.7275 12.4551 22.439 12.515 22.0475L12.5465 21.8772L13.1513 17.8714L13.1901 17.6516C13.2494 17.2587 13.5731 16.9702 13.9535 16.9702H14.4339C17.5459 16.9702 19.982 15.6514 20.694 11.8352C20.9915 10.2409 20.8375 8.90979 20.0504 7.97359C19.801 7.68398 19.5031 7.44424 19.1713 7.26611Z",fill:"#179BD7"}),Object(Pe.h)("path",{d:"M18.3102 6.91227C18.0503 6.83379 17.7858 6.77254 17.5185 6.72888C16.9903 6.64415 16.4565 6.60349 15.9221 6.6073H11.084C10.8998 6.60715 10.7218 6.67576 10.5819 6.80073C10.442 6.9257 10.3496 7.09877 10.3213 7.28867L9.29206 14.0928L9.26245 14.2913C9.29451 14.0747 9.39979 13.8772 9.55924 13.7346C9.71869 13.592 9.92177 13.5136 10.1318 13.5138H11.9427C15.4996 13.5138 18.2845 12.0061 19.0985 7.64447C19.1229 7.51534 19.1433 7.38964 19.1617 7.26669C18.9469 7.14912 18.723 7.05055 18.4925 6.97203C18.432 6.95109 18.3712 6.93117 18.3102 6.91227Z",fill:"#222D65"}),Object(Pe.h)("path",{d:"M10.3267 7.2882C10.3547 7.09825 10.4471 6.92509 10.5871 6.80018C10.727 6.67528 10.9053 6.60692 11.0894 6.60752H15.9275C16.5007 6.60752 17.0357 6.64667 17.5239 6.72909C17.8544 6.78329 18.1802 6.86436 18.4985 6.97156C18.7387 7.05467 18.9618 7.15289 19.1678 7.26622C19.41 5.65414 19.1658 4.55653 18.3307 3.56263C17.4101 2.46844 15.7485 2 13.6223 2H7.44964C7.01531 2 6.64482 2.3297 6.5777 2.77822L4.00664 19.7885C3.99467 19.8675 3.99922 19.9482 4.02 20.0252C4.04077 20.1022 4.07727 20.1735 4.12699 20.2344C4.1767 20.2952 4.23845 20.3441 4.30799 20.3776C4.37753 20.4112 4.4532 20.4286 4.5298 20.4287H8.34066L9.29748 14.0923L10.3267 7.2882Z",fill:"#253B80"})))),null),[pt.VENMO]:Object(Pe.h)((()=>aa||(aa=Object(Pe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.h)("path",{d:"M20.0439 2.17969C20.7029 3.32032 21 4.49518 21 5.97926C21 10.7127 17.1441 16.8618 14.0147 21.1797H6.86672L4 3.21606L10.2588 2.59335L11.7745 15.3756C13.1907 12.9578 14.9383 9.15825 14.9383 6.56776C14.9383 5.14981 14.7065 4.184 14.3443 3.38876L20.0439 2.17969Z",fill:"#3D95CE"})))),null),[pt.CRYPTO]:Object(Pe.h)((()=>{const{primaryColor:e}=Ut();return Object(Pe.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.h)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 7.74316C4.23858 7.74316 2 9.98174 2 12.7432C2 15.5046 4.23858 17.7432 7 17.7432C9.76142 17.7432 12 15.5046 12 12.7432C12 9.98174 9.76142 7.74316 7 7.74316ZM0 12.7432C0 8.87717 3.13401 5.74316 7 5.74316C10.866 5.74316 14 8.87717 14 12.7432C14 16.6092 10.866 19.7432 7 19.7432C3.13401 19.7432 0 16.6092 0 12.7432Z",fill:e}),Object(Pe.h)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1577 9.96518C11.5898 10.6788 11.9998 11.762 11.9998 12.7432C11.9998 13.7243 11.5898 14.8076 11.1577 15.5212C11.6896 14.7266 11.9998 13.7711 11.9998 12.7432C11.9998 11.7152 11.6896 10.7597 11.1577 9.96518ZM11.9999 7.84425C12.4759 8.32999 12.8816 8.88479 13.2007 9.49223C14.1189 8.42024 15.4804 7.74316 16.9998 7.74316C19.7613 7.74316 21.9998 9.98174 21.9998 12.7432C21.9998 15.5046 19.7613 17.7432 16.9998 17.7432C15.4804 17.7432 14.1189 17.0661 13.2007 15.9941C12.8816 16.6015 12.4759 17.1563 11.9999 17.6421C13.2696 18.9376 15.0405 19.7432 16.9998 19.7432C20.8658 19.7432 23.9998 16.6092 23.9998 12.7432C23.9998 8.87717 20.8658 5.74316 16.9998 5.74316C15.0405 5.74316 13.2696 6.5487 11.9999 7.84425Z",fill:e}))}),null),[pt.STOCKS]:Object(Pe.h)((()=>{const{primaryColor:e}=Ut();return Object(Pe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",display:"ACCENT"},Object(Pe.h)("path",{d:"M21 4H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z",stroke:e,strokeWidth:"2",strokeLinecap:"round"}),Object(Pe.h)("path",{d:"M4.5 16.5L6 14l5 1 2.5-2h3l3-5.5",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}),null),[pt.DAF]:Object(Pe.h)((()=>ta||(ta=Object(Pe.h)("svg",{width:"27",height:"23",viewBox:"0 0 37 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.h)("path",{d:"M7.056 31.772V24.45C7.056 23.554 7.028 22.784 7 22.154H8.848L8.946 23.106H8.974C9.478 22.378 10.262 22 11.256 22C12.754 22 14.098 23.302 14.098 25.486C14.098 27.978 12.516 29.154 10.99 29.154C10.164 29.154 9.52 28.818 9.212 28.37H9.184V31.772H7.056ZM9.184 25.122V26.06C9.184 26.228 9.198 26.382 9.226 26.508C9.366 27.082 9.856 27.516 10.472 27.516C11.396 27.516 11.942 26.746 11.942 25.584C11.942 24.492 11.452 23.666 10.5 23.666C9.898 23.666 9.366 24.114 9.226 24.744C9.198 24.856 9.184 24.996 9.184 25.122ZM21.0932 29H19.1752L19.0492 28.314H19.0072C18.5592 28.86 17.8592 29.154 17.0472 29.154C15.6612 29.154 14.8352 28.146 14.8352 27.054C14.8352 25.276 16.4312 24.422 18.8532 24.436V24.338C18.8532 23.974 18.6572 23.456 17.6072 23.456C16.9072 23.456 16.1652 23.694 15.7172 23.974L15.3252 22.602C15.8012 22.336 16.7392 22 17.9852 22C20.2672 22 20.9952 23.344 20.9952 24.954V27.334C20.9952 27.992 21.0232 28.622 21.0932 29ZM18.9232 26.508V25.766C17.8032 25.752 16.9352 26.018 16.9352 26.844C16.9352 27.39 17.2992 27.656 17.7752 27.656C18.3072 27.656 18.7412 27.306 18.8812 26.872C18.9092 26.76 18.9232 26.634 18.9232 26.508ZM21.6056 22.154H23.9716L24.9936 25.514C25.1056 25.92 25.2456 26.424 25.3296 26.788H25.3716C25.4696 26.424 25.5816 25.906 25.6796 25.514L26.5196 22.154H28.8016L27.2056 26.662C26.2256 29.378 25.5676 30.47 24.7976 31.156C24.0556 31.8 23.2716 32.024 22.7396 32.094L22.2916 30.288C22.5576 30.246 22.8936 30.12 23.2156 29.924C23.5376 29.756 23.8876 29.42 24.0976 29.07C24.1676 28.972 24.2096 28.86 24.2096 28.762C24.2096 28.692 24.1956 28.58 24.1116 28.412L21.6056 22.154Z",fill:"#35BBF4"}),Object(Pe.h)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 0C1.79086 0 0 1.79086 0 4V15C0 17.2091 1.79086 19 4 19H32.4127C34.6218 19 36.4127 17.2091 36.4127 15V4C36.4127 1.79086 34.6218 0 32.4127 0H4ZM4.50829 4.36V14.952C5.11629 15.032 6.01229 15.112 7.27629 15.112C9.38829 15.112 11.1163 14.664 12.2523 13.72C13.2923 12.84 14.0443 11.416 14.0443 9.352C14.0443 7.448 13.3403 6.12 12.2203 5.288C11.1803 4.504 9.85229 4.136 7.80429 4.136C6.57229 4.136 5.40429 4.216 4.50829 4.36ZM6.95629 13.16V6.104C7.16429 6.056 7.51629 6.008 8.06029 6.008C10.1563 6.008 11.4683 7.192 11.4523 9.432C11.4523 12.008 10.0123 13.224 7.80429 13.208C7.50029 13.208 7.16429 13.208 6.95629 13.16ZM17.7509 12.232H20.8389L21.6709 15H24.2949L20.9509 4.216H17.7509L14.4549 15H16.9829L17.7509 12.232ZM20.4869 10.408H18.1029L18.7429 8.12C18.8484 7.74614 18.9481 7.30336 19.0455 6.8708C19.1106 6.58139 19.1748 6.29655 19.2389 6.04H19.2709C19.2969 6.14386 19.3237 6.25193 19.3512 6.36285C19.4932 6.93544 19.6541 7.58386 19.8149 8.12L20.4869 10.408ZM25.5789 4.216V15H28.0269V10.664H31.8989V8.68H28.0269V6.216H32.1709V4.216H25.5789Z",fill:"#35BBF4"})))),null),[pt.GIFT_CARD]:Object(Pe.h)(na,null)},ua=({method:e})=>{const{paymentRequestAvailable:t}=Zn();return function(e,t){return e===pt.PAYMENT_REQUEST?t.applePay?ca||(ca=Object(Pe.h)(ea,null)):la||(la=Object(Pe.h)(ra,null)):sa[e]}(e,t)},da={[pt.CREDIT_CARD]:"Card",[pt.BANK]:"Bank",[pt.PAYPAL]:"PayPal",[pt.VENMO]:"Venmo",[pt.GIFT_CARD]:"Gift card",[pt.CRYPTO]:"Crypto",[pt.STOCKS]:"Stocks",[pt.DAF]:"DAF"},pa=({method:e})=>{const{paymentRequestAvailable:t}=Zn(),n=function(e,t){return e===pt.PAYMENT_REQUEST?t.applePay?"Apple Pay":"Google Pay":da[e]}(e,t);return Object(Pe.h)("span",{className:Ue(se({},mn))},n)},fa=Ue({padding:`${gn.XL} ${gn.XL} 0px`,[un.TabletLandscapeUp]:{padding:"0px"}}),ha=Ue({border:"none",padding:0,margin:0,fontSize:"100%",font:"inherit",verticalAlign:"baseline"}),ba=Ue(ue({fontWeight:700},mn,{marginBottom:gn.S})),ma=Ue(ue({fontWeight:700},hn)),ya=Ue(ue({fontWeight:700},fn)),ga=Ue(ue({},Cn(gn.XL),{padding:"0px",[un.TabletLandscapeUp]:{gridColumn:"2/3",padding:gn.XXL}})),va=({horizontal:e,fixedAmount:t})=>Ue(e?{display:"grid",gridTemplateColumns:"1fr 1fr",gridColumnGap:gn.L}:ue({},Cn(gn.XL),t?{"> fieldset:last-child":{alignSelf:"center"}}:{})),_a=Ue({display:"grid",gridTemplateColumns:"1fr",[un.TabletLandscapeUp]:{gridAutoFlow:"column",gridTemplateColumns:"auto 1fr"}}),Oa=Ue({height:"100%",width:"100%",minWidth:"170px",flexGrow:1,backgroundColor:dn.LightGray,display:"none",[un.TabletLandscapeUp]:de({},Cn(0))}),Ca=Gn([ha,Ue({display:"block",[un.TabletLandscapeUp]:{display:"none"}})]),ja=Ue({display:"grid",gridTemplateColumns:"1fr 1fr",gridGap:gn.S}),wa=de({},jn(gn.XS),{alignItems:"center",justifyContent:"flex-start",width:"100%",background:"transparent"}),Na=e=>Ue(de({},wa,{border:"none",padding:gn.M,":hover":{cursor:"pointer",background:dn.Gray}},e?{background:"white",fontWeight:700,":hover":{background:"white"}}:{})),ka=(e,t)=>Ue(de({},wa,{border:`1px solid ${dn.DarkGray}`,background:"transparent",textAlign:"start",padding:`${gn.XXS} ${gn.S}`,borderRadius:So.Default,":hover":{cursor:"pointer",background:dn.Gray},"& > svg":{width:"20px",height:"20px"}},e?{background:t,border:`1px solid ${t}`,fontWeight:700,color:"white","& > svg":{filter:"brightness(0) invert(1)",width:"20px",height:"20px"},":hover":{background:t}}:{}));var Sa,Ta,xa,Aa;const Ea=()=>{const{methods:e,frequency:t,previewMode:n}=Ut(),{paymentRequestAvailable:o}=Zn();return m((()=>e.filter((e=>(t!==dt.Monthly||!ft.includes(e))&&(e!==pt.PAYMENT_REQUEST||(!!n||(o.applePay||o.googlePay))))).sort(((e,t)=>mt.indexOf(e)-mt.indexOf(t)))),[e,t,o,n])},Ia=e=>{const{primaryColor:t}=Ut(),n=e.small?ka:Na;return Object(Pe.h)("button",{type:"button",className:n(e.selected,t),onClick:e.onClick},e.icon,"string"==typeof e.label?Object(Pe.h)("span",{className:Ue(pe({},mn))},e.label):e.label)},Ra=()=>{const{selectedPaymentMethod:e,setSelectedPaymentMethod:t,subMethod:n,setSubMethod:o}=Zn();return Object(Pe.h)(Pe.Fragment,null,Object(Pe.h)("li",null,Object(Pe.h)(Ia,{selected:e===pt.PAYMENT_REQUEST&&"apple"===n,icon:Sa||(Sa=Object(Pe.h)(ea,null)),label:"Apple Pay",onClick:()=>{t(pt.PAYMENT_REQUEST),o("apple")}})),Object(Pe.h)("li",null,Object(Pe.h)(Ia,{selected:e===pt.PAYMENT_REQUEST&&"google"===n,icon:Ta||(Ta=Object(Pe.h)(ra,null)),label:"Google Pay",onClick:()=>{t(pt.PAYMENT_REQUEST),o("google")}})))},Ma=e=>{const{selectedPaymentMethod:t,setSelectedPaymentMethod:n}=Zn(),{previewMode:o}=Ut();return o&&e.method===pt.PAYMENT_REQUEST?xa||(xa=Object(Pe.h)(Ra,null)):Object(Pe.h)("li",null,Object(Pe.h)(Ia,{small:e.small,selected:e.method===t,icon:Object(Pe.h)(ua,{method:e.method}),label:Object(Pe.h)(pa,{method:e.method}),onClick:()=>{n(e.method)}}))},La=()=>{const e=Ea();return 1===e.length?null:Object(Pe.h)("ul",{className:Oa},e.map((e=>Object(Pe.h)(Ma,{key:e,method:e}))))},Pa=()=>{const e=Ea();return 1===e.length?null:Object(Pe.h)("fieldset",{className:Ca},Aa||(Aa=Object(Pe.h)("legend",{className:ba},"Payment method")),Object(Pe.h)("ul",{className:ja},e.map((e=>Object(Pe.h)(Ma,{key:e,small:!0,method:e})))))},Da=Ue({border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}),Ha=({checked:e,primaryColor:t})=>Ue(fe({cursor:"pointer",width:"24px",minWidth:"24px",height:"24px",display:"flex",borderRadius:"4px",justifyContent:"center",alignItems:"center",border:`1.5px solid ${e?t:dn.DarkGray}`},e?{background:t}:{})),Ba=Ue({width:"16px",height:"16px","& > path":{stroke:"white",strokeWidth:"2px"}}),Ua=Ue({cursor:"pointer"}),Fa=Ue({display:"flex",alignItems:"center",gap:gn.XS});var Ga;const Xa=({className:e})=>Object(Pe.h)("svg",{fill:"none",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:e},Ga||(Ga=Object(Pe.h)("path",{d:"M20 6L9 17l-5-5",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})));var qa;const $a=["children","checked","className"],Va=e=>{let{children:t,checked:n}=e,o=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,$a);const{primaryColor:r}=Ut();return Object(Pe.h)("label",{className:Fa},Object(Pe.h)("div",null,Object(Pe.h)("input",he({className:Da,type:"checkbox",defaultChecked:n,role:"checkbox"},o)),Object(Pe.h)("div",{className:Ha({checked:Boolean(n),primaryColor:r})},n&&(qa||(qa=Object(Pe.h)(Xa,{className:Ba}))))),Object(Pe.h)("span",{className:Ua},t))};var Wa;const za=()=>{var e;const t=zn(),n=t.hasAdmin&&!(null!=(e=t.metadata)&&e.disablePrivateNotes),{privateNote:o,setPrivateNote:r}=Zn(),[i,a]=p(Boolean(o));return n?Object(Pe.h)("div",{className:On(gn.L)},Object(Pe.h)(Va,{checked:i,onChange:()=>{a((e=>!e))}},"Add note for ",t.name),i&&Object(Pe.h)("fieldset",{className:Ue(be({fieldSetCss:ha},Cn(gn.XS)))},Wa||(Wa=Object(Pe.h)("legend",{className:ba},"Private note")),Object(Pe.h)(Zr,{rows:3,label:"Note",id:"privateNote",value:o,inputClassName:Ue({resize:"none"}),onChange:({currentTarget:e})=>{r(e.value)}}))):null},Za=()=>{const e=zn(),{publicTestimony:t,setPublicTestimony:n}=Zn(),[o,r]=p(Boolean(t));return Object(Pe.h)("div",{className:On(gn.L)},Object(Pe.h)(Va,{checked:o,onChange:()=>{r((e=>!e))}},"Add public testimony"),o&&Object(Pe.h)("fieldset",{className:Ue(me({fieldSetCss:ha},Cn(gn.XS)))},Object(Pe.h)("legend",{className:ba},"Help ",e.name," by sharing why you support them with the world"),Object(Pe.h)(Zr,{rows:3,label:"Note",id:"publicTestimony",value:t,inputClassName:Ue({resize:"none"}),onChange:({currentTarget:e})=>{n(e.value)}})))},Ya=Ue({width:"100%",textAlign:"center"}),Ka=Ue(ye({},{fontSize:"12px",lineHeight:"16px",letterSpacing:"0.01em"},{color:dn.TextOpaque})),Qa=()=>{const{primaryColor:e}=Ut();return Object(Pe.h)("div",{className:Ya},Object(Pe.h)("span",{className:Ka},"Every.org will accept your donation."," ",Object(Pe.h)("a",{href:et,target:"_blank",rel:"noreferrer",className:(t=e,Ue({color:t,textDecoration:"none",cursor:"pointer"}))},"Learn More")));var t},Ja=Ue(ge({},pn,{outline:"none",width:"100%",border:"none",fontFamily:"inherit",cursor:"pointer",borderRadius:So.Big,height:"52px",fontWeight:700,padding:gn.XXS,transition:"opacity .3s"})),ec=e=>Ue({color:dn.White,backgroundColor:e,":hover":{opacity:.9}}),tc=Ue({color:dn.White,backgroundColor:dn.DarkGray,cursor:"default","& > span":{opacity:"0.6"}}),nc=Ue({cursor:"not-allowed"}),oc=({handleClick:e,disabled:t,children:n})=>{const{primaryColor:o,previewMode:r}=Ut();return r?Object(Pe.h)(rc,{disabled:t}):Object(Pe.h)("button",{type:"submit",className:Gn([Ja,t?tc:ec(o)]),disabled:t,onClick:e},Object(Pe.h)("span",null,n))},rc=({disabled:e})=>{const{primaryColor:t}=Ut(),{selectedPaymentMethod:n,subMethod:o}=Zn();return Object(Pe.h)("button",{type:"button",className:Gn([Ja,nc,e?tc:ec(t)]),disabled:e},Object(Pe.h)("span",null,ve({method:n,paymentRequestIsApplePay:"apple"===o})))};var ic=e=>{const[t,n]=p(null),[o,r]=p(null),[i,a]=p(!1);return h((()=>{if(!e)return n(null),r(null),void a(!1);a(!0),async function(e){const t=`https://api.coingecko.com/api/v3/coins/${e}`;return(await fetch(t).then((async e=>e.json()))).market_data.current_price.usd}(e).then((e=>{n(e),r(null)})).catch((e=>{n(null),r(e.message)})).finally((()=>{a(!1)}))}),[e]),[t,i,o]};const ac="USD",cc="$",lc=()=>{const e=Ut(),{frequency:t,donationAmount:n,setSubmitError:o,selectedPaymentMethod:s,stockAmount:u,stockSymbol:d,cryptoAmount:p,cryptoCurrency:f,privateNote:h,publicTestimony:b,giftCardCode:m}=Zn(),{minDonationAmount:g,webhookToken:v,redeemGiftCardInFlow:_,designation:O,requireShareInfo:C}=Ut();return y((y=>{y.preventDefault();const j=e.completeDonationInNewTab?"_blank":"_self",w={methods:[s],nonprofitSlug:e.nonprofitSlug,fundraiserSlug:e.fundraiserSlug,utmSource:e.utmSource,privateNote:h,publicTestimony:b,webhookToken:v,designation:O,requireShareInfo:C};switch(s){case pt.CRYPTO:if(!p||!f){o("Please enter currency and amount");break}window.open(function(e){let{cryptoAmount:t,cryptoCurrency:n}=e,o=i(e,rt);const s=c(o),u=l(o);return`${s}?${a(r({[qe.CRYPTO_AMOUNT]:t,[qe.CRYPTO_CURRENCY]:n},u))}#/${ct}`}(_e({cryptoAmount:p,cryptoCurrency:f},w)),j);break;case pt.STOCKS:if(!d||!u){o("Please enter the symbol and amount");break}window.open(function(e){let{stockAmount:t,stockSymbol:n}=e,o=i(e,ot);const s=c(o),u=l(o);return`${s}?${a(r({[qe.STOCK_AMOUNT]:t,[qe.STOCK_SYMBOL]:n},u))}#/${ct}`}(_e({stockSymbol:d,stockAmount:u},w)),j);break;case pt.GIFT_CARD:window.open(function(e){let{redeemGiftCardInFlow:t,giftCardCode:n}=e,o=i(e,it);if(t)return`${c(o)}?${a(r({},l(o),{[qe.GIFT_CARD_CODE]:n}))}#/${ct}`;const s=a({nonprofitSlug:o.nonprofitSlug});return`${tt}?${s}`}(_e({redeemGiftCardInFlow:_,giftCardCode:m},w,{methods:void 0})),j);break;default:if(!n||n{var e;const t=lc(),{cryptoAmount:n,cryptoCurrency:o,submitError:r}=Zn(),[i,a]=ic(o&&(null==(e=Ei[o])?void 0:e.coingeckoId));return Object(Pe.h)("form",{className:_a,onSubmit:t},sc||(sc=Object(Pe.h)(La,null)),Object(Pe.h)("div",{className:ga},uc||(uc=Object(Pe.h)(Pa,null)),Object(Pe.h)("fieldset",{className:Ue(Oe({fieldSetCss:ha},Cn(gn.XXL)))},dc||(dc=Object(Pe.h)("div",null,Object(Pe.h)("legend",{className:ba},"Crypto currency"),Object(Pe.h)(qi,null))),o&&Object(Pe.h)("div",null,pc||(pc=Object(Pe.h)("legend",{className:ba},"Amount")),Object(Pe.h)(Qi,{cryptoTokenRate:i,cryptoTokenLoading:a}))),fc||(fc=Object(Pe.h)(za,null)),hc||(hc=Object(Pe.h)(Za,null)),Object(Pe.h)(Yo,{message:r}),Object(Pe.h)(oc,{disabled:!n||!o},ve({method:pt.CRYPTO,cryptoCurrency:o})),bc||(bc=Object(Pe.h)(Qa,null)),o&&i&&i>0&&Object(Pe.h)("p",{className:Ue(Oe({color:dn.TextGray},yn))},"*Estimated exchange rate of"," ",le(i,"USD",{showCurrency:!0})," ","/ ",o," is provided by CoinGecko. Final rate will be determined by our brokerage at time of transaction conversion.")))},yc=e=>Ue(Ce({outline:"none",border:"none",fontFamily:"inherit",cursor:"pointer",background:"none",fontWeight:500,transition:"opacity .3s",color:e,display:"flex",alignItems:"center",alignSelf:"flex-start"},mn,{opacity:1,padding:0,gap:gn.XXS,marginBottom:gn.XXL,":hover":{opacity:.9},[un.TabletLandscapeUp]:{padding:gn.L,marginBottom:0}})),gc=()=>{const{primaryColor:e}=Ut();return Object(Pe.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.h)("path",{stroke:e,strokeWidth:"2",d:"M19 12H5M12 19l-7-7 7-7"}))};var vc,_c;const Oc=({handleClick:e})=>{const{primaryColor:t}=Ut();return Object(Pe.h)("button",{type:"button",className:yc(t),onClick:e},vc||(vc=Object(Pe.h)(gc,null)),_c||(_c=Object(Pe.h)("span",null,"Back")))};let Cc=function(e){return e[e.START=0]="START",e[e.MANUAL=1]="MANUAL",e[e.AMOUNT=2]="AMOUNT",e}({});var jc,wc;const Nc=e=>{"."===e.key&&e.preventDefault()},kc=()=>{const e=b(null),{primaryColor:t,addAmounts:n,amount:o,frequency:r,minDonationAmount:i}=Ut(),{setDonationAmount:a,donationAmount:c,setSubmitError:l,submitError:s}=Zn(),[u,d]=p();return h((()=>{Boolean("ontouchstart"in window||navigator.maxTouchPoints)||e.current&&e.current.focus()}),[]),o?Object(Pe.h)("fieldset",{className:Ue(je({fieldSetCss:ha},Cn(gn.S)))},jc||(jc=Object(Pe.h)("legend",{className:ba},"Donation amount")),Object(Pe.h)("p",{className:Gn([ya,Ue({textAlign:r?"left":"center"})])},"$",o)):Object(Pe.h)("fieldset",{className:Ue(je({fieldSetCss:ha},Cn(gn.S)))},wc||(wc=Object(Pe.h)("legend",{className:ba},"Donation amount")),Object(Pe.h)("div",{className:On(gn.XXS)},Object(Pe.h)(Kr,{ref:e,id:"donation-input",type:"number",pattern:"[0-9]*",inputMode:"numeric",min:0,step:1,value:c||"",prefix:cc,inputClassName:Sr,prefixClassName:Tr,error:u,sufix:ac,sufixClassName:xr(t),onKeyDown:Nc,onInput:e=>{const t=Number(e.currentTarget.value);if(a(t),t0&&Object(Pe.h)("div",{className:Ar},n.map((e=>Object(Pe.h)("button",{key:e,className:Er(t),type:"button",onClick:()=>{a((t=>"number"==typeof t?t+e:e))}},"+",((e,t)=>{if(e<1e3)return e.toString();let n="",o=1;return e>=1e3&&e<1e6?(o=1e3,n="k"):e>=1e6&&e<1e9?(o=1e6,n="m"):e>=1e9&&e<1e12?(o=1e9,n="b"):e>=1e12&&(o=1e12,n="t"),void 0===t?(e/o).toFixed(3).replace(/\.?0+$/,"")+n:(e/o).toFixed(t)+n})(e))))))},Sc=e=>Ue({position:"relative",cursor:"pointer",display:"flex",width:"100%",height:"36px",alignItems:"center",justifyContent:"center",color:e,fontWeight:500,border:`2px solid ${e}`,borderRight:"none"}),Tc=e=>Ue({cursor:"pointer",display:"flex",flexDirection:"column",flex:"1 1 0px","& > input":{appearance:"none",height:0},"& > input:checked + label":{backgroundColor:e,color:"white"},"& > input:checked + label:hover":{backgroundColor:e,color:"white"}}),xc=e=>Ue({display:"flex",width:"100%","& > div:first-of-type > label":{borderRadius:"6px 0 0 6px","&::after":{borderRadius:"6px 0 0 6px"}},"& > div:last-of-type > label":{borderRadius:"0 6px 6px 0",borderRight:`2px solid ${e}`,"&::after":{borderRadius:"0 6px 6px 0"}}});var Ac,Ec,Ic;const Rc=()=>{const{primaryColor:e,frequency:t,amount:n,monthlyTitle:o}=Ut(),{frequency:r,selectedPaymentMethod:i,setFrequency:a}=Zn();return t&&o?Object(Pe.h)("h4",null,o):t?n?Object(Pe.h)("fieldset",{className:ha},Ac||(Ac=Object(Pe.h)("legend",{className:ba},"Frequency")),Object(Pe.h)("p",{className:ma},t===dt.Monthly?"Monthly":"One-time")):Object(Pe.h)("h4",{className:ma},"Frequency:"," ",t===dt.Monthly?"Monthly":"One-time"):ft.includes(i)?Object(Pe.h)("fieldset",{className:ha},Ec||(Ec=Object(Pe.h)("legend",{className:ba},"Frequency")),Object(Pe.h)("p",null,i===pt.DAF?"Chariot":"Venmo"," ","only supports one-time donations")):Object(Pe.h)("fieldset",{className:ha},Ic||(Ic=Object(Pe.h)("legend",{className:ba},"Frequency")),Object(Pe.h)("div",{className:xc(e)},Object(Pe.h)("div",{className:Tc(e)},Object(Pe.h)("input",{type:"radio",name:"frequency",id:"monthly",checked:r===dt.Monthly,value:dt.Monthly}),Object(Pe.h)("label",{className:Sc(e),id:"frequency-monthly",htmlFor:"monthly",onClick:()=>{a(dt.Monthly)}},"Give Monthly")),Object(Pe.h)("div",{className:Tc(e)},Object(Pe.h)("input",{type:"radio",name:"frequency",id:"once",checked:r===dt.OneTime,value:dt.OneTime}),Object(Pe.h)("label",{id:"frequency-one-time",htmlFor:"one-time",className:Sc(e),onClick:()=>{a(dt.OneTime)}},"Once"))))};var Mc,Lc,Pc,Dc,Hc,Bc;const Uc=({changeView:e})=>{const t=lc(),{donationAmount:n,submitError:o}=Zn();return Object(Pe.h)("form",{className:_a,onSubmit:t},Object(Pe.h)(Oc,{handleClick:()=>{e(Cc.START)}}),Object(Pe.h)("div",{className:ga},Mc||(Mc=Object(Pe.h)("h3",null,"Connect your DAF with Chariot")),Lc||(Lc=Object(Pe.h)(Rc,null)),Pc||(Pc=Object(Pe.h)(kc,null)),Dc||(Dc=Object(Pe.h)(za,null)),Hc||(Hc=Object(Pe.h)(Za,null)),Object(Pe.h)(Yo,{message:o}),Object(Pe.h)(oc,{disabled:!n||Number.isNaN(n)},ve({method:pt.DAF})),Bc||(Bc=Object(Pe.h)(Qa,null))))};var Fc,Gc,Xc,qc,$c,Vc,Wc,zc,Zc,Yc,Kc;const Qc=({changeView:e})=>{const{nonprofitSlug:t,primaryColor:n}=Ut(),o=Vn(),r=o===Wt||o===Vt?"the nonprofit":o.name;return Object(Pe.h)("div",{className:_a},Object(Pe.h)(Oc,{handleClick:()=>{e(Cc.START)}}),Object(Pe.h)("div",{className:ga},Fc||(Fc=Object(Pe.h)("h3",null,"Manual DAF donation")),Gc||(Gc=Object(Pe.h)("p",null,"Please ask your provider to make a one-time or recurring grant to:")),Object(Pe.h)("div",{className:On(gn.S)},Object(Pe.h)("p",{className:On(0)},Xc||(Xc=Object(Pe.h)("span",null,"Every.org (EIN: 61-1913297)")),qc||(qc=Object(Pe.h)("span",null,"58 West Portal Ave #781 San Francisco, CA 94127")),Object(Pe.h)("span",null,"Memo: every.org/",t),$c||($c=Object(Pe.h)("span",null,"Contact info: Mark Ulrich, CEO")),Vc||(Vc=Object(Pe.h)("span",null,"Email: team@every.org")),Wc||(Wc=Object(Pe.h)("span",null,"Phone number: +1 (415) 650-0503"))),Object(Pe.h)("p",null,"You may also email us at"," ",Object(Pe.h)("a",{className:fo(n),href:D({address:ze,subject:"Donation via DAF"})},ze)," ","with the memo or to let us know if you wish to share your contact information with the nonprofit/campaign. By default, your name and email will be shared with ",r," if included in the grant letter from your DAF.")),Object(Pe.h)("div",{className:Ue(we({color:dn.TextGray},Cn(0)))},Object(Pe.h)("p",{className:Ue({paddingBottom:gn.S})},"We will attribute the donation accordingly:"),zc||(zc=Object(Pe.h)("p",null,"If we receive BOTH your @username and a nonprofit/campaign: we will add a donation for that nonprofit/campaign to your account.")),Zc||(Zc=Object(Pe.h)("p",null,"If we receive only your @username, we will credit your account's gift card balance in the amount received, which you can use to support as many nonprofits as you'd like.")),Yc||(Yc=Object(Pe.h)("p",null,"If we receive only a nonprofit/campaign, we will send that amount to that nonprofit/campaign.")),Kc||(Kc=Object(Pe.h)("p",null,"If we do not receive any information by the time the wire/ACH is received, we will apply it towards running Every.org.")))))},Jc=Ue(Ne({outline:"none",border:"none",fontFamily:"inherit",background:"#ADEFD1",color:"#00203F",alignSelf:"center",borderRadius:So.Big,padding:`${gn.M} ${gn.XL}`,display:"flex",alignItems:"center",fontWeight:500},mn,{gap:gn.XS,cursor:"pointer",":hover":{background:"#7ce6b6"}})),el=e=>Ue(Ne({outline:"none",border:"none",background:"none",fontFamily:"inherit",color:e,alignSelf:"center",display:"flex",alignItems:"center",fontWeight:500},mn,{gap:gn.XS,cursor:"pointer",":hover":{opacity:.9}}));var tl,nl,ol,rl,il,al,cl,ll;const sl=()=>tl||(tl=Object(Pe.h)("svg",{width:"62",height:"19",viewBox:"0 0 62 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.h)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 0C1.79086 0 0 1.79086 0 4V15C0 17.2091 1.79086 19 4 19H32.4127C34.6218 19 36.4127 17.2091 36.4127 15V4C36.4127 1.79086 34.6218 0 32.4127 0H4ZM4.50829 4.36V14.952C5.11629 15.032 6.01229 15.112 7.27629 15.112C9.38829 15.112 11.1163 14.664 12.2523 13.72C13.2923 12.84 14.0443 11.416 14.0443 9.352C14.0443 7.448 13.3403 6.12 12.2203 5.288C11.1803 4.504 9.85229 4.136 7.80429 4.136C6.57229 4.136 5.40429 4.216 4.50829 4.36ZM6.95629 13.16V6.104C7.16429 6.056 7.51629 6.008 8.06029 6.008C10.1563 6.008 11.4683 7.192 11.4523 9.432C11.4523 12.008 10.0123 13.224 7.80429 13.208C7.50029 13.208 7.16429 13.208 6.95629 13.16ZM17.7509 12.232H20.8389L21.6709 15H24.2949L20.9509 4.216H17.7509L14.4549 15H16.9829L17.7509 12.232ZM20.4869 10.408H18.1029L18.7429 8.12C18.8484 7.74614 18.9481 7.30336 19.0455 6.8708C19.1106 6.58139 19.1748 6.29655 19.2389 6.04H19.2709C19.2969 6.14386 19.3237 6.25193 19.3512 6.36285C19.4932 6.93544 19.6541 7.58386 19.8149 8.12L20.4869 10.408ZM25.5789 4.216V15H28.0269V10.664H31.8989V8.68H28.0269V6.216H32.1709V4.216H25.5789Z",fill:"#00203F"}),Object(Pe.h)("path",{d:"M40.2192 16.772V9.45C40.2192 8.554 40.1912 7.784 40.1632 7.154H42.0112L42.1092 8.106H42.1372C42.6412 7.378 43.4252 7 44.4192 7C45.9172 7 47.2612 8.302 47.2612 10.486C47.2612 12.978 45.6792 14.154 44.1532 14.154C43.3272 14.154 42.6832 13.818 42.3752 13.37H42.3472V16.772H40.2192ZM42.3472 10.122V11.06C42.3472 11.228 42.3612 11.382 42.3892 11.508C42.5292 12.082 43.0192 12.516 43.6352 12.516C44.5592 12.516 45.1052 11.746 45.1052 10.584C45.1052 9.492 44.6152 8.666 43.6632 8.666C43.0612 8.666 42.5292 9.114 42.3892 9.744C42.3612 9.856 42.3472 9.996 42.3472 10.122ZM54.2564 14H52.3384L52.2124 13.314H52.1704C51.7224 13.86 51.0224 14.154 50.2104 14.154C48.8244 14.154 47.9984 13.146 47.9984 12.054C47.9984 10.276 49.5944 9.422 52.0164 9.436V9.338C52.0164 8.974 51.8204 8.456 50.7704 8.456C50.0704 8.456 49.3284 8.694 48.8804 8.974L48.4884 7.602C48.9644 7.336 49.9024 7 51.1484 7C53.4304 7 54.1584 8.344 54.1584 9.954V12.334C54.1584 12.992 54.1864 13.622 54.2564 14ZM52.0864 11.508V10.766C50.9664 10.752 50.0984 11.018 50.0984 11.844C50.0984 12.39 50.4624 12.656 50.9384 12.656C51.4704 12.656 51.9044 12.306 52.0444 11.872C52.0724 11.76 52.0864 11.634 52.0864 11.508ZM54.7688 7.154H57.1348L58.1568 10.514C58.2688 10.92 58.4088 11.424 58.4928 11.788H58.5348C58.6328 11.424 58.7448 10.906 58.8428 10.514L59.6828 7.154H61.9648L60.3688 11.662C59.3888 14.378 58.7308 15.47 57.9608 16.156C57.2188 16.8 56.4348 17.024 55.9028 17.094L55.4548 15.288C55.7208 15.246 56.0568 15.12 56.3788 14.924C56.7008 14.756 57.0508 14.42 57.2608 14.07C57.3308 13.972 57.3728 13.86 57.3728 13.762C57.3728 13.692 57.3588 13.58 57.2748 13.412L54.7688 7.154Z",fill:"#00203F"}))),ul=({changeView:e})=>{const{primaryColor:t}=Ut();return Object(Pe.h)("div",{className:_a},nl||(nl=Object(Pe.h)(La,null)),Object(Pe.h)("div",{className:ga},ol||(ol=Object(Pe.h)(Pa,null)),rl||(rl=Object(Pe.h)("h4",null,"Instant DAF donation")),il||(il=Object(Pe.h)("p",null,"We use Chariot to verify your account info and automatically initiate a grant from your DAF, or you can get instructions for making the donation manually.")),Object(Pe.h)("button",{type:"button",className:Jc,onClick:()=>{e(Cc.AMOUNT)}},al||(al=Object(Pe.h)("span",null,"Donate with")),cl||(cl=Object(Pe.h)(sl,null))),Object(Pe.h)("button",{type:"button",className:el(t),onClick:()=>{e(Cc.MANUAL)}},"Get instructions for a manual DAF donation"),ll||(ll=Object(Pe.h)(Qa,null))))},dl=()=>{const[e,t]=p(Cc.START);switch(e){case Cc.START:return Object(Pe.h)(ul,{changeView:t});case Cc.MANUAL:return Object(Pe.h)(Qc,{changeView:t});case Cc.AMOUNT:return Object(Pe.h)(Uc,{changeView:t})}};var pl,fl,hl,bl,ml,yl,gl;const vl=()=>{const{frequency:e,amount:t}=Ut(),{frequency:n,donationAmount:o,selectedPaymentMethod:r,paymentRequestAvailable:i,submitError:a}=Zn(),c=lc();return Object(Pe.h)("form",{className:_a,onSubmit:c},pl||(pl=Object(Pe.h)(La,null)),Object(Pe.h)("div",{className:ga},fl||(fl=Object(Pe.h)(Pa,null)),Object(Pe.h)("div",{className:va({horizontal:Boolean(t&&e),fixedAmount:Boolean(t)})},hl||(hl=Object(Pe.h)(Rc,null)),bl||(bl=Object(Pe.h)(kc,null))),ml||(ml=Object(Pe.h)(za,null)),yl||(yl=Object(Pe.h)(Za,null)),Object(Pe.h)(Yo,{message:a}),Object(Pe.h)(oc,{disabled:!n||!o||Number.isNaN(o)},ve({method:r,paymentRequestIsApplePay:i.applePay})),gl||(gl=Object(Pe.h)(Qa,null))))},_l=Ue({display:"block",width:"80px",height:"80px",alignSelf:"center","& > path":{strokeWidth:"1"}});var Ol,Cl,jl,wl,Nl;const kl=()=>{const e=lc(),{redeemGiftCardInFlow:t}=Ut(),{giftCardCode:n,setGiftCardCode:o,submitError:r}=Zn();return Object(Pe.h)("form",{className:_a,onSubmit:e},Ol||(Ol=Object(Pe.h)(La,null)),Object(Pe.h)("div",{className:ga},Cl||(Cl=Object(Pe.h)(Pa,null)),jl||(jl=Object(Pe.h)(na,{className:_l})),wl||(wl=Object(Pe.h)("p",null,"Redeem a gift card to add donation credits to your account.")),t&&Object(Pe.h)(Kr,{id:"gift-card-code-input",type:"text",value:n,onInput:e=>{o(e.currentTarget.value)}}),Object(Pe.h)(Yo,{message:r}),Object(Pe.h)(oc,null,ve({method:pt.GIFT_CARD})),Nl||(Nl=Object(Pe.h)(Qa,null))))};Ue({fontSize:hn.fontSize,lineHeight:hn.fontSize,fontWeight:700});var Sl,Tl,xl,Al,El,Il,Rl,Ml;const Ll=()=>{const e=lc(),{stockAmount:t,stockSymbol:n,setStockAmount:o,setStockSymbol:r,submitError:i,setSubmitError:a}=(Ut(),Zn());return Object(Pe.h)("form",{className:_a,onSubmit:e},Sl||(Sl=Object(Pe.h)(La,null)),Object(Pe.h)("div",{className:ga},Tl||(Tl=Object(Pe.h)(Pa,null)),Object(Pe.h)("fieldset",{className:Ue(ke({fieldSetCss:ha},Cn(gn.XXL)))},Object(Pe.h)("div",null,xl||(xl=Object(Pe.h)("legend",{className:ba},"What is the symbol of the shares?")),Al||(Al=Object(Pe.h)("span",null,"Example: AAPL")),Object(Pe.h)(Kr,{id:"stock-amount-input",inputClassName:Sr,type:"text",value:n,onInput:e=>{r(e.currentTarget.value),a(null)}})),Object(Pe.h)("div",null,El||(El=Object(Pe.h)("legend",{className:ba},"How many shares are you donating?")),Object(Pe.h)(Kr,{id:"donation-input",inputClassName:Sr,type:"number",pattern:"[0-9]*",inputMode:"numeric",min:0,step:1,value:t||void 0,onInput:e=>{o(Number(e.currentTarget.value)),a(null)}}))),Il||(Il=Object(Pe.h)(za,null)),Rl||(Rl=Object(Pe.h)(Za,null)),Object(Pe.h)(Yo,{message:i}),Object(Pe.h)(oc,{disabled:!t||!n},ve({method:pt.STOCKS})),Ml||(Ml=Object(Pe.h)(Qa,null))))};var Pl,Dl,Hl,Bl,Ul,Fl;const Gl=()=>{const{selectedPaymentMethod:e}=Zn();switch(e){case pt.CRYPTO:return Pl||(Pl=Object(Pe.h)(mc,null));case pt.STOCKS:return Dl||(Dl=Object(Pe.h)(Ll,null));case pt.DAF:return Hl||(Hl=Object(Pe.h)(dl,null));case pt.GIFT_CARD:return Bl||(Bl=Object(Pe.h)(kl,null));default:return Ul||(Ul=Object(Pe.h)(vl,null))}},Xl=()=>Fl||(Fl=Object(Pe.h)(Xn,{className:fa},Object(Pe.h)(Gl,null))),ql=e=>Ue({background:"white",width:"100%",height:"100%",borderRadius:"unset",position:"relative",overflow:"auto",padding:"0",paddingBottom:gn.XXL,[un.TabletLandscapeUp]:{height:e?`${e}px`:"unset",background:"#f3f6f6",minHeight:"378px",maxHeight:`calc(100vh - 2 * ${gn.XL})`,width:"1000px",overflow:"unset",overflowY:"scroll","-ms-overflow-style":"none",scrollbarWidth:"none","::-webkit-scrollbar":{display:"none"},borderRadius:So.Medium,padding:gn.XL}}),$l=W((({children:e,height:t},n)=>Object(Pe.h)("div",{ref:n,className:ql(t)},e))),Vl=Ue(Se({},mn,{position:"fixed",height:"auto",width:"100%",zIndex:999,top:0,bottom:0,left:0,right:0,display:"flex",background:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",color:dn.Text,fontFamily:De.BasisGrotesque,padding:0,[un.TabletLandscapeUp]:{padding:gn.XL},boxSizing:"border-box","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","& *":{boxSizing:"inherit"},"& *:before":{boxSizing:"inherit"},"& *:after":{boxSizing:"inherit"}})),Wl=({children:e,onClick:t})=>Object(Pe.h)("div",{className:Vl,onClick:t},e);var zl,Zl,Yl;var Kl,Ql,Jl=()=>{const{fundraiserSlug:e}=Ut(),{hideWidget:t}=Zn(),n=qn(),o=Vn(),r=e=>{e.target===e.currentTarget&&t()};return o===Vt||e&&n===Ft?(t(),null):o===Wt||e&&n===Gt?Object(Pe.h)(Wl,{onClick:r},zl||(zl=Object(Pe.h)(Wi,{size:24}))):Object(Pe.h)(Wl,{onClick:r},Zl||(Zl=Object(Pe.h)(jo,{className:_o})),Yl||(Yl=Object(Pe.h)($l,{height:null},Object(Pe.h)(yo,null,Object(Pe.h)("div",{id:"every-header"},Object(Pe.h)(ko,null)),Object(Pe.h)("div",{id:"every-nonprofitInfo"},Object(Pe.h)(Wo,null)),Object(Pe.h)("div",{id:"every-paymentProcess"},Object(Pe.h)(Xl,null)),Object(Pe.h)("div",{id:"every-faq"},Object(Pe.h)(to,null)),Object(Pe.h)("div",{id:"every-fundraiserLink"},Object(Pe.h)(bo,null)),Object(Pe.h)("div",{id:"every-footer"},Object(Pe.h)(po,null))))))};const es=null==(Kl=document.querySelector("body"))?void 0:Kl.style.overflow,ts=()=>{const e=document.querySelector("body");if(e){if(es)return void(e.style.overflow=es);e.style.removeProperty("overflow")}},ns=({options:e={},hide:t})=>(ts(),h((()=>{function e(){t(),ts()}return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}}),[]),e.show?((()=>{const e=document.querySelector("body");e&&(e.style.overflow="hidden")})(),Object(Pe.h)(sn,{options:e,hide:t},Ql||(Ql=Object(Pe.h)(Jl,null)))):null),os=["element"],rs={childList:!0,subtree:!0,attributeFilter:["href"]};let is,as;const cs=new Map,ls=function(){var e;const t=null==(e=document.currentScript)?void 0:e.getAttribute("data-every-style");return null!=t}();class ss{constructor(e,t){xe(this,"options",void 0),xe(this,"mountPoint",void 0),this.options=e,this.mountPoint=t}hide(){this.options.show=!1,this.render()}show(){this.options.show=!0,this.render()}setOptions(e){this.options=e,this.render()}render(){Object(Pe.render)(Object(Pe.h)(ns,{options:this.options,hide:()=>{this.hide()}}),this.mountPoint)}}const us=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;var ds,ps,fs;const hs=({options:e={}})=>Object(Pe.h)(sn,{options:e,hide:()=>{}},ds||(ds=Object(Pe.h)(bs,null))),bs=()=>{const{fundraiserSlug:e}=Ut(),t=qn();return Vn()===Wt||e&&t===Gt?ps||(ps=Object(Pe.h)(Wi,{size:24})):fs||(fs=Object(Pe.h)(Xl,null))},ms=["element","selector"],ys=["element","selector"],gs=["element","selector"],vs=function(){const e=N();return!e||"1"!==e.explicit}();(function(){const e=N();return!!e&&"1"===e.formOnly})()?function(){function e(...e){console.info("Every.org Donate Button:",...e)}const t={},n={show:!1,openAt:"donate"},o={};let r,i;vt();const a=()=>{i||(()=>{var e;null==(e=document.querySelector("#every-shadow-wrapper"))||e.remove();const t=document.createElement("div");t.id="every-shadow-wrapper",r.append(t),i=document.createElement("div"),t.attachShadow({mode:"open"}).append(i);const n=document.createElement("style");n.id="every-shadow-styles",i.append(n)})();const e=Re({},n,t,o);Object(Pe.render)(Object(Pe.h)(hs,{options:e}),i)};window.everyDotOrgDonateButton={createButton:()=>{e("createButton function is not available in formOnlyMode. Use createWidget instead.")},showWidget:()=>{e("showWidget function is not available in formOnlyMode. Use createWidget instead.")},setOptions:function(e){Re(t,e),a()},createWidget:n=>{let{element:o,selector:i}=n,c=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(n,ms);o||i||e("createWidget():","must provide element or selector");const l=((e,t)=>e||(t?document.querySelector(t):null))(o,i);l?c.nonprofitSlug?(r=l,Re(t,c),a()):e("createWidget():","must provide nonprofitSlug"):e("createWidget():","element or selector not found")}}}():vs?(vt(),Ie(),new us(((e,t)=>{t.disconnect(),Boolean(e.some((e=>"A"===e.target.nodeName)))&&Ie(),t.observe(document,rs)})).observe(document,rs)):function(){function e(...e){console.info("Every.org Donate Button:",...e)}function t(){Le(a,{show:!0}),u()}function n(){Le(a,{show:!1}),u()}function o(e){var n;const o=Le({},e);return Le(a,{openAt:null!=(n=o.openAt)?n:r}),e=>{e.preventDefault(),c=o,t()}}const r="donate",i={},a={show:!1,openAt:r};let c={};const l=(e,t)=>e?[e]:t&&document.querySelectorAll(t);let s;vt();const u=()=>{var e,t,o,r,l;s||(()=>{var e;null==(e=document.querySelector("#every-shadow-wrapper"))||e.remove();const t=document.createElement("div");t.id="every-shadow-wrapper",t.style.position="absolute",t.style.zIndex="20000000",document.body.append(t),s=document.createElement("div"),t.attachShadow({mode:"open"}).append(s);const n=document.createElement("style");n.id="every-shadow-styles",s.append(n)})(),(null==(e=window.location)?void 0:e.hash)===`#${null!=(t=null!=(o=null!=(r=null==(l=c)?void 0:l.openAt)?r:null==i?void 0:i.openAt)?o:null==a?void 0:a.openAt)?t:""}`&&Le(a,{show:!0});const u=Le({},a,i,c);Object(Pe.render)(Object(Pe.h)(ns,{options:u,hide:n}),s)};window.everyDotOrgDonateButton={createButton:t=>{let{element:n,selector:o}=t,r=Me(t,ys);n||o||r.nonprofitSlug||e("createButton():","must provide element or selector or nonprofitSlug");const i=l(n,o);if(i)for(const t of i){var a,s;const n=null!=(a=t.querySelector("a"))?a:void 0;if(!r.nonprofitSlug&&!n)return void e("no link in container",t);const o=null!=(s=null==n?void 0:n.getAttribute("href"))?s:void 0;if(!r.nonprofitSlug&&!o)return void e("link lacks href",n);const i=Le({},c,r);Object(Pe.render)(Object(Pe.h)(ut,i),t,n)}},showWidget:t,setOptions:function(e){Le(i,e),u()},createWidget:t=>{let{element:n,selector:r}=t,a=Me(t,gs);n||r||e("createWidget():","must provide element or selector");const c=l(n,r);if(c)if(a.nonprofitSlug){for(const e of c)e.addEventListener("click",o(a));Le(i,a),u()}else e("createWidget():","must provide nonprofitSlug")}}}()},NMMh:function(e,t,n){"use strict";function o(e,t){for(var n in t)e[n]=t[n];return e}function r(e){var t=e.parentNode;t&&t.removeChild(e)}function i(e,t,n){var o,r,i,c={};for(i in t)"key"==i?o=t[i]:"ref"==i?r=t[i]:c[i]=t[i];if(arguments.length>2&&(c.children=arguments.length>3?R.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===c[i]&&(c[i]=e.defaultProps[i]);return a(e,c,o,r,null)}function a(e,t,n,o,r){var i={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++L:r};return null==r&&null!=M.vnode&&M.vnode(i),i}function c(){return{current:null}}function l(e){return e.children}function s(e,t){this.props=e,this.context=t}function u(e,t){if(null==t)return e.__?u(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&D.sort(U));f.__r=0}function h(e,t,n,o,r,i,c,s,d,p,f){var h,m,v,_,O,C,w,N,T,x=0,A=o&&o.__k||X,E=A.length,I=E,R=t.length;for(n.__k=[],h=0;h0?a(_.type,_.props,_.key,_.ref?_.ref:null,_.__v):_)?(_.__=n,_.__b=n.__b+1,-1===(N=g(_,A,w=h+x,I))?v=G:(v=A[N]||G,A[N]=void 0,I--),j(e,_,v,r,i,c,s,d,p,f),O=_.__e,(m=_.ref)&&v.ref!=m&&(v.ref&&k(v.ref,null,_),f.push(m,_.__c||O,_)),null!=O&&(null==C&&(C=O),(T=v===G||null===v.__v)?-1==N&&x--:N!==w&&(N===w+1?x++:N>w?I>R-w?x+=N-w:x--:x=N(null!=l?1:0))for(;a>=0||c=0){if((l=t[a])&&r==l.key&&i===l.type)return a;a--}if(c2&&(s.children=arguments.length>3?R.call(arguments,2):n),a(e.type,s,r||e.key,i||e.ref,null)}function I(e,t){var n={__c:t="__cC"+F++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,o;return this.getChildContext||(n=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,p(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}n.r(t),n.d(t,"Component",(function(){return s})),n.d(t,"Fragment",(function(){return l})),n.d(t,"cloneElement",(function(){return E})),n.d(t,"createContext",(function(){return I})),n.d(t,"createElement",(function(){return i})),n.d(t,"createRef",(function(){return c})),n.d(t,"h",(function(){return i})),n.d(t,"hydrate",(function(){return A})),n.d(t,"isValidElement",(function(){return P})),n.d(t,"options",(function(){return M})),n.d(t,"render",(function(){return x})),n.d(t,"toChildArray",(function(){return m}));var R,M,L,P,D,H,B,U,F,G={},X=[],q=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$=Array.isArray;R=X.slice,M={__e:function(e,t,n,o){for(var r,i,a;t=t.__;)if((r=t.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),a=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),a=r.__d),a)return r.__E=r}catch(t){e=t}throw e}},L=0,P=function(e){return null!=e&&void 0===e.constructor},s.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=o({},this.state),"function"==typeof e&&(e=e(o({},n),this.props)),e&&o(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),p(this))},s.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),p(this))},s.prototype.render=l,D=[],B="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,U=function(e,t){return e.__v.__b-t.__v.__b},f.__r=0,F=0},"Pq/i":function(e,t,n){"use strict";n.r(t);var o=n("NMMh");const{h:r,render:i,hydrate:a}=o,c=e=>e&&e.default?e.default:e;if("function"==typeof c(n("/hs+"))){let e=document.getElementById("preact_root")||document.body.firstElementChild,t=()=>{let t=c(n("/hs+")),o={};const a=document.querySelector('[type="__PREACT_CLI_DATA__"]');a&&(o=JSON.parse(decodeURI(a.innerHTML)).preRenderData||o);o.url&&(l=o.url);var l;i(r(t,{CLI_DATA:{preRenderData:o}}),document.body,e)};0,t()}},kPAj:function(e){var t;e.exports=t={},t.simpleFilter=function(e,n){return n.filter((function(n){return t.test(e,n)}))},t.test=function(e,n){return null!==t.match(e,n)},t.match=function(e,t,n){var o,r=0,i=[],a=t.length,c=0,l=0,s=(n=n||{}).pre||"",u=n.post||"",d=n.caseSensitive&&t||t.toLowerCase();e=n.caseSensitive&&e||e.toLowerCase();for(var p=0;p;\ntype CSSPseudos = {[K in CSS.Pseudos]?: CSSObject};\n\nexport interface CSSObject extends CSSProperties, CSSPseudos {\n\t[key: string]: CSSObject | string | number | undefined;\n}\n\nfunction hyph(s: string) {\n\treturn s.replace(/[A-Z]|^ms/g, '-$&').toLowerCase();\n}\n\nfunction mx(rule: string, media?: string) {\n\treturn media ? `${media}{${rule}}` : rule;\n}\n\nfunction rx(cn: string, prop: string, value: string | number) {\n\treturn `.${cn}{${hyph(prop)}:${value}}`;\n}\n\nfunction noAnd(s: string) {\n\treturn s.replace(/&/g, '');\n}\n\nfunction getParseFunction({\n\trules,\n\tcache,\n\tinsert,\n\tprefix\n}: {\n\trules: string[];\n\tcache: Record;\n\tinsert: (rule: string) => void;\n\tprefix: string;\n}) {\n\tconst parse = (object: CSSObject, child = '', media?: string): string => {\n\t\treturn Object.keys(object)\n\t\t\t.map((key) => {\n\t\t\t\tconst value = object[key] ?? '';\n\t\t\t\tif (value === null) return '';\n\t\t\t\tif (typeof value === 'object') {\n\t\t\t\t\tconst m2 = key.startsWith('@') ? key : null;\n\t\t\t\t\tconst c2 = m2 ? child : child + key;\n\t\t\t\t\treturn parse(value, c2, m2 ?? media);\n\t\t\t\t}\n\n\t\t\t\tconst _key = key + value + child + media;\n\t\t\t\tif (cache[_key]) return cache[_key];\n\t\t\t\tconst className = prefix + rules.length.toString(36);\n\t\t\t\tinsert(mx(rx(className + noAnd(child), key, value), media));\n\t\t\t\tcache[_key] = className;\n\t\t\t\treturn className;\n\t\t\t})\n\t\t\t.join(' ');\n\t};\n\n\treturn parse;\n}\n\nfunction getCssFunction(object: {\n\trules: string[];\n\tcache: Record;\n\tinsert: (rule: string) => void;\n\tprefix: string;\n}) {\n\tconst parse = getParseFunction(object);\n\treturn (...styles: CSSObject[]): string => {\n\t\treturn styles\n\t\t\t.map((style) => parse(style))\n\t\t\t.join(' ')\n\t\t\t.trim();\n\t};\n}\n\nfunction widgetCSS() {\n\tconst prefix = 'every-embedded-';\n\tconst cache: Record = {};\n\tconst rules: string[] = [];\n\n\tlet insert = (rule: string) => {\n\t\trules.push(rule);\n\t};\n\n\tlet css = getCssFunction({rules, cache, insert, prefix});\n\n\tif (typeof document !== 'undefined') {\n\t\tinsert = (rule: string) => {\n\t\t\tconst shadowRoot = document.querySelector('#every-shadow-wrapper');\n\t\t\tconst everyShadowStyles = shadowRoot?.shadowRoot?.querySelector(\n\t\t\t\t'#every-shadow-styles'\n\t\t\t);\n\n\t\t\tif (everyShadowStyles) {\n\t\t\t\tif (!everyShadowStyles.innerHTML) {\n\t\t\t\t\teveryShadowStyles.innerHTML = resetcss;\n\t\t\t\t\tfor (const rule of rules) {\n\t\t\t\t\t\teveryShadowStyles.innerHTML += rule;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\teveryShadowStyles.innerHTML += rule;\n\t\t\t}\n\n\t\t\trules.push(rule);\n\t\t};\n\n\t\tcss = getCssFunction({rules, cache, insert, prefix});\n\t}\n\n\treturn css;\n}\n\nfunction buttonCSS() {\n\tconst prefix = 'every-embedded-button-';\n\tconst cache: Record = {};\n\tconst rules: string[] = [];\n\n\tlet insert = (rule: string) => {\n\t\trules.push(rule);\n\t};\n\n\tlet css = getCssFunction({rules, cache, insert, prefix});\n\n\tif (typeof document !== 'undefined') {\n\t\tconst styles = document.createElement('style');\n\t\tstyles.id = 'every-styles';\n\t\tconst sheet = document.head.appendChild(styles).sheet;\n\n\t\tinsert = function insert(rule) {\n\t\t\trules.push(rule);\n\t\t\tsheet?.insertRule(rule, sheet.cssRules.length);\n\t\t};\n\n\t\tcss = getCssFunction({rules, cache, insert, prefix});\n\t}\n\n\treturn css;\n}\n\nexport const cssButton = buttonCSS();\n\nconst css = widgetCSS();\n\nexport default css;\n","/* eslint-disable unicorn/prevent-abbreviations */\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tAvailablePaymentMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\nimport {\n\tDonateUrlParameters,\n\tUTM_QUERY_PARAM\n} from 'src/components/widget/types/UrlParams';\nimport {BASE_URL, GIFT_CARD_URL} from 'src/constants/url';\n\nconst UTM_MEDIUM = 'donate-button-0.4'; // Update this if the major version changes\nconst HASH = 'donate';\n\ninterface BaseUrlParams {\n\tnonprofitSlug: string;\n\tfundraiserSlug?: string;\n\tfundraiserId?: string;\n\tnoExit?: boolean;\n\tmethods?: PaymentMethod[];\n\tprivateNote?: string;\n\tpublicTestimony?: string;\n\tutmSource?: string;\n\twebhookToken?: string;\n\tdesignation?: string;\n\trequireShareInfo?: boolean;\n}\n\ninterface DonateUrlParams extends BaseUrlParams {\n\tfrequency: DonationFrequency;\n\tamount: number;\n}\n\ninterface DonateStocksUrlParams extends BaseUrlParams {\n\tstockAmount: number;\n\tstockSymbol: string;\n}\n\ninterface DonateCryptoUrlParams extends BaseUrlParams {\n\tcryptoAmount: number;\n\tcryptoCurrency: string;\n}\n\ninterface GiftCardUrlParams extends BaseUrlParams {\n\tgiftCardCode?: string;\n\tredeemGiftCardInFlow?: boolean;\n}\n\nfunction serializeParams(\n\tparams: Record\n) {\n\treturn Object.entries(params)\n\t\t.filter(([, value]) => Boolean(value))\n\t\t.map((entry) => entry.map((part) => encodeURIComponent(part!)).join('='))\n\t\t.join('&');\n}\n\nfunction getBaseUrl({\n\tfundraiserSlug,\n\tnonprofitSlug\n}: Pick) {\n\tlet baseUrl = BASE_URL + nonprofitSlug;\n\n\tif (fundraiserSlug) {\n\t\tbaseUrl += '/f/' + fundraiserSlug;\n\t}\n\n\treturn baseUrl;\n}\n\nfunction getBaseParams({\n\tmethods,\n\tnonprofitSlug,\n\tnoExit,\n\tprivateNote,\n\tpublicTestimony,\n\tutmSource,\n\twebhookToken,\n\tdesignation,\n\trequireShareInfo\n}: Pick<\n\tBaseUrlParams,\n\t| 'nonprofitSlug'\n\t| 'methods'\n\t| 'noExit'\n\t| 'privateNote'\n\t| 'publicTestimony'\n\t| 'utmSource'\n\t| 'webhookToken'\n\t| 'designation'\n\t| 'requireShareInfo'\n>) {\n\treturn {\n\t\t[DonateUrlParameters.METHOD]: methods?.join(','),\n\t\t[DonateUrlParameters.NO_EXIT]: noExit ?? 1,\n\t\t[DonateUrlParameters.PRIVATE_NOTE]: privateNote,\n\t\t[DonateUrlParameters.PUBLIC_TESTIMONY]: publicTestimony,\n\t\t[DonateUrlParameters.PARTNER_WEBHOOK_TOKEN]: webhookToken,\n\t\t[DonateUrlParameters.DESIGNATION]: designation,\n\t\t[DonateUrlParameters.REQUIRE_SHARE_INFO]: requireShareInfo,\n\t\t[UTM_QUERY_PARAM.utm_campaign]: 'donate-button',\n\t\t[UTM_QUERY_PARAM.utm_source]: utmSource ?? nonprofitSlug,\n\t\t[UTM_QUERY_PARAM.utm_medium]: UTM_MEDIUM\n\t};\n}\n\nexport function constructBasicDonateUrl(\n\t// eslint-disable-next-line @typescript-eslint/ban-types\n\tprops: Omit\n) {\n\tconst baseUrl = getBaseUrl(props);\n\tconst params = getBaseParams(props);\n\n\tconst parameters = serializeParams(params);\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateUrl({\n\tfrequency,\n\tamount,\n\t...rest\n}: DonateUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\t[DonateUrlParameters.FREQUENCY]: frequency,\n\t\t[DonateUrlParameters.AMOUNT]: amount,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateStocksUrl({\n\tstockAmount,\n\tstockSymbol,\n\t...rest\n}: DonateStocksUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\t[DonateUrlParameters.STOCK_AMOUNT]: stockAmount,\n\t\t[DonateUrlParameters.STOCK_SYMBOL]: stockSymbol,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateCryptoUrl({\n\tcryptoAmount,\n\tcryptoCurrency,\n\t...rest\n}: DonateCryptoUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\t[DonateUrlParameters.CRYPTO_AMOUNT]: cryptoAmount,\n\t\t[DonateUrlParameters.CRYPTO_CURRENCY]: cryptoCurrency,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructGiftCardUrl({\n\tredeemGiftCardInFlow,\n\tgiftCardCode,\n\t...rest\n}: GiftCardUrlParams) {\n\tif (redeemGiftCardInFlow) {\n\t\tconst baseUrl = getBaseUrl(rest);\n\t\tconst params = getBaseParams(rest);\n\n\t\tconst parameters = serializeParams({\n\t\t\t...params,\n\t\t\t[DonateUrlParameters.GIFT_CARD_CODE]: giftCardCode\n\t\t});\n\n\t\treturn `${baseUrl}?${parameters}#/${HASH}`;\n\t}\n\n\tconst parameters = serializeParams({\n\t\tnonprofitSlug: rest.nonprofitSlug\n\t});\n\n\treturn `${GIFT_CARD_URL}?${parameters}`;\n}\n","import {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tAvailablePaymentMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\nimport {\n\tDonateUrlParameters,\n\tUTM_QUERY_PARAM\n} from 'src/components/widget/types/UrlParams';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nconst MAX_AMOUNT_SUGGESTIONS = 5;\n\n/**\n * Just for backwards compatibility\n * @deprecated\n */\nenum OLD_DonateUrlParameters {\n\tMIN_AMOUNT = 'minAmount',\n\tTHEME_COLOR = 'themeColor'\n}\n\nfunction methodsFromString(string?: string | null) {\n\tif (!string) return;\n\treturn string\n\t\t.split(',')\n\t\t.filter((method): method is PaymentMethod =>\n\t\t\tAvailablePaymentMethods.includes(method as PaymentMethod)\n\t\t);\n}\n\nfunction frequencyFromString(string?: string | null) {\n\tif (!string) return;\n\treturn Object.values(DonationFrequency).find(\n\t\t(frequency) => frequency.toUpperCase() === string.toUpperCase()\n\t);\n}\n\nfunction addAmountsFromString(string?: string | null) {\n\tif (!string) return;\n\treturn (\n\t\tstring\n\t\t\t.split(',')\n\t\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t\t.map(Number.parseFloat)\n\t\t\t.filter(Boolean)\n\t\t\t.slice(0, MAX_AMOUNT_SUGGESTIONS)\n\t);\n}\n\nfunction intFromString(string?: string | null) {\n\tif (!string) return;\n\tconst number = Number.parseInt(string, 10);\n\treturn Number.isNaN(number) ? undefined : number;\n}\n\nfunction booleanFromString(string?: string | null) {\n\tif (!string) return;\n\treturn string === 'true';\n}\n\nfunction removeEmptyValues>(object: T): T {\n\treturn Object.fromEntries(\n\t\tObject.entries(object).filter(([, value]) => value !== undefined)\n\t) as T;\n}\n\nexport function parseDonateUrl(\n\turlString: string\n): (Partial & {nonprofitSlug: string}) | undefined {\n\tconst url = new URL(urlString);\n\n\tconst fundraiserSlug = url.pathname.split('/f/')[1];\n\tconst nonprofitSlug = url.pathname.split('/')[1];\n\n\tconst searchParameters = new URLSearchParams(url.search);\n\tconst methods = methodsFromString(\n\t\tsearchParameters.get(DonateUrlParameters.METHOD)\n\t);\n\tconst frequency = frequencyFromString(\n\t\tsearchParameters.get(DonateUrlParameters.FREQUENCY)\n\t);\n\tconst amount = intFromString(\n\t\tsearchParameters.get(DonateUrlParameters.AMOUNT)\n\t);\n\tconst monthlyTitle =\n\t\tsearchParameters.get(DonateUrlParameters.MONTHLY_TITLE) ?? undefined;\n\n\tconst addAmounts = addAmountsFromString(\n\t\tsearchParameters.get(DonateUrlParameters.SUGGESTED_AMOUNTS)\n\t);\n\tconst utmSource =\n\t\tsearchParameters.get(UTM_QUERY_PARAM.utm_source) ?? undefined;\n\n\tconst minAmount =\n\t\tintFromString(searchParameters.get(DonateUrlParameters.MIN_VALUE)) ??\n\t\tintFromString(searchParameters.get(OLD_DonateUrlParameters.MIN_AMOUNT));\n\n\tconst designation =\n\t\tsearchParameters.get(DonateUrlParameters.DESIGNATION) ?? undefined;\n\n\tconst requireShareInfo = booleanFromString(\n\t\tsearchParameters.get(DonateUrlParameters.REQUIRE_SHARE_INFO)\n\t);\n\n\tconst primaryColorFromUrl =\n\t\tsearchParameters.get(DonateUrlParameters.THEME_COLOR) ??\n\t\tsearchParameters.get(OLD_DonateUrlParameters.THEME_COLOR) ??\n\t\tundefined;\n\tconst primaryColor = primaryColorFromUrl\n\t\t? primaryColorFromUrl.startsWith('#')\n\t\t\t? primaryColorFromUrl\n\t\t\t: `#${primaryColorFromUrl}`\n\t\t: undefined;\n\n\tif (!nonprofitSlug) {\n\t\treturn;\n\t}\n\n\treturn removeEmptyValues({\n\t\tfundraiserSlug,\n\t\tnonprofitSlug,\n\t\tfrequency,\n\t\tdefaultFrequency: frequency,\n\t\tmethods,\n\t\tmonthlyTitle,\n\t\taddAmounts,\n\t\tutmSource,\n\t\tamount,\n\t\tdefaultDonationAmount: amount,\n\t\tminDonationAmount: minAmount,\n\t\tprimaryColor,\n\t\tdesignation,\n\t\trequireShareInfo\n\t});\n}\n","import { options } from 'preact';\n\n/** @type {number} */\nlet currentIndex;\n\n/** @type {import('./internal').Component} */\nlet currentComponent;\n\n/** @type {import('./internal').Component} */\nlet previousComponent;\n\n/** @type {number} */\nlet currentHook = 0;\n\n/** @type {Array} */\nlet afterPaintEffects = [];\n\nlet EMPTY = [];\n\nlet oldBeforeDiff = options._diff;\nlet oldBeforeRender = options._render;\nlet oldAfterDiff = options.diffed;\nlet oldCommit = options._commit;\nlet oldBeforeUnmount = options.unmount;\n\nconst RAF_TIMEOUT = 100;\nlet prevRaf;\n\noptions._diff = vnode => {\n\tcurrentComponent = null;\n\tif (oldBeforeDiff) oldBeforeDiff(vnode);\n};\n\noptions._render = vnode => {\n\tif (oldBeforeRender) oldBeforeRender(vnode);\n\n\tcurrentComponent = vnode._component;\n\tcurrentIndex = 0;\n\n\tconst hooks = currentComponent.__hooks;\n\tif (hooks) {\n\t\tif (previousComponent === currentComponent) {\n\t\t\thooks._pendingEffects = [];\n\t\t\tcurrentComponent._renderCallbacks = [];\n\t\t\thooks._list.forEach(hookItem => {\n\t\t\t\tif (hookItem._nextValue) {\n\t\t\t\t\thookItem._value = hookItem._nextValue;\n\t\t\t\t}\n\t\t\t\thookItem._pendingValue = EMPTY;\n\t\t\t\thookItem._nextValue = hookItem._pendingArgs = undefined;\n\t\t\t});\n\t\t} else {\n\t\t\thooks._pendingEffects.forEach(invokeCleanup);\n\t\t\thooks._pendingEffects.forEach(invokeEffect);\n\t\t\thooks._pendingEffects = [];\n\t\t\tcurrentIndex = 0;\n\t\t}\n\t}\n\tpreviousComponent = currentComponent;\n};\n\noptions.diffed = vnode => {\n\tif (oldAfterDiff) oldAfterDiff(vnode);\n\n\tconst c = vnode._component;\n\tif (c && c.__hooks) {\n\t\tif (c.__hooks._pendingEffects.length) afterPaint(afterPaintEffects.push(c));\n\t\tc.__hooks._list.forEach(hookItem => {\n\t\t\tif (hookItem._pendingArgs) {\n\t\t\t\thookItem._args = hookItem._pendingArgs;\n\t\t\t}\n\t\t\tif (hookItem._pendingValue !== EMPTY) {\n\t\t\t\thookItem._value = hookItem._pendingValue;\n\t\t\t}\n\t\t\thookItem._pendingArgs = undefined;\n\t\t\thookItem._pendingValue = EMPTY;\n\t\t});\n\t}\n\tpreviousComponent = currentComponent = null;\n};\n\noptions._commit = (vnode, commitQueue) => {\n\tcommitQueue.some(component => {\n\t\ttry {\n\t\t\tcomponent._renderCallbacks.forEach(invokeCleanup);\n\t\t\tcomponent._renderCallbacks = component._renderCallbacks.filter(cb =>\n\t\t\t\tcb._value ? invokeEffect(cb) : true\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tcommitQueue.some(c => {\n\t\t\t\tif (c._renderCallbacks) c._renderCallbacks = [];\n\t\t\t});\n\t\t\tcommitQueue = [];\n\t\t\toptions._catchError(e, component._vnode);\n\t\t}\n\t});\n\n\tif (oldCommit) oldCommit(vnode, commitQueue);\n};\n\noptions.unmount = vnode => {\n\tif (oldBeforeUnmount) oldBeforeUnmount(vnode);\n\n\tconst c = vnode._component;\n\tif (c && c.__hooks) {\n\t\tlet hasErrored;\n\t\tc.__hooks._list.forEach(s => {\n\t\t\ttry {\n\t\t\t\tinvokeCleanup(s);\n\t\t\t} catch (e) {\n\t\t\t\thasErrored = e;\n\t\t\t}\n\t\t});\n\t\tc.__hooks = undefined;\n\t\tif (hasErrored) options._catchError(hasErrored, c._vnode);\n\t}\n};\n\n/**\n * Get a hook's state from the currentComponent\n * @param {number} index The index of the hook to get\n * @param {number} type The index of the hook to get\n * @returns {any}\n */\nfunction getHookState(index, type) {\n\tif (options._hook) {\n\t\toptions._hook(currentComponent, index, currentHook || type);\n\t}\n\tcurrentHook = 0;\n\n\t// Largely inspired by:\n\t// * https://github.com/michael-klein/funcy.js/blob/f6be73468e6ec46b0ff5aa3cc4c9baf72a29025a/src/hooks/core_hooks.mjs\n\t// * https://github.com/michael-klein/funcy.js/blob/650beaa58c43c33a74820a3c98b3c7079cf2e333/src/renderer.mjs\n\t// Other implementations to look at:\n\t// * https://codesandbox.io/s/mnox05qp8\n\tconst hooks =\n\t\tcurrentComponent.__hooks ||\n\t\t(currentComponent.__hooks = {\n\t\t\t_list: [],\n\t\t\t_pendingEffects: []\n\t\t});\n\n\tif (index >= hooks._list.length) {\n\t\thooks._list.push({ _pendingValue: EMPTY });\n\t}\n\treturn hooks._list[index];\n}\n\n/**\n * @param {import('./index').StateUpdater} [initialState]\n */\nexport function useState(initialState) {\n\tcurrentHook = 1;\n\treturn useReducer(invokeOrReturn, initialState);\n}\n\n/**\n * @param {import('./index').Reducer} reducer\n * @param {import('./index').StateUpdater} initialState\n * @param {(initialState: any) => void} [init]\n * @returns {[ any, (state: any) => void ]}\n */\nexport function useReducer(reducer, initialState, init) {\n\t/** @type {import('./internal').ReducerHookState} */\n\tconst hookState = getHookState(currentIndex++, 2);\n\thookState._reducer = reducer;\n\tif (!hookState._component) {\n\t\thookState._value = [\n\t\t\t!init ? invokeOrReturn(undefined, initialState) : init(initialState),\n\n\t\t\taction => {\n\t\t\t\tconst currentValue = hookState._nextValue\n\t\t\t\t\t? hookState._nextValue[0]\n\t\t\t\t\t: hookState._value[0];\n\t\t\t\tconst nextValue = hookState._reducer(currentValue, action);\n\n\t\t\t\tif (currentValue !== nextValue) {\n\t\t\t\t\thookState._nextValue = [nextValue, hookState._value[1]];\n\t\t\t\t\thookState._component.setState({});\n\t\t\t\t}\n\t\t\t}\n\t\t];\n\n\t\thookState._component = currentComponent;\n\n\t\tif (!currentComponent._hasScuFromHooks) {\n\t\t\tcurrentComponent._hasScuFromHooks = true;\n\t\t\tlet prevScu = currentComponent.shouldComponentUpdate;\n\t\t\tconst prevCWU = currentComponent.componentWillUpdate;\n\n\t\t\t// If we're dealing with a forced update `shouldComponentUpdate` will\n\t\t\t// not be called. But we use that to update the hook values, so we\n\t\t\t// need to call it.\n\t\t\tcurrentComponent.componentWillUpdate = function (p, s, c) {\n\t\t\t\tif (this._force) {\n\t\t\t\t\tlet tmp = prevScu;\n\t\t\t\t\t// Clear to avoid other sCU hooks from being called\n\t\t\t\t\tprevScu = undefined;\n\t\t\t\t\tupdateHookState(p, s, c);\n\t\t\t\t\tprevScu = tmp;\n\t\t\t\t}\n\n\t\t\t\tif (prevCWU) prevCWU.call(this, p, s, c);\n\t\t\t};\n\n\t\t\t// This SCU has the purpose of bailing out after repeated updates\n\t\t\t// to stateful hooks.\n\t\t\t// we store the next value in _nextValue[0] and keep doing that for all\n\t\t\t// state setters, if we have next states and\n\t\t\t// all next states within a component end up being equal to their original state\n\t\t\t// we are safe to bail out for this specific component.\n\t\t\t/**\n\t\t\t *\n\t\t\t * @type {import('./internal').Component[\"shouldComponentUpdate\"]}\n\t\t\t */\n\t\t\t// @ts-ignore - We don't use TS to downtranspile\n\t\t\t// eslint-disable-next-line no-inner-declarations\n\t\t\tfunction updateHookState(p, s, c) {\n\t\t\t\tif (!hookState._component.__hooks) return true;\n\n\t\t\t\tconst stateHooks = hookState._component.__hooks._list.filter(\n\t\t\t\t\tx => x._component\n\t\t\t\t);\n\t\t\t\tconst allHooksEmpty = stateHooks.every(x => !x._nextValue);\n\t\t\t\t// When we have no updated hooks in the component we invoke the previous SCU or\n\t\t\t\t// traverse the VDOM tree further.\n\t\t\t\tif (allHooksEmpty) {\n\t\t\t\t\treturn prevScu ? prevScu.call(this, p, s, c) : true;\n\t\t\t\t}\n\n\t\t\t\t// We check whether we have components with a nextValue set that\n\t\t\t\t// have values that aren't equal to one another this pushes\n\t\t\t\t// us to update further down the tree\n\t\t\t\tlet shouldUpdate = false;\n\t\t\t\tstateHooks.forEach(hookItem => {\n\t\t\t\t\tif (hookItem._nextValue) {\n\t\t\t\t\t\tconst currentValue = hookItem._value[0];\n\t\t\t\t\t\thookItem._value = hookItem._nextValue;\n\t\t\t\t\t\thookItem._nextValue = undefined;\n\t\t\t\t\t\tif (currentValue !== hookItem._value[0]) shouldUpdate = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn shouldUpdate || hookState._component.props !== p\n\t\t\t\t\t? prevScu\n\t\t\t\t\t\t? prevScu.call(this, p, s, c)\n\t\t\t\t\t\t: true\n\t\t\t\t\t: false;\n\t\t\t}\n\n\t\t\tcurrentComponent.shouldComponentUpdate = updateHookState;\n\t\t}\n\t}\n\n\treturn hookState._nextValue || hookState._value;\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {any[]} args\n */\nexport function useEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 3);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tcurrentComponent.__hooks._pendingEffects.push(state);\n\t}\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {any[]} args\n */\nexport function useLayoutEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 4);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tcurrentComponent._renderCallbacks.push(state);\n\t}\n}\n\nexport function useRef(initialValue) {\n\tcurrentHook = 5;\n\treturn useMemo(() => ({ current: initialValue }), []);\n}\n\n/**\n * @param {object} ref\n * @param {() => object} createHandle\n * @param {any[]} args\n */\nexport function useImperativeHandle(ref, createHandle, args) {\n\tcurrentHook = 6;\n\tuseLayoutEffect(\n\t\t() => {\n\t\t\tif (typeof ref == 'function') {\n\t\t\t\tref(createHandle());\n\t\t\t\treturn () => ref(null);\n\t\t\t} else if (ref) {\n\t\t\t\tref.current = createHandle();\n\t\t\t\treturn () => (ref.current = null);\n\t\t\t}\n\t\t},\n\t\targs == null ? args : args.concat(ref)\n\t);\n}\n\n/**\n * @param {() => any} factory\n * @param {any[]} args\n */\nexport function useMemo(factory, args) {\n\t/** @type {import('./internal').MemoHookState} */\n\tconst state = getHookState(currentIndex++, 7);\n\tif (argsChanged(state._args, args)) {\n\t\tstate._pendingValue = factory();\n\t\tstate._pendingArgs = args;\n\t\tstate._factory = factory;\n\t\treturn state._pendingValue;\n\t}\n\n\treturn state._value;\n}\n\n/**\n * @param {() => void} callback\n * @param {any[]} args\n */\nexport function useCallback(callback, args) {\n\tcurrentHook = 8;\n\treturn useMemo(() => callback, args);\n}\n\n/**\n * @param {import('./internal').PreactContext} context\n */\nexport function useContext(context) {\n\tconst provider = currentComponent.context[context._id];\n\t// We could skip this call here, but than we'd not call\n\t// `options._hook`. We need to do that in order to make\n\t// the devtools aware of this hook.\n\t/** @type {import('./internal').ContextHookState} */\n\tconst state = getHookState(currentIndex++, 9);\n\t// The devtools needs access to the context object to\n\t// be able to pull of the default value when no provider\n\t// is present in the tree.\n\tstate._context = context;\n\tif (!provider) return context._defaultValue;\n\t// This is probably not safe to convert to \"!\"\n\tif (state._value == null) {\n\t\tstate._value = true;\n\t\tprovider.sub(currentComponent);\n\t}\n\treturn provider.props.value;\n}\n\n/**\n * Display a custom label for a custom hook for the devtools panel\n * @type {(value: T, cb?: (value: T) => string | number) => void}\n */\nexport function useDebugValue(value, formatter) {\n\tif (options.useDebugValue) {\n\t\toptions.useDebugValue(formatter ? formatter(value) : value);\n\t}\n}\n\n/**\n * @param {(error: any, errorInfo: import('preact').ErrorInfo) => void} cb\n */\nexport function useErrorBoundary(cb) {\n\t/** @type {import('./internal').ErrorBoundaryHookState} */\n\tconst state = getHookState(currentIndex++, 10);\n\tconst errState = useState();\n\tstate._value = cb;\n\tif (!currentComponent.componentDidCatch) {\n\t\tcurrentComponent.componentDidCatch = (err, errorInfo) => {\n\t\t\tif (state._value) state._value(err, errorInfo);\n\t\t\terrState[1](err);\n\t\t};\n\t}\n\treturn [\n\t\terrState[0],\n\t\t() => {\n\t\t\terrState[1](undefined);\n\t\t}\n\t];\n}\n\nexport function useId() {\n\tconst state = getHookState(currentIndex++, 11);\n\tif (!state._value) {\n\t\t// Grab either the root node or the nearest async boundary node.\n\t\t/** @type {import('./internal.d').VNode} */\n\t\tlet root = currentComponent._vnode;\n\t\twhile (root !== null && !root._mask && root._parent !== null) {\n\t\t\troot = root._parent;\n\t\t}\n\n\t\tlet mask = root._mask || (root._mask = [0, 0]);\n\t\tstate._value = 'P' + mask[0] + '-' + mask[1]++;\n\t}\n\n\treturn state._value;\n}\n/**\n * After paint effects consumer.\n */\nfunction flushAfterPaintEffects() {\n\tlet component;\n\twhile ((component = afterPaintEffects.shift())) {\n\t\tif (!component._parentDom || !component.__hooks) continue;\n\t\ttry {\n\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeCleanup);\n\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeEffect);\n\t\t\tcomponent.__hooks._pendingEffects = [];\n\t\t} catch (e) {\n\t\t\tcomponent.__hooks._pendingEffects = [];\n\t\t\toptions._catchError(e, component._vnode);\n\t\t}\n\t}\n}\n\nlet HAS_RAF = typeof requestAnimationFrame == 'function';\n\n/**\n * Schedule a callback to be invoked after the browser has a chance to paint a new frame.\n * Do this by combining requestAnimationFrame (rAF) + setTimeout to invoke a callback after\n * the next browser frame.\n *\n * Also, schedule a timeout in parallel to the the rAF to ensure the callback is invoked\n * even if RAF doesn't fire (for example if the browser tab is not visible)\n *\n * @param {() => void} callback\n */\nfunction afterNextFrame(callback) {\n\tconst done = () => {\n\t\tclearTimeout(timeout);\n\t\tif (HAS_RAF) cancelAnimationFrame(raf);\n\t\tsetTimeout(callback);\n\t};\n\tconst timeout = setTimeout(done, RAF_TIMEOUT);\n\n\tlet raf;\n\tif (HAS_RAF) {\n\t\traf = requestAnimationFrame(done);\n\t}\n}\n\n// Note: if someone used options.debounceRendering = requestAnimationFrame,\n// then effects will ALWAYS run on the NEXT frame instead of the current one, incurring a ~16ms delay.\n// Perhaps this is not such a big deal.\n/**\n * Schedule afterPaintEffects flush after the browser paints\n * @param {number} newQueueLength\n */\nfunction afterPaint(newQueueLength) {\n\tif (newQueueLength === 1 || prevRaf !== options.requestAnimationFrame) {\n\t\tprevRaf = options.requestAnimationFrame;\n\t\t(prevRaf || afterNextFrame)(flushAfterPaintEffects);\n\t}\n}\n\n/**\n * @param {import('./internal').EffectHookState} hook\n */\nfunction invokeCleanup(hook) {\n\t// A hook cleanup can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentComponent away.\n\tconst comp = currentComponent;\n\tlet cleanup = hook._cleanup;\n\tif (typeof cleanup == 'function') {\n\t\thook._cleanup = undefined;\n\t\tcleanup();\n\t}\n\n\tcurrentComponent = comp;\n}\n\n/**\n * Invoke a Hook's effect\n * @param {import('./internal').EffectHookState} hook\n */\nfunction invokeEffect(hook) {\n\t// A hook call can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentComponent away.\n\tconst comp = currentComponent;\n\thook._cleanup = hook._value();\n\tcurrentComponent = comp;\n}\n\n/**\n * @param {any[]} oldArgs\n * @param {any[]} newArgs\n */\nfunction argsChanged(oldArgs, newArgs) {\n\treturn (\n\t\t!oldArgs ||\n\t\toldArgs.length !== newArgs.length ||\n\t\tnewArgs.some((arg, index) => arg !== oldArgs[index])\n\t);\n}\n\nfunction invokeOrReturn(arg, f) {\n\treturn typeof f == 'function' ? f(arg) : f;\n}\n","export default function getScriptParameters() {\n\tconst parametersString = document.currentScript\n\t\t?.getAttribute('src')\n\t\t?.split('?')[1];\n\tconst parametersArray = parametersString\n\t\t?.split('&')\n\t\t.map((parameterString) => {\n\t\t\tconst [key, value] = parameterString.split('=');\n\t\t\treturn [key, value];\n\t\t});\n\tconst parametersObject =\n\t\tparametersArray && Object.fromEntries(parametersArray);\n\n\treturn parametersObject;\n}\n","import {Fundraiser} from 'src/components/widget/types/Fundraiser';\nimport {Nonprofit} from 'src/components/widget/types/Nonprofit';\nimport {BASE_API_URL, BASE_COINGECKO_URL} from 'src/constants/url';\n\ntype NonprofitResponse = {\n\tmessage: string;\n\tdata: {\n\t\tnonprofit: Nonprofit;\n\t};\n};\n\ntype FundraiserResponse = {\n\tdata: {\n\t\tfundraiser: Fundraiser;\n\t\tnonprofits: Nonprofit[];\n\t};\n};\n\nexport async function getNonprofit(nonprofitSlug: string) {\n\tconst data: NonprofitResponse = await fetch(\n\t\t`${BASE_API_URL}/${nonprofitSlug}`\n\t).then(async (response) => response.json());\n\n\treturn data.data.nonprofit;\n}\n\nexport async function getFundraiser(\n\tnonprofitSlug: string,\n\tfundraiserSlug: string\n) {\n\tconst url = `${BASE_API_URL}/${nonprofitSlug}/fundraiser/${fundraiserSlug}`;\n\tconst data: FundraiserResponse = await fetch(url).then(async (response) =>\n\t\tresponse.json()\n\t);\n\n\treturn data.data.fundraiser;\n}\n\ninterface CoingeckoData {\n\tmarket_data: {\n\t\tcurrent_price: {\n\t\t\tusd: number;\n\t\t};\n\t};\n}\n\nexport async function getCoingeckoRate(coingeckoId: string) {\n\tconst url = `${BASE_COINGECKO_URL}/coins/${coingeckoId}`;\n\tconst data = await fetch(url).then(async (response) => response.json());\n\n\treturn (data as CoingeckoData).market_data.current_price.usd;\n}\n","import {Stripe, loadStripe} from '@stripe/stripe-js';\nimport {useState, useCallback, useEffect} from 'preact/hooks';\nimport {PaymentRequestAvailable} from 'src/components/widget/types/PaymentMethod';\nimport {STRIPE_API_VERSION, STRIPE_PUBLIC_KEY} from 'src/constants/stripe';\n\ndeclare global {\n\tinterface Window {\n\t\tApplePaySession: any;\n\t}\n}\n\nfunction useStripe() {\n\tconst [stripePromise, setStripe] = useState(null);\n\tuseEffect(() => {\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tconst stripe = await loadStripe(STRIPE_PUBLIC_KEY, {\n\t\t\t\t\tapiVersion: STRIPE_API_VERSION\n\t\t\t\t});\n\n\t\t\t\tsetStripe(stripe);\n\t\t\t} catch {\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t})();\n\t}, []);\n\treturn stripePromise;\n}\n\nexport function useCheckPaymentRequest(): PaymentRequestAvailable {\n\tconst stripe = useStripe();\n\n\tconst [googlePay, setGooglePay] = useState(false);\n\tconst [applePay, setApplePay] = useState(false);\n\n\tconst initializePaymentRequest = useCallback(\n\t\tasync (stripe?: Stripe | null) => {\n\t\t\tconst applePay = Boolean(window.ApplePaySession);\n\t\t\tsetApplePay(applePay);\n\n\t\t\tif (!stripe) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst pr = stripe?.paymentRequest({\n\t\t\t\tcountry: 'US',\n\t\t\t\tcurrency: 'usd',\n\t\t\t\ttotal: {label: 'test', amount: 0},\n\t\t\t\trequestPayerName: false,\n\t\t\t\trequestPayerEmail: false\n\t\t\t});\n\t\t\tconst googlePay = Boolean(await pr?.canMakePayment());\n\n\t\t\tsetGooglePay(googlePay);\n\t\t},\n\t\t[]\n\t);\n\n\tuseEffect(() => {\n\t\tvoid initializePaymentRequest(stripe);\n\t}, [initializePaymentRequest, stripe]);\n\n\treturn {googlePay, applePay};\n}\n","import {Fragment} from 'preact/jsx-runtime';\nimport {faqLinkCss} from 'src/components/widget/components/Faq/styles';\nimport {\n\tDisbursementType,\n\tNonprofit\n} from 'src/components/widget/types/Nonprofit';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nexport function getNonprofitName(nonprofit: Nonprofit) {\n\treturn nonprofit.metadata?.prefixWithThe\n\t\t? `the ${nonprofit.name}`\n\t\t: nonprofit.name;\n}\n\nexport function getDisbursementDescription(nonprofit: Nonprofit) {\n\tif (nonprofit.disbursementType === DisbursementType.STRIPE_CONNECT) {\n\t\treturn (\n\t\t\tOn a weekly basis, Every.org grants to {nonprofit.name}.\n\t\t);\n\t}\n\n\tif (nonprofit.disbursementType === DisbursementType.MANUAL) {\n\t\treturn (\n\t\t\t\n\t\t\t\tEvery.org grants directly to {nonprofit.name} on a regular basis.\n\t\t\t\n\t\t);\n\t}\n\n\tconst isPayPal =\n\t\tnonprofit.disbursementType === DisbursementType.PAYPAL_GRANTS;\n\n\treturn (\n\t\t\n\t\t\tWe then partner with {isPayPal ? 'PayPal Grants' : 'Network for Good'} to\n\t\t\tgrant to {nonprofit.name} on a{' '}\n\t\t\t\n\t\t\t\tmonthly basis\n\t\t\t\n\t\t\t{isPayPal ? ' (or semiannually for balance under $100).' : '.'}\n\t\t\n\t);\n}\n\nexport function getNfgDisclaimer(nonprofit: Nonprofit) {\n\tif (\n\t\t!nonprofit.disbursementType ||\n\t\tnonprofit.disbursementType === DisbursementType.NFG_BATCH_FILE\n\t) {\n\t\treturn (\n\t\t\t

\n\t\t\t\t{nonprofit.name} has not added bank deposit info to Every.org yet, so we\n\t\t\t\tcurrently grant to them through Network for Good, who charges a 2.25%\n\t\t\t\tdisbursement fee.\n\t\t\t

\n\t\t);\n\t}\n\n\treturn null;\n}\n\nexport function getFeeDescriptionBody(\n\tpaymentMethod: PaymentMethod,\n\tnonprofit: Nonprofit\n) {\n\tswitch (paymentMethod) {\n\t\tcase PaymentMethod.PAYPAL:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tPayPal charges 1.99% + $0.49 for each transaction. There’s an\n\t\t\t\t\t\tadditional 1.5% fee for non-US donors.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.CREDIT_CARD:\n\t\tcase PaymentMethod.PAYMENT_REQUEST:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tVisa and Mastercard charge 2.2% + $0.30 for each transaction. Amex\n\t\t\t\t\t\tcharges a 3.5% flat fee. There’s an additional 1% fee for non-US\n\t\t\t\t\t\tcards.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.BANK:\n\t\t\treturn (\n\t\t\t\t

\n\t\t\t\t\tEvery.org currently covers all fees for donations made with a bank, so\n\t\t\t\t\t100% of your gift reaches {nonprofit.name}.\n\t\t\t\t

\n\t\t\t);\n\t\tcase PaymentMethod.VENMO:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tVenmo charges 1.99% + $0.49 for each transaction. There’s an\n\t\t\t\t\t\tadditional 1.5% fee for non-US donors.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tOur exchanges generally charge a 1% flat fee to automatically\n\t\t\t\t\t\tliquidate cryptocurrency. For large donations worth over $5k, you\n\t\t\t\t\t\thave the option to email crypto@every.org to request an address and\n\t\t\t\t\t\twe can do a manual conversion to get the best rates possible\n\t\t\t\t\t\t(usually 0.1%-0.4%). Or you are welcome to donate here with the 1%\n\t\t\t\t\t\tfee.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.STOCKS:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tEvery.org covers all brokerage fees for commonly traded stocks! For\n\t\t\t\t\t\tmutual funds, the First Republic brokerage fee is usually 0.1% of\n\t\t\t\t\t\tthe principle, with a $30 minimum and $150 maximum. Some slippage\n\t\t\t\t\t\tmay occur between when you donate and when we sell making the final\n\t\t\t\t\t\tamount different from what you donate.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

We do not charge any fees, but your DAF provider may have fees.

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

However, there are third-party fees.

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t}\n}\n\nexport function encourageBankDonation(nonprofit: Nonprofit) {\n\treturn (\n\t\t

\n\t\t\tDon’t like fees? Neither do we! Donate via bank and then 100% of your gift\n\t\t\twill reach {nonprofit.name}.\n\t\t

\n\t);\n}\n\nexport function getFeeDescription(\n\tpaymentMethod: PaymentMethod,\n\tnonprofit: Nonprofit\n) {\n\treturn (\n\t\t\n\t\t\t

\n\t\t\t\tEvery.org is free for donors and nonprofits, with no platform fees -\n\t\t\t\tinstead we ask for a completely optional tip.\n\t\t\t

\n\t\t\t{getFeeDescriptionBody(paymentMethod, nonprofit)}\n\t\t
\n\t);\n}\n","export function isPresent(value: T): value is Exclude {\n\treturn !(value === null || value === undefined);\n}\n\nfunction addParameters(\n\tlink: string,\n\tparameters: Record\n) {\n\t// We don't use URLSearchParams here because it changes spaces to +s instead\n\t// of %20, and some mail clients like Apple don't handle that well.\n\tconst queryString = Object.entries(parameters)\n\t\t.map(([key, value]) => {\n\t\t\ttry {\n\t\t\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t\t\treturn [key, value].map(encodeURIComponent).join('=');\n\t\t\t} catch {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t})\n\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t.filter(isPresent)\n\t\t.join('&');\n\treturn queryString ? [link, queryString].join('?') : link;\n}\n\nexport function mailToLink(parameters: {\n\taddress?: string;\n\tsubject?: string;\n\tbody?: string;\n}) {\n\treturn addParameters(`mailto:${parameters.address ?? ''}`, {\n\t\t...(parameters.subject ? {subject: parameters.subject} : {}),\n\t\t...(parameters.body ? {body: parameters.body} : {})\n\t});\n}\n","/*\r\n * big.js v6.2.1\r\n * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.\r\n * Copyright (c) 2022 Michael Mclaughlin\r\n * https://github.com/MikeMcl/big.js/LICENCE.md\r\n */\r\n\r\n\r\n/************************************** EDITABLE DEFAULTS *****************************************/\r\n\r\n\r\n // The default values below must be integers within the stated ranges.\r\n\r\n /*\r\n * The maximum number of decimal places (DP) of the results of operations involving division:\r\n * div and sqrt, and pow with negative exponents.\r\n */\r\nvar DP = 20, // 0 to MAX_DP\r\n\r\n /*\r\n * The rounding mode (RM) used when rounding to the above decimal places.\r\n *\r\n * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN)\r\n * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP)\r\n * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN)\r\n * 3 Away from zero. (ROUND_UP)\r\n */\r\n RM = 1, // 0, 1, 2 or 3\r\n\r\n // The maximum value of DP and Big.DP.\r\n MAX_DP = 1E6, // 0 to 1000000\r\n\r\n // The maximum magnitude of the exponent argument to the pow method.\r\n MAX_POWER = 1E6, // 1 to 1000000\r\n\r\n /*\r\n * The negative exponent (NE) at and beneath which toString returns exponential notation.\r\n * (JavaScript numbers: -7)\r\n * -1000000 is the minimum recommended exponent value of a Big.\r\n */\r\n NE = -7, // 0 to -1000000\r\n\r\n /*\r\n * The positive exponent (PE) at and above which toString returns exponential notation.\r\n * (JavaScript numbers: 21)\r\n * 1000000 is the maximum recommended exponent value of a Big, but this limit is not enforced.\r\n */\r\n PE = 21, // 0 to 1000000\r\n\r\n /*\r\n * When true, an error will be thrown if a primitive number is passed to the Big constructor,\r\n * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a\r\n * primitive number without a loss of precision.\r\n */\r\n STRICT = false, // true or false\r\n\r\n\r\n/**************************************************************************************************/\r\n\r\n\r\n // Error messages.\r\n NAME = '[big.js] ',\r\n INVALID = NAME + 'Invalid ',\r\n INVALID_DP = INVALID + 'decimal places',\r\n INVALID_RM = INVALID + 'rounding mode',\r\n DIV_BY_ZERO = NAME + 'Division by zero',\r\n\r\n // The shared prototype object.\r\n P = {},\r\n UNDEFINED = void 0,\r\n NUMERIC = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i;\r\n\r\n\r\n/*\r\n * Create and return a Big constructor.\r\n */\r\nfunction _Big_() {\r\n\r\n /*\r\n * The Big constructor and exported function.\r\n * Create and return a new instance of a Big number object.\r\n *\r\n * n {number|string|Big} A numeric value.\r\n */\r\n function Big(n) {\r\n var x = this;\r\n\r\n // Enable constructor usage without new.\r\n if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n);\r\n\r\n // Duplicate.\r\n if (n instanceof Big) {\r\n x.s = n.s;\r\n x.e = n.e;\r\n x.c = n.c.slice();\r\n } else {\r\n if (typeof n !== 'string') {\r\n if (Big.strict === true && typeof n !== 'bigint') {\r\n throw TypeError(INVALID + 'value');\r\n }\r\n\r\n // Minus zero?\r\n n = n === 0 && 1 / n < 0 ? '-0' : String(n);\r\n }\r\n\r\n parse(x, n);\r\n }\r\n\r\n // Retain a reference to this Big constructor.\r\n // Shadow Big.prototype.constructor which points to Object.\r\n x.constructor = Big;\r\n }\r\n\r\n Big.prototype = P;\r\n Big.DP = DP;\r\n Big.RM = RM;\r\n Big.NE = NE;\r\n Big.PE = PE;\r\n Big.strict = STRICT;\r\n Big.roundDown = 0;\r\n Big.roundHalfUp = 1;\r\n Big.roundHalfEven = 2;\r\n Big.roundUp = 3;\r\n\r\n return Big;\r\n}\r\n\r\n\r\n/*\r\n * Parse the number or string value passed to a Big constructor.\r\n *\r\n * x {Big} A Big number instance.\r\n * n {number|string} A numeric value.\r\n */\r\nfunction parse(x, n) {\r\n var e, i, nl;\r\n\r\n if (!NUMERIC.test(n)) {\r\n throw Error(INVALID + 'number');\r\n }\r\n\r\n // Determine sign.\r\n x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1;\r\n\r\n // Decimal point?\r\n if ((e = n.indexOf('.')) > -1) n = n.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = n.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +n.slice(i + 1);\r\n n = n.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = n.length;\r\n }\r\n\r\n nl = n.length;\r\n\r\n // Determine leading zeros.\r\n for (i = 0; i < nl && n.charAt(i) == '0';) ++i;\r\n\r\n if (i == nl) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n\r\n // Determine trailing zeros.\r\n for (; nl > 0 && n.charAt(--nl) == '0';);\r\n x.e = e - i - 1;\r\n x.c = [];\r\n\r\n // Convert string to array of digits without leading/trailing zeros.\r\n for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++);\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\n/*\r\n * Round Big x to a maximum of sd significant digits using rounding mode rm.\r\n *\r\n * x {Big} The Big to round.\r\n * sd {number} Significant digits: integer, 0 to MAX_DP inclusive.\r\n * rm {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n * [more] {boolean} Whether the result of division was truncated.\r\n */\r\nfunction round(x, sd, rm, more) {\r\n var xc = x.c;\r\n\r\n if (rm === UNDEFINED) rm = x.constructor.RM;\r\n if (rm !== 0 && rm !== 1 && rm !== 2 && rm !== 3) {\r\n throw Error(INVALID_RM);\r\n }\r\n\r\n if (sd < 1) {\r\n more =\r\n rm === 3 && (more || !!xc[0]) || sd === 0 && (\r\n rm === 1 && xc[0] >= 5 ||\r\n rm === 2 && (xc[0] > 5 || xc[0] === 5 && (more || xc[1] !== UNDEFINED))\r\n );\r\n\r\n xc.length = 1;\r\n\r\n if (more) {\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n x.e = x.e - sd + 1;\r\n xc[0] = 1;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n } else if (sd < xc.length) {\r\n\r\n // xc[sd] is the digit after the digit that may be rounded up.\r\n more =\r\n rm === 1 && xc[sd] >= 5 ||\r\n rm === 2 && (xc[sd] > 5 || xc[sd] === 5 &&\r\n (more || xc[sd + 1] !== UNDEFINED || xc[sd - 1] & 1)) ||\r\n rm === 3 && (more || !!xc[0]);\r\n\r\n // Remove any digits after the required precision.\r\n xc.length = sd;\r\n\r\n // Round up?\r\n if (more) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up.\r\n for (; ++xc[--sd] > 9;) {\r\n xc[sd] = 0;\r\n if (sd === 0) {\r\n ++x.e;\r\n xc.unshift(1);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (sd = xc.length; !xc[--sd];) xc.pop();\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\n/*\r\n * Return a string representing the value of Big x in normal or exponential notation.\r\n * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.\r\n */\r\nfunction stringify(x, doExponential, isNonzero) {\r\n var e = x.e,\r\n s = x.c.join(''),\r\n n = s.length;\r\n\r\n // Exponential notation?\r\n if (doExponential) {\r\n s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e;\r\n\r\n // Normal notation.\r\n } else if (e < 0) {\r\n for (; ++e;) s = '0' + s;\r\n s = '0.' + s;\r\n } else if (e > 0) {\r\n if (++e > n) {\r\n for (e -= n; e--;) s += '0';\r\n } else if (e < n) {\r\n s = s.slice(0, e) + '.' + s.slice(e);\r\n }\r\n } else if (n > 1) {\r\n s = s.charAt(0) + '.' + s.slice(1);\r\n }\r\n\r\n return x.s < 0 && isNonzero ? '-' + s : s;\r\n}\r\n\r\n\r\n// Prototype/instance methods\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the absolute value of this Big.\r\n */\r\nP.abs = function () {\r\n var x = new this.constructor(this);\r\n x.s = 1;\r\n return x;\r\n};\r\n\r\n\r\n/*\r\n * Return 1 if the value of this Big is greater than the value of Big y,\r\n * -1 if the value of this Big is less than the value of Big y, or\r\n * 0 if they have the same value.\r\n */\r\nP.cmp = function (y) {\r\n var isneg,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new x.constructor(y)).c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) return !xc[0] ? !yc[0] ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n isneg = i < 0;\r\n\r\n // Compare exponents.\r\n if (k != l) return k > l ^ isneg ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = -1; ++i < j;) {\r\n if (xc[i] != yc[i]) return xc[i] > yc[i] ^ isneg ? 1 : -1;\r\n }\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ isneg ? 1 : -1;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,\r\n * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n */\r\nP.div = function (y) {\r\n var x = this,\r\n Big = x.constructor,\r\n a = x.c, // dividend\r\n b = (y = new Big(y)).c, // divisor\r\n k = x.s == y.s ? 1 : -1,\r\n dp = Big.DP;\r\n\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n\r\n // Divisor is zero?\r\n if (!b[0]) {\r\n throw Error(DIV_BY_ZERO);\r\n }\r\n\r\n // Dividend is 0? Return +-0.\r\n if (!a[0]) {\r\n y.s = k;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n var bl, bt, n, cmp, ri,\r\n bz = b.slice(),\r\n ai = bl = b.length,\r\n al = a.length,\r\n r = a.slice(0, bl), // remainder\r\n rl = r.length,\r\n q = y, // quotient\r\n qc = q.c = [],\r\n qi = 0,\r\n p = dp + (q.e = x.e - y.e) + 1; // precision of the result\r\n\r\n q.s = k;\r\n k = p < 0 ? 0 : p;\r\n\r\n // Create version of divisor with leading zero.\r\n bz.unshift(0);\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; rl++ < bl;) r.push(0);\r\n\r\n do {\r\n\r\n // n is how many times the divisor goes into current remainder.\r\n for (n = 0; n < 10; n++) {\r\n\r\n // Compare divisor and remainder.\r\n if (bl != (rl = r.length)) {\r\n cmp = bl > rl ? 1 : -1;\r\n } else {\r\n for (ri = -1, cmp = 0; ++ri < bl;) {\r\n if (b[ri] != r[ri]) {\r\n cmp = b[ri] > r[ri] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // If divisor < remainder, subtract divisor from remainder.\r\n if (cmp < 0) {\r\n\r\n // Remainder can't be more than 1 digit longer than divisor.\r\n // Equalise lengths using divisor with extra leading zero?\r\n for (bt = rl == bl ? b : bz; rl;) {\r\n if (r[--rl] < bt[rl]) {\r\n ri = rl;\r\n for (; ri && !r[--ri];) r[ri] = 9;\r\n --r[ri];\r\n r[rl] += 10;\r\n }\r\n r[rl] -= bt[rl];\r\n }\r\n\r\n for (; !r[0];) r.shift();\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n // Add the digit n to the result array.\r\n qc[qi++] = cmp ? n : ++n;\r\n\r\n // Update the remainder.\r\n if (r[0] && cmp) r[rl] = a[ai] || 0;\r\n else r = [a[ai]];\r\n\r\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\r\n\r\n // Leading zero? Do not remove if result is simply zero (qi == 1).\r\n if (!qc[0] && qi != 1) {\r\n\r\n // There can't be more than one zero.\r\n qc.shift();\r\n q.e--;\r\n p--;\r\n }\r\n\r\n // Round?\r\n if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);\r\n\r\n return q;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is equal to the value of Big y, otherwise return false.\r\n */\r\nP.eq = function (y) {\r\n return this.cmp(y) === 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is greater than the value of Big y, otherwise return\r\n * false.\r\n */\r\nP.gt = function (y) {\r\n return this.cmp(y) > 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise\r\n * return false.\r\n */\r\nP.gte = function (y) {\r\n return this.cmp(y) > -1;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is less than the value of Big y, otherwise return false.\r\n */\r\nP.lt = function (y) {\r\n return this.cmp(y) < 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is less than or equal to the value of Big y, otherwise\r\n * return false.\r\n */\r\nP.lte = function (y) {\r\n return this.cmp(y) < 1;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big minus the value of Big y.\r\n */\r\nP.minus = P.sub = function (y) {\r\n var i, j, t, xlty,\r\n x = this,\r\n Big = x.constructor,\r\n a = x.s,\r\n b = (y = new Big(y)).s;\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xc = x.c.slice(),\r\n xe = x.e,\r\n yc = y.c,\r\n ye = y.e;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n if (yc[0]) {\r\n y.s = -b;\r\n } else if (xc[0]) {\r\n y = new Big(x);\r\n } else {\r\n y.s = 1;\r\n }\r\n return y;\r\n }\r\n\r\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\r\n if (a = xe - ye) {\r\n\r\n if (xlty = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n for (b = a; b--;) t.push(0);\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n if (xc[b] != yc[b]) {\r\n xlty = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xlty) {\r\n t = xc;\r\n xc = yc;\r\n yc = t;\r\n y.s = -y.s;\r\n }\r\n\r\n /*\r\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\r\n * needs to start at yc.length.\r\n */\r\n if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--;) xc[i++] = 0;\r\n\r\n // Subtract yc from xc.\r\n for (b = i; j > a;) {\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i];) xc[i] = 9;\r\n --xc[i];\r\n xc[j] += 10;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--b] === 0;) xc.pop();\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] === 0;) {\r\n xc.shift();\r\n --ye;\r\n }\r\n\r\n if (!xc[0]) {\r\n\r\n // n - n = +0\r\n y.s = 1;\r\n\r\n // Result must be zero.\r\n xc = [ye = 0];\r\n }\r\n\r\n y.c = xc;\r\n y.e = ye;\r\n\r\n return y;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big modulo the value of Big y.\r\n */\r\nP.mod = function (y) {\r\n var ygtx,\r\n x = this,\r\n Big = x.constructor,\r\n a = x.s,\r\n b = (y = new Big(y)).s;\r\n\r\n if (!y.c[0]) {\r\n throw Error(DIV_BY_ZERO);\r\n }\r\n\r\n x.s = y.s = 1;\r\n ygtx = y.cmp(x) == 1;\r\n x.s = a;\r\n y.s = b;\r\n\r\n if (ygtx) return new Big(x);\r\n\r\n a = Big.DP;\r\n b = Big.RM;\r\n Big.DP = Big.RM = 0;\r\n x = x.div(y);\r\n Big.DP = a;\r\n Big.RM = b;\r\n\r\n return this.minus(x.times(y));\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big negated.\r\n */\r\nP.neg = function () {\r\n var x = new this.constructor(this);\r\n x.s = -x.s;\r\n return x;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big plus the value of Big y.\r\n */\r\nP.plus = P.add = function (y) {\r\n var e, k, t,\r\n x = this,\r\n Big = x.constructor;\r\n\r\n y = new Big(y);\r\n\r\n // Signs differ?\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e,\r\n xc = x.c,\r\n ye = y.e,\r\n yc = y.c;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n if (!yc[0]) {\r\n if (xc[0]) {\r\n y = new Big(x);\r\n } else {\r\n y.s = x.s;\r\n }\r\n }\r\n return y;\r\n }\r\n\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents.\r\n // Note: reverse faster than unshifts.\r\n if (e = xe - ye) {\r\n if (e > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n e = -e;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; e--;) t.push(0);\r\n t.reverse();\r\n }\r\n\r\n // Point xc to the longer array.\r\n if (xc.length - yc.length < 0) {\r\n t = yc;\r\n yc = xc;\r\n xc = t;\r\n }\r\n\r\n e = yc.length;\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be left as they are.\r\n for (k = 0; e; xc[e] %= 10) k = (xc[--e] = xc[e] + yc[e] + k) / 10 | 0;\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n\r\n if (k) {\r\n xc.unshift(k);\r\n ++ye;\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (e = xc.length; xc[--e] === 0;) xc.pop();\r\n\r\n y.c = xc;\r\n y.e = ye;\r\n\r\n return y;\r\n};\r\n\r\n\r\n/*\r\n * Return a Big whose value is the value of this Big raised to the power n.\r\n * If n is negative, round to a maximum of Big.DP decimal places using rounding\r\n * mode Big.RM.\r\n *\r\n * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.\r\n */\r\nP.pow = function (n) {\r\n var x = this,\r\n one = new x.constructor('1'),\r\n y = one,\r\n isneg = n < 0;\r\n\r\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\r\n throw Error(INVALID + 'exponent');\r\n }\r\n\r\n if (isneg) n = -n;\r\n\r\n for (;;) {\r\n if (n & 1) y = y.times(x);\r\n n >>= 1;\r\n if (!n) break;\r\n x = x.times(x);\r\n }\r\n\r\n return isneg ? one.div(y) : y;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\r\n * significant digits using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.prec = function (sd, rm) {\r\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\r\n throw Error(INVALID + 'precision');\r\n }\r\n return round(new this.constructor(this), sd, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big rounded to a maximum of dp decimal places\r\n * using rounding mode rm, or Big.RM if rm is not specified.\r\n * If dp is negative, round to an integer which is a multiple of 10**-dp.\r\n * If dp is not specified, round to 0 decimal places.\r\n *\r\n * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.round = function (dp, rm) {\r\n if (dp === UNDEFINED) dp = 0;\r\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n return round(new this.constructor(this), dp + this.e + 1, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the square root of the value of this Big, rounded, if\r\n * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n */\r\nP.sqrt = function () {\r\n var r, c, t,\r\n x = this,\r\n Big = x.constructor,\r\n s = x.s,\r\n e = x.e,\r\n half = new Big('0.5');\r\n\r\n // Zero?\r\n if (!x.c[0]) return new Big(x);\r\n\r\n // Negative?\r\n if (s < 0) {\r\n throw Error(NAME + 'No square root');\r\n }\r\n\r\n // Estimate.\r\n s = Math.sqrt(x + '');\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\r\n if (s === 0 || s === 1 / 0) {\r\n c = x.c.join('');\r\n if (!(c.length + e & 1)) c += '0';\r\n s = Math.sqrt(c);\r\n e = ((e + 1) / 2 | 0) - (e < 0 || e & 1);\r\n r = new Big((s == 1 / 0 ? '5e' : (s = s.toExponential()).slice(0, s.indexOf('e') + 1)) + e);\r\n } else {\r\n r = new Big(s + '');\r\n }\r\n\r\n e = r.e + (Big.DP += 4);\r\n\r\n // Newton-Raphson iteration.\r\n do {\r\n t = r;\r\n r = half.times(t.plus(x.div(t)));\r\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\r\n\r\n return round(r, (Big.DP -= 4) + r.e + 1, Big.RM);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big times the value of Big y.\r\n */\r\nP.times = P.mul = function (y) {\r\n var c,\r\n x = this,\r\n Big = x.constructor,\r\n xc = x.c,\r\n yc = (y = new Big(y)).c,\r\n a = xc.length,\r\n b = yc.length,\r\n i = x.e,\r\n j = y.e;\r\n\r\n // Determine sign of result.\r\n y.s = x.s == y.s ? 1 : -1;\r\n\r\n // Return signed 0 if either 0.\r\n if (!xc[0] || !yc[0]) {\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // Initialise exponent of result as x.e + y.e.\r\n y.e = i + j;\r\n\r\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\r\n if (a < b) {\r\n c = xc;\r\n xc = yc;\r\n yc = c;\r\n j = a;\r\n a = b;\r\n b = j;\r\n }\r\n\r\n // Initialise coefficient array of result with zeros.\r\n for (c = new Array(j = a + b); j--;) c[j] = 0;\r\n\r\n // Multiply.\r\n\r\n // i is initially xc.length.\r\n for (i = b; i--;) {\r\n b = 0;\r\n\r\n // a is yc.length.\r\n for (j = a + i; j > i;) {\r\n\r\n // Current sum of products at this digit position, plus carry.\r\n b = c[j] + yc[i] * xc[j - i - 1] + b;\r\n c[j--] = b % 10;\r\n\r\n // carry\r\n b = b / 10 | 0;\r\n }\r\n\r\n c[j] = b;\r\n }\r\n\r\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\r\n if (b) ++y.e;\r\n else c.shift();\r\n\r\n // Remove trailing zeros.\r\n for (i = c.length; !c[--i];) c.pop();\r\n y.c = c;\r\n\r\n return y;\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big in exponential notation rounded to dp fixed\r\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.toExponential = function (dp, rm) {\r\n var x = this,\r\n n = x.c[0];\r\n\r\n if (dp !== UNDEFINED) {\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n x = round(new x.constructor(x), ++dp, rm);\r\n for (; x.c.length < dp;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, true, !!n);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big in normal notation rounded to dp fixed\r\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n *\r\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n */\r\nP.toFixed = function (dp, rm) {\r\n var x = this,\r\n n = x.c[0];\r\n\r\n if (dp !== UNDEFINED) {\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n x = round(new x.constructor(x), dp + x.e + 1, rm);\r\n\r\n // x.e may have changed if the value is rounded up.\r\n for (dp = dp + x.e + 1; x.c.length < dp;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, false, !!n);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big.\r\n * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n * Omit the sign for negative zero.\r\n */\r\nP[Symbol.for('nodejs.util.inspect.custom')] = P.toJSON = P.toString = function () {\r\n var x = this,\r\n Big = x.constructor;\r\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);\r\n};\r\n\r\n\r\n/*\r\n * Return the value of this Big as a primitve number.\r\n */\r\nP.toNumber = function () {\r\n var n = Number(stringify(this, true, true));\r\n if (this.constructor.strict === true && !this.eq(n.toString())) {\r\n throw Error(NAME + 'Imprecise conversion');\r\n }\r\n return n;\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big rounded to sd significant digits using\r\n * rounding mode rm, or Big.RM if rm is not specified.\r\n * Use exponential notation if sd is less than the number of digits necessary to represent\r\n * the integer part of the value in normal notation.\r\n *\r\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.toPrecision = function (sd, rm) {\r\n var x = this,\r\n Big = x.constructor,\r\n n = x.c[0];\r\n\r\n if (sd !== UNDEFINED) {\r\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\r\n throw Error(INVALID + 'precision');\r\n }\r\n x = round(new Big(x), sd, rm);\r\n for (; x.c.length < sd;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, sd <= x.e || x.e <= Big.NE || x.e >= Big.PE, !!n);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big.\r\n * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n * Include the sign for negative zero.\r\n */\r\nP.valueOf = function () {\r\n var x = this,\r\n Big = x.constructor;\r\n if (Big.strict === true) {\r\n throw Error(NAME + 'valueOf disallowed');\r\n }\r\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, true);\r\n};\r\n\r\n\r\n// Export\r\n\r\n\r\nexport var Big = _Big_();\r\n\r\n/// \r\nexport default Big;\r\n","/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Check if two objects have a different shape\n * @param {object} a\n * @param {object} b\n * @returns {boolean}\n */\nexport function shallowDiffers(a, b) {\n\tfor (let i in a) if (i !== '__source' && !(i in b)) return true;\n\tfor (let i in b) if (i !== '__source' && a[i] !== b[i]) return true;\n\treturn false;\n}\n\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\n/**\n * Check if two values are the same value\n * @param {*} x\n * @param {*} y\n * @returns {boolean}\n */\nexport function is(x, y) {\n\treturn (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\n","import { Component } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Component class with a predefined `shouldComponentUpdate` implementation\n */\nexport function PureComponent(p) {\n\tthis.props = p;\n}\nPureComponent.prototype = new Component();\n// Some third-party libraries check if this property is present\nPureComponent.prototype.isPureReactComponent = true;\nPureComponent.prototype.shouldComponentUpdate = function (props, state) {\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n};\n","import { options } from 'preact';\nimport { assign } from './util';\n\nlet oldDiffHook = options._diff;\noptions._diff = vnode => {\n\tif (vnode.type && vnode.type._forwarded && vnode.ref) {\n\t\tvnode.props.ref = vnode.ref;\n\t\tvnode.ref = null;\n\t}\n\tif (oldDiffHook) oldDiffHook(vnode);\n};\n\nexport const REACT_FORWARD_SYMBOL =\n\t(typeof Symbol != 'undefined' &&\n\t\tSymbol.for &&\n\t\tSymbol.for('react.forward_ref')) ||\n\t0xf47;\n\n/**\n * Pass ref down to a child. This is mainly used in libraries with HOCs that\n * wrap components. Using `forwardRef` there is an easy way to get a reference\n * of the wrapped component instead of one of the wrapper itself.\n * @param {import('./index').ForwardFn} fn\n * @returns {import('./internal').FunctionComponent}\n */\nexport function forwardRef(fn) {\n\tfunction Forwarded(props) {\n\t\tlet clone = assign({}, props);\n\t\tdelete clone.ref;\n\t\treturn fn(clone, props.ref || null);\n\t}\n\n\t// mobx-react checks for this being present\n\tForwarded.$$typeof = REACT_FORWARD_SYMBOL;\n\t// mobx-react heavily relies on implementation details.\n\t// It expects an object here with a `render` property,\n\t// and prototype.render will fail. Without this\n\t// mobx-react throws.\n\tForwarded.render = Forwarded;\n\n\tForwarded.prototype.isReactComponent = Forwarded._forwarded = true;\n\tForwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';\n\treturn Forwarded;\n}\n","import { Component, createElement, options, Fragment } from 'preact';\nimport { assign } from './util';\n\nconst oldCatchError = options._catchError;\noptions._catchError = function (error, newVNode, oldVNode, errorInfo) {\n\tif (error.then) {\n\t\t/** @type {import('./internal').Component} */\n\t\tlet component;\n\t\tlet vnode = newVNode;\n\n\t\tfor (; (vnode = vnode._parent); ) {\n\t\t\tif ((component = vnode._component) && component._childDidSuspend) {\n\t\t\t\tif (newVNode._dom == null) {\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t}\n\t\t\t\t// Don't call oldCatchError if we found a Suspense\n\t\t\t\treturn component._childDidSuspend(error, newVNode);\n\t\t\t}\n\t\t}\n\t}\n\toldCatchError(error, newVNode, oldVNode, errorInfo);\n};\n\nconst oldUnmount = options.unmount;\noptions.unmount = function (vnode) {\n\t/** @type {import('./internal').Component} */\n\tconst component = vnode._component;\n\tif (component && component._onResolve) {\n\t\tcomponent._onResolve();\n\t}\n\n\t// if the component is still hydrating\n\t// most likely it is because the component is suspended\n\t// we set the vnode.type as `null` so that it is not a typeof function\n\t// so the unmount will remove the vnode._dom\n\tif (component && vnode._hydrating === true) {\n\t\tvnode.type = null;\n\t}\n\n\tif (oldUnmount) oldUnmount(vnode);\n};\n\nfunction detachedClone(vnode, detachedParent, parentDom) {\n\tif (vnode) {\n\t\tif (vnode._component && vnode._component.__hooks) {\n\t\t\tvnode._component.__hooks._list.forEach(effect => {\n\t\t\t\tif (typeof effect._cleanup == 'function') effect._cleanup();\n\t\t\t});\n\n\t\t\tvnode._component.__hooks = null;\n\t\t}\n\n\t\tvnode = assign({}, vnode);\n\t\tif (vnode._component != null) {\n\t\t\tif (vnode._component._parentDom === parentDom) {\n\t\t\t\tvnode._component._parentDom = detachedParent;\n\t\t\t}\n\t\t\tvnode._component = null;\n\t\t}\n\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tdetachedClone(child, detachedParent, parentDom)\n\t\t\t);\n\t}\n\n\treturn vnode;\n}\n\nfunction removeOriginal(vnode, detachedParent, originalParent) {\n\tif (vnode) {\n\t\tvnode._original = null;\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tremoveOriginal(child, detachedParent, originalParent)\n\t\t\t);\n\n\t\tif (vnode._component) {\n\t\t\tif (vnode._component._parentDom === detachedParent) {\n\t\t\t\tif (vnode._dom) {\n\t\t\t\t\toriginalParent.insertBefore(vnode._dom, vnode._nextDom);\n\t\t\t\t}\n\t\t\t\tvnode._component._force = true;\n\t\t\t\tvnode._component._parentDom = originalParent;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn vnode;\n}\n\n// having custom inheritance instead of a class here saves a lot of bytes\nexport function Suspense() {\n\t// we do not call super here to golf some bytes...\n\tthis._pendingSuspensionCount = 0;\n\tthis._suspenders = null;\n\tthis._detachOnNextRender = null;\n}\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspense.prototype = new Component();\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {Promise} promise The thrown promise\n * @param {import('./internal').VNode} suspendingVNode The suspending component\n */\nSuspense.prototype._childDidSuspend = function (promise, suspendingVNode) {\n\tconst suspendingComponent = suspendingVNode._component;\n\n\t/** @type {import('./internal').SuspenseComponent} */\n\tconst c = this;\n\n\tif (c._suspenders == null) {\n\t\tc._suspenders = [];\n\t}\n\tc._suspenders.push(suspendingComponent);\n\n\tconst resolve = suspended(c._vnode);\n\n\tlet resolved = false;\n\tconst onResolved = () => {\n\t\tif (resolved) return;\n\n\t\tresolved = true;\n\t\tsuspendingComponent._onResolve = null;\n\n\t\tif (resolve) {\n\t\t\tresolve(onSuspensionComplete);\n\t\t} else {\n\t\t\tonSuspensionComplete();\n\t\t}\n\t};\n\n\tsuspendingComponent._onResolve = onResolved;\n\n\tconst onSuspensionComplete = () => {\n\t\tif (!--c._pendingSuspensionCount) {\n\t\t\t// If the suspension was during hydration we don't need to restore the\n\t\t\t// suspended children into the _children array\n\t\t\tif (c.state._suspended) {\n\t\t\t\tconst suspendedVNode = c.state._suspended;\n\t\t\t\tc._vnode._children[0] = removeOriginal(\n\t\t\t\t\tsuspendedVNode,\n\t\t\t\t\tsuspendedVNode._component._parentDom,\n\t\t\t\t\tsuspendedVNode._component._originalParentDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tc.setState({ _suspended: (c._detachOnNextRender = null) });\n\n\t\t\tlet suspended;\n\t\t\twhile ((suspended = c._suspenders.pop())) {\n\t\t\t\tsuspended.forceUpdate();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * We do not set `suspended: true` during hydration because we want the actual markup\n\t * to remain on screen and hydrate it when the suspense actually gets resolved.\n\t * While in non-hydration cases the usual fallback -> component flow would occour.\n\t */\n\tconst wasHydrating = suspendingVNode._hydrating === true;\n\tif (!c._pendingSuspensionCount++ && !wasHydrating) {\n\t\tc.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });\n\t}\n\tpromise.then(onResolved, onResolved);\n};\n\nSuspense.prototype.componentWillUnmount = function () {\n\tthis._suspenders = [];\n};\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {import('./internal').SuspenseComponent[\"props\"]} props\n * @param {import('./internal').SuspenseState} state\n */\nSuspense.prototype.render = function (props, state) {\n\tif (this._detachOnNextRender) {\n\t\t// When the Suspense's _vnode was created by a call to createVNode\n\t\t// (i.e. due to a setState further up in the tree)\n\t\t// it's _children prop is null, in this case we \"forget\" about the parked vnodes to detach\n\t\tif (this._vnode._children) {\n\t\t\tconst detachedParent = document.createElement('div');\n\t\t\tconst detachedComponent = this._vnode._children[0]._component;\n\t\t\tthis._vnode._children[0] = detachedClone(\n\t\t\t\tthis._detachOnNextRender,\n\t\t\t\tdetachedParent,\n\t\t\t\t(detachedComponent._originalParentDom = detachedComponent._parentDom)\n\t\t\t);\n\t\t}\n\n\t\tthis._detachOnNextRender = null;\n\t}\n\n\t// Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:\n\t/** @type {import('./internal').VNode} */\n\tconst fallback =\n\t\tstate._suspended && createElement(Fragment, null, props.fallback);\n\tif (fallback) fallback._hydrating = null;\n\n\treturn [\n\t\tcreateElement(Fragment, null, state._suspended ? null : props.children),\n\t\tfallback\n\t];\n};\n\n/**\n * Checks and calls the parent component's _suspended method, passing in the\n * suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified\n * that one of its children/descendants suspended.\n *\n * The parent MAY return a callback. The callback will get called when the\n * suspension resolves, notifying the parent of the fact.\n * Moreover, the callback gets function `unsuspend` as a parameter. The resolved\n * child descendant will not actually get unsuspended until `unsuspend` gets called.\n * This is a way for the parent to delay unsuspending.\n *\n * If the parent does not return a callback then the resolved vnode\n * gets unsuspended immediately when it resolves.\n *\n * @param {import('./internal').VNode} vnode\n * @returns {((unsuspend: () => void) => void)?}\n */\nexport function suspended(vnode) {\n\t/** @type {import('./internal').Component} */\n\tlet component = vnode._parent._component;\n\treturn component && component._suspended && component._suspended(vnode);\n}\n\nexport function lazy(loader) {\n\tlet prom;\n\tlet component;\n\tlet error;\n\n\tfunction Lazy(props) {\n\t\tif (!prom) {\n\t\t\tprom = loader();\n\t\t\tprom.then(\n\t\t\t\texports => {\n\t\t\t\t\tcomponent = exports.default || exports;\n\t\t\t\t},\n\t\t\t\te => {\n\t\t\t\t\terror = e;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (!component) {\n\t\t\tthrow prom;\n\t\t}\n\n\t\treturn createElement(component, props);\n\t}\n\n\tLazy.displayName = 'Lazy';\n\tLazy._forwarded = true;\n\treturn Lazy;\n}\n","import { Component, toChildArray } from 'preact';\nimport { suspended } from './suspense.js';\n\n// Indexes to linked list nodes (nodes are stored as arrays to save bytes).\nconst SUSPENDED_COUNT = 0;\nconst RESOLVED_COUNT = 1;\nconst NEXT_NODE = 2;\n\n// Having custom inheritance instead of a class here saves a lot of bytes.\nexport function SuspenseList() {\n\tthis._next = null;\n\tthis._map = null;\n}\n\n// Mark one of child's earlier suspensions as resolved.\n// Some pending callbacks may become callable due to this\n// (e.g. the last suspended descendant gets resolved when\n// revealOrder === 'together'). Process those callbacks as well.\nconst resolve = (list, child, node) => {\n\tif (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {\n\t\t// The number a child (or any of its descendants) has been suspended\n\t\t// matches the number of times it's been resolved. Therefore we\n\t\t// mark the child as completely resolved by deleting it from ._map.\n\t\t// This is used to figure out when *all* children have been completely\n\t\t// resolved when revealOrder is 'together'.\n\t\tlist._map.delete(child);\n\t}\n\n\t// If revealOrder is falsy then we can do an early exit, as the\n\t// callbacks won't get queued in the node anyway.\n\t// If revealOrder is 'together' then also do an early exit\n\t// if all suspended descendants have not yet been resolved.\n\tif (\n\t\t!list.props.revealOrder ||\n\t\t(list.props.revealOrder[0] === 't' && list._map.size)\n\t) {\n\t\treturn;\n\t}\n\n\t// Walk the currently suspended children in order, calling their\n\t// stored callbacks on the way. Stop if we encounter a child that\n\t// has not been completely resolved yet.\n\tnode = list._next;\n\twhile (node) {\n\t\twhile (node.length > 3) {\n\t\t\tnode.pop()();\n\t\t}\n\t\tif (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {\n\t\t\tbreak;\n\t\t}\n\t\tlist._next = node = node[NEXT_NODE];\n\t}\n};\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspenseList.prototype = new Component();\n\nSuspenseList.prototype._suspended = function (child) {\n\tconst list = this;\n\tconst delegated = suspended(list._vnode);\n\n\tlet node = list._map.get(child);\n\tnode[SUSPENDED_COUNT]++;\n\n\treturn unsuspend => {\n\t\tconst wrappedUnsuspend = () => {\n\t\t\tif (!list.props.revealOrder) {\n\t\t\t\t// Special case the undefined (falsy) revealOrder, as there\n\t\t\t\t// is no need to coordinate a specific order or unsuspends.\n\t\t\t\tunsuspend();\n\t\t\t} else {\n\t\t\t\tnode.push(unsuspend);\n\t\t\t\tresolve(list, child, node);\n\t\t\t}\n\t\t};\n\t\tif (delegated) {\n\t\t\tdelegated(wrappedUnsuspend);\n\t\t} else {\n\t\t\twrappedUnsuspend();\n\t\t}\n\t};\n};\n\nSuspenseList.prototype.render = function (props) {\n\tthis._next = null;\n\tthis._map = new Map();\n\n\tconst children = toChildArray(props.children);\n\tif (props.revealOrder && props.revealOrder[0] === 'b') {\n\t\t// If order === 'backwards' (or, well, anything starting with a 'b')\n\t\t// then flip the child list around so that the last child will be\n\t\t// the first in the linked list.\n\t\tchildren.reverse();\n\t}\n\t// Build the linked list. Iterate through the children in reverse order\n\t// so that `_next` points to the first linked list node to be resolved.\n\tfor (let i = children.length; i--; ) {\n\t\t// Create a new linked list node as an array of form:\n\t\t// \t[suspended_count, resolved_count, next_node]\n\t\t// where suspended_count and resolved_count are numeric counters for\n\t\t// keeping track how many times a node has been suspended and resolved.\n\t\t//\n\t\t// Note that suspended_count starts from 1 instead of 0, so we can block\n\t\t// processing callbacks until componentDidMount has been called. In a sense\n\t\t// node is suspended at least until componentDidMount gets called!\n\t\t//\n\t\t// Pending callbacks are added to the end of the node:\n\t\t// \t[suspended_count, resolved_count, next_node, callback_0, callback_1, ...]\n\t\tthis._map.set(children[i], (this._next = [1, 0, this._next]));\n\t}\n\treturn props.children;\n};\n\nSuspenseList.prototype.componentDidUpdate =\n\tSuspenseList.prototype.componentDidMount = function () {\n\t\t// Iterate through all children after mounting for two reasons:\n\t\t// 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases\n\t\t// each node[RELEASED_COUNT] by 1, therefore balancing the counters.\n\t\t// The nodes can now be completely consumed from the linked list.\n\t\t// 2. Handle nodes that might have gotten resolved between render and\n\t\t// componentDidMount.\n\t\tthis._map.forEach((node, child) => {\n\t\t\tresolve(this, child, node);\n\t\t});\n\t};\n","import {\n\trender as preactRender,\n\thydrate as preactHydrate,\n\toptions,\n\ttoChildArray,\n\tComponent\n} from 'preact';\n\nexport const REACT_ELEMENT_TYPE =\n\t(typeof Symbol != 'undefined' && Symbol.for && Symbol.for('react.element')) ||\n\t0xeac7;\n\nconst CAMEL_PROPS =\n\t/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;\nconst ON_ANI = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;\nconst CAMEL_REPLACE = /[A-Z0-9]/g;\n\nconst IS_DOM = typeof document !== 'undefined';\n\n// Input types for which onchange should not be converted to oninput.\n// type=\"file|checkbox|radio\", plus \"range\" in IE11.\n// (IE11 doesn't support Symbol, which we use here to turn `rad` into `ra` which matches \"range\")\nconst onChangeInputType = type =>\n\t(typeof Symbol != 'undefined' && typeof Symbol() == 'symbol'\n\t\t? /fil|che|rad/\n\t\t: /fil|che|ra/\n\t).test(type);\n\n// Some libraries like `react-virtualized` explicitly check for this.\nComponent.prototype.isReactComponent = {};\n\n// `UNSAFE_*` lifecycle hooks\n// Preact only ever invokes the unprefixed methods.\n// Here we provide a base \"fallback\" implementation that calls any defined UNSAFE_ prefixed method.\n// - If a component defines its own `componentDidMount()` (including via defineProperty), use that.\n// - If a component defines `UNSAFE_componentDidMount()`, `componentDidMount` is the alias getter/setter.\n// - If anything assigns to an `UNSAFE_*` property, the assignment is forwarded to the unprefixed property.\n// See https://github.com/preactjs/preact/issues/1941\n[\n\t'componentWillMount',\n\t'componentWillReceiveProps',\n\t'componentWillUpdate'\n].forEach(key => {\n\tObject.defineProperty(Component.prototype, key, {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn this['UNSAFE_' + key];\n\t\t},\n\t\tset(v) {\n\t\t\tObject.defineProperty(this, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: v\n\t\t\t});\n\t\t}\n\t});\n});\n\n/**\n * Proxy render() since React returns a Component reference.\n * @param {import('./internal').VNode} vnode VNode tree to render\n * @param {import('./internal').PreactElement} parent DOM node to render vnode tree into\n * @param {() => void} [callback] Optional callback that will be called after rendering\n * @returns {import('./internal').Component | null} The root component reference or null\n */\nexport function render(vnode, parent, callback) {\n\t// React destroys any existing DOM nodes, see #1727\n\t// ...but only on the first render, see #1828\n\tif (parent._children == null) {\n\t\tparent.textContent = '';\n\t}\n\n\tpreactRender(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nexport function hydrate(vnode, parent, callback) {\n\tpreactHydrate(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nlet oldEventHook = options.event;\noptions.event = e => {\n\tif (oldEventHook) e = oldEventHook(e);\n\n\te.persist = empty;\n\te.isPropagationStopped = isPropagationStopped;\n\te.isDefaultPrevented = isDefaultPrevented;\n\treturn (e.nativeEvent = e);\n};\n\nfunction empty() {}\n\nfunction isPropagationStopped() {\n\treturn this.cancelBubble;\n}\n\nfunction isDefaultPrevented() {\n\treturn this.defaultPrevented;\n}\n\nconst classNameDescriptorNonEnumberable = {\n\tenumerable: false,\n\tconfigurable: true,\n\tget() {\n\t\treturn this.class;\n\t}\n};\n\nfunction handleDomVNode(vnode) {\n\tlet props = vnode.props,\n\t\ttype = vnode.type,\n\t\tnormalizedProps = {};\n\n\tfor (let i in props) {\n\t\tlet value = props[i];\n\n\t\tif (\n\t\t\t(i === 'value' && 'defaultValue' in props && value == null) ||\n\t\t\t// Emulate React's behavior of not rendering the contents of noscript tags on the client.\n\t\t\t(IS_DOM && i === 'children' && type === 'noscript') ||\n\t\t\ti === 'class' ||\n\t\t\ti === 'className'\n\t\t) {\n\t\t\t// Skip applying value if it is null/undefined and we already set\n\t\t\t// a default value\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet lowerCased = i.toLowerCase();\n\t\tif (i === 'defaultValue' && 'value' in props && props.value == null) {\n\t\t\t// `defaultValue` is treated as a fallback `value` when a value prop is present but null/undefined.\n\t\t\t// `defaultValue` for Elements with no value prop is the same as the DOM defaultValue property.\n\t\t\ti = 'value';\n\t\t} else if (i === 'download' && value === true) {\n\t\t\t// Calling `setAttribute` with a truthy value will lead to it being\n\t\t\t// passed as a stringified value, e.g. `download=\"true\"`. React\n\t\t\t// converts it to an empty string instead, otherwise the attribute\n\t\t\t// value will be used as the file name and the file will be called\n\t\t\t// \"true\" upon downloading it.\n\t\t\tvalue = '';\n\t\t} else if (lowerCased === 'ondoubleclick') {\n\t\t\ti = 'ondblclick';\n\t\t} else if (\n\t\t\tlowerCased === 'onchange' &&\n\t\t\t(type === 'input' || type === 'textarea') &&\n\t\t\t!onChangeInputType(props.type)\n\t\t) {\n\t\t\tlowerCased = i = 'oninput';\n\t\t} else if (lowerCased === 'onfocus') {\n\t\t\ti = 'onfocusin';\n\t\t} else if (lowerCased === 'onblur') {\n\t\t\ti = 'onfocusout';\n\t\t} else if (ON_ANI.test(i)) {\n\t\t\ti = lowerCased;\n\t\t} else if (type.indexOf('-') === -1 && CAMEL_PROPS.test(i)) {\n\t\t\ti = i.replace(CAMEL_REPLACE, '-$&').toLowerCase();\n\t\t} else if (value === null) {\n\t\t\tvalue = undefined;\n\t\t}\n\n\t\t// Add support for onInput and onChange, see #3561\n\t\t// if we have an oninput prop already change it to oninputCapture\n\t\tif (lowerCased === 'oninput') {\n\t\t\ti = lowerCased;\n\t\t\tif (normalizedProps[i]) {\n\t\t\t\ti = 'oninputCapture';\n\t\t\t}\n\t\t}\n\n\t\tnormalizedProps[i] = value;\n\t}\n\n\t// Add support for array select values: value not being updated.\n\t\t\t\t\t// To avoid a stale select value we need to set the option.value\n\t\t\t\t\t// again, which triggers IE11 to re-evaluate the select value\n\t\t\t\t\t(nodeType === 'option' && i !== oldProps.value))\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'value', i, oldProps.value, false);\n\t\t\t}\n\t\t\tif (\n\t\t\t\t'checked' in newProps &&\n\t\t\t\t(i = newProps.checked) !== undefined &&\n\t\t\t\ti !== dom.checked\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'checked', i, oldProps.checked, false);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/**\n * Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} ref\n * @param {any} value\n * @param {import('../internal').VNode} vnode\n */\nexport function applyRef(ref, value, vnode) {\n\ttry {\n\t\tif (typeof ref == 'function') ref(value);\n\t\telse ref.current = value;\n\t} catch (e) {\n\t\toptions._catchError(e, vnode);\n\t}\n}\n\n/**\n * Unmount a virtual node from the tree and apply DOM changes\n * @param {import('../internal').VNode} vnode The virtual node to unmount\n * @param {import('../internal').VNode} parentVNode The parent of the VNode that\n * initiated the unmount\n * @param {boolean} [skipRemove] Flag that indicates that a parent node of the\n * current element is already detached from the DOM.\n */\nexport function unmount(vnode, parentVNode, skipRemove) {\n\tlet r;\n\tif (options.unmount) options.unmount(vnode);\n\n\tif ((r = vnode.ref)) {\n\t\tif (!r.current || r.current === vnode._dom) {\n\t\t\tapplyRef(r, null, parentVNode);\n\t\t}\n\t}\n\n\tif ((r = vnode._component) != null) {\n\t\tif (r.componentWillUnmount) {\n\t\t\ttry {\n\t\t\t\tr.componentWillUnmount();\n\t\t\t} catch (e) {\n\t\t\t\toptions._catchError(e, parentVNode);\n\t\t\t}\n\t\t}\n\n\t\tr.base = r._parentDom = null;\n\t\tvnode._component = undefined;\n\t}\n\n\tif ((r = vnode._children)) {\n\t\tfor (let i = 0; i < r.length; i++) {\n\t\t\tif (r[i]) {\n\t\t\t\tunmount(\n\t\t\t\t\tr[i],\n\t\t\t\t\tparentVNode,\n\t\t\t\t\tskipRemove || typeof vnode.type !== 'function'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!skipRemove && vnode._dom != null) {\n\t\tremoveNode(vnode._dom);\n\t}\n\n\t// Must be set to `undefined` to properly clean up `_nextDom`\n\t// for which `null` is a valid value. See comment in `create-element.js`\n\tvnode._parent = vnode._dom = vnode._nextDom = undefined;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n","import { EMPTY_OBJ } from './constants';\nimport { commitRoot, diff } from './diff/index';\nimport { createElement, Fragment } from './create-element';\nimport options from './options';\nimport { slice } from './util';\n\n/**\n * Render a Preact virtual node into a DOM element\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * render into\n * @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an\n * existing DOM tree rooted at `replaceNode`\n */\nexport function render(vnode, parentDom, replaceNode) {\n\tif (options._root) options._root(vnode, parentDom);\n\n\t// We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in\n\t// hydration mode or not by passing the `hydrate` function instead of a DOM\n\t// element..\n\tlet isHydrating = typeof replaceNode === 'function';\n\n\t// To be able to support calling `render()` multiple times on the same\n\t// DOM node, we need to obtain a reference to the previous tree. We do\n\t// this by assigning a new `_children` property to DOM nodes which points\n\t// to the last rendered tree. By default this property is not present, which\n\t// means that we are mounting a new tree for the first time.\n\tlet oldVNode = isHydrating\n\t\t? null\n\t\t: (replaceNode && replaceNode._children) || parentDom._children;\n\n\tvnode = ((!isHydrating && replaceNode) || parentDom)._children =\n\t\tcreateElement(Fragment, null, [vnode]);\n\n\t// List of effects that need to be called after diffing.\n\tlet commitQueue = [],\n\t\trefQueue = [];\n\tdiff(\n\t\tparentDom,\n\t\t// Determine the new vnode tree and store it on the DOM element on\n\t\t// our custom `_children` property.\n\t\tvnode,\n\t\toldVNode || EMPTY_OBJ,\n\t\tEMPTY_OBJ,\n\t\tparentDom.ownerSVGElement !== undefined,\n\t\t!isHydrating && replaceNode\n\t\t\t? [replaceNode]\n\t\t\t: oldVNode\n\t\t\t? null\n\t\t\t: parentDom.firstChild\n\t\t\t? slice.call(parentDom.childNodes)\n\t\t\t: null,\n\t\tcommitQueue,\n\t\t!isHydrating && replaceNode\n\t\t\t? replaceNode\n\t\t\t: oldVNode\n\t\t\t? oldVNode._dom\n\t\t\t: parentDom.firstChild,\n\t\tisHydrating,\n\t\trefQueue\n\t);\n\n\t// Flush all queued effects\n\tcommitRoot(commitQueue, vnode, refQueue);\n}\n\n/**\n * Update an existing DOM element with data from a Preact virtual node\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * update\n */\nexport function hydrate(vnode, parentDom) {\n\trender(vnode, parentDom, hydrate);\n}\n","import { assign, slice } from './util';\nimport { createVNode } from './create-element';\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {import('./internal').VNode} vnode The virtual DOM element to clone\n * @param {object} props Attributes/props to add when cloning\n * @param {Array} rest Any additional arguments will be used as replacement children.\n * @returns {import('./internal').VNode}\n */\nexport function cloneElement(vnode, props, children) {\n\tlet normalizedProps = assign({}, vnode.props),\n\t\tkey,\n\t\tref,\n\t\ti;\n\n\tlet defaultProps;\n\n\tif (vnode.type && vnode.type.defaultProps) {\n\t\tdefaultProps = vnode.type.defaultProps;\n\t}\n\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse if (props[i] === undefined && defaultProps !== undefined) {\n\t\t\tnormalizedProps[i] = defaultProps[i];\n\t\t} else {\n\t\t\tnormalizedProps[i] = props[i];\n\t\t}\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\treturn createVNode(\n\t\tvnode.type,\n\t\tnormalizedProps,\n\t\tkey || vnode.key,\n\t\tref || vnode.ref,\n\t\tnull\n\t);\n}\n","import { enqueueRender } from './component';\n\nexport let i = 0;\n\nexport function createContext(defaultValue, contextId) {\n\tcontextId = '__cC' + i++;\n\n\tconst context = {\n\t\t_id: contextId,\n\t\t_defaultValue: defaultValue,\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tConsumer(props, contextValue) {\n\t\t\t// return props.children(\n\t\t\t// \tcontext[contextId] ? context[contextId].props.value : defaultValue\n\t\t\t// );\n\t\t\treturn props.children(contextValue);\n\t\t},\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tProvider(props) {\n\t\t\tif (!this.getChildContext) {\n\t\t\t\t/** @type {import('./internal').Component[]} */\n\t\t\t\tlet subs = [];\n\t\t\t\tlet ctx = {};\n\t\t\t\tctx[contextId] = this;\n\n\t\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t\tif (this.props.value !== _props.value) {\n\t\t\t\t\t\t// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:\n\t\t\t\t\t\t// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358\n\t\t\t\t\t\t// In those cases though, even with the value corrected, we're double-rendering all nodes.\n\t\t\t\t\t\t// It might be better to just tell folks not to use force-sync mode.\n\t\t\t\t\t\t// Currently, using `useContext()` in a class component will overwrite its `this.context` value.\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context[contextId] = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\t\t\t\t\t\tsubs.some(c => {\n\t\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.sub = c => {\n\t\t\t\t\tsubs.push(c);\n\t\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\t\tsubs.splice(subs.indexOf(c), 1);\n\t\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn props.children;\n\t\t}\n\t};\n\n\t// Devtools needs access to the context object when it\n\t// encounters a Provider. This is necessary to support\n\t// setting `displayName` on the context object instead\n\t// of on the component itself. See:\n\t// https://reactjs.org/docs/context.html#contextdisplayname\n\n\treturn (context.Provider._contextRef = context.Consumer.contextType =\n\t\tcontext);\n}\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","export const EMPTY_OBJ = {};\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw\n * the error that was caught (except for unmounting when this parameter\n * is the highest parent that was being unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component, ctor, handled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != null) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != null) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n","/* global __webpack_public_path__ */\n\nimport * as Preact from 'preact';\nconst { h, render, hydrate } = Preact;\n\nconst interopDefault = m => (m && m.default ? m.default : m);\n\nconst normalizeURL = url => (url[url.length - 1] === '/' ? url : url + '/');\n\nif (process.env.NODE_ENV === 'development') {\n\t// enable preact devtools\n\trequire('preact/debug');\n\n\t// only add a debug sw if webpack service worker is not requested.\n\tif (process.env.ADD_SW === undefined && 'serviceWorker' in navigator) {\n\t\tnavigator.serviceWorker.register(\n\t\t\tnormalizeURL(__webpack_public_path__) + 'sw-debug.js'\n\t\t);\n\t} else if (process.env.ADD_SW && 'serviceWorker' in navigator) {\n\t\tnavigator.serviceWorker.register(\n\t\t\tnormalizeURL(__webpack_public_path__) +\n\t\t\t\t(process.env.ES_BUILD ? 'sw-esm.js' : 'sw.js')\n\t\t);\n\t}\n} else if (process.env.ADD_SW && 'serviceWorker' in navigator) {\n\tnavigator.serviceWorker.register(\n\t\tnormalizeURL(__webpack_public_path__) +\n\t\t\t(process.env.ES_BUILD ? 'sw-esm.js' : 'sw.js')\n\t);\n}\n\nlet app = interopDefault(require('preact-cli-entrypoint'));\n\nif (typeof app === 'function') {\n\tlet root =\n\t\tdocument.getElementById('preact_root') || document.body.firstElementChild;\n\n\tlet init = () => {\n\t\tlet app = interopDefault(require('preact-cli-entrypoint'));\n\t\tlet preRenderData = {};\n\t\tconst inlineDataElement = document.querySelector(\n\t\t\t'[type=\"__PREACT_CLI_DATA__\"]'\n\t\t);\n\t\tif (inlineDataElement) {\n\t\t\tpreRenderData =\n\t\t\t\tJSON.parse(decodeURI(inlineDataElement.innerHTML)).preRenderData ||\n\t\t\t\tpreRenderData;\n\t\t}\n\t\t/* An object named CLI_DATA is passed as a prop,\n\t\t * this keeps us future proof if in case we decide,\n\t\t * to send other data like at some point in time.\n\t\t */\n\t\tconst CLI_DATA = { preRenderData };\n\t\tconst currentURL = preRenderData.url ? normalizeURL(preRenderData.url) : '';\n\t\tconst canHydrate =\n\t\t\tprocess.env.PRERENDER &&\n\t\t\tprocess.env.NODE_ENV === 'production' &&\n\t\t\thydrate &&\n\t\t\tcurrentURL === normalizeURL(location.pathname);\n\t\tconst doRender = canHydrate ? hydrate : render;\n\t\tdoRender(h(app, { CLI_DATA }), document.body, root);\n\t};\n\n\tif (module.hot) module.hot.accept('preact-cli-entrypoint', init);\n\n\tinit();\n}\n","/*\n * Fuzzy\n * https://github.com/myork/fuzzy\n *\n * Copyright (c) 2012 Matt York\n * Licensed under the MIT license.\n */\n\n(function() {\n\nvar root = this;\n\nvar fuzzy = {};\n\n// Use in node or in browser\nif (typeof exports !== 'undefined') {\n module.exports = fuzzy;\n} else {\n root.fuzzy = fuzzy;\n}\n\n// Return all elements of `array` that have a fuzzy\n// match against `pattern`.\nfuzzy.simpleFilter = function(pattern, array) {\n return array.filter(function(str) {\n return fuzzy.test(pattern, str);\n });\n};\n\n// Does `pattern` fuzzy match `str`?\nfuzzy.test = function(pattern, str) {\n return fuzzy.match(pattern, str) !== null;\n};\n\n// If `pattern` matches `str`, wrap each matching character\n// in `opts.pre` and `opts.post`. If no match, return null\nfuzzy.match = function(pattern, str, opts) {\n opts = opts || {};\n var patternIdx = 0\n , result = []\n , len = str.length\n , totalScore = 0\n , currScore = 0\n // prefix\n , pre = opts.pre || ''\n // suffix\n , post = opts.post || ''\n // String to compare against. This might be a lowercase version of the\n // raw string\n , compareString = opts.caseSensitive && str || str.toLowerCase()\n , ch;\n\n pattern = opts.caseSensitive && pattern || pattern.toLowerCase();\n\n // For each character in the string, either add it to the result\n // or wrap in template if it's the next string in the pattern\n for(var idx = 0; idx < len; idx++) {\n ch = str[idx];\n if(compareString[idx] === pattern[patternIdx]) {\n ch = pre + ch + post;\n patternIdx += 1;\n\n // consecutive characters should increase the score more than linearly\n currScore += 1 + currScore;\n } else {\n currScore = 0;\n }\n totalScore += currScore;\n result[result.length] = ch;\n }\n\n // return rendered string if we have a match for every char\n if(patternIdx === pattern.length) {\n // if the string is an exact match with pattern, totalScore should be maxed\n totalScore = (compareString === pattern) ? Infinity : totalScore;\n return {rendered: result.join(''), score: totalScore};\n }\n\n return null;\n};\n\n// The normal entry point. Filters `arr` for matches against `pattern`.\n// It returns an array with matching values of the type:\n//\n// [{\n// string: 'lah' // The rendered string\n// , index: 2 // The index of the element in `arr`\n// , original: 'blah' // The original element in `arr`\n// }]\n//\n// `opts` is an optional argument bag. Details:\n//\n// opts = {\n// // string to put before a matching character\n// pre: ''\n//\n// // string to put after matching character\n// , post: ''\n//\n// // Optional function. Input is an entry in the given arr`,\n// // output should be the string to test `pattern` against.\n// // In this example, if `arr = [{crying: 'koala'}]` we would return\n// // 'koala'.\n// , extract: function(arg) { return arg.crying; }\n// }\nfuzzy.filter = function(pattern, arr, opts) {\n if(!arr || arr.length === 0) {\n return [];\n }\n if (typeof pattern !== 'string') {\n return arr;\n }\n opts = opts || {};\n return arr\n .reduce(function(prev, element, idx, arr) {\n var str = element;\n if(opts.extract) {\n str = opts.extract(element);\n }\n var rendered = fuzzy.match(pattern, str, opts);\n if(rendered != null) {\n prev[prev.length] = {\n string: rendered.rendered\n , score: rendered.score\n , index: idx\n , original: element\n };\n }\n return prev;\n }, [])\n\n // Sort by score. Browsers are inconsistent wrt stable/unstable\n // sorting, so force stable by using the index in the case of tie.\n // See http://ofb.net/~sethml/is-sort-stable.html\n .sort(function(a,b) {\n var compare = b.score - a.score;\n if(compare) return compare;\n return a.index - b.index;\n });\n};\n\n\n}());\n\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/dist/donate-button/0.4/bundle.c3cb6.esm.js b/docs/dist/donate-button/0.4/bundle.c3cb6.esm.js new file mode 100644 index 00000000..aa512e17 --- /dev/null +++ b/docs/dist/donate-button/0.4/bundle.c3cb6.esm.js @@ -0,0 +1,2 @@ +!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(t){return e[t]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="https://assets.every.org/dist/donate-button/0.4/",t(t.s="riXW")}({"/hs+":function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function a(e){return Object.entries(e).filter(([,e])=>Boolean(e)).map(e=>e.map(e=>encodeURIComponent(e)).join("=")).join("&")}function i({fundraiserSlug:e,nonprofitSlug:t}){let n=Te+t;return e&&(n+="/f/"+e),n}function l({methods:e,nonprofitSlug:t,noExit:n,privateNote:r}){return{method:null==e?void 0:e.join(","),utm_campaign:"donate-button",utm_source:t,utm_medium:"donate-button-0.4",no_exit:null!=n?n:1,private_note:r}}function c(e){var t;const n=new URL(e),r=n.pathname.split("/f/")[1],o=n.pathname.split("/")[1],a=new URLSearchParams(n.search),i=function(e){if(e)return e.split(",").filter(e=>Xe.includes(e))}(a.get(We.METHOD)),l=function(e){if(e)return Object.values(Fe).find(t=>t.toUpperCase()===e.toUpperCase())}(a.get(We.FREQUENCY)),c=null!=(t=a.get(We.MONTHLY_TITLE))?t:void 0,s=function(e){if(e)return e.split(",").map(Number.parseFloat).filter(Boolean).slice(0,5)}(a.get(We.SUGGESTED_AMOUNTS));if(o)return{fundraiserSlug:r,nonprofitSlug:o,defaultFrequency:l,methods:i,lockMonthlyFrequency:l===Fe.Monthly,monthlyTitle:c,addAmounts:s}}function s(e,t){je.options.__h&&je.options.__h(et,e,rt||t),rt=0;var n=et.__H||(et.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:at}),n.__[e]}function u(e){return rt=1,p(C,e)}function p(e,t,n){var r=s(Je++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):C(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=et,!et.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!a||a.call(this,e,t,n);var i=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&r.__c.props===e)&&(!a||a.call(this,e,t,n))};et.u=!0;var a=et.shouldComponentUpdate,i=et.componentWillUpdate;et.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,o(e,t,n),a=r}i&&i.call(this,e,t,n)},et.shouldComponentUpdate=o}return r.__N||r.__}function d(e,t){var n=s(Je++,3);!je.options.__s&&O(n.__H,t)&&(n.__=e,n.i=t,et.__H.__h.push(n))}function h(e){return rt=5,f((function(){return{current:e}}),[])}function f(e,t){var n=s(Je++,7);return O(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function b(e,t){return rt=8,f((function(){return e}),t)}function m(e){var t=et.context[e.__c],n=s(Je++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(et)),t.props.value):e.__}function y(){for(var e;e=ot.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(v),e.__H.__h.forEach(g),e.__H.__h=[]}catch(t){e.__H.__h=[],je.options.__e(t,e.__v)}}function _(e){var t,n=function(){clearTimeout(r),pt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);pt&&(t=requestAnimationFrame(n))}function v(e){var t=et,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),et=t}function g(e){var t=et;e.__c=e.__(),et=t}function O(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function C(e,t){return"function"==typeof t?t(e):t}function j(){const[e,t]=u(null);return d(()=>{(async()=>{try{const e=await function(){for(var e=arguments.length,t=new Array(e),n=0;n{try{return[e,t].map(encodeURIComponent).join("=")}catch(e){return null}}).filter(L).join("&");return n?[e,n].join("?"):e}("mailto:"+(null!=(t=e.address)?t:""),T({},e.subject?{subject:e.subject}:{},e.body?{body:e.body}:{}))}function M(){return(M=Object.assign?Object.assign.bind():function(e){for(var t=1;te.cssText).join("\n"),o=document.createElement("style");o.id="every-shadow-styles",o.innerHTML=Qi+r,nl.append(o)}}function ve(e){let{element:t}=e,n=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,Ji);if(!t.parentNode)return;const r=t.parentNode;Object(je.render)(Object(je.h)(Be,n),r,t)}function ge(){document.querySelectorAll("*[href^='https://www.every.org/']").forEach(e=>{const t=e.getAttribute("href");if(null!=t&&t.includes("#/donate")){const n=c(t);if(!n)return;const r=function(e){nl||_e();const t=document.createElement("div");return nl.append(t),new rl(e,t)}(n);null===e.getAttribute("data-every-style")?e.addEventListener("click",e=>{e.preventDefault(),r.show()}):ve(me({element:e,onClick:()=>{r.show()}},n,{url:t}))}})}function Oe(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}function Ce(){return(Ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{withLogo:t=!0,textColor:n="#fff",bgColor:r="#00a380",borderRadius:o="100px",fontSize:c="16px",padding:s="12px 20px",className:u,onClick:p,target:d="_blank",url:h}=e,f=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,Ie);const b=h||`${i(m=f)}?${a(l(m))}#/${De}`;var m;return Object(je.h)("a",{href:b,style:{background:r,color:n,borderRadius:o,fontSize:c,padding:s},className:[Se,u].filter(Boolean).join(" "),target:d,onClick:p?e=>{e.preventDefault(),p()}:void 0},t&&Object(je.h)("svg",{className:Ne,style:{color:n,height:c,width:c},width:"64",height:"56",viewBox:"0 0 64 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Re||(Re=Object(je.h)("path",{d:"M48.3746 20.9558C48.3746 9.03877 38.4374 0 25.6754 0C11.4001 0 0 12.0685 0 27.0153C0 43.1235 12.8125 56 30.0639 56C47.3153 56 62.7508 42.3156 63.9614 24.3895H56.0924C54.6295 37.8215 43.2799 48.1226 30.0639 48.1226C17.3523 48.1226 7.91952 38.7809 7.91952 27.0153C7.91952 16.4112 15.7886 7.87737 25.6754 7.87737C33.948 7.87737 40.4551 13.5329 40.4551 20.9558C40.4551 27.1163 36.0161 32.2669 30.1143 32.2669V40.1443C40.556 40.1443 48.3746 31.4085 48.3746 20.9558Z"}))),He||(He=Object(je.h)("span",{className:Ae},"Donate")))};let Fe=function(e){return e.Monthly="monthly",e.OneTime="once",e.Unselected="",e}({}),Ue=function(e){return e.CREDIT_CARD="card",e.BANK="bank",e.PAYPAL="paypal",e.VENMO="venmo",e.PAYMENT_REQUEST="pay",e.CRYPTO="crypto",e.STOCKS="stocks",e.DAF="daf",e.GIFT_CARD="gift",e}({});const qe=[Ue.VENMO,Ue.DAF,Ue.CRYPTO,Ue.STOCKS],Xe=Object.values(Ue),Ge=Xe.filter(e=>e!==Ue.GIFT_CARD);var We=function(e){return e.METHOD="method",e.FREQUENCY="frequency",e.MONTHLY_TITLE="monthlyTitle",e.SUGGESTED_AMOUNTS="suggestedAmounts",e}(We||{});const $e=()=>{const e=document.createElement("style");e.innerHTML='\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Regular-Pro.woff2) format("woff2");\n font-weight: 400;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Bold-Pro.woff2) format("woff2");\n font-weight: bold;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Medium-Pro.woff2) format("woff2");\n font-weight: 500;\n font-style: normal;\n font-display: swap;\n }\n ',document.head.append(e)};var Ve=n("nr9d"),ze=n.n(Ve);const Ze={methods:Object.values(Ge),show:!1,addAmounts:[10,50,100],defaultFrequency:Fe.OneTime,minDonationAmount:5,primaryColor:"#018669",showGiftCardOption:!1},Ye={arrayMerge:(e,t)=>t},Ke=Object(je.createContext)({}),Qe=({options:e,children:t})=>{const n=(e=>{var t;const n=null==(t=e.methods)?void 0:t.filter(e=>Xe.includes(e)),r=(n&&n.length>0?n:Ge).concat(e.showGiftCardOption?[Ue.GIFT_CARD]:[]);return ze.a.all([Ze,e,{methods:r}],Ye)})(e);return Object(je.h)(Ke.Provider,{value:n},t)};var Je,et,tt,nt,rt=0,ot=[],at=[],it=je.options.__b,lt=je.options.__r,ct=je.options.diffed,st=je.options.__c,ut=je.options.unmount;je.options.__b=function(e){et=null,it&&it(e)},je.options.__r=function(e){lt&<(e),Je=0;var t=(et=e.__c).__H;t&&(tt===et?(t.__h=[],et.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=at,e.__N=e.i=void 0}))):(t.__h.forEach(v),t.__h.forEach(g),t.__h=[],Je=0)),tt=et},je.options.diffed=function(e){ct&&ct(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ot.push(t)&&nt===je.options.requestAnimationFrame||((nt=je.options.requestAnimationFrame)||_)(y)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==at&&(e.__=e.__V),e.i=void 0,e.__V=at}))),tt=et=null},je.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(v),e.__h=e.__h.filter((function(e){return!e.__||g(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],je.options.__e(n,e.__v)}})),st&&st(e,t)},je.options.unmount=function(e){ut&&ut(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{v(e)}catch(e){t=e}})),n.__H=void 0,t&&je.options.__e(t,n.__v))};var pt="function"==typeof requestAnimationFrame;const dt=()=>m(Ke),ht=Symbol("FundraiserFetchError"),ft=Symbol("FundraiserFetching"),bt=Object(je.createContext)({fundraiser:ft}),mt=({children:e})=>{const{fundraiserSlug:t,nonprofitSlug:n}=dt(),[r,o]=u(ft),a=b(async()=>{if(t)try{const e=await async function(e,t){const n=`${Le}/${e}/fundraiser/${t}`;return(await fetch(n).then(async e=>e.json())).data.fundraiser}(n,t);o(e)}catch(e){o(ht)}else o(void 0)},[n,t]);return d(()=>{a()},[a]),Object(je.h)(bt.Provider,{value:{fundraiser:r}},e)},yt=Symbol("NonprofitFetchError"),_t=Symbol("NonprofitFetching"),vt=Object(je.createContext)({nonprofit:_t}),gt=({children:e})=>{const{nonprofitSlug:t}=dt(),[n,r]=u(_t),o=b(async()=>{try{const e=await async function(e){return(await fetch(`${Le}/${e}`).then(async e=>e.json())).data.nonprofit}(t);r(e)}catch(e){r(yt)}},[t]);return d(()=>{o()},[o]),Object(je.h)(vt.Provider,{value:{nonprofit:n}},e)};var Ot="https://js.stripe.com/v3",Ct=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,jt="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",wt=null,xt=function(e){return null!==wt?wt:wt=new Promise((function(t,n){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(jt),window.Stripe)t(window.Stripe);else try{var r=function(){for(var e=document.querySelectorAll('script[src^="'.concat(Ot,'"]')),t=0;t element.");return r.appendChild(n),n}(e)),r.addEventListener("load",(function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))})),r.addEventListener("error",(function(){n(new Error("Failed to load Stripe.js"))}))}catch(e){return void n(e)}else t(null)}))},kt=function(e,t,n){if(null===e)return null;var r=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"1.54.2",startTime:t})}(r,n),r},St=Promise.resolve().then((function(){return xt(null)})),Nt=!1;St.catch((function(e){Nt||console.warn(e)}));const At=Object(je.createContext)({}),Tt=({children:e,hide:t})=>{const n=dt(),[r,o]=u(n.defaultFrequency),[a,i]=u(n.defaultDonationAmount),[l,c]=u(null),[s,p]=u(n.methods[0]),[h,f]=u(),[m,y]=u(),[_,v]=u(),[g,O]=u(),C=function(){const e=j(),[t,n]=u(!1),r=b(async e=>{const t=null==e?void 0:e.paymentRequest({country:"US",currency:"usd",total:{label:"test",amount:0},requestPayerName:!1,requestPayerEmail:!1}),r=Boolean(await(null==t?void 0:t.canMakePayment()));n(r)},[]);d(()=>{e&&r(e)},[r,e]);const o=Boolean(window.ApplePaySession);return{googlePay:t,applePay:t&&o}}(),[w,x]=u();return Object(je.h)(At.Provider,{value:{frequency:r,setFrequency:o,donationAmount:a,setDonationAmount:i,hideWidget:t,submitError:l,setSubmitError:c,selectedPaymentMethod:s,setSelectedPaymentMethod:p,stockAmount:h,setStockAmount:f,stockSymbol:m,setStockSymbol:y,cryptoAmount:_,setCryptoAmount:v,cryptoCurrency:g,setCryptoCurrency:O,paymentRequestAvailable:C,privateNote:w,setPrivateNote:x}},e)},Lt=({options:e,hide:t,children:n})=>Object(je.h)(Qe,{options:e},Object(je.h)(Tt,{hide:t},Object(je.h)(gt,null,Object(je.h)(mt,null,n))));let Pt=function(e){return e.PhoneOnly="@media only screen and (max-width: 37.44em)",e.TabletUp="@media only screen and (min-width: 37.5em)",e.TabletLandscapeUp="@media only screen and (min-width: 56.25em)",e.DesktopUp="@media only screen and (min-width: 75em)",e.BigDesktopUp="@media only screen and (min-width: 112.5em)",e}({}),Mt=function(e){return e.LightGray="#EAEDED",e.Gray="#f3f6f6",e.DarkGray="#868A8A",e.Black="#272727",e.Text="#2E3434",e.TextGray="#868383",e.TextOpaque="rgba(46, 52, 52, 0.6)",e.Error="#D95C35",e.ErrorShadow="rgba(217, 92, 53, 0.2)",e.Transparent="transparent",e.White="#fff",e}({});const Et={fontSize:"32px",lineHeight:"36px"},Dt={fontSize:"24px",lineHeight:"32px"},Rt={fontSize:"20px",lineHeight:"24px"},Ht={fontSize:"16px",lineHeight:"24px"},It={fontSize:"14px",lineHeight:"20px"};let Bt=function(e){return e.Empty="0",e.XXS="4px",e.XS="8px",e.S="12px",e.M="16px",e.L="20px",e.XL="24px",e.XXL="32px",e.Stack_XXS="0 0 4px 0",e.Stack_XS="0 0 8px 0",e.Stack_S="0 0 12px 0",e.Stack_M="0 0 16px 0",e.Stack_L="0 0 20px 0",e.Stack_XL="0 0 24px 0",e.Stack_XXL="0 0 32px 0",e.Inset_XXS="4px 4px 4px 4px",e.Inset_XS="8px 8px 8px 8px",e.Inset_S="12px 12px 12px 12px",e.Inset_M="16px 16px 16px 16px",e.Inset_L="20px 20px 20px 20px",e.Inset_XL="24px 24px 24px 24px",e.Inset_XXL="32px 32px 32px 32px",e.InsetSquish_XS="8px 16px",e.InsetSquish_S="12px 24px",e.InsetSquish_M="16px 32px",e.InsetSquish_L="20px 40px",e.InsetSquish_XL="24px 48px",e.Inline_XS="0 8px 0 0",e.Inline_S="0 12px 0 0",e.Inline_M="0 16px 0 0",e.Inline_L="0 20px 0 0",e.Inline_XL="0 24px 0 0",e.Inline_XXL="0 24px 0 0",e}({});const Ft=e=>({display:"flex",flexDirection:"column","> *:not(:last-child)":{marginBottom:"number"==typeof e?e+"px":e}}),Ut=e=>({display:"flex",flexDirection:"row","> *:not(:last-child)":{marginRight:"number"==typeof e?e+"px":e}}),qt=e=>xe()(Ft(e)),Xt=e=>Ft(e),Gt=e=>Ut(e),Wt=xe()({display:"flex",flexDirection:"column",gap:Bt.M}),$t={position:"relative",top:"-1px",transform:"rotate(180deg)"},Vt={"> p":{marginBottom:Bt.XS}},zt=xe()(w({},Vt,{maxHeight:"1000px",transition:"all 1s",opacity:"1"})),Zt=xe()(w({},Vt,{opacity:"0",overflow:"hidden",maxHeight:"0",transition:"all 0.5s"})),Yt=e=>xe()(w({},Gt(Bt.S),It,{alignItems:"center",justifyContent:"space-between",width:"100%",border:"none",background:"transparent",textAlign:"start",padding:0,":hover":{cursor:"pointer"},"> svg":w({width:"16px",height:"16px"},e?$t:{})},e?{fontWeight:700}:{fontWeight:500,color:Mt.TextGray})),Kt=xe()({color:Mt.Text,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}});var Qt,Jt,en,tn,nn,rn,on,an,ln;const cn=(e,t)=>{const n=`100% of your donation is tax-deductible to the extent allowed by US law. \n Your donation is made to Every.org, a tax-exempt US 501(c)(3) charity that\n grants unrestricted funds to ${e.name} on your behalf. \n As a legal matter, Every.org must provide any donations to ${e.name} on an\n unrestricted basis, regardless of any designations or restrictions made by\n you.`,r=t&&!function(e){return e.nonprofitId===e.creatorNonprofitId}(t);let o="";return e.hasAdmin&&r?o=`Please note ${e.name} has not reviewed or approved the content of this peer-to-peer fundraiser.`:e.hasAdmin||r?!e.hasAdmin&&r&&(o=`Please note ${e.name} has not provided permission for this solicitation or reviewed or approved the content of this peer-to-peer fundraiser.`):o=`Please note ${e.name} has not provided permission for this solicitation.`,Object(je.h)("span",null,n," ",o)},sn=xe()({backgroundColor:"white",padding:`${Bt.XL} ${Bt.XL} 0px`,borderRadius:"unset",overflow:"hidden",[Pt.TabletLandscapeUp]:{borderRadius:"16px",padding:Bt.M}});var un=e=>e.filter(e=>Boolean(e)).join(" ");const pn=({children:e,className:t})=>Object(je.h)("div",{className:un([sn,t])},e),dn=()=>m(bt).fundraiser,hn=()=>{const e=dn();if(e!==ht&&e!==ft)return e},fn=()=>m(vt).nonprofit,bn=()=>{const e=fn();if(e===yt||e===_t)throw new Error("Nonprofit error");return e},mn=()=>m(At);var yn;const _n=()=>yn||(yn=Object(je.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Object(je.h)("path",{d:"M6 9l6 6 6-6"})));var vn,gn,On;const Cn=({faqData:e})=>{const[t,n]=u(!1);return Object(je.h)("div",{className:(r=e.mobileOnly,xe()(w({},It,r?{[Pt.TabletLandscapeUp]:{padding:"none"}}:{})))},Object(je.h)("button",{type:"button",className:Yt(t),onClick:()=>{n(!t)}},Object(je.h)("span",null,e.title),vn||(vn=Object(je.h)(_n,null))),Object(je.h)("div",{className:t?zt:Zt},e.description));var r},jn=()=>{const e=bn(),t=hn(),{selectedPaymentMethod:n}=mn(),r=[{id:"intro",title:"How does Every.org accept my donation?",description:Object(je.h)(je.Fragment,null,Object(je.h)("p",null,"Your donation first goes to Every.org, a US 501(c)(3) public charity, and we immediately issue a receipt for your charitable contribution. ",x(e)),gn||(gn=Object(je.h)("p",null,"This process ensures your eligibility for a tax-deduction, consolidates records of your giving, and reduces the administrative burden on the nonprofits.")))},{id:"fees",title:"Are there any fees?",description:N(n,e)},{id:"tax",title:"Is this donation tax-deductible?",description:Object(je.h)("p",null,"Yes, ",cn(e,t))},{id:"receipt",title:"Will I receive a receipt for my donation?",description:On||(On=Object(je.h)(je.Fragment,null,Object(je.h)("p",null,"Yes, after your donation payment is confirmed, you will immediately get a receipt emailed to you."),Object(je.h)("p",null,"Additionally, if you have an Every.org account, you can always get a single itemized receipt that shows all your donations in a given year.")))},{id:"p2p",mobileOnly:!0,title:"How else can I support "+e.name,description:Object(je.h)("p",null,"You can also rally your friends, family, and social networks to support this nonprofit by starting your own fundraiser for them."," ",Object(je.h)("a",{className:Kt,href:Te+e.primarySlug+"/fundraiser"},"Start a fundraiser for ",e.name))}];return Object(je.h)(pn,null,Object(je.h)("div",{className:Wt},r.map(e=>Object(je.h)(Cn,{key:e.id,faqData:e}))))},wn=xe()(A({padding:`${Bt.XL} ${Bt.XL} 0px`,backgroundColor:"unset",display:"flex",flexDirection:"column"},It,{color:Mt.TextGray,[Pt.TabletLandscapeUp]:{padding:"0px "+Bt.L},"> p":{margin:0},"> p:not(:last-child)":{marginBottom:Bt.XS}})),xn=xe()({color:Mt.TextGray,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}});var kn,Sn,Nn,An;const Tn=["children"],Ln=P({address:"support@every.org"}),Pn=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,Tn);return Object(je.h)("a",M({className:xn},n),t)},Mn=()=>{const e=bn(),t=hn();return Object(je.h)(pn,{className:wn},Object(je.h)("p",null,cn(e,t)," ",kn||(kn=Object(je.h)(Pn,{href:"https://www.every.org/terms"},"See Terms"))),Sn||(Sn=Object(je.h)("p",null,"Need help? See FAQs or contact us at our"," ",Object(je.h)(Pn,{href:"https://www.every.org/support"},"Help Center"),".")),Nn||(Nn=Object(je.h)("p",null,"Have ideas for how we can build a better donation experience?"," ",Object(je.h)(Pn,{href:Ln},"Send us feedback"),".")),An||(An=Object(je.h)("p",null,"We respect your privacy. To learn more, check out our"," ",Object(je.h)(Pn,{href:"https://www.every.org/privacy"},"Privacy Policy"),".")))},En=e=>xe()({color:e,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}}),Dn=xe()({display:"none",[Pt.TabletLandscapeUp]:{display:"block"}}),Rn=()=>{const{primaryColor:e,nonprofitSlug:t}=dt(),n=Te+t+"/fundraiser";return Object(je.h)(pn,{className:Dn},Object(je.h)("p",null,Object(je.h)("a",{className:En(e),href:n},"Start a fundraiser")," ","to rally your friends and family"))},Hn=xe()({display:"grid",gridGap:0,gridTemplateColumns:"1fr",gridTemplateAreas:'"header"\n "promoBanners"\n "nonprofitInfo"\n "paymentProcess"\n "fundraiserLink"\n "faq"\n "footer"',[Pt.TabletLandscapeUp]:{gridColumnGap:Bt.XL,gridTemplateColumns:"1fr 2fr",gridTemplateRows:"auto auto auto auto auto 1fr",gridTemplateAreas:'"header header"\n "promoBanners promoBanners"\n "nonprofitInfo paymentProcess"\n "fundraiserLink paymentProcess"\n "faq paymentProcess"\n "faq footer"',"& > div:not(:last-child):not(:empty)":{marginBottom:Bt.XL}},"& > #every-header":{gridArea:"header",display:"block",[Pt.TabletLandscapeUp]:{display:"none"}},"& > #every-promoBanners":{gridArea:"promoBanners"},"& > #every-nonprofitInfo":{gridArea:"nonprofitInfo"},"& > #every-paymentProcess":{gridArea:"paymentProcess"},"& > #every-faq":{gridArea:"faq"},"& > #every-fundraiserLink":{gridArea:"fundraiserLink"},"& > #every-footer":{gridArea:"footer"}}),In=({children:e})=>Object(je.h)("div",{className:Hn},e),Bn=xe()({cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",backgroundColor:"transparent",fontFamily:ke.BasisGrotesque}),Fn=xe()({display:"block",[Pt.TabletLandscapeUp]:{display:"none"}}),Un=xe()({position:"absolute",right:Bt.XL,top:Bt.XL,padding:Bt.XXS,background:"white",borderRadius:"8px",display:"none",[Pt.TabletLandscapeUp]:{display:"block"}}),qn=()=>{const{primaryColor:e}=dt();return Object(je.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(je.h)("path",{d:"M18 6L6 18",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Object(je.h)("path",{d:"M6 6L18 18",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))};var Xn;const Gn=({className:e})=>{const{hideWidget:t}=mn();return Object(je.h)("button",{type:"button",className:un([Bn,e]),onClick:t},Xn||(Xn=Object(je.h)(qn,null)))},Wn=xe()({display:"flex",justifyContent:"flex-end",alignItems:"center",padding:`${Bt.M} ${Bt.XL}`,[Pt.TabletLandscapeUp]:{padding:0}});var $n;const Vn=()=>$n||($n=Object(je.h)("div",{className:Wn},Object(je.h)(Gn,{className:Fn})));let zn=function(e){return e.Small="4px",e.Default="8px",e.Medium="24px",e.Big="100px",e.Circle="100%",e}({});const Zn=xe()({lineHeight:"20px","> span":{fontWeight:700}}),Yn=e=>xe()({borderRadius:zn.Circle,overflow:"hidden",display:"block",backgroundImage:`url(${e})`,backgroundSize:"contain",width:"40px",height:"40px",flexShrink:0,[Pt.TabletLandscapeUp]:{width:"64px",height:"64px"}}),Kn=xe()({padding:""+Bt.XL,[Pt.TabletLandscapeUp]:E({},Xt(Bt.S),{padding:""+Bt.L})}),Qn=xe()(E({},Gt(Bt.S),{alignItems:"center"})),Jn=xe()(E({},It,{color:"rgba(0, 0, 0, 0.7)",display:"none",[Pt.TabletLandscapeUp]:{display:"block"}}));var er;const tr=()=>{const{name:e,logoCloudinaryId:t,hasAdmin:n}=bn(),r="https://res.cloudinary.com/everydotorg/image/upload/f_auto,q_auto/"+(null!=t?t:"NonprofitAvatarPlaceholder");return Object(je.h)(pn,{className:Kn},Object(je.h)("div",{className:Qn},Object(je.h)("div",{alt:"nonprofit logo",className:Yn(r)}),Object(je.h)("h1",{className:Zn},n?Object(je.h)(je.Fragment,null,Object(je.h)("span",null,e)," is using Every.org to accept this donation"):Object(je.h)(je.Fragment,null,"Every.org created this page for ",Object(je.h)("span",null,e)))),er||(er=Object(je.h)("p",{className:Jn},"Every.org is a 501(c)(3) nonprofit building free, accessible giving tools for every person and every organization.")))};var nr;const rr=()=>nr||(nr=Object(je.h)(tr,null));let or=function(e){return e.Normal="1px solid",e.Big="4px solid",e}({});const ar=(e,t)=>`${e} ${t}`,ir=xe()({"& input":{fontSize:Ht.fontSize,lineHeight:Ht.fontSize,fontWeight:400}}),lr=xe()({background:Mt.White,borderRadius:`0 0 ${zn.Default} ${zn.Default}`,border:ar(or.Normal,Mt.LightGray),borderTop:"none"}),cr=xe()({display:"flex",alignItems:"center",gap:Bt.XXS}),sr=xe()({overflowY:"scroll",height:"100%",maxHeight:"200px"}),ur=xe()({borderBottom:ar(or.Normal,Mt.LightGray)}),pr=xe()(D({border:"none",background:"none",padding:`${Bt.S} ${Bt.M}`},Ht,{width:"100%",display:"flex",alignItems:"center",gap:Bt.XS,":hover":{cursor:"pointer"},"> span:last-of-type":D({marginLeft:"auto"},It,{color:Mt.TextGray})})),dr=(e,t)=>xe()(D({marginLeft:"auto"},It,{color:Mt.TextGray,display:"flex",gap:Bt.XS,alignItems:"center","> svg":D({color:e},t?$t:{})})),hr=xe()({borderRadius:`${zn.Default} ${zn.Default} 0 0 `}),fr=xe()({gap:Bt.XS,"> input":{textAlign:"right"}}),br=(xe()({}),xe()({border:ar(or.Normal,Mt.Error)})),mr=xe()({fontSize:Dt.fontSize,lineHeight:Dt.fontSize,fontWeight:700}),yr=xe()(R({},Dt,{fontWeight:700,display:"inline-flex",marginRight:Bt.XXS})),_r=e=>xe()(R({},Rt,{fontWeight:700,color:e,display:"inline-flex",marginLeft:Bt.XXS})),vr=xe()(R({},Gt(Bt.M),{justifyContent:"center"})),gr=e=>xe()(R({},Ht,{color:e,borderRadius:zn.Big,fontWeight:500,border:"none",padding:0,fontFamily:"inherit",cursor:"pointer",background:"unset",[Pt.TabletLandscapeUp]:{border:"1px solid "+Mt.DarkGray,padding:`${Bt.XS} ${Bt.L}`}}));(B.prototype=new je.Component).isPureReactComponent=!0,B.prototype.shouldComponentUpdate=function(e,t){return I(this.props,e)||I(this.state,t)};var Or=je.options.__b;je.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Or&&Or(e)};var Cr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911,jr=je.options.__e;je.options.__e=function(e,t,n,r){if(e.then)for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);jr(e,t,n,r)};var wr=je.options.unmount;je.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),wr&&wr(e)},(U.prototype=new je.Component).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=q(r.__v),a=!1,i=function(){a||(a=!0,n.__R=null,o?o(l):l())};n.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},U.prototype.componentWillUnmount=function(){this.t=[]},U.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=H({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&Object(je.createElement)(je.Fragment,null,e.fallback);return o&&(o.__h=null),[Object(je.createElement)(je.Fragment,null,t.__a?null:e.children),o]};var xr=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]xe()({position:"relative",padding:Bt.M,display:"flex",flexDirection:"row",alignItems:"center",borderRadius:zn.Default,color:Mt.Text,backgroundColor:Mt.Gray,border:ar(or.Normal,Mt.LightGray),cursor:"text",":focus-within":{backgroundColor:"white",borderColor:e}}),Ir=xe()({fontSize:Ht.fontSize,lineHeight:Ht.fontSize,fontFamily:"inherit",flex:1,border:"none",outline:"none",background:"transparent",width:"100%",minWidth:"unset",padding:0,margin:0,"::placeholder":{fontWeight:400},"::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:0},"::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0},"-moz-appearance":"textfield"}),Br=["containerClassName","inputClassName","containerOnClick"];var Fr=F((e,t)=>{const n=h(),{primaryColor:r}=dt(),{containerClassName:o,inputClassName:a}=e,i=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,Br);return Object(je.h)("div",{className:un([Hr(r),o]),onClick:()=>{var e;null==(e=n.current)||e.focus()}},Object(je.h)("textarea",V({ref:e=>{e&&(n.current=e,t&&(t.current=e))},className:un([Ir,a])},i)))});const Ur=["sufix","sufixClassName","prefix","prefixClassName","containerClassName","inputClassName","containerOnClick"];var qr=F((e,t)=>{const{sufix:n,sufixClassName:r,prefix:o,prefixClassName:a,containerClassName:i,inputClassName:l,containerOnClick:c}=e,s=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,Ur),u=h(),{primaryColor:p}=dt();return Object(je.h)("div",{className:un([Hr(p),i]),onClick:()=>{var e;c?c():null==(e=u.current)||e.focus()}},o&&Object(je.h)("div",{className:a},o),Object(je.h)("input",z({ref:e=>{e&&(u.current=e,t&&(t.current=e))},className:un([Ir,l])},s)),n&&Object(je.h)("div",{className:r},n))});let Xr=function(e){return e.ALGO="ALGO",e.APE="APE",e.AVAX="AVAX",e.BAT="BAT",e.BTC="BTC",e.DAI="DAI",e.DOGE="DOGE",e.DOT="DOT",e.ETH="ETH",e.FIL="FIL",e.GRT="GRT",e.LINK="LINK",e.LTC="LTC",e.MATIC="MATIC",e.MOB="MOB",e.RAY="RAY",e.SAMO="SAMO",e.SBR="SBR",e.SHIB="SHIB",e.SOL="SOL",e.UNI="UNI",e.USDC="USDC",e.USDT="USDT",e.XTZ="XTZ",e.ZEC="ZEC",e}({}),Gr=function(e){return e.ERC20="ERC-20",e.SPL="SPL",e}({});const Wr=[Xr.ALGO,Xr.MOB],$r={[Xr.ALGO]:{displayName:"Algorand",abbreviation:"ALGO",decimalOffset:6},[Xr.APE]:{displayName:"Apecoin",abbreviation:"APE",decimalOffset:18,contractType:Gr.ERC20},[Xr.AVAX]:{displayName:"Avalanche",abbreviation:"AVAX",decimalOffset:9},[Xr.BAT]:{displayName:"Basic Attention Token",abbreviation:"BAT",decimalOffset:18,contractType:Gr.ERC20},[Xr.BTC]:{displayName:"Bitcoin",abbreviation:"BTC",decimalOffset:8},[Xr.DOGE]:{displayName:"DogeCoin",abbreviation:"DOGE",decimalOffset:8},[Xr.DAI]:{displayName:"Dai",abbreviation:"DAI",decimalOffset:18,contractType:Gr.ERC20},[Xr.DOT]:{displayName:"Polkadot",abbreviation:"DOT",decimalOffset:10},[Xr.ETH]:{displayName:"Ethereum",abbreviation:"ETH",decimalOffset:18},[Xr.FIL]:{displayName:"Filecoin",abbreviation:"FIL",decimalOffset:18},[Xr.GRT]:{displayName:"The Graph",abbreviation:"GRT",decimalOffset:18,contractType:Gr.ERC20},[Xr.LINK]:{displayName:"Chainlink",abbreviation:"LINK",decimalOffset:18,contractType:Gr.ERC20},[Xr.LTC]:{displayName:"Litecoin",abbreviation:"LTC",decimalOffset:8},[Xr.MATIC]:{displayName:"Polygon",abbreviation:"MATIC",decimalOffset:18,contractType:Gr.ERC20},[Xr.MOB]:{displayName:"MobileCoin",abbreviation:"MOB",decimalOffset:12},[Xr.RAY]:{displayName:"Raydium",abbreviation:"RAY",decimalOffset:6,contractType:Gr.SPL},[Xr.SAMO]:{displayName:"Samoyed",abbreviation:"SAMO",decimalOffset:9,contractType:Gr.SPL},[Xr.SBR]:{displayName:"Saber",abbreviation:"SBR",decimalOffset:6,contractType:Gr.SPL},[Xr.SHIB]:{displayName:"Shiba Inu",abbreviation:"SHIB",decimalOffset:18,contractType:Gr.ERC20},[Xr.SOL]:{displayName:"Solana",abbreviation:"SOL",decimalOffset:9},[Xr.UNI]:{displayName:"Uniswap",abbreviation:"UNI",decimalOffset:18,contractType:Gr.ERC20},[Xr.USDC]:{displayName:"USD Coin",abbreviation:"USDC",decimalOffset:6,contractType:Gr.ERC20},[Xr.USDT]:{displayName:"Tether",abbreviation:"USDT",decimalOffset:6},[Xr.XTZ]:{displayName:"Tezos",abbreviation:"XTZ",decimalOffset:6},[Xr.ZEC]:{displayName:"ZCash",abbreviation:"ZEC",decimalOffset:8}},Vr=()=>{dt();const{cryptoAmount:e,setCryptoAmount:t,cryptoCurrency:n,submitError:r,setSubmitError:o}=mn(),a=un([fr,...r?[br]:[]]);return Object(je.h)("div",{className:a},Object(je.h)(qr,{id:"donation-input",inputClassName:mr,containerClassName:a,type:"number",inputMode:"decimal",pattern:"[+-]?(\\d*\\.)?\\d+",step:Z(n),value:e,sufix:Object(je.h)("span",null,n),onInput:e=>{const n=e.currentTarget.value;""===n&&(e.currentTarget.value=n,t(void 0));const r=Number.parseFloat(n);!Number.isNaN(r)&&/[+-]?(\d*\.)?\d+/g.test(n)&&(t(r),o(null))}}))};var zr=n("kPAj");const Zr={[Xr.ALGO]:n.p+"58f20393bf2b41f944c6229c2af785b9.svg",[Xr.APE]:n.p+"5982461fe2304c26f3a3cf4c50806dad.svg",[Xr.AVAX]:n.p+"b31a89ce5555412a0c8a4c6463286584.svg",[Xr.BAT]:n.p+"26c9b1d3d7943e6e67cf13e039ba5ac8.svg",[Xr.BTC]:n.p+"9052c75387065f76bb3436b7e4ce12cd.svg",[Xr.DOGE]:n.p+"4d81ee51fa2520df58ae092aeb3d0bd4.svg",[Xr.DAI]:n.p+"f8f4253f02d1fbc4bf04d0959a6e614c.svg",[Xr.DOT]:n.p+"f588feb3cbbcc0fb259a3630ec7e34ba.svg",[Xr.ETH]:n.p+"8098252f28e93069c75d6010d3ac6bc1.svg",[Xr.FIL]:n.p+"03c114f6e014588a4bde815d9bc85821.svg",[Xr.GRT]:n.p+"5450d3cada4fd0370ab8d885765f5cc3.svg",[Xr.LINK]:n.p+"3a5177b76709819ba4663556e60222f8.svg",[Xr.LTC]:n.p+"cc9ce389e9a4e0f518e3caeb7b60912d.svg",[Xr.MATIC]:n.p+"3e1eb932bdbaa2318584813bf468be53.svg",[Xr.MOB]:n.p+"8f22b294629293d29895fddef0a8baea.svg",[Xr.RAY]:n.p+"badb98080214485db486794fb59a95cc.svg",[Xr.SAMO]:n.p+"e4bfa8eb04696d4fd5ea04ca4c35469b.svg",[Xr.SBR]:n.p+"fc9295a4651c56d5b4e8c3aa13a93208.svg",[Xr.SHIB]:n.p+"743324f8e09d34a894c21e91c396f289.svg",[Xr.SOL]:n.p+"b9021bb757262a32de6d8931015051d9.svg",[Xr.UNI]:n.p+"45bcde5a98dbbdf2a4e0769eca2154f1.svg",[Xr.USDC]:n.p+"bc2c9e9d67b73656a6da5dd177aa10a2.svg",[Xr.USDT]:n.p+"7ab9396038b4befda4354b2a476d9064.svg",[Xr.XTZ]:n.p+"6214ae0b42d798a0c9a51503a27a66bf.svg",[Xr.ZEC]:n.p+"88611c6e2f9450f29ece8d2b36641670.svg"},Yr=({currency:e})=>Object(je.h)("img",{src:Zr[e],alt:e+"_icon",width:24,height:24});var Kr;const Qr=()=>Kr||(Kr=Object(je.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-search"},Object(je.h)("circle",{cx:"11",cy:"11",r:"8"}),Object(je.h)("path",{d:"M21 21l-4.35-4.35"})));var Jr,eo,to;const no=[Xr.BTC,Xr.ETH,Xr.USDC],ro=no.map(e=>Q(e)),oo=Object.values(Xr).filter(e=>!no.includes(e)).filter(e=>!Wr.includes(e)).map(e=>Q(e)),ao=Object.values(Xr).map(e=>Q(e)),io=({onClick:e,option:t})=>Object(je.h)("li",{key:t.value,role:"option"},Object(je.h)("button",{type:"button",className:pr,onClick:()=>{e(t)}},Object(je.h)(Yr,{currency:t.value}),Object(je.h)("span",null,t.label),Object(je.h)("span",null,t.contractType))),lo=()=>{const e=bn(),{primaryColor:t}=dt(),n=`Contents: I would like to make a crypto donation to support https://www.every.org/${e.primarySlug}.\n\nMy name:\nToken name:\nToken symbol:\nToken quantity:\n\nPlease reply back with an address where I can donate, as this is worth over $5,000 USD.`;return Object(je.h)("a",{className:En(t),href:P({address:"crypto@every.org",subject:"Crypto donation for "+e.name,body:n})},"crypto@every.org")},co=()=>{const{submitError:e,cryptoCurrency:t,setCryptoCurrency:n}=mn(),{primaryColor:r}=dt(),o=h(null),[a,i]=u(ao.find(e=>e.value===t)),[l,c]=u(null==a?void 0:a.label),[s,p]=u(!a),d=e=>{i(e),n(e.value),c(e.label),p(!1)},f=()=>{i(void 0),n(void 0),p(!0),c("")},b=un([cr,...e?[br]:[],...s?[hr]:[]]),m=e=>Object(je.h)(io,{option:e,onClick:d}),y=l?Object(zr.filter)(l,ao,{extract:e=>{const t=$r[e.value];return[t.displayName,t.abbreviation].join(" ")}}).map(e=>e.original):void 0;return Object(je.h)("div",{className:ir},Object(je.h)(qr,{ref:o,inputClassName:mr,containerOnClick:()=>{var e;null==(e=o.current)||e.focus(),f()},value:l,prefix:a?Object(je.h)(Yr,{currency:a.value}):Jr||(Jr=Object(je.h)(Qr,null)),prefixClassName:xe()({display:"inline-flex"}),sufixClassName:dr(r,s),containerClassName:b,sufix:Object(je.h)(je.Fragment,null,Object(je.h)("span",null,null==a?void 0:a.contractType)," ",eo||(eo=Object(je.h)(_n,null))),onInput:e=>{c(e.currentTarget.value),i(void 0),n(void 0),p(!0)},onFocus:f}),s&&Object(je.h)("div",{className:lr},Object(je.h)("div",{className:sr},y?0===y.length?Object(je.h)("div",{className:xe()({padding:"20px"})},"We don't currently support this coin on our site, but for donations worth over $5,000 USD we can do it manually. Please email ",to||(to=Object(je.h)(lo,null))," to arrange."):Object(je.h)("ul",null,y.map(e=>m(e))):Object(je.h)(je.Fragment,null,Object(je.h)("ul",{className:ur},ro.map(e=>m(e))),Object(je.h)("ul",null,oo.map(e=>m(e)))))))};var so;const uo=()=>so||(so=Object(je.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(je.h)("path",{d:"M14.9384 5.2052C15.6282 4.34238 16.0964 3.18386 15.9729 2C14.9631 2.05021 13.7308 2.6662 13.0174 3.5297C12.3768 4.26915 11.8098 5.47617 11.9576 6.61041C13.0912 6.70874 14.2237 6.04381 14.9384 5.2052Z",fill:"#2E3434"}),Object(je.h)("path",{d:"M15.9595 6.83176C14.3133 6.73371 12.9136 7.76606 12.1275 7.76606C11.3409 7.76606 10.1371 6.88118 8.83501 6.90503C7.14031 6.92992 5.56781 7.88812 4.70782 9.41211C2.93897 12.4608 4.24102 16.9832 5.96114 19.4662C6.79647 20.6946 7.80318 22.0472 9.12968 21.9986C10.383 21.9494 10.8743 21.1871 12.3977 21.1871C13.9201 21.1871 14.3626 21.9986 15.6893 21.974C17.0651 21.9494 17.9253 20.745 18.7606 19.5154C19.7189 18.115 20.1111 16.7629 20.1358 16.6887C20.1111 16.6641 17.4828 15.6558 17.4584 12.6324C17.4336 10.1009 19.522 8.89672 19.6203 8.82205C18.441 7.07785 16.5983 6.88118 15.9595 6.83176Z",fill:"#2E3434"})));var po;var ho;const fo=({className:e})=>Object(je.h)("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ho||(ho=Object(je.h)("path",{d:"M20 12v10H4V12M22 7H2v5h20V7zM12 22V7M12 7H7.5a2.5 2.5 0 110-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z",stroke:"#00A37F",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})));var bo;const mo=()=>bo||(bo=Object(je.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(je.h)("path",{d:"M22 12.2296C22 11.5499 21.9438 10.8665 21.8238 10.1978H12.2013V14.0483H17.7117C17.483 15.2902 16.7483 16.3887 15.6725 17.0868V19.5853H18.9599C20.8904 17.8437 22 15.2718 22 12.2296Z",fill:"#4285F4"}),Object(je.h)("path",{d:"M12.2013 21.9998C14.9528 21.9998 17.2731 21.1143 18.9637 19.5859L15.6762 17.0874C14.7616 17.6974 13.5808 18.0427 12.2051 18.0427C9.5436 18.0427 7.28697 16.2828 6.47728 13.9166H3.08484V16.4922C4.81667 19.8688 8.34406 21.9998 12.2013 21.9998Z",fill:"#34A853"}),Object(je.h)("path",{d:"M6.4739 13.9165C6.04657 12.6747 6.04657 11.3299 6.4739 10.088V7.51245H3.08521C1.63826 10.3379 1.63826 13.6667 3.08521 16.4921L6.4739 13.9165Z",fill:"#FBBC04"}),Object(je.h)("path",{d:"M12.2013 5.95801C13.6558 5.93596 15.0615 6.47239 16.1148 7.45707L19.0274 4.60224C17.1832 2.90477 14.7353 1.97152 12.2013 2.00092C8.34406 2.00092 4.81667 4.13194 3.08484 7.51218L6.47353 10.0878C7.27947 7.71794 9.53985 5.95801 12.2013 5.95801Z",fill:"#EA4335"})));var yo;var _o;var vo,go;const Oo={[Ue.CREDIT_CARD]:Object(je.h)(()=>{const{primaryColor:e}=dt();return Object(je.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(je.h)("path",{d:"M21 4.74316H3C1.89543 4.74316 1 5.63859 1 6.74316V18.7432C1 19.8477 1.89543 20.7432 3 20.7432H21C22.1046 20.7432 23 19.8477 23 18.7432V6.74316C23 5.63859 22.1046 4.74316 21 4.74316Z",stroke:e,strokeWidth:"2",strokeLinecap:"round"}),Object(je.h)("path",{d:"M1 10.7432H23",stroke:e,strokeWidth:"2",strokeLinecap:"round"}))},null),[Ue.BANK]:Object(je.h)(()=>{const{primaryColor:e}=dt();return Object(je.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(je.h)("path",{d:"M4 8.74348V19.2435M7 19.2435V8.74348M16 8.74348V19.2435M19 19.2435V8.74348M3.5 22.7435H19.5C20.33 22.7435 21 22.7435 21 21.2435C21 19.7435 20.33 19.7435 19.5 19.7435H3.5C2.67 19.7435 2 19.7435 2 21.2435C2 22.7435 2.67 22.7435 3.5 22.7435ZM10.57 2.23348L2.67 6.39348C2.26 6.60348 2 7.03348 2 7.49348C2 8.18348 2.56 8.74348 3.25 8.74348H19.76C20.44 8.74348 21 8.18348 21 7.49348C21 7.03348 20.74 6.60348 20.33 6.39348L12.43 2.23348C11.85 1.92348 11.15 1.92348 10.57 2.23348Z",stroke:e,strokeWidth:"2"}))},null),[Ue.PAYPAL]:Object(je.h)(()=>yo||(yo=Object(je.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(je.h)("path",{d:"M8.78495 22.0251L9.12912 19.7433L8.36247 19.7248H4.70166L7.24574 2.88757C7.25331 2.83613 7.27835 2.78924 7.31628 2.75545C7.3542 2.72166 7.4025 2.70322 7.45237 2.70349H13.625C15.6742 2.70349 17.0884 3.14858 17.8268 4.02709C18.1729 4.43921 18.3934 4.86988 18.5 5.34382C18.6118 5.84111 18.6138 6.43525 18.5046 7.1599L18.4967 7.21278V7.67711L18.8428 7.88179C19.1071 8.02153 19.3446 8.21056 19.5436 8.43953C19.8398 8.79189 20.0313 9.23973 20.1122 9.77068C20.1958 10.3167 20.1682 10.9665 20.0313 11.7022C19.8733 12.5484 19.618 13.2854 19.2732 13.8885C18.9689 14.4287 18.5599 14.8966 18.0722 15.2622C17.6142 15.6015 17.07 15.8591 16.4547 16.0239C15.8585 16.186 15.1787 16.2678 14.4331 16.2678H13.9527C13.6092 16.2678 13.2756 16.3969 13.0137 16.6284C12.7521 16.8623 12.5786 17.1856 12.5241 17.5405L12.4879 17.7459L11.8798 21.7675L11.8522 21.9152C11.845 21.9619 11.8324 21.9853 11.814 22.0011C11.7962 22.0163 11.7739 22.0248 11.7508 22.0251H8.78495Z",fill:"#253B80"}),Object(je.h)("path",{d:"M19.1713 7.26611C19.1528 7.38906 19.1318 7.51476 19.1081 7.64389C18.2941 12.0062 15.5091 13.5132 11.9523 13.5132H10.1413C9.70633 13.5132 9.33979 13.8429 9.27201 14.2907L8.3448 20.4286L8.08223 22.1684C8.07177 22.2374 8.07576 22.308 8.09393 22.3752C8.1121 22.4425 8.14402 22.5048 8.18749 22.558C8.23096 22.6111 8.28494 22.6538 8.34572 22.683C8.4065 22.7123 8.47264 22.7275 8.53958 22.7275H11.7516C12.132 22.7275 12.4551 22.439 12.515 22.0475L12.5465 21.8772L13.1513 17.8714L13.1901 17.6516C13.2494 17.2587 13.5731 16.9702 13.9535 16.9702H14.4339C17.5459 16.9702 19.982 15.6514 20.694 11.8352C20.9915 10.2409 20.8375 8.90979 20.0504 7.97359C19.801 7.68398 19.5031 7.44424 19.1713 7.26611Z",fill:"#179BD7"}),Object(je.h)("path",{d:"M18.3102 6.91227C18.0503 6.83379 17.7858 6.77254 17.5185 6.72888C16.9903 6.64415 16.4565 6.60349 15.9221 6.6073H11.084C10.8998 6.60715 10.7218 6.67576 10.5819 6.80073C10.442 6.9257 10.3496 7.09877 10.3213 7.28867L9.29206 14.0928L9.26245 14.2913C9.29451 14.0747 9.39979 13.8772 9.55924 13.7346C9.71869 13.592 9.92177 13.5136 10.1318 13.5138H11.9427C15.4996 13.5138 18.2845 12.0061 19.0985 7.64447C19.1229 7.51534 19.1433 7.38964 19.1617 7.26669C18.9469 7.14912 18.723 7.05055 18.4925 6.97203C18.432 6.95109 18.3712 6.93117 18.3102 6.91227Z",fill:"#222D65"}),Object(je.h)("path",{d:"M10.3267 7.2882C10.3547 7.09825 10.4471 6.92509 10.5871 6.80018C10.727 6.67528 10.9053 6.60692 11.0894 6.60752H15.9275C16.5007 6.60752 17.0357 6.64667 17.5239 6.72909C17.8544 6.78329 18.1802 6.86436 18.4985 6.97156C18.7387 7.05467 18.9618 7.15289 19.1678 7.26622C19.41 5.65414 19.1658 4.55653 18.3307 3.56263C17.4101 2.46844 15.7485 2 13.6223 2H7.44964C7.01531 2 6.64482 2.3297 6.5777 2.77822L4.00664 19.7885C3.99467 19.8675 3.99922 19.9482 4.02 20.0252C4.04077 20.1022 4.07727 20.1735 4.12699 20.2344C4.1767 20.2952 4.23845 20.3441 4.30799 20.3776C4.37753 20.4112 4.4532 20.4286 4.5298 20.4287H8.34066L9.29748 14.0923L10.3267 7.2882Z",fill:"#253B80"}))),null),[Ue.VENMO]:Object(je.h)(()=>_o||(_o=Object(je.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(je.h)("path",{d:"M20.0439 2.17969C20.7029 3.32032 21 4.49518 21 5.97926C21 10.7127 17.1441 16.8618 14.0147 21.1797H6.86672L4 3.21606L10.2588 2.59335L11.7745 15.3756C13.1907 12.9578 14.9383 9.15825 14.9383 6.56776C14.9383 5.14981 14.7065 4.184 14.3443 3.38876L20.0439 2.17969Z",fill:"#3D95CE"}))),null),[Ue.CRYPTO]:Object(je.h)(()=>{const{primaryColor:e}=dt();return Object(je.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(je.h)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 7.74316C4.23858 7.74316 2 9.98174 2 12.7432C2 15.5046 4.23858 17.7432 7 17.7432C9.76142 17.7432 12 15.5046 12 12.7432C12 9.98174 9.76142 7.74316 7 7.74316ZM0 12.7432C0 8.87717 3.13401 5.74316 7 5.74316C10.866 5.74316 14 8.87717 14 12.7432C14 16.6092 10.866 19.7432 7 19.7432C3.13401 19.7432 0 16.6092 0 12.7432Z",fill:e}),Object(je.h)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1577 9.96518C11.5898 10.6788 11.9998 11.762 11.9998 12.7432C11.9998 13.7243 11.5898 14.8076 11.1577 15.5212C11.6896 14.7266 11.9998 13.7711 11.9998 12.7432C11.9998 11.7152 11.6896 10.7597 11.1577 9.96518ZM11.9999 7.84425C12.4759 8.32999 12.8816 8.88479 13.2007 9.49223C14.1189 8.42024 15.4804 7.74316 16.9998 7.74316C19.7613 7.74316 21.9998 9.98174 21.9998 12.7432C21.9998 15.5046 19.7613 17.7432 16.9998 17.7432C15.4804 17.7432 14.1189 17.0661 13.2007 15.9941C12.8816 16.6015 12.4759 17.1563 11.9999 17.6421C13.2696 18.9376 15.0405 19.7432 16.9998 19.7432C20.8658 19.7432 23.9998 16.6092 23.9998 12.7432C23.9998 8.87717 20.8658 5.74316 16.9998 5.74316C15.0405 5.74316 13.2696 6.5487 11.9999 7.84425Z",fill:e}))},null),[Ue.STOCKS]:Object(je.h)(()=>{const{primaryColor:e}=dt();return Object(je.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",display:"ACCENT"},Object(je.h)("path",{d:"M21 4H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z",stroke:e,strokeWidth:"2",strokeLinecap:"round"}),Object(je.h)("path",{d:"M4.5 16.5L6 14l5 1 2.5-2h3l3-5.5",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},null),[Ue.DAF]:Object(je.h)(()=>po||(po=Object(je.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(je.h)("g",{clipPath:"url(#clip0_6252_22297)"},Object(je.h)("path",{d:"M16.5765 4.96037C16.6594 5.00932 16.6809 5.11885 16.6232 5.19596L16.5759 5.2593L15.0086 7.35896L14.3138 8.29026C14.1242 8.54394 13.7833 8.62317 13.4831 8.52256C13.0331 8.37178 12.5519 8.29026 12.051 8.29026C11.5273 8.29026 11.025 8.37948 10.5576 8.54425C8.79202 9.1636 7.5255 10.8523 7.5255 12.8374C7.5255 13.6592 7.74264 14.4303 8.12246 15.0959C8.27802 15.3682 8.46016 15.6228 8.66692 15.8559C9.49528 16.7938 10.7048 17.3851 12.051 17.3851C12.3493 17.3851 12.4882 17.7411 12.2551 17.9272C12.1878 17.9808 12.1198 18.0335 12.051 18.0852C10.765 19.0543 9.21333 19.686 7.5255 19.8527C7.23059 19.882 6.93178 19.897 6.62909 19.897C6.44094 19.897 6.25947 19.8288 6.1178 19.705C6.05234 19.6478 5.98768 19.5895 5.92388 19.5304C5.25044 18.9084 4.67162 18.1855 4.21142 17.3845C3.55353 16.2421 3.13611 14.9422 3.02787 13.5557C3.00972 13.3186 3 13.0796 3 12.8374C3 11.1812 3.4414 9.62795 4.21142 8.29026C4.62236 7.57518 5.12793 6.92326 5.70999 6.34951C6.25315 5.81352 6.86243 5.34526 7.5255 4.96037C8.85684 4.18667 10.4021 3.74316 12.051 3.74316C12.1476 3.74316 12.2448 3.74447 12.3407 3.74837C13.8808 3.79657 15.3236 4.23226 16.5765 4.96037Z",fill:"#4DA3B3"}),Object(je.h)("path",{d:"M19.8329 17.5145C19.8902 17.7092 19.7155 17.893 19.5181 17.8456C19.5181 17.8456 19.5181 17.8456 19.5181 17.8456C19.252 17.7817 19.1303 17.8928 18.9815 18.1224C18.6911 18.5706 18.0776 19.2612 18.0034 19.346C15.5724 22.1292 11.6274 22.1812 8.38852 21.0562C8.37562 21.0516 8.36273 21.0471 8.35048 21.0432C8.06547 20.9438 7.79658 20.8432 7.55155 20.747C7.356 20.6706 7.17601 20.5972 7.01593 20.5295C6.718 20.4036 6.76112 20.2967 7.08212 20.3365C7.24332 20.3567 7.40195 20.3697 7.55155 20.3781C7.84763 20.395 8.11027 20.3938 8.29155 20.3889C8.46291 20.3843 8.63426 20.3771 8.80536 20.3668C9.38849 20.3316 9.97709 20.2206 10.5583 20.0287C11.0948 19.8507 11.5952 19.613 12.0537 19.3246C12.338 19.1473 12.6063 18.9492 12.8578 18.7348C12.9919 18.6205 13.1202 18.5023 13.2446 18.3789C13.5748 18.0515 13.8708 17.6923 14.1268 17.3091C14.253 17.1207 14.3702 16.9266 14.4771 16.7271C14.4989 16.6863 14.4761 16.6361 14.4311 16.6252C14.0905 16.5435 13.965 16.1245 14.2047 15.8691L15.8892 14.0744C15.8895 14.0741 15.8895 14.0741 15.8898 14.0737C15.8988 14.0642 16.3261 13.6097 16.4665 13.4599C16.495 13.4295 16.5266 13.3957 16.5551 13.3652L17.1097 12.7742L17.35 12.5181C17.688 12.1579 18.2894 12.3006 18.4296 12.7742L19.0377 14.8286L19.5259 16.4789C19.5266 16.4813 19.5288 16.4829 19.5312 16.4834C19.5345 16.4841 19.5365 16.4877 19.5356 16.4909C19.5349 16.4935 19.5342 16.496 19.5336 16.4986C19.5332 16.5007 19.5332 16.5028 19.5338 16.5049L19.7715 17.3085L19.7992 17.4001L19.8329 17.5145Z",fill:"#91CCD7"}),Object(je.h)("path",{d:"M5.42485 14.1279C4.19233 14.3874 2.95172 13.5889 3.00945 12.3307C3.06474 11.1259 3.36198 9.93661 3.89227 8.83616C4.75517 7.04549 6.1866 5.59086 7.96317 4.69928C9.73974 3.80771 11.7615 3.52936 13.7129 3.90767C14.9121 4.14016 16.0433 4.61261 17.0423 5.2883C18.0857 5.99397 17.9844 7.46586 17.0397 8.29894C16.095 9.13202 14.6462 8.96341 13.4564 8.55014C13.2576 8.4811 13.0533 8.42597 12.8448 8.38555C11.8824 8.19897 10.8853 8.33625 10.0091 8.77597C9.13287 9.21569 8.4269 9.9331 8.00132 10.8163C7.90912 11.0076 7.83121 11.2043 7.76777 11.405C7.38804 12.6059 6.65738 13.8683 5.42485 14.1279Z",fill:"#4DA3B3"})),Object(je.h)("defs",null,Object(je.h)("clipPath",{id:"clip0_6252_22297"},Object(je.h)("rect",{width:"18",height:"18",fill:"white",transform:"translate(3 3.74316)"}))))),null),[Ue.GIFT_CARD]:Object(je.h)(fo,null)},Co=({method:e})=>{const{paymentRequestAvailable:t}=mn();return function(e,t){return e===Ue.PAYMENT_REQUEST?t.applePay?vo||(vo=Object(je.h)(uo,null)):go||(go=Object(je.h)(mo,null)):Oo[e]}(e,t)},jo={[Ue.CREDIT_CARD]:"Card",[Ue.BANK]:"Bank",[Ue.PAYPAL]:"PayPal",[Ue.VENMO]:"Venmo",[Ue.GIFT_CARD]:"Gift card",[Ue.CRYPTO]:"Crypto",[Ue.STOCKS]:"Stocks",[Ue.DAF]:"DAF"},wo=({method:e})=>{const{paymentRequestAvailable:t}=mn(),n=function(e,t){return e===Ue.PAYMENT_REQUEST?t.applePay?"Apple Pay":"Google Pay":jo[e]}(e,t);return Object(je.h)("span",{className:xe()(J({},Ht))},n)},xo=xe()({padding:`${Bt.XL} ${Bt.XL} 0px`,[Pt.TabletLandscapeUp]:{padding:"0px"}}),ko=xe()({border:"none",padding:0,margin:0,fontSize:"100%",font:"inherit",verticalAlign:"baseline"}),So=xe()(ee({fontWeight:700},Ht,{marginBottom:Bt.S})),No=xe()(ee({},Xt(Bt.XL),{padding:"0px",[Pt.TabletLandscapeUp]:{padding:Bt.XXL}})),Ao=xe()({display:"grid",gridTemplateColumns:"1fr",[Pt.TabletLandscapeUp]:{gridAutoFlow:"column",gridTemplateColumns:"auto 1fr"}}),To=xe()({height:"100%",width:"100%",minWidth:"170px",flexGrow:1,backgroundColor:Mt.LightGray,display:"none",[Pt.TabletLandscapeUp]:te({},Xt(0))}),Lo=un([ko,xe()({display:"block",[Pt.TabletLandscapeUp]:{display:"none"}})]),Po=xe()({display:"grid",gridTemplateColumns:"1fr 1fr",gridGap:Bt.S}),Mo=te({},Gt(Bt.XS),{alignItems:"center",justifyContent:"flex-start",width:"100%",background:"transparent"}),Eo=(e,t)=>xe()(te({},Mo,{border:"1px solid "+Mt.DarkGray,background:"transparent",textAlign:"start",padding:`${Bt.XXS} ${Bt.S}`,borderRadius:zn.Default,":hover":{cursor:"pointer",background:Mt.Gray},"& > svg":{width:"20px",height:"20px"}},e?{background:t,border:"1px solid "+t,fontWeight:700,color:"white","& > svg":{filter:"brightness(0) invert(1)",width:"20px",height:"20px"},":hover":{background:t}}:{}));var Do;const Ro=()=>{const{methods:e,lockMonthlyFrequency:t}=dt(),{paymentRequestAvailable:n}=mn();return f(()=>e.filter(e=>(!t||!qe.includes(e))&&(e!==Ue.PAYMENT_REQUEST||(n.applePay||n.googlePay))),[e,t,n])},Ho=()=>{const e=Ro(),{selectedPaymentMethod:t,setSelectedPaymentMethod:n}=mn();return Object(je.h)("ul",{className:To},e.map(e=>{return Object(je.h)("li",{key:e},Object(je.h)("button",{type:"button",className:(r=e===t,xe()(te({},Mo,{border:"none",padding:Bt.M,":hover":{cursor:"pointer",background:Mt.Gray}},r?{background:"white",fontWeight:700,":hover":{background:"white"}}:{}))),onClick:()=>{n(e)}},Object(je.h)(Co,{method:e}),Object(je.h)(wo,{method:e})));var r}))},Io=()=>{const e=Ro(),{primaryColor:t}=dt(),{selectedPaymentMethod:n,setSelectedPaymentMethod:r}=mn();return Object(je.h)("fieldset",{className:Lo},Do||(Do=Object(je.h)("legend",{className:So},"Payment method")),Object(je.h)("ul",{className:Po},e.map(e=>Object(je.h)("li",{key:e},Object(je.h)("button",{type:"button",className:Eo(e===n,t),onClick:()=>{r(e)}},Object(je.h)(Co,{method:e}),Object(je.h)(wo,{method:e}))))))},Bo=xe()({border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}),Fo=({checked:e,primaryColor:t})=>xe()(ne({cursor:"pointer",width:"24px",minWidth:"24px",height:"24px",display:"flex",borderRadius:"4px",justifyContent:"center",alignItems:"center",border:"1.5px solid "+(e?t:Mt.DarkGray)},e?{background:t}:{})),Uo=xe()({width:"16px",height:"16px","& > path":{stroke:"white",strokeWidth:"2px"}}),qo=xe()({cursor:"pointer"}),Xo=xe()({display:"flex",alignItems:"center",gap:Bt.XS});var Go;const Wo=({className:e})=>Object(je.h)("svg",{fill:"none",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:e},Go||(Go=Object(je.h)("path",{d:"M20 6L9 17l-5-5",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})));var $o;const Vo=["children","checked","className"],zo=e=>{let{children:t,checked:n}=e,r=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,Vo);const{primaryColor:o}=dt();return Object(je.h)("label",{className:Xo},Object(je.h)("div",null,Object(je.h)("input",re({className:Bo,type:"checkbox",defaultChecked:n,role:"checkbox"},r)),Object(je.h)("div",{className:Fo({checked:Boolean(n),primaryColor:o})},n&&($o||($o=Object(je.h)(Wo,{className:Uo}))))),Object(je.h)("span",{className:qo},t))};var Zo;const Yo=()=>{const e=bn(),t=e.hasAdmin,{privateNote:n,setPrivateNote:r}=mn(),[o,a]=u(Boolean(n));return t?Object(je.h)("div",{className:qt(Bt.L)},Object(je.h)(zo,{checked:o,onChange:()=>{a(e=>!e)}},"Add note for ",e.name),o&&Object(je.h)("fieldset",{className:xe()(oe({fieldSetCss:ko},Xt(Bt.XS)))},Zo||(Zo=Object(je.h)("legend",{className:So},"Private note")),Object(je.h)(Fr,{rows:3,label:"Note",id:"privateNote",value:n,inputClassName:xe()({resize:"none"}),onChange:({currentTarget:e})=>{r(e.value)}}))):null},Ko=xe()({width:"100%",textAlign:"center"}),Qo=xe()(ae({},{fontSize:"12px",lineHeight:"16px",letterSpacing:"0.01em"},{color:Mt.TextOpaque})),Jo=()=>{const{primaryColor:e}=dt();return Object(je.h)("div",{className:Ko},Object(je.h)("span",{className:Qo},"Every.org will accept your donation."," ",Object(je.h)("a",{href:"https://www.every.org/about-us",target:"_blank",rel:"noreferrer",className:(t=e,xe()({color:t,textDecoration:"none",cursor:"pointer"}))},"Learn More")));var t},ea=xe()(ie({},{fontSize:"16px",lineHeight:"24px",letterSpacing:"-0.01em"},{outline:"none",width:"100%",border:"none",fontFamily:"inherit",cursor:"pointer",borderRadius:zn.Big,height:"52px",fontWeight:700,padding:Bt.XXS,transition:"opacity .3s"})),ta=xe()({color:Mt.White,backgroundColor:Mt.DarkGray,cursor:"default","& > span":{opacity:"0.6"}}),na=({handleClick:e,disabled:t,children:n})=>{const{primaryColor:r}=dt();return Object(je.h)("button",{type:"submit",className:un([ea,t?ta:(o=r,xe()({color:Mt.White,backgroundColor:o,":hover":{opacity:.9}}))]),disabled:t,onClick:e},Object(je.h)("span",null,n));var o},ra="USD",oa="$",aa=()=>{const e=dt(),{frequency:t,donationAmount:n,setSubmitError:c,selectedPaymentMethod:s,stockAmount:u,stockSymbol:p,cryptoAmount:d,cryptoCurrency:h,privateNote:f}=mn(),{minDonationAmount:m}=dt();return b(b=>{b.preventDefault();const y=e.completeDonationInNewTab?"_blank":"_self",_={methods:[s],nonprofitSlug:e.nonprofitSlug,fundraiserSlug:e.fundraiserSlug,privateNote:f};switch(s){case Ue.CRYPTO:if(!d||!h){c("Please enter currency and amount");break}window.open(function(e){let{cryptoAmount:t,cryptoCurrency:n}=e,c=o(e,Ee);return`${i(c)}?${a(r({crypto_amount:t,crypto_currency:n},l(c)))}#/${De}`}(le({cryptoAmount:d,cryptoCurrency:h},_)),y);break;case Ue.STOCKS:if(!p||!u){c("Please enter the symbol and amount");break}window.open(function(e){let{stockAmount:t,stockSymbol:n}=e,c=o(e,Me);return`${i(c)}?${a(r({stock_amount:t,stock_symbol:n},l(c)))}#/${De}`}(le({stockSymbol:p,stockAmount:u},_)),y);break;case Ue.GIFT_CARD:window.open("https://www.every.org/gift?"+a({nonprofitSlug:e.nonprofitSlug}),y);break;default:if(!n||n{const e=aa(),{cryptoAmount:t,cryptoCurrency:n}=mn();return Object(je.h)("form",{className:Ao,onSubmit:e},ia||(ia=Object(je.h)(Ho,null)),Object(je.h)("div",{className:No},la||(la=Object(je.h)(Io,null)),Object(je.h)("fieldset",{className:xe()(se({fieldSetCss:ko},Xt(Bt.XXL)))},ca||(ca=Object(je.h)("div",null,Object(je.h)("legend",{className:So},"Crypto currency"),Object(je.h)(co,null))),n&&(sa||(sa=Object(je.h)("div",null,Object(je.h)("legend",{className:So},"Amount"),Object(je.h)(Vr,null))))),ua||(ua=Object(je.h)(Yo,null)),Object(je.h)(na,{disabled:!t||!n},ce({method:Ue.CRYPTO,cryptoCurrency:n})),pa||(pa=Object(je.h)(Jo,null))))},ha=e=>xe()(ue({outline:"none",border:"none",fontFamily:"inherit",cursor:"pointer",background:"none",fontWeight:500,transition:"opacity .3s",color:e,display:"flex",alignItems:"center",alignSelf:"flex-start"},Ht,{opacity:1,padding:0,gap:Bt.XXS,marginBottom:Bt.XXL,":hover":{opacity:.9},[Pt.TabletLandscapeUp]:{padding:Bt.L,marginBottom:0}})),fa=()=>{const{primaryColor:e}=dt();return Object(je.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(je.h)("path",{stroke:e,strokeWidth:"2",d:"M19 12H5M12 19l-7-7 7-7"}))};var ba,ma;const ya=({handleClick:e})=>{const{primaryColor:t}=dt();return Object(je.h)("button",{type:"button",className:ha(t),onClick:e},ba||(ba=Object(je.h)(fa,null)),ma||(ma=Object(je.h)("span",null,"Back")))};let _a=function(e){return e[e.START=0]="START",e[e.MANUAL=1]="MANUAL",e[e.AMOUNT=2]="AMOUNT",e}({});var va;const ga=e=>{"."===e.key&&e.preventDefault()},Oa=()=>{const e=h(null),{primaryColor:t,addAmounts:n}=dt(),{setDonationAmount:r,donationAmount:o,setSubmitError:a,submitError:i}=mn();return d(()=>{Boolean("ontouchstart"in window||navigator.maxTouchPoints)||e.current&&e.current.focus()},[]),Object(je.h)("fieldset",{className:xe()(pe({fieldSetCss:ko},Xt(Bt.S)))},va||(va=Object(je.h)("legend",{className:So},"Donation amount")),Object(je.h)(qr,{ref:e,id:"donation-input",type:"number",pattern:"[0-9]*",inputMode:"numeric",min:0,step:1,value:o||void 0,prefix:oa,inputClassName:mr,prefixClassName:yr,sufix:ra,sufixClassName:_r(t),containerClassName:i?br:void 0,onKeyDown:ga,onInput:e=>{r(Number(e.currentTarget.value)),a(null)}}),n&&n.length>0&&Object(je.h)("div",{className:vr},n.map(e=>Object(je.h)("button",{key:e,className:gr(t),type:"button",onClick:()=>{r(t=>"number"==typeof t?t+e:e)}},"+",e))))},Ca=e=>xe()({position:"relative",cursor:"pointer",display:"flex",width:"100%",height:"36px",alignItems:"center",justifyContent:"center",color:e,fontWeight:500,border:"2px solid "+e,borderRight:"none"}),ja=e=>xe()({cursor:"pointer",display:"flex",flexDirection:"column",flex:"1 1 0px","& > input":{appearance:"none",height:0},"& > input:checked + label":{backgroundColor:e,color:"white"},"& > input:checked + label:hover":{backgroundColor:e,color:"white"}}),wa=e=>xe()({display:"flex",width:"100%","& > div:first-of-type > label":{borderRadius:"6px 0 0 6px","&::after":{borderRadius:"6px 0 0 6px"}},"& > div:last-of-type > label":{borderRadius:"0 6px 6px 0",borderRight:"2px solid "+e,"&::after":{borderRadius:"0 6px 6px 0"}}});var xa,ka;const Sa="Monthly donation",Na=()=>{const{primaryColor:e,lockMonthlyFrequency:t,monthlyTitle:n=Sa}=dt(),{frequency:r,selectedPaymentMethod:o,setFrequency:a}=mn();return t?Object(je.h)("h4",null,n):qe.includes(o)?Object(je.h)("fieldset",{className:ko},xa||(xa=Object(je.h)("legend",{className:So},"Frequency")),Object(je.h)("p",null,o===Ue.DAF?"Chariot":"Venmo"," ","only supports one-time donations")):Object(je.h)("fieldset",{className:ko},ka||(ka=Object(je.h)("legend",{className:So},"Frequency")),Object(je.h)("div",{className:wa(e)},Object(je.h)("div",{className:ja(e)},Object(je.h)("input",{type:"radio",name:"frequency",id:"monthly",checked:r===Fe.Monthly,value:Fe.Monthly}),Object(je.h)("label",{className:Ca(e),id:"frequency-monthly",htmlFor:"monthly",onClick:()=>{a(Fe.Monthly)}},"Give Monthly")),Object(je.h)("div",{className:ja(e)},Object(je.h)("input",{type:"radio",name:"frequency",id:"once",checked:r===Fe.OneTime,value:Fe.OneTime}),Object(je.h)("label",{id:"frequency-one-time",htmlFor:"one-time",className:Ca(e),onClick:()=>{a(Fe.OneTime)}},"Once"))))};var Aa,Ta,La,Pa,Ma;const Ea=({changeView:e})=>{const t=aa(),{donationAmount:n}=mn();return Object(je.h)("form",{className:Ao,onSubmit:t},Object(je.h)(ya,{handleClick:()=>{e(_a.START)}}),Object(je.h)("div",{className:No},Aa||(Aa=Object(je.h)("h3",null,"Connect your DAF with Chariot")),Ta||(Ta=Object(je.h)(Na,null)),La||(La=Object(je.h)(Oa,null)),Pa||(Pa=Object(je.h)(Yo,null)),Object(je.h)(na,{disabled:!n||Number.isNaN(n)},ce({method:Ue.DAF})),Ma||(Ma=Object(je.h)(Jo,null))))};var Da,Ra,Ha,Ia,Ba,Fa,Ua,qa,Xa,Ga,Wa,$a;const Va=({changeView:e})=>{const{primaryColor:t}=dt();return Object(je.h)("div",{className:Ao},Object(je.h)(ya,{handleClick:()=>{e(_a.START)}}),Object(je.h)("div",{className:No},Da||(Da=Object(je.h)("h3",null,"Manual DAF donation")),Ra||(Ra=Object(je.h)("p",null,"Please ask your provider to make a one-time or recurring grant to:")),Object(je.h)("div",{className:qt(Bt.S)},Object(je.h)("p",{className:qt(0)},Ha||(Ha=Object(je.h)("span",null,"Every.org (EIN: 61-1913297)")),Ia||(Ia=Object(je.h)("span",null,"58 West Portal Ave #781 San Francisco, CA 94127")),Ba||(Ba=Object(je.h)("span",null,"Memo: For every.org/themarshallproject from @darth.vader506")),Fa||(Fa=Object(je.h)("span",null,"Contact info: Mark Ulrich, CEO")),Ua||(Ua=Object(je.h)("span",null,"Email: team@every.org")),qa||(qa=Object(je.h)("span",null,"Phone number: +1 (415) 650-0503"))),Object(je.h)("p",null,"You may also email us at"," ",Object(je.h)("a",{className:En(t),href:P({address:"team@every.org",subject:"Donation via DAF"})},"team@every.org")," ","with the memo or to let us know if you wish to share your contact information with the nonprofit/campaign. By default, we do not share your contact information")),Object(je.h)("div",{className:xe()(de({color:Mt.TextGray},Xt(0)))},Object(je.h)("p",{className:xe()({paddingBottom:Bt.S})},"We will attribute the donation accordingly:"),Xa||(Xa=Object(je.h)("p",null,"If we receive BOTH your @username and a nonprofit/campaign: we will add a donation for that nonprofit/campaign to your account.")),Ga||(Ga=Object(je.h)("p",null,"If we receive only your @username, we will credit your account's gift card balance in the amount received, which you can use to support as many nonprofits as you'd like.")),Wa||(Wa=Object(je.h)("p",null,"If we receive only a nonprofit/campaign, we will send that amount to that nonprofit/campaign as an anonymous donation.")),$a||($a=Object(je.h)("p",null,"If we do not receive any information by the time the wire/ACH is received, we will apply it towards running Every.org.")))))},za=xe()(he({outline:"none",border:"none",fontFamily:"inherit",background:"#ADEFD1",color:"#00203F",alignSelf:"center",borderRadius:zn.Big,padding:`${Bt.M} ${Bt.XL}`,display:"flex",alignItems:"center",fontWeight:500},Ht,{gap:Bt.XS,cursor:"pointer",":hover":{background:"#7ce6b6"}})),Za=e=>xe()(he({outline:"none",border:"none",background:"none",fontFamily:"inherit",color:e,alignSelf:"center",display:"flex",alignItems:"center",fontWeight:500},Ht,{gap:Bt.XS,cursor:"pointer",":hover":{opacity:.9}}));var Ya,Ka,Qa,Ja,ei,ti,ni,ri;const oi=()=>Ya||(Ya=Object(je.h)("svg",{width:"101",height:"16",viewBox:"0 0 101 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(je.h)("path",{d:"M26.5651 0.257543H29.7622V15.2809H26.5651V0.257543ZM20.2894 15.2809H17.0923V0.257543H20.2894V15.2809ZM26.8019 9.12133H20.0525V6.18104H26.8019V9.12133Z",fill:"#00203F"}),Object(je.h)("path",{d:"M32.2018 15.2809L38.3591 0.257543H41.5168L47.6938 15.2809H44.3389L39.2867 2.01742H40.5497L35.4778 15.2809H32.2018ZM35.2805 12.0616L36.1291 9.4218H43.2337L44.1021 12.0616H35.2805Z",fill:"#00203F"}),Object(je.h)("path",{d:"M50.1138 15.2809V0.257543H56.0936C57.3303 0.257543 58.396 0.479317 59.2907 0.922864C60.1853 1.3521 60.876 1.9745 61.3628 2.79005C61.8496 3.60561 62.093 4.57855 62.093 5.70888C62.093 6.8249 61.8496 7.79069 61.3628 8.60625C60.876 9.40749 60.1853 10.0227 59.2907 10.452C58.396 10.8812 57.3303 11.0958 56.0936 11.0958H51.89L53.3109 9.57203V15.2809H50.1138ZM58.896 15.2809L55.4423 9.82958H58.8565L62.3496 15.2809H58.896ZM53.3109 9.95835L51.89 8.32724H55.916C56.9027 8.32724 57.6395 8.09831 58.1263 7.64046C58.6131 7.16829 58.8565 6.52444 58.8565 5.70888C58.8565 4.87902 58.6131 4.23516 58.1263 3.77731C57.6395 3.31945 56.9027 3.09052 55.916 3.09052H51.89L53.3109 1.43795V9.95835Z",fill:"#00203F"}),Object(je.h)("path",{d:"M65.6128 15.2809V0.257543H68.8099V15.2809H65.6128Z",fill:"#00203F"}),Object(je.h)("path",{d:"M79.7851 15.5385C78.6931 15.5385 77.68 15.3453 76.7459 14.959C75.8249 14.5727 75.0223 14.029 74.3382 13.3279C73.6672 12.6268 73.1409 11.8041 72.7594 10.8598C72.391 9.91543 72.2068 8.88525 72.2068 7.76923C72.2068 6.65321 72.391 5.62303 72.7594 4.67871C73.1409 3.73438 73.6738 2.91167 74.3579 2.21058C75.0421 1.50949 75.8446 0.965787 76.7656 0.579472C77.6866 0.193157 78.6865 0 79.7653 0C80.8573 0 81.8573 0.193157 82.7651 0.579472C83.686 0.965787 84.482 1.50949 85.153 2.21058C85.8372 2.91167 86.37 3.73438 86.7516 4.67871C87.1331 5.60873 87.3239 6.6389 87.3239 7.76923C87.3239 8.88525 87.1331 9.92258 86.7516 10.8812C86.37 11.8255 85.8372 12.6482 85.153 13.3493C84.482 14.0361 83.686 14.5727 82.7651 14.959C81.8573 15.3453 80.8639 15.5385 79.7851 15.5385ZM79.7653 12.5767C80.3837 12.5767 80.9494 12.4622 81.4626 12.2333C81.9888 12.0044 82.4493 11.6753 82.844 11.2461C83.2387 10.8168 83.5413 10.3089 83.7518 9.72227C83.9755 9.13564 84.0873 8.48463 84.0873 7.76923C84.0873 7.05383 83.9755 6.40282 83.7518 5.81619C83.5413 5.22956 83.2387 4.72163 82.844 4.29239C82.4625 3.86315 82.0086 3.53407 81.4823 3.30514C80.956 3.07621 80.3837 2.96175 79.7653 2.96175C79.147 2.96175 78.5747 3.07621 78.0484 3.30514C77.5353 3.53407 77.0814 3.86315 76.6867 4.29239C76.292 4.72163 75.9828 5.22956 75.7591 5.81619C75.5486 6.40282 75.4434 7.05383 75.4434 7.76923C75.4434 8.47032 75.5486 9.12133 75.7591 9.72227C75.9828 10.3089 76.2854 10.8168 76.6669 11.2461C77.0616 11.6753 77.5221 12.0044 78.0484 12.2333C78.5747 12.4622 79.147 12.5767 79.7653 12.5767Z",fill:"#00203F"}),Object(je.h)("path",{d:"M93.3822 15.2809V3.09052H88.9616V0.257543H101V3.09052H96.5793V15.2809H93.3822Z",fill:"#00203F"}),Object(je.h)("path",{d:"M11.272 1.05076C11.3408 1.09302 11.3586 1.18757 11.3108 1.25413L11.2714 1.30881L9.3933 3.92529C9.23593 4.14428 8.9529 4.21268 8.70361 4.12582C8.33005 3.99566 7.93049 3.92529 7.51464 3.92529C7.07982 3.92529 6.66276 4.00231 6.27476 4.14455C4.80885 4.6792 3.75732 6.13699 3.75732 7.85057C3.75732 8.56007 3.9376 9.22572 4.25295 9.80028C4.3821 10.0353 4.53332 10.2551 4.70499 10.4564C5.39274 11.2659 6.39692 11.7764 7.51464 11.7764C7.76228 11.7764 7.87763 12.0838 7.68405 12.2443C7.62823 12.2906 7.57176 12.3361 7.51464 12.3808C6.44696 13.2173 5.15865 13.7627 3.75732 13.9066C3.51247 13.9319 3.26438 13.9448 3.01307 13.9448C2.85686 13.9448 2.70619 13.886 2.58857 13.7791C2.53422 13.7297 2.48053 13.6794 2.42757 13.6283C1.86844 13.0914 1.38787 12.4674 1.00579 11.7759C0.459575 10.7898 0.11301 9.6676 0.0231398 8.47068C0.00807176 8.26604 0 8.05971 0 7.85057C0 6.4209 0.366476 5.08005 1.00579 3.92529C1.34697 3.308 1.76673 2.74523 2.24998 2.24993C2.70094 1.78724 3.2068 1.38302 3.75732 1.05076C4.86267 0.382868 6.1456 9.06616e-06 7.51464 9.06616e-06C7.59482 9.06616e-06 7.67555 0.00113271 7.75519 0.00450591C9.03382 0.0461087 10.2317 0.422222 11.272 1.05076Z",fill:"#00203F"}),Object(je.h)("path",{d:"M13.9754 11.8877C14.023 12.0558 13.8779 12.2145 13.7141 12.1736C13.4931 12.1184 13.3921 12.2143 13.2685 12.4126C13.0274 12.7994 12.5181 13.3956 12.4565 13.4688C10.4382 15.8714 7.16282 15.9162 4.47369 14.9451C4.46298 14.9412 4.45227 14.9373 4.4421 14.9339C4.20547 14.8481 3.98222 14.7612 3.77878 14.6782C3.61643 14.6123 3.46699 14.5489 3.33408 14.4905C3.08673 14.3817 3.12253 14.2895 3.38904 14.3239C3.52288 14.3412 3.65458 14.3525 3.77878 14.3597C4.15457 14.382 4.46549 14.3678 4.56937 14.3616C4.59412 14.3601 4.61885 14.3589 4.64363 14.3582C5.18515 14.3419 5.73401 14.2439 6.27519 14.0581C6.72061 13.9045 7.13605 13.6992 7.51669 13.4503C7.75279 13.2972 7.9755 13.1262 8.18429 12.9412C8.29565 12.8425 8.40219 12.7404 8.50551 12.6339C8.77962 12.3513 9.02535 12.0413 9.23789 11.7105C9.34271 11.5478 9.44004 11.3803 9.52876 11.208C9.5469 11.1728 9.52792 11.1295 9.49058 11.12C9.20779 11.0496 9.10362 10.6878 9.30264 10.4673L10.7012 8.91805L10.7017 8.91751C10.7086 8.90988 11.0638 8.51701 11.1804 8.38764C11.2042 8.36134 11.2303 8.33219 11.2541 8.3059L11.914 7.57461C12.1946 7.26369 12.6939 7.38682 12.8104 7.79567L13.7206 10.9938C13.7212 10.9958 13.7229 10.9972 13.7249 10.9977C13.7277 10.9983 13.7293 11.0014 13.7286 11.0042C13.728 11.0064 13.7275 11.0085 13.727 11.0108C13.7266 11.0126 13.7266 11.0144 13.7271 11.0162L13.9245 11.7099L13.9475 11.7889L13.9754 11.8877Z",fill:"#00203F"}),Object(je.h)("path",{d:"M2.01325 8.96461C0.989941 9.18868 -0.0400886 8.49938 0.00784723 7.41322C0.0537471 6.37318 0.300533 5.3465 0.740811 4.39654C1.45724 2.85074 2.64569 1.59503 4.1207 0.825379C5.5957 0.0557292 7.27427 -0.184559 8.89443 0.142017C9.8901 0.342713 10.8293 0.750556 11.6587 1.33385C12.5249 1.94302 12.4409 3.21363 11.6566 3.93279C10.8722 4.65194 9.66932 4.50639 8.68146 4.14963C8.51643 4.09003 8.34679 4.04245 8.17368 4.00755C7.37463 3.84649 6.54677 3.965 5.81931 4.34458C5.09184 4.72417 4.50571 5.34348 4.15237 6.10585C4.07582 6.27101 4.01114 6.44087 3.95847 6.61407C3.64319 7.65079 3.03655 8.74054 2.01325 8.96461Z",fill:"#00203F"}))),ai=({changeView:e})=>{const{primaryColor:t}=dt();return Object(je.h)("div",{className:Ao},Ka||(Ka=Object(je.h)(Ho,null)),Object(je.h)("div",{className:No},Qa||(Qa=Object(je.h)(Io,null)),Ja||(Ja=Object(je.h)("h4",null,"Instant DAF donation")),ei||(ei=Object(je.h)("p",null,"We use Chariot to verify your account info and automatically initiate a grant from your DAF, or you can get instructions for making the donation manually.")),Object(je.h)("button",{type:"button",className:za,onClick:()=>{e(_a.AMOUNT)}},ti||(ti=Object(je.h)("span",null,"Donate with")),ni||(ni=Object(je.h)(oi,null))),Object(je.h)("button",{type:"button",className:Za(t),onClick:()=>{e(_a.MANUAL)}},"Get instructions for a manual DAF donation"),ri||(ri=Object(je.h)(Jo,null))))},ii=()=>{const[e,t]=u(_a.START);switch(e){case _a.START:return Object(je.h)(ai,{changeView:t});case _a.MANUAL:return Object(je.h)(Va,{changeView:t});case _a.AMOUNT:return Object(je.h)(Ea,{changeView:t})}};var li,ci,si,ui,pi,di;const hi=()=>{const{frequency:e,donationAmount:t,selectedPaymentMethod:n,paymentRequestAvailable:r}=mn(),o=aa();return Object(je.h)("form",{className:Ao,onSubmit:o},li||(li=Object(je.h)(Ho,null)),Object(je.h)("div",{className:No},ci||(ci=Object(je.h)(Io,null)),si||(si=Object(je.h)(Na,null)),ui||(ui=Object(je.h)(Oa,null)),pi||(pi=Object(je.h)(Yo,null)),Object(je.h)(na,{disabled:e===Fe.Unselected||!t||Number.isNaN(t)},ce({method:n,paymentRequestIsApplePay:r.applePay})),di||(di=Object(je.h)(Jo,null))))},fi=xe()({display:"block",width:"80px",height:"80px",alignSelf:"center","& > path":{strokeWidth:"1"}});var bi,mi,yi,_i,vi;const gi=()=>{const e=aa();return Object(je.h)("form",{className:Ao,onSubmit:e},bi||(bi=Object(je.h)(Ho,null)),Object(je.h)("div",{className:No},mi||(mi=Object(je.h)(Io,null)),yi||(yi=Object(je.h)(fo,{className:fi})),_i||(_i=Object(je.h)("p",null,"Redeem a gift card to add donation credits to your account.")),Object(je.h)(na,null,ce({method:Ue.GIFT_CARD})),vi||(vi=Object(je.h)(Jo,null))))};var Oi,Ci,ji,wi,xi,ki,Si;const Ni=()=>{const e=aa(),{stockAmount:t,stockSymbol:n,setStockAmount:r,setStockSymbol:o,submitError:a,setSubmitError:i}=(dt(),mn());return Object(je.h)("form",{className:Ao,onSubmit:e},Oi||(Oi=Object(je.h)(Ho,null)),Object(je.h)("div",{className:No},Ci||(Ci=Object(je.h)(Io,null)),Object(je.h)("fieldset",{className:xe()(fe({fieldSetCss:ko},Xt(Bt.XXL)))},Object(je.h)("div",null,ji||(ji=Object(je.h)("legend",{className:So},"What is the symbol of the shares?")),wi||(wi=Object(je.h)("span",null,"Example: GOOG")),Object(je.h)(qr,{id:"stock-amount-input",inputClassName:mr,containerClassName:a?br:void 0,type:"text",value:n,onInput:e=>{o(e.currentTarget.value),i(null)}})),Object(je.h)("div",null,xi||(xi=Object(je.h)("legend",{className:So},"How many shares are you donating?")),Object(je.h)(qr,{id:"donation-input",inputClassName:mr,containerClassName:a?br:void 0,type:"number",pattern:"[0-9]*",inputMode:"numeric",min:0,step:1,value:t||void 0,onInput:e=>{r(Number(e.currentTarget.value)),i(null)}}))),ki||(ki=Object(je.h)(Yo,null)),Object(je.h)(na,{disabled:!t||!n},ce({method:Ue.STOCKS})),Si||(Si=Object(je.h)(Jo,null))))};var Ai,Ti,Li,Pi,Mi,Ei;const Di=()=>{const{selectedPaymentMethod:e}=mn();switch(e){case Ue.CRYPTO:return Ai||(Ai=Object(je.h)(da,null));case Ue.STOCKS:return Ti||(Ti=Object(je.h)(Ni,null));case Ue.DAF:return Li||(Li=Object(je.h)(ii,null));case Ue.GIFT_CARD:return Pi||(Pi=Object(je.h)(gi,null));default:return Mi||(Mi=Object(je.h)(hi,null))}},Ri=()=>Ei||(Ei=Object(je.h)(pn,{className:xo},Object(je.h)(Di,null))),Hi=e=>xe()({background:"white",width:"100%",height:"100%",borderRadius:"unset",position:"relative",overflow:"auto",padding:"0",paddingBottom:Bt.XXL,[Pt.TabletLandscapeUp]:{height:e?e+"px":"unset",background:"#f3f6f6",minHeight:"378px",maxHeight:`calc(100vh - 2 * ${Bt.XL})`,width:"1000px",overflow:"unset",overflowY:"scroll","-ms-overflow-style":"none",scrollbarWidth:"none","::-webkit-scrollbar":{display:"none"},borderRadius:zn.Medium,padding:Bt.XL}}),Ii=F(({children:e,height:t},n)=>Object(je.h)("div",{ref:n,className:Hi(t)},e)),Bi=xe()(be({},Ht,{position:"fixed",height:"auto",width:"100%",zIndex:999,top:0,bottom:0,left:0,right:0,display:"flex",background:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",color:Mt.Text,fontFamily:ke.BasisGrotesque,padding:0,[Pt.TabletLandscapeUp]:{padding:Bt.XL},boxSizing:"border-box","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","& *":{boxSizing:"inherit"},"& *:before":{boxSizing:"inherit"},"& *:after":{boxSizing:"inherit"},"h1,h2,h3,h4,h5,h6":{fontWeight:700},h1:be({},Et),h2:be({},Dt),"h3,h4,h5,h6":be({},Rt)})),Fi=({children:e,onClick:t})=>Object(je.h)("div",{className:Bi,onClick:t},e),Ui="data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath class='logoMask' stroke-dasharray='170px' d='M32.547 43C39.081 43 48 38.895 48 29.5C48 20.104 38.132 12.5 29.5 12.5C20.868 12.5 9 19.506 9 36C9 52.495 23.805 59.345 32.547 59.345C41.288 59.345 62.5 54.104 62.5 29.5' stroke='white' stroke-width='10'/%3E%3Canimate attributeType='XML' attributeName='stroke-dashoffset' from='170px' to='-170px' dur='1.25s' repeatCount='indefinite'/%3E%3C/svg%3E%0A",qi=xe()({display:"inline-block",verticalAlign:"middle",maskImage:`url("${Ui}")`,"-webkit-mask-image":`url("${Ui}")`,"-webkit-mask-size":"cover",maskSize:"cover"}),Xi=({size:e=72,color:t=Mt.LightGray})=>{return Object(je.h)("svg",{width:e,height:e,viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:qi},Object(je.h)("path",{className:(n=t,xe()({fill:n})),d:"M51.147 28.97C51.147 17.614 41.667 9 29.493 9C15.875 9 5 20.5 5 34.744C5 50.094 17.223 62.365 33.68 62.365C50.137 62.365 64.862 49.325 66.017 32.242H58.51C57.114 45.042 46.287 54.859 33.68 54.859C21.553 54.859 12.555 45.956 12.555 34.744C12.555 24.639 20.062 16.507 29.493 16.507C37.385 16.507 43.593 21.897 43.593 28.97C43.593 34.84 39.358 39.749 33.728 39.749V47.256C43.688 47.256 51.148 38.931 51.148 28.97"}));var n};var Gi,Wi,$i;var Vi,zi=()=>{const{fundraiserSlug:e}=dt(),{hideWidget:t}=mn(),n=dn(),r=fn(),o=e=>{e.target===e.currentTarget&&t()};return r===yt||e&&n===ht?(t(),null):r===_t||e&&n===ft?Object(je.h)(Fi,{onClick:o},Gi||(Gi=Object(je.h)(Xi,{size:24}))):Object(je.h)(Fi,{onClick:o},Wi||(Wi=Object(je.h)(Gn,{className:Un})),$i||($i=Object(je.h)(Ii,{height:null},Object(je.h)(In,null,Object(je.h)("div",{id:"every-header"},Object(je.h)(Vn,null)),Object(je.h)("div",{id:"every-nonprofitInfo"},Object(je.h)(rr,null)),Object(je.h)("div",{id:"every-paymentProcess"},Object(je.h)(Ri,null)),Object(je.h)("div",{id:"every-faq"},Object(je.h)(jn,null)),Object(je.h)("div",{id:"every-fundraiserLink"},Object(je.h)(Rn,null)),Object(je.h)("div",{id:"every-footer"},Object(je.h)(Mn,null))))))};let Zi;const Yi=()=>{const e=document.querySelector("body"),t=(()=>{const e=document.querySelector("body");return Zi||(Zi=null!=e&&e.style.overflow?e.style.overflow:"unset"),Zi})();e&&(e.style.overflow=t)},Ki=({options:e={},hide:t})=>(Yi(),e.show?((()=>{const e=document.querySelector("body");e&&(e.style.overflow="hidden")})(),Object(je.h)(Lt,{options:e,hide:t},Vi||(Vi=Object(je.h)(zi,null)))):null);var Qi="\n\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n font-family: 'Basis Grotesque Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Roboto, sans-serif;\n vertical-align: baseline;\n }\n /* HTML5 display-role reset for older browsers */\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n body {\n line-height: 1;\n }\n ol, ul {\n list-style: none;\n }\n blockquote, q {\n quotes: none;\n }\n blockquote:before, blockquote:after,\n q:before, q:after {\n content: '';\n content: none;\n }\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n button {\n color: unset;\n background: unset;\n }\n";const Ji=["element"],el={childList:!0,subtree:!0,attributeFilter:["href"]};let tl,nl;class rl{constructor(e,t){ye(this,"options",void 0),ye(this,"mountPoint",void 0),this.options=e,this.mountPoint=t}hide(){this.options.show=!1,this.render()}show(){this.options.show=!0,this.render()}setOptions(e){this.options=e,this.render()}render(){Object(je.render)(Object(je.h)(Ki,{options:this.options,hide:()=>{this.hide()}}),this.mountPoint)}}const ol=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,al=["element","selector"],il=["element","selector"];(function(){var e;const t=null==(e=document.currentScript)||null==(e=e.getAttribute("src"))?void 0:e.split("?")[1],n=null==t?void 0:t.split("&").map(e=>{const[t,n]=e.split("=");return[t,n]}),r=n&&Object.fromEntries(n);return!r||"1"!==r.explicit})()?($e(),ge(),new ol((e,t)=>{t.disconnect(),Boolean(e.some(e=>"A"===e.target.nodeName))&&ge(),t.observe(document,el)}).observe(document,el)):function(){function e(...e){console.info("Every.org Donate Button:",...e)}function t(){Ce(a,{show:!0}),s()}function n(){Ce(a,{show:!1}),s()}function r(e){var n;const r=Ce({},e);return Ce(a,{openAt:null!=(n=r.openAt)?n:"donate"}),e=>{e.preventDefault(),i=r,t()}}const o={},a={show:!1,openAt:"donate"};let i={};const l=(e,t)=>e?[e]:t&&document.querySelectorAll(t);let c;$e();const s=()=>{var e,t,r,l,s;c||(()=>{const e=document.createElement("div");e.id="shadow-wrapper",e.style.position="absolute",e.style.zIndex="20000000",document.body.append(e),c=document.createElement("div"),e.attachShadow({mode:"open"}).append(c);const t=document.querySelector("#every-styles");if(t){var n,r;const e=Object.values(null!=(n=null==(r=t.sheet)?void 0:r.cssRules)?n:{}).map(e=>e.cssText).join("\n"),o=document.createElement("style");o.id="every-shadow-styles",o.innerHTML=Qi+e,c.append(o)}})();(null==(e=window.location)?void 0:e.hash)==="#"+(null!=(t=null!=(r=null!=(l=null==(s=i)?void 0:s.openAt)?l:null==o?void 0:o.openAt)?r:null==a?void 0:a.openAt)?t:"")&&Ce(a,{show:!0});const u=Ce({},a,o,i);Object(je.render)(Object(je.h)(Ki,{options:u,hide:n}),c)};window.everyDotOrgDonateButton={createButton:t=>{let{element:n,selector:r}=t,o=Oe(t,al);n||r||o.nonprofitSlug||e("createButton():","must provide element or selector or nonprofitSlug");const a=l(n,r);if(a)for(const t of a){var c,s;const n=null!=(c=t.querySelector("a"))?c:void 0;if(!o.nonprofitSlug&&!n)return void e("no link in container",t);const r=null!=(s=null==n?void 0:n.getAttribute("href"))?s:void 0;if(!o.nonprofitSlug&&!r)return void e("link lacks href",n);const a=Ce({},i,o);Object(je.render)(Object(je.h)(Be,a),t,n)}},showWidget:t,setOptions:function(e){Ce(o,e),s()},createWidget:t=>{let{element:n,selector:a}=t,i=Oe(t,il);n||a||e("createWidget():","must provide element or selector");const c=l(n,a);if(c)if(i.nonprofitSlug){for(const e of c)e.addEventListener("click",r(i));Ce(o,i),s()}else e("createWidget():","must provide nonprofitSlug")}}}()},"5zHJ":function(e){"use strict";var t={},n="x",r=[],o=function(e){return r.push(e)},a=function(e,t){return t?t+"{"+e+"}":e},i=function(e,t,n){return"."+e+"{"+(t.replace(/[A-Z]|^ms/g,"-$&").toLowerCase()+":")+n+"}"},l=function(e){return e.replace(/&/g,"")},c=function e(c){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",u=arguments[2];return Object.keys(c).map((function(p){var d=c[p];if(null===d)return"";if("object"==typeof d){var h=/^@/.test(p)?p:null;return e(d,h?s:s+p,h||u)}var f=p+d+s+u;if(t[f])return t[f];var b=n+r.length.toString(36);return o(a(i(b+l(s),p,d),u)),t[f]=b,b})).join(" ")};if(e.exports=function(){for(var e=arguments.length,t=Array(e),n=0;n2&&(l.children=arguments.length>3?M.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===l[a]&&(l[a]=e.defaultProps[a]);return i(e,l,r,o,null)}function i(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++D:o};return null==o&&null!=E.vnode&&E.vnode(a),a}function l(){return{current:null}}function c(e){return e.children}function s(e,t){this.props=e,this.context=t}function u(e,t){if(null==t)return e.__?u(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&H.sort(F));h.__r=0}function f(e,t,n,r,o,a,l,s,p,d,h){var f,m,v,g,O,C,w,x,N,A=0,T=r&&r.__k||X,L=T.length,P=L,M=t.length;for(n.__k=[],f=0;f0?i(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)?(g.__=n,g.__b=n.__b+1,-1===(x=_(g,T,w=f+A,P))?v=q:(v=T[x]||q,T[x]=void 0,P--),j(e,g,v,o,a,l,s,p,d,h),O=g.__e,(m=g.ref)&&v.ref!=m&&(v.ref&&k(v.ref,null,g),h.push(m,g.__c||O,g)),null!=O&&(null==C&&(C=O),(N=v===q||null===v.__v)?-1==x&&A--:x!==w&&(x===w+1?A++:x>w?P>M-w?A+=x-w:A--:A=x(null!=c?1:0))for(;i>=0||l=0){if((c=t[i])&&o==c.key&&a===c.type)return i;i--}if(l2&&(s.children=arguments.length>3?M.call(arguments,2):n),i(e.type,s,o||e.key,a||e.ref,null)}function P(e,t){var n={__c:t="__cC"+U++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,d(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}n.r(t),n.d(t,"Component",(function(){return s})),n.d(t,"Fragment",(function(){return c})),n.d(t,"cloneElement",(function(){return L})),n.d(t,"createContext",(function(){return P})),n.d(t,"createElement",(function(){return a})),n.d(t,"createRef",(function(){return l})),n.d(t,"h",(function(){return a})),n.d(t,"hydrate",(function(){return T})),n.d(t,"isValidElement",(function(){return R})),n.d(t,"options",(function(){return E})),n.d(t,"render",(function(){return A})),n.d(t,"toChildArray",(function(){return m}));var M,E,D,R,H,I,B,F,U,q={},X=[],G=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,W=Array.isArray;M=X.slice,E={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&null!=a.getDerivedStateFromError&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(t){e=t}throw e}},D=0,R=function(e){return null!=e&&void 0===e.constructor},s.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=r({},this.state),"function"==typeof e&&(e=e(r({},n),this.props)),e&&r(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),d(this))},s.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),d(this))},s.prototype.render=c,H=[],B="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,F=function(e,t){return e.__v.__b-t.__v.__b},h.__r=0,U=0},kPAj:function(e){var t;e.exports=t={},t.simpleFilter=function(e,n){return n.filter((function(n){return t.test(e,n)}))},t.test=function(e,n){return null!==t.match(e,n)},t.match=function(e,t,n){var r,o=0,a=[],i=t.length,l=0,c=0,s=(n=n||{}).pre||"",u=n.post||"",p=n.caseSensitive&&t||t.toLowerCase();e=n.caseSensitive&&e||e.toLowerCase();for(var d=0;de&&e.default?e.default:e;if("function"==typeof l(n("/hs+"))){let e=document.getElementById("preact_root")||document.body.firstElementChild;0,(()=>{let t=l(n("/hs+")),r={};const i=document.querySelector('[type="__PREACT_CLI_DATA__"]');i&&(r=JSON.parse(decodeURI(i.innerHTML)).preRenderData||r);r.url&&(c=r.url);var c;e=a(o(t,{CLI_DATA:{preRenderData:r}}),document.body,e)})()}}}); +//# sourceMappingURL=bundle.c3cb6.esm.js.map \ No newline at end of file diff --git a/docs/dist/donate-button/0.4/bundle.c3cb6.esm.js.map b/docs/dist/donate-button/0.4/bundle.c3cb6.esm.js.map new file mode 100644 index 00000000..aa77df03 --- /dev/null +++ b/docs/dist/donate-button/0.4/bundle.c3cb6.esm.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./helpers/constructDonateUrl.ts","webpack:///./helpers/parseDonateUrl.ts","webpack:///../src/index.js","webpack:///./components/widget/hooks/useCheckPaymentRequest.ts","webpack:////Users/mark/dev/every/donate-button/node_modules/@stripe/stripe-js/dist/stripe.esm.js","webpack:///./constants/stripe.ts","webpack:///./components/widget/components/Faq/helpers.tsx","webpack:///./helpers/mailToLink.ts","webpack:///../src/util.js","webpack:///../src/PureComponent.js","webpack:///../src/forwardRef.js","webpack:///../src/suspense.js","webpack:///../src/suspense-list.js","webpack:///../src/render.js","webpack:///./helpers/getStepForCurrencyAmountInput.ts","webpack:///./components/widget/components/PaymentProcess/CryptoFlow/CryptoSelector.tsx","webpack:///./helpers/getSubmitButtonText.ts","webpack:///./autoPlayMode.tsx","webpack:///./components/widget/theme/font-family.ts","webpack:///./components/embed-button/styles.ts","webpack:///./constants/url.ts","webpack:///./components/embed-button/index.tsx","webpack:///./components/widget/types/DonationFrequency.ts","webpack:///./components/widget/types/PaymentMethod.ts","webpack:///./loadFonts.ts","webpack:///./helpers/optionsTypes.ts","webpack:///./components/widget/context/ConfigContext.tsx","webpack:///./components/widget/hooks/useConfigContext.ts","webpack:///./components/widget/types/Fundraiser.ts","webpack:///./components/widget/context/FundraiserContext.tsx","webpack:///./components/widget/api/index.ts","webpack:///./components/widget/types/Nonprofit.ts","webpack:///./components/widget/context/NonprofitContext.tsx","webpack:///./components/widget/context/WidgetContext.tsx","webpack:///./components/widget/context/index.tsx","webpack:///./components/widget/theme/breakpoints.ts","webpack:///./components/widget/theme/colors.ts","webpack:///./components/widget/theme/font-sizes.ts","webpack:///./components/widget/theme/spacing.ts","webpack:///./components/widget/components/Faq/styles.ts","webpack:///./components/widget/components/Footer/helpers.tsx","webpack:///./components/widget/components/GridCard/styles.ts","webpack:///./helpers/joinClassNames.ts","webpack:///./components/widget/components/GridCard/index.tsx","webpack:///./components/widget/hooks/useFundraiser.tsx","webpack:///./components/widget/hooks/useNonprofit.tsx","webpack:///./components/widget/hooks/useWidgetContext.ts","webpack:///./components/widget/icons/ArrowIcon.tsx","webpack:///./components/widget/components/Faq/index.tsx","webpack:///./components/widget/components/Footer/styles.ts","webpack:///./components/widget/components/Footer/index.tsx","webpack:///./components/widget/components/FundraiserLink/styles.ts","webpack:///./components/widget/components/FundraiserLink/index.tsx","webpack:///./components/widget/components/Grid/index.tsx","webpack:///./components/widget/components/Header/CloseButton/styles.ts","webpack:///./components/widget/icons/CloseIcon.tsx","webpack:///./components/widget/components/Header/CloseButton/index.tsx","webpack:///./components/widget/components/Header/styles.ts","webpack:///./components/widget/components/Header/index.tsx","webpack:///./components/widget/theme/radii.ts","webpack:///./components/widget/components/NonprofitInfo/styles.ts","webpack:///./components/widget/components/NonprofitInfo/NonprofitCard.tsx","webpack:///./helpers/getCloudinaryUrl.ts","webpack:///./constants/placeholders.ts","webpack:///./components/widget/components/NonprofitInfo/index.tsx","webpack:///./components/widget/theme/borders.ts","webpack:///./components/widget/components/PaymentProcess/CryptoFlow/styles.ts","webpack:///./components/widget/components/PaymentProcess/DonationAmount/styles.ts","webpack:///./components/widget/components/TextInput/styles.ts","webpack:///./components/widget/components/TextInput/TextArea.tsx","webpack:///./components/widget/components/TextInput/TextInput.tsx","webpack:///./components/widget/types/Crypto.ts","webpack:///./components/widget/components/PaymentProcess/CryptoFlow/CryptoAmountInput.tsx","webpack:///./components/widget/icons/CryptoCurrencyIcon/index.tsx","webpack:///./components/widget/icons/CryptoCurrencyIcon/algorand.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/apecoin.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/avalanche.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/basic-attention-token.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/bitcoin.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/dogecoin.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/dai.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/polkadot.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/ethereum.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/filecoin.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/graph.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/chainlink.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/litecoin.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/polygon.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/mobilecoin.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/raydium.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/samoyed.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/saber.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/shiba-inu.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/solana.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/uniswap.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/tether.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/stellar.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/tezos.svg","webpack:///./components/widget/icons/CryptoCurrencyIcon/zcash.svg","webpack:///./components/widget/icons/SearchIcon.tsx","webpack:///./components/widget/icons/AppleIcon.tsx","webpack:///./components/widget/icons/GiftIcon.tsx","webpack:///./components/widget/icons/GoogleIcon.tsx","webpack:///./components/widget/components/PaymentProcess/PaymentMethodSelect/IconForPaymentMethod.tsx","webpack:///./components/widget/icons/CardIcon.tsx","webpack:///./components/widget/icons/BankIcon.tsx","webpack:///./components/widget/icons/Paypalcon.tsx","webpack:///./components/widget/icons/VenmoIcon.tsx","webpack:///./components/widget/icons/CryptoIcon.tsx","webpack:///./components/widget/icons/StocksIcon.tsx","webpack:///./components/widget/icons/DafIcon.tsx","webpack:///./components/widget/components/PaymentProcess/PaymentMethodSelect/NameForPaymentMethod.tsx","webpack:///./components/widget/components/PaymentProcess/styles.ts","webpack:///./components/widget/components/PaymentProcess/PaymentMethodSelect/styles.ts","webpack:///./components/widget/components/PaymentProcess/PaymentMethodSelect/index.tsx","webpack:///./components/widget/components/Checkbox/styles.ts","webpack:///./components/widget/icons/CheckMarkIcon.tsx","webpack:///./components/widget/components/Checkbox/index.tsx","webpack:///./components/widget/components/PaymentProcess/PrivateNote/index.tsx","webpack:///./components/widget/components/PaymentProcess/RedirectNotice/index.tsx","webpack:///./components/widget/components/PaymentProcess/SubmitButton/styles.ts","webpack:///./components/widget/components/PaymentProcess/SubmitButton/index.tsx","webpack:///./constants/currency.ts","webpack:///./components/widget/hooks/useSubmitDonation.ts","webpack:///./components/widget/components/PaymentProcess/CryptoFlow/index.tsx","webpack:///./components/widget/components/PaymentProcess/BackButton/styles.ts","webpack:///./components/widget/icons/ArrowBackIcon.tsx","webpack:///./components/widget/components/PaymentProcess/BackButton/index.tsx","webpack:///./components/widget/components/PaymentProcess/DafFlow/types.ts","webpack:///./components/widget/components/PaymentProcess/DonationAmount/index.tsx","webpack:///./helpers/isTouchDevice.ts","webpack:///./components/widget/components/PaymentProcess/Frequency/styles.tsx","webpack:///./components/widget/components/PaymentProcess/Frequency/index.tsx","webpack:///./components/widget/components/PaymentProcess/DafFlow/Views/DafAmountView.tsx","webpack:///./components/widget/components/PaymentProcess/DafFlow/Views/DafManualView.tsx","webpack:///./components/widget/components/PaymentProcess/DafFlow/styles.ts","webpack:///./components/widget/components/PaymentProcess/DafFlow/Views/DafStartView.tsx","webpack:///./components/widget/components/PaymentProcess/DafFlow/index.tsx","webpack:///./components/widget/components/PaymentProcess/DefaultFlow/index.tsx","webpack:///./components/widget/components/PaymentProcess/GiftCardFlow/styles.ts","webpack:///./components/widget/components/PaymentProcess/GiftCardFlow/index.tsx","webpack:///./components/widget/components/PaymentProcess/StocksFlow/index.tsx","webpack:///./components/widget/components/PaymentProcess/index.tsx","webpack:///./components/widget/components/WidgetCard/styles.ts","webpack:///./components/widget/components/WidgetCard/index.tsx","webpack:///./components/widget/components/WidgetOverlay/styles.ts","webpack:///./components/widget/components/WidgetOverlay/index.tsx","webpack:///./components/widget/icons/LoadingIcon.tsx","webpack:///./components/widget/index.tsx","webpack:///./loaders/Widgetloader.tsx","webpack:///./resetCss.ts","webpack:///./helpers/shouldEnableAutoPlay.ts","webpack:///./index.tsx","webpack:///./manualMode.tsx","webpack:////Users/mark/dev/every/donate-button/node_modules/cxs/dist/index.js","webpack:///../src/create-element.js","webpack:///../src/component.js","webpack:///../src/diff/children.js","webpack:///../src/diff/props.js","webpack:///../src/diff/index.js","webpack:///../src/clone-element.js","webpack:///../src/create-context.js","webpack:///../src/options.js","webpack:///../src/constants.js","webpack:///../src/diff/catch-error.js","webpack:////Users/mark/dev/every/donate-button/node_modules/fuzzy/lib/fuzzy.js","webpack:////Users/mark/dev/every/donate-button/node_modules/deepmerge/dist/cjs.js","webpack:////Users/mark/dev/every/donate-button/node_modules/preact-cli/lib/lib/entry.js"],"names":["__webpack_require__","moduleId","installedModules","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","serializeParams","params","entries","filter","Boolean","map","entry","part","encodeURIComponent","join","getBaseUrl","fundraiserSlug","nonprofitSlug","baseUrl","BASE_URL","getBaseParams","methods","noExit","privateNote","method","utm_campaign","utm_source","utm_medium","no_exit","private_note","parseDonateUrl","urlString","_searchParameters$get","url","URL","pathname","split","searchParameters","URLSearchParams","search","string","AvailablePaymentMethods","includes","methodsFromString","DonateUrlParameters","METHOD","defaultFrequency","values","DonationFrequency","find","frequency","toUpperCase","frequencyFromString","FREQUENCY","monthlyTitle","MONTHLY_TITLE","undefined","addAmounts","Number","parseFloat","slice","addAmountsFromString","SUGGESTED_AMOUNTS","lockMonthlyFrequency","Monthly","u","__h","__H","__","length","push","__V","h","B","__c","__N","setState","f","every","forEach","props","shouldComponentUpdate","e","componentWillUpdate","__e","__s","z","_","F","current","T","q","context","sub","b","shift","__P","k","w","__v","j","clearTimeout","g","cancelAnimationFrame","setTimeout","requestAnimationFrame","some","useStripe","stripePromise","setStripe","useState","useEffect","stripe","_len","arguments","args","Array","_key","loadCalled","startTime","Date","now","stripePromise$1","then","maybeStripe","initStripe","loadStripe","apiVersion","_unused","getDisbursementDescription","nonprofit","directDisbursement","_a","className","faqLinkCss","href","getNfgDisclaimer","encourageBankDonation","getFeeDescription","paymentMethod","Fragment","_p8","PaymentMethod","PAYPAL","_p","CREDIT_CARD","PAYMENT_REQUEST","_p2","BANK","VENMO","_p3","CRYPTO","_p4","STOCKS","_p5","DAF","_p6","_p7","getFeeDescriptionBody","isPresent","mailToLink","parameters","_parameters$address","link","queryString","addParameters","address","_extends","subject","body","C","this","ref","$$typeof","N","render","isReactComponent","__f","displayName","U","__u","__b","D","__a","V","Q","X","cancelBubble","nn","defaultPrevented","getStepForCurrencyAmountInput","currency","decimalOffset","SharedCryptoCurrencyConfig","repeat","displayLabelForCryptoCurrency","cc","config","abbreviation","displayContractTypeForCryptoCurrency","contractType","cryptoCurrencyToOption","label","getSubmitButtonText","paymentRequestIsApplePay","cryptoCurrency","base","GIFT_CARD","mountWidgetContainer","shadowRoot","shadowWidgetWrapper","document","createElement","id","style","position","zIndex","append","attachShadow","mountShadowRoot","widgetContainer","everyStyles","querySelector","_everyStyles$sheet$cs","_everyStyles$sheet","rules","sheet","cssRules","rule","cssText","everyShadowStyles","innerHTML","resetcss","createButton","_ref","element","options","_objectWithoutPropertiesLoose","_excluded","parentNode","buttonContainer","preactRender","EmbedButton","findAndReplaceLinks","querySelectorAll","getAttribute","widget","widgetMountPoint","WidgetController","createWidget","addEventListener","event","preventDefault","show","onClick","FontFamily","cxs","prefix","buttonCss","display","alignItems","width","border","outline","fontFamily","BasisGrotesque","fontWeight","lineHeight","cursor","textDecoration","backfaceVisibility","transition","padding","color","backgroundColor","borderRadius","fontSize","logoCss","height","fill","marginRight","verticalCenterTextCss","transform","BASE_API_URL","HASH","withLogo","textColor","bgColor","target","initialUrl","donateOptions","background","viewBox","xmlns","_path","_span","OneTimeFrequencyMethods","DefaultPaymentMethods","pm","loadFonts","fonts","head","defaults","OneTime","minDonationAmount","primaryColor","showGiftCardOption","DEEP_MERGE_OPTIONS","arrayMerge","sourceArray","ConfigContext","createContext","ConfigContextProvider","children","mergedConfig","_options$methods","filteredInputMethods","concat","deepMerge","all","mergeConfig","Provider","a","__r","v","diffed","unmount","useConfigContext","useContext","FundraiserFetchError","FundraiserFetching","FundraiserContext","fundraiser","FundraiserContextProvider","setFundraiser","fetchFundraiser","useCallback","async","response","fetch","json","data","getFundraiser","NonprofitFetchError","NonprofitFetching","NonprofitContext","NonprofitContextProvider","setNonprofit","fetchNonprofit","getNonprofit","V3_URL","V3_URL_REGEX","EXISTING_SCRIPT_MESSAGE","loadScript","Promise","resolve","reject","window","Stripe","console","warn","script","scripts","test","src","findScript","advancedFraudSignals","headOrBody","Error","appendChild","injectScript","error","apply","_registerWrapper","version","registerWrapper","err","WidgetContext","WidgetContextProvider","hide","setFrequency","donationAmount","setDonationAmount","defaultDonationAmount","submitError","setSubmitError","selectedPaymentMethod","setSelectedPaymentMethod","stockAmount","setStockAmount","stockSymbol","setStockSymbol","cryptoAmount","setCryptoAmount","setCryptoCurrency","paymentRequestAvailable","canMakePayment","setCanMakePayment","initializePaymentRequest","pr","paymentRequest","country","total","amount","requestPayerName","requestPayerEmail","isApplePay","ApplePaySession","googlePay","applePay","useCheckPaymentRequest","setPrivateNote","hideWidget","ContextProvider","BREAKPOINTS","COLORS","textSize","Spacing","verticalStackCssObject","spacing","flexDirection","marginBottom","horizontalStackCssObject","verticalStackCss","horizontalStackCss","faqListCss","gap","M","rotateCss","top","descriptionBaseCss","XS","descriptionOpen","maxHeight","opacity","descriptionClose","overflow","faqItemButtonCss","isOpen","S","justifyContent","textAlign","TextGray","Text","getTaxDeductibleStatement","isUnofficialFundraiser","nonprofitId","creatorNonprofitId","isOfficialFundraiser","end","hasAdmin","cardCss","XL","TabletLandscapeUp","joinClassNames","classNames","GridCard","useFundraiser","useFundraiserOrUndefined","useNonprofit","useNonprofitOrError","useWidgetContext","ArrowIcon","_svg","stroke","strokeWidth","strokeLinecap","strokeLinejoin","FaqItem","faqData","setOpen","mobileOnly","type","title","_ArrowIcon","description","Faq","faqDataList","_Fragment","primarySlug","item","footerCardCss","L","margin","footerLinkCss","FEEDBACK_URL","FooterLink","rest","Footer","_FooterLink","linkCss","FundraiserLink","gridCss","gridGap","gridTemplateColumns","gridTemplateAreas","gridColumnGap","gridTemplateRows","gridArea","Grid","smallScreenCloseButtonCss","largeScreenCloseButtonCss","right","XXS","CloseIcon","CloseButton","_CloseIcon","containerCss","Header","_div","Radii","nonprofitNameCss","logoImageCss","logoUrl","Circle","backgroundImage","backgroundSize","flexShrink","avatarAndNameWrapperCss","descriptionCss","NonprofitCard","logoCloudinaryId","alt","NonprofitInfo","_NonprofitCard","Borders","getColoredBorder","cryptoSelectorContainerCss","cryptoSelectorDropDownContainerCss","White","Default","Normal","LightGray","borderTop","cryptoSelectorInputContainerCss","cryptoSelectorDropDownContentCss","overflowY","quickSelectOptionsListCss","borderBottom","cryptoSelectorDropDownItemCss","marginLeft","cryptoSelectorInputSufixCss","showDropDown","inputContainerWithDropDownCss","cryptoAmountInputContainerCss","donationAmountInputContainerErrorCss","donationAmountInputCss","donationAmountInputPrefixCss","donationAmountInputSufixCss","donationAmountAddAmountContainerCss","donationAmountAddAmountButtonCss","Big","DarkGray","isPureReactComponent","state","R","for","__k","__R","insertBefore","__d","__O","pop","forceUpdate","componentWillUnmount","I","fallback","W","delete","revealOrder","size","Map","reverse","set","componentDidUpdate","componentDidMount","H","Z","Y","$","configurable","writable","K","persist","isPropagationStopped","isDefaultPrevented","nativeEvent","en","class","rn","vnode","toLowerCase","indexOf","replace","multiple","isArray","selected","defaultValue","un","on","textInputContainerCss","Gray","borderColor","textInputCss","flex","minWidth","TextArea","forwardRef","inputRef","useRef","containerClassName","inputClassName","_inputRef$current","focus","TextInput","sufix","sufixClassName","prefixClassName","containerOnClick","CryptoCurrency","ContractType","DISABLED_TOKENS","ALGO","MOB","APE","ERC20","AVAX","BAT","BTC","DOGE","DAI","DOT","ETH","FIL","GRT","LINK","LTC","MATIC","RAY","SPL","SAMO","SBR","SHIB","SOL","UNI","USDC","USDT","XTZ","ZEC","CryptoAmountInput","inputContainerClasses","inputMode","pattern","step","onInput","stringValue","currentTarget","floatValue","isNaN","IconForCurrency","CryptoCurrencyIcon","SearchIcon","cx","cy","quickSelectTokens","quickSelectOptions","otherOptions","cryptoCurrencyOptions","CryptoSelectorDropDownItem","option","role","CryptoSupprotLink","cryptoSupportBody","CryptoSelector","selectedOption","setSelectedOption","inputValue","setInputValue","setShowDrowDown","handleItemClick","handleInputFocus","optionToListItem","filteredOptions","fuzzyFilter","extract","original","handleContainerClick","_SearchIcon","onFocus","_CryptoSupprotLink","AppleIcon","GiftIcon","GoogleIcon","IconForPaymentMethodMap","CardIcon","BankIcon","PaypalIcon","VenmoIcon","CryptoIcon","fillRule","clipRule","StocksIcon","DafIcon","clipPath","IconForPaymentMethod","_AppleIcon","_GoogleIcon","getIconForPaymentMethod","NameForPaymentMethodMap","NameForPaymentMethod","getNameForPaymentMethod","fieldSetCss","font","verticalAlign","legendCss","formContainerCss","XXL","formCss","gridAutoFlow","largePaymentMethodSelectListCss","flexGrow","smallPaymentMethodFieldSetCss","smallPaymentMethodSelectListCss","paymentMethodButtonCssBase","smallPaymentMethodButtonCss","usePaymentMethods","useMemo","LargePaymentMethodSelect","SmallPaymentMethodSelect","_legend","hiddenCheckboxCss","clip","whiteSpace","checkboxCss","checked","checkMarkIconCss","checkboxLabelTextCss","checkboxLabelContainerCss","CheckMarkIcon","Checkbox","defaultChecked","_CheckMarkIcon","PrivateNote","enablePrivateNoteField","showPrivateNoteField","setShowPrivateNoteField","onChange","previous","rows","resize","redirectTextCss","letterSpacing","TextOpaque","RedirectNotice","rel","btnCss","btnDisabledCss","SubmitButton","handleClick","disabled","DEFAULT_CURRENCY","useSubmitDonation","completeDonationInNewTab","baseParameters","open","_ref3","_excluded3","crypto_amount","crypto_currency","constructDonateCryptoUrl","_ref2","_excluded2","stock_amount","stock_symbol","constructDonateStocksUrl","constructDonateUrl","CryptoFlow","submitDonation","onSubmit","_LargePaymentMethodSe","_SmallPaymentMethodSe","_div2","_PrivateNote","_RedirectNotice","backButtonCss","alignSelf","ArrowBackIcon","BackButton","_ArrowBackIcon","DafFlowView","preventDecimal","DonationAmount","navigator","maxTouchPoints","min","onKeyDown","inputLabelCss","borderRight","inputItemCss","appearance","inputContainerCss","DEFAULT_MONTHLY_TITLE","Frequency","_legend2","htmlFor","DafAmountView","changeView","START","_h","_Frequency","_DonationAmount","DafManualView","_span2","_span3","_span4","_span5","_span6","paddingBottom","chariotButtonCss","manualButtonCss","ChariotLogo","DafStartView","AMOUNT","_ChariotLogo","MANUAL","DafFlow","view","setView","DefaultFlow","Unselected","giftCardIconCss","GiftCardFlow","_GiftIcon","StocksFlow","DonateFlowForPaymentMethod","_CryptoFlow","_StocksFlow","_DafFlow","_GiftCardFlow","_DefaultFlow","PaymentProcess","_GridCard","widgetCss","minHeight","scrollbarWidth","Medium","WidgetCard","overlayCss","bottom","left","boxSizing","h1","h2","WidgetOverlay","MASK","loadingSvgCss","maskImage","maskSize","LoadingIcon","Widget","findraiser","hideOnWrapperClick","_LoadingIcon","_CloseButton","_WidgetCard","originalOverflow","removeOverflowFromBody","getOriginalOverflow","WidgetLoader","addOverflowToBody","_Widget","OBSERVER_OPTIONS","childList","subtree","attributeFilter","constructor","mountPoint","_defineProperty","setOptions","MutationObserver","WebKitMutationObserver","MozMutationObserver","_document$currentScri","parametersString","currentScript","parametersArray","parameterString","parametersObject","fromEntries","shouldEnableAutoPlay","mutations","observer","disconnect","mutation","nodeName","observe","log","messages","info","showWidget","renderWidget","updateOptionsAndShowCb","newOptions","_optionsCopy$openAt","optionsCopy","openAt","instanceOptions","baseOptions","getNodeList","selector","_window$location","_instanceOptions$open","_instanceOptions","mountWidget","location","hash","finalOptions","everyDotOrgDonateButton","nodes","_buttonContainer$quer","_buttonLink$getAttrib","buttonLink","_ref4","node","manualMode","cache","insert","mx","media","rx","cn","prop","val","noAnd","parse","obj","child","keys","m2","toString","styles","_key2","trim","css","sort","reset","insertRule","removeChild","y","defaultProps","x","debounceRendering","__n","ownerSVGElement","P","A","O","nextSibling","setProperty","removeEventListener","removeAttribute","setAttribute","contextType","__E","_sb","getDerivedStateFromProps","componentWillMount","componentWillReceiveProps","getChildContext","getSnapshotBeforeUpdate","localName","nodeType","createTextNode","createElementNS","is","childNodes","dangerouslySetInnerHTML","attributes","__html","firstChild","E","G","Consumer","splice","getDerivedStateFromError","componentDidCatch","fuzzy","simpleFilter","array","str","match","opts","ch","patternIdx","result","len","totalScore","currScore","pre","post","compareString","caseSensitive","idx","Infinity","rendered","score","arr","reduce","prev","index","compare","isSpecial","REACT_ELEMENT_TYPE","isReactElement","cloneUnlessOtherwiseSpecified","clone","isMergeableObject","deepmerge","defaultArrayMerge","source","getKeys","getOwnPropertySymbols","symbol","propertyIsEnumerable","getEnumerableOwnPropertySymbols","propertyIsOnObject","mergeObject","destination","propertyIsUnsafe","customMerge","getMergeFunction","sourceIsArray","isNonNullObject","next","hydrate","Preact","interopDefault","default","require","root","getElementById","firstElementChild","init","app","preRenderData","inlineDataElement","JSON","decodeURI","CLI_DATA"],"mappings":"aAIE,SAASA,EAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,OAAOC,EAAiBD,GAAUE,QAGnC,IAAIC,EAASF,EAAiBD,GAAY,CACzCI,EAAGJ,EACHK,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQN,GAAUO,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASH,GAG/DI,EAAOE,GAAI,EAGJF,EAAOD,QAvBf,IAAID,EAAmB,GA4BvBF,EAAoBS,EAAIF,EAGxBP,EAAoBU,EAAIR,EAGxBF,EAAoBW,EAAI,SAASR,EAASS,EAAMC,GAC3Cb,EAAoBc,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEb,EAAoBmB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDtB,EAAoBuB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQtB,EAAoBsB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAA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ARR,CAAEJ,mBAQmBj0B,SAAS1C,KAAMs2B,IAKtDG","file":"bundle.c3cb6.esm.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"https://assets.every.org/dist/donate-button/0.4/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"riXW\");\n","/* eslint-disable unicorn/prevent-abbreviations */\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {BASE_URL, GIFT_CARD_URL} from 'src/constants/url';\n\nconst UTM_MEDIUM = 'donate-button-0.4'; // Update this if the major version changes\nconst HASH = 'donate';\n\ninterface BaseUrlParams {\n\tnonprofitSlug: string;\n\tfundraiserSlug?: string;\n\tfundraiserId?: string;\n\tnoExit?: boolean;\n\tmethods?: PaymentMethod[];\n\tprivateNote?: string;\n}\n\ninterface DonateUrlParams extends BaseUrlParams {\n\tfrequency: DonationFrequency;\n\tamount: number;\n}\n\ninterface DonateStocksUrlParams extends BaseUrlParams {\n\tstockAmount: number;\n\tstockSymbol: string;\n}\n\ninterface DonateCryptoUrlParams extends BaseUrlParams {\n\tcryptoAmount: number;\n\tcryptoCurrency: string;\n}\n\nfunction serializeParams(\n\tparams: Record\n) {\n\treturn Object.entries(params)\n\t\t.filter(([, value]) => Boolean(value))\n\t\t.map((entry) => entry.map((part) => encodeURIComponent(part!)).join('='))\n\t\t.join('&');\n}\n\nfunction getBaseUrl({\n\tfundraiserSlug,\n\tnonprofitSlug\n}: Pick) {\n\tlet baseUrl = BASE_URL + nonprofitSlug;\n\n\tif (fundraiserSlug) {\n\t\tbaseUrl += '/f/' + fundraiserSlug;\n\t}\n\n\treturn baseUrl;\n}\n\nfunction getBaseParams({\n\tmethods,\n\tnonprofitSlug,\n\tnoExit,\n\tprivateNote\n}: Pick<\n\tBaseUrlParams,\n\t'nonprofitSlug' | 'methods' | 'noExit' | 'privateNote'\n>) {\n\treturn {\n\t\tmethod: methods?.join(','),\n\t\tutm_campaign: 'donate-button',\n\t\tutm_source: nonprofitSlug,\n\t\tutm_medium: UTM_MEDIUM,\n\t\tno_exit: noExit ?? 1,\n\t\tprivate_note: privateNote\n\t};\n}\n\nexport function constructBasicDonateUrl(\n\t// eslint-disable-next-line @typescript-eslint/ban-types\n\tprops: Omit\n) {\n\tconst baseUrl = getBaseUrl(props);\n\tconst params = getBaseParams(props);\n\n\tconst parameters = serializeParams(params);\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateUrl({\n\tfrequency,\n\tamount,\n\t...rest\n}: DonateUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\tfrequency,\n\t\tamount,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateStocksUrl({\n\tstockAmount,\n\tstockSymbol,\n\t...rest\n}: DonateStocksUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\tstock_amount: stockAmount,\n\t\tstock_symbol: stockSymbol,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateCryptoUrl({\n\tcryptoAmount,\n\tcryptoCurrency,\n\t...rest\n}: DonateCryptoUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\tcrypto_amount: cryptoAmount,\n\t\tcrypto_currency: cryptoCurrency,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructGiftCardUrl(nonprofitSlug: string) {\n\tconst parameters = serializeParams({\n\t\tnonprofitSlug\n\t});\n\n\treturn `${GIFT_CARD_URL}?${parameters}`;\n}\n","import {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tAvailablePaymentMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nconst MAX_AMOUNT_SUGGESTIONS = 5;\n\nenum DonateUrlParameters {\n\tMETHOD = 'method',\n\tFREQUENCY = 'frequency',\n\tMONTHLY_TITLE = 'monthlyTitle',\n\tSUGGESTED_AMOUNTS = 'suggestedAmounts'\n}\n\nfunction methodsFromString(string?: string | null) {\n\tif (!string) return;\n\treturn string\n\t\t.split(',')\n\t\t.filter((method): method is PaymentMethod =>\n\t\t\tAvailablePaymentMethods.includes(method as PaymentMethod)\n\t\t);\n}\n\nfunction frequencyFromString(string?: string | null) {\n\tif (!string) return;\n\treturn Object.values(DonationFrequency).find(\n\t\t(frequency) => frequency.toUpperCase() === string.toUpperCase()\n\t);\n}\n\nfunction addAmountsFromString(string?: string | null) {\n\tif (!string) return;\n\treturn (\n\t\tstring\n\t\t\t.split(',')\n\t\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t\t.map(Number.parseFloat)\n\t\t\t.filter(Boolean)\n\t\t\t.slice(0, MAX_AMOUNT_SUGGESTIONS)\n\t);\n}\n\nexport function parseDonateUrl(\n\turlString: string\n): (Partial & {nonprofitSlug: string}) | undefined {\n\tconst url = new URL(urlString);\n\n\tconst fundraiserSlug = url.pathname.split('/f/')[1];\n\tconst nonprofitSlug = url.pathname.split('/')[1];\n\n\tconst searchParameters = new URLSearchParams(url.search);\n\tconst methods = methodsFromString(\n\t\tsearchParameters.get(DonateUrlParameters.METHOD)\n\t);\n\tconst defaultFrequency = frequencyFromString(\n\t\tsearchParameters.get(DonateUrlParameters.FREQUENCY)\n\t);\n\tconst monthlyTitle =\n\t\tsearchParameters.get(DonateUrlParameters.MONTHLY_TITLE) ?? undefined;\n\n\tconst addAmounts = addAmountsFromString(\n\t\tsearchParameters.get(DonateUrlParameters.SUGGESTED_AMOUNTS)\n\t);\n\tconst lockMonthlyFrequency = defaultFrequency === DonationFrequency.Monthly;\n\n\tif (!nonprofitSlug) {\n\t\treturn;\n\t}\n\n\treturn {\n\t\tfundraiserSlug,\n\t\tnonprofitSlug,\n\t\tdefaultFrequency,\n\t\tmethods,\n\t\tlockMonthlyFrequency,\n\t\tmonthlyTitle,\n\t\taddAmounts\n\t};\n}\n","import {\n\tcreateElement,\n\trender as preactRender,\n\tcloneElement as preactCloneElement,\n\tcreateRef,\n\tComponent,\n\tcreateContext,\n\tFragment\n} from 'preact';\nimport {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue\n} from 'preact/hooks';\nimport { PureComponent } from './PureComponent';\nimport { memo } from './memo';\nimport { forwardRef } from './forwardRef';\nimport { Children } from './Children';\nimport { Suspense, lazy } from './suspense';\nimport { SuspenseList } from './suspense-list';\nimport { createPortal } from './portals';\nimport { is } from './util';\nimport {\n\thydrate,\n\trender,\n\tREACT_ELEMENT_TYPE,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n} from './render';\n\nconst version = '17.0.2'; // trick libraries to think we are react\n\n/**\n * Legacy version of createElement.\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor\n */\nfunction createFactory(type) {\n\treturn createElement.bind(null, type);\n}\n\n/**\n * Check if the passed element is a valid (p)react node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isValidElement(element) {\n\treturn !!element && element.$$typeof === REACT_ELEMENT_TYPE;\n}\n\n/**\n * Check if the passed element is a Fragment node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isFragment(element) {\n\treturn isValidElement(element) && element.type === Fragment;\n}\n\n/**\n * Wrap `cloneElement` to abort if the passed element is not a valid element and apply\n * all vnode normalizations.\n * @param {import('./internal').VNode} element The vnode to clone\n * @param {object} props Props to add when cloning\n * @param {Array} rest Optional component children\n */\nfunction cloneElement(element) {\n\tif (!isValidElement(element)) return element;\n\treturn preactCloneElement.apply(null, arguments);\n}\n\n/**\n * Remove a component tree from the DOM, including state and event handlers.\n * @param {import('./internal').PreactElement} container\n * @returns {boolean}\n */\nfunction unmountComponentAtNode(container) {\n\tif (container._children) {\n\t\tpreactRender(null, container);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n/**\n * Get the matching DOM node for a component\n * @param {import('./internal').Component} component\n * @returns {import('./internal').PreactElement | null}\n */\nfunction findDOMNode(component) {\n\treturn (\n\t\t(component &&\n\t\t\t(component.base || (component.nodeType === 1 && component))) ||\n\t\tnull\n\t);\n}\n\n/**\n * Deprecated way to control batched rendering inside the reconciler, but we\n * already schedule in batches inside our rendering code\n * @template Arg\n * @param {(arg: Arg) => void} callback function that triggers the updated\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n */\n// eslint-disable-next-line camelcase\nconst unstable_batchedUpdates = (callback, arg) => callback(arg);\n\n/**\n * In React, `flushSync` flushes the entire tree and forces a rerender. It's\n * implmented here as a no-op.\n * @template Arg\n * @template Result\n * @param {(arg: Arg) => Result} callback function that runs before the flush\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n * @returns\n */\nconst flushSync = (callback, arg) => callback(arg);\n\n/**\n * Strict Mode is not implemented in Preact, so we provide a stand-in for it\n * that just renders its children without imposing any restrictions.\n */\nconst StrictMode = Fragment;\n\nexport function startTransition(cb) {\n\tcb();\n}\n\nexport function useDeferredValue(val) {\n\treturn val;\n}\n\nexport function useTransition() {\n\treturn [false, startTransition];\n}\n\n// TODO: in theory this should be done after a VNode is diffed as we want to insert\n// styles/... before it attaches\nexport const useInsertionEffect = useLayoutEffect;\n\n// compat to react-is\nexport const isElement = isValidElement;\n\n/**\n * This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84\n * on a high level this cuts out the warnings, ... and attempts a smaller implementation\n */\nexport function useSyncExternalStore(subscribe, getSnapshot) {\n\tconst value = getSnapshot();\n\n\tconst [{ _instance }, forceUpdate] = useState({\n\t\t_instance: { _value: value, _getSnapshot: getSnapshot }\n\t});\n\n\tuseLayoutEffect(() => {\n\t\t_instance._value = value;\n\t\t_instance._getSnapshot = getSnapshot;\n\n\t\tif (!is(_instance._value, getSnapshot())) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\t}, [subscribe, value, getSnapshot]);\n\n\tuseEffect(() => {\n\t\tif (!is(_instance._value, _instance._getSnapshot())) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\n\t\treturn subscribe(() => {\n\t\t\tif (!is(_instance._value, _instance._getSnapshot())) {\n\t\t\t\tforceUpdate({ _instance });\n\t\t\t}\n\t\t});\n\t}, [subscribe]);\n\n\treturn value;\n}\n\nexport * from 'preact/hooks';\nexport {\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tisFragment,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\t// eslint-disable-next-line camelcase\n\tunstable_batchedUpdates,\n\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n\n// React copies the named exports to the default one.\nexport default {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseInsertionEffect,\n\tuseTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tstartTransition,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tisElement,\n\tisFragment,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tunstable_batchedUpdates,\n\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n","import {Stripe, loadStripe} from '@stripe/stripe-js';\nimport {useState, useCallback, useEffect} from 'preact/hooks';\nimport {PaymentRequestAvailable} from 'src/components/widget/types/PaymentMethod';\nimport {STRIPE_API_VERSION, STRIPE_PUBLIC_KEY} from 'src/constants/stripe';\n\ndeclare global {\n\tinterface Window {\n\t\tApplePaySession: any;\n\t}\n}\n\nfunction useStripe() {\n\tconst [stripePromise, setStripe] = useState(null);\n\tuseEffect(() => {\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tconst stripe = await loadStripe(STRIPE_PUBLIC_KEY, {\n\t\t\t\t\tapiVersion: STRIPE_API_VERSION\n\t\t\t\t});\n\n\t\t\t\tsetStripe(stripe);\n\t\t\t} catch {\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t})();\n\t}, []);\n\treturn stripePromise;\n}\n\nexport function useCheckPaymentRequest(): PaymentRequestAvailable {\n\tconst stripe = useStripe();\n\n\tconst [canMakePayment, setCanMakePayment] = useState(false);\n\n\tconst initializePaymentRequest = useCallback(async (stripe: Stripe) => {\n\t\tconst pr = stripe?.paymentRequest({\n\t\t\tcountry: 'US',\n\t\t\tcurrency: 'usd',\n\t\t\ttotal: {label: 'test', amount: 0},\n\t\t\trequestPayerName: false,\n\t\t\trequestPayerEmail: false\n\t\t});\n\t\tconst canMakePayment = Boolean(await pr?.canMakePayment());\n\t\tsetCanMakePayment(canMakePayment);\n\t}, []);\n\n\tuseEffect(() => {\n\t\tif (!stripe) {\n\t\t\treturn;\n\t\t}\n\n\t\tvoid initializePaymentRequest(stripe);\n\t}, [initializePaymentRequest, stripe]);\n\n\tconst isApplePay = Boolean(window.ApplePaySession);\n\n\treturn {googlePay: canMakePayment, applePay: canMakePayment && isApplePay};\n}\n","var V3_URL = 'https://js.stripe.com/v3';\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\nvar findScript = function findScript() {\n var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(V3_URL, \"\\\"]\"));\n\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n\n if (!V3_URL_REGEX.test(script.src)) {\n continue;\n }\n\n return script;\n }\n\n return null;\n};\n\nvar injectScript = function injectScript(params) {\n var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n var script = document.createElement('script');\n script.src = \"\".concat(V3_URL).concat(queryString);\n var headOrBody = document.head || document.body;\n\n if (!headOrBody) {\n throw new Error('Expected document.body not to be null. Stripe.js requires a element.');\n }\n\n headOrBody.appendChild(script);\n return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n if (!stripe || !stripe._registerWrapper) {\n return;\n }\n\n stripe._registerWrapper({\n name: 'stripe-js',\n version: \"1.54.2\",\n startTime: startTime\n });\n};\n\nvar stripePromise = null;\nvar loadScript = function loadScript(params) {\n // Ensure that we only attempt to load Stripe.js at most once\n if (stripePromise !== null) {\n return stripePromise;\n }\n\n stripePromise = new Promise(function (resolve, reject) {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n // Resolve to null when imported server side. This makes the module\n // safe to import in an isomorphic code base.\n resolve(null);\n return;\n }\n\n if (window.Stripe && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n }\n\n if (window.Stripe) {\n resolve(window.Stripe);\n return;\n }\n\n try {\n var script = findScript();\n\n if (script && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n } else if (!script) {\n script = injectScript(params);\n }\n\n script.addEventListener('load', function () {\n if (window.Stripe) {\n resolve(window.Stripe);\n } else {\n reject(new Error('Stripe.js not available'));\n }\n });\n script.addEventListener('error', function () {\n reject(new Error('Failed to load Stripe.js'));\n });\n } catch (error) {\n reject(error);\n return;\n }\n });\n return stripePromise;\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n if (maybeStripe === null) {\n return null;\n }\n\n var stripe = maybeStripe.apply(undefined, args);\n registerWrapper(stripe, startTime);\n return stripe;\n}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n// own script injection.\n\nvar stripePromise$1 = Promise.resolve().then(function () {\n return loadScript(null);\n});\nvar loadCalled = false;\nstripePromise$1[\"catch\"](function (err) {\n if (!loadCalled) {\n console.warn(err);\n }\n});\nvar loadStripe = function loadStripe() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n loadCalled = true;\n var startTime = Date.now();\n return stripePromise$1.then(function (maybeStripe) {\n return initStripe(maybeStripe, args, startTime);\n });\n};\n\nexport { loadStripe };\n","export const STRIPE_PUBLIC_KEY = 'pk_live_a5XJAcVaIqMs8ggZMtluZs8z00r2H4kYVG';\nexport const STRIPE_API_VERSION = '2022-11-15';\n","import {Fragment} from 'preact/jsx-runtime';\nimport {faqLinkCss} from 'src/components/widget/components/Faq/styles';\nimport {Nonprofit} from 'src/components/widget/types/Nonprofit';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nexport function getDisbursementDescription(nonprofit: Nonprofit) {\n\tif (nonprofit.directDisbursement) {\n\t\treturn (\n\t\t\tWe then grant directly to {nonprofit.name} on a weekly basis.\n\t\t);\n\t}\n\n\treturn (\n\t\t\n\t\t\tWe then partner with Network for Good to grant to {nonprofit.name} on a{' '}\n\t\t\t\n\t\t\t\tmonthly basis\n\t\t\t\n\t\t\t.\n\t\t\n\t);\n}\n\nexport function getNfgDisclaimer(nonprofit: Nonprofit) {\n\tif (!nonprofit.directDisbursement) {\n\t\treturn (\n\t\t\t

\n\t\t\t\t{nonprofit.name} has not added bank deposit info to Every.org yet, so we\n\t\t\t\tcurrently grant to them through Network for Good, who charges a 2.25%\n\t\t\t\tdisbursement fee.\n\t\t\t

\n\t\t);\n\t}\n\n\treturn null;\n}\n\nexport function getFeeDescriptionBody(\n\tpaymentMethod: PaymentMethod,\n\tnonprofit: Nonprofit\n) {\n\tswitch (paymentMethod) {\n\t\tcase PaymentMethod.PAYPAL:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tPayPal charges 1.99% + $0.49 for each transaction. There’s an\n\t\t\t\t\t\tadditional 1.5% fee for non-US donors.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.CREDIT_CARD:\n\t\tcase PaymentMethod.PAYMENT_REQUEST:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tVisa and Mastercard charge 2.2% + $0.30 for each transaction. Amex\n\t\t\t\t\t\tcharges a 3.5% flat fee. There’s an additional 1% fee for non-US\n\t\t\t\t\t\tcards.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.BANK:\n\t\t\treturn (\n\t\t\t\t

\n\t\t\t\t\tEvery.org currently covers all fees for donations made with a bank, so\n\t\t\t\t\t100% of your gift reaches {nonprofit.name}.\n\t\t\t\t

\n\t\t\t);\n\t\tcase PaymentMethod.VENMO:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tVenmo charges 1.99% + $0.49 for each transaction. There’s an\n\t\t\t\t\t\tadditional 1.5% fee for non-US donors.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tOur exchanges generally charge a 1% flat fee to automatically\n\t\t\t\t\t\tliquidate cryptocurrency. For large donations worth over $5k, you\n\t\t\t\t\t\thave the option to email crypto@every.org to request an address and\n\t\t\t\t\t\twe can do a manual conversion to get the best rates possible\n\t\t\t\t\t\t(usually 0.1%-0.4%). Or you are welcome to donate here with the 1%\n\t\t\t\t\t\tfee.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.STOCKS:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tEvery.org covers all brokerage fees for commonly traded stocks! For\n\t\t\t\t\t\tmutual funds, the First Republic brokerage fee is usually 0.1% of\n\t\t\t\t\t\tthe principle, with a $30 minimum and $150 maximum. Some slippage\n\t\t\t\t\t\tmay occur between when you donate and when we sell making the final\n\t\t\t\t\t\tamount different from what you donate.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

We do not charge any fees, but your DAF provider may have fees.

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

However, there are third-party fees.

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t}\n}\n\nexport function encourageBankDonation(nonprofit: Nonprofit) {\n\treturn (\n\t\t

\n\t\t\tDon’t like fees? Neither do we! Donate via bank and then 100% of your gift\n\t\t\twill reach {nonprofit.name}.\n\t\t

\n\t);\n}\n\nexport function getFeeDescription(\n\tpaymentMethod: PaymentMethod,\n\tnonprofit: Nonprofit\n) {\n\treturn (\n\t\t\n\t\t\t

\n\t\t\t\tEvery.org is free for donors and nonprofits, with no platform fees -\n\t\t\t\tinstead we ask for a completely optional tip.\n\t\t\t

\n\t\t\t{getFeeDescriptionBody(paymentMethod, nonprofit)}\n\t\t
\n\t);\n}\n","export function isPresent(value: T): value is Exclude {\n\treturn !(value === null || value === undefined);\n}\n\nfunction addParameters(\n\tlink: string,\n\tparameters: Record\n) {\n\t// We don't use URLSearchParams here because it changes spaces to +s instead\n\t// of %20, and some mail clients like Apple don't handle that well.\n\tconst queryString = Object.entries(parameters)\n\t\t.map(([key, value]) => {\n\t\t\ttry {\n\t\t\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t\t\treturn [key, value].map(encodeURIComponent).join('=');\n\t\t\t} catch {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t})\n\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t.filter(isPresent)\n\t\t.join('&');\n\treturn queryString ? [link, queryString].join('?') : link;\n}\n\nexport function mailToLink(parameters: {\n\taddress?: string;\n\tsubject?: string;\n\tbody?: string;\n}) {\n\treturn addParameters(`mailto:${parameters.address ?? ''}`, {\n\t\t...(parameters.subject ? {subject: parameters.subject} : {}),\n\t\t...(parameters.body ? {body: parameters.body} : {})\n\t});\n}\n","import { EMPTY_ARR } from './constants';\n\nexport const isArray = Array.isArray;\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-ignore We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n","import { Component } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Component class with a predefined `shouldComponentUpdate` implementation\n */\nexport function PureComponent(p) {\n\tthis.props = p;\n}\nPureComponent.prototype = new Component();\n// Some third-party libraries check if this property is present\nPureComponent.prototype.isPureReactComponent = true;\nPureComponent.prototype.shouldComponentUpdate = function (props, state) {\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n};\n","import { options } from 'preact';\nimport { assign } from './util';\n\nlet oldDiffHook = options._diff;\noptions._diff = vnode => {\n\tif (vnode.type && vnode.type._forwarded && vnode.ref) {\n\t\tvnode.props.ref = vnode.ref;\n\t\tvnode.ref = null;\n\t}\n\tif (oldDiffHook) oldDiffHook(vnode);\n};\n\nexport const REACT_FORWARD_SYMBOL =\n\t(typeof Symbol != 'undefined' &&\n\t\tSymbol.for &&\n\t\tSymbol.for('react.forward_ref')) ||\n\t0xf47;\n\n/**\n * Pass ref down to a child. This is mainly used in libraries with HOCs that\n * wrap components. Using `forwardRef` there is an easy way to get a reference\n * of the wrapped component instead of one of the wrapper itself.\n * @param {import('./index').ForwardFn} fn\n * @returns {import('./internal').FunctionComponent}\n */\nexport function forwardRef(fn) {\n\tfunction Forwarded(props) {\n\t\tlet clone = assign({}, props);\n\t\tdelete clone.ref;\n\t\treturn fn(clone, props.ref || null);\n\t}\n\n\t// mobx-react checks for this being present\n\tForwarded.$$typeof = REACT_FORWARD_SYMBOL;\n\t// mobx-react heavily relies on implementation details.\n\t// It expects an object here with a `render` property,\n\t// and prototype.render will fail. Without this\n\t// mobx-react throws.\n\tForwarded.render = Forwarded;\n\n\tForwarded.prototype.isReactComponent = Forwarded._forwarded = true;\n\tForwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';\n\treturn Forwarded;\n}\n","import { Component, createElement, options, Fragment } from 'preact';\nimport { assign } from './util';\n\nconst oldCatchError = options._catchError;\noptions._catchError = function (error, newVNode, oldVNode, errorInfo) {\n\tif (error.then) {\n\t\t/** @type {import('./internal').Component} */\n\t\tlet component;\n\t\tlet vnode = newVNode;\n\n\t\tfor (; (vnode = vnode._parent); ) {\n\t\t\tif ((component = vnode._component) && component._childDidSuspend) {\n\t\t\t\tif (newVNode._dom == null) {\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t}\n\t\t\t\t// Don't call oldCatchError if we found a Suspense\n\t\t\t\treturn component._childDidSuspend(error, newVNode);\n\t\t\t}\n\t\t}\n\t}\n\toldCatchError(error, newVNode, oldVNode, errorInfo);\n};\n\nconst oldUnmount = options.unmount;\noptions.unmount = function (vnode) {\n\t/** @type {import('./internal').Component} */\n\tconst component = vnode._component;\n\tif (component && component._onResolve) {\n\t\tcomponent._onResolve();\n\t}\n\n\t// if the component is still hydrating\n\t// most likely it is because the component is suspended\n\t// we set the vnode.type as `null` so that it is not a typeof function\n\t// so the unmount will remove the vnode._dom\n\tif (component && vnode._hydrating === true) {\n\t\tvnode.type = null;\n\t}\n\n\tif (oldUnmount) oldUnmount(vnode);\n};\n\nfunction detachedClone(vnode, detachedParent, parentDom) {\n\tif (vnode) {\n\t\tif (vnode._component && vnode._component.__hooks) {\n\t\t\tvnode._component.__hooks._list.forEach(effect => {\n\t\t\t\tif (typeof effect._cleanup == 'function') effect._cleanup();\n\t\t\t});\n\n\t\t\tvnode._component.__hooks = null;\n\t\t}\n\n\t\tvnode = assign({}, vnode);\n\t\tif (vnode._component != null) {\n\t\t\tif (vnode._component._parentDom === parentDom) {\n\t\t\t\tvnode._component._parentDom = detachedParent;\n\t\t\t}\n\t\t\tvnode._component = null;\n\t\t}\n\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tdetachedClone(child, detachedParent, parentDom)\n\t\t\t);\n\t}\n\n\treturn vnode;\n}\n\nfunction removeOriginal(vnode, detachedParent, originalParent) {\n\tif (vnode) {\n\t\tvnode._original = null;\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tremoveOriginal(child, detachedParent, originalParent)\n\t\t\t);\n\n\t\tif (vnode._component) {\n\t\t\tif (vnode._component._parentDom === detachedParent) {\n\t\t\t\tif (vnode._dom) {\n\t\t\t\t\toriginalParent.insertBefore(vnode._dom, vnode._nextDom);\n\t\t\t\t}\n\t\t\t\tvnode._component._force = true;\n\t\t\t\tvnode._component._parentDom = originalParent;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn vnode;\n}\n\n// having custom inheritance instead of a class here saves a lot of bytes\nexport function Suspense() {\n\t// we do not call super here to golf some bytes...\n\tthis._pendingSuspensionCount = 0;\n\tthis._suspenders = null;\n\tthis._detachOnNextRender = null;\n}\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspense.prototype = new Component();\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {Promise} promise The thrown promise\n * @param {import('./internal').VNode} suspendingVNode The suspending component\n */\nSuspense.prototype._childDidSuspend = function (promise, suspendingVNode) {\n\tconst suspendingComponent = suspendingVNode._component;\n\n\t/** @type {import('./internal').SuspenseComponent} */\n\tconst c = this;\n\n\tif (c._suspenders == null) {\n\t\tc._suspenders = [];\n\t}\n\tc._suspenders.push(suspendingComponent);\n\n\tconst resolve = suspended(c._vnode);\n\n\tlet resolved = false;\n\tconst onResolved = () => {\n\t\tif (resolved) return;\n\n\t\tresolved = true;\n\t\tsuspendingComponent._onResolve = null;\n\n\t\tif (resolve) {\n\t\t\tresolve(onSuspensionComplete);\n\t\t} else {\n\t\t\tonSuspensionComplete();\n\t\t}\n\t};\n\n\tsuspendingComponent._onResolve = onResolved;\n\n\tconst onSuspensionComplete = () => {\n\t\tif (!--c._pendingSuspensionCount) {\n\t\t\t// If the suspension was during hydration we don't need to restore the\n\t\t\t// suspended children into the _children array\n\t\t\tif (c.state._suspended) {\n\t\t\t\tconst suspendedVNode = c.state._suspended;\n\t\t\t\tc._vnode._children[0] = removeOriginal(\n\t\t\t\t\tsuspendedVNode,\n\t\t\t\t\tsuspendedVNode._component._parentDom,\n\t\t\t\t\tsuspendedVNode._component._originalParentDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tc.setState({ _suspended: (c._detachOnNextRender = null) });\n\n\t\t\tlet suspended;\n\t\t\twhile ((suspended = c._suspenders.pop())) {\n\t\t\t\tsuspended.forceUpdate();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * We do not set `suspended: true` during hydration because we want the actual markup\n\t * to remain on screen and hydrate it when the suspense actually gets resolved.\n\t * While in non-hydration cases the usual fallback -> component flow would occour.\n\t */\n\tconst wasHydrating = suspendingVNode._hydrating === true;\n\tif (!c._pendingSuspensionCount++ && !wasHydrating) {\n\t\tc.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });\n\t}\n\tpromise.then(onResolved, onResolved);\n};\n\nSuspense.prototype.componentWillUnmount = function () {\n\tthis._suspenders = [];\n};\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {import('./internal').SuspenseComponent[\"props\"]} props\n * @param {import('./internal').SuspenseState} state\n */\nSuspense.prototype.render = function (props, state) {\n\tif (this._detachOnNextRender) {\n\t\t// When the Suspense's _vnode was created by a call to createVNode\n\t\t// (i.e. due to a setState further up in the tree)\n\t\t// it's _children prop is null, in this case we \"forget\" about the parked vnodes to detach\n\t\tif (this._vnode._children) {\n\t\t\tconst detachedParent = document.createElement('div');\n\t\t\tconst detachedComponent = this._vnode._children[0]._component;\n\t\t\tthis._vnode._children[0] = detachedClone(\n\t\t\t\tthis._detachOnNextRender,\n\t\t\t\tdetachedParent,\n\t\t\t\t(detachedComponent._originalParentDom = detachedComponent._parentDom)\n\t\t\t);\n\t\t}\n\n\t\tthis._detachOnNextRender = null;\n\t}\n\n\t// Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:\n\t/** @type {import('./internal').VNode} */\n\tconst fallback =\n\t\tstate._suspended && createElement(Fragment, null, props.fallback);\n\tif (fallback) fallback._hydrating = null;\n\n\treturn [\n\t\tcreateElement(Fragment, null, state._suspended ? null : props.children),\n\t\tfallback\n\t];\n};\n\n/**\n * Checks and calls the parent component's _suspended method, passing in the\n * suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified\n * that one of its children/descendants suspended.\n *\n * The parent MAY return a callback. The callback will get called when the\n * suspension resolves, notifying the parent of the fact.\n * Moreover, the callback gets function `unsuspend` as a parameter. The resolved\n * child descendant will not actually get unsuspended until `unsuspend` gets called.\n * This is a way for the parent to delay unsuspending.\n *\n * If the parent does not return a callback then the resolved vnode\n * gets unsuspended immediately when it resolves.\n *\n * @param {import('./internal').VNode} vnode\n * @returns {((unsuspend: () => void) => void)?}\n */\nexport function suspended(vnode) {\n\t/** @type {import('./internal').Component} */\n\tlet component = vnode._parent._component;\n\treturn component && component._suspended && component._suspended(vnode);\n}\n\nexport function lazy(loader) {\n\tlet prom;\n\tlet component;\n\tlet error;\n\n\tfunction Lazy(props) {\n\t\tif (!prom) {\n\t\t\tprom = loader();\n\t\t\tprom.then(\n\t\t\t\texports => {\n\t\t\t\t\tcomponent = exports.default || exports;\n\t\t\t\t},\n\t\t\t\te => {\n\t\t\t\t\terror = e;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (!component) {\n\t\t\tthrow prom;\n\t\t}\n\n\t\treturn createElement(component, props);\n\t}\n\n\tLazy.displayName = 'Lazy';\n\tLazy._forwarded = true;\n\treturn Lazy;\n}\n","import { Component, toChildArray } from 'preact';\nimport { suspended } from './suspense.js';\n\n// Indexes to linked list nodes (nodes are stored as arrays to save bytes).\nconst SUSPENDED_COUNT = 0;\nconst RESOLVED_COUNT = 1;\nconst NEXT_NODE = 2;\n\n// Having custom inheritance instead of a class here saves a lot of bytes.\nexport function SuspenseList() {\n\tthis._next = null;\n\tthis._map = null;\n}\n\n// Mark one of child's earlier suspensions as resolved.\n// Some pending callbacks may become callable due to this\n// (e.g. the last suspended descendant gets resolved when\n// revealOrder === 'together'). Process those callbacks as well.\nconst resolve = (list, child, node) => {\n\tif (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {\n\t\t// The number a child (or any of its descendants) has been suspended\n\t\t// matches the number of times it's been resolved. Therefore we\n\t\t// mark the child as completely resolved by deleting it from ._map.\n\t\t// This is used to figure out when *all* children have been completely\n\t\t// resolved when revealOrder is 'together'.\n\t\tlist._map.delete(child);\n\t}\n\n\t// If revealOrder is falsy then we can do an early exit, as the\n\t// callbacks won't get queued in the node anyway.\n\t// If revealOrder is 'together' then also do an early exit\n\t// if all suspended descendants have not yet been resolved.\n\tif (\n\t\t!list.props.revealOrder ||\n\t\t(list.props.revealOrder[0] === 't' && list._map.size)\n\t) {\n\t\treturn;\n\t}\n\n\t// Walk the currently suspended children in order, calling their\n\t// stored callbacks on the way. Stop if we encounter a child that\n\t// has not been completely resolved yet.\n\tnode = list._next;\n\twhile (node) {\n\t\twhile (node.length > 3) {\n\t\t\tnode.pop()();\n\t\t}\n\t\tif (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {\n\t\t\tbreak;\n\t\t}\n\t\tlist._next = node = node[NEXT_NODE];\n\t}\n};\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspenseList.prototype = new Component();\n\nSuspenseList.prototype._suspended = function (child) {\n\tconst list = this;\n\tconst delegated = suspended(list._vnode);\n\n\tlet node = list._map.get(child);\n\tnode[SUSPENDED_COUNT]++;\n\n\treturn unsuspend => {\n\t\tconst wrappedUnsuspend = () => {\n\t\t\tif (!list.props.revealOrder) {\n\t\t\t\t// Special case the undefined (falsy) revealOrder, as there\n\t\t\t\t// is no need to coordinate a specific order or unsuspends.\n\t\t\t\tunsuspend();\n\t\t\t} else {\n\t\t\t\tnode.push(unsuspend);\n\t\t\t\tresolve(list, child, node);\n\t\t\t}\n\t\t};\n\t\tif (delegated) {\n\t\t\tdelegated(wrappedUnsuspend);\n\t\t} else {\n\t\t\twrappedUnsuspend();\n\t\t}\n\t};\n};\n\nSuspenseList.prototype.render = function (props) {\n\tthis._next = null;\n\tthis._map = new Map();\n\n\tconst children = toChildArray(props.children);\n\tif (props.revealOrder && props.revealOrder[0] === 'b') {\n\t\t// If order === 'backwards' (or, well, anything starting with a 'b')\n\t\t// then flip the child list around so that the last child will be\n\t\t// the first in the linked list.\n\t\tchildren.reverse();\n\t}\n\t// Build the linked list. Iterate through the children in reverse order\n\t// so that `_next` points to the first linked list node to be resolved.\n\tfor (let i = children.length; i--; ) {\n\t\t// Create a new linked list node as an array of form:\n\t\t// \t[suspended_count, resolved_count, next_node]\n\t\t// where suspended_count and resolved_count are numeric counters for\n\t\t// keeping track how many times a node has been suspended and resolved.\n\t\t//\n\t\t// Note that suspended_count starts from 1 instead of 0, so we can block\n\t\t// processing callbacks until componentDidMount has been called. In a sense\n\t\t// node is suspended at least until componentDidMount gets called!\n\t\t//\n\t\t// Pending callbacks are added to the end of the node:\n\t\t// \t[suspended_count, resolved_count, next_node, callback_0, callback_1, ...]\n\t\tthis._map.set(children[i], (this._next = [1, 0, this._next]));\n\t}\n\treturn props.children;\n};\n\nSuspenseList.prototype.componentDidUpdate =\n\tSuspenseList.prototype.componentDidMount = function () {\n\t\t// Iterate through all children after mounting for two reasons:\n\t\t// 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases\n\t\t// each node[RELEASED_COUNT] by 1, therefore balancing the counters.\n\t\t// The nodes can now be completely consumed from the linked list.\n\t\t// 2. Handle nodes that might have gotten resolved between render and\n\t\t// componentDidMount.\n\t\tthis._map.forEach((node, child) => {\n\t\t\tresolve(this, child, node);\n\t\t});\n\t};\n","import { EMPTY_OBJ } from './constants';\nimport { commitRoot, diff } from './diff/index';\nimport { createElement, Fragment } from './create-element';\nimport options from './options';\nimport { slice } from './util';\n\n/**\n * Render a Preact virtual node into a DOM element\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * render into\n * @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an\n * existing DOM tree rooted at `replaceNode`\n */\nexport function render(vnode, parentDom, replaceNode) {\n\tif (options._root) options._root(vnode, parentDom);\n\n\t// We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in\n\t// hydration mode or not by passing the `hydrate` function instead of a DOM\n\t// element..\n\tlet isHydrating = typeof replaceNode === 'function';\n\n\t// To be able to support calling `render()` multiple times on the same\n\t// DOM node, we need to obtain a reference to the previous tree. We do\n\t// this by assigning a new `_children` property to DOM nodes which points\n\t// to the last rendered tree. By default this property is not present, which\n\t// means that we are mounting a new tree for the first time.\n\tlet oldVNode = isHydrating\n\t\t? null\n\t\t: (replaceNode && replaceNode._children) || parentDom._children;\n\n\tvnode = ((!isHydrating && replaceNode) || parentDom)._children =\n\t\tcreateElement(Fragment, null, [vnode]);\n\n\t// List of effects that need to be called after diffing.\n\tlet commitQueue = [],\n\t\trefQueue = [];\n\tdiff(\n\t\tparentDom,\n\t\t// Determine the new vnode tree and store it on the DOM element on\n\t\t// our custom `_children` property.\n\t\tvnode,\n\t\toldVNode || EMPTY_OBJ,\n\t\tEMPTY_OBJ,\n\t\tparentDom.ownerSVGElement !== undefined,\n\t\t!isHydrating && replaceNode\n\t\t\t? [replaceNode]\n\t\t\t: oldVNode\n\t\t\t? null\n\t\t\t: parentDom.firstChild\n\t\t\t? slice.call(parentDom.childNodes)\n\t\t\t: null,\n\t\tcommitQueue,\n\t\t!isHydrating && replaceNode\n\t\t\t? replaceNode\n\t\t\t: oldVNode\n\t\t\t? oldVNode._dom\n\t\t\t: parentDom.firstChild,\n\t\tisHydrating,\n\t\trefQueue\n\t);\n\n\t// Flush all queued effects\n\tcommitRoot(commitQueue, vnode, refQueue);\n}\n\n/**\n * Update an existing DOM element with data from a Preact virtual node\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * update\n */\nexport function hydrate(vnode, parentDom) {\n\trender(vnode, parentDom, hydrate);\n}\n","import {\n\tCryptoCurrency,\n\tSharedCryptoCurrencyConfig\n} from 'src/components/widget/types/Crypto';\n\nexport function getStepForCurrencyAmountInput(currency?: CryptoCurrency) {\n\tif (!currency) return;\n\n\tconst {decimalOffset} = SharedCryptoCurrencyConfig[currency];\n\tconst zeros = '0'.repeat(decimalOffset - 1);\n\n\treturn `0.${zeros}1`;\n}\n","import cxs from 'cxs';\nimport {filter as fuzzyFilter} from 'fuzzy';\nimport {useRef, useState} from 'preact/hooks';\nimport {Fragment} from 'preact/jsx-runtime';\nimport {linkCss} from 'src/components/widget/components/FundraiserLink/styles';\nimport {\n\tcryptoSelectorDropDownItemCss,\n\tcryptoSelectorInputContainerCss,\n\tinputContainerWithDropDownCss,\n\tcryptoSelectorContainerCss,\n\tcryptoSelectorInputSufixCss,\n\tcryptoSelectorDropDownContainerCss,\n\tcryptoSelectorDropDownContentCss,\n\tquickSelectOptionsListCss\n} from 'src/components/widget/components/PaymentProcess/CryptoFlow/styles';\nimport {\n\tdonationAmountInputContainerErrorCss,\n\tdonationAmountInputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {TextInput} from 'src/components/widget/components/TextInput';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {ArrowIcon} from 'src/components/widget/icons/ArrowIcon';\nimport {CryptoCurrencyIcon} from 'src/components/widget/icons/CryptoCurrencyIcon';\nimport {SearchIcon} from 'src/components/widget/icons/SearchIcon';\nimport {\n\tCryptoCurrency,\n\tSharedCryptoCurrencyConfig,\n\tCryptoCurrencyOption,\n\tDISABLED_TOKENS\n} from 'src/components/widget/types/Crypto';\nimport {CRYPTO_EMAIL} from 'src/constants/url';\nimport joinClassNames from 'src/helpers/joinClassNames';\nimport {mailToLink} from 'src/helpers/mailToLink';\n\nexport function displayLabelForCryptoCurrency(cc: CryptoCurrency) {\n\tconst config = SharedCryptoCurrencyConfig[cc];\n\treturn `${config.displayName} (${config.abbreviation})`;\n}\n\nexport function displayContractTypeForCryptoCurrency(cc: CryptoCurrency) {\n\tconst config = SharedCryptoCurrencyConfig[cc];\n\treturn `${config.contractType ? `${config.contractType}` : ''}`;\n}\n\nfunction cryptoCurrencyToOption(cc: CryptoCurrency): CryptoCurrencyOption {\n\treturn {\n\t\tvalue: cc,\n\t\tlabel: displayLabelForCryptoCurrency(cc),\n\t\tcontractType: displayContractTypeForCryptoCurrency(cc)\n\t};\n}\n\nconst quickSelectTokens = [\n\tCryptoCurrency.BTC,\n\tCryptoCurrency.ETH,\n\tCryptoCurrency.USDC\n];\n\nconst quickSelectOptions = quickSelectTokens.map((value) =>\n\tcryptoCurrencyToOption(value)\n);\n\nconst otherOptions = Object.values(CryptoCurrency)\n\t.filter((cc) => !quickSelectTokens.includes(cc))\n\t.filter((cc) => !DISABLED_TOKENS.includes(cc))\n\t.map((value) => cryptoCurrencyToOption(value));\n\nconst cryptoCurrencyOptions = Object.values(CryptoCurrency).map((value) =>\n\tcryptoCurrencyToOption(value)\n);\n\nexport const MAX_CRYPTO_DECIMALS_FOR_DISPLAY = 7;\n\nconst CryptoSelectorDropDownItem = ({\n\tonClick,\n\toption\n}: {\n\tonClick: (option: CryptoCurrencyOption) => void;\n\toption: CryptoCurrencyOption;\n}) => (\n\t
  • \n\t\t {\n\t\t\t\tonClick(option);\n\t\t\t}}\n\t\t>\n\t\t\t\n\t\t\t{option.label}\n\t\t\t{option.contractType}\n\t\t\n\t
  • \n);\n\nconst CryptoSupprotLink = () => {\n\tconst nonprofit = useNonprofitOrError();\n\n\tconst {primaryColor} = useConfigContext();\n\tconst cryptoSupportBody = `Contents: I would like to make a crypto donation to support https://www.every.org/${nonprofit.primarySlug}.\\n\\nMy name:\\nToken name:\\nToken symbol:\\nToken quantity:\\n\\nPlease reply back with an address where I can donate, as this is worth over $5,000 USD.`;\n\n\treturn (\n\t\t\n\t\t\t{CRYPTO_EMAIL}\n\t\t\n\t);\n};\n\nexport const CryptoSelector = () => {\n\tconst {submitError, cryptoCurrency, setCryptoCurrency} = useWidgetContext();\n\tconst {primaryColor} = useConfigContext();\n\n\tconst inputRef = useRef(null);\n\tconst [selectedOption, setSelectedOption] = useState<\n\t\tCryptoCurrencyOption | undefined\n\t>(cryptoCurrencyOptions.find((option) => option.value === cryptoCurrency));\n\n\tconst [inputValue, setInputValue] = useState(selectedOption?.label);\n\n\tconst [showDropDown, setShowDrowDown] = useState(!selectedOption);\n\n\tconst handleItemClick = (option: CryptoCurrencyOption) => {\n\t\tsetSelectedOption(option);\n\t\tsetCryptoCurrency(option.value);\n\t\tsetInputValue(option.label);\n\t\tsetShowDrowDown(false);\n\t};\n\n\tconst handleInputFocus = () => {\n\t\tsetSelectedOption(undefined);\n\t\tsetCryptoCurrency(undefined);\n\t\tsetShowDrowDown(true);\n\t\tsetInputValue('');\n\t};\n\n\tconst handleInput = (value: string) => {\n\t\tsetInputValue(value);\n\t\tsetSelectedOption(undefined);\n\t\tsetCryptoCurrency(undefined);\n\t\tsetShowDrowDown(true);\n\t};\n\n\tconst handleContainerClick = () => {\n\t\tinputRef.current?.focus();\n\t\thandleInputFocus();\n\t};\n\n\tconst inputContainerClasses = joinClassNames([\n\t\tcryptoSelectorInputContainerCss,\n\t\t...(submitError ? [donationAmountInputContainerErrorCss] : []),\n\t\t...(showDropDown ? [inputContainerWithDropDownCss] : [])\n\t]);\n\n\tconst optionToListItem = (option: CryptoCurrencyOption) => (\n\t\t\n\t);\n\n\tconst filteredOptions = inputValue\n\t\t? fuzzyFilter(inputValue, cryptoCurrencyOptions, {\n\t\t\t\textract: (option) => {\n\t\t\t\t\tconst config = SharedCryptoCurrencyConfig[option.value];\n\t\t\t\t\treturn [config.displayName, config.abbreviation].join(' ');\n\t\t\t\t}\n\t\t }).map((element) => element.original)\n\t\t: undefined;\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tprefixClassName={cxs({display: 'inline-flex'})}\n\t\t\t\tsufixClassName={cryptoSelectorInputSufixCss(primaryColor, showDropDown)}\n\t\t\t\tcontainerClassName={inputContainerClasses}\n\t\t\t\tsufix={\n\t\t\t\t\t\n\t\t\t\t\t\t{selectedOption?.contractType} \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tonInput={(event) => {\n\t\t\t\t\thandleInput(event.currentTarget.value);\n\t\t\t\t}}\n\t\t\t\tonFocus={handleInputFocus}\n\t\t\t/>\n\t\t\t{showDropDown && (\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t{filteredOptions ? (\n\t\t\t\t\t\t\tfilteredOptions.length === 0 ? (\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\tWe don't currently support this coin on our site, but for\n\t\t\t\t\t\t\t\t\tdonations worth over $5,000 USD we can do it manually. Please\n\t\t\t\t\t\t\t\t\temail to arrange.\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{filteredOptions.map((option) => optionToListItem(option))}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{quickSelectOptions.map((option) => optionToListItem(option))}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{otherOptions.map((option) => optionToListItem(option))}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t)}\n\t\t
    \n\t);\n};\n","import {CryptoCurrency} from 'src/components/widget/types/Crypto';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nexport function getSubmitButtonText({\n\tmethod,\n\tpaymentRequestIsApplePay,\n\tcryptoCurrency\n}: {\n\tmethod: PaymentMethod;\n\tpaymentRequestIsApplePay?: boolean;\n\tcryptoCurrency?: CryptoCurrency;\n}) {\n\tconst base = 'Continue with ';\n\tswitch (method) {\n\t\tcase PaymentMethod.CREDIT_CARD:\n\t\t\treturn base + 'credit or debit';\n\t\tcase PaymentMethod.BANK:\n\t\t\treturn base + 'bank';\n\t\tcase PaymentMethod.PAYPAL:\n\t\t\treturn base + 'PayPal';\n\t\tcase PaymentMethod.VENMO:\n\t\t\treturn base + 'Venmo';\n\t\tcase PaymentMethod.PAYMENT_REQUEST:\n\t\t\treturn base + (paymentRequestIsApplePay ? 'Apple Pay' : 'Google Pay');\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn base + 'Chariot';\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn base + (cryptoCurrency ?? 'crypto');\n\t\tcase PaymentMethod.GIFT_CARD:\n\t\t\treturn 'Redeem gift card';\n\t\tdefault:\n\t\t\treturn 'Continue';\n\t}\n}\n","import {render as preactRender} from 'preact';\nimport EmbedButton from 'src/components/embed-button';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {parseDonateUrl} from 'src/helpers/parseDonateUrl';\nimport {loadFonts} from 'src/loadFonts';\nimport {WidgetLoader} from 'src/loaders/Widgetloader';\nimport resetcss from 'src/resetCss';\n\nconst OBSERVER_OPTIONS = {\n\tchildList: true,\n\tsubtree: true,\n\tattributeFilter: ['href']\n};\n\ninterface CreateButtonProps extends Partial {\n\telement: Element;\n\tnonprofitSlug: string;\n\tonClick: () => void;\n\turl?: string;\n}\n\ninterface CreateWidgetProps extends Partial {\n\tnonprofitSlug: string;\n}\n\nlet shadowRoot: ShadowRoot;\nlet widgetContainer: HTMLElement;\n\nclass WidgetController {\n\toptions: CreateWidgetProps;\n\tmountPoint: HTMLElement;\n\tconstructor(options: CreateWidgetProps, mountPoint: HTMLElement) {\n\t\tthis.options = options;\n\t\tthis.mountPoint = mountPoint;\n\t}\n\n\thide() {\n\t\tthis.options.show = false;\n\t\tthis.render();\n\t}\n\n\tshow() {\n\t\tthis.options.show = true;\n\t\tthis.render();\n\t}\n\n\tsetOptions(options: WidgetConfig) {\n\t\tthis.options = options;\n\t\tthis.render();\n\t}\n\n\trender() {\n\t\tpreactRender(\n\t\t\t {\n\t\t\t\t\tthis.hide();\n\t\t\t\t}}\n\t\t\t/>,\n\t\t\tthis.mountPoint\n\t\t);\n\t}\n}\n\nfunction mountShadowRoot() {\n\tconst shadowWidgetWrapper = document.createElement('div');\n\tshadowWidgetWrapper.id = 'shadow-wrapper';\n\tshadowWidgetWrapper.style.position = 'absolute';\n\tshadowWidgetWrapper.style.zIndex = '20000000';\n\tdocument.body.append(shadowWidgetWrapper);\n\tshadowRoot = shadowWidgetWrapper.attachShadow({mode: 'open'});\n}\n\nfunction mountWidgetContainer() {\n\tif (!shadowRoot) {\n\t\tmountShadowRoot();\n\t}\n\n\twidgetContainer = document.createElement('div');\n\twidgetContainer.id = 'widget-container';\n\tshadowRoot.append(widgetContainer);\n\n\tconst everyStyles: HTMLStyleElement | null =\n\t\tdocument.querySelector('#every-styles');\n\n\tif (everyStyles) {\n\t\tconst rules = Object.values(everyStyles.sheet?.cssRules ?? {})\n\t\t\t.map((rule) => rule.cssText)\n\t\t\t.join('\\n');\n\n\t\tconst everyShadowStyles = document.createElement('style');\n\t\teveryShadowStyles.id = 'every-shadow-styles';\n\t\teveryShadowStyles.innerHTML = resetcss + rules;\n\n\t\twidgetContainer.append(everyShadowStyles);\n\t}\n}\n\nfunction createWidget(options: CreateWidgetProps) {\n\tif (!widgetContainer) {\n\t\tmountWidgetContainer();\n\t}\n\n\tconst widgetMountPoint = document.createElement('div');\n\twidgetContainer.append(widgetMountPoint);\n\n\treturn new WidgetController(options, widgetMountPoint);\n}\n\nfunction createButton({element, ...options}: CreateButtonProps) {\n\tif (!element.parentNode) {\n\t\treturn;\n\t}\n\n\tconst buttonContainer = element.parentNode as HTMLElement;\n\n\tpreactRender(, buttonContainer, element);\n}\n\nfunction findAndReplaceLinks() {\n\tconst links = document.querySelectorAll(\"*[href^='https://www.every.org/']\");\n\n\tlinks.forEach((link) => {\n\t\tconst urlString = link.getAttribute('href');\n\t\tif (urlString?.includes('#/donate')) {\n\t\t\tconst options = parseDonateUrl(urlString);\n\n\t\t\tif (!options) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst widget = createWidget(options);\n\n\t\t\tif (link.getAttribute('data-every-style') === null) {\n\t\t\t\tlink.addEventListener('click', (event) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\twidget.show();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tcreateButton({\n\t\t\t\t\telement: link,\n\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\twidget.show();\n\t\t\t\t\t},\n\t\t\t\t\t...options,\n\t\t\t\t\turl: urlString\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n}\n\nexport default function autoPlayMode() {\n\tloadFonts();\n\tfindAndReplaceLinks();\n\n\tconst observer = new MutationObserver((mutations, observer) => {\n\t\t// disconnect before changing DOM so as not to cause an infinite loop\n\t\tobserver.disconnect();\n\n\t\tconst isLinksChanged = Boolean(\n\t\t\tmutations.some((mutation) => mutation.target.nodeName === 'A')\n\t\t);\n\n\t\tif (isLinksChanged) {\n\t\t\tfindAndReplaceLinks();\n\t\t}\n\n\t\tobserver.observe(document, OBSERVER_OPTIONS);\n\t});\n\n\tobserver.observe(document, OBSERVER_OPTIONS);\n}\n\ndeclare const window: Window &\n\ttypeof globalThis & {\n\t\tWebKitMutationObserver: MutationObserver;\n\t\tMozMutationObserver: MutationObserver;\n\t};\n\nconst MutationObserver =\n\twindow.MutationObserver ||\n\twindow.WebKitMutationObserver ||\n\twindow.MozMutationObserver;\n","export enum FontFamily {\n\tBasisGrotesque = `'Basis Grotesque Pro', -apple-system, BlinkMacSystemFont,\n 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Roboto,\n sans-serif`\n}\n","import cxs from 'cxs';\nimport {FontFamily} from 'src/components/widget/theme/font-family';\n\ncxs.prefix('every-embedded-');\n\nexport const buttonCss = cxs({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\twidth: 'max-content',\n\tborder: 'none',\n\toutline: 'none',\n\tfontFamily: FontFamily.BasisGrotesque,\n\tfontWeight: 500,\n\tlineHeight: 1,\n\tcursor: 'pointer',\n\ttextDecoration: 'none',\n\tbackfaceVisibility: 'hidden',\n\ttransition: 'background-color 0.25s',\n\n\tpadding: '12px 20px',\n\tcolor: '#fff',\n\tbackgroundColor: '#00a380',\n\tborderRadius: '100px',\n\tfontSize: '16px',\n\t'&:hover': {backgroundColor: '#2F806D'}\n});\n\nexport const logoCss = cxs({\n\twidth: '16px',\n\theight: '16px',\n\tfill: '#fff',\n\tmarginRight: '8px'\n});\n\nexport const verticalCenterTextCss = cxs({\n\ttransform: 'translateY(0.08em)'\n});\n","export const BASE_URL = 'https://www.every.org/';\nexport const BASE_API_URL = 'https://partners.every.org/v0.2/nonprofit';\nexport const BASE_CLOUDINARY_URL =\n\t'https://res.cloudinary.com/everydotorg/image/upload/';\n\nexport const SUPPORT_EMAIL = 'support@every.org';\nexport const TEAM_EMAIL = 'team@every.org';\nexport const CRYPTO_EMAIL = 'crypto@every.org';\n\nexport const TERMS_ROUTE = 'terms';\nexport const HELP_ROUTE = 'support';\nexport const PRIVACY_ROUTE = 'privacy';\nexport const ABOUT_ROUTE = 'about-us';\nexport const FUNDRAISER_ROUTE = 'fundraiser';\nexport const GIFT_CARD_ROUTE = 'gift';\n\nexport const TERMS_URL = BASE_URL + TERMS_ROUTE;\nexport const HELP_URL = BASE_URL + HELP_ROUTE;\nexport const PRIVACY_URL = BASE_URL + PRIVACY_ROUTE;\nexport const ABOUT_URL = BASE_URL + ABOUT_ROUTE;\nexport const GIFT_CARD_URL = BASE_URL + GIFT_CARD_ROUTE;\n","import {\n\tbuttonCss,\n\tlogoCss,\n\tverticalCenterTextCss\n} from 'src/components/embed-button/styles';\nimport {EmbedButtonOptions} from 'src/components/embed-button/types';\nimport {constructBasicDonateUrl} from 'src/helpers/constructDonateUrl';\n\n/**\n * Used to identify if a link is a donate button\n */\nconst EmbedButton = ({\n\twithLogo = true,\n\ttextColor = '#fff',\n\tbgColor = '#00a380',\n\tborderRadius = '100px',\n\tfontSize = '16px',\n\tpadding = '12px 20px',\n\tclassName,\n\tonClick,\n\ttarget = '_blank',\n\turl: initialUrl,\n\t...donateOptions\n}: EmbedButtonOptions) => {\n\tconst url = initialUrl ? initialUrl : constructBasicDonateUrl(donateOptions);\n\treturn (\n\t\t {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tonClick();\n\t\t\t\t\t }\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t>\n\t\t\t{withLogo && (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t)}\n\t\t\tDonate\n\t\t\n\t);\n};\n\nexport default EmbedButton;\n","export enum DonationFrequency {\n\tMonthly = 'monthly',\n\tOneTime = 'once',\n\tUnselected = ''\n}\n","export enum PaymentMethod {\n\tCREDIT_CARD = 'card',\n\tBANK = 'bank',\n\tPAYPAL = 'paypal',\n\tVENMO = 'venmo',\n\tPAYMENT_REQUEST = 'pay',\n\tCRYPTO = 'crypto',\n\tSTOCKS = 'stocks',\n\tDAF = 'daf',\n\tGIFT_CARD = 'gift'\n}\n\nexport const OneTimeFrequencyMethods = [\n\tPaymentMethod.VENMO,\n\tPaymentMethod.DAF,\n\tPaymentMethod.CRYPTO,\n\tPaymentMethod.STOCKS\n];\n\nexport const AvailablePaymentMethods = Object.values(PaymentMethod);\nexport const DefaultPaymentMethods = AvailablePaymentMethods.filter(\n\t(pm) => pm !== PaymentMethod.GIFT_CARD\n);\nexport interface PaymentRequestAvailable {\n\tgooglePay: boolean;\n\tapplePay: boolean;\n}\n","export const loadFonts = () => {\n\tconst fonts = document.createElement('style');\n\tfonts.innerHTML = `\n @font-face {\n font-family: \"Basis Grotesque Pro\";\n src: local(\"Basis Grotesque Pro\"), local(\"Basis Grotesque Pro\"),\n url(https://assets.every.org/every-month/BasisGrotesque-Regular-Pro.woff2) format(\"woff2\");\n font-weight: 400;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: \"Basis Grotesque Pro\";\n src: local(\"Basis Grotesque Pro\"), local(\"Basis Grotesque Pro\"),\n url(https://assets.every.org/every-month/BasisGrotesque-Bold-Pro.woff2) format(\"woff2\");\n font-weight: bold;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: \"Basis Grotesque Pro\";\n src: local(\"Basis Grotesque Pro\"), local(\"Basis Grotesque Pro\"),\n url(https://assets.every.org/every-month/BasisGrotesque-Medium-Pro.woff2) format(\"woff2\");\n font-weight: 500;\n font-style: normal;\n font-display: swap;\n }\n `;\n\tdocument.head.append(fonts);\n};\n","import deepMerge, {Options as DeepMergeOptions} from 'deepmerge';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tAvailablePaymentMethods,\n\tDefaultPaymentMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nconst defaults: Partial = {\n\tmethods: Object.values(DefaultPaymentMethods),\n\tshow: false,\n\taddAmounts: [10, 50, 100],\n\tdefaultFrequency: DonationFrequency.OneTime,\n\tminDonationAmount: 5,\n\tprimaryColor: '#018669',\n\tshowGiftCardOption: false\n};\n\nconst DEEP_MERGE_OPTIONS: DeepMergeOptions = {\n\t// Don't merge arrays, just overwrite them\n\n\tarrayMerge: (_, sourceArray) => sourceArray\n};\n\nexport const mergeConfig = (options: Partial): WidgetConfig => {\n\tconst filteredInputMethods = options.methods?.filter((method) =>\n\t\tAvailablePaymentMethods.includes(method)\n\t);\n\n\tconst additionalMethods = options.showGiftCardOption\n\t\t? [PaymentMethod.GIFT_CARD]\n\t\t: [];\n\n\tconst methods = (\n\t\tfilteredInputMethods && filteredInputMethods.length > 0\n\t\t\t? filteredInputMethods\n\t\t\t: DefaultPaymentMethods\n\t).concat(additionalMethods);\n\n\treturn deepMerge.all(\n\t\t[defaults, options, {methods}],\n\t\tDEEP_MERGE_OPTIONS\n\t);\n};\n","import {createContext, FunctionalComponent} from 'preact';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {mergeConfig} from 'src/helpers/optionsTypes';\n\nexport const ConfigContext = createContext({} as WidgetConfig);\n\nexport const ConfigContextProvider: FunctionalComponent<{\n\toptions: Partial;\n}> = ({options, children}) => {\n\tconst mergedConfig = mergeConfig(options);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {useContext} from 'preact/hooks';\nimport {ConfigContext} from 'src/components/widget/context/ConfigContext';\n\nexport const useConfigContext = () => useContext(ConfigContext);\n","// TODO: add more accurate type\nexport interface Fundraiser {\n\tid: string;\n\tslug: string;\n\ttitle: string;\n\tcoverImageCloudinaryId: string | null;\n\tactive: boolean;\n\tchildrenFundraiserIds: string | null;\n\tcreatedAt: string | null;\n\tcreatorNonprofitId: string | null;\n\tcreatorUserId: string | null;\n\tdescription: string | null;\n\tendDate: string | null;\n\tentityName: string | null;\n\teventIds: string | null;\n\tgoalAmount: string | null;\n\tgoalCurrency: string | null;\n\tmetadata: string | null;\n\tnonprofitId: string;\n\tparentFundraiserId: string | null;\n\tpinnedAt: string | null;\n\tstartDate: string | null;\n}\n\nexport const FundraiserFetchError = Symbol('FundraiserFetchError');\nexport const FundraiserFetching = Symbol('FundraiserFetching');\n","import {createContext, FunctionalComponent} from 'preact';\nimport {useCallback, useEffect, useState} from 'preact/hooks';\nimport {getFundraiser} from 'src/components/widget/api';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {\n\tFundraiser,\n\tFundraiserFetchError,\n\tFundraiserFetching\n} from 'src/components/widget/types/Fundraiser';\ninterface FundraiserContextData {\n\tfundraiser?:\n\t\t| Fundraiser\n\t\t| typeof FundraiserFetchError\n\t\t| typeof FundraiserFetching;\n}\n\nexport const FundraiserContext = createContext({\n\tfundraiser: FundraiserFetching\n});\n\nexport const FundraiserContextProvider: FunctionalComponent = ({children}) => {\n\tconst {fundraiserSlug, nonprofitSlug} = useConfigContext();\n\tconst [fundraiser, setFundraiser] =\n\t\tuseState(FundraiserFetching);\n\n\tconst fetchFundraiser = useCallback(async () => {\n\t\tif (!fundraiserSlug) {\n\t\t\tsetFundraiser(undefined);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst response = await getFundraiser(nonprofitSlug, fundraiserSlug);\n\t\t\tsetFundraiser(response);\n\t\t} catch {\n\t\t\tsetFundraiser(FundraiserFetchError);\n\t\t}\n\t}, [nonprofitSlug, fundraiserSlug]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line @typescript-eslint/no-floating-promises\n\t\tfetchFundraiser();\n\t}, [fetchFundraiser]);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {Fundraiser} from 'src/components/widget/types/Fundraiser';\nimport {Nonprofit} from 'src/components/widget/types/Nonprofit';\nimport {BASE_API_URL} from 'src/constants/url';\n\ntype NonprofitResponse = {\n\tmessage: string;\n\tdata: {\n\t\tnonprofit: Nonprofit;\n\t};\n};\n\ntype FundraiserResponse = {\n\tdata: {\n\t\tfundraiser: Fundraiser;\n\t\tnonprofits: Nonprofit[];\n\t};\n};\n\nexport async function getNonprofit(nonprofitSlug: string) {\n\tconst data: NonprofitResponse = await fetch(\n\t\t`${BASE_API_URL}/${nonprofitSlug}`\n\t).then(async (response) => response.json());\n\n\treturn data.data.nonprofit;\n}\n\nexport async function getFundraiser(\n\tnonprofitSlug: string,\n\tfundraiserSlug: string\n) {\n\tconst url = `${BASE_API_URL}/${nonprofitSlug}/fundraiser/${fundraiserSlug}`;\n\tconst data: FundraiserResponse = await fetch(url).then(async (response) =>\n\t\tresponse.json()\n\t);\n\n\treturn data.data.fundraiser;\n}\n","// TODO: add more accurate type\nexport interface Nonprofit {\n\tid: string;\n\tein: string;\n\tname: string;\n\tprimarySlug: string;\n\tprofileUrl: string;\n\tdirectDisbursement?: boolean;\n\thasAdmin?: boolean;\n\tdescription: string | null;\n\tcoverImageCloudinaryId: string | null;\n\tcoverImageUrl: string | null;\n\tdescriptionLong: string | null;\n\tisDisbursable: boolean;\n\tlocationAddress: string | null;\n\tlogoCloudinaryId: string | null;\n\tlogoUrl: string | null;\n\tnteeCode: string | null;\n}\n\nexport const NonprofitFetchError = Symbol('NonprofitFetchError');\nexport const NonprofitFetching = Symbol('NonprofitFetching');\n","import {createContext, FunctionalComponent} from 'preact';\nimport {useCallback, useEffect, useState} from 'preact/hooks';\nimport {getNonprofit} from 'src/components/widget/api';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {\n\tNonprofit,\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\n\ninterface NonprofitContextData {\n\tnonprofit: Nonprofit | typeof NonprofitFetchError | typeof NonprofitFetching;\n}\n\nexport const NonprofitContext = createContext({\n\tnonprofit: NonprofitFetching\n});\n\nexport const NonprofitContextProvider: FunctionalComponent = ({children}) => {\n\tconst {nonprofitSlug} = useConfigContext();\n\tconst [nonprofit, setNonprofit] =\n\t\tuseState(NonprofitFetching);\n\n\tconst fetchNonprofit = useCallback(async () => {\n\t\ttry {\n\t\t\tconst response = await getNonprofit(nonprofitSlug);\n\t\t\tsetNonprofit(response);\n\t\t} catch {\n\t\t\tsetNonprofit(NonprofitFetchError);\n\t\t}\n\t}, [nonprofitSlug]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line @typescript-eslint/no-floating-promises\n\t\tfetchNonprofit();\n\t}, [fetchNonprofit]);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {createContext, FunctionalComponent} from 'preact';\nimport {StateUpdater, useEffect, useState} from 'preact/hooks';\nimport {useCheckPaymentRequest} from 'src/components/widget/hooks/useCheckPaymentRequest';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {CryptoCurrency} from 'src/components/widget/types/Crypto';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tPaymentMethod,\n\tPaymentRequestAvailable\n} from 'src/components/widget/types/PaymentMethod';\n\ninterface WidgetContextProps {\n\tfrequency: DonationFrequency;\n\tsetFrequency: StateUpdater;\n\n\tdonationAmount?: number;\n\tsetDonationAmount: StateUpdater;\n\n\tsubmitError: string | null;\n\tsetSubmitError: StateUpdater;\n\n\tselectedPaymentMethod: PaymentMethod;\n\tsetSelectedPaymentMethod: StateUpdater;\n\n\tstockAmount?: number;\n\tsetStockAmount: StateUpdater;\n\n\tstockSymbol?: string;\n\tsetStockSymbol: StateUpdater;\n\n\tcryptoAmount?: number;\n\tsetCryptoAmount: StateUpdater;\n\n\tcryptoCurrency?: CryptoCurrency;\n\tsetCryptoCurrency: StateUpdater;\n\n\tpaymentRequestAvailable: PaymentRequestAvailable;\n\thideWidget: () => void;\n\n\tprivateNote?: string;\n\tsetPrivateNote: StateUpdater;\n}\n\nexport const WidgetContext = createContext(\n\t{} as WidgetContextProps\n);\n\nexport const WidgetContextProvider: FunctionalComponent<{hide: () => void}> = ({\n\tchildren,\n\thide\n}) => {\n\tconst config = useConfigContext();\n\n\tconst [frequency, setFrequency] = useState(config.defaultFrequency);\n\tconst [donationAmount, setDonationAmount] = useState(\n\t\tconfig.defaultDonationAmount\n\t);\n\tconst [submitError, setSubmitError] = useState(null);\n\tconst [selectedPaymentMethod, setSelectedPaymentMethod] = useState(\n\t\tconfig.methods[0]\n\t);\n\n\tconst [stockAmount, setStockAmount] = useState();\n\tconst [stockSymbol, setStockSymbol] = useState();\n\n\tconst [cryptoAmount, setCryptoAmount] = useState();\n\tconst [cryptoCurrency, setCryptoCurrency] = useState();\n\n\tconst paymentRequestAvailable = useCheckPaymentRequest();\n\n\tconst [privateNote, setPrivateNote] = useState();\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {FunctionComponent} from 'preact';\nimport {ConfigContextProvider} from 'src/components/widget/context/ConfigContext';\nimport {FundraiserContextProvider} from 'src/components/widget/context/FundraiserContext';\nimport {NonprofitContextProvider} from 'src/components/widget/context/NonprofitContext';\nimport {WidgetContextProvider} from 'src/components/widget/context/WidgetContext';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nexport const ContextProvider: FunctionComponent<{\n\toptions: Partial;\n\thide: () => void;\n}> = ({options, hide, children}) => (\n\t\n\t\t\n\t\t\t\n\t\t\t\t{children}\n\t\t\t\n\t\t\n\t\n);\n","export enum BREAKPOINTS {\n\tPhoneOnly = '@media only screen and (max-width: 37.44em)',\n\tTabletUp = '@media only screen and (min-width: 37.5em)',\n\tTabletLandscapeUp = '@media only screen and (min-width: 56.25em)',\n\tDesktopUp = '@media only screen and (min-width: 75em)',\n\tBigDesktopUp = '@media only screen and (min-width: 112.5em)'\n}\n","export enum COLORS {\n\tLightGray = '#EAEDED',\n\tGray = '#f3f6f6',\n\tDarkGray = '#868A8A',\n\tBlack = '#272727',\n\tText = '#2E3434',\n\tTextGray = '#868383',\n\tTextOpaque = 'rgba(46, 52, 52, 0.6)',\n\tError = '#D95C35',\n\tErrorShadow = 'rgba(217, 92, 53, 0.2)',\n\tTransparent = 'transparent',\n\tWhite = '#fff'\n}\n","import cxs from 'cxs';\n\nexport const smallText: cxs.CSSObject = {\n\tfontSize: '12px',\n\tlineHeight: '16px',\n\tletterSpacing: '0.01em'\n};\n\nexport const bodyText: cxs.CSSObject = {\n\tfontSize: '16px',\n\tlineHeight: '24px',\n\tletterSpacing: '-0.01em'\n};\n\nexport const inputText: cxs.CSSObject = {\n\tfontSize: '16px',\n\tlineHeight: '16px'\n};\n\nexport const headingText: cxs.CSSObject = {\n\tfontSize: '24px',\n\tlineHeight: '28px',\n\tletterSpacing: '-0.015em'\n};\n\nexport const heading2Text: cxs.CSSObject = {\n\tfontSize: '24px',\n\tlineHeight: '28px',\n\tletterSpacing: '-0.015em'\n};\n\nexport const heading3Text: cxs.CSSObject = {\n\tfontSize: '20px',\n\tlineHeight: '24px',\n\tletterSpacing: '-0.015em'\n};\n\nexport const buttonText: cxs.CSSObject = {\n\tfontSize: '16px',\n\tlineHeight: '24px',\n\tletterSpacing: '-0.01em'\n};\n\nexport const textSize = {\n\txxl: {\n\t\tfontSize: '48px',\n\t\tlineHeight: '56px'\n\t},\n\txl: {\n\t\tfontSize: '32px',\n\t\tlineHeight: '36px'\n\t},\n\tl: {\n\t\tfontSize: '24px',\n\t\tlineHeight: '32px'\n\t},\n\tm: {\n\t\tfontSize: '20px',\n\t\tlineHeight: '24px'\n\t},\n\ts: {\n\t\tfontSize: '16px',\n\t\tlineHeight: '24px'\n\t},\n\txs: {\n\t\tfontSize: '14px',\n\t\tlineHeight: '20px'\n\t},\n\txxs: {\n\t\tfontSize: '12px',\n\t\tlineHeight: '16px'\n\t}\n};\n","import cxs from 'cxs';\n\nexport enum Spacing {\n\tEmpty = '0',\n\n\tXXS = '4px',\n\tXS = '8px',\n\tS = '12px',\n\tM = '16px',\n\tL = '20px',\n\tXL = '24px',\n\tXXL = '32px',\n\n\tStack_XXS = '0 0 4px 0',\n\tStack_XS = '0 0 8px 0',\n\tStack_S = '0 0 12px 0',\n\tStack_M = '0 0 16px 0',\n\tStack_L = '0 0 20px 0',\n\tStack_XL = '0 0 24px 0',\n\tStack_XXL = '0 0 32px 0',\n\n\tInset_XXS = '4px 4px 4px 4px',\n\tInset_XS = '8px 8px 8px 8px',\n\tInset_S = '12px 12px 12px 12px',\n\tInset_M = '16px 16px 16px 16px',\n\tInset_L = '20px 20px 20px 20px',\n\tInset_XL = '24px 24px 24px 24px',\n\tInset_XXL = '32px 32px 32px 32px',\n\n\tInsetSquish_XS = '8px 16px',\n\tInsetSquish_S = '12px 24px',\n\tInsetSquish_M = '16px 32px',\n\tInsetSquish_L = '20px 40px',\n\tInsetSquish_XL = '24px 48px',\n\n\tInline_XS = '0 8px 0 0',\n\tInline_S = '0 12px 0 0',\n\tInline_M = '0 16px 0 0',\n\tInline_L = '0 20px 0 0',\n\tInline_XL = '0 24px 0 0',\n\tInline_XXL = '0 24px 0 0'\n}\n\nconst verticalStackCssObject = (spacing: number | string): cxs.CSSObject => ({\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\t'> *:not(:last-child)': {\n\t\tmarginBottom: typeof spacing === 'number' ? `${spacing}px` : spacing\n\t}\n});\nconst horizontalStackCssObject = (spacing: number | string): cxs.CSSObject => ({\n\tdisplay: 'flex',\n\tflexDirection: 'row',\n\t'> *:not(:last-child)': {\n\t\tmarginRight: typeof spacing === 'number' ? `${spacing}px` : spacing\n\t}\n});\n\nexport const verticalStackCss = {\n\tclassName: (spacing: number | string) => cxs(verticalStackCssObject(spacing)),\n\tcxs: (spacing: number | string) => verticalStackCssObject(spacing)\n};\n\nexport const horizontalStackCss = {\n\tclassName: (spacing: number | string) =>\n\t\tcxs(horizontalStackCssObject(spacing)),\n\tcxs: (spacing: number | string) => horizontalStackCssObject(spacing)\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {horizontalStackCss, Spacing} from 'src/components/widget/theme/spacing';\n\nexport const faqListCss = cxs({\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\tgap: Spacing.M\n});\n\nexport const rotateCss: cxs.CSSObject = {\n\tposition: 'relative',\n\ttop: '-1px',\n\ttransform: 'rotate(180deg)'\n};\n\nexport const descriptionBaseCss: cxs.CSSObject = {\n\t'> p': {\n\t\tmarginBottom: Spacing.XS\n\t}\n};\nexport const descriptionOpen = cxs({\n\t...descriptionBaseCss,\n\tmaxHeight: '1000px',\n\ttransition: 'all 1s',\n\topacity: '1'\n});\n\nexport const descriptionClose = cxs({\n\t...descriptionBaseCss,\n\topacity: '0',\n\toverflow: 'hidden',\n\tmaxHeight: '0',\n\ttransition: 'all 0.5s'\n});\n\nexport const faqItemConateinerCss = (mobileOnly?: boolean) =>\n\tcxs({\n\t\t...textSize.xs,\n\t\t...(mobileOnly\n\t\t\t? {\n\t\t\t\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\t\t\t\tpadding: 'none'\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: {})\n\t});\n\nexport const faqItemButtonCss = (isOpen: boolean) =>\n\tcxs({\n\t\t...horizontalStackCss.cxs(Spacing.S),\n\t\t...textSize.xs,\n\t\talignItems: 'center',\n\t\tjustifyContent: 'space-between',\n\t\twidth: '100%',\n\t\tborder: 'none',\n\t\tbackground: 'transparent',\n\t\ttextAlign: 'start',\n\t\tpadding: 0,\n\t\t':hover': {cursor: 'pointer'},\n\t\t'> svg': {\n\t\t\twidth: '16px',\n\t\t\theight: '16px',\n\t\t\t...(isOpen ? rotateCss : {})\n\t\t},\n\t\t...(isOpen\n\t\t\t? {\n\t\t\t\t\tfontWeight: 700\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tfontWeight: 500,\n\t\t\t\t\tcolor: COLORS.TextGray\n\t\t\t })\n\t});\n\nexport const faqLinkCss = cxs({\n\tcolor: COLORS.Text,\n\tfontWeight: 500,\n\ttextDecoration: 'none',\n\t':hover': {\n\t\ttextDecoration: 'underline'\n\t}\n});\n","import {Fundraiser} from 'src/components/widget/types/Fundraiser';\nimport {Nonprofit} from 'src/components/widget/types/Nonprofit';\n\nexport function isOfficialFundraiser(fundraiser: Fundraiser): boolean {\n\treturn fundraiser.nonprofitId === fundraiser.creatorNonprofitId;\n}\n\nexport const getTaxDeductibleStatement = (\n\tnonprofit: Nonprofit,\n\tfundraiser?: Fundraiser\n) => {\n\tconst base = `100% of your donation is tax-deductible to the extent allowed by US law. \n Your donation is made to Every.org, a tax-exempt US 501(c)(3) charity that\n grants unrestricted funds to ${nonprofit.name} on your behalf. \n As a legal matter, Every.org must provide any donations to ${nonprofit.name} on an\n unrestricted basis, regardless of any designations or restrictions made by\n you.`;\n\n\tconst isUnofficialFundraiser =\n\t\tfundraiser && !isOfficialFundraiser(fundraiser);\n\n\tlet end = '';\n\n\tif (nonprofit.hasAdmin && isUnofficialFundraiser) {\n\t\tend = `Please note ${nonprofit.name} has not reviewed or approved the content of this peer-to-peer fundraiser.`;\n\t} else if (!nonprofit.hasAdmin && !isUnofficialFundraiser) {\n\t\tend = `Please note ${nonprofit.name} has not provided permission for this solicitation.`;\n\t} else if (!nonprofit.hasAdmin && isUnofficialFundraiser) {\n\t\tend = `Please note ${nonprofit.name} has not provided permission for this solicitation or reviewed or approved the content of this peer-to-peer fundraiser.`;\n\t}\n\n\treturn (\n\t\t\n\t\t\t{base} {end}\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const cardCss = cxs({\n\tbackgroundColor: 'white',\n\tpadding: `${Spacing.XL} ${Spacing.XL} 0px`,\n\tborderRadius: 'unset',\n\toverflow: 'hidden',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tborderRadius: '16px',\n\t\tpadding: Spacing.M\n\t}\n});\n","const joinClassNames = (classNames: Array) => {\n\treturn classNames.filter((className) => Boolean(className)).join(' ');\n};\n\nexport default joinClassNames;\n","import {FunctionalComponent} from 'preact';\nimport {cardCss} from 'src/components/widget/components/GridCard/styles';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface CardProps {\n\tclassName?: string;\n}\n\nexport const GridCard: FunctionalComponent = ({\n\tchildren,\n\tclassName\n}) => {\n\treturn
    {children}
    ;\n};\n","import {useContext} from 'preact/hooks';\nimport {FundraiserContext} from 'src/components/widget/context/FundraiserContext';\nimport {\n\tFundraiserFetchError,\n\tFundraiserFetching\n} from 'src/components/widget/types/Fundraiser';\n\nexport const useFundraiser = () => useContext(FundraiserContext).fundraiser;\n\nexport const useFundraiserOrUndefined = () => {\n\tconst fundraiser = useFundraiser();\n\n\tif (\n\t\tfundraiser === FundraiserFetchError ||\n\t\tfundraiser === FundraiserFetching\n\t) {\n\t\treturn undefined;\n\t}\n\n\treturn fundraiser;\n};\n","import {useContext} from 'preact/hooks';\nimport {NonprofitContext} from 'src/components/widget/context/NonprofitContext';\nimport {\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\n\nexport const useNonprofit = () => useContext(NonprofitContext).nonprofit;\n\nexport const useNonprofitOrError = () => {\n\tconst nonprofit = useNonprofit();\n\n\tif (nonprofit === NonprofitFetchError || nonprofit === NonprofitFetching) {\n\t\t// TODO: add more readable error\n\t\tthrow new Error('Nonprofit error');\n\t}\n\n\treturn nonprofit;\n};\n","import {useContext} from 'preact/hooks';\nimport {WidgetContext} from 'src/components/widget/context/WidgetContext';\n\nexport const useWidgetContext = () => useContext(WidgetContext);\n","export const ArrowIcon = () => (\n\t\n\t\t\n\t\n);\n","import {FunctionalComponent, VNode} from 'preact';\nimport {useState} from 'preact/hooks';\nimport {Fragment} from 'preact/jsx-runtime';\nimport {\n\tgetDisbursementDescription,\n\tgetFeeDescription\n} from 'src/components/widget/components/Faq/helpers';\nimport {\n\tfaqItemConateinerCss,\n\tfaqItemButtonCss,\n\tdescriptionOpen,\n\tdescriptionClose,\n\tfaqLinkCss,\n\tfaqListCss\n} from 'src/components/widget/components/Faq/styles';\nimport {getTaxDeductibleStatement} from 'src/components/widget/components/Footer/helpers';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {useFundraiserOrUndefined} from 'src/components/widget/hooks/useFundraiser';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {ArrowIcon} from 'src/components/widget/icons/ArrowIcon';\nimport {BASE_URL, FUNDRAISER_ROUTE} from 'src/constants/url';\n\ninterface FaqItemTypes {\n\tid: string;\n\ttitle: string;\n\tdescription: VNode;\n\tmobileOnly?: boolean;\n}\n\nconst FaqItem: FunctionalComponent<{faqData: FaqItemTypes}> = ({faqData}) => {\n\tconst [isOpen, setOpen] = useState(false);\n\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tsetOpen(!isOpen);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{faqData.title}\n\t\t\t\t\n\t\t\t\n\t\t\t
    \n\t\t\t\t{faqData.description}\n\t\t\t
    \n\t\t
    \n\t);\n};\n\nexport const Faq = () => {\n\tconst nonprofit = useNonprofitOrError();\n\tconst fundraiser = useFundraiserOrUndefined();\n\n\tconst {selectedPaymentMethod} = useWidgetContext();\n\n\tconst faqDataList: FaqItemTypes[] = [\n\t\t{\n\t\t\tid: 'intro',\n\t\t\ttitle: 'How does Every.org accept my donation?',\n\t\t\tdescription: (\n\t\t\t\t\n\t\t\t\t\t

    \n\t\t\t\t\t\tYour donation first goes to Every.org, a US 501(c)(3) public\n\t\t\t\t\t\tcharity, and we immediately issue a receipt for your charitable\n\t\t\t\t\t\tcontribution. {getDisbursementDescription(nonprofit)}\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tThis process ensures your eligibility for a tax-deduction,\n\t\t\t\t\t\tconsolidates records of your giving, and reduces the administrative\n\t\t\t\t\t\tburden on the nonprofits.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t)\n\t\t},\n\t\t{\n\t\t\tid: 'fees',\n\t\t\ttitle: 'Are there any fees?',\n\t\t\tdescription: getFeeDescription(selectedPaymentMethod, nonprofit)\n\t\t},\n\t\t{\n\t\t\tid: 'tax',\n\t\t\ttitle: 'Is this donation tax-deductible?',\n\t\t\tdescription: (\n\t\t\t\t

    Yes, {getTaxDeductibleStatement(nonprofit, fundraiser)}

    \n\t\t\t)\n\t\t},\n\t\t{\n\t\t\tid: 'receipt',\n\t\t\ttitle: 'Will I receive a receipt for my donation?',\n\t\t\tdescription: (\n\t\t\t\t\n\t\t\t\t\t

    \n\t\t\t\t\t\tYes, after your donation payment is confirmed, you will immediately\n\t\t\t\t\t\tget a receipt emailed to you.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tAdditionally, if you have an Every.org account, you can always get a\n\t\t\t\t\t\tsingle itemized receipt that shows all your donations in a given\n\t\t\t\t\t\tyear.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t)\n\t\t},\n\t\t{\n\t\t\tid: 'p2p',\n\t\t\tmobileOnly: true,\n\t\t\ttitle: `How else can I support ${nonprofit.name}`,\n\t\t\tdescription: (\n\t\t\t\t

    \n\t\t\t\t\tYou can also rally your friends, family, and social networks to\n\t\t\t\t\tsupport this nonprofit by starting your own fundraiser for them.{' '}\n\t\t\t\t\t\n\t\t\t\t\t\tStart a fundraiser for {nonprofit.name}\n\t\t\t\t\t\n\t\t\t\t

    \n\t\t\t)\n\t\t}\n\t];\n\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t{faqDataList.map((item) => (\n\t\t\t\t\t\n\t\t\t\t))}\n\t\t\t
    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const footerCardCss = cxs({\n\tpadding: `${Spacing.XL} ${Spacing.XL} 0px`,\n\tbackgroundColor: 'unset',\n\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\t...textSize.xs,\n\tcolor: COLORS.TextGray,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: `0px ${Spacing.L}`\n\t},\n\t'> p': {\n\t\tmargin: 0\n\t},\n\t'> p:not(:last-child)': {\n\t\tmarginBottom: Spacing.XS\n\t}\n});\n\nexport const footerLinkCss = cxs({\n\tcolor: COLORS.TextGray,\n\tfontWeight: 500,\n\ttextDecoration: 'none',\n\t':hover': {\n\t\ttextDecoration: 'underline'\n\t}\n});\n","import {FunctionComponent} from 'preact';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {getTaxDeductibleStatement} from 'src/components/widget/components/Footer/helpers';\nimport {\n\tfooterCardCss,\n\tfooterLinkCss\n} from 'src/components/widget/components/Footer/styles';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {useFundraiserOrUndefined} from 'src/components/widget/hooks/useFundraiser';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {\n\tTERMS_URL,\n\tHELP_URL,\n\tPRIVACY_URL,\n\tSUPPORT_EMAIL\n} from 'src/constants/url';\nimport {mailToLink} from 'src/helpers/mailToLink';\n\nconst FEEDBACK_URL = mailToLink({address: SUPPORT_EMAIL});\ninterface FooterLinkProps\n\textends JSXInternal.HTMLAttributes {}\nconst FooterLink: FunctionComponent = ({\n\tchildren,\n\t...rest\n}) => (\n\t\n\t\t{children}\n\t\n);\n\nexport const Footer = () => {\n\tconst nonprofit = useNonprofitOrError();\n\tconst fundraiser = useFundraiserOrUndefined();\n\n\treturn (\n\t\t\n\t\t\t

    \n\t\t\t\t{getTaxDeductibleStatement(nonprofit, fundraiser)}{' '}\n\t\t\t\tSee Terms\n\t\t\t

    \n\t\t\t

    \n\t\t\t\tNeed help? See FAQs or contact us at our{' '}\n\t\t\t\tHelp Center.\n\t\t\t

    \n\t\t\t

    \n\t\t\t\tHave ideas for how we can build a better donation experience?{' '}\n\t\t\t\tSend us feedback.\n\t\t\t

    \n\t\t\t

    \n\t\t\t\tWe respect your privacy. To learn more, check out our{' '}\n\t\t\t\tPrivacy Policy.\n\t\t\t

    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\n\nexport const linkCss = (primaryColor: string) =>\n\tcxs({\n\t\tcolor: primaryColor,\n\t\tfontWeight: 500,\n\t\ttextDecoration: 'none',\n\t\t':hover': {\n\t\t\ttextDecoration: 'underline'\n\t\t}\n\t});\n\nexport const cardCss = cxs({\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'block'\n\t}\n});\n","import {\n\tcardCss,\n\tlinkCss\n} from 'src/components/widget/components/FundraiserLink/styles';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {BASE_URL, FUNDRAISER_ROUTE} from 'src/constants/url';\n\nexport const FundraiserLink = () => {\n\tconst {primaryColor, nonprofitSlug} = useConfigContext();\n\n\tconst href = BASE_URL + nonprofitSlug + '/' + FUNDRAISER_ROUTE;\n\n\treturn (\n\t\t\n\t\t\t

    \n\t\t\t\t\n\t\t\t\t\tStart a fundraiser\n\t\t\t\t{' '}\n\t\t\t\tto rally your friends and family\n\t\t\t

    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {FunctionalComponent} from 'preact';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nconst gridCss = cxs({\n\tdisplay: 'grid',\n\tgridGap: 0,\n\tgridTemplateColumns: '1fr',\n\tgridTemplateAreas: `\"header\"\n \"promoBanners\"\n \"nonprofitInfo\"\n \"paymentProcess\"\n \"fundraiserLink\"\n \"faq\"\n \"footer\"`,\n\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tgridColumnGap: Spacing.XL,\n\t\tgridTemplateColumns: '1fr 2fr',\n\t\tgridTemplateRows: 'auto auto auto auto auto 1fr',\n\t\tgridTemplateAreas: `\"header header\"\n \"promoBanners promoBanners\"\n \"nonprofitInfo paymentProcess\"\n \"fundraiserLink paymentProcess\"\n \"faq paymentProcess\"\n \"faq footer\"`,\n\t\t'& > div:not(:last-child):not(:empty)': {\n\t\t\tmarginBottom: Spacing.XL\n\t\t}\n\t},\n\n\t'& > #every-header': {\n\t\tgridArea: 'header',\n\t\tdisplay: 'block',\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tdisplay: 'none'\n\t\t}\n\t},\n\t'& > #every-promoBanners': {gridArea: 'promoBanners'},\n\t'& > #every-nonprofitInfo': {gridArea: 'nonprofitInfo'},\n\t'& > #every-paymentProcess': {gridArea: 'paymentProcess'},\n\t'& > #every-faq': {gridArea: 'faq'},\n\t'& > #every-fundraiserLink': {gridArea: 'fundraiserLink'},\n\t'& > #every-footer': {gridArea: 'footer'}\n});\n\nexport const Grid: FunctionalComponent = ({children}) => {\n\treturn
    {children}
    ;\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {FontFamily} from 'src/components/widget/theme/font-family';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const buttonCss = cxs({\n\tcursor: 'pointer',\n\tdisplay: 'inline-flex',\n\talignItems: 'center',\n\tjustifyContent: 'center',\n\tpadding: 0,\n\tborder: 'none',\n\tbackgroundColor: 'transparent',\n\tfontFamily: FontFamily.BasisGrotesque\n});\n\nexport const smallScreenCloseButtonCss = cxs({\n\tdisplay: 'block',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'none'\n\t}\n});\n\nexport const largeScreenCloseButtonCss = cxs({\n\tposition: 'absolute',\n\tright: Spacing.XL,\n\ttop: Spacing.XL,\n\n\tpadding: Spacing.XXS,\n\tbackground: 'white',\n\tborderRadius: '8px',\n\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'block'\n\t}\n});\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const CloseIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {buttonCss} from 'src/components/widget/components/Header/CloseButton/styles';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {CloseIcon} from 'src/components/widget/icons/CloseIcon';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const CloseButton = ({className}: {className?: string}) => {\n\tconst {hideWidget} = useWidgetContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const containerCss = cxs({\n\tdisplay: 'flex',\n\tjustifyContent: 'flex-end',\n\talignItems: 'center',\n\tpadding: `${Spacing.M} ${Spacing.XL}`,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: 0\n\t}\n});\n","import {CloseButton} from 'src/components/widget/components/Header/CloseButton';\nimport {smallScreenCloseButtonCss} from 'src/components/widget/components/Header/CloseButton/styles';\nimport {containerCss} from 'src/components/widget/components/Header/styles';\n\nexport const Header = () => {\n\treturn (\n\t\t
    \n\t\t\t\n\t\t
    \n\t);\n};\n","export enum Radii {\n\tSmall = '4px',\n\tDefault = '8px',\n\tMedium = '24px',\n\tBig = '100px',\n\tCircle = '100%'\n}\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {\n\thorizontalStackCss,\n\tSpacing,\n\tverticalStackCss\n} from 'src/components/widget/theme/spacing';\n\nexport const nonprofitNameCss = cxs({\n\tlineHeight: '20px',\n\t'> span': {\n\t\tfontWeight: 700\n\t}\n});\n\nexport const logoImageCss = (logoUrl: string) =>\n\tcxs({\n\t\tborderRadius: Radii.Circle,\n\t\toverflow: 'hidden',\n\t\tdisplay: 'block',\n\t\tbackgroundImage: `url(${logoUrl})`,\n\t\tbackgroundSize: 'contain',\n\t\twidth: '40px',\n\t\theight: '40px',\n\t\tflexShrink: 0,\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\twidth: '64px',\n\t\t\theight: '64px'\n\t\t}\n\t});\n\nexport const cardCss = cxs({\n\tpadding: `${Spacing.XL}`,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t...verticalStackCss.cxs(Spacing.S),\n\t\tpadding: `${Spacing.L}`\n\t}\n});\n\nexport const avatarAndNameWrapperCss = cxs({\n\t...horizontalStackCss.cxs(Spacing.S),\n\talignItems: 'center'\n});\n\nexport const descriptionCss = cxs({\n\t...textSize.xs,\n\tcolor: 'rgba(0, 0, 0, 0.7)',\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'block'\n\t}\n});\n","import {Fragment} from 'preact/jsx-runtime';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {\n\tlogoImageCss,\n\tnonprofitNameCss,\n\tdescriptionCss,\n\tavatarAndNameWrapperCss,\n\tcardCss\n} from 'src/components/widget/components/NonprofitInfo/styles';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {LOGO_IMAGE_PLACEHOLDER_ID} from 'src/constants/placeholders';\nimport {getCloudinaryUrl} from 'src/helpers/getCloudinaryUrl';\n\nexport const NonprofitCard = () => {\n\tconst {name, logoCloudinaryId, hasAdmin} = useNonprofitOrError();\n\tconst logoUrl = getCloudinaryUrl(\n\t\tlogoCloudinaryId ?? LOGO_IMAGE_PLACEHOLDER_ID\n\t);\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{hasAdmin ? (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{name} is using Every.org to accept this donation\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tEvery.org created this page for {name}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t

    \n\t\t\t
    \n\t\t\t

    \n\t\t\t\tEvery.org is a 501(c)(3) nonprofit building free, accessible giving\n\t\t\t\ttools for every person and every organization.\n\t\t\t

    \n\t\t\n\t);\n};\n","import {BASE_CLOUDINARY_URL} from 'src/constants/url';\n\nconst FLAGS = 'f_auto,q_auto/';\n\nexport const getCloudinaryUrl = (cloudinaryId: string) => {\n\treturn `${BASE_CLOUDINARY_URL}${FLAGS}${cloudinaryId}`;\n};\n","export const COVER_IMAGE_PLACEHOLDER_ID = 'profile_picture_placeholder_o56tme';\nexport const LOGO_IMAGE_PLACEHOLDER_ID = 'NonprofitAvatarPlaceholder';\n","import {NonprofitCard} from 'src/components/widget/components/NonprofitInfo/NonprofitCard';\n\nexport const NonprofitInfo = () => {\n\treturn ;\n};\n","export enum Borders {\n\tNormal = '1px solid',\n\tBig = '4px solid'\n}\n\nexport const getColoredBorder = (border: Borders, color: string) =>\n\t`${border} ${color}`;\n","import cxs from 'cxs';\nimport {rotateCss} from 'src/components/widget/components/Faq/styles';\nimport {getColoredBorder, Borders} from 'src/components/widget/theme/borders';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const cryptoSelectorContainerCss = cxs({\n\t'& input': {\n\t\tfontSize: textSize.s.fontSize,\n\t\tlineHeight: textSize.s.fontSize,\n\t\tfontWeight: 400\n\t}\n});\n\nexport const cryptoSelectorDropDownContainerCss = cxs({\n\tbackground: COLORS.White,\n\tborderRadius: `0 0 ${Radii.Default} ${Radii.Default}`,\n\tborder: getColoredBorder(Borders.Normal, COLORS.LightGray),\n\tborderTop: 'none'\n});\n\nexport const cryptoSelectorInputContainerCss = cxs({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tgap: Spacing.XXS\n});\nexport const cryptoSelectorDropDownContentCss = cxs({\n\toverflowY: 'scroll',\n\theight: '100%',\n\tmaxHeight: '200px'\n});\n\nexport const quickSelectOptionsListCss = cxs({\n\tborderBottom: getColoredBorder(Borders.Normal, COLORS.LightGray)\n});\n\nexport const cryptoSelectorDropDownItemCss = cxs({\n\tborder: 'none',\n\tbackground: 'none',\n\n\tpadding: `${Spacing.S} ${Spacing.M}`,\n\t...textSize.s,\n\twidth: '100%',\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tgap: Spacing.XS,\n\t':hover': {\n\t\tcursor: 'pointer'\n\t},\n\n\t'> span:last-of-type': {\n\t\tmarginLeft: 'auto',\n\t\t...textSize.xs,\n\t\tcolor: COLORS.TextGray\n\t}\n});\n\nexport const cryptoSelectorInputSufixCss = (\n\tprimaryColor: string,\n\tshowDropDown: boolean\n) =>\n\tcxs({\n\t\tmarginLeft: 'auto',\n\t\t...textSize.xs,\n\t\tcolor: COLORS.TextGray,\n\t\tdisplay: 'flex',\n\t\tgap: Spacing.XS,\n\t\talignItems: 'center',\n\t\t'> svg': {\n\t\t\tcolor: primaryColor,\n\t\t\t...(showDropDown ? rotateCss : {})\n\t\t}\n\t});\n\nexport const inputContainerWithDropDownCss = cxs({\n\tborderRadius: `${Radii.Default} ${Radii.Default} 0 0 `\n});\n\nexport const cryptoAmountInputContainerCss = cxs({\n\tgap: Spacing.XS,\n\t'> input': {\n\t\ttextAlign: 'right'\n\t}\n});\n\nexport const cryptoAmountInputCss = cxs({});\n","import cxs from 'cxs';\nimport {getColoredBorder, Borders} from 'src/components/widget/theme/borders';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {horizontalStackCss, Spacing} from 'src/components/widget/theme/spacing';\n\nexport const donationAmountInputContainerErrorCss = cxs({\n\tborder: getColoredBorder(Borders.Normal, COLORS.Error)\n});\n\nexport const donationAmountInputCss = cxs({\n\tfontSize: textSize.l.fontSize,\n\tlineHeight: textSize.l.fontSize,\n\tfontWeight: 700\n});\n\nexport const donationAmountInputPrefixCss = cxs({\n\t...textSize.l,\n\tfontWeight: 700,\n\tdisplay: 'inline-flex',\n\tmarginRight: Spacing.XXS\n});\n\nexport const donationAmountInputSufixCss = (primaryColor: string) =>\n\tcxs({\n\t\t...textSize.m,\n\t\tfontWeight: 700,\n\t\tcolor: primaryColor,\n\t\tdisplay: 'inline-flex',\n\t\tmarginLeft: Spacing.XXS\n\t});\n\nexport const donationAmountAddAmountContainerCss = cxs({\n\t...horizontalStackCss.cxs(Spacing.M),\n\tjustifyContent: 'center'\n});\n\nexport const donationAmountAddAmountButtonCss = (primaryColor: string) =>\n\tcxs({\n\t\t...textSize.s,\n\t\tcolor: primaryColor,\n\t\tborderRadius: Radii.Big,\n\t\tfontWeight: 500,\n\t\tborder: `none`,\n\t\tpadding: 0,\n\t\tfontFamily: 'inherit',\n\t\tcursor: 'pointer',\n\t\tbackground: 'unset',\n\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tborder: `1px solid ${COLORS.DarkGray}`,\n\t\t\tpadding: `${Spacing.XS} ${Spacing.L}`\n\t\t}\n\t});\n","import cxs from 'cxs';\nimport {getColoredBorder, Borders} from 'src/components/widget/theme/borders';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const textInputContainerErrorCss = cxs({\n\tborder: getColoredBorder(Borders.Normal, COLORS.Error)\n});\n\nexport const textInputContainerCss = (color: string) =>\n\tcxs({\n\t\tposition: 'relative',\n\t\tpadding: Spacing.M,\n\t\tdisplay: 'flex',\n\t\tflexDirection: 'row',\n\t\talignItems: 'center',\n\t\tborderRadius: Radii.Default,\n\t\tcolor: COLORS.Text,\n\t\tbackgroundColor: COLORS.Gray,\n\t\tborder: getColoredBorder(Borders.Normal, COLORS.LightGray),\n\t\tcursor: 'text',\n\t\t':focus-within': {\n\t\t\tbackgroundColor: 'white',\n\t\t\tborderColor: color\n\t\t}\n\t});\n\nexport const textInputCss = cxs({\n\tfontSize: textSize.s.fontSize,\n\tlineHeight: textSize.s.fontSize,\n\tfontFamily: 'inherit',\n\tflex: 1,\n\tborder: 'none',\n\toutline: 'none',\n\tbackground: 'transparent',\n\twidth: '100%',\n\tminWidth: 'unset',\n\tpadding: 0,\n\tmargin: 0,\n\t'::placeholder': {\n\t\tfontWeight: 400\n\t},\n\t'::-webkit-outer-spin-button': {\n\t\t'-webkit-appearance': 'none',\n\t\tmargin: 0\n\t},\n\t'::-webkit-inner-spin-button': {\n\t\t'-webkit-appearance': 'none',\n\t\tmargin: 0\n\t},\n\t'-moz-appearance': 'textfield'\n});\n","import {forwardRef} from 'preact/compat';\nimport {useRef, MutableRef} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {\n\ttextInputContainerCss,\n\ttextInputCss\n} from 'src/components/widget/components/TextInput/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface TextAreaProps\n\textends JSXInternal.HTMLAttributes {\n\tcontainerClassName?: string;\n\tinputClassName?: string;\n\tcontainerOnClick?: () => void;\n}\n\nconst TextArea = forwardRef(\n\t(props, ref) => {\n\t\tconst inputRef = useRef();\n\t\tconst {primaryColor} = useConfigContext();\n\n\t\tconst {containerClassName, inputClassName, containerOnClick, ...rest} =\n\t\t\tprops;\n\n\t\treturn (\n\t\t\t {\n\t\t\t\t\tinputRef.current?.focus();\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t {\n\t\t\t\t\t\tif (element) {\n\t\t\t\t\t\t\tinputRef.current = element;\n\t\t\t\t\t\t\tif (ref) {\n\t\t\t\t\t\t\t\t(ref as MutableRef).current = element;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tclassName={joinClassNames([textInputCss, inputClassName])}\n\t\t\t\t\t{...rest}\n\t\t\t\t/>\n\t\t\t
    \n\t\t);\n\t}\n);\n\nexport default TextArea;\n","import {ComponentChild} from 'preact';\nimport {forwardRef, useRef} from 'preact/compat';\nimport {MutableRef} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {\n\ttextInputContainerCss,\n\ttextInputCss\n} from 'src/components/widget/components/TextInput/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface TextInputProps\n\textends Omit<\n\t\tJSXInternal.HTMLAttributes,\n\t\t'sufix' | 'prefix'\n\t> {\n\tsufix?: ComponentChild;\n\tsufixClassName?: string;\n\tprefix?: ComponentChild;\n\tprefixClassName?: string;\n\tcontainerClassName?: string;\n\tinputClassName?: string;\n\tcontainerOnClick?: () => void;\n}\n\nconst TextInput = forwardRef((props, ref) => {\n\tconst {\n\t\tsufix,\n\t\tsufixClassName,\n\t\tprefix,\n\t\tprefixClassName,\n\t\tcontainerClassName,\n\t\tinputClassName,\n\t\tcontainerOnClick,\n\t\t...rest\n\t} = props;\n\tconst inputRef = useRef();\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t {\n\t\t\t\tif (containerOnClick) {\n\t\t\t\t\tcontainerOnClick();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tinputRef.current?.focus();\n\t\t\t}}\n\t\t>\n\t\t\t{prefix &&
    {prefix}
    }\n\t\t\t {\n\t\t\t\t\tif (element) {\n\t\t\t\t\t\tinputRef.current = element;\n\t\t\t\t\t\tif (ref) {\n\t\t\t\t\t\t\t(ref as MutableRef).current = element;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tclassName={joinClassNames([textInputCss, inputClassName])}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t\t{sufix &&
    {sufix}
    }\n\t\t\n\t);\n});\n\nexport default TextInput;\n","export enum CryptoCurrency {\n\tALGO = 'ALGO',\n\tAPE = 'APE',\n\tAVAX = 'AVAX',\n\tBAT = 'BAT',\n\tBTC = 'BTC',\n\tDAI = 'DAI',\n\tDOGE = 'DOGE',\n\tDOT = 'DOT',\n\tETH = 'ETH',\n\tFIL = 'FIL',\n\tGRT = 'GRT',\n\tLINK = 'LINK',\n\tLTC = 'LTC',\n\tMATIC = 'MATIC',\n\tMOB = 'MOB',\n\tRAY = 'RAY',\n\tSAMO = 'SAMO',\n\tSBR = 'SBR',\n\tSHIB = 'SHIB',\n\tSOL = 'SOL',\n\tUNI = 'UNI',\n\tUSDC = 'USDC',\n\tUSDT = 'USDT',\n\tXTZ = 'XTZ',\n\tZEC = 'ZEC'\n}\n\nexport enum ContractType {\n\tERC20 = 'ERC-20',\n\tSPL = 'SPL'\n}\n\nexport interface SharedCryptoCurrencyConfig {\n\tdisplayName: string;\n\tabbreviation: string;\n\tdecimalOffset: number;\n\tcontractType?: ContractType;\n}\n\nexport const DISABLED_TOKENS = [CryptoCurrency.ALGO, CryptoCurrency.MOB];\n\n/**\n * Base configuration for crypto. Backend and frontend-specific configuration\n * are configured in //packages/api/src/helpers/cryptoCurrency.ts and\n * //packages/website-next/src/utility/cryptoCurrency.ts respectively.\n */\nexport const SharedCryptoCurrencyConfig: {\n\t[key in CryptoCurrency]: SharedCryptoCurrencyConfig;\n} = {\n\t[CryptoCurrency.ALGO]: {\n\t\tdisplayName: 'Algorand',\n\t\tabbreviation: 'ALGO',\n\t\tdecimalOffset: 6\n\t},\n\t[CryptoCurrency.APE]: {\n\t\tdisplayName: 'Apecoin',\n\t\tabbreviation: 'APE',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.AVAX]: {\n\t\tdisplayName: 'Avalanche',\n\t\tabbreviation: 'AVAX',\n\t\tdecimalOffset: 9\n\t},\n\t[CryptoCurrency.BAT]: {\n\t\tdisplayName: 'Basic Attention Token',\n\t\tabbreviation: 'BAT',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.BTC]: {\n\t\tdisplayName: 'Bitcoin',\n\t\tabbreviation: 'BTC',\n\t\tdecimalOffset: 8\n\t},\n\t[CryptoCurrency.DOGE]: {\n\t\tdisplayName: 'DogeCoin',\n\t\tabbreviation: 'DOGE',\n\t\tdecimalOffset: 8\n\t},\n\t[CryptoCurrency.DAI]: {\n\t\tdisplayName: 'Dai',\n\t\tabbreviation: 'DAI',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.DOT]: {\n\t\tdisplayName: 'Polkadot',\n\t\tabbreviation: 'DOT',\n\t\tdecimalOffset: 10\n\t},\n\t[CryptoCurrency.ETH]: {\n\t\tdisplayName: 'Ethereum',\n\t\tabbreviation: 'ETH',\n\t\tdecimalOffset: 18\n\t},\n\t[CryptoCurrency.FIL]: {\n\t\tdisplayName: 'Filecoin',\n\t\tabbreviation: 'FIL',\n\t\tdecimalOffset: 18\n\t},\n\t[CryptoCurrency.GRT]: {\n\t\tdisplayName: 'The Graph',\n\t\tabbreviation: 'GRT',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.LINK]: {\n\t\tdisplayName: 'Chainlink',\n\t\tabbreviation: 'LINK',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.LTC]: {\n\t\tdisplayName: 'Litecoin',\n\t\tabbreviation: 'LTC',\n\t\tdecimalOffset: 8\n\t},\n\t[CryptoCurrency.MATIC]: {\n\t\tdisplayName: 'Polygon',\n\t\tabbreviation: 'MATIC',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.MOB]: {\n\t\tdisplayName: 'MobileCoin',\n\t\tabbreviation: 'MOB',\n\t\tdecimalOffset: 12\n\t},\n\t[CryptoCurrency.RAY]: {\n\t\tdisplayName: 'Raydium',\n\t\tabbreviation: 'RAY',\n\t\tdecimalOffset: 6,\n\t\tcontractType: ContractType.SPL\n\t},\n\t[CryptoCurrency.SAMO]: {\n\t\tdisplayName: 'Samoyed',\n\t\tabbreviation: 'SAMO',\n\t\tdecimalOffset: 9,\n\t\tcontractType: ContractType.SPL\n\t},\n\t[CryptoCurrency.SBR]: {\n\t\tdisplayName: 'Saber',\n\t\tabbreviation: 'SBR',\n\t\tdecimalOffset: 6,\n\t\tcontractType: ContractType.SPL\n\t},\n\t[CryptoCurrency.SHIB]: {\n\t\tdisplayName: 'Shiba Inu',\n\t\tabbreviation: 'SHIB',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.SOL]: {\n\t\tdisplayName: 'Solana',\n\t\tabbreviation: 'SOL',\n\t\tdecimalOffset: 9\n\t},\n\t[CryptoCurrency.UNI]: {\n\t\tdisplayName: 'Uniswap',\n\t\tabbreviation: 'UNI',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.USDC]: {\n\t\tdisplayName: 'USD Coin',\n\t\tabbreviation: 'USDC',\n\t\tdecimalOffset: 6,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.USDT]: {\n\t\tdisplayName: 'Tether',\n\t\tabbreviation: 'USDT',\n\t\tdecimalOffset: 6\n\t},\n\t[CryptoCurrency.XTZ]: {\n\t\tdisplayName: 'Tezos',\n\t\tabbreviation: 'XTZ',\n\t\tdecimalOffset: 6\n\t},\n\t[CryptoCurrency.ZEC]: {\n\t\tdisplayName: 'ZCash',\n\t\tabbreviation: 'ZEC',\n\t\tdecimalOffset: 8\n\t}\n};\n\nexport interface CryptoCurrencyOption {\n\tvalue: CryptoCurrency;\n\tlabel: string;\n\tcontractType: string;\n}\n","import {JSXInternal} from 'preact/src/jsx';\nimport {cryptoAmountInputContainerCss} from 'src/components/widget/components/PaymentProcess/CryptoFlow/styles';\nimport {\n\tdonationAmountInputContainerErrorCss,\n\tdonationAmountInputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {TextInput} from 'src/components/widget/components/TextInput';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {getStepForCurrencyAmountInput} from 'src/helpers/getStepForCurrencyAmountInput';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const CryptoAmountInput = () => {\n\tconst {primaryColor} = useConfigContext();\n\n\tconst {\n\t\tcryptoAmount,\n\t\tsetCryptoAmount,\n\t\tcryptoCurrency,\n\t\tsubmitError,\n\t\tsetSubmitError\n\t} = useWidgetContext();\n\n\tconst inputContainerClasses = joinClassNames([\n\t\tcryptoAmountInputContainerCss,\n\t\t...(submitError ? [donationAmountInputContainerErrorCss] : [])\n\t]);\n\n\tconst onAmountInput = (\n\t\tevent: JSXInternal.TargetedEvent\n\t) => {\n\t\tconst stringValue = event.currentTarget.value;\n\t\tif (stringValue === '') {\n\t\t\tevent.currentTarget.value = stringValue;\n\t\t\tsetCryptoAmount(undefined);\n\t\t}\n\n\t\tconst floatValue = Number.parseFloat(stringValue);\n\n\t\tif (Number.isNaN(floatValue) || !/[+-]?(\\d*\\.)?\\d+/g.test(stringValue)) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetCryptoAmount(floatValue);\n\t\tsetSubmitError(null);\n\t};\n\n\treturn (\n\t\t
    \n\t\t\t{cryptoCurrency}}\n\t\t\t\tonInput={onAmountInput}\n\t\t\t/>\n\t\t
    \n\t);\n};\n","import algorand from 'src/components/widget/icons/CryptoCurrencyIcon/algorand.svg';\nimport apecoin from 'src/components/widget/icons/CryptoCurrencyIcon/apecoin.svg';\nimport avalanche from 'src/components/widget/icons/CryptoCurrencyIcon/avalanche.svg';\nimport basic_attention_token from 'src/components/widget/icons/CryptoCurrencyIcon/basic-attention-token.svg';\nimport bitcoin from 'src/components/widget/icons/CryptoCurrencyIcon/bitcoin.svg';\nimport chainlink from 'src/components/widget/icons/CryptoCurrencyIcon/chainlink.svg';\nimport dai from 'src/components/widget/icons/CryptoCurrencyIcon/dai.svg';\nimport dogecoin from 'src/components/widget/icons/CryptoCurrencyIcon/dogecoin.svg';\nimport ethereum from 'src/components/widget/icons/CryptoCurrencyIcon/ethereum.svg';\nimport filecoin from 'src/components/widget/icons/CryptoCurrencyIcon/filecoin.svg';\nimport graph from 'src/components/widget/icons/CryptoCurrencyIcon/graph.svg';\nimport litecoin from 'src/components/widget/icons/CryptoCurrencyIcon/litecoin.svg';\nimport mobilecoin from 'src/components/widget/icons/CryptoCurrencyIcon/mobilecoin.svg';\nimport polkadot from 'src/components/widget/icons/CryptoCurrencyIcon/polkadot.svg';\nimport polygon from 'src/components/widget/icons/CryptoCurrencyIcon/polygon.svg';\nimport raydium from 'src/components/widget/icons/CryptoCurrencyIcon/raydium.svg';\nimport saber from 'src/components/widget/icons/CryptoCurrencyIcon/saber.svg';\nimport samoyed from 'src/components/widget/icons/CryptoCurrencyIcon/samoyed.svg';\nimport shiba_inu from 'src/components/widget/icons/CryptoCurrencyIcon/shiba-inu.svg';\nimport solana from 'src/components/widget/icons/CryptoCurrencyIcon/solana.svg';\nimport stellar from 'src/components/widget/icons/CryptoCurrencyIcon/stellar.svg';\nimport tether from 'src/components/widget/icons/CryptoCurrencyIcon/tether.svg';\nimport tezos from 'src/components/widget/icons/CryptoCurrencyIcon/tezos.svg';\nimport uniswap from 'src/components/widget/icons/CryptoCurrencyIcon/uniswap.svg';\nimport zcash from 'src/components/widget/icons/CryptoCurrencyIcon/zcash.svg';\nimport {CryptoCurrency} from 'src/components/widget/types/Crypto';\n\nconst IconForCurrency = {\n\t[CryptoCurrency.ALGO]: algorand,\n\t[CryptoCurrency.APE]: apecoin,\n\t[CryptoCurrency.AVAX]: avalanche,\n\t[CryptoCurrency.BAT]: basic_attention_token,\n\t[CryptoCurrency.BTC]: bitcoin,\n\t[CryptoCurrency.DOGE]: dogecoin,\n\t[CryptoCurrency.DAI]: dai,\n\t[CryptoCurrency.DOT]: polkadot,\n\t[CryptoCurrency.ETH]: ethereum,\n\t[CryptoCurrency.FIL]: filecoin,\n\t[CryptoCurrency.GRT]: graph,\n\t[CryptoCurrency.LINK]: chainlink,\n\t[CryptoCurrency.LTC]: litecoin,\n\t[CryptoCurrency.MATIC]: polygon,\n\t[CryptoCurrency.MOB]: mobilecoin,\n\t[CryptoCurrency.RAY]: raydium,\n\t[CryptoCurrency.SAMO]: samoyed,\n\t[CryptoCurrency.SBR]: saber,\n\t[CryptoCurrency.SHIB]: shiba_inu,\n\t[CryptoCurrency.SOL]: solana,\n\t[CryptoCurrency.UNI]: uniswap,\n\t[CryptoCurrency.USDC]: tether,\n\t[CryptoCurrency.USDT]: stellar,\n\t[CryptoCurrency.XTZ]: tezos,\n\t[CryptoCurrency.ZEC]: zcash\n};\n\nexport const CryptoCurrencyIcon = ({currency}: {currency: CryptoCurrency}) => {\n\treturn (\n\t\t\n\t);\n};\n","export default __webpack_public_path__ + \"58f20393bf2b41f944c6229c2af785b9.svg\";","export default __webpack_public_path__ + \"5982461fe2304c26f3a3cf4c50806dad.svg\";","export default __webpack_public_path__ + \"b31a89ce5555412a0c8a4c6463286584.svg\";","export default __webpack_public_path__ + \"26c9b1d3d7943e6e67cf13e039ba5ac8.svg\";","export default __webpack_public_path__ + \"9052c75387065f76bb3436b7e4ce12cd.svg\";","export default __webpack_public_path__ + \"4d81ee51fa2520df58ae092aeb3d0bd4.svg\";","export default __webpack_public_path__ + \"f8f4253f02d1fbc4bf04d0959a6e614c.svg\";","export default __webpack_public_path__ + \"f588feb3cbbcc0fb259a3630ec7e34ba.svg\";","export default __webpack_public_path__ + \"8098252f28e93069c75d6010d3ac6bc1.svg\";","export default __webpack_public_path__ + \"03c114f6e014588a4bde815d9bc85821.svg\";","export default __webpack_public_path__ + \"5450d3cada4fd0370ab8d885765f5cc3.svg\";","export default __webpack_public_path__ + \"3a5177b76709819ba4663556e60222f8.svg\";","export default __webpack_public_path__ + \"cc9ce389e9a4e0f518e3caeb7b60912d.svg\";","export default __webpack_public_path__ + \"3e1eb932bdbaa2318584813bf468be53.svg\";","export default __webpack_public_path__ + \"8f22b294629293d29895fddef0a8baea.svg\";","export default __webpack_public_path__ + \"badb98080214485db486794fb59a95cc.svg\";","export default __webpack_public_path__ + \"e4bfa8eb04696d4fd5ea04ca4c35469b.svg\";","export default __webpack_public_path__ + \"fc9295a4651c56d5b4e8c3aa13a93208.svg\";","export default __webpack_public_path__ + \"743324f8e09d34a894c21e91c396f289.svg\";","export default __webpack_public_path__ + \"b9021bb757262a32de6d8931015051d9.svg\";","export default __webpack_public_path__ + \"45bcde5a98dbbdf2a4e0769eca2154f1.svg\";","export default __webpack_public_path__ + \"bc2c9e9d67b73656a6da5dd177aa10a2.svg\";","export default __webpack_public_path__ + \"7ab9396038b4befda4354b2a476d9064.svg\";","export default __webpack_public_path__ + \"6214ae0b42d798a0c9a51503a27a66bf.svg\";","export default __webpack_public_path__ + \"88611c6e2f9450f29ece8d2b36641670.svg\";","export const SearchIcon = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const AppleIcon = () => (\n\t\n\t\t\n\t\t\n\t\n);\n","export const GiftIcon = ({className}: {className?: string}) => (\n\t\n\t\t\n\t\n);\n","export const GoogleIcon = () => (\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n);\n","import {VNode} from 'preact';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {AppleIcon} from 'src/components/widget/icons/AppleIcon';\nimport {BankIcon} from 'src/components/widget/icons/BankIcon';\nimport {CardIcon} from 'src/components/widget/icons/CardIcon';\nimport {CryptoIcon} from 'src/components/widget/icons/CryptoIcon';\nimport {DafIcon} from 'src/components/widget/icons/DafIcon';\nimport {GiftIcon} from 'src/components/widget/icons/GiftIcon';\nimport {GoogleIcon} from 'src/components/widget/icons/GoogleIcon';\nimport {PaypalIcon} from 'src/components/widget/icons/Paypalcon';\nimport {StocksIcon} from 'src/components/widget/icons/StocksIcon';\nimport {VenmoIcon} from 'src/components/widget/icons/VenmoIcon';\nimport {\n\tPaymentMethod,\n\tPaymentRequestAvailable\n} from 'src/components/widget/types/PaymentMethod';\n\ninterface IconForPaymentMethodProps {\n\tmethod: PaymentMethod;\n}\n\nconst IconForPaymentMethodMap: {\n\t[key in Exclude]: VNode;\n} = {\n\t[PaymentMethod.CREDIT_CARD]: ,\n\t[PaymentMethod.BANK]: ,\n\t[PaymentMethod.PAYPAL]: ,\n\t[PaymentMethod.VENMO]: ,\n\t[PaymentMethod.CRYPTO]: ,\n\t[PaymentMethod.STOCKS]: ,\n\t[PaymentMethod.DAF]: ,\n\t[PaymentMethod.GIFT_CARD]: \n};\n\nfunction getIconForPaymentMethod(\n\tmethod: PaymentMethod,\n\tpaymentRequestAvailable: PaymentRequestAvailable\n) {\n\tif (method === PaymentMethod.PAYMENT_REQUEST) {\n\t\treturn paymentRequestAvailable.applePay ? : ;\n\t}\n\n\treturn IconForPaymentMethodMap[method];\n}\n\nexport const IconForPaymentMethod = ({method}: IconForPaymentMethodProps) => {\n\tconst {paymentRequestAvailable} = useWidgetContext();\n\treturn getIconForPaymentMethod(method, paymentRequestAvailable);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const CardIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const BankIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const PaypalIcon = () => (\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n);\n","export const VenmoIcon = () => (\n\t\n\t\t\n\t\n);\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const CryptoIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const StocksIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const DafIcon = () => (\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n);\n","import cxs from 'cxs';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {\n\tPaymentMethod,\n\tPaymentRequestAvailable\n} from 'src/components/widget/types/PaymentMethod';\n\nconst NameForPaymentMethodMap: {\n\t[key in Exclude]: string;\n} = {\n\t[PaymentMethod.CREDIT_CARD]: 'Card',\n\t[PaymentMethod.BANK]: 'Bank',\n\t[PaymentMethod.PAYPAL]: 'PayPal',\n\t[PaymentMethod.VENMO]: 'Venmo',\n\t[PaymentMethod.GIFT_CARD]: 'Gift card',\n\t[PaymentMethod.CRYPTO]: 'Crypto',\n\t[PaymentMethod.STOCKS]: 'Stocks',\n\t[PaymentMethod.DAF]: 'DAF'\n};\n\nfunction getNameForPaymentMethod(\n\tmethod: PaymentMethod,\n\tpaymentRequestAvailable: PaymentRequestAvailable\n) {\n\tif (method === PaymentMethod.PAYMENT_REQUEST) {\n\t\treturn paymentRequestAvailable.applePay ? 'Apple Pay' : 'Google Pay';\n\t}\n\n\treturn NameForPaymentMethodMap[method];\n}\n\ninterface NameForPaymentMethodProps {\n\tmethod: PaymentMethod;\n}\n\nexport const NameForPaymentMethod = ({method}: NameForPaymentMethodProps) => {\n\tconst {paymentRequestAvailable} = useWidgetContext();\n\n\tconst name = getNameForPaymentMethod(method, paymentRequestAvailable);\n\treturn {name};\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing, verticalStackCss} from 'src/components/widget/theme/spacing';\n\nexport const cardCss = cxs({\n\tpadding: `${Spacing.XL} ${Spacing.XL} 0px`,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: '0px'\n\t}\n});\n\nexport const fieldSetCss = cxs({\n\tborder: 'none',\n\tpadding: 0,\n\tmargin: 0,\n\tfontSize: '100%',\n\tfont: 'inherit',\n\tverticalAlign: 'baseline'\n});\n\nexport const legendCss = cxs({\n\tfontWeight: 700,\n\t...textSize.s,\n\tmarginBottom: Spacing.S\n});\n\nexport const formContainerCss = cxs({\n\t...verticalStackCss.cxs(Spacing.XL),\n\tpadding: '0px',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: Spacing.XXL\n\t}\n});\n\nexport const formCss = cxs({\n\tdisplay: 'grid',\n\tgridTemplateColumns: '1fr',\n\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tgridAutoFlow: 'column',\n\t\tgridTemplateColumns: 'auto 1fr'\n\t}\n});\n","import cxs from 'cxs';\nimport {fieldSetCss} from 'src/components/widget/components/PaymentProcess/styles';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {\n\tverticalStackCss,\n\thorizontalStackCss,\n\tSpacing\n} from 'src/components/widget/theme/spacing';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const largePaymentMethodSelectListCss = cxs({\n\theight: '100%',\n\twidth: '100%',\n\tminWidth: '170px',\n\tflexGrow: 1,\n\tbackgroundColor: COLORS.LightGray,\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t...verticalStackCss.cxs(0)\n\t}\n});\n\nexport const smallPaymentMethodFieldSetCss = joinClassNames([\n\tfieldSetCss,\n\tcxs({\n\t\tdisplay: 'block',\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tdisplay: 'none'\n\t\t}\n\t})\n]);\n\nexport const smallPaymentMethodSelectListCss = cxs({\n\tdisplay: 'grid',\n\tgridTemplateColumns: '1fr 1fr',\n\tgridGap: Spacing.S\n});\n\nexport const paymentMethodButtonCssBase: cxs.CSSObject = {\n\t...horizontalStackCss.cxs(Spacing.XS),\n\talignItems: 'center',\n\tjustifyContent: 'flex-start',\n\twidth: '100%',\n\tbackground: 'transparent'\n};\n\nexport const largePaymentMethodButtonCss = (selected: boolean) =>\n\tcxs({\n\t\t...paymentMethodButtonCssBase,\n\t\tborder: 'none',\n\t\tpadding: Spacing.M,\n\n\t\t':hover': {\n\t\t\tcursor: 'pointer',\n\t\t\tbackground: COLORS.Gray\n\t\t},\n\t\t...(selected\n\t\t\t? {\n\t\t\t\t\tbackground: 'white',\n\t\t\t\t\tfontWeight: 700,\n\t\t\t\t\t':hover': {\n\t\t\t\t\t\tbackground: 'white'\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: {})\n\t});\n\nexport const smallPaymentMethodButtonCss = (\n\tselected: boolean,\n\tprimaryColor: string\n) =>\n\tcxs({\n\t\t...paymentMethodButtonCssBase,\n\t\tborder: `1px solid ${COLORS.DarkGray}`,\n\t\tbackground: 'transparent',\n\t\ttextAlign: 'start',\n\t\tpadding: `${Spacing.XXS} ${Spacing.S}`,\n\t\tborderRadius: Radii.Default,\n\t\t':hover': {\n\t\t\tcursor: 'pointer',\n\t\t\tbackground: COLORS.Gray\n\t\t},\n\t\t'& > svg': {\n\t\t\twidth: '20px',\n\t\t\theight: '20px'\n\t\t},\n\t\t...(selected\n\t\t\t? {\n\t\t\t\t\tbackground: primaryColor,\n\t\t\t\t\tborder: `1px solid ${primaryColor}`,\n\t\t\t\t\tfontWeight: 700,\n\t\t\t\t\tcolor: 'white',\n\t\t\t\t\t'& > svg': {\n\t\t\t\t\t\tfilter: 'brightness(0) invert(1)',\n\t\t\t\t\t\twidth: '20px',\n\t\t\t\t\t\theight: '20px'\n\t\t\t\t\t},\n\t\t\t\t\t':hover': {\n\t\t\t\t\t\tbackground: primaryColor\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: {})\n\t});\n","import {useMemo} from 'preact/hooks';\nimport {IconForPaymentMethod} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect/IconForPaymentMethod';\nimport {NameForPaymentMethod} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect/NameForPaymentMethod';\nimport {\n\tlargePaymentMethodSelectListCss,\n\tlargePaymentMethodButtonCss,\n\tsmallPaymentMethodFieldSetCss,\n\tsmallPaymentMethodSelectListCss,\n\tsmallPaymentMethodButtonCss\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect/styles';\nimport {legendCss} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {\n\tOneTimeFrequencyMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\n\nconst usePaymentMethods = () => {\n\tconst {methods, lockMonthlyFrequency} = useConfigContext();\n\tconst {paymentRequestAvailable} = useWidgetContext();\n\n\tconst filteredMethods = useMemo(\n\t\t() =>\n\t\t\tmethods.filter((method) => {\n\t\t\t\tif (lockMonthlyFrequency && OneTimeFrequencyMethods.includes(method)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (method === PaymentMethod.PAYMENT_REQUEST) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tpaymentRequestAvailable.applePay ||\n\t\t\t\t\t\tpaymentRequestAvailable.googlePay\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}),\n\t\t[methods, lockMonthlyFrequency, paymentRequestAvailable]\n\t);\n\n\treturn filteredMethods;\n};\n\nexport const LargePaymentMethodSelect = () => {\n\tconst methods = usePaymentMethods();\n\tconst {selectedPaymentMethod, setSelectedPaymentMethod} = useWidgetContext();\n\n\treturn (\n\t\t
      \n\t\t\t{methods.map((method) => (\n\t\t\t\t
    • \n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetSelectedPaymentMethod(method);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    • \n\t\t\t))}\n\t\t
    \n\t);\n};\n\nexport const SmallPaymentMethodSelect = () => {\n\tconst methods = usePaymentMethods();\n\tconst {primaryColor} = useConfigContext();\n\tconst {selectedPaymentMethod, setSelectedPaymentMethod} = useWidgetContext();\n\n\treturn (\n\t\t
    \n\t\t\tPayment method\n\t\t\t
      \n\t\t\t\t{methods.map((method) => (\n\t\t\t\t\t
    • \n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetSelectedPaymentMethod(method);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
    • \n\t\t\t\t))}\n\t\t\t
    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\n/* Hide checkbox visually but remain accessible to screen readers.\n Source: https://polished.js.org/docs/#hidevisually */\nexport const hiddenCheckboxCss = cxs({\n\tborder: 0,\n\tclip: 'rect(0 0 0 0)',\n\tclipPath: 'inset(50%)',\n\theight: '1px',\n\tmargin: '-1px',\n\toverflow: 'hidden',\n\tpadding: '0',\n\tposition: 'absolute',\n\twhiteSpace: 'nowrap',\n\twidth: '1px'\n});\n\nexport const checkboxCss = ({\n\tchecked,\n\tprimaryColor\n}: {\n\tchecked?: boolean;\n\tprimaryColor: string;\n}) =>\n\tcxs({\n\t\tcursor: 'pointer',\n\t\twidth: '24px',\n\t\tminWidth: '24px',\n\t\theight: '24px',\n\t\tdisplay: 'flex',\n\t\tborderRadius: '4px',\n\t\tjustifyContent: 'center',\n\t\talignItems: 'center',\n\t\tborder: `1.5px solid ${checked ? primaryColor : COLORS.DarkGray}`,\n\t\t...(checked ? {background: primaryColor} : {})\n\t});\n\nexport const checkMarkIconCss = cxs({\n\twidth: '16px',\n\theight: '16px',\n\t'& > path': {\n\t\tstroke: 'white',\n\t\tstrokeWidth: '2px'\n\t}\n});\n\nexport const checkboxLabelTextCss = cxs({\n\tcursor: 'pointer'\n});\n\nexport const checkboxLabelContainerCss = cxs({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tgap: Spacing.XS\n});\n","export const CheckMarkIcon = ({className}: {className?: string}) => (\n\t\n\t\t\n\t\n);\n","import {FunctionComponent} from 'preact';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {\n\tcheckboxLabelContainerCss,\n\thiddenCheckboxCss,\n\tcheckboxCss,\n\tcheckMarkIconCss,\n\tcheckboxLabelTextCss\n} from 'src/components/widget/components/Checkbox/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {CheckMarkIcon} from 'src/components/widget/icons/CheckMarkIcon';\n\ninterface CheckboxProps extends JSXInternal.HTMLAttributes {}\n\nexport const Checkbox: FunctionComponent = ({\n\tchildren,\n\tchecked,\n\tclassName,\n\t...rest\n}) => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {useState} from 'preact/hooks';\nimport {Checkbox} from 'src/components/widget/components/Checkbox';\nimport {\n\tfieldSetCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {TextArea} from 'src/components/widget/components/TextInput';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\n\nexport const PrivateNote = () => {\n\tconst nonprofit = useNonprofitOrError();\n\tconst enablePrivateNoteField = nonprofit.hasAdmin; // add metadata check\n\n\tconst {privateNote, setPrivateNote} = useWidgetContext();\n\tconst [showPrivateNoteField, setShowPrivateNoteField] = useState(\n\t\tBoolean(privateNote)\n\t);\n\n\tif (!enablePrivateNoteField) return null;\n\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tsetShowPrivateNoteField((previous) => !previous);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\tAdd note for {nonprofit.name}\n\t\t\t\n\t\t\t{showPrivateNoteField && (\n\t\t\t\t\n\t\t\t\t\tPrivate note\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetPrivateNote(currentTarget.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t)}\n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {smallText} from 'src/components/widget/theme/font-sizes';\nimport {ABOUT_URL} from 'src/constants/url';\n\nconst containerCss = cxs({\n\twidth: '100%',\n\ttextAlign: 'center'\n});\n\nconst redirectTextCss = cxs({\n\t...smallText,\n\tcolor: COLORS.TextOpaque\n});\n\nconst linkCss = (color: string) =>\n\tcxs({\n\t\tcolor,\n\t\ttextDecoration: 'none',\n\t\tcursor: 'pointer'\n\t});\n\nexport const RedirectNotice = () => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t\tEvery.org will accept your donation.{' '}\n\t\t\t\t\n\t\t\t\t\tLearn More\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {bodyText} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const btnCss = cxs({\n\t...bodyText,\n\toutline: 'none',\n\twidth: '100%',\n\tborder: 'none',\n\tfontFamily: 'inherit',\n\tcursor: 'pointer',\n\tborderRadius: Radii.Big,\n\theight: '52px',\n\tfontWeight: 700,\n\tpadding: Spacing.XXS,\n\ttransition: 'opacity .3s'\n});\n\nexport const btnActiveColor = (color: string) =>\n\tcxs({\n\t\tcolor: COLORS.White,\n\t\tbackgroundColor: color,\n\t\t':hover': {\n\t\t\topacity: 0.9\n\t\t}\n\t});\n\nexport const btnDisabledCss = cxs({\n\tcolor: COLORS.White,\n\tbackgroundColor: COLORS.DarkGray,\n\tcursor: 'default',\n\t'& > span': {\n\t\topacity: '0.6'\n\t}\n});\n","import {ComponentChildren} from 'preact';\nimport {\n\tbtnCss,\n\tbtnDisabledCss,\n\tbtnActiveColor\n} from 'src/components/widget/components/PaymentProcess/SubmitButton/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface ButtonProps {\n\thandleClick?: () => void;\n\tchildren: ComponentChildren;\n\tdisabled?: boolean;\n}\n\nexport const SubmitButton = ({\n\thandleClick,\n\tdisabled,\n\tchildren\n}: ButtonProps) => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","export const DEFAULT_CURRENCY = {\n\tname: 'USD',\n\tsymbol: '$'\n};\n","import {useCallback} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tOneTimeFrequencyMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\nimport {DEFAULT_CURRENCY} from 'src/constants/currency';\nimport {\n\tconstructDonateStocksUrl,\n\tconstructDonateCryptoUrl,\n\tconstructDonateUrl,\n\tconstructGiftCardUrl\n} from 'src/helpers/constructDonateUrl';\n\nexport const useSubmitDonation = () => {\n\tconst config = useConfigContext();\n\n\tconst {\n\t\tfrequency,\n\t\tdonationAmount,\n\t\tsetSubmitError,\n\t\tselectedPaymentMethod,\n\t\tstockAmount,\n\t\tstockSymbol,\n\t\tcryptoAmount,\n\t\tcryptoCurrency,\n\t\tprivateNote\n\t} = useWidgetContext();\n\tconst {minDonationAmount} = useConfigContext();\n\n\tconst submitDonation = useCallback(\n\t\t(event: JSXInternal.TargetedEvent) => {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst target = config.completeDonationInNewTab ? '_blank' : '_self';\n\n\t\t\tconst baseParameters = {\n\t\t\t\tmethods: [selectedPaymentMethod],\n\t\t\t\tnonprofitSlug: config.nonprofitSlug,\n\t\t\t\tfundraiserSlug: config.fundraiserSlug,\n\t\t\t\tprivateNote\n\t\t\t};\n\t\t\tswitch (selectedPaymentMethod) {\n\t\t\t\tcase PaymentMethod.CRYPTO:\n\t\t\t\t\tif (!cryptoAmount || !cryptoCurrency) {\n\t\t\t\t\t\tsetSubmitError(`Please enter currency and amount`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructDonateCryptoUrl({\n\t\t\t\t\t\t\tcryptoAmount,\n\t\t\t\t\t\t\tcryptoCurrency,\n\t\t\t\t\t\t\t...baseParameters\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PaymentMethod.STOCKS:\n\t\t\t\t\tif (!stockSymbol || !stockAmount) {\n\t\t\t\t\t\tsetSubmitError(`Please enter the symbol and amount`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructDonateStocksUrl({\n\t\t\t\t\t\t\tstockSymbol,\n\t\t\t\t\t\t\tstockAmount,\n\t\t\t\t\t\t\t...baseParameters\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PaymentMethod.GIFT_CARD:\n\t\t\t\t\twindow.open(constructGiftCardUrl(config.nonprofitSlug), target);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (!donationAmount || donationAmount < minDonationAmount) {\n\t\t\t\t\t\tsetSubmitError(\n\t\t\t\t\t\t\t`The minimum donation amount is ${DEFAULT_CURRENCY.symbol}${minDonationAmount}`\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructDonateUrl({\n\t\t\t\t\t\t\tamount: donationAmount,\n\t\t\t\t\t\t\tfrequency: OneTimeFrequencyMethods.includes(selectedPaymentMethod)\n\t\t\t\t\t\t\t\t? DonationFrequency.OneTime\n\t\t\t\t\t\t\t\t: frequency,\n\t\t\t\t\t\t\t...baseParameters\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tfrequency,\n\t\t\tdonationAmount,\n\t\t\tsetSubmitError,\n\t\t\tselectedPaymentMethod,\n\t\t\tconfig,\n\t\t\tminDonationAmount,\n\t\t\tstockAmount,\n\t\t\tstockSymbol,\n\t\t\tcryptoAmount,\n\t\t\tcryptoCurrency,\n\t\t\tprivateNote\n\t\t]\n\t);\n\n\treturn submitDonation;\n};\n","import cxs from 'cxs';\nimport {CryptoAmountInput} from 'src/components/widget/components/PaymentProcess/CryptoFlow/CryptoAmountInput';\nimport {CryptoSelector} from 'src/components/widget/components/PaymentProcess/CryptoFlow/CryptoSelector';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tfieldSetCss,\n\tformContainerCss,\n\tformCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const CryptoFlow = () => {\n\tconst submitDonation = useSubmitDonation();\n\tconst {cryptoAmount, cryptoCurrency} = useWidgetContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\tCrypto currency\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t{cryptoCurrency && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tAmount\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.CRYPTO, cryptoCurrency})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const backButtonCss = (primaryColor: string) =>\n\tcxs({\n\t\toutline: 'none',\n\t\tborder: 'none',\n\t\tfontFamily: 'inherit',\n\t\tcursor: 'pointer',\n\t\tbackground: 'none',\n\t\tfontWeight: 500,\n\t\ttransition: 'opacity .3s',\n\t\tcolor: primaryColor,\n\t\tdisplay: 'flex',\n\t\talignItems: 'center',\n\t\talignSelf: 'flex-start',\n\t\t...textSize.s,\n\t\topacity: 1,\n\t\tpadding: 0,\n\t\tgap: Spacing.XXS,\n\t\tmarginBottom: Spacing.XXL,\n\t\t':hover': {\n\t\t\topacity: 0.9\n\t\t},\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tpadding: Spacing.L,\n\t\t\tmarginBottom: 0\n\t\t}\n\t});\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const ArrowBackIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {backButtonCss} from 'src/components/widget/components/PaymentProcess/BackButton/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {ArrowBackIcon} from 'src/components/widget/icons/ArrowBackIcon';\n\nexport const BackButton = ({handleClick}: {handleClick?: () => void}) => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\tBack\n\t\t\n\t);\n};\n","export enum DafFlowView {\n\tSTART,\n\tMANUAL,\n\tAMOUNT\n}\n\nexport interface DafFlowViewProps {\n\tchangeView: (view: DafFlowView) => void;\n}\n","import cxs from 'cxs';\nimport {useEffect, useRef} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {\n\tdonationAmountAddAmountButtonCss,\n\tdonationAmountAddAmountContainerCss,\n\tdonationAmountInputPrefixCss,\n\tdonationAmountInputSufixCss,\n\tdonationAmountInputContainerErrorCss,\n\tdonationAmountInputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {\n\tfieldSetCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {TextInput} from 'src/components/widget/components/TextInput';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport {DEFAULT_CURRENCY} from 'src/constants/currency';\nimport {isTouchDevice} from 'src/helpers/isTouchDevice';\n\nconst preventDecimal = (\n\tevent: JSXInternal.TargetedEvent\n) => {\n\tif (event.key === '.') {\n\t\tevent.preventDefault();\n\t}\n};\n\nexport const DonationAmount = () => {\n\tconst inputRef = useRef(null);\n\n\tconst {primaryColor, addAmounts} = useConfigContext();\n\n\tconst {setDonationAmount, donationAmount, setSubmitError, submitError} =\n\t\tuseWidgetContext();\n\n\tconst autoFocusInput = () => {\n\t\tif (inputRef.current) {\n\t\t\tinputRef.current.focus();\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tif (!isTouchDevice()) {\n\t\t\tautoFocusInput();\n\t\t}\n\t}, []);\n\n\treturn (\n\t\t\n\t\t\tDonation amount\n\t\t\t {\n\t\t\t\t\tsetDonationAmount(Number(event.currentTarget.value));\n\t\t\t\t\tsetSubmitError(null);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t{addAmounts && addAmounts.length > 0 && (\n\t\t\t\t
    \n\t\t\t\t\t{addAmounts.map((amount) => (\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetDonationAmount((previous) => {\n\t\t\t\t\t\t\t\t\treturn typeof previous === 'number'\n\t\t\t\t\t\t\t\t\t\t? previous + amount\n\t\t\t\t\t\t\t\t\t\t: amount;\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t+{amount}\n\t\t\t\t\t\t\n\t\t\t\t\t))}\n\t\t\t\t
    \n\t\t\t)}\n\t\t\n\t);\n};\n","export const isTouchDevice = () =>\n\tBoolean('ontouchstart' in window || navigator.maxTouchPoints);\n","import cxs from 'cxs';\n\nexport const inputLabelCss = (primaryColor: string) =>\n\tcxs({\n\t\tposition: 'relative',\n\t\tcursor: 'pointer',\n\t\tdisplay: 'flex',\n\t\twidth: '100%',\n\t\theight: '36px',\n\t\talignItems: 'center',\n\t\tjustifyContent: 'center',\n\t\tcolor: primaryColor,\n\t\tfontWeight: 500,\n\t\tborder: `2px solid ${primaryColor}`,\n\t\tborderRight: 'none'\n\t});\n\nexport const inputItemCss = (primaryColor: string) =>\n\tcxs({\n\t\tcursor: 'pointer',\n\t\tdisplay: 'flex',\n\t\tflexDirection: 'column',\n\t\tflex: '1 1 0px',\n\n\t\t'& > input': {\n\t\t\tappearance: 'none',\n\t\t\theight: 0\n\t\t},\n\n\t\t'& > input:checked + label': {\n\t\t\tbackgroundColor: primaryColor,\n\t\t\tcolor: 'white'\n\t\t},\n\n\t\t'& > input:checked + label:hover': {\n\t\t\tbackgroundColor: primaryColor,\n\t\t\tcolor: 'white'\n\t\t}\n\t});\n\nexport const inputContainerCss = (primaryColor: string) =>\n\tcxs({\n\t\tdisplay: 'flex',\n\t\twidth: '100%',\n\n\t\t'& > div:first-of-type > label': {\n\t\t\tborderRadius: '6px 0 0 6px',\n\t\t\t'&::after': {\n\t\t\t\tborderRadius: '6px 0 0 6px'\n\t\t\t}\n\t\t},\n\n\t\t'& > div:last-of-type > label': {\n\t\t\tborderRadius: '0 6px 6px 0',\n\t\t\tborderRight: `2px solid ${primaryColor}`,\n\t\t\t'&::after': {\n\t\t\t\tborderRadius: '0 6px 6px 0'\n\t\t\t}\n\t\t}\n\t});\n","import {\n\tinputContainerCss,\n\tinputItemCss,\n\tinputLabelCss\n} from 'src/components/widget/components/PaymentProcess/Frequency/styles';\nimport {\n\tfieldSetCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tOneTimeFrequencyMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\n\nconst DEFAULT_MONTHLY_TITLE = 'Monthly donation';\n\nexport const Frequency = () => {\n\tconst {\n\t\tprimaryColor,\n\t\tlockMonthlyFrequency,\n\t\tmonthlyTitle = DEFAULT_MONTHLY_TITLE\n\t} = useConfigContext();\n\tconst {frequency, selectedPaymentMethod, setFrequency} = useWidgetContext();\n\n\tif (lockMonthlyFrequency) {\n\t\treturn

    {monthlyTitle}

    ;\n\t}\n\n\tif (OneTimeFrequencyMethods.includes(selectedPaymentMethod)) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\tFrequency\n\t\t\t\t

    \n\t\t\t\t\t{selectedPaymentMethod === PaymentMethod.DAF ? 'Chariot' : 'Venmo'}{' '}\n\t\t\t\t\tonly supports one-time donations\n\t\t\t\t

    \n\t\t\t
    \n\t\t);\n\t}\n\n\treturn (\n\t\t
    \n\t\t\tFrequency\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetFrequency(DonationFrequency.Monthly);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tGive Monthly\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetFrequency(DonationFrequency.OneTime);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tOnce\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t);\n};\n","import {BackButton} from 'src/components/widget/components/PaymentProcess/BackButton';\nimport {\n\tDafFlowViewProps,\n\tDafFlowView\n} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\nimport {DonationAmount} from 'src/components/widget/components/PaymentProcess/DonationAmount';\nimport {Frequency} from 'src/components/widget/components/PaymentProcess/Frequency';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tformCss,\n\tformContainerCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const DafAmountView = ({changeView}: DafFlowViewProps) => {\n\tconst submitDonation = useSubmitDonation();\n\tconst {donationAmount, selectedPaymentMethod} = useWidgetContext();\n\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tchangeView(DafFlowView.START);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t
    \n\t\t\t\t

    Connect your DAF with Chariot

    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.DAF})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {linkCss} from 'src/components/widget/components/FundraiserLink/styles';\nimport {BackButton} from 'src/components/widget/components/PaymentProcess/BackButton';\nimport {\n\tDafFlowViewProps,\n\tDafFlowView\n} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\nimport {\n\tformContainerCss,\n\tformCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {Spacing, verticalStackCss} from 'src/components/widget/theme/spacing';\nimport {TEAM_EMAIL} from 'src/constants/url';\nimport {mailToLink} from 'src/helpers/mailToLink';\n\nexport const DafManualView = ({changeView}: DafFlowViewProps) => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tchangeView(DafFlowView.START);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t
    \n\t\t\t\t

    Manual DAF donation

    \n\t\t\t\t

    \n\t\t\t\t\tPlease ask your provider to make a one-time or recurring grant to:\n\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t\t\t

    \n\t\t\t\t\t\tEvery.org (EIN: 61-1913297)\n\t\t\t\t\t\t58 West Portal Ave #781 San Francisco, CA 94127\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tMemo: For every.org/themarshallproject from @darth.vader506\n\t\t\t\t\t\t\n\t\t\t\t\t\tContact info: Mark Ulrich, CEO\n\t\t\t\t\t\tEmail: team@every.org\n\t\t\t\t\t\tPhone number: +1 (415) 650-0503\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tYou may also email us at{' '}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{TEAM_EMAIL}\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t\twith the memo or to let us know if you wish to share your contact\n\t\t\t\t\t\tinformation with the nonprofit/campaign. By default, we do not share\n\t\t\t\t\t\tyour contact information\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tWe will attribute the donation accordingly:\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we receive BOTH your @username and a nonprofit/campaign: we will\n\t\t\t\t\t\tadd a donation for that nonprofit/campaign to your account.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we receive only your @username, we will credit your\n\t\t\t\t\t\taccount's gift card balance in the amount received, which you\n\t\t\t\t\t\tcan use to support as many nonprofits as you'd like.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we receive only a nonprofit/campaign, we will send that amount to\n\t\t\t\t\t\tthat nonprofit/campaign as an anonymous donation.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we do not receive any information by the time the wire/ACH is\n\t\t\t\t\t\treceived, we will apply it towards running Every.org.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t
    \n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nconst CAHRIOT_GREEN = '#ADEFD1';\nconst CAHRIOT_DARK_GREEN = '#7ce6b6';\nconst CHARIOT_DARK_BLUE = '#00203F';\n\nexport const chariotButtonCss = cxs({\n\toutline: 'none',\n\tborder: 'none',\n\tfontFamily: 'inherit',\n\tbackground: CAHRIOT_GREEN,\n\tcolor: CHARIOT_DARK_BLUE,\n\talignSelf: 'center',\n\tborderRadius: Radii.Big,\n\tpadding: `${Spacing.M} ${Spacing.XL}`,\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tfontWeight: 500,\n\t...textSize.s,\n\tgap: Spacing.XS,\n\tcursor: 'pointer',\n\t':hover': {\n\t\tbackground: CAHRIOT_DARK_GREEN\n\t}\n});\n\nexport const manualButtonCss = (primaryColor: string) =>\n\tcxs({\n\t\toutline: 'none',\n\t\tborder: 'none',\n\t\tbackground: 'none',\n\t\tfontFamily: 'inherit',\n\t\tcolor: primaryColor,\n\t\talignSelf: 'center',\n\t\tdisplay: 'flex',\n\t\talignItems: 'center',\n\t\tfontWeight: 500,\n\t\t...textSize.s,\n\t\tgap: Spacing.XS,\n\t\tcursor: 'pointer',\n\t\t':hover': {\n\t\t\topacity: 0.9\n\t\t}\n\t});\n","import {\n\tchariotButtonCss,\n\tmanualButtonCss\n} from 'src/components/widget/components/PaymentProcess/DafFlow/styles';\nimport {\n\tDafFlowViewProps,\n\tDafFlowView\n} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {\n\tformCss,\n\tformContainerCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const ChariotLogo = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n\nexport const DafStartView = ({changeView}: DafFlowViewProps) => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t

    Instant DAF donation

    \n\t\t\t\t

    \n\t\t\t\t\tWe use Chariot to verify your account info and automatically initiate\n\t\t\t\t\ta grant from your DAF, or you can get instructions for making the\n\t\t\t\t\tdonation manually.\n\t\t\t\t

    \n\t\t\t\t {\n\t\t\t\t\t\tchangeView(DafFlowView.AMOUNT);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tDonate with\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tchangeView(DafFlowView.MANUAL);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tGet instructions for a manual DAF donation\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t
    \n\t);\n};\n","import {useState} from 'preact/hooks';\nimport {DafAmountView} from 'src/components/widget/components/PaymentProcess/DafFlow/Views/DafAmountView';\nimport {DafManualView} from 'src/components/widget/components/PaymentProcess/DafFlow/Views/DafManualView';\nimport {DafStartView} from 'src/components/widget/components/PaymentProcess/DafFlow/Views/DafStartView';\nimport {DafFlowView} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\n\nexport const DafFlow = () => {\n\tconst [view, setView] = useState(DafFlowView.START);\n\n\t// eslint-disable-next-line default-case\n\tswitch (view) {\n\t\tcase DafFlowView.START:\n\t\t\treturn ;\n\t\tcase DafFlowView.MANUAL:\n\t\t\treturn ;\n\t\tcase DafFlowView.AMOUNT:\n\t\t\treturn ;\n\t}\n};\n","import {DonationAmount} from 'src/components/widget/components/PaymentProcess/DonationAmount';\nimport {Frequency} from 'src/components/widget/components/PaymentProcess/Frequency';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tformContainerCss,\n\tformCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const DefaultFlow = () => {\n\tconst {\n\t\tfrequency,\n\t\tdonationAmount,\n\t\tselectedPaymentMethod,\n\t\tpaymentRequestAvailable\n\t} = useWidgetContext();\n\tconst submitDonation = useSubmitDonation();\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({\n\t\t\t\t\t\tmethod: selectedPaymentMethod,\n\t\t\t\t\t\tpaymentRequestIsApplePay: paymentRequestAvailable.applePay\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import cxs from 'cxs';\n\nexport const giftCardIconCss = cxs({\n\tdisplay: 'block',\n\twidth: '80px',\n\theight: '80px',\n\talignSelf: 'center',\n\t'& > path': {\n\t\tstrokeWidth: '1'\n\t}\n});\n","import {giftCardIconCss} from 'src/components/widget/components/PaymentProcess/GiftCardFlow/styles';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tformCss,\n\tformContainerCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {GiftIcon} from 'src/components/widget/icons/GiftIcon';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const GiftCardFlow = () => {\n\tconst submitDonation = useSubmitDonation();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t

    Redeem a gift card to add donation credits to your account.

    \n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.GIFT_CARD})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {\n\tdonationAmountInputContainerErrorCss,\n\tdonationAmountInputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tfieldSetCss,\n\tformContainerCss,\n\tformCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {TextInput} from 'src/components/widget/components/TextInput';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const StocksFlow = () => {\n\tconst submitDonation = useSubmitDonation();\n\n\tconst {primaryColor} = useConfigContext();\n\n\tconst {\n\t\tstockAmount,\n\t\tstockSymbol,\n\t\tsetStockAmount,\n\t\tsetStockSymbol,\n\t\tsubmitError,\n\t\tsetSubmitError\n\t} = useWidgetContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tWhat is the symbol of the shares?\n\t\t\t\t\t\t\n\t\t\t\t\t\tExample: GOOG\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetStockSymbol(event.currentTarget.value);\n\t\t\t\t\t\t\t\tsetSubmitError(null);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tHow many shares are you donating?\n\t\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetStockAmount(Number(event.currentTarget.value));\n\t\t\t\t\t\t\t\tsetSubmitError(null);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.STOCKS})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import {GridCard} from 'src/components/widget/components/GridCard';\nimport {CryptoFlow} from 'src/components/widget/components/PaymentProcess/CryptoFlow';\nimport {DafFlow} from 'src/components/widget/components/PaymentProcess/DafFlow';\nimport {DefaultFlow} from 'src/components/widget/components/PaymentProcess/DefaultFlow';\nimport {GiftCardFlow} from 'src/components/widget/components/PaymentProcess/GiftCardFlow';\nimport {StocksFlow} from 'src/components/widget/components/PaymentProcess/StocksFlow';\nimport {cardCss} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nconst DonateFlowForPaymentMethod = () => {\n\tconst {selectedPaymentMethod} = useWidgetContext();\n\n\tswitch (selectedPaymentMethod) {\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn ;\n\t\tcase PaymentMethod.STOCKS:\n\t\t\treturn ;\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn ;\n\t\tcase PaymentMethod.GIFT_CARD:\n\t\t\treturn ;\n\t\tdefault:\n\t\t\treturn ;\n\t}\n};\n\nexport const PaymentProcess = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const widgetCss = (height: number | null) =>\n\tcxs({\n\t\tbackground: 'white',\n\t\twidth: '100%',\n\t\theight: '100%',\n\t\tborderRadius: 'unset',\n\t\tposition: 'relative',\n\t\toverflow: 'auto',\n\t\tpadding: `0`,\n\t\tpaddingBottom: Spacing.XXL,\n\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\theight: height ? `${height}px` : 'unset',\n\t\t\tbackground: '#f3f6f6',\n\t\t\tminHeight: '378px',\n\t\t\tmaxHeight: `calc(100vh - 2 * ${Spacing.XL})`,\n\t\t\twidth: '1000px',\n\t\t\toverflow: 'unset',\n\t\t\toverflowY: 'scroll',\n\t\t\t/* Hide sc rollbar */\n\t\t\t'-ms-overflow-style': 'none' /* IE and Edge */,\n\t\t\tscrollbarWidth: 'none' /* Firefox */,\n\t\t\t'::-webkit-scrollbar': {\n\t\t\t\tdisplay: 'none'\n\t\t\t},\n\t\t\tborderRadius: Radii.Medium,\n\t\t\tpadding: Spacing.XL\n\t\t}\n\t});\n","import {VNode} from 'preact';\nimport {forwardRef} from 'preact/compat';\nimport {widgetCss} from 'src/components/widget/components/WidgetCard/styles';\n\nexport const WidgetCard = forwardRef<\n\tHTMLDivElement,\n\tVNode<{height: number | null}>['props']\n>(({children, height}, ref) => {\n\treturn (\n\t\t
    \n\t\t\t{children}\n\t\t
    \n\t);\n});\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {FontFamily} from 'src/components/widget/theme/font-family';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const overlayCss = cxs({\n\t...textSize.s,\n\tposition: 'fixed',\n\theight: 'auto',\n\twidth: '100%',\n\tzIndex: 999,\n\ttop: 0,\n\tbottom: 0,\n\tleft: 0,\n\tright: 0,\n\tdisplay: 'flex',\n\tbackground: 'rgba(0, 0, 0, 0.5)',\n\tjustifyContent: 'center',\n\talignItems: 'center',\n\tcolor: COLORS.Text,\n\tfontFamily: FontFamily.BasisGrotesque,\n\tpadding: 0,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: Spacing.XL\n\t},\n\t// reset\n\tboxSizing: 'border-box',\n\t'-webkit-font-smoothing': 'antialiased',\n\t'-moz-osx-font-smoothing': 'grayscale',\n\t'& *': {\n\t\tboxSizing: 'inherit'\n\t},\n\t'& *:before': {\n\t\tboxSizing: 'inherit'\n\t},\n\t'& *:after': {\n\t\tboxSizing: 'inherit'\n\t},\n\t'h1,h2,h3,h4,h5,h6': {fontWeight: 700},\n\n\th1: {\n\t\t...textSize.xl\n\t},\n\n\th2: {\n\t\t...textSize.l\n\t},\n\n\t'h3,h4,h5,h6': {\n\t\t...textSize.m\n\t}\n});\n","import {FunctionalComponent} from 'preact';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {overlayCss} from 'src/components/widget/components/WidgetOverlay/styles';\n\ninterface WdigetOverlayProps {\n\tonClick: JSXInternal.MouseEventHandler;\n}\n\nexport const WidgetOverlay: FunctionalComponent = ({\n\tchildren,\n\tonClick\n}) => {\n\treturn (\n\t\t
    \n\t\t\t{children}\n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {COLORS} from 'src/components/widget/theme/colors';\n\nconst DEFAULT_LOADING_SIZE = 72;\n\nconst MASK = `data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath class='logoMask' stroke-dasharray='170px' d='M32.547 43C39.081 43 48 38.895 48 29.5C48 20.104 38.132 12.5 29.5 12.5C20.868 12.5 9 19.506 9 36C9 52.495 23.805 59.345 32.547 59.345C41.288 59.345 62.5 54.104 62.5 29.5' stroke='white' stroke-width='10'/%3E%3Canimate attributeType='XML' attributeName='stroke-dashoffset' from='170px' to='-170px' dur='1.25s' repeatCount='indefinite'/%3E%3C/svg%3E%0A`;\nconst loadingSvgCss = cxs({\n\tdisplay: 'inline-block',\n\tverticalAlign: 'middle',\n\n\tmaskImage: `url(\"${MASK}\")`,\n\t'-webkit-mask-image': `url(\"${MASK}\")`,\n\t'-webkit-mask-size': 'cover',\n\tmaskSize: 'cover'\n});\n\nconst loadingPathCss = (color: string) =>\n\tcxs({\n\t\tfill: color\n\t});\ninterface LoadingIconProps {\n\tsize?: number;\n\tcolor?: string;\n}\n\nexport const LoadingIcon = ({\n\tsize = DEFAULT_LOADING_SIZE,\n\tcolor = COLORS.LightGray\n}: LoadingIconProps) => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {JSXInternal} from 'preact/src/jsx';\nimport {Faq} from 'src/components/widget/components/Faq';\nimport {Footer} from 'src/components/widget/components/Footer';\nimport {FundraiserLink} from 'src/components/widget/components/FundraiserLink';\nimport {Grid} from 'src/components/widget/components/Grid';\nimport {Header} from 'src/components/widget/components/Header';\nimport {CloseButton} from 'src/components/widget/components/Header/CloseButton';\nimport {largeScreenCloseButtonCss} from 'src/components/widget/components/Header/CloseButton/styles';\nimport {NonprofitInfo} from 'src/components/widget/components/NonprofitInfo';\nimport {PaymentProcess} from 'src/components/widget/components/PaymentProcess';\nimport {WidgetCard} from 'src/components/widget/components/WidgetCard';\nimport {WidgetOverlay} from 'src/components/widget/components/WidgetOverlay';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useFundraiser} from 'src/components/widget/hooks/useFundraiser';\nimport {useNonprofit} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {LoadingIcon} from 'src/components/widget/icons/LoadingIcon';\nimport {\n\tFundraiserFetchError,\n\tFundraiserFetching\n} from 'src/components/widget/types/Fundraiser';\nimport {\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\n\nconst Widget = () => {\n\tconst {fundraiserSlug} = useConfigContext();\n\tconst {hideWidget} = useWidgetContext();\n\tconst findraiser = useFundraiser();\n\tconst nonprofit = useNonprofit();\n\n\tconst hideOnWrapperClick: JSXInternal.MouseEventHandler = (\n\t\tevent\n\t) => {\n\t\tif (event.target === event.currentTarget) {\n\t\t\thideWidget();\n\t\t}\n\t};\n\n\tif (\n\t\tnonprofit === NonprofitFetchError ||\n\t\t(fundraiserSlug && findraiser === FundraiserFetchError)\n\t) {\n\t\thideWidget();\n\t\treturn null;\n\t}\n\n\tif (\n\t\tnonprofit === NonprofitFetching ||\n\t\t(fundraiserSlug && findraiser === FundraiserFetching)\n\t) {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t);\n};\n\nexport default Widget;\n","import {ContextProvider} from 'src/components/widget/context';\nimport Widget from 'src/components/widget/index';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nlet originalOverflow: string;\nconst getOriginalOverflow = () => {\n\tconst body = document.querySelector('body');\n\n\tif (!originalOverflow) {\n\t\toriginalOverflow = body?.style.overflow ? body.style.overflow : 'unset';\n\t}\n\n\treturn originalOverflow;\n};\n\nconst addOverflowToBody = () => {\n\tconst body = document.querySelector('body');\n\tif (body) {\n\t\tbody.style.overflow = 'hidden';\n\t}\n};\n\nconst removeOverflowFromBody = () => {\n\tconst body = document.querySelector('body');\n\tconst overflow = getOriginalOverflow();\n\tif (body) {\n\t\tbody.style.overflow = overflow;\n\t}\n};\n\ninterface WidgetLoaderProps {\n\toptions: Partial;\n\thide: () => void;\n}\n\nexport const WidgetLoader = ({options = {}, hide}: WidgetLoaderProps) => {\n\tremoveOverflowFromBody();\n\tif (!options.show) {\n\t\t// Not showing\n\t\treturn null;\n\t}\n\n\taddOverflowToBody();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","const resetcss = `\n\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n font-family: 'Basis Grotesque Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Roboto, sans-serif;\n vertical-align: baseline;\n }\n /* HTML5 display-role reset for older browsers */\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n body {\n line-height: 1;\n }\n ol, ul {\n list-style: none;\n }\n blockquote, q {\n quotes: none;\n }\n blockquote:before, blockquote:after,\n q:before, q:after {\n content: '';\n content: none;\n }\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n button {\n color: unset;\n background: unset;\n }\n`;\n\nexport default resetcss;\n","const AUTO_PLAY_PARAM = 'explicit';\n\nexport function shouldEnableAutoPlay() {\n\tconst parametersString = document.currentScript\n\t\t?.getAttribute('src')\n\t\t?.split('?')[1];\n\tconst parametersArray = parametersString\n\t\t?.split('&')\n\t\t.map((parameterString) => {\n\t\t\tconst [key, value] = parameterString.split('=');\n\t\t\treturn [key, value];\n\t\t});\n\tconst parametersObject =\n\t\tparametersArray && Object.fromEntries(parametersArray);\n\n\tif (parametersObject) {\n\t\treturn parametersObject[AUTO_PLAY_PARAM] !== '1';\n\t}\n\n\treturn true;\n}\n","import autoPlayMode from 'src/autoPlayMode';\nimport {shouldEnableAutoPlay} from 'src/helpers/shouldEnableAutoPlay';\nimport manualMode from 'src/manualMode';\n\nconst autoPlay = shouldEnableAutoPlay();\n\nif (autoPlay) {\n\tautoPlayMode();\n} else {\n\tmanualMode();\n}\n","import {render} from 'preact';\nimport EmbedButton from 'src/components/embed-button';\nimport {CreateButtonInSelectorProps} from 'src/components/embed-button/types';\nimport {CreateWidgetInSelectorProps} from 'src/components/widget/types';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {loadFonts} from 'src/loadFonts';\nimport {WidgetLoader} from 'src/loaders/Widgetloader';\nimport resetcss from 'src/resetCss';\n\ninterface GlobalExport {\n\tcreateButton: (options: CreateButtonInSelectorProps) => void;\n\tcreateWidget: (options: CreateWidgetInSelectorProps) => void;\n\tsetOptions: (options: Partial) => void;\n\tshowWidget: () => void;\n}\n\ndeclare const window: Window & {\n\teveryDotOrgDonateButton?: GlobalExport;\n};\n\nexport default function manualMode() {\n\tconst DEFAULT_HASH_OPEN_WIDGET = 'donate';\n\n\tconst baseOptions: Partial = {};\n\tconst options = {\n\t\tshow: false,\n\t\topenAt: DEFAULT_HASH_OPEN_WIDGET\n\t};\n\tlet instanceOptions: Partial = {};\n\n\tconst getNodeList = (element?: Element, selector?: string) =>\n\t\telement ? [element] : selector && document.querySelectorAll(selector);\n\n\tloadFonts();\n\n\t/**\n\t * Helper function to debug donate button issues\n\t */\n\tfunction log(...messages: unknown[]): void {\n\t\tconsole.info('Every.org Donate Button:', ...messages);\n\t}\n\n\tlet widgetMountPoint: HTMLElement;\n\n\tconst mountWidget = () => {\n\t\tconst shadowWidgetWrapper = document.createElement('div');\n\t\tshadowWidgetWrapper.id = 'shadow-wrapper';\n\t\tshadowWidgetWrapper.style.position = 'absolute';\n\t\tshadowWidgetWrapper.style.zIndex = '20000000';\n\t\tdocument.body.append(shadowWidgetWrapper);\n\n\t\twidgetMountPoint = document.createElement('div');\n\t\tshadowWidgetWrapper.attachShadow({mode: 'open'}).append(widgetMountPoint);\n\n\t\tconst everyStyles: HTMLStyleElement | null =\n\t\t\tdocument.querySelector('#every-styles');\n\n\t\tif (everyStyles) {\n\t\t\tconst rules = Object.values(everyStyles.sheet?.cssRules ?? {})\n\t\t\t\t.map((rule) => rule.cssText)\n\t\t\t\t.join('\\n');\n\n\t\t\tconst everyShadowStyles = document.createElement('style');\n\t\t\teveryShadowStyles.id = 'every-shadow-styles';\n\t\t\teveryShadowStyles.innerHTML = resetcss + rules;\n\n\t\t\twidgetMountPoint.append(everyShadowStyles);\n\t\t}\n\t};\n\n\tconst renderWidget = () => {\n\t\tif (!widgetMountPoint) {\n\t\t\tmountWidget();\n\t\t}\n\n\t\tconst hash = window.location?.hash;\n\t\tconst shouldShowWidget =\n\t\t\thash ===\n\t\t\t`#${\n\t\t\t\tinstanceOptions?.openAt ?? baseOptions?.openAt ?? options?.openAt ?? ''\n\t\t\t}`;\n\n\t\tif (shouldShowWidget) {\n\t\t\tObject.assign(options, {show: true});\n\t\t}\n\n\t\tconst finalOptions: Partial = {\n\t\t\t...options,\n\t\t\t...baseOptions,\n\t\t\t...instanceOptions\n\t\t};\n\n\t\trender(\n\t\t\t,\n\t\t\twidgetMountPoint\n\t\t);\n\t};\n\n\tfunction showWidget() {\n\t\tObject.assign(options, {show: true});\n\t\trenderWidget();\n\t}\n\n\tfunction hideWidget() {\n\t\tObject.assign(options, {show: false});\n\t\trenderWidget();\n\t}\n\n\tfunction setOptions(newOptions: Partial) {\n\t\tObject.assign(baseOptions, newOptions);\n\t\trenderWidget();\n\t}\n\n\tfunction updateOptionsAndShowCb(newOptions: WidgetConfig) {\n\t\tconst optionsCopy = {...newOptions};\n\t\tObject.assign(options, {\n\t\t\topenAt: optionsCopy.openAt ?? DEFAULT_HASH_OPEN_WIDGET\n\t\t});\n\t\treturn (event: any) => {\n\t\t\tevent.preventDefault();\n\t\t\tinstanceOptions = optionsCopy;\n\t\t\tshowWidget();\n\t\t};\n\t}\n\n\tconst createButtonInSelector = ({\n\t\telement,\n\t\tselector,\n\t\t...options\n\t}: CreateButtonInSelectorProps) => {\n\t\tif (!element && !selector && !options.nonprofitSlug) {\n\t\t\tlog(\n\t\t\t\t'createButton():',\n\t\t\t\t'must provide element or selector or nonprofitSlug'\n\t\t\t);\n\t\t}\n\n\t\tconst nodes = getNodeList(element, selector);\n\n\t\tif (!nodes) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const buttonContainer of nodes) {\n\t\t\t// Search for an Every.org link inside the container\n\t\t\tconst buttonLink = buttonContainer.querySelector('a') ?? undefined;\n\t\t\tif (!options.nonprofitSlug && !buttonLink) {\n\t\t\t\tlog('no link in container', buttonContainer);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst href = buttonLink?.getAttribute('href') ?? undefined;\n\n\t\t\tif (!options.nonprofitSlug && !href) {\n\t\t\t\tlog('link lacks href', buttonLink);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We preserve it over any custom config passed\n\t\t\tconst finalOptions = {\n\t\t\t\t...instanceOptions,\n\t\t\t\t...options\n\t\t\t};\n\n\t\t\trender(, buttonContainer, buttonLink);\n\t\t}\n\t};\n\n\tconst createWidgetInSelector = ({\n\t\telement,\n\t\tselector,\n\t\t...options\n\t}: CreateWidgetInSelectorProps) => {\n\t\tif (!element && !selector) {\n\t\t\tlog('createWidget():', 'must provide element or selector');\n\t\t}\n\n\t\tconst nodes = getNodeList(element, selector);\n\t\tif (!nodes) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!options.nonprofitSlug) {\n\t\t\tlog('createWidget():', 'must provide nonprofitSlug');\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const node of nodes) {\n\t\t\tnode.addEventListener('click', updateOptionsAndShowCb(options));\n\t\t}\n\n\t\tObject.assign(baseOptions, options);\n\t\trenderWidget();\n\t};\n\n\twindow.everyDotOrgDonateButton = {\n\t\tcreateButton: createButtonInSelector,\n\t\tshowWidget,\n\t\tsetOptions,\n\t\tcreateWidget: createWidgetInSelector\n\t};\n}\n","'use strict';\n\nvar cache = {};\nvar prefix = 'x';\nvar rules = [];\nvar insert = function insert(rule) {\n return rules.push(rule);\n};\nvar hyph = function hyph(s) {\n return s.replace(/[A-Z]|^ms/g, '-$&').toLowerCase();\n};\nvar mx = function mx(rule, media) {\n return media ? media + '{' + rule + '}' : rule;\n};\nvar rx = function rx(cn, prop, val) {\n return '.' + cn + '{' + hyph(prop) + ':' + val + '}';\n};\nvar noAnd = function noAnd(s) {\n return s.replace(/&/g, '');\n};\n\nvar parse = function parse(obj) {\n var child = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var media = arguments[2];\n return Object.keys(obj).map(function (key) {\n var val = obj[key];\n if (val === null) return '';\n if (typeof val === 'object') {\n var m2 = /^@/.test(key) ? key : null;\n var c2 = m2 ? child : child + key;\n return parse(val, c2, m2 || media);\n }\n var _key = key + val + child + media;\n if (cache[_key]) return cache[_key];\n var className = prefix + rules.length.toString(36);\n insert(mx(rx(className + noAnd(child), key, val), media));\n cache[_key] = className;\n return className;\n }).join(' ');\n};\n\nmodule.exports = function () {\n for (var _len = arguments.length, styles = Array(_len), _key2 = 0; _key2 < _len; _key2++) {\n styles[_key2] = arguments[_key2];\n }\n\n return styles.map(function (style) {\n return parse(style);\n }).join(' ').trim();\n};\n\nmodule.exports.css = function () {\n return rules.sort().join('');\n};\n\nmodule.exports.reset = function () {\n cache = {};\n while (rules.length) {\n rules.pop();\n }\n};\n\nmodule.exports.prefix = function (val) {\n return prefix = val;\n};\n\n\nif (typeof document !== 'undefined') {\n const styles = document.createElement('style')\n styles.id = 'every-styles'\n var sheet = document.head.appendChild(styles).sheet;\n\n insert = function insert(rule) {\n const shadowRoot = document.querySelector('#shadow-wrapper')\n\n if(shadowRoot) {\n const everyShadowStyles = shadowRoot.shadowRoot.querySelector('#every-shadow-styles')\n \n everyShadowStyles.innerHTML += rule\n }\n\n rules.push(rule);\n sheet.insertRule(rule, sheet.cssRules.length);\n };\n}","import { slice } from './util';\nimport options from './options';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * constructor for this virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array} [children] The children of the virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != null) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, null);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\n\t\t// be set to dom.nextSibling which can return `null` and it is important\n\t\t// to be able to distinguish between an uninitialized _nextDom and\n\t\t// a _nextDom that has been set to `null`\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: original == null ? ++vnodeId : original\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == null && options.vnode != null) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: null };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is import('./internal').VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor === undefined;\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)\n\t\t\t: null;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != null && sibling._dom != null) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet vnode = component._vnode,\n\t\toldDom = vnode._dom,\n\t\tparentDom = component._parentDom;\n\n\tif (parentDom) {\n\t\tlet commitQueue = [],\n\t\t\trefQueue = [];\n\t\tconst oldVNode = assign({}, vnode);\n\t\toldVNode._original = vnode._original + 1;\n\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tvnode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tparentDom.ownerSVGElement !== undefined,\n\t\t\tvnode._hydrating != null ? [oldDom] : null,\n\t\t\tcommitQueue,\n\t\t\toldDom == null ? getDomSibling(vnode) : oldDom,\n\t\t\tvnode._hydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\tcommitRoot(commitQueue, vnode, refQueue);\n\n\t\tif (vnode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(vnode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\n\t\tvnode._dom = vnode._component.base = null;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != null && child._dom != null) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet c;\n\trerenderQueue.sort(depthSort);\n\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t// process() calls from getting scheduled while `queue` is still being consumed.\n\twhile ((c = rerenderQueue.shift())) {\n\t\tif (c._dirty) {\n\t\t\tlet renderQueueLength = rerenderQueue.length;\n\t\t\trenderComponent(c);\n\t\t\tif (rerenderQueue.length > renderQueueLength) {\n\t\t\t\t// When i.e. rerendering a provider additional new items can be injected, we want to\n\t\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t\t// single pass\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\t\t}\n\t}\n\tprocess._rerenderCount = 0;\n}\n\nprocess._rerenderCount = 0;\n","import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport { EMPTY_OBJ, EMPTY_ARR } from '../constants';\nimport { isArray } from '../util';\nimport { getDomSibling } from '../component';\n\n/**\n * Diff the children of a virtual node\n * @param {import('../internal').PreactElement} parentDom The DOM element whose\n * children are being diffed\n * @param {import('../internal').ComponentChildren[]} renderResult\n * @param {import('../internal').VNode} newParentVNode The new virtual\n * node whose children should be diff'ed against oldParentVNode\n * @param {import('../internal').VNode} oldParentVNode The old virtual\n * node whose children should be diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by getChildContext\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet i,\n\t\tj,\n\t\toldVNode,\n\t\tchildVNode,\n\t\tnewDom,\n\t\tfirstChildDom,\n\t\tskew = 0;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet oldChildrenLength = oldChildren.length,\n\t\tremainingOldChildren = oldChildrenLength,\n\t\tnewChildrenLength = renderResult.length;\n\n\tnewParentVNode._children = [];\n\tfor (i = 0; i < newChildrenLength; i++) {\n\t\tchildVNode = renderResult[i];\n\n\t\tif (\n\t\t\tchildVNode == null ||\n\t\t\ttypeof childVNode == 'boolean' ||\n\t\t\ttypeof childVNode == 'function'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = null;\n\t\t}\n\t\t// If this newVNode is being reused (e.g.
    {reuse}{reuse}
    ) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tnull,\n\t\t\t\tchildVNode,\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t} else if (isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if (childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t// const reuse =
    \n\t\t\t//
    {reuse}{reuse}
    \n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tchildVNode.ref ? childVNode.ref : null,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\t// Terser removes the `continue` here and wraps the loop body\n\t\t// in a `if (childVNode) { ... } condition\n\t\tif (childVNode == null) {\n\t\t\toldVNode = oldChildren[i];\n\t\t\tif (oldVNode && oldVNode.key == null && oldVNode._dom) {\n\t\t\t\tif (oldVNode._dom == oldDom) {\n\t\t\t\t\toldDom = getDomSibling(oldVNode);\n\t\t\t\t}\n\n\t\t\t\tunmount(oldVNode, oldVNode, false);\n\t\t\t\toldChildren[i] = null;\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\tlet skewedIndex = i + skew;\n\t\tconst matchingIndex = findMatchingIndex(\n\t\t\tchildVNode,\n\t\t\toldChildren,\n\t\t\tskewedIndex,\n\t\t\tremainingOldChildren\n\t\t);\n\n\t\tif (matchingIndex === -1) {\n\t\t\toldVNode = EMPTY_OBJ;\n\t\t} else {\n\t\t\toldVNode = oldChildren[matchingIndex] || EMPTY_OBJ;\n\t\t\toldChildren[matchingIndex] = undefined;\n\t\t\tremainingOldChildren--;\n\t\t}\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\tnewDom = childVNode._dom;\n\t\tif ((j = childVNode.ref) && oldVNode.ref != j) {\n\t\t\tif (oldVNode.ref) {\n\t\t\t\tapplyRef(oldVNode.ref, null, childVNode);\n\t\t\t}\n\t\t\trefQueue.push(j, childVNode._component || newDom, childVNode);\n\t\t}\n\n\t\tif (newDom != null) {\n\t\t\tif (firstChildDom == null) {\n\t\t\t\tfirstChildDom = newDom;\n\t\t\t}\n\n\t\t\tlet isMounting = oldVNode === EMPTY_OBJ || oldVNode._original === null;\n\t\t\tif (isMounting) {\n\t\t\t\tif (matchingIndex == -1) {\n\t\t\t\t\tskew--;\n\t\t\t\t}\n\t\t\t} else if (matchingIndex !== skewedIndex) {\n\t\t\t\tif (matchingIndex === skewedIndex + 1) {\n\t\t\t\t\tskew++;\n\t\t\t\t} else if (matchingIndex > skewedIndex) {\n\t\t\t\t\tif (remainingOldChildren > newChildrenLength - skewedIndex) {\n\t\t\t\t\t\tskew += matchingIndex - skewedIndex;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// ### Change from keyed: I think this was missing from the algo...\n\t\t\t\t\t\tskew--;\n\t\t\t\t\t}\n\t\t\t\t} else if (matchingIndex < skewedIndex) {\n\t\t\t\t\tif (matchingIndex == skewedIndex - 1) {\n\t\t\t\t\t\tskew = matchingIndex - skewedIndex;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tskew = 0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tskew = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tskewedIndex = i + skew;\n\n\t\t\tif (\n\t\t\t\ttypeof childVNode.type == 'function' &&\n\t\t\t\t(matchingIndex !== skewedIndex ||\n\t\t\t\t\toldVNode._children === childVNode._children)\n\t\t\t) {\n\t\t\t\toldDom = reorderChildren(childVNode, oldDom, parentDom);\n\t\t\t} else if (\n\t\t\t\ttypeof childVNode.type != 'function' &&\n\t\t\t\t(matchingIndex !== skewedIndex || isMounting)\n\t\t\t) {\n\t\t\t\toldDom = placeChild(parentDom, newDom, oldDom);\n\t\t\t} else if (childVNode._nextDom !== undefined) {\n\t\t\t\t// Only Fragments or components that return Fragment like VNodes will\n\t\t\t\t// have a non-undefined _nextDom. Continue the diff from the sibling\n\t\t\t\t// of last DOM child of this child VNode\n\t\t\t\toldDom = childVNode._nextDom;\n\n\t\t\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because\n\t\t\t\t// it is only used by `diffChildren` to determine where to resume the diff after\n\t\t\t\t// diffing Components and Fragments. Once we store it the nextDOM local var, we\n\t\t\t\t// can clean up the property\n\t\t\t\tchildVNode._nextDom = undefined;\n\t\t\t} else {\n\t\t\t\toldDom = newDom.nextSibling;\n\t\t\t}\n\n\t\t\tif (typeof newParentVNode.type == 'function') {\n\t\t\t\t// Because the newParentVNode is Fragment-like, we need to set it's\n\t\t\t\t// _nextDom property to the nextSibling of its last child DOM node.\n\t\t\t\t//\n\t\t\t\t// `oldDom` contains the correct value here because if the last child\n\t\t\t\t// is a Fragment-like, then oldDom has already been set to that child's _nextDom.\n\t\t\t\t// If the last child is a DOM VNode, then oldDom will be set to that DOM\n\t\t\t\t// node's nextSibling.\n\t\t\t\tnewParentVNode._nextDom = oldDom;\n\t\t\t}\n\t\t}\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\t// Remove remaining oldChildren if there are any.\n\tfor (i = oldChildrenLength; i--; ) {\n\t\tif (oldChildren[i] != null) {\n\t\t\tif (\n\t\t\t\ttypeof newParentVNode.type == 'function' &&\n\t\t\t\toldChildren[i]._dom != null &&\n\t\t\t\toldChildren[i]._dom == newParentVNode._nextDom\n\t\t\t) {\n\t\t\t\t// If the newParentVNode.__nextDom points to a dom node that is about to\n\t\t\t\t// be unmounted, then get the next sibling of that vnode and set\n\t\t\t\t// _nextDom to it\n\n\t\t\t\tnewParentVNode._nextDom = oldChildren[i]._dom.nextSibling;\n\t\t\t}\n\n\t\t\tunmount(oldChildren[i], oldChildren[i]);\n\t\t}\n\t}\n}\n\nfunction reorderChildren(childVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\tlet c = childVNode._children;\n\n\tlet tmp = 0;\n\tfor (; c && tmp < c.length; tmp++) {\n\t\tlet vnode = c[tmp];\n\t\tif (vnode) {\n\t\t\t// We typically enter this code path on sCU bailout, where we copy\n\t\t\t// oldVNode._children to newVNode._children. If that is the case, we need\n\t\t\t// to update the old children's _parent pointer to point to the newVNode\n\t\t\t// (childVNode here).\n\t\t\tvnode._parent = childVNode;\n\n\t\t\tif (typeof vnode.type == 'function') {\n\t\t\t\toldDom = reorderChildren(vnode, oldDom, parentDom);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(parentDom, vnode._dom, oldDom);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {import('../index').ComponentChildren} children The unflattened\n * children of a virtual node\n * @returns {import('../internal').VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == null || typeof children == 'boolean') {\n\t} else if (isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\nfunction placeChild(parentDom, newDom, oldDom) {\n\tif (oldDom == null || oldDom.parentNode !== parentDom) {\n\t\tparentDom.insertBefore(newDom, null);\n\t} else if (newDom != oldDom || newDom.parentNode == null) {\n\t\tparentDom.insertBefore(newDom, oldDom);\n\t}\n\n\treturn newDom.nextSibling;\n}\n\n/**\n * @param {import('../internal').VNode | string} childVNode\n * @param {import('../internal').VNode[]} oldChildren\n * @param {number} skewedIndex\n * @param {number} remainingOldChildren\n * @returns {number}\n */\nfunction findMatchingIndex(\n\tchildVNode,\n\toldChildren,\n\tskewedIndex,\n\tremainingOldChildren\n) {\n\tconst key = childVNode.key;\n\tconst type = childVNode.type;\n\tlet x = skewedIndex - 1;\n\tlet y = skewedIndex + 1;\n\tlet oldVNode = oldChildren[skewedIndex];\n\n\tif (\n\t\toldVNode === null ||\n\t\t(oldVNode && key == oldVNode.key && type === oldVNode.type)\n\t) {\n\t\treturn skewedIndex;\n\t} else if (remainingOldChildren > (oldVNode != null ? 1 : 0)) {\n\t\twhile (x >= 0 || y < oldChildren.length) {\n\t\t\tif (x >= 0) {\n\t\t\t\toldVNode = oldChildren[x];\n\t\t\t\tif (oldVNode && key == oldVNode.key && type === oldVNode.type) {\n\t\t\t\t\treturn x;\n\t\t\t\t}\n\t\t\t\tx--;\n\t\t\t}\n\n\t\t\tif (y < oldChildren.length) {\n\t\t\t\toldVNode = oldChildren[y];\n\t\t\t\tif (oldVNode && key == oldVNode.key && type === oldVNode.type) {\n\t\t\t\t\treturn y;\n\t\t\t\t}\n\t\t\t\ty++;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn -1;\n}\n","import { IS_NON_DIMENSIONAL } from '../constants';\nimport options from '../options';\n\n/**\n * Diff the old and new properties of a VNode and apply changes to the DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to apply\n * changes to\n * @param {object} newProps The new props\n * @param {object} oldProps The old props\n * @param {boolean} isSvg Whether or not this node is an SVG node\n * @param {boolean} hydrate Whether or not we are in hydration mode\n */\nexport function diffProps(dom, newProps, oldProps, isSvg, hydrate) {\n\tlet i;\n\n\tfor (i in oldProps) {\n\t\tif (i !== 'children' && i !== 'key' && !(i in newProps)) {\n\t\t\tsetProperty(dom, i, null, oldProps[i], isSvg);\n\t\t}\n\t}\n\n\tfor (i in newProps) {\n\t\tif (\n\t\t\t(!hydrate || typeof newProps[i] == 'function') &&\n\t\t\ti !== 'children' &&\n\t\t\ti !== 'key' &&\n\t\t\ti !== 'value' &&\n\t\t\ti !== 'checked' &&\n\t\t\toldProps[i] !== newProps[i]\n\t\t) {\n\t\t\tsetProperty(dom, i, newProps[i], oldProps[i], isSvg);\n\t\t}\n\t}\n}\n\nfunction setStyle(style, key, value) {\n\tif (key[0] === '-') {\n\t\tstyle.setProperty(key, value == null ? '' : value);\n\t} else if (value == null) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, isSvg) {\n\tlet useCapture;\n\n\to: if (name === 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] !== oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] === 'o' && name[1] === 'n') {\n\t\tuseCapture = name !== (name = name.replace(/(PointerCapture)$|Capture$/, '$1'));\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (name.toLowerCase() in dom) name = name.toLowerCase().slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\t\tdom.addEventListener(name, handler, useCapture);\n\t\t\t}\n\t\t} else {\n\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\tdom.removeEventListener(name, handler, useCapture);\n\t\t}\n\t} else if (name !== 'dangerouslySetInnerHTML') {\n\t\tif (isSvg) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname !== 'width' &&\n\t\t\tname !== 'height' &&\n\t\t\tname !== 'href' &&\n\t\t\tname !== 'list' &&\n\t\t\tname !== 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname !== 'tabIndex' &&\n\t\t\tname !== 'download' &&\n\t\t\tname !== 'rowSpan' &&\n\t\t\tname !== 'colSpan' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == null ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value === 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != null && (value !== false || name[4] === '-')) {\n\t\t\tdom.setAttribute(name, value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n\treturn this._listeners[e.type + false](options.event ? options.event(e) : e);\n}\n\nfunction eventProxyCapture(e) {\n\treturn this._listeners[e.type + true](options.event ? options.event(e) : e);\n}\n","import { EMPTY_OBJ } from '../constants';\nimport { Component, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { diffProps, setProperty } from './props';\nimport { assign, isArray, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').PreactElement} parentDom The parent of the DOM element\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by getChildContext\n * @param {boolean} isSvg Whether or not this element is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== undefined) return null;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._hydrating != null) {\n\t\tisHydrating = oldVNode._hydrating;\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\t// if we resume, we want the tree to be \"unlocked\"\n\t\tnewVNode._hydrating = null;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\touter: if (typeof newType == 'function') {\n\t\ttry {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\t\t// @ts-ignore The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-ignore Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new Component(newProps, componentContext);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (c._nextState == null) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\n\t\t\tif (newType.getDerivedStateFromProps != null) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\t\t\tc._vnode = newVNode;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tc.componentWillMount != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidMount != null) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!c._force &&\n\t\t\t\t\t((c.shouldComponentUpdate != null &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\t\tnewVNode._original === oldVNode._original)\n\t\t\t\t) {\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) {\n\t\t\t\t\t\t// When we are dealing with a bail because of sCU we have to update\n\t\t\t\t\t\t// the props, state and dirty-state.\n\t\t\t\t\t\t// when we are dealing with strict-equality we don't as the child could still\n\t\t\t\t\t\t// be dirtied see #3883\n\t\t\t\t\t\tc.props = newProps;\n\t\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t\tc._dirty = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.forEach(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t\t}\n\t\t\t\t\tc._stateCallbacks = [];\n\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != null) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidUpdate != null) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc._parentDom = parentDom;\n\t\t\tc._force = false;\n\n\t\t\tlet renderHook = options._render,\n\t\t\t\tcount = 0;\n\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\tc.state = c._nextState;\n\t\t\t\tc._dirty = false;\n\n\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t}\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t} else {\n\t\t\t\tdo {\n\t\t\t\t\tc._dirty = false;\n\t\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\t\t// Handle setState called in render, see #2553\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t} while (c._dirty && ++count < 25);\n\t\t\t}\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != null) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != null && tmp.type === Fragment && tmp.key == null;\n\t\t\tlet renderResult = isTopLevelFragment ? tmp.props.children : tmp;\n\n\t\t\tdiffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tisArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._hydrating = null;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = null;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tnewVNode._original = null;\n\t\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\t\tif (isHydrating || excessDomChildren != null) {\n\t\t\t\tnewVNode._dom = oldDom;\n\t\t\t\tnewVNode._hydrating = !!isHydrating;\n\t\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = null;\n\t\t\t\t// ^ could possibly be simplified to:\n\t\t\t\t// excessDomChildren.length = 0;\n\t\t\t}\n\t\t\toptions._catchError(e, newVNode, oldVNode);\n\t\t}\n\t} else if (\n\t\texcessDomChildren == null &&\n\t\tnewVNode._original === oldVNode._original\n\t) {\n\t\tnewVNode._children = oldVNode._children;\n\t\tnewVNode._dom = oldVNode._dom;\n\t} else {\n\t\tnewVNode._dom = diffElementNodes(\n\t\t\toldVNode._dom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\t}\n\n\tif ((tmp = options.diffed)) tmp(newVNode);\n}\n\n/**\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').VNode} root\n */\nexport function commitRoot(commitQueue, root, refQueue) {\n\tfor (let i = 0; i < refQueue.length; i++) {\n\t\tapplyRef(refQueue[i], refQueue[++i], refQueue[++i]);\n\t}\n\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-ignore Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-ignore See above ts-ignore on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {import('../internal').PreactElement} dom The DOM element representing\n * the virtual nodes being diffed\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {*} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n * @returns {import('../internal').PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating,\n\trefQueue\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = newVNode.type;\n\tlet i = 0;\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tif (nodeType === 'svg') isSvg = true;\n\n\tif (excessDomChildren != null) {\n\t\tfor (; i < excessDomChildren.length; i++) {\n\t\t\tconst child = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tchild &&\n\t\t\t\t'setAttribute' in child === !!nodeType &&\n\t\t\t\t(nodeType ? child.localName === nodeType : child.nodeType === 3)\n\t\t\t) {\n\t\t\t\tdom = child;\n\t\t\t\texcessDomChildren[i] = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == null) {\n\t\tif (nodeType === null) {\n\t\t\t// @ts-ignore createTextNode returns Text, we expect PreactElement\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tif (isSvg) {\n\t\t\tdom = document.createElementNS(\n\t\t\t\t'http://www.w3.org/2000/svg',\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType\n\t\t\t);\n\t\t} else {\n\t\t\tdom = document.createElement(\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType,\n\t\t\t\tnewProps.is && newProps\n\t\t\t);\n\t\t}\n\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = null;\n\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\n\t\tisHydrating = false;\n\t}\n\n\tif (nodeType === null) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data !== newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\tlet oldHtml = oldProps.dangerouslySetInnerHTML;\n\t\tlet newHtml = newProps.dangerouslySetInnerHTML;\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tif (!isHydrating) {\n\t\t\t// But, if we are in a situation where we are using existing DOM (e.g. replaceNode)\n\t\t\t// we should read the existing DOM attributes to diff them\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\toldProps = {};\n\t\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\t\toldProps[dom.attributes[i].name] = dom.attributes[i].value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (newHtml || oldHtml) {\n\t\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\t\tif (\n\t\t\t\t\t!newHtml ||\n\t\t\t\t\t((!oldHtml || newHtml.__html != oldHtml.__html) &&\n\t\t\t\t\t\tnewHtml.__html !== dom.innerHTML)\n\t\t\t\t) {\n\t\t\t\t\tdom.innerHTML = (newHtml && newHtml.__html) || '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdiffProps(dom, newProps, oldProps, isSvg, isHydrating);\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\ti = newVNode.props.children;\n\t\t\tdiffChildren(\n\t\t\t\tdom,\n\t\t\t\tisArray(i) ? i : [i],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg && nodeType !== 'foreignObject',\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tif (excessDomChildren[i] != null) removeNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// (as above, don't diff props during hydration)\n\t\tif (!isHydrating) {\n\t\t\tif (\n\t\t\t\t'value' in newProps &&\n\t\t\t\t(i = newProps.value) !== undefined &&\n\t\t\t\t// #2756 For the -element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(i !== dom.value ||\n\t\t\t\t\t(nodeType === 'progress' && !i) ||\n\t\t\t\t\t// This is only for IE 11 to fix \n\tif (\n\t\ttype == 'select' &&\n\t\tnormalizedProps.multiple &&\n\t\tArray.isArray(normalizedProps.value)\n\t) {\n\t\t// forEach() always returns undefined, which we abuse here to unset the value prop.\n\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\tchild.props.selected =\n\t\t\t\tnormalizedProps.value.indexOf(child.props.value) != -1;\n\t\t});\n\t}\n\n\t// Adding support for defaultValue in select tag\n\tif (type == 'select' && normalizedProps.defaultValue != null) {\n\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\tif (normalizedProps.multiple) {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.defaultValue.indexOf(child.props.value) != -1;\n\t\t\t} else {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.defaultValue == child.props.value;\n\t\t\t}\n\t\t});\n\t}\n\n\tif (props.class && !props.className) {\n\t\tnormalizedProps.class = props.class;\n\t\tObject.defineProperty(\n\t\t\tnormalizedProps,\n\t\t\t'className',\n\t\t\tclassNameDescriptorNonEnumberable\n\t\t);\n\t} else if (props.className && !props.class) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t} else if (props.class && props.className) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t}\n\n\tvnode.props = normalizedProps;\n}\n\nlet oldVNodeHook = options.vnode;\noptions.vnode = vnode => {\n\t// only normalize props on Element nodes\n\tif (typeof vnode.type === 'string') {\n\t\thandleDomVNode(vnode);\n\t}\n\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n// Only needed for react-relay\nlet currentComponent;\nconst oldBeforeRender = options._render;\noptions._render = function (vnode) {\n\tif (oldBeforeRender) {\n\t\toldBeforeRender(vnode);\n\t}\n\tcurrentComponent = vnode._component;\n};\n\nconst oldDiffed = options.diffed;\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions.diffed = function (vnode) {\n\tif (oldDiffed) {\n\t\toldDiffed(vnode);\n\t}\n\n\tconst props = vnode.props;\n\tconst dom = vnode._dom;\n\n\tif (\n\t\tdom != null &&\n\t\tvnode.type === 'textarea' &&\n\t\t'value' in props &&\n\t\tprops.value !== dom.value\n\t) {\n\t\tdom.value = props.value == null ? '' : props.value;\n\t}\n\n\tcurrentComponent = null;\n};\n\n// This is a very very private internal function for React it\n// is used to sort-of do runtime dependency injection. So far\n// only `react-relay` makes use of it. It uses it to read the\n// context value.\nexport const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {\n\tReactCurrentDispatcher: {\n\t\tcurrent: {\n\t\t\treadContext(context) {\n\t\t\t\treturn currentComponent._globalContext[context._id].props.value;\n\t\t\t}\n\t\t}\n\t}\n};\n","import {\n\tCryptoCurrency,\n\tCryptoCurrencyConfig\n} from 'src/components/widget/types/Crypto';\nimport {getCloudinaryUrl} from 'src/helpers/getCloudinaryUrl';\n\nfunction getSrcForCryptoIcon(currency: CryptoCurrency) {\n\tconst config = CryptoCurrencyConfig[currency];\n\n\tif ('icon' in config) {\n\t\treturn config.icon;\n\t}\n\n\treturn getCloudinaryUrl(config.iconCloudinaryId, {width: 24, height: 24});\n}\n\nexport const CryptoCurrencyIcon = ({currency}: {currency: CryptoCurrency}) => {\n\treturn (\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {filter as fuzzyFilter} from 'fuzzy';\nimport {useRef, useState} from 'preact/hooks';\nimport {Fragment} from 'preact/jsx-runtime';\nimport {linkCss} from 'src/components/widget/components/FundraiserLink/styles';\nimport {\n\tcryptoSelectorDropDownItemCss,\n\tcryptoSelectorInputContainerCss,\n\tinputContainerWithDropDownCss,\n\tcryptoSelectorContainerCss,\n\tcryptoSelectorInputSufixCss,\n\tcryptoSelectorDropDownContainerCss,\n\tcryptoSelectorDropDownContentCss,\n\tquickSelectOptionsListCss\n} from 'src/components/widget/components/PaymentProcess/CryptoFlow/styles';\nimport {\n\tdonationAmountInputContainerErrorCss,\n\tdonationAmountInputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {TextInput} from 'src/components/widget/components/TextInput';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {ArrowIcon} from 'src/components/widget/icons/ArrowIcon';\nimport {CryptoCurrencyIcon} from 'src/components/widget/icons/CryptoCurrencyIcon';\nimport {SearchIcon} from 'src/components/widget/icons/SearchIcon';\nimport {\n\tCryptoCurrency,\n\tSharedCryptoCurrencyConfig,\n\tCryptoCurrencyOption,\n\tDISABLED_TOKENS\n} from 'src/components/widget/types/Crypto';\nimport {CRYPTO_EMAIL} from 'src/constants/url';\nimport joinClassNames from 'src/helpers/joinClassNames';\nimport {mailToLink} from 'src/helpers/mailToLink';\n\nexport function displayLabelForCryptoCurrency(cc: CryptoCurrency) {\n\tconst config = SharedCryptoCurrencyConfig[cc];\n\treturn `${config.displayName} (${config.abbreviation})`;\n}\n\nexport function displayContractTypeForCryptoCurrency(cc: CryptoCurrency) {\n\tconst config = SharedCryptoCurrencyConfig[cc];\n\treturn `${config.contractType ? `${config.contractType}` : ''}`;\n}\n\nfunction cryptoCurrencyToOption(cc: CryptoCurrency): CryptoCurrencyOption {\n\treturn {\n\t\tvalue: cc,\n\t\tlabel: displayLabelForCryptoCurrency(cc),\n\t\tcontractType: displayContractTypeForCryptoCurrency(cc)\n\t};\n}\n\nconst quickSelectTokens = new Set([\n\tCryptoCurrency.BTC,\n\tCryptoCurrency.ETH,\n\tCryptoCurrency.USDC\n]);\n\nconst enabledCryptoCurrencyOptions: CryptoCurrencyOption[] = [];\nconst quickSelectOptions: CryptoCurrencyOption[] = [];\nconst otherOptions: CryptoCurrencyOption[] = [];\n\nObject.values(CryptoCurrency).forEach((value) => {\n\tconst option = cryptoCurrencyToOption(value);\n\tif (!DISABLED_TOKENS.includes(value)) {\n\t\tenabledCryptoCurrencyOptions.push(option);\n\n\t\tif (quickSelectTokens.has(value)) {\n\t\t\tquickSelectOptions.push(option);\n\t\t} else {\n\t\t\totherOptions.push(option);\n\t\t}\n\t}\n});\n\nexport const MAX_CRYPTO_DECIMALS_FOR_DISPLAY = 7;\n\nconst CryptoSelectorDropDownItem = ({\n\tonClick,\n\toption\n}: {\n\tonClick: (option: CryptoCurrencyOption) => void;\n\toption: CryptoCurrencyOption;\n}) => (\n\t
  • \n\t\t {\n\t\t\t\tonClick(option);\n\t\t\t}}\n\t\t>\n\t\t\t\n\t\t\t{option.label}\n\t\t\t{option.contractType}\n\t\t\n\t
  • \n);\n\nconst CryptoSupprotLink = () => {\n\tconst nonprofit = useNonprofitOrError();\n\n\tconst {primaryColor} = useConfigContext();\n\tconst cryptoSupportBody = `Contents: I would like to make a crypto donation to support https://www.every.org/${nonprofit.primarySlug}.\\n\\nMy name:\\nToken name:\\nToken symbol:\\nToken quantity:\\n\\nPlease reply back with an address where I can donate, as this is worth over $5,000 USD.`;\n\n\treturn (\n\t\t\n\t\t\t{CRYPTO_EMAIL}\n\t\t\n\t);\n};\n\nexport const CryptoSelector = () => {\n\tconst {submitError, cryptoCurrency, setCryptoCurrency} = useWidgetContext();\n\tconst {primaryColor} = useConfigContext();\n\n\tconst inputRef = useRef(null);\n\tconst [selectedOption, setSelectedOption] = useState<\n\t\tCryptoCurrencyOption | undefined\n\t>(\n\t\tenabledCryptoCurrencyOptions.find(\n\t\t\t(option) => option.value === cryptoCurrency\n\t\t)\n\t);\n\n\tconst [inputValue, setInputValue] = useState(selectedOption?.label);\n\n\tconst [showDropDown, setShowDrowDown] = useState(!selectedOption);\n\n\tconst handleItemClick = (option: CryptoCurrencyOption) => {\n\t\tsetSelectedOption(option);\n\t\tsetCryptoCurrency(option.value);\n\t\tsetInputValue(option.label);\n\t\tsetShowDrowDown(false);\n\t};\n\n\tconst handleInputFocus = () => {\n\t\tsetSelectedOption(undefined);\n\t\tsetCryptoCurrency(undefined);\n\t\tsetShowDrowDown(true);\n\t\tsetInputValue('');\n\t};\n\n\tconst handleInput = (value: string) => {\n\t\tsetInputValue(value);\n\t\tsetSelectedOption(undefined);\n\t\tsetCryptoCurrency(undefined);\n\t\tsetShowDrowDown(true);\n\t};\n\n\tconst handleContainerClick = () => {\n\t\tinputRef.current?.focus();\n\t\thandleInputFocus();\n\t};\n\n\tconst inputContainerClasses = joinClassNames([\n\t\tcryptoSelectorInputContainerCss,\n\t\t...(submitError ? [donationAmountInputContainerErrorCss] : []),\n\t\t...(showDropDown ? [inputContainerWithDropDownCss] : [])\n\t]);\n\n\tconst optionToListItem = (option: CryptoCurrencyOption) => (\n\t\t\n\t);\n\n\tconst filteredOptions = inputValue\n\t\t? fuzzyFilter(inputValue, enabledCryptoCurrencyOptions, {\n\t\t\t\textract: (option) => {\n\t\t\t\t\tconst config = SharedCryptoCurrencyConfig[option.value];\n\t\t\t\t\treturn [config.displayName, config.abbreviation].join(' ');\n\t\t\t\t}\n\t\t }).map((element) => element.original)\n\t\t: undefined;\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tprefixClassName={cxs({display: 'inline-flex'})}\n\t\t\t\tsufixClassName={cryptoSelectorInputSufixCss(primaryColor, showDropDown)}\n\t\t\t\tcontainerClassName={inputContainerClasses}\n\t\t\t\tsufix={\n\t\t\t\t\t\n\t\t\t\t\t\t{selectedOption?.contractType} \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tonInput={(event) => {\n\t\t\t\t\thandleInput(event.currentTarget.value);\n\t\t\t\t}}\n\t\t\t\tonFocus={handleInputFocus}\n\t\t\t/>\n\t\t\t{showDropDown && (\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t{filteredOptions ? (\n\t\t\t\t\t\t\tfilteredOptions.length === 0 ? (\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\tWe don't currently support this coin on our site, but for\n\t\t\t\t\t\t\t\t\tdonations worth over $5,000 USD we can do it manually. Please\n\t\t\t\t\t\t\t\t\temail to arrange.\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{filteredOptions.map((option) => optionToListItem(option))}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{quickSelectOptions.map((option) => optionToListItem(option))}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{otherOptions.map((option) => optionToListItem(option))}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t)}\n\t\t
    \n\t);\n};\n","const DefaultLocale = 'en-US';\n\nexport function displayCurrencyValue(\n\tvalue: string | number,\n\tcurrency: string,\n\toptions?: {showCurrency?: boolean}\n): string {\n\tconst amountString = new Intl.NumberFormat(DefaultLocale, {\n\t\tstyle: 'currency',\n\t\tcurrency\n\t}).format(Number.parseFloat(value.toString()));\n\n\t// remove 0 cents if present, tolerant to different locale formats\n\t// https://stackoverflow.com/a/49724581\n\tconst formatted = `${amountString.replace(/\\D00(?=\\D*$)/, '')} ${\n\t\toptions?.showCurrency ? ` ${currency}` : ''\n\t}`;\n\n\treturn formatted;\n}\n","import {CryptoCurrency} from 'src/components/widget/types/Crypto';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nexport function getSubmitButtonText({\n\tmethod,\n\tpaymentRequestIsApplePay,\n\tcryptoCurrency\n}: {\n\tmethod: PaymentMethod;\n\tpaymentRequestIsApplePay?: boolean;\n\tcryptoCurrency?: CryptoCurrency;\n}) {\n\tconst base = 'Continue with ';\n\tswitch (method) {\n\t\tcase PaymentMethod.CREDIT_CARD:\n\t\t\treturn base + 'credit or debit';\n\t\tcase PaymentMethod.BANK:\n\t\t\treturn base + 'bank';\n\t\tcase PaymentMethod.PAYPAL:\n\t\t\treturn base + 'PayPal';\n\t\tcase PaymentMethod.VENMO:\n\t\t\treturn base + 'Venmo';\n\t\tcase PaymentMethod.PAYMENT_REQUEST:\n\t\t\treturn base + (paymentRequestIsApplePay ? 'Apple Pay' : 'Google Pay');\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn base + 'Chariot';\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn base + (cryptoCurrency ?? 'crypto');\n\t\tcase PaymentMethod.GIFT_CARD:\n\t\t\treturn 'Redeem gift card';\n\t\tdefault:\n\t\t\treturn 'Continue';\n\t}\n}\n","import {render as preactRender} from 'preact';\nimport EmbedButton from 'src/components/embed-button';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {parseDonateUrl} from 'src/helpers/parseDonateUrl';\nimport {loadFonts} from 'src/loadFonts';\nimport {WidgetLoader} from 'src/loaders/Widgetloader';\nimport resetcss from 'src/resetCss';\n\nconst OBSERVER_OPTIONS = {\n\tchildList: true,\n\tsubtree: true,\n\tattributeFilter: ['href']\n};\n\ninterface CreateButtonProps extends Partial {\n\telement: Element;\n\tnonprofitSlug: string;\n\tonClick: () => void;\n\turl?: string;\n}\n\ninterface CreateWidgetProps extends Partial {\n\tnonprofitSlug: string;\n}\n\nlet shadowRoot: ShadowRoot;\nlet widgetContainer: HTMLElement;\nconst widgetsMap = new Map();\n\nclass WidgetController {\n\toptions: CreateWidgetProps;\n\tmountPoint: HTMLElement;\n\tconstructor(options: CreateWidgetProps, mountPoint: HTMLElement) {\n\t\tthis.options = options;\n\t\tthis.mountPoint = mountPoint;\n\t}\n\n\thide() {\n\t\tthis.options.show = false;\n\t\tthis.render();\n\t}\n\n\tshow() {\n\t\tthis.options.show = true;\n\t\tthis.render();\n\t}\n\n\tsetOptions(options: WidgetConfig) {\n\t\tthis.options = options;\n\t\tthis.render();\n\t}\n\n\trender() {\n\t\tpreactRender(\n\t\t\t {\n\t\t\t\t\tthis.hide();\n\t\t\t\t}}\n\t\t\t/>,\n\t\t\tthis.mountPoint\n\t\t);\n\t}\n}\n\nfunction mountShadowRoot() {\n\tconst shadowWidgetWrapper = document.createElement('div');\n\tshadowWidgetWrapper.id = 'shadow-wrapper';\n\tshadowWidgetWrapper.style.position = 'absolute';\n\tshadowWidgetWrapper.style.zIndex = '20000000';\n\tdocument.body.append(shadowWidgetWrapper);\n\tshadowRoot = shadowWidgetWrapper.attachShadow({mode: 'open'});\n}\n\nfunction mountWidgetContainer() {\n\tif (!shadowRoot) {\n\t\tmountShadowRoot();\n\t}\n\n\twidgetContainer = document.createElement('div');\n\twidgetContainer.id = 'widget-container';\n\tshadowRoot.append(widgetContainer);\n\n\tconst everyStyles: HTMLStyleElement | null =\n\t\tdocument.querySelector('#every-styles');\n\n\tif (everyStyles) {\n\t\tconst rules = Object.values(everyStyles.sheet?.cssRules ?? {})\n\t\t\t.map((rule) => rule.cssText)\n\t\t\t.join('\\n');\n\n\t\tconst everyShadowStyles = document.createElement('style');\n\t\teveryShadowStyles.id = 'every-shadow-styles';\n\t\teveryShadowStyles.innerHTML = resetcss + rules;\n\n\t\twidgetContainer.append(everyShadowStyles);\n\t}\n}\n\nfunction createWidget(options: CreateWidgetProps, urlString: string) {\n\tif (!widgetContainer) {\n\t\tmountWidgetContainer();\n\t}\n\n\tconst widgetMountPoint = document.createElement('div');\n\twidgetContainer.append(widgetMountPoint);\n\n\tconst widget = new WidgetController(options, widgetMountPoint);\n\twidgetsMap.set(urlString, widget);\n\treturn widget;\n}\n\nfunction createButton({element, ...options}: CreateButtonProps) {\n\tif (!element.parentNode) {\n\t\treturn;\n\t}\n\n\tconst buttonContainer = element.parentNode as HTMLElement;\n\n\tpreactRender(, buttonContainer, element);\n}\n\nfunction findAndReplaceLinks() {\n\tconst links = document.querySelectorAll(\"*[href^='https://www.every.org/']\");\n\n\tlinks.forEach((link) => {\n\t\tconst urlString = link.getAttribute('href');\n\t\tif (urlString?.includes('#/donate')) {\n\t\t\tconst options = parseDonateUrl(urlString);\n\n\t\t\tif (!options) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst widget =\n\t\t\t\twidgetsMap.get(urlString) ?? createWidget(options, urlString);\n\n\t\t\tif (link.getAttribute('data-every-style') === null) {\n\t\t\t\tlink.addEventListener('click', (event) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\twidget.show();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tcreateButton({\n\t\t\t\t\telement: link,\n\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\twidget.show();\n\t\t\t\t\t},\n\t\t\t\t\t...options,\n\t\t\t\t\turl: urlString\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n}\n\nexport default function autoPlayMode() {\n\tloadFonts();\n\tfindAndReplaceLinks();\n\n\tconst observer = new MutationObserver((mutations, observer) => {\n\t\t// disconnect before changing DOM so as not to cause an infinite loop\n\t\tobserver.disconnect();\n\n\t\tconst isLinksChanged = Boolean(\n\t\t\tmutations.some((mutation) => mutation.target.nodeName === 'A')\n\t\t);\n\n\t\tif (isLinksChanged) {\n\t\t\tfindAndReplaceLinks();\n\t\t}\n\n\t\tobserver.observe(document, OBSERVER_OPTIONS);\n\t});\n\n\tobserver.observe(document, OBSERVER_OPTIONS);\n}\n\ndeclare const window: Window &\n\ttypeof globalThis & {\n\t\tWebKitMutationObserver: MutationObserver;\n\t\tMozMutationObserver: MutationObserver;\n\t};\n\nconst MutationObserver =\n\twindow.MutationObserver ||\n\twindow.WebKitMutationObserver ||\n\twindow.MozMutationObserver;\n","export default function getScriptParameters() {\n\tconst parametersString = document.currentScript\n\t\t?.getAttribute('src')\n\t\t?.split('?')[1];\n\tconst parametersArray = parametersString\n\t\t?.split('&')\n\t\t.map((parameterString) => {\n\t\t\tconst [key, value] = parameterString.split('=');\n\t\t\treturn [key, value];\n\t\t});\n\tconst parametersObject =\n\t\tparametersArray && Object.fromEntries(parametersArray);\n\n\treturn parametersObject;\n}\n","export enum FontFamily {\n\tBasisGrotesque = `'Basis Grotesque Pro', -apple-system, BlinkMacSystemFont,\n 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Roboto,\n sans-serif`\n}\n","import cxs from 'cxs';\nimport {FontFamily} from 'src/components/widget/theme/font-family';\n\ncxs.prefix('every-embedded-');\n\nexport const buttonCss = cxs({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\twidth: 'max-content',\n\tborder: 'none',\n\toutline: 'none',\n\tfontFamily: FontFamily.BasisGrotesque,\n\tfontWeight: 500,\n\tlineHeight: 1,\n\tcursor: 'pointer',\n\ttextDecoration: 'none',\n\tbackfaceVisibility: 'hidden',\n\ttransition: 'background-color 0.25s',\n\n\tpadding: '12px 20px',\n\tcolor: '#fff',\n\tbackgroundColor: '#00a380',\n\tborderRadius: '100px',\n\tfontSize: '16px',\n\t'&:hover': {backgroundColor: '#2F806D'}\n});\n\nexport const logoCss = cxs({\n\twidth: '16px',\n\theight: '16px',\n\tfill: '#fff',\n\tmarginRight: '8px'\n});\n\nexport const verticalCenterTextCss = cxs({\n\ttransform: 'translateY(0.08em)'\n});\n","export const BASE_URL = 'https://www.every.org/';\nexport const BASE_API_URL = 'https://partners.every.org/v0.2/nonprofit';\nexport const BASE_CLOUDINARY_URL =\n\t'https://res.cloudinary.com/everydotorg/image/upload/';\nexport const BASE_COINGECKO_URL = 'https://api.coingecko.com/api/v3';\n\nexport const SUPPORT_EMAIL = 'support@every.org';\nexport const TEAM_EMAIL = 'team@every.org';\nexport const CRYPTO_EMAIL = 'crypto@every.org';\n\nexport const TERMS_ROUTE = 'terms';\nexport const HELP_ROUTE = 'support';\nexport const PRIVACY_ROUTE = 'privacy';\nexport const ABOUT_ROUTE = 'about-us';\nexport const FUNDRAISER_ROUTE = 'fundraiser';\nexport const GIFT_CARD_ROUTE = 'gift';\n\nexport const TERMS_URL = BASE_URL + TERMS_ROUTE;\nexport const HELP_URL = BASE_URL + HELP_ROUTE;\nexport const PRIVACY_URL = BASE_URL + PRIVACY_ROUTE;\nexport const ABOUT_URL = BASE_URL + ABOUT_ROUTE;\nexport const GIFT_CARD_URL = BASE_URL + GIFT_CARD_ROUTE;\n","import {\n\tbuttonCss,\n\tlogoCss,\n\tverticalCenterTextCss\n} from 'src/components/embed-button/styles';\nimport {EmbedButtonOptions} from 'src/components/embed-button/types';\nimport {constructBasicDonateUrl} from 'src/helpers/constructDonateUrl';\n\n/**\n * Used to identify if a link is a donate button\n */\nconst EmbedButton = ({\n\twithLogo = true,\n\ttextColor = '#fff',\n\tbgColor = '#00a380',\n\tborderRadius = '100px',\n\tfontSize = '16px',\n\tpadding = '12px 20px',\n\tclassName,\n\tonClick,\n\ttarget = '_blank',\n\turl: initialUrl,\n\tlabel = 'Donate',\n\t...donateOptions\n}: EmbedButtonOptions) => {\n\tconst url = initialUrl ? initialUrl : constructBasicDonateUrl(donateOptions);\n\treturn (\n\t\t {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tonClick();\n\t\t\t\t\t }\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t>\n\t\t\t{withLogo && (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t)}\n\t\t\t{label}\n\t\t\n\t);\n};\n\nexport default EmbedButton;\n","export enum DonationFrequency {\n\tMonthly = 'monthly',\n\tOneTime = 'once',\n\tUnselected = ''\n}\n","export enum PaymentMethod {\n\tCREDIT_CARD = 'card',\n\tBANK = 'bank',\n\tPAYPAL = 'paypal',\n\tVENMO = 'venmo',\n\tPAYMENT_REQUEST = 'pay',\n\tCRYPTO = 'crypto',\n\tSTOCKS = 'stocks',\n\tDAF = 'daf',\n\tGIFT_CARD = 'gift'\n}\n\nexport const OneTimeFrequencyMethods = [\n\tPaymentMethod.VENMO,\n\tPaymentMethod.DAF,\n\tPaymentMethod.CRYPTO,\n\tPaymentMethod.STOCKS\n];\n\nexport const AvailablePaymentMethods = Object.values(PaymentMethod);\nexport const DefaultPaymentMethods = AvailablePaymentMethods.filter(\n\t(pm) => pm !== PaymentMethod.GIFT_CARD\n);\nexport interface PaymentRequestAvailable {\n\tgooglePay: boolean;\n\tapplePay: boolean;\n}\n","export const loadFonts = () => {\n\tconst fonts = document.createElement('style');\n\tfonts.innerHTML = `\n @font-face {\n font-family: \"Basis Grotesque Pro\";\n src: local(\"Basis Grotesque Pro\"), local(\"Basis Grotesque Pro\"),\n url(https://assets.every.org/every-month/BasisGrotesque-Regular-Pro.woff2) format(\"woff2\");\n font-weight: 400;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: \"Basis Grotesque Pro\";\n src: local(\"Basis Grotesque Pro\"), local(\"Basis Grotesque Pro\"),\n url(https://assets.every.org/every-month/BasisGrotesque-Bold-Pro.woff2) format(\"woff2\");\n font-weight: bold;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: \"Basis Grotesque Pro\";\n src: local(\"Basis Grotesque Pro\"), local(\"Basis Grotesque Pro\"),\n url(https://assets.every.org/every-month/BasisGrotesque-Medium-Pro.woff2) format(\"woff2\");\n font-weight: 500;\n font-style: normal;\n font-display: swap;\n }\n `;\n\tdocument.head.append(fonts);\n};\n","import deepMerge, {Options as DeepMergeOptions} from 'deepmerge';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tAvailablePaymentMethods,\n\tDefaultPaymentMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nconst defaults: Partial = {\n\tmethods: Object.values(DefaultPaymentMethods),\n\tshow: false,\n\taddAmounts: [10, 50, 100],\n\tdefaultFrequency: DonationFrequency.OneTime,\n\tminDonationAmount: 5,\n\tprimaryColor: '#018669',\n\tshowGiftCardOption: false,\n\tredeemGiftCardInFlow: false\n};\n\nconst DEEP_MERGE_OPTIONS: DeepMergeOptions = {\n\t// Don't merge arrays, just overwrite them\n\n\tarrayMerge: (_, sourceArray) => sourceArray\n};\n\nexport const mergeConfig = (options: Partial): WidgetConfig => {\n\tconst filteredInputMethods = options.methods?.filter((method) =>\n\t\tAvailablePaymentMethods.includes(method)\n\t);\n\n\tconst additionalMethods = options.showGiftCardOption\n\t\t? [PaymentMethod.GIFT_CARD]\n\t\t: [];\n\n\tconst methods = (\n\t\tfilteredInputMethods && filteredInputMethods.length > 0\n\t\t\t? filteredInputMethods\n\t\t\t: DefaultPaymentMethods\n\t).concat(additionalMethods);\n\n\treturn deepMerge.all(\n\t\t[defaults, options, {methods}],\n\t\tDEEP_MERGE_OPTIONS\n\t);\n};\n","import {createContext, FunctionalComponent} from 'preact';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {mergeConfig} from 'src/helpers/optionsTypes';\n\nexport const ConfigContext = createContext({} as WidgetConfig);\n\nexport const ConfigContextProvider: FunctionalComponent<{\n\toptions: Partial;\n}> = ({options, children}) => {\n\tconst mergedConfig = mergeConfig(options);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {useContext} from 'preact/hooks';\nimport {ConfigContext} from 'src/components/widget/context/ConfigContext';\n\nexport const useConfigContext = () => useContext(ConfigContext);\n","// TODO: add more accurate type\nexport interface Fundraiser {\n\tid: string;\n\tslug: string;\n\ttitle: string;\n\tcoverImageCloudinaryId: string | null;\n\tactive: boolean;\n\tchildrenFundraiserIds: string | null;\n\tcreatedAt: string | null;\n\tcreatorNonprofitId: string | null;\n\tcreatorUserId: string | null;\n\tdescription: string | null;\n\tendDate: string | null;\n\tentityName: string | null;\n\teventIds: string | null;\n\tgoalAmount: string | null;\n\tgoalCurrency: string | null;\n\tmetadata: string | null;\n\tnonprofitId: string;\n\tparentFundraiserId: string | null;\n\tpinnedAt: string | null;\n\tstartDate: string | null;\n}\n\nexport const FundraiserFetchError = Symbol('FundraiserFetchError');\nexport const FundraiserFetching = Symbol('FundraiserFetching');\n","import {createContext, FunctionalComponent} from 'preact';\nimport {useCallback, useEffect, useState} from 'preact/hooks';\nimport {getFundraiser} from 'src/components/widget/api';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {\n\tFundraiser,\n\tFundraiserFetchError,\n\tFundraiserFetching\n} from 'src/components/widget/types/Fundraiser';\ninterface FundraiserContextData {\n\tfundraiser?:\n\t\t| Fundraiser\n\t\t| typeof FundraiserFetchError\n\t\t| typeof FundraiserFetching;\n}\n\nexport const FundraiserContext = createContext({\n\tfundraiser: FundraiserFetching\n});\n\nexport const FundraiserContextProvider: FunctionalComponent = ({children}) => {\n\tconst {fundraiserSlug, nonprofitSlug} = useConfigContext();\n\tconst [fundraiser, setFundraiser] =\n\t\tuseState(FundraiserFetching);\n\n\tconst fetchFundraiser = useCallback(async () => {\n\t\tif (!fundraiserSlug) {\n\t\t\tsetFundraiser(undefined);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst response = await getFundraiser(nonprofitSlug, fundraiserSlug);\n\t\t\tsetFundraiser(response);\n\t\t} catch {\n\t\t\tsetFundraiser(FundraiserFetchError);\n\t\t}\n\t}, [nonprofitSlug, fundraiserSlug]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line @typescript-eslint/no-floating-promises\n\t\tfetchFundraiser();\n\t}, [fetchFundraiser]);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {Fundraiser} from 'src/components/widget/types/Fundraiser';\nimport {Nonprofit} from 'src/components/widget/types/Nonprofit';\nimport {BASE_API_URL, BASE_COINGECKO_URL} from 'src/constants/url';\n\ntype NonprofitResponse = {\n\tmessage: string;\n\tdata: {\n\t\tnonprofit: Nonprofit;\n\t};\n};\n\ntype FundraiserResponse = {\n\tdata: {\n\t\tfundraiser: Fundraiser;\n\t\tnonprofits: Nonprofit[];\n\t};\n};\n\nexport async function getNonprofit(nonprofitSlug: string) {\n\tconst data: NonprofitResponse = await fetch(\n\t\t`${BASE_API_URL}/${nonprofitSlug}`\n\t).then(async (response) => response.json());\n\n\treturn data.data.nonprofit;\n}\n\nexport async function getFundraiser(\n\tnonprofitSlug: string,\n\tfundraiserSlug: string\n) {\n\tconst url = `${BASE_API_URL}/${nonprofitSlug}/fundraiser/${fundraiserSlug}`;\n\tconst data: FundraiserResponse = await fetch(url).then(async (response) =>\n\t\tresponse.json()\n\t);\n\n\treturn data.data.fundraiser;\n}\n\ninterface CoingeckoData {\n\tmarket_data: {\n\t\tcurrent_price: {\n\t\t\tusd: number;\n\t\t};\n\t};\n}\n\nexport async function getCoingeckoRate(coingeckoId: string) {\n\tconst url = `${BASE_COINGECKO_URL}/coins/${coingeckoId}`;\n\tconst data = await fetch(url).then(async (response) => response.json());\n\n\treturn (data as CoingeckoData).market_data.current_price.usd;\n}\n","// TODO: add more accurate type\nexport interface Nonprofit {\n\tid: string;\n\tein: string;\n\tname: string;\n\tprimarySlug: string;\n\tprofileUrl: string;\n\tdisbursementType?: DisbursementType | null;\n\thasAdmin?: boolean;\n\tdescription: string | null;\n\tcoverImageCloudinaryId: string | null;\n\tcoverImageUrl: string | null;\n\tdescriptionLong: string | null;\n\tisDisbursable: boolean;\n\tlocationAddress: string | null;\n\tlogoCloudinaryId: string | null;\n\tlogoUrl: string | null;\n\tnteeCode: string | null;\n\tmetadata?: {\n\t\tdisablePrivateNotes?: boolean;\n\t\tprefixWithThe?: boolean;\n\t\thideFundraiseButton?: boolean;\n\t};\n}\n\nexport enum DisbursementType {\n\tSTRIPE_CONNECT = 'STRIPE_CONNECT',\n\tPAYPAL_GRANTS = 'PAYPAL_GRANTS',\n\tNFG_BATCH_FILE = 'NFG_BATCH_FILE',\n\tMANUAL = 'MANUAL'\n}\n\nexport const NonprofitFetchError = Symbol('NonprofitFetchError');\nexport const NonprofitFetching = Symbol('NonprofitFetching');\n","import {createContext, FunctionalComponent} from 'preact';\nimport {useCallback, useEffect, useState} from 'preact/hooks';\nimport {getNonprofit} from 'src/components/widget/api';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {\n\tNonprofit,\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\n\ninterface NonprofitContextData {\n\tnonprofit: Nonprofit | typeof NonprofitFetchError | typeof NonprofitFetching;\n}\n\nexport const NonprofitContext = createContext({\n\tnonprofit: NonprofitFetching\n});\n\nexport const NonprofitContextProvider: FunctionalComponent = ({children}) => {\n\tconst {nonprofitSlug} = useConfigContext();\n\tconst [nonprofit, setNonprofit] =\n\t\tuseState(NonprofitFetching);\n\n\tconst fetchNonprofit = useCallback(async () => {\n\t\ttry {\n\t\t\tconst response = await getNonprofit(nonprofitSlug);\n\t\t\tsetNonprofit(response);\n\t\t} catch {\n\t\t\tsetNonprofit(NonprofitFetchError);\n\t\t}\n\t}, [nonprofitSlug]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line @typescript-eslint/no-floating-promises\n\t\tfetchNonprofit();\n\t}, [fetchNonprofit]);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","var V3_URL = 'https://js.stripe.com/v3';\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\nvar findScript = function findScript() {\n var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(V3_URL, \"\\\"]\"));\n\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n\n if (!V3_URL_REGEX.test(script.src)) {\n continue;\n }\n\n return script;\n }\n\n return null;\n};\n\nvar injectScript = function injectScript(params) {\n var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n var script = document.createElement('script');\n script.src = \"\".concat(V3_URL).concat(queryString);\n var headOrBody = document.head || document.body;\n\n if (!headOrBody) {\n throw new Error('Expected document.body not to be null. Stripe.js requires a element.');\n }\n\n headOrBody.appendChild(script);\n return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n if (!stripe || !stripe._registerWrapper) {\n return;\n }\n\n stripe._registerWrapper({\n name: 'stripe-js',\n version: \"1.54.2\",\n startTime: startTime\n });\n};\n\nvar stripePromise = null;\nvar loadScript = function loadScript(params) {\n // Ensure that we only attempt to load Stripe.js at most once\n if (stripePromise !== null) {\n return stripePromise;\n }\n\n stripePromise = new Promise(function (resolve, reject) {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n // Resolve to null when imported server side. This makes the module\n // safe to import in an isomorphic code base.\n resolve(null);\n return;\n }\n\n if (window.Stripe && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n }\n\n if (window.Stripe) {\n resolve(window.Stripe);\n return;\n }\n\n try {\n var script = findScript();\n\n if (script && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n } else if (!script) {\n script = injectScript(params);\n }\n\n script.addEventListener('load', function () {\n if (window.Stripe) {\n resolve(window.Stripe);\n } else {\n reject(new Error('Stripe.js not available'));\n }\n });\n script.addEventListener('error', function () {\n reject(new Error('Failed to load Stripe.js'));\n });\n } catch (error) {\n reject(error);\n return;\n }\n });\n return stripePromise;\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n if (maybeStripe === null) {\n return null;\n }\n\n var stripe = maybeStripe.apply(undefined, args);\n registerWrapper(stripe, startTime);\n return stripe;\n}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n// own script injection.\n\nvar stripePromise$1 = Promise.resolve().then(function () {\n return loadScript(null);\n});\nvar loadCalled = false;\nstripePromise$1[\"catch\"](function (err) {\n if (!loadCalled) {\n console.warn(err);\n }\n});\nvar loadStripe = function loadStripe() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n loadCalled = true;\n var startTime = Date.now();\n return stripePromise$1.then(function (maybeStripe) {\n return initStripe(maybeStripe, args, startTime);\n });\n};\n\nexport { loadStripe };\n","export const STRIPE_PUBLIC_KEY = 'pk_live_a5XJAcVaIqMs8ggZMtluZs8z00r2H4kYVG';\nexport const STRIPE_API_VERSION = '2022-11-15';\n","import {createContext, FunctionalComponent} from 'preact';\nimport {StateUpdater, useEffect, useState} from 'preact/hooks';\nimport {useCheckPaymentRequest} from 'src/components/widget/hooks/useCheckPaymentRequest';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {CryptoCurrency} from 'src/components/widget/types/Crypto';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tPaymentMethod,\n\tPaymentRequestAvailable\n} from 'src/components/widget/types/PaymentMethod';\n\ninterface WidgetContextProps {\n\tfrequency: DonationFrequency;\n\tsetFrequency: StateUpdater;\n\n\tdonationAmount?: number;\n\tsetDonationAmount: StateUpdater;\n\n\tsubmitError: string | null;\n\tsetSubmitError: StateUpdater;\n\n\tselectedPaymentMethod: PaymentMethod;\n\tsetSelectedPaymentMethod: StateUpdater;\n\n\tstockAmount?: number;\n\tsetStockAmount: StateUpdater;\n\n\tstockSymbol?: string;\n\tsetStockSymbol: StateUpdater;\n\n\tcryptoAmount?: number;\n\tsetCryptoAmount: StateUpdater;\n\n\tcryptoCurrency?: CryptoCurrency;\n\tsetCryptoCurrency: StateUpdater;\n\n\tpaymentRequestAvailable: PaymentRequestAvailable;\n\thideWidget: () => void;\n\n\tprivateNote?: string;\n\tsetPrivateNote: StateUpdater;\n\n\tgiftCardCode?: string;\n\tsetGiftCardCode: StateUpdater;\n}\n\nexport const WidgetContext = createContext(\n\t{} as WidgetContextProps\n);\n\nexport const WidgetContextProvider: FunctionalComponent<{hide: () => void}> = ({\n\tchildren,\n\thide\n}) => {\n\tconst config = useConfigContext();\n\n\tconst [frequency, setFrequency] = useState(config.defaultFrequency);\n\tconst [donationAmount, setDonationAmount] = useState(\n\t\tconfig.defaultDonationAmount\n\t);\n\tconst [submitError, setSubmitError] = useState(null);\n\tconst [selectedPaymentMethod, setSelectedPaymentMethod] = useState(\n\t\tconfig.methods[0]\n\t);\n\n\tconst [stockAmount, setStockAmount] = useState();\n\tconst [stockSymbol, setStockSymbol] = useState();\n\n\tconst [cryptoAmount, setCryptoAmount] = useState();\n\tconst [cryptoCurrency, setCryptoCurrency] = useState();\n\n\tconst paymentRequestAvailable = useCheckPaymentRequest();\n\n\tconst [privateNote, setPrivateNote] = useState();\n\n\tconst [giftCardCode, setGiftCardCode] = useState();\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {FunctionComponent} from 'preact';\nimport {ConfigContextProvider} from 'src/components/widget/context/ConfigContext';\nimport {FundraiserContextProvider} from 'src/components/widget/context/FundraiserContext';\nimport {NonprofitContextProvider} from 'src/components/widget/context/NonprofitContext';\nimport {WidgetContextProvider} from 'src/components/widget/context/WidgetContext';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nexport const ContextProvider: FunctionComponent<{\n\toptions: Partial;\n\thide: () => void;\n}> = ({options, hide, children}) => (\n\t\n\t\t\n\t\t\t\n\t\t\t\t{children}\n\t\t\t\n\t\t\n\t\n);\n","export enum BREAKPOINTS {\n\tPhoneOnly = '@media only screen and (max-width: 37.44em)',\n\tTabletUp = '@media only screen and (min-width: 37.5em)',\n\tTabletLandscapeUp = '@media only screen and (min-width: 56.25em)',\n\tDesktopUp = '@media only screen and (min-width: 75em)',\n\tBigDesktopUp = '@media only screen and (min-width: 112.5em)'\n}\n","export enum COLORS {\n\tLightGray = '#EAEDED',\n\tGray = '#f3f6f6',\n\tDarkGray = '#868A8A',\n\tBlack = '#272727',\n\tText = '#2E3434',\n\tTextGray = '#868383',\n\tTextOpaque = 'rgba(46, 52, 52, 0.6)',\n\tError = '#D95C35',\n\tErrorShadow = 'rgba(217, 92, 53, 0.2)',\n\tTransparent = 'transparent',\n\tWhite = '#fff'\n}\n","import cxs from 'cxs';\n\nexport const smallText: cxs.CSSObject = {\n\tfontSize: '12px',\n\tlineHeight: '16px',\n\tletterSpacing: '0.01em'\n};\n\nexport const bodyText: cxs.CSSObject = {\n\tfontSize: '16px',\n\tlineHeight: '24px',\n\tletterSpacing: '-0.01em'\n};\n\nexport const inputText: cxs.CSSObject = {\n\tfontSize: '16px',\n\tlineHeight: '16px'\n};\n\nexport const headingText: cxs.CSSObject = {\n\tfontSize: '24px',\n\tlineHeight: '28px',\n\tletterSpacing: '-0.015em'\n};\n\nexport const heading2Text: cxs.CSSObject = {\n\tfontSize: '24px',\n\tlineHeight: '28px',\n\tletterSpacing: '-0.015em'\n};\n\nexport const heading3Text: cxs.CSSObject = {\n\tfontSize: '20px',\n\tlineHeight: '24px',\n\tletterSpacing: '-0.015em'\n};\n\nexport const buttonText: cxs.CSSObject = {\n\tfontSize: '16px',\n\tlineHeight: '24px',\n\tletterSpacing: '-0.01em'\n};\n\nexport const textSize = {\n\txxl: {\n\t\tfontSize: '48px',\n\t\tlineHeight: '56px'\n\t},\n\txl: {\n\t\tfontSize: '32px',\n\t\tlineHeight: '36px'\n\t},\n\tl: {\n\t\tfontSize: '24px',\n\t\tlineHeight: '32px'\n\t},\n\tm: {\n\t\tfontSize: '20px',\n\t\tlineHeight: '24px'\n\t},\n\ts: {\n\t\tfontSize: '16px',\n\t\tlineHeight: '24px'\n\t},\n\txs: {\n\t\tfontSize: '14px',\n\t\tlineHeight: '20px'\n\t},\n\txxs: {\n\t\tfontSize: '12px',\n\t\tlineHeight: '16px'\n\t}\n};\n","import cxs from 'cxs';\n\nexport enum Spacing {\n\tEmpty = '0',\n\n\tXXS = '4px',\n\tXS = '8px',\n\tS = '12px',\n\tM = '16px',\n\tL = '20px',\n\tXL = '24px',\n\tXXL = '32px',\n\n\tStack_XXS = '0 0 4px 0',\n\tStack_XS = '0 0 8px 0',\n\tStack_S = '0 0 12px 0',\n\tStack_M = '0 0 16px 0',\n\tStack_L = '0 0 20px 0',\n\tStack_XL = '0 0 24px 0',\n\tStack_XXL = '0 0 32px 0',\n\n\tInset_XXS = '4px 4px 4px 4px',\n\tInset_XS = '8px 8px 8px 8px',\n\tInset_S = '12px 12px 12px 12px',\n\tInset_M = '16px 16px 16px 16px',\n\tInset_L = '20px 20px 20px 20px',\n\tInset_XL = '24px 24px 24px 24px',\n\tInset_XXL = '32px 32px 32px 32px',\n\n\tInsetSquish_XS = '8px 16px',\n\tInsetSquish_S = '12px 24px',\n\tInsetSquish_M = '16px 32px',\n\tInsetSquish_L = '20px 40px',\n\tInsetSquish_XL = '24px 48px',\n\n\tInline_XS = '0 8px 0 0',\n\tInline_S = '0 12px 0 0',\n\tInline_M = '0 16px 0 0',\n\tInline_L = '0 20px 0 0',\n\tInline_XL = '0 24px 0 0',\n\tInline_XXL = '0 24px 0 0'\n}\n\nconst verticalStackCssObject = (spacing: number | string): cxs.CSSObject => ({\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\t'> *:not(:last-child)': {\n\t\tmarginBottom: typeof spacing === 'number' ? `${spacing}px` : spacing\n\t}\n});\nconst horizontalStackCssObject = (spacing: number | string): cxs.CSSObject => ({\n\tdisplay: 'flex',\n\tflexDirection: 'row',\n\t'> *:not(:last-child)': {\n\t\tmarginRight: typeof spacing === 'number' ? `${spacing}px` : spacing\n\t}\n});\n\nexport const verticalStackCss = {\n\tclassName: (spacing: number | string) => cxs(verticalStackCssObject(spacing)),\n\tcxs: (spacing: number | string) => verticalStackCssObject(spacing)\n};\n\nexport const horizontalStackCss = {\n\tclassName: (spacing: number | string) =>\n\t\tcxs(horizontalStackCssObject(spacing)),\n\tcxs: (spacing: number | string) => horizontalStackCssObject(spacing)\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {horizontalStackCss, Spacing} from 'src/components/widget/theme/spacing';\n\nexport const faqListCss = cxs({\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\tgap: Spacing.M\n});\n\nexport const rotateCss: cxs.CSSObject = {\n\tposition: 'relative',\n\ttop: '-1px',\n\ttransform: 'rotate(180deg)'\n};\n\nexport const descriptionBaseCss: cxs.CSSObject = {\n\t'> p': {\n\t\tmarginBottom: Spacing.XS\n\t}\n};\nexport const descriptionOpen = cxs({\n\t...descriptionBaseCss,\n\tmaxHeight: '1000px',\n\ttransition: 'all 1s',\n\topacity: '1'\n});\n\nexport const descriptionClose = cxs({\n\t...descriptionBaseCss,\n\topacity: '0',\n\toverflow: 'hidden',\n\tmaxHeight: '0',\n\ttransition: 'all 0.5s'\n});\n\nexport const faqItemConateinerCss = (mobileOnly?: boolean) =>\n\tcxs({\n\t\t...textSize.xs,\n\t\t...(mobileOnly\n\t\t\t? {\n\t\t\t\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\t\t\t\tpadding: 'none'\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: {})\n\t});\n\nexport const faqItemButtonCss = (isOpen: boolean) =>\n\tcxs({\n\t\t...horizontalStackCss.cxs(Spacing.S),\n\t\t...textSize.xs,\n\t\talignItems: 'center',\n\t\tjustifyContent: 'space-between',\n\t\twidth: '100%',\n\t\tborder: 'none',\n\t\tbackground: 'transparent',\n\t\ttextAlign: 'start',\n\t\tpadding: 0,\n\t\t':hover': {cursor: 'pointer'},\n\t\t'> svg': {\n\t\t\twidth: '16px',\n\t\t\theight: '16px',\n\t\t\t...(isOpen ? rotateCss : {})\n\t\t},\n\t\t...(isOpen\n\t\t\t? {\n\t\t\t\t\tfontWeight: 700\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tfontWeight: 500,\n\t\t\t\t\tcolor: COLORS.TextGray\n\t\t\t })\n\t});\n\nexport const faqLinkCss = cxs({\n\tcolor: COLORS.Text,\n\tfontWeight: 500,\n\ttextDecoration: 'none',\n\t':hover': {\n\t\ttextDecoration: 'underline'\n\t}\n});\n","import {getNonprofitName} from 'src/components/widget/components/Faq/helpers';\nimport {Fundraiser} from 'src/components/widget/types/Fundraiser';\nimport {Nonprofit} from 'src/components/widget/types/Nonprofit';\n\nexport function isOfficialFundraiser(fundraiser: Fundraiser): boolean {\n\treturn fundraiser.nonprofitId === fundraiser.creatorNonprofitId;\n}\n\nexport const getTaxDeductibleStatement = (\n\tnonprofit: Nonprofit,\n\tfundraiser?: Fundraiser\n) => {\n\tconst base = `100% of your donation is tax-deductible to the extent allowed by US law. \n Your donation is made to Every.org, a tax-exempt US 501(c)(3) charity that\n grants unrestricted funds to ${getNonprofitName(\n\t\t\t\tnonprofit\n\t\t\t)} on your behalf. \n As a legal matter, Every.org must provide any donations to ${getNonprofitName(\n\t\t\t\tnonprofit\n\t\t\t)} on an\n unrestricted basis, regardless of any designations or restrictions made by\n you.`;\n\n\tconst isUnofficialFundraiser =\n\t\tfundraiser && !isOfficialFundraiser(fundraiser);\n\n\tlet end = '';\n\n\tif (nonprofit.hasAdmin && isUnofficialFundraiser) {\n\t\tend = `Please note ${nonprofit.name} has not reviewed or approved the content of this peer-to-peer fundraiser.`;\n\t} else if (!nonprofit.hasAdmin && !isUnofficialFundraiser) {\n\t\tend = `Please note ${nonprofit.name} has not provided permission for this solicitation.`;\n\t} else if (!nonprofit.hasAdmin && isUnofficialFundraiser) {\n\t\tend = `Please note ${nonprofit.name} has not provided permission for this solicitation or reviewed or approved the content of this peer-to-peer fundraiser.`;\n\t}\n\n\treturn (\n\t\t\n\t\t\t{base} {end}\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const cardCss = cxs({\n\tbackgroundColor: 'white',\n\tpadding: `${Spacing.XL} ${Spacing.XL} 0px`,\n\tborderRadius: 'unset',\n\toverflow: 'hidden',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tborderRadius: '16px',\n\t\tpadding: Spacing.M\n\t}\n});\n","const joinClassNames = (classNames: Array) => {\n\treturn classNames.filter((className) => Boolean(className)).join(' ');\n};\n\nexport default joinClassNames;\n","import {FunctionalComponent} from 'preact';\nimport {cardCss} from 'src/components/widget/components/GridCard/styles';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface CardProps {\n\tclassName?: string;\n}\n\nexport const GridCard: FunctionalComponent = ({\n\tchildren,\n\tclassName\n}) => {\n\treturn
    {children}
    ;\n};\n","import {useContext} from 'preact/hooks';\nimport {FundraiserContext} from 'src/components/widget/context/FundraiserContext';\nimport {\n\tFundraiserFetchError,\n\tFundraiserFetching\n} from 'src/components/widget/types/Fundraiser';\n\nexport const useFundraiser = () => useContext(FundraiserContext).fundraiser;\n\nexport const useFundraiserOrUndefined = () => {\n\tconst fundraiser = useFundraiser();\n\n\tif (\n\t\tfundraiser === FundraiserFetchError ||\n\t\tfundraiser === FundraiserFetching\n\t) {\n\t\treturn undefined;\n\t}\n\n\treturn fundraiser;\n};\n","import {useContext} from 'preact/hooks';\nimport {NonprofitContext} from 'src/components/widget/context/NonprofitContext';\nimport {\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\n\nexport const useNonprofit = () => useContext(NonprofitContext).nonprofit;\n\nexport const useNonprofitOrError = () => {\n\tconst nonprofit = useNonprofit();\n\n\tif (nonprofit === NonprofitFetchError || nonprofit === NonprofitFetching) {\n\t\t// TODO: add more readable error\n\t\tthrow new Error('Nonprofit error');\n\t}\n\n\treturn nonprofit;\n};\n","import {useContext} from 'preact/hooks';\nimport {WidgetContext} from 'src/components/widget/context/WidgetContext';\n\nexport const useWidgetContext = () => useContext(WidgetContext);\n","export const ArrowIcon = () => (\n\t\n\t\t\n\t\n);\n","import {FunctionalComponent, VNode} from 'preact';\nimport {useState} from 'preact/hooks';\nimport {Fragment} from 'preact/jsx-runtime';\nimport {\n\tgetDisbursementDescription,\n\tgetFeeDescription,\n\tgetNonprofitName\n} from 'src/components/widget/components/Faq/helpers';\nimport {\n\tfaqItemConateinerCss,\n\tfaqItemButtonCss,\n\tdescriptionOpen,\n\tdescriptionClose,\n\tfaqLinkCss,\n\tfaqListCss\n} from 'src/components/widget/components/Faq/styles';\nimport {getTaxDeductibleStatement} from 'src/components/widget/components/Footer/helpers';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useFundraiserOrUndefined} from 'src/components/widget/hooks/useFundraiser';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {ArrowIcon} from 'src/components/widget/icons/ArrowIcon';\nimport {BASE_URL, FUNDRAISER_ROUTE} from 'src/constants/url';\n\ninterface FaqItemTypes {\n\tid: string;\n\ttitle: string;\n\tdescription: VNode;\n\tmobileOnly?: boolean;\n\thideSlugList?: string[];\n}\n\nconst FaqItem: FunctionalComponent<{faqData: FaqItemTypes}> = ({faqData}) => {\n\tconst [isOpen, setOpen] = useState(false);\n\tconst {nonprofitSlug} = useConfigContext();\n\n\tif (faqData.hideSlugList?.includes(nonprofitSlug)) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tsetOpen(!isOpen);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{faqData.title}\n\t\t\t\t\n\t\t\t\n\t\t\t
    \n\t\t\t\t{faqData.description}\n\t\t\t
    \n\t\t
    \n\t);\n};\n\nexport const Faq = () => {\n\tconst nonprofit = useNonprofitOrError();\n\tconst fundraiser = useFundraiserOrUndefined();\n\n\tconst {selectedPaymentMethod} = useWidgetContext();\n\n\tconst faqDataList: FaqItemTypes[] = [\n\t\t{\n\t\t\tid: 'intro',\n\t\t\ttitle: 'How does Every.org accept my donation?',\n\t\t\tdescription: (\n\t\t\t\t\n\t\t\t\t\t

    \n\t\t\t\t\t\tYour donation is made to Every.org, a US 501(c)(3) public charity.\n\t\t\t\t\t\tEvery.org will immediately send you a receipt by email.{' '}\n\t\t\t\t\t\t{getDisbursementDescription(nonprofit)}\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tThis process ensures your eligibility for a tax deduction, enables\n\t\t\t\t\t\tyou to consolidate your gift records, and reduces the burden on{' '}\n\t\t\t\t\t\t{getNonprofitName(nonprofit)}.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t)\n\t\t},\n\t\t{\n\t\t\tid: 'fees',\n\t\t\ttitle: 'Are there any fees?',\n\t\t\tdescription: getFeeDescription(selectedPaymentMethod, nonprofit)\n\t\t},\n\t\t{\n\t\t\tid: 'tax',\n\t\t\ttitle: 'Is this donation tax-deductible?',\n\t\t\tdescription: (\n\t\t\t\t

    Yes, {getTaxDeductibleStatement(nonprofit, fundraiser)}

    \n\t\t\t)\n\t\t},\n\t\t{\n\t\t\tid: 'receipt',\n\t\t\ttitle: 'Will I receive a receipt for my donation?',\n\t\t\tdescription: (\n\t\t\t\t\n\t\t\t\t\t

    \n\t\t\t\t\t\tYes, after your donation payment is confirmed, you will immediately\n\t\t\t\t\t\tget a receipt emailed to you.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tAdditionally, if you have an Every.org account, you can always get a\n\t\t\t\t\t\tsingle itemized receipt that shows all your donations in a given\n\t\t\t\t\t\tyear.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t)\n\t\t},\n\t\t{\n\t\t\tid: 'p2p',\n\t\t\tmobileOnly: true,\n\t\t\thideSlugList: ['irc'],\n\t\t\ttitle: `How else can I support ${nonprofit.name}?`,\n\t\t\tdescription: (\n\t\t\t\t

    \n\t\t\t\t\tYou can also rally your friends, family, and social networks to\n\t\t\t\t\tsupport this nonprofit by starting your own fundraiser for them.{' '}\n\t\t\t\t\t\n\t\t\t\t\t\tStart a fundraiser for {nonprofit.name}\n\t\t\t\t\t\n\t\t\t\t

    \n\t\t\t)\n\t\t}\n\t];\n\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t{faqDataList.map((item) => (\n\t\t\t\t\t\n\t\t\t\t))}\n\t\t\t
    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const footerCardCss = cxs({\n\tpadding: `${Spacing.XL} ${Spacing.XL} 0px`,\n\tbackgroundColor: 'unset',\n\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\t...textSize.xs,\n\tcolor: COLORS.TextGray,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: `0px ${Spacing.L}`\n\t},\n\t'> p': {\n\t\tmargin: 0\n\t},\n\t'> p:not(:last-child)': {\n\t\tmarginBottom: Spacing.XS\n\t}\n});\n\nexport const footerLinkCss = cxs({\n\tcolor: COLORS.TextGray,\n\tfontWeight: 500,\n\ttextDecoration: 'none',\n\t':hover': {\n\t\ttextDecoration: 'underline'\n\t}\n});\n","import {FunctionComponent} from 'preact';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {getTaxDeductibleStatement} from 'src/components/widget/components/Footer/helpers';\nimport {\n\tfooterCardCss,\n\tfooterLinkCss\n} from 'src/components/widget/components/Footer/styles';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {useFundraiserOrUndefined} from 'src/components/widget/hooks/useFundraiser';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {\n\tTERMS_URL,\n\tHELP_URL,\n\tPRIVACY_URL,\n\tSUPPORT_EMAIL\n} from 'src/constants/url';\nimport {mailToLink} from 'src/helpers/mailToLink';\n\nconst FEEDBACK_URL = mailToLink({address: SUPPORT_EMAIL});\ninterface FooterLinkProps\n\textends JSXInternal.HTMLAttributes {}\nconst FooterLink: FunctionComponent = ({\n\tchildren,\n\t...rest\n}) => (\n\t\n\t\t{children}\n\t\n);\n\nexport const Footer = () => {\n\tconst nonprofit = useNonprofitOrError();\n\tconst fundraiser = useFundraiserOrUndefined();\n\n\treturn (\n\t\t\n\t\t\t

    \n\t\t\t\t{getTaxDeductibleStatement(nonprofit, fundraiser)}{' '}\n\t\t\t\tSee Terms\n\t\t\t

    \n\t\t\t

    \n\t\t\t\tNeed help? See FAQs or contact us at our{' '}\n\t\t\t\tHelp Center.\n\t\t\t

    \n\t\t\t

    \n\t\t\t\tHave ideas for how we can build a better donation experience?{' '}\n\t\t\t\tSend us feedback.\n\t\t\t

    \n\t\t\t

    \n\t\t\t\tWe respect your privacy. To learn more, check out our{' '}\n\t\t\t\tPrivacy Policy.\n\t\t\t

    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\n\nexport const linkCss = (primaryColor: string) =>\n\tcxs({\n\t\tcolor: primaryColor,\n\t\tfontWeight: 500,\n\t\ttextDecoration: 'none',\n\t\t':hover': {\n\t\t\ttextDecoration: 'underline'\n\t\t}\n\t});\n\nexport const cardCss = cxs({\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'block'\n\t}\n});\n","import {\n\tcardCss,\n\tlinkCss\n} from 'src/components/widget/components/FundraiserLink/styles';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {BASE_URL, FUNDRAISER_ROUTE} from 'src/constants/url';\n\nexport const FundraiserLink = () => {\n\tconst {primaryColor, nonprofitSlug} = useConfigContext();\n\tconst nonprofit = useNonprofitOrError();\n\n\tif (nonprofit.metadata?.hideFundraiseButton) {\n\t\treturn null;\n\t}\n\n\tconst href = BASE_URL + nonprofitSlug + '/' + FUNDRAISER_ROUTE;\n\n\treturn (\n\t\t\n\t\t\t

    \n\t\t\t\t\n\t\t\t\t\tStart a fundraiser\n\t\t\t\t{' '}\n\t\t\t\tto rally your friends and family\n\t\t\t

    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {FunctionalComponent} from 'preact';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nconst gridCss = cxs({\n\tdisplay: 'grid',\n\tgridGap: 0,\n\tgridTemplateColumns: '1fr',\n\tgridTemplateAreas: `\"header\"\n \"promoBanners\"\n \"nonprofitInfo\"\n \"paymentProcess\"\n \"fundraiserLink\"\n \"faq\"\n \"footer\"`,\n\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tgridColumnGap: Spacing.XL,\n\t\tgridTemplateColumns: '1fr 2fr',\n\t\tgridTemplateRows: 'auto auto auto auto auto 1fr',\n\t\tgridTemplateAreas: `\"header header\"\n \"promoBanners promoBanners\"\n \"nonprofitInfo paymentProcess\"\n \"fundraiserLink paymentProcess\"\n \"faq paymentProcess\"\n \"faq footer\"`,\n\t\t'& > div:not(:last-child):not(:empty)': {\n\t\t\tmarginBottom: Spacing.XL\n\t\t}\n\t},\n\n\t'& > #every-header': {\n\t\tgridArea: 'header',\n\t\tdisplay: 'block',\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tdisplay: 'none'\n\t\t}\n\t},\n\t'& > #every-promoBanners': {gridArea: 'promoBanners'},\n\t'& > #every-nonprofitInfo': {gridArea: 'nonprofitInfo'},\n\t'& > #every-paymentProcess': {gridArea: 'paymentProcess'},\n\t'& > #every-faq': {gridArea: 'faq'},\n\t'& > #every-fundraiserLink': {gridArea: 'fundraiserLink'},\n\t'& > #every-footer': {gridArea: 'footer'}\n});\n\nexport const Grid: FunctionalComponent = ({children}) => {\n\treturn
    {children}
    ;\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {FontFamily} from 'src/components/widget/theme/font-family';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const buttonCss = cxs({\n\tcursor: 'pointer',\n\tdisplay: 'inline-flex',\n\talignItems: 'center',\n\tjustifyContent: 'center',\n\tpadding: 0,\n\tborder: 'none',\n\tbackgroundColor: 'transparent',\n\tfontFamily: FontFamily.BasisGrotesque\n});\n\nexport const smallScreenCloseButtonCss = cxs({\n\tdisplay: 'block',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'none'\n\t}\n});\n\nexport const largeScreenCloseButtonCss = cxs({\n\tposition: 'absolute',\n\tright: Spacing.XL,\n\ttop: Spacing.XL,\n\n\tpadding: Spacing.XXS,\n\tbackground: 'white',\n\tborderRadius: '8px',\n\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'block'\n\t}\n});\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const CloseIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {buttonCss} from 'src/components/widget/components/Header/CloseButton/styles';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {CloseIcon} from 'src/components/widget/icons/CloseIcon';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const CloseButton = ({className}: {className?: string}) => {\n\tconst {hideWidget} = useWidgetContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const containerCss = cxs({\n\tdisplay: 'flex',\n\tjustifyContent: 'flex-end',\n\talignItems: 'center',\n\tpadding: `${Spacing.M} ${Spacing.XL}`,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: 0\n\t}\n});\n","import {CloseButton} from 'src/components/widget/components/Header/CloseButton';\nimport {smallScreenCloseButtonCss} from 'src/components/widget/components/Header/CloseButton/styles';\nimport {containerCss} from 'src/components/widget/components/Header/styles';\n\nexport const Header = () => {\n\treturn (\n\t\t
    \n\t\t\t\n\t\t
    \n\t);\n};\n","export enum Radii {\n\tSmall = '4px',\n\tDefault = '8px',\n\tMedium = '24px',\n\tBig = '100px',\n\tCircle = '100%'\n}\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {\n\thorizontalStackCss,\n\tSpacing,\n\tverticalStackCss\n} from 'src/components/widget/theme/spacing';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const nonprofitNameCss = cxs({\n\tlineHeight: '20px',\n\tfontWeight: 'unset',\n\t'> span': {\n\t\tfontWeight: 700\n\t}\n});\n\nexport const fundraiserNameCss = cxs({\n\tlineHeight: '20px',\n\tfontWeight: 'unset',\n\t'> span': {\n\t\tfontWeight: 700\n\t}\n});\n\nexport const logoImageCss = (logoUrl: string) =>\n\tcxs({\n\t\tborderRadius: Radii.Circle,\n\t\toverflow: 'hidden',\n\t\tdisplay: 'block',\n\t\tbackgroundImage: `url(${logoUrl})`,\n\t\tbackgroundSize: 'contain',\n\t\twidth: '40px',\n\t\theight: '40px',\n\t\tflexShrink: 0,\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\twidth: '64px',\n\t\t\theight: '64px'\n\t\t}\n\t});\n\nexport const fundraiserCardLogoCss = (logoUrl: string) =>\n\tjoinClassNames([\n\t\tlogoImageCss(logoUrl),\n\t\tcxs({\n\t\t\twidth: '32px',\n\t\t\theight: '32px',\n\t\t\tflexShrink: 0,\n\t\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\t\twidth: '40px',\n\t\t\t\theight: '40px'\n\t\t\t}\n\t\t})\n\t]);\n\nexport const nonprofitCardCss = cxs({\n\tpadding: `${Spacing.XL}`,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t...verticalStackCss.cxs(Spacing.S),\n\t\tpadding: `${Spacing.L}`\n\t}\n});\n\nexport const largeFundraiserCardCss = cxs({\n\tdisplay: 'none',\n\toverflow: 'hidden',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'flex',\n\t\tgap: `${Spacing.S}`,\n\t\tflexDirection: 'column',\n\t\tpadding: `${Spacing.L}`\n\t}\n});\n\nexport const smallFundraiserCardCss = cxs({\n\tdisplay: 'flex',\n\tgap: `${Spacing.S}`,\n\tpadding: `${Spacing.XL}`,\n\toverflow: 'hidden',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'none',\n\t\tflexDirection: 'column',\n\t\tpadding: `${Spacing.L}`\n\t}\n});\n\nexport const avatarAndNameWrapperCss = cxs({\n\t...horizontalStackCss.cxs(Spacing.S),\n\talignItems: 'center'\n});\n\nexport const fundraiserAvatarAndNameWrapperCss = cxs({\n\tdisplay: 'flex',\n\tgap: `${Spacing.S}`,\n\talignItems: 'center',\n\n\t'& > .every-embedded-fundraiser-card__nonprofit-name': {\n\t\tdisplay: 'none',\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tdisplay: 'block'\n\t\t}\n\t}\n});\n\nexport const descriptionCss = cxs({\n\t...textSize.xs,\n\tcolor: 'rgba(0, 0, 0, 0.7)',\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'block'\n\t}\n});\n\nexport const truncatedTextCss = (numberLines: number) =>\n\tcxs({\n\t\toverflow: 'hidden',\n\t\toverflowWrap: 'anywhere',\n\t\twordBreak: 'break-word',\n\t\ttextOverflow: 'ellipsis',\n\t\tdisplay: '-webkit-box',\n\t\t'-webkit-box-orient': 'vertical',\n\t\t'-webkit-line-clamp': numberLines,\n\t\talignItems: 'start'\n\t});\n","export const COVER_IMAGE_PLACEHOLDER_ID = 'profile_picture_placeholder_o56tme';\nexport const LOGO_IMAGE_PLACEHOLDER_ID = 'NonprofitAvatarPlaceholder';\n","import {BASE_CLOUDINARY_URL} from 'src/constants/url';\n\ninterface CloudinaryOptions {\n\twidth?: number;\n\theight?: number;\n\tfillMode?: 'fill' | 'lfill';\n}\n\nconst FLAGS = 'f_auto,q_auto';\n\nexport function fillDimensionsTransform(options: CloudinaryOptions) {\n\tif (options.width === 0 || options.height === 0) {\n\t\tthrow new Error('dimensions cannot be 0');\n\t}\n\n\treturn [\n\t\t`c_${options.fillMode ?? 'lfill'}`,\n\t\toptions.width ? `w_${Math.floor(options.width)}` : undefined,\n\t\toptions.height ? `h_${Math.floor(options.height)}` : undefined\n\t]\n\t\t.filter((value?: string) => value !== undefined)\n\t\t.join(',');\n}\n\nexport const getCloudinaryUrl = (\n\tcloudinaryId: string,\n\toptions?: CloudinaryOptions\n) => {\n\treturn `${BASE_CLOUDINARY_URL}${FLAGS}${\n\t\toptions ? `,${fillDimensionsTransform(options)}` : ''\n\t}/${cloudinaryId}`;\n};\n","import cxs from 'cxs';\nimport {Fragment} from 'preact/jsx-runtime';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {\n\tnonprofitNameCss,\n\tdescriptionCss,\n\ttruncatedTextCss,\n\tfundraiserCardLogoCss,\n\tfundraiserAvatarAndNameWrapperCss,\n\tlargeFundraiserCardCss,\n\tsmallFundraiserCardCss\n} from 'src/components/widget/components/NonprofitInfo/styles';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {Fundraiser} from 'src/components/widget/types/Fundraiser';\nimport {LOGO_IMAGE_PLACEHOLDER_ID} from 'src/constants/placeholders';\nimport {getCloudinaryUrl} from 'src/helpers/getCloudinaryUrl';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nconst coverImageCss = (url: string) =>\n\tcxs({\n\t\tbackgroundImage: `url(${url})`,\n\t\tbackgroundSize: 'cover',\n\t\twidth: 'calc(100% + 25px + 25px)',\n\t\theight: '160px',\n\t\tposition: 'relative',\n\t\tleft: '-25px'\n\t});\n\ninterface FundraiserCardProps {\n\tfundraiser: Fundraiser;\n}\n\nexport const FundraiserCard = ({fundraiser}: FundraiserCardProps) => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n\nconst LargeFundraiserCard = ({fundraiser}: FundraiserCardProps) => {\n\tconst {\n\t\tname: nonprofitName,\n\t\tlogoCloudinaryId,\n\t\tcoverImageCloudinaryId,\n\t\thasAdmin\n\t} = useNonprofitOrError();\n\tconst logoUrl = getCloudinaryUrl(\n\t\tlogoCloudinaryId ?? LOGO_IMAGE_PLACEHOLDER_ID\n\t);\n\tconst coverImageUrl =\n\t\tcoverImageCloudinaryId &&\n\t\tgetCloudinaryUrl(coverImageCloudinaryId, {width: 320});\n\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t

    {nonprofitName}

    \n\t\t\t\t\t{fundraiser.creatorNonprofitId === fundraiser.nonprofitId && (\n\t\t\t\t\t\t

    Official fundraiser

    \n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t
    \n\t\t\t{coverImageUrl &&
    }\n\t\t\t

    \n\t\t\t\t{fundraiser.title}\n\t\t\t

    \n\t\t\t{fundraiser.description && (\n\t\t\t\t

    \n\t\t\t\t\t{fundraiser.description}\n\t\t\t\t

    \n\t\t\t)}\n\t\t\n\t);\n};\n\nconst SmallFundraiserCard = ({fundraiser}: FundraiserCardProps) => {\n\tconst {\n\t\tname: nonprofitName,\n\t\tlogoCloudinaryId,\n\t\tcoverImageCloudinaryId,\n\t\thasAdmin\n\t} = useNonprofitOrError();\n\tconst logoUrl = getCloudinaryUrl(\n\t\tlogoCloudinaryId ?? LOGO_IMAGE_PLACEHOLDER_ID\n\t);\n\tconst coverImageUrl =\n\t\tcoverImageCloudinaryId && getCloudinaryUrl(coverImageCloudinaryId);\n\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{fundraiser.title}\n\t\t\t\t

    \n\t\t\t
    \n\t\t\n\t);\n};\n","import {Fragment} from 'preact/jsx-runtime';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {\n\tlogoImageCss,\n\tnonprofitNameCss,\n\tdescriptionCss,\n\tavatarAndNameWrapperCss,\n\tnonprofitCardCss\n} from 'src/components/widget/components/NonprofitInfo/styles';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {LOGO_IMAGE_PLACEHOLDER_ID} from 'src/constants/placeholders';\nimport {getCloudinaryUrl} from 'src/helpers/getCloudinaryUrl';\n\nexport const NonprofitCard = () => {\n\tconst {name, logoCloudinaryId, hasAdmin} = useNonprofitOrError();\n\tconst logoUrl = getCloudinaryUrl(\n\t\tlogoCloudinaryId ?? LOGO_IMAGE_PLACEHOLDER_ID\n\t);\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{hasAdmin ? (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{name} is using Every.org to accept this donation\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tEvery.org created this page for {name}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t

    \n\t\t\t
    \n\t\t\t

    \n\t\t\t\tEvery.org is a 501(c)(3) nonprofit inspiring generosity and philanthropy\n\t\t\t\tfor everyone.\n\t\t\t

    \n\t\t\n\t);\n};\n","import {FundraiserCard} from 'src/components/widget/components/NonprofitInfo/FundraiserCard';\nimport {NonprofitCard} from 'src/components/widget/components/NonprofitInfo/NonprofitCard';\nimport {useFundraiserOrUndefined} from 'src/components/widget/hooks/useFundraiser';\n\nexport const NonprofitInfo = () => {\n\tconst fundraiser = useFundraiserOrUndefined();\n\n\tif (fundraiser) {\n\t\treturn ;\n\t}\n\n\treturn ;\n};\n","export enum Borders {\n\tNormal = '1px solid',\n\tBig = '4px solid'\n}\n\nexport const getColoredBorder = (border: Borders, color: string) =>\n\t`${border} ${color}`;\n","import cxs from 'cxs';\nimport {getColoredBorder, Borders} from 'src/components/widget/theme/borders';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const textInputContainerErrorCss = cxs({\n\tborder: getColoredBorder(Borders.Normal, COLORS.Error)\n});\n\nexport const textInputContainerCss = (color: string) =>\n\tcxs({\n\t\tposition: 'relative',\n\t\tpadding: Spacing.M,\n\t\tdisplay: 'flex',\n\t\tflexDirection: 'row',\n\t\talignItems: 'center',\n\t\tborderRadius: Radii.Default,\n\t\tcolor: COLORS.Text,\n\t\tbackgroundColor: COLORS.Gray,\n\t\tborder: getColoredBorder(Borders.Normal, COLORS.LightGray),\n\t\tcursor: 'text',\n\t\t':focus-within': {\n\t\t\tbackgroundColor: 'white',\n\t\t\tborderColor: color\n\t\t}\n\t});\n\nexport const textInputCss = cxs({\n\tfontSize: textSize.s.fontSize,\n\tlineHeight: textSize.s.fontSize,\n\tfontFamily: 'inherit',\n\tflex: 1,\n\tborder: 'none',\n\toutline: 'none',\n\tbackground: 'transparent',\n\twidth: '100%',\n\tminWidth: 'unset',\n\tpadding: 0,\n\tmargin: 0,\n\t'::placeholder': {\n\t\tfontWeight: 400\n\t},\n\t'::-webkit-outer-spin-button': {\n\t\t'-webkit-appearance': 'none',\n\t\tmargin: 0\n\t},\n\t'::-webkit-inner-spin-button': {\n\t\t'-webkit-appearance': 'none',\n\t\tmargin: 0\n\t},\n\t'-moz-appearance': 'textfield'\n});\n","import cxs from 'cxs';\nimport {rotateCss} from 'src/components/widget/components/Faq/styles';\nimport {textInputContainerCss} from 'src/components/widget/components/TextInput/styles';\nimport {getColoredBorder, Borders} from 'src/components/widget/theme/borders';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {bodyText, textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const cryptoSelectorContainerCss = cxs({\n\tmaxHeight: '250px',\n\t'& input': {\n\t\tfontSize: textSize.s.fontSize,\n\t\tlineHeight: textSize.s.fontSize,\n\t\tfontWeight: 400\n\t}\n});\n\nexport const cryptoSelectorDropDownContainerCss = cxs({\n\tbackground: COLORS.White,\n\tborderRadius: `0 0 ${Radii.Default} ${Radii.Default}`,\n\tborder: getColoredBorder(Borders.Normal, COLORS.LightGray),\n\tborderTop: 'none'\n});\n\nexport const cryptoSelectorInputContainerCss = cxs({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tgap: Spacing.XXS\n});\n\nexport const cryptoSelectorDropDownContentCss = cxs({\n\toverflowY: 'scroll',\n\theight: '100%',\n\tmaxHeight: '200px'\n});\n\nexport const quickSelectOptionsListCss = cxs({\n\tborderBottom: getColoredBorder(Borders.Normal, COLORS.LightGray)\n});\n\nexport const cryptoSelectorDropDownItemCss = cxs({\n\tborder: 'none',\n\tbackground: 'none',\n\n\tpadding: `${Spacing.S} ${Spacing.M}`,\n\t...textSize.s,\n\twidth: '100%',\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tgap: Spacing.XS,\n\t':hover': {\n\t\tcursor: 'pointer'\n\t},\n\n\t'> span:last-of-type': {\n\t\tmarginLeft: 'auto',\n\t\t...textSize.xs,\n\t\tcolor: COLORS.TextGray\n\t}\n});\n\nexport const cryptoSelectorInputSufixCss = (\n\tprimaryColor: string,\n\tshowDropDown: boolean\n) =>\n\tcxs({\n\t\tmarginLeft: 'auto',\n\t\t...textSize.xs,\n\t\tcolor: COLORS.TextGray,\n\t\tdisplay: 'flex',\n\t\tgap: Spacing.XS,\n\t\talignItems: 'center',\n\t\t'> svg': {\n\t\t\tcolor: primaryColor,\n\t\t\t...(showDropDown ? rotateCss : {})\n\t\t}\n\t});\n\nexport const inputContainerWithDropDownCss = cxs({\n\tborderRadius: `${Radii.Default} ${Radii.Default} 0 0 `\n});\n\nexport const cryptoAmountInputContainerCss = (primaryColor: string) =>\n\tjoinClassNames([textInputContainerCss(primaryColor)]);\n\nexport const cryptoAmountInputColumns = cxs({\n\tdisplay: 'flex',\n\twidth: '100%',\n\tgap: Spacing.S,\n\talignItems: 'flex-end',\n\tfontWeight: 500\n});\n\nexport const cryptoAmountInputFirstColumn = cxs({\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\twidth: '100%',\n\tgap: Spacing.XXS,\n\t'> input': {\n\t\twidth: '100%',\n\t\ttextAlign: 'right',\n\t\tfontWeight: 700,\n\t\t...textSize.l\n\t},\n\ttextAlign: 'right'\n});\n\nexport const cryptoAmountInputSecondColumn = cxs({\n\tgap: Spacing.XXS,\n\tdisplay: 'flex',\n\tflexDirection: 'column'\n});\n\nexport const changeModeButtonCss = cxs({\n\t...bodyText,\n\toutline: 'none',\n\tborder: 'none',\n\tfontFamily: 'inherit',\n\tcursor: 'pointer',\n\tpadding: Spacing.XXS,\n\ttransform: 'rotate(90deg)',\n\tcolor: COLORS.TextGray,\n\t'> svg': {\n\t\tstrokeWidth: '2px'\n\t}\n});\n","import cxs from 'cxs';\nimport {getColoredBorder, Borders} from 'src/components/widget/theme/borders';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {horizontalStackCss, Spacing} from 'src/components/widget/theme/spacing';\n\nexport const donationAmountInputContainerErrorCss = cxs({\n\tborder: getColoredBorder(Borders.Normal, COLORS.Error)\n});\n\nexport const donationAmountInputCss = cxs({\n\tfontSize: textSize.l.fontSize,\n\tlineHeight: textSize.l.fontSize,\n\tfontWeight: 700\n});\n\nexport const donationAmountInputPrefixCss = cxs({\n\t...textSize.l,\n\tfontWeight: 700,\n\tdisplay: 'inline-flex',\n\tmarginRight: Spacing.XXS\n});\n\nexport const donationAmountInputSufixCss = (primaryColor: string) =>\n\tcxs({\n\t\t...textSize.m,\n\t\tfontWeight: 700,\n\t\tcolor: primaryColor,\n\t\tdisplay: 'inline-flex',\n\t\tmarginLeft: Spacing.XXS\n\t});\n\nexport const donationAmountAddAmountContainerCss = cxs({\n\t...horizontalStackCss.cxs(Spacing.M),\n\tjustifyContent: 'center'\n});\n\nexport const donationAmountAddAmountButtonCss = (primaryColor: string) =>\n\tcxs({\n\t\t...textSize.s,\n\t\tcolor: primaryColor,\n\t\tborderRadius: Radii.Big,\n\t\tfontWeight: 500,\n\t\tborder: `none`,\n\t\tpadding: 0,\n\t\tfontFamily: 'inherit',\n\t\tcursor: 'pointer',\n\t\tbackground: 'unset',\n\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tborder: `1px solid ${COLORS.DarkGray}`,\n\t\t\tpadding: `${Spacing.XS} ${Spacing.L}`\n\t\t}\n\t});\n","import {forwardRef} from 'preact/compat';\nimport {useRef, MutableRef} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {\n\ttextInputContainerCss,\n\ttextInputCss\n} from 'src/components/widget/components/TextInput/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface TextAreaProps\n\textends JSXInternal.HTMLAttributes {\n\tcontainerClassName?: string;\n\tinputClassName?: string;\n\tcontainerOnClick?: () => void;\n}\n\nconst TextArea = forwardRef(\n\t(props, ref) => {\n\t\tconst inputRef = useRef();\n\t\tconst {primaryColor} = useConfigContext();\n\n\t\tconst {containerClassName, inputClassName, containerOnClick, ...rest} =\n\t\t\tprops;\n\n\t\treturn (\n\t\t\t {\n\t\t\t\t\tinputRef.current?.focus();\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t {\n\t\t\t\t\t\tif (element) {\n\t\t\t\t\t\t\tinputRef.current = element;\n\t\t\t\t\t\t\tif (ref) {\n\t\t\t\t\t\t\t\t(ref as MutableRef).current = element;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tclassName={joinClassNames([textInputCss, inputClassName])}\n\t\t\t\t\t{...rest}\n\t\t\t\t/>\n\t\t\t
    \n\t\t);\n\t}\n);\n\nexport default TextArea;\n","import {ComponentChild} from 'preact';\nimport {forwardRef, useRef} from 'preact/compat';\nimport {MutableRef} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {\n\ttextInputContainerCss,\n\ttextInputCss\n} from 'src/components/widget/components/TextInput/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface TextInputProps\n\textends Omit<\n\t\tJSXInternal.HTMLAttributes,\n\t\t'sufix' | 'prefix'\n\t> {\n\tsufix?: ComponentChild;\n\tsufixClassName?: string;\n\tprefix?: ComponentChild;\n\tprefixClassName?: string;\n\tcontainerClassName?: string;\n\tinputClassName?: string;\n\tcontainerOnClick?: () => void;\n}\n\nconst TextInput = forwardRef((props, ref) => {\n\tconst {\n\t\tsufix,\n\t\tsufixClassName,\n\t\tprefix,\n\t\tprefixClassName,\n\t\tcontainerClassName,\n\t\tinputClassName,\n\t\tcontainerOnClick,\n\t\t...rest\n\t} = props;\n\tconst inputRef = useRef();\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t {\n\t\t\t\tif (containerOnClick) {\n\t\t\t\t\tcontainerOnClick();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tinputRef.current?.focus();\n\t\t\t}}\n\t\t>\n\t\t\t{prefix &&
    {prefix}
    }\n\t\t\t {\n\t\t\t\t\tif (element) {\n\t\t\t\t\t\tinputRef.current = element;\n\t\t\t\t\t\tif (ref) {\n\t\t\t\t\t\t\t(ref as MutableRef).current = element;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tclassName={joinClassNames([textInputCss, inputClassName])}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t\t{sufix &&
    {sufix}
    }\n\t\t
    \n\t);\n});\n\nexport default TextInput;\n","export default __webpack_public_path__ + \"58f20393bf2b41f944c6229c2af785b9.svg\";","export default __webpack_public_path__ + \"5982461fe2304c26f3a3cf4c50806dad.svg\";","export default __webpack_public_path__ + \"b31a89ce5555412a0c8a4c6463286584.svg\";","export default __webpack_public_path__ + \"26c9b1d3d7943e6e67cf13e039ba5ac8.svg\";","export default __webpack_public_path__ + \"ddb1f3b63e33585263e5905706d6ff6d.svg\";","export default __webpack_public_path__ + \"ad80427b5a2980f1d19884ede42b29de.svg\";","export default __webpack_public_path__ + \"9052c75387065f76bb3436b7e4ce12cd.svg\";","export default __webpack_public_path__ + \"3a5177b76709819ba4663556e60222f8.svg\";","export default __webpack_public_path__ + \"f8f4253f02d1fbc4bf04d0959a6e614c.svg\";","export default __webpack_public_path__ + \"4d81ee51fa2520df58ae092aeb3d0bd4.svg\";","export default __webpack_public_path__ + \"8098252f28e93069c75d6010d3ac6bc1.svg\";","export default __webpack_public_path__ + \"03c114f6e014588a4bde815d9bc85821.svg\";","export default __webpack_public_path__ + \"5450d3cada4fd0370ab8d885765f5cc3.svg\";","export default __webpack_public_path__ + \"cc9ce389e9a4e0f518e3caeb7b60912d.svg\";","export default __webpack_public_path__ + \"8f22b294629293d29895fddef0a8baea.svg\";","export default __webpack_public_path__ + \"f588feb3cbbcc0fb259a3630ec7e34ba.svg\";","export default __webpack_public_path__ + \"3e1eb932bdbaa2318584813bf468be53.svg\";","export default __webpack_public_path__ + \"badb98080214485db486794fb59a95cc.svg\";","export default __webpack_public_path__ + \"fc9295a4651c56d5b4e8c3aa13a93208.svg\";","export default __webpack_public_path__ + \"e4bfa8eb04696d4fd5ea04ca4c35469b.svg\";","export default __webpack_public_path__ + \"743324f8e09d34a894c21e91c396f289.svg\";","export default __webpack_public_path__ + \"b9021bb757262a32de6d8931015051d9.svg\";","export default __webpack_public_path__ + \"7ab9396038b4befda4354b2a476d9064.svg\";","export default __webpack_public_path__ + \"bc2c9e9d67b73656a6da5dd177aa10a2.svg\";","export default __webpack_public_path__ + \"6214ae0b42d798a0c9a51503a27a66bf.svg\";","export default __webpack_public_path__ + \"45bcde5a98dbbdf2a4e0769eca2154f1.svg\";","export default __webpack_public_path__ + \"8798fcc6fd2d5d3aeccea6ee3fcfec89.svg\";","export default __webpack_public_path__ + \"88611c6e2f9450f29ece8d2b36641670.svg\";","import algorand from 'src/components/widget/icons/CryptoCurrencyIcon/algorand.svg';\nimport apecoin from 'src/components/widget/icons/CryptoCurrencyIcon/apecoin.svg';\nimport avalanche from 'src/components/widget/icons/CryptoCurrencyIcon/avalanche.svg';\nimport basic_attention_token from 'src/components/widget/icons/CryptoCurrencyIcon/basic-attention-token.svg';\nimport binance from 'src/components/widget/icons/CryptoCurrencyIcon/binance.svg';\nimport bitcoincash from 'src/components/widget/icons/CryptoCurrencyIcon/bitcoin-cash.svg';\nimport bitcoin from 'src/components/widget/icons/CryptoCurrencyIcon/bitcoin.svg';\nimport chainlink from 'src/components/widget/icons/CryptoCurrencyIcon/chainlink.svg';\nimport dai from 'src/components/widget/icons/CryptoCurrencyIcon/dai.svg';\nimport dogecoin from 'src/components/widget/icons/CryptoCurrencyIcon/dogecoin.svg';\nimport ethereum from 'src/components/widget/icons/CryptoCurrencyIcon/ethereum.svg';\nimport filecoin from 'src/components/widget/icons/CryptoCurrencyIcon/filecoin.svg';\nimport graph from 'src/components/widget/icons/CryptoCurrencyIcon/graph.svg';\nimport litecoin from 'src/components/widget/icons/CryptoCurrencyIcon/litecoin.svg';\nimport mobilecoin from 'src/components/widget/icons/CryptoCurrencyIcon/mobilecoin.svg';\nimport polkadot from 'src/components/widget/icons/CryptoCurrencyIcon/polkadot.svg';\nimport polygon from 'src/components/widget/icons/CryptoCurrencyIcon/polygon.svg';\nimport raydium from 'src/components/widget/icons/CryptoCurrencyIcon/raydium.svg';\nimport saber from 'src/components/widget/icons/CryptoCurrencyIcon/saber.svg';\nimport samoyed from 'src/components/widget/icons/CryptoCurrencyIcon/samoyed.svg';\nimport shiba_inu from 'src/components/widget/icons/CryptoCurrencyIcon/shiba-inu.svg';\nimport solana from 'src/components/widget/icons/CryptoCurrencyIcon/solana.svg';\nimport stellar from 'src/components/widget/icons/CryptoCurrencyIcon/stellar.svg';\nimport tether from 'src/components/widget/icons/CryptoCurrencyIcon/tether.svg';\nimport tezos from 'src/components/widget/icons/CryptoCurrencyIcon/tezos.svg';\nimport uniswap from 'src/components/widget/icons/CryptoCurrencyIcon/uniswap.svg';\nimport usdcoin from 'src/components/widget/icons/CryptoCurrencyIcon/usd-coin.svg';\nimport zcash from 'src/components/widget/icons/CryptoCurrencyIcon/zcash.svg';\n\nexport enum CryptoCurrency {\n\tAAVE = 'AAVE',\n\tALCX = 'ALCX',\n\tALGO = 'ALGO',\n\tAMP = 'AMP',\n\tANKR = 'ANKR',\n\tAPE = 'APE',\n\tAPI3 = 'API3',\n\tAUDIO = 'AUDIO',\n\tAVAX = 'AVAX',\n\tAXS = 'AXS',\n\tBAT = 'BAT',\n\tBCH = 'BCH',\n\tBNB = 'BNB',\n\tBNT = 'BNT',\n\tBOND = 'BOND',\n\tBTC = 'BTC',\n\tCHZ = 'CHZ',\n\tCOMP = 'COMP',\n\tCRV = 'CRV',\n\tCUBE = 'CUBE',\n\tCVC = 'CVC',\n\tDAI = 'DAI',\n\tDOGE = 'DOGE',\n\tDOT = 'DOT',\n\tELON = 'ELON',\n\tENS = 'ENS',\n\tETH = 'ETH',\n\tFET = 'FET',\n\tFIL = 'FIL',\n\tFTM = 'FTM',\n\tGAL = 'GAL',\n\tGALA = 'GALA',\n\tGMT = 'GMT',\n\tGRT = 'GRT',\n\tGUSD = 'GUSD',\n\tINJ = 'INJ',\n\tJAM = 'JAM',\n\tKNC = 'KNC',\n\tKP3R = 'KP3R',\n\tLDO = 'LDO',\n\tLINK = 'LINK',\n\tLPT = 'LPT',\n\tLRC = 'LRC',\n\tLTC = 'LTC',\n\tMANA = 'MANA',\n\tMASK = 'MASK',\n\tMATIC = 'MATIC',\n\tMCO2 = 'MCO2',\n\tMKR = 'MKR',\n\tMOB = 'MOB',\n\tNMR = 'NMR',\n\tOXT = 'OXT',\n\tPAXG = 'PAXG',\n\tQNT = 'QNT',\n\tQRDO = 'QRDO',\n\tRAY = 'RAY',\n\tREN = 'REN',\n\tRNDR = 'RNDR',\n\tSAMO = 'SAMO',\n\tSAND = 'SAND',\n\tSBR = 'SBR',\n\tSHIB = 'SHIB',\n\tSKL = 'SKL',\n\tSLP = 'SLP',\n\tSNX = 'SNX',\n\tSOL = 'SOL',\n\tSTORJ = 'STORJ',\n\tSUSHI = 'SUSHI',\n\tUMA = 'UMA',\n\tUNI = 'UNI',\n\tUSDC = 'USDC',\n\tUSDT = 'USDT',\n\tXLM = 'XLM',\n\tXRP = 'XRP',\n\tXTZ = 'XTZ',\n\tYFI = 'YFI',\n\tZBC = 'ZBC',\n\tZEC = 'ZEC',\n\tZRX = 'ZRX'\n}\n\nexport enum ContractType {\n\tERC20 = 'ERC-20',\n\tSPL = 'SPL'\n}\n\nexport interface SharedCryptoCurrencyConfig {\n\tdisplayName: string;\n\tabbreviation: string;\n\tdecimalOffset: number;\n\tcontractType?: ContractType;\n\tcoingeckoId: string;\n}\n\nexport const DISABLED_TOKENS = [\n\tCryptoCurrency.ALGO,\n\tCryptoCurrency.MOB,\n\tCryptoCurrency.XLM,\n\tCryptoCurrency.BNB\n];\n\nexport const SharedCryptoCurrencyConfig: {\n\t[key in CryptoCurrency]: SharedCryptoCurrencyConfig;\n} = {\n\t[CryptoCurrency.AAVE]: {\n\t\tdisplayName: 'Aave',\n\t\tabbreviation: 'AAVE',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'aave'\n\t},\n\t[CryptoCurrency.ALCX]: {\n\t\tdisplayName: 'Alchemix',\n\t\tabbreviation: 'ALCX',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'alchemix'\n\t},\n\t[CryptoCurrency.ALGO]: {\n\t\tdisplayName: 'Algorand',\n\t\tabbreviation: 'ALGO',\n\t\tdecimalOffset: 6,\n\t\tcoingeckoId: 'algorand'\n\t},\n\t[CryptoCurrency.AMP]: {\n\t\tdisplayName: 'Amp',\n\t\tabbreviation: 'AMP',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'amp-token'\n\t},\n\t[CryptoCurrency.ANKR]: {\n\t\tdisplayName: 'Ankr',\n\t\tabbreviation: 'ANKR',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'ankr'\n\t},\n\t[CryptoCurrency.APE]: {\n\t\tdisplayName: 'Apecoin',\n\t\tabbreviation: 'APE',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'apecoin'\n\t},\n\t[CryptoCurrency.API3]: {\n\t\tdisplayName: 'API3',\n\t\tabbreviation: 'API3',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'api3'\n\t},\n\t[CryptoCurrency.AUDIO]: {\n\t\tdisplayName: 'Audius',\n\t\tabbreviation: 'AUDIO',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'audius'\n\t},\n\t[CryptoCurrency.AVAX]: {\n\t\tdisplayName: 'Avalanche',\n\t\tabbreviation: 'AVAX',\n\t\tdecimalOffset: 9,\n\t\tcoingeckoId: 'avalanche-2'\n\t},\n\t[CryptoCurrency.AXS]: {\n\t\tdisplayName: 'Axie Infinity',\n\t\tabbreviation: 'AXS',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'axs'\n\t},\n\t[CryptoCurrency.BAT]: {\n\t\tdisplayName: 'Basic Attention Token',\n\t\tabbreviation: 'BAT',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'basic-attention-token'\n\t},\n\t[CryptoCurrency.BCH]: {\n\t\tdisplayName: 'Bitcoin Cash',\n\t\tabbreviation: 'BCH',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'bitcoin-cash'\n\t},\n\t[CryptoCurrency.BNB]: {\n\t\tdisplayName: 'Binance Coin',\n\t\tabbreviation: 'BNB',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'binancecoin'\n\t},\n\t[CryptoCurrency.BNT]: {\n\t\tdisplayName: 'Bancor',\n\t\tabbreviation: 'BNT',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'bancor'\n\t},\n\t[CryptoCurrency.BOND]: {\n\t\tdisplayName: 'BarnBridge',\n\t\tabbreviation: 'BOND',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'barnbridge'\n\t},\n\t[CryptoCurrency.BTC]: {\n\t\tdisplayName: 'Bitcoin',\n\t\tabbreviation: 'BTC',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'bitcoin'\n\t},\n\t[CryptoCurrency.CHZ]: {\n\t\tdisplayName: 'Chiliz',\n\t\tabbreviation: 'CHZ',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'chiliz'\n\t},\n\t[CryptoCurrency.COMP]: {\n\t\tdisplayName: 'Compound',\n\t\tabbreviation: 'COMP',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'compound-governance-token'\n\t},\n\t[CryptoCurrency.CRV]: {\n\t\tdisplayName: 'Curve DAO Token',\n\t\tabbreviation: 'CRV',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'curve-dao-token'\n\t},\n\t[CryptoCurrency.CUBE]: {\n\t\tdisplayName: 'Cube',\n\t\tabbreviation: 'CUBE',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'somnium-space-cubes'\n\t},\n\t[CryptoCurrency.CVC]: {\n\t\tdisplayName: 'Civic',\n\t\tabbreviation: 'CVC',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'civic'\n\t},\n\t[CryptoCurrency.DAI]: {\n\t\tdisplayName: 'Dai',\n\t\tabbreviation: 'DAI',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'dai'\n\t},\n\t[CryptoCurrency.DOGE]: {\n\t\tdisplayName: 'DogeCoin',\n\t\tabbreviation: 'DOGE',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'dogecoin'\n\t},\n\t[CryptoCurrency.DOT]: {\n\t\tdisplayName: 'Polkadot',\n\t\tabbreviation: 'DOT',\n\t\tdecimalOffset: 10,\n\t\tcoingeckoId: 'polkadot'\n\t},\n\t[CryptoCurrency.ELON]: {\n\t\tdisplayName: 'Dogelon Mars',\n\t\tabbreviation: 'ELON',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'dogelon-mars'\n\t},\n\t[CryptoCurrency.ENS]: {\n\t\tdisplayName: 'Ethereum Name Service',\n\t\tabbreviation: 'ENS',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'ethereum-name-service'\n\t},\n\t[CryptoCurrency.ETH]: {\n\t\tdisplayName: 'Ethereum',\n\t\tabbreviation: 'ETH',\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'ethereum'\n\t},\n\t[CryptoCurrency.FET]: {\n\t\tdisplayName: 'Fetch.ai',\n\t\tabbreviation: 'FET',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'fetch-ai'\n\t},\n\t[CryptoCurrency.FIL]: {\n\t\tdisplayName: 'Filecoin',\n\t\tabbreviation: 'FIL',\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'filecoin'\n\t},\n\t[CryptoCurrency.FTM]: {\n\t\tdisplayName: 'Fantom',\n\t\tabbreviation: 'FTM',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'fantom'\n\t},\n\t[CryptoCurrency.GAL]: {\n\t\tdisplayName: 'Galaxe',\n\t\tabbreviation: 'GAL',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'project-galaxy'\n\t},\n\t[CryptoCurrency.GALA]: {\n\t\tdisplayName: 'Gala',\n\t\tabbreviation: 'GALA',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'gala'\n\t},\n\t[CryptoCurrency.GMT]: {\n\t\tdisplayName: 'STEPN',\n\t\tabbreviation: 'GMT',\n\t\tcontractType: ContractType.SPL,\n\t\tdecimalOffset: 9,\n\t\tcoingeckoId: 'stepn'\n\t},\n\t[CryptoCurrency.GRT]: {\n\t\tdisplayName: 'The Graph',\n\t\tabbreviation: 'GRT',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'the-graph'\n\t},\n\t[CryptoCurrency.GUSD]: {\n\t\tdisplayName: 'Gemini Dollar',\n\t\tabbreviation: 'GUSD',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'gemini-dollar'\n\t},\n\t[CryptoCurrency.INJ]: {\n\t\tdisplayName: 'Injective Protocol',\n\t\tabbreviation: 'INJ',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'injective-protocol'\n\t},\n\t[CryptoCurrency.JAM]: {\n\t\tdisplayName: 'Geojam',\n\t\tabbreviation: 'JAM',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'geojam'\n\t},\n\t[CryptoCurrency.KNC]: {\n\t\tdisplayName: 'Kyber types.Network',\n\t\tabbreviation: 'KNC',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'kyber-network-crystal'\n\t},\n\t[CryptoCurrency.KP3R]: {\n\t\tdisplayName: 'Keep3rV1',\n\t\tabbreviation: 'KP3R',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'keep3rv1'\n\t},\n\t[CryptoCurrency.LDO]: {\n\t\tdisplayName: 'Lido DAO',\n\t\tabbreviation: 'LDO',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'lido-dao'\n\t},\n\t[CryptoCurrency.LINK]: {\n\t\tdisplayName: 'Chainlink',\n\t\tabbreviation: 'LINK',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'chainlink'\n\t},\n\t[CryptoCurrency.LPT]: {\n\t\tdisplayName: 'Livepeer',\n\t\tabbreviation: 'LPT',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'livepeer'\n\t},\n\t[CryptoCurrency.LRC]: {\n\t\tdisplayName: 'Loopring',\n\t\tabbreviation: 'LRC',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'loopring'\n\t},\n\t[CryptoCurrency.LTC]: {\n\t\tdisplayName: 'Litecoin',\n\t\tabbreviation: 'LTC',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'litecoin'\n\t},\n\t[CryptoCurrency.MANA]: {\n\t\tdisplayName: 'Mana',\n\t\tabbreviation: 'MANA',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'decentraland'\n\t},\n\t[CryptoCurrency.MASK]: {\n\t\tdisplayName: 'Mask Network',\n\t\tabbreviation: 'MASK',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'mask-network'\n\t},\n\t[CryptoCurrency.MATIC]: {\n\t\tdisplayName: 'Polygon',\n\t\tabbreviation: 'MATIC',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'matic-network'\n\t},\n\t[CryptoCurrency.MCO2]: {\n\t\tdisplayName: 'Moss Carbon Credit',\n\t\tabbreviation: 'MCO2',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'moss-carbon-credit'\n\t},\n\t[CryptoCurrency.MKR]: {\n\t\tdisplayName: 'Maker',\n\t\tabbreviation: 'MKR',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'maker'\n\t},\n\t[CryptoCurrency.MOB]: {\n\t\tdisplayName: 'MobileCoin',\n\t\tabbreviation: 'MOB',\n\t\tdecimalOffset: 12,\n\t\tcoingeckoId: 'mobilecoin'\n\t},\n\t[CryptoCurrency.NMR]: {\n\t\tdisplayName: 'Numeraire',\n\t\tabbreviation: 'NMR',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'numeraire'\n\t},\n\t[CryptoCurrency.OXT]: {\n\t\tdisplayName: 'Orchid',\n\t\tabbreviation: 'OXT',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'orchid-protocol'\n\t},\n\t[CryptoCurrency.PAXG]: {\n\t\tdisplayName: 'PAX Gold',\n\t\tabbreviation: 'PAXG',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'pax-gold'\n\t},\n\t[CryptoCurrency.QNT]: {\n\t\tdisplayName: 'Quant',\n\t\tabbreviation: 'QNT',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'quant-network'\n\t},\n\t[CryptoCurrency.QRDO]: {\n\t\tdisplayName: 'Qredo',\n\t\tabbreviation: 'QRDO',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'qredo'\n\t},\n\t[CryptoCurrency.RAY]: {\n\t\tdisplayName: 'Raydium',\n\t\tabbreviation: 'RAY',\n\t\tdecimalOffset: 6,\n\t\tcontractType: ContractType.SPL,\n\t\tcoingeckoId: 'raydium'\n\t},\n\t[CryptoCurrency.REN]: {\n\t\tdisplayName: 'Ren',\n\t\tabbreviation: 'REN',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'republic-protocol'\n\t},\n\t[CryptoCurrency.RNDR]: {\n\t\tdisplayName: 'Render Token',\n\t\tabbreviation: 'RNDR',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'render-token'\n\t},\n\t[CryptoCurrency.SAMO]: {\n\t\tdisplayName: 'Samoyed',\n\t\tabbreviation: 'SAMO',\n\t\tdecimalOffset: 9,\n\t\tcontractType: ContractType.SPL,\n\t\tcoingeckoId: 'samoyedcoin'\n\t},\n\t[CryptoCurrency.SAND]: {\n\t\tdisplayName: 'Sandbox',\n\t\tabbreviation: 'SAND',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'the-sandbox'\n\t},\n\t[CryptoCurrency.SBR]: {\n\t\tdisplayName: 'Saber',\n\t\tabbreviation: 'SBR',\n\t\tdecimalOffset: 6,\n\t\tcontractType: ContractType.SPL,\n\t\tcoingeckoId: 'saber'\n\t},\n\t[CryptoCurrency.SHIB]: {\n\t\tdisplayName: 'Shiba Inu',\n\t\tabbreviation: 'SHIB',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'shiba-inu'\n\t},\n\t[CryptoCurrency.SKL]: {\n\t\tdisplayName: 'Skale',\n\t\tabbreviation: 'SKL',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'skale'\n\t},\n\t[CryptoCurrency.SLP]: {\n\t\tdisplayName: 'Smooth Love Potion',\n\t\tabbreviation: 'SLP',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'smooth-love-potion'\n\t},\n\t[CryptoCurrency.SNX]: {\n\t\tdisplayName: 'Synthetix',\n\t\tabbreviation: 'SNX',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'havven'\n\t},\n\t[CryptoCurrency.SOL]: {\n\t\tdisplayName: 'Solana',\n\t\tabbreviation: 'SOL',\n\t\tdecimalOffset: 9,\n\t\tcoingeckoId: 'solana'\n\t},\n\t[CryptoCurrency.STORJ]: {\n\t\tdisplayName: 'Storj',\n\t\tabbreviation: 'STORJ',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'storj'\n\t},\n\t[CryptoCurrency.SUSHI]: {\n\t\tdisplayName: 'SushiSwap',\n\t\tabbreviation: 'SUSHI',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'sushi'\n\t},\n\t[CryptoCurrency.UMA]: {\n\t\tdisplayName: 'UMA',\n\t\tabbreviation: 'UMA',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'uma'\n\t},\n\t[CryptoCurrency.UNI]: {\n\t\tdisplayName: 'Uniswap',\n\t\tabbreviation: 'UNI',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'uniswap'\n\t},\n\t[CryptoCurrency.USDC]: {\n\t\tdisplayName: 'USD Coin',\n\t\tabbreviation: 'USDC',\n\t\tdecimalOffset: 6,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'usd-coin'\n\t},\n\t[CryptoCurrency.USDT]: {\n\t\tdisplayName: 'Tether',\n\t\tabbreviation: 'USDT',\n\t\tdecimalOffset: 6,\n\t\tcoingeckoId: 'tether'\n\t},\n\t[CryptoCurrency.XLM]: {\n\t\tdisplayName: 'Stellar',\n\t\tabbreviation: 'XLM',\n\t\tdecimalOffset: 7,\n\t\tcoingeckoId: 'stellar'\n\t},\n\t[CryptoCurrency.XRP]: {\n\t\tdisplayName: 'XRP',\n\t\tabbreviation: 'XRP',\n\t\tdecimalOffset: 6,\n\t\tcoingeckoId: 'ripple'\n\t},\n\t[CryptoCurrency.XTZ]: {\n\t\tdisplayName: 'Tezos',\n\t\tabbreviation: 'XTZ',\n\t\tdecimalOffset: 6,\n\t\tcoingeckoId: 'tezos'\n\t},\n\t[CryptoCurrency.YFI]: {\n\t\tdisplayName: 'Yearn Finance',\n\t\tabbreviation: 'YFI',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'yearn-finance'\n\t},\n\t[CryptoCurrency.ZBC]: {\n\t\tdisplayName: 'Zebec Protocol',\n\t\tabbreviation: 'ZBC',\n\t\tcontractType: ContractType.SPL,\n\t\tdecimalOffset: 9,\n\t\tcoingeckoId: 'zebec-protocol'\n\t},\n\t[CryptoCurrency.ZEC]: {\n\t\tdisplayName: 'ZCash',\n\t\tabbreviation: 'ZEC',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'zcash'\n\t},\n\t[CryptoCurrency.ZRX]: {\n\t\tdisplayName: '0x',\n\t\tabbreviation: 'ZRX',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: '0x'\n\t}\n};\n\nexport interface CryptoCurrencyOption {\n\tvalue: CryptoCurrency;\n\tlabel: string;\n\tcontractType: string;\n}\n\ntype WebsiteCryptoCurrencyConfig =\n\t| {\n\t\t\ticon: string;\n\t }\n\t| {\n\t\t\ticonCloudinaryId: string;\n\t };\n\nconst WebsiteCryptoCurrencyConfig: {\n\t[key in CryptoCurrency]: WebsiteCryptoCurrencyConfig;\n} = {\n\t[CryptoCurrency.AAVE]: {iconCloudinaryId: 'crypto/aave_oszkzj'},\n\t[CryptoCurrency.ALCX]: {iconCloudinaryId: 'crypto/alcx_agfvh3'},\n\t[CryptoCurrency.AMP]: {iconCloudinaryId: 'crypto/amp_zrgutx'},\n\t[CryptoCurrency.ANKR]: {iconCloudinaryId: 'crypto/ankr_vipelu'},\n\t[CryptoCurrency.ALGO]: {icon: algorand},\n\t[CryptoCurrency.APE]: {icon: apecoin},\n\t[CryptoCurrency.AVAX]: {icon: avalanche},\n\t[CryptoCurrency.AXS]: {iconCloudinaryId: 'crypto/axs_vdwbc0'},\n\t[CryptoCurrency.BAT]: {icon: basic_attention_token},\n\t[CryptoCurrency.BCH]: {icon: bitcoincash},\n\t[CryptoCurrency.BNB]: {icon: binance},\n\t[CryptoCurrency.BTC]: {icon: bitcoin},\n\t[CryptoCurrency.CHZ]: {iconCloudinaryId: 'crypto/chiliz_j11blm'},\n\t[CryptoCurrency.DAI]: {icon: dai},\n\t[CryptoCurrency.DOGE]: {icon: dogecoin},\n\t[CryptoCurrency.DOT]: {icon: polkadot},\n\t[CryptoCurrency.ETH]: {icon: ethereum},\n\t[CryptoCurrency.FIL]: {icon: filecoin},\n\t[CryptoCurrency.GRT]: {icon: graph},\n\t[CryptoCurrency.LINK]: {icon: chainlink},\n\t[CryptoCurrency.LTC]: {icon: litecoin},\n\t[CryptoCurrency.MATIC]: {icon: polygon},\n\t[CryptoCurrency.MOB]: {icon: mobilecoin},\n\t[CryptoCurrency.RAY]: {icon: raydium},\n\t[CryptoCurrency.SAMO]: {icon: samoyed},\n\t[CryptoCurrency.SBR]: {icon: saber},\n\t[CryptoCurrency.SHIB]: {icon: shiba_inu},\n\t[CryptoCurrency.SLP]: {iconCloudinaryId: 'crypto/slp_clp71c'},\n\t[CryptoCurrency.SOL]: {icon: solana},\n\t[CryptoCurrency.UNI]: {icon: uniswap},\n\t[CryptoCurrency.USDC]: {icon: usdcoin},\n\t[CryptoCurrency.USDT]: {icon: tether},\n\t[CryptoCurrency.XLM]: {icon: stellar},\n\t[CryptoCurrency.XRP]: {iconCloudinaryId: 'crypto/xrp_uwcehg'},\n\t[CryptoCurrency.XTZ]: {icon: tezos},\n\t[CryptoCurrency.ZEC]: {icon: zcash},\n\t[CryptoCurrency.API3]: {iconCloudinaryId: 'crypto/xb8xoz6kxev0uytaejlo'},\n\t[CryptoCurrency.AUDIO]: {iconCloudinaryId: 'crypto/ucctvvgwedku9hexplp7'},\n\t[CryptoCurrency.BNT]: {iconCloudinaryId: 'crypto/jgb6ub5gckohghdrt1ig'},\n\t[CryptoCurrency.BOND]: {iconCloudinaryId: 'crypto/cidlkxmdqdoi2ezygfjj'},\n\t[CryptoCurrency.COMP]: {iconCloudinaryId: 'crypto/ayjushqknohuz9x3hcx5'},\n\t[CryptoCurrency.CRV]: {iconCloudinaryId: 'crypto/txyb4aa9a0skuhoyjcti'},\n\t[CryptoCurrency.CUBE]: {iconCloudinaryId: 'crypto/n8su92fe1atqx79hrhqf'},\n\t[CryptoCurrency.CVC]: {iconCloudinaryId: 'crypto/cw8ahifxtnfw8pbgh5o9'},\n\t[CryptoCurrency.ELON]: {iconCloudinaryId: 'crypto/fvsarijyyz1v9j5w1sh2'},\n\t[CryptoCurrency.ENS]: {iconCloudinaryId: 'crypto/naiw9tgamtvxcxctwxog'},\n\t[CryptoCurrency.FET]: {iconCloudinaryId: 'crypto/mwfznnuw28qqeia4uwov'},\n\t[CryptoCurrency.FTM]: {iconCloudinaryId: 'crypto/laq3m7el5wdfmlhwwtk0'},\n\t[CryptoCurrency.GAL]: {iconCloudinaryId: 'crypto/a5km5rat7dpiz6ckkvfi'},\n\t[CryptoCurrency.GALA]: {iconCloudinaryId: 'crypto/rifljrw1ry9wu1i7mxji'},\n\t[CryptoCurrency.GMT]: {iconCloudinaryId: 'crypto/uyyddnskoabbpei7olin'},\n\t[CryptoCurrency.GUSD]: {iconCloudinaryId: 'crypto/w8zltgl5ngsz1lqch17g'},\n\t[CryptoCurrency.INJ]: {iconCloudinaryId: 'crypto/gi0voz42gn33azwaa11a'},\n\t[CryptoCurrency.JAM]: {iconCloudinaryId: 'crypto/xmn1xxzccz84xiej1esw'},\n\t[CryptoCurrency.KNC]: {iconCloudinaryId: 'crypto/mqdyhpc07mle6dkfomye'},\n\t[CryptoCurrency.KP3R]: {iconCloudinaryId: 'crypto/eoabgtxyhpqqfhv1bxud'},\n\t[CryptoCurrency.LDO]: {iconCloudinaryId: 'crypto/thmvnuxks9z3gthhypwb'},\n\t[CryptoCurrency.LPT]: {iconCloudinaryId: 'crypto/setl154mkwd9kpfly7om'},\n\t[CryptoCurrency.LRC]: {iconCloudinaryId: 'crypto/sazpx9zyfsgbmprmfag9'},\n\t[CryptoCurrency.MANA]: {iconCloudinaryId: 'crypto/ekefdi1p3jgoeb08oszc'},\n\t[CryptoCurrency.MASK]: {iconCloudinaryId: 'crypto/ykwym7djaofb2q6lcn5n'},\n\t[CryptoCurrency.MCO2]: {iconCloudinaryId: 'crypto/ysuyysfrukryu1jw2wrh'},\n\t[CryptoCurrency.MKR]: {iconCloudinaryId: 'crypto/tpdipvaap6m150j2hdec'},\n\t[CryptoCurrency.NMR]: {iconCloudinaryId: 'crypto/bqecgq3rawel0k99tohj'},\n\t[CryptoCurrency.OXT]: {iconCloudinaryId: 'crypto/ietkmjcp0yj71vlg0zjy'},\n\t[CryptoCurrency.PAXG]: {iconCloudinaryId: 'crypto/yb5x1aizhhdn8mprrn2m'},\n\t[CryptoCurrency.QNT]: {iconCloudinaryId: 'crypto/dwdx02ifn9fsvbw1pgfz'},\n\t[CryptoCurrency.QRDO]: {iconCloudinaryId: 'crypto/jzbmlpvwoogroaaazkxz'},\n\t[CryptoCurrency.REN]: {iconCloudinaryId: 'crypto/ili8nkjwnifmbfra20ly'},\n\t[CryptoCurrency.RNDR]: {iconCloudinaryId: 'crypto/tm0klwno0hqjbcxsuvrp'},\n\t[CryptoCurrency.SAND]: {iconCloudinaryId: 'crypto/w6g6ep4ghqpsz54vqzmy'},\n\t[CryptoCurrency.SKL]: {iconCloudinaryId: 'crypto/zccvwa5yin8r32s4sfqy'},\n\t[CryptoCurrency.SNX]: {iconCloudinaryId: 'crypto/sxvudvsjujuhdupwssvz'},\n\t[CryptoCurrency.STORJ]: {iconCloudinaryId: 'crypto/le1ikh3apsrxyttjxg64'},\n\t[CryptoCurrency.SUSHI]: {iconCloudinaryId: 'crypto/iivxx5mfdz1bckmhom1f'},\n\t[CryptoCurrency.UMA]: {iconCloudinaryId: 'crypto/imxydvsf4mydmyjukbel'},\n\t[CryptoCurrency.YFI]: {iconCloudinaryId: 'crypto/mal5muwn4fcsbuuyhohz'},\n\t[CryptoCurrency.ZBC]: {iconCloudinaryId: 'crypto/hhiopvuac8qbpcnupgle'},\n\t[CryptoCurrency.ZRX]: {iconCloudinaryId: 'crypto/ge5jqonw89ffg200z0in'}\n};\n\nexport const CryptoCurrencyConfig = Object.fromEntries(\n\tObject.values(CryptoCurrency).map((cc: CryptoCurrency) => [\n\t\tcc,\n\t\t{...SharedCryptoCurrencyConfig[cc], ...WebsiteCryptoCurrencyConfig[cc]}\n\t])\n) as {\n\t[key in CryptoCurrency]: SharedCryptoCurrencyConfig &\n\t\tWebsiteCryptoCurrencyConfig;\n};\n","export const SearchIcon = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {ContextProvider} from 'src/components/widget/context';\nimport Widget from 'src/components/widget/index';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nlet originalOverflow: string;\nconst getOriginalOverflow = () => {\n\tconst body = document.querySelector('body');\n\n\tif (!originalOverflow) {\n\t\toriginalOverflow = body?.style.overflow ? body.style.overflow : 'unset';\n\t}\n\n\treturn originalOverflow;\n};\n\nconst addOverflowToBody = () => {\n\tconst body = document.querySelector('body');\n\tif (body) {\n\t\tbody.style.overflow = 'hidden';\n\t}\n};\n\nconst removeOverflowFromBody = () => {\n\tconst body = document.querySelector('body');\n\tconst overflow = getOriginalOverflow();\n\tif (body) {\n\t\tbody.style.overflow = overflow;\n\t}\n};\n\ninterface WidgetLoaderProps {\n\toptions: Partial;\n\thide: () => void;\n}\n\nexport const WidgetLoader = ({options = {}, hide}: WidgetLoaderProps) => {\n\tremoveOverflowFromBody();\n\tif (!options.show) {\n\t\t// Not showing\n\t\treturn null;\n\t}\n\n\taddOverflowToBody();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import getScriptParameters from 'src/helpers/getScriptParameters';\n\nconst AUTO_PLAY_PARAM = 'explicit';\n\nexport function shouldEnableAutoPlay() {\n\tconst parameters = getScriptParameters();\n\n\tif (parameters) {\n\t\treturn parameters[AUTO_PLAY_PARAM] !== '1';\n\t}\n\n\treturn true;\n}\n","import cxs from 'cxs';\nimport {COLORS} from 'src/components/widget/theme/colors';\n\nconst DEFAULT_LOADING_SIZE = 72;\n\nconst MASK = `data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath class='logoMask' stroke-dasharray='170px' d='M32.547 43C39.081 43 48 38.895 48 29.5C48 20.104 38.132 12.5 29.5 12.5C20.868 12.5 9 19.506 9 36C9 52.495 23.805 59.345 32.547 59.345C41.288 59.345 62.5 54.104 62.5 29.5' stroke='white' stroke-width='10'/%3E%3Canimate attributeType='XML' attributeName='stroke-dashoffset' from='170px' to='-170px' dur='1.25s' repeatCount='indefinite'/%3E%3C/svg%3E%0A`;\nconst loadingSvgCss = cxs({\n\tdisplay: 'inline-block',\n\tverticalAlign: 'middle',\n\n\tmaskImage: `url(\"${MASK}\")`,\n\t'-webkit-mask-image': `url(\"${MASK}\")`,\n\t'-webkit-mask-size': 'cover',\n\tmaskSize: 'cover'\n});\n\nconst loadingPathCss = (color: string) =>\n\tcxs({\n\t\tfill: color\n\t});\ninterface LoadingIconProps {\n\tsize?: number;\n\tcolor?: string;\n}\n\nexport const LoadingIcon = ({\n\tsize = DEFAULT_LOADING_SIZE,\n\tcolor = COLORS.LightGray\n}: LoadingIconProps) => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const RepeatIcon = ({className}: {className?: string}) => (\n\t\n\t\t\n\t\t\n\t\t\n\t\n);\n","import {Big} from 'big.js';\nimport cxs from 'cxs';\nimport {useState, useRef, useEffect, useCallback} from 'preact/hooks';\nimport {MAX_CRYPTO_DECIMALS_FOR_DISPLAY} from 'src/components/widget/components/PaymentProcess/CryptoFlow/CryptoSelector';\nimport {\n\tchangeModeButtonCss,\n\tcryptoAmountInputColumns,\n\tcryptoAmountInputContainerCss,\n\tcryptoAmountInputFirstColumn,\n\tcryptoAmountInputSecondColumn\n} from 'src/components/widget/components/PaymentProcess/CryptoFlow/styles';\nimport {donationAmountInputContainerErrorCss} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {textInputCss} from 'src/components/widget/components/TextInput/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {LoadingIcon} from 'src/components/widget/icons/LoadingIcon';\nimport {RepeatIcon} from 'src/components/widget/icons/RepeatIcon';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {displayCurrencyValue} from 'src/helpers/displayCurrencyValue';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface CryptoAmountInputProps {\n\tcryptoTokenRate: number | null;\n\tcryptoTokenLoading: boolean;\n}\nexport const CryptoAmountInput = ({\n\tcryptoTokenLoading,\n\tcryptoTokenRate\n}: CryptoAmountInputProps) => {\n\tconst [cryptoAmountString, setCryptoAmountString] = useState('');\n\tconst {cryptoAmount, setCryptoAmount, cryptoCurrency, submitError} =\n\t\tuseWidgetContext();\n\n\tconst {primaryColor} = useConfigContext();\n\tconst inputContainerClasses = joinClassNames([\n\t\tcryptoAmountInputContainerCss(primaryColor),\n\t\t...(submitError ? [donationAmountInputContainerErrorCss] : [])\n\t]);\n\n\tconst [amountWarning, setAmountWarning] = useState(\n\t\tundefined\n\t);\n\tconst [isCryptoInput, setIsCryptoInput] = useState(true);\n\n\tconst amountInputRef = useRef(null);\n\n\tuseEffect(() => {\n\t\tif (cryptoCurrency && amountInputRef && amountInputRef.current) {\n\t\t\tamountInputRef.current.focus();\n\t\t}\n\t}, [cryptoCurrency]);\n\n\tconst setDonationAmount = useCallback(\n\t\t(newAmount: string) => {\n\t\t\tconst newAmountBig =\n\t\t\t\tnewAmount && newAmount !== '' ? new Big(newAmount) : undefined;\n\t\t\tif (isCryptoInput) {\n\t\t\t\tsetCryptoAmountString(newAmountBig?.toString() ?? '');\n\t\t\t\tsetCryptoAmount(newAmountBig?.toNumber() ?? 0);\n\t\t\t} else {\n\t\t\t\tconst usdAmountBig =\n\t\t\t\t\tnewAmountBig && cryptoTokenRate\n\t\t\t\t\t\t? newAmountBig\n\t\t\t\t\t\t\t\t.div(cryptoTokenRate)\n\t\t\t\t\t\t\t\t.round(MAX_CRYPTO_DECIMALS_FOR_DISPLAY)\n\t\t\t\t\t\t: new Big(0);\n\t\t\t\tsetCryptoAmountString(usdAmountBig.toString());\n\t\t\t\tsetCryptoAmount(usdAmountBig.toNumber());\n\t\t\t}\n\t\t},\n\t\t[setCryptoAmount, isCryptoInput, cryptoTokenRate]\n\t);\n\n\tconst amountValue =\n\t\tcryptoTokenRate &&\n\t\tcryptoAmount &&\n\t\tnew Big(cryptoAmount).times(cryptoTokenRate).round(2).toString();\n\n\tuseEffect(() => {\n\t\tif (!amountWarning) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst timer = setTimeout(() => {\n\t\t\tsetAmountWarning(undefined);\n\t\t}, 1000);\n\t\treturn () => {\n\t\t\tclearTimeout(timer);\n\t\t};\n\t}, [amountWarning]);\n\n\tconst onAmountChanged = useCallback(\n\t\t(stringValue: string) => {\n\t\t\tsetAmountWarning(undefined);\n\t\t\tif (stringValue === '') {\n\t\t\t\tsetDonationAmount('');\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tsetAmountWarning(undefined);\n\t\t\ttry {\n\t\t\t\tconst bigValue = new Big(stringValue);\n\t\t\t\tif (bigValue.lt(0)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (bigValue.gt(Number.MAX_SAFE_INTEGER)) {\n\t\t\t\t\tsetAmountWarning('Amount is too large');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tsetDonationAmount(stringValue);\n\t\t\treturn true;\n\t\t},\n\t\t[setDonationAmount]\n\t);\n\n\tconst zeroRate = cryptoTokenRate === 0;\n\n\treturn (\n\t\t
    \n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t onAmountChanged(event.currentTarget.value)}\n\t\t\t\t\t/>\n\t\t\t\t\t{!zeroRate && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{cryptoTokenRate === null && cryptoTokenLoading ? (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t) : isCryptoInput ? (\n\t\t\t\t\t\t\t\tdisplayCurrencyValue(amountValue ?? 0, 'USD', {\n\t\t\t\t\t\t\t\t\tshowCurrency: false\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\tcryptoAmount ?? 0\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    {isCryptoInput ? cryptoCurrency : 'USD'}
    \n\t\t\t\t\t{!zeroRate && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{isCryptoInput ? 'USD' : cryptoCurrency}*\n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t
    \n\t\t\t{!zeroRate && (\n\t\t\t\t {\n\t\t\t\t\t\tsetIsCryptoInput(!isCryptoInput);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t)}\n\t\t
    \n\t);\n};\n","export const AppleIcon = () => (\n\t\n\t\t\n\t\t\n\t\n);\n","export const GiftIcon = ({className}: {className?: string}) => (\n\t\n\t\t\n\t\n);\n","export const GoogleIcon = () => (\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n);\n","import {VNode} from 'preact';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {AppleIcon} from 'src/components/widget/icons/AppleIcon';\nimport {BankIcon} from 'src/components/widget/icons/BankIcon';\nimport {CardIcon} from 'src/components/widget/icons/CardIcon';\nimport {CryptoIcon} from 'src/components/widget/icons/CryptoIcon';\nimport {DafIcon} from 'src/components/widget/icons/DafIcon';\nimport {GiftIcon} from 'src/components/widget/icons/GiftIcon';\nimport {GoogleIcon} from 'src/components/widget/icons/GoogleIcon';\nimport {PaypalIcon} from 'src/components/widget/icons/Paypalcon';\nimport {StocksIcon} from 'src/components/widget/icons/StocksIcon';\nimport {VenmoIcon} from 'src/components/widget/icons/VenmoIcon';\nimport {\n\tPaymentMethod,\n\tPaymentRequestAvailable\n} from 'src/components/widget/types/PaymentMethod';\n\ninterface IconForPaymentMethodProps {\n\tmethod: PaymentMethod;\n}\n\nconst IconForPaymentMethodMap: {\n\t[key in Exclude]: VNode;\n} = {\n\t[PaymentMethod.CREDIT_CARD]: ,\n\t[PaymentMethod.BANK]: ,\n\t[PaymentMethod.PAYPAL]: ,\n\t[PaymentMethod.VENMO]: ,\n\t[PaymentMethod.CRYPTO]: ,\n\t[PaymentMethod.STOCKS]: ,\n\t[PaymentMethod.DAF]: ,\n\t[PaymentMethod.GIFT_CARD]: \n};\n\nfunction getIconForPaymentMethod(\n\tmethod: PaymentMethod,\n\tpaymentRequestAvailable: PaymentRequestAvailable\n) {\n\tif (method === PaymentMethod.PAYMENT_REQUEST) {\n\t\treturn paymentRequestAvailable.applePay ? : ;\n\t}\n\n\treturn IconForPaymentMethodMap[method];\n}\n\nexport const IconForPaymentMethod = ({method}: IconForPaymentMethodProps) => {\n\tconst {paymentRequestAvailable} = useWidgetContext();\n\treturn getIconForPaymentMethod(method, paymentRequestAvailable);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const CardIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const BankIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const PaypalIcon = () => (\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n);\n","export const VenmoIcon = () => (\n\t\n\t\t\n\t\n);\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const CryptoIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const StocksIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const DafIcon = () => (\n\t\n\t\t\n\t\t\n\t\n);\n","import cxs from 'cxs';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {\n\tPaymentMethod,\n\tPaymentRequestAvailable\n} from 'src/components/widget/types/PaymentMethod';\n\nconst NameForPaymentMethodMap: {\n\t[key in Exclude]: string;\n} = {\n\t[PaymentMethod.CREDIT_CARD]: 'Card',\n\t[PaymentMethod.BANK]: 'Bank',\n\t[PaymentMethod.PAYPAL]: 'PayPal',\n\t[PaymentMethod.VENMO]: 'Venmo',\n\t[PaymentMethod.GIFT_CARD]: 'Gift card',\n\t[PaymentMethod.CRYPTO]: 'Crypto',\n\t[PaymentMethod.STOCKS]: 'Stocks',\n\t[PaymentMethod.DAF]: 'DAF'\n};\n\nfunction getNameForPaymentMethod(\n\tmethod: PaymentMethod,\n\tpaymentRequestAvailable: PaymentRequestAvailable\n) {\n\tif (method === PaymentMethod.PAYMENT_REQUEST) {\n\t\treturn paymentRequestAvailable.applePay ? 'Apple Pay' : 'Google Pay';\n\t}\n\n\treturn NameForPaymentMethodMap[method];\n}\n\ninterface NameForPaymentMethodProps {\n\tmethod: PaymentMethod;\n}\n\nexport const NameForPaymentMethod = ({method}: NameForPaymentMethodProps) => {\n\tconst {paymentRequestAvailable} = useWidgetContext();\n\n\tconst name = getNameForPaymentMethod(method, paymentRequestAvailable);\n\treturn {name};\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing, verticalStackCss} from 'src/components/widget/theme/spacing';\n\nexport const cardCss = cxs({\n\tpadding: `${Spacing.XL} ${Spacing.XL} 0px`,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: '0px'\n\t}\n});\n\nexport const fieldSetCss = cxs({\n\tborder: 'none',\n\tpadding: 0,\n\tmargin: 0,\n\tfontSize: '100%',\n\tfont: 'inherit',\n\tverticalAlign: 'baseline'\n});\n\nexport const legendCss = cxs({\n\tfontWeight: 700,\n\t...textSize.s,\n\tmarginBottom: Spacing.S\n});\n\nexport const formContainerCss = cxs({\n\t...verticalStackCss.cxs(Spacing.XL),\n\tpadding: '0px',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tgridColumn: '2/3',\n\t\tpadding: Spacing.XXL\n\t}\n});\n\nexport const formCss = cxs({\n\tdisplay: 'grid',\n\tgridTemplateColumns: '1fr',\n\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tgridAutoFlow: 'column',\n\t\tgridTemplateColumns: 'auto 1fr'\n\t}\n});\n","import cxs from 'cxs';\nimport {fieldSetCss} from 'src/components/widget/components/PaymentProcess/styles';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {\n\tverticalStackCss,\n\thorizontalStackCss,\n\tSpacing\n} from 'src/components/widget/theme/spacing';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const largePaymentMethodSelectListCss = cxs({\n\theight: '100%',\n\twidth: '100%',\n\tminWidth: '170px',\n\tflexGrow: 1,\n\tbackgroundColor: COLORS.LightGray,\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t...verticalStackCss.cxs(0)\n\t}\n});\n\nexport const smallPaymentMethodFieldSetCss = joinClassNames([\n\tfieldSetCss,\n\tcxs({\n\t\tdisplay: 'block',\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tdisplay: 'none'\n\t\t}\n\t})\n]);\n\nexport const smallPaymentMethodSelectListCss = cxs({\n\tdisplay: 'grid',\n\tgridTemplateColumns: '1fr 1fr',\n\tgridGap: Spacing.S\n});\n\nexport const paymentMethodButtonCssBase: cxs.CSSObject = {\n\t...horizontalStackCss.cxs(Spacing.XS),\n\talignItems: 'center',\n\tjustifyContent: 'flex-start',\n\twidth: '100%',\n\tbackground: 'transparent'\n};\n\nexport const largePaymentMethodButtonCss = (selected: boolean) =>\n\tcxs({\n\t\t...paymentMethodButtonCssBase,\n\t\tborder: 'none',\n\t\tpadding: Spacing.M,\n\n\t\t':hover': {\n\t\t\tcursor: 'pointer',\n\t\t\tbackground: COLORS.Gray\n\t\t},\n\t\t...(selected\n\t\t\t? {\n\t\t\t\t\tbackground: 'white',\n\t\t\t\t\tfontWeight: 700,\n\t\t\t\t\t':hover': {\n\t\t\t\t\t\tbackground: 'white'\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: {})\n\t});\n\nexport const smallPaymentMethodButtonCss = (\n\tselected: boolean,\n\tprimaryColor: string\n) =>\n\tcxs({\n\t\t...paymentMethodButtonCssBase,\n\t\tborder: `1px solid ${COLORS.DarkGray}`,\n\t\tbackground: 'transparent',\n\t\ttextAlign: 'start',\n\t\tpadding: `${Spacing.XXS} ${Spacing.S}`,\n\t\tborderRadius: Radii.Default,\n\t\t':hover': {\n\t\t\tcursor: 'pointer',\n\t\t\tbackground: COLORS.Gray\n\t\t},\n\t\t'& > svg': {\n\t\t\twidth: '20px',\n\t\t\theight: '20px'\n\t\t},\n\t\t...(selected\n\t\t\t? {\n\t\t\t\t\tbackground: primaryColor,\n\t\t\t\t\tborder: `1px solid ${primaryColor}`,\n\t\t\t\t\tfontWeight: 700,\n\t\t\t\t\tcolor: 'white',\n\t\t\t\t\t'& > svg': {\n\t\t\t\t\t\tfilter: 'brightness(0) invert(1)',\n\t\t\t\t\t\twidth: '20px',\n\t\t\t\t\t\theight: '20px'\n\t\t\t\t\t},\n\t\t\t\t\t':hover': {\n\t\t\t\t\t\tbackground: primaryColor\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: {})\n\t});\n","import {useMemo} from 'preact/hooks';\nimport {IconForPaymentMethod} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect/IconForPaymentMethod';\nimport {NameForPaymentMethod} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect/NameForPaymentMethod';\nimport {\n\tlargePaymentMethodSelectListCss,\n\tlargePaymentMethodButtonCss,\n\tsmallPaymentMethodFieldSetCss,\n\tsmallPaymentMethodSelectListCss,\n\tsmallPaymentMethodButtonCss\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect/styles';\nimport {legendCss} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {\n\tOneTimeFrequencyMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\n\nconst usePaymentMethods = () => {\n\tconst {methods, lockMonthlyFrequency} = useConfigContext();\n\tconst {paymentRequestAvailable} = useWidgetContext();\n\n\tconst filteredMethods = useMemo(\n\t\t() =>\n\t\t\tmethods.filter((method) => {\n\t\t\t\tif (lockMonthlyFrequency && OneTimeFrequencyMethods.includes(method)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (method === PaymentMethod.PAYMENT_REQUEST) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tpaymentRequestAvailable.applePay ||\n\t\t\t\t\t\tpaymentRequestAvailable.googlePay\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}),\n\t\t[methods, lockMonthlyFrequency, paymentRequestAvailable]\n\t);\n\n\treturn filteredMethods;\n};\n\nexport const LargePaymentMethodSelect = () => {\n\tconst methods = usePaymentMethods();\n\tconst {selectedPaymentMethod, setSelectedPaymentMethod} = useWidgetContext();\n\n\tif (methods.length === 1) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t
      \n\t\t\t{methods.map((method) => (\n\t\t\t\t
    • \n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetSelectedPaymentMethod(method);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    • \n\t\t\t))}\n\t\t
    \n\t);\n};\n\nexport const SmallPaymentMethodSelect = () => {\n\tconst methods = usePaymentMethods();\n\tconst {primaryColor} = useConfigContext();\n\tconst {selectedPaymentMethod, setSelectedPaymentMethod} = useWidgetContext();\n\n\tif (methods.length === 1) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t
    \n\t\t\tPayment method\n\t\t\t
      \n\t\t\t\t{methods.map((method) => (\n\t\t\t\t\t
    • \n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetSelectedPaymentMethod(method);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
    • \n\t\t\t\t))}\n\t\t\t
    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\n/* Hide checkbox visually but remain accessible to screen readers.\n Source: https://polished.js.org/docs/#hidevisually */\nexport const hiddenCheckboxCss = cxs({\n\tborder: 0,\n\tclip: 'rect(0 0 0 0)',\n\tclipPath: 'inset(50%)',\n\theight: '1px',\n\tmargin: '-1px',\n\toverflow: 'hidden',\n\tpadding: '0',\n\tposition: 'absolute',\n\twhiteSpace: 'nowrap',\n\twidth: '1px'\n});\n\nexport const checkboxCss = ({\n\tchecked,\n\tprimaryColor\n}: {\n\tchecked?: boolean;\n\tprimaryColor: string;\n}) =>\n\tcxs({\n\t\tcursor: 'pointer',\n\t\twidth: '24px',\n\t\tminWidth: '24px',\n\t\theight: '24px',\n\t\tdisplay: 'flex',\n\t\tborderRadius: '4px',\n\t\tjustifyContent: 'center',\n\t\talignItems: 'center',\n\t\tborder: `1.5px solid ${checked ? primaryColor : COLORS.DarkGray}`,\n\t\t...(checked ? {background: primaryColor} : {})\n\t});\n\nexport const checkMarkIconCss = cxs({\n\twidth: '16px',\n\theight: '16px',\n\t'& > path': {\n\t\tstroke: 'white',\n\t\tstrokeWidth: '2px'\n\t}\n});\n\nexport const checkboxLabelTextCss = cxs({\n\tcursor: 'pointer'\n});\n\nexport const checkboxLabelContainerCss = cxs({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tgap: Spacing.XS\n});\n","export const CheckMarkIcon = ({className}: {className?: string}) => (\n\t\n\t\t\n\t\n);\n","import {FunctionComponent} from 'preact';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {\n\tcheckboxLabelContainerCss,\n\thiddenCheckboxCss,\n\tcheckboxCss,\n\tcheckMarkIconCss,\n\tcheckboxLabelTextCss\n} from 'src/components/widget/components/Checkbox/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {CheckMarkIcon} from 'src/components/widget/icons/CheckMarkIcon';\n\ninterface CheckboxProps extends JSXInternal.HTMLAttributes {}\n\nexport const Checkbox: FunctionComponent = ({\n\tchildren,\n\tchecked,\n\tclassName,\n\t...rest\n}) => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {useState} from 'preact/hooks';\nimport {Checkbox} from 'src/components/widget/components/Checkbox';\nimport {\n\tfieldSetCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {TextArea} from 'src/components/widget/components/TextInput';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\n\nexport const PrivateNote = () => {\n\tconst nonprofit = useNonprofitOrError();\n\tconst enablePrivateNoteField =\n\t\tnonprofit.hasAdmin && !nonprofit.metadata?.disablePrivateNotes;\n\n\tconst {privateNote, setPrivateNote} = useWidgetContext();\n\tconst [showPrivateNoteField, setShowPrivateNoteField] = useState(\n\t\tBoolean(privateNote)\n\t);\n\n\tif (!enablePrivateNoteField) return null;\n\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tsetShowPrivateNoteField((previous) => !previous);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\tAdd note for {nonprofit.name}\n\t\t\t\n\t\t\t{showPrivateNoteField && (\n\t\t\t\t\n\t\t\t\t\tPrivate note\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetPrivateNote(currentTarget.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t)}\n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {smallText} from 'src/components/widget/theme/font-sizes';\nimport {ABOUT_URL} from 'src/constants/url';\n\nconst containerCss = cxs({\n\twidth: '100%',\n\ttextAlign: 'center'\n});\n\nconst redirectTextCss = cxs({\n\t...smallText,\n\tcolor: COLORS.TextOpaque\n});\n\nconst linkCss = (color: string) =>\n\tcxs({\n\t\tcolor,\n\t\ttextDecoration: 'none',\n\t\tcursor: 'pointer'\n\t});\n\nexport const RedirectNotice = () => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t\tEvery.org will accept your donation.{' '}\n\t\t\t\t\n\t\t\t\t\tLearn More\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {bodyText} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const btnCss = cxs({\n\t...bodyText,\n\toutline: 'none',\n\twidth: '100%',\n\tborder: 'none',\n\tfontFamily: 'inherit',\n\tcursor: 'pointer',\n\tborderRadius: Radii.Big,\n\theight: '52px',\n\tfontWeight: 700,\n\tpadding: Spacing.XXS,\n\ttransition: 'opacity .3s'\n});\n\nexport const btnActiveColor = (color: string) =>\n\tcxs({\n\t\tcolor: COLORS.White,\n\t\tbackgroundColor: color,\n\t\t':hover': {\n\t\t\topacity: 0.9\n\t\t}\n\t});\n\nexport const btnDisabledCss = cxs({\n\tcolor: COLORS.White,\n\tbackgroundColor: COLORS.DarkGray,\n\tcursor: 'default',\n\t'& > span': {\n\t\topacity: '0.6'\n\t}\n});\n","import {ComponentChildren} from 'preact';\nimport {\n\tbtnCss,\n\tbtnDisabledCss,\n\tbtnActiveColor\n} from 'src/components/widget/components/PaymentProcess/SubmitButton/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface ButtonProps {\n\thandleClick?: () => void;\n\tchildren: ComponentChildren;\n\tdisabled?: boolean;\n}\n\nexport const SubmitButton = ({\n\thandleClick,\n\tdisabled,\n\tchildren\n}: ButtonProps) => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {useEffect, useState} from 'preact/hooks';\nimport {getCoingeckoRate} from 'src/components/widget/api';\n\nexport const useCoingeckoRate = (\n\tcoingeckoId?: string\n): [number | null, boolean, string | null] => {\n\tconst [rate, setRate] = useState(null);\n\tconst [error, setError] = useState(null);\n\tconst [loading, setLoading] = useState(false);\n\n\tuseEffect(() => {\n\t\tif (!coingeckoId) {\n\t\t\tsetRate(null);\n\t\t\tsetError(null);\n\t\t\tsetLoading(false);\n\t\t\treturn;\n\t\t}\n\n\t\tsetLoading(true);\n\t\tgetCoingeckoRate(coingeckoId)\n\t\t\t.then((rate) => {\n\t\t\t\tsetRate(rate);\n\t\t\t\tsetError(null);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tsetRate(null);\n\t\t\t\tsetError(error.message);\n\t\t\t})\n\t\t\t.finally(() => {\n\t\t\t\tsetLoading(false);\n\t\t\t});\n\t}, [coingeckoId]);\n\n\treturn [rate, loading, error];\n};\n\nexport default useCoingeckoRate;\n","export const DEFAULT_CURRENCY = {\n\tname: 'USD',\n\tsymbol: '$'\n};\n","import {useCallback} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tAvailablePaymentMethods,\n\tOneTimeFrequencyMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\nimport {DEFAULT_CURRENCY} from 'src/constants/currency';\nimport {\n\tconstructDonateStocksUrl,\n\tconstructDonateCryptoUrl,\n\tconstructDonateUrl,\n\tconstructGiftCardUrl\n} from 'src/helpers/constructDonateUrl';\n\nexport const useSubmitDonation = () => {\n\tconst config = useConfigContext();\n\n\tconst {\n\t\tfrequency,\n\t\tdonationAmount,\n\t\tsetSubmitError,\n\t\tselectedPaymentMethod,\n\t\tstockAmount,\n\t\tstockSymbol,\n\t\tcryptoAmount,\n\t\tcryptoCurrency,\n\t\tprivateNote,\n\t\tgiftCardCode\n\t} = useWidgetContext();\n\tconst {minDonationAmount, webhookToken, redeemGiftCardInFlow} =\n\t\tuseConfigContext();\n\n\tconst submitDonation = useCallback(\n\t\t(event: JSXInternal.TargetedEvent) => {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst target = config.completeDonationInNewTab ? '_blank' : '_self';\n\n\t\t\tconst baseParameters = {\n\t\t\t\tmethods: [selectedPaymentMethod],\n\t\t\t\tnonprofitSlug: config.nonprofitSlug,\n\t\t\t\tfundraiserSlug: config.fundraiserSlug,\n\t\t\t\tutmSource: config.utmSource,\n\t\t\t\tprivateNote,\n\t\t\t\twebhookToken\n\t\t\t};\n\t\t\tswitch (selectedPaymentMethod) {\n\t\t\t\tcase PaymentMethod.CRYPTO:\n\t\t\t\t\tif (!cryptoAmount || !cryptoCurrency) {\n\t\t\t\t\t\tsetSubmitError(`Please enter currency and amount`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructDonateCryptoUrl({\n\t\t\t\t\t\t\tcryptoAmount,\n\t\t\t\t\t\t\tcryptoCurrency,\n\t\t\t\t\t\t\t...baseParameters\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PaymentMethod.STOCKS:\n\t\t\t\t\tif (!stockSymbol || !stockAmount) {\n\t\t\t\t\t\tsetSubmitError(`Please enter the symbol and amount`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructDonateStocksUrl({\n\t\t\t\t\t\t\tstockSymbol,\n\t\t\t\t\t\t\tstockAmount,\n\t\t\t\t\t\t\t...baseParameters\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PaymentMethod.GIFT_CARD:\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructGiftCardUrl({\n\t\t\t\t\t\t\tredeemGiftCardInFlow,\n\t\t\t\t\t\t\tgiftCardCode,\n\t\t\t\t\t\t\t...baseParameters,\n\t\t\t\t\t\t\tmethods: undefined\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (!donationAmount || donationAmount < minDonationAmount) {\n\t\t\t\t\t\tsetSubmitError(\n\t\t\t\t\t\t\t`The minimum donation amount is ${DEFAULT_CURRENCY.symbol}${minDonationAmount}`\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructDonateUrl({\n\t\t\t\t\t\t\tamount: donationAmount,\n\t\t\t\t\t\t\tfrequency: OneTimeFrequencyMethods.includes(selectedPaymentMethod)\n\t\t\t\t\t\t\t\t? DonationFrequency.OneTime\n\t\t\t\t\t\t\t\t: frequency,\n\t\t\t\t\t\t\t...baseParameters\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tfrequency,\n\t\t\tdonationAmount,\n\t\t\tsetSubmitError,\n\t\t\tselectedPaymentMethod,\n\t\t\tconfig,\n\t\t\tminDonationAmount,\n\t\t\tstockAmount,\n\t\t\tstockSymbol,\n\t\t\tcryptoAmount,\n\t\t\tcryptoCurrency,\n\t\t\tprivateNote,\n\t\t\tgiftCardCode,\n\t\t\twebhookToken,\n\t\t\tredeemGiftCardInFlow\n\t\t]\n\t);\n\n\treturn submitDonation;\n};\n","import cxs from 'cxs';\nimport {CryptoAmountInput} from 'src/components/widget/components/PaymentProcess/CryptoFlow/CryptoAmountInput';\nimport {CryptoSelector} from 'src/components/widget/components/PaymentProcess/CryptoFlow/CryptoSelector';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tfieldSetCss,\n\tformContainerCss,\n\tformCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport useCoingeckoRate from 'src/components/widget/hooks/useCoingeckoRate';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport {CryptoCurrencyConfig} from 'src/components/widget/types/Crypto';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {displayCurrencyValue} from 'src/helpers/displayCurrencyValue';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const CryptoFlow = () => {\n\tconst submitDonation = useSubmitDonation();\n\tconst {cryptoAmount, cryptoCurrency} = useWidgetContext();\n\n\tconst [cryptoTokenRate, cryptoTokenLoading] = useCoingeckoRate(\n\t\tcryptoCurrency && CryptoCurrencyConfig[cryptoCurrency]?.coingeckoId\n\t);\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\tCrypto currency\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t{cryptoCurrency && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tAmount\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.CRYPTO, cryptoCurrency})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{cryptoCurrency && cryptoTokenRate && cryptoTokenRate > 0 && (\n\t\t\t\t\t

    \n\t\t\t\t\t\t*Estimated exchange rate of{' '}\n\t\t\t\t\t\t{displayCurrencyValue(cryptoTokenRate, 'USD', {showCurrency: true})}{' '}\n\t\t\t\t\t\t/ {cryptoCurrency} is provided by CoinGecko. Final rate will be\n\t\t\t\t\t\tdetermined by our brokerage at time of transaction conversion.\n\t\t\t\t\t

    \n\t\t\t\t)}\n\t\t\t
    \n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const backButtonCss = (primaryColor: string) =>\n\tcxs({\n\t\toutline: 'none',\n\t\tborder: 'none',\n\t\tfontFamily: 'inherit',\n\t\tcursor: 'pointer',\n\t\tbackground: 'none',\n\t\tfontWeight: 500,\n\t\ttransition: 'opacity .3s',\n\t\tcolor: primaryColor,\n\t\tdisplay: 'flex',\n\t\talignItems: 'center',\n\t\talignSelf: 'flex-start',\n\t\t...textSize.s,\n\t\topacity: 1,\n\t\tpadding: 0,\n\t\tgap: Spacing.XXS,\n\t\tmarginBottom: Spacing.XXL,\n\t\t':hover': {\n\t\t\topacity: 0.9\n\t\t},\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tpadding: Spacing.L,\n\t\t\tmarginBottom: 0\n\t\t}\n\t});\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const ArrowBackIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {backButtonCss} from 'src/components/widget/components/PaymentProcess/BackButton/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {ArrowBackIcon} from 'src/components/widget/icons/ArrowBackIcon';\n\nexport const BackButton = ({handleClick}: {handleClick?: () => void}) => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\tBack\n\t\t\n\t);\n};\n","export enum DafFlowView {\n\tSTART,\n\tMANUAL,\n\tAMOUNT\n}\n\nexport interface DafFlowViewProps {\n\tchangeView: (view: DafFlowView) => void;\n}\n","import cxs from 'cxs';\nimport {useEffect, useRef} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {\n\tdonationAmountAddAmountButtonCss,\n\tdonationAmountAddAmountContainerCss,\n\tdonationAmountInputPrefixCss,\n\tdonationAmountInputSufixCss,\n\tdonationAmountInputContainerErrorCss,\n\tdonationAmountInputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {\n\tfieldSetCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {TextInput} from 'src/components/widget/components/TextInput';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport {DEFAULT_CURRENCY} from 'src/constants/currency';\nimport {isTouchDevice} from 'src/helpers/isTouchDevice';\n\nconst preventDecimal = (\n\tevent: JSXInternal.TargetedEvent\n) => {\n\tif (event.key === '.') {\n\t\tevent.preventDefault();\n\t}\n};\n\nconst abbreviateNumber = (n: number, significantDigits?: number): string => {\n\tif (n < 1e3) {\n\t\treturn n.toString();\n\t}\n\n\tlet symbol = '';\n\tlet denom = 1;\n\tif (n >= 1e3 && n < 1e6) {\n\t\tdenom = 1e3;\n\t\tsymbol = 'k';\n\t} else if (n >= 1e6 && n < 1e9) {\n\t\tdenom = 1e6;\n\t\tsymbol = 'm';\n\t} else if (n >= 1e9 && n < 1e12) {\n\t\tdenom = 1e9;\n\t\tsymbol = 'b';\n\t} else if (n >= 1e12) {\n\t\tdenom = 1e12;\n\t\tsymbol = 't';\n\t}\n\n\tif (significantDigits === undefined) {\n\t\treturn (n / denom).toFixed(3).replace(/\\.?0+$/, '') + symbol;\n\t}\n\n\treturn (n / denom).toFixed(significantDigits) + symbol;\n};\n\nexport const DonationAmount = () => {\n\tconst inputRef = useRef(null);\n\n\tconst {primaryColor, addAmounts} = useConfigContext();\n\n\tconst {setDonationAmount, donationAmount, setSubmitError, submitError} =\n\t\tuseWidgetContext();\n\n\tconst autoFocusInput = () => {\n\t\tif (inputRef.current) {\n\t\t\tinputRef.current.focus();\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tif (!isTouchDevice()) {\n\t\t\tautoFocusInput();\n\t\t}\n\t}, []);\n\n\treturn (\n\t\t\n\t\t\tDonation amount\n\t\t\t {\n\t\t\t\t\tsetDonationAmount(Number(event.currentTarget.value));\n\t\t\t\t\tsetSubmitError(null);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t{addAmounts && addAmounts.length > 0 && (\n\t\t\t\t
    \n\t\t\t\t\t{addAmounts.map((amount) => (\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetDonationAmount((previous) => {\n\t\t\t\t\t\t\t\t\treturn typeof previous === 'number'\n\t\t\t\t\t\t\t\t\t\t? previous + amount\n\t\t\t\t\t\t\t\t\t\t: amount;\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t+{abbreviateNumber(amount)}\n\t\t\t\t\t\t\n\t\t\t\t\t))}\n\t\t\t\t
    \n\t\t\t)}\n\t\t\n\t);\n};\n","export const isTouchDevice = () =>\n\tBoolean('ontouchstart' in window || navigator.maxTouchPoints);\n","import cxs from 'cxs';\n\nexport const inputLabelCss = (primaryColor: string) =>\n\tcxs({\n\t\tposition: 'relative',\n\t\tcursor: 'pointer',\n\t\tdisplay: 'flex',\n\t\twidth: '100%',\n\t\theight: '36px',\n\t\talignItems: 'center',\n\t\tjustifyContent: 'center',\n\t\tcolor: primaryColor,\n\t\tfontWeight: 500,\n\t\tborder: `2px solid ${primaryColor}`,\n\t\tborderRight: 'none'\n\t});\n\nexport const inputItemCss = (primaryColor: string) =>\n\tcxs({\n\t\tcursor: 'pointer',\n\t\tdisplay: 'flex',\n\t\tflexDirection: 'column',\n\t\tflex: '1 1 0px',\n\n\t\t'& > input': {\n\t\t\tappearance: 'none',\n\t\t\theight: 0\n\t\t},\n\n\t\t'& > input:checked + label': {\n\t\t\tbackgroundColor: primaryColor,\n\t\t\tcolor: 'white'\n\t\t},\n\n\t\t'& > input:checked + label:hover': {\n\t\t\tbackgroundColor: primaryColor,\n\t\t\tcolor: 'white'\n\t\t}\n\t});\n\nexport const inputContainerCss = (primaryColor: string) =>\n\tcxs({\n\t\tdisplay: 'flex',\n\t\twidth: '100%',\n\n\t\t'& > div:first-of-type > label': {\n\t\t\tborderRadius: '6px 0 0 6px',\n\t\t\t'&::after': {\n\t\t\t\tborderRadius: '6px 0 0 6px'\n\t\t\t}\n\t\t},\n\n\t\t'& > div:last-of-type > label': {\n\t\t\tborderRadius: '0 6px 6px 0',\n\t\t\tborderRight: `2px solid ${primaryColor}`,\n\t\t\t'&::after': {\n\t\t\t\tborderRadius: '0 6px 6px 0'\n\t\t\t}\n\t\t}\n\t});\n","import {\n\tinputContainerCss,\n\tinputItemCss,\n\tinputLabelCss\n} from 'src/components/widget/components/PaymentProcess/Frequency/styles';\nimport {\n\tfieldSetCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tOneTimeFrequencyMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\n\nconst DEFAULT_MONTHLY_TITLE = 'Monthly donation';\n\nexport const Frequency = () => {\n\tconst {\n\t\tprimaryColor,\n\t\tlockMonthlyFrequency,\n\t\tmonthlyTitle = DEFAULT_MONTHLY_TITLE\n\t} = useConfigContext();\n\tconst {frequency, selectedPaymentMethod, setFrequency} = useWidgetContext();\n\n\tif (lockMonthlyFrequency) {\n\t\treturn

    {monthlyTitle}

    ;\n\t}\n\n\tif (OneTimeFrequencyMethods.includes(selectedPaymentMethod)) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\tFrequency\n\t\t\t\t

    \n\t\t\t\t\t{selectedPaymentMethod === PaymentMethod.DAF ? 'Chariot' : 'Venmo'}{' '}\n\t\t\t\t\tonly supports one-time donations\n\t\t\t\t

    \n\t\t\t
    \n\t\t);\n\t}\n\n\treturn (\n\t\t
    \n\t\t\tFrequency\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetFrequency(DonationFrequency.Monthly);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tGive Monthly\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetFrequency(DonationFrequency.OneTime);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tOnce\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t);\n};\n","import {BackButton} from 'src/components/widget/components/PaymentProcess/BackButton';\nimport {\n\tDafFlowViewProps,\n\tDafFlowView\n} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\nimport {DonationAmount} from 'src/components/widget/components/PaymentProcess/DonationAmount';\nimport {Frequency} from 'src/components/widget/components/PaymentProcess/Frequency';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tformCss,\n\tformContainerCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const DafAmountView = ({changeView}: DafFlowViewProps) => {\n\tconst submitDonation = useSubmitDonation();\n\tconst {donationAmount, selectedPaymentMethod} = useWidgetContext();\n\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tchangeView(DafFlowView.START);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t
    \n\t\t\t\t

    Connect your DAF with Chariot

    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.DAF})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {linkCss} from 'src/components/widget/components/FundraiserLink/styles';\nimport {BackButton} from 'src/components/widget/components/PaymentProcess/BackButton';\nimport {\n\tDafFlowViewProps,\n\tDafFlowView\n} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\nimport {\n\tformContainerCss,\n\tformCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useNonprofit} from 'src/components/widget/hooks/useNonprofit';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {Spacing, verticalStackCss} from 'src/components/widget/theme/spacing';\nimport {\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\nimport {TEAM_EMAIL} from 'src/constants/url';\nimport {mailToLink} from 'src/helpers/mailToLink';\n\nexport const DafManualView = ({changeView}: DafFlowViewProps) => {\n\tconst {nonprofitSlug, primaryColor} = useConfigContext();\n\tconst nonprofit = useNonprofit();\n\tconst nonprofitName =\n\t\tnonprofit === NonprofitFetching || nonprofit === NonprofitFetchError\n\t\t\t? 'the nonprofit'\n\t\t\t: nonprofit.name;\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tchangeView(DafFlowView.START);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t
    \n\t\t\t\t

    Manual DAF donation

    \n\t\t\t\t

    \n\t\t\t\t\tPlease ask your provider to make a one-time or recurring grant to:\n\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t\t\t

    \n\t\t\t\t\t\tEvery.org (EIN: 61-1913297)\n\t\t\t\t\t\t58 West Portal Ave #781 San Francisco, CA 94127\n\t\t\t\t\t\tMemo: every.org/{nonprofitSlug}\n\t\t\t\t\t\tContact info: Mark Ulrich, CEO\n\t\t\t\t\t\tEmail: team@every.org\n\t\t\t\t\t\tPhone number: +1 (415) 650-0503\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tYou may also email us at{' '}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{TEAM_EMAIL}\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t\twith the memo or to let us know if you wish to share your contact\n\t\t\t\t\t\tinformation with the nonprofit/campaign. By default, your name and\n\t\t\t\t\t\temail will be shared with {nonprofitName} if included in the grant\n\t\t\t\t\t\tletter from your DAF.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tWe will attribute the donation accordingly:\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we receive BOTH your @username and a nonprofit/campaign: we will\n\t\t\t\t\t\tadd a donation for that nonprofit/campaign to your account.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we receive only your @username, we will credit your\n\t\t\t\t\t\taccount's gift card balance in the amount received, which you\n\t\t\t\t\t\tcan use to support as many nonprofits as you'd like.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we receive only a nonprofit/campaign, we will send that amount to\n\t\t\t\t\t\tthat nonprofit/campaign.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we do not receive any information by the time the wire/ACH is\n\t\t\t\t\t\treceived, we will apply it towards running Every.org.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nconst CAHRIOT_GREEN = '#ADEFD1';\nconst CAHRIOT_DARK_GREEN = '#7ce6b6';\nconst CHARIOT_DARK_BLUE = '#00203F';\n\nexport const chariotButtonCss = cxs({\n\toutline: 'none',\n\tborder: 'none',\n\tfontFamily: 'inherit',\n\tbackground: CAHRIOT_GREEN,\n\tcolor: CHARIOT_DARK_BLUE,\n\talignSelf: 'center',\n\tborderRadius: Radii.Big,\n\tpadding: `${Spacing.M} ${Spacing.XL}`,\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tfontWeight: 500,\n\t...textSize.s,\n\tgap: Spacing.XS,\n\tcursor: 'pointer',\n\t':hover': {\n\t\tbackground: CAHRIOT_DARK_GREEN\n\t}\n});\n\nexport const manualButtonCss = (primaryColor: string) =>\n\tcxs({\n\t\toutline: 'none',\n\t\tborder: 'none',\n\t\tbackground: 'none',\n\t\tfontFamily: 'inherit',\n\t\tcolor: primaryColor,\n\t\talignSelf: 'center',\n\t\tdisplay: 'flex',\n\t\talignItems: 'center',\n\t\tfontWeight: 500,\n\t\t...textSize.s,\n\t\tgap: Spacing.XS,\n\t\tcursor: 'pointer',\n\t\t':hover': {\n\t\t\topacity: 0.9\n\t\t}\n\t});\n","import {\n\tchariotButtonCss,\n\tmanualButtonCss\n} from 'src/components/widget/components/PaymentProcess/DafFlow/styles';\nimport {\n\tDafFlowViewProps,\n\tDafFlowView\n} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {\n\tformCss,\n\tformContainerCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const DafLogo = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n\nexport const DafStartView = ({changeView}: DafFlowViewProps) => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t

    Instant DAF donation

    \n\t\t\t\t

    \n\t\t\t\t\tWe use Chariot to verify your account info and automatically initiate\n\t\t\t\t\ta grant from your DAF, or you can get instructions for making the\n\t\t\t\t\tdonation manually.\n\t\t\t\t

    \n\t\t\t\t {\n\t\t\t\t\t\tchangeView(DafFlowView.AMOUNT);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tDonate with\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tchangeView(DafFlowView.MANUAL);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tGet instructions for a manual DAF donation\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t
    \n\t);\n};\n","import {useState} from 'preact/hooks';\nimport {DafAmountView} from 'src/components/widget/components/PaymentProcess/DafFlow/Views/DafAmountView';\nimport {DafManualView} from 'src/components/widget/components/PaymentProcess/DafFlow/Views/DafManualView';\nimport {DafStartView} from 'src/components/widget/components/PaymentProcess/DafFlow/Views/DafStartView';\nimport {DafFlowView} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\n\nexport const DafFlow = () => {\n\tconst [view, setView] = useState(DafFlowView.START);\n\n\t// eslint-disable-next-line default-case\n\tswitch (view) {\n\t\tcase DafFlowView.START:\n\t\t\treturn ;\n\t\tcase DafFlowView.MANUAL:\n\t\t\treturn ;\n\t\tcase DafFlowView.AMOUNT:\n\t\t\treturn ;\n\t}\n};\n","import {DonationAmount} from 'src/components/widget/components/PaymentProcess/DonationAmount';\nimport {Frequency} from 'src/components/widget/components/PaymentProcess/Frequency';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tformContainerCss,\n\tformCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const DefaultFlow = () => {\n\tconst {\n\t\tfrequency,\n\t\tdonationAmount,\n\t\tselectedPaymentMethod,\n\t\tpaymentRequestAvailable\n\t} = useWidgetContext();\n\tconst submitDonation = useSubmitDonation();\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({\n\t\t\t\t\t\tmethod: selectedPaymentMethod,\n\t\t\t\t\t\tpaymentRequestIsApplePay: paymentRequestAvailable.applePay\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import cxs from 'cxs';\n\nexport const giftCardIconCss = cxs({\n\tdisplay: 'block',\n\twidth: '80px',\n\theight: '80px',\n\talignSelf: 'center',\n\t'& > path': {\n\t\tstrokeWidth: '1'\n\t}\n});\n","import cxs from 'cxs';\nimport {giftCardIconCss} from 'src/components/widget/components/PaymentProcess/GiftCardFlow/styles';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tformCss,\n\tformContainerCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {TextInput} from 'src/components/widget/components/TextInput';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {GiftIcon} from 'src/components/widget/icons/GiftIcon';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const GiftCardFlow = () => {\n\tconst submitDonation = useSubmitDonation();\n\tconst {redeemGiftCardInFlow} = useConfigContext();\n\tconst {giftCardCode, setGiftCardCode} = useWidgetContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t

    Redeem a gift card to add donation credits to your account.

    \n\t\t\t\t{redeemGiftCardInFlow && (\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetGiftCardCode(event.currentTarget.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.GIFT_CARD})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n\nexport const giftCardCodeInputCss = cxs({\n\tfontSize: textSize.l.fontSize,\n\tlineHeight: textSize.l.fontSize,\n\tfontWeight: 700\n});\n","import cxs from 'cxs';\nimport {\n\tdonationAmountInputContainerErrorCss,\n\tdonationAmountInputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tfieldSetCss,\n\tformContainerCss,\n\tformCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {TextInput} from 'src/components/widget/components/TextInput';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const StocksFlow = () => {\n\tconst submitDonation = useSubmitDonation();\n\n\tconst {primaryColor} = useConfigContext();\n\n\tconst {\n\t\tstockAmount,\n\t\tstockSymbol,\n\t\tsetStockAmount,\n\t\tsetStockSymbol,\n\t\tsubmitError,\n\t\tsetSubmitError\n\t} = useWidgetContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tWhat is the symbol of the shares?\n\t\t\t\t\t\t\n\t\t\t\t\t\tExample: AAPL\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetStockSymbol(event.currentTarget.value);\n\t\t\t\t\t\t\t\tsetSubmitError(null);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tHow many shares are you donating?\n\t\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetStockAmount(Number(event.currentTarget.value));\n\t\t\t\t\t\t\t\tsetSubmitError(null);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.STOCKS})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import {GridCard} from 'src/components/widget/components/GridCard';\nimport {CryptoFlow} from 'src/components/widget/components/PaymentProcess/CryptoFlow';\nimport {DafFlow} from 'src/components/widget/components/PaymentProcess/DafFlow';\nimport {DefaultFlow} from 'src/components/widget/components/PaymentProcess/DefaultFlow';\nimport {GiftCardFlow} from 'src/components/widget/components/PaymentProcess/GiftCardFlow';\nimport {StocksFlow} from 'src/components/widget/components/PaymentProcess/StocksFlow';\nimport {cardCss} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nconst DonateFlowForPaymentMethod = () => {\n\tconst {selectedPaymentMethod} = useWidgetContext();\n\n\tswitch (selectedPaymentMethod) {\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn ;\n\t\tcase PaymentMethod.STOCKS:\n\t\t\treturn ;\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn ;\n\t\tcase PaymentMethod.GIFT_CARD:\n\t\t\treturn ;\n\t\tdefault:\n\t\t\treturn ;\n\t}\n};\n\nexport const PaymentProcess = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const widgetCss = (height: number | null) =>\n\tcxs({\n\t\tbackground: 'white',\n\t\twidth: '100%',\n\t\theight: '100%',\n\t\tborderRadius: 'unset',\n\t\tposition: 'relative',\n\t\toverflow: 'auto',\n\t\tpadding: `0`,\n\t\tpaddingBottom: Spacing.XXL,\n\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\theight: height ? `${height}px` : 'unset',\n\t\t\tbackground: '#f3f6f6',\n\t\t\tminHeight: '378px',\n\t\t\tmaxHeight: `calc(100vh - 2 * ${Spacing.XL})`,\n\t\t\twidth: '1000px',\n\t\t\toverflow: 'unset',\n\t\t\toverflowY: 'scroll',\n\t\t\t/* Hide sc rollbar */\n\t\t\t'-ms-overflow-style': 'none' /* IE and Edge */,\n\t\t\tscrollbarWidth: 'none' /* Firefox */,\n\t\t\t'::-webkit-scrollbar': {\n\t\t\t\tdisplay: 'none'\n\t\t\t},\n\t\t\tborderRadius: Radii.Medium,\n\t\t\tpadding: Spacing.XL\n\t\t}\n\t});\n","import {VNode} from 'preact';\nimport {forwardRef} from 'preact/compat';\nimport {widgetCss} from 'src/components/widget/components/WidgetCard/styles';\n\nexport const WidgetCard = forwardRef<\n\tHTMLDivElement,\n\tVNode<{height: number | null}>['props']\n>(({children, height}, ref) => {\n\treturn (\n\t\t
    \n\t\t\t{children}\n\t\t
    \n\t);\n});\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {FontFamily} from 'src/components/widget/theme/font-family';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const overlayCss = cxs({\n\t...textSize.s,\n\tposition: 'fixed',\n\theight: 'auto',\n\twidth: '100%',\n\tzIndex: 999,\n\ttop: 0,\n\tbottom: 0,\n\tleft: 0,\n\tright: 0,\n\tdisplay: 'flex',\n\tbackground: 'rgba(0, 0, 0, 0.5)',\n\tjustifyContent: 'center',\n\talignItems: 'center',\n\tcolor: COLORS.Text,\n\tfontFamily: FontFamily.BasisGrotesque,\n\tpadding: 0,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: Spacing.XL\n\t},\n\t// reset\n\tboxSizing: 'border-box',\n\t'-webkit-font-smoothing': 'antialiased',\n\t'-moz-osx-font-smoothing': 'grayscale',\n\t'& *': {\n\t\tboxSizing: 'inherit'\n\t},\n\t'& *:before': {\n\t\tboxSizing: 'inherit'\n\t},\n\t'& *:after': {\n\t\tboxSizing: 'inherit'\n\t}\n});\n","import {FunctionalComponent} from 'preact';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {overlayCss} from 'src/components/widget/components/WidgetOverlay/styles';\n\ninterface WdigetOverlayProps {\n\tonClick: JSXInternal.MouseEventHandler;\n}\n\nexport const WidgetOverlay: FunctionalComponent = ({\n\tchildren,\n\tonClick\n}) => {\n\treturn (\n\t\t
    \n\t\t\t{children}\n\t\t
    \n\t);\n};\n","import {JSXInternal} from 'preact/src/jsx';\nimport {Faq} from 'src/components/widget/components/Faq';\nimport {Footer} from 'src/components/widget/components/Footer';\nimport {FundraiserLink} from 'src/components/widget/components/FundraiserLink';\nimport {Grid} from 'src/components/widget/components/Grid';\nimport {Header} from 'src/components/widget/components/Header';\nimport {CloseButton} from 'src/components/widget/components/Header/CloseButton';\nimport {largeScreenCloseButtonCss} from 'src/components/widget/components/Header/CloseButton/styles';\nimport {NonprofitInfo} from 'src/components/widget/components/NonprofitInfo';\nimport {PaymentProcess} from 'src/components/widget/components/PaymentProcess';\nimport {WidgetCard} from 'src/components/widget/components/WidgetCard';\nimport {WidgetOverlay} from 'src/components/widget/components/WidgetOverlay';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useFundraiser} from 'src/components/widget/hooks/useFundraiser';\nimport {useNonprofit} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {LoadingIcon} from 'src/components/widget/icons/LoadingIcon';\nimport {\n\tFundraiserFetchError,\n\tFundraiserFetching\n} from 'src/components/widget/types/Fundraiser';\nimport {\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\n\nconst Widget = () => {\n\tconst {fundraiserSlug} = useConfigContext();\n\tconst {hideWidget} = useWidgetContext();\n\tconst findraiser = useFundraiser();\n\tconst nonprofit = useNonprofit();\n\n\tconst hideOnWrapperClick: JSXInternal.MouseEventHandler = (\n\t\tevent\n\t) => {\n\t\tif (event.target === event.currentTarget) {\n\t\t\thideWidget();\n\t\t}\n\t};\n\n\tif (\n\t\tnonprofit === NonprofitFetchError ||\n\t\t(fundraiserSlug && findraiser === FundraiserFetchError)\n\t) {\n\t\thideWidget();\n\t\treturn null;\n\t}\n\n\tif (\n\t\tnonprofit === NonprofitFetching ||\n\t\t(fundraiserSlug && findraiser === FundraiserFetching)\n\t) {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t);\n};\n\nexport default Widget;\n","const resetcss = `\n\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n font-family: 'Basis Grotesque Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Roboto, sans-serif;\n vertical-align: baseline;\n }\n /* HTML5 display-role reset for older browsers */\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n body {\n line-height: 1;\n }\n ol, ul {\n list-style: none;\n }\n blockquote, q {\n quotes: none;\n }\n blockquote:before, blockquote:after,\n q:before, q:after {\n content: '';\n content: none;\n }\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n button {\n color: unset;\n background: unset;\n }\n\n h1, h2, h3, h4, h4, h6 {\n font-weight: 700\n }\n`;\n\nexport default resetcss;\n","import {PaymentProcess} from 'src/components/widget/components/PaymentProcess';\nimport {ContextProvider} from 'src/components/widget/context';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useFundraiser} from 'src/components/widget/hooks/useFundraiser';\nimport {useNonprofit} from 'src/components/widget/hooks/useNonprofit';\nimport {LoadingIcon} from 'src/components/widget/icons/LoadingIcon';\nimport {FundraiserFetching} from 'src/components/widget/types/Fundraiser';\nimport {NonprofitFetching} from 'src/components/widget/types/Nonprofit';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\ninterface FormLoaderProps {\n\toptions: Partial;\n}\n\nexport const FormLoader = ({options = {}}: FormLoaderProps) => {\n\treturn (\n\t\t {\n\t\t\t\t// do nothing\n\t\t\t}}\n\t\t>\n\t\t\t
    \n\t\t\n\t);\n};\n\nconst Form = () => {\n\tconst {fundraiserSlug} = useConfigContext();\n\tconst findraiser = useFundraiser();\n\tconst nonprofit = useNonprofit();\n\n\tif (\n\t\tnonprofit === NonprofitFetching ||\n\t\t(fundraiserSlug && findraiser === FundraiserFetching)\n\t) {\n\t\treturn ;\n\t}\n\n\treturn ;\n};\n","import autoPlayMode from 'src/autoPlayMode';\nimport formOnlyMode from 'src/formOnlyMode';\nimport {shouldEnableAutoPlay} from 'src/helpers/shouldEnableAutoPlay';\nimport {shouldEnableFormOnlyMode} from 'src/helpers/shouldEnableFormOnlyMode';\nimport manualMode from 'src/manualMode';\n\nconst autoPlay = shouldEnableAutoPlay();\nconst formOnly = shouldEnableFormOnlyMode();\n\nif (formOnly) {\n\tformOnlyMode();\n} else if (autoPlay) {\n\tautoPlayMode();\n} else {\n\tmanualMode();\n}\n","import getScriptParameters from 'src/helpers/getScriptParameters';\n\nconst FORM_ONLY_PARAM = 'formOnly';\n\nexport function shouldEnableFormOnlyMode() {\n\tconst parameters = getScriptParameters();\n\n\tif (parameters) {\n\t\treturn parameters[FORM_ONLY_PARAM] === '1';\n\t}\n\n\treturn false;\n}\n","import {render} from 'preact';\nimport EmbedButton from 'src/components/embed-button';\nimport {CreateButtonInSelectorProps} from 'src/components/embed-button/types';\nimport {CreateWidgetInSelectorProps} from 'src/components/widget/types';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {loadFonts} from 'src/loadFonts';\nimport {FormLoader} from 'src/loaders/FormLoader';\nimport {WidgetLoader} from 'src/loaders/Widgetloader';\nimport resetcss from 'src/resetCss';\n\ninterface GlobalExport {\n\tcreateButton: (options: CreateButtonInSelectorProps) => void;\n\tcreateWidget: (options: CreateWidgetInSelectorProps) => void;\n\tsetOptions: (options: Partial) => void;\n\tshowWidget: () => void;\n}\n\ndeclare const window: Window & {\n\teveryDotOrgDonateButton?: GlobalExport;\n};\n\nexport default function formOnlyMode() {\n\tconst DEFAULT_HASH_OPEN_WIDGET = 'donate';\n\n\tconst baseOptions: Partial = {};\n\tconst options = {\n\t\tshow: false,\n\t\topenAt: DEFAULT_HASH_OPEN_WIDGET\n\t};\n\tconst instanceOptions: Partial = {};\n\n\tconst getNode = (element?: Element, selector?: string) =>\n\t\telement ? element : selector ? document.querySelector(selector) : null;\n\n\tloadFonts();\n\n\t/**\n\t * Helper function to debug donate button issues\n\t */\n\tfunction log(...messages: unknown[]): void {\n\t\tconsole.info('Every.org Donate Button:', ...messages);\n\t}\n\n\tlet formContainer: HTMLElement;\n\tlet formMountPoint: HTMLElement;\n\n\tconst mountWidget = () => {\n\t\tconst shadowWidgetWrapper = document.createElement('div');\n\t\tshadowWidgetWrapper.id = 'shadow-wrapper';\n\t\tformContainer.append(shadowWidgetWrapper);\n\n\t\tformMountPoint = document.createElement('div');\n\t\tshadowWidgetWrapper.attachShadow({mode: 'open'}).append(formMountPoint);\n\n\t\tconst everyStyles: HTMLStyleElement | null =\n\t\t\tdocument.querySelector('#every-styles');\n\n\t\tif (everyStyles) {\n\t\t\tconst rules = Object.values(everyStyles.sheet?.cssRules ?? {})\n\t\t\t\t.map((rule) => rule.cssText)\n\t\t\t\t.join('\\n');\n\n\t\t\tconst everyShadowStyles = document.createElement('style');\n\t\t\teveryShadowStyles.id = 'every-shadow-styles';\n\t\t\teveryShadowStyles.innerHTML = resetcss + rules;\n\n\t\t\tformMountPoint.append(everyShadowStyles);\n\t\t}\n\t};\n\n\tconst renderWidget = () => {\n\t\tif (!formMountPoint) {\n\t\t\tmountWidget();\n\t\t}\n\n\t\tconst finalOptions: Partial = {\n\t\t\t...options,\n\t\t\t...baseOptions,\n\t\t\t...instanceOptions\n\t\t};\n\n\t\trender(, formMountPoint);\n\t};\n\n\tfunction setOptions(newOptions: Partial) {\n\t\tObject.assign(baseOptions, newOptions);\n\t\trenderWidget();\n\t}\n\n\tconst createWidgetInSelector = ({\n\t\telement,\n\t\tselector,\n\t\t...options\n\t}: CreateWidgetInSelectorProps) => {\n\t\tif (!element && !selector) {\n\t\t\tlog('createWidget():', 'must provide element or selector');\n\t\t}\n\n\t\tconst node = getNode(element, selector);\n\t\tif (!node) {\n\t\t\tlog('createWidget():', 'element or selector not found');\n\t\t\treturn;\n\t\t}\n\n\t\tif (!options.nonprofitSlug) {\n\t\t\tlog('createWidget():', 'must provide nonprofitSlug');\n\t\t\treturn;\n\t\t}\n\n\t\tformContainer = node as HTMLElement;\n\n\t\tObject.assign(baseOptions, options);\n\t\trenderWidget();\n\t};\n\n\twindow.everyDotOrgDonateButton = {\n\t\tcreateButton: () => {\n\t\t\tlog(\n\t\t\t\t'createButton function is not available in formOnlyMode. Use createWidget instead.'\n\t\t\t);\n\t\t},\n\t\tshowWidget: () => {\n\t\t\tlog(\n\t\t\t\t'showWidget function is not available in formOnlyMode. Use createWidget instead.'\n\t\t\t);\n\t\t},\n\t\tsetOptions,\n\t\tcreateWidget: createWidgetInSelector\n\t};\n}\n","import {render} from 'preact';\nimport EmbedButton from 'src/components/embed-button';\nimport {CreateButtonInSelectorProps} from 'src/components/embed-button/types';\nimport {CreateWidgetInSelectorProps} from 'src/components/widget/types';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {loadFonts} from 'src/loadFonts';\nimport {WidgetLoader} from 'src/loaders/Widgetloader';\nimport resetcss from 'src/resetCss';\n\ninterface GlobalExport {\n\tcreateButton: (options: CreateButtonInSelectorProps) => void;\n\tcreateWidget: (options: CreateWidgetInSelectorProps) => void;\n\tsetOptions: (options: Partial) => void;\n\tshowWidget: () => void;\n}\n\ndeclare const window: Window & {\n\teveryDotOrgDonateButton?: GlobalExport;\n};\n\nexport default function manualMode() {\n\tconst DEFAULT_HASH_OPEN_WIDGET = 'donate';\n\n\tconst baseOptions: Partial = {};\n\tconst options = {\n\t\tshow: false,\n\t\topenAt: DEFAULT_HASH_OPEN_WIDGET\n\t};\n\tlet instanceOptions: Partial = {};\n\n\tconst getNodeList = (element?: Element, selector?: string) =>\n\t\telement ? [element] : selector && document.querySelectorAll(selector);\n\n\tloadFonts();\n\n\t/**\n\t * Helper function to debug donate button issues\n\t */\n\tfunction log(...messages: unknown[]): void {\n\t\tconsole.info('Every.org Donate Button:', ...messages);\n\t}\n\n\tlet widgetMountPoint: HTMLElement;\n\n\tconst mountWidget = () => {\n\t\tconst shadowWidgetWrapper = document.createElement('div');\n\t\tshadowWidgetWrapper.id = 'shadow-wrapper';\n\t\tshadowWidgetWrapper.style.position = 'absolute';\n\t\tshadowWidgetWrapper.style.zIndex = '20000000';\n\t\tdocument.body.append(shadowWidgetWrapper);\n\n\t\twidgetMountPoint = document.createElement('div');\n\t\tshadowWidgetWrapper.attachShadow({mode: 'open'}).append(widgetMountPoint);\n\n\t\tconst everyStyles: HTMLStyleElement | null =\n\t\t\tdocument.querySelector('#every-styles');\n\n\t\tif (everyStyles) {\n\t\t\tconst rules = Object.values(everyStyles.sheet?.cssRules ?? {})\n\t\t\t\t.map((rule) => rule.cssText)\n\t\t\t\t.join('\\n');\n\n\t\t\tconst everyShadowStyles = document.createElement('style');\n\t\t\teveryShadowStyles.id = 'every-shadow-styles';\n\t\t\teveryShadowStyles.innerHTML = resetcss + rules;\n\n\t\t\twidgetMountPoint.append(everyShadowStyles);\n\t\t}\n\t};\n\n\tconst renderWidget = () => {\n\t\tif (!widgetMountPoint) {\n\t\t\tmountWidget();\n\t\t}\n\n\t\tconst hash = window.location?.hash;\n\t\tconst shouldShowWidget =\n\t\t\thash ===\n\t\t\t`#${\n\t\t\t\tinstanceOptions?.openAt ?? baseOptions?.openAt ?? options?.openAt ?? ''\n\t\t\t}`;\n\n\t\tif (shouldShowWidget) {\n\t\t\tObject.assign(options, {show: true});\n\t\t}\n\n\t\tconst finalOptions: Partial = {\n\t\t\t...options,\n\t\t\t...baseOptions,\n\t\t\t...instanceOptions\n\t\t};\n\n\t\trender(\n\t\t\t,\n\t\t\twidgetMountPoint\n\t\t);\n\t};\n\n\tfunction showWidget() {\n\t\tObject.assign(options, {show: true});\n\t\trenderWidget();\n\t}\n\n\tfunction hideWidget() {\n\t\tObject.assign(options, {show: false});\n\t\trenderWidget();\n\t}\n\n\tfunction setOptions(newOptions: Partial) {\n\t\tObject.assign(baseOptions, newOptions);\n\t\trenderWidget();\n\t}\n\n\tfunction updateOptionsAndShowCb(newOptions: WidgetConfig) {\n\t\tconst optionsCopy = {...newOptions};\n\t\tObject.assign(options, {\n\t\t\topenAt: optionsCopy.openAt ?? DEFAULT_HASH_OPEN_WIDGET\n\t\t});\n\t\treturn (event: any) => {\n\t\t\tevent.preventDefault();\n\t\t\tinstanceOptions = optionsCopy;\n\t\t\tshowWidget();\n\t\t};\n\t}\n\n\tconst createButtonInSelector = ({\n\t\telement,\n\t\tselector,\n\t\t...options\n\t}: CreateButtonInSelectorProps) => {\n\t\tif (!element && !selector && !options.nonprofitSlug) {\n\t\t\tlog(\n\t\t\t\t'createButton():',\n\t\t\t\t'must provide element or selector or nonprofitSlug'\n\t\t\t);\n\t\t}\n\n\t\tconst nodes = getNodeList(element, selector);\n\n\t\tif (!nodes) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const buttonContainer of nodes) {\n\t\t\t// Search for an Every.org link inside the container\n\t\t\tconst buttonLink = buttonContainer.querySelector('a') ?? undefined;\n\t\t\tif (!options.nonprofitSlug && !buttonLink) {\n\t\t\t\tlog('no link in container', buttonContainer);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst href = buttonLink?.getAttribute('href') ?? undefined;\n\n\t\t\tif (!options.nonprofitSlug && !href) {\n\t\t\t\tlog('link lacks href', buttonLink);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We preserve it over any custom config passed\n\t\t\tconst finalOptions = {\n\t\t\t\t...instanceOptions,\n\t\t\t\t...options\n\t\t\t};\n\n\t\t\trender(, buttonContainer, buttonLink);\n\t\t}\n\t};\n\n\tconst createWidgetInSelector = ({\n\t\telement,\n\t\tselector,\n\t\t...options\n\t}: CreateWidgetInSelectorProps) => {\n\t\tif (!element && !selector) {\n\t\t\tlog('createWidget():', 'must provide element or selector');\n\t\t}\n\n\t\tconst nodes = getNodeList(element, selector);\n\t\tif (!nodes) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!options.nonprofitSlug) {\n\t\t\tlog('createWidget():', 'must provide nonprofitSlug');\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const node of nodes) {\n\t\t\tnode.addEventListener('click', updateOptionsAndShowCb(options));\n\t\t}\n\n\t\tObject.assign(baseOptions, options);\n\t\trenderWidget();\n\t};\n\n\twindow.everyDotOrgDonateButton = {\n\t\tcreateButton: createButtonInSelector,\n\t\tshowWidget,\n\t\tsetOptions,\n\t\tcreateWidget: createWidgetInSelector\n\t};\n}\n","'use strict';\n\nvar cache = {};\nvar prefix = 'x';\nvar rules = [];\nvar insert = function insert(rule) {\n return rules.push(rule);\n};\nvar hyph = function hyph(s) {\n return s.replace(/[A-Z]|^ms/g, '-$&').toLowerCase();\n};\nvar mx = function mx(rule, media) {\n return media ? media + '{' + rule + '}' : rule;\n};\nvar rx = function rx(cn, prop, val) {\n return '.' + cn + '{' + hyph(prop) + ':' + val + '}';\n};\nvar noAnd = function noAnd(s) {\n return s.replace(/&/g, '');\n};\n\nvar parse = function parse(obj) {\n var child = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var media = arguments[2];\n return Object.keys(obj).map(function (key) {\n var val = obj[key];\n if (val === null) return '';\n if (typeof val === 'object') {\n var m2 = /^@/.test(key) ? key : null;\n var c2 = m2 ? child : child + key;\n return parse(val, c2, m2 || media);\n }\n var _key = key + val + child + media;\n if (cache[_key]) return cache[_key];\n var className = prefix + rules.length.toString(36);\n insert(mx(rx(className + noAnd(child), key, val), media));\n cache[_key] = className;\n return className;\n }).join(' ');\n};\n\nmodule.exports = function () {\n for (var _len = arguments.length, styles = Array(_len), _key2 = 0; _key2 < _len; _key2++) {\n styles[_key2] = arguments[_key2];\n }\n\n return styles.map(function (style) {\n return parse(style);\n }).join(' ').trim();\n};\n\nmodule.exports.css = function () {\n return rules.sort().join('');\n};\n\nmodule.exports.reset = function () {\n cache = {};\n while (rules.length) {\n rules.pop();\n }\n};\n\nmodule.exports.prefix = function (val) {\n return prefix = val;\n};\n\n\nif (typeof document !== 'undefined') {\n const styles = document.createElement('style')\n styles.id = 'every-styles'\n var sheet = document.head.appendChild(styles).sheet;\n\n insert = function insert(rule) {\n const shadowRoot = document.querySelector('#shadow-wrapper')\n\n if(shadowRoot) {\n const everyShadowStyles = shadowRoot.shadowRoot.querySelector('#every-shadow-styles')\n \n everyShadowStyles.innerHTML += rule\n }\n\n rules.push(rule);\n sheet.insertRule(rule, sheet.cssRules.length);\n };\n}","import { EMPTY_ARR } from './constants';\n\nexport const isArray = Array.isArray;\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-ignore We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n","import { slice } from './util';\nimport options from './options';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * constructor for this virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array} [children] The children of the virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != null) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, null);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\n\t\t// be set to dom.nextSibling which can return `null` and it is important\n\t\t// to be able to distinguish between an uninitialized _nextDom and\n\t\t// a _nextDom that has been set to `null`\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: original == null ? ++vnodeId : original\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == null && options.vnode != null) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: null };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is import('./internal').VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor === undefined;\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)\n\t\t\t: null;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != null && sibling._dom != null) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet vnode = component._vnode,\n\t\toldDom = vnode._dom,\n\t\tparentDom = component._parentDom;\n\n\tif (parentDom) {\n\t\tlet commitQueue = [],\n\t\t\trefQueue = [];\n\t\tconst oldVNode = assign({}, vnode);\n\t\toldVNode._original = vnode._original + 1;\n\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tvnode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tparentDom.ownerSVGElement !== undefined,\n\t\t\tvnode._hydrating != null ? [oldDom] : null,\n\t\t\tcommitQueue,\n\t\t\toldDom == null ? getDomSibling(vnode) : oldDom,\n\t\t\tvnode._hydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\tcommitRoot(commitQueue, vnode, refQueue);\n\n\t\tif (vnode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(vnode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\n\t\tvnode._dom = vnode._component.base = null;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != null && child._dom != null) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet c;\n\trerenderQueue.sort(depthSort);\n\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t// process() calls from getting scheduled while `queue` is still being consumed.\n\twhile ((c = rerenderQueue.shift())) {\n\t\tif (c._dirty) {\n\t\t\tlet renderQueueLength = rerenderQueue.length;\n\t\t\trenderComponent(c);\n\t\t\tif (rerenderQueue.length > renderQueueLength) {\n\t\t\t\t// When i.e. rerendering a provider additional new items can be injected, we want to\n\t\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t\t// single pass\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\t\t}\n\t}\n\tprocess._rerenderCount = 0;\n}\n\nprocess._rerenderCount = 0;\n","import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport { EMPTY_OBJ, EMPTY_ARR } from '../constants';\nimport { isArray } from '../util';\nimport { getDomSibling } from '../component';\n\n/**\n * Diff the children of a virtual node\n * @param {import('../internal').PreactElement} parentDom The DOM element whose\n * children are being diffed\n * @param {import('../internal').ComponentChildren[]} renderResult\n * @param {import('../internal').VNode} newParentVNode The new virtual\n * node whose children should be diff'ed against oldParentVNode\n * @param {import('../internal').VNode} oldParentVNode The old virtual\n * node whose children should be diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by getChildContext\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet i,\n\t\tj,\n\t\toldVNode,\n\t\tchildVNode,\n\t\tnewDom,\n\t\tfirstChildDom,\n\t\tskew = 0;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet oldChildrenLength = oldChildren.length,\n\t\tremainingOldChildren = oldChildrenLength,\n\t\tnewChildrenLength = renderResult.length;\n\n\tnewParentVNode._children = [];\n\tfor (i = 0; i < newChildrenLength; i++) {\n\t\tchildVNode = renderResult[i];\n\n\t\tif (\n\t\t\tchildVNode == null ||\n\t\t\ttypeof childVNode == 'boolean' ||\n\t\t\ttypeof childVNode == 'function'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = null;\n\t\t}\n\t\t// If this newVNode is being reused (e.g.
    {reuse}{reuse}
    ) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tnull,\n\t\t\t\tchildVNode,\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t} else if (isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if (childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t// const reuse =
    \n\t\t\t//
    {reuse}{reuse}
    \n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tchildVNode.ref ? childVNode.ref : null,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\t// Terser removes the `continue` here and wraps the loop body\n\t\t// in a `if (childVNode) { ... } condition\n\t\tif (childVNode == null) {\n\t\t\toldVNode = oldChildren[i];\n\t\t\tif (oldVNode && oldVNode.key == null && oldVNode._dom) {\n\t\t\t\tif (oldVNode._dom == oldDom) {\n\t\t\t\t\toldDom = getDomSibling(oldVNode);\n\t\t\t\t}\n\n\t\t\t\tunmount(oldVNode, oldVNode, false);\n\t\t\t\toldChildren[i] = null;\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\tlet skewedIndex = i + skew;\n\t\tconst matchingIndex = findMatchingIndex(\n\t\t\tchildVNode,\n\t\t\toldChildren,\n\t\t\tskewedIndex,\n\t\t\tremainingOldChildren\n\t\t);\n\n\t\tif (matchingIndex === -1) {\n\t\t\toldVNode = EMPTY_OBJ;\n\t\t} else {\n\t\t\toldVNode = oldChildren[matchingIndex] || EMPTY_OBJ;\n\t\t\toldChildren[matchingIndex] = undefined;\n\t\t\tremainingOldChildren--;\n\t\t}\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\tnewDom = childVNode._dom;\n\t\tif ((j = childVNode.ref) && oldVNode.ref != j) {\n\t\t\tif (oldVNode.ref) {\n\t\t\t\tapplyRef(oldVNode.ref, null, childVNode);\n\t\t\t}\n\t\t\trefQueue.push(j, childVNode._component || newDom, childVNode);\n\t\t}\n\n\t\tif (newDom != null) {\n\t\t\tif (firstChildDom == null) {\n\t\t\t\tfirstChildDom = newDom;\n\t\t\t}\n\n\t\t\tlet isMounting = oldVNode === EMPTY_OBJ || oldVNode._original === null;\n\t\t\tif (isMounting) {\n\t\t\t\tif (matchingIndex == -1) {\n\t\t\t\t\tskew--;\n\t\t\t\t}\n\t\t\t} else if (matchingIndex !== skewedIndex) {\n\t\t\t\tif (matchingIndex === skewedIndex + 1) {\n\t\t\t\t\tskew++;\n\t\t\t\t} else if (matchingIndex > skewedIndex) {\n\t\t\t\t\tif (remainingOldChildren > newChildrenLength - skewedIndex) {\n\t\t\t\t\t\tskew += matchingIndex - skewedIndex;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// ### Change from keyed: I think this was missing from the algo...\n\t\t\t\t\t\tskew--;\n\t\t\t\t\t}\n\t\t\t\t} else if (matchingIndex < skewedIndex) {\n\t\t\t\t\tif (matchingIndex == skewedIndex - 1) {\n\t\t\t\t\t\tskew = matchingIndex - skewedIndex;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tskew = 0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tskew = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tskewedIndex = i + skew;\n\n\t\t\tif (\n\t\t\t\ttypeof childVNode.type == 'function' &&\n\t\t\t\t(matchingIndex !== skewedIndex ||\n\t\t\t\t\toldVNode._children === childVNode._children)\n\t\t\t) {\n\t\t\t\toldDom = reorderChildren(childVNode, oldDom, parentDom);\n\t\t\t} else if (\n\t\t\t\ttypeof childVNode.type != 'function' &&\n\t\t\t\t(matchingIndex !== skewedIndex || isMounting)\n\t\t\t) {\n\t\t\t\toldDom = placeChild(parentDom, newDom, oldDom);\n\t\t\t} else if (childVNode._nextDom !== undefined) {\n\t\t\t\t// Only Fragments or components that return Fragment like VNodes will\n\t\t\t\t// have a non-undefined _nextDom. Continue the diff from the sibling\n\t\t\t\t// of last DOM child of this child VNode\n\t\t\t\toldDom = childVNode._nextDom;\n\n\t\t\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because\n\t\t\t\t// it is only used by `diffChildren` to determine where to resume the diff after\n\t\t\t\t// diffing Components and Fragments. Once we store it the nextDOM local var, we\n\t\t\t\t// can clean up the property\n\t\t\t\tchildVNode._nextDom = undefined;\n\t\t\t} else {\n\t\t\t\toldDom = newDom.nextSibling;\n\t\t\t}\n\n\t\t\tif (typeof newParentVNode.type == 'function') {\n\t\t\t\t// Because the newParentVNode is Fragment-like, we need to set it's\n\t\t\t\t// _nextDom property to the nextSibling of its last child DOM node.\n\t\t\t\t//\n\t\t\t\t// `oldDom` contains the correct value here because if the last child\n\t\t\t\t// is a Fragment-like, then oldDom has already been set to that child's _nextDom.\n\t\t\t\t// If the last child is a DOM VNode, then oldDom will be set to that DOM\n\t\t\t\t// node's nextSibling.\n\t\t\t\tnewParentVNode._nextDom = oldDom;\n\t\t\t}\n\t\t}\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\t// Remove remaining oldChildren if there are any.\n\tfor (i = oldChildrenLength; i--; ) {\n\t\tif (oldChildren[i] != null) {\n\t\t\tif (\n\t\t\t\ttypeof newParentVNode.type == 'function' &&\n\t\t\t\toldChildren[i]._dom != null &&\n\t\t\t\toldChildren[i]._dom == newParentVNode._nextDom\n\t\t\t) {\n\t\t\t\t// If the newParentVNode.__nextDom points to a dom node that is about to\n\t\t\t\t// be unmounted, then get the next sibling of that vnode and set\n\t\t\t\t// _nextDom to it\n\n\t\t\t\tnewParentVNode._nextDom = oldChildren[i]._dom.nextSibling;\n\t\t\t}\n\n\t\t\tunmount(oldChildren[i], oldChildren[i]);\n\t\t}\n\t}\n}\n\nfunction reorderChildren(childVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\tlet c = childVNode._children;\n\n\tlet tmp = 0;\n\tfor (; c && tmp < c.length; tmp++) {\n\t\tlet vnode = c[tmp];\n\t\tif (vnode) {\n\t\t\t// We typically enter this code path on sCU bailout, where we copy\n\t\t\t// oldVNode._children to newVNode._children. If that is the case, we need\n\t\t\t// to update the old children's _parent pointer to point to the newVNode\n\t\t\t// (childVNode here).\n\t\t\tvnode._parent = childVNode;\n\n\t\t\tif (typeof vnode.type == 'function') {\n\t\t\t\toldDom = reorderChildren(vnode, oldDom, parentDom);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(parentDom, vnode._dom, oldDom);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {import('../index').ComponentChildren} children The unflattened\n * children of a virtual node\n * @returns {import('../internal').VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == null || typeof children == 'boolean') {\n\t} else if (isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\nfunction placeChild(parentDom, newDom, oldDom) {\n\tif (oldDom == null || oldDom.parentNode !== parentDom) {\n\t\tparentDom.insertBefore(newDom, null);\n\t} else if (newDom != oldDom || newDom.parentNode == null) {\n\t\tparentDom.insertBefore(newDom, oldDom);\n\t}\n\n\treturn newDom.nextSibling;\n}\n\n/**\n * @param {import('../internal').VNode | string} childVNode\n * @param {import('../internal').VNode[]} oldChildren\n * @param {number} skewedIndex\n * @param {number} remainingOldChildren\n * @returns {number}\n */\nfunction findMatchingIndex(\n\tchildVNode,\n\toldChildren,\n\tskewedIndex,\n\tremainingOldChildren\n) {\n\tconst key = childVNode.key;\n\tconst type = childVNode.type;\n\tlet x = skewedIndex - 1;\n\tlet y = skewedIndex + 1;\n\tlet oldVNode = oldChildren[skewedIndex];\n\n\tif (\n\t\toldVNode === null ||\n\t\t(oldVNode && key == oldVNode.key && type === oldVNode.type)\n\t) {\n\t\treturn skewedIndex;\n\t} else if (remainingOldChildren > (oldVNode != null ? 1 : 0)) {\n\t\twhile (x >= 0 || y < oldChildren.length) {\n\t\t\tif (x >= 0) {\n\t\t\t\toldVNode = oldChildren[x];\n\t\t\t\tif (oldVNode && key == oldVNode.key && type === oldVNode.type) {\n\t\t\t\t\treturn x;\n\t\t\t\t}\n\t\t\t\tx--;\n\t\t\t}\n\n\t\t\tif (y < oldChildren.length) {\n\t\t\t\toldVNode = oldChildren[y];\n\t\t\t\tif (oldVNode && key == oldVNode.key && type === oldVNode.type) {\n\t\t\t\t\treturn y;\n\t\t\t\t}\n\t\t\t\ty++;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn -1;\n}\n","import { IS_NON_DIMENSIONAL } from '../constants';\nimport options from '../options';\n\n/**\n * Diff the old and new properties of a VNode and apply changes to the DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to apply\n * changes to\n * @param {object} newProps The new props\n * @param {object} oldProps The old props\n * @param {boolean} isSvg Whether or not this node is an SVG node\n * @param {boolean} hydrate Whether or not we are in hydration mode\n */\nexport function diffProps(dom, newProps, oldProps, isSvg, hydrate) {\n\tlet i;\n\n\tfor (i in oldProps) {\n\t\tif (i !== 'children' && i !== 'key' && !(i in newProps)) {\n\t\t\tsetProperty(dom, i, null, oldProps[i], isSvg);\n\t\t}\n\t}\n\n\tfor (i in newProps) {\n\t\tif (\n\t\t\t(!hydrate || typeof newProps[i] == 'function') &&\n\t\t\ti !== 'children' &&\n\t\t\ti !== 'key' &&\n\t\t\ti !== 'value' &&\n\t\t\ti !== 'checked' &&\n\t\t\toldProps[i] !== newProps[i]\n\t\t) {\n\t\t\tsetProperty(dom, i, newProps[i], oldProps[i], isSvg);\n\t\t}\n\t}\n}\n\nfunction setStyle(style, key, value) {\n\tif (key[0] === '-') {\n\t\tstyle.setProperty(key, value == null ? '' : value);\n\t} else if (value == null) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, isSvg) {\n\tlet useCapture;\n\n\to: if (name === 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] !== oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] === 'o' && name[1] === 'n') {\n\t\tuseCapture = name !== (name = name.replace(/(PointerCapture)$|Capture$/, '$1'));\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (name.toLowerCase() in dom) name = name.toLowerCase().slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\t\tdom.addEventListener(name, handler, useCapture);\n\t\t\t}\n\t\t} else {\n\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\tdom.removeEventListener(name, handler, useCapture);\n\t\t}\n\t} else if (name !== 'dangerouslySetInnerHTML') {\n\t\tif (isSvg) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname !== 'width' &&\n\t\t\tname !== 'height' &&\n\t\t\tname !== 'href' &&\n\t\t\tname !== 'list' &&\n\t\t\tname !== 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname !== 'tabIndex' &&\n\t\t\tname !== 'download' &&\n\t\t\tname !== 'rowSpan' &&\n\t\t\tname !== 'colSpan' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == null ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value === 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != null && (value !== false || name[4] === '-')) {\n\t\t\tdom.setAttribute(name, value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n\treturn this._listeners[e.type + false](options.event ? options.event(e) : e);\n}\n\nfunction eventProxyCapture(e) {\n\treturn this._listeners[e.type + true](options.event ? options.event(e) : e);\n}\n","import { EMPTY_OBJ } from '../constants';\nimport { Component, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { diffProps, setProperty } from './props';\nimport { assign, isArray, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').PreactElement} parentDom The parent of the DOM element\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by getChildContext\n * @param {boolean} isSvg Whether or not this element is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== undefined) return null;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._hydrating != null) {\n\t\tisHydrating = oldVNode._hydrating;\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\t// if we resume, we want the tree to be \"unlocked\"\n\t\tnewVNode._hydrating = null;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\touter: if (typeof newType == 'function') {\n\t\ttry {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\t\t// @ts-ignore The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-ignore Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new Component(newProps, componentContext);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (c._nextState == null) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\n\t\t\tif (newType.getDerivedStateFromProps != null) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\t\t\tc._vnode = newVNode;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tc.componentWillMount != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidMount != null) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!c._force &&\n\t\t\t\t\t((c.shouldComponentUpdate != null &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\t\tnewVNode._original === oldVNode._original)\n\t\t\t\t) {\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) {\n\t\t\t\t\t\t// When we are dealing with a bail because of sCU we have to update\n\t\t\t\t\t\t// the props, state and dirty-state.\n\t\t\t\t\t\t// when we are dealing with strict-equality we don't as the child could still\n\t\t\t\t\t\t// be dirtied see #3883\n\t\t\t\t\t\tc.props = newProps;\n\t\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t\tc._dirty = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.forEach(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t\t}\n\t\t\t\t\tc._stateCallbacks = [];\n\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != null) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidUpdate != null) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc._parentDom = parentDom;\n\t\t\tc._force = false;\n\n\t\t\tlet renderHook = options._render,\n\t\t\t\tcount = 0;\n\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\tc.state = c._nextState;\n\t\t\t\tc._dirty = false;\n\n\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t}\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t} else {\n\t\t\t\tdo {\n\t\t\t\t\tc._dirty = false;\n\t\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\t\t// Handle setState called in render, see #2553\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t} while (c._dirty && ++count < 25);\n\t\t\t}\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != null) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != null && tmp.type === Fragment && tmp.key == null;\n\t\t\tlet renderResult = isTopLevelFragment ? tmp.props.children : tmp;\n\n\t\t\tdiffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tisArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._hydrating = null;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = null;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tnewVNode._original = null;\n\t\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\t\tif (isHydrating || excessDomChildren != null) {\n\t\t\t\tnewVNode._dom = oldDom;\n\t\t\t\tnewVNode._hydrating = !!isHydrating;\n\t\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = null;\n\t\t\t\t// ^ could possibly be simplified to:\n\t\t\t\t// excessDomChildren.length = 0;\n\t\t\t}\n\t\t\toptions._catchError(e, newVNode, oldVNode);\n\t\t}\n\t} else if (\n\t\texcessDomChildren == null &&\n\t\tnewVNode._original === oldVNode._original\n\t) {\n\t\tnewVNode._children = oldVNode._children;\n\t\tnewVNode._dom = oldVNode._dom;\n\t} else {\n\t\tnewVNode._dom = diffElementNodes(\n\t\t\toldVNode._dom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\t}\n\n\tif ((tmp = options.diffed)) tmp(newVNode);\n}\n\n/**\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').VNode} root\n */\nexport function commitRoot(commitQueue, root, refQueue) {\n\tfor (let i = 0; i < refQueue.length; i++) {\n\t\tapplyRef(refQueue[i], refQueue[++i], refQueue[++i]);\n\t}\n\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-ignore Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-ignore See above ts-ignore on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {import('../internal').PreactElement} dom The DOM element representing\n * the virtual nodes being diffed\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {*} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n * @returns {import('../internal').PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating,\n\trefQueue\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = newVNode.type;\n\tlet i = 0;\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tif (nodeType === 'svg') isSvg = true;\n\n\tif (excessDomChildren != null) {\n\t\tfor (; i < excessDomChildren.length; i++) {\n\t\t\tconst child = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tchild &&\n\t\t\t\t'setAttribute' in child === !!nodeType &&\n\t\t\t\t(nodeType ? child.localName === nodeType : child.nodeType === 3)\n\t\t\t) {\n\t\t\t\tdom = child;\n\t\t\t\texcessDomChildren[i] = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == null) {\n\t\tif (nodeType === null) {\n\t\t\t// @ts-ignore createTextNode returns Text, we expect PreactElement\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tif (isSvg) {\n\t\t\tdom = document.createElementNS(\n\t\t\t\t'http://www.w3.org/2000/svg',\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType\n\t\t\t);\n\t\t} else {\n\t\t\tdom = document.createElement(\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType,\n\t\t\t\tnewProps.is && newProps\n\t\t\t);\n\t\t}\n\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = null;\n\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\n\t\tisHydrating = false;\n\t}\n\n\tif (nodeType === null) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data !== newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\tlet oldHtml = oldProps.dangerouslySetInnerHTML;\n\t\tlet newHtml = newProps.dangerouslySetInnerHTML;\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tif (!isHydrating) {\n\t\t\t// But, if we are in a situation where we are using existing DOM (e.g. replaceNode)\n\t\t\t// we should read the existing DOM attributes to diff them\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\toldProps = {};\n\t\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\t\toldProps[dom.attributes[i].name] = dom.attributes[i].value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (newHtml || oldHtml) {\n\t\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\t\tif (\n\t\t\t\t\t!newHtml ||\n\t\t\t\t\t((!oldHtml || newHtml.__html != oldHtml.__html) &&\n\t\t\t\t\t\tnewHtml.__html !== dom.innerHTML)\n\t\t\t\t) {\n\t\t\t\t\tdom.innerHTML = (newHtml && newHtml.__html) || '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdiffProps(dom, newProps, oldProps, isSvg, isHydrating);\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\ti = newVNode.props.children;\n\t\t\tdiffChildren(\n\t\t\t\tdom,\n\t\t\t\tisArray(i) ? i : [i],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg && nodeType !== 'foreignObject',\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tif (excessDomChildren[i] != null) removeNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// (as above, don't diff props during hydration)\n\t\tif (!isHydrating) {\n\t\t\tif (\n\t\t\t\t'value' in newProps &&\n\t\t\t\t(i = newProps.value) !== undefined &&\n\t\t\t\t// #2756 For the -element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(i !== dom.value ||\n\t\t\t\t\t(nodeType === 'progress' && !i) ||\n\t\t\t\t\t// This is only for IE 11 to fix \n\tif (\n\t\ttype == 'select' &&\n\t\tnormalizedProps.multiple &&\n\t\tArray.isArray(normalizedProps.value)\n\t) {\n\t\t// forEach() always returns undefined, which we abuse here to unset the value prop.\n\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\tchild.props.selected =\n\t\t\t\tnormalizedProps.value.indexOf(child.props.value) != -1;\n\t\t});\n\t}\n\n\t// Adding support for defaultValue in select tag\n\tif (type == 'select' && normalizedProps.defaultValue != null) {\n\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\tif (normalizedProps.multiple) {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.defaultValue.indexOf(child.props.value) != -1;\n\t\t\t} else {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.defaultValue == child.props.value;\n\t\t\t}\n\t\t});\n\t}\n\n\tif (props.class && !props.className) {\n\t\tnormalizedProps.class = props.class;\n\t\tObject.defineProperty(\n\t\t\tnormalizedProps,\n\t\t\t'className',\n\t\t\tclassNameDescriptorNonEnumberable\n\t\t);\n\t} else if (props.className && !props.class) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t} else if (props.class && props.className) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t}\n\n\tvnode.props = normalizedProps;\n}\n\nlet oldVNodeHook = options.vnode;\noptions.vnode = vnode => {\n\t// only normalize props on Element nodes\n\tif (typeof vnode.type === 'string') {\n\t\thandleDomVNode(vnode);\n\t}\n\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n// Only needed for react-relay\nlet currentComponent;\nconst oldBeforeRender = options._render;\noptions._render = function (vnode) {\n\tif (oldBeforeRender) {\n\t\toldBeforeRender(vnode);\n\t}\n\tcurrentComponent = vnode._component;\n};\n\nconst oldDiffed = options.diffed;\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions.diffed = function (vnode) {\n\tif (oldDiffed) {\n\t\toldDiffed(vnode);\n\t}\n\n\tconst props = vnode.props;\n\tconst dom = vnode._dom;\n\n\tif (\n\t\tdom != null &&\n\t\tvnode.type === 'textarea' &&\n\t\t'value' in props &&\n\t\tprops.value !== dom.value\n\t) {\n\t\tdom.value = props.value == null ? '' : props.value;\n\t}\n\n\tcurrentComponent = null;\n};\n\n// This is a very very private internal function for React it\n// is used to sort-of do runtime dependency injection. So far\n// only `react-relay` makes use of it. It uses it to read the\n// context value.\nexport const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {\n\tReactCurrentDispatcher: {\n\t\tcurrent: {\n\t\t\treadContext(context) {\n\t\t\t\treturn currentComponent._globalContext[context._id].props.value;\n\t\t\t}\n\t\t}\n\t}\n};\n","import {\n\tCryptoCurrency,\n\tCryptoCurrencyConfig\n} from 'src/components/widget/types/Crypto';\nimport {getCloudinaryUrl} from 'src/helpers/getCloudinaryUrl';\n\nfunction getSrcForCryptoIcon(currency: CryptoCurrency) {\n\tconst config = CryptoCurrencyConfig[currency];\n\n\tif ('icon' in config) {\n\t\treturn config.icon;\n\t}\n\n\treturn getCloudinaryUrl(config.iconCloudinaryId, {width: 24, height: 24});\n}\n\nexport const CryptoCurrencyIcon = ({currency}: {currency: CryptoCurrency}) => {\n\treturn (\n\t\t\n\t);\n};\n","import {filter as fuzzyFilter} from 'fuzzy';\nimport {useRef, useState} from 'preact/hooks';\nimport {Fragment} from 'preact/jsx-runtime';\nimport {linkCss} from 'src/components/widget/components/FundraiserLink/styles';\nimport {\n\tcryptoSelectorDropDownItemCss,\n\tcryptoSelectorInputContainerCss,\n\tinputContainerWithDropDownCss,\n\tcryptoSelectorContainerCss,\n\tcryptoSelectorInputSufixCss,\n\tcryptoSelectorDropDownContainerCss,\n\tcryptoSelectorDropDownContentCss,\n\tquickSelectOptionsListCss\n} from 'src/components/widget/components/PaymentProcess/CryptoFlow/styles';\nimport {\n\tdonationAmountInputContainerErrorCss,\n\tdonationAmountInputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {TextInput} from 'src/components/widget/components/TextInput';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {ArrowIcon} from 'src/components/widget/icons/ArrowIcon';\nimport {CryptoCurrencyIcon} from 'src/components/widget/icons/CryptoCurrencyIcon';\nimport {SearchIcon} from 'src/components/widget/icons/SearchIcon';\nimport {\n\tCryptoCurrency,\n\tSharedCryptoCurrencyConfig,\n\tCryptoCurrencyOption,\n\tDISABLED_TOKENS\n} from 'src/components/widget/types/Crypto';\nimport {CRYPTO_EMAIL} from 'src/constants/url';\nimport css from 'src/helpers/css';\nimport joinClassNames from 'src/helpers/joinClassNames';\nimport {mailToLink} from 'src/helpers/mailToLink';\n\nexport function displayLabelForCryptoCurrency(cc: CryptoCurrency) {\n\tconst config = SharedCryptoCurrencyConfig[cc];\n\treturn `${config.displayName} (${config.abbreviation})`;\n}\n\nexport function displayContractTypeForCryptoCurrency(cc: CryptoCurrency) {\n\tconst config = SharedCryptoCurrencyConfig[cc];\n\treturn `${config.contractType ? `${config.contractType}` : ''}`;\n}\n\nfunction cryptoCurrencyToOption(cc: CryptoCurrency): CryptoCurrencyOption {\n\treturn {\n\t\tvalue: cc,\n\t\tlabel: displayLabelForCryptoCurrency(cc),\n\t\tcontractType: displayContractTypeForCryptoCurrency(cc)\n\t};\n}\n\nconst quickSelectTokens = new Set([\n\tCryptoCurrency.BTC,\n\tCryptoCurrency.ETH,\n\tCryptoCurrency.USDC\n]);\n\nconst enabledCryptoCurrencyOptions: CryptoCurrencyOption[] = [];\nconst quickSelectOptions: CryptoCurrencyOption[] = [];\nconst otherOptions: CryptoCurrencyOption[] = [];\n\nObject.values(CryptoCurrency).forEach((value) => {\n\tconst option = cryptoCurrencyToOption(value);\n\tif (!DISABLED_TOKENS.includes(value)) {\n\t\tenabledCryptoCurrencyOptions.push(option);\n\n\t\tif (quickSelectTokens.has(value)) {\n\t\t\tquickSelectOptions.push(option);\n\t\t} else {\n\t\t\totherOptions.push(option);\n\t\t}\n\t}\n});\n\nexport const MAX_CRYPTO_DECIMALS_FOR_DISPLAY = 7;\n\nconst CryptoSelectorDropDownItem = ({\n\tonClick,\n\toption\n}: {\n\tonClick: (option: CryptoCurrencyOption) => void;\n\toption: CryptoCurrencyOption;\n}) => (\n\t
  • \n\t\t {\n\t\t\t\tonClick(option);\n\t\t\t}}\n\t\t>\n\t\t\t\n\t\t\t{option.label}\n\t\t\t{option.contractType}\n\t\t\n\t
  • \n);\n\nconst CryptoSupprotLink = () => {\n\tconst nonprofit = useNonprofitOrError();\n\n\tconst {primaryColor} = useConfigContext();\n\tconst cryptoSupportBody = `Contents: I would like to make a crypto donation to support https://www.every.org/${nonprofit.primarySlug}.\\n\\nMy name:\\nToken name:\\nToken symbol:\\nToken quantity:\\n\\nPlease reply back with an address where I can donate, as this is worth over $5,000 USD.`;\n\n\treturn (\n\t\t\n\t\t\t{CRYPTO_EMAIL}\n\t\t\n\t);\n};\n\nexport const CryptoSelector = () => {\n\tconst {submitError, cryptoCurrency, setCryptoCurrency} = useWidgetContext();\n\tconst {primaryColor} = useConfigContext();\n\n\tconst inputRef = useRef(null);\n\tconst [selectedOption, setSelectedOption] = useState<\n\t\tCryptoCurrencyOption | undefined\n\t>(\n\t\tenabledCryptoCurrencyOptions.find(\n\t\t\t(option) => option.value === cryptoCurrency\n\t\t)\n\t);\n\n\tconst [inputValue, setInputValue] = useState(selectedOption?.label);\n\n\tconst [showDropDown, setShowDrowDown] = useState(!selectedOption);\n\n\tconst handleItemClick = (option: CryptoCurrencyOption) => {\n\t\tsetSelectedOption(option);\n\t\tsetCryptoCurrency(option.value);\n\t\tsetInputValue(option.label);\n\t\tsetShowDrowDown(false);\n\t};\n\n\tconst handleInputFocus = () => {\n\t\tsetSelectedOption(undefined);\n\t\tsetCryptoCurrency(undefined);\n\t\tsetShowDrowDown(true);\n\t\tsetInputValue('');\n\t};\n\n\tconst handleInput = (value: string) => {\n\t\tsetInputValue(value);\n\t\tsetSelectedOption(undefined);\n\t\tsetCryptoCurrency(undefined);\n\t\tsetShowDrowDown(true);\n\t};\n\n\tconst handleContainerClick = () => {\n\t\tinputRef.current?.focus();\n\t\thandleInputFocus();\n\t};\n\n\tconst inputContainerClasses = joinClassNames([\n\t\tcryptoSelectorInputContainerCss,\n\t\t...(submitError ? [donationAmountInputContainerErrorCss] : []),\n\t\t...(showDropDown ? [inputContainerWithDropDownCss] : [])\n\t]);\n\n\tconst optionToListItem = (option: CryptoCurrencyOption) => (\n\t\t\n\t);\n\n\tconst filteredOptions = inputValue\n\t\t? fuzzyFilter(inputValue, enabledCryptoCurrencyOptions, {\n\t\t\t\textract: (option) => {\n\t\t\t\t\tconst config = SharedCryptoCurrencyConfig[option.value];\n\t\t\t\t\treturn [config.displayName, config.abbreviation].join(' ');\n\t\t\t\t}\n\t\t }).map((element) => element.original)\n\t\t: undefined;\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tprefixClassName={css({display: 'inline-flex'})}\n\t\t\t\tsufixClassName={cryptoSelectorInputSufixCss(primaryColor, showDropDown)}\n\t\t\t\tcontainerClassName={inputContainerClasses}\n\t\t\t\tsufix={\n\t\t\t\t\t\n\t\t\t\t\t\t{selectedOption?.contractType} \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tonInput={(event) => {\n\t\t\t\t\thandleInput(event.currentTarget.value);\n\t\t\t\t}}\n\t\t\t\tonFocus={handleInputFocus}\n\t\t\t/>\n\t\t\t{showDropDown && (\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t{filteredOptions ? (\n\t\t\t\t\t\t\tfilteredOptions.length === 0 ? (\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\tWe don't currently support this coin on our site, but for\n\t\t\t\t\t\t\t\t\tdonations worth over $5,000 USD we can do it manually. Please\n\t\t\t\t\t\t\t\t\temail to arrange.\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{filteredOptions.map((option) => optionToListItem(option))}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{quickSelectOptions.map((option) => optionToListItem(option))}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{otherOptions.map((option) => optionToListItem(option))}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t)}\n\t\t
    \n\t);\n};\n","const DefaultLocale = 'en-US';\n\nexport function displayCurrencyValue(\n\tvalue: string | number,\n\tcurrency: string,\n\toptions?: {showCurrency?: boolean}\n): string {\n\tconst amountString = new Intl.NumberFormat(DefaultLocale, {\n\t\tstyle: 'currency',\n\t\tcurrency\n\t}).format(Number.parseFloat(value.toString()));\n\n\t// remove 0 cents if present, tolerant to different locale formats\n\t// https://stackoverflow.com/a/49724581\n\tconst formatted = `${amountString.replace(/\\D00(?=\\D*$)/, '')} ${\n\t\toptions?.showCurrency ? ` ${currency}` : ''\n\t}`;\n\n\treturn formatted;\n}\n","import {CryptoCurrency} from 'src/components/widget/types/Crypto';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nexport function getSubmitButtonText({\n\tmethod,\n\tpaymentRequestIsApplePay,\n\tcryptoCurrency\n}: {\n\tmethod: PaymentMethod;\n\tpaymentRequestIsApplePay?: boolean;\n\tcryptoCurrency?: CryptoCurrency;\n}) {\n\tconst base = 'Continue with ';\n\tswitch (method) {\n\t\tcase PaymentMethod.CREDIT_CARD:\n\t\t\treturn base + 'credit or debit';\n\t\tcase PaymentMethod.BANK:\n\t\t\treturn base + 'bank';\n\t\tcase PaymentMethod.PAYPAL:\n\t\t\treturn base + 'PayPal';\n\t\tcase PaymentMethod.VENMO:\n\t\t\treturn base + 'Venmo';\n\t\tcase PaymentMethod.PAYMENT_REQUEST:\n\t\t\treturn base + (paymentRequestIsApplePay ? 'Apple Pay' : 'Google Pay');\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn base + 'Chariot';\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn base + (cryptoCurrency ?? 'crypto');\n\t\tcase PaymentMethod.GIFT_CARD:\n\t\t\treturn 'Redeem gift card';\n\t\tdefault:\n\t\t\treturn 'Continue';\n\t}\n}\n","import {render as preactRender} from 'preact';\nimport EmbedButton from 'src/components/embed-button';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {parseDonateUrl} from 'src/helpers/parseDonateUrl';\nimport shouldApplyEveryStyleForAllLinks from 'src/helpers/shouldApplyEveryStyleForAllLinks';\nimport {loadFonts} from 'src/loadFonts';\nimport {WidgetLoader} from 'src/loaders/Widgetloader';\n\nconst OBSERVER_OPTIONS = {\n\tchildList: true,\n\tsubtree: true,\n\tattributeFilter: ['href']\n};\n\ninterface CreateButtonProps extends Partial {\n\telement: Element;\n\tnonprofitSlug: string;\n\tonClick: () => void;\n\turl?: string;\n\tbgColor?: string;\n}\n\ninterface CreateWidgetProps extends Partial {\n\tnonprofitSlug: string;\n}\n\nlet shadowRoot: ShadowRoot;\nlet widgetContainer: HTMLElement;\nconst widgetsMap = new Map();\nconst applyEveryStyleForAllLinks = shouldApplyEveryStyleForAllLinks();\n\nclass WidgetController {\n\toptions: CreateWidgetProps;\n\tmountPoint: HTMLElement;\n\tconstructor(options: CreateWidgetProps, mountPoint: HTMLElement) {\n\t\tthis.options = options;\n\t\tthis.mountPoint = mountPoint;\n\t}\n\n\thide() {\n\t\tthis.options.show = false;\n\t\tthis.render();\n\t}\n\n\tshow() {\n\t\tthis.options.show = true;\n\t\tthis.render();\n\t}\n\n\tsetOptions(options: WidgetConfig) {\n\t\tthis.options = options;\n\t\tthis.render();\n\t}\n\n\trender() {\n\t\tpreactRender(\n\t\t\t {\n\t\t\t\t\tthis.hide();\n\t\t\t\t}}\n\t\t\t/>,\n\t\t\tthis.mountPoint\n\t\t);\n\t}\n}\n\nfunction mountShadowRoot() {\n\tdocument.querySelector('#every-shadow-wrapper')?.remove();\n\tconst shadowWidgetWrapper = document.createElement('div');\n\tshadowWidgetWrapper.id = 'every-shadow-wrapper';\n\tshadowWidgetWrapper.style.position = 'absolute';\n\tshadowWidgetWrapper.style.zIndex = '20000000';\n\tdocument.body.append(shadowWidgetWrapper);\n\tshadowRoot = shadowWidgetWrapper.attachShadow({mode: 'open'});\n}\n\nfunction mountWidgetContainer() {\n\tif (!shadowRoot) {\n\t\tmountShadowRoot();\n\t}\n\n\twidgetContainer = document.createElement('div');\n\twidgetContainer.id = 'widget-container';\n\tshadowRoot.append(widgetContainer);\n\n\tconst everyShadowStyles = document.createElement('style');\n\teveryShadowStyles.id = 'every-shadow-styles';\n\n\twidgetContainer.append(everyShadowStyles);\n}\n\nfunction createWidget(options: CreateWidgetProps, urlString: string) {\n\tif (!widgetContainer) {\n\t\tmountWidgetContainer();\n\t}\n\n\tconst widgetMountPoint = document.createElement('div');\n\twidgetContainer.append(widgetMountPoint);\n\n\tconst widget = new WidgetController(options, widgetMountPoint);\n\twidgetsMap.set(urlString, widget);\n\treturn widget;\n}\n\nfunction createButton({element, ...options}: CreateButtonProps) {\n\tif (!element.parentNode) {\n\t\treturn;\n\t}\n\n\tconst buttonContainer = element.parentNode as HTMLElement;\n\n\tpreactRender(, buttonContainer, element);\n}\n\nfunction findAndReplaceLinks() {\n\tconst links = document.querySelectorAll(\"*[href^='https://www.every.org/']\");\n\n\tlinks.forEach((link) => {\n\t\tconst urlString = link.getAttribute('href');\n\t\tif (urlString?.includes('#/donate')) {\n\t\t\tconst options = parseDonateUrl(urlString);\n\n\t\t\tif (!options) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst widget =\n\t\t\t\twidgetsMap.get(urlString) ?? createWidget(options, urlString);\n\n\t\t\tif (\n\t\t\t\tapplyEveryStyleForAllLinks ||\n\t\t\t\tlink.getAttribute('data-every-style') !== null\n\t\t\t) {\n\t\t\t\tcreateButton({\n\t\t\t\t\telement: link,\n\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\twidget.show();\n\t\t\t\t\t},\n\t\t\t\t\t...options,\n\t\t\t\t\tbgColor: options.primaryColor,\n\t\t\t\t\turl: urlString\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tlink.addEventListener('click', (event) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\twidget.show();\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n}\n\nexport default function autoPlayMode() {\n\tloadFonts();\n\tfindAndReplaceLinks();\n\n\tconst observer = new MutationObserver((mutations, observer) => {\n\t\t// disconnect before changing DOM so as not to cause an infinite loop\n\t\tobserver.disconnect();\n\n\t\tconst isLinksChanged = Boolean(\n\t\t\tmutations.some((mutation) => mutation.target.nodeName === 'A')\n\t\t);\n\n\t\tif (isLinksChanged) {\n\t\t\tfindAndReplaceLinks();\n\t\t}\n\n\t\tobserver.observe(document, OBSERVER_OPTIONS);\n\t});\n\n\tobserver.observe(document, OBSERVER_OPTIONS);\n}\n\ndeclare const window: Window &\n\ttypeof globalThis & {\n\t\tWebKitMutationObserver: MutationObserver;\n\t\tMozMutationObserver: MutationObserver;\n\t};\n\nconst MutationObserver =\n\twindow.MutationObserver ||\n\twindow.WebKitMutationObserver ||\n\twindow.MozMutationObserver;\n","export enum FontFamily {\n\tBasisGrotesque = `'Basis Grotesque Pro', -apple-system, BlinkMacSystemFont,\n 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Roboto,\n sans-serif`\n}\n","const resetcss = `\n\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n font-family: 'Basis Grotesque Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Roboto, sans-serif;\n vertical-align: baseline;\n }\n /* HTML5 display-role reset for older browsers */\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n body {\n line-height: 1;\n }\n ol, ul {\n list-style: none;\n }\n blockquote, q {\n quotes: none;\n }\n blockquote:before, blockquote:after,\n q:before, q:after {\n content: '';\n content: none;\n }\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n button {\n color: unset;\n background: unset;\n }\n\n h1, h2, h3, h4, h4, h6 {\n font-weight: 700\n }\n`;\n\nexport default resetcss;\n","import {FontFamily} from 'src/components/widget/theme/font-family';\nimport {cssButton} from 'src/helpers/css';\n\nexport const buttonCss = cssButton({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\twidth: 'max-content',\n\tborder: 'none',\n\toutline: 'none',\n\tfontFamily: FontFamily.BasisGrotesque,\n\tfontWeight: 500,\n\tlineHeight: 1,\n\tcursor: 'pointer',\n\ttextDecoration: 'none',\n\tbackfaceVisibility: 'hidden',\n\ttransition: 'background-color 0.25s',\n\n\tpadding: '12px 20px',\n\tcolor: '#fff',\n\tbackgroundColor: '#00a380',\n\tborderRadius: '100px',\n\tfontSize: '16px',\n\t'&:hover': {backgroundColor: '#2F806D'}\n});\n\nexport const logoCss = cssButton({\n\twidth: '16px',\n\theight: '16px',\n\tfill: '#fff',\n\tmarginRight: '8px'\n});\n\nexport const verticalCenterTextCss = cssButton({\n\ttransform: 'translateY(0.08em)'\n});\n","export enum DonateUrlParameters {\n\tDONATE_NONPROFIT_ID = 'donateTo',\n\tJOIN_DONATION_ID = 'joinTo',\n\tJOIN_DONATION_USER_ID = 'joinUser',\n\tMATCH_CAMPAIGN = 'match',\n\tDONATION_HEADER_TEXT = 'donation_header_text',\n\n\tREDIRECT_URL = 'redirect_url',\n\tFUNDRAISER_ID = 'fundraiser_id',\n\tMIN_VALUE = 'min_value',\n\tFREQUENCY_OPTIONS = 'frequency_options',\n\tREQUIRE_SHARE_INFO = 'require_share_info',\n\n\tMETHOD = 'method',\n\n\tAMOUNT = 'amount',\n\tFREQUENCY = 'frequency',\n\tDONOR_FIRST_NAME = 'first_name',\n\tDONOR_LAST_NAME = 'last_name',\n\tDONOR_EMAIL = 'email',\n\tDESCRIPTION = 'description',\n\tMONTHLY_TITLE = 'monthlyTitle',\n\n\tPARTNER_DONATION_ID = 'partner_donation_id',\n\tPARTNER_WEBHOOK_TOKEN = 'webhook_token',\n\tPARTNER_METADATA = 'partner_metadata',\n\tTO_NONPROFITS = 'to_nonprofits',\n\tTO_NONPROFIT_WEIGHTS = 'to_nonprofit_weights',\n\tTO_NONPROFIT_MATCHINGS = 'to_nonprofit_matchings',\n\tRECURRING_MATCHES = 'recurring_matches',\n\n\tSHARE_INFO = 'share_info',\n\tNO_EXIT = 'no_exit',\n\n\tSUCCESS_URL = 'success_url',\n\n\tEXIT_URL = 'exit_url',\n\n\tGIFT_CARD_AMOUNT = 'gift_card_amount',\n\tGIFT_CARD_QUANTITY = 'gift_card_quantity',\n\tGIFT_CARD_NONPROFIT_ID = 'gift_card_nonprofit_ID',\n\tGIFT_CARD_TAG_ID = 'gift_card_tag_ID',\n\n\tTHEME_COLOR = 'theme_color',\n\tTHEME_COLOR_HIGHLIGHT = 'theme_color_highlight',\n\n\tCRYPTO_AMOUNT = 'crypto_amount',\n\tCRYPTO_CURRENCY = 'crypto_currency',\n\n\tSTOCK_SYMBOL = 'stock_symbol',\n\tSTOCK_AMOUNT = 'stock_amount',\n\n\tSUGGESTED_AMOUNTS = 'suggestedAmounts',\n\n\tDESIGNATION = 'designation',\n\n\tPRIVATE_NOTE = 'private_note',\n\tPUBLIC_TESTIMONY = 'public_testimony',\n\n\tSEARCH_META = 'search_meta',\n\n\tGIFT_CARD_CODE = 'gift_card_code'\n}\n\nexport enum UTM_QUERY_PARAM {\n\tutm_source = 'utm_source',\n\tutm_medium = 'utm_medium',\n\tutm_campaign = 'utm_campaign',\n\tutm_term = 'utm_term',\n\tutm_content = 'utm_content'\n}\n","export const BASE_URL = 'https://www.every.org/';\nexport const BASE_API_URL = 'https://partners.every.org/v0.2/nonprofit';\nexport const BASE_CLOUDINARY_URL =\n\t'https://res.cloudinary.com/everydotorg/image/upload/';\nexport const BASE_COINGECKO_URL = 'https://api.coingecko.com/api/v3';\n\nexport const SUPPORT_EMAIL = 'support@every.org';\nexport const TEAM_EMAIL = 'team@every.org';\nexport const CRYPTO_EMAIL = 'crypto@every.org';\n\nexport const TERMS_ROUTE = 'terms';\nexport const HELP_ROUTE = 'support';\nexport const PRIVACY_ROUTE = 'privacy';\nexport const ABOUT_ROUTE = 'about-us';\nexport const FUNDRAISER_ROUTE = 'fundraiser';\nexport const GIFT_CARD_ROUTE = 'gift';\n\nexport const TERMS_URL = BASE_URL + TERMS_ROUTE;\nexport const HELP_URL = BASE_URL + HELP_ROUTE;\nexport const PRIVACY_URL = BASE_URL + PRIVACY_ROUTE;\nexport const ABOUT_URL = BASE_URL + ABOUT_ROUTE;\nexport const GIFT_CARD_URL = BASE_URL + GIFT_CARD_ROUTE;\n","import {\n\tbuttonCss,\n\tlogoCss,\n\tverticalCenterTextCss\n} from 'src/components/embed-button/styles';\nimport {EmbedButtonOptions} from 'src/components/embed-button/types';\nimport {constructBasicDonateUrl} from 'src/helpers/constructDonateUrl';\n\n/**\n * Used to identify if a link is a donate button\n */\nconst EmbedButton = ({\n\twithLogo = true,\n\ttextColor = '#fff',\n\tbgColor = '#00a380',\n\tborderRadius = '100px',\n\tfontSize = '16px',\n\tpadding = '12px 20px',\n\tclassName,\n\tonClick,\n\ttarget = '_blank',\n\turl: initialUrl,\n\tlabel = 'Donate',\n\t...donateOptions\n}: EmbedButtonOptions) => {\n\tconst url = initialUrl ? initialUrl : constructBasicDonateUrl(donateOptions);\n\treturn (\n\t\t {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tonClick();\n\t\t\t\t\t }\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t>\n\t\t\t{withLogo && (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t)}\n\t\t\t{label}\n\t\t\n\t);\n};\n\nexport default EmbedButton;\n","export enum DonationFrequency {\n\tMonthly = 'monthly',\n\tOneTime = 'once',\n\tUnselected = ''\n}\n","export enum PaymentMethod {\n\tCREDIT_CARD = 'card',\n\tBANK = 'bank',\n\tPAYPAL = 'paypal',\n\tVENMO = 'venmo',\n\tPAYMENT_REQUEST = 'pay',\n\tCRYPTO = 'crypto',\n\tSTOCKS = 'stocks',\n\tDAF = 'daf',\n\tGIFT_CARD = 'gift'\n}\n\nexport const OneTimeFrequencyMethods = [\n\tPaymentMethod.VENMO,\n\tPaymentMethod.DAF,\n\tPaymentMethod.CRYPTO,\n\tPaymentMethod.STOCKS\n];\n\nexport const AvailablePaymentMethods = Object.values(PaymentMethod);\nexport const DefaultPaymentMethods = AvailablePaymentMethods.filter(\n\t(pm) => pm !== PaymentMethod.GIFT_CARD\n);\nexport interface PaymentRequestAvailable {\n\tgooglePay: boolean;\n\tapplePay: boolean;\n}\nexport const PaymentMethodsOrder = [\n\tPaymentMethod.CREDIT_CARD,\n\tPaymentMethod.PAYPAL,\n\tPaymentMethod.GIFT_CARD,\n\tPaymentMethod.BANK,\n\tPaymentMethod.CRYPTO,\n\tPaymentMethod.DAF,\n\tPaymentMethod.VENMO,\n\tPaymentMethod.STOCKS,\n\tPaymentMethod.PAYMENT_REQUEST\n];\n","export const loadFonts = () => {\n\tconst fonts = document.createElement('style');\n\tfonts.innerHTML = `\n @font-face {\n font-family: \"Basis Grotesque Pro\";\n src: local(\"Basis Grotesque Pro\"), local(\"Basis Grotesque Pro\"),\n url(https://assets.every.org/every-month/BasisGrotesque-Regular-Pro.woff2) format(\"woff2\");\n font-weight: 400;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: \"Basis Grotesque Pro\";\n src: local(\"Basis Grotesque Pro\"), local(\"Basis Grotesque Pro\"),\n url(https://assets.every.org/every-month/BasisGrotesque-Bold-Pro.woff2) format(\"woff2\");\n font-weight: bold;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: \"Basis Grotesque Pro\";\n src: local(\"Basis Grotesque Pro\"), local(\"Basis Grotesque Pro\"),\n url(https://assets.every.org/every-month/BasisGrotesque-Medium-Pro.woff2) format(\"woff2\");\n font-weight: 500;\n font-style: normal;\n font-display: swap;\n }\n `;\n\tdocument.head.append(fonts);\n};\n","import deepMerge, {Options as DeepMergeOptions} from 'deepmerge';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tAvailablePaymentMethods,\n\tDefaultPaymentMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport getScriptParameters from 'src/helpers/getScriptParameters';\n\nconst PREVIEW_MODE_PARAM = 'previewMode';\n\nconst defaults: Partial = {\n\tmethods: Object.values(DefaultPaymentMethods),\n\tshow: false,\n\taddAmounts: [10, 50, 100],\n\tdefaultFrequency: DonationFrequency.Unselected,\n\tminDonationAmount: 5,\n\tprimaryColor: '#018669',\n\tshowGiftCardOption: false,\n\tredeemGiftCardInFlow: false,\n\tpreviewMode: getScriptParameters()?.[PREVIEW_MODE_PARAM] === '1'\n};\n\nconst DEEP_MERGE_OPTIONS: DeepMergeOptions = {\n\t// Don't merge arrays, just overwrite them\n\n\tarrayMerge: (_, sourceArray) => sourceArray\n};\n\nexport const mergeConfig = (options: Partial): WidgetConfig => {\n\tconst filteredInputMethods = options.methods?.filter((method) =>\n\t\tAvailablePaymentMethods.includes(method)\n\t);\n\n\tconst additionalMethods = options.showGiftCardOption\n\t\t? [PaymentMethod.GIFT_CARD]\n\t\t: [];\n\n\tconst methods = (\n\t\tfilteredInputMethods && filteredInputMethods.length > 0\n\t\t\t? filteredInputMethods\n\t\t\t: DefaultPaymentMethods\n\t).concat(additionalMethods);\n\n\treturn deepMerge.all(\n\t\t[defaults, options, {methods}],\n\t\tDEEP_MERGE_OPTIONS\n\t);\n};\n","import {createContext, FunctionalComponent} from 'preact';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {mergeConfig} from 'src/helpers/optionsTypes';\n\nexport const ConfigContext = createContext({} as WidgetConfig);\n\nexport const ConfigContextProvider: FunctionalComponent<{\n\toptions: Partial;\n}> = ({options, children}) => {\n\tconst mergedConfig = mergeConfig(options);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {useContext} from 'preact/hooks';\nimport {ConfigContext} from 'src/components/widget/context/ConfigContext';\n\nexport const useConfigContext = () => useContext(ConfigContext);\n","// TODO: add more accurate type\nexport interface Fundraiser {\n\tid: string;\n\tslug: string;\n\ttitle: string;\n\tcoverImageCloudinaryId: string | null;\n\tactive: boolean;\n\tchildrenFundraiserIds: string | null;\n\tcreatedAt: string | null;\n\tcreatorNonprofitId: string | null;\n\tcreatorUserId: string | null;\n\tdescription: string | null;\n\tendDate: string | null;\n\tentityName: string | null;\n\teventIds: string | null;\n\tgoalAmount: string | null;\n\tgoalCurrency: string | null;\n\tmetadata: string | null;\n\tnonprofitId: string;\n\tparentFundraiserId: string | null;\n\tpinnedAt: string | null;\n\tstartDate: string | null;\n}\n\nexport const FundraiserFetchError = Symbol('FundraiserFetchError');\nexport const FundraiserFetching = Symbol('FundraiserFetching');\n","import {createContext, FunctionalComponent} from 'preact';\nimport {useCallback, useEffect, useState} from 'preact/hooks';\nimport {getFundraiser} from 'src/components/widget/api';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {\n\tFundraiser,\n\tFundraiserFetchError,\n\tFundraiserFetching\n} from 'src/components/widget/types/Fundraiser';\ninterface FundraiserContextData {\n\tfundraiser?:\n\t\t| Fundraiser\n\t\t| typeof FundraiserFetchError\n\t\t| typeof FundraiserFetching;\n}\n\nexport const FundraiserContext = createContext({\n\tfundraiser: FundraiserFetching\n});\n\nexport const FundraiserContextProvider: FunctionalComponent = ({children}) => {\n\tconst {fundraiserSlug, nonprofitSlug} = useConfigContext();\n\tconst [fundraiser, setFundraiser] =\n\t\tuseState(FundraiserFetching);\n\n\tconst fetchFundraiser = useCallback(async () => {\n\t\tif (!fundraiserSlug) {\n\t\t\tsetFundraiser(undefined);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst response = await getFundraiser(nonprofitSlug, fundraiserSlug);\n\t\t\tsetFundraiser(response);\n\t\t} catch {\n\t\t\tsetFundraiser(FundraiserFetchError);\n\t\t}\n\t}, [nonprofitSlug, fundraiserSlug]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line @typescript-eslint/no-floating-promises\n\t\tfetchFundraiser();\n\t}, [fetchFundraiser]);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","// TODO: add more accurate type\nexport interface Nonprofit {\n\tid: string;\n\tein: string;\n\tname: string;\n\tprimarySlug: string;\n\tprofileUrl: string;\n\tdisbursementType?: DisbursementType | null;\n\thasAdmin?: boolean;\n\tdescription: string | null;\n\tcoverImageCloudinaryId: string | null;\n\tcoverImageUrl: string | null;\n\tdescriptionLong: string | null;\n\tisDisbursable: boolean;\n\tlocationAddress: string | null;\n\tlogoCloudinaryId: string | null;\n\tlogoUrl: string | null;\n\tnteeCode: string | null;\n\tmetadata?: {\n\t\tdisablePrivateNotes?: boolean;\n\t\tprefixWithThe?: boolean;\n\t\thideFundraiseButton?: boolean;\n\t};\n\teligibleDonationRecipientNonprofitIds?: string[];\n}\n\nexport enum DisbursementType {\n\tSTRIPE_CONNECT = 'STRIPE_CONNECT',\n\tPAYPAL_GRANTS = 'PAYPAL_GRANTS',\n\tNFG_BATCH_FILE = 'NFG_BATCH_FILE',\n\tMANUAL = 'MANUAL'\n}\n\nexport const NonprofitFetchError = Symbol('NonprofitFetchError');\nexport const NonprofitFetching = Symbol('NonprofitFetching');\n","import {createContext, FunctionalComponent} from 'preact';\nimport {useCallback, useEffect, useState} from 'preact/hooks';\nimport {getNonprofit} from 'src/components/widget/api';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {\n\tNonprofit,\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\n\ninterface NonprofitContextData {\n\tnonprofit: Nonprofit | typeof NonprofitFetchError | typeof NonprofitFetching;\n\tparentNonprofit?: Nonprofit;\n}\n\nexport const NonprofitContext = createContext({\n\tnonprofit: NonprofitFetching\n});\n\nexport const NonprofitContextProvider: FunctionalComponent = ({children}) => {\n\tconst {nonprofitSlug} = useConfigContext();\n\tconst [nonprofit, setNonprofit] =\n\t\tuseState(NonprofitFetching);\n\tconst [parentNonprofit, setParentNonprofitNonprofit] =\n\t\tuseState();\n\n\tconst fetchNonprofit = useCallback(async () => {\n\t\ttry {\n\t\t\tconst response = await getNonprofit(nonprofitSlug);\n\t\t\tsetNonprofit(response);\n\n\t\t\tconst parentNonprofitId =\n\t\t\t\tresponse.eligibleDonationRecipientNonprofitIds?.length === 1\n\t\t\t\t\t? response.eligibleDonationRecipientNonprofitIds[0]\n\t\t\t\t\t: undefined;\n\n\t\t\tif (parentNonprofitId) {\n\t\t\t\ttry {\n\t\t\t\t\tconst response = await getNonprofit(parentNonprofitId);\n\t\t\t\t\tsetParentNonprofitNonprofit(response);\n\t\t\t\t} catch {\n\t\t\t\t\tsetParentNonprofitNonprofit(undefined);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\tsetNonprofit(NonprofitFetchError);\n\t\t}\n\t}, [nonprofitSlug]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line @typescript-eslint/no-floating-promises\n\t\tfetchNonprofit();\n\t}, [fetchNonprofit]);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","var V3_URL = 'https://js.stripe.com/v3';\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\nvar findScript = function findScript() {\n var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(V3_URL, \"\\\"]\"));\n\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n\n if (!V3_URL_REGEX.test(script.src)) {\n continue;\n }\n\n return script;\n }\n\n return null;\n};\n\nvar injectScript = function injectScript(params) {\n var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n var script = document.createElement('script');\n script.src = \"\".concat(V3_URL).concat(queryString);\n var headOrBody = document.head || document.body;\n\n if (!headOrBody) {\n throw new Error('Expected document.body not to be null. Stripe.js requires a element.');\n }\n\n headOrBody.appendChild(script);\n return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n if (!stripe || !stripe._registerWrapper) {\n return;\n }\n\n stripe._registerWrapper({\n name: 'stripe-js',\n version: \"1.54.2\",\n startTime: startTime\n });\n};\n\nvar stripePromise = null;\nvar loadScript = function loadScript(params) {\n // Ensure that we only attempt to load Stripe.js at most once\n if (stripePromise !== null) {\n return stripePromise;\n }\n\n stripePromise = new Promise(function (resolve, reject) {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n // Resolve to null when imported server side. This makes the module\n // safe to import in an isomorphic code base.\n resolve(null);\n return;\n }\n\n if (window.Stripe && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n }\n\n if (window.Stripe) {\n resolve(window.Stripe);\n return;\n }\n\n try {\n var script = findScript();\n\n if (script && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n } else if (!script) {\n script = injectScript(params);\n }\n\n script.addEventListener('load', function () {\n if (window.Stripe) {\n resolve(window.Stripe);\n } else {\n reject(new Error('Stripe.js not available'));\n }\n });\n script.addEventListener('error', function () {\n reject(new Error('Failed to load Stripe.js'));\n });\n } catch (error) {\n reject(error);\n return;\n }\n });\n return stripePromise;\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n if (maybeStripe === null) {\n return null;\n }\n\n var stripe = maybeStripe.apply(undefined, args);\n registerWrapper(stripe, startTime);\n return stripe;\n}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n// own script injection.\n\nvar stripePromise$1 = Promise.resolve().then(function () {\n return loadScript(null);\n});\nvar loadCalled = false;\nstripePromise$1[\"catch\"](function (err) {\n if (!loadCalled) {\n console.warn(err);\n }\n});\nvar loadStripe = function loadStripe() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n loadCalled = true;\n var startTime = Date.now();\n return stripePromise$1.then(function (maybeStripe) {\n return initStripe(maybeStripe, args, startTime);\n });\n};\n\nexport { loadStripe };\n","export const STRIPE_PUBLIC_KEY = 'pk_live_a5XJAcVaIqMs8ggZMtluZs8z00r2H4kYVG';\nexport const STRIPE_API_VERSION = '2022-11-15';\n","import {createContext, FunctionalComponent} from 'preact';\nimport {StateUpdater, useEffect, useState} from 'preact/hooks';\nimport {useCheckPaymentRequest} from 'src/components/widget/hooks/useCheckPaymentRequest';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {CryptoCurrency} from 'src/components/widget/types/Crypto';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tPaymentMethod,\n\tPaymentRequestAvailable\n} from 'src/components/widget/types/PaymentMethod';\n\ninterface WidgetContextProps {\n\tfrequency: DonationFrequency;\n\tsetFrequency: StateUpdater;\n\n\tdonationAmount?: number;\n\tsetDonationAmount: StateUpdater;\n\n\tsubmitError: string | null;\n\tsetSubmitError: StateUpdater;\n\n\tselectedPaymentMethod: PaymentMethod;\n\tsetSelectedPaymentMethod: StateUpdater;\n\n\tstockAmount?: number;\n\tsetStockAmount: StateUpdater;\n\n\tstockSymbol?: string;\n\tsetStockSymbol: StateUpdater;\n\n\tcryptoAmount?: number;\n\tsetCryptoAmount: StateUpdater;\n\n\tcryptoCurrency?: CryptoCurrency;\n\tsetCryptoCurrency: StateUpdater;\n\n\tpaymentRequestAvailable: PaymentRequestAvailable;\n\thideWidget: () => void;\n\n\tprivateNote?: string;\n\tsetPrivateNote: StateUpdater;\n\n\tpublicTestimony?: string;\n\tsetPublicTestimony: StateUpdater;\n\n\tgiftCardCode?: string;\n\tsetGiftCardCode: StateUpdater;\n\n\tsubMethod: 'apple' | 'google';\n\tsetSubMethod: StateUpdater<'apple' | 'google'>;\n}\n\nexport const WidgetContext = createContext(\n\t{} as WidgetContextProps\n);\n\nexport const WidgetContextProvider: FunctionalComponent<{hide: () => void}> = ({\n\tchildren,\n\thide\n}) => {\n\tconst config = useConfigContext();\n\n\tconst [frequency, setFrequency] = useState(config.defaultFrequency);\n\tconst [donationAmount, setDonationAmount] = useState(\n\t\tconfig.amount ?? config.defaultDonationAmount\n\t);\n\n\tuseEffect(() => {\n\t\tsetDonationAmount(config.amount);\n\t}, [config.amount]);\n\n\tconst [submitError, setSubmitError] = useState(null);\n\tconst [selectedPaymentMethod, setSelectedPaymentMethod] = useState(\n\t\tconfig.methods[0]\n\t);\n\n\tuseEffect(() => {\n\t\tif (!config.methods.includes(selectedPaymentMethod)) {\n\t\t\tsetSelectedPaymentMethod(config.methods[0]);\n\t\t}\n\t}, [config.methods, selectedPaymentMethod]);\n\n\tconst [stockAmount, setStockAmount] = useState();\n\tconst [stockSymbol, setStockSymbol] = useState();\n\n\tconst [cryptoAmount, setCryptoAmount] = useState();\n\tconst [cryptoCurrency, setCryptoCurrency] = useState();\n\n\tconst paymentRequestAvailable = useCheckPaymentRequest();\n\n\tconst [privateNote, setPrivateNote] = useState();\n\tconst [publicTestimony, setPublicTestimony] = useState();\n\n\tconst [giftCardCode, setGiftCardCode] = useState();\n\n\tconst [subMethod, setSubMethod] = useState<'apple' | 'google'>('apple');\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {FunctionComponent} from 'preact';\nimport {ConfigContextProvider} from 'src/components/widget/context/ConfigContext';\nimport {FundraiserContextProvider} from 'src/components/widget/context/FundraiserContext';\nimport {NonprofitContextProvider} from 'src/components/widget/context/NonprofitContext';\nimport {WidgetContextProvider} from 'src/components/widget/context/WidgetContext';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nexport const ContextProvider: FunctionComponent<{\n\toptions: Partial;\n\thide: () => void;\n}> = ({options, hide, children}) => (\n\t\n\t\t\n\t\t\t\n\t\t\t\t{children}\n\t\t\t\n\t\t\n\t\n);\n","export enum BREAKPOINTS {\n\tPhoneOnly = '@media only screen and (max-width: 37.44em)',\n\tTabletUp = '@media only screen and (min-width: 37.5em)',\n\tTabletLandscapeUp = '@media only screen and (min-width: 56.25em)',\n\tDesktopUp = '@media only screen and (min-width: 75em)',\n\tBigDesktopUp = '@media only screen and (min-width: 112.5em)'\n}\n","export enum COLORS {\n\tLightGray = '#EAEDED',\n\tGray = '#f3f6f6',\n\tDarkGray = '#868A8A',\n\tBlack = '#272727',\n\tText = '#2E3434',\n\tTextGray = '#868383',\n\tTextOpaque = 'rgba(46, 52, 52, 0.6)',\n\tError = '#D95C35',\n\tErrorShadow = 'rgba(217, 92, 53, 0.2)',\n\tTransparent = 'transparent',\n\tWhite = '#fff'\n}\n","import {CSSObject} from 'src/helpers/css';\n\nexport const smallText: CSSObject = {\n\tfontSize: '12px',\n\tlineHeight: '16px',\n\tletterSpacing: '0.01em'\n};\n\nexport const bodyText: CSSObject = {\n\tfontSize: '16px',\n\tlineHeight: '24px',\n\tletterSpacing: '-0.01em'\n};\n\nexport const inputText: CSSObject = {\n\tfontSize: '16px',\n\tlineHeight: '16px'\n};\n\nexport const headingText: CSSObject = {\n\tfontSize: '24px',\n\tlineHeight: '28px',\n\tletterSpacing: '-0.015em'\n};\n\nexport const heading2Text: CSSObject = {\n\tfontSize: '24px',\n\tlineHeight: '28px',\n\tletterSpacing: '-0.015em'\n};\n\nexport const heading3Text: CSSObject = {\n\tfontSize: '20px',\n\tlineHeight: '24px',\n\tletterSpacing: '-0.015em'\n};\n\nexport const buttonText: CSSObject = {\n\tfontSize: '16px',\n\tlineHeight: '24px',\n\tletterSpacing: '-0.01em'\n};\n\nexport const textSize = {\n\txxl: {\n\t\tfontSize: '48px',\n\t\tlineHeight: '56px'\n\t},\n\txl: {\n\t\tfontSize: '32px',\n\t\tlineHeight: '36px'\n\t},\n\tl: {\n\t\tfontSize: '24px',\n\t\tlineHeight: '32px'\n\t},\n\tm: {\n\t\tfontSize: '20px',\n\t\tlineHeight: '24px'\n\t},\n\ts: {\n\t\tfontSize: '16px',\n\t\tlineHeight: '24px'\n\t},\n\txs: {\n\t\tfontSize: '14px',\n\t\tlineHeight: '20px'\n\t},\n\txxs: {\n\t\tfontSize: '12px',\n\t\tlineHeight: '16px'\n\t}\n};\n","import css, {CSSObject} from 'src/helpers/css';\n\nexport enum Spacing {\n\tEmpty = '0',\n\n\tXXS = '4px',\n\tXS = '8px',\n\tS = '12px',\n\tM = '16px',\n\tL = '20px',\n\tXL = '24px',\n\tXXL = '32px',\n\n\tStack_XXS = '0 0 4px 0',\n\tStack_XS = '0 0 8px 0',\n\tStack_S = '0 0 12px 0',\n\tStack_M = '0 0 16px 0',\n\tStack_L = '0 0 20px 0',\n\tStack_XL = '0 0 24px 0',\n\tStack_XXL = '0 0 32px 0',\n\n\tInset_XXS = '4px 4px 4px 4px',\n\tInset_XS = '8px 8px 8px 8px',\n\tInset_S = '12px 12px 12px 12px',\n\tInset_M = '16px 16px 16px 16px',\n\tInset_L = '20px 20px 20px 20px',\n\tInset_XL = '24px 24px 24px 24px',\n\tInset_XXL = '32px 32px 32px 32px',\n\n\tInsetSquish_XS = '8px 16px',\n\tInsetSquish_S = '12px 24px',\n\tInsetSquish_M = '16px 32px',\n\tInsetSquish_L = '20px 40px',\n\tInsetSquish_XL = '24px 48px',\n\n\tInline_XS = '0 8px 0 0',\n\tInline_S = '0 12px 0 0',\n\tInline_M = '0 16px 0 0',\n\tInline_L = '0 20px 0 0',\n\tInline_XL = '0 24px 0 0',\n\tInline_XXL = '0 24px 0 0'\n}\n\nconst verticalStackCssObject = (spacing: number | string): CSSObject => ({\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\t'> *:not(:last-child)': {\n\t\tmarginBottom: typeof spacing === 'number' ? `${spacing}px` : spacing\n\t}\n});\nconst horizontalStackCssObject = (spacing: number | string): CSSObject => ({\n\tdisplay: 'flex',\n\tflexDirection: 'row',\n\t'> *:not(:last-child)': {\n\t\tmarginRight: typeof spacing === 'number' ? `${spacing}px` : spacing\n\t}\n});\n\nexport const verticalStackCss = {\n\tclassName: (spacing: number | string) => css(verticalStackCssObject(spacing)),\n\tcss: (spacing: number | string) => verticalStackCssObject(spacing)\n};\n\nexport const horizontalStackCss = {\n\tclassName: (spacing: number | string) =>\n\t\tcss(horizontalStackCssObject(spacing)),\n\tcss: (spacing: number | string) => horizontalStackCssObject(spacing)\n};\n","import {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {horizontalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport css, {CSSObject} from 'src/helpers/css';\n\nexport const faqListCss = css({\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\tgap: Spacing.M\n});\n\nexport const rotateCss: CSSObject = {\n\tposition: 'relative',\n\ttop: '-1px',\n\ttransform: 'rotate(180deg)'\n};\n\nexport const descriptionBaseCss: CSSObject = {\n\t'> p': {\n\t\tmarginBottom: Spacing.XS\n\t}\n};\nexport const descriptionOpen = css({\n\t...descriptionBaseCss,\n\tmaxHeight: '1000px',\n\ttransition: 'all 1s',\n\topacity: '1'\n});\n\nexport const descriptionClose = css({\n\t...descriptionBaseCss,\n\topacity: '0',\n\toverflow: 'hidden',\n\tmaxHeight: '0',\n\ttransition: 'all 0.5s'\n});\n\nexport const faqItemConateinerCss = (mobileOnly?: boolean) =>\n\tcss({\n\t\t...textSize.xs,\n\t\t...(mobileOnly\n\t\t\t? {\n\t\t\t\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\t\t\t\tpadding: 'none'\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: {})\n\t});\n\nexport const faqItemButtonCss = (isOpen: boolean) =>\n\tcss({\n\t\t...horizontalStackCss.css(Spacing.S),\n\t\t...textSize.xs,\n\t\talignItems: 'center',\n\t\tjustifyContent: 'space-between',\n\t\twidth: '100%',\n\t\tborder: 'none',\n\t\tbackground: 'transparent',\n\t\ttextAlign: 'start',\n\t\tpadding: 0,\n\t\t':hover': {cursor: 'pointer'},\n\t\t'> svg': {\n\t\t\twidth: '16px',\n\t\t\theight: '16px',\n\t\t\t...(isOpen ? rotateCss : {})\n\t\t},\n\t\t...(isOpen\n\t\t\t? {\n\t\t\t\t\tfontWeight: 700\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tfontWeight: 500,\n\t\t\t\t\tcolor: COLORS.TextGray\n\t\t\t })\n\t});\n\nexport const faqLinkCss = css({\n\tcolor: COLORS.Text,\n\tfontWeight: 500,\n\ttextDecoration: 'none',\n\t':hover': {\n\t\ttextDecoration: 'underline'\n\t}\n});\n","import {Fundraiser} from 'src/components/widget/types/Fundraiser';\nimport {Nonprofit} from 'src/components/widget/types/Nonprofit';\n\nexport function getGranteeName(\n\tnonprofit: Nonprofit,\n\tparentNonprofit?: Nonprofit\n) {\n\tconst name = nonprofit.metadata?.prefixWithThe\n\t\t? `the ${nonprofit.name}`\n\t\t: nonprofit.name;\n\n\tif (parentNonprofit) {\n\t\treturn `the fund for ${name} hosted at ${parentNonprofit.name}`;\n\t}\n\n\treturn name;\n}\n\nexport function isOfficialFundraiser(fundraiser: Fundraiser): boolean {\n\treturn fundraiser.nonprofitId === fundraiser.creatorNonprofitId;\n}\n\nexport const getTaxDeductibleStatement = (\n\tnonprofit: Nonprofit,\n\tfundraiser?: Fundraiser,\n\tparentNonprofit?: Nonprofit\n) => {\n\tconst granteeName = getGranteeName(nonprofit, parentNonprofit);\n\n\tconst base = `100% of your donation is tax-deductible to the extent allowed by US law. \n Your donation is made to Every.org, a tax-exempt US 501(c)(3) charity that\n grants unrestricted funds to ${granteeName} on your behalf. \n As a legal matter, Every.org must provide any donations to ${granteeName} on an\n unrestricted basis, regardless of any designations or restrictions made by\n you.`;\n\n\tconst isUnofficialFundraiser =\n\t\tfundraiser && !isOfficialFundraiser(fundraiser);\n\n\tlet end = '';\n\n\tif (nonprofit.hasAdmin && isUnofficialFundraiser) {\n\t\tend = `Please note ${nonprofit.name} has not reviewed or approved the content of this peer-to-peer fundraiser.`;\n\t} else if (!nonprofit.hasAdmin && !isUnofficialFundraiser) {\n\t\tend = `Please note ${nonprofit.name} has not provided permission for this solicitation.`;\n\t} else if (!nonprofit.hasAdmin && isUnofficialFundraiser) {\n\t\tend = `Please note ${nonprofit.name} has not provided permission for this solicitation or reviewed or approved the content of this peer-to-peer fundraiser.`;\n\t}\n\n\treturn (\n\t\t\n\t\t\t{base} {end}\n\t\t\n\t);\n};\n","import {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nexport const cardCss = css({\n\tbackgroundColor: 'white',\n\tpadding: `${Spacing.XL} ${Spacing.XL} 0px`,\n\tborderRadius: 'unset',\n\toverflow: 'hidden',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tborderRadius: '16px',\n\t\tpadding: Spacing.M\n\t}\n});\n","const joinClassNames = (classNames: Array) => {\n\treturn classNames.filter((className) => Boolean(className)).join(' ');\n};\n\nexport default joinClassNames;\n","import {FunctionalComponent} from 'preact';\nimport {cardCss} from 'src/components/widget/components/GridCard/styles';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface CardProps {\n\tclassName?: string;\n}\n\nexport const GridCard: FunctionalComponent = ({\n\tchildren,\n\tclassName\n}) => {\n\treturn
    {children}
    ;\n};\n","import {useContext} from 'preact/hooks';\nimport {FundraiserContext} from 'src/components/widget/context/FundraiserContext';\nimport {\n\tFundraiserFetchError,\n\tFundraiserFetching\n} from 'src/components/widget/types/Fundraiser';\n\nexport const useFundraiser = () => useContext(FundraiserContext).fundraiser;\n\nexport const useFundraiserOrUndefined = () => {\n\tconst fundraiser = useFundraiser();\n\n\tif (\n\t\tfundraiser === FundraiserFetchError ||\n\t\tfundraiser === FundraiserFetching\n\t) {\n\t\treturn undefined;\n\t}\n\n\treturn fundraiser;\n};\n","import {useContext} from 'preact/hooks';\nimport {NonprofitContext} from 'src/components/widget/context/NonprofitContext';\nimport {\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\n\nexport const useNonprofit = () => useContext(NonprofitContext).nonprofit;\n\nexport const useParentNonprofit = () =>\n\tuseContext(NonprofitContext).parentNonprofit;\n\nexport const useNonprofitOrError = () => {\n\tconst nonprofit = useNonprofit();\n\n\tif (nonprofit === NonprofitFetchError || nonprofit === NonprofitFetching) {\n\t\t// TODO: add more readable error\n\t\tthrow new Error('Nonprofit error');\n\t}\n\n\treturn nonprofit;\n};\n","import {useContext} from 'preact/hooks';\nimport {WidgetContext} from 'src/components/widget/context/WidgetContext';\n\nexport const useWidgetContext = () => useContext(WidgetContext);\n","export const ArrowIcon = () => (\n\t\n\t\t\n\t\n);\n","import {FunctionalComponent, VNode} from 'preact';\nimport {useState} from 'preact/hooks';\nimport {Fragment} from 'preact/jsx-runtime';\nimport {\n\tgetDisbursementDescription,\n\tgetFeeDescription,\n\tgetNonprofitName\n} from 'src/components/widget/components/Faq/helpers';\nimport {\n\tfaqItemConateinerCss,\n\tfaqItemButtonCss,\n\tdescriptionOpen,\n\tdescriptionClose,\n\tfaqLinkCss,\n\tfaqListCss\n} from 'src/components/widget/components/Faq/styles';\nimport {getTaxDeductibleStatement} from 'src/components/widget/components/Footer/helpers';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useFundraiserOrUndefined} from 'src/components/widget/hooks/useFundraiser';\nimport {\n\tuseNonprofitOrError,\n\tuseParentNonprofit\n} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {ArrowIcon} from 'src/components/widget/icons/ArrowIcon';\nimport {BASE_URL, FUNDRAISER_ROUTE} from 'src/constants/url';\n\ninterface FaqItemTypes {\n\tid: string;\n\ttitle: string;\n\tdescription: VNode;\n\tmobileOnly?: boolean;\n\thideSlugList?: string[];\n}\n\nconst FaqItem: FunctionalComponent<{faqData: FaqItemTypes}> = ({faqData}) => {\n\tconst [isOpen, setOpen] = useState(false);\n\tconst {nonprofitSlug} = useConfigContext();\n\n\tif (faqData.hideSlugList?.includes(nonprofitSlug)) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tsetOpen(!isOpen);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{faqData.title}\n\t\t\t\t\n\t\t\t\n\t\t\t
    \n\t\t\t\t{faqData.description}\n\t\t\t
    \n\t\t
    \n\t);\n};\n\nexport const Faq = () => {\n\tconst nonprofit = useNonprofitOrError();\n\tconst fundraiser = useFundraiserOrUndefined();\n\tconst parentNonprofit = useParentNonprofit();\n\tconst {selectedPaymentMethod} = useWidgetContext();\n\n\tconst faqDataList: FaqItemTypes[] = [\n\t\t{\n\t\t\tid: 'intro',\n\t\t\ttitle: 'How does Every.org accept my donation?',\n\t\t\tdescription: (\n\t\t\t\t\n\t\t\t\t\t

    \n\t\t\t\t\t\tYour donation is made to Every.org, a US 501(c)(3) public charity.\n\t\t\t\t\t\tEvery.org will immediately send you a receipt by email.{' '}\n\t\t\t\t\t\t{getDisbursementDescription(nonprofit)}\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tThis process ensures your eligibility for a tax deduction, enables\n\t\t\t\t\t\tyou to consolidate your gift records, and reduces the burden on{' '}\n\t\t\t\t\t\t{getNonprofitName(nonprofit)}.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t)\n\t\t},\n\t\t{\n\t\t\tid: 'fees',\n\t\t\ttitle: 'Are there any fees?',\n\t\t\tdescription: getFeeDescription(selectedPaymentMethod, nonprofit)\n\t\t},\n\t\t{\n\t\t\tid: 'tax',\n\t\t\ttitle: 'Is this donation tax-deductible?',\n\t\t\tdescription: (\n\t\t\t\t

    \n\t\t\t\t\tYes,{' '}\n\t\t\t\t\t{getTaxDeductibleStatement(nonprofit, fundraiser, parentNonprofit)}\n\t\t\t\t

    \n\t\t\t)\n\t\t},\n\t\t{\n\t\t\tid: 'receipt',\n\t\t\ttitle: 'Will I receive a receipt for my donation?',\n\t\t\tdescription: (\n\t\t\t\t\n\t\t\t\t\t

    \n\t\t\t\t\t\tYes, after your donation payment is confirmed, you will immediately\n\t\t\t\t\t\tget a receipt emailed to you.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tAdditionally, if you have an Every.org account, you can always get a\n\t\t\t\t\t\tsingle itemized receipt that shows all your donations in a given\n\t\t\t\t\t\tyear.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t)\n\t\t},\n\t\t{\n\t\t\tid: 'p2p',\n\t\t\tmobileOnly: true,\n\t\t\thideSlugList: ['irc'],\n\t\t\ttitle: `How else can I support ${nonprofit.name}?`,\n\t\t\tdescription: (\n\t\t\t\t

    \n\t\t\t\t\tYou can also rally your friends, family, and social networks to\n\t\t\t\t\tsupport this nonprofit by starting your own fundraiser for them.{' '}\n\t\t\t\t\t\n\t\t\t\t\t\tStart a fundraiser for {nonprofit.name}\n\t\t\t\t\t\n\t\t\t\t

    \n\t\t\t)\n\t\t}\n\t];\n\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t{faqDataList.map((item) => (\n\t\t\t\t\t\n\t\t\t\t))}\n\t\t\t
    \n\t\t
    \n\t);\n};\n","import {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nexport const footerCardCss = css({\n\tpadding: `${Spacing.XL} ${Spacing.XL} 0px`,\n\tbackgroundColor: 'unset',\n\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\t...textSize.xs,\n\tcolor: COLORS.TextGray,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: `0px ${Spacing.L}`\n\t},\n\t'> p': {\n\t\tmargin: 0\n\t},\n\t'> p:not(:last-child)': {\n\t\tmarginBottom: Spacing.XS\n\t}\n});\n\nexport const footerLinkCss = css({\n\tcolor: COLORS.TextGray,\n\tfontWeight: 500,\n\ttextDecoration: 'none',\n\t':hover': {\n\t\ttextDecoration: 'underline'\n\t}\n});\n","import {FunctionComponent} from 'preact';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {getTaxDeductibleStatement} from 'src/components/widget/components/Footer/helpers';\nimport {\n\tfooterCardCss,\n\tfooterLinkCss\n} from 'src/components/widget/components/Footer/styles';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {useFundraiserOrUndefined} from 'src/components/widget/hooks/useFundraiser';\nimport {\n\tuseNonprofitOrError,\n\tuseParentNonprofit\n} from 'src/components/widget/hooks/useNonprofit';\nimport {\n\tTERMS_URL,\n\tHELP_URL,\n\tPRIVACY_URL,\n\tSUPPORT_EMAIL\n} from 'src/constants/url';\nimport {mailToLink} from 'src/helpers/mailToLink';\n\nconst FEEDBACK_URL = mailToLink({address: SUPPORT_EMAIL});\ninterface FooterLinkProps\n\textends JSXInternal.HTMLAttributes {}\nconst FooterLink: FunctionComponent = ({\n\tchildren,\n\t...rest\n}) => (\n\t\n\t\t{children}\n\t\n);\n\nexport const Footer = () => {\n\tconst nonprofit = useNonprofitOrError();\n\tconst fundraiser = useFundraiserOrUndefined();\n\tconst parentNonprofit = useParentNonprofit();\n\n\treturn (\n\t\t\n\t\t\t

    \n\t\t\t\t{getTaxDeductibleStatement(nonprofit, fundraiser, parentNonprofit)}{' '}\n\t\t\t\tSee Terms\n\t\t\t

    \n\t\t\t

    \n\t\t\t\tNeed help? See FAQs or contact us at our{' '}\n\t\t\t\tHelp Center.\n\t\t\t

    \n\t\t\t

    \n\t\t\t\tHave ideas for how we can build a better donation experience?{' '}\n\t\t\t\tSend us feedback.\n\t\t\t

    \n\t\t\t

    \n\t\t\t\tWe respect your privacy. To learn more, check out our{' '}\n\t\t\t\tPrivacy Policy.\n\t\t\t

    \n\t\t
    \n\t);\n};\n","import {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport css from 'src/helpers/css';\n\nexport const linkCss = (primaryColor: string) =>\n\tcss({\n\t\tcolor: primaryColor,\n\t\tfontWeight: 500,\n\t\ttextDecoration: 'none',\n\t\t':hover': {\n\t\t\ttextDecoration: 'underline'\n\t\t}\n\t});\n\nexport const cardCss = css({\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'block'\n\t}\n});\n","import {\n\tcardCss,\n\tlinkCss\n} from 'src/components/widget/components/FundraiserLink/styles';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {BASE_URL, FUNDRAISER_ROUTE} from 'src/constants/url';\n\nexport const FundraiserLink = () => {\n\tconst {primaryColor, nonprofitSlug} = useConfigContext();\n\tconst nonprofit = useNonprofitOrError();\n\n\tif (nonprofit.metadata?.hideFundraiseButton) {\n\t\treturn null;\n\t}\n\n\tconst href = BASE_URL + nonprofitSlug + '/' + FUNDRAISER_ROUTE;\n\n\treturn (\n\t\t\n\t\t\t

    \n\t\t\t\t\n\t\t\t\t\tStart a fundraiser\n\t\t\t\t{' '}\n\t\t\t\tto rally your friends and family\n\t\t\t

    \n\t\t
    \n\t);\n};\n","import {FunctionalComponent} from 'preact';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nconst gridCss = css({\n\tdisplay: 'grid',\n\tgridGap: 0,\n\tgridTemplateColumns: '1fr',\n\tgridTemplateAreas: `\"header\"\n \"promoBanners\"\n \"nonprofitInfo\"\n \"paymentProcess\"\n \"fundraiserLink\"\n \"faq\"\n \"footer\"`,\n\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tgridColumnGap: Spacing.XL,\n\t\tgridTemplateColumns: '1fr 2fr',\n\t\tgridTemplateRows: 'auto auto auto auto auto 1fr',\n\t\tgridTemplateAreas: `\"header header\"\n \"promoBanners promoBanners\"\n \"nonprofitInfo paymentProcess\"\n \"fundraiserLink paymentProcess\"\n \"faq paymentProcess\"\n \"faq footer\"`,\n\t\t'& > div:not(:last-child):not(:empty)': {\n\t\t\tmarginBottom: Spacing.XL\n\t\t}\n\t},\n\n\t'& > #every-header': {\n\t\tgridArea: 'header',\n\t\tdisplay: 'block',\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tdisplay: 'none'\n\t\t}\n\t},\n\t'& > #every-promoBanners': {gridArea: 'promoBanners'},\n\t'& > #every-nonprofitInfo': {gridArea: 'nonprofitInfo'},\n\t'& > #every-paymentProcess': {gridArea: 'paymentProcess'},\n\t'& > #every-faq': {gridArea: 'faq'},\n\t'& > #every-fundraiserLink': {gridArea: 'fundraiserLink'},\n\t'& > #every-footer': {gridArea: 'footer'}\n});\n\nexport const Grid: FunctionalComponent = ({children}) => {\n\treturn
    {children}
    ;\n};\n","import {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {FontFamily} from 'src/components/widget/theme/font-family';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nexport const buttonCss = css({\n\tcursor: 'pointer',\n\tdisplay: 'inline-flex',\n\talignItems: 'center',\n\tjustifyContent: 'center',\n\tpadding: 0,\n\tborder: 'none',\n\tbackgroundColor: 'transparent',\n\tfontFamily: FontFamily.BasisGrotesque\n});\n\nexport const smallScreenCloseButtonCss = css({\n\tdisplay: 'block',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'none'\n\t}\n});\n\nexport const largeScreenCloseButtonCss = css({\n\tposition: 'absolute',\n\tright: Spacing.XL,\n\ttop: Spacing.XL,\n\n\tpadding: Spacing.XXS,\n\tbackground: 'white',\n\tborderRadius: '8px',\n\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'block'\n\t}\n});\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const CloseIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {buttonCss} from 'src/components/widget/components/Header/CloseButton/styles';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {CloseIcon} from 'src/components/widget/icons/CloseIcon';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const CloseButton = ({className}: {className?: string}) => {\n\tconst {hideWidget} = useWidgetContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nexport const containerCss = css({\n\tdisplay: 'flex',\n\tjustifyContent: 'flex-end',\n\talignItems: 'center',\n\tpadding: `${Spacing.M} ${Spacing.XL}`,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: 0\n\t}\n});\n","import {CloseButton} from 'src/components/widget/components/Header/CloseButton';\nimport {smallScreenCloseButtonCss} from 'src/components/widget/components/Header/CloseButton/styles';\nimport {containerCss} from 'src/components/widget/components/Header/styles';\n\nexport const Header = () => {\n\treturn (\n\t\t
    \n\t\t\t\n\t\t
    \n\t);\n};\n","export enum Radii {\n\tSmall = '4px',\n\tDefault = '8px',\n\tMedium = '24px',\n\tBig = '100px',\n\tCircle = '100%'\n}\n","import {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {\n\thorizontalStackCss,\n\tSpacing,\n\tverticalStackCss\n} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const nonprofitNameCss = css({\n\tlineHeight: '20px',\n\tfontWeight: 'unset',\n\t'> span': {\n\t\tfontWeight: 700\n\t}\n});\n\nexport const fundraiserNameCss = css({\n\tlineHeight: '20px',\n\tfontWeight: 'unset',\n\t'> span': {\n\t\tfontWeight: 700\n\t}\n});\n\nexport const logoImageCss = (logoUrl: string) =>\n\tcss({\n\t\tborderRadius: Radii.Circle,\n\t\toverflow: 'hidden',\n\t\tdisplay: 'block',\n\t\tbackgroundImage: `url(${logoUrl})`,\n\t\tbackgroundSize: 'contain',\n\t\tbackgroundRepeat: 'no-repeat',\n\t\tbackgroundPosition: 'center',\n\t\twidth: '40px',\n\t\theight: '40px',\n\t\tflexShrink: 0,\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\twidth: '64px',\n\t\t\theight: '64px'\n\t\t}\n\t});\n\nexport const fundraiserCardLogoCss = (logoUrl: string) =>\n\tjoinClassNames([\n\t\tlogoImageCss(logoUrl),\n\t\tcss({\n\t\t\twidth: '32px',\n\t\t\theight: '32px',\n\t\t\tflexShrink: 0,\n\t\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\t\twidth: '40px',\n\t\t\t\theight: '40px'\n\t\t\t}\n\t\t})\n\t]);\n\nexport const nonprofitCardCss = css({\n\tpadding: `${Spacing.XL}`,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t...verticalStackCss.css(Spacing.S),\n\t\tpadding: `${Spacing.L}`\n\t}\n});\n\nexport const largeFundraiserCardCss = css({\n\tdisplay: 'none',\n\toverflow: 'hidden',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'flex',\n\t\tgap: `${Spacing.S}`,\n\t\tflexDirection: 'column',\n\t\tpadding: `${Spacing.L}`\n\t}\n});\n\nexport const smallFundraiserCardCss = css({\n\tdisplay: 'flex',\n\tgap: `${Spacing.S}`,\n\tpadding: `${Spacing.XL}`,\n\toverflow: 'hidden',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'none',\n\t\tflexDirection: 'column',\n\t\tpadding: `${Spacing.L}`\n\t}\n});\n\nexport const avatarAndNameWrapperCss = css({\n\t...horizontalStackCss.css(Spacing.S),\n\talignItems: 'center'\n});\n\nexport const fundraiserAvatarAndNameWrapperCss = css({\n\tdisplay: 'flex',\n\tgap: `${Spacing.S}`,\n\talignItems: 'center',\n\n\t'& > .every-embedded-fundraiser-card__nonprofit-name': {\n\t\tdisplay: 'none',\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tdisplay: 'block'\n\t\t}\n\t}\n});\n\nexport const descriptionCss = css({\n\t...textSize.xs,\n\tcolor: 'rgba(0, 0, 0, 0.7)',\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'block'\n\t}\n});\n\nexport const truncatedTextCss = (numberLines: number) =>\n\tcss({\n\t\toverflow: 'hidden',\n\t\toverflowWrap: 'anywhere',\n\t\twordBreak: 'break-word',\n\t\ttextOverflow: 'ellipsis',\n\t\tdisplay: '-webkit-box',\n\t\t'-webkit-box-orient': 'vertical',\n\t\t'-webkit-line-clamp': numberLines,\n\t\talignItems: 'start'\n\t});\n","export const COVER_IMAGE_PLACEHOLDER_ID = 'profile_picture_placeholder_o56tme';\nexport const LOGO_IMAGE_PLACEHOLDER_ID = 'NonprofitAvatarPlaceholder';\n","import {BASE_CLOUDINARY_URL} from 'src/constants/url';\n\ninterface CloudinaryOptions {\n\twidth?: number;\n\theight?: number;\n\tfillMode?: 'fill' | 'lfill';\n}\n\nconst FLAGS = 'f_auto,q_auto';\n\nexport function fillDimensionsTransform(options: CloudinaryOptions) {\n\tif (options.width === 0 || options.height === 0) {\n\t\tthrow new Error('dimensions cannot be 0');\n\t}\n\n\treturn [\n\t\t`c_${options.fillMode ?? 'lfill'}`,\n\t\toptions.width ? `w_${Math.floor(options.width)}` : undefined,\n\t\toptions.height ? `h_${Math.floor(options.height)}` : undefined\n\t]\n\t\t.filter((value?: string) => value !== undefined)\n\t\t.join(',');\n}\n\nexport const getCloudinaryUrl = (\n\tcloudinaryId: string,\n\toptions?: CloudinaryOptions\n) => {\n\treturn `${BASE_CLOUDINARY_URL}${FLAGS}${\n\t\toptions ? `,${fillDimensionsTransform(options)}` : ''\n\t}/${cloudinaryId}`;\n};\n","import {Fragment} from 'preact/jsx-runtime';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {\n\tnonprofitNameCss,\n\tdescriptionCss,\n\ttruncatedTextCss,\n\tfundraiserCardLogoCss,\n\tfundraiserAvatarAndNameWrapperCss,\n\tlargeFundraiserCardCss,\n\tsmallFundraiserCardCss\n} from 'src/components/widget/components/NonprofitInfo/styles';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {Fundraiser} from 'src/components/widget/types/Fundraiser';\nimport {LOGO_IMAGE_PLACEHOLDER_ID} from 'src/constants/placeholders';\nimport css from 'src/helpers/css';\nimport {getCloudinaryUrl} from 'src/helpers/getCloudinaryUrl';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nconst coverImageCss = (url: string) =>\n\tcss({\n\t\tbackgroundImage: `url(${url})`,\n\t\tbackgroundSize: 'cover',\n\t\twidth: 'calc(100% + 25px + 25px)',\n\t\theight: '160px',\n\t\tposition: 'relative',\n\t\tleft: '-25px'\n\t});\n\ninterface FundraiserCardProps {\n\tfundraiser: Fundraiser;\n}\n\nexport const FundraiserCard = ({fundraiser}: FundraiserCardProps) => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n\nconst LargeFundraiserCard = ({fundraiser}: FundraiserCardProps) => {\n\tconst {\n\t\tname: nonprofitName,\n\t\tlogoCloudinaryId,\n\t\tcoverImageCloudinaryId,\n\t\thasAdmin\n\t} = useNonprofitOrError();\n\tconst logoUrl = getCloudinaryUrl(\n\t\tlogoCloudinaryId ?? LOGO_IMAGE_PLACEHOLDER_ID\n\t);\n\tconst coverImageUrl =\n\t\tcoverImageCloudinaryId &&\n\t\tgetCloudinaryUrl(coverImageCloudinaryId, {width: 320});\n\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t

    {nonprofitName}

    \n\t\t\t\t\t{fundraiser.creatorNonprofitId === fundraiser.nonprofitId && (\n\t\t\t\t\t\t

    Official fundraiser

    \n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t
    \n\t\t\t{coverImageUrl &&
    }\n\t\t\t

    \n\t\t\t\t{fundraiser.title}\n\t\t\t

    \n\t\t\t{fundraiser.description && (\n\t\t\t\t

    \n\t\t\t\t\t{fundraiser.description}\n\t\t\t\t

    \n\t\t\t)}\n\t\t\n\t);\n};\n\nconst SmallFundraiserCard = ({fundraiser}: FundraiserCardProps) => {\n\tconst {\n\t\tname: nonprofitName,\n\t\tlogoCloudinaryId,\n\t\tcoverImageCloudinaryId,\n\t\thasAdmin\n\t} = useNonprofitOrError();\n\tconst logoUrl = getCloudinaryUrl(\n\t\tlogoCloudinaryId ?? LOGO_IMAGE_PLACEHOLDER_ID\n\t);\n\tconst coverImageUrl =\n\t\tcoverImageCloudinaryId && getCloudinaryUrl(coverImageCloudinaryId);\n\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{fundraiser.title}\n\t\t\t\t

    \n\t\t\t
    \n\t\t\n\t);\n};\n","import {Fragment} from 'preact/jsx-runtime';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {\n\tlogoImageCss,\n\tnonprofitNameCss,\n\tdescriptionCss,\n\tavatarAndNameWrapperCss,\n\tnonprofitCardCss\n} from 'src/components/widget/components/NonprofitInfo/styles';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {LOGO_IMAGE_PLACEHOLDER_ID} from 'src/constants/placeholders';\nimport {getCloudinaryUrl} from 'src/helpers/getCloudinaryUrl';\n\nexport const NonprofitCard = () => {\n\tconst {name, logoCloudinaryId, hasAdmin} = useNonprofitOrError();\n\tconst logoUrl = getCloudinaryUrl(\n\t\tlogoCloudinaryId ?? LOGO_IMAGE_PLACEHOLDER_ID\n\t);\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{hasAdmin ? (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{name} is using Every.org to accept this donation\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tEvery.org created this page for {name}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t

    \n\t\t\t
    \n\t\t\t

    \n\t\t\t\tEvery.org is a 501(c)(3) nonprofit inspiring generosity and philanthropy\n\t\t\t\tfor everyone.\n\t\t\t

    \n\t\t\n\t);\n};\n","import {FundraiserCard} from 'src/components/widget/components/NonprofitInfo/FundraiserCard';\nimport {NonprofitCard} from 'src/components/widget/components/NonprofitInfo/NonprofitCard';\nimport {useFundraiserOrUndefined} from 'src/components/widget/hooks/useFundraiser';\n\nexport const NonprofitInfo = () => {\n\tconst fundraiser = useFundraiserOrUndefined();\n\n\tif (fundraiser) {\n\t\treturn ;\n\t}\n\n\treturn ;\n};\n","import {CloseIcon} from 'src/components/widget/icons/CloseIcon';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nconst errorMessageCss = css({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tgap: Spacing.XXS,\n\tcolor: 'rgba(196, 83, 48, 1)',\n\t'& > svg > path': {\n\t\tstroke: 'rgba(196, 83, 48, 1)'\n\t}\n});\n\nexport const ErrorMessage = ({message}: {message?: string | null}) => {\n\tif (!message) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t{message}\n\t\t
    \n\t);\n};\n","export enum Borders {\n\tNormal = '1px solid',\n\tBig = '4px solid'\n}\n\nexport const getColoredBorder = (border: Borders, color: string) =>\n\t`${border} ${color}`;\n","import {getColoredBorder, Borders} from 'src/components/widget/theme/borders';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nexport const textInputContainerErrorCss = css({\n\tborder: getColoredBorder(Borders.Normal, COLORS.Error)\n});\n\nexport const textInputContainerCss = (color: string, error?: boolean) =>\n\tcss({\n\t\tposition: 'relative',\n\t\tpadding: Spacing.M,\n\t\tdisplay: 'flex',\n\t\tflexDirection: 'row',\n\t\talignItems: 'center',\n\t\tborderRadius: Radii.Default,\n\t\tcolor: COLORS.Text,\n\t\tbackgroundColor: COLORS.Gray,\n\t\tborder: getColoredBorder(\n\t\t\tBorders.Normal,\n\t\t\terror ? COLORS.Error : COLORS.LightGray\n\t\t),\n\t\tcursor: 'text',\n\t\t':focus-within': {\n\t\t\tbackgroundColor: 'white',\n\t\t\tborderColor: error ? COLORS.Error : color\n\t\t}\n\t});\n\nexport const textInputCss = css({\n\tfontSize: textSize.s.fontSize,\n\tlineHeight: textSize.s.fontSize,\n\tfontFamily: 'inherit',\n\tflex: 1,\n\tborder: 'none',\n\toutline: 'none',\n\tbackground: 'transparent',\n\twidth: '100%',\n\tminWidth: 'unset',\n\tpadding: 0,\n\tmargin: 0,\n\tcolor: COLORS.Text,\n\t'::placeholder': {\n\t\tfontWeight: 400\n\t},\n\t'::-webkit-outer-spin-button': {\n\t\t'-webkit-appearance': 'none',\n\t\tmargin: 0\n\t},\n\t'::-webkit-inner-spin-button': {\n\t\t'-webkit-appearance': 'none',\n\t\tmargin: 0\n\t},\n\t'-moz-appearance': 'textfield'\n});\n","import {rotateCss} from 'src/components/widget/components/Faq/styles';\nimport {textInputContainerCss} from 'src/components/widget/components/TextInput/styles';\nimport {getColoredBorder, Borders} from 'src/components/widget/theme/borders';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {bodyText, textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const cryptoSelectorContainerCss = css({\n\tmaxHeight: '250px',\n\t'& input': {\n\t\tfontSize: textSize.s.fontSize,\n\t\tlineHeight: textSize.s.fontSize,\n\t\tfontWeight: 400\n\t}\n});\n\nexport const cryptoSelectorDropDownContainerCss = css({\n\tbackground: COLORS.White,\n\tborderRadius: `0 0 ${Radii.Default} ${Radii.Default}`,\n\tborder: getColoredBorder(Borders.Normal, COLORS.LightGray),\n\tborderTop: 'none'\n});\n\nexport const cryptoSelectorInputContainerCss = css({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tgap: Spacing.XXS\n});\n\nexport const cryptoSelectorDropDownContentCss = css({\n\toverflowY: 'scroll',\n\theight: '100%',\n\tmaxHeight: '200px'\n});\n\nexport const quickSelectOptionsListCss = css({\n\tborderBottom: getColoredBorder(Borders.Normal, COLORS.LightGray)\n});\n\nexport const cryptoSelectorDropDownItemCss = css({\n\tborder: 'none',\n\tbackground: 'none',\n\n\tpadding: `${Spacing.S} ${Spacing.M}`,\n\t...textSize.s,\n\twidth: '100%',\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tgap: Spacing.XS,\n\t':hover': {\n\t\tcursor: 'pointer'\n\t},\n\n\t'> span:last-of-type': {\n\t\tmarginLeft: 'auto',\n\t\t...textSize.xs,\n\t\tcolor: COLORS.TextGray\n\t}\n});\n\nexport const cryptoSelectorInputSufixCss = (\n\tprimaryColor: string,\n\tshowDropDown: boolean\n) =>\n\tcss({\n\t\tmarginLeft: 'auto',\n\t\t...textSize.xs,\n\t\tcolor: COLORS.TextGray,\n\t\tdisplay: 'flex',\n\t\tgap: Spacing.XS,\n\t\talignItems: 'center',\n\t\t'> svg': {\n\t\t\tcolor: primaryColor,\n\t\t\t...(showDropDown ? rotateCss : {})\n\t\t}\n\t});\n\nexport const inputContainerWithDropDownCss = css({\n\tborderRadius: `${Radii.Default} ${Radii.Default} 0 0 `\n});\n\nexport const cryptoAmountInputContainerCss = (primaryColor: string) =>\n\tjoinClassNames([textInputContainerCss(primaryColor)]);\n\nexport const cryptoAmountInputColumns = css({\n\tdisplay: 'flex',\n\twidth: '100%',\n\tgap: Spacing.S,\n\talignItems: 'flex-end',\n\tfontWeight: 500\n});\n\nexport const cryptoAmountInputFirstColumn = css({\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\twidth: '100%',\n\tgap: Spacing.XXS,\n\t'> input': {\n\t\twidth: '100%',\n\t\ttextAlign: 'right',\n\t\tfontWeight: 700,\n\t\t...textSize.l\n\t},\n\ttextAlign: 'right'\n});\n\nexport const cryptoAmountInputSecondColumn = css({\n\tgap: Spacing.XXS,\n\tdisplay: 'flex',\n\tflexDirection: 'column'\n});\n\nexport const changeModeButtonCss = css({\n\t...bodyText,\n\toutline: 'none',\n\tborder: 'none',\n\tfontFamily: 'inherit',\n\tcursor: 'pointer',\n\tpadding: Spacing.XXS,\n\ttransform: 'rotate(90deg)',\n\tcolor: COLORS.TextGray,\n\t'> svg': {\n\t\tstrokeWidth: '2px'\n\t}\n});\n","import {getColoredBorder, Borders} from 'src/components/widget/theme/borders';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {horizontalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nexport const donationAmountInputContainerErrorCss = css({\n\tborder: getColoredBorder(Borders.Normal, COLORS.Error)\n});\n\nexport const donationAmountInputCss = css({\n\tfontSize: textSize.l.fontSize,\n\tlineHeight: textSize.l.fontSize,\n\tfontWeight: 700\n});\n\nexport const donationAmountInputPrefixCss = css({\n\t...textSize.l,\n\tfontWeight: 700,\n\tdisplay: 'inline-flex',\n\tmarginRight: Spacing.XXS\n});\n\nexport const donationAmountInputSufixCss = (primaryColor: string) =>\n\tcss({\n\t\t...textSize.m,\n\t\tfontWeight: 700,\n\t\tcolor: primaryColor,\n\t\tdisplay: 'inline-flex',\n\t\tmarginLeft: Spacing.XXS\n\t});\n\nexport const donationAmountAddAmountContainerCss = css({\n\t...horizontalStackCss.css(Spacing.M),\n\tjustifyContent: 'center'\n});\n\nexport const donationAmountAddAmountButtonCss = (primaryColor: string) =>\n\tcss({\n\t\t...textSize.s,\n\t\tcolor: primaryColor,\n\t\tborderRadius: Radii.Big,\n\t\tfontWeight: 500,\n\t\tborder: `none`,\n\t\tpadding: 0,\n\t\tfontFamily: 'inherit',\n\t\tcursor: 'pointer',\n\t\tbackground: 'unset',\n\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tborder: `1px solid ${COLORS.DarkGray}`,\n\t\t\tpadding: `${Spacing.XS} ${Spacing.L}`\n\t\t}\n\t});\n","import {forwardRef} from 'preact/compat';\nimport {useRef, MutableRef} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {\n\ttextInputContainerCss,\n\ttextInputCss\n} from 'src/components/widget/components/TextInput/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface TextAreaProps\n\textends JSXInternal.HTMLAttributes {\n\tcontainerClassName?: string;\n\tinputClassName?: string;\n\tcontainerOnClick?: () => void;\n}\n\nconst TextArea = forwardRef(\n\t(props, ref) => {\n\t\tconst inputRef = useRef();\n\t\tconst {primaryColor} = useConfigContext();\n\n\t\tconst {containerClassName, inputClassName, containerOnClick, ...rest} =\n\t\t\tprops;\n\n\t\treturn (\n\t\t\t {\n\t\t\t\t\tinputRef.current?.focus();\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t {\n\t\t\t\t\t\tif (element) {\n\t\t\t\t\t\t\tinputRef.current = element;\n\t\t\t\t\t\t\tif (ref) {\n\t\t\t\t\t\t\t\t(ref as MutableRef).current = element;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tclassName={joinClassNames([textInputCss, inputClassName])}\n\t\t\t\t\t{...rest}\n\t\t\t\t/>\n\t\t\t
    \n\t\t);\n\t}\n);\n\nexport default TextArea;\n","import {ComponentChild} from 'preact';\nimport {forwardRef, useRef} from 'preact/compat';\nimport {MutableRef} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {donationAmountInputContainerErrorCss} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {\n\ttextInputContainerCss,\n\ttextInputCss\n} from 'src/components/widget/components/TextInput/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface TextInputProps\n\textends Omit<\n\t\tJSXInternal.HTMLAttributes,\n\t\t'sufix' | 'prefix'\n\t> {\n\tsufix?: ComponentChild;\n\tsufixClassName?: string;\n\tprefix?: ComponentChild;\n\tprefixClassName?: string;\n\tcontainerClassName?: string;\n\tinputClassName?: string;\n\tcontainerOnClick?: () => void;\n\terror?: string;\n}\n\nconst TextInput = forwardRef((props, ref) => {\n\tconst {\n\t\tsufix,\n\t\tsufixClassName,\n\t\tprefix,\n\t\tprefixClassName,\n\t\tcontainerClassName,\n\t\tinputClassName,\n\t\tcontainerOnClick,\n\t\terror,\n\t\t...rest\n\t} = props;\n\tconst inputRef = useRef();\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t {\n\t\t\t\tif (containerOnClick) {\n\t\t\t\t\tcontainerOnClick();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tinputRef.current?.focus();\n\t\t\t}}\n\t\t>\n\t\t\t{prefix &&
    {prefix}
    }\n\t\t\t {\n\t\t\t\t\tif (element) {\n\t\t\t\t\t\tinputRef.current = element;\n\t\t\t\t\t\tif (ref) {\n\t\t\t\t\t\t\t(ref as MutableRef).current = element;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tclassName={joinClassNames([textInputCss, inputClassName])}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t\t{sufix &&
    {sufix}
    }\n\t\t
    \n\t);\n});\n\nexport default TextInput;\n","export default __webpack_public_path__ + \"58f20393bf2b41f944c6229c2af785b9.svg\";","export default __webpack_public_path__ + \"5982461fe2304c26f3a3cf4c50806dad.svg\";","export default __webpack_public_path__ + \"b31a89ce5555412a0c8a4c6463286584.svg\";","export default __webpack_public_path__ + \"26c9b1d3d7943e6e67cf13e039ba5ac8.svg\";","export default __webpack_public_path__ + \"ddb1f3b63e33585263e5905706d6ff6d.svg\";","export default __webpack_public_path__ + \"ad80427b5a2980f1d19884ede42b29de.svg\";","export default __webpack_public_path__ + \"9052c75387065f76bb3436b7e4ce12cd.svg\";","export default __webpack_public_path__ + \"3a5177b76709819ba4663556e60222f8.svg\";","export default __webpack_public_path__ + \"f8f4253f02d1fbc4bf04d0959a6e614c.svg\";","export default __webpack_public_path__ + \"4d81ee51fa2520df58ae092aeb3d0bd4.svg\";","export default __webpack_public_path__ + \"8098252f28e93069c75d6010d3ac6bc1.svg\";","export default __webpack_public_path__ + \"03c114f6e014588a4bde815d9bc85821.svg\";","export default __webpack_public_path__ + \"5450d3cada4fd0370ab8d885765f5cc3.svg\";","export default __webpack_public_path__ + \"cc9ce389e9a4e0f518e3caeb7b60912d.svg\";","export default __webpack_public_path__ + \"8f22b294629293d29895fddef0a8baea.svg\";","export default __webpack_public_path__ + \"f588feb3cbbcc0fb259a3630ec7e34ba.svg\";","export default __webpack_public_path__ + \"3e1eb932bdbaa2318584813bf468be53.svg\";","export default __webpack_public_path__ + \"badb98080214485db486794fb59a95cc.svg\";","export default __webpack_public_path__ + \"fc9295a4651c56d5b4e8c3aa13a93208.svg\";","export default __webpack_public_path__ + \"e4bfa8eb04696d4fd5ea04ca4c35469b.svg\";","export default __webpack_public_path__ + \"743324f8e09d34a894c21e91c396f289.svg\";","export default __webpack_public_path__ + \"b9021bb757262a32de6d8931015051d9.svg\";","export default __webpack_public_path__ + \"7ab9396038b4befda4354b2a476d9064.svg\";","export default __webpack_public_path__ + \"bc2c9e9d67b73656a6da5dd177aa10a2.svg\";","export default __webpack_public_path__ + \"6214ae0b42d798a0c9a51503a27a66bf.svg\";","export default __webpack_public_path__ + \"45bcde5a98dbbdf2a4e0769eca2154f1.svg\";","export default __webpack_public_path__ + \"8798fcc6fd2d5d3aeccea6ee3fcfec89.svg\";","export default __webpack_public_path__ + \"88611c6e2f9450f29ece8d2b36641670.svg\";","import algorand from 'src/components/widget/icons/CryptoCurrencyIcon/algorand.svg';\nimport apecoin from 'src/components/widget/icons/CryptoCurrencyIcon/apecoin.svg';\nimport avalanche from 'src/components/widget/icons/CryptoCurrencyIcon/avalanche.svg';\nimport basic_attention_token from 'src/components/widget/icons/CryptoCurrencyIcon/basic-attention-token.svg';\nimport binance from 'src/components/widget/icons/CryptoCurrencyIcon/binance.svg';\nimport bitcoincash from 'src/components/widget/icons/CryptoCurrencyIcon/bitcoin-cash.svg';\nimport bitcoin from 'src/components/widget/icons/CryptoCurrencyIcon/bitcoin.svg';\nimport chainlink from 'src/components/widget/icons/CryptoCurrencyIcon/chainlink.svg';\nimport dai from 'src/components/widget/icons/CryptoCurrencyIcon/dai.svg';\nimport dogecoin from 'src/components/widget/icons/CryptoCurrencyIcon/dogecoin.svg';\nimport ethereum from 'src/components/widget/icons/CryptoCurrencyIcon/ethereum.svg';\nimport filecoin from 'src/components/widget/icons/CryptoCurrencyIcon/filecoin.svg';\nimport graph from 'src/components/widget/icons/CryptoCurrencyIcon/graph.svg';\nimport litecoin from 'src/components/widget/icons/CryptoCurrencyIcon/litecoin.svg';\nimport mobilecoin from 'src/components/widget/icons/CryptoCurrencyIcon/mobilecoin.svg';\nimport polkadot from 'src/components/widget/icons/CryptoCurrencyIcon/polkadot.svg';\nimport polygon from 'src/components/widget/icons/CryptoCurrencyIcon/polygon.svg';\nimport raydium from 'src/components/widget/icons/CryptoCurrencyIcon/raydium.svg';\nimport saber from 'src/components/widget/icons/CryptoCurrencyIcon/saber.svg';\nimport samoyed from 'src/components/widget/icons/CryptoCurrencyIcon/samoyed.svg';\nimport shiba_inu from 'src/components/widget/icons/CryptoCurrencyIcon/shiba-inu.svg';\nimport solana from 'src/components/widget/icons/CryptoCurrencyIcon/solana.svg';\nimport stellar from 'src/components/widget/icons/CryptoCurrencyIcon/stellar.svg';\nimport tether from 'src/components/widget/icons/CryptoCurrencyIcon/tether.svg';\nimport tezos from 'src/components/widget/icons/CryptoCurrencyIcon/tezos.svg';\nimport uniswap from 'src/components/widget/icons/CryptoCurrencyIcon/uniswap.svg';\nimport usdcoin from 'src/components/widget/icons/CryptoCurrencyIcon/usd-coin.svg';\nimport zcash from 'src/components/widget/icons/CryptoCurrencyIcon/zcash.svg';\n\nexport enum CryptoCurrency {\n\tAAVE = 'AAVE',\n\tALCX = 'ALCX',\n\tALGO = 'ALGO',\n\tAMP = 'AMP',\n\tANKR = 'ANKR',\n\tAPE = 'APE',\n\tAPI3 = 'API3',\n\tAUDIO = 'AUDIO',\n\tAVAX = 'AVAX',\n\tAXS = 'AXS',\n\tBAT = 'BAT',\n\tBCH = 'BCH',\n\tBNB = 'BNB',\n\tBNT = 'BNT',\n\tBOND = 'BOND',\n\tBTC = 'BTC',\n\tCHZ = 'CHZ',\n\tCOMP = 'COMP',\n\tCRV = 'CRV',\n\tCUBE = 'CUBE',\n\tCVC = 'CVC',\n\tDAI = 'DAI',\n\tDOGE = 'DOGE',\n\tDOT = 'DOT',\n\tELON = 'ELON',\n\tENS = 'ENS',\n\tETH = 'ETH',\n\tFET = 'FET',\n\tFIL = 'FIL',\n\tFTM = 'FTM',\n\tGAL = 'GAL',\n\tGALA = 'GALA',\n\tGMT = 'GMT',\n\tGRT = 'GRT',\n\tGUSD = 'GUSD',\n\tINJ = 'INJ',\n\tJAM = 'JAM',\n\tKNC = 'KNC',\n\tKP3R = 'KP3R',\n\tLDO = 'LDO',\n\tLINK = 'LINK',\n\tLPT = 'LPT',\n\tLRC = 'LRC',\n\tLTC = 'LTC',\n\tMANA = 'MANA',\n\tMASK = 'MASK',\n\tMATIC = 'MATIC',\n\tMCO2 = 'MCO2',\n\tMKR = 'MKR',\n\tMOB = 'MOB',\n\tNMR = 'NMR',\n\tOXT = 'OXT',\n\tPAXG = 'PAXG',\n\tQNT = 'QNT',\n\tQRDO = 'QRDO',\n\tRAY = 'RAY',\n\tREN = 'REN',\n\tRNDR = 'RNDR',\n\tSAMO = 'SAMO',\n\tSAND = 'SAND',\n\tSBR = 'SBR',\n\tSHIB = 'SHIB',\n\tSKL = 'SKL',\n\tSLP = 'SLP',\n\tSNX = 'SNX',\n\tSOL = 'SOL',\n\tSTORJ = 'STORJ',\n\tSUSHI = 'SUSHI',\n\tUMA = 'UMA',\n\tUNI = 'UNI',\n\tUSDC = 'USDC',\n\tUSDT = 'USDT',\n\tXLM = 'XLM',\n\tXRP = 'XRP',\n\tXTZ = 'XTZ',\n\tYFI = 'YFI',\n\tZBC = 'ZBC',\n\tZEC = 'ZEC',\n\tZRX = 'ZRX'\n}\n\nexport enum ContractType {\n\tERC20 = 'ERC-20',\n\tSPL = 'SPL'\n}\n\nexport interface SharedCryptoCurrencyConfig {\n\tdisplayName: string;\n\tabbreviation: string;\n\tdecimalOffset: number;\n\tcontractType?: ContractType;\n\tcoingeckoId: string;\n}\n\nexport const DISABLED_TOKENS = [\n\tCryptoCurrency.ALGO,\n\tCryptoCurrency.MOB,\n\tCryptoCurrency.XLM,\n\tCryptoCurrency.BNB\n];\n\nexport const SharedCryptoCurrencyConfig: {\n\t[key in CryptoCurrency]: SharedCryptoCurrencyConfig;\n} = {\n\t[CryptoCurrency.AAVE]: {\n\t\tdisplayName: 'Aave',\n\t\tabbreviation: 'AAVE',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'aave'\n\t},\n\t[CryptoCurrency.ALCX]: {\n\t\tdisplayName: 'Alchemix',\n\t\tabbreviation: 'ALCX',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'alchemix'\n\t},\n\t[CryptoCurrency.ALGO]: {\n\t\tdisplayName: 'Algorand',\n\t\tabbreviation: 'ALGO',\n\t\tdecimalOffset: 6,\n\t\tcoingeckoId: 'algorand'\n\t},\n\t[CryptoCurrency.AMP]: {\n\t\tdisplayName: 'Amp',\n\t\tabbreviation: 'AMP',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'amp-token'\n\t},\n\t[CryptoCurrency.ANKR]: {\n\t\tdisplayName: 'Ankr',\n\t\tabbreviation: 'ANKR',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'ankr'\n\t},\n\t[CryptoCurrency.APE]: {\n\t\tdisplayName: 'Apecoin',\n\t\tabbreviation: 'APE',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'apecoin'\n\t},\n\t[CryptoCurrency.API3]: {\n\t\tdisplayName: 'API3',\n\t\tabbreviation: 'API3',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'api3'\n\t},\n\t[CryptoCurrency.AUDIO]: {\n\t\tdisplayName: 'Audius',\n\t\tabbreviation: 'AUDIO',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'audius'\n\t},\n\t[CryptoCurrency.AVAX]: {\n\t\tdisplayName: 'Avalanche',\n\t\tabbreviation: 'AVAX',\n\t\tdecimalOffset: 9,\n\t\tcoingeckoId: 'avalanche-2'\n\t},\n\t[CryptoCurrency.AXS]: {\n\t\tdisplayName: 'Axie Infinity',\n\t\tabbreviation: 'AXS',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'axs'\n\t},\n\t[CryptoCurrency.BAT]: {\n\t\tdisplayName: 'Basic Attention Token',\n\t\tabbreviation: 'BAT',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'basic-attention-token'\n\t},\n\t[CryptoCurrency.BCH]: {\n\t\tdisplayName: 'Bitcoin Cash',\n\t\tabbreviation: 'BCH',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'bitcoin-cash'\n\t},\n\t[CryptoCurrency.BNB]: {\n\t\tdisplayName: 'Binance Coin',\n\t\tabbreviation: 'BNB',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'binancecoin'\n\t},\n\t[CryptoCurrency.BNT]: {\n\t\tdisplayName: 'Bancor',\n\t\tabbreviation: 'BNT',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'bancor'\n\t},\n\t[CryptoCurrency.BOND]: {\n\t\tdisplayName: 'BarnBridge',\n\t\tabbreviation: 'BOND',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'barnbridge'\n\t},\n\t[CryptoCurrency.BTC]: {\n\t\tdisplayName: 'Bitcoin',\n\t\tabbreviation: 'BTC',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'bitcoin'\n\t},\n\t[CryptoCurrency.CHZ]: {\n\t\tdisplayName: 'Chiliz',\n\t\tabbreviation: 'CHZ',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'chiliz'\n\t},\n\t[CryptoCurrency.COMP]: {\n\t\tdisplayName: 'Compound',\n\t\tabbreviation: 'COMP',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'compound-governance-token'\n\t},\n\t[CryptoCurrency.CRV]: {\n\t\tdisplayName: 'Curve DAO Token',\n\t\tabbreviation: 'CRV',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'curve-dao-token'\n\t},\n\t[CryptoCurrency.CUBE]: {\n\t\tdisplayName: 'Cube',\n\t\tabbreviation: 'CUBE',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'somnium-space-cubes'\n\t},\n\t[CryptoCurrency.CVC]: {\n\t\tdisplayName: 'Civic',\n\t\tabbreviation: 'CVC',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'civic'\n\t},\n\t[CryptoCurrency.DAI]: {\n\t\tdisplayName: 'Dai',\n\t\tabbreviation: 'DAI',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'dai'\n\t},\n\t[CryptoCurrency.DOGE]: {\n\t\tdisplayName: 'DogeCoin',\n\t\tabbreviation: 'DOGE',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'dogecoin'\n\t},\n\t[CryptoCurrency.DOT]: {\n\t\tdisplayName: 'Polkadot',\n\t\tabbreviation: 'DOT',\n\t\tdecimalOffset: 10,\n\t\tcoingeckoId: 'polkadot'\n\t},\n\t[CryptoCurrency.ELON]: {\n\t\tdisplayName: 'Dogelon Mars',\n\t\tabbreviation: 'ELON',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'dogelon-mars'\n\t},\n\t[CryptoCurrency.ENS]: {\n\t\tdisplayName: 'Ethereum Name Service',\n\t\tabbreviation: 'ENS',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'ethereum-name-service'\n\t},\n\t[CryptoCurrency.ETH]: {\n\t\tdisplayName: 'Ethereum',\n\t\tabbreviation: 'ETH',\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'ethereum'\n\t},\n\t[CryptoCurrency.FET]: {\n\t\tdisplayName: 'Fetch.ai',\n\t\tabbreviation: 'FET',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'fetch-ai'\n\t},\n\t[CryptoCurrency.FIL]: {\n\t\tdisplayName: 'Filecoin',\n\t\tabbreviation: 'FIL',\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'filecoin'\n\t},\n\t[CryptoCurrency.FTM]: {\n\t\tdisplayName: 'Fantom',\n\t\tabbreviation: 'FTM',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'fantom'\n\t},\n\t[CryptoCurrency.GAL]: {\n\t\tdisplayName: 'Galaxe',\n\t\tabbreviation: 'GAL',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'project-galaxy'\n\t},\n\t[CryptoCurrency.GALA]: {\n\t\tdisplayName: 'Gala',\n\t\tabbreviation: 'GALA',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'gala'\n\t},\n\t[CryptoCurrency.GMT]: {\n\t\tdisplayName: 'STEPN',\n\t\tabbreviation: 'GMT',\n\t\tcontractType: ContractType.SPL,\n\t\tdecimalOffset: 9,\n\t\tcoingeckoId: 'stepn'\n\t},\n\t[CryptoCurrency.GRT]: {\n\t\tdisplayName: 'The Graph',\n\t\tabbreviation: 'GRT',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'the-graph'\n\t},\n\t[CryptoCurrency.GUSD]: {\n\t\tdisplayName: 'Gemini Dollar',\n\t\tabbreviation: 'GUSD',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'gemini-dollar'\n\t},\n\t[CryptoCurrency.INJ]: {\n\t\tdisplayName: 'Injective Protocol',\n\t\tabbreviation: 'INJ',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'injective-protocol'\n\t},\n\t[CryptoCurrency.JAM]: {\n\t\tdisplayName: 'Geojam',\n\t\tabbreviation: 'JAM',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'geojam'\n\t},\n\t[CryptoCurrency.KNC]: {\n\t\tdisplayName: 'Kyber types.Network',\n\t\tabbreviation: 'KNC',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'kyber-network-crystal'\n\t},\n\t[CryptoCurrency.KP3R]: {\n\t\tdisplayName: 'Keep3rV1',\n\t\tabbreviation: 'KP3R',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'keep3rv1'\n\t},\n\t[CryptoCurrency.LDO]: {\n\t\tdisplayName: 'Lido DAO',\n\t\tabbreviation: 'LDO',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'lido-dao'\n\t},\n\t[CryptoCurrency.LINK]: {\n\t\tdisplayName: 'Chainlink',\n\t\tabbreviation: 'LINK',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'chainlink'\n\t},\n\t[CryptoCurrency.LPT]: {\n\t\tdisplayName: 'Livepeer',\n\t\tabbreviation: 'LPT',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'livepeer'\n\t},\n\t[CryptoCurrency.LRC]: {\n\t\tdisplayName: 'Loopring',\n\t\tabbreviation: 'LRC',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'loopring'\n\t},\n\t[CryptoCurrency.LTC]: {\n\t\tdisplayName: 'Litecoin',\n\t\tabbreviation: 'LTC',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'litecoin'\n\t},\n\t[CryptoCurrency.MANA]: {\n\t\tdisplayName: 'Mana',\n\t\tabbreviation: 'MANA',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'decentraland'\n\t},\n\t[CryptoCurrency.MASK]: {\n\t\tdisplayName: 'Mask Network',\n\t\tabbreviation: 'MASK',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'mask-network'\n\t},\n\t[CryptoCurrency.MATIC]: {\n\t\tdisplayName: 'Polygon',\n\t\tabbreviation: 'MATIC',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'matic-network'\n\t},\n\t[CryptoCurrency.MCO2]: {\n\t\tdisplayName: 'Moss Carbon Credit',\n\t\tabbreviation: 'MCO2',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'moss-carbon-credit'\n\t},\n\t[CryptoCurrency.MKR]: {\n\t\tdisplayName: 'Maker',\n\t\tabbreviation: 'MKR',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'maker'\n\t},\n\t[CryptoCurrency.MOB]: {\n\t\tdisplayName: 'MobileCoin',\n\t\tabbreviation: 'MOB',\n\t\tdecimalOffset: 12,\n\t\tcoingeckoId: 'mobilecoin'\n\t},\n\t[CryptoCurrency.NMR]: {\n\t\tdisplayName: 'Numeraire',\n\t\tabbreviation: 'NMR',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'numeraire'\n\t},\n\t[CryptoCurrency.OXT]: {\n\t\tdisplayName: 'Orchid',\n\t\tabbreviation: 'OXT',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'orchid-protocol'\n\t},\n\t[CryptoCurrency.PAXG]: {\n\t\tdisplayName: 'PAX Gold',\n\t\tabbreviation: 'PAXG',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'pax-gold'\n\t},\n\t[CryptoCurrency.QNT]: {\n\t\tdisplayName: 'Quant',\n\t\tabbreviation: 'QNT',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'quant-network'\n\t},\n\t[CryptoCurrency.QRDO]: {\n\t\tdisplayName: 'Qredo',\n\t\tabbreviation: 'QRDO',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'qredo'\n\t},\n\t[CryptoCurrency.RAY]: {\n\t\tdisplayName: 'Raydium',\n\t\tabbreviation: 'RAY',\n\t\tdecimalOffset: 6,\n\t\tcontractType: ContractType.SPL,\n\t\tcoingeckoId: 'raydium'\n\t},\n\t[CryptoCurrency.REN]: {\n\t\tdisplayName: 'Ren',\n\t\tabbreviation: 'REN',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'republic-protocol'\n\t},\n\t[CryptoCurrency.RNDR]: {\n\t\tdisplayName: 'Render Token',\n\t\tabbreviation: 'RNDR',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'render-token'\n\t},\n\t[CryptoCurrency.SAMO]: {\n\t\tdisplayName: 'Samoyed',\n\t\tabbreviation: 'SAMO',\n\t\tdecimalOffset: 9,\n\t\tcontractType: ContractType.SPL,\n\t\tcoingeckoId: 'samoyedcoin'\n\t},\n\t[CryptoCurrency.SAND]: {\n\t\tdisplayName: 'Sandbox',\n\t\tabbreviation: 'SAND',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'the-sandbox'\n\t},\n\t[CryptoCurrency.SBR]: {\n\t\tdisplayName: 'Saber',\n\t\tabbreviation: 'SBR',\n\t\tdecimalOffset: 6,\n\t\tcontractType: ContractType.SPL,\n\t\tcoingeckoId: 'saber'\n\t},\n\t[CryptoCurrency.SHIB]: {\n\t\tdisplayName: 'Shiba Inu',\n\t\tabbreviation: 'SHIB',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'shiba-inu'\n\t},\n\t[CryptoCurrency.SKL]: {\n\t\tdisplayName: 'Skale',\n\t\tabbreviation: 'SKL',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'skale'\n\t},\n\t[CryptoCurrency.SLP]: {\n\t\tdisplayName: 'Smooth Love Potion',\n\t\tabbreviation: 'SLP',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'smooth-love-potion'\n\t},\n\t[CryptoCurrency.SNX]: {\n\t\tdisplayName: 'Synthetix',\n\t\tabbreviation: 'SNX',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'havven'\n\t},\n\t[CryptoCurrency.SOL]: {\n\t\tdisplayName: 'Solana',\n\t\tabbreviation: 'SOL',\n\t\tdecimalOffset: 9,\n\t\tcoingeckoId: 'solana'\n\t},\n\t[CryptoCurrency.STORJ]: {\n\t\tdisplayName: 'Storj',\n\t\tabbreviation: 'STORJ',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'storj'\n\t},\n\t[CryptoCurrency.SUSHI]: {\n\t\tdisplayName: 'SushiSwap',\n\t\tabbreviation: 'SUSHI',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'sushi'\n\t},\n\t[CryptoCurrency.UMA]: {\n\t\tdisplayName: 'UMA',\n\t\tabbreviation: 'UMA',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'uma'\n\t},\n\t[CryptoCurrency.UNI]: {\n\t\tdisplayName: 'Uniswap',\n\t\tabbreviation: 'UNI',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'uniswap'\n\t},\n\t[CryptoCurrency.USDC]: {\n\t\tdisplayName: 'USD Coin',\n\t\tabbreviation: 'USDC',\n\t\tdecimalOffset: 6,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'usd-coin'\n\t},\n\t[CryptoCurrency.USDT]: {\n\t\tdisplayName: 'Tether',\n\t\tabbreviation: 'USDT',\n\t\tdecimalOffset: 6,\n\t\tcoingeckoId: 'tether'\n\t},\n\t[CryptoCurrency.XLM]: {\n\t\tdisplayName: 'Stellar',\n\t\tabbreviation: 'XLM',\n\t\tdecimalOffset: 7,\n\t\tcoingeckoId: 'stellar'\n\t},\n\t[CryptoCurrency.XRP]: {\n\t\tdisplayName: 'XRP',\n\t\tabbreviation: 'XRP',\n\t\tdecimalOffset: 6,\n\t\tcoingeckoId: 'ripple'\n\t},\n\t[CryptoCurrency.XTZ]: {\n\t\tdisplayName: 'Tezos',\n\t\tabbreviation: 'XTZ',\n\t\tdecimalOffset: 6,\n\t\tcoingeckoId: 'tezos'\n\t},\n\t[CryptoCurrency.YFI]: {\n\t\tdisplayName: 'Yearn Finance',\n\t\tabbreviation: 'YFI',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'yearn-finance'\n\t},\n\t[CryptoCurrency.ZBC]: {\n\t\tdisplayName: 'Zebec Protocol',\n\t\tabbreviation: 'ZBC',\n\t\tcontractType: ContractType.SPL,\n\t\tdecimalOffset: 9,\n\t\tcoingeckoId: 'zebec-protocol'\n\t},\n\t[CryptoCurrency.ZEC]: {\n\t\tdisplayName: 'ZCash',\n\t\tabbreviation: 'ZEC',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'zcash'\n\t},\n\t[CryptoCurrency.ZRX]: {\n\t\tdisplayName: '0x',\n\t\tabbreviation: 'ZRX',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: '0x'\n\t}\n};\n\nexport interface CryptoCurrencyOption {\n\tvalue: CryptoCurrency;\n\tlabel: string;\n\tcontractType: string;\n}\n\ntype WebsiteCryptoCurrencyConfig =\n\t| {\n\t\t\ticon: string;\n\t }\n\t| {\n\t\t\ticonCloudinaryId: string;\n\t };\n\nconst WebsiteCryptoCurrencyConfig: {\n\t[key in CryptoCurrency]: WebsiteCryptoCurrencyConfig;\n} = {\n\t[CryptoCurrency.AAVE]: {iconCloudinaryId: 'crypto/aave_oszkzj'},\n\t[CryptoCurrency.ALCX]: {iconCloudinaryId: 'crypto/alcx_agfvh3'},\n\t[CryptoCurrency.AMP]: {iconCloudinaryId: 'crypto/amp_zrgutx'},\n\t[CryptoCurrency.ANKR]: {iconCloudinaryId: 'crypto/ankr_vipelu'},\n\t[CryptoCurrency.ALGO]: {icon: algorand},\n\t[CryptoCurrency.APE]: {icon: apecoin},\n\t[CryptoCurrency.AVAX]: {icon: avalanche},\n\t[CryptoCurrency.AXS]: {iconCloudinaryId: 'crypto/axs_vdwbc0'},\n\t[CryptoCurrency.BAT]: {icon: basic_attention_token},\n\t[CryptoCurrency.BCH]: {icon: bitcoincash},\n\t[CryptoCurrency.BNB]: {icon: binance},\n\t[CryptoCurrency.BTC]: {icon: bitcoin},\n\t[CryptoCurrency.CHZ]: {iconCloudinaryId: 'crypto/chiliz_j11blm'},\n\t[CryptoCurrency.DAI]: {icon: dai},\n\t[CryptoCurrency.DOGE]: {icon: dogecoin},\n\t[CryptoCurrency.DOT]: {icon: polkadot},\n\t[CryptoCurrency.ETH]: {icon: ethereum},\n\t[CryptoCurrency.FIL]: {icon: filecoin},\n\t[CryptoCurrency.GRT]: {icon: graph},\n\t[CryptoCurrency.LINK]: {icon: chainlink},\n\t[CryptoCurrency.LTC]: {icon: litecoin},\n\t[CryptoCurrency.MATIC]: {icon: polygon},\n\t[CryptoCurrency.MOB]: {icon: mobilecoin},\n\t[CryptoCurrency.RAY]: {icon: raydium},\n\t[CryptoCurrency.SAMO]: {icon: samoyed},\n\t[CryptoCurrency.SBR]: {icon: saber},\n\t[CryptoCurrency.SHIB]: {icon: shiba_inu},\n\t[CryptoCurrency.SLP]: {iconCloudinaryId: 'crypto/slp_clp71c'},\n\t[CryptoCurrency.SOL]: {icon: solana},\n\t[CryptoCurrency.UNI]: {icon: uniswap},\n\t[CryptoCurrency.USDC]: {icon: usdcoin},\n\t[CryptoCurrency.USDT]: {icon: tether},\n\t[CryptoCurrency.XLM]: {icon: stellar},\n\t[CryptoCurrency.XRP]: {iconCloudinaryId: 'crypto/xrp_uwcehg'},\n\t[CryptoCurrency.XTZ]: {icon: tezos},\n\t[CryptoCurrency.ZEC]: {icon: zcash},\n\t[CryptoCurrency.API3]: {iconCloudinaryId: 'crypto/xb8xoz6kxev0uytaejlo'},\n\t[CryptoCurrency.AUDIO]: {iconCloudinaryId: 'crypto/ucctvvgwedku9hexplp7'},\n\t[CryptoCurrency.BNT]: {iconCloudinaryId: 'crypto/jgb6ub5gckohghdrt1ig'},\n\t[CryptoCurrency.BOND]: {iconCloudinaryId: 'crypto/cidlkxmdqdoi2ezygfjj'},\n\t[CryptoCurrency.COMP]: {iconCloudinaryId: 'crypto/ayjushqknohuz9x3hcx5'},\n\t[CryptoCurrency.CRV]: {iconCloudinaryId: 'crypto/txyb4aa9a0skuhoyjcti'},\n\t[CryptoCurrency.CUBE]: {iconCloudinaryId: 'crypto/n8su92fe1atqx79hrhqf'},\n\t[CryptoCurrency.CVC]: {iconCloudinaryId: 'crypto/cw8ahifxtnfw8pbgh5o9'},\n\t[CryptoCurrency.ELON]: {iconCloudinaryId: 'crypto/fvsarijyyz1v9j5w1sh2'},\n\t[CryptoCurrency.ENS]: {iconCloudinaryId: 'crypto/naiw9tgamtvxcxctwxog'},\n\t[CryptoCurrency.FET]: {iconCloudinaryId: 'crypto/mwfznnuw28qqeia4uwov'},\n\t[CryptoCurrency.FTM]: {iconCloudinaryId: 'crypto/laq3m7el5wdfmlhwwtk0'},\n\t[CryptoCurrency.GAL]: {iconCloudinaryId: 'crypto/a5km5rat7dpiz6ckkvfi'},\n\t[CryptoCurrency.GALA]: {iconCloudinaryId: 'crypto/rifljrw1ry9wu1i7mxji'},\n\t[CryptoCurrency.GMT]: {iconCloudinaryId: 'crypto/uyyddnskoabbpei7olin'},\n\t[CryptoCurrency.GUSD]: {iconCloudinaryId: 'crypto/w8zltgl5ngsz1lqch17g'},\n\t[CryptoCurrency.INJ]: {iconCloudinaryId: 'crypto/gi0voz42gn33azwaa11a'},\n\t[CryptoCurrency.JAM]: {iconCloudinaryId: 'crypto/xmn1xxzccz84xiej1esw'},\n\t[CryptoCurrency.KNC]: {iconCloudinaryId: 'crypto/mqdyhpc07mle6dkfomye'},\n\t[CryptoCurrency.KP3R]: {iconCloudinaryId: 'crypto/eoabgtxyhpqqfhv1bxud'},\n\t[CryptoCurrency.LDO]: {iconCloudinaryId: 'crypto/thmvnuxks9z3gthhypwb'},\n\t[CryptoCurrency.LPT]: {iconCloudinaryId: 'crypto/setl154mkwd9kpfly7om'},\n\t[CryptoCurrency.LRC]: {iconCloudinaryId: 'crypto/sazpx9zyfsgbmprmfag9'},\n\t[CryptoCurrency.MANA]: {iconCloudinaryId: 'crypto/ekefdi1p3jgoeb08oszc'},\n\t[CryptoCurrency.MASK]: {iconCloudinaryId: 'crypto/ykwym7djaofb2q6lcn5n'},\n\t[CryptoCurrency.MCO2]: {iconCloudinaryId: 'crypto/ysuyysfrukryu1jw2wrh'},\n\t[CryptoCurrency.MKR]: {iconCloudinaryId: 'crypto/tpdipvaap6m150j2hdec'},\n\t[CryptoCurrency.NMR]: {iconCloudinaryId: 'crypto/bqecgq3rawel0k99tohj'},\n\t[CryptoCurrency.OXT]: {iconCloudinaryId: 'crypto/ietkmjcp0yj71vlg0zjy'},\n\t[CryptoCurrency.PAXG]: {iconCloudinaryId: 'crypto/yb5x1aizhhdn8mprrn2m'},\n\t[CryptoCurrency.QNT]: {iconCloudinaryId: 'crypto/dwdx02ifn9fsvbw1pgfz'},\n\t[CryptoCurrency.QRDO]: {iconCloudinaryId: 'crypto/jzbmlpvwoogroaaazkxz'},\n\t[CryptoCurrency.REN]: {iconCloudinaryId: 'crypto/ili8nkjwnifmbfra20ly'},\n\t[CryptoCurrency.RNDR]: {iconCloudinaryId: 'crypto/tm0klwno0hqjbcxsuvrp'},\n\t[CryptoCurrency.SAND]: {iconCloudinaryId: 'crypto/w6g6ep4ghqpsz54vqzmy'},\n\t[CryptoCurrency.SKL]: {iconCloudinaryId: 'crypto/zccvwa5yin8r32s4sfqy'},\n\t[CryptoCurrency.SNX]: {iconCloudinaryId: 'crypto/sxvudvsjujuhdupwssvz'},\n\t[CryptoCurrency.STORJ]: {iconCloudinaryId: 'crypto/le1ikh3apsrxyttjxg64'},\n\t[CryptoCurrency.SUSHI]: {iconCloudinaryId: 'crypto/iivxx5mfdz1bckmhom1f'},\n\t[CryptoCurrency.UMA]: {iconCloudinaryId: 'crypto/imxydvsf4mydmyjukbel'},\n\t[CryptoCurrency.YFI]: {iconCloudinaryId: 'crypto/mal5muwn4fcsbuuyhohz'},\n\t[CryptoCurrency.ZBC]: {iconCloudinaryId: 'crypto/hhiopvuac8qbpcnupgle'},\n\t[CryptoCurrency.ZRX]: {iconCloudinaryId: 'crypto/ge5jqonw89ffg200z0in'}\n};\n\nexport const CryptoCurrencyConfig = Object.fromEntries(\n\tObject.values(CryptoCurrency).map((cc: CryptoCurrency) => [\n\t\tcc,\n\t\t{...SharedCryptoCurrencyConfig[cc], ...WebsiteCryptoCurrencyConfig[cc]}\n\t])\n) as {\n\t[key in CryptoCurrency]: SharedCryptoCurrencyConfig &\n\t\tWebsiteCryptoCurrencyConfig;\n};\n","export const SearchIcon = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export default function shouldApplyEveryStyleForAllLinks() {\n\tconst attr = document.currentScript?.getAttribute('data-every-style');\n\treturn attr !== undefined && attr !== null;\n}\n","import getScriptParameters from 'src/helpers/getScriptParameters';\n\nconst AUTO_PLAY_PARAM = 'explicit';\n\nexport function shouldEnableAutoPlay() {\n\tconst parameters = getScriptParameters();\n\n\tif (parameters) {\n\t\treturn parameters[AUTO_PLAY_PARAM] !== '1';\n\t}\n\n\treturn true;\n}\n","import {COLORS} from 'src/components/widget/theme/colors';\nimport css from 'src/helpers/css';\n\nconst DEFAULT_LOADING_SIZE = 72;\n\nconst MASK = `data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath class='logoMask' stroke-dasharray='170px' d='M32.547 43C39.081 43 48 38.895 48 29.5C48 20.104 38.132 12.5 29.5 12.5C20.868 12.5 9 19.506 9 36C9 52.495 23.805 59.345 32.547 59.345C41.288 59.345 62.5 54.104 62.5 29.5' stroke='white' stroke-width='10'/%3E%3Canimate attributeType='XML' attributeName='stroke-dashoffset' from='170px' to='-170px' dur='1.25s' repeatCount='indefinite'/%3E%3C/svg%3E%0A`;\nconst loadingSvgCss = css({\n\tdisplay: 'inline-block',\n\tverticalAlign: 'middle',\n\n\tmaskImage: `url(\"${MASK}\")`,\n\t'-webkit-mask-image': `url(\"${MASK}\")`,\n\t'-webkit-mask-size': 'cover',\n\tmaskSize: 'cover'\n});\n\nconst loadingPathCss = (color: string) =>\n\tcss({\n\t\tfill: color\n\t});\ninterface LoadingIconProps {\n\tsize?: number;\n\tcolor?: string;\n}\n\nexport const LoadingIcon = ({\n\tsize = DEFAULT_LOADING_SIZE,\n\tcolor = COLORS.LightGray\n}: LoadingIconProps) => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const RepeatIcon = ({className}: {className?: string}) => (\n\t\n\t\t\n\t\t\n\t\t\n\t\n);\n","import {Big} from 'big.js';\nimport {useState, useRef, useEffect, useCallback} from 'preact/hooks';\nimport {MAX_CRYPTO_DECIMALS_FOR_DISPLAY} from 'src/components/widget/components/PaymentProcess/CryptoFlow/CryptoSelector';\nimport {\n\tchangeModeButtonCss,\n\tcryptoAmountInputColumns,\n\tcryptoAmountInputContainerCss,\n\tcryptoAmountInputFirstColumn,\n\tcryptoAmountInputSecondColumn\n} from 'src/components/widget/components/PaymentProcess/CryptoFlow/styles';\nimport {donationAmountInputContainerErrorCss} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {textInputCss} from 'src/components/widget/components/TextInput/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {LoadingIcon} from 'src/components/widget/icons/LoadingIcon';\nimport {RepeatIcon} from 'src/components/widget/icons/RepeatIcon';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport css from 'src/helpers/css';\nimport {displayCurrencyValue} from 'src/helpers/displayCurrencyValue';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface CryptoAmountInputProps {\n\tcryptoTokenRate: number | null;\n\tcryptoTokenLoading: boolean;\n}\nexport const CryptoAmountInput = ({\n\tcryptoTokenLoading,\n\tcryptoTokenRate\n}: CryptoAmountInputProps) => {\n\tconst [cryptoAmountString, setCryptoAmountString] = useState('');\n\tconst {cryptoAmount, setCryptoAmount, cryptoCurrency, submitError} =\n\t\tuseWidgetContext();\n\n\tconst {primaryColor} = useConfigContext();\n\tconst inputContainerClasses = joinClassNames([\n\t\tcryptoAmountInputContainerCss(primaryColor),\n\t\t...(submitError ? [donationAmountInputContainerErrorCss] : [])\n\t]);\n\n\tconst [amountWarning, setAmountWarning] = useState(\n\t\tundefined\n\t);\n\tconst [isCryptoInput, setIsCryptoInput] = useState(true);\n\n\tconst amountInputRef = useRef(null);\n\n\tuseEffect(() => {\n\t\tif (cryptoCurrency && amountInputRef && amountInputRef.current) {\n\t\t\tamountInputRef.current.focus();\n\t\t}\n\t}, [cryptoCurrency]);\n\n\tconst setDonationAmount = useCallback(\n\t\t(newAmount: string) => {\n\t\t\tconst newAmountBig =\n\t\t\t\tnewAmount && newAmount !== '' ? new Big(newAmount) : undefined;\n\t\t\tif (isCryptoInput) {\n\t\t\t\tsetCryptoAmountString(newAmountBig?.toString() ?? '');\n\t\t\t\tsetCryptoAmount(newAmountBig?.toNumber() ?? 0);\n\t\t\t} else {\n\t\t\t\tconst usdAmountBig =\n\t\t\t\t\tnewAmountBig && cryptoTokenRate\n\t\t\t\t\t\t? newAmountBig\n\t\t\t\t\t\t\t\t.div(cryptoTokenRate)\n\t\t\t\t\t\t\t\t.round(MAX_CRYPTO_DECIMALS_FOR_DISPLAY)\n\t\t\t\t\t\t: new Big(0);\n\t\t\t\tsetCryptoAmountString(usdAmountBig.toString());\n\t\t\t\tsetCryptoAmount(usdAmountBig.toNumber());\n\t\t\t}\n\t\t},\n\t\t[setCryptoAmount, isCryptoInput, cryptoTokenRate]\n\t);\n\n\tconst amountValue =\n\t\tcryptoTokenRate &&\n\t\tcryptoAmount &&\n\t\tnew Big(cryptoAmount).times(cryptoTokenRate).round(2).toString();\n\n\tuseEffect(() => {\n\t\tif (!amountWarning) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst timer = setTimeout(() => {\n\t\t\tsetAmountWarning(undefined);\n\t\t}, 1000);\n\t\treturn () => {\n\t\t\tclearTimeout(timer);\n\t\t};\n\t}, [amountWarning]);\n\n\tconst onAmountChanged = useCallback(\n\t\t(stringValue: string) => {\n\t\t\tsetAmountWarning(undefined);\n\t\t\tif (stringValue === '') {\n\t\t\t\tsetDonationAmount('');\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tsetAmountWarning(undefined);\n\t\t\ttry {\n\t\t\t\tconst bigValue = new Big(stringValue);\n\t\t\t\tif (bigValue.lt(0)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (bigValue.gt(Number.MAX_SAFE_INTEGER)) {\n\t\t\t\t\tsetAmountWarning('Amount is too large');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tsetDonationAmount(stringValue);\n\t\t\treturn true;\n\t\t},\n\t\t[setDonationAmount]\n\t);\n\n\tconst zeroRate = cryptoTokenRate === 0;\n\n\treturn (\n\t\t
    \n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t onAmountChanged(event.currentTarget.value)}\n\t\t\t\t\t/>\n\t\t\t\t\t{!zeroRate && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{cryptoTokenRate === null && cryptoTokenLoading ? (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t) : isCryptoInput ? (\n\t\t\t\t\t\t\t\tdisplayCurrencyValue(amountValue ?? 0, 'USD', {\n\t\t\t\t\t\t\t\t\tshowCurrency: false\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\tcryptoAmount ?? 0\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    {isCryptoInput ? cryptoCurrency : 'USD'}
    \n\t\t\t\t\t{!zeroRate && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{isCryptoInput ? 'USD' : cryptoCurrency}*\n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t
    \n\t\t\t{!zeroRate && (\n\t\t\t\t {\n\t\t\t\t\t\tsetIsCryptoInput(!isCryptoInput);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t)}\n\t\t
    \n\t);\n};\n","export const AppleIcon = () => (\n\t\n\t\t\n\t\t\n\t\n);\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const GiftIcon = ({className}: {className?: string}) => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const GoogleIcon = () => (\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n);\n","import {VNode} from 'preact';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {AppleIcon} from 'src/components/widget/icons/AppleIcon';\nimport {BankIcon} from 'src/components/widget/icons/BankIcon';\nimport {CardIcon} from 'src/components/widget/icons/CardIcon';\nimport {CryptoIcon} from 'src/components/widget/icons/CryptoIcon';\nimport {DafIcon} from 'src/components/widget/icons/DafIcon';\nimport {GiftIcon} from 'src/components/widget/icons/GiftIcon';\nimport {GoogleIcon} from 'src/components/widget/icons/GoogleIcon';\nimport {PaypalIcon} from 'src/components/widget/icons/Paypalcon';\nimport {StocksIcon} from 'src/components/widget/icons/StocksIcon';\nimport {VenmoIcon} from 'src/components/widget/icons/VenmoIcon';\nimport {\n\tPaymentMethod,\n\tPaymentRequestAvailable\n} from 'src/components/widget/types/PaymentMethod';\n\ninterface IconForPaymentMethodProps {\n\tmethod: PaymentMethod;\n}\n\nconst IconForPaymentMethodMap: {\n\t[key in Exclude]: VNode;\n} = {\n\t[PaymentMethod.CREDIT_CARD]: ,\n\t[PaymentMethod.BANK]: ,\n\t[PaymentMethod.PAYPAL]: ,\n\t[PaymentMethod.VENMO]: ,\n\t[PaymentMethod.CRYPTO]: ,\n\t[PaymentMethod.STOCKS]: ,\n\t[PaymentMethod.DAF]: ,\n\t[PaymentMethod.GIFT_CARD]: \n};\n\nfunction getIconForPaymentMethod(\n\tmethod: PaymentMethod,\n\tpaymentRequestAvailable: PaymentRequestAvailable\n) {\n\tif (method === PaymentMethod.PAYMENT_REQUEST) {\n\t\treturn paymentRequestAvailable.applePay ? : ;\n\t}\n\n\treturn IconForPaymentMethodMap[method];\n}\n\nexport const IconForPaymentMethod = ({method}: IconForPaymentMethodProps) => {\n\tconst {paymentRequestAvailable} = useWidgetContext();\n\treturn getIconForPaymentMethod(method, paymentRequestAvailable);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const CardIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const BankIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const PaypalIcon = () => (\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n);\n","export const VenmoIcon = () => (\n\t\n\t\t\n\t\n);\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const CryptoIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const StocksIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const DafIcon = () => (\n\t\n\t\t\n\t\t\n\t\n);\n","import {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {\n\tPaymentMethod,\n\tPaymentRequestAvailable\n} from 'src/components/widget/types/PaymentMethod';\nimport css from 'src/helpers/css';\n\nconst NameForPaymentMethodMap: {\n\t[key in Exclude]: string;\n} = {\n\t[PaymentMethod.CREDIT_CARD]: 'Card',\n\t[PaymentMethod.BANK]: 'Bank',\n\t[PaymentMethod.PAYPAL]: 'PayPal',\n\t[PaymentMethod.VENMO]: 'Venmo',\n\t[PaymentMethod.GIFT_CARD]: 'Gift card',\n\t[PaymentMethod.CRYPTO]: 'Crypto',\n\t[PaymentMethod.STOCKS]: 'Stocks',\n\t[PaymentMethod.DAF]: 'DAF'\n};\n\nfunction getNameForPaymentMethod(\n\tmethod: PaymentMethod,\n\tpaymentRequestAvailable: PaymentRequestAvailable\n) {\n\tif (method === PaymentMethod.PAYMENT_REQUEST) {\n\t\treturn paymentRequestAvailable.applePay ? 'Apple Pay' : 'Google Pay';\n\t}\n\n\treturn NameForPaymentMethodMap[method];\n}\n\ninterface NameForPaymentMethodProps {\n\tmethod: PaymentMethod;\n}\n\nexport const NameForPaymentMethod = ({method}: NameForPaymentMethodProps) => {\n\tconst {paymentRequestAvailable} = useWidgetContext();\n\n\tconst name = getNameForPaymentMethod(method, paymentRequestAvailable);\n\treturn {name};\n};\n","import {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing, verticalStackCss} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nexport const cardCss = css({\n\tpadding: `${Spacing.XL} ${Spacing.XL} 0px`,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: '0px'\n\t}\n});\n\nexport const fieldSetCss = css({\n\tborder: 'none',\n\tpadding: 0,\n\tmargin: 0,\n\tfontSize: '100%',\n\tfont: 'inherit',\n\tverticalAlign: 'baseline'\n});\n\nexport const legendCss = css({\n\tfontWeight: 700,\n\t...textSize.s,\n\tmarginBottom: Spacing.S\n});\n\nexport const fixedFrequencyCss = css({\n\tfontWeight: 700,\n\t...textSize.l\n});\n\nexport const fixedAmountsCss = css({\n\tfontWeight: 700,\n\t...textSize.xl\n});\n\nexport const formContainerCss = css({\n\t...verticalStackCss.css(Spacing.XL),\n\tpadding: '0px',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tgridColumn: '2/3',\n\t\tpadding: Spacing.XXL\n\t}\n});\n\nexport const frequencyAndAmountCss = ({\n\thorizontal,\n\tfixedAmount\n}: {\n\thorizontal: boolean;\n\tfixedAmount: boolean;\n}) =>\n\thorizontal\n\t\t? css({\n\t\t\t\tdisplay: 'grid',\n\t\t\t\tgridTemplateColumns: '1fr 1fr',\n\t\t\t\tgridColumnGap: Spacing.L\n\t\t })\n\t\t: css({\n\t\t\t\t...verticalStackCss.css(Spacing.XL),\n\t\t\t\t...(fixedAmount\n\t\t\t\t\t? {\n\t\t\t\t\t\t\t'> fieldset:last-child': {\n\t\t\t\t\t\t\t\talignSelf: 'center'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t\t\t\t\t: {})\n\t\t });\n\nexport const formCss = css({\n\tdisplay: 'grid',\n\tgridTemplateColumns: '1fr',\n\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tgridAutoFlow: 'column',\n\t\tgridTemplateColumns: 'auto 1fr'\n\t}\n});\n","import {fieldSetCss} from 'src/components/widget/components/PaymentProcess/styles';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {\n\tverticalStackCss,\n\thorizontalStackCss,\n\tSpacing\n} from 'src/components/widget/theme/spacing';\nimport css, {CSSObject} from 'src/helpers/css';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const largePaymentMethodSelectListCss = css({\n\theight: '100%',\n\twidth: '100%',\n\tminWidth: '170px',\n\tflexGrow: 1,\n\tbackgroundColor: COLORS.LightGray,\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t...verticalStackCss.css(0)\n\t}\n});\n\nexport const smallPaymentMethodFieldSetCss = joinClassNames([\n\tfieldSetCss,\n\tcss({\n\t\tdisplay: 'block',\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tdisplay: 'none'\n\t\t}\n\t})\n]);\n\nexport const smallPaymentMethodSelectListCss = css({\n\tdisplay: 'grid',\n\tgridTemplateColumns: '1fr 1fr',\n\tgridGap: Spacing.S\n});\n\nexport const paymentMethodButtonCssBase: CSSObject = {\n\t...horizontalStackCss.css(Spacing.XS),\n\talignItems: 'center',\n\tjustifyContent: 'flex-start',\n\twidth: '100%',\n\tbackground: 'transparent'\n};\n\nexport const largePaymentMethodButtonCss = (selected: boolean) =>\n\tcss({\n\t\t...paymentMethodButtonCssBase,\n\t\tborder: 'none',\n\t\tpadding: Spacing.M,\n\n\t\t':hover': {\n\t\t\tcursor: 'pointer',\n\t\t\tbackground: COLORS.Gray\n\t\t},\n\t\t...(selected\n\t\t\t? {\n\t\t\t\t\tbackground: 'white',\n\t\t\t\t\tfontWeight: 700,\n\t\t\t\t\t':hover': {\n\t\t\t\t\t\tbackground: 'white'\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: {})\n\t});\n\nexport const smallPaymentMethodButtonCss = (\n\tselected: boolean,\n\tprimaryColor: string\n) =>\n\tcss({\n\t\t...paymentMethodButtonCssBase,\n\t\tborder: `1px solid ${COLORS.DarkGray}`,\n\t\tbackground: 'transparent',\n\t\ttextAlign: 'start',\n\t\tpadding: `${Spacing.XXS} ${Spacing.S}`,\n\t\tborderRadius: Radii.Default,\n\t\t':hover': {\n\t\t\tcursor: 'pointer',\n\t\t\tbackground: COLORS.Gray\n\t\t},\n\t\t'& > svg': {\n\t\t\twidth: '20px',\n\t\t\theight: '20px'\n\t\t},\n\t\t...(selected\n\t\t\t? {\n\t\t\t\t\tbackground: primaryColor,\n\t\t\t\t\tborder: `1px solid ${primaryColor}`,\n\t\t\t\t\tfontWeight: 700,\n\t\t\t\t\tcolor: 'white',\n\t\t\t\t\t'& > svg': {\n\t\t\t\t\t\tfilter: 'brightness(0) invert(1)',\n\t\t\t\t\t\twidth: '20px',\n\t\t\t\t\t\theight: '20px'\n\t\t\t\t\t},\n\t\t\t\t\t':hover': {\n\t\t\t\t\t\tbackground: primaryColor\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: {})\n\t});\n","import React from 'preact/compat';\nimport {useMemo, useState} from 'preact/hooks';\nimport {Fragment} from 'preact/jsx-runtime';\nimport {IconForPaymentMethod} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect/IconForPaymentMethod';\nimport {NameForPaymentMethod} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect/NameForPaymentMethod';\nimport {\n\tlargePaymentMethodSelectListCss,\n\tlargePaymentMethodButtonCss,\n\tsmallPaymentMethodFieldSetCss,\n\tsmallPaymentMethodSelectListCss,\n\tsmallPaymentMethodButtonCss\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect/styles';\nimport {legendCss} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {AppleIcon} from 'src/components/widget/icons/AppleIcon';\nimport {GoogleIcon} from 'src/components/widget/icons/GoogleIcon';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tOneTimeFrequencyMethods,\n\tPaymentMethod,\n\tPaymentMethodsOrder\n} from 'src/components/widget/types/PaymentMethod';\nimport css from 'src/helpers/css';\ninterface PaymentMethodButtonProps {\n\tonClick: () => void;\n\tsmall?: boolean;\n\tselected: boolean;\n\ticon: React.ReactNode;\n\tlabel: React.ReactNode | string;\n}\ninterface PaymentMethodListItemProps {\n\tmethod: PaymentMethod;\n\tsmall?: boolean;\n}\n\nconst usePaymentMethods = () => {\n\tconst {methods, frequency: fixedFrequency, previewMode} = useConfigContext();\n\tconst {paymentRequestAvailable} = useWidgetContext();\n\n\tconst filteredMethods = useMemo(\n\t\t() =>\n\t\t\tmethods\n\t\t\t\t.filter((method) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tfixedFrequency === DonationFrequency.Monthly &&\n\t\t\t\t\t\tOneTimeFrequencyMethods.includes(method)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (method === PaymentMethod.PAYMENT_REQUEST) {\n\t\t\t\t\t\tif (previewMode) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\tpaymentRequestAvailable.applePay ||\n\t\t\t\t\t\t\tpaymentRequestAvailable.googlePay\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true;\n\t\t\t\t})\n\t\t\t\t.sort(\n\t\t\t\t\t(a, b) =>\n\t\t\t\t\t\tPaymentMethodsOrder.indexOf(a) - PaymentMethodsOrder.indexOf(b)\n\t\t\t\t),\n\t\t[methods, fixedFrequency, paymentRequestAvailable, previewMode]\n\t);\n\n\treturn filteredMethods;\n};\n\nconst PaymentMethodButton = (props: PaymentMethodButtonProps) => {\n\tconst {primaryColor} = useConfigContext();\n\tconst getClassName = props.small\n\t\t? smallPaymentMethodButtonCss\n\t\t: largePaymentMethodButtonCss;\n\n\treturn (\n\t\t\n\t\t\t{props.icon}\n\t\t\t{typeof props.label === 'string' ? (\n\t\t\t\t{props.label}\n\t\t\t) : (\n\t\t\t\tprops.label\n\t\t\t)}\n\t\t\n\t);\n};\n\nconst AppleAndGooglePayListItem = () => {\n\tconst {\n\t\tselectedPaymentMethod,\n\t\tsetSelectedPaymentMethod,\n\t\tsubMethod,\n\t\tsetSubMethod\n\t} = useWidgetContext();\n\n\treturn (\n\t\t\n\t\t\t
  • \n\t\t\t\t}\n\t\t\t\t\tlabel=\"Apple Pay\"\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tsetSelectedPaymentMethod(PaymentMethod.PAYMENT_REQUEST);\n\t\t\t\t\t\tsetSubMethod('apple');\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t
  • \n\t\t\t
  • \n\t\t\t\t}\n\t\t\t\t\tlabel=\"Google Pay\"\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tsetSelectedPaymentMethod(PaymentMethod.PAYMENT_REQUEST);\n\t\t\t\t\t\tsetSubMethod('google');\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t
  • \n\t\t
    \n\t);\n};\n\nconst PaymentMethodListItem = (props: PaymentMethodListItemProps) => {\n\tconst {selectedPaymentMethod, setSelectedPaymentMethod} = useWidgetContext();\n\tconst {previewMode} = useConfigContext();\n\tif (previewMode && props.method === PaymentMethod.PAYMENT_REQUEST) {\n\t\treturn ;\n\t}\n\n\treturn (\n\t\t
  • \n\t\t\t}\n\t\t\t\tlabel={}\n\t\t\t\tonClick={() => {\n\t\t\t\t\tsetSelectedPaymentMethod(props.method);\n\t\t\t\t}}\n\t\t\t/>\n\t\t
  • \n\t);\n};\n\nexport const LargePaymentMethodSelect = () => {\n\tconst methods = usePaymentMethods();\n\n\tif (methods.length === 1) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t
      \n\t\t\t{methods.map((method) => (\n\t\t\t\t\n\t\t\t))}\n\t\t
    \n\t);\n};\n\nexport const SmallPaymentMethodSelect = () => {\n\tconst methods = usePaymentMethods();\n\n\tif (methods.length === 1) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t
    \n\t\t\tPayment method\n\t\t\t
      \n\t\t\t\t{methods.map((method) => (\n\t\t\t\t\t\n\t\t\t\t))}\n\t\t\t
    \n\t\t
    \n\t);\n};\n","import {COLORS} from 'src/components/widget/theme/colors';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\n/* Hide checkbox visually but remain accessible to screen readers.\n Source: https://polished.js.org/docs/#hidevisually */\nexport const hiddenCheckboxCss = css({\n\tborder: 0,\n\tclip: 'rect(0 0 0 0)',\n\tclipPath: 'inset(50%)',\n\theight: '1px',\n\tmargin: '-1px',\n\toverflow: 'hidden',\n\tpadding: '0',\n\tposition: 'absolute',\n\twhiteSpace: 'nowrap',\n\twidth: '1px'\n});\n\nexport const checkboxCss = ({\n\tchecked,\n\tprimaryColor\n}: {\n\tchecked?: boolean;\n\tprimaryColor: string;\n}) =>\n\tcss({\n\t\tcursor: 'pointer',\n\t\twidth: '24px',\n\t\tminWidth: '24px',\n\t\theight: '24px',\n\t\tdisplay: 'flex',\n\t\tborderRadius: '4px',\n\t\tjustifyContent: 'center',\n\t\talignItems: 'center',\n\t\tborder: `1.5px solid ${checked ? primaryColor : COLORS.DarkGray}`,\n\t\t...(checked ? {background: primaryColor} : {})\n\t});\n\nexport const checkMarkIconCss = css({\n\twidth: '16px',\n\theight: '16px',\n\t'& > path': {\n\t\tstroke: 'white',\n\t\tstrokeWidth: '2px'\n\t}\n});\n\nexport const checkboxLabelTextCss = css({\n\tcursor: 'pointer'\n});\n\nexport const checkboxLabelContainerCss = css({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tgap: Spacing.XS\n});\n","export const CheckMarkIcon = ({className}: {className?: string}) => (\n\t\n\t\t\n\t\n);\n","import {FunctionComponent} from 'preact';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {\n\tcheckboxLabelContainerCss,\n\thiddenCheckboxCss,\n\tcheckboxCss,\n\tcheckMarkIconCss,\n\tcheckboxLabelTextCss\n} from 'src/components/widget/components/Checkbox/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {CheckMarkIcon} from 'src/components/widget/icons/CheckMarkIcon';\n\ninterface CheckboxProps extends JSXInternal.HTMLAttributes {}\n\nexport const Checkbox: FunctionComponent = ({\n\tchildren,\n\tchecked,\n\tclassName,\n\t...rest\n}) => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t);\n};\n","import {useState} from 'preact/hooks';\nimport {Checkbox} from 'src/components/widget/components/Checkbox';\nimport {\n\tfieldSetCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {TextArea} from 'src/components/widget/components/TextInput';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nexport const PrivateNote = () => {\n\tconst nonprofit = useNonprofitOrError();\n\tconst enablePrivateNoteField =\n\t\tnonprofit.hasAdmin && !nonprofit.metadata?.disablePrivateNotes;\n\n\tconst {privateNote, setPrivateNote} = useWidgetContext();\n\tconst [showPrivateNoteField, setShowPrivateNoteField] = useState(\n\t\tBoolean(privateNote)\n\t);\n\n\tif (!enablePrivateNoteField) return null;\n\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tsetShowPrivateNoteField((previous) => !previous);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\tAdd note for {nonprofit.name}\n\t\t\t\n\t\t\t{showPrivateNoteField && (\n\t\t\t\t\n\t\t\t\t\tPrivate note\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetPrivateNote(currentTarget.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t)}\n\t\t
    \n\t);\n};\n","import {useState} from 'preact/hooks';\nimport {Checkbox} from 'src/components/widget/components/Checkbox';\nimport {\n\tfieldSetCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {TextArea} from 'src/components/widget/components/TextInput';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nexport const PublicTestimony = () => {\n\tconst nonprofit = useNonprofitOrError();\n\n\tconst {publicTestimony, setPublicTestimony} = useWidgetContext();\n\tconst [showPublicTestimonyField, setShowPublicTestimonyField] = useState(\n\t\tBoolean(publicTestimony)\n\t);\n\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tsetShowPublicTestimonyField((previous) => !previous);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\tAdd public testimony\n\t\t\t\n\t\t\t{showPublicTestimonyField && (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHelp {nonprofit.name} by sharing why you support them with the world\n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetPublicTestimony(currentTarget.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t)}\n\t\t
    \n\t);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {smallText} from 'src/components/widget/theme/font-sizes';\nimport {ABOUT_URL} from 'src/constants/url';\nimport css from 'src/helpers/css';\n\nconst containerCss = css({\n\twidth: '100%',\n\ttextAlign: 'center'\n});\n\nconst redirectTextCss = css({\n\t...smallText,\n\tcolor: COLORS.TextOpaque\n});\n\nconst linkCss = (color: string) =>\n\tcss({\n\t\tcolor,\n\t\ttextDecoration: 'none',\n\t\tcursor: 'pointer'\n\t});\n\nexport const RedirectNotice = () => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t\tEvery.org will accept your donation.{' '}\n\t\t\t\t\n\t\t\t\t\tLearn More\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t);\n};\n","import {COLORS} from 'src/components/widget/theme/colors';\nimport {bodyText} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nexport const btnCss = css({\n\t...bodyText,\n\toutline: 'none',\n\twidth: '100%',\n\tborder: 'none',\n\tfontFamily: 'inherit',\n\tcursor: 'pointer',\n\tborderRadius: Radii.Big,\n\theight: '52px',\n\tfontWeight: 700,\n\tpadding: Spacing.XXS,\n\ttransition: 'opacity .3s'\n});\n\nexport const btnActiveColor = (color: string) =>\n\tcss({\n\t\tcolor: COLORS.White,\n\t\tbackgroundColor: color,\n\t\t':hover': {\n\t\t\topacity: 0.9\n\t\t}\n\t});\n\nexport const btnDisabledCss = css({\n\tcolor: COLORS.White,\n\tbackgroundColor: COLORS.DarkGray,\n\tcursor: 'default',\n\t'& > span': {\n\t\topacity: '0.6'\n\t}\n});\n\nexport const btnPreviewCss = css({\n\tcursor: 'not-allowed'\n});\n","import {ComponentChildren} from 'preact';\nimport {\n\tbtnCss,\n\tbtnDisabledCss,\n\tbtnActiveColor,\n\tbtnPreviewCss\n} from 'src/components/widget/components/PaymentProcess/SubmitButton/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface ButtonProps {\n\thandleClick?: () => void;\n\tchildren: ComponentChildren;\n\tdisabled?: boolean;\n}\n\nexport const SubmitButton = ({\n\thandleClick,\n\tdisabled,\n\tchildren\n}: ButtonProps) => {\n\tconst {primaryColor, previewMode} = useConfigContext();\n\n\tif (previewMode) {\n\t\treturn ;\n\t}\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n\nexport const PreviewSubmitButton = ({\n\tdisabled\n}: Pick) => {\n\tconst {primaryColor} = useConfigContext();\n\tconst {selectedPaymentMethod, subMethod} = useWidgetContext();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t{getSubmitButtonText({\n\t\t\t\t\tmethod: selectedPaymentMethod,\n\t\t\t\t\tpaymentRequestIsApplePay: subMethod === 'apple'\n\t\t\t\t})}\n\t\t\t\n\t\t\n\t);\n};\n","import {useEffect, useState} from 'preact/hooks';\nimport {getCoingeckoRate} from 'src/components/widget/api';\n\nexport const useCoingeckoRate = (\n\tcoingeckoId?: string\n): [number | null, boolean, string | null] => {\n\tconst [rate, setRate] = useState(null);\n\tconst [error, setError] = useState(null);\n\tconst [loading, setLoading] = useState(false);\n\n\tuseEffect(() => {\n\t\tif (!coingeckoId) {\n\t\t\tsetRate(null);\n\t\t\tsetError(null);\n\t\t\tsetLoading(false);\n\t\t\treturn;\n\t\t}\n\n\t\tsetLoading(true);\n\t\tgetCoingeckoRate(coingeckoId)\n\t\t\t.then((rate) => {\n\t\t\t\tsetRate(rate);\n\t\t\t\tsetError(null);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tsetRate(null);\n\t\t\t\tsetError(error.message);\n\t\t\t})\n\t\t\t.finally(() => {\n\t\t\t\tsetLoading(false);\n\t\t\t});\n\t}, [coingeckoId]);\n\n\treturn [rate, loading, error];\n};\n\nexport default useCoingeckoRate;\n","export const DEFAULT_CURRENCY = {\n\tname: 'USD',\n\tsymbol: '$'\n};\n","import {useCallback} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tAvailablePaymentMethods,\n\tOneTimeFrequencyMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\nimport {DEFAULT_CURRENCY} from 'src/constants/currency';\nimport {\n\tconstructDonateStocksUrl,\n\tconstructDonateCryptoUrl,\n\tconstructDonateUrl,\n\tconstructGiftCardUrl\n} from 'src/helpers/constructDonateUrl';\n\nexport const useSubmitDonation = () => {\n\tconst config = useConfigContext();\n\n\tconst {\n\t\tfrequency,\n\t\tdonationAmount,\n\t\tsetSubmitError,\n\t\tselectedPaymentMethod,\n\t\tstockAmount,\n\t\tstockSymbol,\n\t\tcryptoAmount,\n\t\tcryptoCurrency,\n\t\tprivateNote,\n\t\tpublicTestimony,\n\t\tgiftCardCode\n\t} = useWidgetContext();\n\tconst {\n\t\tminDonationAmount,\n\t\twebhookToken,\n\t\tredeemGiftCardInFlow,\n\t\tdesignation,\n\t\trequireShareInfo\n\t} = useConfigContext();\n\n\tconst submitDonation = useCallback(\n\t\t(event: JSXInternal.TargetedEvent) => {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst target = config.completeDonationInNewTab ? '_blank' : '_self';\n\n\t\t\tconst baseParameters = {\n\t\t\t\tmethods: [selectedPaymentMethod],\n\t\t\t\tnonprofitSlug: config.nonprofitSlug,\n\t\t\t\tfundraiserSlug: config.fundraiserSlug,\n\t\t\t\tutmSource: config.utmSource,\n\t\t\t\tprivateNote,\n\t\t\t\tpublicTestimony,\n\t\t\t\twebhookToken,\n\t\t\t\tdesignation,\n\t\t\t\trequireShareInfo\n\t\t\t};\n\t\t\tswitch (selectedPaymentMethod) {\n\t\t\t\tcase PaymentMethod.CRYPTO:\n\t\t\t\t\tif (!cryptoAmount || !cryptoCurrency) {\n\t\t\t\t\t\tsetSubmitError(`Please enter currency and amount`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructDonateCryptoUrl({\n\t\t\t\t\t\t\tcryptoAmount,\n\t\t\t\t\t\t\tcryptoCurrency,\n\t\t\t\t\t\t\t...baseParameters\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PaymentMethod.STOCKS:\n\t\t\t\t\tif (!stockSymbol || !stockAmount) {\n\t\t\t\t\t\tsetSubmitError(`Please enter the symbol and amount`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructDonateStocksUrl({\n\t\t\t\t\t\t\tstockSymbol,\n\t\t\t\t\t\t\tstockAmount,\n\t\t\t\t\t\t\t...baseParameters\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PaymentMethod.GIFT_CARD:\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructGiftCardUrl({\n\t\t\t\t\t\t\tredeemGiftCardInFlow,\n\t\t\t\t\t\t\tgiftCardCode,\n\t\t\t\t\t\t\t...baseParameters,\n\t\t\t\t\t\t\tmethods: undefined\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (!donationAmount || donationAmount < minDonationAmount) {\n\t\t\t\t\t\tsetSubmitError(\n\t\t\t\t\t\t\t`Amount must be at least ${DEFAULT_CURRENCY.symbol}${minDonationAmount}`\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructDonateUrl({\n\t\t\t\t\t\t\tamount: donationAmount,\n\t\t\t\t\t\t\tfrequency: OneTimeFrequencyMethods.includes(selectedPaymentMethod)\n\t\t\t\t\t\t\t\t? DonationFrequency.OneTime\n\t\t\t\t\t\t\t\t: frequency,\n\t\t\t\t\t\t\t...baseParameters\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tfrequency,\n\t\t\tdonationAmount,\n\t\t\tsetSubmitError,\n\t\t\tselectedPaymentMethod,\n\t\t\tconfig,\n\t\t\tminDonationAmount,\n\t\t\tstockAmount,\n\t\t\tstockSymbol,\n\t\t\tcryptoAmount,\n\t\t\tcryptoCurrency,\n\t\t\tprivateNote,\n\t\t\tpublicTestimony,\n\t\t\tgiftCardCode,\n\t\t\twebhookToken,\n\t\t\tredeemGiftCardInFlow,\n\t\t\tdesignation,\n\t\t\trequireShareInfo\n\t\t]\n\t);\n\n\treturn submitDonation;\n};\n","import {ErrorMessage} from 'src/components/widget/components/ErrorMessage';\nimport {CryptoAmountInput} from 'src/components/widget/components/PaymentProcess/CryptoFlow/CryptoAmountInput';\nimport {CryptoSelector} from 'src/components/widget/components/PaymentProcess/CryptoFlow/CryptoSelector';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {PublicTestimony} from 'src/components/widget/components/PaymentProcess/PublicTestimony';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tfieldSetCss,\n\tformContainerCss,\n\tformCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport useCoingeckoRate from 'src/components/widget/hooks/useCoingeckoRate';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport {CryptoCurrencyConfig} from 'src/components/widget/types/Crypto';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport css from 'src/helpers/css';\nimport {displayCurrencyValue} from 'src/helpers/displayCurrencyValue';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const CryptoFlow = () => {\n\tconst submitDonation = useSubmitDonation();\n\tconst {cryptoAmount, cryptoCurrency, submitError} = useWidgetContext();\n\n\tconst [cryptoTokenRate, cryptoTokenLoading] = useCoingeckoRate(\n\t\tcryptoCurrency && CryptoCurrencyConfig[cryptoCurrency]?.coingeckoId\n\t);\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\tCrypto currency\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t{cryptoCurrency && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tAmount\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.CRYPTO, cryptoCurrency})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{cryptoCurrency && cryptoTokenRate && cryptoTokenRate > 0 && (\n\t\t\t\t\t

    \n\t\t\t\t\t\t*Estimated exchange rate of{' '}\n\t\t\t\t\t\t{displayCurrencyValue(cryptoTokenRate, 'USD', {showCurrency: true})}{' '}\n\t\t\t\t\t\t/ {cryptoCurrency} is provided by CoinGecko. Final rate will be\n\t\t\t\t\t\tdetermined by our brokerage at time of transaction conversion.\n\t\t\t\t\t

    \n\t\t\t\t)}\n\t\t\t
    \n\t\t\n\t);\n};\n","import {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nexport const backButtonCss = (primaryColor: string) =>\n\tcss({\n\t\toutline: 'none',\n\t\tborder: 'none',\n\t\tfontFamily: 'inherit',\n\t\tcursor: 'pointer',\n\t\tbackground: 'none',\n\t\tfontWeight: 500,\n\t\ttransition: 'opacity .3s',\n\t\tcolor: primaryColor,\n\t\tdisplay: 'flex',\n\t\talignItems: 'center',\n\t\talignSelf: 'flex-start',\n\t\t...textSize.s,\n\t\topacity: 1,\n\t\tpadding: 0,\n\t\tgap: Spacing.XXS,\n\t\tmarginBottom: Spacing.XXL,\n\t\t':hover': {\n\t\t\topacity: 0.9\n\t\t},\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tpadding: Spacing.L,\n\t\t\tmarginBottom: 0\n\t\t}\n\t});\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const ArrowBackIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {backButtonCss} from 'src/components/widget/components/PaymentProcess/BackButton/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {ArrowBackIcon} from 'src/components/widget/icons/ArrowBackIcon';\n\nexport const BackButton = ({handleClick}: {handleClick?: () => void}) => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\tBack\n\t\t\n\t);\n};\n","export enum DafFlowView {\n\tSTART,\n\tMANUAL,\n\tAMOUNT\n}\n\nexport interface DafFlowViewProps {\n\tchangeView: (view: DafFlowView) => void;\n}\n","import {useEffect, useRef, useState} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {ErrorMessage} from 'src/components/widget/components/ErrorMessage';\nimport {\n\tdonationAmountAddAmountButtonCss,\n\tdonationAmountAddAmountContainerCss,\n\tdonationAmountInputPrefixCss,\n\tdonationAmountInputSufixCss,\n\tdonationAmountInputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {\n\tfieldSetCss,\n\tfixedAmountsCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {TextInput} from 'src/components/widget/components/TextInput';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport {DEFAULT_CURRENCY} from 'src/constants/currency';\nimport css from 'src/helpers/css';\nimport {isTouchDevice} from 'src/helpers/isTouchDevice';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nconst preventDecimal = (\n\tevent: JSXInternal.TargetedEvent\n) => {\n\tif (event.key === '.') {\n\t\tevent.preventDefault();\n\t}\n};\n\nconst abbreviateNumber = (n: number, significantDigits?: number): string => {\n\tif (n < 1e3) {\n\t\treturn n.toString();\n\t}\n\n\tlet symbol = '';\n\tlet denom = 1;\n\tif (n >= 1e3 && n < 1e6) {\n\t\tdenom = 1e3;\n\t\tsymbol = 'k';\n\t} else if (n >= 1e6 && n < 1e9) {\n\t\tdenom = 1e6;\n\t\tsymbol = 'm';\n\t} else if (n >= 1e9 && n < 1e12) {\n\t\tdenom = 1e9;\n\t\tsymbol = 'b';\n\t} else if (n >= 1e12) {\n\t\tdenom = 1e12;\n\t\tsymbol = 't';\n\t}\n\n\tif (significantDigits === undefined) {\n\t\treturn (n / denom).toFixed(3).replace(/\\.?0+$/, '') + symbol;\n\t}\n\n\treturn (n / denom).toFixed(significantDigits) + symbol;\n};\n\nexport const DonationAmount = () => {\n\tconst inputRef = useRef(null);\n\n\tconst {\n\t\tprimaryColor,\n\t\taddAmounts,\n\t\tamount: fixedAmount,\n\t\tfrequency: fixedFrequency,\n\t\tminDonationAmount\n\t} = useConfigContext();\n\n\tconst {setDonationAmount, donationAmount, setSubmitError, submitError} =\n\t\tuseWidgetContext();\n\n\tconst [amountError, setAmountError] = useState();\n\tconst autoFocusInput = () => {\n\t\tif (inputRef.current) {\n\t\t\tinputRef.current.focus();\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tif (!isTouchDevice()) {\n\t\t\tautoFocusInput();\n\t\t}\n\t}, []);\n\n\tif (fixedAmount) {\n\t\treturn (\n\t\t\t\n\t\t\t\tDonation amount\n\t\t\t\t\n\t\t\t\t\t${fixedAmount}\n\t\t\t\t

    \n\t\t\t\n\t\t);\n\t}\n\n\treturn (\n\t\t\n\t\t\tDonation amount\n\t\t\t
    \n\t\t\t\t {\n\t\t\t\t\t\tconst value = Number(event.currentTarget.value);\n\t\t\t\t\t\tsetDonationAmount(value);\n\t\t\t\t\t\tif (value < minDonationAmount) {\n\t\t\t\t\t\t\tconst errorMessage = `Amount must be at least ${DEFAULT_CURRENCY.symbol}${minDonationAmount}`;\n\t\t\t\t\t\t\tsetAmountError(errorMessage);\n\t\t\t\t\t\t\tsetSubmitError(errorMessage);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsetAmountError(undefined);\n\t\t\t\t\t\t\tsetSubmitError(null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t\n\t\t\t
    \n\t\t\t{addAmounts && addAmounts.length > 0 && (\n\t\t\t\t
    \n\t\t\t\t\t{addAmounts.map((amount) => (\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetDonationAmount((previous) => {\n\t\t\t\t\t\t\t\t\treturn typeof previous === 'number'\n\t\t\t\t\t\t\t\t\t\t? previous + amount\n\t\t\t\t\t\t\t\t\t\t: amount;\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t+{abbreviateNumber(amount)}\n\t\t\t\t\t\t\n\t\t\t\t\t))}\n\t\t\t\t
    \n\t\t\t)}\n\t\t\n\t);\n};\n","export const isTouchDevice = () =>\n\tBoolean('ontouchstart' in window || navigator.maxTouchPoints);\n","import css from 'src/helpers/css';\n\nexport const inputLabelCss = (primaryColor: string) =>\n\tcss({\n\t\tposition: 'relative',\n\t\tcursor: 'pointer',\n\t\tdisplay: 'flex',\n\t\twidth: '100%',\n\t\theight: '36px',\n\t\talignItems: 'center',\n\t\tjustifyContent: 'center',\n\t\tcolor: primaryColor,\n\t\tfontWeight: 500,\n\t\tborder: `2px solid ${primaryColor}`,\n\t\tborderRight: 'none'\n\t});\n\nexport const inputItemCss = (primaryColor: string) =>\n\tcss({\n\t\tcursor: 'pointer',\n\t\tdisplay: 'flex',\n\t\tflexDirection: 'column',\n\t\tflex: '1 1 0px',\n\n\t\t'& > input': {\n\t\t\tappearance: 'none',\n\t\t\theight: 0\n\t\t},\n\n\t\t'& > input:checked + label': {\n\t\t\tbackgroundColor: primaryColor,\n\t\t\tcolor: 'white'\n\t\t},\n\n\t\t'& > input:checked + label:hover': {\n\t\t\tbackgroundColor: primaryColor,\n\t\t\tcolor: 'white'\n\t\t}\n\t});\n\nexport const inputContainerCss = (primaryColor: string) =>\n\tcss({\n\t\tdisplay: 'flex',\n\t\twidth: '100%',\n\n\t\t'& > div:first-of-type > label': {\n\t\t\tborderRadius: '6px 0 0 6px',\n\t\t\t'&::after': {\n\t\t\t\tborderRadius: '6px 0 0 6px'\n\t\t\t}\n\t\t},\n\n\t\t'& > div:last-of-type > label': {\n\t\t\tborderRadius: '0 6px 6px 0',\n\t\t\tborderRight: `2px solid ${primaryColor}`,\n\t\t\t'&::after': {\n\t\t\t\tborderRadius: '0 6px 6px 0'\n\t\t\t}\n\t\t}\n\t});\n","import {\n\tinputContainerCss,\n\tinputItemCss,\n\tinputLabelCss\n} from 'src/components/widget/components/PaymentProcess/Frequency/styles';\nimport {\n\tfieldSetCss,\n\tfixedFrequencyCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tOneTimeFrequencyMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\n\nexport const Frequency = () => {\n\tconst {\n\t\tprimaryColor,\n\t\tfrequency: fixedFrequency,\n\t\tamount: fixedAmount,\n\t\tmonthlyTitle\n\t} = useConfigContext();\n\tconst {frequency, selectedPaymentMethod, setFrequency} = useWidgetContext();\n\n\tif (fixedFrequency && monthlyTitle) {\n\t\treturn

    {monthlyTitle}

    ;\n\t}\n\n\tif (fixedFrequency) {\n\t\tif (fixedAmount) {\n\t\t\treturn (\n\t\t\t\t
    \n\t\t\t\t\tFrequency\n\t\t\t\t\t

    \n\t\t\t\t\t\t{fixedFrequency === DonationFrequency.Monthly\n\t\t\t\t\t\t\t? 'Monthly'\n\t\t\t\t\t\t\t: 'One-time'}\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t

    \n\t\t\t\tFrequency:{' '}\n\t\t\t\t{fixedFrequency === DonationFrequency.Monthly ? 'Monthly' : 'One-time'}\n\t\t\t

    \n\t\t);\n\t}\n\n\tif (OneTimeFrequencyMethods.includes(selectedPaymentMethod)) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\tFrequency\n\t\t\t\t

    \n\t\t\t\t\t{selectedPaymentMethod === PaymentMethod.DAF ? 'Chariot' : 'Venmo'}{' '}\n\t\t\t\t\tonly supports one-time donations\n\t\t\t\t

    \n\t\t\t
    \n\t\t);\n\t}\n\n\treturn (\n\t\t
    \n\t\t\tFrequency\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetFrequency(DonationFrequency.Monthly);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tGive Monthly\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetFrequency(DonationFrequency.OneTime);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tOnce\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t);\n};\n","import {ErrorMessage} from 'src/components/widget/components/ErrorMessage';\nimport {BackButton} from 'src/components/widget/components/PaymentProcess/BackButton';\nimport {\n\tDafFlowViewProps,\n\tDafFlowView\n} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\nimport {DonationAmount} from 'src/components/widget/components/PaymentProcess/DonationAmount';\nimport {Frequency} from 'src/components/widget/components/PaymentProcess/Frequency';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {PublicTestimony} from 'src/components/widget/components/PaymentProcess/PublicTestimony';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tformCss,\n\tformContainerCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const DafAmountView = ({changeView}: DafFlowViewProps) => {\n\tconst submitDonation = useSubmitDonation();\n\tconst {donationAmount, submitError} = useWidgetContext();\n\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tchangeView(DafFlowView.START);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t
    \n\t\t\t\t

    Connect your DAF with Chariot

    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.DAF})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import {linkCss} from 'src/components/widget/components/FundraiserLink/styles';\nimport {BackButton} from 'src/components/widget/components/PaymentProcess/BackButton';\nimport {\n\tDafFlowViewProps,\n\tDafFlowView\n} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\nimport {\n\tformContainerCss,\n\tformCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useNonprofit} from 'src/components/widget/hooks/useNonprofit';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {Spacing, verticalStackCss} from 'src/components/widget/theme/spacing';\nimport {\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\nimport {TEAM_EMAIL} from 'src/constants/url';\nimport css from 'src/helpers/css';\nimport {mailToLink} from 'src/helpers/mailToLink';\n\nexport const DafManualView = ({changeView}: DafFlowViewProps) => {\n\tconst {nonprofitSlug, primaryColor} = useConfigContext();\n\tconst nonprofit = useNonprofit();\n\tconst nonprofitName =\n\t\tnonprofit === NonprofitFetching || nonprofit === NonprofitFetchError\n\t\t\t? 'the nonprofit'\n\t\t\t: nonprofit.name;\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tchangeView(DafFlowView.START);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t
    \n\t\t\t\t

    Manual DAF donation

    \n\t\t\t\t

    \n\t\t\t\t\tPlease ask your provider to make a one-time or recurring grant to:\n\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t\t\t

    \n\t\t\t\t\t\tEvery.org (EIN: 61-1913297)\n\t\t\t\t\t\t58 West Portal Ave #781 San Francisco, CA 94127\n\t\t\t\t\t\tMemo: every.org/{nonprofitSlug}\n\t\t\t\t\t\tContact info: Mark Ulrich, CEO\n\t\t\t\t\t\tEmail: team@every.org\n\t\t\t\t\t\tPhone number: +1 (415) 650-0503\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tYou may also email us at{' '}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{TEAM_EMAIL}\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t\twith the memo or to let us know if you wish to share your contact\n\t\t\t\t\t\tinformation with the nonprofit/campaign. By default, your name and\n\t\t\t\t\t\temail will be shared with {nonprofitName} if included in the grant\n\t\t\t\t\t\tletter from your DAF.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tWe will attribute the donation accordingly:\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we receive BOTH your @username and a nonprofit/campaign: we will\n\t\t\t\t\t\tadd a donation for that nonprofit/campaign to your account.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we receive only your @username, we will credit your\n\t\t\t\t\t\taccount's gift card balance in the amount received, which you\n\t\t\t\t\t\tcan use to support as many nonprofits as you'd like.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we receive only a nonprofit/campaign, we will send that amount to\n\t\t\t\t\t\tthat nonprofit/campaign.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we do not receive any information by the time the wire/ACH is\n\t\t\t\t\t\treceived, we will apply it towards running Every.org.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t);\n};\n","import {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nconst CAHRIOT_GREEN = '#ADEFD1';\nconst CAHRIOT_DARK_GREEN = '#7ce6b6';\nconst CHARIOT_DARK_BLUE = '#00203F';\n\nexport const chariotButtonCss = css({\n\toutline: 'none',\n\tborder: 'none',\n\tfontFamily: 'inherit',\n\tbackground: CAHRIOT_GREEN,\n\tcolor: CHARIOT_DARK_BLUE,\n\talignSelf: 'center',\n\tborderRadius: Radii.Big,\n\tpadding: `${Spacing.M} ${Spacing.XL}`,\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tfontWeight: 500,\n\t...textSize.s,\n\tgap: Spacing.XS,\n\tcursor: 'pointer',\n\t':hover': {\n\t\tbackground: CAHRIOT_DARK_GREEN\n\t}\n});\n\nexport const manualButtonCss = (primaryColor: string) =>\n\tcss({\n\t\toutline: 'none',\n\t\tborder: 'none',\n\t\tbackground: 'none',\n\t\tfontFamily: 'inherit',\n\t\tcolor: primaryColor,\n\t\talignSelf: 'center',\n\t\tdisplay: 'flex',\n\t\talignItems: 'center',\n\t\tfontWeight: 500,\n\t\t...textSize.s,\n\t\tgap: Spacing.XS,\n\t\tcursor: 'pointer',\n\t\t':hover': {\n\t\t\topacity: 0.9\n\t\t}\n\t});\n","import {\n\tchariotButtonCss,\n\tmanualButtonCss\n} from 'src/components/widget/components/PaymentProcess/DafFlow/styles';\nimport {\n\tDafFlowViewProps,\n\tDafFlowView\n} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {\n\tformCss,\n\tformContainerCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const DafLogo = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n\nexport const DafStartView = ({changeView}: DafFlowViewProps) => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t

    Instant DAF donation

    \n\t\t\t\t

    \n\t\t\t\t\tWe use Chariot to verify your account info and automatically initiate\n\t\t\t\t\ta grant from your DAF, or you can get instructions for making the\n\t\t\t\t\tdonation manually.\n\t\t\t\t

    \n\t\t\t\t {\n\t\t\t\t\t\tchangeView(DafFlowView.AMOUNT);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tDonate with\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tchangeView(DafFlowView.MANUAL);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tGet instructions for a manual DAF donation\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t
    \n\t);\n};\n","import {useState} from 'preact/hooks';\nimport {DafAmountView} from 'src/components/widget/components/PaymentProcess/DafFlow/Views/DafAmountView';\nimport {DafManualView} from 'src/components/widget/components/PaymentProcess/DafFlow/Views/DafManualView';\nimport {DafStartView} from 'src/components/widget/components/PaymentProcess/DafFlow/Views/DafStartView';\nimport {DafFlowView} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\n\nexport const DafFlow = () => {\n\tconst [view, setView] = useState(DafFlowView.START);\n\n\t// eslint-disable-next-line default-case\n\tswitch (view) {\n\t\tcase DafFlowView.START:\n\t\t\treturn ;\n\t\tcase DafFlowView.MANUAL:\n\t\t\treturn ;\n\t\tcase DafFlowView.AMOUNT:\n\t\t\treturn ;\n\t}\n};\n","import {ErrorMessage} from 'src/components/widget/components/ErrorMessage';\nimport {DonationAmount} from 'src/components/widget/components/PaymentProcess/DonationAmount';\nimport {Frequency} from 'src/components/widget/components/PaymentProcess/Frequency';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {PublicTestimony} from 'src/components/widget/components/PaymentProcess/PublicTestimony';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tformContainerCss,\n\tformCss,\n\tfrequencyAndAmountCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const DefaultFlow = () => {\n\tconst {frequency: fixedFrequency, amount: fixedAmount} = useConfigContext();\n\tconst {\n\t\tfrequency,\n\t\tdonationAmount,\n\t\tselectedPaymentMethod,\n\t\tpaymentRequestAvailable,\n\t\tsubmitError\n\t} = useWidgetContext();\n\tconst submitDonation = useSubmitDonation();\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({\n\t\t\t\t\t\tmethod: selectedPaymentMethod,\n\t\t\t\t\t\tpaymentRequestIsApplePay: paymentRequestAvailable.applePay\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import css from 'src/helpers/css';\n\nexport const giftCardIconCss = css({\n\tdisplay: 'block',\n\twidth: '80px',\n\theight: '80px',\n\talignSelf: 'center',\n\t'& > path': {\n\t\tstrokeWidth: '1'\n\t}\n});\n","import {ErrorMessage} from 'src/components/widget/components/ErrorMessage';\nimport {giftCardIconCss} from 'src/components/widget/components/PaymentProcess/GiftCardFlow/styles';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tformCss,\n\tformContainerCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {TextInput} from 'src/components/widget/components/TextInput';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {GiftIcon} from 'src/components/widget/icons/GiftIcon';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport css from 'src/helpers/css';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const GiftCardFlow = () => {\n\tconst submitDonation = useSubmitDonation();\n\tconst {redeemGiftCardInFlow} = useConfigContext();\n\tconst {giftCardCode, setGiftCardCode, submitError} = useWidgetContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t

    Redeem a gift card to add donation credits to your account.

    \n\t\t\t\t{redeemGiftCardInFlow && (\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetGiftCardCode(event.currentTarget.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.GIFT_CARD})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n\nexport const giftCardCodeInputCss = css({\n\tfontSize: textSize.l.fontSize,\n\tlineHeight: textSize.l.fontSize,\n\tfontWeight: 700\n});\n","import {ErrorMessage} from 'src/components/widget/components/ErrorMessage';\nimport {donationAmountInputCss} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {PublicTestimony} from 'src/components/widget/components/PaymentProcess/PublicTestimony';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tfieldSetCss,\n\tformContainerCss,\n\tformCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {TextInput} from 'src/components/widget/components/TextInput';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport css from 'src/helpers/css';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const StocksFlow = () => {\n\tconst submitDonation = useSubmitDonation();\n\n\tconst {primaryColor} = useConfigContext();\n\n\tconst {\n\t\tstockAmount,\n\t\tstockSymbol,\n\t\tsetStockAmount,\n\t\tsetStockSymbol,\n\t\tsubmitError,\n\t\tsetSubmitError\n\t} = useWidgetContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tWhat is the symbol of the shares?\n\t\t\t\t\t\t\n\t\t\t\t\t\tExample: AAPL\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetStockSymbol(event.currentTarget.value);\n\t\t\t\t\t\t\t\tsetSubmitError(null);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tHow many shares are you donating?\n\t\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetStockAmount(Number(event.currentTarget.value));\n\t\t\t\t\t\t\t\tsetSubmitError(null);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.STOCKS})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import {GridCard} from 'src/components/widget/components/GridCard';\nimport {CryptoFlow} from 'src/components/widget/components/PaymentProcess/CryptoFlow';\nimport {DafFlow} from 'src/components/widget/components/PaymentProcess/DafFlow';\nimport {DefaultFlow} from 'src/components/widget/components/PaymentProcess/DefaultFlow';\nimport {GiftCardFlow} from 'src/components/widget/components/PaymentProcess/GiftCardFlow';\nimport {StocksFlow} from 'src/components/widget/components/PaymentProcess/StocksFlow';\nimport {cardCss} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nconst DonateFlowForPaymentMethod = () => {\n\tconst {selectedPaymentMethod} = useWidgetContext();\n\n\tswitch (selectedPaymentMethod) {\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn ;\n\t\tcase PaymentMethod.STOCKS:\n\t\t\treturn ;\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn ;\n\t\tcase PaymentMethod.GIFT_CARD:\n\t\t\treturn ;\n\t\tdefault:\n\t\t\treturn ;\n\t}\n};\n\nexport const PaymentProcess = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nexport const widgetCss = (height: number | null) =>\n\tcss({\n\t\tbackground: 'white',\n\t\twidth: '100%',\n\t\theight: '100%',\n\t\tborderRadius: 'unset',\n\t\tposition: 'relative',\n\t\toverflow: 'auto',\n\t\tpadding: `0`,\n\t\tpaddingBottom: Spacing.XXL,\n\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\theight: height ? `${height}px` : 'unset',\n\t\t\tbackground: '#f3f6f6',\n\t\t\tminHeight: '378px',\n\t\t\tmaxHeight: `calc(100vh - 2 * ${Spacing.XL})`,\n\t\t\twidth: '1000px',\n\t\t\toverflow: 'unset',\n\t\t\toverflowY: 'scroll',\n\t\t\t/* Hide sc rollbar */\n\t\t\t'-ms-overflow-style': 'none' /* IE and Edge */,\n\t\t\tscrollbarWidth: 'none' /* Firefox */,\n\t\t\t'::-webkit-scrollbar': {\n\t\t\t\tdisplay: 'none'\n\t\t\t},\n\t\t\tborderRadius: Radii.Medium,\n\t\t\tpadding: Spacing.XL\n\t\t}\n\t});\n","import {VNode} from 'preact';\nimport {forwardRef} from 'preact/compat';\nimport {widgetCss} from 'src/components/widget/components/WidgetCard/styles';\n\nexport const WidgetCard = forwardRef<\n\tHTMLDivElement,\n\tVNode<{height: number | null}>['props']\n>(({children, height}, ref) => {\n\treturn (\n\t\t
    \n\t\t\t{children}\n\t\t
    \n\t);\n});\n","import {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {FontFamily} from 'src/components/widget/theme/font-family';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport css from 'src/helpers/css';\n\nexport const overlayCss = css({\n\t...textSize.s,\n\tposition: 'fixed',\n\theight: 'auto',\n\twidth: '100%',\n\tzIndex: 999,\n\ttop: 0,\n\tbottom: 0,\n\tleft: 0,\n\tright: 0,\n\tdisplay: 'flex',\n\tbackground: 'rgba(0, 0, 0, 0.5)',\n\tjustifyContent: 'center',\n\talignItems: 'center',\n\tcolor: COLORS.Text,\n\tfontFamily: FontFamily.BasisGrotesque,\n\tpadding: 0,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: Spacing.XL\n\t},\n\t// reset\n\tboxSizing: 'border-box',\n\t'-webkit-font-smoothing': 'antialiased',\n\t'-moz-osx-font-smoothing': 'grayscale',\n\t'& *': {\n\t\tboxSizing: 'inherit'\n\t},\n\t'& *:before': {\n\t\tboxSizing: 'inherit'\n\t},\n\t'& *:after': {\n\t\tboxSizing: 'inherit'\n\t}\n});\n","import {FunctionalComponent} from 'preact';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {overlayCss} from 'src/components/widget/components/WidgetOverlay/styles';\n\ninterface WdigetOverlayProps {\n\tonClick: JSXInternal.MouseEventHandler;\n}\n\nexport const WidgetOverlay: FunctionalComponent = ({\n\tchildren,\n\tonClick\n}) => {\n\treturn (\n\t\t
    \n\t\t\t{children}\n\t\t
    \n\t);\n};\n","import {JSXInternal} from 'preact/src/jsx';\nimport {Faq} from 'src/components/widget/components/Faq';\nimport {Footer} from 'src/components/widget/components/Footer';\nimport {FundraiserLink} from 'src/components/widget/components/FundraiserLink';\nimport {Grid} from 'src/components/widget/components/Grid';\nimport {Header} from 'src/components/widget/components/Header';\nimport {CloseButton} from 'src/components/widget/components/Header/CloseButton';\nimport {largeScreenCloseButtonCss} from 'src/components/widget/components/Header/CloseButton/styles';\nimport {NonprofitInfo} from 'src/components/widget/components/NonprofitInfo';\nimport {PaymentProcess} from 'src/components/widget/components/PaymentProcess';\nimport {WidgetCard} from 'src/components/widget/components/WidgetCard';\nimport {WidgetOverlay} from 'src/components/widget/components/WidgetOverlay';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useFundraiser} from 'src/components/widget/hooks/useFundraiser';\nimport {useNonprofit} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {LoadingIcon} from 'src/components/widget/icons/LoadingIcon';\nimport {\n\tFundraiserFetchError,\n\tFundraiserFetching\n} from 'src/components/widget/types/Fundraiser';\nimport {\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\n\nconst Widget = () => {\n\tconst {fundraiserSlug} = useConfigContext();\n\tconst {hideWidget} = useWidgetContext();\n\tconst findraiser = useFundraiser();\n\tconst nonprofit = useNonprofit();\n\n\tconst hideOnWrapperClick: JSXInternal.MouseEventHandler = (\n\t\tevent\n\t) => {\n\t\tif (event.target === event.currentTarget) {\n\t\t\thideWidget();\n\t\t}\n\t};\n\n\tif (\n\t\tnonprofit === NonprofitFetchError ||\n\t\t(fundraiserSlug && findraiser === FundraiserFetchError)\n\t) {\n\t\thideWidget();\n\t\treturn null;\n\t}\n\n\tif (\n\t\tnonprofit === NonprofitFetching ||\n\t\t(fundraiserSlug && findraiser === FundraiserFetching)\n\t) {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t);\n};\n\nexport default Widget;\n","import {useEffect} from 'preact/hooks';\nimport {ContextProvider} from 'src/components/widget/context';\nimport Widget from 'src/components/widget/index';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nconst originalOverflow = document.querySelector('body')?.style.overflow;\n\nconst addOverflowToBody = () => {\n\tconst body = document.querySelector('body');\n\tif (body) {\n\t\tbody.style.overflow = 'hidden';\n\t}\n};\n\nconst removeOverflowFromBody = () => {\n\tconst body = document.querySelector('body');\n\n\tif (body) {\n\t\tif (originalOverflow) {\n\t\t\tbody.style.overflow = originalOverflow;\n\t\t\treturn;\n\t\t}\n\n\t\tbody.style.removeProperty('overflow');\n\t}\n};\n\ninterface WidgetLoaderProps {\n\toptions: Partial;\n\thide: () => void;\n}\n\nexport const WidgetLoader = ({options = {}, hide}: WidgetLoaderProps) => {\n\tremoveOverflowFromBody();\n\n\tuseEffect(() => {\n\t\tfunction onPopState() {\n\t\t\thide();\n\t\t\tremoveOverflowFromBody();\n\t\t}\n\n\t\twindow.addEventListener('popstate', onPopState);\n\n\t\treturn () => {\n\t\t\twindow.removeEventListener('popstate', onPopState);\n\t\t};\n\t}, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n\tif (!options.show) {\n\t\t// Not showing\n\t\treturn null;\n\t}\n\n\taddOverflowToBody();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {PaymentProcess} from 'src/components/widget/components/PaymentProcess';\nimport {ContextProvider} from 'src/components/widget/context';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useFundraiser} from 'src/components/widget/hooks/useFundraiser';\nimport {useNonprofit} from 'src/components/widget/hooks/useNonprofit';\nimport {LoadingIcon} from 'src/components/widget/icons/LoadingIcon';\nimport {FundraiserFetching} from 'src/components/widget/types/Fundraiser';\nimport {NonprofitFetching} from 'src/components/widget/types/Nonprofit';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\ninterface FormLoaderProps {\n\toptions: Partial;\n}\n\nexport const FormLoader = ({options = {}}: FormLoaderProps) => {\n\treturn (\n\t\t {\n\t\t\t\t// do nothing\n\t\t\t}}\n\t\t>\n\t\t\t
    \n\t\t\n\t);\n};\n\nconst Form = () => {\n\tconst {fundraiserSlug} = useConfigContext();\n\tconst findraiser = useFundraiser();\n\tconst nonprofit = useNonprofit();\n\n\tif (\n\t\tnonprofit === NonprofitFetching ||\n\t\t(fundraiserSlug && findraiser === FundraiserFetching)\n\t) {\n\t\treturn ;\n\t}\n\n\treturn ;\n};\n","import autoPlayMode from 'src/autoPlayMode';\nimport formOnlyMode from 'src/formOnlyMode';\nimport {shouldEnableAutoPlay} from 'src/helpers/shouldEnableAutoPlay';\nimport {shouldEnableFormOnlyMode} from 'src/helpers/shouldEnableFormOnlyMode';\nimport manualMode from 'src/manualMode';\n\nconst autoPlay = shouldEnableAutoPlay();\nconst formOnly = shouldEnableFormOnlyMode();\n\nif (formOnly) {\n\tformOnlyMode();\n} else if (autoPlay) {\n\tautoPlayMode();\n} else {\n\tmanualMode();\n}\n","import getScriptParameters from 'src/helpers/getScriptParameters';\n\nconst FORM_ONLY_PARAM = 'formOnly';\n\nexport function shouldEnableFormOnlyMode() {\n\tconst parameters = getScriptParameters();\n\n\tif (parameters) {\n\t\treturn parameters[FORM_ONLY_PARAM] === '1';\n\t}\n\n\treturn false;\n}\n","import {render} from 'preact';\nimport {CreateButtonInSelectorProps} from 'src/components/embed-button/types';\nimport {CreateWidgetInSelectorProps} from 'src/components/widget/types';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {loadFonts} from 'src/loadFonts';\nimport {FormLoader} from 'src/loaders/FormLoader';\n\ninterface GlobalExport {\n\tcreateButton: (options: CreateButtonInSelectorProps) => void;\n\tcreateWidget: (options: CreateWidgetInSelectorProps) => void;\n\tsetOptions: (options: Partial) => void;\n\tshowWidget: () => void;\n}\n\ndeclare const window: Window & {\n\teveryDotOrgDonateButton?: GlobalExport;\n};\n\nexport default function formOnlyMode() {\n\tconst DEFAULT_HASH_OPEN_WIDGET = 'donate';\n\n\tconst baseOptions: Partial = {};\n\tconst options = {\n\t\tshow: false,\n\t\topenAt: DEFAULT_HASH_OPEN_WIDGET\n\t};\n\tconst instanceOptions: Partial = {};\n\n\tconst getNode = (element?: Element, selector?: string) =>\n\t\telement ? element : selector ? document.querySelector(selector) : null;\n\n\tloadFonts();\n\n\t/**\n\t * Helper function to debug donate button issues\n\t */\n\tfunction log(...messages: unknown[]): void {\n\t\tconsole.info('Every.org Donate Button:', ...messages);\n\t}\n\n\tlet formContainer: HTMLElement;\n\tlet formMountPoint: HTMLElement;\n\n\tconst mountWidget = () => {\n\t\tdocument.querySelector('#every-shadow-wrapper')?.remove();\n\t\tconst shadowWidgetWrapper = document.createElement('div');\n\t\tshadowWidgetWrapper.id = 'every-shadow-wrapper';\n\t\tformContainer.append(shadowWidgetWrapper);\n\n\t\tformMountPoint = document.createElement('div');\n\t\tshadowWidgetWrapper.attachShadow({mode: 'open'}).append(formMountPoint);\n\n\t\tconst everyShadowStyles = document.createElement('style');\n\t\teveryShadowStyles.id = 'every-shadow-styles';\n\n\t\tformMountPoint.append(everyShadowStyles);\n\t};\n\n\tconst renderWidget = () => {\n\t\tif (!formMountPoint) {\n\t\t\tmountWidget();\n\t\t}\n\n\t\tconst finalOptions: Partial = {\n\t\t\t...options,\n\t\t\t...baseOptions,\n\t\t\t...instanceOptions\n\t\t};\n\n\t\trender(, formMountPoint);\n\t};\n\n\tfunction setOptions(newOptions: Partial) {\n\t\tObject.assign(baseOptions, newOptions);\n\t\trenderWidget();\n\t}\n\n\tconst createWidgetInSelector = ({\n\t\telement,\n\t\tselector,\n\t\t...options\n\t}: CreateWidgetInSelectorProps) => {\n\t\tif (!element && !selector) {\n\t\t\tlog('createWidget():', 'must provide element or selector');\n\t\t}\n\n\t\tconst node = getNode(element, selector);\n\t\tif (!node) {\n\t\t\tlog('createWidget():', 'element or selector not found');\n\t\t\treturn;\n\t\t}\n\n\t\tif (!options.nonprofitSlug) {\n\t\t\tlog('createWidget():', 'must provide nonprofitSlug');\n\t\t\treturn;\n\t\t}\n\n\t\tformContainer = node as HTMLElement;\n\n\t\tObject.assign(baseOptions, options);\n\t\trenderWidget();\n\t};\n\n\twindow.everyDotOrgDonateButton = {\n\t\tcreateButton: () => {\n\t\t\tlog(\n\t\t\t\t'createButton function is not available in formOnlyMode. Use createWidget instead.'\n\t\t\t);\n\t\t},\n\t\tshowWidget: () => {\n\t\t\tlog(\n\t\t\t\t'showWidget function is not available in formOnlyMode. Use createWidget instead.'\n\t\t\t);\n\t\t},\n\t\tsetOptions,\n\t\tcreateWidget: createWidgetInSelector\n\t};\n}\n","import {render} from 'preact';\nimport EmbedButton from 'src/components/embed-button';\nimport {CreateButtonInSelectorProps} from 'src/components/embed-button/types';\nimport {CreateWidgetInSelectorProps} from 'src/components/widget/types';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {loadFonts} from 'src/loadFonts';\nimport {WidgetLoader} from 'src/loaders/Widgetloader';\n\ninterface GlobalExport {\n\tcreateButton: (options: CreateButtonInSelectorProps) => void;\n\tcreateWidget: (options: CreateWidgetInSelectorProps) => void;\n\tsetOptions: (options: Partial) => void;\n\tshowWidget: () => void;\n}\n\ndeclare const window: Window & {\n\teveryDotOrgDonateButton?: GlobalExport;\n};\n\nexport default function manualMode() {\n\tconst DEFAULT_HASH_OPEN_WIDGET = 'donate';\n\n\tconst baseOptions: Partial = {};\n\tconst options = {\n\t\tshow: false,\n\t\topenAt: DEFAULT_HASH_OPEN_WIDGET\n\t};\n\tlet instanceOptions: Partial = {};\n\n\tconst getNodeList = (element?: Element, selector?: string) =>\n\t\telement ? [element] : selector && document.querySelectorAll(selector);\n\n\tloadFonts();\n\n\t/**\n\t * Helper function to debug donate button issues\n\t */\n\tfunction log(...messages: unknown[]): void {\n\t\tconsole.info('Every.org Donate Button:', ...messages);\n\t}\n\n\tlet widgetMountPoint: HTMLElement;\n\n\tconst mountWidget = () => {\n\t\tdocument.querySelector('#every-shadow-wrapper')?.remove();\n\t\tconst shadowWidgetWrapper = document.createElement('div');\n\t\tshadowWidgetWrapper.id = 'every-shadow-wrapper';\n\t\tshadowWidgetWrapper.style.position = 'absolute';\n\t\tshadowWidgetWrapper.style.zIndex = '20000000';\n\t\tdocument.body.append(shadowWidgetWrapper);\n\n\t\twidgetMountPoint = document.createElement('div');\n\t\tshadowWidgetWrapper.attachShadow({mode: 'open'}).append(widgetMountPoint);\n\n\t\tconst everyShadowStyles = document.createElement('style');\n\t\teveryShadowStyles.id = 'every-shadow-styles';\n\n\t\twidgetMountPoint.append(everyShadowStyles);\n\t};\n\n\tconst renderWidget = () => {\n\t\tif (!widgetMountPoint) {\n\t\t\tmountWidget();\n\t\t}\n\n\t\tconst hash = window.location?.hash;\n\t\tconst shouldShowWidget =\n\t\t\thash ===\n\t\t\t`#${\n\t\t\t\tinstanceOptions?.openAt ?? baseOptions?.openAt ?? options?.openAt ?? ''\n\t\t\t}`;\n\n\t\tif (shouldShowWidget) {\n\t\t\tObject.assign(options, {show: true});\n\t\t}\n\n\t\tconst finalOptions: Partial = {\n\t\t\t...options,\n\t\t\t...baseOptions,\n\t\t\t...instanceOptions\n\t\t};\n\n\t\trender(\n\t\t\t,\n\t\t\twidgetMountPoint\n\t\t);\n\t};\n\n\tfunction showWidget() {\n\t\tObject.assign(options, {show: true});\n\t\trenderWidget();\n\t}\n\n\tfunction hideWidget() {\n\t\tObject.assign(options, {show: false});\n\t\trenderWidget();\n\t}\n\n\tfunction setOptions(newOptions: Partial) {\n\t\tObject.assign(baseOptions, newOptions);\n\t\trenderWidget();\n\t}\n\n\tfunction updateOptionsAndShowCb(newOptions: WidgetConfig) {\n\t\tconst optionsCopy = {...newOptions};\n\t\tObject.assign(options, {\n\t\t\topenAt: optionsCopy.openAt ?? DEFAULT_HASH_OPEN_WIDGET\n\t\t});\n\t\treturn (event: any) => {\n\t\t\tevent.preventDefault();\n\t\t\tinstanceOptions = optionsCopy;\n\t\t\tshowWidget();\n\t\t};\n\t}\n\n\tconst createButtonInSelector = ({\n\t\telement,\n\t\tselector,\n\t\t...options\n\t}: CreateButtonInSelectorProps) => {\n\t\tif (!element && !selector && !options.nonprofitSlug) {\n\t\t\tlog(\n\t\t\t\t'createButton():',\n\t\t\t\t'must provide element or selector or nonprofitSlug'\n\t\t\t);\n\t\t}\n\n\t\tconst nodes = getNodeList(element, selector);\n\n\t\tif (!nodes) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const buttonContainer of nodes) {\n\t\t\t// Search for an Every.org link inside the container\n\t\t\tconst buttonLink = buttonContainer.querySelector('a') ?? undefined;\n\t\t\tif (!options.nonprofitSlug && !buttonLink) {\n\t\t\t\tlog('no link in container', buttonContainer);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst href = buttonLink?.getAttribute('href') ?? undefined;\n\n\t\t\tif (!options.nonprofitSlug && !href) {\n\t\t\t\tlog('link lacks href', buttonLink);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We preserve it over any custom config passed\n\t\t\tconst finalOptions = {\n\t\t\t\t...instanceOptions,\n\t\t\t\t...options\n\t\t\t};\n\n\t\t\trender(, buttonContainer, buttonLink);\n\t\t}\n\t};\n\n\tconst createWidgetInSelector = ({\n\t\telement,\n\t\tselector,\n\t\t...options\n\t}: CreateWidgetInSelectorProps) => {\n\t\tif (!element && !selector) {\n\t\t\tlog('createWidget():', 'must provide element or selector');\n\t\t}\n\n\t\tconst nodes = getNodeList(element, selector);\n\t\tif (!nodes) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!options.nonprofitSlug) {\n\t\t\tlog('createWidget():', 'must provide nonprofitSlug');\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const node of nodes) {\n\t\t\tnode.addEventListener('click', updateOptionsAndShowCb(options));\n\t\t}\n\n\t\tObject.assign(baseOptions, options);\n\t\trenderWidget();\n\t};\n\n\twindow.everyDotOrgDonateButton = {\n\t\tcreateButton: createButtonInSelector,\n\t\tshowWidget,\n\t\tsetOptions,\n\t\tcreateWidget: createWidgetInSelector\n\t};\n}\n","import { EMPTY_ARR } from './constants';\n\nexport const isArray = Array.isArray;\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-ignore We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n","import { slice } from './util';\nimport options from './options';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * constructor for this virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array} [children] The children of the virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != null) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, null);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\n\t\t// be set to dom.nextSibling which can return `null` and it is important\n\t\t// to be able to distinguish between an uninitialized _nextDom and\n\t\t// a _nextDom that has been set to `null`\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: original == null ? ++vnodeId : original\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == null && options.vnode != null) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: null };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is import('./internal').VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor === undefined;\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)\n\t\t\t: null;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != null && sibling._dom != null) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet vnode = component._vnode,\n\t\toldDom = vnode._dom,\n\t\tparentDom = component._parentDom;\n\n\tif (parentDom) {\n\t\tlet commitQueue = [],\n\t\t\trefQueue = [];\n\t\tconst oldVNode = assign({}, vnode);\n\t\toldVNode._original = vnode._original + 1;\n\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tvnode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tparentDom.ownerSVGElement !== undefined,\n\t\t\tvnode._hydrating != null ? [oldDom] : null,\n\t\t\tcommitQueue,\n\t\t\toldDom == null ? getDomSibling(vnode) : oldDom,\n\t\t\tvnode._hydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\tcommitRoot(commitQueue, vnode, refQueue);\n\n\t\tif (vnode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(vnode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\n\t\tvnode._dom = vnode._component.base = null;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != null && child._dom != null) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet c;\n\trerenderQueue.sort(depthSort);\n\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t// process() calls from getting scheduled while `queue` is still being consumed.\n\twhile ((c = rerenderQueue.shift())) {\n\t\tif (c._dirty) {\n\t\t\tlet renderQueueLength = rerenderQueue.length;\n\t\t\trenderComponent(c);\n\t\t\tif (rerenderQueue.length > renderQueueLength) {\n\t\t\t\t// When i.e. rerendering a provider additional new items can be injected, we want to\n\t\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t\t// single pass\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\t\t}\n\t}\n\tprocess._rerenderCount = 0;\n}\n\nprocess._rerenderCount = 0;\n","import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport { EMPTY_OBJ, EMPTY_ARR } from '../constants';\nimport { isArray } from '../util';\nimport { getDomSibling } from '../component';\n\n/**\n * Diff the children of a virtual node\n * @param {import('../internal').PreactElement} parentDom The DOM element whose\n * children are being diffed\n * @param {import('../internal').ComponentChildren[]} renderResult\n * @param {import('../internal').VNode} newParentVNode The new virtual\n * node whose children should be diff'ed against oldParentVNode\n * @param {import('../internal').VNode} oldParentVNode The old virtual\n * node whose children should be diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by getChildContext\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet i,\n\t\tj,\n\t\toldVNode,\n\t\tchildVNode,\n\t\tnewDom,\n\t\tfirstChildDom,\n\t\tskew = 0;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet oldChildrenLength = oldChildren.length,\n\t\tremainingOldChildren = oldChildrenLength,\n\t\tnewChildrenLength = renderResult.length;\n\n\tnewParentVNode._children = [];\n\tfor (i = 0; i < newChildrenLength; i++) {\n\t\tchildVNode = renderResult[i];\n\n\t\tif (\n\t\t\tchildVNode == null ||\n\t\t\ttypeof childVNode == 'boolean' ||\n\t\t\ttypeof childVNode == 'function'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = null;\n\t\t}\n\t\t// If this newVNode is being reused (e.g.
    {reuse}{reuse}
    ) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tnull,\n\t\t\t\tchildVNode,\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t} else if (isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if (childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t// const reuse =
    \n\t\t\t//
    {reuse}{reuse}
    \n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tchildVNode.ref ? childVNode.ref : null,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\t// Terser removes the `continue` here and wraps the loop body\n\t\t// in a `if (childVNode) { ... } condition\n\t\tif (childVNode == null) {\n\t\t\toldVNode = oldChildren[i];\n\t\t\tif (oldVNode && oldVNode.key == null && oldVNode._dom) {\n\t\t\t\tif (oldVNode._dom == oldDom) {\n\t\t\t\t\toldDom = getDomSibling(oldVNode);\n\t\t\t\t}\n\n\t\t\t\tunmount(oldVNode, oldVNode, false);\n\t\t\t\toldChildren[i] = null;\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\tlet skewedIndex = i + skew;\n\t\tconst matchingIndex = findMatchingIndex(\n\t\t\tchildVNode,\n\t\t\toldChildren,\n\t\t\tskewedIndex,\n\t\t\tremainingOldChildren\n\t\t);\n\n\t\tif (matchingIndex === -1) {\n\t\t\toldVNode = EMPTY_OBJ;\n\t\t} else {\n\t\t\toldVNode = oldChildren[matchingIndex] || EMPTY_OBJ;\n\t\t\toldChildren[matchingIndex] = undefined;\n\t\t\tremainingOldChildren--;\n\t\t}\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\tnewDom = childVNode._dom;\n\t\tif ((j = childVNode.ref) && oldVNode.ref != j) {\n\t\t\tif (oldVNode.ref) {\n\t\t\t\tapplyRef(oldVNode.ref, null, childVNode);\n\t\t\t}\n\t\t\trefQueue.push(j, childVNode._component || newDom, childVNode);\n\t\t}\n\n\t\tif (newDom != null) {\n\t\t\tif (firstChildDom == null) {\n\t\t\t\tfirstChildDom = newDom;\n\t\t\t}\n\n\t\t\tlet isMounting = oldVNode === EMPTY_OBJ || oldVNode._original === null;\n\t\t\tif (isMounting) {\n\t\t\t\tif (matchingIndex == -1) {\n\t\t\t\t\tskew--;\n\t\t\t\t}\n\t\t\t} else if (matchingIndex !== skewedIndex) {\n\t\t\t\tif (matchingIndex === skewedIndex + 1) {\n\t\t\t\t\tskew++;\n\t\t\t\t} else if (matchingIndex > skewedIndex) {\n\t\t\t\t\tif (remainingOldChildren > newChildrenLength - skewedIndex) {\n\t\t\t\t\t\tskew += matchingIndex - skewedIndex;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// ### Change from keyed: I think this was missing from the algo...\n\t\t\t\t\t\tskew--;\n\t\t\t\t\t}\n\t\t\t\t} else if (matchingIndex < skewedIndex) {\n\t\t\t\t\tif (matchingIndex == skewedIndex - 1) {\n\t\t\t\t\t\tskew = matchingIndex - skewedIndex;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tskew = 0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tskew = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tskewedIndex = i + skew;\n\n\t\t\tif (\n\t\t\t\ttypeof childVNode.type == 'function' &&\n\t\t\t\t(matchingIndex !== skewedIndex ||\n\t\t\t\t\toldVNode._children === childVNode._children)\n\t\t\t) {\n\t\t\t\toldDom = reorderChildren(childVNode, oldDom, parentDom);\n\t\t\t} else if (\n\t\t\t\ttypeof childVNode.type != 'function' &&\n\t\t\t\t(matchingIndex !== skewedIndex || isMounting)\n\t\t\t) {\n\t\t\t\toldDom = placeChild(parentDom, newDom, oldDom);\n\t\t\t} else if (childVNode._nextDom !== undefined) {\n\t\t\t\t// Only Fragments or components that return Fragment like VNodes will\n\t\t\t\t// have a non-undefined _nextDom. Continue the diff from the sibling\n\t\t\t\t// of last DOM child of this child VNode\n\t\t\t\toldDom = childVNode._nextDom;\n\n\t\t\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because\n\t\t\t\t// it is only used by `diffChildren` to determine where to resume the diff after\n\t\t\t\t// diffing Components and Fragments. Once we store it the nextDOM local var, we\n\t\t\t\t// can clean up the property\n\t\t\t\tchildVNode._nextDom = undefined;\n\t\t\t} else {\n\t\t\t\toldDom = newDom.nextSibling;\n\t\t\t}\n\n\t\t\tif (typeof newParentVNode.type == 'function') {\n\t\t\t\t// Because the newParentVNode is Fragment-like, we need to set it's\n\t\t\t\t// _nextDom property to the nextSibling of its last child DOM node.\n\t\t\t\t//\n\t\t\t\t// `oldDom` contains the correct value here because if the last child\n\t\t\t\t// is a Fragment-like, then oldDom has already been set to that child's _nextDom.\n\t\t\t\t// If the last child is a DOM VNode, then oldDom will be set to that DOM\n\t\t\t\t// node's nextSibling.\n\t\t\t\tnewParentVNode._nextDom = oldDom;\n\t\t\t}\n\t\t}\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\t// Remove remaining oldChildren if there are any.\n\tfor (i = oldChildrenLength; i--; ) {\n\t\tif (oldChildren[i] != null) {\n\t\t\tif (\n\t\t\t\ttypeof newParentVNode.type == 'function' &&\n\t\t\t\toldChildren[i]._dom != null &&\n\t\t\t\toldChildren[i]._dom == newParentVNode._nextDom\n\t\t\t) {\n\t\t\t\t// If the newParentVNode.__nextDom points to a dom node that is about to\n\t\t\t\t// be unmounted, then get the next sibling of that vnode and set\n\t\t\t\t// _nextDom to it\n\n\t\t\t\tnewParentVNode._nextDom = oldChildren[i]._dom.nextSibling;\n\t\t\t}\n\n\t\t\tunmount(oldChildren[i], oldChildren[i]);\n\t\t}\n\t}\n}\n\nfunction reorderChildren(childVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\tlet c = childVNode._children;\n\n\tlet tmp = 0;\n\tfor (; c && tmp < c.length; tmp++) {\n\t\tlet vnode = c[tmp];\n\t\tif (vnode) {\n\t\t\t// We typically enter this code path on sCU bailout, where we copy\n\t\t\t// oldVNode._children to newVNode._children. If that is the case, we need\n\t\t\t// to update the old children's _parent pointer to point to the newVNode\n\t\t\t// (childVNode here).\n\t\t\tvnode._parent = childVNode;\n\n\t\t\tif (typeof vnode.type == 'function') {\n\t\t\t\toldDom = reorderChildren(vnode, oldDom, parentDom);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(parentDom, vnode._dom, oldDom);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {import('../index').ComponentChildren} children The unflattened\n * children of a virtual node\n * @returns {import('../internal').VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == null || typeof children == 'boolean') {\n\t} else if (isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\nfunction placeChild(parentDom, newDom, oldDom) {\n\tif (oldDom == null || oldDom.parentNode !== parentDom) {\n\t\tparentDom.insertBefore(newDom, null);\n\t} else if (newDom != oldDom || newDom.parentNode == null) {\n\t\tparentDom.insertBefore(newDom, oldDom);\n\t}\n\n\treturn newDom.nextSibling;\n}\n\n/**\n * @param {import('../internal').VNode | string} childVNode\n * @param {import('../internal').VNode[]} oldChildren\n * @param {number} skewedIndex\n * @param {number} remainingOldChildren\n * @returns {number}\n */\nfunction findMatchingIndex(\n\tchildVNode,\n\toldChildren,\n\tskewedIndex,\n\tremainingOldChildren\n) {\n\tconst key = childVNode.key;\n\tconst type = childVNode.type;\n\tlet x = skewedIndex - 1;\n\tlet y = skewedIndex + 1;\n\tlet oldVNode = oldChildren[skewedIndex];\n\n\tif (\n\t\toldVNode === null ||\n\t\t(oldVNode && key == oldVNode.key && type === oldVNode.type)\n\t) {\n\t\treturn skewedIndex;\n\t} else if (remainingOldChildren > (oldVNode != null ? 1 : 0)) {\n\t\twhile (x >= 0 || y < oldChildren.length) {\n\t\t\tif (x >= 0) {\n\t\t\t\toldVNode = oldChildren[x];\n\t\t\t\tif (oldVNode && key == oldVNode.key && type === oldVNode.type) {\n\t\t\t\t\treturn x;\n\t\t\t\t}\n\t\t\t\tx--;\n\t\t\t}\n\n\t\t\tif (y < oldChildren.length) {\n\t\t\t\toldVNode = oldChildren[y];\n\t\t\t\tif (oldVNode && key == oldVNode.key && type === oldVNode.type) {\n\t\t\t\t\treturn y;\n\t\t\t\t}\n\t\t\t\ty++;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn -1;\n}\n","import { IS_NON_DIMENSIONAL } from '../constants';\nimport options from '../options';\n\n/**\n * Diff the old and new properties of a VNode and apply changes to the DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to apply\n * changes to\n * @param {object} newProps The new props\n * @param {object} oldProps The old props\n * @param {boolean} isSvg Whether or not this node is an SVG node\n * @param {boolean} hydrate Whether or not we are in hydration mode\n */\nexport function diffProps(dom, newProps, oldProps, isSvg, hydrate) {\n\tlet i;\n\n\tfor (i in oldProps) {\n\t\tif (i !== 'children' && i !== 'key' && !(i in newProps)) {\n\t\t\tsetProperty(dom, i, null, oldProps[i], isSvg);\n\t\t}\n\t}\n\n\tfor (i in newProps) {\n\t\tif (\n\t\t\t(!hydrate || typeof newProps[i] == 'function') &&\n\t\t\ti !== 'children' &&\n\t\t\ti !== 'key' &&\n\t\t\ti !== 'value' &&\n\t\t\ti !== 'checked' &&\n\t\t\toldProps[i] !== newProps[i]\n\t\t) {\n\t\t\tsetProperty(dom, i, newProps[i], oldProps[i], isSvg);\n\t\t}\n\t}\n}\n\nfunction setStyle(style, key, value) {\n\tif (key[0] === '-') {\n\t\tstyle.setProperty(key, value == null ? '' : value);\n\t} else if (value == null) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, isSvg) {\n\tlet useCapture;\n\n\to: if (name === 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] !== oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] === 'o' && name[1] === 'n') {\n\t\tuseCapture = name !== (name = name.replace(/(PointerCapture)$|Capture$/, '$1'));\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (name.toLowerCase() in dom) name = name.toLowerCase().slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\t\tdom.addEventListener(name, handler, useCapture);\n\t\t\t}\n\t\t} else {\n\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\tdom.removeEventListener(name, handler, useCapture);\n\t\t}\n\t} else if (name !== 'dangerouslySetInnerHTML') {\n\t\tif (isSvg) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname !== 'width' &&\n\t\t\tname !== 'height' &&\n\t\t\tname !== 'href' &&\n\t\t\tname !== 'list' &&\n\t\t\tname !== 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname !== 'tabIndex' &&\n\t\t\tname !== 'download' &&\n\t\t\tname !== 'rowSpan' &&\n\t\t\tname !== 'colSpan' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == null ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value === 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != null && (value !== false || name[4] === '-')) {\n\t\t\tdom.setAttribute(name, value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n\treturn this._listeners[e.type + false](options.event ? options.event(e) : e);\n}\n\nfunction eventProxyCapture(e) {\n\treturn this._listeners[e.type + true](options.event ? options.event(e) : e);\n}\n","import { EMPTY_OBJ } from '../constants';\nimport { Component, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { diffProps, setProperty } from './props';\nimport { assign, isArray, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').PreactElement} parentDom The parent of the DOM element\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by getChildContext\n * @param {boolean} isSvg Whether or not this element is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== undefined) return null;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._hydrating != null) {\n\t\tisHydrating = oldVNode._hydrating;\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\t// if we resume, we want the tree to be \"unlocked\"\n\t\tnewVNode._hydrating = null;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\touter: if (typeof newType == 'function') {\n\t\ttry {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\t\t// @ts-ignore The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-ignore Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new Component(newProps, componentContext);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (c._nextState == null) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\n\t\t\tif (newType.getDerivedStateFromProps != null) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\t\t\tc._vnode = newVNode;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tc.componentWillMount != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidMount != null) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!c._force &&\n\t\t\t\t\t((c.shouldComponentUpdate != null &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\t\tnewVNode._original === oldVNode._original)\n\t\t\t\t) {\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) {\n\t\t\t\t\t\t// When we are dealing with a bail because of sCU we have to update\n\t\t\t\t\t\t// the props, state and dirty-state.\n\t\t\t\t\t\t// when we are dealing with strict-equality we don't as the child could still\n\t\t\t\t\t\t// be dirtied see #3883\n\t\t\t\t\t\tc.props = newProps;\n\t\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t\tc._dirty = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.forEach(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t\t}\n\t\t\t\t\tc._stateCallbacks = [];\n\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != null) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidUpdate != null) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc._parentDom = parentDom;\n\t\t\tc._force = false;\n\n\t\t\tlet renderHook = options._render,\n\t\t\t\tcount = 0;\n\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\tc.state = c._nextState;\n\t\t\t\tc._dirty = false;\n\n\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t}\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t} else {\n\t\t\t\tdo {\n\t\t\t\t\tc._dirty = false;\n\t\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\t\t// Handle setState called in render, see #2553\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t} while (c._dirty && ++count < 25);\n\t\t\t}\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != null) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != null && tmp.type === Fragment && tmp.key == null;\n\t\t\tlet renderResult = isTopLevelFragment ? tmp.props.children : tmp;\n\n\t\t\tdiffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tisArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._hydrating = null;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = null;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tnewVNode._original = null;\n\t\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\t\tif (isHydrating || excessDomChildren != null) {\n\t\t\t\tnewVNode._dom = oldDom;\n\t\t\t\tnewVNode._hydrating = !!isHydrating;\n\t\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = null;\n\t\t\t\t// ^ could possibly be simplified to:\n\t\t\t\t// excessDomChildren.length = 0;\n\t\t\t}\n\t\t\toptions._catchError(e, newVNode, oldVNode);\n\t\t}\n\t} else if (\n\t\texcessDomChildren == null &&\n\t\tnewVNode._original === oldVNode._original\n\t) {\n\t\tnewVNode._children = oldVNode._children;\n\t\tnewVNode._dom = oldVNode._dom;\n\t} else {\n\t\tnewVNode._dom = diffElementNodes(\n\t\t\toldVNode._dom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\t}\n\n\tif ((tmp = options.diffed)) tmp(newVNode);\n}\n\n/**\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').VNode} root\n */\nexport function commitRoot(commitQueue, root, refQueue) {\n\tfor (let i = 0; i < refQueue.length; i++) {\n\t\tapplyRef(refQueue[i], refQueue[++i], refQueue[++i]);\n\t}\n\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-ignore Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-ignore See above ts-ignore on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {import('../internal').PreactElement} dom The DOM element representing\n * the virtual nodes being diffed\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {*} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n * @returns {import('../internal').PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating,\n\trefQueue\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = newVNode.type;\n\tlet i = 0;\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tif (nodeType === 'svg') isSvg = true;\n\n\tif (excessDomChildren != null) {\n\t\tfor (; i < excessDomChildren.length; i++) {\n\t\t\tconst child = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tchild &&\n\t\t\t\t'setAttribute' in child === !!nodeType &&\n\t\t\t\t(nodeType ? child.localName === nodeType : child.nodeType === 3)\n\t\t\t) {\n\t\t\t\tdom = child;\n\t\t\t\texcessDomChildren[i] = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == null) {\n\t\tif (nodeType === null) {\n\t\t\t// @ts-ignore createTextNode returns Text, we expect PreactElement\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tif (isSvg) {\n\t\t\tdom = document.createElementNS(\n\t\t\t\t'http://www.w3.org/2000/svg',\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType\n\t\t\t);\n\t\t} else {\n\t\t\tdom = document.createElement(\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType,\n\t\t\t\tnewProps.is && newProps\n\t\t\t);\n\t\t}\n\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = null;\n\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\n\t\tisHydrating = false;\n\t}\n\n\tif (nodeType === null) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data !== newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\tlet oldHtml = oldProps.dangerouslySetInnerHTML;\n\t\tlet newHtml = newProps.dangerouslySetInnerHTML;\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tif (!isHydrating) {\n\t\t\t// But, if we are in a situation where we are using existing DOM (e.g. replaceNode)\n\t\t\t// we should read the existing DOM attributes to diff them\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\toldProps = {};\n\t\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\t\toldProps[dom.attributes[i].name] = dom.attributes[i].value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (newHtml || oldHtml) {\n\t\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\t\tif (\n\t\t\t\t\t!newHtml ||\n\t\t\t\t\t((!oldHtml || newHtml.__html != oldHtml.__html) &&\n\t\t\t\t\t\tnewHtml.__html !== dom.innerHTML)\n\t\t\t\t) {\n\t\t\t\t\tdom.innerHTML = (newHtml && newHtml.__html) || '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdiffProps(dom, newProps, oldProps, isSvg, isHydrating);\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\ti = newVNode.props.children;\n\t\t\tdiffChildren(\n\t\t\t\tdom,\n\t\t\t\tisArray(i) ? i : [i],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg && nodeType !== 'foreignObject',\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tif (excessDomChildren[i] != null) removeNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// (as above, don't diff props during hydration)\n\t\tif (!isHydrating) {\n\t\t\tif (\n\t\t\t\t'value' in newProps &&\n\t\t\t\t(i = newProps.value) !== undefined &&\n\t\t\t\t// #2756 For the -element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(i !== dom.value ||\n\t\t\t\t\t(nodeType === 'progress' && !i) ||\n\t\t\t\t\t// This is only for IE 11 to fix