HEX
Server: Apache
System: Linux vps.rockyroadprinting.net 4.18.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User: rockyroadprintin (1011)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/rockyroadprintin/www/wp-content/plugins/woocommerce-square/build/settings.js
(()=>{var e={106:(e,t)=>{(()=>{var e={56:(e,t,o)=>{"use strict";e.exports=function(e){var t=o.nc;t&&e.setAttribute("nonce",t)}},72:e=>{"use strict";var t=[];function o(e){for(var o=-1,n=0;n<t.length;n++)if(t[n].identifier===e){o=n;break}return o}function n(e,n){for(var a={},i=[],l=0;l<e.length;l++){var s=e[l],c=n.base?s[0]+n.base:s[0],u=a[c]||0,d="".concat(c," ").concat(u);a[c]=u+1;var p=o(d),m={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==p)t[p].references++,t[p].updater(m);else{var f=r(m,n);n.byIndex=l,t.splice(l,0,{identifier:d,updater:f,references:1})}i.push(d)}return i}function r(e,t){var o=t.domAPI(t);return o.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;o.update(e=t)}else o.remove()}}e.exports=function(e,r){var a=n(e=e||[],r=r||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var l=o(a[i]);t[l].references--}for(var s=n(e,r),c=0;c<a.length;c++){var u=o(a[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}a=s}}},113:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},192:(e,t,o)=>{"use strict";o.d(t,{A:()=>l});var n=o(601),r=o.n(n),a=o(314),i=o.n(a)()(r());i.push([e.id,':root{--wp-admin-theme-color: #007cba;--wp-admin-theme-color--rgb: 0, 124, 186;--wp-admin-theme-color-darker-10: rgb(0, 107, 160.5);--wp-admin-theme-color-darker-10--rgb: 0, 107, 161;--wp-admin-theme-color-darker-20: #005a87;--wp-admin-theme-color-darker-20--rgb: 0, 90, 135;--wp-admin-border-width-focus: 2px;--wp-block-synced-color: #7a00df;--wp-block-synced-color--rgb: 122, 0, 223;--wp-bound-block-color: var(--wp-block-synced-color)}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){:root{--wp-admin-border-width-focus: 1.5px}}.codeamp-components-multi-select-control__input-container{font-size:13px;line-height:normal}.codeamp-components-multi-select-control__input-container{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;padding:6px 8px;box-shadow:0 0 0 rgba(0,0,0,0);border-radius:2px;border:1px solid #949494;font-size:16px;line-height:normal;width:100%;margin:0 0 8px 0;padding:0;cursor:text}@media not (prefers-reduced-motion){.codeamp-components-multi-select-control__input-container{transition:box-shadow .1s linear}}@media(min-width: 600px){.codeamp-components-multi-select-control__input-container{font-size:13px;line-height:normal}}.codeamp-components-multi-select-control__input-container:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}.codeamp-components-multi-select-control__input-container::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.codeamp-components-multi-select-control__input-container::-moz-placeholder{color:rgba(30,30,30,.62)}.codeamp-components-multi-select-control__input-container:-ms-input-placeholder{color:rgba(30,30,30,.62)}.codeamp-components-multi-select-control__input-container.is-disabled{background:#ddd;border-color:#ddd}.codeamp-components-multi-select-control__input-container.is-active{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}.codeamp-components-multi-select-control__input-container input[type=text].codeamp-components-multi-select-control__input{display:inline-block;flex:1;font-family:inherit;font-size:16px;width:100%;max-width:100%;margin-left:4px;padding:0;min-height:24px;min-width:50px;background:inherit;border:0;color:#1e1e1e;box-shadow:none;line-height:30px}@media(min-width: 600px){.codeamp-components-multi-select-control__input-container input[type=text].codeamp-components-multi-select-control__input{font-size:13px}}.codeamp-components-multi-select-control__input-container input[type=text].codeamp-components-multi-select-control__input:focus,.codeamp-components-multi-select-control.is-active .codeamp-components-multi-select-control__input-container input[type=text].codeamp-components-multi-select-control__input{outline:none;box-shadow:none}.codeamp-components-multi-select-control__input-container .codeamp-components-multi-select-control__token+input[type=text].codeamp-components-multi-select-control__input{width:auto}.codeamp-components-multi-select-control__help{font-size:12px;font-style:normal;color:#757575}.codeamp-components-multi-select-control__tokens-container{min-height:38px;padding:4px;width:100%}.codeamp-components-multi-select-control__token{font-size:13px;display:flex;color:#1e1e1e;max-width:100%;padding:0}.codeamp-components-multi-select-control__token.is-borderless{position:relative;padding:0 24px 0 0}.codeamp-components-multi-select-control__token.is-borderless .codeamp-components-multi-select-control__token-text{background:rgba(0,0,0,0);color:var(--wp-admin-theme-color)}.codeamp-components-multi-select-control__token.is-borderless .codeamp-components-multi-select-control__remove-token{background:rgba(0,0,0,0);color:#757575;position:absolute;top:1px;right:0;padding:0}.codeamp-components-multi-select-control__token.is-borderless.is-success .codeamp-components-multi-select-control__token-text{color:#4ab866}.codeamp-components-multi-select-control__token.is-borderless.is-error .codeamp-components-multi-select-control__token-text{color:#cc1818;border-radius:4px 0 0 4px;padding:0 4px 0 6px}.codeamp-components-multi-select-control__token.is-borderless.is-validating .codeamp-components-multi-select-control__token-text{color:#1e1e1e}.codeamp-components-multi-select-control__token.is-disabled .codeamp-components-multi-select-control__remove-token{cursor:default}.codeamp-components-multi-select-control__token-text,.codeamp-components-multi-select-control__remove-token.components-button{display:inline-block;line-height:30px;height:auto;background:#ddd;min-width:unset;transition:all .2s cubic-bezier(0.4, 1, 0.4, 1)}@media(prefers-reduced-motion: reduce){.codeamp-components-multi-select-control__token-text,.codeamp-components-multi-select-control__remove-token.components-button{transition-duration:0s;transition-delay:0s;animation-duration:1ms;animation-delay:0s}}.codeamp-components-multi-select-control__token-text{border-radius:2px 0 0 2px;padding:0 0 0 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.codeamp-components-multi-select-control__remove-token.components-button{cursor:pointer;border-radius:0 2px 2px 0;padding:0 4px;color:#1e1e1e;line-height:10px;overflow:initial}.codeamp-components-multi-select-control__remove-token.components-button:hover{color:#1e1e1e}.codeamp-components-multi-select-control__suggestions-list{flex:1 0 100%;min-width:100%;overflow-y:auto;transition:all .15s ease-in-out;list-style:none;border-top:1px solid #757575;margin:0;padding:0}@media(prefers-reduced-motion: reduce){.codeamp-components-multi-select-control__suggestions-list{transition-duration:0s;transition-delay:0s}}.codeamp-components-multi-select-control__no-suggestions{color:#757575;font-size:13px;margin:0;display:block;padding:4px 8px}.codeamp-components-multi-select-control__suggestion{color:#757575;display:block;font-size:13px;padding:4px 8px;margin:0;cursor:pointer}.codeamp-components-multi-select-control__suggestion.is-selected{background:var(--wp-admin-theme-color);color:#fff}.codeamp-components-multi-select-control__suggestion-match{text-decoration:underline}',""]);const l=i},243:(e,t,o)=>{"use strict";o.d(t,{A:()=>l});var n=o(601),r=o.n(n),a=o(314),i=o.n(a)()(r());i.push([e.id,".codeamp-components-resource-select-control>.components-base-control__field{position:relative;display:flex;flex-wrap:wrap}.codeamp-components-resource-select-control>.components-base-control__field>.components-base-control__label{flex:2}.codeamp-components-resource-select-control__label{margin-bottom:8px}.codeamp-components-resource-select-control .codeamp-components-resource-select-control__menu_button.has-icon{height:40px;margin-bottom:0;min-width:26px;padding:2px 0;flex-basis:26px;width:26px}.codeamp-components-resource-select-control__select{width:auto;flex:1}.codeamp-components-resource-select-control .components-base-control{margin-bottom:0}.codeamp-components-resource-select-control .components-base-control__field{margin-bottom:0}.codeamp-components-resource-select-control .components-base-control{flex:1}",""]);const l=i},314:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o="",n=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),n&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),n&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o}).join("")},t.i=function(e,o,n,r,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var l=0;l<this.length;l++){var s=this[l][0];null!=s&&(i[s]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);n&&i[u[0]]||(void 0!==a&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=a),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},485:(e,t)=>{var o;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(o);else if(Array.isArray(o)){if(o.length){var i=r.apply(null,o);i&&e.push(i)}}else if("object"===a){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){e.push(o.toString());continue}for(var l in o)n.call(o,l)&&o[l]&&e.push(l)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},601:e=>{"use strict";e.exports=function(e){return e[1]}},659:e=>{"use strict";var t={};e.exports=function(e,o){var n=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},825:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(o){!function(e,t,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var r=void 0!==o.layer;r&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,r&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var a=o.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,o)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}}},o={};function n(t){var r=o[t];if(void 0!==r)return r.exports;var a=o[t]={id:t,exports:{}};return e[t](a,a.exports,n),a.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 o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};(()=>{"use strict";n.r(r),n.d(r,{MultiSelectControl:()=>Ae,ResourceSelectControl:()=>O});const e=window.wp.i18n,t=window.wp.components,o=window.wp.compose,a=window.React,i=window.wp.primitives,l=(0,a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(i.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));var s=n(72),c=n.n(s),u=n(825),d=n.n(u),p=n(659),m=n.n(p),f=n(56),g=n.n(f),_=n(540),h=n.n(_),y=n(113),b=n.n(y),v=n(243),w={};w.styleTagTransform=b(),w.setAttributes=g(),w.insert=m().bind(null,"head"),w.domAPI=d(),w.insertStyleElement=h(),c()(v.A,w),v.A&&v.A.locals&&v.A.locals;var S=n(485),E=n.n(S);function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},x.apply(null,arguments)}function k(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function T(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?k(Object(o),!0).forEach(function(t){A(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):k(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function A(e,t,o){return(t=function(e){var t=function(e){if("object"!=C(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=C(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==C(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}var P=function(){},O=function(n){var r,a,i=n.onChange,s=void 0===i?P:i,c=n.label,u=void 0===c?"":c,d=n.loadingLabel,p=void 0===d?(0,e.__)("Loading","codeamp-block-components"):d,m=n.showActions,f=void 0===m||m,g=n.dropdownProps,_=n.dropdownToggleProps,h=n.disabled,y=void 0!==h&&h,b=n.defaultOption,v=n.options,w=n.value,S=n.help,C=n.id,k=n.className,A=[];p&&(A=[{value:"loading",label:p}]),v&&(A=[],b&&A.push(b),(r=A).push.apply(r,function(e){if(Array.isArray(e))return q(e)}(a=v)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?q(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));var R=(0,o.useInstanceId)(O,"codeamp-components-resource-select-control");return C&&(R=C),React.createElement(t.BaseControl,{id:R,className:E()("components-base-control codeamp-components-resource-select-control",k),help:S,label:u,__nextHasNoMarginBottom:!0},React.createElement(t.__experimentalHStack,null,React.createElement(t.SelectControl,{id:R,value:w,options:A,className:"codeamp-components-resource-select-control__select",onChange:s,disabled:y,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),f&&React.createElement(t.DropdownMenu,x({icon:l,toggleProps:T(T({className:"codeamp-components-resource-select-control__menu_button",iconSize:26},_),{},{__next40pxDefaultSize:!0})},g))))};const R=window.wp.element,D=window.wp.a11y,I=window.wp.isShallowEqual;var N=n.n(I);const L=(0,a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(i.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"}));var M=function(){};function j(n){var r=n.value,a=n.label,i=n.title,l=n.isBorderless,s=void 0!==l&&l,c=n.disabled,u=void 0!==c&&c,d=n.onClickRemove,p=void 0===d?M:d,m=n.onMouseEnter,f=n.onMouseLeave,g=n.messages,_=n.termPosition,h=n.termsCount,y=(0,o.useInstanceId)(j),b=E()("codeamp-components-multi-select-control__token",{"is-borderless":s,"is-disabled":u}),v=(0,e.sprintf)((0,e.__)("%1$s (%2$s of %3$s)"),a,_,h);return React.createElement("span",{className:b,onMouseEnter:m,onMouseLeave:f,title:i,style:{margin:"0"}},React.createElement("span",{className:"codeamp-components-multi-select-control__token-text",id:"codeamp-components-multi-select-control__token-text-".concat(y)},React.createElement(t.VisuallyHidden,{as:"span"},v),React.createElement("span",{"aria-hidden":"true"},a)),React.createElement(t.Button,{className:"codeamp-components-multi-select-control__remove-token",icon:L,onClick:u?M:function(){return p({value:r})},label:g.remove,"aria-describedby":"codeamp-components-multi-select-control__token-text-".concat(y)}))}var G=["value","isExpanded","instanceId","selectedSuggestionIndex","className","onChange","onFocus","onBlur"];function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},B.apply(null,arguments)}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}const z=(0,R.forwardRef)(function(e,t){var o,n=e.value,r=e.isExpanded,a=e.instanceId,i=e.selectedSuggestionIndex,l=e.className,s=e.onChange,c=e.onFocus,u=e.onBlur,d=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;o[n]=e[n]}return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)o=a[n],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,G),p=function(e){if(Array.isArray(e))return e}(o=(0,R.useState)(!1))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var o,n,r,a,i=[],l=!0,s=!1;try{for(r=(t=t.call(e)).next;!(l=(o=r.call(t)).done)&&(i.push(o.value),2!==i.length);l=!0);}catch(e){s=!0,n=e}finally{try{if(!l&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(s)throw n}}return i}}(o)||function(e){if(e){if("string"==typeof e)return F(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?F(e,2):void 0}}(o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),m=p[0],f=p[1],g=n?n.length+1:0;return React.createElement("input",B({ref:t,id:a,type:"text"},d,{value:n||"",onChange:function(e){s&&s({value:e.target.value})},onFocus:function(e){f(!0),null==c||c(e)},onBlur:function(e){f(!1),null==u||u(e)},size:g,className:E()(l,"codeamp-components-multi-select-control__input"),autoComplete:"off",role:"combobox","aria-expanded":r,"aria-autocomplete":"list","aria-owns":r?"".concat(a,"-suggestions"):void 0,"aria-activedescendant":m&&-1!==i&&r?"".concat(a,"-suggestions-").concat(i):void 0,"aria-describedby":"".concat(a,"-howto"),"data-lpignore":"true"}))});function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}function U(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function W(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function V(e,t){var o=e["page".concat(t?"Y":"X","Offset")],n="scroll".concat(t?"Top":"Left");if("number"!=typeof o){var r=e.document;"number"!=typeof(o=r.documentElement[n])&&(o=r.body[n])}return o}function $(e){return V(e)}function X(e){return V(e,!0)}function Y(e){var t=function(e){var t,o,n,r=e.ownerDocument,a=r.body,i=r&&r.documentElement;return o=(t=e.getBoundingClientRect()).left,n=t.top,{left:o-=i.clientLeft||a.clientLeft||0,top:n-=i.clientTop||a.clientTop||0}}(e),o=e.ownerDocument,n=o.defaultView||o.parentWindow;return t.left+=$(n),t.top+=X(n),t}var K,J=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),Z=/^(top|right|bottom|left)$/,Q="currentStyle",ee="runtimeStyle",te="left";function oe(e,t){for(var o=0;o<e.length;o++)t(e[o])}function ne(e){return"border-box"===K(e,"boxSizing")}"undefined"!=typeof window&&(K=window.getComputedStyle?function(e,t,o){var n="",r=e.ownerDocument,a=o||r.defaultView.getComputedStyle(e,null);return a&&(n=a.getPropertyValue(t)||a[t]),n}:function(e,t){var o=e[Q]&&e[Q][t];if(J.test(o)&&!Z.test(t)){var n=e.style,r=n[te],a=e[ee][te];e[ee][te]=e[Q][te],n[te]="fontSize"===t?"1em":o||0,o=n.pixelLeft+"px",n[te]=r,e[ee][te]=a}return""===o?"auto":o});var re=["margin","border","padding"];function ae(e,t,o){var n,r,a,i=0;for(r=0;r<t.length;r++)if(n=t[r])for(a=0;a<o.length;a++){var l;l="border"===n?"".concat(n+o[a],"Width"):n+o[a],i+=parseFloat(K(e,l))||0}return i}function ie(e){return null!=e&&e==e.window}var le={};function se(e,t,o){if(ie(e))return"width"===t?le.viewportWidth(e):le.viewportHeight(e);if(9===e.nodeType)return"width"===t?le.docWidth(e):le.docHeight(e);var n="width"===t?["Left","Right"]:["Top","Bottom"],r="width"===t?e.offsetWidth:e.offsetHeight,a=(K(e),ne(e)),i=0;(null==r||r<=0)&&(r=void 0,(null==(i=K(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===o&&(o=a?1:-1);var l=void 0!==r||a,s=r||i;if(-1===o)return l?s-ae(e,["border","padding"],n):i;if(l){var c=2===o?-ae(e,["border"],n):ae(e,["margin"],n);return s+(1===o?0:c)}return i+ae(e,re.slice(o),n)}oe(["Width","Height"],function(e){le["doc".concat(e)]=function(t){var o=t.document;return Math.max(o.documentElement["scroll".concat(e)],o.body["scroll".concat(e)],le["viewport".concat(e)](o))},le["viewport".concat(e)]=function(t){var o="client".concat(e),n=t.document,r=n.body,a=n.documentElement[o];return"CSS1Compat"===n.compatMode&&a||r&&r[o]||a}});var ce={position:"absolute",visibility:"hidden",display:"block"};function ue(e){var t,o=arguments;return 0!==e.offsetWidth?t=se.apply(void 0,o):function(e,n){var r,a={},i=e.style;for(r in n)n.hasOwnProperty(r)&&(a[r]=i[r],i[r]=n[r]);for(r in function(){t=se.apply(void 0,o)}.call(e),n)n.hasOwnProperty(r)&&(i[r]=a[r])}(e,ce),t}function de(e,t,o){var n=o;if("object"!==H(t))return void 0!==n?("number"==typeof n&&(n+="px"),void(e.style[t]=n)):K(e,t);for(var r in t)t.hasOwnProperty(r)&&de(e,r,t[r])}oe(["width","height"],function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);le["outer".concat(t)]=function(t,o){return t&&ue(t,e,o?0:1)};var o="width"===e?["Left","Right"]:["Top","Bottom"];le[e]=function(t,n){return void 0===n?t&&ue(t,e,-1):t?(K(t),ne(t)&&(n+=ae(t,["padding","border"],o)),de(t,e,n)):void 0}});var pe=function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?W(o,!0).forEach(function(t){U(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):W(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return Y(e);!function(e,t){"static"===de(e,"position")&&(e.style.position="relative");var o,n,r=Y(e),a={};for(n in t)t.hasOwnProperty(n)&&(o=parseFloat(de(e,n))||0,a[n]=o+t[n]-r[n]);de(e,a)}(e,t)},isWindow:ie,each:oe,css:de,clone:function(e){var t={};for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(ie(e)){if(void 0===t)return $(e);window.scrollTo(t,X(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(ie(e)){if(void 0===t)return X(e);window.scrollTo($(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},le);function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}var fe=function(e){e.preventDefault()};const ge=function(t){var n,r=t.selectedIndex,a=t.scrollIntoView,i=t.searchValue,l=t.onHover,s=t.onSelect,c=t.suggestions,u=void 0===c?[]:c,d=t.instanceId,p=t.__experimentalRenderItem,m=function(e){if(Array.isArray(e))return e}(n=(0,R.useState)(!1))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var o,n,r,a,i=[],l=!0,s=!1;try{for(r=(t=t.call(e)).next;!(l=(o=r.call(t)).done)&&(i.push(o.value),2!==i.length);l=!0);}catch(e){s=!0,n=e}finally{try{if(!l&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(s)throw n}}return i}}(n)||function(e){if(e){if("string"==typeof e)return me(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?me(e,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),f=m[0],g=m[1],_=(0,o.useRefEffect)(function(e){var t;return r>-1&&a&&e.children[r]&&(g(!0),function(e,t,o){o=o||{},9===t.nodeType&&(t=pe.getWindow(t));var n=o.allowHorizontalScroll,r=o.onlyScrollIfNeeded,a=o.alignWithTop,i=o.alignWithLeft,l=o.offsetTop||0,s=o.offsetLeft||0,c=o.offsetBottom||0,u=o.offsetRight||0;n=void 0===n||n;var d,p,m,f,g,_,h,y,b,v,w=pe.isWindow(t),S=pe.offset(e),E=pe.outerHeight(e),C=pe.outerWidth(e);w?(h=t,v=pe.height(h),b=pe.width(h),y={left:pe.scrollLeft(h),top:pe.scrollTop(h)},g={left:S.left-y.left-s,top:S.top-y.top-l},_={left:S.left+C-(y.left+b)+u,top:S.top+E-(y.top+v)+c},f=y):(d=pe.offset(t),p=t.clientHeight,m=t.clientWidth,f={left:t.scrollLeft,top:t.scrollTop},g={left:S.left-(d.left+(parseFloat(pe.css(t,"borderLeftWidth"))||0))-s,top:S.top-(d.top+(parseFloat(pe.css(t,"borderTopWidth"))||0))-l},_={left:S.left+C-(d.left+m+(parseFloat(pe.css(t,"borderRightWidth"))||0))+u,top:S.top+E-(d.top+p+(parseFloat(pe.css(t,"borderBottomWidth"))||0))+c}),g.top<0||_.top>0?!0===a?pe.scrollTop(t,f.top+g.top):!1===a?pe.scrollTop(t,f.top+_.top):g.top<0?pe.scrollTop(t,f.top+g.top):pe.scrollTop(t,f.top+_.top):r||((a=void 0===a||!!a)?pe.scrollTop(t,f.top+g.top):pe.scrollTop(t,f.top+_.top)),n&&(g.left<0||_.left>0?!0===i?pe.scrollLeft(t,f.left+g.left):!1===i?pe.scrollLeft(t,f.left+_.left):g.left<0?pe.scrollLeft(t,f.left+g.left):pe.scrollLeft(t,f.left+_.left):r||((i=void 0===i||!!i)?pe.scrollLeft(t,f.left+g.left):pe.scrollLeft(t,f.left+_.left)))}(e.children[r],e,{onlyScrollIfNeeded:!0}),t=requestAnimationFrame(function(){g(!1)})),function(){void 0!==t&&cancelAnimationFrame(t)}},[r,a]),h=function(e){return function(){f||null==l||l(e)}},y=function(e){return function(){null==s||s(e)}};return React.createElement("ul",{ref:_,className:"codeamp-components-multi-select-control__suggestions-list",id:"".concat(d,"-suggestions"),role:"listbox"},0===u.length&&React.createElement("li",{className:"codeamp-components-multi-select-control__no-suggestions",role:"option"},(0,e.__)("No results found.","codeamp-block-components")),u.map(function(e,t){var o,n=function(e){var t=e.label.toLocaleLowerCase().indexOf(i);return{suggestionBeforeMatch:e.label.substring(0,t),suggestionMatch:e.label.substring(t,t+i.length),suggestionAfterMatch:e.label.substring(t+i.length)}}(e),a=E()("codeamp-components-multi-select-control__suggestion",{"is-selected":t===r});return o="function"==typeof p?p({item:e}):n?React.createElement("span",{"aria-label":e.label},n.suggestionBeforeMatch,React.createElement("strong",{className:"codeamp-components-multi-select-control__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch):e.label,React.createElement("li",{id:"".concat(d,"-suggestions-").concat(t),role:"option",className:a,key:e.value,onMouseDown:fe,onClick:y(e),onMouseEnter:h(e),"aria-selected":t===r},o)}))};var _e=n(192),he={};function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},ye.apply(null,arguments)}function be(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function ve(e,t,o){return(t=function(e){var t=function(e){if("object"!=we(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=we(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==we(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function we(e){return we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},we(e)}function Se(e){return function(e){if(Array.isArray(e))return xe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ce(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a,i,l=[],s=!0,c=!1;try{if(a=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;s=!1}else for(;!(s=(n=a.call(o)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=o.return&&(i=o.return(),Object(i)!==i))return}finally{if(c)throw r}}return l}}(e,t)||Ce(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ce(e,t){if(e){if("string"==typeof e)return xe(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?xe(e,t):void 0}}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function ke(e){if(""===e)return null;var t=null!=e?e:"";return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).find(function(e){return-1!==e.label.toLocaleLowerCase().indexOf(t.trim().toLocaleLowerCase())})}he.styleTagTransform=b(),he.setAttributes=g(),he.insert=m().bind(null,"head"),he.domAPI=d(),he.insertStyleElement=h(),c()(_e.A,he),_e.A&&_e.A.locals&&_e.A.locals;var Te=function(){};function Ae(n){var r=n.autoCapitalize,a=n.autoComplete,i=n.maxLength,l=n.placeholder,s=n.label,c=void 0===s?(0,e.__)("Add item"):s,u=n.help,d=n.className,p=n.suggestions,m=void 0===p?[]:p,f=n.options,g=void 0===f?[]:f,_=n.maxSuggestions,h=void 0===_?100:_,y=n.value,b=void 0===y?[]:y,v=n.onChange,w=void 0===v?function(){}:v,S=n.onInputChange,C=void 0===S?function(){}:S,x=n.onFocus,k=void 0===x?void 0:x,T=(n.isBorderless,n.id),A=n.disabled,q=void 0!==A&&A,P=n.messages,O=void 0===P?{added:(0,e.__)("Item added."),removed:(0,e.__)("Item removed."),remove:(0,e.__)("Remove item"),__experimentalInvalid:(0,e.__)("Invalid item")}:P,I=n.__experimentalRenderItem,L=n.__experimentalAutoSelectFirstMatch,M=void 0===L||L,G=n.__experimentalValidateInput,B=void 0===G?function(){return!0}:G,F=n.__experimentalCloseSuggestionsOnSelect,H=void 0===F||F,U=(0,o.useInstanceId)(Ae,"codeamp-components-multi-select-control");T&&(U=T);var W=Ee((0,R.useState)(""),2),V=W[0],$=W[1],X=Ee((0,R.useState)(0),2),Y=X[0],K=X[1],J=Ee((0,R.useState)(!1),2),Z=J[0],Q=J[1],ee=Ee((0,R.useState)(!1),2),te=ee[0],oe=ee[1],ne=Ee((0,R.useState)(-1),2),re=ne[0],ae=ne[1],ie=Ee((0,R.useState)(!1),2),le=ie[0],se=ie[1],ce=(0,o.usePrevious)(m),ue=(0,o.usePrevious)(b),de=(0,R.useRef)(null),pe=(0,R.useRef)(null),me=(0,o.useDebounce)(D.speak,500);function fe(){var e;null===(e=de.current)||void 0===e||e.focus()}function _e(){var e;return de.current===(null===(e=de.current)||void 0===e?void 0:e.ownerDocument.activeElement)}function he(e){_e()||e.target===pe.current?(Q(!0),oe(!0)):Q(!1),"function"==typeof k&&k(e)}function Ce(e){e.target===pe.current&&Z&&e.preventDefault()}function xe(e){De(e.value),fe()}function qe(e){var t=!1;return _e()&&je()&&(e(),t=!0),t}function Pe(){var e=Me()-1;e>-1&&De(b[e])}function Oe(){var e=Me();e<b.length&&(De(b[e]),function(e){K(b.length-Math.max(e,-1)-1)}(e))}function Re(e){B(e.label)?(function(e){if(Se(new Set(e.filter(function(e){return!function(e){return b.some(function(t){return Ie(e)===Ie(t)})}(e)}))),e.length>0){var t=Se(b);t.splice.apply(t,[Me(),0].concat(Se(e))),w(t)}}([e.value]),(0,D.speak)(O.added,"assertive"),$(""),se(!1),ae(-1),H&&oe(!1),Z&&fe()):(0,D.speak)(O.__experimentalInvalid,"assertive")}function De(e){var t=b.filter(function(t){return Ie(t)!==Ie(e)});w(t),(0,D.speak)(O.removed,"assertive")}function Ie(e){return"object"===we(e)?e.value:e}function Ne(){return g.filter(function(e){return-1===b.indexOf(e.value)})}function Le(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ne(),o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:h;if(""!==e.trim()){var n=[],r=[];t.forEach(function(t){var o=t.label.toLocaleLowerCase().indexOf(e.trim().toLocaleLowerCase());0===o?n.push(t):o>0&&r.push(t)}),t=n.concat(r)}return t.slice(0,o)}function Me(){return b.length-Y}function je(){return 0===V.length}function Ge(){var e;return(null===(e=ke(V))||void 0===e||null===(e=e.label)||void 0===e?void 0:e.length)>0}function Be(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],o=Le(V),n=o.length>0;t&&(M&&n?(ae(0),se(!0)):(ae(-1),se(!1))),ae(0);var r=n?(0,e.sprintf)((0,e._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",o.length),o.length):(0,e.__)("No results.");me(r,"assertive")}function Fe(e){return g.find(function(t){return t.value===e})||null}(0,R.useEffect)(function(){Z&&!_e()&&fe()},[Z]),(0,R.useEffect)(function(){var e=!N()(m,ce||[]);(e||b!==ue)&&Be(e)},[m,ce,b,ue]),(0,R.useEffect)(function(){Be()},[V]),q&&Z&&(Q(!1),$(""));var ze,He,Ue=E()(d,"codeamp-components-multi-select-control__input-container",{"is-active":Z,"is-disabled":q}),We={className:"components-base-control codeamp-components-multi-select-control",tabIndex:-1},Ve=Le();return q||(We=Object.assign({},We,{onKeyDown:function(e){var t=!1;if(!e.defaultPrevented){switch(e.code){case"Backspace":t=qe(Pe);break;case"Enter":case"Space":t=function(){var e=!1,t=function(){if(-1!==re)return Le()[re]}();return t&&te?(Re(t),e=!0):Ge()&&""!==V.trim()&&(Re(V),e=!0),e}();break;case"ArrowLeft":t=function(){var e=!1;return je()&&(K(function(e){return Math.min(e+1,b.length)}),e=!0),e}();break;case"ArrowUp":t=te?(ae(function(e){return(0===e?Le(V,Ne(),b,h).length:e)-1}),se(!0),!0):(oe(!0),ae(0),se(!0),!0);break;case"ArrowRight":t=function(){var e=!1;return je()&&(K(function(e){return Math.max(e-1,0)}),e=!0),e}();break;case"ArrowDown":t=te?(ae(function(e){return(e+1)%Le(V,Ne(),b,h).length}),se(!0),!0):(oe(!0),ae(0),se(!0),!0);break;case"Delete":t=qe(Oe);break;case"Escape":t=function(e){return e.target instanceof HTMLInputElement&&($(e.target.value),oe(!1),ae(-1),se(!1)),!0}(e)}t&&e.preventDefault()}},onKeyPress:function(e){var t=!1;44===e.charCode&&(Ge()&&Re(V),t=!0),t&&e.preventDefault()},onFocus:he})),React.createElement(t.BaseControl,{id:U,label:c,help:u},React.createElement("div",We,React.createElement("div",{ref:pe,className:Ue,tabIndex:-1,onMouseDown:Ce,onTouchStart:Ce},React.createElement(t.Flex,{className:"codeamp-components-multi-select-control__tokens-container",justify:"flex-start",align:"flex-start",gap:"4px",wrap:!0,hasTokens:!!b.length},(He=[],b.forEach(function(e,o){var n=Fe(e);Fe(e)&&He.push(function(e,o){var n=e.value,r=e.label,a=e.onMouseEnter,i=void 0===a?Te:a,l=e.onMouseLeave,s=void 0===l?Te:l,c=e.isBorderless,u=void 0!==c&&c,d=n,p=o+1;return React.createElement(t.FlexItem,{key:"token-"+d},React.createElement(j,{value:d,label:r,title:"string"!=typeof token?r:void 0,onClickRemove:xe,isBorderless:u,onMouseEnter:i,onMouseLeave:s,disabled:q,messages:O,termPosition:p,termsCount:b.length}))}(function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?be(Object(o),!0).forEach(function(t){ve(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):be(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({},n),o))}),He.splice(Me(),0,(ze={instanceId:U,autoCapitalize:r,autoComplete:a,placeholder:0===b.length?l:"",key:"input",disabled:q,value:V,onBlur:function(){Ge()?Q(!1):($(""),K(0),Q(!1),oe(!1),ae(-1),se(!1))},isExpanded:te,selectedSuggestionIndex:re,onClick:he},React.createElement(z,ye({},ze,{onChange:i&&b.length>=i?void 0:function(e){var t=e.value;$(t),oe(!0),C(t)},ref:de})))),He)),te&&React.createElement(ge,{instanceId:U,match:ke(V,g),searchValue:V.trim(),suggestions:Ve,selectedIndex:re,scrollIntoView:le,onHover:function(e){var t=Le().indexOf(e);t>=0&&(ae(t),se(!1))},onSelect:function(e){Re(e)},__experimentalRenderItem:I}))))}})();var a=t;for(var i in r)a[i]=r[i];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})()},133:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var o=null;if(!e||"string"!=typeof e)return o;var n=(0,r.default)(e),a="function"==typeof t;return n.forEach(function(e){if("declaration"===e.type){var n=e.property,r=e.value;a?t(n,r,e):r&&((o=o||{})[n]=r)}}),o};var r=n(o(788))},141:function(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=o(413),i=o(957);r(o(957),t);var l={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,o){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(o=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=o?o:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var o=this.options.xmlMode?a.ElementType.Tag:void 0,n=new i.Element(e,t,void 0,o);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var o=new i.Text(e);this.addNode(o),this.lastNode=o}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var o=new i.ProcessingInstruction(e,t);this.addNode(o)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],o=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),o&&(e.prev=o,o.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},210:(e,t,o)=>{"use strict";function n(e,t,o,n,r,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=r,this.mustUseProperty=o,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(e=>{r[e]=new n(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{r[e]=new n(e,1,!1,t,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(e=>{r[e]=new n(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{r[e]=new n(e,2,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(e=>{r[e]=new n(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(e=>{r[e]=new n(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(e=>{r[e]=new n(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(e=>{r[e]=new n(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(e=>{r[e]=new n(e,5,!1,e.toLowerCase(),null,!1,!1)});const a=/[\-\:]([a-z])/g,i=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(e=>{const t=e.replace(a,i);r[t]=new n(t,1,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(a,i);r[t]=new n(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(a,i);r[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(e=>{r[e]=new n(e,1,!1,e.toLowerCase(),null,!1,!1)}),r.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(e=>{r[e]=new n(e,1,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:l,SAME:s,possibleStandardNames:c}=o(811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce((e,t)=>{const o=c[t];return o===s?e[t]=t:o===l?e[t.toLowerCase()]=t:e[t]=o,e},{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},229:function(e,t,o){"use strict";var n=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(o(133)),r=o(917);function a(e,t){var o={};return e&&"string"==typeof e?((0,n.default)(e,function(e,n){e&&n&&(o[(0,r.camelCase)(e,t)]=n)}),o):o}a.default=a,e.exports=a},270:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=t.CARRIAGE_RETURN_PLACEHOLDER=t.CARRIAGE_RETURN_REGEX=t.CARRIAGE_RETURN=t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,t){return e[t.toLowerCase()]=t,e},{}),t.CARRIAGE_RETURN="\r",t.CARRIAGE_RETURN_REGEX=new RegExp(t.CARRIAGE_RETURN,"g"),t.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(t.CARRIAGE_RETURN_PLACEHOLDER,"g")},308:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,o){void 0===o&&(o={});for(var n=[],r="function"==typeof o.replace,c=o.transform||i.returnFirstArg,u=o.library||l,d=u.cloneElement,p=u.createElement,m=u.isValidElement,f=t.length,g=0;g<f;g++){var _=t[g];if(r){var h=o.replace(_,g);if(m(h)){f>1&&(h=d(h,{key:h.key||g})),n.push(c(h,_,g));continue}}if("text"!==_.type){var y=_,b={};s(y)?((0,i.setStyleProp)(y.attribs.style,y.attribs),b=y.attribs):y.attribs&&(b=(0,a.default)(y.attribs,y.name));var v=void 0;switch(_.type){case"script":case"style":_.children[0]&&(b.dangerouslySetInnerHTML={__html:_.children[0].data});break;case"tag":"textarea"===_.name&&_.children[0]?b.defaultValue=_.children[0].data:_.children&&_.children.length&&(v=e(_.children,o));break;default:continue}f>1&&(b.key=g),n.push(c(p(_.name,b,v),_,g))}else{var w=!_.data.trim().length;if(w&&_.parent&&!(0,i.canTextBeChildOfNode)(_.parent))continue;if(o.trim&&w)continue;n.push(c(_.data,_,g))}}return 1===n.length?n[0]:n};var r=o(609),a=n(o(840)),i=o(958),l={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function s(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,i.isCustomComponent)(e.name,e.attribs)}},413:(e,t)=>{"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(o=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===o.Tag||e.type===o.Script||e.type===o.Style},t.Root=o.Root,t.Text=o.Text,t.Directive=o.Directive,t.Comment=o.Comment,t.Script=o.Script,t.Style=o.Style,t.Tag=o.Tag,t.CDATA=o.CDATA,t.Doctype=o.Doctype},418:(e,t,o)=>{"use strict";var n=o(609),r=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,o){var n,s={},c=null,u=null;for(n in void 0!==o&&(c=""+o),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,n)&&!l.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===s[n]&&(s[n]=t[n]);return{$$typeof:r,type:e,key:c,ref:u,props:s,_owner:i.current}}},442:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,i.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]};var r=n(o(471));t.htmlToDOM=r.default;var a=n(o(840));t.attributesToProps=a.default;var i=n(o(308));t.domToReact=i.default;var l=o(141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return l.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return l.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return l.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return l.Text}});var s={lowerCaseAttributeNames:!1}},471:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(i),o=t?t[1]:void 0;return(0,a.formatDOM)((0,r.default)(e),null,o)};var r=n(o(496)),a=o(731),i=/<(![a-zA-Z\s]+)>/},496:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,o,p=(e=(0,n.escapeSpecialCharacters)(e)).match(l),m=p&&p[1]?p[1].toLowerCase():"";switch(m){case r:var f=d(e);return s.test(e)||null===(t=null==(h=f.querySelector(a))?void 0:h.parentNode)||void 0===t||t.removeChild(h),c.test(e)||null===(o=null==(h=f.querySelector(i))?void 0:h.parentNode)||void 0===o||o.removeChild(h),f.querySelectorAll(r);case a:case i:var _=u(e).querySelectorAll(m);return c.test(e)&&s.test(e)?_[0].parentNode.childNodes:_;default:return g?g(e):(h=u(e,i).querySelector(i)).childNodes;var h}};var n=o(731),r="html",a="head",i="body",l=/<([a-zA-Z]+[0-9]?)/,s=/<head[^]*>/i,c=/<body[^]*>/i,u=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},p="object"==typeof window&&window.DOMParser;if("function"==typeof p){var m=new p;u=d=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),m.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var f=document.implementation.createHTMLDocument();u=function(e,t){if(t){var o=f.documentElement.querySelector(t);return o&&(o.innerHTML=e),f}return f.documentElement.innerHTML=e,f}}var g,_="object"==typeof document&&document.createElement("template");_&&_.content&&(g=function(e){return _.innerHTML=e,_.content.childNodes})},609:e=>{"use strict";e.exports=window.React},706:(e,t,o)=>{"use strict";e.exports=o(418)},731:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=a,t.escapeSpecialCharacters=function(e){return e.replace(r.CARRIAGE_RETURN_REGEX,r.CARRIAGE_RETURN_PLACEHOLDER)},t.revertEscapedCharacters=l,t.formatDOM=function e(t,o,r){void 0===o&&(o=null);for(var s,c=[],u=0,d=t.length;u<d;u++){var p=t[u];switch(p.nodeType){case 1:var m=i(p.nodeName);(s=new n.Element(m,a(p.attributes))).children=e("template"===m?p.content.childNodes:p.childNodes,s);break;case 3:s=new n.Text(l(p.nodeValue));break;case 8:s=new n.Comment(p.nodeValue);break;default:continue}var f=c[u-1]||null;f&&(f.next=s),s.parent=o,s.prev=f,s.next=null,c.push(s)}return r&&((s=new n.ProcessingInstruction(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=c[0]||null,s.parent=o,c.unshift(s),c[1]&&(c[1].prev=c[0])),c};var n=o(141),r=o(270);function a(e){for(var t={},o=0,n=e.length;o<n;o++){var r=e[o];t[r.name]=r.value}return t}function i(e){return function(e){return r.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase())||e}function l(e){return e.replace(r.CARRIAGE_RETURN_PLACEHOLDER_REGEX,r.CARRIAGE_RETURN)}},788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,o=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,p=1;function m(e){var t=e.match(o);t&&(d+=t.length);var n=e.lastIndexOf("\n");p=~n?e.length-n:p+e.length}function f(){var e={line:d,column:p};return function(t){return t.position=new g(e),b(),t}}function g(e){this.start=e,this.end={line:d,column:p},this.source=s.source}g.prototype.content=e;var _=[];function h(t){var o=new Error(s.source+":"+d+":"+p+": "+t);if(o.reason=t,o.filename=s.source,o.line=d,o.column=p,o.source=e,!s.silent)throw o;_.push(o)}function y(t){var o=t.exec(e);if(o){var n=o[0];return m(n),e=e.slice(n.length),o}}function b(){y(n)}function v(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var o=2;c!=e.charAt(o)&&("*"!=e.charAt(o)||"/"!=e.charAt(o+1));)++o;if(o+=2,c===e.charAt(o-1))return h("End of comment missing");var n=e.slice(2,o-2);return p+=2,m(n),e=e.slice(o),p+=2,t({type:"comment",comment:n})}}function S(){var e=f(),o=y(r);if(o){if(w(),!y(a))return h("property missing ':'");var n=y(i),s=e({type:"declaration",property:u(o[0].replace(t,c)),value:n?u(n[0].replace(t,c)):c});return y(l),s}}return b(),function(){var e,t=[];for(v(t);e=S();)!1!==e&&(t.push(e),v(t));return t}()}},811:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},840:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var o={},c=Boolean(e.type&&l[e.type]);for(var u in e){var d=e[u];if((0,n.isCustomAttribute)(u))o[u]=d;else{var p=u.toLowerCase(),m=s(p);if(m){var f=(0,n.getPropertyInfo)(m);switch(a.includes(m)&&i.includes(t)&&!c&&(m=s("default"+p)),o[m]=d,f&&f.type){case n.BOOLEAN:o[m]=!0;break;case n.OVERLOADED_BOOLEAN:""===d&&(o[m]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(o[u]=d)}}return(0,r.setStyleProp)(e.style,o),o};var n=o(210),r=o(958),a=["checked","value"],i=["input","select","textarea"],l={reset:!0,submit:!0};function s(e){return n.possibleStandardNames[e]}},917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var o=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||o.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(i,s):e.replace(a,s)).replace(n,l))}},957:function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var i=o(413),l=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),S(this,e)},e}();t.Node=l;var s=function(e){function t(t){var o=e.call(this)||this;return o.data=t,o}return r(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(l);t.DataNode=s;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Text,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(s);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Comment,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(s);t.Comment=u;var d=function(e){function t(t,o){var n=e.call(this,o)||this;return n.name=t,n.type=i.ElementType.Directive,n}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(s);t.ProcessingInstruction=d;var p=function(e){function t(t){var o=e.call(this)||this;return o.children=t,o}return r(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=p;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=m;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=f;var g=function(e){function t(t,o,n,r){void 0===n&&(n=[]),void 0===r&&(r="script"===t?i.ElementType.Script:"style"===t?i.ElementType.Style:i.ElementType.Tag);var a=e.call(this,n)||this;return a.name=t,a.attribs=o,a.type=r,a}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){var o,n;return{name:t,value:e.attribs[t],namespace:null===(o=e["x-attribsNamespace"])||void 0===o?void 0:o[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}})},enumerable:!1,configurable:!0}),t}(p);function _(e){return(0,i.isTag)(e)}function h(e){return e.type===i.ElementType.CDATA}function y(e){return e.type===i.ElementType.Text}function b(e){return e.type===i.ElementType.Comment}function v(e){return e.type===i.ElementType.Directive}function w(e){return e.type===i.ElementType.Root}function S(e,t){var o;if(void 0===t&&(t=!1),y(e))o=new c(e.data);else if(b(e))o=new u(e.data);else if(_(e)){var n=t?E(e.children):[],r=new g(e.name,a({},e.attribs),n);n.forEach(function(e){return e.parent=r}),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),o=r}else if(h(e)){n=t?E(e.children):[];var i=new m(n);n.forEach(function(e){return e.parent=i}),o=i}else if(w(e)){n=t?E(e.children):[];var l=new f(n);n.forEach(function(e){return e.parent=l}),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),o=l}else{if(!v(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),o=s}return o.startIndex=e.startIndex,o.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(o.sourceCodeLocation=e.sourceCodeLocation),o}function E(e){for(var t=e.map(function(e){return S(e,!0)}),o=1;o<t.length;o++)t[o].prev=t[o-1],t[o-1].next=t[o];return t}t.Element=g,t.isTag=_,t.isCDATA=h,t.isText=y,t.isComment=b,t.isDirective=v,t.isDocument=w,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=S},958:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!i.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,a.default)(e,l)}catch(e){t.style={}}else t.style={}};var r=o(609),a=n(o(229)),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),l={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,o),a.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=o(609);const t=window.wp.domReady;var n=o.n(t);const r=window.wp.element,a=window.wp.data,i=window.wp.i18n;var l=o(442);const s=l.default||l,c=window.wp.components,u=window.wp.apiFetch;var d=o.n(u);const p={enabled:"yes",title:(0,i.__)("Credit Card","woocommerce-square"),description:(0,i.__)("Pay securely using your credit card.","woocommerce-square"),transaction_type:"charge",charge_virtual_orders:"no",enable_paid_capture:"no",card_types:["VISA","MC","AMEX","DISC","DINERS","JCB","UNIONPAY"],tokenization:"no"},m={enable_digital_wallets:"yes",digital_wallets_button_type:"buy",digital_wallets_apple_pay_button_color:"black",digital_wallets_google_pay_button_color:"black",digital_wallets_hide_button_options:[]},f={enabled:"no",title:(0,i.__)("Square Gift Cards","woocommerce-square"),is_default_placeholder:"no",placeholder_id:0,description:(0,i.__)("Allow customers to purchase and redeem gift cards during checkout.","woocommerce-square")},g={enabled:"no",title:(0,i.__)("Cash App Pay","woocommerce-square"),description:(0,i.__)("Pay securely using Cash App Pay.","woocommerce-square"),transaction_type:"charge",charge_virtual_orders:"no",enable_paid_capture:"no",button_theme:"dark",button_shape:"semiround"},_={enable_sandbox:"no",sandbox_application_id:"",sandbox_token:"",sandbox_location_id:"",production_location_id:"",system_of_record:"disabled",enable_inventory_sync:"no",override_product_images:"no",hide_missing_products:"no",sync_interval:"0.25",is_connected:!1,disconnection_url:"",access_tokens:[],connection_url:"",connection_url_wizard:"",connection_url_sandbox:"",locations:[],enable_customer_decline_messages:"no",debug_mode:"off",debug_logging_enabled:"no",enable_order_fulfillment_sync:"no"},h={squareSettingsIsSaving:!1,creditCardSettingsIsSaving:!1,cashAppSettingsIsSaving:!1,giftCardsSettingsIsSaving:!1},y={step:"connect-square",backStep:""},b={creditCard:(e=p,t)=>"SET_CREDIT_CARD_DATA"===t.type?{...e,...t.payload}:e,digitalWallet:(e=m,t)=>"SET_DIGITAL_WALLETS_DATA"===t.type?{...e,...t.payload}:e,giftCard:(e=f,t)=>"SET_GIFT_CARD_DATA"===t.type?{...e,...t.payload}:e,cashApp:(e=g,t)=>"SET_CASH_APP_DATA"===t.type?{...e,...t.payload}:e,squareSettings:(e=_,t)=>"SET_SQUARE_SETTING_DATA"===t.type?{...e,...t.payload}:e,savingProcessStatus:(e=h,t)=>{switch(t.type){case"SET_SQUARE_SETTING_PROCESS_STATUS":return{...e,squareSettingsIsSaving:t.payload};case"SET_CREDIT_CARD_SETTING_PROCESS_STATUS":return{...e,creditCardSettingsIsSaving:t.payload};case"SET_CASH_APP_PROCESS_STATUS":return{...e,cashAppSettingsIsSaving:t.payload};case"SET_GIFT_CARDS_PROCESS_STATUS":return{...e,giftCardsSettingsIsSaving:t.payload};default:return e}},step:(e=y,t)=>{switch(t.type){case"SET_STEP":return{...e,step:t.payload};case"SET_BACK_STEP":return{...e,backStep:t.payload};default:return e}}},v=(0,a.createReduxStore)("woo-square/onboarding",{reducer:(0,a.combineReducers)(b),actions:{setCreditCardData:e=>({type:"SET_CREDIT_CARD_DATA",payload:e}),setDigitalWalletData:e=>({type:"SET_DIGITAL_WALLETS_DATA",payload:e}),setGiftCardData:e=>({type:"SET_GIFT_CARD_DATA",payload:e}),setCashAppData:e=>({type:"SET_CASH_APP_DATA",payload:e}),setSquareSettings:e=>({type:"SET_SQUARE_SETTING_DATA",payload:e}),setSquareSettingsSavingProcess:e=>({type:"SET_SQUARE_SETTING_PROCESS_STATUS",payload:e}),setCreditCardSettingsSavingProcess:e=>({type:"SET_CREDIT_CARD_SETTING_PROCESS_STATUS",payload:e}),setCashAppSettingsSavingProcess:e=>({type:"SET_CASH_APP_PROCESS_STATUS",payload:e}),setGiftCardsSettingsSavingProcess:e=>({type:"SET_GIFT_CARDS_PROCESS_STATUS",payload:e}),setStep:e=>({type:"SET_STEP",payload:e}),setBackStep:e=>({type:"SET_BACK_STEP",payload:e})},selectors:{getCreditCardData:(e,t)=>t&&e.creditCard[t]||e.creditCard,getDigitalWalletData:(e,t)=>t&&e.digitalWallet[t]||e.digitalWallet,getGiftCardData:(e,t)=>t&&e.giftCard[t]||e.giftCard,getCashAppData:(e,t)=>t&&e.cashApp[t]||e.cashApp,getSquareSettings:(e,t)=>t&&e.squareSettings[t]||e.squareSettings,getSquareSettingsSavingProcess:e=>e.savingProcessStatus.squareSettingsIsSaving,getCreditCardSettingsSavingProcess:e=>e.savingProcessStatus.creditCardSettingsIsSaving,getCashAppSettingsSavingProcess:e=>e.savingProcessStatus.cashAppSettingsIsSaving,getGiftCardsSettingsSavingProcess:e=>e.savingProcessStatus.giftCardsSettingsIsSaving,getStep:e=>e.step.step,getBackStep:e=>e.step.backStep}}),w=(e=[])=>e.filter(e=>"ACTIVE"===e.status).map(e=>({label:e.name,value:e.id})),S=(e=!1)=>{const t=(0,a.useDispatch)(),[o,n]=(0,r.useState)(!1),[i,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1),u=e=>(0,a.useSelect)(t=>t(v).getCreditCardData(e)),_=e=>(0,a.useSelect)(t=>t(v).getDigitalWalletData(e)),h=e=>(0,a.useSelect)(t=>t(v).getGiftCardData(e)),y=e=>(0,a.useSelect)(t=>t(v).getCashAppData(e)),b=e=>t(v).setCreditCardData(e),w=e=>t(v).setDigitalWalletData(e),S=e=>t(v).setGiftCardData(e),E=e=>t(v).setCashAppData(e),C=e=>t(v).setCreditCardSettingsSavingProcess(e),x=e=>t(v).setCashAppSettingsSavingProcess(e),k=e=>t(v).setGiftCardsSettingsSavingProcess(e),T=(0,a.useSelect)(e=>e(v).getCreditCardSettingsSavingProcess(undefined));const A=(0,a.useSelect)(e=>e(v).getCashAppSettingsSavingProcess(void 0)),q=(0,a.useSelect)(e=>e(v).getGiftCardsSettingsSavingProcess(void 0)),P={...u(),..._()},O={...h()},R={...y()};return(0,r.useEffect)(()=>{if(!e)return n(!0),c(!0),void l(!0);(async()=>{if(!o){const{creditCard:e,digitalWallet:t}=await(async()=>{const e=await d()({path:"/wc/v3/wc_square/payment_settings"});return{creditCard:{enabled:e.enabled||p.enabled,title:e.title||p.title,description:e.description||p.description,transaction_type:e.transaction_type||p.transaction_type,charge_virtual_orders:e.charge_virtual_orders||p.charge_virtual_orders,enable_paid_capture:e.enable_paid_capture||p.enable_paid_capture,card_types:e.card_types||p.card_types,tokenization:e.tokenization||p.tokenization},digitalWallet:{enable_digital_wallets:e.enable_digital_wallets||m.enable_digital_wallets,digital_wallets_button_type:e.digital_wallets_button_type||m.digital_wallets_button_type,digital_wallets_apple_pay_button_color:e.digital_wallets_apple_pay_button_color||m.digital_wallets_apple_pay_button_color,digital_wallets_google_pay_button_color:e.digital_wallets_google_pay_button_color||m.digital_wallets_google_pay_button_color,digital_wallets_hide_button_options:e.digital_wallets_hide_button_options||m.digital_wallets_hide_button_options}}})();b(e),w(t),n(!0)}if(!s){const{giftCard:e}=await(async()=>{const e=await d()({path:"/wc/v3/wc_square/gift_cards_settings"});return{giftCard:{enabled:e.enabled||f.enabled,is_default_placeholder:e.is_default_placeholder||f.is_default_placeholder,placeholder_id:e.placeholder_id||f.placeholder_id}}})();S(e),c(!0)}})()},[e]),(0,r.useEffect)(()=>{e?(async()=>{const{cashApp:e}=await(async()=>{const e=await d()({path:"/wc/v3/wc_square/cash_app_settings"});return{cashApp:{enabled:e.enabled||g.enabled,title:e.title||g.title,description:e.description||g.description,transaction_type:e.transaction_type||g.transaction_type,charge_virtual_orders:e.charge_virtual_orders||g.charge_virtual_orders,enable_paid_capture:e.enable_paid_capture||g.enable_paid_capture,button_theme:e.button_theme||g.button_theme,button_shape:e.button_shape||g.button_shape}}})();i||(E(e),l(!0))})():l(!0)},[e]),{isPaymentGatewaySettingsSaving:T,isCashAppGatewaySettingsSaving:A,isGiftCardsGatewaySettingsSaving:q,paymentGatewaySettings:P,cashAppGatewaySettings:R,giftCardsGatewaySettings:O,paymentGatewaySettingsLoaded:o,cashAppGatewaySettingsLoaded:i,giftCardsGatewaySettingsLoaded:s,getCreditCardData:u,getDigitalWalletData:_,getGiftCardData:h,getCashAppData:y,setCreditCardData:b,setDigitalWalletData:w,setGiftCardData:S,setCashAppData:E,savePaymentGatewaySettings:async()=>{C(!0);const e=await d()({path:"/wc/v3/wc_square/payment_settings",method:"POST",data:P});return C(null),await new Promise(e=>setTimeout(e,1e3)),C(!1),e},saveGiftCardsSettings:async()=>{k(!0);const e=await d()({path:"/wc/v3/wc_square/gift_cards_settings",method:"POST",data:O});return k(null),await new Promise(e=>setTimeout(e,1e3)),k(!1),e},saveCashAppSettings:async()=>{x(!0);const e=await d()({path:"/wc/v3/wc_square/cash_app_settings",method:"POST",data:R});return x(null),await new Promise(e=>setTimeout(e,1e3)),x(!1),e}}},E=window.wc.tracks,C=({children:t})=>(0,e.createElement)("div",{className:"woo-square-setting__section"},t),x=({title:t})=>(0,e.createElement)("div",{className:"woo-square-setting__section-title heading_1"},t),k=({children:t})=>(0,e.createElement)("div",{className:"woo-square-setting__section-description"},t),T=({label:t,children:o,description:n,variant:r,indent:a=0,className:i=""})=>{if("boxed"===r)return(0,e.createElement)("div",{className:"woo-square-setting__input-wrapper woo-square-setting__input-wrapper--boxed "+i},(0,e.createElement)("div",{className:"woo-square-setting__input-wrapper--boxed-bg"},(0,e.createElement)("div",{className:"woo-square-setting__input-label"},t),(0,e.createElement)("div",{className:"woo-square-setting__input-field"},o)),(0,e.createElement)("div",{className:"woo-square-setting__input-description"},n));const l={marginLeft:16*a+"px"};return(0,e.createElement)("div",{className:"woo-square-setting__input-wrapper "+i,style:l},t&&(0,e.createElement)("div",{className:"woo-square-setting__input-label"},t),o,n&&(0,e.createElement)("div",{className:"woo-square-setting__input-description"},n))},A=t=>{const{label:o,...n}=t;return(0,e.createElement)("div",{className:"woo-square-setting__input-field--checkbox"},(0,e.createElement)(c.CheckboxControl,{...n}),(0,e.createElement)("div",{className:"woo-square-setting__input-field--checkbox-label"},o))},q=window.wp.primitives;var P=o(706);const O=(0,P.jsx)(q.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(q.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),R=(e=!1)=>{const t=(0,a.useDispatch)(),[o,n]=(0,r.useState)(!1),i=e=>(0,a.useSelect)(t=>t(v).getSquareSettings(e)),l=e=>t(v).setSquareSettings(e),s=e=>t(v).setSquareSettingsSavingProcess(e),c=(e=[])=>{l({locations:w(e)})},u=i(),p=(0,a.useSelect)(e=>e(v).getSquareSettingsSavingProcess());return(0,r.useEffect)(()=>{e?(async()=>{if(!o){const e=await(async()=>{const e=await d()({path:"/wc/v3/wc_square/settings"});return{enable_sandbox:e.enable_sandbox||_.enable_sandbox,sandbox_application_id:e.sandbox_application_id||_.sandbox_application_id,sandbox_token:e.sandbox_token||_.sandbox_token,production_location_id:e.production_location_id||_.production_location_id,sandbox_location_id:e.sandbox_location_id||_.sandbox_location_id,system_of_record:e.system_of_record||_.system_of_record,enable_inventory_sync:e.enable_inventory_sync||_.enable_inventory_sync,override_product_images:e.override_product_images||_.override_product_images,hide_missing_products:e.hide_missing_products||_.hide_missing_products,sync_interval:e.sync_interval||_.sync_interval,is_connected:e.is_connected||_.is_connected,disconnection_url:e.disconnection_url||_.disconnection_url,access_tokens:e.access_tokens||_.access_tokens,connection_url:e.connection_url||_.connection_url,connection_url_wizard:e.connection_url_wizard||_.connection_url_wizard,connection_url_sandbox:e.connection_url_sandbox||_.connection_url_sandbox,locations:e.locations||_.locations,enable_customer_decline_messages:e.enable_customer_decline_messages||_.enable_customer_decline_messages,debug_mode:e.debug_mode||_.debug_mode,debug_logging_enabled:e.debug_logging_enabled||_.debug_logging_enabled,enable_order_fulfillment_sync:e.enable_order_fulfillment_sync||_.enable_order_fulfillment_sync}})();l(e),c(e.locations),n(!0)}})():n(!0)},[e]),{settings:u,squareSettingsLoaded:o,isSquareSettingsSaving:p,getSquareSettingData:i,setSquareSettingData:l,setBusinessLocation:c,saveSquareSettings:async()=>{s(!0);const e=await d()({path:"/wc/v3/wc_square/settings",method:"POST",data:u});return s(null),await new Promise(e=>setTimeout(e,1e3)),s(!1),e}}},D=(I=c.Button,t=>{const{label:o=(0,i.__)("Apply Changes","woocommerce-square")}=t,{afterSaveLabel:n=(0,i.__)("Changes Saved!","woocommerce-square"),afterSaveCallback:r,icon:a=O,...l}=t,{isSquareSettingsSaving:s,settings:c,saveSquareSettings:u}=R();return(0,e.createElement)(I,{"data-testid":"square-settings-save-button",...null===s&&{icon:a},isBusy:s,variant:"button-primary",className:"button-primary",onClick:()=>{(async()=>{const e=document.querySelectorAll("[required]");let t=!0;e.forEach(e=>{e.value?e.classList.remove("required-error"):(e.classList.add("required-error"),t=!1)}),t&&(await u(c),r&&r())})()},...l},null===s?n:o)});var I;const N=(t=>o=>{const{label:n=(0,i.__)("Apply Changes","woocommerce-square"),afterSaveLabel:r=(0,i.__)("Changes Saved!","woocommerce-square"),onClick:a}=o,{isPaymentGatewaySettingsSaving:l,isGiftCardsGatewaySettingsSaving:s,isCashAppGatewaySettingsSaving:c}=S(),u=null===l||null===s||null===c,d=[l,s,c].some(e=>e);return(0,e.createElement)(t,{"data-testid":"payment-gateway-settings-save-button",...o,...u&&{icon:O},isBusy:d,variant:"button-primary",className:"button-primary",onClick:()=>a()},u?r:n)})(c.Button),L=()=>(0,e.createElement)("div",{className:"woo-square-loader"},(0,e.createElement)(c.Spinner,null)),M=({indent:t=0,isDirty:o=!1,showViewProgressButton:n=!0})=>{const{settings:a,squareSettingsLoaded:l,setSquareSettingData:u}=R(),[p,m]=(0,r.useState)(!1),[f,g]=(0,r.useState)(!1),[_,h]=(0,r.useState)(!1),[y,b]=(0,r.useState)(""),v=()=>g(!1),{system_of_record:w="disabled",enable_inventory_sync:S="no",override_product_images:q="no",hide_missing_products:P="no",sync_interval:O="0.25",is_connected:D=!1,enable_order_fulfillment_sync:I="no"}=a,N=[{label:(0,i.__)("15 minutes","woocommerce-square"),value:"0.25"},{label:(0,i.__)("30 minutes","woocommerce-square"),value:"0.5"},{label:(0,i.__)("45 minutes","woocommerce-square"),value:"0.75"},{label:(0,i.__)("1 hour","woocommerce-square"),value:"1"},{label:(0,i.__)("2 hours","woocommerce-square"),value:"2"},{label:(0,i.__)("3 hours","woocommerce-square"),value:"3"},{label:(0,i.__)("6 hours","woocommerce-square"),value:"6"},{label:(0,i.__)("8 hours","woocommerce-square"),value:"8"},{label:(0,i.__)("12 hours","woocommerce-square"),value:"12"},{label:(0,i.__)("24 hours","woocommerce-square"),value:"24"}];return l?(0,e.createElement)(e.Fragment,null,D&&(0,e.createElement)(C,null,(0,e.createElement)(x,{title:(0,i.__)("Configure Sync Settings","woocommerce-square")}),(0,e.createElement)(k,null,(0,i.__)("Choose how you want your product data to flow between WooCommerce and Square to keep your inventory and listings perfectly aligned. Select from the options below to best match your business operations:","woocommerce-square")),(0,e.createElement)("div",{className:"woo-square-wizard__fields"},(0,e.createElement)(T,{label:(0,i.__)("Sync Settings","woocommerce-square"),description:s((0,i.sprintf)(/* translators: %1$s and %2$s are placeholders for the link to the documentation, %3$s and %4$s are placeholders for the link to the support forum */ /* translators: %1$s and %2$s are placeholders for the link to the documentation, %3$s and %4$s are placeholders for the link to the support forum */
(0,i.__)("Choose where data will be updated for synced products. Inventory in Square is always checked for adjustments when sync is enabled. %1$sLearn more%2$s about choosing a system of record or %3$screate a ticket%4$s if you're experiencing technical issues.","woocommerce-square"),'<a href="https://woocommerce.com/document/woocommerce-square/#section-8" target="_blank">',"</a>",'<a href="https://wordpress.org/support/plugin/woocommerce-square/" target="_blank">',"</a>"))},(0,e.createElement)(c.SelectControl,{"data-testid":"sync-settings-field",value:w,onChange:e=>u({system_of_record:e}),options:[{label:(0,i.__)("Disabled","woocommerce-square"),value:"disabled"},{label:(0,i.__)("Square","woocommerce-square"),value:"square"},{label:(0,i.__)("WooCommerce","woocommerce-square"),value:"woocommerce"}]})),"woocommerce"===w&&(0,e.createElement)(T,{label:(0,i.__)("Sync Inventory","woocommerce-square"),indent:t,description:s((0,i.sprintf)(/* translators: %1$s and %2$s are placeholders for the strong tag */ /* translators: %1$s and %2$s are placeholders for the strong tag */
(0,i.__)("Inventory is %1$salways fetched from Square%2$s periodically to account for sales from other channels.","woocommerce-square"),"<strong>","</strong>"))},(0,e.createElement)(A,{"data-testid":"push-inventory-field",checked:"yes"===S,onChange:e=>u({enable_inventory_sync:e?"yes":"no"}),label:(0,i.__)("Enable to push inventory changes to Square","woocommerce-square")})),"square"===w&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(T,{label:(0,i.__)("Sync Inventory","woocommerce-square"),indent:t,description:(0,i.__)("Inventory is fetched from Square periodically and updated in WooCommerce.","woocommerce-square")},(0,e.createElement)(A,{"data-testid":"pull-inventory-field",checked:"yes"===S,onChange:e=>u({enable_inventory_sync:e?"yes":"no"}),label:(0,i.__)("Enable to fetch inventory changes from Square","woocommerce-square")})),(0,e.createElement)(T,{label:(0,i.__)("Override product images","woocommerce-square"),indent:t,description:(0,i.__)("Product images that have been updated in Square will also be updated within WooCommerce during a sync.","woocommerce-square")},(0,e.createElement)(A,{"data-testid":"override-images-field",checked:"yes"===q,onChange:e=>u({override_product_images:e?"yes":"no"}),label:(0,i.__)("Enable to override Product images from Square","woocommerce-square")})),(0,e.createElement)(T,{label:(0,i.__)("Handle missing products","woocommerce-square"),indent:t,description:(0,i.__)("Products not found in Square will be hidden in the WooCommerce product catalog.","woocommerce-square")},(0,e.createElement)(A,{"data-testid":"hide-missing-products-field",checked:"yes"===P,onChange:e=>u({hide_missing_products:e?"yes":"no"}),label:(0,i.__)("Hide synced products when not found in Square","woocommerce-square")}))),("woocommerce"===w||"square"===w)&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(T,{label:(0,i.__)("Sync interval","woocommerce-square"),description:(0,i.__)("Frequency for how regularly WooCommerce will sync products with Square.","woocommerce-square"),indent:t},(0,e.createElement)(c.SelectControl,{"data-testid":"sync-interval-field",value:O,options:N,onChange:e=>u({sync_interval:e})})),(0,e.createElement)(T,{label:(0,i.__)("Import Products","woocommerce-square"),indent:t,className:"import-products-wrapper"},(0,e.createElement)(c.Button,{"data-testid":"import-products-button",variant:"secondary",className:"import-square-products-react",onClick:()=>g(!0),style:{display:y?"none":"block"},disabled:o},(0,i.__)("Import all Products from Square","woocommerce-square")),o&&(0,e.createElement)("p",null,(0,i.__)("You have made changes to the settings. Please save the changes to enable the button.","woocommerce-square")),(0,e.createElement)("div",{className:"import-notice notice notice-info is-dismissible",style:{display:y?"block":"none",padding:"10px"}},y,y&&n&&(0,e.createElement)("div",{style:{marginTop:"10px"}},(0,e.createElement)("a",{href:`${wcSquareSettings.adminUrl}admin.php?page=wc-settings&tab=square&section=update`,className:"button button-primary"},(0,i.__)("View Progress →","woocommerce-square"))))),f&&(0,e.createElement)(c.Modal,{title:"Import Products From Square",size:"large",onRequestClose:v},(0,e.createElement)("div",{className:"import-modal-cover"},(0,e.createElement)("div",{className:"import-modal-content"},(0,e.createElement)("p",null,(0,i.__)("You are about to import all new products, variations and categories from Square. This will create a new product in WooCommerce for every product retrieved from Square. If you have products in the trash from the previous imports, these will be ignored in the import.","woocommerce-square")," "),(0,e.createElement)("h3",null,(0,i.__)("Do you wish to import existing product updates from Square?","woocommerce-square")," "),(0,e.createElement)("p",null,s((0,i.sprintf)(/* translators: %1$s and %2$s are placeholders for the link to the documentation */ /* translators: %1$s and %2$s are placeholders for the link to the documentation */
(0,i.__)("Doing so will update existing WooCommerce products with the latest information from Square. %1$sView Documentation%2$s.","woocommerce-square"),'<a href="https://woocommerce.com/document/woocommerce-square/#section-8" target="_blank">',"</a>"))),(0,e.createElement)(c.CheckboxControl,{"data-testid":"update-during-import-field",checked:p,onChange:e=>m(e),label:(0,i.__)("Update existing products during import.","woocommerce-square")})),(0,e.createElement)("div",{className:"import-buttons"},(0,e.createElement)(c.Button,{variant:"secondary",onClick:v},(0,i.__)("Cancel","woocommerce-square")),(0,e.createElement)(c.Button,{"data-testid":"import-products-button-confirm",variant:"button-primary",className:"button-primary",onClick:()=>{h(!0),(async()=>{const e=await d()({path:"/wc/v3/wc_square/import-products",method:"POST",data:{update_during_import:p,api_callback:!0}});v(),h(!1),b(e.data)})(),((e="",t={})=>{const{eventName:o,allProperties:n}=((e="",t={})=>({eventName:`woocommerce_square_${e}`,allProperties:{...t,plugin_version:wcSquareOnboarding.plugin_version,is_mobile:wcSquareOnboarding.is_mobile}}))(e,t);(0,E.recordEvent)(o,n)})("product_import_started")},isBusy:_},(0,i.__)("Import Products","woocommerce-square")))))),(0,e.createElement)(T,{label:(0,i.__)("Order Fulfillment Sync","woocommerce-square"),description:(0,i.__)("Enable bidirectional fulfillment synchronization between WooCommerce and Square orders. This will sync fulfillment status changes from Square back to WooCommerce and include fulfillment data when creating new orders.","woocommerce-square"),indent:t},(0,e.createElement)(A,{"data-testid":"order-fulfillment-sync-field",checked:"yes"===I,onChange:e=>u({enable_order_fulfillment_sync:e?"yes":"no"}),label:(0,i.__)("Enable bidirectional order fulfillment sync","woocommerce-square")}))))):null},j=()=>{const{settings:t,squareSettingsLoaded:o,setSquareSettingData:n}=R(),{stepData:{step:l}}=((e=!1)=>{const t=(0,a.useDispatch)(),o=e=>(0,a.useSelect)(t=>t(v).getStep(e)),n=e=>(0,a.useSelect)(t=>t(v).getBackStep(e)),i=e=>t(v).setStep(e),l=e=>t(v).setBackStep(e),s={step:o(),backStep:n()};return(0,r.useEffect)(()=>{e&&(i(localStorage.getItem("step")||s.step),l(localStorage.getItem("backStep")||s.stepData))},[e]),{stepData:s,getStep:o,getBackStep:n,setStep:i,setBackStep:l}})(),{enable_customer_decline_messages:c}=t;return o?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(C,null,(0,e.createElement)(x,{title:(0,i.__)("Advanced Settings","woocommerce-square")}),(0,e.createElement)(k,null,(0,i.__)("Adjust these options to provide your customers with additional clarity and troubleshoot any issues more effectively.","woocommerce-square"),(0,e.createElement)("br",null),"advanced-settings"===l&&s((0,i.sprintf)(/* translators: %1$s and %2$s are HTML tags for the link to the Square settings page */ /* translators: %1$s and %2$s are HTML tags for the link to the Square settings page */
(0,i.__)("%1$sClick here%2$s to further refine your settings in the traditional view.","woocommerce-square"),`<a href='${wcSquareSettings.adminUrl}admin.php?page=wc-settings&tab=square'>`,"</a>"))),(0,e.createElement)("div",{className:"woo-square-wizard__fields"},(0,e.createElement)(T,{label:(0,i.__)("Detailed Decline Messages","woocommerce-square")},(0,e.createElement)(A,{checked:"yes"===c,onChange:e=>n({enable_customer_decline_messages:e?"yes":"no"}),label:(0,i.__)("Show detailed decline messages to the customer during checkout rather than a generic decline message.","woocommerce-square")})),(0,e.createElement)(B,null)))):null},G=({indent:t=0,showToggle:o=!0})=>{const{settings:n,squareSettingsLoaded:r,setSquareSettingData:a}=R(),{enable_sandbox:l="no",sandbox_application_id:u="",sandbox_token:d=""}=n;return r?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(C,null,o&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(x,{title:(0,i.__)("Configure Sandbox Settings","woocommerce-square")}),(0,e.createElement)(k,null,(0,i.__)("Activate Sandbox Mode to safely simulate transactions and sync operations, ensuring your WooCommerce/Square integration functions seamlessly. Experiment with payment methods and product data syncing in a risk-free environment before going live with your store.","woocommerce-square"))),(0,e.createElement)("div",{className:"woo-square-wizard__fields"},o&&(0,e.createElement)(T,{label:(0,i.__)("Enable Sandbox Mode","woocommerce-square"),description:(0,i.__)("After enabling you'll see a new Sandbox settings section with two fields: Sandbox Application ID & Sandbox Access Token.","woocommerce-square"),variant:"boxed"},(0,e.createElement)(c.ToggleControl,{className:"enable-sandbox-mode-field",checked:"yes"===l,onChange:e=>a({enable_sandbox:e?"yes":"no"})})),"yes"===l&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(T,{label:(0,i.__)("Sandbox Application ID","woocommerce-square"),description:s((0,i.sprintf)(/* translators: %1$s: opening anchor tag, %2$s: closing anchor tag */ /* translators: %1$s: opening anchor tag, %2$s: closing anchor tag */
(0,i.__)("Application ID for the Sandbox Application, see the details in the %1$sMy Applications%2$s section.","woocommerce-square"),'<a target="_blank" href="https://developer.squareup.com/console/en/apps">',"</a>")),indent:t},(0,e.createElement)(c.TextControl,{required:!0,"data-testid":"sandbox-application-id-field",value:u,onChange:e=>a({sandbox_application_id:e})})),(0,e.createElement)(T,{label:(0,i.__)("Sandbox Access Token","woocommerce-square"),description:s((0,i.sprintf)(/* translators: %1$s: opening anchor tag, %2$s: closing anchor tag */ /* translators: %1$s: opening anchor tag, %2$s: closing anchor tag */
(0,i.__)("Access Token for the Sandbox Test Account, see the details in the %1$sSandbox Test Account%2$s section. Make sure you use the correct Sandbox Access Token for your application. For a given Sandbox Test Account, each Authorized Application is assigned a different Access Token.","woocommerce-square"),'<a target="_blank" href="https://developer.squareup.com/console/en/sandbox-test-accounts">',"</a>")),indent:t},(0,e.createElement)(c.TextControl,{required:!0,"data-testid":"sandbox-token-field",value:d,onChange:e=>a({sandbox_token:e})})))))):null},B=()=>{const{settings:t,setSquareSettingData:o}=R(),{debug_mode:n}=t,r=[{label:(0,i.__)("Off","woocommerce-square"),value:"off",desc:(0,i.__)("Disable all debug output. No errors will be shown or logged.","woocommerce-square")},{label:(0,i.__)("Payment Errors — Show on Checkout Page","woocommerce-square"),value:"checkout",desc:(0,i.__)("Display payment-related error messages directly on the checkout page.","woocommerce-square")},{label:(0,i.__)("Payment Errors — Save to Log","woocommerce-square"),value:"log",desc:(0,i.__)("Log payment-related errors to the debug log. Errors are not shown on the checkout page.","woocommerce-square")},{label:(0,i.__)("Payment Errors — Show on Checkout and Save to Log","woocommerce-square"),value:"both",desc:(0,i.__)("Display payment-related errors on the checkout page and also save them to the debug log.","woocommerce-square")},{label:(0,i.__)("Payment Errors — Show on Checkout, Non-Payment Errors — Save to Log","woocommerce-square"),value:"payment-show-and-non-payment-save-to-log",desc:(0,i.__)("Show payment errors on the checkout page and log non-payment errors, such as API failures or sync issues in the debug log.","woocommerce-square")},{label:(0,i.__)("(Payment + Non-payment) Errors — Save to Log","woocommerce-square"),value:"all-errors-save-to-log",desc:(0,i.__)("Log all types of errors (payment and non-payment) to the debug log. No errors are shown on the checkout page.","woocommerce-square")},{label:(0,i.__)("Non-Payment Errors — Save to Log","woocommerce-square"),value:"non-payment-save-to-log",desc:(0,i.__)("Save non-payment errors, such as API failures or sync issues to log. These are not shown on the checkout page.","woocommerce-square")}];return(0,e.createElement)(T,{label:(0,i.__)("Debug Mode","woocommerce-square"),description:r.find(e=>e.value===n)?.desc},(0,e.createElement)(c.SelectControl,{value:n,onChange:e=>o({debug_mode:e}),options:r}))},F=()=>{const{settings:t,isSquareSettingsSaving:o,squareSettingsLoaded:n,setSquareSettingData:a,saveSquareSettings:l}=R(!0),[u,d]=(0,r.useState)(!1),[p,m]=(0,r.useState)(!1),f=(0,r.useRef)(null),{enable_sandbox:g="no",sandbox_location_id:_="",production_location_id:h="",is_connected:y=!1,connection_url:b="",disconnection_url:v="",access_tokens:w=[],locations:S=[]}=t,E="yes"===g?_:h;return(0,r.useEffect)(()=>{n&&(d(t),f.current="no"===g)},[n]),(0,r.useEffect)(()=>{!1!==u&&m(!Object.keys(u).every(e=>u[e]===t[e]))},[t]),(0,r.useEffect)(()=>{null===o&&(d(t),m(!1))},[o]),n?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(x,{title:(0,i.__)("Connect to Square","woocommerce-square")}),(0,e.createElement)(k,null,(0,i.__)("Activate Square integration to securely manage and process transactions for your WooCommerce store. Choose between connecting to a live production account for real transactions or a sandbox account for testing purposes. This setup ensures your payment processing is seamless, whether you are in a development stage or ready to go live.","woocommerce-square")),(0,e.createElement)(T,{label:(0,i.__)("Environment Selection","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"environment-selection-field",required:!0,value:g,onChange:e=>{a({enable_sandbox:e})},options:[{label:(0,i.__)("Please choose an environment","woocommerce-square"),value:""},{label:(0,i.__)("Production","woocommerce-square"),value:"no"},{label:(0,i.__)("Sandbox","woocommerce-square"),value:"yes"}]})),"yes"===g&&(0,e.createElement)(G,{showToggle:!1}),"no"===g&&(0,e.createElement)(T,{label:(0,i.__)("Connection","woocommerce-square"),variant:"boxed",className:"square-settings__connection"},(0,e.createElement)(c.Button,{"data-testid":"connect-to-square-button",variant:"button-primary",className:"button-primary",onClick:async function(){f.current||await l(),window.location.href=f.current&&w.production?v:b},isBusy:o,disabled:!wcSquareSettings.depsCheck},f.current&&w.production?(0,i.__)("Disconnect from Square","woocommerce-square"):(0,i.__)("Connect to Square","woocommerce-square"))),y&&(0,e.createElement)(C,null,(0,e.createElement)(x,{title:(0,i.__)("Select your business location","woocommerce-square")}),(0,e.createElement)(k,null,s((0,i.sprintf)(/* translators: %1$s and %2$s are placeholders for the link to the documentation */ /* translators: %1$s and %2$s are placeholders for the link to the documentation */
(0,i.__)("Please select the location you wish to link with this WooCommerce store. Only active %1$slocations%2$s that support credit card processing in Square can be linked.","woocommerce-square"),'<a target="_blank" href="https://docs.woocommerce.com/document/woocommerce-square/#section-4">',"</a>"))),(0,e.createElement)(T,{label:(0,i.__)("Business location","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"business-location-field",value:E,onChange:e=>{a("yes"===g?{sandbox_location_id:e}:{production_location_id:e})},options:[{label:(0,i.__)("Please choose a location","woocommerce-square"),value:""},...S]}))),y&&(0,e.createElement)(M,{indent:2,isDirty:p}),(0,e.createElement)(j,null),(0,e.createElement)(D,{label:(0,i.__)("Save changes","woocommerce-square"),afterSaveLabel:(0,i.__)("Changes Saved!","woocommerce-square"),afterSaveCallback:()=>document.querySelector(".woocommerce-save-button").click(),disabled:!wcSquareSettings.depsCheck})):(0,e.createElement)(L,null)};var z=o(106);const H=({origin:t=""})=>{const{paymentGatewaySettings:o,paymentGatewaySettingsLoaded:n,setCreditCardData:r}=S(),{enabled:a,title:l,description:u,charge_virtual_orders:d,enable_paid_capture:p,transaction_type:m,tokenization:f,card_types:g}=o;if(!n)return null;const _="authorization"===m&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(T,{description:(0,i.__)("If the order contains exclusively virtual items, enable this to immediately charge, rather than authorize, the transaction.","woocommerce-square"),indent:2},(0,e.createElement)(A,{"data-testid":"credit-card-gateway-virtual-order-only-field",label:(0,i.__)("Charge Virtual-Only Orders","woocommerce-square"),checked:"yes"===d,onChange:e=>r({charge_virtual_orders:e?"yes":"no"})})),(0,e.createElement)(T,{description:(0,i.__)("Automatically capture orders when they are changed to Processing or Completed.","woocommerce-square"),indent:2},(0,e.createElement)(A,{"data-testid":"credit-card-gateway-capture-paid-orders-field",label:(0,i.__)("Capture Paid Orders","woocommerce-square"),checked:"yes"===p,onChange:e=>r({enable_paid_capture:e?"yes":"no"})})));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(C,null,(0,e.createElement)(x,{title:s((0,i.sprintf)(/* translators: %s: link to payments settings */ /* translators: %s: link to payments settings */
(0,i.__)("Manage Credit Card Payment Settings %s","woocommerce-square"),"settings"===t?`<small className="wc-admin-breadcrumb"><a href="${wcSquareSettings.adminUrl}admin.php?page=wc-settings&amp;tab=checkout" ariaLabel="Return to payments">⤴</a></small>`:""))}),(0,e.createElement)(k,null,(0,i.__)("Here you can fine-tune the details of how credit card payments are processed, ensuring a secure and smooth transaction for every customer.","woocommerce-square")),(0,e.createElement)("div",{className:"woo-square-wizard__fields"},(0,e.createElement)(T,{label:(0,i.__)("Enable / Disable","woocommerce-square")},(0,e.createElement)(A,{"data-testid":"credit-card-gateway-toggle-field",label:(0,i.__)("Enable this payment method.","woocommerce-square"),checked:"yes"===a,onChange:e=>r({enabled:e?"yes":"no"})})),(0,e.createElement)(T,{label:(0,i.__)("Title","woocommerce-square")},(0,e.createElement)(c.TextControl,{"data-testid":"credit-card-gateway-title-field",value:l,onChange:e=>r({title:e})})),(0,e.createElement)(T,{label:(0,i.__)("Description","woocommerce-square")},(0,e.createElement)(c.TextareaControl,{"data-testid":"credit-card-gateway-description-field",value:u,onChange:e=>r({description:e})})),(0,e.createElement)(T,{label:(0,i.__)("Transaction Type","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"credit-card-transaction-type-field",value:m,onChange:e=>r({transaction_type:e}),options:[{label:(0,i.__)("Charge","woocommerce-square"),value:"charge"},{label:(0,i.__)("Authorization","woocommerce-square"),value:"authorization"}]})),_,(0,e.createElement)(T,{label:(0,i.__)("Accepted Card Logos","woocommerce-square")},(0,e.createElement)(z.MultiSelectControl,{className:"credit-card-gateway-card-logos-field",id:"credit-card-gateway-card-logos-field",label:"",__experimentalShowHowTo:!1,value:g,onChange:e=>r({card_types:e}),options:[{label:(0,i.__)("Visa","woocommerce-square"),value:"VISA"},{label:(0,i.__)("MasterCard","woocommerce-square"),value:"MC"},{label:(0,i.__)("American Express","woocommerce-square"),value:"AMEX"},{label:(0,i.__)("Discover","woocommerce-square"),value:"DISC"},{label:(0,i.__)("Diners","woocommerce-square"),value:"DINERS"},{label:(0,i.__)("JCB","woocommerce-square"),value:"JCB"},{label:(0,i.__)("UnionPay","woocommerce-square"),value:"UNIONPAY"}]})),(0,e.createElement)(T,{label:(0,i.__)("Customer Profiles","woocommerce-square")},(0,e.createElement)(A,{"data-testid":"credit-card-tokenization-field",label:(0,i.__)("Check to enable tokenization and allow customers to securely save their payment details for future checkout.","woocommerce-square"),checked:"yes"===f,onChange:e=>r({tokenization:e?"yes":"no"})})))))},U=()=>{const{paymentGatewaySettingsLoaded:t,paymentGatewaySettings:o,setDigitalWalletData:n}=S(),{enable_digital_wallets:r,digital_wallets_button_type:a,digital_wallets_apple_pay_button_color:l,digital_wallets_google_pay_button_color:u,digital_wallets_hide_button_options:d}=o;return t?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(C,null,(0,e.createElement)(x,{title:(0,i.__)("Manage Digital Wallet Settings","woocommerce-square")}),(0,e.createElement)(k,null,(0,i.__)("Accept payments with Apple Pay and Google Pay on your store, available in select countries. Enabling digital wallets adds payment buttons to Product, Cart and Checkout pages.","woocommerce-square")),(0,e.createElement)("div",{className:"woo-square-wizard__fields"},(0,e.createElement)(T,{label:(0,i.__)("Enable / Disable","woocommerce-square"),description:s((0,i.sprintf)(/* translators: %1$s: opening link tag, %2$s: closing link tag */ /* translators: %1$s: opening link tag, %2$s: closing link tag */
(0,i.__)("Allow customers to pay with Apple Pay or Google Pay from your Product, Cart and Checkout pages. Read more about the availablity of digital wallets in our %1$sdocumentation%2$s.","woocommerce-square"),'<a target="_blank" href="https://docs.woocommerce.com/document/woocommerce-square/">',"</a>"))},(0,e.createElement)(A,{"data-testid":"digital-wallet-gateway-toggle-field",label:(0,i.__)("Enable digital wallets.","woocommerce-square"),checked:"yes"===r,onChange:e=>n({enable_digital_wallets:e?"yes":"no"})})),(0,e.createElement)(T,{label:(0,i.__)("Button Type","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"digital-wallet-gatewaybutton-type-field",value:a,onChange:e=>n({digital_wallets_button_type:e}),options:[{label:(0,i.__)("Buy Now","woocommerce-square"),value:"buy"},{label:(0,i.__)("Donate","woocommerce-square"),value:"donate"},{label:(0,i.__)("No Text","woocommerce-square"),value:"plain"}]})),(0,e.createElement)(T,{label:(0,i.__)("Apple Pay Button Color","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"digital-wallet-gatewayapple-pay-button-color-field",value:l,onChange:e=>n({digital_wallets_apple_pay_button_color:e}),options:[{label:(0,i.__)("Black","woocommerce-square"),value:"black"},{label:(0,i.__)("White","woocommerce-square"),value:"white"},{label:(0,i.__)("White with outline","woocommerce-square"),value:"white-outline"}]})),(0,e.createElement)(T,{label:(0,i.__)("Google Pay Button Color","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"digital-wallet-gatewaygoogle-pay-button-color-field",value:u,onChange:e=>n({digital_wallets_google_pay_button_color:e}),options:[{label:(0,i.__)("Black","woocommerce-square"),value:"black"},{label:(0,i.__)("White","woocommerce-square"),value:"white"}]})),(0,e.createElement)(T,{label:(0,i.__)("Hide Digital Wallet Buttons","woocommerce-square")},(0,e.createElement)(z.MultiSelectControl,{"data-testid":"digital-wallet-gatewayhide-buttons-field",label:"",__experimentalShowHowTo:!1,value:d,onChange:e=>n({digital_wallets_hide_button_options:e}),options:[{label:(0,i.__)("Apple Pay","woocommerce-square"),value:"apple"},{label:(0,i.__)("Google Pay","woocommerce-square"),value:"google"}]}))))):null},W=({origin:t=""})=>{const{giftCardsGatewaySettingsLoaded:o,giftCardsGatewaySettings:n,setGiftCardData:a}=S(),[l,u]=(0,r.useState)(wcSquareSettings.gcPlaceholderUrl),{enabled:d,is_default_placeholder:p}=n;return o?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(C,null,(0,e.createElement)(x,{title:s((0,i.sprintf)(/* translators: %s: Gift Cards */ /* translators: %s: Gift Cards */
(0,i.__)("Gift Cards %s","woocommerce-square"),"settings"===t?`<small className="wc-admin-breadcrumb"><a href="${wcSquareSettings.adminUrl}admin.php?page=wc-settings&amp;tab=checkout" ariaLabel="Return to payments">⤴</a></small>`:""))}),(0,e.createElement)(k,null,(0,i.__)("You can receive payments with Square Gift Cards and sell Square Gift Cards by enabling the Gift Cards option here.","woocommerce-square")),(0,e.createElement)("div",{className:"woo-square-wizard__fields"},"settings"!==t&&(0,e.createElement)(T,{label:(0,i.__)("Enable Square Gift Cards","woocommerce-square"),variant:"boxed"},(0,e.createElement)(c.ToggleControl,{className:"gift-card-gateway-toggle-field","data-testid":"gift-card-gateway-toggle-field",checked:"yes"===d,onChange:e=>a({enabled:e?"yes":"no"})})),"settings"===t&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(T,{label:(0,i.__)("Enable / Disable","woocommerce-square")},(0,e.createElement)(A,{className:"gift-card-gateway-toggle-field","data-testid":"gift-card-gateway-toggle-field",label:(0,i.__)("Enable this payment method.","woocommerce-square"),checked:"yes"===d,onChange:e=>a({enabled:e?"yes":"no"})})),(0,e.createElement)(T,{label:(0,i.__)("Gift card product placeholder image","woocommerce-square")},(0,e.createElement)(A,{className:"gift-card-gateway-product-placeholder-toggle-field","data-testid":"gift-card-gateway-product-placeholder-toggle-field",label:(0,i.__)("Enable to use the following image as the default placeholder for gift card products.","woocommerce-square"),checked:"yes"===p,onChange:e=>a({is_default_placeholder:e?"yes":"no"})}),(0,e.createElement)("img",{style:{maxWidth:"350px"},src:l,alt:(0,i.__)("Preview of the Gift card placeholder","woocommerce-square")}),(0,e.createElement)(c.Button,{variant:"link",onClick:function(){const e=wp.media({title:(0,i.__)("Select or Upload an image to use as the Gift card placeholder:","woocommerce-square"),library:{type:"image"},button:{text:"Use this image"},multiple:!1}).on("select",function(){const t=e.state().get("selection").first().toJSON();a({placeholder_id:t.id}),u(t.url)});e.open()},style:{width:"auto"}},(0,i.__)("Replace image","woocommerce-square"))))))):null},V=({origin:t=""})=>{const{cashAppGatewaySettings:o,setCashAppData:n}=S(),{enabled:r,title:a,description:l,transaction_type:u,button_theme:d,charge_virtual_orders:p,enable_paid_capture:m,button_shape:f}=o,g="authorization"===u&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(T,{description:(0,i.__)("If the order contains exclusively virtual items, enable this to immediately charge, rather than authorize, the transaction.","woocommerce-square"),indent:2},(0,e.createElement)(A,{"data-testid":"cash-app-gateway-virtual-order-only-field",label:(0,i.__)("Charge Virtual-Only Orders","woocommerce-square"),checked:"yes"===p,onChange:e=>n({charge_virtual_orders:e?"yes":"no"})})),(0,e.createElement)(T,{description:(0,i.__)("Automatically capture orders when they are changed to Processing or Completed.","woocommerce-square"),indent:2},(0,e.createElement)(A,{"data-testid":"cash-app-gateway-capture-paid-orders-field",label:(0,i.__)("Capture Paid Orders","woocommerce-square"),checked:"yes"===m,onChange:e=>n({enable_paid_capture:e?"yes":"no"})})));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(C,null,(0,e.createElement)(x,{title:s((0,i.sprintf)(/* translators: %s: link to settings page */ /* translators: %s: link to settings page */
(0,i.__)("Manage Cash App Pay Settings %s","woocommerce-square"),"settings"===t?`<small className="wc-admin-breadcrumb"><a href="${wcSquareSettings.adminUrl}admin.php?page=wc-settings&amp;tab=checkout" ariaLabel="Return to payments">⤴</a></small>`:""))}),(0,e.createElement)(k,null,(0,i.__)("Cash App Pay is an innovative payment solution that offers your customers a quick and secure way to check out. With just a few settings, you can tailor how Cash App Pay appears and operates on your site.","woocommerce-square")),(0,e.createElement)("div",{className:"woo-square-wizard__fields"},(0,e.createElement)(T,{label:(0,i.__)("Enable / Disable","woocommerce-square")},(0,e.createElement)(A,{"data-testid":"cash-app-gateway-toggle-field",label:(0,i.__)("Enable this payment method.","woocommerce-square"),checked:"yes"===r,onChange:e=>n({enabled:e?"yes":"no"})})),(0,e.createElement)(T,{label:(0,i.__)("Title","woocommerce-square")},(0,e.createElement)(c.TextControl,{"data-testid":"cash-app-gateway-title-field",value:a,onChange:e=>n({title:e})})),(0,e.createElement)(T,{label:(0,i.__)("Description","woocommerce-square")},(0,e.createElement)(c.TextareaControl,{"data-testid":"cash-app-gateway-description-field",value:l,onChange:e=>n({description:e})})),(0,e.createElement)(T,{label:(0,i.__)("Transaction Type","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"cash-app-gateway-transaction-type-field",value:u,onChange:e=>n({transaction_type:e}),options:[{label:(0,i.__)("Charge","woocommerce-square"),value:"charge"},{label:(0,i.__)("Authorization","woocommerce-square"),value:"authorization"}]})),g,(0,e.createElement)(T,{label:(0,i.__)("Cash App Pay Button Theme","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"cash-app-gateway-button-theme-field",value:d,onChange:e=>n({button_theme:e}),options:[{label:(0,i.__)("Dark","woocommerce-square"),value:"dark"},{label:(0,i.__)("Light","woocommerce-square"),value:"light"}]})),(0,e.createElement)(T,{label:(0,i.__)("Cash App Pay Button Shape","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"cash-app-gateway-button-shape-field",value:f,onChange:e=>n({button_shape:e}),options:[{label:(0,i.__)("Semiround","woocommerce-square"),value:"semiround"},{label:(0,i.__)("Round","woocommerce-square"),value:"round"}]})))))},$=()=>{const{paymentGatewaySettingsLoaded:t,savePaymentGatewaySettings:o}=S(!0);return t?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(H,{origin:"settings"}),(0,e.createElement)(U,null),(0,e.createElement)(N,{onClick:()=>{o()}})):(0,e.createElement)(L,null)},X=()=>{const{cashAppGatewaySettingsLoaded:t,saveCashAppSettings:o}=S(!0);return t?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(V,{origin:"settings"}),(0,e.createElement)(N,{onClick:()=>{o()}})):(0,e.createElement)(L,null)},Y=()=>{const{giftCardsGatewaySettingsLoaded:t,saveGiftCardsSettings:o}=S(!0);return t?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(W,{origin:"settings"}),(0,e.createElement)(N,{onClick:()=>{o()}})):(0,e.createElement)(L,null)};(0,a.register)(v),n()(()=>{let t=document.getElementById("woocommerce-square-settings__container-general");t?(0,r.createRoot)(t).render((0,e.createElement)(F,null)):(t=document.getElementById("woocommerce-square-payment-gateway-settings__container--square_credit_card"),t&&(0,r.createRoot)(t).render((0,e.createElement)($,null)),t=document.getElementById("woocommerce-square-payment-gateway-settings__container--square_cash_app_pay"),t&&(0,r.createRoot)(t).render((0,e.createElement)(X,null)),t=document.getElementById("woocommerce-square-payment-gateway-settings__container--gift_cards_pay"),t&&(0,r.createRoot)(t).render((0,e.createElement)(Y,null)))})})()})();