← Back
Editing: product-query.js
(()=>{var e,t,o,r={21601:(e,t,o)=>{"use strict";const r=window.wp.hooks,c=window.wp.components;var s=o(27723),n=o(79401);const a=window.wp.blocks;function i(e,{blockDescription:t,blockIcon:o,blockTitle:r,variationName:c,scope:s}){(0,a.registerBlockVariation)(e,{description:t,name:c,title:r,isActive:e=>e.__woocommerceNamespace===c,icon:{src:o},attributes:{__woocommerceNamespace:c},scope:s})}var l=o(10790);const d="core/post-title",m="woocommerce/product-query/product-title";i(d,{blockDescription:(0,s.__)("Display the title of a product.","woocommerce"),blockIcon:(0,l.jsx)(c.Icon,{icon:n.A}),blockTitle:(0,s.__)("Product Title","woocommerce"),variationName:m,scope:["block"]});var u=o(73448),p=o(11789);const h=(0,s.__)("Product Summary","woocommerce"),g=(p.A,u.A,"core/post-excerpt");i(g,{blockDescription:(0,s.__)("Display a short description about a product.","woocommerce"),blockIcon:(0,l.jsx)(c.Icon,{icon:u.A}),blockTitle:h,variationName:"woocommerce/product-query/product-summary",scope:[]});var _=o(2937);const w="core/post-template",b="woocommerce/product-query/product-template";i(w,{blockDescription:(0,s.__)("Contains the block elements used to render a product, like its name, featured image, rating, and more.","woocommerce"),blockIcon:(0,l.jsx)(c.Icon,{icon:_.A}),blockTitle:(0,s.__)("Product template","woocommerce"),variationName:b,scope:["block","inserter"]});const y=window.wp.blockEditor,f=window.wp.data,k=window.wc.wcTypes;var x=o(86087);const S=window.wc.wcSettings,v=e=>"core/query"===e.name&&"woocommerce/product-query"===e.attributes.namespace,j=(e,t)=>{let o=[];return e.forEach(e=>{t(e)&&(o=[...o,e.clientId]),o=[...o,...j(e.innerBlocks,t)]}),o},C=(0,S.getSettingWithCoercion)("postTemplateHasSupportForGridView",!1,k.isBoolean);function A(e,t){const{[t]:o,...r}=e;return r}const N=JSON.parse('{"name":"woocommerce/product-collection"}');let T=function(e){return e.GRID="flex",e.STACK="list",e.CAROUSEL="carousel",e}({}),E=function(e){return e.FILL="fill",e.FIXED="fixed",e}({});N.name;const P=(0,S.getSetting)("stockStatusOptions",[]),I={query:{perPage:9,pages:0,offset:0,postType:"product",order:"asc",orderBy:"title",search:"",exclude:[],inherit:!1,taxQuery:{},isProductCollectionBlock:!0,featured:!1,woocommerceOnSale:!1,woocommerceStockStatus:(0,S.getSetting)("hideOutOfStockItems",!1)?Object.keys(A(P,"outofstock")):Object.keys(P),woocommerceAttributes:[],woocommerceHandPickedProducts:[],timeFrame:void 0,priceRange:void 0,filterable:!1,relatedBy:{categories:!0,tags:!0}},tagName:"div",displayLayout:{type:T.GRID,columns:3,shrinkColumns:!0},dimensions:{widthType:E.FILL},queryContextIncludes:["collection"],forcePageReload:!1},O=({name:e,attributes:t})=>"core/post-template"===e&&"woocommerce/product-query/product-template"===t.__woocommerceNamespace,B=e=>"grid"===e?T.GRID:"default"===e?T.STACK:T.GRID,L=e=>e.map(e=>{const{name:t,attributes:o}=e,r=L(e.innerBlocks);return O(e)?((e,t)=>{const{__woocommerceNamespace:o,className:r,layout:c,...s}=e.attributes;return(0,a.createBlock)("woocommerce/product-template",s,t)})(e,r):(({name:e,attributes:t})=>"core/post-title"===e&&"woocommerce/product-query/product-title"===t.__woocommerceNamespace)(e)?((e,t)=>{const{__woocommerceNamespace:o,...r}=e.attributes;return(0,a.createBlock)("core/post-title",{__woocommerceNamespace:"woocommerce/product-collection/product-title",...r},t)})(e,r):(({name:e,attributes:t})=>"core/post-excerpt"===e&&"woocommerce/product-query/product-summary"===t.__woocommerceNamespace)(e)?((e,t)=>{const{__woocommerceNamespace:o,...r}=e.attributes;return(0,a.createBlock)("core/post-excerpt",{__woocommerceNamespace:"woocommerce/product-collection/product-summary",...r},t)})(e,r):(0,a.createBlock)(t,o,r)}),R=e=>{const t=(0,f.select)("core/block-editor").getBlock(e),o=(e=>{const t=(0,f.select)("core/block-editor").getBlockRootClientId(e)||void 0;return(0,f.select)("core/block-editor").canInsertBlockType("woocommerce/product-collection",t)})(e);if(t&&o){const{attributes:o={},innerBlocks:r=[]}=t,c=((e,t)=>{const o=t.find(O),{layout:r}=o?.attributes||{};return C?(e=>{if(void 0===e)return I.displayLayout;const{type:t,columnCount:o}=e;return{type:B(t),columns:o}})(r):e.displayLayout})(o,r),s=(e=>{const{query:t,namespace:o,...r}=e,{__woocommerceAttributes:c,__woocommerceStockStatus:s,__woocommerceOnSale:n,include:a,...i}=t;return{...r,query:{woocommerceAttributes:c,woocommerceStockStatus:s,woocommerceOnSale:n,woocommerceHandPickedProducts:a,taxQuery:{},isProductCollectionBlock:!0,...i},convertedFromProducts:!0}})({...o,displayLayout:c}),n=L(r),i=(0,a.createBlock)("woocommerce/product-collection",s,n);return(0,f.dispatch)("core/block-editor").replaceBlock(e,i),!0}return!1},q=()=>{(()=>{if(0===(0,f.select)("core/block-editor").getGlobalBlockCount("core/query"))return;const e=(t=(0,f.select)("core/block-editor").getBlocks(),j(t,v));var t;0!==e.length&&(e=>{const t=e.map(R);t.length&&t.every(e=>!!e)})(e)})()},F="core/editor",M="woocommerce/product-query",$="core/query",D=["attributes","presets","productSelector","onSale","stockStatus","wooInherit"],V=["taxQuery","search",...D],G=(0,S.getSetting)("stockStatusOptions",[]),z={allowedControls:V,displayLayout:{type:"flex",columns:3},query:{perPage:9,pages:0,offset:0,postType:"product",order:"asc",orderBy:"title",author:"",search:"",exclude:[],sticky:"",inherit:!1,__woocommerceAttributes:[],__woocommerceStockStatus:(0,S.getSetting)("hideOutOfStockItems",!1)?Object.keys(A(G,"outofstock")):Object.keys(G)}},H=[["core/post-template",{__woocommerceNamespace:b,className:"products-block-post-template",...(0,S.getSettingWithCoercion)("postTemplateHasSupportForGridView",!1,k.isBoolean)&&{layout:{type:"grid",columnCount:3}}},[["woocommerce/product-image",{style:{dimensions:{aspectRatio:"1/1"}}}],["core/post-title",{textAlign:"center",level:3,fontSize:"medium",style:{spacing:{margin:{bottom:"0.75rem",top:"0"}}},isLink:!0,__woocommerceNamespace:m}],["woocommerce/product-price",{textAlign:"center",fontSize:"small"}],["woocommerce/product-button",{textAlign:"center",fontSize:"small"}]]],["core/query-pagination",{layout:{type:"flex",justifyContent:"center"}}],["core/query-no-results"]];let U=function(e){return e.PRODUCT_QUERY="woocommerce/product-query",e.RELATED_PRODUCTS="woocommerce/related-products",e}({});function W(e,t){const{query:o}=e.attributes;e.setAttributes({query:{...o,...t}})}var Q=o(4921);function J(e,t,o){const r=new Set(t.map(e=>e[o]));return e.filter(e=>!r.has(e[o]))}const K=window.wp.htmlEntities,Z={clear:(0,s.__)("Clear all selected items","woocommerce"),noItems:(0,s.__)("No items found.","woocommerce"), /* Translators: %s search term */ noResults:(0,s.__)("No results for %s","woocommerce"),search:(0,s.__)("Search for items","woocommerce"),selected:e=>(0,s.sprintf)(/* translators: Number of items selected from list. */ /* translators: Number of items selected from list. */ (0,s._n)("%d item selected","%d items selected",e,"woocommerce"),e),updated:(0,s.__)("Search results updated.","woocommerce")},X=(e,t)=>null!==t&&(e.id===t||!!(Array.isArray(e.children)&&e.children.length>0)&&e.children.some(e=>X(e,t))),Y=(e,t=e)=>{const o=e.reduce((e,t)=>{const o=t.parent||0;return e[o]||(e[o]=[]),e[o].push(t),e},{}),r=t.reduce((e,t)=>(e[String(t.id)]=t,e),{});const c=["0"],s=(e={})=>e.parent?[...s(r[e.parent]),e.name]:e.name?[e.name]:[],n=e=>e.map(e=>{const t=o[e.id];return c.push(""+e.id),{...e,breadcrumbs:s(r[e.parent]),children:t&&t.length?n(t):[]}}),a=n(o[0]||[]);return Object.entries(o).forEach(([e,t])=>{c.includes(e)||a.push(...n(t||[]))}),a},ee=(e,t)=>{if(!t)return e;const o=new RegExp(`(${t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")})`,"ig");return e.split(o).map((e,t)=>o.test(e)?(0,l.jsx)("strong",{children:e},t):(0,l.jsx)(x.Fragment,{children:e},t))},te=e=>{const t=e.children?.map(e=>[e,...te(e)]);return t?t.flat():[]},oe=(e,t)=>te(e).some(e=>t.find(t=>t.id===e.id)),re=(e,t)=>te(e).every(e=>t.find(t=>t.id===e.id)),ce=({label:e})=>(0,l.jsx)("span",{className:"woocommerce-search-list__item-count",children:e}),se=e=>{const{item:t,search:o}=e,r=t.breadcrumbs&&t.breadcrumbs.length;return(0,l.jsxs)("span",{className:"woocommerce-search-list__item-label",children:[r?(0,l.jsx)("span",{className:"woocommerce-search-list__item-prefix",children:(c=t.breadcrumbs,1===c.length?c.slice(0,1).toString():2===c.length?c.slice(0,1).toString()+" › "+c.slice(-1).toString():c.slice(0,1).toString()+" … "+c.slice(-1).toString())}):null,(0,l.jsx)("span",{className:"woocommerce-search-list__item-name",children:ee((0,K.decodeEntities)(t.name),o)})]});var c},ne=({countLabel:e,className:t,depth:o=0,controlId:r="",disabled:s=!1,item:n,isSelected:a,isSelectable:i=!0,isSingle:d,onSelect:m,search:u="",selected:p,useExpandedPanelId:h,...g})=>{const[_,w]=h,b=null!=e&&void 0!==n.count&&null!==n.count,y=!!n.breadcrumbs?.length,f=!!n.children?.length,k=X(n,_),S=(0,Q.A)(["woocommerce-search-list__item",`depth-${o}`,t],{"has-breadcrumbs":y,"has-children":f,"has-count":b,"is-expanded":k,"is-radio-button":d}),v=g.name||`search-list-item-${r}`,j=`${v}-${n.id}`,C=(0,x.useCallback)(()=>{k||"number"!=typeof n.id&&"string"!=typeof n.id?!n.parent||"number"!=typeof n.parent&&"string"!=typeof n.parent?w(null):w(n.parent):w(n.id)},[k,n.id,n.parent,w]),A=(a||!i)&&re(n,p);return f?(0,l.jsx)("div",{className:S,onClick:C,onKeyDown:e=>"Enter"===e.key||" "===e.key?C():null,role:"treeitem",tabIndex:0,children:d?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("input",{type:"radio",id:j,name:v,value:n.value,onChange:()=>{m(n)(),k||w(n.id)},onClick:e=>e.stopPropagation(),checked:a,disabled:s,className:"woocommerce-search-list__item-input",...g}),(0,l.jsx)(se,{item:n,search:u}),b?(0,l.jsx)(ce,{label:e||n.count}):null]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.CheckboxControl,{className:"woocommerce-search-list__item-input",checked:A,disabled:s,indeterminate:!A&&(a||oe(n,p)),label:ee((0,K.decodeEntities)(n.name),u),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),onChange:()=>{const e=te(n),t=i?[n,...e]:[...e],o=re(n,p);i&&a||!i&&o?m(J(p,t,"id"))():(m(function(e,t){const o=J(t,e,"id");return[...e,...o]}(p,t))(),k||w(n.id))},__nextHasNoMarginBottom:!0}),b?(0,l.jsx)(ce,{label:e||n.count}):null]})}):(0,l.jsxs)("div",{className:S,onClick:s?void 0:m(n),children:[d?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("input",{...g,type:"radio",id:j,name:v,value:n.value,onChange:m(n),checked:a,disabled:s,className:"woocommerce-search-list__item-input",onClick:e=>e.stopPropagation()}),(0,l.jsx)("label",{htmlFor:j,children:(0,l.jsx)(se,{item:n,search:u})})]}):(0,l.jsx)(c.CheckboxControl,{...g,id:j,name:v,className:"woocommerce-search-list__item-input",value:(0,K.decodeEntities)(n.value),label:ee((0,K.decodeEntities)(n.name),u),onChange:()=>{m(n)(),k||w(n.id)},checked:a,disabled:s,__nextHasNoMarginBottom:!0,onClick:e=>e.stopPropagation()}),b?(0,l.jsx)(ce,{label:e||n.count}):null]})},ae=ne;var ie=o(74515),le=o(29491),de=o(13739);o(75022);const me=({id:e,label:t,popoverContents:o,remove:r,screenReaderLabel:n,className:a=""})=>{const[i,d]=(0,x.useState)(!1),m=(0,le.useInstanceId)(me);if(n=n||t,!t)return null;t=(0,K.decodeEntities)(t);const u=(0,Q.A)("woocommerce-tag",a,{"has-remove":!!r}),h=`woocommerce-tag__label-${m}`,g=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"screen-reader-text",children:n}),(0,l.jsx)("span",{"aria-hidden":"true",children:t})]});return(0,l.jsxs)("span",{className:u,children:[o?(0,l.jsx)(c.Button,{className:"woocommerce-tag__text",id:h,onClick:()=>d(!0),children:g}):(0,l.jsx)("span",{className:"woocommerce-tag__text",id:h,children:g}),o&&i&&(0,l.jsx)(c.Popover,{onClose:()=>d(!1),children:o}),r&&(0,l.jsx)(c.Button,{className:"woocommerce-tag__remove",onClick:r(e),label:(0,s.sprintf)( // Translators: %s label. // Translators: %s label. (0,s.__)("Remove %s","woocommerce"),t),"aria-describedby":h,children:(0,l.jsx)(p.A,{icon:de.A,size:20,className:"clear-icon",role:"img"})})]})},ue=me;o(71939);const pe=e=>(0,l.jsx)(ae,{...e}),he=e=>{const{list:t,selected:o,renderItem:r,depth:c=0,loadMoreChildrenText:n,onLoadMoreChildren:a,totalChildren:i,onSelect:d,instanceId:m,isSingle:u,search:p,useExpandedPanelId:h}=e,[g]=h;return t?(0,l.jsx)(l.Fragment,{children:t.map(t=>{const _=t.children?.length??0,w=!!o.find(({id:e})=>e===t.id),b=X(t,g),y=i?.[t.id],f="number"==typeof y&&_<y;return(0,l.jsxs)(x.Fragment,{children:[(0,l.jsx)("li",{children:r({item:t,isSelected:w,onSelect:d,isSingle:u,selected:o,search:p,depth:c,useExpandedPanelId:h,controlId:m})}),b?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(he,{...e,list:t.children,depth:c+1}),a&&f?(0,l.jsx)("li",{children:(0,l.jsx)("button",{type:"button",className:"woocommerce-search-list__item woocommerce-search-list__item-load-more",onClick:()=>a(),children:n||(0,s.__)("Load more","woocommerce")})}):null]}):null]},t.id)})}):null},ge=({isLoading:e,isSingle:t,selected:o,messages:r,onChange:n,onRemove:a})=>{if(e||t||!o)return null;const i=o.length;return(0,l.jsxs)("div",{className:"woocommerce-search-list__selected",children:[(0,l.jsxs)("div",{className:"woocommerce-search-list__selected-header",children:[(0,l.jsx)("strong",{children:r.selected(i)}),i>0?(0,l.jsx)(c.Button,{variant:"link",isDestructive:!0,onClick:()=>n([]),"aria-label":r.clear,children:(0,s.__)("Clear all","woocommerce")}):null]}),i>0?(0,l.jsx)("ul",{children:o.map((e,t)=>(0,l.jsx)("li",{children:(0,l.jsx)(ue,{label:e.name,id:e.id,remove:a})},t))}):null]})},_e=({filteredList:e,search:t,onSelect:o,instanceId:r,useExpandedPanelId:c,...n})=>{const{messages:a,renderItem:i,selected:d,isSingle:m,loadMoreChildrenText:u,onLoadMoreChildren:h,totalChildren:g}=n,_=i||pe;return 0===e.length?(0,l.jsxs)("div",{className:"woocommerce-search-list__list is-not-found",children:[(0,l.jsx)("span",{className:"woocommerce-search-list__not-found-icon",children:(0,l.jsx)(p.A,{icon:ie.A,role:"img"})}),(0,l.jsx)("span",{className:"woocommerce-search-list__not-found-text",children:t?(0,s.sprintf)(a.noResults,t):a.noItems})]}):(0,l.jsx)("ul",{className:"woocommerce-search-list__list",children:(0,l.jsx)(he,{useExpandedPanelId:c,list:e,selected:d,renderItem:_,loadMoreChildrenText:u,onLoadMoreChildren:h,totalChildren:g,onSelect:o,instanceId:r,isSingle:m,search:t})})},we=e=>{const{className:t="",isCompact:o,isHierarchical:r,isLoading:n,isSingle:a,list:i,messages:d=Z,onChange:m,onSearch:u,selected:p,type:h="text",debouncedSpeak:g}=e,[_,w]=(0,x.useState)(""),b=(0,x.useState)(null),y=(0,le.useInstanceId)(we),f=(0,x.useMemo)(()=>({...Z,...d}),[d]),k=(0,x.useMemo)(()=>((e,t,o)=>{if(!t)return o?Y(e):e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),c=e.map(e=>!!r.test(e.name)&&e).filter(Boolean);return o?Y(c,e):c})(i,_,r),[i,_,r]);(0,x.useEffect)(()=>{g&&g(f.updated)},[g,f]),(0,x.useEffect)(()=>{"function"==typeof u&&u(_)},[_,u]);const S=(0,x.useCallback)(e=>()=>{a&&m([]);const t=p.findIndex(({id:t})=>t===e);m([...p.slice(0,t),...p.slice(t+1)])},[a,p,m]),v=(0,x.useCallback)(e=>()=>{Array.isArray(e)?m(e):-1===p.findIndex(({id:t})=>t===e.id)?m(a?[e]:[...p,e]):S(e.id)()},[a,S,m,p]),j=(0,x.useCallback)(e=>{const[t]=p.filter(t=>!e.find(e=>t.id===e.id));S(t.id)()},[S,p]);return(0,l.jsxs)("div",{className:(0,Q.A)("woocommerce-search-list",t,{"is-compact":o,"is-loading":n,"is-token":"token"===h}),children:["text"===h&&(0,l.jsx)(ge,{...e,onRemove:S,messages:f}),(0,l.jsx)("div",{className:"woocommerce-search-list__search",children:"text"===h?(0,l.jsx)(c.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:f.search,type:"search",value:_,onChange:e=>w(e)}):(0,l.jsx)(c.FormTokenField,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:n,label:f.search,onChange:j,onInputChange:e=>w(e),suggestions:[],__experimentalValidateInput:()=>!1,value:n?[(0,s.__)("Loading…","woocommerce")]:p.map(e=>({...e,value:e.name})),__experimentalShowHowTo:!1})}),n?(0,l.jsx)("div",{className:"woocommerce-search-list__list",children:(0,l.jsx)(c.Spinner,{})}):(0,l.jsx)(_e,{...e,search:_,filteredList:k,messages:f,onSelect:v,instanceId:y,useExpandedPanelId:b})]})},be=((0,c.withSpokenMessages)(we),window.wp.url),ye=window.wp.apiFetch;var fe=o.n(ye);const ke=(0,S.getSetting)("wcBlocksConfig",{pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),xe=(ke.pluginUrl,ke.pluginUrl,S.STORE_PAGES.shop,S.STORE_PAGES.checkout,S.STORE_PAGES.checkout,S.STORE_PAGES.privacy,S.STORE_PAGES.privacy,S.STORE_PAGES.terms,S.STORE_PAGES.terms,S.STORE_PAGES.cart,S.STORE_PAGES.cart,S.STORE_PAGES.myaccount?.permalink?S.STORE_PAGES.myaccount.permalink:(0,S.getSetting)("wpLoginUrl","/wp-login.php"),(0,S.getSetting)("localPickupEnabled",!1),(0,S.getSetting)("shippingMethodsExist",!1),(0,S.getSetting)("shippingEnabled",!0),(0,S.getSettingWithCoercion)("countries",{},k.isObject)),Se=(0,S.getSetting)("countryData",{}),ve={...Object.fromEntries(Object.keys(Se).filter(e=>!0===Se[e].allowBilling).map(e=>{const t=xe[e];return[e,(0,k.isString)(t)?t:""]})),...Object.fromEntries(Object.keys(Se).filter(e=>!0===Se[e].allowShipping).map(e=>{const t=xe[e];return[e,(0,k.isString)(t)?t:""]}))},je=(Object.fromEntries(Object.keys(ve).map(e=>[e,Se[e].states||{}])),Object.fromEntries(Object.keys(ve).map(e=>[e,Se[e].locale||{}])),{address:["first_name","last_name","company","address_1","address_2","city","postcode","country","state","phone"],contact:["email"],order:[]}),Ce=((0,S.getSetting)("addressFieldsLocations",je).address,(0,S.getSetting)("addressFieldsLocations",je).contact,(0,S.getSetting)("addressFieldsLocations",je).order,(0,S.getSetting)("additionalOrderFields",{}),(0,S.getSetting)("additionalContactFields",{}),(0,S.getSetting)("additionalAddressFields",{}),({selected:e=[],search:t="",queryArgs:o={}})=>{const r=(({selected:e=[],search:t="",queryArgs:o={}})=>{const r=ke.productCount>100&&e.length>0,c=[(0,be.addQueryArgs)("/wc/store/v1/products",{per_page:100,catalog_visibility:"any",search:t,orderby:"title",order:"asc",exclude:r?e:[],...o})];if(r){const t=Math.ceil(e.length/100);for(let o=1;o<=t;o++)c.push((0,be.addQueryArgs)("/wc/store/v1/products",{catalog_visibility:"any",include:e,per_page:100,page:o}))}return c})({selected:e,search:t,queryArgs:o});return Promise.all(r.map(e=>fe()({path:e}))).then(e=>[...new Map(e.flatMap(e=>e.map(e=>[e.id,{...e,parent:0}]))).values()])}),Ae=e=>fe()({path:`wc/store/v1/products/attributes/${e}/terms`});const Ne=window.wp.escapeHtml,Te=({message:e,type:t})=>e?"general"===t?(0,l.jsxs)("span",{children:[(0,s.__)("The following error was returned","woocommerce"),(0,l.jsx)("br",{}),(0,l.jsx)("code",{children:(0,Ne.escapeHTML)(e)})]}):"api"===t?(0,l.jsxs)("span",{children:[(0,s.__)("The following error was returned from the API","woocommerce"),(0,l.jsx)("br",{}),(0,l.jsx)("code",{children:(0,Ne.escapeHTML)(e)})]}):e:(0,s.__)("An error has prevented the block from being updated.","woocommerce"),Ee=({error:e})=>(0,l.jsx)("div",{className:"wc-block-error-message",children:Te(e)});var Pe=o(51609);const Ie=({className:e,item:t,isSelected:o,isLoading:r,onSelect:s,disabled:n,...a})=>(0,l.jsxs)(l.Fragment,{children:[(0,Pe.createElement)(ne,{...a,key:t.id,...e&&{className:e},isSelected:o,item:t,onSelect:s,...n&&{disabled:n}}),o&&r&&(0,l.jsx)("div",{className:(0,Q.A)("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active"),children:(0,l.jsx)(c.Spinner,{})},"loading")]}),Oe=((0,S.getSetting)("attributes",[]).reduce((e,t)=>{const o=(r=t)&&r.attribute_name?{id:parseInt(r.attribute_id,10),name:r.attribute_name,taxonomy:"pa_"+r.attribute_name,label:r.attribute_label,orderby:r.attribute_orderby}:null;var r;return o&&o.id&&e.push(o),e},[]),e=>{const{count:t,id:o,name:r,parent:c}=e;return{count:t,id:o,name:r,parent:c,breadcrumbs:[],children:[],value:(0,k.isAttributeTerm)(e)?e.attr_slug:""}});o(12663);const Be=e=>({...Oe(e),id:-e.id,parent:0}),Le=(0,le.withInstanceId)(({onChange:e,onOperatorChange:t,instanceId:o,isCompact:r=!1,messages:n={},operator:a="any",selected:i,type:d="text"})=>{const{errorLoadingAttributes:m,isLoadingAttributes:u,productsAttributes:p}=function(e){const[t,o]=(0,x.useState)(null),[r,c]=(0,x.useState)(!1),[s,n]=(0,x.useState)([]),a=(0,x.useRef)(!1);return(0,x.useEffect)(()=>{if(e&&!r&&!a.current)return async function(){c(!0);try{const e=await fe()({path:"wc/store/v1/products/attributes"}),t=[];for(const o of e){const e=await Ae(o.id);t.push({...o,parent:0,terms:e.map(e=>({...e,attr_slug:o.taxonomy,parent:o.id}))})}n(t),a.current=!0}catch(e){e instanceof Error&&o(await(async e=>{if(!("json"in e))return{code:e.code||"",message:e.message,type:e.type||"general"};try{const t=await e.json();return{code:t.code||"",message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}})(e))}finally{c(!1)}}(),()=>{a.current=!0}},[r,e]),{errorLoadingAttributes:t,isLoadingAttributes:r,productsAttributes:s}}(!0),h=p.reduce((e,t)=>{const{terms:o,...r}=t;return[...e,Be(r),...o.map(e=>((e,t)=>({...Oe(e),parent:-t}))(e,r.id))]},[]);return n={clear:(0,s.__)("Clear all product attributes","woocommerce"),noItems:(0,s.__)("Your store doesn't have any product attributes.","woocommerce"),search:(0,s.__)("Search for product attributes","woocommerce"),selected:e=>(0,s.sprintf)(/* translators: %d is the count of attributes selected. */ /* translators: %d is the count of attributes selected. */ (0,s._n)("%d attribute selected","%d attributes selected",e,"woocommerce"),e),updated:(0,s.__)("Product attribute search results updated.","woocommerce"),...n},m?(0,l.jsx)(Ee,{error:m}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(we,{className:"woocommerce-product-attributes",isCompact:r,isHierarchical:!0,isLoading:u,isSingle:!1,list:h,messages:n,onChange:e,renderItem:e=>{const{item:t,search:r,depth:c=0}=e,n=t.count||0,a=["woocommerce-product-attributes__item","woocommerce-search-list__item",{"is-searching":r.length>0,"is-skip-level":0===c&&0!==t.parent}];if(!t.breadcrumbs.length)return(0,l.jsx)(Ie,{...e,className:(0,Q.A)(a),item:t,isLoading:u,isSelectable:!1,disabled:0===t.count,name:`attributes-${o}`,countLabel:(0,s.sprintf)(/* translators: %d is the count of terms. */ /* translators: %d is the count of terms. */ (0,s._n)("%d term","%d terms",n,"woocommerce"),n),"aria-label":(0,s.sprintf)(/* translators: %1$s is the item name, %2$d is the count of terms for the item. */ /* translators: %1$s is the item name, %2$d is the count of terms for the item. */ (0,s._n)("%1$s, has %2$d term","%1$s, has %2$d terms",n,"woocommerce"),t.name,n)});const i=`${t.breadcrumbs[0]}: ${t.name}`;return(0,l.jsx)(ne,{...e,name:`terms-${o}`,className:(0,Q.A)(...a,"has-count"),countLabel:(0,s.sprintf)(/* translators: %d is the count of products. */ /* translators: %d is the count of products. */ (0,s._n)("%d product","%d products",n,"woocommerce"),n),"aria-label":(0,s.sprintf)(/* translators: %1$s is the attribute name, %2$d is the count of products for that attribute. */ /* translators: %1$s is the attribute name, %2$d is the count of products for that attribute. */ (0,s._n)("%1$s, has %2$d product","%1$s, has %2$d products",n,"woocommerce"),i,n)})},selected:i.map(({id:e})=>h.find(t=>t.id===e)).filter(Boolean),type:d}),!!t&&(0,l.jsx)("div",{hidden:i.length<2,children:(0,l.jsx)(c.SelectControl,{className:"woocommerce-product-attributes__operator",label:(0,s.__)("Display products matching","woocommerce"),help:(0,s.__)("Pick at least two attributes to use this setting.","woocommerce"),value:a,onChange:t,options:[{label:(0,s.__)("Any selected attributes","woocommerce"),value:"any"},{label:(0,s.__)("All selected attributes","woocommerce"),value:"all"}]})})]})}),Re=[{key:"title/asc",name:(0,s.__)("Sorted by title","woocommerce")},{key:"date/desc",name:(0,s.__)("Newest","woocommerce")},{key:"popularity/desc",name:(0,s.__)("Best Selling","woocommerce")},{key:"rating/desc",name:(0,s.__)("Top Rated","woocommerce")}];function qe(e){const{query:t}=e.attributes;return(0,l.jsxs)(c.PanelBody,{className:"woocommerce-product-query-panel__sort",title:(0,s.__)("Popular Filters","woocommerce"),initialOpen:!0,children:[(0,l.jsx)("p",{children:(0,s.__)("Arrange products by popular pre-sets.","woocommerce")}),(0,l.jsx)(c.CustomSelectControl,{hideLabelFromVision:!0,label:(0,s.__)("Choose among these pre-sets","woocommerce"),onChange:t=>{if(!t.selectedItem?.key)return;const[o,r]=t.selectedItem?.key?.split("/");W(e,{order:r,orderBy:o})},options:Re,value:Re.find(e=>e.key===`${t.orderBy}/${t.order}`)})]})}var Fe=o(51512),Me=o.n(Fe);Me()("wc-admin:tracks:stats");const $e=Me()("wc-admin:tracks");function De({children:e,className:t,actionLabel:o,onActionClick:r,status:s="info",...n}){return(0,l.jsx)(c.Notice,{...n,status:s,politeness:"polite",className:(0,Q.$)("wc-block-editor-components-upgrade-downgrade-notice",t),actions:[{label:o,onClick:r,noDefaultClasses:!0,variant:"link"}],children:(0,l.jsx)("div",{className:"wc-block-editor-components-upgrade-downgrade-notice__text",children:e})})}o(49969);const Ve=e=>{const t=(0,x.createInterpolateElement)((0,s.__)("Upgrade all Products blocks on this page to <strongText /> for more features!","woocommerce"),{strongText:(0,l.jsx)("strong",{children:(0,s.__)("Product Collection","woocommerce")})}),o=(0,s.__)("Upgrade to Product Collection","woocommerce");return(0,l.jsx)(De,{isDismissible:!1,actionLabel:o,onActionClick:()=>{e.upgradeBlock(),function(e,t){if($e("recordevent %s %o","wcadmin_"+e,t,{_tqk:window._tkq,shouldRecord:!!window._tkq&&!!window.wcTracks&&!!window.wcTracks.isEnabled}),!window.wcTracks||"function"!=typeof window.wcTracks.recordEvent)return!1;window.wcTracks.recordEvent(e,t)}("blocks_product_collection_migration_between_products_beta",{transform_to:"product_collection"})},children:t})};o(61404);const Ge=D.map(e=>`__woocommerce${e[0].toUpperCase()}${e.slice(1)}`);function ze(e){const t="string"==typeof e?e:e.value;return Object.entries(G).find(([,e])=>e===t)?.[0]}const He={attributes:e=>{const{query:t}=e.attributes,[o,r]=(0,x.useState)([]);return(0,x.useEffect)(()=>{t.__woocommerceAttributes&&r(t.__woocommerceAttributes.map(({termId:e})=>({id:e})))},[t.__woocommerceAttributes]),(0,l.jsxs)(c.__experimentalToolsPanelItem,{label:(0,s.__)("Product Attributes","woocommerce"),hasValue:()=>t.__woocommerceAttributes?.length,children:[(0,l.jsx)(Le,{messages:{search:(0,s.__)("Attributes","woocommerce")},selected:o,onChange:t=>{const o=t.map(({id:e,value:t})=>({termId:e,taxonomy:t}));W(e,{__woocommerceAttributes:o})},operator:"any",isCompact:!0,type:"token"}),(0,l.jsx)(c.ExternalLink,{className:"woocommerce-product-query-panel__external-link",href:"/wp-admin/edit.php?post_type=product&page=product_attributes",children:(0,s.__)("Manage attributes","woocommerce")})]})},onSale:e=>{const{query:t}=e.attributes;return(0,l.jsx)(c.__experimentalToolsPanelItem,{label:(0,s.__)("Sale status","woocommerce"),hasValue:()=>t.__woocommerceOnSale,children:(0,l.jsx)(c.ToggleControl,{label:(0,s.__)("Show only products on sale","woocommerce"),checked:t.__woocommerceOnSale||!1,onChange:t=>{W(e,{__woocommerceOnSale:t})}})})},productSelector:e=>{const{query:t}=e.attributes,o=function(){const[e,t]=(0,x.useState)([]);return(0,x.useEffect)(()=>{Ce({selected:[]}).then(e=>{t(e)})},[]),e}();return(0,l.jsx)(c.__experimentalToolsPanelItem,{label:(0,s.__)("Hand-picked Products","woocommerce"),hasValue:()=>t.include?.length,children:(0,l.jsx)(c.FormTokenField,{disabled:!o.length,displayTransform:e=>Number.isNaN(Number(e))?e:o.find(t=>t.id===Number(e))?.name||"",label:(0,s.__)("Pick some products","woocommerce"),onChange:t=>{const r=t.map(e=>o.find(t=>t.name===e||t.id===Number(e))?.id).filter(Boolean).map(String);if(!r.length&&e.attributes.query.include){const t=A(e.attributes.query,"include");W({...e,attributes:{...e.attributes,query:t}},{})}else W(e,{include:r})},suggestions:o.map(e=>e.name),validateInput:e=>o.find(t=>t.name===e),value:o.length?t?.include||[]:[(0,s.__)("Loading…","woocommerce")],__experimentalExpandOnFocus:!0})})},stockStatus:e=>{const{query:t}=e.attributes;return(0,l.jsx)(c.__experimentalToolsPanelItem,{label:(0,s.__)("Stock status","woocommerce"),hasValue:()=>t.__woocommerceStockStatus,children:(0,l.jsx)(c.FormTokenField,{label:(0,s.__)("Stock status","woocommerce"),onChange:t=>{const o=t.map(ze).filter(Boolean);W(e,{__woocommerceStockStatus:o})},suggestions:Object.values(G),validateInput:e=>Object.values(G).includes(e),value:t?.__woocommerceStockStatus?.map(e=>G[e])||[],__experimentalExpandOnFocus:!0})})},wooInherit:e=>{const t=function(e,t){const o=(0,x.useRef)();return(0,x.useEffect)(()=>{o.current===e||t&&!t(e,o.current)||(o.current=e)},[e,t]),o.current}(e.attributes.query,e=>!1===e.inherit);return(0,l.jsx)(c.ToggleControl,{className:"woo-inherit-query-toggle",label:(0,s.__)("Inherit query from template","woocommerce"),help:(0,s.__)("Toggle to use the global query context that is set with the current template, such as variations of the product catalog or search. Disable to customize the filtering independently.","woocommerce"),checked:e.attributes.query.inherit||!1,onChange:o=>{const r={inherit:o};o&&(r.perPage=(0,S.getSettingWithCoercion)("loopShopPerPage",12,k.isNumber)),W(e,{...e.defaultWooQueryParams,...r,...!1===o&&{...t}})}})}},Ue=e=>{const t=function(e){const t=(0,f.useSelect)(t=>t(a.store).getActiveBlockVariation($,e)?.allowedControls,[e]);return Array.isArray(t)?(()=>{const e=(0,f.select)(F),t=e?.getCurrentPostType?.();return"wp_template"===t||"wp_template_part"===t})()?function(e){return e.query.inherit}(e)?t.filter(e=>"wooInherit"===e):t:t.filter(e=>"wooInherit"!==e):[]}(e.attributes),o=function(e){const t=(0,f.useSelect)(t=>t("core/blocks").getBlockVariations($).find(t=>t.name===e)?.attributes);return t?Object.assign({},...Ge.map(e=>({[e]:t.query[e]}))):{}}(e.attributes.namespace),r=!((n=e).name===$&&n.attributes.namespace===U.RELATED_PRODUCTS);var n;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.InspectorControls,{children:[r&&(0,l.jsx)(Ve,{upgradeBlock:q}),t?.includes("presets")&&(0,l.jsx)(qe,{...e}),r&&(0,l.jsx)(c.__experimentalToolsPanel,{className:"woocommerce-product-query-toolspanel",label:(0,s.__)("Advanced Filters","woocommerce"),resetAll:()=>{W(e,o)},children:Object.entries(He).map(([r,c])=>t?.includes(r)?(0,Pe.createElement)(c,{...e,defaultWooQueryParams:o,key:r}):null)})]})})};(0,r.addFilter)("editor.BlockEdit",$,e=>t=>{return(o=t).name===$&&Object.values(U).includes(o.attributes.namespace)?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{...t}),(0,l.jsx)(e,{...t})]}):(0,l.jsx)(e,{...t});var o}),o(48286);var We=o(5573);const Qe=(0,l.jsx)(We.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.5 19.375L4.5 7.625C4.5 7.55596 4.55596 7.5 4.625 7.5L16.375 7.5C16.444 7.5 16.5 7.55596 16.5 7.625L16.5 19.375C16.5 19.444 16.444 19.5 16.375 19.5L4.625 19.5C4.55596 19.5 4.5 19.444 4.5 19.375ZM4.625 21C3.72754 21 3 20.2725 3 19.375L3 7.625C3 6.72754 3.72754 6 4.625 6L16.375 6C17.2725 6 18 6.72754 18 7.625L18 19.375C18 20.2725 17.2725 21 16.375 21L4.625 21ZM19 3.75L8 3.75L8 2.25L19 2.25C20.5183 2.25 21.75 3.4796 21.75 4.99891L21.75 18L20.25 18L20.25 4.99891C20.25 4.30909 19.6909 3.75 19 3.75Z"})});(0,a.registerBlockVariation)($,{description:(0,s.__)("A block that displays a selection of products in your store.","woocommerce"),name:M, /* translators: "Products" is the name of the block. */ title:(0,s.__)("Products (Deprecated)","woocommerce"),isActive:e=>e.namespace===M,icon:(0,l.jsx)(c.Icon,{icon:Qe,className:"wc-block-editor-components-block-icon wc-block-editor-components-block-icon--stacks"}),attributes:{...z,namespace:M},allowedControls:V,innerBlocks:H,scope:[]});class Je{blocks=new Map;initialized=!1;attemptedRegisteredBlocks=new Set;constructor(){this.initializeSubscriptions()}static getInstance(){return Je.instance||(Je.instance=new Je),Je.instance}initializeSubscriptions(){if(this.initialized)return;const e=(0,f.subscribe)(()=>{const t=(0,f.select)(F);if(!t)return;const o=t.getCurrentPostType();if(o)if("post"===o||"page"===o)e(),this.blocks.forEach(e=>{if(e.isAvailableOnPostEditor){const t=e.variationName||e.metadata.name;this.hasAttemptedRegistration(t)||this.registerBlock(e)}}),this.initialized=!0;else{e();const o=String(t.getEditedPostSlug());this.currentTemplateId=o,this.handleTemplateChange(void 0),(0,f.subscribe)(()=>{const e=this.currentTemplateId;this.currentTemplateId=String(t.getEditedPostSlug()),e!==this.currentTemplateId&&this.handleTemplateChange(e)},F),this.initialized=!0}})}handleTemplateChange(e){(this.currentTemplateId?.includes("single-product")||e?.includes("single-product"))&&this.blocks.forEach(e=>{this.unregisterBlock(e),this.registerBlock(e)})}hasAttemptedRegistration(e){return this.attemptedRegisteredBlocks.has(e)}unregisterBlock(e){const{metadata:t,isVariationBlock:o,variationName:r}=e;try{o&&r?((0,a.unregisterBlockVariation)(t.name,r),this.attemptedRegisteredBlocks.delete(r)):((0,a.unregisterBlockType)(t.name),this.attemptedRegisteredBlocks.delete(t.name))}catch(e){console.debug(`Failed to unregister block ${t.name}:`,e)}}registerBlock(e){const{metadata:t,isVariationBlock:o,variationName:r,isAvailableOnPostEditor:c}=e;try{const s=r||t.name;if(this.hasAttemptedRegistration(s))return;const n=(0,f.select)("core/edit-site");if(!n&&!c)return;if(o)(0,a.registerBlockVariation)(t.name,{...t,name:r||t.name});else{const o=(0,k.isEmpty)(t?.ancestor)?["woocommerce/single-product"]:t?.ancestor,r=n&&this.currentTemplateId?.includes("single-product"),{title:c,description:i,keywords:l,styles:d,variations:m,...u}=t,p=(0,a.registerBlockType)(t,{...u,ancestor:r?void 0:o});this.blocks.set(s,{...e,metadata:{...t,title:p?.title??t.title,description:p?.description??t.description}})}this.attemptedRegisteredBlocks.add(s)}catch(e){console.error(`Failed to register block ${t.name}:`,e)}}registerBlockConfig(e){const t=e.variationName||e.metadata.name;this.blocks.set(t,e),this.registerBlock(e)}}const Ke="woocommerce/related-products",Ze={namespace:Ke,allowedControls:[],displayLayout:{type:"flex",columns:5},query:{perPage:5,pages:0,offset:0,postType:"product",order:"asc",orderBy:"title",author:"",search:"",exclude:[],sticky:"",inherit:!1},lock:{remove:!0,move:!0}},Xe=(0,S.getSettingWithCoercion)("postTemplateHasSupportForGridView",!1,k.isBoolean),Ye=[["core/heading",{level:2,content:(0,s.__)("Related products","woocommerce"),style:{spacing:{margin:{top:"1rem",bottom:"1rem"}}}}],["core/post-template",{__woocommerceNamespace:b,...Xe&&{layout:{type:"grid",columnCount:5}}},[["woocommerce/product-image",{productId:0,style:{dimensions:{aspectRatio:"1/1"}}}],["core/post-title",{textAlign:"center",level:3,fontSize:"medium",isLink:!0,__woocommerceNamespace:m},[]],["woocommerce/product-price",{textAlign:"center",fontSize:"small",style:{spacing:{margin:{bottom:"1rem"}}}},[]],["woocommerce/product-button",{textAlign:"center",fontSize:"small",style:{spacing:{margin:{bottom:"1rem"}}}},[]]]]];((e,t)=>{if(!(e=>"string"==typeof e?.name)(e))return void console.error("registerProductBlockType: Block name is required for registration");const o={metadata:e,isVariationBlock:t?.isVariationBlock??!1,variationName:t?.variationName??void 0,isAvailableOnPostEditor:t?.isAvailableOnPostEditor??!1};Je.getInstance().registerBlockConfig(o)})({name:$,description:(0,s.__)("Display related products.","woocommerce"),title:(0,s.__)("Related Products Controls","woocommerce"),isActive:e=>e.namespace===Ke,icon:(0,l.jsx)(c.Icon,{icon:Qe,className:"wc-block-editor-components-block-icon wc-block-editor-components-block-icon--stacks"}),attributes:Ze,allowedControls:[],innerBlocks:Ye,scope:["block"]},{isVariationBlock:!0,variationName:Ke,isAvailableOnPostEditor:!1});const et=[g,w,d];(0,r.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",function(e,t){return et.includes(t)&&(e.attributes={...e.attributes,__woocommerceNamespace:{type:"string"}}),e})},61404:()=>{},48286:()=>{},12663:()=>{},71939:()=>{},75022:()=>{},49969:()=>{},51609:e=>{"use strict";e.exports=window.React},10790:e=>{"use strict";e.exports=window.ReactJSXRuntime},29491:e=>{"use strict";e.exports=window.wp.compose},86087:e=>{"use strict";e.exports=window.wp.element},27723:e=>{"use strict";e.exports=window.wp.i18n},5573:e=>{"use strict";e.exports=window.wp.primitives}},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var o=c[e]={exports:{}};return r[e](o,o.exports,s),o.exports}s.m=r,e=[],s.O=(t,o,r,c)=>{if(!o){var n=1/0;for(d=0;d<e.length;d++){for(var[o,r,c]=e[d],a=!0,i=0;i<o.length;i++)(!1&c||n>=c)&&Object.keys(s.O).every(e=>s.O[e](o[i]))?o.splice(i--,1):(a=!1,c<n&&(n=c));if(a){e.splice(d--,1);var l=r();void 0!==l&&(t=l)}}return t}c=c||0;for(var d=e.length;d>0&&e[d-1][2]>c;d--)e[d]=e[d-1];e[d]=[o,r,c]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var c=Object.create(null);s.r(c);var n={};t=t||[null,o({}),o([]),o(o)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=o(a))Object.getOwnPropertyNames(a).forEach(t=>n[t]=()=>e[t]);return n.default=()=>e,s.d(c,n),c},s.d=(e,t)=>{for(var o in t)s.o(t,o)&&!s.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.j=3315,(()=>{var e={3315:0};s.O.j=t=>0===e[t];var t=(t,o)=>{var r,c,[n,a,i]=o,l=0;if(n.some(t=>0!==e[t])){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);if(i)var d=i(s)}for(t&&t(o);l<n.length;l++)c=n[l],s.o(e,c)&&e[c]&&e[c][0](),e[c]=0;return s.O(d)},o=globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var n=s.O(void 0,[94],()=>s(21601));n=s.O(n),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["product-query"]=n})();
Save File
Cancel