PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Dir : /home/trave494/footcrew.com/wp-content/plugins/woocommerce/assets/client/blocks/ |
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 IP: 209.182.202.254 |
Dir : /home/trave494/footcrew.com/wp-content/plugins/woocommerce/assets/client/blocks/product-search.js |
(()=>{var e,t={4545:(e,t,o)=>{"use strict";o.r(t);var c=o(9196);const r=window.wp.blockEditor,a=window.wp.data;var l=o(5736),s=o(2911),n=o(7637);const i=window.wc.wcSettings,d=window.wp.components,m=window.wp.blocks;o(5400),o(3372);var p=o(3849),u=o.n(p);const w=({attributes:{label:e,placeholder:t,formId:o,className:r,hasLabel:a,align:s}})=>{const n=u()("wc-block-product-search",s?"align"+s:"",r);return(0,c.createElement)("div",{className:n},(0,c.createElement)("form",{role:"search",method:"get",action:i.HOME_URL},(0,c.createElement)("label",{htmlFor:o,className:a?"wc-block-product-search__label":"wc-block-product-search__label screen-reader-text"},e),(0,c.createElement)("div",{className:"wc-block-product-search__fields"},(0,c.createElement)("input",{type:"search",id:o,className:"wc-block-product-search__field",placeholder:t,name:"s"}),(0,c.createElement)("input",{type:"hidden",name:"post_type",value:"product"}),(0,c.createElement)("button",{type:"submit",className:"wc-block-product-search__button","aria-label":(0,l.__)("Search","woocommerce")},(0,c.createElement)("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},(0,c.createElement)("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"}))))))};var h=o(4333),b=o(9307);const _=(0,h.withInstanceId)((({attributes:{label:e,placeholder:t,formId:o,className:a,hasLabel:s,align:n},instanceId:i,setAttributes:m})=>{const p=u()("wc-block-product-search",n?"align"+n:"",a);return(0,b.useEffect)((()=>{o||m({formId:`wc-block-product-search-${i}`})}),[o,m,i]),(0,c.createElement)(c.Fragment,null,(0,c.createElement)(r.InspectorControls,{key:"inspector"},(0,c.createElement)(d.PanelBody,{title:(0,l.__)("Content","woocommerce"),initialOpen:!0},(0,c.createElement)(d.ToggleControl,{label:(0,l.__)("Show search field label","woocommerce"),checked:s,onChange:()=>m({hasLabel:!s})}))),(0,c.createElement)("div",{className:p},!!s&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)("label",{className:"screen-reader-text",htmlFor:"wc-block-product-search__label"},(0,l.__)("Search Label","woocommerce")),(0,c.createElement)(r.PlainText,{className:"wc-block-product-search__label",id:"wc-block-product-search__label",value:e,onChange:e=>m({label:e}),style:{backgroundColor:"transparent"}})),(0,c.createElement)("div",{className:"wc-block-product-search__fields"},(0,c.createElement)(d.TextControl,{className:"wc-block-product-search__field input-control",value:t,placeholder:(0,l.__)("Enter search placeholder text","woocommerce"),onChange:e=>m({placeholder:e})}),(0,c.createElement)("button",{type:"submit",className:"wc-block-product-search__button","aria-label":(0,l.__)("Search","woocommerce"),onClick:e=>e.preventDefault(),tabIndex:-1},(0,c.createElement)("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},(0,c.createElement)("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"}))))))})),k=(0,i.getSettingWithCoercion)("isBlockVariationAvailable",!1,(e=>"boolean"==typeof e)),f={hasLabel:{type:"boolean",default:!0},label:{type:"string",default:(0,l.__)("Search","woocommerce")},placeholder:{type:"string",default:(0,l.__)("Search products…","woocommerce")},formId:{type:"string",default:""}},g={label:f.label.default,buttonText:f.label.default,placeholder:f.placeholder.default,query:{post_type:"product"}};(0,m.registerBlockType)("woocommerce/product-search",{title:(0,l.__)("Product Search","woocommerce"),icon:{src:(0,c.createElement)(s.Z,{icon:n.Z,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[(0,l.__)("WooCommerce","woocommerce")],description:(0,l.__)("A search box to allow customers to search for products by keyword.","woocommerce"),supports:{align:["wide","full"],inserter:!k},attributes:f,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>"woocommerce_product_search"===e&&!(null==t||!t.raw),transform:({instance:e})=>(0,m.createBlock)("woocommerce/product-search",{label:e.raw.title||g.label})}]},deprecated:[{attributes:f,save:e=>(0,c.createElement)("div",null,(0,c.createElement)(w,{...e}))}],edit:k?({clientId:e})=>{const{replaceBlocks:t}=(0,a.useDispatch)(r.store),o=(0,a.useSelect)((t=>t("core/block-editor").getBlockAttributes(e)),[e]),s=[(0,c.createElement)(d.Button,{key:"update",onClick:()=>{t(e,(0,m.createBlock)("core/search",{label:(null==o?void 0:o.label)||g.label,buttonText:g.buttonText,placeholder:(null==o?void 0:o.placeholder)||g.placeholder,query:g.query}))},variant:"primary"},(0,l.__)("Upgrade Block","woocommerce"))];return(0,c.createElement)(r.Warning,{actions:s,className:"wc-block-components-actions"},(0,l.__)("This version of the Product Search block is outdated. Upgrade to continue using.","woocommerce"))}:_,save:()=>null}),k&&(0,m.registerBlockVariation)("core/search",{name:"woocommerce/product-search",title:(0,l.__)("Product Search","woocommerce"),icon:{src:(0,c.createElement)(s.Z,{icon:n.Z,className:"wc-block-editor-components-block-icon"})},isActive:(e,t)=>{var o;return(null===(o=e.query)||void 0===o?void 0:o.post_type)===t.query.post_type},category:"woocommerce",keywords:[(0,l.__)("WooCommerce","woocommerce")],description:(0,l.__)("A search box to allow customers to search for products by keyword.","woocommerce"),attributes:g})},3372:()=>{},5400:()=>{},9196:e=>{"use strict";e.exports=window.React},4333:e=>{"use strict";e.exports=window.wp.compose},9307:e=>{"use strict";e.exports=window.wp.element},5736:e=>{"use strict";e.exports=window.wp.i18n},444:e=>{"use strict";e.exports=window.wp.primitives}},o={};function c(e){var r=o[e];if(void 0!==r)return r.exports;var a=o[e]={exports:{}};return t[e].call(a.exports,a,a.exports,c),a.exports}c.m=t,e=[],c.O=(t,o,r,a)=>{if(!o){var l=1/0;for(d=0;d<e.length;d++){for(var[o,r,a]=e[d],s=!0,n=0;n<o.length;n++)(!1&a||l>=a)&&Object.keys(c.O).every((e=>c.O[e](o[n])))?o.splice(n--,1):(s=!1,a<l&&(l=a));if(s){e.splice(d--,1);var i=r();void 0!==i&&(t=i)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[o,r,a]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var o in t)c.o(t,o)&&!c.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.j=2218,(()=>{var e={2218:0};c.O.j=t=>0===e[t];var t=(t,o)=>{var r,a,[l,s,n]=o,i=0;if(l.some((t=>0!==e[t]))){for(r in s)c.o(s,r)&&(c.m[r]=s[r]);if(n)var d=n(c)}for(t&&t(o);i<l.length;i++)a=l[i],c.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return c.O(d)},o=self.webpackChunkwebpackWcBlocksJsonp=self.webpackChunkwebpackWcBlocksJsonp||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var r=c.O(void 0,[2869],(()=>c(4545)));r=c.O(r),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["product-search"]=r})();