"use strict";(globalThis.webpackChunk_wcAdmin_webpackJsonp=globalThis.webpackChunk_wcAdmin_webpackJsonp||[]).push([[9669],{73224:(e,t,o)=>{o.d(t,{Z:()=>a});var c=o(69307),r=o(70444);const a=(0,c.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,c.createElement)(r.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}))},86241:(e,t,o)=>{o.d(t,{Z:()=>a});var c=o(69307),r=o(70444);const a=(0,c.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,c.createElement)(r.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}))},84560:(e,t,o)=>{o.d(t,{Z:()=>a});var c=o(69307),r=o(70444);const a=(0,c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(r.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}))},85797:(e,t,o)=>{o.d(t,{Z:()=>a});var c=o(69307),r=o(70444);const a=(0,c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(r.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}))},28957:(e,t,o)=>{o.r(t),o.d(t,{default:()=>dt});var c=o(69307);const r=(0,c.createContext)({isLoading:!1,setIsLoading:()=>{},selectedTab:"",setSelectedTab:()=>{}});function a(e){const[t,o]=(0,c.useState)(!0),[a,n]=(0,c.useState)(""),s={isLoading:t,setIsLoading:o,selectedTab:a,setSelectedTab:n};return(0,c.createElement)(r.Provider,{value:s},e.children)}var n=o(65736);function s(){return(0,c.createElement)("h1",{className:"woocommerce-marketplace__header-title"},(0,n.__)("Extensions","woocommerce"))}var l=o(55609),i=o(70444);const m=(0,c.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(i.Path,{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"}));var u=o(23374),p=o(12532);const d=(0,c.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(i.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));var _=o(73463);function g(e){const{setIsModalOpen:t,disconnectURL:o}=e,[r,a]=(0,c.useState)(!1),s=()=>t(!1);return(0,c.createElement)(l.Modal,{title:(0,n.__)("Are you sure?","woocommerce"),onRequestClose:s,focusOnMount:!0,className:"woocommerce-marketplace__header-account-modal",style:{borderRadius:4},overlayClassName:"woocommerce-marketplace__header-account-modal-overlay"},(0,c.createElement)("p",{className:"woocommerce-marketplace__header-account-modal-text"},(0,n.__)("Keep your your account connected to manage your subscriptions, get updates and support for your extensions and themes.","woocommerce")),(0,c.createElement)(l.ButtonGroup,{className:"woocommerce-marketplace__header-account-modal-button-group"},(0,c.createElement)(l.Button,{variant:"tertiary",href:o,onClick:()=>a(!r),isBusy:r,isDestructive:!0,className:"woocommerce-marketplace__header-account-modal-button"},(0,n.__)("Disconnect account","woocommerce")),(0,c.createElement)(l.Button,{variant:"primary",onClick:s,className:"woocommerce-marketplace__header-account-modal-button"},(0,n.__)("Keep connected","woocommerce"))))}const w="discover",y="/extensions",M="https://woo.com/cart/",N="https://woo.com/document/managing-woocommerce-com-subscriptions/#transfer-a-woocommerce-com-subscription";function E(){var e,t,o;const[r,a]=(0,c.useState)(!1),s=()=>a(!0),i=(0,_.O3)("wccomHelper",{}),w=null!==(e=null==i?void 0:i.isConnected)&&void 0!==e&&e,y=null!==(t=null==i?void 0:i.connectURL)&&void 0!==t?t:"",M=null==i?void 0:i.userEmail,N=null!==(o=null==i?void 0:i.userAvatar)&&void 0!==o?o:m,E="https://woo.com/my-dashboard/",h=w?E:y,v=w?(0,n.__)("Connected","woocommerce"):(0,n.__)("Not Connected","woocommerce");return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(l.DropdownMenu,{className:"woocommerce-marketplace__user-menu",icon:w?(0,c.createElement)("img",{src:N,alt:"",className:"woocommerce-marketplace__menu-avatar-image"}):m,label:(0,n.__)("User options","woocommerce")},(()=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(l.MenuGroup,{className:"woocommerce-layout__homescreen-display-options",label:v},(0,c.createElement)(l.MenuItem,{className:"woocommerce-marketplace__menu-item",href:h},w?(0,c.createElement)(c.Fragment,null,(0,c.createElement)(u.Z,{icon:m,size:24,className:"woocommerce-marketplace__menu-icon"}),(0,c.createElement)("span",{className:"woocommerce-marketplace__main-text"},M)):(0,c.createElement)(c.Fragment,null,(0,c.createElement)(u.Z,{icon:m,size:24,className:"woocommerce-marketplace__menu-icon"}),(0,c.createElement)("div",{className:"woocommerce-marketplace__menu-text"},(0,n.__)("Connect account","woocommerce"),(0,c.createElement)("span",{className:"woocommerce-marketplace__sub-text"},(0,n.__)("Manage your subscriptions, get updates and support for your extensions and themes.","woocommerce"))))),(0,c.createElement)(l.MenuItem,{href:E},(0,c.createElement)(u.Z,{icon:p.Z,size:24,className:"woocommerce-marketplace__menu-icon"}),(0,n.__)("Woo.com account","woocommerce"))),w&&(0,c.createElement)(l.MenuGroup,{className:"woocommerce-layout__homescreen-display-options"},(0,c.createElement)(l.MenuItem,{onClick:s},(0,c.createElement)(u.Z,{icon:d,size:24,className:"woocommerce-marketplace__menu-icon"}),(0,n.__)("Disconnect account","woocommerce")))))),r&&(0,c.createElement)(g,{setIsModalOpen:a,disconnectURL:y}))}var h=o(83849),v=o.n(h),b=o(10431);const k={search:{name:"search",title:(0,n.__)("Search results","woocommerce")},discover:{name:"discover",title:(0,n.__)("Discover","woocommerce")},extensions:{name:"extensions",title:(0,n.__)("Browse","woocommerce")},themes:{name:"themes",title:(0,n.__)("Themes","woocommerce")},"my-subscriptions":{name:"my-subscriptions",title:(0,n.__)("My subscriptions","woocommerce")}},f=e=>{if(""===e)return k;const t={...k};return"search"!==e&&delete t.search,t},x=e=>{const{additionalClassNames:t}=e,o=(0,c.useContext)(r),{selectedTab:a,setSelectedTab:n}=o,[s,i]=(0,c.useState)(f("")),m=(0,b.useQuery)();return(0,c.useEffect)((()=>{null!=m&&m.tab&&k[m.tab]?n(m.tab):Object.keys(m).length>0&&n(w)}),[m,n]),(0,c.useEffect)((()=>{i(f(a))}),[a]),(0,c.createElement)("nav",{className:v()("woocommerce-marketplace__tabs",t||[])},((e,t)=>{const{selectedTab:o,setSelectedTab:r}=e,a=e=>{e!==o&&(r(e),(e=>{(0,b.navigateTo)({url:(0,b.getNewPath)({tab:e===w?void 0:e},y,{})})})(e))},n=[];for(const e in t){var s,i,m,u;n.push(null!==(s=k[e])&&void 0!==s&&s.href?(0,c.createElement)("a",{className:v()("woocommerce-marketplace__tab-button","components-button",`woocommerce-marketplace__tab-${e}`),href:null===(i=k[e])||void 0===i?void 0:i.href,key:e},null===(m=k[e])||void 0===m?void 0:m.title):(0,c.createElement)(l.Button,{className:v()("woocommerce-marketplace__tab-button",`woocommerce-marketplace__tab-${e}`,{"is-active":e===o}),onClick:()=>a(e),key:e},null===(u=k[e])||void 0===u?void 0:u.title))}return n})(o,s))},T=(0,c.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(i.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})),D=(0,n.__)("Search for extensions and themes","woocommerce"),I=function(){const[e,t]=(0,c.useState)(""),o=(0,b.useQuery)();(0,c.useEffect)((()=>{o.term?t(o.term):t("")}),[o.term]),(0,c.useEffect)((()=>{"search"!==o.tab&&t("")}),[o.tab]);const r=()=>{const t=e.trim(),o={};return""!==t&&(o.term=t,o.tab="search"),(0,b.navigateTo)({url:(0,b.getNewPath)(o,y,{})}),[]};return(0,c.createElement)("div",{className:"woocommerce-marketplace__search"},(0,c.createElement)("label",{className:"screen-reader-text",htmlFor:"woocommerce-marketplace-search-query"},D),(0,c.createElement)("input",{id:"woocommerce-marketplace-search-query",value:e,className:"woocommerce-marketplace__search-input",type:"search",name:"woocommerce-marketplace-search-query",placeholder:D,onChange:e=>{t(e.target.value)},onKeyUp:e=>{"Enter"===e.key&&r(),"Escape"===e.key&&t("")}}),(0,c.createElement)("button",{id:"woocommerce-marketplace-search-button",className:"woocommerce-marketplace__search-button","aria-label":(0,n.__)("Search","woocommerce"),onClick:r},(0,c.createElement)(u.Z,{icon:T,size:32})))};function z(){return(0,c.createElement)("header",{className:"woocommerce-marketplace__header"},(0,c.createElement)(s,null),(0,c.createElement)(x,{additionalClassNames:["woocommerce-marketplace__header-tabs"]}),(0,c.createElement)(I,null),(0,c.createElement)("div",{className:"woocommerce-marketplace__header-meta"},(0,c.createElement)(E,null)))}let A,C;!function(e){e.theme="theme",e.extension="extension"}(A||(A={})),function(e){e.theme="theme",e.extension="extension",e.all="all"}(C||(C={}));var j=o(14599),S=o(86989),L=o.n(S),O=o(9818);let Q;!function(e){e.Success="success",e.Error="error"}(Q||(Q={}));const U={notices:{}},P=(0,O.createReduxStore)("woocommerce-admin/subscription-notices",{reducer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_NOTICE":return{...e,notices:{...e.notices,[t.productKey]:{productKey:t.productKey,message:t.message,status:t.status,options:t.options}}};case"REMOVE_NOTICE":const o={...e.notices};return o[t.productKey]&&delete o[t.productKey],{...e,notices:o}}return e},actions:{addNotice:(e,t,o,c)=>({type:"ADD_NOTICE",productKey:e,message:t,status:o,options:c}),removeNotice:e=>({type:"REMOVE_NOTICE",productKey:e})},selectors:{notices:e=>e?Object.values(e.notices):[],getNotice(e,t){if(e)return e.notices[t]}}});(0,O.register)(P);const Y=new Map;function Z(){for(;Y.size>100;)Y.delete(Y.keys().next().value)}async function R(e,t){return Y.get(e)?new Promise((t=>{t(Y.get(e))})):new Promise(((o,c)=>{fetch(e,{signal:t}).then((e=>{if(!e.ok)throw new Error(e.statusText);return e.json()})).then((t=>{Y.set(e,t),Z(),o(t)})).catch((()=>{c()}))}))}async function B(){let e="/wc/v3/marketplace/featured";_.MV.userLocale&&(e=`${e}?locale=${_.MV.userLocale}`);try{return await async function(e){const t=JSON.stringify(e);return Y.get(t)?new Promise((e=>{e(Y.get(t))})):new Promise(((o,c)=>{L()(e).then((e=>{Y.set(t,e),Z(),o(e)})).catch((()=>{c()}))}))}({path:e.toString()})}catch(e){return[]}}function V(e){if(!0===e.active)return Promise.resolve();const t=new URLSearchParams;return t.append("product_key",e.product_key),L()({path:"/wc/v3/marketplace/subscriptions/connect".toString(),method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:t})}function G(e,t){return new Promise(((o,c)=>{window.wp.updates?window.wp.updates.ajax(e,{...t,success:e=>{!1===e.success&&c({success:!1,data:{message:e.errorMessage}}),o()},error:e=>{c({success:!1,data:{message:e.errorMessage}})}}):c((0,n.__)("Please reload and try again","woocommerce"))}))}function H(e,t,o,r){var a;o===Q.Error?(0,O.dispatch)(P).addNotice(e,t,o,r):(null!==(a=r)&&void 0!==a&&a.icon||(r={...r,icon:(0,c.createElement)(l.Icon,{icon:"saved"})}),(0,O.dispatch)("core/notices").createSuccessNotice(t,r))}const F=e=>{(0,O.dispatch)(P).removeNotice(e)},W=(e,t)=>{if(!e)return e;const o=new URL(e);return o?(t.forEach((e=>{let[t,c]=e;o.searchParams.set(t,c)})),o.toString()):e},K=e=>W(M,[["renew_product",e.product_id.toString()],["product_key",e.product_key],["order_id",e.order_id.toString()]]),J=e=>W(M,[["add-to-cart",e.product_id.toString()]]),X=function(e){var t;const{isLoading:o,type:r}=e,a=(0,b.useQuery)(),s=null!==(t=e.product)&&void 0!==t?t:{title:"",description:"",vendorName:"",vendorUrl:"",icon:"",url:"",price:0,image:""};function i(t,o){const c=e.tracksData;c.position&&(o.position=c.position),c.label&&(o.label=c.label),c.group&&(o.group=c.group),c.searchTerm&&(o.search_term=c.searchTerm),c.category&&(o.category=c.category),(0,j.queueRecordEvent)(t,o)}const m=r===A.theme;let u=null==s?void 0:s.vendorName;null!=s&&s.vendorName&&null!=s&&s.vendorUrl&&(u=(0,c.createElement)("a",{href:s.vendorUrl,rel:"noopener noreferrer",onClick:()=>{i("marketplace_product_card_vendor_clicked",{product:s.title,vendor:s.vendorName,product_type:r})}},s.vendorName));const p=v()("woocommerce-marketplace__product-card",`woocommerce-marketplace__product-card--${r}`,{"is-loading":o});return(0,c.createElement)(l.Card,{className:p,"aria-hidden":o},(0,c.createElement)("div",{className:"woocommerce-marketplace__product-card__content"},m&&(0,c.createElement)("div",{className:"woocommerce-marketplace__product-card__image"},!o&&(0,c.createElement)("img",{className:"woocommerce-marketplace__product-card__image-inner",src:s.image,alt:s.title})),(0,c.createElement)("div",{className:"woocommerce-marketplace__product-card__header"},(0,c.createElement)("div",{className:"woocommerce-marketplace__product-card__details"},!m&&(0,c.createElement)(c.Fragment,null,o&&(0,c.createElement)("div",{className:"woocommerce-marketplace__product-card__icon"}),!o&&s.icon&&(0,c.createElement)("img",{className:"woocommerce-marketplace__product-card__icon",src:s.icon,alt:s.title})),(0,c.createElement)("div",{className:"woocommerce-marketplace__product-card__meta"},(0,c.createElement)("h2",{className:"woocommerce-marketplace__product-card__title"},(0,c.createElement)("a",{className:"woocommerce-marketplace__product-card__link",href:a.ref?W(s.url,[["utm_content",a.ref]]):s.url,rel:"noopener noreferrer",onClick:()=>{i("marketplace_product_card_clicked",{product:s.title,vendor:s.vendorName,product_type:r})}},o?" ":s.title)),o&&(0,c.createElement)("p",{className:"woocommerce-marketplace__product-card__vendor"}),!o&&u&&(0,c.createElement)("p",{className:"woocommerce-marketplace__product-card__vendor"},(0,c.createElement)("span",null,(0,n.__)("By ","woocommerce")),u)))),!m&&(0,c.createElement)("p",{className:"woocommerce-marketplace__product-card__description"},!o&&s.description),(0,c.createElement)("div",{className:"woocommerce-marketplace__product-card__price"},!o&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)("span",{className:"woocommerce-marketplace__product-card__price-label"},0===s.price?(0,n.__)("Free download","woocommerce"):"$"+s.price),(0,c.createElement)("span",{className:"woocommerce-marketplace__product-card__price-billing"},0===s.price?"":(0,n.__)(" annually","woocommerce"))))))};function $(e){const t=(0,_.O3)("wccomHelper",{}),o=v()("woocommerce-marketplace__product-list-content",e.className);return(0,c.createElement)("div",{className:o},e.products.map(((o,r)=>(0,c.createElement)(X,{key:o.id,type:e.type,product:{title:o.title,image:o.image,type:o.type,icon:o.icon,vendorName:o.vendorName,vendorUrl:o.vendorUrl?W(o.vendorUrl,[["utm_source","extensionsscreen"],["utm_medium","product"],["utm_campaign","wcaddons"],["utm_content","devpartner"]]):"",price:o.price,url:W(o.url,Object.entries(t.inAppPurchaseURLParams)),description:o.description},tracksData:{position:r+1,...o.label&&{label:o.label},...e.group&&{group:e.group},...e.searchTerm&&{searchTerm:e.searchTerm},...e.category&&{category:e.category}}}))))}var q=o(86020);function ee(e){const{title:t,groupURL:o}=e,r=""===t,a=v()("woocommerce-marketplace__product-list-header",{"is-loading":r});return(0,c.createElement)("div",{className:a,"aria-hidden":r},(0,c.createElement)("h2",{className:"woocommerce-marketplace__product-list-title"},t),null!==o&&(0,c.createElement)("span",{className:"woocommerce-marketplace__product-list-link"},(0,c.createElement)(q.Link,{href:o,target:"_blank",onClick:()=>{(0,j.recordEvent)("marketplace_see_more_clicked",{group_title:t,group_url:o})}},(0,n.__)("See more","woocommerce"))))}function te(e){const{title:t,products:o,groupURL:r,type:a}=e;return(0,c.createElement)("div",{className:"woocommerce-marketplace__product-list"},(0,c.createElement)(ee,{title:t,groupURL:r}),(0,c.createElement)($,{group:t,products:o,type:a}))}function oe(e){const{hasTitle:t,type:o}=e,r=e.placeholderCount||12;return(0,c.createElement)("div",{className:"woocommerce-marketplace__product-list"},!1!==t&&(0,c.createElement)(ee,{title:"",groupURL:null}),(0,c.createElement)("div",{className:"woocommerce-marketplace__product-list-content"},[...Array(r)].map(((e,t)=>(0,c.createElement)(X,{key:t,isLoading:!0,type:o,tracksData:{}})))))}function ce(){const[e,t]=(0,c.useState)([]),o=(0,c.useContext)(r),{isLoading:a,setIsLoading:n}=o;if((0,c.useEffect)((()=>{n(!0),B().then((e=>Array.isArray(e)?e:[])).then((e=>{t(e),function(e){const t=e.flatMap((e=>e.items)).map((e=>e.id));(0,j.recordEvent)("marketplace_discover_viewed",{view:"discover",product_ids:t})}(e)})).finally((()=>{n(!1)}))}),[]),a)return(0,c.createElement)("div",{className:"woocommerce-marketplace__discover"},(0,c.createElement)(oe,{placeholderCount:9,type:A.extension}));const s=e.flatMap((e=>e));return(0,c.createElement)("div",{className:"woocommerce-marketplace__discover"},s.map((e=>(0,c.createElement)(te,{key:e.id,title:e.title,products:e.items,groupURL:e.url,type:e.itemType}))))}var re=o(5267);function ae(e){const t=""===e.label,o=v()("woocommerce-marketplace__category-item-button",{"woocommerce-marketplace__category-item-button--selected":e.selected,"is-loading":t});return(0,c.createElement)("button",{className:o,onClick:function(e){const t=e.currentTarget.value;t&&(0,b.navigateTo)({url:(0,b.getNewPath)({category:t})})},value:e.slug,"aria-hidden":t},e.label)}var ne=o(86241),se=o(73224);function le(e){function t(t){const o=t.currentTarget.value;o&&(e.onClick(),(0,b.navigateTo)({url:(0,b.getNewPath)({category:o})}))}return(0,c.createElement)("ul",{className:"woocommerce-marketplace__category-dropdown-list"},e.categories.map((o=>{var r;return(0,c.createElement)("li",{className:"woocommerce-marketplace__category-dropdown-item",key:o.slug},(0,c.createElement)("button",{className:v()("woocommerce-marketplace__category-dropdown-item-button",{"woocommerce-marketplace__category-dropdown-item-button--selected":o.slug===(null===(r=e.selected)||void 0===r?void 0:r.slug)}),value:o.slug,onClick:t},o.label))})))}function ie(e){return(0,c.createElement)(l.Dropdown,{renderToggle:t=>{let{isOpen:o,onToggle:r}=t;return(0,c.createElement)("button",{onClick:()=>{o||(0,j.recordEvent)("marketplace_category_dropdown_opened",{type:e.type}),r()},className:e.buttonClassName,"aria-label":(0,n.__)("Toggle category dropdown","woocommerce")},e.label,(0,c.createElement)(u.Z,{icon:o?ne.Z:se.Z,size:e.arrowIconSize}))},className:e.className,renderContent:t=>{let{onToggle:o}=t;return(0,c.createElement)(le,{categories:e.categories,selected:e.selected,onClick:o})},contentClassName:e.contentClassName})}const me={[A.extension]:"_all",[A.theme]:"themes"};function ue(e){const[t,o]=(0,c.useState)([]),[r,a]=(0,c.useState)([]),[s,l]=(0,c.useState)(),[i,m]=(0,c.useState)(!1),u=(0,b.useQuery)();return(0,c.useEffect)((()=>{let o=me[e.type];u.category&&(o=u.category);const c=t.concat(r).find((e=>e.slug===o));c&&l(c)}),[u.category,e.type,t,r]),(0,c.useEffect)((()=>{m(!0),function(e){const t=new URL("https://woo.com/wp-json/wccom-extensions/1.0/categories");return _.MV.userLocale&&t.searchParams.set("locale",_.MV.userLocale),e===A.theme&&t.searchParams.set("parent","themes"),R(t.toString()).then((e=>e)).catch((()=>[]))}(e.type).then((e=>{const t=e.map((e=>({...e,selected:!1}))).filter((e=>"_featured"!==e.slug)),c=t.slice(0,7),r=t.slice(7);o(c),a(r)})).catch((()=>{o([]),a([])})).finally((()=>{m(!1)}))}),[e.type]),i?(0,c.createElement)(c.Fragment,null,(0,c.createElement)("ul",{className:"woocommerce-marketplace__category-selector"},[...Array(5)].map(((e,t)=>(0,c.createElement)("li",{key:t,className:"woocommerce-marketplace__category-item"},(0,c.createElement)(ae,{slug:"",label:"",selected:!1})))))):(0,c.createElement)(c.Fragment,null,(0,c.createElement)("ul",{className:"woocommerce-marketplace__category-selector"},t.map((e=>(0,c.createElement)("li",{className:"woocommerce-marketplace__category-item",key:e.slug},(0,c.createElement)(ae,(0,re.Z)({},e,{selected:e.slug===(null==s?void 0:s.slug)}))))),(0,c.createElement)("li",{className:"woocommerce-marketplace__category-item"},r.length>0&&(0,c.createElement)(ie,{type:e.type,label:(0,n.__)("More","woocommerce"),categories:r,buttonClassName:v()("woocommerce-marketplace__category-item-button",{"woocommerce-marketplace__category-item-button--selected":!!s&&r.find((e=>e.slug===s.slug))}),contentClassName:"woocommerce-marketplace__category-item-content",arrowIconSize:20,selected:s}))),(0,c.createElement)("div",{className:"woocommerce-marketplace__category-selector--full-width"},(0,c.createElement)(ie,{type:e.type,label:function(){const e=(0,n.__)("All Categories","woocommerce");return s?"All"===s.label?e:s.label:e}(),categories:t.concat(r),buttonClassName:"woocommerce-marketplace__category-dropdown-button",className:"woocommerce-marketplace__category-dropdown",contentClassName:"woocommerce-marketplace__category-dropdown-content",selected:s})))}function pe(e){const[t,o]=(0,c.useState)(),[r,a]=(0,c.useState)(!1),s=(0,b.useQuery)(),l="search"===s.tab&&s.section,i={[C.all]:["most-popular","popular-themes"],[C.theme]:["popular-themes"],[C.extension]:["most-popular"]};return(0,c.useEffect)((()=>{a(!0),B().then((t=>{const c=i[e.type];if(!c)return;const r=t.filter((e=>c.includes(e.id)));r&&(r.forEach((e=>{e.items=e.items.slice(0,4)})),o(r))})).catch((()=>{o(void 0)})).finally((()=>{a(!1)}))}),[]),(0,c.createElement)("div",{className:"woocommerce-marketplace__no-results"},function(){if(!l)return(0,c.createElement)(c.Fragment,null);if(e.type===C.all)return(0,c.createElement)(c.Fragment,null);let t=A.extension;return e.type===C.theme&&(t=A.theme),(0,c.createElement)(ue,{type:t})}(),(0,c.createElement)("div",{className:"woocommerce-marketplace__no-results__content"},(0,c.createElement)("h2",{className:"woocommerce-marketplace__no-results__heading"},e.showHeading?e.heading:""),(0,c.createElement)("p",{className:"woocommerce-marketplace__no-results__description"},(0,n.__)("Try searching again using a different term, or take a look at our recommendations below.","woocommerce"))),(0,c.createElement)("div",{className:"woocommerce-marketplace__no-results__product-groups"},r?(0,c.createElement)(c.Fragment,null,(0,c.createElement)(oe,{type:A.extension,placeholderCount:4}),(0,c.createElement)(oe,{type:A.theme,placeholderCount:4})):t&&0!==t.length?(0,c.createElement)(c.Fragment,null,t.map((e=>{return(0,c.createElement)(te,{title:(t=e.id,"popular-themes"===t?(0,n.__)("Our favorite themes","woocommerce"):(0,n.__)("Most popular extensions","woocommerce")),products:e.items,groupURL:e.url,type:e.itemType,key:e.id});var t}))):(0,c.createElement)(c.Fragment,null)))}const de={[A.extension]:{label:(0,n.__)("extensions","woocommerce"),singularLabel:(0,n.__)("extension","woocommerce")},[A.theme]:{label:(0,n.__)("themes","woocommerce"),singularLabel:(0,n.__)("theme","woocommerce")}};function _e(e){var t,o,a,s,i,m;const u=(0,c.useContext)(r),{isLoading:p}=u,d=de[e.type].label,_=de[e.type].singularLabel,g=(0,b.useQuery)(),w=null==g?void 0:g.category,y=null!==(t=e.perPage)&&void 0!==t?t:60,M=null!==(o=e.showAllButton)&&void 0!==o&&o,N=null!==(a=null===(s=e.products)||void 0===s?void 0:s.length)&&void 0!==a?a:0,E=null!==(i=null===(m=e.products)||void 0===m?void 0:m.slice(0,y))&&void 0!==i?i:[];let h=(0,n.sprintf)((0,n.__)("0 %s found","woocommerce"),d);N>0&&(h=(0,n.sprintf)((0,n._n)("%1$s %2$s","%1$s %3$s",N,"woocommerce"),N,_,d));const k="woocommerce-marketplace__search-",f=v()(k+d),x=v()("woocommerce-marketplace__product-list-title",k+"product-list-title--"+d,{"is-loading":p}),T=v()("woocommerce-marketplace__view-all-button",k+"button-"+d);return(0,c.createElement)("div",{className:f},(0,c.createElement)("h2",{className:x},p?" ":h),function(){if(p)return(0,c.createElement)(c.Fragment,null,e.categorySelector&&(0,c.createElement)(ue,{type:e.type}),(0,c.createElement)(oe,{hasTitle:!1,type:e.type}));if(0===E.length){const t=e.type===A.extension?C.extension:C.theme;return(0,c.createElement)(pe,{type:t,showHeading:!1})}const t=v()(M?"woocommerce-marketplace__product-list-content--collapsed":"");return(0,c.createElement)(c.Fragment,null,e.categorySelector&&(0,c.createElement)(ue,{type:e.type}),(0,c.createElement)($,{products:E,type:e.type,className:t,searchTerm:e.searchTerm,category:w}),M&&(0,c.createElement)(l.Button,{className:T,variant:"secondary",text:(0,n.__)("View all","woocommerce"),onClick:()=>{return t=e.type,void(0,b.navigateTo)({url:(0,b.getNewPath)({section:t})});var t}}))}())}function ge(e){const t=e.products.filter((e=>e.type===A.extension)),o=e.products.filter((e=>e.type===A.theme)),a=(0,c.useContext)(r),{isLoading:s}=a,l=(0,b.useQuery)(),i=!!l.section,m=l.term?l.term:"";function u(e,t){var o,r,a;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,c.createElement)(_e,{products:e,type:t,categorySelector:null!==(o=n.categorySelector)&&void 0!==o?o:i,searchTerm:m,showAllButton:null===(r=n.showAllButton)||void 0===r||r,perPage:null!==(a=n.perPage)&&void 0!==a?a:60})}function p(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u(t,A.extension,e)}function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u(o,A.theme,e)}return(0,c.createElement)("div",{className:"woocommerce-marketplace__search-results"},(null==l?void 0:l.section)===C.extension?p({showAllButton:!1}):(null==l?void 0:l.section)===C.theme?d({showAllButton:!1}):s?(0,c.createElement)(c.Fragment,null,p(),d()):s||0!==t.length||0!==o.length?0===o.length&&t.length>0?p({categorySelector:!0,showAllButton:!1,perPage:60}):0===t.length&&o.length>0?d({categorySelector:!0,showAllButton:!1,perPage:60}):(0,c.createElement)(c.Fragment,null,p({perPage:8}),d({perPage:8})):(0,c.createElement)(pe,{type:C.all,showHeading:!0,heading:(0,n.__)("No extensions or themes found…","woocommerce")}))}const we=(0,c.createContext)({subscriptions:[],setSubscriptions:()=>{},loadSubscriptions:()=>new Promise((()=>{})),refreshSubscriptions:()=>new Promise((()=>{})),isLoading:!0,setIsLoading:()=>{}});function ye(e){const[t,o]=(0,c.useState)([]),[r,a]=(0,c.useState)(!0),n=e=>(!0===e&&a(!0),async function(){return await L()({path:"/wc/v3/marketplace/subscriptions".toString()})}().then((e=>{o(e)})).finally((()=>{e&&a(!1)})));(0,c.useEffect)((()=>{n(!0)}),[]);const s={subscriptions:t,setSubscriptions:o,loadSubscriptions:n,refreshSubscriptions:()=>async function(){return await L()({path:"/wc/v3/marketplace/refresh".toString(),method:"POST"})}().then((e=>{o(e)})),isLoading:r,setIsLoading:a};return(0,c.createElement)(we.Provider,{value:s},e.children)}const Me=[{key:"name",label:(0,n.__)("Name","woocommerce")},{key:"expiry",label:(0,n.__)("Expiry/Renewal date","woocommerce")},{key:"autoRenew",label:(0,n.__)("Auto-renew","woocommerce")},{key:"version",label:(0,n.__)("Version","woocommerce")}];function Ne(e){if(e.isLoading)return(0,c.createElement)(q.TablePlaceholder,{caption:(0,n.__)("Loading your subscriptions","woocommerce"),headers:e.headers});const t=e.headers.map((e=>({...e,cellClassName:"woocommerce-marketplace__my-subscriptions__table__header--"+e.key})));return(0,c.createElement)(q.Table,{className:"woocommerce-marketplace__my-subscriptions__table",headers:t,rows:e.rows})}function Ee(e){const t=[...Me,{key:"actions",label:(0,n.__)("Actions","woocommerce")}];if(!(e.isLoading||e.rows&&0!==e.rows.length)){const e=(0,b.getNewPath)({},y,{}),t=(0,c.createInterpolateElement)((0,n.__)("No extensions or themes installed. <a>Browse the Marketplace</a>","woocommerce"),{a:(0,c.createElement)("a",{href:e})});return(0,c.createElement)(q.EmptyTable,{numberOfRows:4},t)}return(0,c.createElement)(Ne,{rows:e.rows,isLoading:e.isLoading,headers:t})}function he(e){const t=[...Me,{key:"actions",label:(0,n.__)("Actions","woocommerce")}];return(0,c.createElement)(Ne,{rows:e.rows,isLoading:e.isLoading,headers:t})}var ve=o(69771);const be=(0,c.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(i.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"}));let ke;function fe(e){var t;const[o,r]=(0,c.useState)(!1),{loadSubscriptions:a}=(0,c.useContext)(we),s=()=>{(0,j.recordEvent)("marketplace_product_connect_button_clicked",{product_zip_slug:e.subscription.zip_slug,product_id:e.subscription.product_id}),r(!0),F(e.subscription.product_key),V(e.subscription).then((()=>{a(!1).then((()=>{H(e.subscription.product_key,(0,n.sprintf)((0,n.__)("%s successfully connected.","woocommerce"),e.subscription.product_name),Q.Success),r(!1),e.onClose&&e.onClose()}))})).catch((()=>{H(e.subscription.product_key,(0,n.sprintf)((0,n.__)("%s couldn’t be connected.","woocommerce"),e.subscription.product_name),Q.Error,{actions:[{label:(0,n.__)("Try again","woocommerce"),onClick:s}]}),r(!1),e.onClose&&e.onClose()}))};return(0,c.createElement)(l.Button,{onClick:s,variant:null!==(t=e.variant)&&void 0!==t?t:"secondary",isBusy:o,disabled:o},(0,n.__)("Connect","woocommerce"))}!function(e){e.Warning="warning",e.Error="error"}(ke||(ke={}));const xe={installingProducts:[]},Te=(0,O.createReduxStore)("woocommerce-admin/installing",{reducer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_INSTALLING":return{...e,installingProducts:[...e.installingProducts,t.productKey]};case"STOP_INSTALLING":return{...e,installingProducts:[...e.installingProducts.filter((e=>e!==t.productKey))]}}return e},actions:{startInstalling:e=>({type:"START_INSTALLING",productKey:e}),stopInstalling:e=>({type:"STOP_INSTALLING",productKey:e})},selectors:{isInstalling:(e,t)=>!!e&&e.installingProducts.includes(t)}});function De(e){const{loadSubscriptions:t}=(0,c.useContext)(we),o=(0,O.useSelect)((t=>t(Te).isInstalling(e.subscription.product_key)),[e.subscription.product_key]),r=()=>{(0,O.dispatch)(Te).stopInstalling(e.subscription.product_key)},a=()=>{var o;(0,j.recordEvent)("marketplace_product_install_button_clicked",{product_zip_slug:e.subscription.zip_slug,product_id:e.subscription.product_id,product_current_version:e.subscription.version}),(0,O.dispatch)(Te).startInstalling(e.subscription.product_key),F(e.subscription.product_key),(o=e.subscription,V(o).then((()=>G("install-"+o.product_type,{slug:"woocommerce-com-"+o.product_slug}).then((()=>function(e){if(!0===e.local.active)return Promise.resolve();const t=new URLSearchParams;return t.append("product_key",e.product_key),L()({path:"/wc/v3/marketplace/subscriptions/activate".toString(),method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:t}).then((()=>Promise.resolve())).catch((()=>Promise.reject({success:!1,data:{message:(0,n.sprintf)((0,n.__)("%s could not be activated. Please activate it manually.","woocommerce"),e.product_name)}})))}(o))).catch((e=>function(e){if(!1===e.active)return Promise.resolve();const t=new URLSearchParams;return t.append("product_key",e.product_key),L()({path:"/wc/v3/marketplace/subscriptions/disconnect".toString(),method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:t})}(o).finally((()=>Promise.reject(e)))))))).then((()=>{t(!1).then((()=>{H(e.subscription.product_key,(0,n.sprintf)((0,n.__)("%s successfully installed.","woocommerce"),e.subscription.product_name),Q.Success),r()})),(0,j.recordEvent)("marketplace_product_installed",{product_zip_slug:e.subscription.zip_slug,product_id:e.subscription.product_id,product_current_version:e.subscription.version})})).catch((o=>{t(!1).then((()=>{let t=(0,n.sprintf)((0,n.__)("%s couldn’t be installed.","woocommerce"),e.subscription.product_name);!1===(null==o?void 0:o.success)&&null!=o&&o.data.message&&(t+=" "+o.data.message),H(e.subscription.product_key,t,Q.Error,{actions:[{label:(0,n.__)("Try again","woocommerce"),onClick:a}]}),r()})),(0,j.recordEvent)("marketplace_product_install_failed",{product_zip_slug:e.subscription.zip_slug,product_id:e.subscription.product_id,product_current_version:e.subscription.version})}))};return(0,c.createElement)(l.Button,{variant:"link",isBusy:o,disabled:o,onClick:a},(0,n.__)("Install","woocommerce"))}function Ie(e){var t;return(0,c.createElement)(l.Button,{href:K(e.subscription),variant:null!==(t=e.variant)&&void 0!==t?t:"secondary",onClick:function(){(0,j.queueRecordEvent)("marketplace_renew_button_clicked",{product_zip_slug:e.subscription.zip_slug,product_id:e.subscription.product_id})}},(0,n.__)("Renew","woocommerce"))}function ze(e){var t;return(0,c.createElement)(l.Button,{href:J(e.subscription),variant:null!==(t=e.variant)&&void 0!==t?t:"secondary",onClick:function(){(0,j.queueRecordEvent)("marketplace_subscribe_button_clicked",{product_zip_slug:e.subscription.zip_slug,product_id:e.subscription.product_id})}},(0,n.__)("Subscribe","woocommerce"))}function Ae(e){return(0,c.createElement)(l.Modal,{title:(0,n.__)("Connect to update","woocommerce"),onRequestClose:e.onClose,focusOnMount:!0,className:"woocommerce-marketplace__header-account-modal",style:{borderRadius:4},overlayClassName:"woocommerce-marketplace__header-account-modal-overlay"},(0,c.createElement)("p",{className:"woocommerce-marketplace__header-account-modal-text"},(0,n.sprintf)((0,n.__)("Version %s is available. To enable this update you need to connect your subscription to this store.","woocommerce"),e.subscription.version)),(0,c.createElement)(l.ButtonGroup,{className:"woocommerce-marketplace__header-account-modal-button-group"},(0,c.createElement)(l.Button,{variant:"tertiary",onClick:e.onClose,className:"woocommerce-marketplace__header-account-modal-button"},(0,n.__)("Cancel","woocommerce")),(0,c.createElement)(fe,{subscription:e.subscription,onClose:e.onClose,variant:"primary"})))}function Ce(e){return(0,c.createElement)(l.Modal,{title:(0,n.__)("Renew to update","woocommerce"),onRequestClose:e.onClose,focusOnMount:!0,className:"woocommerce-marketplace__header-account-modal",style:{borderRadius:4},overlayClassName:"woocommerce-marketplace__header-account-modal-overlay"},(0,c.createElement)("p",{className:"woocommerce-marketplace__header-account-modal-text"},(0,n.sprintf)((0,n.__)("Version %s is available. To enable this update you need to renew your subscription.","woocommerce"),e.subscription.version)),(0,c.createElement)(l.ButtonGroup,{className:"woocommerce-marketplace__header-account-modal-button-group"},(0,c.createElement)(l.Button,{variant:"tertiary",onClick:e.onClose,className:"woocommerce-marketplace__header-account-modal-button"},(0,n.__)("Cancel","woocommerce")),(0,c.createElement)(Ie,{subscription:e.subscription,variant:"primary"})))}function je(e){return(0,c.createElement)(l.Modal,{title:(0,n.__)("Subscribe to update","woocommerce"),onRequestClose:e.onClose,focusOnMount:!0,className:"woocommerce-marketplace__header-account-modal",style:{borderRadius:4},overlayClassName:"woocommerce-marketplace__header-account-modal-overlay"},(0,c.createElement)("p",{className:"woocommerce-marketplace__header-account-modal-text"},(0,n.sprintf)((0,n.__)("Version %s is available. To enable this update you need to purchase a subscription.","woocommerce"),e.subscription.version)),(0,c.createElement)(l.ButtonGroup,{className:"woocommerce-marketplace__header-account-modal-button-group"},(0,c.createElement)(l.Button,{variant:"tertiary",onClick:e.onClose,className:"woocommerce-marketplace__header-account-modal-button"},(0,n.__)("Cancel","woocommerce")),(0,c.createElement)(ze,{subscription:e.subscription,variant:"primary"})))}function Se(e){const[t,o]=(0,c.useState)(!1),[r,a]=(0,c.useState)(!1),{loadSubscriptions:s}=(0,c.useContext)(we),i=e.subscription.active&&e.subscription.local&&e.subscription.local.slug&&e.subscription.local.path;return(0,c.createElement)(c.Fragment,null,t?""===e.subscription.product_key?(0,c.createElement)(je,{onClose:()=>o(!1),subscription:e.subscription}):e.subscription.expired?(0,c.createElement)(Ce,{subscription:e.subscription,onClose:()=>o(!1)}):e.subscription.active?null:(0,c.createElement)(Ae,{subscription:e.subscription,onClose:()=>o(!1)}):null,(0,c.createElement)(l.Button,{variant:"link",className:"woocommerce-marketplace__my-subscriptions-update",onClick:function t(){var c;(0,j.recordEvent)("marketplace_product_update_button_clicked",{product_zip_slug:e.subscription.zip_slug,product_id:e.subscription.product_id,product_installed_version:e.subscription.local.installed,product_current_version:e.subscription.version}),i?(F(e.subscription.product_key),window.wp.updates?(a(!0),(c=e.subscription,G("update-"+c.product_type,{slug:c.local.slug,[c.product_type]:c.local.path})).then((()=>{s(!1).then((()=>{H(e.subscription.product_key,(0,n.sprintf)((0,n.__)("%s updated successfully.","woocommerce"),e.subscription.product_name),Q.Success),a(!1)})),(0,j.recordEvent)("marketplace_product_updated",{product_zip_slug:e.subscription.zip_slug,product_id:e.subscription.product_id,product_installed_version:e.subscription.local.installed,product_current_version:e.subscription.version})})).catch((()=>{H(e.subscription.product_key,(0,n.sprintf)((0,n.__)("%s couldn’t be updated.","woocommerce"),e.subscription.product_name),Q.Error,{actions:[{label:(0,n.__)("Try again","woocommerce"),onClick:t}]}),a(!1),(0,j.recordEvent)("marketplace_product_update_failed",{product_zip_slug:e.subscription.zip_slug,product_id:e.subscription.product_id,product_installed_version:e.subscription.local.installed,product_current_version:e.subscription.version})}))):H(e.subscription.product_key,(0,n.sprintf)((0,n.__)("%s couldn’t be updated.","woocommerce"),e.subscription.product_name),Q.Error,{actions:[{label:(0,n.__)("Reload page and try again","woocommerce"),onClick:()=>{window.location.reload()}}]})):o(!0)},isBusy:r,disabled:r,label:(0,n.sprintf)((0,n.__)("Update to %s","woocommerce"),e.subscription.version),showTooltip:!0,tooltipPosition:"top center"},r?(0,n.__)("Updating","woocommerce"):(0,n.__)("Update","woocommerce")))}(0,O.register)(Te);var Le=o(84560);function Oe(e){const[t,o]=(0,c.useState)(!1);return(0,c.createElement)("button",{onClick:()=>{o(!t)},className:`woocommerce-marketplace__my-subscriptions__product-status woocommerce-marketplace__my-subscriptions__product-status--${e.level}`},(0,c.createElement)(u.Z,{icon:Le.Z,size:16}),e.text,""!==e.explanation&&t&&(0,c.createElement)(l.Popover,{className:"woocommerce-marketplace__my-subscriptions__popover",position:"top center"},e.explanation))}var Qe=o(85797);function Ue(e){const t=[{title:(0,n.__)("Manage on Woo.com","woocommerce"),icon:(0,c.createElement)(c.Fragment,null),onClick:()=>{window.open("https://woo.com/my-account/my-subscriptions","_blank")}},{title:(0,n.__)("Manage in Plugins","woocommerce"),icon:(0,c.createElement)(c.Fragment,null),onClick:()=>{window.location.href=_.SX+"plugins.php"}}];return e.subscription.documentation_url&&t.unshift({title:(0,n.__)("View documentation","woocommerce"),icon:(0,c.createElement)(c.Fragment,null),onClick:()=>{window.open(e.subscription.documentation_url,"_blank")}}),(0,c.createElement)(l.DropdownMenu,{icon:Qe.Z,label:(0,n.__)("Actions","woocommerce"),controls:t})}function Pe(e){return(0,c.createElement)("span",{className:"woocommerce-marketplace__my-subscriptions-version"},e.span)}function Ye(e){return e.local.version===e.version?(0,c.createElement)(Pe,{span:e.local.version}):e.local.version&&e.version?(0,c.createElement)(Se,{subscription:e}):e.version?(0,c.createElement)(Pe,{span:e.version}):e.local.version?(0,c.createElement)(Pe,{span:e.local.version}):""}function Ze(e){return W(e,[["utm_source","subscriptionsscreen"],["utm_medium","product"],["utm_campaign","wcaddons"],["utm_content","product-name"]])}function Re(e){var t;let o=(0,c.createElement)(u.Z,{icon:be,size:40});e.product_icon&&(o=(0,c.createElement)("img",{src:e.product_icon,alt:(0,n.sprintf)((0,n.__)("%s icon","woocommerce"),e.product_name)}));const r=function(e){return""===e.product_key?{text:(0,n.__)("No subscription","woocommerce"),level:ke.Error,explanation:(0,c.createInterpolateElement)((0,n.__)("To receive updates and support, please <purchase>purchase</purchase> a subscription or use a subscription from another account by <sharing>sharing</sharing> or <transferring>transferring</transferring>.","woocommerce"),{purchase:(0,c.createElement)("a",{href:J(e),rel:"nofollow noopener noreferrer"},"renew"),sharing:(0,c.createElement)("a",{href:N,rel:"nofollow noopener noreferrer"},"sharing"),transferring:(0,c.createElement)("a",{href:N,rel:"nofollow noopener noreferrer"},"sharing")})}:e.local.installed&&!e.active?{text:(0,n.__)("Not connected","woocommerce"),level:ke.Warning,explanation:(0,n.__)("To receive updates and support, please connect your subscription to this store.","woocommerce")}:!!e.expired&&{text:(0,n.__)("Expired","woocommerce"),level:ke.Error,explanation:(0,c.createInterpolateElement)((0,n.__)("To receive updates and support, please <renew>renew</renew> this subscription or use a subscription from another account by <sharing>sharing</sharing> or <transferring>transferring</transferring>.","woocommerce"),{renew:(0,c.createElement)("a",{href:K(e),rel:"nofollow noopener noreferrer"},"renew"),sharing:(0,c.createElement)("a",{href:N,rel:"nofollow noopener noreferrer"},"sharing"),transferring:(0,c.createElement)("a",{href:N,rel:"nofollow noopener noreferrer"},"sharing")})}}(e);return{display:(0,c.createElement)("div",{className:"woocommerce-marketplace__my-subscriptions__product"},(0,c.createElement)("a",{href:Ze(e.product_url),target:"_blank",rel:"noreferrer"},(0,c.createElement)("span",{className:"woocommerce-marketplace__my-subscriptions__product-icon"},o)),(0,c.createElement)("a",{href:Ze(e.product_url),className:"woocommerce-marketplace__my-subscriptions__product-name",target:"_blank",rel:"noreferrer"},e.product_name),(0,c.createElement)("span",{className:"woocommerce-marketplace__my-subscriptions__product-statuses"},r&&(0,c.createElement)(Oe,{text:r.text,level:r.level,explanation:null!==(t=r.explanation)&&void 0!==t?t:""}))),value:e.product_name}}function Be(e){const t=e.expires;if(!0===e.local.installed&&""===e.product_key)return{display:"",value:""};let o=(0,n.__)("Never expires","woocommerce");return t&&(o=(0,ve.gmdateI18n)("j M, Y",new Date(1e3*t))),{display:(0,c.createElement)("span",{className:"woocommerce-marketplace__my-subscriptions__expiry-date"},o),value:t}}function Ve(e){return{display:e.autorenew?(0,n.__)("On","woocommerce"):(0,n.__)("Off","woocommerce"),value:e.autorenew}}function Ge(e){return{display:Ye(e)}}function He(e){let t=null;return""===e.product_key?t=(0,c.createElement)(ze,{subscription:e}):e.expired?t=(0,c.createElement)(Ie,{subscription:e}):!1===e.local.installed&&!1===e.subscription_installed?t=(0,c.createElement)(De,{subscription:e}):!1===e.active&&!0===e.subscription_available&&(t=(0,c.createElement)(fe,{subscription:e,variant:"link"})),{display:(0,c.createElement)("div",{className:"woocommerce-marketplace__my-subscriptions__actions"},t,(0,c.createElement)(Ue,{subscription:e}))}}var Fe=o(92807);const We="woocommerce-marketplace-refresh-subscriptions";function Ke(){const{refreshSubscriptions:e}=(0,c.useContext)(we),[t,o]=(0,c.useState)(!1),r=()=>{t||(F(We),o(!0),e().then((()=>{H(We,(0,n.__)("Subscriptions refreshed.","woocommerce"),Q.Success)})).catch((e=>{H(We,(0,n.sprintf)((0,n.__)("Error refreshing subscriptions: %s","woocommerce"),e.message),Q.Error,{actions:[{label:(0,n.__)("Try again","woocommerce"),onClick:r}]})})).finally((()=>{o(!1)})))};return(0,c.createElement)(l.Button,{className:"woocommerce-marketplace__refresh-subscriptions",onClick:r,isBusy:t},(0,c.createElement)("img",{src:Fe,alt:(0,n.__)("Refresh subscriptions","woocommerce"),className:"woocommerce-marketplace__refresh-subscriptions-icon"}),(0,n.__)("Refresh","woocommerce"))}var Je=o(53042);function Xe(){const e=(0,O.useSelect)((e=>e(P).notices()),[]),t=e=>{var t,o;return null!==(t=e.options)&&void 0!==t&&t.actions?null===(o=e.options)||void 0===o?void 0:o.actions.map((e=>({...e,variant:"link",className:"is-link"}))):[]},o=[];for(const r of e)o.push((0,c.createElement)(l.Notice,{className:"woocommerce-marketplace__notice--error",status:r.status,onRemove:()=>F(r.productKey),key:r.productKey,actions:t(r)},(0,c.createElement)("img",{src:Je,alt:"",width:24,height:24}),r.message));return(0,c.createElement)(c.Fragment,null,o)}function $e(){const{subscriptions:e,isLoading:t}=(0,c.useContext)(we),o=(0,_.O3)("wccomHelper",{}),r=(0,c.createInterpolateElement)((0,n.__)("Woo.com extensions and themes installed on this store. To see all your subscriptions go to <a>your account<custom_icon /></a> on Woo.com.","woocommerce"),{a:(0,c.createElement)("a",{href:"https://woo.com/my-account/my-subscriptions",target:"_blank",rel:"nofollow noopener noreferrer"},"your account"),custom_icon:(0,c.createElement)(u.Z,{icon:p.Z,size:12})}),a=e.filter((e=>e.subscription_installed)),s=e.filter((e=>!e.subscription_installed));return null!=o&&o.isConnected?(0,c.createElement)("div",{className:"woocommerce-marketplace__my-subscriptions"},(0,c.createElement)("section",{className:"woocommerce-marketplace__my-subscriptions__notices"},(0,c.createElement)(Xe,null)),(0,c.createElement)("section",{className:"woocommerce-marketplace__my-subscriptions-section woocommerce-marketplace__my-subscriptions__installed"},(0,c.createElement)("header",{className:"woocommerce-marketplace__my-subscriptions__header"},(0,c.createElement)("div",{className:"woocommerce-marketplace__my-subscriptions__header-content"},(0,c.createElement)("h2",{className:"woocommerce-marketplace__my-subscriptions__heading"},(0,n.__)("Installed on this store","woocommerce")),(0,c.createElement)("p",{className:"woocommerce-marketplace__my-subscriptions__table-description"},r)),(0,c.createElement)("div",{className:"woocommerce-marketplace__my-subscriptions__header-refresh"},(0,c.createElement)(Ke,null))),(0,c.createElement)("div",{className:"woocommerce-marketplace__my-subscriptions__table-wrapper"},(0,c.createElement)(Ee,{isLoading:t,rows:a.map((e=>function(e){return[Re(e),Be(e),Ve(e),Ge(e),He(e)]}(e)))}))),s.length>0&&(0,c.createElement)("section",{className:"woocommerce-marketplace__my-subscriptions-section woocommerce-marketplace__my-subscriptions__available"},(0,c.createElement)("h2",{className:"woocommerce-marketplace__my-subscriptions__heading"},(0,n.__)("Available to use","woocommerce")),(0,c.createElement)("p",{className:"woocommerce-marketplace__my-subscriptions__table-description"},(0,n.__)("Woo.com subscriptions you haven't used yet.","woocommerce")),(0,c.createElement)("div",{className:"woocommerce-marketplace__my-subscriptions__table-wrapper"},(0,c.createElement)(he,{isLoading:t,rows:s.map((e=>function(e){return[Re(e),Be(e),Ve(e),Ge(e),He(e)]}(e)))})))):(0,c.createElement)("div",{className:"woocommerce-marketplace__my-subscriptions--connect"},(0,c.createElement)("div",{className:"woocommerce-marketplace__my-subscriptions__icon"}),(0,c.createElement)("h2",{className:"woocommerce-marketplace__my-subscriptions__header"},(0,n.__)("Manage your subscriptions","woocommerce")),(0,c.createElement)("p",{className:"woocommerce-marketplace__my-subscriptions__description"},(0,n.__)("Connect your account to get updates, manage your subscriptions, and get seamless support. Once connected, your Woo.com subscriptions will appear here.","woocommerce")),(0,c.createElement)(l.Button,{href:null==o?void 0:o.connectURL,variant:"primary"},(0,n.__)("Connect Account","woocommerce")))}function qe(){const e=(0,c.useContext)(r),[t,o]=(0,c.useState)([]),{setIsLoading:a,selectedTab:n}=e,s=(0,b.useQuery)();return(0,c.useEffect)((()=>{const e=new AbortController,t={view:null==s?void 0:s.tab,search_term:null==s?void 0:s.term,product_type:null==s?void 0:s.section,category:null==s?void 0:s.category};if(function(e){if(""===e.category)return;const t=e.view||"discover",o=e.search_term||null,c=e.product_type||null,r=e.category||null,a={...t&&{view:t},...o&&{search_term:o},...c&&{product_type:c},...r&&{category:r}};t&&["extensions","themes"].includes(t)&&!r&&(a.category="_all"),t&&"search"===t&&c&&!r&&(a.category="_all"),(0,j.recordEvent)("marketplace_view",a)}(t),function(e){if(e.product_type)return;let t="extensions_view";const o=e.view||"_featured",c=e.search_term||null,r=e.category||null,a={...o&&{section:o},...c&&{search_term:c},version:"2"};switch(o){case"extensions":a.section=r||"_all";break;case"themes":a.section="themes";break;case"search":t="extensions_view_search",a.section=o,a.search_term=c||"";break;case"my-subscriptions":t="subscriptions_view",a.section="helper"}(0,j.recordEvent)(t,a)}(t),s.tab&&["","discover"].includes(s.tab))return;a(!0),o([]);const c=new URLSearchParams;s.term&&c.append("term",s.term),s.category?c.append("category","_all"===s.category?"":s.category):"themes"===(null==s?void 0:s.tab)?c.append("category","themes"):"search"===(null==s?void 0:s.tab)&&c.append("category","extensions-themes");const r=(0,_.O3)("wccomHelper",!1);return r.storeCountry&&c.append("country",r.storeCountry),async function(e,t){const o="https://woo.com/wp-json/wccom-extensions/1.0/search?"+e.toString();return new Promise(((e,c)=>{R(o,t).then((t=>{const o=t.products.map((e=>{var t,o,c;return{id:e.id,title:e.title,image:e.image,type:e.type,description:e.excerpt,vendorName:e.vendor_name,vendorUrl:e.vendor_url,icon:e.icon,url:e.link,price:null!==(t=e.raw_price)&&void 0!==t?t:e.price,averageRating:null!==(o=e.rating)&&void 0!==o?o:0,reviewsCount:null!==(c=e.reviews_count)&&void 0!==c?c:0}}));e(o)})).catch((()=>c))}))}(c,e.signal).then((e=>{o(e)})).catch((()=>{o([])})).finally((()=>{a(!1)})),()=>{e.abort()}}),[s.term,s.category,null==s?void 0:s.tab,a,null==s?void 0:s.section]),(0,c.createElement)("div",{className:"woocommerce-marketplace__content"},(()=>{switch(n){case"extensions":return(0,c.createElement)(_e,{products:t,categorySelector:!0,type:A.extension});case"themes":return(0,c.createElement)(_e,{products:t,categorySelector:!0,type:A.theme});case"search":return(0,c.createElement)(ge,{products:t,type:C.all});case"discover":return(0,c.createElement)(ce,null);case"my-subscriptions":return(0,c.createElement)(ye,null,(0,c.createElement)($e,null));default:return(0,c.createElement)(c.Fragment,null)}})())}var et=o(47642);const tt=(0,c.createElement)(i.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,c.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"})),ot=(0,c.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(i.Path,{d:"M12 3.176l6.75 3.068v4.574c0 3.9-2.504 7.59-6.035 8.755a2.283 2.283 0 01-1.43 0c-3.53-1.164-6.035-4.856-6.035-8.755V6.244L12 3.176zM6.75 7.21v3.608c0 3.313 2.145 6.388 5.005 7.33.159.053.331.053.49 0 2.86-.942 5.005-4.017 5.005-7.33V7.21L12 4.824 6.75 7.21z",fillRule:"evenodd",clipRule:"evenodd"}));function ct(e){const{icon:t,title:o,description:r}=e;return(0,c.createElement)("div",{className:"woocommerce-marketplace__icon-group"},(0,c.createElement)("div",{className:"woocommerce-marketplace__icon-group-headline"},(0,c.createElement)(u.Z,{icon:t,size:20,className:"woocommerce-marketplace__icon-group-icon"}),(0,c.createElement)("h3",{className:"woocommerce-marketplace__icon-group-title"},o)),(0,c.createElement)("p",{className:"woocommerce-marketplace__icon-group-description"},r))}var rt=o(18926);const at=(0,c.createInterpolateElement)((0,n.__)("30-day <a>money-back guarantee</a>","woocommerce"),{a:(0,c.createElement)("a",{href:"https://woo.com/refund-policy/"})}),nt=(0,c.createInterpolateElement)((0,n.__)("<a>Get help</a> when you need it","woocommerce"),{a:(0,c.createElement)("a",{href:"https://woo.com/docs/"})}),st=(0,c.createInterpolateElement)((0,n.__)("<a>Products</a> you can trust","woocommerce"),{a:(0,c.createElement)("a",{href:"https://woo.com/products/"})});function lt(){return(0,c.createElement)("div",{className:"woocommerce-marketplace__footer-content"},(0,c.createElement)("h2",{className:"woocommerce-marketplace__footer-title"},(0,n.__)("Hundreds of vetted products and services. Unlimited potential.","woocommerce")),(0,c.createElement)("div",{className:"woocommerce-marketplace__footer-columns"},(0,c.createElement)(ct,{icon:et.Z,title:at,description:(0,n.__)("If you change your mind within 30 days of your purchase, we'll give you a full refund — hassle-free.","woocommerce")}),(0,c.createElement)(ct,{icon:tt,title:nt,description:(0,n.__)("With detailed documentation and a global support team, help is always available if you need it.","woocommerce")}),(0,c.createElement)(ct,{icon:ot,title:st,description:(0,n.__)("Everything in the Marketplace has been built by our own team or by our trusted partners, so you can be sure of its quality.","woocommerce")})),(0,c.createElement)("div",{className:"woocommerce-marketplace__footer-logo"},(0,c.createElement)("img",{src:rt,alt:"Woo Logo","aria-hidden":"true"}),(0,c.createElement)("span",null,(0,n.__)("Woo Marketplace","woocommerce"))))}function it(){return(0,c.createElement)("div",{className:"woocommerce-marketplace__footer"},(0,c.createElement)(lt,null))}function mt(e){const{title:t,fieldName:o,onValueChange:r,validationFailed:a}=e,s=[{value:1,emoji:"😔",label:(0,n.__)("Strongly disagree","woocommerce")},{value:2,emoji:"🙁",label:(0,n.__)("Disagree","woocommerce")},{value:3,emoji:"😐",label:(0,n.__)("Neutral","woocommerce")},{value:4,emoji:"🙂",label:(0,n.__)("Agree","woocommerce")},{value:5,emoji:"😍",label:(0,n.__)("Strongly agree","woocommerce")}],l=v()("woocommerce-marketplace__likert-scale",{"validation-failed":a});function i(e){r(parseInt(e.target.value,10))}return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("h2",null,t),(0,c.createElement)("ol",{className:l},s.map((e=>{const t=`${o}_${e.value}`;return(0,c.createElement)("li",{key:t,className:"woocommerce-marketplace__likert-scale-item"},(0,c.createElement)("input",{type:"radio",name:o,value:e.value,id:t,onChange:i,className:"screen-reader-text"}),(0,c.createElement)("label",{htmlFor:t},(0,c.createElement)("div",{className:"woocommerce-marketplace__likert-scale-icon"},e.emoji),(0,c.createElement)("div",{className:"woocommerce-marketplace__likert-scale-text"},e.label)))}))))}function ut(){const e="marketplace_redesign_2023_dismissals",t="marketplace_redesign_2023_last_shown_date",o=(0,c.useContext)(r),{isLoading:a}=o,s=()=>localStorage.setItem(t,(new Date).toDateString()),i=()=>parseInt(localStorage.getItem(e)||"0",10),m=()=>{s(),localStorage.setItem(e,`${i()+1}`)},[u,p]=(0,c.useState)(!1),[d,_]=(0,c.useState)(""),[g,w]=(0,c.useState)(0),[y,M]=(0,c.useState)(!1),[N,E]=(0,c.useState)(0),[h,v]=(0,c.useState)(!1),b=()=>p(!0),k=()=>{m(),p(!1)},{createNotice:f}=(0,O.useDispatch)("core/notices");function x(){f("success",(0,n.__)("How easy is it to find an extension?","woocommerce"),{type:"snackbar",icon:(0,c.createElement)(c.Fragment,null,(0,c.createElement)("svg",{color:"#fff",strokeWidth:"1.5",viewBox:"0 0 28.873 8.9823",style:{height:"8px",marginLeft:"-7px"}},(0,c.createElement)("path",{className:"l",d:"m4.1223 1.1216 19.12-0.014142 4.3982 3.38-4.3982 3.38-19.12-0.014142a3.34 3.34 0 0 1-2.39-0.97581 3.37 3.37 0 0 1 0.00707-4.773 3.34 3.34 0 0 1 2.383-0.98288z",stroke:"#fff"}),(0,c.createElement)("line",{className:"l",x1:"6.7669",x2:"6.7669",y1:"7.8533",y2:"1.1216",stroke:"#fff"}),(0,c.createElement)("path",{className:"l",d:"m23.235 1.1146 4.4053 3.3729-4.3982 3.38a6.59 6.59 0 0 1-0.89096-3.3517 6.59 6.59 0 0 1 0.88388-3.4012z",stroke:"#fff"}),(0,c.createElement)("line",{className:"l",x1:"6.7669",x2:"22.323",y1:"4.4875",y2:"4.4875",stroke:"#fff"}))),explicitDismiss:!0,onDismiss:m,actions:[{onClick:b,label:"Give feedback"}]})}return(0,c.useEffect)((function(){if(a)return;if(i()>=1)return;if((new Date).toDateString()===localStorage.getItem(t))return;const e=setTimeout(x,5e3);return s(),()=>{clearTimeout(e)}}),[a]),new Date("2024-01-01")>new Date?(0,c.createElement)(c.Fragment,null,u&&(0,c.createElement)(l.Modal,{title:(0,n.__)("How easy was it to find an extension?","woocommerce"),onRequestClose:k,className:"woocommerce-marketplace__feedback-modal"},(0,c.createElement)("p",null,(0,n.__)("Your feedback will help us create a better experience for people like you! Please tell us to what extent you agree or disagree with the statements below.","woocommerce")),(0,c.createElement)(mt,{fieldName:"extension_screen_easy_to_find",title:(0,n.__)("It was easy to find an extension","woocommerce"),onValueChange:function(e){M(!1),w(e)},validationFailed:y}),(0,c.createElement)(mt,{fieldName:"extension_screen_meets_my_needs",title:(0,n.__)("The Extensions screen’s functionality meets my needs","woocommerce"),onValueChange:function(e){v(!1),E(e)},validationFailed:h}),(0,c.createElement)(l.TextareaControl,{label:(0,n.__)("Additional thoughts","woocommerce"),value:d,onChange:e=>_(e)}),(0,c.createElement)("p",{className:"woocommerce-marketplace__feedback-modal-buttons"},(0,c.createElement)(l.Button,{variant:"tertiary",onClick:k,text:(0,n.__)("Cancel","woocommerce")}),(0,c.createElement)(l.Button,{variant:"primary",onClick:function(){if(0===g||0===N)return 0===g&&M(!0),void(0===N&&v(!0));(0,j.recordEvent)("ces_feedback",{action:"marketplace_redesign_2023",score:g,score_second_question:N,score_combined:g+N,thoughts:d}),p(!1),s(),localStorage.setItem(e,"1")},text:(0,n.__)("Send","woocommerce")})))):(0,c.createElement)(c.Fragment,null)}function pt(){const{selectedTab:e}=(0,c.useContext)(r),t="woocommerce-marketplace"+(e?" woocommerce-marketplace--"+e:"");return(0,c.createElement)("div",{className:t},(0,c.createElement)(z,null),(0,c.createElement)(qe,null),(0,c.createElement)(ut,null),(0,c.createElement)(it,null))}function dt(){return(0,c.createElement)(a,null,(0,c.createElement)(pt,null))}},53042:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcg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