this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["stock-filter"]=function(e){function t(t){for(var n,s,a=t[0],l=t[1],u=t[2],b=0,d=[];b<a.length;b++)s=a[b],Object.prototype.hasOwnProperty.call(o,s)&&o[s]&&d.push(o[s][0]),o[s]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(i&&i(t);d.length;)d.shift()();return r.push.apply(r,u||[]),c()}function c(){for(var e,t=0;t<r.length;t++){for(var c=r[t],n=!0,a=1;a<c.length;a++){var l=c[a];0!==o[l]&&(n=!1)}n&&(r.splice(t--,1),e=s(s.s=c[0]))}return e}var n={},o={45:0,1:0},r=[];function s(t){if(n[t])return n[t].exports;var c=n[t]={i:t,l:!1,exports:{}};return e[t].call(c.exports,c,c.exports,s),c.l=!0,c.exports}s.m=e,s.c=n,s.d=function(e,t,c){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(s.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)s.d(c,n,function(t){return e[t]}.bind(null,n));return c},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=a.push.bind(a);a.push=t,a=a.slice();for(var u=0;u<a.length;u++)t(a[u]);var i=l;return r.push([414,0]),c()}({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.wp.blocks},102:function(e,t,c){"use strict";var n=c(0),o=c(5),r=c(11),s=c(1);c(139),t.a=Object(r.withInstanceId)(e=>{let{className:t,headingLevel:c,onChange:r,heading:a,instanceId:l}=e;const u="h"+c;return Object(n.createElement)(u,{className:t},Object(n.createElement)("label",{className:"screen-reader-text",htmlFor:"block-title-"+l},Object(s.__)("Block title","woocommerce")),Object(n.createElement)(o.PlainText,{id:"block-title-"+l,className:"wc-block-editor-components-title",value:a,onChange:r}))})},103:function(e,t,c){"use strict";var n=c(0);c(140),t.a=e=>{let{children:t}=e;return Object(n.createElement)("div",{className:"wc-block-filter-title-placeholder"},t)}},104:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(12);function o(e,t){const c=Object(n.useRef)();return Object(n.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},108:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var n=c(9),o=c(7),r=c(0),s=c(40),a=c(142);const l=e=>{const{namespace:t,resourceName:c,resourceValues:l=[],query:u={},shouldSelect:i=!0}=e;if(!t||!c)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(r.useRef)({results:[],isLoading:!0}),d=Object(s.a)(u),f=Object(s.a)(l),p=Object(a.a)(),O=Object(o.useSelect)(e=>{if(!i)return null;const o=e(n.COLLECTIONS_STORE_KEY),r=[t,c,d,f],s=o.getCollectionError(...r);if(s){if(!(s instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");p(s)}return{results:o.getCollection(...r),isLoading:!o.hasFinishedResolution("getCollection",r)}},[t,c,f,d,i]);return null!==O&&(b.current=O),b.current}},11:function(e,t){e.exports=window.wp.compose},113:function(e,t,c){"use strict";var n=c(0),o=c(1),r=c(29);c(280),t.a=e=>{let{name:t,count:c}=e;return Object(n.createElement)(n.Fragment,null,t,null!==c&&Number.isFinite(c)&&Object(n.createElement)(r.a,{label:c.toString(),screenReaderLabel:Object(o.sprintf)(
/* translators: %s number of products. */
Object(o._n)("%s product","%s products",c,"woocommerce"),c),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}},12:function(e,t){e.exports=window.React},123:function(e,t,c){"use strict";c.d(t,"a",(function(){return u}));var n=c(0),o=c(1),r=c(10),s=c(7),a=c(3),l=c(5);const u=e=>{let{clientId:t,setAttributes:c,filterType:u,attributes:i}=e;const{replaceBlock:b}=Object(s.useDispatch)("core/block-editor"),{heading:d,headingLevel:f}=i;if(Object(s.useSelect)(e=>{const{getBlockParentsByBlockName:c}=e("core/block-editor");return c(t,"woocommerce/filter-wrapper").length>0},[t])||!u)return null;const p=[Object(n.createElement)(a.Button,{key:"convert",onClick:()=>{const e=[Object(r.createBlock)("woocommerce/"+u,{...i,heading:""})];d&&""!==d&&e.unshift(Object(r.createBlock)("core/heading",{content:d,level:null!=f?f:2})),b(t,Object(r.createBlock)("woocommerce/filter-wrapper",{heading:d,filterType:u},[...e])),c({heading:"",lock:{remove:!0}})},variant:"primary"},Object(o.__)("Upgrade block","woocommerce"))];return Object(n.createElement)(l.Warning,{actions:p},Object(o.__)("Filter block: We have improved this block to make styling easier. Upgrade it using the button below.","woocommerce"))}},124:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var n=c(0);const o=Object(n.createContext)({}),r=()=>{const{wrapper:e}=Object(n.useContext)(o);return t=>{e&&e.current&&(e.current.hidden=!t)}}},125:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));const n=e=>"boolean"==typeof e},13:function(e,t){e.exports=window.wp.primitives},139:function(e,t){},140:function(e,t){},142:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},15:function(e,t){e.exports=window.wp.htmlEntities},155:function(e,t,c){"use strict";var n=c(0),o=c(1),r=c(4),s=c.n(r),a=c(29);c(197),t.a=e=>{let{className:t,label:
/* translators: Reset button text for filters. */
c=Object(o.__)("Reset","woocommerce"),onClick:r,screenReaderLabel:l=Object(o.__)("Reset filter","woocommerce")}=e;return Object(n.createElement)("button",{className:s()("wc-block-components-filter-reset-button",t),onClick:r},Object(n.createElement)(a.a,{label:c,screenReaderLabel:l}))}},156:function(e,t,c){"use strict";var n=c(0),o=c(1),r=c(4),s=c.n(r),a=c(29);c(198),t.a=e=>{let{className:t,isLoading:c,disabled:r,label:
/* translators: Submit button text for filters. */
l=Object(o.__)("Apply","woocommerce"),onClick:u,screenReaderLabel:i=Object(o.__)("Apply filter","woocommerce")}=e;return Object(n.createElement)("button",{type:"submit",className:s()("wp-block-button__link","wc-block-filter-submit-button","wc-block-components-filter-submit-button",{"is-loading":c},t),disabled:r,onClick:u},Object(n.createElement)(a.a,{label:l,screenReaderLabel:i}))}},157:function(e,t,c){"use strict";var n=c(0),o=c(1),r=c(4),s=c.n(r),a=c(18);c(199),t.a=e=>{let{className:t,onChange:c,options:r=[],checked:l=[],isLoading:u=!1,isDisabled:i=!1,limit:b=10}=e;const[d,f]=Object(n.useState)(!1),p=Object(n.useMemo)(()=>[...Array(5)].map((e,t)=>Object(n.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),O=Object(n.useMemo)(()=>{const e=r.length-b;return!d&&Object(n.createElement)("li",{key:"show-more",className:"show-more"},Object(n.createElement)("button",{onClick:()=>{f(!0)},"aria-expanded":!1,"aria-label":Object(o.sprintf)(
/* translators: %s is referring the remaining count of options */
Object(o._n)("Show %s more option","Show %s more options",e,"woocommerce"),e)},Object(o.sprintf)(
/* translators: %s number of options to reveal. */
Object(o._n)("Show %s more","Show %s more",e,"woocommerce"),e)))},[r,b,d]),j=Object(n.useMemo)(()=>d&&Object(n.createElement)("li",{key:"show-less",className:"show-less"},Object(n.createElement)("button",{onClick:()=>{f(!1)},"aria-expanded":!0,"aria-label":Object(o.__)("Show less options","woocommerce")},Object(o.__)("Show less","woocommerce"))),[d]),m=Object(n.useMemo)(()=>{const e=r.length>b+5;return Object(n.createElement)(n.Fragment,null,r.map((t,o)=>Object(n.createElement)(n.Fragment,{key:t.value},Object(n.createElement)("li",e&&!d&&o>=b&&{hidden:!0},Object(n.createElement)(a.CheckboxControl,{id:t.value,className:"wc-block-checkbox-list__checkbox",label:t.label,checked:l.includes(t.value),onChange:()=>{c(t.value)}})),e&&o===b-1&&O)),e&&j)},[r,c,l,d,b,j,O,i]),w=s()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":u},t);return Object(n.createElement)("ul",{className:w},u?p:m)}},16:function(e,t){e.exports=window.wp.url},18:function(e,t){e.exports=window.wc.blocksCheckout},197:function(e,t){},198:function(e,t){},199:function(e,t){},2:function(e,t){e.exports=window.wc.wcSettings},234:function(e){e.exports=JSON.parse('{"name":"woocommerce/stock-filter","version":"1.0.0","title":"Filter by Stock Controls","description":"Enable customers to filter the product grid by stock status.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"html":false,"multiple":false,"color":{"link":true,"__experimentalDefaultControls":{"text":true}},"inserter":false,"lock":false},"example":{"attributes":{"isPreview":true}},"attributes":{"className":{"type":"string","default":""},"headingLevel":{"type":"number","default":3},"showCounts":{"type":"boolean","default":true},"showFilterButton":{"type":"boolean","default":false},"isPreview":{"type":"boolean","default":false}},"textdomain":"woocommerce","apiVersion":2,"$schema":"https://schemas.wp.org/trunk/block.json"}')},241:function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return l})),c.d(t,"d",(function(){return u})),c.d(t,"c",(function(){return i}));var n=c(16),o=c(2),r=c(125);const s=Object(o.getSettingWithCoercion)("is_rendering_php_template",!1,r.a),a="query_type_",l="filter_";function u(e){return window?Object(n.getQueryArg)(window.location.href,e):null}function i(e){s?window.location.href=e:window.history.replaceState({},"",e)}},25:function(e,t){e.exports=window.wp.isShallowEqual},279:function(e,t,c){"use strict";c.d(t,"a",(function(){return b}));var n=c(0),o=c(259),r=c(8),s=c(40),a=c(35),l=c(52),u=c(108),i=c(44);const b=e=>{let{queryAttribute:t,queryPrices:c,queryStock:b,queryRating:d,queryState:f}=e,p=Object(i.a)();p+="-collection-data";const[O]=Object(l.a)(p),[j,m]=Object(l.b)("calculate_attribute_counts",[],p),[w,g]=Object(l.b)("calculate_price_range",null,p),[h,k]=Object(l.b)("calculate_stock_status_counts",null,p),[_,v]=Object(l.b)("calculate_rating_counts",null,p),E=Object(s.a)(t||{}),y=Object(s.a)(c),S=Object(s.a)(b),C=Object(s.a)(d);Object(n.useEffect)(()=>{"object"==typeof E&&Object.keys(E).length&&(j.find(e=>Object(a.b)(E,"taxonomy")&&e.taxonomy===E.taxonomy)||m([...j,E]))},[E,j,m]),Object(n.useEffect)(()=>{w!==y&&void 0!==y&&g(y)},[y,g,w]),Object(n.useEffect)(()=>{h!==S&&void 0!==S&&k(S)},[S,k,h]),Object(n.useEffect)(()=>{_!==C&&void 0!==C&&v(C)},[C,v,_]);const[x,N]=Object(n.useState)(!1),[R]=Object(o.a)(x,200);x||N(!0);const P=Object(n.useMemo)(()=>(e=>{const t=e;return Array.isArray(e.calculate_attribute_counts)&&(t.calculate_attribute_counts=Object(r.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:c}=e;return{taxonomy:t,query_type:c}}),["taxonomy","query_type"])),t})(O),[O]);return Object(u.a)({namespace:"/wc/store/v1",resourceName:"products/collection-data",query:{...f,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...P},shouldSelect:R})}},280:function(e,t){},29:function(e,t,c){"use strict";var n=c(0),o=c(4),r=c.n(o);t.a=e=>{let t,{label:c,screenReaderLabel:o,wrapperElement:s,wrapperProps:a={}}=e;const l=null!=c,u=null!=o;return!l&&u?(t=s||"span",a={...a,className:r()(a.className,"screen-reader-text")},Object(n.createElement)(t,a,o)):(t=s||n.Fragment,l&&u&&c!==o?Object(n.createElement)(t,a,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,a,c))}},3:function(e,t){e.exports=window.wp.components},35:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return o}));const n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function o(e,t){return n(e)&&t in e}},40:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var n=c(0),o=c(25),r=c.n(o);function s(e){const t=Object(n.useRef)(e);return r()(e,t.current)||(t.current=e),t.current}},414:function(e,t,c){e.exports=c(491)},415:function(e,t){},416:function(e,t){},44:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var n=c(0);const o=Object(n.createContext)("page"),r=()=>Object(n.useContext)(o);o.Provider},48:function(e,t){e.exports=window.wp.a11y},491:function(e,t,c){"use strict";c.r(t);var n=c(6),o=c.n(n),r=c(0),s=c(10),a=c(118),l=c(545),u=c(4),i=c.n(u),b=c(5),d=c(1),f=c(3),p=c(102),O=c(48),j=c(40),m=c(104),w=c(52),g=c(279),h=c(2),k=c(157),_=c(156),v=c(155),E=c(103),y=c(113),S=c(25),C=c.n(S),x=c(15),N=c(125),R=c(35),P=c(16),T=c(241);const B=[{value:"preview-1",name:"In Stock",label:Object(r.createElement)(y.a,{name:"In Stock",count:3})},{value:"preview-2",name:"Out of sotck",label:Object(r.createElement)(y.a,{name:"Out of stock",count:3})},{value:"preview-3",name:"On backorder",label:Object(r.createElement)(y.a,{name:"On backorder",count:2})}];c(416);var L=c(96),F=c(234),A=c(124);const q=T.a+"stock_status";var M=e=>{let{attributes:t,isEditor:c=!1}=e;const n=Object(A.a)(),o=Object(h.getSettingWithCoercion)("is_rendering_php_template",!1,N.a),[s,a]=Object(r.useState)(!1),{outofstock:l,...u}=Object(h.getSetting)("stockStatusOptions",{}),b=Object(r.useRef)(Object(h.getSetting)("hideOutOfStockItems",!1)?u:{outofstock:l,...u}),f=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"filter_stock_status";const c=Object(T.d)(t);if(!c)return[];const n=Object(L.a)(c)?c.split(","):c;return Object.keys(e).filter(e=>n.includes(e))}(b.current,q),[]),[p,S]=Object(r.useState)(f),[F,M]=Object(r.useState)(t.isPreview?B:[]),[I]=Object(r.useState)(Object.entries(b.current).map(e=>{let[t,c]=e;return{slug:t,name:c}}).filter(e=>!!e.name).sort((e,t)=>e.slug.localeCompare(t.slug))),[Q]=Object(w.a)(),[D,Y]=Object(w.b)("stock_status",f),{results:W,isLoading:K}=Object(g.a)({queryStock:!0,queryState:Q}),U=Object(r.useCallback)(e=>Object(R.b)(W,"stock_status_counts")&&Array.isArray(W.stock_status_counts)?W.stock_status_counts.find(t=>{let{status:c,count:n}=t;return c===e&&0!==Number(n)}):null,[W]);Object(r.useEffect)(()=>{if(K||t.isPreview)return;const e=I.map(e=>{const c=U(e.slug);if(!(c||p.includes(e.slug)||(n=e.slug,null!=Q&&Q.stock_status&&Q.stock_status.some(e=>{let{status:t=[]}=e;return t.includes(n)}))))return null;var n;const o=c?Number(c.count):0;return{value:e.slug,name:Object(x.decodeEntities)(e.name),label:Object(r.createElement)(y.a,{name:Object(x.decodeEntities)(e.name),count:t.showCounts?o:null})}}).filter(e=>!!e);M(e)},[t.showCounts,t.isPreview,K,U,p,Q.stock_status,I]);const V=Object(r.useCallback)(e=>{c||(e&&!o&&Y(e),(e=>{if(!window)return;if(0===e.length){const e=Object(P.removeQueryArgs)(window.location.href,q);return void(e!==window.location.href&&Object(T.c)(e))}const t=Object(P.addQueryArgs)(window.location.href,{[q]:e.join(",")});t!==window.location.href&&Object(T.c)(t)})(e))},[c,Y,p,o]);Object(r.useEffect)(()=>{t.showFilterButton||V(p)},[t.showFilterButton,p,V]);const J=Object(r.useMemo)(()=>D,[D]),$=Object(j.a)(J),z=Object(m.a)($);Object(r.useEffect)(()=>{C()(z,$)||C()(p,$)||S($)},[p,$,z]),Object(r.useEffect)(()=>{s||(Y(f),a(!0))},[Y,s,a,f]);const G=Object(r.useCallback)(e=>{const t=e=>{const t=F.find(t=>t.value===e);return t?t.name:null},c=e=>{let{filterAdded:c,filterRemoved:n}=e;const o=c?t(c):null,r=n?t(n):null;o?Object(O.speak)(Object(d.sprintf)(
/* translators: %s stock statuses (for example: 'instock'...) */
Object(d.__)("%s filter added.","woocommerce"),o)):r&&Object(O.speak)(Object(d.sprintf)(
/* translators: %s stock statuses (for example:'instock'...) */
Object(d.__)("%s filter removed.","woocommerce"),r))},n=p.includes(e),o=p.filter(t=>t!==e);n?c({filterRemoved:e}):(o.push(e),o.sort(),c({filterAdded:e})),S(o)},[p,F]);if(!K&&0===F.length)return n(!1),null;const H="h"+t.headingLevel,X=!t.isPreview&&!b.current||0===F.length,Z=!t.isPreview&&K;if(!Object(h.getSettingWithCoercion)("has_filterable_products",!1,N.a))return n(!1),null;const ee=Object(r.createElement)(H,{className:"wc-block-stock-filter__title"},t.heading),te=X?Object(r.createElement)(E.a,null,ee):ee;return n(!0),Object(r.createElement)(r.Fragment,null,!c&&t.heading&&te,Object(r.createElement)("div",{className:i()("wc-block-stock-filter",{"is-loading":X})},Object(r.createElement)(k.a,{className:"wc-block-stock-filter-list",options:F,checked:p,onChange:G,isLoading:X,isDisabled:Z})),Object(r.createElement)("div",{className:"wc-block-stock-filter__actions"},p.length>0&&!X&&Object(r.createElement)(v.a,{onClick:()=>{S([]),V([])},screenReaderLabel:Object(d.__)("Reset stock filter","woocommerce")}),t.showFilterButton&&Object(r.createElement)(_.a,{className:"wc-block-stock-filter__button",isLoading:X,disabled:X||Z,onClick:()=>V(p)})))},I=(c(415),c(123)),Q=Object(f.withSpokenMessages)(e=>{let{clientId:t,attributes:c,setAttributes:n}=e;const{className:o,heading:s,headingLevel:a,showCounts:l,showFilterButton:u}=c,O=Object(b.useBlockProps)({className:i()("wc-block-stock-filter",o)});return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(b.InspectorControls,{key:"inspector"},Object(r.createElement)(f.PanelBody,{title:Object(d.__)("Content","woocommerce")},Object(r.createElement)(f.ToggleControl,{label:Object(d.__)("Display product count","woocommerce"),checked:l,onChange:()=>n({showCounts:!l})})),Object(r.createElement)(f.PanelBody,{title:Object(d.__)("Settings","woocommerce")},Object(r.createElement)(f.ToggleControl,{label:Object(d.__)("Show 'Apply filters' button","woocommerce"),help:u?Object(d.__)("Products will only update when the button is clicked.","woocommerce"):Object(d.__)("Products will update as soon as attributes are selected.","woocommerce"),checked:u,onChange:e=>n({showFilterButton:e})}))),Object(r.createElement)(I.a,{clientId:t,attributes:c,setAttributes:n,filterType:"stock-filter"}),Object(r.createElement)("div",O,s&&Object(r.createElement)(p.a,{className:"wc-block-stock-filter__title",headingLevel:a,heading:s,onChange:e=>n({heading:e})}),Object(r.createElement)(f.Disabled,null,Object(r.createElement)(M,{attributes:c,isEditor:!0}))))});const D={heading:{type:"string",default:Object(d.__)("Filter by stock status","woocommerce")}};Object(s.registerBlockType)(F,{icon:{src:Object(r.createElement)(a.a,{icon:l.a,className:"wc-block-editor-components-block-icon"})},attributes:{...F.attributes,...D},edit:Q,save(e){let{attributes:t}=e;const{className:c,showCounts:n,heading:s,headingLevel:a,showFilterButton:l}=t,u={"data-show-counts":n,"data-heading":s,"data-heading-level":a};return l&&(u["data-show-filter-button"]=l),Object(r.createElement)("div",o()({},b.useBlockProps.save({className:i()("is-loading",c)}),u),Object(r.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-stock-filter__placeholder"}))}})},5:function(e,t){e.exports=window.wp.blockEditor},52:function(e,t,c){"use strict";c.d(t,"a",(function(){return b})),c.d(t,"b",(function(){return d})),c.d(t,"c",(function(){return f}));var n=c(9),o=c(7),r=c(0),s=c(25),a=c.n(s),l=c(40),u=c(104),i=c(44);const b=e=>{const t=Object(i.a)();e=e||t;const c=Object(o.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:s}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[c,Object(r.useCallback)(t=>{s(e,t)},[e,s])]},d=(e,t,c)=>{const s=Object(i.a)();c=c||s;const a=Object(o.useSelect)(o=>o(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(c,e,t),[c,e]),{setQueryValue:l}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[a,Object(r.useCallback)(t=>{l(c,e,t)},[c,e,l])]},f=(e,t)=>{const c=Object(i.a)();t=t||c;const[n,o]=b(t),s=Object(l.a)(n),d=Object(l.a)(e),f=Object(u.a)(d),p=Object(r.useRef)(!1);return Object(r.useEffect)(()=>{a()(f,d)||(o(Object.assign({},s,d)),p.current=!0)},[s,d,f,o]),p.current?[n,o]:[e,o]}},7:function(e,t){e.exports=window.wp.data},8:function(e,t){e.exports=window.lodash},9:function(e,t){e.exports=window.wc.wcBlocksData},96:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e}});