Current Path : /storage/v11800/abaniliving-com/public_html/wp-content/plugins/woocommerce/assets/client/blocks/

Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64

Upload File :
Current File : /storage/v11800/abaniliving-com/public_html/wp-content/plugins/woocommerce/assets/client/blocks/featured-category.js
(()=>{var e,t,r,a={1659:(e,t,r)=>{"use strict";r.r(t);var a=r(1609),o=r(5573);const n=(0,a.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},(0,a.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,a.createElement)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V6h5.17l2 2H20v10zm-6.92-3.96L12.39 17 15 15.47 17.61 17l-.69-2.96 2.3-1.99-3.03-.26L15 9l-1.19 2.79-3.03.26z"}));var i=r(7104),l=(r(2247),r(6467),r(6087)),c=r(9491);const s=window.wp.url,d=window.wp.apiFetch;var m=r.n(d);const u=window.wc.wcSettings;var g,p,h,v,_,b,w,E,y,f;const S=(0,u.getSetting)("wcBlocksConfig",{pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),k=S.pluginUrl+"assets/images/",I=(S.pluginUrl,null===(g=u.STORE_PAGES.shop)||void 0===g||g.permalink,null===(p=u.STORE_PAGES.checkout)||void 0===p||p.id,null===(h=u.STORE_PAGES.checkout)||void 0===h||h.permalink,null===(v=u.STORE_PAGES.privacy)||void 0===v||v.permalink,null===(_=u.STORE_PAGES.privacy)||void 0===_||_.title,null===(b=u.STORE_PAGES.terms)||void 0===b||b.permalink,null===(w=u.STORE_PAGES.terms)||void 0===w||w.title,null===(E=u.STORE_PAGES.cart)||void 0===E||E.id,null===(y=u.STORE_PAGES.cart)||void 0===y||y.permalink,null!==(f=u.STORE_PAGES.myaccount)&&void 0!==f&&f.permalink?u.STORE_PAGES.myaccount.permalink:(0,u.getSetting)("wpLoginUrl","/wp-login.php"),(0,u.getSetting)("localPickupEnabled",!1),(0,u.getSetting)("countries",{})),C=(0,u.getSetting)("countryData",{}),x=(Object.fromEntries(Object.keys(C).filter((e=>!0===C[e].allowBilling)).map((e=>[e,I[e]||""]))),Object.fromEntries(Object.keys(C).filter((e=>!0===C[e].allowBilling)).map((e=>[e,C[e].states||[]]))),Object.fromEntries(Object.keys(C).filter((e=>!0===C[e].allowShipping)).map((e=>[e,I[e]||""]))),Object.fromEntries(Object.keys(C).filter((e=>!0===C[e].allowShipping)).map((e=>[e,C[e].states||[]]))),Object.fromEntries(Object.keys(C).map((e=>[e,C[e].locale||[]]))),{address:["first_name","last_name","company","address_1","address_2","city","postcode","country","state","phone"],contact:["email"],order:[]}),N=((0,u.getSetting)("addressFieldsLocations",x).address,(0,u.getSetting)("addressFieldsLocations",x).contact,(0,u.getSetting)("addressFieldsLocations",x).order,(0,u.getSetting)("additionalOrderFields",{}),(0,u.getSetting)("additionalContactFields",{}),(0,u.getSetting)("additionalAddressFields",{}),(e,t)=>{const r=new Map;return e.filter((e=>{const a=t(e);return!r.has(a)&&(r.set(a,e),!0)}))}),P=({selected:e=[],search:t="",queryArgs:r={}})=>{const a=(({selected:e=[],search:t="",queryArgs:r={}})=>{const a=S.productCount>100,o={per_page:a?100:0,catalog_visibility:"any",search:t,orderby:"title",order:"asc"},n=[(0,s.addQueryArgs)("/wc/store/v1/products",{...o,...r})];return a&&e.length&&n.push((0,s.addQueryArgs)("/wc/store/v1/products",{catalog_visibility:"any",include:e,per_page:0})),n})({selected:e,search:t,queryArgs:r});return Promise.all(a.map((e=>m()({path:e})))).then((e=>{const t=e.flat(),r=N(t,(e=>e.id));return r.map((e=>({...e,parent:0})))})).catch((e=>{throw e}))},A=async e=>{if(!("json"in e))return{message:e.message,type:e.type||"general"};try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}},R=(0,c.createHigherOrderComponent)((e=>class extends l.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,category:"preview"===this.props.attributes.categoryId?this.props.attributes.previewCategory:null},this.loadCategory=this.loadCategory.bind(this)}componentDidMount(){this.loadCategory()}componentDidUpdate(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.loadCategory()}loadCategory(){const{categoryId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),(e=>m()({path:`wc/store/v1/products/categories/${e}`}))(e).then((e=>{this.setState({category:e,loading:!1,error:null})})).catch((async e=>{const t=await A(e);this.setState({category:null,loading:!1,error:t})}))):this.setState({category:null,loading:!1,error:null}))}render(){const{error:t,loading:r,category:o}=this.state;return(0,a.createElement)(e,{...this.props,error:t,getCategory:this.loadCategory,isLoading:r,category:o})}}),"withCategory"),L=window.wp.components;var O=r(7723);const T=window.wp.blockEditor;var $=r(3884);const F=e=>{const{id:t,name:r,parent:a}=e;return{id:t,name:r,parent:a,breadcrumbs:[],children:[],details:e,value:e.slug}},M=e=>{const{id:t,name:r,parent:a,count:o}=e;return{id:t,name:r,parent:a,count:o,breadcrumbs:[],children:[],details:e,value:e.slug}},j="woocommerce/featured-category",B="woocommerce/featured-product",G=window.wc.wcTypes;function H(e){return!!e&&(0,G.isNumber)(e.id)&&"string"==typeof e.src}function z({blockName:e,item:t,mediaId:r,mediaSrc:a}){const[o,n]=(0,l.useState)(0),[i,c]=(0,l.useState)("");return(0,l.useEffect)((()=>{var a,o;n(r||(e===B?(o=t)&&o.images&&o.images.length&&o.images[0].id||0:(a=t)&&H(a.image)?a.image.id:0))}),[e,t,r]),(0,l.useEffect)((()=>{var r,o;c(a||(e===B?(o=t)&&o.images&&o.images.length&&o.images[0].src||"":(r=t)&&H(r.image)?r.image.src:""))}),[e,t,a]),{backgroundImageId:o,backgroundImageSrc:i}}const D=({backgroundImageId:e,backgroundImageSrc:t,contentAlign:r,cropLabel:o,editLabel:n,editMode:i,isEditingImage:l,mediaSrc:c,setAttributes:s,setIsEditingImage:d})=>(0,a.createElement)(T.BlockControls,null,(0,a.createElement)(T.AlignmentToolbar,{value:r,onChange:e=>{s({contentAlign:e})}}),(0,a.createElement)(L.ToolbarGroup,null,t&&!l&&(0,a.createElement)(L.ToolbarButton,{onClick:()=>d(!0),icon:$.A,label:o}),(0,a.createElement)(T.MediaReplaceFlow,{mediaId:e,mediaURL:c,accept:"image/*",onSelect:e=>{s({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"]}),e&&c?(0,a.createElement)(L.ToolbarButton,{onClick:()=>s({mediaId:0,mediaSrc:""})},(0,O.__)("Reset","woocommerce")):null),(0,a.createElement)(L.ToolbarGroup,{controls:[{icon:"edit",title:n,onClick:()=>s({editMode:!i}),isActive:i}]})),V=({align:e,backgroundImageId:t,backgroundImageSize:r,backgroundImageSrc:o,containerRef:n,isEditingImage:i,setAttributes:c,setIsEditingImage:s})=>{const d=function(e,t){const[r,a]=(0,l.useState)(),o=(0,l.useCallback)((()=>{var t;a(null===(t=e.current)||void 0===t?void 0:t.clientWidth)}),[e]);return(0,l.useEffect)(o,[o,...t]),(0,l.useEffect)((()=>{if(!e.current)return;const{defaultView:t}=e.current.ownerDocument;return t?(t.addEventListener("resize",o),()=>{t.removeEventListener("resize",o)}):void 0}),[e,o]),r}(n,[e]);return"function"==typeof T.__experimentalImageEditingProvider?(0,a.createElement)(T.__experimentalImageEditingProvider,{id:t,url:o,naturalHeight:r.height||500,naturalWidth:r.width||500,onSaveImage:({id:e,url:t})=>{c({mediaId:e,mediaSrc:t})},isEditing:i,onFinishEditing:()=>s(!1)},(0,a.createElement)(T.__experimentalImageEditor,{url:o,height:r.height||500,width:r.width||500})):(0,a.createElement)(T.__experimentalImageEditor,{id:t,url:o,height:r.height||500,width:r.width||500,naturalHeight:r.height,naturalWidth:r.width,onSaveImage:({id:e,url:t})=>{c({mediaId:e,mediaSrc:t})},onFinishEditing:()=>s(!1),clientWidth:d})},U=({alt:e,backgroundImageSrc:t,contentPanel:r,dimRatio:o,focalPoint:n,hasParallax:i,imageFit:l,isRepeated:c,overlayColor:s,overlayGradient:d,setAttributes:m,setGradient:u,showDesc:g})=>{const p="function"==typeof L.FocalPointPicker,h=!c&&!i;return(0,a.createElement)(T.InspectorControls,{key:"inspector"},(0,a.createElement)(L.PanelBody,{title:(0,O.__)("Content","woocommerce")},(0,a.createElement)(L.ToggleControl,{label:(0,O.__)("Show description","woocommerce"),checked:g,onChange:()=>m({showDesc:!g})}),r),!!t&&(0,a.createElement)(a.Fragment,null,p&&(0,a.createElement)(L.PanelBody,{title:(0,O.__)("Media settings","woocommerce")},(0,a.createElement)(L.ToggleControl,{label:(0,O.__)("Fixed background","woocommerce"),checked:i,onChange:()=>{m({hasParallax:!i})}}),(0,a.createElement)(L.ToggleControl,{label:(0,O.__)("Repeated background","woocommerce"),checked:c,onChange:()=>{m({isRepeated:!c})}}),!c&&(0,a.createElement)(L.__experimentalToggleGroupControl,{help:(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{style:{display:"block",marginBottom:"1em"}},(0,O.__)("Select “Cover” to have the image automatically fit its container.","woocommerce")),(0,a.createElement)("span",null,(0,O.__)("This may affect your ability to freely move the focal point of the image.","woocommerce"))),label:(0,O.__)("Image fit","woocommerce"),value:l,onChange:e=>m({imageFit:e})},(0,a.createElement)(L.__experimentalToggleGroupControlOption,{label:(0,O.__)("None","woocommerce"),value:"none"}),(0,a.createElement)(L.__experimentalToggleGroupControlOption
/* translators: "Cover" is a verb that indicates an image covering the entire container. */,{label:(0,O.__)("Cover","woocommerce"),value:"cover"})),(0,a.createElement)(L.FocalPointPicker,{label:(0,O.__)("Focal Point Picker","woocommerce"),url:t,value:n,onChange:e=>m({focalPoint:e})}),h&&(0,a.createElement)(L.TextareaControl,{label:(0,O.__)("Alt text (alternative text)","woocommerce"),value:e,onChange:e=>{m({alt:e})},help:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(L.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,O.__)("Describe the purpose of the image","woocommerce")))})),(0,a.createElement)(T.__experimentalPanelColorGradientSettings,{__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0,title:(0,O.__)("Overlay","woocommerce"),initialOpen:!0,settings:[{colorValue:s,gradientValue:d,onColorChange:e=>m({overlayColor:e}),onGradientChange:e=>{u(e),m({overlayGradient:e})},label:(0,O.__)("Color","woocommerce")}]},(0,a.createElement)(L.RangeControl,{label:(0,O.__)("Opacity","woocommerce"),value:o,onChange:e=>m({dimRatio:e}),min:0,max:100,step:10,required:!0}))))};var W=r(3588),q=r(851);const Q=window.wp.escapeHtml,J=({error:e})=>(0,a.createElement)("div",{className:"wc-block-error-message"},(({message:e,type:t})=>e?"general"===t?(0,a.createElement)("span",null,(0,O.__)("The following error was returned","woocommerce"),(0,a.createElement)("br",null),(0,a.createElement)("code",null,(0,Q.escapeHTML)(e))):"api"===t?(0,a.createElement)("span",null,(0,O.__)("The following error was returned from the API","woocommerce"),(0,a.createElement)("br",null),(0,a.createElement)("code",null,(0,Q.escapeHTML)(e))):e:(0,O.__)("An error has prevented the block from being updated.","woocommerce"))(e));r(4974);const Y=({className:e="",error:t,isLoading:r=!1,onRetry:o})=>(0,a.createElement)(L.Placeholder,{icon:(0,a.createElement)(i.A,{icon:W.A}),label:(0,O.__)("Sorry, an error occurred","woocommerce"),className:(0,q.A)("wc-block-api-error",e)},(0,a.createElement)(J,{error:t}),o&&(0,a.createElement)(a.Fragment,null,r?(0,a.createElement)(L.Spinner,null):(0,a.createElement)(L.Button,{variant:"secondary",onClick:o},(0,O.__)("Retry","woocommerce"))));function K(e){return e?`${Math.round(100*e.x)}% ${Math.round(100*e.y)}%`:""}function X(e){return`wc-block-${e.split("/")[1]}`}function Z(e,t,r){const a=new Set(t.map((e=>e[r])));return e.filter((e=>!a.has(e[r])))}const ee=window.wp.htmlEntities,te={clear:(0,O.__)("Clear all selected items","woocommerce"),noItems:(0,O.__)("No items found.","woocommerce"),
/* Translators: %s search term */
noResults:(0,O.__)("No results for %s","woocommerce"),search:(0,O.__)("Search for items","woocommerce"),selected:e=>(0,O.sprintf)(/* translators: Number of items selected from list. */ /* translators: Number of items selected from list. */
(0,O._n)("%d item selected","%d items selected",e,"woocommerce"),e),updated:(0,O.__)("Search results updated.","woocommerce")},re=(e,t=e)=>{const r=e.reduce(((e,t)=>{const r=t.parent||0;return e[r]||(e[r]=[]),e[r].push(t),e}),{}),a=("id",t.reduce(((e,t)=>(e[String(t.id)]=t,e)),{}));const o=["0"],n=(e={})=>e.parent?[...n(a[e.parent]),e.name]:e.name?[e.name]:[],i=e=>e.map((e=>{const t=r[e.id];return o.push(""+e.id),{...e,breadcrumbs:n(a[e.parent]),children:t&&t.length?i(t):[]}})),l=i(r[0]||[]);return Object.entries(r).forEach((([e,t])=>{o.includes(e)||l.push(...i(t||[]))})),l},ae=(e,t)=>{if(!t)return e;const r=new RegExp(`(${t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")})`,"ig");return e.split(r).map(((e,t)=>r.test(e)?(0,a.createElement)("strong",{key:t},e):(0,a.createElement)(l.Fragment,{key:t},e)))},oe=({label:e})=>(0,a.createElement)("span",{className:"woocommerce-search-list__item-count"},e),ne=e=>{const{item:t,search:r}=e,o=t.breadcrumbs&&t.breadcrumbs.length;return(0,a.createElement)("span",{className:"woocommerce-search-list__item-label"},o?(0,a.createElement)("span",{className:"woocommerce-search-list__item-prefix"},1===(n=t.breadcrumbs).length?n.slice(0,1).toString():2===n.length?n.slice(0,1).toString()+" › "+n.slice(-1).toString():n.slice(0,1).toString()+" … "+n.slice(-1).toString()):null,(0,a.createElement)("span",{className:"woocommerce-search-list__item-name"},ae((0,ee.decodeEntities)(t.name),r)));var n},ie=({countLabel:e,className:t,depth:r=0,controlId:o="",item:n,isSelected:i,isSingle:c,onSelect:s,search:d="",selected:m,useExpandedPanelId:u,...g})=>{var p,h;const[v,_]=u,b=null!=e&&void 0!==n.count&&null!==n.count,w=!(null===(p=n.breadcrumbs)||void 0===p||!p.length),E=!(null===(h=n.children)||void 0===h||!h.length),y=v===n.id,f=(0,q.A)(["woocommerce-search-list__item",`depth-${r}`,t],{"has-breadcrumbs":w,"has-children":E,"has-count":b,"is-expanded":y,"is-radio-button":c}),S=g.name||`search-list-item-${o}`,k=`${S}-${n.id}`,I=(0,l.useCallback)((()=>{_(y?-1:Number(n.id))}),[y,n.id,_]);return E?(0,a.createElement)("div",{className:f,onClick:I,onKeyDown:e=>"Enter"===e.key||" "===e.key?I():null,role:"treeitem",tabIndex:0},c?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{type:"radio",id:k,name:S,value:n.value,onChange:s(n),onClick:e=>e.stopPropagation(),checked:i,className:"woocommerce-search-list__item-input",...g}),(0,a.createElement)(ne,{item:n,search:d}),b?(0,a.createElement)(oe,{label:e||n.count}):null):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(L.CheckboxControl,{className:"woocommerce-search-list__item-input",checked:i,...!i&&n.children.some((e=>m.find((t=>t.id===e.id))))?{indeterminate:!0}:{},label:ae((0,ee.decodeEntities)(n.name),d),onChange:()=>{i?s(Z(m,n.children,"id"))():s(function(e,t,r){const a=Z(t,e,"id");return[...e,...a]}(m,n.children))()},onClick:e=>e.stopPropagation()}),b?(0,a.createElement)(oe,{label:e||n.count}):null)):(0,a.createElement)("label",{htmlFor:k,className:f},c?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{...g,type:"radio",id:k,name:S,value:n.value,onChange:s(n),checked:i,className:"woocommerce-search-list__item-input"}),(0,a.createElement)(ne,{item:n,search:d})):(0,a.createElement)(L.CheckboxControl,{...g,id:k,name:S,className:"woocommerce-search-list__item-input",value:(0,ee.decodeEntities)(n.value),label:ae((0,ee.decodeEntities)(n.name),d),onChange:s(n),checked:i}),b?(0,a.createElement)(oe,{label:e||n.count}):null)},le=ie;var ce=r(2478),se=r(2370);r(6636);const de=({id:e,label:t,popoverContents:r,remove:o,screenReaderLabel:n,className:s=""})=>{const[d,m]=(0,l.useState)(!1),u=(0,c.useInstanceId)(de);if(n=n||t,!t)return null;t=(0,ee.decodeEntities)(t);const g=(0,q.A)("woocommerce-tag",s,{"has-remove":!!o}),p=`woocommerce-tag__label-${u}`,h=(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{className:"screen-reader-text"},n),(0,a.createElement)("span",{"aria-hidden":"true"},t));return(0,a.createElement)("span",{className:g},r?(0,a.createElement)(L.Button,{className:"woocommerce-tag__text",id:p,onClick:()=>m(!0)},h):(0,a.createElement)("span",{className:"woocommerce-tag__text",id:p},h),r&&d&&(0,a.createElement)(L.Popover,{onClose:()=>m(!1)},r),o&&(0,a.createElement)(L.Button,{className:"woocommerce-tag__remove",onClick:o(e),label:(0,O.sprintf)(
// Translators: %s label.
// Translators: %s label.
(0,O.__)("Remove %s","woocommerce"),t),"aria-describedby":p},(0,a.createElement)(i.A,{icon:se.A,size:20,className:"clear-icon",role:"img"})))},me=de;r(8137);const ue=e=>(0,a.createElement)(le,{...e}),ge=e=>{const{list:t,selected:r,renderItem:o,depth:n=0,onSelect:i,instanceId:c,isSingle:s,search:d,useExpandedPanelId:m}=e,[u]=m;return t?(0,a.createElement)(l.Fragment,null,t.map((t=>{var g,p;const h=null!==(g=t.children)&&void 0!==g&&g.length&&!s?t.children.every((({id:e})=>r.find((t=>t.id===e)))):!!r.find((({id:e})=>e===t.id)),v=(null===(p=t.children)||void 0===p?void 0:p.length)&&u===t.id;return(0,a.createElement)(l.Fragment,{key:t.id},(0,a.createElement)("li",null,o({item:t,isSelected:h,onSelect:i,isSingle:s,selected:r,search:d,depth:n,useExpandedPanelId:m,controlId:c})),v?(0,a.createElement)(ge,{...e,list:t.children,depth:n+1}):null)}))):null},pe=({isLoading:e,isSingle:t,selected:r,messages:o,onChange:n,onRemove:i})=>{if(e||t||!r)return null;const l=r.length;return(0,a.createElement)("div",{className:"woocommerce-search-list__selected"},(0,a.createElement)("div",{className:"woocommerce-search-list__selected-header"},(0,a.createElement)("strong",null,o.selected(l)),l>0?(0,a.createElement)(L.Button,{variant:"link",isDestructive:!0,onClick:()=>n([]),"aria-label":o.clear},(0,O.__)("Clear all","woocommerce")):null),l>0?(0,a.createElement)("ul",null,r.map(((e,t)=>(0,a.createElement)("li",{key:t},(0,a.createElement)(me,{label:e.name,id:e.id,remove:i}))))):null)},he=({filteredList:e,search:t,onSelect:r,instanceId:o,useExpandedPanelId:n,...l})=>{const{messages:c,renderItem:s,selected:d,isSingle:m}=l,u=s||ue;return 0===e.length?(0,a.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},(0,a.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},(0,a.createElement)(i.A,{icon:ce.A,role:"img"})),(0,a.createElement)("span",{className:"woocommerce-search-list__not-found-text"},t?(0,O.sprintf)(c.noResults,t):c.noItems)):(0,a.createElement)("ul",{className:"woocommerce-search-list__list"},(0,a.createElement)(ge,{useExpandedPanelId:n,list:e,selected:d,renderItem:u,onSelect:r,instanceId:o,isSingle:m,search:t}))},ve=e=>{const{className:t="",isCompact:r,isHierarchical:o,isLoading:n,isSingle:i,list:s,messages:d=te,onChange:m,onSearch:u,selected:g,type:p="text",debouncedSpeak:h}=e,[v,_]=(0,l.useState)(""),b=(0,l.useState)(-1),w=(0,c.useInstanceId)(ve),E=(0,l.useMemo)((()=>({...te,...d})),[d]),y=(0,l.useMemo)((()=>((e,t,r)=>{if(!t)return r?re(e):e;const a=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),o=e.map((e=>!!a.test(e.name)&&e)).filter(Boolean);return r?re(o,e):o})(s,v,o)),[s,v,o]);(0,l.useEffect)((()=>{h&&h(E.updated)}),[h,E]),(0,l.useEffect)((()=>{"function"==typeof u&&u(v)}),[v,u]);const f=(0,l.useCallback)((e=>()=>{i&&m([]);const t=g.findIndex((({id:t})=>t===e));m([...g.slice(0,t),...g.slice(t+1)])}),[i,g,m]),S=(0,l.useCallback)((e=>()=>{Array.isArray(e)?m(e):-1===g.findIndex((({id:t})=>t===e.id))?m(i?[e]:[...g,e]):f(e.id)()}),[i,f,m,g]),k=(0,l.useCallback)((e=>{const[t]=g.filter((t=>!e.find((e=>t.id===e.id))));f(t.id)()}),[f,g]);return(0,a.createElement)("div",{className:(0,q.A)("woocommerce-search-list",t,{"is-compact":r,"is-loading":n,"is-token":"token"===p})},"text"===p&&(0,a.createElement)(pe,{...e,onRemove:f,messages:E}),(0,a.createElement)("div",{className:"woocommerce-search-list__search"},"text"===p?(0,a.createElement)(L.TextControl,{label:E.search,type:"search",value:v,onChange:e=>_(e)}):(0,a.createElement)(L.FormTokenField,{disabled:n,label:E.search,onChange:k,onInputChange:e=>_(e),suggestions:[],__experimentalValidateInput:()=>!1,value:n?[(0,O.__)("Loading…","woocommerce")]:g.map((e=>({...e,value:e.name}))),__experimentalShowHowTo:!1})),n?(0,a.createElement)("div",{className:"woocommerce-search-list__list"},(0,a.createElement)(L.Spinner,null)):(0,a.createElement)(he,{...e,search:v,filteredList:y,messages:E,onSelect:S,instanceId:w,useExpandedPanelId:b}))},_e=((0,L.withSpokenMessages)(ve),e=>({selected:t,...r})=>{const[o,n]=(0,l.useState)(!0),[i,c]=(0,l.useState)(null),[d,u]=(0,l.useState)([]),g=async e=>{const t=await A(e);c(t),n(!1)},p=(0,l.useRef)(t);return(0,l.useEffect)((()=>{var e;(e={selected:p.current},m()({path:(0,s.addQueryArgs)("wc/store/v1/products/categories",{per_page:0,...e})})).then((e=>{u(e),n(!1)})).catch(g)}),[p]),(0,a.createElement)(e,{...r,selected:t,error:i,categories:d,isLoading:o})});r(6876);const be=_e((({categories:e=[],error:t=null,isLoading:r=!1,onChange:o,onOperatorChange:n,operator:i="any",selected:l,isCompact:c=!1,isSingle:s=!1,showReviewCount:d})=>{const m={clear:(0,O.__)("Clear all product categories","woocommerce"),list:(0,O.__)("Product Categories","woocommerce"),noItems:(0,O.__)("Your store doesn't have any product categories.","woocommerce"),search:(0,O.__)("Search for product categories","woocommerce"),selected:e=>(0,O.sprintf)(/* translators: %d is the count of selected categories. */ /* translators: %d is the count of selected categories. */
(0,O._n)("%d category selected","%d categories selected",e,"woocommerce"),e),updated:(0,O.__)("Category search results updated.","woocommerce")};if(t)return(0,a.createElement)(J,{error:t});const u=e.map(M);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ve,{className:"woocommerce-product-categories",list:u,isLoading:r,selected:u.filter((({id:e})=>l.includes(Number(e)))),onChange:o,renderItem:e=>{var t,r,o,n,i,l,c,s;const{item:m,search:u,depth:g=0}=e,p=m.breadcrumbs.length?`${m.breadcrumbs.join(", ")}, ${m.name}`:m.name,h=d?(0,O.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,O._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",(null===(t=m.details)||void 0===t?void 0:t.review_count)||0,"woocommerce"),p,(null===(r=m.details)||void 0===r?void 0:r.review_count)||0):(0,O.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,O._n)("%1$s, has %2$d product","%1$s, has %2$d products",(null===(o=m.details)||void 0===o?void 0:o.count)||0,"woocommerce"),p,(null===(n=m.details)||void 0===n?void 0:n.count)||0),v=d?(0,O.sprintf)(/* translators: %d is the count of reviews. */ /* translators: %d is the count of reviews. */
(0,O._n)("%d review","%d reviews",(null===(i=m.details)||void 0===i?void 0:i.review_count)||0,"woocommerce"),(null===(l=m.details)||void 0===l?void 0:l.review_count)||0):(0,O.sprintf)(/* translators: %d is the count of products. */ /* translators: %d is the count of products. */
(0,O._n)("%d product","%d products",(null===(c=m.details)||void 0===c?void 0:c.count)||0,"woocommerce"),(null===(s=m.details)||void 0===s?void 0:s.count)||0);return(0,a.createElement)(ie,{className:(0,q.A)("woocommerce-product-categories__item","has-count",{"is-searching":u.length>0,"is-skip-level":0===g&&0!==m.parent}),...e,countLabel:v,"aria-label":h})},messages:m,isCompact:c,isHierarchical:!0,isSingle:s}),!!n&&(0,a.createElement)("div",{hidden:l.length<2},(0,a.createElement)(L.SelectControl,{className:"woocommerce-product-categories__operator",label:(0,O.__)("Display products matching","woocommerce"),help:(0,O.__)("Pick at least two categories to use this setting.","woocommerce"),value:i,onChange:n,options:[{label:(0,O.__)("Any selected categories","woocommerce"),value:"any"},{label:(0,O.__)("All selected categories","woocommerce"),value:"all"}]})))}));var we=r(4717);var Ee=r(2294),ye=r(923),fe=r.n(ye);const Se=(0,c.createHigherOrderComponent)((e=>{class t extends l.Component{constructor(...e){super(...e),(0,Ee.A)(this,"state",{error:null,loading:!1,variations:{}}),(0,Ee.A)(this,"prevSelectedItem",void 0),(0,Ee.A)(this,"loadVariations",(()=>{const{products:e}=this.props,{loading:t,variations:r}=this.state;if(t)return;const a=this.getExpandedProduct();if(!a||r[a])return;const o=e.find((e=>e.id===a));var n;null!=o&&o.variations&&0!==o.variations.length?(this.setState({loading:!0}),(n=a,m()({path:(0,s.addQueryArgs)("wc/store/v1/products",{per_page:0,type:"variation",parent:n})})).then((e=>{const t=e.map((e=>({...e,parent:a})));this.setState({variations:{...this.state.variations,[a]:t},loading:!1,error:null})})).catch((async e=>{const t=await A(e);this.setState({variations:{...this.state.variations,[a]:null},loading:!1,error:t})}))):this.setState({variations:{...this.state.variations,[a]:null},loading:!1,error:null})}))}componentDidMount(){const{selected:e,showVariations:t}=this.props;e&&t&&this.loadVariations()}componentDidUpdate(e){const{isLoading:t,selected:r,showVariations:a}=this.props;a&&(!fe()(e.selected,r)||e.isLoading&&!t)&&this.loadVariations()}isProductId(e){const{products:t}=this.props;return t.some((t=>t.id===e))}findParentProduct(e){var t;const{products:r}=this.props;return null===(t=r.filter((t=>t.variations&&t.variations.find((({id:t})=>t===e))))[0])||void 0===t?void 0:t.id}getExpandedProduct(){const{isLoading:e,selected:t,showVariations:r}=this.props;if(!r)return null;let a=t&&t.length?t[0]:null;return a?this.prevSelectedItem=a:!this.prevSelectedItem||e||this.isProductId(this.prevSelectedItem)||(a=this.prevSelectedItem),!e&&a?this.isProductId(a)?a:this.findParentProduct(a):null}render(){const{error:t,isLoading:r}=this.props,{error:o,loading:n,variations:i}=this.state;return(0,a.createElement)(e,{...this.props,error:o||t,expandedProduct:this.getExpandedProduct(),isLoading:r,variations:i,variationsLoading:n})}}return t}),"withProductVariations"),ke=({className:e,item:t,isSelected:r,isLoading:o,onSelect:n,disabled:i,...l})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ie,{...l,key:t.id,className:e,isSelected:r,item:t,onSelect:n,disabled:i}),r&&o&&(0,a.createElement)("div",{key:"loading",className:(0,q.A)("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},(0,a.createElement)(L.Spinner,null)));r(7369);const Ie={list:(0,O.__)("Products","woocommerce"),noItems:(0,O.__)("Your store doesn't have any products.","woocommerce"),search:(0,O.__)("Search for a product to display","woocommerce"),updated:(0,O.__)("Product search results updated.","woocommerce")},Ce=(e=>t=>{let{selected:r}=t;r=void 0===r?null:r;const o=null===r;return Array.isArray(r)?(0,a.createElement)(e,{...t}):(0,a.createElement)(e,{...t,selected:o?[]:[r]})})((xe=Se((0,c.withInstanceId)((e=>{const{expandedProduct:t=null,error:r,instanceId:o,isCompact:n=!1,isLoading:i,onChange:l,onSearch:c,products:s,renderItem:d,selected:m=[],showVariations:u=!1,variations:g,variationsLoading:p}=e;if(r)return(0,a.createElement)(J,{error:r});const h=[...s,...g&&t&&g[t]?g[t]:[]].map(F);return(0,a.createElement)(ve,{className:"woocommerce-products",list:h,isCompact:n,isLoading:i,isSingle:!0,selected:h.filter((({id:e})=>m.includes(Number(e)))),onChange:l,renderItem:d||(u?e=>{var t,r,n,l;const{item:c,search:s,depth:d=0,isSelected:m,onSelect:u}=e,g=null!==(t=c.details)&&void 0!==t&&t.variations&&Array.isArray(c.details.variations)?c.details.variations.length:0,h=(0,q.A)("woocommerce-search-product__item","woocommerce-search-list__item",`depth-${d}`,"has-count",{"is-searching":s.length>0,"is-skip-level":0===d&&0!==c.parent,"is-variable":g>0});if(!c.breadcrumbs.length){var v,_,b,w,E;const t=(null===(v=c.details)||void 0===v?void 0:v.variations)&&c.details.variations.length>0;return(0,a.createElement)(ke,{...e,className:(0,q.A)(h,{"is-selected":m}),isSelected:m,item:c,onSelect:()=>()=>{u(c)()},isLoading:i||p,countLabel:t?(0,O.sprintf)(/* translators: %1$d is the number of variations of a product product. */ /* translators: %1$d is the number of variations of a product product. */
(0,O.__)("%1$d variations","woocommerce"),null===(_=c.details)||void 0===_?void 0:_.variations.length):null,name:`products-${o}`,"aria-label":t?(0,O.sprintf)(/* translators: %1$s is the product name, %2$d is the number of variations of that product. */ /* translators: %1$s is the product name, %2$d is the number of variations of that product. */
(0,O._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",null===(b=c.details)||void 0===b||null===(w=b.variations)||void 0===w?void 0:w.length,"woocommerce"),c.name,null===(E=c.details)||void 0===E?void 0:E.variations.length):void 0})}const y=(0,G.isEmpty)(null===(r=c.details)||void 0===r?void 0:r.variation)?e:{...e,item:{...e.item,name:null===(n=c.details)||void 0===n?void 0:n.variation},"aria-label":`${c.breadcrumbs[0]}: ${null===(l=c.details)||void 0===l?void 0:l.variation}`};return(0,a.createElement)(ie,{...y,className:h,name:`variations-${o}`})}:()=>null),onSearch:c,messages:Ie,isHierarchical:!0})}))),({selected:e,...t})=>{const[r,o]=(0,l.useState)(!0),[n,i]=(0,l.useState)(null),[c,s]=(0,l.useState)([]),d=S.productCount>100,m=async e=>{const t=await A(e);i(t),o(!1)},u=(0,l.useRef)(e);(0,l.useEffect)((()=>{P({selected:u.current}).then((e=>{s(e),o(!1)})).catch(m)}),[u]);const g=(0,we.YQ)((t=>{P({selected:e,search:t}).then((e=>{s(e),o(!1)})).catch(m)}),400),p=(0,l.useCallback)((e=>{o(!0),g(e)}),[o,g]);return(0,a.createElement)(xe,{...t,selected:e,error:n,products:c,isLoading:r,onSearch:d?p:null})}));var xe,Ne=r(1194);const Pe=window.wp.styleEngine;function Ae(e={}){const t={};return(0,Pe.getCSSRules)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function Re(e,t){return e&&t?`has-${(0,Ne.c)(t)}-${e}`:""}const Le=e=>{const t=(e=>{const t=(0,G.isObject)(e)?e:{style:{}};let r=t.style;return(0,G.isString)(r)&&(r=JSON.parse(r)||{}),(0,G.isObject)(r)||(r={}),{...t,style:r}})(e),r=function(e){var t,r,a,o,n,i,l;const{backgroundColor:c,textColor:s,gradient:d,style:m}=e,u=Re("background-color",c),g=Re("color",s),p=function(e){if(e)return`has-${e}-gradient-background`}(d),h=p||(null==m||null===(t=m.color)||void 0===t?void 0:t.gradient);return{className:(0,q.A)(g,p,{[u]:!h&&!!u,"has-text-color":s||(null==m||null===(r=m.color)||void 0===r?void 0:r.text),"has-background":c||(null==m||null===(a=m.color)||void 0===a?void 0:a.background)||d||(null==m||null===(o=m.color)||void 0===o?void 0:o.gradient),"has-link-color":(0,G.isObject)(null==m||null===(n=m.elements)||void 0===n?void 0:n.link)?null==m||null===(i=m.elements)||void 0===i||null===(l=i.link)||void 0===l?void 0:l.color:void 0}),style:Ae({color:(null==m?void 0:m.color)||{}})}}(t),a=function(e){var t;const r=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:function(e){var t;const{borderColor:r,style:a}=e,o=r?Re("border-color",r):"";return(0,q.A)({"has-border-color":!!r||!(null==a||null===(t=a.border)||void 0===t||!t.color),[o]:!!o})}(e),style:Ae({border:r})}}(t),o=function(e){var t;return{className:void 0,style:Ae({spacing:(null===(t=e.style)||void 0===t?void 0:t.spacing)||{}})}}(t),n=(e=>{const t=(0,G.isObject)(e.style.typography)?e.style.typography:{},r=(0,G.isString)(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:r,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}})(t);return{className:(0,q.A)(n.className,r.className,a.className,o.className),style:{...n.style,...r.style,...a.style,...o.style}}},Oe=({itemId:e,linkText:t,permalink:r})=>{const o=(0,q.A)("wp-block-button__link","is-style-fill");return"preview"===e?(0,a.createElement)("div",{className:"wp-block-button aligncenter",style:{width:"100%"}},(0,a.createElement)(T.RichText.Content,{tagName:"a",className:o,href:r,title:t,style:{backgroundColor:"vivid-green-cyan",borderRadius:"5px"},value:t,target:r})):(0,a.createElement)(T.InnerBlocks,{template:[["core/buttons",{layout:{type:"flex",justifyContent:"center"}},[["core/button",{text:(0,O.__)("Shop now","woocommerce"),url:r}]]]],templateLock:"all"})},Te=({className:e="",onResize:t,...r})=>{const[o,n]=(0,l.useState)(!1),i=(0,q.A)(e,{"is-resizing":o}),c=(0,we.dh)(((e,r,a,i)=>{o||n(!0),null==t||t(e,r,a,i)}),50,{leading:!0});return(0,a.createElement)(L.ResizableBox,{className:i,enable:{bottom:!0},onResize:c,onResizeStop:(...e)=>{null==t||t(...e),n(!1)},...r})},$e=window.wp.data,Fe={icon:n,label:(0,O.__)("Featured Category","woocommerce")},Me={...Fe,cropLabel:(0,O.__)("Edit category image","woocommerce"),editLabel:(0,O.__)("Edit selected category","woocommerce")},je={...Fe,emptyMessage:(0,O.__)("No product category is selected.","woocommerce"),noSelectionButtonLabel:(0,O.__)("Select a category","woocommerce")},Be={...Fe,description:(0,O.__)("Visually highlight a product category and encourage prompt action.","woocommerce"),editLabel:(0,O.__)("Showing Featured Product block preview.","woocommerce")},Ge=(0,c.compose)([R,L.withSpokenMessages,e=>t=>{var r;const[o,n]=(0,l.useState)(!1),{attributes:i,category:c,clientId:s,product:d}=t,m=c||d,{editMode:u}=i,g=(null==m?void 0:m.link)||(null==m?void 0:m.permalink),p=(0,$e.useSelect)((e=>e("core/block-editor").getBlock(s))),h=null==p||null===(r=p.innerBlocks[0])||void 0===r?void 0:r.innerBlocks[0],v=(null==h?void 0:h.clientId)||"",_=(0,l.useMemo)((()=>(null==h?void 0:h.attributes)||{}),[h]),{url:b}=_,{updateBlockAttributes:w}=(0,$e.useDispatch)("core/block-editor");return(0,l.useEffect)((()=>{o&&v&&!u&&g&&b&&g!==b&&(w(v,{url:g}),n(!1))}),[v,o,u,g,w,b]),(0,a.createElement)(e,{...t,triggerUrlUpdate:()=>n(!0)})},e=>t=>{const[r,o]=(0,l.useState)(!1),{isSelected:n}=t;return(0,l.useEffect)((()=>{o(!1)}),[n]),(0,a.createElement)(e,{...t,useEditingImage:[r,o]})},(({description:e,editLabel:t,icon:r,label:o})=>n=>i=>{const{attributes:l,debouncedSpeak:c,name:s,setAttributes:d,triggerUrlUpdate:m=(()=>{})}=i,u=X(s);return l.editMode?(0,a.createElement)(L.Placeholder,{icon:(0,a.createElement)(L.Icon,{icon:r}),label:o,className:u},e,(0,a.createElement)("div",{className:`${u}__selection`},s===j&&(0,a.createElement)(be,{selected:l.categoryId?[l.categoryId]:[],onChange:(e=[])=>{const t=e[0]?e[0].id:0;d({categoryId:t,mediaId:0,mediaSrc:""}),m()},isSingle:!0}),s===B&&(0,a.createElement)(Ce,{selected:l.productId?[l.productId]:[],showVariations:!0,onChange:(e=[])=>{const t=e[0]?e[0].id:0;d({productId:t,mediaId:0,mediaSrc:""}),m()}}),(0,a.createElement)(L.Button,{variant:"primary",onClick:()=>{d({editMode:!1}),c(t)}},(0,O.__)("Done","woocommerce")))):(0,a.createElement)(n,{...i})})(Be),(({emptyMessage:e,icon:t,label:r,noSelectionButtonLabel:o})=>n=>i=>{const[c]=i.useEditingImage,{attributes:s,category:d,isLoading:m,isSelected:u,name:g,product:p,setAttributes:h}=i,{mediaId:v,mediaSrc:_}=s,b=d||p,[w,E]=(0,l.useState)({}),{backgroundImageSrc:y}=z({item:b,mediaId:v,mediaSrc:_,blockName:g}),f=X(g),S=(0,l.useCallback)(((e,t,r)=>{h({minHeight:parseInt(r.style.height,10)})}),[h]),k=Le(s);return c?(0,a.createElement)(n,{...i,backgroundImageSize:w}):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(n,{...i,backgroundImageSize:w}),b?(()=>{var e,t;const{contentAlign:r,dimRatio:o,focalPoint:n,hasParallax:i,isRepeated:l,imageFit:c,minHeight:g,overlayColor:h,overlayGradient:v,showDesc:_,showPrice:w,style:I,textColor:C}=s,x=(0,q.A)(f,{"is-selected":u&&"preview"!==s.categoryId&&"preview"!==s.productId,"is-loading":!b&&m,"is-not-found":!b&&!m,"has-background-dim":0!==o,"is-repeated":l},0===(N=o)||50===N?null:"has-background-dim-"+10*Math.round(N/10),"center"!==r&&`has-${r}-content`,k.className);var N;const P={borderRadius:null==I||null===(e=I.border)||void 0===e?void 0:e.radius,color:C?`var(--wp--preset--color--${C})`:null==I||null===(t=I.color)||void 0===t?void 0:t.text,boxSizing:"border-box",minHeight:g,...k.style},A=!l&&!i,R=function({focalPoint:e,imageFit:t,isImgElement:r,isRepeated:a,url:o}){let n={};var i;return n=r?{...n,...(i=e,i?{objectPosition:K(i)}:{}),objectFit:t}:{...n,...o&&{backgroundImage:`url(${o})`},backgroundPosition:K(e),...!a&&{backgroundRepeat:"no-repeat",backgroundSize:"cover"===t?t:"auto"}},n}({focalPoint:n,imageFit:c,isImgElement:A,isRepeated:l,url:y}),L={background:v,backgroundColor:h};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Te,{enable:{bottom:!0},onResize:S,showHandle:u,style:{minHeight:g}}),(0,a.createElement)("div",{className:x,style:P},(0,a.createElement)("div",{className:`${f}__wrapper`},(0,a.createElement)("div",{className:"background-dim__overlay",style:L}),y&&(A?(0,a.createElement)("img",{alt:b.name,className:`${f}__background-image`,src:y,style:R,onLoad:e=>{var t,r;E({height:null===(t=e.currentTarget)||void 0===t?void 0:t.naturalHeight,width:null===(r=e.currentTarget)||void 0===r?void 0:r.naturalWidth})}}):(0,a.createElement)("div",{className:(0,q.A)(`${f}__background-image`,{"has-parallax":i}),style:R})),(0,a.createElement)("h2",{className:`${f}__title`,dangerouslySetInnerHTML:{__html:b.name}}),!(0,G.isEmpty)(null==p?void 0:p.variation)&&(0,a.createElement)("h3",{className:`${f}__variation`,dangerouslySetInnerHTML:{__html:p.variation}}),_&&(0,a.createElement)("div",{className:`${f}__description`,dangerouslySetInnerHTML:{__html:(null==d?void 0:d.description)||(null==p?void 0:p.short_description)}}),w&&(0,a.createElement)("div",{className:`${f}__price`,dangerouslySetInnerHTML:{__html:p.price_html}}),(0,a.createElement)("div",{className:`${f}__link`},(()=>{const{categoryId:e,linkText:t,productId:r}=s;return(0,a.createElement)(Oe,{itemId:e||r,linkText:t,permalink:(d||p).permalink})})()))))})():(0,a.createElement)(L.Placeholder,{className:f,icon:(0,a.createElement)(L.Icon,{icon:t}),label:r},m?(0,a.createElement)(L.Spinner,null):(0,a.createElement)(a.Fragment,null,(0,a.createElement)("p",null,e),(0,a.createElement)("div",{style:{flexBasis:"100%",height:"0"}}),(0,a.createElement)("button",{type:"button",className:"components-button is-secondary",onClick:()=>h({editMode:!0})},o))))})(je),e=>t=>{const{error:r,isLoading:o,name:n}=t,i=X(n),l=n===j?t.getCategory:t.getProduct;return r?(0,a.createElement)(Y,{className:`${i}-error`,error:r,isLoading:o,onRetry:l}):(0,a.createElement)(e,{...t})},e=>t=>{const[r,o]=t.useEditingImage,n=(0,l.useRef)(null),{attributes:i,backgroundImageSize:c,name:s,setAttributes:d}=t,{mediaId:m,mediaSrc:u}=i,g=s===B?t.product:t.category,{backgroundImageId:p,backgroundImageSrc:h}=z({item:g,mediaId:m,mediaSrc:u,blockName:s});return r?(0,a.createElement)("div",{ref:n},(0,a.createElement)(V,{align:i.align,backgroundImageId:p,backgroundImageSize:c,backgroundImageSrc:h,containerRef:n,isEditingImage:r,setAttributes:d,setIsEditingImage:o})):(0,a.createElement)(e,{...t})},e=>t=>{const{attributes:r,name:o,setAttributes:n}=t,{alt:i,dimRatio:l,focalPoint:c,hasParallax:s,isRepeated:d,imageFit:m,mediaId:u,mediaSrc:g,overlayColor:p,overlayGradient:h,showDesc:v,showPrice:_}=r,b=o===B?t.product:t.category,{setGradient:w}=(0,T.__experimentalUseGradient)({gradientAttribute:"overlayGradient",customGradientAttribute:"overlayGradient"}),{backgroundImageSrc:E}=z({item:b,mediaId:u,mediaSrc:g,blockName:o}),y=o===B?(0,a.createElement)(L.ToggleControl,{label:(0,O.__)("Show price","woocommerce"),checked:_,onChange:()=>n({showPrice:!_})}):void 0;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(U,{alt:i,backgroundImageSrc:E,contentPanel:y,dimRatio:l,focalPoint:c,hasParallax:s,isRepeated:d,imageFit:m,overlayColor:p,overlayGradient:h,setAttributes:n,setGradient:w,showDesc:v}),(0,a.createElement)(e,{...t}))},(({cropLabel:e,editLabel:t})=>r=>o=>{const[n,i]=o.useEditingImage,{attributes:l,category:c,name:s,product:d,setAttributes:m}=o,{contentAlign:u,editMode:g,mediaId:p,mediaSrc:h}=l,v=c||d,{backgroundImageId:_,backgroundImageSrc:b}=z({item:v,mediaId:p,mediaSrc:h,blockName:s});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(D,{backgroundImageId:_,backgroundImageSrc:b,contentAlign:u,cropLabel:e,editLabel:t,editMode:g,isEditingImage:n,mediaSrc:h,setAttributes:m,setIsEditingImage:i}),(0,a.createElement)(r,{...o}))})(Me)])((()=>(0,a.createElement)(a.Fragment,null))),He=JSON.parse('{"name":"woocommerce/featured-category","version":"1.0.0","title":"Featured Category","category":"woocommerce","keywords":["WooCommerce"],"description":"Visually highlight a product category and encourage prompt action.","supports":{"align":["wide","full"],"html":false,"color":{"background":true,"text":true},"spacing":{"padding":true,"__experimentalDefaultControls":{"padding":true},"__experimentalSkipSerialization":true},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true}},"attributes":{"alt":{"type":"string","default":""},"contentAlign":{"type":"string","default":"center"},"dimRatio":{"type":"number","default":50},"editMode":{"type":"boolean","default":true},"focalPoint":{"type":"object","default":{"x":0.5,"y":0.5}},"imageFit":{"type":"string","default":"none"},"hasParallax":{"type":"boolean","default":false},"isRepeated":{"type":"boolean","default":false},"mediaId":{"type":"number","default":0},"mediaSrc":{"type":"string","default":""},"minHeight":{"type":"number","default":500},"linkText":{"default":"Shop now","type":"string"},"categoryId":{"type":"number"},"overlayColor":{"type":"string","default":"#000000"},"overlayGradient":{"type":"string"},"previewCategory":{"type":"object","default":null},"showDesc":{"type":"boolean","default":true}},"textdomain":"woocommerce","apiVersion":2,"$schema":"https://schemas.wp.org/trunk/block.json"}'),ze=window.wp.blocks;function De(e){return function(t){const r=(0,T.useBlockProps)(),{color:o,...n}=r.style;return(0,a.createElement)("div",{...r,style:n},(0,a.createElement)(e,{...t}))}}!function(e,t,r,o){var n,i,l,c,s,d,m,g,p,h,v;const _={attributes:{...r.attributes,minHeight:{type:"number",default:(0,u.getSetting)("defaultHeight",500)}},supports:{...r.supports,color:{background:null===(n=r.supports)||void 0===n||null===(i=n.color)||void 0===i?void 0:i.background,text:null===(l=r.supports)||void 0===l||null===(c=l.color)||void 0===c?void 0:c.text},spacing:{padding:null===(s=r.supports)||void 0===s||null===(d=s.spacing)||void 0===d?void 0:d.padding,__experimentalDefaultControls:{padding:null===(m=r.supports)||void 0===m||null===(g=m.spacing)||void 0===g?void 0:g.__experimentalDefaultControls},__experimentalSkipSerialization:null===(p=r.supports)||void 0===p||null===(h=p.spacing)||void 0===h?void 0:h.__experimentalSkipSerialization},__experimentalBorder:null==r||null===(v=r.supports)||void 0===v?void 0:v.__experimentalBorder}},b={attributes:{alt:"",contentAlign:"center",dimRatio:50,editMode:!1,hasParallax:!1,isRepeated:!1,height:(0,u.getSetting)("defaultHeight",500),mediaSrc:"",overlayColor:"#000000",showDesc:!0}};(0,ze.registerBlockType)(r,{..._,example:{...b,...t},edit:De(e),save:()=>(0,a.createElement)(T.InnerBlocks.Content,null),...o})}(Ge,{attributes:{categoryId:"preview",previewCategory:{id:1,name:(0,O.__)("Clothing","woocommerce"),slug:"clothing",parent:0,count:10,description:`<p>${(0,O.__)("Branded t-shirts, jumpers, pants and more!","woocommerce")}</p>\n`,image:{id:1,date_created:"2019-07-15T17:05:04",date_created_gmt:"2019-07-15T17:05:04",date_modified:"2019-07-15T17:05:04",date_modified_gmt:"2019-07-15T17:05:04",src:k+"previews/collection.jpg",name:"",alt:""},permalink:"#"},editMode:!1}},He,{icon:{src:(0,a.createElement)(i.A,{icon:n,className:"wc-block-editor-components-block-icon"})}})},6467:()=>{},2247:()=>{},4974:()=>{},6876:()=>{},7369:()=>{},8137:()=>{},6636:()=>{},1609:e=>{"use strict";e.exports=window.React},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},923:e=>{"use strict";e.exports=window.wp.isShallowEqual},5573:e=>{"use strict";e.exports=window.wp.primitives}},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return a[e].call(r.exports,r,r.exports,n),r.exports}n.m=a,e=[],n.O=(t,r,a,o)=>{if(!r){var i=1/0;for(d=0;d<e.length;d++){for(var[r,a,o]=e[d],l=!0,c=0;c<r.length;c++)(!1&o||i>=o)&&Object.keys(n.O).every((e=>n.O[e](r[c])))?r.splice(c--,1):(l=!1,o<i&&(i=o));if(l){e.splice(d--,1);var s=a();void 0!==s&&(t=s)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[r,a,o]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);n.r(o);var i={};t=t||[null,r({}),r([]),r(r)];for(var l=2&a&&e;"object"==typeof l&&!~t.indexOf(l);l=r(l))Object.getOwnPropertyNames(l).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,n.d(o,i),o},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=9918,(()=>{var e={9918:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,[i,l,c]=r,s=0;if(i.some((t=>0!==e[t]))){for(a in l)n.o(l,a)&&(n.m[a]=l[a]);if(c)var d=c(n)}for(t&&t(r);s<i.length;s++)o=i[s],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return n.O(d)},r=self.webpackChunkwebpackWcBlocksMainJsonp=self.webpackChunkwebpackWcBlocksMainJsonp||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var i=n.O(void 0,[94],(()=>n(1659)));i=n.O(i),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["featured-category"]=i})();

ESTRELLA Pharma – Affy Pharma Pvt Ltd

TREPODOX

POWDER FOR ORAL SUSPENSION
30ML (HDPE BOTTLE)

Composition

Cefpodoxime 50mg/5ml

Indications & Uses

UTIs, LRTs

TREPODOX – CV

POWDER FOR ORAL SUSPENSION
30ML (GLASS BOTTLE)

Composition

Cefpodoxime 50mg + Potassium Clavulanate 31.25mg/ 5ml

Indications & Uses

Upper & lower respiratory infections, Uncomplicated skin infections, Urinary Tract Infections

ESTY CLAV

POWDER FOR ORAL SUSPENSION
30ML (GLASS +HDPE BOTTLE)

Composition

Amoxycillin 200mg + Potassium clavulanate 28.50 mg/ 5ml

Indications & Uses

Community Acquired Pneumonia, Acute Exacerbations of Chronic Bronchitis, Upper Respiratory Tract Infections, Urinary Tract Infections

ESTRIXIME – CV

POWDER FOR ORAL SUSPENSION
30ML (GLASS BOTTLE)

Composition

Cefixime 50mg + Potassium clavulanate 31.25mg/5ml

Indications & Uses

Urinary Tract Inefctions, AECB, Otitis Media, Typhoid/p>

ESTRIXIME

POWDER FOR ORAL SUSPENSION
30ML (HDPE BOTTLE)

Composition

Cefixime 50mg/5ml

Indications & Uses

Urinary Tract Inefctions, Gastroenteritis

REOMELL

ORAL SUSPENSION
15 ml

Composition

Azithromycin 200mg/5ml

Indications & Uses

Community Acquired Pneumonia, Acute Exacerbations of Chronic Bronchitis,

TAMEST – DS

ORAL SUSPENSION
60 ml

Composition

Paracetamol 250mg/5ml

Indications & Uses

Fever, Pain

STREFEN

ORAL SUSPENSION
60 ml

Composition

Paracetamol 125mg + Mefenamic Acid 50mg/5ml

Indications & Uses

Pain, Fever

STREFOX

ORAL SUSPENSION
30 ml

Composition

Ofloxacin 50mg/5ml

Indications & Uses

Acute exacerbations of chronic Bronchitis, Diarrhoea

TAMACET-P

SYRUP
60 ml

Composition

Paracetamol 125mg + PPH 5mg + Cetirizine HCI 2mg/5ml

Indications & Uses

Fever, common cold & Flu

HEPTRELL

ORAL SUSPENSION
200ml

Composition

Cyproheptadine HCI 2mg + Tricholine citrate 0.275mg/5ml

Indications & Uses

Stimulate Apetite, Induces Weight Gain, Cure Allergies

TREP-DSR

CAPSULES ( HARD GELATIN)
10X10 (Alu-Alu)

Composition

Pantoprazole 40mg (EC) + Domperidone 30mg (SR)

Indications & Uses

GERD, Dyspepsia, Acid Peptic Disorders, Gastritis

RALE-DSR

CAPSULES ( HARD GELATIN)
11X10 (Alu-Alu)

Composition

Rabeprazole 20mg (EC) + Domperidone SR

Indications & Uses

GERD, Dyspepsia, Acid Peptic Disorders, Gastritis

STRETOP-40

INJECTION
40ml

Composition

Pantoprazole Sodium 40mg + NaCL

Indications & Uses

Acid-peptic disorders in hospitalized patients, Zollinger – Ellison Syndrome, Treatment of GERD Associated with Erasive Esophagitis, GL Bleed

DIMACID

SUSPENSION
170ml

Composition

Activated Dimethicone 25mg + Magnesium Hydroxide 200mg+ Aluminium Hydroxide Gel 200mg/10ml

Indications & Uses

Heartburn, Acid Indigestion

ELLAZYME

SYRUP
200ml

Composition

Alpha Amylase (1:2000) 50mg, Pepsin(1:3000) 10mg/5ml

Indications & Uses

Dyspepsia, Flatulence, Anorexia, Pancreatic Insufficiency

ARBOLL-Z

CAPSULES (HARD GELATIN)
10X3X10

Composition

Vitamin C 75mg + Vitamin B12 5mcg + Carbonyl Iron 100mg + Folic Acid 1.5mg + Zinc Sulphate 61.8mg

Indications & Uses

Hyphocromic Anemia in Pregnancy, Chronic and / or Acute Blood Loss, Post-gynaesurgery, Iron Deficiency Anemia

EST-D3 60K

CAPSULES (SOFT GELATIN)
10X1X4

Composition

Cholecalciferol 60000 UI

Indications & Uses

Osteoporosis, Osteoarthritis, Musculoskeletal Pain, Type- 2 Diabetes, Menstrual Irregularities, Pre-eclampsia, IUGR

STREBONA

ORAL SUSPENSION
200ml

Composition

Calcium Carbonate 625mg, Vitamin D3 125 IU/5ml

Indications & Uses

Osteomalacia, Osteoporosis, Fractures, Premenstrual Syndrome

STREFE-III

SYRUP (IRON TONIC)
300 ml

Composition

Iron (III) Hydroxide Polymaltose 50mg, Folic Acid 0.5mg/15ml

Indications & Uses

Pregnancy and lactation, Iron Deficiency Anaemia, Anaemia due to Excessive Haemorrhage, Anaemia Associated with Infections and Malignant Disease

STRECIUM

CAPSULES (SOFT GELATIN)
5X2X15

Composition

Calcitriol 0.25mcg + Calcium Carbonate 500mg + Zinc Sulphate 7.5mg

Indications & Uses

Osteoporosis, Hypoparathyroidism, Pregnancy & Lactation, Premenstrual Syndrome

ESTRE-SPAS

TABLETS
20X10

Composition

Mefenamic Acid 250mg + Dicyclomine HCI 10mg

Indications & Uses

Dysmenorrhea, Irritable Bowel Syndrome, Colic and Bladder Spasm, Abdominal Pain

TAMEST-A

TABLETS (BLISTERS)
20X10

Composition

Nimeulide 100mg + Paracetamo; 325mg

Indications & Uses

Arthritis Pain, Soft Tissue Trauma Including Sprains, Musculoskeletal Pain, Pain Following Dental Extraction

PARTRA FORTE

TABLETS

20X10

Composition

Tramadol 37.5mg + Paracetamol 325mg

Indications & Uses

Chronic Back Pain, Osteoarthritis, Postoperative Pain

UMRELY GEL

GEL
30g

Composition

Diclofenac Diethylamine 1.16% w/w + Oleum Linseed Oil 3 % w/w + Menthol 5% w/w +Methyl Salicylate 10% w/w

Indications & Uses

Sprains & Strains, Lower Back Pain, Joint Pain, Knee Pain

MOISTACT

CREAM
20g

Composition

Urea 10% +Lactic Acid 10% + Propylene Glycol 10% + Liquid Paraffin 10%

Indications & Uses

Foot Cracks, Keratolytic

BELODIP

OINTMENT
15g

Composition

Clotrimazole 1% w/w + Beclomethasone Dipropionate 0.025% w/w + Neomycin 0.5% w/w

Indications & Uses

Eczema, Psoriasis, Corticosteroid Responsive Dermatoses

MIN-DAND

LOTION
100 ml

Composition

Ketoconazole 2% w/v

Indications & Uses

Pityriasis, Dandruff

MIN-DAND-Z

LOTION
100 ml

Composition

Ketoconazole Shampoo 2% w/v + ZPTO 1% w/v

Indications & Uses

Pityriasis, Dandruff

MIN-DAND

SOAP
75g

Composition

Ketoconazole 1% w/w

Indications & Uses

Tinea Versicolor, Prophylaxis of Pityriasis Versicolor

FLUTRELLA

TABLETS
20X1X1

Composition

Fluconazole 200mg

Indications & Uses

Vaginal Candidiasis, Brochopulmonary Infections, Candiduria, Tinea Pedis, Corposis, Cruris, Versicolor

ESTRAVIT

SYRUP
200ml

Composition

L-Iysine HCI 25mg + Vitamin B1 2.5mg + Vitamin B2 2.5mg + Vitamin B6 0.75mg + D-panthenol 3mg +Niacinamide 25mg + Mecobalamin 2mcg/10ml

Indications & Uses

Sub-optimal Growth, Poor Weight Gain, Malnutrition, Prolonged Illness

LYCOSTER PLUS

SYRUP
225ml

Composition

Each 10ml Contains: Lycopene 6% 1000mcg + Vitamin A Palmitate 2500 IU + Vitamin E 10 IU + Ascorbic Acid 50mg + Selenium (as Sodium Selenate) 35mcg + Zinc (As Zinc Gluconate) 3mg + Manganese (as Manganese Gluconate) 2mg + Iodine ( As Potassium Iodine) 100mcg + Copper (As Copper Sulphate0 500mcg + Thiamine HCI 2mg + Riboflavine 3mg + Pyridoxine HCI 1.5mg

Indications & Uses

Tiredness, Stress, Feeling of Weakness, Vitality Deficiency

OSERON

CAPSULES (SOFT GELATIN)
10X1X10

Composition

Antioxidant, Multivitamin & Multiminerals

Indications & Uses

Tiredness, Stress, Feeling of Weakness, Vitality Deficiency

GERMELLA

CAPSULES (SOFT GELATIN)
10X1X10

Composition

Vitamin E (Natural) 400 IU + Wheat Germ Oil 100mg + Omega 3 Fatty Acids 30mg

Indications & Uses

Ulcerative colitis, Metabolic Syndrome, Rheumatoid Arthritis, Type-2 Diabetes, Cardiovascular Diseases

LYCOSTER GOLD

CAPSULES (SOFT GELATIN)
10X1X10

Composition

Each SG Contains Lycopene 6% 2000 IU + Vitamin A 2500 IU + Vitamin E Acetate 10 IU + Vitamin C 50 mg + Zinc sulphate Monohydrate 27.45mg + Selenium Dioxide 70mcg

Indications & Uses

Idiopathic Male Infertility, Pre-eclampsia, Prostate Cancer, Cardiovascular Diseases, Diabetes Mellitus

OSERON -G

CAPSULES (SOFT GELATIN)
10X1X11

Composition

Ginseng + Multivitamin + Multimineral

Indications & Uses

Tiredness, Stress, Feeling of Weakness, Vitality Deficiency

OSERON -G

CAPSULES (SOFT GELATIN)
10X1X11

Composition

Ginseng + Multivitamin + Multimineral

Indications & Uses

Tiredness, Stress, Feeling of Weakness, Vitality Deficiency

ESTRIXIME-200 LB

TABLETS (Alu-Alu)
20X10

Composition

Cefixime 200mg + Lactic Acid Bacilus 2.5 billion spores

Indications & Uses

Otitis Media, Pharyngitis & Tonsillitis, Uncomplicated Urinary Tract Infections, Acute Exacerbations of Chronic Bronchitis, Enteric Fever

ESTRIXIME-CV-325

TABLETS (Alu-Alu)
10X1X6

Composition

Cefixime 200mg + Potassium Clavulanate 125mg

Indications & Uses

Respiratory Tract Infections, Urinary Tract Infections, Skin & Skin Structure Infections

ESTY CLAV-625 LB

TABLETS (Alu-Alu)
10X1X6

Composition

Amoxycillin 500mg + Potassium Clavulanate 125mg

Indications & Uses

Respiratory Tract Infections, Community Acquired Pneumonia, Gynaecological Infections, Acute Exacerbations of Chronic Bronchitis, Skin and Soft Tissue Infections

FLOXEST

TABLETS (Blister)
20X10

Composition

Ofloxacin 200mg + Ornidazole 500mg

Indications & Uses

Surgical ions, Diarrheas of Mixed Etiology, Gynaecological Infections, Orofacial and Dental Infections

VOFLOX-500

TABLETS
10X10

Composition

Levofloxacin 500mg

Indications & Uses

Acute Bacterial Sinusitis, Acute Bacterial Exacerbations of Chronic Bronchitis, Skin & Skin Structure Infections, Chronic Bacterial Prostatitis, Urinary Tract Infections

FLOXEST – O

TABLETS (Alu-Alu)
20X10

Composition

Cefixime 200mg + Ofloxacin 200mg

Indications & Uses

Community Acquired Pneumonia, Multiple Drug Resistant-TB, Typhoid

FLOXEST

TABLETS (Alu-Alu)
20X10

Composition

Ofloxacin 200mg

Indications & Uses

Community Acquired Pneumonia, Multiple Drug Resistant-TB, Typhoid

ESTY CLAV- 1.2

INJECTIONS
1.2g

Composition

Amoxycillin 1000mg + Potassium Clavulanate 200mg + WFI

Indications & Uses

Community Acquired Pneumonia, Gynaecological Infections, Upper Respiratory Tract Infections, Skin and Soft Tissue Infections, Urinary Tract Infections, Acute Exacerbations of Chronic Bronchitis

TRELLON-SB 1.5

INJECTIONS
1.5g

Composition

Ceftriaxone 1000mg + Sulbactam 500mg + WFI

Indications & Uses

Gynaecological Infections, Lower Respiratory Tract Infections, Intra-abdominal Infections with Aerobic Organisms, Surgical Prophylaxis

TRELLON-TZ 1.125

INJECTIONS
1.125gm

Composition

Ceftriaxone 1000mg + Tazobactam 500 mg + WFI

Indications & Uses

Bone & Joint Infections, Intra-abdominal Infections, Bacterial Meningitis, Pre-operative Surgical Prophylaxis

RELLAM

INJECTIONS
1gm

Composition

Meropenem 1gm + WFI

Indications & Uses

Complicated Intra-abdominal Infection (cIAI), Complicated Skin & Skin Structure Infections (cSSSI), Bacterial Meningitis, Noscocomial Pneumonia

TRELIN-Z 4.5

INJECTIONS
4.5gm

Composition

Piperacillin 4000mg + Tazobactam 500mg + WFI

Indications & Uses

Intra-abdominal Infections, Complicated Urinary Tract Infections, Febrile Neutropenia, Lower Respiratory Tract Infections

TRELIN-Z 4.5

INJECTIONS
4.5gm

Composition

Piperacillin 4000mg + Tazobactam 500mg + WFI

Indications & Uses

Intra-abdominal Infections, Complicated Urinary Tract Infections, Febrile Neutropenia, Lower Respiratory Tract Infections

BUTRELLA

SYRUP

100ml

Composition

Ambroxol HCI 15mg + Guaiphensin 50mg + Terbutaline Sulphate 1.5mg + Mentholated Base/5ml

Indications & Uses

Bronchitis, Productive Cough, Emphysema, Bronchial Asthma

BUTRELLA-BR

SYRUP

100ml

Composition

Terbutaline Sulphate 1.25mg + Bromhexine HCI 4mg + Guaiphenesin 50mg + Methalated Base/5ml

Indications & Uses

Acute Cough, Abnormal Mucus Secretion, Productive Cough

DEXTRIN

SYRUP
100ml

Composition

Dextromethorphan Hydrobromide 10mg + Phenylpherine 5 mg + Cetrizine 5mg + Mentholated Base/5ml

Indications & Uses

Commom Cold and Flu, Nasal Congestion, Sore Throat

VOTRELL-M

TABLETS (Alu-Alu)
20X10

Composition

Levocetirizine 5mg + Montelukast 10mg

Indications & Uses

Allergic Rhinitis, Nasal Congestion, Asthma

VOTRELL

TABLETS (Alu-Alu)
20X11

Composition

Levocetirizine 5mg

Indications & Uses

Chronic Idiopathic Urticaria (CIU), Seasonal Allergic Rhinitis (SAR), Perennial Allergic Rhinitis (PAR)

Arrange A Callback
[]
1 Step 1
Full Name
Telephone
Departmentyour full name
Postal Address
Message
0 /
Previous
Next
Shopping Basket