this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["attribute-filter"]=function(e){function t(t){for(var r,l,a=t[0],s=t[1],i=t[2],b=0,d=[];b<a.length;b++)l=a[b],Object.prototype.hasOwnProperty.call(c,l)&&c[l]&&d.push(c[l][0]),c[l]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(u&&u(t);d.length;)d.shift()();return o.push.apply(o,i||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,a=1;a<n.length;a++){var s=n[a];0!==c[s]&&(r=!1)}r&&(o.splice(t--,1),e=l(l.s=n[0]))}return e}var r={},c={8:0,1:0},o=[];function l(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,l),n.l=!0,n.exports}l.m=e,l.c=r,l.d=function(e,t,n){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(l.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)l.d(n,r,function(t){return e[t]}.bind(null,r));return n},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=a.push.bind(a);a.push=t,a=a.slice();for(var i=0;i<a.length;i++)t(a[i]);var u=s;return o.push([375,0]),n()}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){e.exports=window.wc.wcBlocksData},100:function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(6),c=n.n(r),o=n(0),l=n(1),a=n(3),s=n(79),i=n(518),u=n(4),b=n.n(u),d=n(11),m=n(19),p=n(38),g=n(517),O=n(18);const j=e=>{let{id:t,label:n,popoverContents:r,remove:c,screenReaderLabel:i,className:u=""}=e;const[m,p]=Object(o.useState)(!1),f=Object(d.useInstanceId)(j);if(i=i||n,!n)return null;n=Object(O.decodeEntities)(n);const w=b()("woocommerce-tag",u,{"has-remove":!!c}),h="woocommerce-tag__label-"+f,_=Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},i),Object(o.createElement)("span",{"aria-hidden":"true"},n));return Object(o.createElement)("span",{className:w},r?Object(o.createElement)(a.Button,{className:"woocommerce-tag__text",id:h,onClick:()=>p(!0)},_):Object(o.createElement)("span",{className:"woocommerce-tag__text",id:h},_),r&&m&&Object(o.createElement)(a.Popover,{onClose:()=>p(!1)},r),c&&Object(o.createElement)(a.Button,{className:"woocommerce-tag__remove",onClick:c(t),label:Object(l.sprintf)(// Translators: %s label.
Object(l.__)("Remove %s","woocommerce"),n),"aria-describedby":h},Object(o.createElement)(s.a,{icon:g.a,size:20,className:"clear-icon"})))};var f=j;const w=e=>Object(o.createElement)(p.b,e),h=e=>{const{list:t,selected:n,renderItem:r,depth:l=0,onSelect:a,instanceId:s,isSingle:i,search:u}=e;return t?Object(o.createElement)(o.Fragment,null,t.map(t=>{const b=-1!==n.findIndex(e=>{let{id:n}=e;return n===t.id});return Object(o.createElement)(o.Fragment,{key:t.id},Object(o.createElement)("li",null,r({item:t,isSelected:b,onSelect:a,isSingle:i,search:u,depth:l,controlId:s})),Object(o.createElement)(h,c()({},e,{list:t.children,depth:l+1})))})):null},_=e=>{let{isLoading:t,isSingle:n,selected:r,messages:c,onChange:s,onRemove:i}=e;if(t||n||!r)return null;const u=r.length;return Object(o.createElement)("div",{className:"woocommerce-search-list__selected"},Object(o.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(o.createElement)("strong",null,c.selected(u)),u>0?Object(o.createElement)(a.Button,{isLink:!0,isDestructive:!0,onClick:()=>s([]),"aria-label":c.clear},Object(l.__)("Clear all","woocommerce")):null),u>0?Object(o.createElement)("ul",null,r.map((e,t)=>Object(o.createElement)("li",{key:t},Object(o.createElement)(f,{label:e.name,id:e.id,remove:i})))):null)},y=e=>{let{filteredList:t,search:n,onSelect:r,instanceId:c,...a}=e;const{messages:u,renderItem:b,selected:d,isSingle:m}=a,p=b||w;return 0===t.length?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(o.createElement)(s.a,{icon:i.a})),Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-text"},n?Object(l.sprintf)(u.noResults,n):u.noItems)):Object(o.createElement)("ul",{className:"woocommerce-search-list__list"},Object(o.createElement)(h,{list:t,selected:d,renderItem:p,onSelect:r,instanceId:c,isSingle:m,search:n}))},E=e=>{const{className:t="",isCompact:n,isHierarchical:r,isLoading:l,isSingle:s,list:i,messages:u=m.a,onChange:p,onSearch:g,selected:O,debouncedSpeak:j}=e,[f,w]=Object(o.useState)(""),h=Object(d.useInstanceId)(E),k=Object(o.useMemo)(()=>({...m.a,...u}),[u]),v=Object(o.useMemo)(()=>Object(m.c)(i,f,r),[i,f,r]);Object(o.useEffect)(()=>{j&&j(k.updated)},[j,k]),Object(o.useEffect)(()=>{"function"==typeof g&&g(f)},[f,g]);const S=Object(o.useCallback)(e=>()=>{s&&p([]);const t=O.findIndex(t=>{let{id:n}=t;return n===e});p([...O.slice(0,t),...O.slice(t+1)])},[s,O,p]),C=Object(o.useCallback)(e=>()=>{-1===O.findIndex(t=>{let{id:n}=t;return n===e.id})?p(s?[e]:[...O,e]):S(e.id)()},[s,S,p,O]);return Object(o.createElement)("div",{className:b()("woocommerce-search-list",t,{"is-compact":n})},Object(o.createElement)(_,c()({},e,{onRemove:S,messages:k})),Object(o.createElement)("div",{className:"woocommerce-search-list__search"},Object(o.createElement)(a.TextControl,{label:k.search,type:"search",value:f,onChange:e=>w(e)})),l?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(o.createElement)(a.Spinner,null)):Object(o.createElement)(y,c()({},e,{search:f,filteredList:v,messages:k,onSelect:C,instanceId:h})))};Object(a.withSpokenMessages)(E)},101:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);const c=Object(r.createContext)({}),o=()=>{const{wrapper:e}=Object(r.useContext)(c);return t=>{e&&e.current&&(e.current.hidden=!t)}}},103:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(13);function c(e,t){const n=Object(r.useRef)();return Object(r.useEffect)(()=>{n.current===e||t&&!t(e,n.current)||(n.current=e)},[e,t]),n.current}},106:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(10),c=n(7),o=n(0),l=n(40),a=n(162);const s=e=>{const{namespace:t,resourceName:n,resourceValues:s=[],query:i={},shouldSelect:u=!0}=e;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(o.useRef)({results:[],isLoading:!0}),d=Object(l.a)(i),m=Object(l.a)(s),p=Object(a.a)(),g=Object(c.useSelect)(e=>{if(!u)return null;const c=e(r.COLLECTIONS_STORE_KEY),o=[t,n,d,m],l=c.getCollectionError(...o);if(l){if(!(l instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");p(l)}return{results:c.getCollection(...o),isLoading:!c.hasFinishedResolution("getCollection",o)}},[t,n,m,d,u]);return null!==g&&(b.current=g),b.current}},11:function(e,t){e.exports=window.wp.compose},111:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(29);n(261),t.a=e=>{let{name:t,count:n}=e;return Object(r.createElement)(r.Fragment,null,t,null!==n&&Number.isFinite(n)&&Object(r.createElement)(o.a,{label:n.toString(),screenReaderLabel:Object(c.sprintf)(
/* translators: %s number of products. */
Object(c._n)("%s product","%s products",n,"woocommerce"),n),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}},12:function(e,t){e.exports=window.wp.primitives},120:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),c=n(1),o=n(9),l=n(7),a=n(3),s=n(5);const i=e=>{let{clientId:t,setAttributes:n,filterType:i,attributes:u}=e;const{replaceBlock:b}=Object(l.useDispatch)("core/block-editor"),{heading:d,headingLevel:m}=u;if(Object(l.useSelect)(e=>{const{getBlockParentsByBlockName:n}=e("core/block-editor");return n(t,"woocommerce/filter-wrapper").length>0},[t])||!i)return null;const p=[Object(r.createElement)(a.Button,{key:"convert",onClick:()=>{const e=[Object(o.createBlock)("woocommerce/"+i,{...u,heading:""})];d&&""!==d&&e.unshift(Object(o.createBlock)("core/heading",{content:d,level:null!=m?m:2})),b(t,Object(o.createBlock)("woocommerce/filter-wrapper",{heading:d,filterType:i},[...e])),n({heading:"",lock:{remove:!0}})},variant:"primary"},Object(c.__)("Upgrade block","woocommerce"))];return Object(r.createElement)(s.Warning,{actions:p},Object(c.__)("Filter block: We have improved this block to make styling easier. Upgrade it using the button below.","woocommerce"))}},121:function(e,t,n){"use strict";var r=n(0),c=n(5),o=n(11),l=n(1);n(161),t.a=Object(o.withInstanceId)(e=>{let{className:t,headingLevel:n,onChange:o,heading:a,instanceId:s}=e;const i="h"+n;return Object(r.createElement)(i,{className:t},Object(r.createElement)("label",{className:"screen-reader-text",htmlFor:"block-title-"+s},Object(l.__)("Block title","woocommerce")),Object(r.createElement)(c.PlainText,{id:"block-title-"+s,className:"wc-block-editor-components-title",value:a,onChange:o}))})},122:function(e,t,n){"use strict";var r=n(0);n(163),t.a=e=>{let{children:t}=e;return Object(r.createElement)("div",{className:"wc-block-filter-title-placeholder"},t)}},124:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(4),l=n.n(o),a=n(29);n(166),t.a=e=>{let{className:t,label:
/* translators: Reset button text for filters. */
n=Object(c.__)("Reset","woocommerce"),onClick:o,screenReaderLabel:s=Object(c.__)("Reset filter","woocommerce")}=e;return Object(r.createElement)("button",{className:l()("wc-block-components-filter-reset-button",t),onClick:o},Object(r.createElement)(a.a,{label:n,screenReaderLabel:s}))}},125:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(4),l=n.n(o),a=n(29);n(167),t.a=e=>{let{className:t,isLoading:n,disabled:o,label:
/* translators: Submit button text for filters. */
s=Object(c.__)("Apply","woocommerce"),onClick:i,screenReaderLabel:u=Object(c.__)("Apply filter","woocommerce")}=e;return Object(r.createElement)("button",{type:"submit",className:l()("wp-block-button__link","wc-block-filter-submit-button","wc-block-components-filter-submit-button",{"is-loading":n},t),disabled:o,onClick:i},Object(r.createElement)(a.a,{label:s,screenReaderLabel:u}))}},126:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>"boolean"==typeof e},13:function(e,t){e.exports=window.React},132:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(5),c=n(56),o=n(33),l=n(98);const a=e=>{if(!Object(c.b)())return{className:"",style:{}};const t=Object(o.a)(e)?e:{},n=Object(l.a)(t.style);return Object(r.__experimentalUseBorderProps)({...t,style:n})}},14:function(e,t){e.exports=window.wc.blocksCheckout},147:function(e){e.exports=JSON.parse('{"name":"woocommerce/attribute-filter","version":"1.0.0","title":"Filter by Attribute Controls","description":"Enable customers to filter the product grid by selecting one or more attributes, such as color.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"html":false,"color":{"text":true,"background":false},"inserter":false,"lock":false},"example":{"attributes":{"isPreview":true}},"attributes":{"className":{"type":"string","default":""},"attributeId":{"type":"number","default":0},"showCounts":{"type":"boolean","default":true},"queryType":{"type":"string","default":"or"},"headingLevel":{"type":"number","default":3},"displayStyle":{"type":"string","default":"list"},"showFilterButton":{"type":"boolean","default":false},"selectType":{"type":"string","default":"multiple"},"isPreview":{"type":"boolean","default":false}},"textdomain":"woocommerce","apiVersion":2,"$schema":"https://schemas.wp.org/trunk/block.json"}')},153:function(e,t,n){"use strict";var r=n(6),c=n.n(r),o=n(0),l=n(300),a=n(4),s=n.n(a);n(194),t.a=e=>{let{className:t,style:n,suggestions:r,multiple:a=!0,saveTransform:i=(e=>e.trim().replace(/\s/g,"-")),messages:u={},validateInput:b=(e=>r.includes(e)),label:d="",...m}=e;return Object(o.createElement)("div",{className:s()("wc-blocks-components-form-token-field-wrapper",t,{"single-selection":!a}),style:n},Object(o.createElement)(l.a,c()({label:d,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,__experimentalValidateInput:b,saveTransform:i,maxLength:a?void 0:1,suggestions:r,messages:u},m)))}},154:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(4),l=n.n(o),a=n(14);n(195),t.a=e=>{let{className:t,onChange:n,options:o=[],checked:s=[],isLoading:i=!1,isDisabled:u=!1,limit:b=10}=e;const[d,m]=Object(r.useState)(!1),p=Object(r.useMemo)(()=>[...Array(5)].map((e,t)=>Object(r.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),g=Object(r.useMemo)(()=>{const e=o.length-b;return!d&&Object(r.createElement)("li",{key:"show-more",className:"show-more"},Object(r.createElement)("button",{onClick:()=>{m(!0)},"aria-expanded":!1,"aria-label":Object(c.sprintf)(
/* translators: %s is referring the remaining count of options */
Object(c._n)("Show %s more option","Show %s more options",e,"woocommerce"),e)},Object(c.sprintf)(
/* translators: %s number of options to reveal. */
Object(c._n)("Show %s more","Show %s more",e,"woocommerce"),e)))},[o,b,d]),O=Object(r.useMemo)(()=>d&&Object(r.createElement)("li",{key:"show-less",className:"show-less"},Object(r.createElement)("button",{onClick:()=>{m(!1)},"aria-expanded":!0,"aria-label":Object(c.__)("Show less options","woocommerce")},Object(c.__)("Show less","woocommerce"))),[d]),j=Object(r.useMemo)(()=>{const e=o.length>b+5;return Object(r.createElement)(r.Fragment,null,o.map((t,c)=>Object(r.createElement)(r.Fragment,{key:t.value},Object(r.createElement)("li",e&&!d&&c>=b&&{hidden:!0},Object(r.createElement)(a.CheckboxControl,{id:t.value,className:"wc-block-checkbox-list__checkbox",label:t.label,checked:s.includes(t.value),onChange:()=>{n(t.value)},disabled:u})),e&&c===b-1&&g)),e&&O)},[o,n,s,d,b,O,g,u]),f=l()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":i},t);return Object(r.createElement)("ul",{className:f},i?p:j)}},16:function(e,t){e.exports=window.wp.url},161:function(e,t){},162:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0);const c=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},163:function(e,t){},166:function(e,t){},167:function(e,t){},176:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return o}));var r=n(8);const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const o=e.filter(e=>e.attribute===n.taxonomy),l=o.length?o[0]:null;if(!(l&&l.slug&&Array.isArray(l.slug)&&l.slug.includes(c)))return;const a=l.slug.filter(e=>e!==c),s=e.filter(e=>e.attribute!==n.taxonomy);a.length>0&&(l.slug=a.sort(),s.push(l)),t(Object(r.sortBy)(s,"attribute"))},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in";if(!n||!n.taxonomy)return[];const l=e.filter(e=>e.attribute!==n.taxonomy);return 0===c.length?t(l):(l.push({attribute:n.taxonomy,operator:o,slug:c.map(e=>{let{slug:t}=e;return t}).sort()}),t(Object(r.sortBy)(l,"attribute"))),l}},18:function(e,t){e.exports=window.wp.htmlEntities},19:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return i})),n.d(t,"b",(function(){return u}));var r=n(0),c=n(8),o=n(1);const l={clear:Object(o.__)("Clear all selected items","woocommerce"),noItems:Object(o.__)("No items found.","woocommerce"),
/* Translators: %s search term */
noResults:Object(o.__)("No results for %s","woocommerce"),search:Object(o.__)("Search for items","woocommerce"),selected:e=>Object(o.sprintf)(
/* translators: Number of items selected from list. */
Object(o._n)("%d item selected","%d items selected",e,"woocommerce"),e),updated:Object(o.__)("Search results updated.","woocommerce")},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const n=Object(c.groupBy)(e,"parent"),r=Object(c.keyBy)(t,"id"),o=["0"],l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=l(r[e.parent]);return[...t,e.name]},a=e=>e.map(e=>{const t=n[e.id];return o.push(""+e.id),{...e,breadcrumbs:l(r[e.parent]),children:t&&t.length?a(t):[]}}),s=a(n[0]||[]);return Object.entries(n).forEach(e=>{let[t,n]=e;o.includes(t)||s.push(...a(n||[]))}),s},s=(e,t,n)=>{if(!t)return n?a(e):e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),c=e.map(e=>!!r.test(e.name)&&e).filter(Boolean);return n?a(c,e):c},i=(e,t)=>{if(!t)return e;const n=new RegExp(`(${t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")})`,"ig");return e.split(n).map((e,t)=>n.test(e)?Object(r.createElement)("strong",{key:t},e):Object(r.createElement)(r.Fragment,{key:t},e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},194:function(e,t){},195:function(e,t){},2:function(e,t){e.exports=window.wc.wcSettings},20:function(e,t,n){"use strict";n.d(t,"o",(function(){return o})),n.d(t,"m",(function(){return l})),n.d(t,"l",(function(){return a})),n.d(t,"n",(function(){return s})),n.d(t,"j",(function(){return i})),n.d(t,"e",(function(){return u})),n.d(t,"g",(function(){return b})),n.d(t,"k",(function(){return d})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return p})),n.d(t,"h",(function(){return g})),n.d(t,"a",(function(){return O})),n.d(t,"i",(function(){return j})),n.d(t,"b",(function(){return f})),n.d(t,"f",(function(){return w}));var r,c=n(2);const o=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=o.pluginUrl+"images/",a=o.pluginUrl+"build/",s=o.buildPhase,i=null===(r=c.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=c.STORE_PAGES.checkout.id,b=(c.STORE_PAGES.checkout.permalink,c.STORE_PAGES.privacy.permalink),d=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),m=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id),p=c.STORE_PAGES.cart.permalink,g=(c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),Object(c.getSetting)("shippingCountries",{})),O=Object(c.getSetting)("allowedCountries",{}),j=Object(c.getSetting)("shippingStates",{}),f=Object(c.getSetting)("allowedStates",{}),w=Object(c.getSetting)("localPickupEnabled",!1)},208:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return l}));var r=n(2);const c=Object(r.getSetting)("attributes",[]).reduce((e,t)=>{const n=(r=t)&&r.attribute_name?{id:parseInt(r.attribute_id,10),name:r.attribute_name,taxonomy:"pa_"+r.attribute_name,label:r.attribute_label}:null;var r;return n&&n.id&&e.push(n),e},[]),o=e=>{if(e)return c.find(t=>t.id===e)},l=e=>{if(e)return c.find(t=>t.taxonomy===e)}},231:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return u}));var r=n(16),c=n(2),o=n(126);const l=Object(c.getSettingWithCoercion)("is_rendering_php_template",!1,o.a),a="query_type_",s="filter_";function i(e){return window?Object(r.getQueryArg)(window.location.href,e):null}function u(e){l?window.location.href=e:window.history.replaceState({},"",e)}},25:function(e,t){e.exports=window.wp.isShallowEqual},261:function(e,t){},262:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(0),c=n(246),o=n(8),l=n(40),a=n(33),s=n(55),i=n(106),u=n(46);const b=e=>{let{queryAttribute:t,queryPrices:n,queryStock:b,queryRating:d,queryState:m,productIds:p,isEditor:g=!1}=e,O=Object(u.a)();O+="-collection-data";const[j]=Object(s.a)(O),[f,w]=Object(s.b)("calculate_attribute_counts",[],O),[h,_]=Object(s.b)("calculate_price_range",null,O),[y,E]=Object(s.b)("calculate_stock_status_counts",null,O),[k,v]=Object(s.b)("calculate_rating_counts",null,O),S=Object(l.a)(t||{}),C=Object(l.a)(n),x=Object(l.a)(b),N=Object(l.a)(d);Object(r.useEffect)(()=>{"object"==typeof S&&Object.keys(S).length&&(f.find(e=>Object(a.b)(S,"taxonomy")&&e.taxonomy===S.taxonomy)||w([...f,S]))},[S,f,w]),Object(r.useEffect)(()=>{h!==C&&void 0!==C&&_(C)},[C,_,h]),Object(r.useEffect)(()=>{y!==x&&void 0!==x&&E(x)},[x,E,y]),Object(r.useEffect)(()=>{k!==N&&void 0!==N&&v(N)},[N,v,k]);const[T,A]=Object(r.useState)(g),[R]=Object(c.a)(T,200);T||A(!0);const P=Object(r.useMemo)(()=>(e=>{const t=e;return Array.isArray(e.calculate_attribute_counts)&&(t.calculate_attribute_counts=Object(o.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:n}=e;return{taxonomy:t,query_type:n}}),["taxonomy","query_type"])),t})(j),[j]);return Object(i.a)({namespace:"/wc/store/v1",resourceName:"products/collection-data",query:{...m,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...!Object(o.isEmpty)(p)&&{include:p},...P},shouldSelect:R})}},29:function(e,t,n){"use strict";var r=n(0),c=n(4),o=n.n(c);t.a=e=>{let t,{label:n,screenReaderLabel:c,wrapperElement:l,wrapperProps:a={}}=e;const s=null!=n,i=null!=c;return!s&&i?(t=l||"span",a={...a,className:o()(a.className,"screen-reader-text")},Object(r.createElement)(t,a,c)):(t=l||r.Fragment,s&&i&&n!==c?Object(r.createElement)(t,a,Object(r.createElement)("span",{"aria-hidden":"true"},n),Object(r.createElement)("span",{className:"screen-reader-text"},c)):Object(r.createElement)(t,a,n))}},3:function(e,t){e.exports=window.wp.components},33:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return c}));const r=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function c(e,t){return r(e)&&t in e}},360:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(33);const c=e=>Object(r.b)(e,"count")&&Object(r.b)(e,"description")&&Object(r.b)(e,"id")&&Object(r.b)(e,"name")&&Object(r.b)(e,"parent")&&Object(r.b)(e,"slug")&&"number"==typeof e.count&&"string"==typeof e.description&&"number"==typeof e.id&&"string"==typeof e.name&&"number"==typeof e.parent&&"string"==typeof e.slug,o=e=>Array.isArray(e)&&e.every(c),l=e=>Object(r.b)(e,"attribute")&&Object(r.b)(e,"operator")&&Object(r.b)(e,"slug")&&"string"==typeof e.attribute&&"string"==typeof e.operator&&Array.isArray(e.slug)&&e.slug.every(e=>"string"==typeof e),a=e=>Array.isArray(e)&&e.every(l)},375:function(e,t,n){e.exports=n(481)},376:function(e,t){},377:function(e,t){},38:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),c=n.n(r),o=n(0),l=n(19);const a=e=>{let{countLabel:t,className:n,depth:r=0,controlId:a="",item:s,isSelected:i,isSingle:u,onSelect:b,search:d="",...m}=e;const p=null!=t&&void 0!==s.count&&null!==s.count,g=[n,"woocommerce-search-list__item"];g.push("depth-"+r),u&&g.push("is-radio-button"),p&&g.push("has-count");const O=s.breadcrumbs&&s.breadcrumbs.length,j=m.name||"search-list-item-"+a,f=`${j}-${s.id}`;return Object(o.createElement)("label",{htmlFor:f,className:g.join(" ")},u?Object(o.createElement)("input",c()({type:"radio",id:f,name:j,value:s.value,onChange:b(s),checked:i,className:"woocommerce-search-list__item-input"},m)):Object(o.createElement)("input",c()({type:"checkbox",id:f,name:j,value:s.value,onChange:b(s),checked:i,className:"woocommerce-search-list__item-input"},m)),Object(o.createElement)("span",{className:"woocommerce-search-list__item-label"},O?Object(o.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(l.b)(s.breadcrumbs)):null,Object(o.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(l.d)(s.name,d))),!!p&&Object(o.createElement)("span",{className:"woocommerce-search-list__item-count"},t||s.count))};t.b=a},40:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(0),c=n(25),o=n.n(c);function l(e){const t=Object(r.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},45:function(e,t){e.exports=window.wp.a11y},46:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);const c=Object(r.createContext)("page"),o=()=>Object(r.useContext)(c);c.Provider},47:function(e,t){e.exports=window.wp.deprecated},481:function(e,t,n){"use strict";n.r(t);var r=n(6),c=n.n(r),o=n(0),l=n(9),a=n(5),s=n(56),i=n(79),u=n(532),b=n(4),d=n.n(b),m=n(1),p=n(228),g=n(100),O=n(8),j=n(2),f=n(121),w=n(3),h=n(132),_=n(40),y=n(103),E=n(55),k=n(106),v=n(262),S=n(111),C=n(124),x=n(125),N=n(25),T=n.n(N),A=n(18),R=n(533),P=n(16),L=n(126),B=n(84),I=n(33),F=n(360),q=n(535),G=n(231),D=n(153),M=n(122),Q=n(208),U=n(176);const V=[{value:"preview-1",formattedValue:"preview-1",name:"Blue",label:Object(o.createElement)(S.a,{name:"Blue",count:3}),textLabel:"Blue (3)"},{value:"preview-2",formattedValue:"preview-2",name:"Green",label:Object(o.createElement)(S.a,{name:"Green",count:3}),textLabel:"Green (3)"},{value:"preview-3",formattedValue:"preview-3",name:"Red",label:Object(o.createElement)(S.a,{name:"Red",count:2}),textLabel:"Red (2)"}],$={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(377);var Y=n(147);function W(){return Math.floor(Math.random()*Date.now())}const K=e=>e.replace("pa_",""),J=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n={};t.forEach(e=>{const{attribute:t,slug:r,operator:c}=e,o=K(t),l=r.join(","),a=`${G.b}${o}`,s="in"===c?"or":"and";n[`${G.a}${o}`]=l,n[a]=s});const r=Object(P.removeQueryArgs)(e,...Object.keys(n));return Object(P.addQueryArgs)(r,n)},z=e=>{if(e){const t=Object(G.d)("filter_"+e.name);return("string"==typeof t?t.split(","):[]).map(e=>encodeURIComponent(e).toLowerCase())}return[]},H=(e,t)=>{const n=Object.entries(t).reduce((e,t)=>{let[n,r]=t;return n.includes("query_type")?e:{...e,[n]:r}},{});return Object.entries(n).reduce((t,n)=>{let[r,c]=n;return e[r]===c&&t},!0)},Z=e=>e.trim().replace(/\s/g,"-").replace(/_/g,"-").replace(/-+/g,"-").replace(/[^a-zA-Z0-9-]/g,"");var X=n(154),ee=e=>{let{isLoading:t=!1,options:n,checked:r,onChange:c}=e;return t?Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"is-loading"}),Object(o.createElement)("span",{className:"is-loading"})):Object(o.createElement)(X.a,{className:"wc-block-attribute-filter-list",options:n,checked:r,onChange:c,isLoading:t,isDisabled:t})},te=n(101),ne=e=>{let{attributes:t,isEditor:n=!1}=e;const r=Object(j.getSettingWithCoercion)("has_filterable_products",!1,L.a),c=Object(j.getSettingWithCoercion)("is_rendering_php_template",!1,L.a),l=Object(j.getSettingWithCoercion)("page_url",window.location.href,B.a),a=n?[]:Object(j.getSettingWithCoercion)("product_ids",[],Array.isArray),[s,u]=Object(o.useState)(!1),b=t.isPreview&&!t.attributeId?$:Object(Q.a)(t.attributeId),p=Object(o.useMemo)(()=>z(b),[b]),[g,f]=Object(o.useState)(p),[w,N]=Object(o.useState)(W()),[Y,X]=Object(o.useState)(t.isPreview&&!t.attributeId?V:[]),ne=Object(h.a)(t),[re]=Object(E.a)(),[ce,oe]=Object(E.b)("attributes",[]),{results:le,isLoading:ae}=Object(k.a)({namespace:"/wc/store/v1",resourceName:"products/attributes/terms",resourceValues:[(null==b?void 0:b.id)||0],shouldSelect:t.attributeId>0}),se="dropdown"!==t.displayStyle&&"and"===t.queryType,{results:ie,isLoading:ue}=Object(v.a)({queryAttribute:{taxonomy:(null==b?void 0:b.taxonomy)||"",queryType:t.queryType},queryState:{...re,attributes:se?re.attributes:null},productIds:a,isEditor:n}),be=Object(o.useCallback)(e=>Object(I.b)(ie,"attribute_counts")&&Array.isArray(ie.attribute_counts)?ie.attribute_counts.find(t=>{let{term:n}=t;return n===e}):null,[ie]);Object(o.useEffect)(()=>{if(ae||ue)return;if(!Array.isArray(le))return;const e=le.map(e=>{const n=be(e.id);if(!(n||g.includes(e.slug)||(r=e.slug,null!=re&&re.attributes&&re.attributes.some(e=>{let{attribute:t,slug:n=[]}=e;return t===(null==b?void 0:b.taxonomy)&&n.includes(r)}))))return null;var r;const c=n?n.count:0;return{formattedValue:Z(e.slug),value:e.slug,name:Object(A.decodeEntities)(e.name),label:Object(o.createElement)(S.a,{name:Object(A.decodeEntities)(e.name),count:t.showCounts?c:null}),textLabel:t.showCounts?`${Object(A.decodeEntities)(e.name)} (${c})`:Object(A.decodeEntities)(e.name)}}).filter(e=>!!e);X(e),N(W())},[null==b?void 0:b.taxonomy,le,ae,t.showCounts,ue,be,g,re.attributes]);const de=Object(o.useCallback)(e=>Array.isArray(le)?le.reduce((t,n)=>(e.includes(n.slug)&&t.push(n),t),[]):[],[le]),me=Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e=e.map(e=>({...e,slug:e.slug.map(e=>decodeURIComponent(e))})),t){if(null==b||!b.taxonomy)return;const t=Object.keys(Object(P.getQueryArgs)(window.location.href)),n=K(b.taxonomy),r=t.reduce((e,t)=>t.includes(G.b+n)||t.includes(G.a+n)?Object(P.removeQueryArgs)(e,t):e,window.location.href),c=J(r,e);Object(G.c)(c)}else{const t=J(l,e),n=Object(P.getQueryArgs)(window.location.href),r=Object(P.getQueryArgs)(t);H(n,r)||Object(G.c)(t)}}),[l,null==b?void 0:b.taxonomy]),pe=e=>{const n=Object(U.b)(ce,oe,b,de(e),"or"===t.queryType?"in":"and");me(n,0===e.length)},ge=Object(o.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n||(f(e),!r&&t.showFilterButton||Object(U.b)(ce,oe,b,de(e),"or"===t.queryType?"in":"and"))}),[n,f,ce,oe,b,de,t.queryType,t.showFilterButton]),Oe=Object(o.useMemo)(()=>Object(F.a)(ce)?ce.filter(e=>{let{attribute:t}=e;return t===(null==b?void 0:b.taxonomy)}).flatMap(e=>{let{slug:t}=e;return t}):[],[ce,null==b?void 0:b.taxonomy]),je=Object(_.a)(Oe),fe=Object(y.a)(je);Object(o.useEffect)(()=>{!fe||T()(fe,je)||T()(g,je)||ge(je)},[g,je,fe,ge]);const we="single"!==t.selectType,he=Object(o.useCallback)(e=>{const t=g.includes(e);let n;we?(n=g.filter(t=>t!==e),t||(n.push(e),n.sort())):n=t?[]:[e],ge(n)},[g,we,ge]);Object(o.useEffect)(()=>{b&&!t.showFilterButton&&((e=>{let{currentCheckedFilters:t,hasSetFilterDefaultsFromUrl:n}=e;return n&&0===t.length})({currentCheckedFilters:g,hasSetFilterDefaultsFromUrl:s})?me(ce,!0):me(ce,!1))},[s,me,ce,b,g,t.showFilterButton]),Object(o.useEffect)(()=>{if(!s&&!ae)return p.length>0?(u(!0),void ge(p,!0)):void(c||u(!0))},[b,s,ae,ge,p,c]);const _e=Object(te.a)();if(!r)return _e(!1),null;if(!b)return n?Object(o.createElement)(R.a,{status:"warning",isDismissible:!1},Object(o.createElement)("p",null,Object(m.__)("Please select an attribute to use this filter!","woocommerce"))):(_e(!1),null);if(0===Y.length&&!ae&&n)return Object(o.createElement)(R.a,{status:"warning",isDismissible:!1},Object(o.createElement)("p",null,Object(m.__)("There are no products with the selected attributes.","woocommerce")));const ye="h"+t.headingLevel,Ee=!t.isPreview&&ae,ke=!t.isPreview&&ue,ve=(Ee||ke)&&0===Y.length;if(!ve&&0===Y.length)return _e(!1),null;const Se=we?!ve&&g.length<Y.length:!ve&&0===g.length,Ce=Object(o.createElement)(ye,{className:"wc-block-attribute-filter__title"},t.heading),xe=ve?Object(o.createElement)(M.a,null,Ce):Ce;return _e(!0),Object(o.createElement)(o.Fragment,null,!n&&t.heading&&xe,Object(o.createElement)("div",{className:d()("wc-block-attribute-filter","style-"+t.displayStyle)},"dropdown"===t.displayStyle?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(D.a,{key:w,className:d()(ne.className,{"single-selection":!we,"is-loading":ve}),style:{...ne.style,borderStyle:"none"},suggestions:Y.filter(e=>!g.includes(e.value)).map(e=>e.formattedValue),disabled:ve,placeholder:Object(m.sprintf)(
/* translators: %s attribute name. */
Object(m.__)("Select %s","woocommerce"),b.label),onChange:e=>{!we&&e.length>1&&(e=[e[e.length-1]]),e=e.map(e=>{const t=Y.find(t=>t.formattedValue===e);return t?t.value:e});const t=Object(O.difference)(e,g);if(1===t.length)return he(t[0]);const n=Object(O.difference)(g,e);1===n.length&&he(n[0])},value:g,displayTransform:e=>{const t=Y.find(t=>[t.value,t.formattedValue].includes(e));return t?t.textLabel:e},saveTransform:Z,messages:{added:Object(m.sprintf)(
/* translators: %s is the attribute label. */
Object(m.__)("%s filter added.","woocommerce"),b.label),removed:Object(m.sprintf)(
/* translators: %s is the attribute label. */
Object(m.__)("%s filter removed.","woocommerce"),b.label),remove:Object(m.sprintf)(
/* translators: %s is the attribute label. */
Object(m.__)("Remove %s filter.","woocommerce"),b.label.toLocaleLowerCase()),__experimentalInvalid:Object(m.sprintf)(
/* translators: %s is the attribute label. */
Object(m.__)("Invalid %s filter.","woocommerce"),b.label.toLocaleLowerCase())}}),Se&&Object(o.createElement)(i.a,{icon:q.a,size:30})):Object(o.createElement)(ee,{options:Y,checked:g,onChange:he,isLoading:ve,isDisabled:ve})),Object(o.createElement)("div",{className:"wc-block-attribute-filter__actions"},g.length>0&&!ve&&Object(o.createElement)(C.a,{onClick:()=>{f([]),N(W()),s&&pe([])},screenReaderLabel:Object(m.__)("Reset attribute filter","woocommerce")}),t.showFilterButton&&Object(o.createElement)(x.a,{className:"wc-block-attribute-filter__button",isLoading:ve,disabled:(()=>{if(Ee||ke)return!0;const e=z(b);return e.length===g.length&&g.every(t=>e.includes(t))})(),onClick:()=>pe(g)})))},re=(n(376),n(120));const ce=Object(j.getSetting)("attributes",[]);var oe=Object(w.withSpokenMessages)(e=>{let{attributes:t,setAttributes:n,debouncedSpeak:r,clientId:c}=e;const{attributeId:l,className:s,displayStyle:b,heading:h,headingLevel:_,isPreview:y,queryType:E,showCounts:k,showFilterButton:v,selectType:S}=t,[C,x]=Object(o.useState)(!l&&!y),N=Object(a.useBlockProps)(),T=e=>{if(!e||!e.length)return;const t=e[0].id;ce.find(e=>e.attribute_id===t.toString())&&l!==t&&n({attributeId:t})},A=e=>{let{isCompact:t}=e;const n={clear:Object(m.__)("Clear selected attribute","woocommerce"),list:Object(m.__)("Product Attributes","woocommerce"),noItems:Object(m.__)("Your store doesn't have any product attributes.","woocommerce"),search:Object(m.__)("Search for a product attribute:","woocommerce"),selected:e=>Object(m.sprintf)(
/* translators: %d is the number of attributes selected. */
Object(m._n)("%d attribute selected","%d attributes selected",e,"woocommerce"),e),updated:Object(m.__)("Product attribute search results updated.","woocommerce")},r=Object(O.sortBy)(ce.map(e=>({id:parseInt(e.attribute_id,10),name:e.attribute_label})),"name");return Object(o.createElement)(g.a,{className:"woocommerce-product-attributes",list:r,selected:r.filter(e=>{let{id:t}=e;return t===l}),onChange:T,messages:n,isSingle:!0,isCompact:t})};return 0===Object.keys(ce).length?Object(o.createElement)(w.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(i.a,{icon:u.a}),label:Object(m.__)("Filter by Attribute","woocommerce"),instructions:Object(m.__)("Display a list of filters based on the selected attributes.","woocommerce")},Object(o.createElement)("p",null,Object(m.__)("Attributes are needed for filtering your products. You haven't created any attributes yet.","woocommerce")),Object(o.createElement)(w.Button,{className:"wc-block-attribute-filter__add-attribute-button",isSecondary:!0,href:Object(j.getAdminLink)("edit.php?post_type=product&page=product_attributes")},Object(m.__)("Add new attribute","woocommerce")+" ",Object(o.createElement)(i.a,{icon:p.a})),Object(o.createElement)(w.Button,{className:"wc-block-attribute-filter__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-product-taxonomies/"},Object(m.__)("Learn more","woocommerce"))):Object(o.createElement)("div",N,Object(o.createElement)(a.BlockControls,null,Object(o.createElement)(w.ToolbarGroup,{controls:[{icon:"edit",title:Object(m.__)("Edit","woocommerce"),onClick:()=>x(!C),isActive:C}]})),Object(o.createElement)(a.InspectorControls,{key:"inspector"},Object(o.createElement)(w.PanelBody,{title:Object(m.__)("Display Settings","woocommerce")},Object(o.createElement)(w.ToggleControl,{label:Object(m.__)("Display product count","woocommerce"),checked:k,onChange:()=>n({showCounts:!k})}),Object(o.createElement)(w.__experimentalToggleGroupControl,{label:Object(m.__)("Allow selecting multiple options?","woocommerce"),value:S||"multiple",onChange:e=>n({selectType:e}),className:"wc-block-attribute-filter__multiple-toggle"},Object(o.createElement)(w.__experimentalToggleGroupControlOption,{value:"multiple",label:Object(m.__)("Multiple","woocommerce")}),Object(o.createElement)(w.__experimentalToggleGroupControlOption,{value:"single",label:Object(m.__)("Single","woocommerce")})),"multiple"===S&&Object(o.createElement)(w.__experimentalToggleGroupControl,{label:Object(m.__)("Filter Conditions","woocommerce"),help:"and"===E?Object(m.__)("Choose to return filter results for all of the attributes selected.","woocommerce"):Object(m.__)("Choose to return filter results for any of the attributes selected.","woocommerce"),value:E,onChange:e=>n({queryType:e}),className:"wc-block-attribute-filter__conditions-toggle"},Object(o.createElement)(w.__experimentalToggleGroupControlOption,{value:"and",label:Object(m.__)("All","woocommerce")}),Object(o.createElement)(w.__experimentalToggleGroupControlOption,{value:"or",label:Object(m.__)("Any","woocommerce")})),Object(o.createElement)(w.__experimentalToggleGroupControl,{label:Object(m.__)("Display Style","woocommerce"),value:b,onChange:e=>n({displayStyle:e}),className:"wc-block-attribute-filter__display-toggle"},Object(o.createElement)(w.__experimentalToggleGroupControlOption,{value:"list",label:Object(m.__)("List","woocommerce")}),Object(o.createElement)(w.__experimentalToggleGroupControlOption,{value:"dropdown",label:Object(m.__)("Dropdown","woocommerce")})),Object(o.createElement)(w.ToggleControl,{label:Object(m.__)("Show 'Apply filters' button","woocommerce"),help:v?Object(m.__)("Products will only update when the button is clicked.","woocommerce"):Object(m.__)("Products will update as soon as attributes are selected.","woocommerce"),checked:v,onChange:e=>n({showFilterButton:e})})),Object(o.createElement)(w.PanelBody,{title:Object(m.__)("Content Settings","woocommerce"),initialOpen:!1},A({isCompact:!0}))),Object(o.createElement)(re.a,{clientId:c,attributes:t,setAttributes:n,filterType:"attribute-filter"}),C?Object(o.createElement)(w.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(i.a,{icon:u.a}),label:Object(m.__)("Filter by Attribute","woocommerce")},Object(o.createElement)("div",{className:"wc-block-attribute-filter__instructions"},Object(m.__)("Display a list of filters based on the selected attributes.","woocommerce")),Object(o.createElement)("div",{className:"wc-block-attribute-filter__selection"},A({isCompact:!1}),Object(o.createElement)(w.Button,{isPrimary:!0,onClick:()=>{x(!1),r(Object(m.__)("Now displaying a preview of the Filter Products by Attribute block.","woocommerce"))}},Object(m.__)("Done","woocommerce")))):Object(o.createElement)("div",{className:d()(s,"wc-block-attribute-filter")},h&&Object(o.createElement)(f.a,{className:"wc-block-attribute-filter__title",headingLevel:_,heading:h,onChange:e=>n({heading:e})}),Object(o.createElement)(w.Disabled,null,Object(o.createElement)(ne,{attributes:t,isEditor:!0}))))});const le={heading:{type:"string",default:Object(m.__)("Filter by attribute","woocommerce")}};Object(l.registerBlockType)(Y,{icon:{src:Object(o.createElement)(i.a,{icon:u.a,className:"wc-block-editor-components-block-icon"})},supports:{...Y.supports,...Object(s.b)()&&{__experimentalBorder:{radius:!1,color:!0,width:!1}}},attributes:{...Y.attributes,...le},edit:oe,save(e){let{attributes:t}=e;const{className:n,showCounts:r,queryType:l,attributeId:s,heading:i,headingLevel:u,displayStyle:b,showFilterButton:m,selectType:p}=t,g={"data-attribute-id":s,"data-show-counts":r,"data-query-type":l,"data-heading":i,"data-heading-level":u};return"list"!==b&&(g["data-display-style"]=b),m&&(g["data-show-filter-button"]=m),"single"===p&&(g["data-select-type"]=p),Object(o.createElement)("div",c()({},a.useBlockProps.save({className:d()("is-loading",n)}),g),Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-attribute-filter__placeholder"}))}})},5:function(e,t){e.exports=window.wp.blockEditor},54:function(e,t){e.exports=window.wp.keycodes},55:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return m}));var r=n(10),c=n(7),o=n(0),l=n(25),a=n.n(l),s=n(40),i=n(103),u=n(46);const b=e=>{const t=Object(u.a)();e=e||t;const n=Object(c.useSelect)(t=>t(r.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:l}=Object(c.useDispatch)(r.QUERY_STATE_STORE_KEY);return[n,Object(o.useCallback)(t=>{l(e,t)},[e,l])]},d=(e,t,n)=>{const l=Object(u.a)();n=n||l;const a=Object(c.useSelect)(c=>c(r.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t),[n,e]),{setQueryValue:s}=Object(c.useDispatch)(r.QUERY_STATE_STORE_KEY);return[a,Object(o.useCallback)(t=>{s(n,e,t)},[n,e,s])]},m=(e,t)=>{const n=Object(u.a)();t=t||n;const[r,c]=b(t),l=Object(s.a)(r),d=Object(s.a)(e),m=Object(i.a)(d),p=Object(o.useRef)(!1);return Object(o.useEffect)(()=>{a()(m,d)||(c(Object.assign({},l,d)),p.current=!0)},[l,d,m,c]),p.current?[r,c]:[e,c]}},56:function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return a}));var r=n(9),c=n(20);const o=(e,t)=>{if(c.n>2)return Object(r.registerBlockType)(e,t)},l=()=>c.n>2,a=()=>c.n>1},67:function(e,t){e.exports=window.wp.dom},7:function(e,t){e.exports=window.wp.data},8:function(e,t){e.exports=window.lodash},84:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>"string"==typeof e},9:function(e,t){e.exports=window.wp.blocks},94:function(e,t){e.exports=window.wp.warning},98:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(84),c=n(33);const o=e=>Object(r.a)(e)?JSON.parse(e)||{}:Object(c.a)(e)?e:{}}});