HEX
Server: Apache
System: Linux host17.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
User: shrsglobal (7178)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /home/shrsglobal/www/wp-content/plugins/woocommerce/assets/client/blocks/product-new.js
(()=>{var e,t,o,r={7531:(e,t,o)=>{"use strict";var r=o(7723);const s=window.wp.blocks;var i=o(4530),c=o(5573),n=o(790);const l=(0,n.jsx)(c.SVG,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M10 11c-1.588-.479-4-.91-4-.91s2-.241 4-.454c1.8-.191 3.365-.502 4-3.181C14.635 3.775 15 1 15 1s.365 2.775 1 5.455c.635 2.679 2 2.969 4 3.181 2 .213 4 .455 4 .455s-2.412.43-4 .909c-1.588.479-3 1-4 4.546-.746 2.643-.893 4.948-1 5.454-.107-.506-.167-2.5-1-5.454C13 12 11.588 11.479 10 11zM7.333 3.5C6.803 3.333 6 3.182 6 3.182s.667-.085 1.333-.16c.6-.066 1.122-.175 1.334-1.113C8.878.971 9 0 9 0s.122.971.333 1.91c.212.937.667 1.038 1.334 1.113.666.074 1.333.159 1.333.159s-.804.15-1.333.318c-.53.167-1 .35-1.334 1.59C9.085 6.017 9.036 6.824 9 7c-.036-.177-.056-.875-.333-1.91-.334-1.24-.804-1.423-1.334-1.59zM2.444 18C1.474 17.713 0 17.454 0 17.454s1.222-.145 2.444-.272c1.1-.115 2.057-.302 2.445-1.91C5.277 13.666 5.5 12 5.5 12s.223 1.665.611 3.273c.388 1.607 1.222 1.781 2.445 1.909 1.222.127 2.444.273 2.444.273s-1.474.258-2.444.545c-.971.287-1.834.6-2.445 2.727-.456 1.586-.546 2.97-.611 3.273-.065-.304-.102-1.5-.611-3.273C4.278 18.6 3.415 18.287 2.444 18z",fill:"currentColor"})}),a=window.wc.wcSettings,d={columns:{type:"number",default:(0,a.getSetting)("defaultColumns",3)},rows:{type:"number",default:(0,a.getSetting)("defaultRows",3)},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{image:!0,title:!0,price:!0,rating:!0,button:!0}},isPreview:{type:"boolean",default:!1},stockStatus:{type:"array",default:Object.keys((0,a.getSetting)("stockStatusOptions",[]))}},m=window.wp.blockEditor,h=window.wp.components,u=window.wp.serverSideRender;var x=o.n(u);const g=({onChange:e,settings:t})=>{const{image:o,button:s,price:i,rating:c,title:l}=t,a=!1!==o;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.ToggleControl,{label:(0,r.__)("Product image","woocommerce"),checked:a,onChange:()=>e({...t,image:!a})}),(0,n.jsx)(h.ToggleControl,{label:(0,r.__)("Product title","woocommerce"),checked:l,onChange:()=>e({...t,title:!l})}),(0,n.jsx)(h.ToggleControl,{label:(0,r.__)("Product price","woocommerce"),checked:i,onChange:()=>e({...t,price:!i})}),(0,n.jsx)(h.ToggleControl,{label:(0,r.__)("Product rating","woocommerce"),checked:c,onChange:()=>e({...t,rating:!c})}),(0,n.jsx)(h.ToggleControl,{label:(0,r.__)("Add to Cart button","woocommerce"),checked:s,onChange:()=>e({...t,button:!s})})]})},p=(e,t,o)=>o?Math.min(e,t)===e?t:Math.max(e,o)===e?o:e:Math.max(e,t)===t?e:t,w=({columns:e,rows:t,setAttributes:o,alignButtons:s,minColumns:i=1,maxColumns:c=6,minRows:l=1,maxRows:a=6})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Columns","woocommerce"),value:e,onChange:e=>{const t=p(e,i,c);o({columns:Number.isNaN(t)?"":t})},min:i,max:c}),(0,n.jsx)(h.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Rows","woocommerce"),value:t,onChange:e=>{const t=p(e,l,a);o({rows:Number.isNaN(t)?"":t})},min:l,max:a}),(0,n.jsx)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Align the last block to the bottom","woocommerce"),help:s?(0,r.__)("Align the last block to the bottom.","woocommerce"):(0,r.__)("The last inner block will follow other content.","woocommerce"),checked:s,onChange:()=>o({alignButtons:!s})})]});var f=o(4921),j=o(6087);function _(e,t,o){const r=new Set(t.map((e=>e[o])));return e.filter((e=>!r.has(e[o])))}const E=window.wp.htmlEntities,b={clear:(0,r.__)("Clear all selected items","woocommerce"),noItems:(0,r.__)("No items found.","woocommerce"),
/* Translators: %s search term */
noResults:(0,r.__)("No results for %s","woocommerce"),search:(0,r.__)("Search for items","woocommerce"),selected:e=>(0,r.sprintf)(/* translators: Number of items selected from list. */ /* translators: Number of items selected from list. */
(0,r._n)("%d item selected","%d items selected",e,"woocommerce"),e),updated:(0,r.__)("Search results updated.","woocommerce")},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 s=["0"],i=(e={})=>e.parent?[...i(r[e.parent]),e.name]:e.name?[e.name]:[],c=e=>e.map((e=>{const t=o[e.id];return s.push(""+e.id),{...e,breadcrumbs:i(r[e.parent]),children:t&&t.length?c(t):[]}})),n=c(o[0]||[]);return Object.entries(o).forEach((([e,t])=>{s.includes(e)||n.push(...c(t||[]))})),n},v=(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,n.jsx)("strong",{children:e},t):(0,n.jsx)(j.Fragment,{children:e},t)))},C=({label:e})=>(0,n.jsx)("span",{className:"woocommerce-search-list__item-count",children:e}),k=e=>{const{item:t,search:o}=e,r=t.breadcrumbs&&t.breadcrumbs.length;return(0,n.jsxs)("span",{className:"woocommerce-search-list__item-label",children:[r?(0,n.jsx)("span",{className:"woocommerce-search-list__item-prefix",children:(s=t.breadcrumbs,1===s.length?s.slice(0,1).toString():2===s.length?s.slice(0,1).toString()+" › "+s.slice(-1).toString():s.slice(0,1).toString()+" … "+s.slice(-1).toString())}):null,(0,n.jsx)("span",{className:"woocommerce-search-list__item-name",children:v((0,E.decodeEntities)(t.name),o)})]});var s},S=({countLabel:e,className:t,depth:o=0,controlId:r="",item:s,isSelected:i,isSingle:c,onSelect:l,search:a="",selected:d,useExpandedPanelId:m,...u})=>{const[x,g]=m,p=null!=e&&void 0!==s.count&&null!==s.count,w=!!s.breadcrumbs?.length,b=!!s.children?.length,y=x===s.id,S=(0,f.A)(["woocommerce-search-list__item",`depth-${o}`,t],{"has-breadcrumbs":w,"has-children":b,"has-count":p,"is-expanded":y,"is-radio-button":c});(0,j.useEffect)((()=>{b&&i&&g(s.id)}),[s,b,i,g]);const N=u.name||`search-list-item-${r}`,O=`${N}-${s.id}`,P=(0,j.useCallback)((()=>{g(y?-1:Number(s.id))}),[y,s.id,g]);return b?(0,n.jsx)("div",{className:S,onClick:P,onKeyDown:e=>"Enter"===e.key||" "===e.key?P():null,role:"treeitem",tabIndex:0,children:c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("input",{type:"radio",id:O,name:N,value:s.value,onChange:l(s),onClick:e=>e.stopPropagation(),checked:i,className:"woocommerce-search-list__item-input",...u}),(0,n.jsx)(k,{item:s,search:a}),p?(0,n.jsx)(C,{label:e||s.count}):null]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.CheckboxControl,{className:"woocommerce-search-list__item-input",checked:i,...!i&&s.children.some((e=>d.find((t=>t.id===e.id))))?{indeterminate:!0}:{},label:v((0,E.decodeEntities)(s.name),a),onChange:()=>{i?l(_(d,s.children,"id"))():l(function(e,t){const o=_(t,e,"id");return[...e,...o]}(d,s.children))()},onClick:e=>e.stopPropagation()}),p?(0,n.jsx)(C,{label:e||s.count}):null]})}):(0,n.jsxs)("label",{htmlFor:O,className:S,children:[c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("input",{...u,type:"radio",id:O,name:N,value:s.value,onChange:l(s),checked:i,className:"woocommerce-search-list__item-input"}),(0,n.jsx)(k,{item:s,search:a})]}):(0,n.jsx)(h.CheckboxControl,{...u,id:O,name:N,className:"woocommerce-search-list__item-input",value:(0,E.decodeEntities)(s.value),label:v((0,E.decodeEntities)(s.name),a),onChange:l(s),checked:i}),p?(0,n.jsx)(C,{label:e||s.count}):null]})},N=S;var O=o(2624),P=o(9491),I=o(3028);o(5022);const M=({id:e,label:t,popoverContents:o,remove:s,screenReaderLabel:c,className:l=""})=>{const[a,d]=(0,j.useState)(!1),m=(0,P.useInstanceId)(M);if(c=c||t,!t)return null;t=(0,E.decodeEntities)(t);const u=(0,f.A)("woocommerce-tag",l,{"has-remove":!!s}),x=`woocommerce-tag__label-${m}`,g=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"screen-reader-text",children:c}),(0,n.jsx)("span",{"aria-hidden":"true",children:t})]});return(0,n.jsxs)("span",{className:u,children:[o?(0,n.jsx)(h.Button,{className:"woocommerce-tag__text",id:x,onClick:()=>d(!0),children:g}):(0,n.jsx)("span",{className:"woocommerce-tag__text",id:x,children:g}),o&&a&&(0,n.jsx)(h.Popover,{onClose:()=>d(!1),children:o}),s&&(0,n.jsx)(h.Button,{className:"woocommerce-tag__remove",onClick:s(e),label:(0,r.sprintf)(
// Translators: %s label.
// Translators: %s label.
(0,r.__)("Remove %s","woocommerce"),t),"aria-describedby":x,children:(0,n.jsx)(i.A,{icon:I.A,size:20,className:"clear-icon",role:"img"})})]})},B=M;o(1939);const A=e=>(0,n.jsx)(N,{...e}),R=e=>{const{list:t,selected:o,renderItem:s,depth:i=0,loadMoreChildrenText:c,onLoadMoreChildren:l,totalChildren:a,onSelect:d,instanceId:m,isSingle:h,search:u,useExpandedPanelId:x}=e,[g]=x;return t?(0,n.jsx)(n.Fragment,{children:t.map((t=>{var p;const w=null!==(p=t.children?.length)&&void 0!==p?p:0,f=w&&!h?t.children?.every((({id:e})=>o.find((t=>t.id===e)))):!!o.find((({id:e})=>e===t.id)),_=w&&g===t.id,E=a?.[t.id],b="number"==typeof E&&w<E;return(0,n.jsxs)(j.Fragment,{children:[(0,n.jsx)("li",{children:s({item:t,isSelected:f,onSelect:d,isSingle:h,selected:o,search:u,depth:i,useExpandedPanelId:x,controlId:m})}),_?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(R,{...e,list:t.children,depth:i+1}),l&&b?(0,n.jsx)("li",{children:(0,n.jsx)("button",{type:"button",className:"woocommerce-search-list__item woocommerce-search-list__item-load-more",onClick:()=>l(),children:c||(0,r.__)("Load more","woocommerce")})}):null]}):null]},t.id)}))}):null},T=({isLoading:e,isSingle:t,selected:o,messages:s,onChange:i,onRemove:c})=>{if(e||t||!o)return null;const l=o.length;return(0,n.jsxs)("div",{className:"woocommerce-search-list__selected",children:[(0,n.jsxs)("div",{className:"woocommerce-search-list__selected-header",children:[(0,n.jsx)("strong",{children:s.selected(l)}),l>0?(0,n.jsx)(h.Button,{variant:"link",isDestructive:!0,onClick:()=>i([]),"aria-label":s.clear,children:(0,r.__)("Clear all","woocommerce")}):null]}),l>0?(0,n.jsx)("ul",{children:o.map(((e,t)=>(0,n.jsx)("li",{children:(0,n.jsx)(B,{label:e.name,id:e.id,remove:c})},t)))}):null]})},$=({filteredList:e,search:t,onSelect:o,instanceId:s,useExpandedPanelId:c,...l})=>{const{messages:a,renderItem:d,selected:m,isSingle:h,loadMoreChildrenText:u,onLoadMoreChildren:x,totalChildren:g}=l,p=d||A;return 0===e.length?(0,n.jsxs)("div",{className:"woocommerce-search-list__list is-not-found",children:[(0,n.jsx)("span",{className:"woocommerce-search-list__not-found-icon",children:(0,n.jsx)(i.A,{icon:O.A,role:"img"})}),(0,n.jsx)("span",{className:"woocommerce-search-list__not-found-text",children:t?(0,r.sprintf)(a.noResults,t):a.noItems})]}):(0,n.jsx)("ul",{className:"woocommerce-search-list__list",children:(0,n.jsx)(R,{useExpandedPanelId:c,list:e,selected:m,renderItem:p,loadMoreChildrenText:u,onLoadMoreChildren:x,totalChildren:g,onSelect:o,instanceId:s,isSingle:h,search:t})})},F=e=>{const{className:t="",isCompact:o,isHierarchical:s,isLoading:i,isSingle:c,list:l,messages:a=b,onChange:d,onSearch:m,selected:u,type:x="text",debouncedSpeak:g}=e,[p,w]=(0,j.useState)(""),_=(0,j.useState)(-1),E=(0,P.useInstanceId)(F),v=(0,j.useMemo)((()=>({...b,...a})),[a]),C=(0,j.useMemo)((()=>((e,t,o)=>{if(!t)return o?y(e):e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),s=e.map((e=>!!r.test(e.name)&&e)).filter(Boolean);return o?y(s,e):s})(l,p,s)),[l,p,s]);(0,j.useEffect)((()=>{g&&g(v.updated)}),[g,v]),(0,j.useEffect)((()=>{"function"==typeof m&&m(p)}),[p,m]);const k=(0,j.useCallback)((e=>()=>{c&&d([]);const t=u.findIndex((({id:t})=>t===e));d([...u.slice(0,t),...u.slice(t+1)])}),[c,u,d]),S=(0,j.useCallback)((e=>()=>{Array.isArray(e)?d(e):-1===u.findIndex((({id:t})=>t===e.id))?d(c?[e]:[...u,e]):k(e.id)()}),[c,k,d,u]),N=(0,j.useCallback)((e=>{const[t]=u.filter((t=>!e.find((e=>t.id===e.id))));k(t.id)()}),[k,u]);return(0,n.jsxs)("div",{className:(0,f.A)("woocommerce-search-list",t,{"is-compact":o,"is-loading":i,"is-token":"token"===x}),children:["text"===x&&(0,n.jsx)(T,{...e,onRemove:k,messages:v}),(0,n.jsx)("div",{className:"woocommerce-search-list__search",children:"text"===x?(0,n.jsx)(h.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:v.search,type:"search",value:p,onChange:e=>w(e)}):(0,n.jsx)(h.FormTokenField,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:i,label:v.search,onChange:N,onInputChange:e=>w(e),suggestions:[],__experimentalValidateInput:()=>!1,value:i?[(0,r.__)("Loading…","woocommerce")]:u.map((e=>({...e,value:e.name}))),__experimentalShowHowTo:!1})}),i?(0,n.jsx)("div",{className:"woocommerce-search-list__list",children:(0,n.jsx)(h.Spinner,{})}):(0,n.jsx)($,{...e,search:p,filteredList:C,messages:v,onSelect:S,instanceId:E,useExpandedPanelId:_})]})},L=((0,h.withSpokenMessages)(F),window.wp.url),H=window.wp.apiFetch;var D=o.n(H);const z=window.wp.escapeHtml,V=({message:e,type:t})=>e?"general"===t?(0,n.jsxs)("span",{children:[(0,r.__)("The following error was returned","woocommerce"),(0,n.jsx)("br",{}),(0,n.jsx)("code",{children:(0,z.escapeHTML)(e)})]}):"api"===t?(0,n.jsxs)("span",{children:[(0,r.__)("The following error was returned from the API","woocommerce"),(0,n.jsx)("br",{}),(0,n.jsx)("code",{children:(0,z.escapeHTML)(e)})]}):e:(0,r.__)("An error has prevented the block from being updated.","woocommerce"),J=({error:e})=>(0,n.jsx)("div",{className:"wc-block-error-message",children:V(e)}),W=e=>{const{id:t,name:o,parent:r,count:s}=e;return{id:t,name:o,parent:r,count:s,breadcrumbs:[],children:[],details:e,value:e.slug}};o(6982);const G=(Z=({categories:e=[],error:t=null,isLoading:o=!1,onChange:s,onOperatorChange:i,operator:c="any",selected:l,isCompact:a=!1,isSingle:d=!1,showReviewCount:m})=>{const u={clear:(0,r.__)("Clear all product categories","woocommerce"),list:(0,r.__)("Product Categories","woocommerce"),noItems:(0,r.__)("Your store doesn't have any product categories.","woocommerce"),search:(0,r.__)("Search for product categories","woocommerce"),selected:e=>(0,r.sprintf)(/* translators: %d is the count of selected categories. */ /* translators: %d is the count of selected categories. */
(0,r._n)("%d category selected","%d categories selected",e,"woocommerce"),e),updated:(0,r.__)("Category search results updated.","woocommerce")};if(t)return(0,n.jsx)(J,{error:t});const x=e.map(W);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(F,{className:"woocommerce-product-categories",list:x,isLoading:o,selected:x.filter((({id:e})=>l.includes(Number(e)))),onChange:s,renderItem:e=>{const{item:t,search:o,depth:s=0}=e,i=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,c=m?(0,r.sprintf)(/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ /* translators: %1$s is the item name, %2$d is the count of reviews for the item. */
(0,r._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.details?.review_count||0,"woocommerce"),i,t.details?.review_count||0):(0,r.sprintf)(/* translators: %1$s is the item name, %2$d is the count of products for the item. */ /* translators: %1$s is the item name, %2$d is the count of products for the item. */
(0,r._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.details?.count||0,"woocommerce"),i,t.details?.count||0),l=m?(0,r.sprintf)(/* translators: %d is the count of reviews. */ /* translators: %d is the count of reviews. */
(0,r._n)("%d review","%d reviews",t.details?.review_count||0,"woocommerce"),t.details?.review_count||0):(0,r.sprintf)(/* translators: %d is the count of products. */ /* translators: %d is the count of products. */
(0,r._n)("%d product","%d products",t.details?.count||0,"woocommerce"),t.details?.count||0);return(0,n.jsx)(S,{className:(0,f.A)("woocommerce-product-categories__item","has-count",{"is-searching":o.length>0,"is-skip-level":0===s&&0!==t.parent}),...e,countLabel:l,"aria-label":c})},messages:u,isCompact:a,isHierarchical:!0,isSingle:d}),!!i&&(0,n.jsx)("div",{hidden:l.length<2,children:(0,n.jsx)(h.SelectControl,{className:"woocommerce-product-categories__operator",label:(0,r.__)("Display products matching","woocommerce"),help:(0,r.__)("Pick at least two categories to use this setting.","woocommerce"),value:c,onChange:i,options:[{label:(0,r.__)("Any selected categories","woocommerce"),value:"any"},{label:(0,r.__)("All selected categories","woocommerce"),value:"all"}]})})]})},({selected:e,...t})=>{const[o,r]=(0,j.useState)(!0),[s,i]=(0,j.useState)(null),[c,l]=(0,j.useState)([]),a=async e=>{const t=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);i(t),r(!1)},d=(0,j.useRef)(e);return(0,j.useEffect)((()=>{var e;(e={selected:d.current},D()({path:(0,L.addQueryArgs)("wc/store/v1/products/categories",{per_page:0,...e})})).then((e=>{l(e),r(!1)})).catch(a)}),[d]),(0,n.jsx)(Z,{...t,selected:e,error:s,categories:c,isLoading:o})}),K=(0,a.getSetting)("hideOutOfStockItems",!1),Q=(0,a.getSetting)("stockStatusOptions",{}),X=({value:e,setAttributes:t})=>{const{outofstock:o,...s}=Q,i=K?s:Q,c=Object.entries(i).map((([e,t])=>({value:e,label:t}))).filter((e=>!!e.label)),l=Object.keys(i).filter((e=>!!e)),[a,d]=(0,j.useState)(e||l);(0,j.useEffect)((()=>{t({stockStatus:["",...a]})}),[a,t]);const m=(0,j.useCallback)((e=>{const t=a.includes(e),o=a.filter((t=>t!==e));t||(o.push(e),o.sort()),d(o)}),[a]);return(0,n.jsx)(n.Fragment,{children:c.map((e=>{const t=a.includes(e.value)?/* translators: %s stock status. */ /* translators: %s stock status. */(0,r.__)('Stock status "%s" visible.',"woocommerce"):/* translators: %s stock status. */ /* translators: %s stock status. */(0,r.__)('Stock status "%s" hidden.',"woocommerce");return(0,n.jsx)(h.ToggleControl,{label:e.label,help:(0,r.sprintf)(t,e.label),checked:a.includes(e.value),onChange:()=>m(e.value)},e.value)}))})},Y=(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"},children:[(0,n.jsx)("title",{children:"Grid Block Preview"}),(0,n.jsx)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),(0,n.jsx)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),(0,n.jsx)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),(0,n.jsx)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),(0,n.jsx)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),(0,n.jsx)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),(0,n.jsx)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),(0,n.jsx)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),(0,n.jsx)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),(0,n.jsx)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),(0,n.jsx)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),(0,n.jsx)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,n.jsx)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"})]}),q=({attributes:e,name:t,setAttributes:o})=>{const{categories:s,catOperator:i,columns:c,contentVisibility:l,rows:d,alignButtons:u,stockStatus:p,isPreview:f}=e;return f?Y:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(m.InspectorControls,{children:[(0,n.jsx)(h.PanelBody,{title:(0,r.__)("Layout","woocommerce"),initialOpen:!0,children:(0,n.jsx)(w,{columns:c,rows:d,alignButtons:u,setAttributes:o,minColumns:(0,a.getSetting)("minColumns",1),maxColumns:(0,a.getSetting)("maxColumns",6),minRows:(0,a.getSetting)("minRows",1),maxRows:(0,a.getSetting)("maxRows",6)})}),(0,n.jsx)(h.PanelBody,{title:(0,r.__)("Content","woocommerce"),initialOpen:!0,children:(0,n.jsx)(g,{settings:l,onChange:e=>o({contentVisibility:e})})}),(0,n.jsx)(h.PanelBody,{title:(0,r.__)("Filter by stock status","woocommerce"),initialOpen:!1,children:(0,n.jsx)(X,{setAttributes:o,value:p})}),(0,n.jsx)(h.PanelBody,{title:(0,r.__)("Filter by Product Category","woocommerce"),initialOpen:!1,children:(0,n.jsx)(G,{selected:s,onChange:(e=[])=>{const t=e.map((({id:e})=>e));o({categories:t})},operator:i,onOperatorChange:(e="any")=>o({catOperator:e})})})]},"inspector"),(0,n.jsx)(h.Disabled,{children:(0,n.jsx)(x(),{block:t,attributes:e})})]})},U=JSON.parse('{"name":"woocommerce/product-new","title":"Newest Products","category":"woocommerce","keywords":["WooCommerce"],"description":"Display a grid of your newest products.","supports":{"interactivity":{"clientNavigation":false},"align":["wide","full"],"html":false,"inserter":false},"attributes":{"columns":{"type":"number","default":3},"rows":{"type":"number","default":3},"alignButtons":{"type":"boolean","default":false},"contentVisibility":{"type":"object","default":{"image":true,"title":true,"price":true,"rating":true,"button":true},"properties":{"image":{"type":"boolean","default":true},"title":{"type":"boolean","default":true},"price":{"type":"boolean","default":true},"rating":{"type":"boolean","default":true},"button":{"type":"boolean","default":true}}},"categories":{"type":"array","default":[]},"catOperator":{"type":"string","default":"any"},"isPreview":{"type":"boolean","default":false},"stockStatus":{"type":"array"},"editMode":{"type":"boolean","default":true},"orderby":{"type":"string","enum":["date","popularity","price_asc","price_desc","rating","title","menu_order"],"default":"date"}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var Z;(0,s.registerBlockType)(U,{title:(0,r.__)("Newest Products","woocommerce"),icon:{src:(0,n.jsx)(i.A,{icon:l,className:"wc-block-editor-components-block-icon wc-block-editor-components-block-icon--sparkles"})},attributes:{...d,...U.attributes},transforms:{from:[{type:"block",blocks:["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"].filter((e=>"woocommerce/product-new"!==e)),transform:e=>(0,s.createBlock)("woocommerce/product-new",e)}]},edit:e=>{const t=(0,m.useBlockProps)();return(0,n.jsx)("div",{...t,children:(0,n.jsx)(q,{...e})})},save:()=>null})},6982:()=>{},1939:()=>{},5022:()=>{},1609:e=>{"use strict";e.exports=window.React},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},9491:e=>{"use strict";e.exports=window.wp.compose},6087:e=>{"use strict";e.exports=window.wp.element},7723:e=>{"use strict";e.exports=window.wp.i18n},5573:e=>{"use strict";e.exports=window.wp.primitives}},s={};function i(e){var t=s[e];if(void 0!==t)return t.exports;var o=s[e]={exports:{}};return r[e](o,o.exports,i),o.exports}i.m=r,e=[],i.O=(t,o,r,s)=>{if(!o){var c=1/0;for(d=0;d<e.length;d++){for(var[o,r,s]=e[d],n=!0,l=0;l<o.length;l++)(!1&s||c>=s)&&Object.keys(i.O).every((e=>i.O[e](o[l])))?o.splice(l--,1):(n=!1,s<c&&(c=s));if(n){e.splice(d--,1);var a=r();void 0!==a&&(t=a)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[o,r,s]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.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 s=Object.create(null);i.r(s);var c={};t=t||[null,o({}),o([]),o(o)];for(var n=2&r&&e;"object"==typeof n&&!~t.indexOf(n);n=o(n))Object.getOwnPropertyNames(n).forEach((t=>c[t]=()=>e[t]));return c.default=()=>e,i.d(s,c),s},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=185,(()=>{var e={185:0};i.O.j=t=>0===e[t];var t=(t,o)=>{var r,s,[c,n,l]=o,a=0;if(c.some((t=>0!==e[t]))){for(r in n)i.o(n,r)&&(i.m[r]=n[r]);if(l)var d=l(i)}for(t&&t(o);a<c.length;a++)s=c[a],i.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return i.O(d)},o=globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var c=i.O(void 0,[94],(()=>i(7531)));c=i.O(c),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["product-new"]=c})();