/home/altere25/labratnyc.com/wp-content/plugins/woocommerce-payments/dist
Edit: /home/altere25/labratnyc.com/wp-content/plugins/woocommerce-payments/dist/tos.js (7475B)
(()=>{var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};(()=>{var t;globalThis.importScripts&&(t=globalThis.location+"");var o=globalThis.document;if(!t&&o&&(o.currentScript&&"SCRIPT"===o.currentScript.tagName.toUpperCase()&&(t=o.currentScript.src),!t)){var n=o.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&(!t||!/^http(s?):/.test(t));)t=n[s--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t})(),e.p=window.wcpayAssets.url,(()=>{"use strict";const t=window.React,o=window.ReactDOM,n=window.wp.i18n;function s(e){return e.startsWith("{{/")?{type:"componentClose",value:e.replace(/\W/g,"")}:e.endsWith("/}}")?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.startsWith("{{")?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}function r(e,o){let n,s,c=[];for(let t=0;t
p()({path:"/wc/v3/payments/tos",method:"POST",data:{accept:e}}),u=async()=>{const e=wcpay_tos_settings.trackStripeConnected;wcTracks.isEnabled&&e&&(((e,t={})=>{if(window.wcpaySettings){Object.assign(t,{is_test_mode:wcpaySettings.testMode,jetpack_connected:wcpaySettings.isJetpackConnected,wcpay_version:wcpaySettings.version,woo_country_code:wcpaySettings.connect.country,hosting_provider:wcpaySettings.trackingInfo?.hosting_provider});for(const e in t)void 0===t[e]&&delete t[e]}d()(()=>{(wc?.tracks?.recordEvent??wcTracks.recordEvent)(e,t)})})("wcpay_stripe_connected",{is_existing_stripe_account:e.is_existing_stripe_account}),p()({path:"/wc/v3/payments/tos/stripe_track_connected",method:"POST"}))},y=window.ReactJSXRuntime,_=e=>(0,y.jsx)(a.ExternalLink,{...e,href:"https://wordpress.com/tos"}),h=({onAccept:e,onDecline:t,isBusy:o,hasError:s})=>{const r=(0,n.sprintf)((0,n.__)("%s: Terms of Service","woocommerce-payments"),"WooPayments"),i=c({mixedString:(0,n.sprintf)((0,n.__)("To continue using %s, please review and agree to our {{link}}Terms of Service{{/link}}. By clicking “Accept” you agree to the Terms of Service.","woocommerce-payments"),"WooPayments"),components:{link:(0,y.jsx)(_,{})}});return(0,y.jsxs)(a.Modal,{title:r,isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,onRequestClose:t,className:"woocommerce-payments__tos-modal",children:[s&&(0,y.jsx)(a.Notice,{status:"error",isDismissible:!1,className:"woocommerce-payments__tos-error",children:(0,n.__)("Something went wrong. Please try accepting the Terms of Service again!","woocommerce-payments")}),(0,y.jsxs)("div",{className:"woocommerce-payments__tos-wrapper",children:[(0,y.jsx)("div",{className:"woocommerce-payments__tos-modal-message",children:i}),(0,y.jsxs)("div",{className:"woocommerce-payments__tos-footer",children:[(0,y.jsx)(a.Button,{variant:"secondary",onClick:t,disabled:o,__next40pxDefaultSize:!0,children:(0,n.__)("Decline","woocommerce-payments")}),(0,y.jsx)(a.Button,{variant:"primary",onClick:e,isBusy:o,__next40pxDefaultSize:!0,children:(0,n.__)("Accept","woocommerce-payments")})]})]})]})},g=({onDisable:e,onCancel:t,isBusy:o,hasError:s})=>{const r=(0,n.sprintf)((0,n.__)("Disable %s","woocommerce-payments"),"WooPayments"),i=c({mixedString:(0,n.sprintf)((0,n.__)("By declining our {{link}}Terms of Service{{/link}}, you’ll no longer be able to capture credit card payments using %s. Your previous transaction and payout data will still be available.","woocommerce-payments"),"WooPayments"),components:{link:(0,y.jsx)(_,{})}});return(0,y.jsxs)(a.Modal,{title:r,isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,onRequestClose:e,className:"woocommerce-payments__tos-modal",children:[s&&(0,y.jsx)(a.Notice,{status:"error",isDismissible:!1,className:"woocommerce-payments__tos-error",children:(0,n.__)("Something went wrong. Please try again!","woocommerce-payments")}),(0,y.jsxs)("div",{className:"woocommerce-payments__tos-wrapper",children:[(0,y.jsx)("div",{className:"woocommerce-payments__tos-modal-message",children:i}),(0,y.jsxs)("div",{className:"woocommerce-payments__tos-footer",children:[(0,y.jsx)(a.Button,{variant:"tertiary",onClick:t,isBusy:o,__next40pxDefaultSize:!0,children:(0,n.__)("Back","woocommerce-payments")}),(0,y.jsx)(a.Button,{variant:"primary",onClick:e,isBusy:o,__next40pxDefaultSize:!0,children:(0,n.__)("Disable","woocommerce-payments")})]})]})]})},f=()=>{const[e,o]=(0,t.useState)(!0),[n,s]=(0,t.useState)(!1),[r,c]=(0,t.useState)(!1),[a,l]=(0,t.useState)(!1),[p,m]=(0,t.useState)(!1),d=()=>o(!1),_=()=>s(!1);return n?(0,y.jsx)(g,{onDisable:async()=>{try{m(!1),c(!0),await w({accept:!1}),_(),window.location.href=(0,i.addQueryArgs)((e={page:"wc-settings",tab:"checkout"},(0,i.addQueryArgs)("admin.php",e)),{"tos-disabled":1})}catch(e){m(!0)}finally{c(!1)}var e},onCancel:()=>{_(),o(!0)},isBusy:r,hasError:p}):e?(0,y.jsx)(h,{onAccept:async()=>{try{l(!1),c(!0),await w({accept:!0}),u(),d()}catch(e){l(!0)}finally{c(!1)}},onDecline:()=>{d(),s(!0)},isBusy:r,hasError:a}):null},v=window.wp.data;wcpay_tos_settings.tosAgreementDeclined&&window.addEventListener("load",()=>{const{settingsUrl:e}=wcpay_tos_settings;(e=>{const{createInfoNotice:t}=(0,v.dispatch)("core/notices");t((0,n.sprintf)((0,n.__)("Disabled %s","woocommerce-payments"),"WooPayments"),{actions:[{label:(0,n.__)("Undo","woocommerce-payments"),onClick:async()=>{try{await(async()=>p()({path:"/wc/v3/payments/tos/reactivate",method:"POST"}))()}finally{window.location=e}}}]})})(e)}),wcpay_tos_settings.tosAgreementRequired?function(){const e=document.createElement("div");e.id="wcpay-tos-container",document.body.appendChild(e),(0,o.createRoot)(e).render((0,y.jsx)(f,{}))}():u()})()})();