(self.webpackChunkwebpackWcBlocksJsonp=self.webpackChunkwebpackWcBlocksJsonp||[]).push([[724],{4427:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var r=n(9196),o=n(4184),a=n.n(o),i=n(5736),c=n(2629),l=n(711),s=n(9307),u=n(5027),p=n(7856),m=n.n(p);const d=["a","b","em","i","strong","p","br"],f=["target","href","rel","name","download"],g=(e,t)=>{const n=(null==t?void 0:t.tags)||d,r=(null==t?void 0:t.attr)||f;return m().sanitize(e,{ALLOWED_TAGS:n,ALLOWED_ATTR:r})};var h=n(9097),y=n(4293),b=n(4617);const v=e=>{const t=(0,b.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:(0,c.decodeEntities)(e.name),value:e.rate_id,description:(0,r.createElement)(r.Fragment,null,Number.isFinite(t)&&(0,r.createElement)(l.FormattedMonetaryAmount,{currency:(0,y.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,(0,c.decodeEntities)(e.delivery_time))}},E=({className:e="",noResultsMessage:t,onSelectRate:n,rates:o,renderOption:a=v,selectedRate:i,disabled:c=!1})=>{const u=(null==i?void 0:i.rate_id)||"",p=(0,h.D)(u),[m,d]=(0,s.useState)((()=>{var e;return u||(null===(e=o[0])||void 0===e?void 0:e.rate_id)}));if((0,s.useEffect)((()=>{u&&u!==p&&u!==m&&d(u)}),[u,m,p]),(0,s.useEffect)((()=>{m&&n(m)}),[n,m]),0===o.length)return t;if(o.length>1)return(0,r.createElement)(l.RadioControl,{className:e,onChange:e=>{d(e),n(e)},disabled:c,selected:m,options:o.map(a)});const{label:f,secondaryLabel:g,description:y,secondaryDescription:b}=a(o[0]);return(0,r.createElement)(l.RadioControlOptionLayout,{label:f,secondaryLabel:g,description:y,secondaryDescription:b})};n(6125);const k=({packageId:e,className:t="",noResultsMessage:n,renderOption:o,packageData:p,collapsible:m,showItems:d})=>{const{selectShippingRate:f,isSelectingRate:h}=(0,u.V)(),y=document.querySelectorAll(".wc-block-components-shipping-rates-control__package").length>1,b=null!=d?d:y,v=null!=m?m:y,k=(0,r.createElement)(r.Fragment,null,(v||b)&&(0,r.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title",dangerouslySetInnerHTML:{__html:g(p.name)}}),b&&(0,r.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(p.items).map((e=>{const t=(0,c.decodeEntities)(e.name),n=e.quantity;return(0,r.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},(0,r.createElement)(l.Label,{label:n>1?`${t} × ${n}`:`${t}`,screenReaderLabel:(0,i.sprintf)(/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ (0,i._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woocommerce"),t,n)}))})))),_=(0,s.useCallback)((t=>{f(t,e)}),[e,f]),N={className:t,noResultsMessage:n,rates:p.shipping_rates,onSelectRate:_,selectedRate:p.shipping_rates.find((e=>e.selected)),renderOption:o,disabled:h};return v?(0,r.createElement)(l.Panel,{className:a()("wc-block-components-shipping-rates-control__package",t,{"wc-block-components-shipping-rates-control__package--disabled":h}),initialOpen:!1,title:k},(0,r.createElement)(E,{...N})):(0,r.createElement)("div",{className:a()("wc-block-components-shipping-rates-control__package",t,{"wc-block-components-shipping-rates-control__package--disabled":h})},k,(0,r.createElement)(E,{...N}))}},9490:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5736);const o=({defaultTitle:e=(0,r.__)("Step","woocommerce"),defaultDescription:t=(0,r.__)("Step description text.","woocommerce"),defaultShowStepNumber:n=!0})=>({title:{type:"string",default:e},description:{type:"string",default:t},showStepNumber:{type:"boolean",default:n}})},4711:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>C});var r=n(9196),o=n(4184),a=n.n(o),i=n(721),c=n(711),l=n(9818),s=n(4801),u=n(5271),p=n(5736),m=n(9307),d=n(5027),f=n(4055),g=n(4293),h=n(2629),y=n(4617),b=n(1984),v=n(444);const E=(0,r.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(v.Path,{d:"M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z"}));var k=n(602),_=n(3554);const N=({title:e,setSelectedOption:t,selectedOption:n,pickupLocations:o,onSelectRate:a,renderPickupLocation:i,packageCount:l})=>{const s=document.querySelectorAll(".wc-block-components-local-pickup-select .wc-block-components-radio-control").length>1;return(0,r.createElement)("div",{className:"wc-block-components-local-pickup-select"},!(!s||!e)&&(0,r.createElement)("div",null,e),(0,r.createElement)(c.RadioControl,{onChange:e=>{t(e),a(e)},selected:n,options:o.map((e=>i(e,l)))}))};var T=n(4427);const w=(e,t)=>{const n=(0,y.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):e.price,o=(e=>{if(null!=e&&e.meta_data){const t=e.meta_data.find((e=>"pickup_location"===e.key));return t?t.value:""}return""})(e),a=(e=>{if(null!=e&&e.meta_data){const t=e.meta_data.find((e=>"pickup_address"===e.key));return t?t.value:""}return""})(e),i=(e=>{if(null!=e&&e.meta_data){const t=e.meta_data.find((e=>"pickup_details"===e.key));return t?t.value:""}return""})(e);let l=(0,r.createElement)("em",null,(0,p.__)("free","woocommerce"));return parseInt(n,10)>0&&(l=1===t?(0,r.createElement)(c.FormattedMonetaryAmount,{currency:(0,g.getCurrencyFromPriceResponse)(e),value:n}):(0,m.createInterpolateElement)(/* translators: is the price of the package, is the number of packages. These must appear in the translated string. */ (0,p._n)(" x package"," x packages",t,"woocommerce"),{price:(0,r.createElement)(c.FormattedMonetaryAmount,{currency:(0,g.getCurrencyFromPriceResponse)(e),value:n}),packageCount:(0,r.createElement)(r.Fragment,null,t)})),{value:e.rate_id,label:o?(0,h.decodeEntities)(o):(0,h.decodeEntities)(e.name),secondaryLabel:l,description:(0,h.decodeEntities)(i),secondaryDescription:a?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(b.Z,{icon:E,className:"wc-block-editor-components-block-icon"}),(0,h.decodeEntities)(a)):void 0}},S=()=>{var e;const{shippingRates:t,selectShippingRate:n}=(0,d.V)(),o=((null===(e=t[0])||void 0===e?void 0:e.shipping_rates)||[]).filter(k.J3),[a,i]=(0,m.useState)((()=>{var e;return(null===(e=o.find((e=>e.selected)))||void 0===e?void 0:e.rate_id)||""})),c=(0,m.useCallback)((e=>{n(e)}),[n]),{extensions:l,receiveCart:s,...u}=(0,f.b)(),p={extensions:l,cart:u,components:{ShippingRatesControlPackage:T.Z,LocalPickupSelect:N},renderPickupLocation:w};(0,m.useEffect)((()=>{!a&&o[0]&&(i(o[0].rate_id),c(o[0].rate_id))}),[c,o,a]);const g=(0,k.wH)(t);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(_.ExperimentalOrderLocalPickupPackages.Slot,{...p}),(0,r.createElement)(_.ExperimentalOrderLocalPickupPackages,null,(0,r.createElement)(N,{title:t[0].name,setSelectedOption:i,onSelectRate:c,selectedOption:a,renderPickupLocation:w,pickupLocations:o,packageCount:g})))},A={...(0,n(9490).Z)({defaultTitle:(0,p.__)("Pickup options","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},C=(0,i.withFilteredAttributes)(A)((({title:e,description:t,showStepNumber:n,children:o,className:i})=>{const{checkoutIsProcessing:p,prefersCollection:m}=(0,l.useSelect)((e=>{const t=e(s.CHECKOUT_STORE_KEY);return{checkoutIsProcessing:t.isProcessing(),prefersCollection:t.prefersCollection()}}));return m&&u.oC?(0,r.createElement)(c.FormStep,{id:"pickup-options",disabled:p,className:a()("wc-block-checkout__pickup-options",i),title:e,description:t,showStepNumber:n},(0,r.createElement)(S,null),o):null}))},7856:function(e){e.exports=function(){"use strict";function e(t){return e="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},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(e,r,o){return n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,n,r){var o=[null];o.push.apply(o,n);var a=new(Function.bind.apply(e,o));return r&&t(a,r.prototype),a},n.apply(null,arguments)}function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),o=1;o/gm),$=p(/\${[\w\W]*}/gm),q=p(/^data-[\-\w.\u00B7-\uFFFF]/),V=p(/^aria-[\-\w]+$/),Y=p(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Z=p(/^(?:\w+script|data):/i),K=p(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),J=p(/^html$/i),X=function(){return"undefined"==typeof window?null:window};return function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X(),o=function(e){return t(e)};if(o.version="2.4.7",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;var a=n.document,i=n.document,c=n.DocumentFragment,l=n.HTMLTemplateElement,s=n.Node,p=n.Element,m=n.NodeFilter,d=n.NamedNodeMap,f=void 0===d?n.NamedNodeMap||n.MozNamedAttrMap:d,g=n.HTMLFormElement,h=n.DOMParser,C=n.trustedTypes,Q=p.prototype,ee=R(Q,"cloneNode"),te=R(Q,"nextSibling"),ne=R(Q,"childNodes"),re=R(Q,"parentNode");if("function"==typeof l){var oe=i.createElement("template");oe.content&&oe.content.ownerDocument&&(i=oe.content.ownerDocument)}var ae=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(r=n.currentScript.getAttribute(o));var a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(C,a),ie=ae?ae.createHTML(""):"",ce=i,le=ce.implementation,se=ce.createNodeIterator,ue=ce.createDocumentFragment,pe=ce.getElementsByTagName,me=a.importNode,de={};try{de=L(i).documentMode?i.documentMode:{}}catch(e){}var fe={};o.isSupported="function"==typeof re&&le&&void 0!==le.createHTMLDocument&&9!==de;var ge,he,ye=W,be=G,ve=$,Ee=q,ke=V,_e=Z,Ne=K,Te=Y,we=null,Se=x({},[].concat(r(O),r(D),r(M),r(F),r(H))),Ae=null,Ce=x({},[].concat(r(U),r(z),r(B),r(j))),xe=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Le=null,Re=null,Oe=!0,De=!0,Me=!1,Ie=!0,Fe=!1,Pe=!1,He=!1,Ue=!1,ze=!1,Be=!1,je=!1,We=!0,Ge=!1,$e=!0,qe=!1,Ve={},Ye=null,Ze=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ke=null,Je=x({},["audio","video","img","source","image","track"]),Xe=null,Qe=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml",rt=nt,ot=!1,at=null,it=x({},[et,tt,nt],k),ct=["application/xhtml+xml","text/html"],lt=null,st=i.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},pt=function(t){lt&<===t||(t&&"object"===e(t)||(t={}),t=L(t),ge=ge=-1===ct.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,he="application/xhtml+xml"===ge?k:E,we="ALLOWED_TAGS"in t?x({},t.ALLOWED_TAGS,he):Se,Ae="ALLOWED_ATTR"in t?x({},t.ALLOWED_ATTR,he):Ce,at="ALLOWED_NAMESPACES"in t?x({},t.ALLOWED_NAMESPACES,k):it,Xe="ADD_URI_SAFE_ATTR"in t?x(L(Qe),t.ADD_URI_SAFE_ATTR,he):Qe,Ke="ADD_DATA_URI_TAGS"in t?x(L(Je),t.ADD_DATA_URI_TAGS,he):Je,Ye="FORBID_CONTENTS"in t?x({},t.FORBID_CONTENTS,he):Ze,Le="FORBID_TAGS"in t?x({},t.FORBID_TAGS,he):{},Re="FORBID_ATTR"in t?x({},t.FORBID_ATTR,he):{},Ve="USE_PROFILES"in t&&t.USE_PROFILES,Oe=!1!==t.ALLOW_ARIA_ATTR,De=!1!==t.ALLOW_DATA_ATTR,Me=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Fe=t.SAFE_FOR_TEMPLATES||!1,Pe=t.WHOLE_DOCUMENT||!1,ze=t.RETURN_DOM||!1,Be=t.RETURN_DOM_FRAGMENT||!1,je=t.RETURN_TRUSTED_TYPE||!1,Ue=t.FORCE_BODY||!1,We=!1!==t.SANITIZE_DOM,Ge=t.SANITIZE_NAMED_PROPS||!1,$e=!1!==t.KEEP_CONTENT,qe=t.IN_PLACE||!1,Te=t.ALLOWED_URI_REGEXP||Te,rt=t.NAMESPACE||nt,xe=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ut(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(xe.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ut(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(xe.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(xe.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Fe&&(De=!1),Be&&(ze=!0),Ve&&(we=x({},r(H)),Ae=[],!0===Ve.html&&(x(we,O),x(Ae,U)),!0===Ve.svg&&(x(we,D),x(Ae,z),x(Ae,j)),!0===Ve.svgFilters&&(x(we,M),x(Ae,z),x(Ae,j)),!0===Ve.mathMl&&(x(we,F),x(Ae,B),x(Ae,j))),t.ADD_TAGS&&(we===Se&&(we=L(we)),x(we,t.ADD_TAGS,he)),t.ADD_ATTR&&(Ae===Ce&&(Ae=L(Ae)),x(Ae,t.ADD_ATTR,he)),t.ADD_URI_SAFE_ATTR&&x(Xe,t.ADD_URI_SAFE_ATTR,he),t.FORBID_CONTENTS&&(Ye===Ze&&(Ye=L(Ye)),x(Ye,t.FORBID_CONTENTS,he)),$e&&(we["#text"]=!0),Pe&&x(we,["html","head","body"]),we.table&&(x(we,["tbody"]),delete Le.tbody),u&&u(t),lt=t)},mt=x({},["mi","mo","mn","ms","mtext"]),dt=x({},["foreignobject","desc","title","annotation-xml"]),ft=x({},["title","style","font","a","script"]),gt=x({},D);x(gt,M),x(gt,I);var ht=x({},F);x(ht,P);var yt=function(e){v(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ie}catch(t){e.remove()}}},bt=function(e,t){try{v(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){v(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ae[e])if(ze||Be)try{yt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},vt=function(e){var t,n;if(Ue)e=""+e;else{var r=_(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===ge&&rt===nt&&(e=''+e+"");var o=ae?ae.createHTML(e):e;if(rt===nt)try{t=(new h).parseFromString(o,ge)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(rt,"template",null);try{t.documentElement.innerHTML=ot?ie:o}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),rt===nt?pe.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:a},Et=function(e){return se.call(e.ownerDocument||e,e,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT,null,!1)},kt=function(t){return"object"===e(s)?t instanceof s:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},_t=function(e,t,n){fe[e]&&y(fe[e],(function(e){e.call(o,t,n,lt)}))},Nt=function(e){var t,n;if(_t("beforeSanitizeElements",e,null),(n=e)instanceof g&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof f)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return yt(e),!0;if(S(/[\u0080-\uFFFF]/,e.nodeName))return yt(e),!0;var r=he(e.nodeName);if(_t("uponSanitizeElement",e,{tagName:r,allowedTags:we}),e.hasChildNodes()&&!kt(e.firstElementChild)&&(!kt(e.content)||!kt(e.content.firstElementChild))&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return yt(e),!0;if("select"===r&&S(/