PK śqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/tiktechtok.org/wp-content/plugins/woocommerce-payments/dist/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //home/trave494/tiktechtok.org/wp-content/plugins/woocommerce-payments/dist/tos.js

/*! For license information please see tos.js.LICENSE.txt */
(()=>{var e={4184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var s=o.apply(null,n);s&&e.push(s)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},9588:e=>{e.exports=function(e,t){var n,r,o=0;function i(){var i,s,a=n,c=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(s=0;s<c;s++)if(a.args[s]!==arguments[s]){a=a.next;continue e}return a!==n&&(a===r&&(r=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n,a.prev=null,n.prev=a,n=a),a.val}a=a.next}for(i=new Array(c),s=0;s<c;s++)i[s]=arguments[s];return a={args:i,val:e.apply(null,i)},n?(n.prev=a,a.next=n):r=a,o===t.maxSize?(r=r.prev).next=null:o++,n=a,a.val}return t=t||{},i.clear=function(){n=null,r=null,o=0},i}},4155:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var a,c=[],l=!1,u=-1;function d(){l&&a&&(l=!1,a.length?c=a.concat(c):u=-1,c.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(a=c,c=[];++u<t;)a&&a[u].run();u=-1,t=c.length}a=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function f(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new m(e,t)),1!==c.length||l||s(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=f,r.addListener=f,r.once=f,r.off=f,r.removeListener=f,r.removeAllListeners=f,r.emit=f,r.prependListener=f,r.prependOnceListener=f,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),n.p=window.wcpayAssets.url,(()=>{"use strict";const e=window.wp.element,t=window.React,r=window.ReactDOM;var o=n.n(r);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}const s=window.wp.i18n;function a(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 c(e,n){let r,o,i=[];for(let t=0;t<e.length;t++){const s=e[t];if("string"!==s.type){if(void 0===n[s.value])throw new Error(`Invalid interpolation, missing component node: \`${s.value}\``);if("object"!=typeof n[s.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${s.value}\``);if("componentClose"===s.type)throw new Error(`Missing opening component token: \`${s.value}\``);if("componentOpen"===s.type){r=n[s.value],o=t;break}i.push(n[s.value])}else i.push(s.value)}if(r){const s=function(e,t){const n=t[e];let r=0;for(let o=e+1;o<t.length;o++){const e=t[o];if(e.value===n.value){if("componentOpen"===e.type){r++;continue}if("componentClose"===e.type){if(0===r)return o;r--}}}throw new Error("Missing closing component token `"+n.value+"`")}(o,e),a=c(e.slice(o+1,s),n),l=(0,t.cloneElement)(r,{},a);if(i.push(l),s<e.length-1){const t=c(e.slice(s+1),n);i=i.concat(t)}}return i=i.filter(Boolean),0===i.length?null:1===i.length?i[0]:(0,t.createElement)(t.Fragment,null,...i)}function l(e){const{mixedString:t,components:n,throwErrors:r}=e;if(!n)return t;if("object"!=typeof n){if(r)throw new Error(`Interpolation Error: unable to process \`${t}\` because components is not an object`);return t}const o=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(a)}(t);try{return c(o,n)}catch(e){if(r)throw new Error(`Interpolation Error: unable to process \`${t}\` because of error \`${e.message}\``);return t}}var u=n(4184),d=n.n(u);const p=window.wp.compose,m=window.wp.keycodes,f=window.wp.primitives,h=(0,e.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(f.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),g=window.lodash,v=new Set(["alert","status","log","marquee","timer"]);let y=[],w=!1;const b=window.wp.deprecated;var E=n.n(b);const _=window.wp.dom,x=(0,e.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(f.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function k(e,t,n){const{defaultView:r}=t,{frameElement:o}=r;if(!o||t===n.ownerDocument)return e;const i=o.getBoundingClientRect();return new r.DOMRect(e.left+i.left,e.top+i.top,e.width,e.height)}let C=0;function S(e){const t=document.scrollingElement||document.body;e&&(C=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=C)}let A=0;function R(){return(0,e.useEffect)((()=>(0===A&&S(!0),++A,()=>{1===A&&S(!1),--A})),[]),null}const T=(0,e.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function P(t){let{name:n,children:r,registerFill:o,unregisterFill:i}=t;const s=(t=>{const{getSlot:n,subscribe:r}=(0,e.useContext)(T),[o,i]=(0,e.useState)(n(t));return(0,e.useEffect)((()=>(i(n(t)),r((()=>{i(n(t))})))),[t]),o})(n),a=(0,e.useRef)({name:n,children:r});return(0,e.useLayoutEffect)((()=>(o(n,a.current),()=>i(n,a.current))),[]),(0,e.useLayoutEffect)((()=>{a.current.children=r,s&&s.forceUpdate()}),[r]),(0,e.useLayoutEffect)((()=>{n!==a.current.name&&(i(a.current.name,a.current),a.current.name=n,o(n,a.current))}),[n]),s&&s.node?((0,g.isFunction)(r)&&(r=r(s.props.fillProps)),(0,e.createPortal)(r,s.node)):null}const L=t=>(0,e.createElement)(T.Consumer,null,(n=>{let{registerFill:r,unregisterFill:o}=n;return(0,e.createElement)(P,i({},t,{registerFill:r,unregisterFill:o}))}));class O extends e.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:n,registerSlot:r}=this.props;e.name!==t&&(n(e.name),r(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:t,name:n,fillProps:r={},getFills:o}=this.props,i=(0,g.map)(o(n,this),(t=>{const n=(0,g.isFunction)(t.children)?t.children(r):t.children;return e.Children.map(n,((t,n)=>{if(!t||(0,g.isString)(t))return t;const r=t.key||n;return(0,e.cloneElement)(t,{key:r})}))})).filter((0,g.negate)(e.isEmptyElement));return(0,e.createElement)(e.Fragment,null,(0,g.isFunction)(t)?t(i):i)}}const N=t=>(0,e.createElement)(T.Consumer,null,(n=>{let{registerSlot:r,unregisterSlot:o,getFills:s}=n;return(0,e.createElement)(O,i({},t,{registerSlot:r,unregisterSlot:o,getFills:s}))}));window.wp.warning;var D=n(4155);const M=(0,e.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==D&&D.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});function F(t){const n=(0,e.useContext)(M),r=n.slots[t]||{},o=n.fills[t],i=(0,e.useMemo)((()=>o||[]),[o]);return{...r,updateSlot:(0,e.useCallback)((e=>{n.updateSlot(t,e)}),[t,n.updateSlot]),unregisterSlot:(0,e.useCallback)((e=>{n.unregisterSlot(t,e)}),[t,n.unregisterSlot]),fills:i,registerFill:(0,e.useCallback)((e=>{n.registerFill(t,e)}),[t,n.registerFill]),unregisterFill:(0,e.useCallback)((e=>{n.unregisterFill(t,e)}),[t,n.unregisterFill])}}var $=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),W=Math.abs,B=String.fromCharCode,H=Object.assign;function I(e){return e.trim()}function z(e,t,n){return e.replace(t,n)}function j(e,t){return e.indexOf(t)}function V(e,t){return 0|e.charCodeAt(t)}function U(e,t,n){return e.slice(t,n)}function q(e){return e.length}function G(e){return e.length}function X(e,t){return t.push(e),e}var K=1,Y=1,Q=0,Z=0,J=0,ee="";function te(e,t,n,r,o,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:K,column:Y,length:s,return:""}}function ne(e,t){return H(te("",null,null,"",null,null,0),e,{length:-e.length},t)}function re(){return J=Z>0?V(ee,--Z):0,Y--,10===J&&(Y=1,K--),J}function oe(){return J=Z<Q?V(ee,Z++):0,Y++,10===J&&(Y=1,K++),J}function ie(){return V(ee,Z)}function se(){return Z}function ae(e,t){return U(ee,e,t)}function ce(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function le(e){return K=Y=1,Q=q(ee=e),Z=0,[]}function ue(e){return ee="",e}function de(e){return I(ae(Z-1,fe(91===e?e+2:40===e?e+1:e)))}function pe(e){for(;(J=ie())&&J<33;)oe();return ce(e)>2||ce(J)>3?"":" "}function me(e,t){for(;--t&&oe()&&!(J<48||J>102||J>57&&J<65||J>70&&J<97););return ae(e,se()+(t<6&&32==ie()&&32==oe()))}function fe(e){for(;oe();)switch(J){case e:return Z;case 34:case 39:34!==e&&39!==e&&fe(J);break;case 40:41===e&&fe(e);break;case 92:oe()}return Z}function he(e,t){for(;oe()&&e+J!==57&&(e+J!==84||47!==ie()););return"/*"+ae(t,Z-1)+"*"+B(47===e?e:oe())}function ge(e){for(;!ce(ie());)oe();return ae(e,Z)}var ve="-ms-",ye="-moz-",we="-webkit-",be="comm",Ee="rule",_e="decl",xe="@keyframes";function ke(e,t){for(var n="",r=G(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Ce(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case _e:return e.return=e.return||e.value;case be:return"";case xe:return e.return=e.value+"{"+ke(e.children,r)+"}";case Ee:e.value=e.props.join(",")}return q(n=ke(e.children,r))?e.return=e.value+"{"+n+"}":""}function Se(e){return ue(Ae("",null,null,null,[""],e=le(e),0,[0],e))}function Ae(e,t,n,r,o,i,s,a,c){for(var l=0,u=0,d=s,p=0,m=0,f=0,h=1,g=1,v=1,y=0,w="",b=o,E=i,_=r,x=w;g;)switch(f=y,y=oe()){case 40:if(108!=f&&58==V(x,d-1)){-1!=j(x+=z(de(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:x+=de(y);break;case 9:case 10:case 13:case 32:x+=pe(f);break;case 92:x+=me(se()-1,7);continue;case 47:switch(ie()){case 42:case 47:X(Te(he(oe(),se()),t,n),c);break;default:x+="/"}break;case 123*h:a[l++]=q(x)*v;case 125*h:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+u:-1==v&&(x=z(x,/\f/g,"")),m>0&&q(x)-d&&X(m>32?Pe(x+";",r,n,d-1):Pe(z(x," ","")+";",r,n,d-2),c);break;case 59:x+=";";default:if(X(_=Re(x,t,n,l,u,o,a,w,b=[],E=[],d),i),123===y)if(0===u)Ae(x,t,_,_,b,i,d,a,E);else switch(99===p&&110===V(x,3)?100:p){case 100:case 108:case 109:case 115:Ae(e,_,_,r&&X(Re(e,_,_,0,0,o,a,w,o,b=[],d),E),o,E,d,a,r?b:E);break;default:Ae(x,_,_,_,[""],E,0,a,E)}}l=u=m=0,h=v=1,w=x="",d=s;break;case 58:d=1+q(x),m=f;default:if(h<1)if(123==y)--h;else if(125==y&&0==h++&&125==re())continue;switch(x+=B(y),y*h){case 38:v=u>0?1:(x+="\f",-1);break;case 44:a[l++]=(q(x)-1)*v,v=1;break;case 64:45===ie()&&(x+=de(oe())),p=ie(),u=d=q(w=x+=ge(se())),y++;break;case 45:45===f&&2==q(x)&&(h=0)}}return i}function Re(e,t,n,r,o,i,s,a,c,l,u){for(var d=o-1,p=0===o?i:[""],m=G(p),f=0,h=0,g=0;f<r;++f)for(var v=0,y=U(e,d+1,d=W(h=s[f])),w=e;v<m;++v)(w=I(h>0?p[v]+" "+y:z(y,/&\f/g,p[v])))&&(c[g++]=w);return te(e,t,n,0===o?Ee:a,c,l,u)}function Te(e,t,n){return te(e,t,n,be,B(J),U(e,2,-2),0)}function Pe(e,t,n,r){return te(e,t,n,_e,U(e,0,r),U(e,r+1,-1),r)}var Le=function(e,t,n){for(var r=0,o=0;r=o,o=ie(),38===r&&12===o&&(t[n]=1),!ce(o);)oe();return ae(e,Z)},Oe=new WeakMap,Ne=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Oe.get(n))&&!r){Oe.set(e,!0);for(var o=[],i=function(e,t){return ue(function(e,t){var n=-1,r=44;do{switch(ce(r)){case 0:38===r&&12===ie()&&(t[n]=1),e[n]+=Le(Z-1,t,n);break;case 2:e[n]+=de(r);break;case 4:if(44===r){e[++n]=58===ie()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=B(r)}}while(r=oe());return e}(le(e),t))}(t,o),s=n.props,a=0,c=0;a<i.length;a++)for(var l=0;l<s.length;l++,c++)e.props[c]=o[a]?i[a].replace(/&\f/g,s[l]):s[l]+" "+i[a]}}},De=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Me(e,t){switch(function(e,t){return 45^V(e,0)?(((t<<2^V(e,0))<<2^V(e,1))<<2^V(e,2))<<2^V(e,3):0}(e,t)){case 5103:return we+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return we+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return we+e+ye+e+ve+e+e;case 6828:case 4268:return we+e+ve+e+e;case 6165:return we+e+ve+"flex-"+e+e;case 5187:return we+e+z(e,/(\w+).+(:[^]+)/,we+"box-$1$2"+ve+"flex-$1$2")+e;case 5443:return we+e+ve+"flex-item-"+z(e,/flex-|-self/,"")+e;case 4675:return we+e+ve+"flex-line-pack"+z(e,/align-content|flex-|-self/,"")+e;case 5548:return we+e+ve+z(e,"shrink","negative")+e;case 5292:return we+e+ve+z(e,"basis","preferred-size")+e;case 6060:return we+"box-"+z(e,"-grow","")+we+e+ve+z(e,"grow","positive")+e;case 4554:return we+z(e,/([^-])(transform)/g,"$1"+we+"$2")+e;case 6187:return z(z(z(e,/(zoom-|grab)/,we+"$1"),/(image-set)/,we+"$1"),e,"")+e;case 5495:case 3959:return z(e,/(image-set\([^]*)/,we+"$1$`$1");case 4968:return z(z(e,/(.+:)(flex-)?(.*)/,we+"box-pack:$3"+ve+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+we+e+e;case 4095:case 3583:case 4068:case 2532:return z(e,/(.+)-inline(.+)/,we+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(q(e)-1-t>6)switch(V(e,t+1)){case 109:if(45!==V(e,t+4))break;case 102:return z(e,/(.+:)(.+)-([^]+)/,"$1"+we+"$2-$3$1"+ye+(108==V(e,t+3)?"$3":"$2-$3"))+e;case 115:return~j(e,"stretch")?Me(z(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==V(e,t+1))break;case 6444:switch(V(e,q(e)-3-(~j(e,"!important")&&10))){case 107:return z(e,":",":"+we)+e;case 101:return z(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+we+(45===V(e,14)?"inline-":"")+"box$3$1"+we+"$2$3$1"+ve+"$2box$3")+e}break;case 5936:switch(V(e,t+11)){case 114:return we+e+ve+z(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return we+e+ve+z(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return we+e+ve+z(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return we+e+ve+e+e}return e}var Fe=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case _e:e.return=Me(e.value,e.length);break;case xe:return ke([ne(e,{value:z(e.value,"@","@"+we)})],r);case Ee:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return ke([ne(e,{props:[z(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ke([ne(e,{props:[z(t,/:(plac\w+)/,":"+we+"input-$1")]}),ne(e,{props:[z(t,/:(plac\w+)/,":-moz-$1")]}),ne(e,{props:[z(t,/:(plac\w+)/,ve+"input-$1")]})],r)}return""}))}}],$e=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||Fe,s={},a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)}));var c,l,u,d,p=[Ce,(d=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],m=(l=[Ne,De].concat(i,p),u=G(l),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=l[i](e,t,n,r)||"";return o});o=function(e,t,n,r){c=n,ke(Se(e?e+"{"+t.styles+"}":t.styles),m),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new $({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:o};return f.sheet.hydrate(a),f},We={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Be(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var He=/[A-Z]|^ms/g,Ie=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ze=function(e){return 45===e.charCodeAt(1)},je=function(e){return null!=e&&"boolean"!=typeof e},Ve=Be((function(e){return ze(e)?e:e.replace(He,"-$&").toLowerCase()})),Ue=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ie,(function(e,t,n){return Ge={name:t,styles:n,next:Ge},t}))}return 1===We[e]||ze(e)||"number"!=typeof t||0===t?t:t+"px"};function qe(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Ge={name:n.name,styles:n.styles,next:Ge},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Ge={name:r.name,styles:r.styles,next:Ge},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=qe(e,t,n[o])+";";else for(var i in n){var s=n[i];if("object"!=typeof s)null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":je(s)&&(r+=Ve(i)+":"+Ue(i,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var a=qe(e,t,s);switch(i){case"animation":case"animationName":r+=Ve(i)+":"+a+";";break;default:r+=i+"{"+a+"}"}}else for(var c=0;c<s.length;c++)je(s[c])&&(r+=Ve(i)+":"+Ue(i,s[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=Ge,i=n(e);return Ge=o,qe(e,t,i)}}if(null==t)return n;var s=t[n];return void 0!==s?s:n}var Ge,Xe,Ke=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Ye=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Ge=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=qe(n,t,i)):o+=i[0];for(var s=1;s<e.length;s++)o+=qe(n,t,e[s]),r&&(o+=i[s]);Ke.lastIndex=0;for(var a,c="";null!==(a=Ke.exec(o));)c+="-"+a[1];var l=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+c;return{name:l,styles:o,next:Ge}},Qe=!!t.useInsertionEffect&&t.useInsertionEffect,Ze=Qe||function(e){return e()},Je=(Qe||t.useLayoutEffect,t.createContext("undefined"!=typeof HTMLElement?$e({key:"css"}):null)),et=Je.Provider,tt=t.createContext({}),nt=n(9588),rt=n.n(nt),ot=new Uint8Array(16);function it(){if(!Xe&&!(Xe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xe(ot)}const st=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var at=[],ct=0;ct<256;++ct)at.push((ct+256).toString(16).substr(1));const lt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(at[e[t+0]]+at[e[t+1]]+at[e[t+2]]+at[e[t+3]]+"-"+at[e[t+4]]+at[e[t+5]]+"-"+at[e[t+6]]+at[e[t+7]]+"-"+at[e[t+8]]+at[e[t+9]]+"-"+at[e[t+10]]+at[e[t+11]]+at[e[t+12]]+at[e[t+13]]+at[e[t+14]]+at[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&st.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n},ut=function(e,t,n){var r=(e=e||{}).random||(e.rng||it)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return lt(r)},dt=new Set,pt=rt()((e=>{let t=ut().replace(/[0-9]/g,"");for(;dt.has(t);)t=ut().replace(/[0-9]/g,"");return dt.add(t),$e({container:e,key:t})}));function mt(t){let{children:n,document:r}=t;if(!r)return null;const o=pt(r.head);return(0,e.createElement)(et,{value:o},n)}function ft(){const[,t]=(0,e.useState)({}),n=(0,e.useRef)(!0);return(0,e.useEffect)((()=>()=>{n.current=!1}),[]),()=>{n.current&&t({})}}function ht(t){let{name:n,children:r}=t;const o=F(n),i=(0,e.useRef)({rerender:ft()});if((0,e.useEffect)((()=>(o.registerFill(i),()=>{o.unregisterFill(i)})),[o.registerFill,o.unregisterFill]),!o.ref||!o.ref.current)return null;"function"==typeof r&&(r=r(o.fillProps));const s=(0,e.createElement)(mt,{document:o.ref.current.ownerDocument},r);return(0,e.createPortal)(s,o.ref.current)}const gt=(0,e.forwardRef)((function(t,n){let{name:r,fillProps:o={},as:s="div",...a}=t;const c=(0,e.useContext)(M),l=(0,e.useRef)();return(0,e.useLayoutEffect)((()=>(c.registerSlot(r,l,o),()=>{c.unregisterSlot(r,l)})),[c.registerSlot,c.unregisterSlot,r]),(0,e.useLayoutEffect)((()=>{c.updateSlot(r,o)})),(0,e.createElement)(s,i({ref:(0,p.useMergeRefs)([n,l])},a))}));function vt(t){return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(L,t),(0,e.createElement)(ht,t))}const yt=(0,e.forwardRef)(((t,n)=>{let{bubblesVirtually:r,...o}=t;return r?(0,e.createElement)(gt,i({},o,{ref:n})):(0,e.createElement)(N,o)}));function wt(e){return"appear"===e?"top":"left"}const bt="Popover",Et=(0,e.createContext)();function _t(e,t){const{paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:i}=function(e){return e.ownerDocument.defaultView.getComputedStyle(e)}(t),s=n?parseInt(n,10):0,a=r?parseInt(r,10):0,c=o?parseInt(o,10):0,l=i?parseInt(i,10):0;return{x:e.left+c,y:e.top+s,width:e.width-c-l,height:e.height-s-a,left:e.left+c,right:e.right-l,top:e.top+s,bottom:e.bottom-a}}function xt(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function kt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function Ct(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const St=(0,e.forwardRef)(((t,n)=>{let{headerTitle:r,onClose:o,children:a,className:c,noArrow:l=!0,isAlternate:u,position:m="bottom right",range:f,focusOnMount:h="firstElement",anchorRef:g,shouldAnchorIncludePadding:v,anchorRect:y,getAnchorRect:w,expandOnMobile:b,animate:E=!0,onFocusOutside:C,__unstableStickyBoundaryElement:S,__unstableSlotName:A=bt,__unstableObserveElement:T,__unstableBoundaryParent:P,__unstableForcePosition:L,__unstableForceXAlignment:O,__unstableEditorCanvasWrapper:N,...D}=t;const M=(0,e.useRef)(null),$=(0,e.useRef)(null),W=(0,e.useRef)(),B=(0,p.useViewportMatch)("medium","<"),[H,I]=(0,e.useState)(),z=(0,e.useContext)(Et)||A,j=F(z),V=b&&B,[U,q]=(0,p.useResizeObserver)();l=V||l,(0,e.useLayoutEffect)((()=>{if(V)return Ct(W.current,"is-without-arrow",l),Ct(W.current,"is-alternate",u),xt(W.current,"data-x-axis"),xt(W.current,"data-y-axis"),kt(W.current,"top"),kt(W.current,"left"),kt($.current,"maxHeight"),void kt($.current,"maxWidth");const e=()=>{if(!W.current||!$.current)return;let e=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0;if(t)return t;if(n){if(!e.current)return;const t=n(e.current);return k(t,t.ownerDocument||e.current.ownerDocument,i)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==r?void 0:r.cloneRange))return k((0,_.getRectangleFromRange)(r),r.endContainer.ownerDocument,i);if("function"==typeof(null==r?void 0:r.getBoundingClientRect)){const e=k(r.getBoundingClientRect(),r.ownerDocument,i);return o?e:_t(e,r)}const{top:e,bottom:t}=r,n=e.getBoundingClientRect(),s=t.getBoundingClientRect(),a=k(new window.DOMRect(n.left,n.top,n.width,s.bottom-n.top),e.ownerDocument,i);return o?a:_t(a,r)}if(!e.current)return;const{parentNode:s}=e.current,a=k(s.getBoundingClientRect(),s.ownerDocument,i);return o?a:_t(a,s)}(M,y,w,g,v,W.current);if(!e)return;const{offsetParent:t,ownerDocument:n}=W.current;let r,o=0;if(t&&t!==n.body){const n=t.getBoundingClientRect();o=n.top,e=new window.DOMRect(e.left-n.left,e.top-n.top,e.width,e.height)}P&&(r=W.current.parentElement);const i=q.height?q:$.current.getBoundingClientRect(),{popoverTop:a,popoverLeft:c,xAxis:d,yAxis:p,contentHeight:f,contentWidth:h}=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,a=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0,l=arguments.length>9?arguments[9]:void 0;const[u,d="center",p]=n.split(" "),m=function(e,t,n,r,o,i,s,a,c){const{height:l}=t;if(o){const t=o.getBoundingClientRect(),r=t.top+l-s,i=t.bottom-l-s;if(e.top<=r)return!c||l+10<c.scrollTop+e.top?{yAxis:n,popoverTop:Math.min(e.bottom,r)}:{yAxis:"bottom",popoverTop:Math.min(e.bottom,i)}}let u=e.top+e.height/2;"bottom"===r?u=e.bottom:"top"===r&&(u=e.top);const d={popoverTop:u,contentHeight:(u-l/2>0?l/2:u)+(u+l/2>window.innerHeight?window.innerHeight-u:l/2)},p={popoverTop:e.top,contentHeight:e.top-10-l>0?l:e.top-10},m={popoverTop:e.bottom,contentHeight:e.bottom+10+l>window.innerHeight?window.innerHeight-10-e.bottom:l};let f,h=n,g=null;if(!o&&!a)if("middle"===n&&d.contentHeight===l)h="middle";else if("top"===n&&p.contentHeight===l)h="top";else if("bottom"===n&&m.contentHeight===l)h="bottom";else{h=p.contentHeight>m.contentHeight?"top":"bottom";const e="top"===h?p.contentHeight:m.contentHeight;g=e!==l?e:null}return f="middle"===h?d.popoverTop:"top"===h?p.popoverTop:m.popoverTop,{yAxis:h,popoverTop:f,contentHeight:g}}(e,t,u,p,r,0,o,a,l),f=function(e,t,n,r,o,i,a,c,l){const{width:u}=t;"left"===n&&(0,s.isRTL)()?n="right":"right"===n&&(0,s.isRTL)()&&(n="left"),"left"===r&&(0,s.isRTL)()?r="right":"right"===r&&(0,s.isRTL)()&&(r="left");const d=Math.round(e.left+e.width/2),p={popoverLeft:d,contentWidth:(d-u/2>0?u/2:d)+(d+u/2>window.innerWidth?window.innerWidth-d:u/2)};let m=e.left;"right"===r?m=e.right:"middle"===i||l||(m=d);let f=e.right;"left"===r?f=e.left:"middle"===i||l||(f=d);const h={popoverLeft:m,contentWidth:m-u>0?u:m},g={popoverLeft:f,contentWidth:f+u>window.innerWidth?window.innerWidth-f:u};let v,y=n,w=null;if(!o&&!c)if("center"===n&&p.contentWidth===u)y="center";else if("left"===n&&h.contentWidth===u)y="left";else if("right"===n&&g.contentWidth===u)y="right";else{y=h.contentWidth>g.contentWidth?"left":"right";const e="left"===y?h.contentWidth:g.contentWidth;u>window.innerWidth&&(w=window.innerWidth),e!==u&&(y="center",p.popoverLeft=window.innerWidth/2)}return v="center"===y?p.popoverLeft:"left"===y?h.popoverLeft:g.popoverLeft,a&&(v=Math.min(v,a.offsetLeft+a.offsetWidth-u),(0,s.isRTL)()||(v=Math.max(v,0))),{xAxis:y,popoverLeft:v,contentWidth:w}}(e,t,d,p,r,m.yAxis,i,a,c);return{...f,...m}}(e,i,m,S,W.current,o,r,L,O,N);"number"==typeof a&&"number"==typeof c&&(kt(W.current,"top",a+"px"),kt(W.current,"left",c+"px")),Ct(W.current,"is-without-arrow",l||"center"===d&&"middle"===p),Ct(W.current,"is-alternate",u),xt(W.current,"data-x-axis",d),xt(W.current,"data-y-axis",p),kt($.current,"maxHeight","number"==typeof f?f+"px":""),kt($.current,"maxWidth","number"==typeof h?h+"px":""),I(({left:"right",right:"left"}[d]||"center")+" "+({top:"bottom",bottom:"top"}[p]||"middle"))};e();const{ownerDocument:t}=W.current,{defaultView:n}=t,r=n.setInterval(e,500);let o;const i=()=>{n.cancelAnimationFrame(o),o=n.requestAnimationFrame(e)};n.addEventListener("click",i),n.addEventListener("resize",e),n.addEventListener("scroll",e,!0);const a=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(g);let c;return a&&a!==t&&(a.defaultView.addEventListener("resize",e),a.defaultView.addEventListener("scroll",e,!0)),T&&(c=new n.MutationObserver(e),c.observe(T,{attributes:!0})),()=>{var s,l;n.clearInterval(r),n.removeEventListener("resize",e),n.removeEventListener("scroll",e,!0),n.removeEventListener("click",i),n.cancelAnimationFrame(o),a&&a!==t&&(null===(s=a.defaultView)||void 0===s||s.removeEventListener("resize",e),null===(l=a.defaultView)||void 0===l||l.removeEventListener("scroll",e,!0)),c&&c.disconnect()}}),[V,y,w,g,v,m,q,S,T,P]);const G=(e,t)=>{"focus-outside"===e&&C?C(t):o&&o()},[X,K]=(0,p.__experimentalUseDialog)({focusOnMount:h,__unstableOnClose:G,onClose:G}),Y=(0,p.useMergeRefs)([W,X,n]),Q=Boolean(E&&H)&&function(e){if("loading"===e.type)return d()("components-animate__loading");const{type:t,origin:n=wt(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return d()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?d()("components-animate__slide-in","is-from-"+n):void 0}({type:"appear",origin:H});let Z=(0,e.createElement)("div",i({className:d()("components-popover",c,Q,{"is-expanded":V,"is-without-arrow":l,"is-alternate":u})},D,{ref:Y},K,{tabIndex:"-1"}),V&&(0,e.createElement)(R,null),V&&(0,e.createElement)("div",{className:"components-popover__header"},(0,e.createElement)("span",{className:"components-popover__header-title"},r),(0,e.createElement)(ln,{className:"components-popover__close",icon:x,onClick:o})),(0,e.createElement)("div",{ref:$,className:"components-popover__content"},(0,e.createElement)("div",{style:{position:"relative"}},U,a)));return j.ref&&(Z=(0,e.createElement)(vt,{name:z},Z)),g||y?Z:(0,e.createElement)("span",{ref:M},Z)}));St.Slot=(0,e.forwardRef)((function(t,n){let{name:r=bt}=t;return(0,e.createElement)(yt,{bubblesVirtually:!0,name:r,className:"popover-slot",ref:n})})),St.__unstableSlotNameProvider=Et.Provider;const At=St,Rt=function(t){let n,r,{shortcut:o,className:i}=t;return o?((0,g.isString)(o)&&(n=o),(0,g.isObject)(o)&&(n=o.display,r=o.ariaLabel),(0,e.createElement)("span",{className:i,"aria-label":r},n)):null},Tt=700,Pt=(0,e.createElement)("div",{className:"event-catcher"}),Lt=t=>{let{eventHandlers:n,child:r,childrenWithPopover:o}=t;return(0,e.cloneElement)((0,e.createElement)("span",{className:"disabled-element-wrapper"},(0,e.cloneElement)(Pt,n),(0,e.cloneElement)(r,{children:o})),n)},Ot=t=>{let{child:n,eventHandlers:r,childrenWithPopover:o}=t;return(0,e.cloneElement)(n,{...r,children:o})},Nt=(t,n,r)=>{if(1!==e.Children.count(t))return;const o=e.Children.only(t);o.props.disabled||"function"==typeof o.props[n]&&o.props[n](r)},Dt=function(t){const{children:n,position:r,text:o,shortcut:i,delay:s=Tt}=t,[a,c]=(0,e.useState)(!1),[l,u]=(0,e.useState)(!1),d=(0,p.useDebounce)(u,s),m=e=>{Nt(n,"onMouseDown",e),document.addEventListener("mouseup",v),c(!0)},f=e=>{Nt(n,"onMouseUp",e),document.removeEventListener("mouseup",v),c(!1)},h=e=>"mouseUp"===e?f:"mouseDown"===e?m:void 0,v=h("mouseUp"),y=(e,t)=>r=>{if(Nt(n,e,r),r.currentTarget.disabled)return;if("focus"===r.type&&a)return;d.cancel();const o=(0,g.includes)(["focus","mouseenter"],r.type);o!==l&&(t?d(o):u(o))},w=()=>{d.cancel(),document.removeEventListener("mouseup",v)};if((0,e.useEffect)((()=>w),[]),1!==e.Children.count(n))return n;const b={onMouseEnter:y("onMouseEnter",!0),onMouseLeave:y("onMouseLeave"),onClick:y("onClick"),onFocus:y("onFocus"),onBlur:y("onBlur"),onMouseDown:h("mouseDown")},E=e.Children.only(n),{children:_,disabled:x}=E.props,k=x?Lt:Ot,C=(t=>{let{grandchildren:n,isOver:r,position:o,text:i,shortcut:s}=t;return(0,e.concatChildren)(n,r&&(0,e.createElement)(At,{focusOnMount:!1,position:o,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},i,(0,e.createElement)(Rt,{className:"components-tooltip__shortcut",shortcut:s})))})({grandchildren:_,isOver:l,position:r,text:o,shortcut:i});return k({child:E,eventHandlers:b,childrenWithPopover:C})},Mt=function(t){let{icon:n,className:r,...o}=t;const s=["dashicon","dashicons","dashicons-"+n,r].filter(Boolean).join(" ");return(0,e.createElement)("span",i({className:s},o))},Ft=function(t){let{icon:n=null,size:r=24,...o}=t;if("string"==typeof n)return(0,e.createElement)(Mt,i({icon:n},o));if((0,e.isValidElement)(n)&&Mt===n.type)return(0,e.cloneElement)(n,{...o});if("function"==typeof n)return n.prototype instanceof e.Component?(0,e.createElement)(n,{size:r,...o}):n({size:r,...o});if(n&&("svg"===n.type||n.type===f.SVG)){const t={width:r,height:r,...n.props,...o};return(0,e.createElement)(f.SVG,t)}return(0,e.isValidElement)(n)?(0,e.cloneElement)(n,{size:r,...o}):n};var $t=n(4155);const Wt=(0,e.createContext)({}),Bt=()=>(0,e.useContext)(Wt);function Ht(t){let{value:n}=t;const r=Bt(),o=(0,e.useRef)(n);return function(t,r){const i=(0,e.useRef)(!1);(0,e.useEffect)((()=>{i.current?(0,g.isEqual)(o.current,n)&&o.current!==n&&void 0!==$t&&$t.env:i.current=!0}),r)}(0,[n]),(0,e.useMemo)((()=>(0,g.merge)((0,g.cloneDeep)(r),n)),[r,n])}(0,e.memo)((t=>{let{children:n,value:r}=t;const o=Ht({value:r});return(0,e.createElement)(Wt.Provider,{value:o},n)}));const It="__contextSystemKey__",zt=rt()((function(e){return`components-${(0,g.kebabCase)(e)}`}));function jt(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}function Vt(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function Ut(e,t,n){var r=[],o=jt(e,r,n);return r.length<2?n:o+t(r)}var qt=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(null!=o){var i=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var s in i="",o)o[s]&&s&&(i&&(i+=" "),i+=s);break;default:i=o}i&&(n&&(n+=" "),n+=i)}}return n},Gt=function(e){var t=$e({key:"css"});t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Ye(n,t.registered,void 0);return function(e,t,n){!function(e,t,n){var r=e.key+"-"+t.name;void 0===e.registered[r]&&(e.registered[r]=t.styles)}(e,t);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,o),t.key+"-"+o.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return Ut(t.registered,n,qt(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Ye(n,t.registered);Vt(t,o)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Ye(n,t.registered),i="animation-"+o.name;return Vt(t,{name:o.name,styles:"@keyframes "+i+"{"+o.styles+"}"}),i},hydrate:function(e){e.forEach((function(e){t.inserted[e]=!0}))},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:jt.bind(null,t.registered),merge:Ut.bind(null,t.registered,n)}}(),Xt=(Gt.flush,Gt.hydrate,Gt.cx);Gt.merge,Gt.getRegisteredStyles,Gt.injectGlobal,Gt.keyframes,Gt.css,Gt.sheet,Gt.cache;n(4155);var Kt=n(4155);const Yt={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};var Qt=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Zt=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Jt=Be((function(e){return Qt.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),en=function(e){return"theme"!==e},tn=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Jt:en},nn=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},rn=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Zt(t,n,r),Ze((function(){return function(e,t,n){Zt(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)})),null};const on=function e(n,r){var o,s,a=n.__emotion_real===n,c=a&&n.__emotion_base||n;void 0!==r&&(o=r.label,s=r.target);var l=nn(n,r,a),u=l||tn(c),d=!u("as");return function(){var p=arguments,m=a&&void 0!==n.__emotion_styles?n.__emotion_styles.slice(0):[];if(void 0!==o&&m.push("label:"+o+";"),null==p[0]||void 0===p[0].raw)m.push.apply(m,p);else{m.push(p[0][0]);for(var f=p.length,h=1;h<f;h++)m.push(p[h],p[0][h])}var g,v=(g=function(e,n,r){var o,i,a,p,f=d&&e.as||c,h="",g=[],v=e;if(null==e.theme){for(var y in v={},e)v[y]=e[y];v.theme=t.useContext(tt)}"string"==typeof e.className?(o=n.registered,i=g,a=e.className,p="",a.split(" ").forEach((function(e){void 0!==o[e]?i.push(o[e]+";"):p+=e+" "})),h=p):null!=e.className&&(h=e.className+" ");var w=Ye(m.concat(g),n.registered,v);h+=n.key+"-"+w.name,void 0!==s&&(h+=" "+s);var b=d&&void 0===l?tn(f):u,E={};for(var _ in e)d&&"as"===_||b(_)&&(E[_]=e[_]);return E.className=h,E.ref=r,t.createElement(t.Fragment,null,t.createElement(rn,{cache:n,serialized:w,isStringTag:"string"==typeof f}),t.createElement(f,E))},(0,t.forwardRef)((function(e,n){var r=(0,t.useContext)(Je);return g(e,r,n)})));return v.displayName=void 0!==o?o:"Styled("+("string"==typeof c?c:c.displayName||c.name||"Component")+")",v.defaultProps=n.defaultProps,v.__emotion_real=v,v.__emotion_base=c,v.__emotion_styles=m,v.__emotion_forwardProp=l,Object.defineProperty(v,"toString",{value:function(){return"."+s}}),v.withComponent=function(t,n){return e(t,i({},r,n,{shouldForwardProp:nn(v,n,!0)})).apply(void 0,m)},v}}("div",{target:"em57xhy0"})("");on.selector=".components-view",on.displayName="View";const sn=on,an=function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{memo:o=!1}=r;let i=(0,e.forwardRef)(t);o&&(i=(0,e.memo)(i)),void 0===n&&void 0!==Kt&&Kt.env;let s=i[It]||[n];return Array.isArray(n)&&(s=[...s,...n]),"string"==typeof n&&(s=[...s,n]),i.displayName=n,i[It]=(0,g.uniq)(s),i.selector=`.${zt(n)}`,i}((function(n,r){const{style:o,...s}=function(n,r){const o=Bt(),i=(null==o?void 0:o[r])||{},s={"data-wp-c16t":!0,...(a=r,{"data-wp-component":a})};var a;const{_overrides:c,...l}=i,u=Object.entries(l).length?Object.assign({},l,n):n,d=(()=>{const n=(0,t.useContext)(Je),r=(0,e.useCallback)((function(){if(null===n)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Xt(...t.map((e=>{return null!=(t=e)&&["name","styles"].every((e=>void 0!==t[e]))?(function(e,t,n){var r=e.key+"-"+t.name;if(void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(n,e),`${n.key}-${e.name}`):e;var t})))}),[n]);return r})()(zt(r),n.className),p="function"==typeof u.renderChildren?u.renderChildren(u):u.children;for(const e in u)s[e]=u[e];for(const e in c)s[e]=c[e];return s.children=p,s.className=d,s}(n,"VisuallyHidden");return(0,e.createElement)(sn,i({ref:r},s,{style:{...Yt,...o||{}}}))}),"VisuallyHidden"),cn=["onMouseDown","onClick"],ln=(0,e.forwardRef)((function t(n,r){const{href:o,target:s,isSmall:a,isPressed:c,isBusy:l,isDestructive:u,className:m,disabled:f,icon:h,iconPosition:v="left",iconSize:y,showTooltip:w,tooltipPosition:b,shortcut:_,label:x,children:k,text:C,variant:S,__experimentalIsFocusable:A,describedBy:R,...T}=function(e){let{isDefault:t,isPrimary:n,isSecondary:r,isTertiary:o,isLink:i,variant:s,...a}=e,c=s;var l,u,d,p,m;return n&&(null!==(l=c)&&void 0!==l||(c="primary")),o&&(null!==(u=c)&&void 0!==u||(c="tertiary")),r&&(null!==(d=c)&&void 0!==d||(c="secondary")),t&&(E()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"',version:"6.2"}),null!==(p=c)&&void 0!==p||(c="secondary")),i&&(null!==(m=c)&&void 0!==m||(c="link")),{...a,variant:c}}(n),P=(0,p.useInstanceId)(t,"components-button__description"),L=d()("components-button",m,{"is-secondary":"secondary"===S,"is-primary":"primary"===S,"is-small":a,"is-tertiary":"tertiary"===S,"is-pressed":c,"is-busy":l,"is-link":"link"===S,"is-destructive":u,"has-text":!!h&&!!k,"has-icon":!!h}),O=f&&!A,N=void 0===o||O?"button":"a",D="a"===N?{href:o,target:s}:{type:"button",disabled:O,"aria-pressed":c};if(f&&A){D["aria-disabled"]=!0;for(const e of cn)T[e]=e=>{e.stopPropagation(),e.preventDefault()}}const M=!O&&(w&&x||_||!!x&&(!k||(0,g.isArray)(k)&&!k.length)&&!1!==w),F=R?P:null,$=T["aria-describedby"]||F,W=(0,e.createElement)(N,i({},D,T,{className:L,"aria-label":T["aria-label"]||x,"aria-describedby":$,ref:r}),h&&"left"===v&&(0,e.createElement)(Ft,{icon:h,size:y}),C&&(0,e.createElement)(e.Fragment,null,C),h&&"right"===v&&(0,e.createElement)(Ft,{icon:h,size:y}),k);return M?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Dt,{text:R||x,shortcut:_,position:b},W),R&&(0,e.createElement)(an,null,(0,e.createElement)("span",{id:F},R))):(0,e.createElement)(e.Fragment,null,W,R&&(0,e.createElement)(an,null,(0,e.createElement)("span",{id:F},R)))}));let un=0;const dn=(0,e.forwardRef)((function t(n,r){const{bodyOpenClassName:o="modal-open",role:a="dialog",title:c=null,focusOnMount:l=!0,shouldCloseOnEsc:u=!0,shouldCloseOnClickOutside:f=!0,isDismissible:b=!0,aria:E={labelledby:null,describedby:null},onRequestClose:_,icon:x,closeButtonLabel:k,children:C,style:S,overlayClassName:A,className:R,contentLabel:T,onKeyDown:P,isFullScreen:L=!1,__experimentalHideHeader:O=!1}=n,N=(0,e.useRef)(),D=(0,p.useInstanceId)(t),M=c?`components-modal-header-${D}`:E.labelledby,F=(0,p.useFocusOnMount)(l),$=(0,p.useConstrainedTabbing)(),W=(0,p.useFocusReturn)(),B=(0,p.__experimentalUseFocusOutside)(_);return(0,e.useEffect)((()=>(un++,1===un&&(function(e){if(w)return;const t=document.body.children;(0,g.forEach)(t,(t=>{t!==e&&function(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||v.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),y.push(t))})),w=!0}(N.current),document.body.classList.add(o)),()=>{un--,0===un&&(document.body.classList.remove(o),w&&((0,g.forEach)(y,(e=>{e.removeAttribute("aria-hidden")})),y=[],w=!1))})),[]),(0,e.createPortal)((0,e.createElement)("div",{ref:(0,p.useMergeRefs)([N,r]),className:d()("components-modal__screen-overlay",A),onKeyDown:function(e){u&&e.keyCode===m.ESCAPE&&!e.defaultPrevented&&(e.preventDefault(),_&&_(e))}},(0,e.createElement)(mt,{document},(0,e.createElement)("div",i({className:d()("components-modal__frame",R,{"is-full-screen":L}),style:S,ref:(0,p.useMergeRefs)([$,W,F]),role:a,"aria-label":T,"aria-labelledby":T?null:M,"aria-describedby":E.describedby,tabIndex:"-1"},f?B:{},{onKeyDown:P}),(0,e.createElement)("div",{className:d()("components-modal__content",{"hide-header":O}),role:"document"},!O&&(0,e.createElement)("div",{className:"components-modal__header"},(0,e.createElement)("div",{className:"components-modal__header-heading-container"},x&&(0,e.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},x),c&&(0,e.createElement)("h1",{id:M,className:"components-modal__header-heading"},c)),b&&(0,e.createElement)(ln,{onClick:_,icon:h,label:k||(0,s.__)("Close dialog")})),C)))),document.body)})),pn=window.wp.a11y;function mn(e){switch(e){case"success":case"warning":case"info":return"polite";default:return"assertive"}}const fn=function(t){let{className:n,status:r="info",children:o,spokenMessage:i=o,onRemove:a=g.noop,isDismissible:c=!0,actions:l=[],politeness:u=mn(r),__unstableHTML:p,onDismiss:m=g.noop}=t;!function(t,n){const r="string"==typeof t?t:(0,e.renderToString)(t);(0,e.useEffect)((()=>{r&&(0,pn.speak)(r,n)}),[r,n])}(i,u);const f=d()(n,"components-notice","is-"+r,{"is-dismissible":c});return p&&(o=(0,e.createElement)(e.RawHTML,null,o)),(0,e.createElement)("div",{className:f},(0,e.createElement)("div",{className:"components-notice__content"},o,(0,e.createElement)("div",{className:"components-notice__actions"},l.map(((t,n)=>{let{className:r,label:o,isPrimary:i,variant:s,noDefaultClasses:a=!1,onClick:c,url:l}=t,u=s;return"primary"===s||a||(u=l?"link":"secondary"),void 0===u&&i&&(u="primary"),(0,e.createElement)(ln,{key:n,href:l,variant:u,onClick:l?void 0:c,className:d()("components-notice__action",r)},o)})))),c&&(0,e.createElement)(ln,{className:"components-notice__dismiss",icon:x,label:(0,s.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),m(),a()},showTooltip:!1}))},hn=window.wc.components,gn=window.wp.url,vn=(window.moment,window.wp.date,window.wc.number,e=>(0,gn.addQueryArgs)("admin.php",e)),yn=window.wp.apiFetch;var wn=n.n(yn);const bn=window.wp.domReady;var En=n.n(bn);const _n=async e=>{let{accept:t}=e;return wn()({path:"/wc/v3/payments/tos",method:"POST",data:{accept:t}})},xn=async()=>{const e=wcpay_tos_settings.trackStripeConnected;wcTracks.isEnabled&&e&&(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.wcpaySettings&&Object.assign(t,{is_test_mode:wcpaySettings.testMode,jetpack_connected:wcpaySettings.isJetpackConnected,wcpay_version:wcpaySettings.version,woo_country_code:wcpaySettings.connect.country}),En()((()=>{var n,r;(null!==(r=null===(n=null===wc||void 0===wc?void 0:wc.tracks)||void 0===n?void 0:n.recordEvent)&&void 0!==r?r:wcTracks.recordEvent)(e,t)}))}("wcpay_stripe_connected",{is_existing_stripe_account:e.is_existing_stripe_account}),wn()({path:"/wc/v3/payments/tos/stripe_track_connected",method:"POST"}))},kn=t=>(0,e.createElement)(hn.Link,i({},t,{href:"https://wordpress.com/tos",target:"_blank",rel:"noopener noreferrer",type:"external"})),Cn=t=>{let{onAccept:n,onDecline:r,isBusy:o,hasError:i}=t;const a=(0,s.sprintf)((0,s.__)("%s: Terms of Service","woocommerce-payments"),"WooPayments"),c=l({mixedString:(0,s.sprintf)((0,s.__)("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,e.createElement)(kn,null)}});return(0,e.createElement)(dn,{title:a,isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,onRequestClose:r,className:"woocommerce-payments__tos-modal"},i&&(0,e.createElement)(fn,{status:"error",isDismissible:!1,className:"woocommerce-payments__tos-error"},(0,s.__)("Something went wrong. Please try accepting the Terms of Service again!","woocommerce-payments")),(0,e.createElement)("div",{className:"woocommerce-payments__tos-wrapper"},(0,e.createElement)("div",{className:"woocommerce-payments__tos-modal-message"},c),(0,e.createElement)("div",{className:"woocommerce-payments__tos-footer"},(0,e.createElement)(ln,{isSecondary:!0,onClick:r,isBusy:o},(0,s.__)("Decline","woocommerce-payments")),(0,e.createElement)(ln,{isPrimary:!0,onClick:n,isBusy:o},(0,s.__)("Accept","woocommerce-payments")))))},Sn=t=>{let{onDisable:n,onCancel:r,isBusy:o,hasError:i}=t;const a=(0,s.sprintf)((0,s.__)("Disable %s","woocommerce-payments"),"WooPayments"),c=l({mixedString:(0,s.sprintf)((0,s.__)("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 deposit data will still be available.","woocommerce-payments"),"WooPayments"),components:{link:(0,e.createElement)(kn,null)}});return(0,e.createElement)(dn,{title:a,isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,onRequestClose:n,className:"woocommerce-payments__tos-modal"},i&&(0,e.createElement)(fn,{status:"error",isDismissible:!1,className:"woocommerce-payments__tos-error"},(0,s.__)("Something went wrong. Please try again!","woocommerce-payments")),(0,e.createElement)("div",{className:"woocommerce-payments__tos-wrapper"},(0,e.createElement)("div",{className:"woocommerce-payments__tos-modal-message"},c),(0,e.createElement)("div",{className:"woocommerce-payments__tos-footer"},(0,e.createElement)(ln,{isTertiary:!0,onClick:r,isBusy:o},(0,s.__)("Back","woocommerce-payments")),(0,e.createElement)(ln,{isPrimary:!0,onClick:n,isBusy:o},(0,s.__)("Disable","woocommerce-payments")))))},An=()=>{const[t,n]=(0,e.useState)(!0),[r,o]=(0,e.useState)(!1),[i,s]=(0,e.useState)(!1),[a,c]=(0,e.useState)(!1),[l,u]=(0,e.useState)(!1),d=()=>n(!1),p=()=>o(!1);return r?(0,e.createElement)(Sn,{onDisable:async()=>{try{u(!1),s(!0),await _n({accept:!1}),p(),window.location=(0,gn.addQueryArgs)(vn({page:"wc-settings",tab:"checkout"}),{"tos-disabled":1})}catch(e){u(!0)}finally{s(!1)}},onCancel:()=>{p(),n(!0)},isBusy:i,hasError:l}):t?(0,e.createElement)(Cn,{onAccept:async()=>{try{c(!1),s(!0),await _n({accept:!0}),xn(),d()}catch(e){c(!0)}finally{s(!1)}},onDecline:()=>{d(),o(!0)},isBusy:i,hasError:a}):null},Rn=window.wp.data;wcpay_tos_settings.tosAgreementRequired?function(){const t=document.createElement("div");t.id="wcpay-tos-container",document.body.appendChild(t),o().render((0,e.createElement)(An,null),t)}():xn(),wcpay_tos_settings.tosAgreementDeclined&&window.addEventListener("load",(()=>{const{settingsUrl:e}=wcpay_tos_settings;(e=>{const{createInfoNotice:t}=(0,Rn.dispatch)("core/notices");t((0,s.sprintf)((0,s.__)("Disabled %s","woocommerce-payments"),"WooPayments"),{actions:[{label:(0,s.__)("Undo","woocommerce-payments"),onClick:async()=>{try{await(async()=>wn()({path:"/wc/v3/payments/tos/reactivate",method:"POST"}))()}finally{window.location=e}}}]})})(e)}))})()})();