PageSourceSearch

https://www.creator.hypd.store/assets/ChooseProducts-DEpEa35B.js

js hypd.store collected 2026-09-25 11:33:19 UTC 36,655 bytes, 1 lines download raw bytes

1import{_ as R,C as N,B as $,v as Q,bu as D,S as V,w as G,c as l,b as w,d as h,a as o,e as b,t as p,y as E,z as M,F as m,r as y,E as H,n as f,q as I,g as T,s as x,ai as C,i as k,o as a}from"./index-Cthg2AOb.js";import{S as Z}from"./LegacySortFilter-DJt-7nmZ.js";import{S as W}from"./SelectedProductsPanel-BMwpzGwl.js";import{P as z}from"./ProductCard-ddaxRGJC.js";import{M as q}from"./MagnifyingGlass-ZEsO8zQW.js";import{_ as Y}from"./no_products_found-DOck2v8m.js";import"./AnalyticsIcon-CILjCi7O.js";const J={components:{ButtonComponent:G,SortFilter:Z,SelectedProductComponent:V,SelectedProductsPanel:W,EditCollectionComponent:D,ProductCard:z,ImageView:Q,MagnifyingGlass:q,BackArrow:$,CrossIcon:N},unmounted(){this.$store.dispatch("creatorStore/setCreatorSpotlightCatalogs",{}),document.body.style.overflowY="scroll"},async mounted(){this.$route.name=="CategoryProductsCreateCollection"?C("MyStore_Collection_CreateCollection_CategorytabSelection_Click"):this.$route.name=="BrandProductsCreateCollection"?C("MyStore_Collection_CreateCollection_BrandSelection_Click"):this.$route.name=="CategoryProductsAddProducts"?C("MyStore_AddProduct_Categorytab_Selection_Click"):this.$route.name=="BrandProductsAddProducts"&&C("MyStore_AddProduct_Brand_Selection_Click"),this.$route.params.lvlOneName=="Women"||this.$route.params.lvlOneName=="Men"?this.pageTitle=`${this.$route.params.lvlOneName}'s ${this.$route.params.lvlTwoName}`:this.pageTitle="",(this.$route.name=="BrandProductsAddProducts"||this.$route.name=="CategoryProductsAddProducts")&&this.$getObjectLength(this.$store.state.globalState.selectedProducts)==0&&this.$getObjectLength(this.$store.state.creatorStore.creatorSpotlightCatalogs)==0&&(this.submitText="Add to spotlight",await this.getProductIds(),this.catalogIds.length>0&&await this.getProductsByCatalogIds()),(this.$route.name=="BrandProductsAddProducts"||this.$route.name=="CategoryProductsAddProducts")&&(this.submitText="Add to spotlight",this.$getObjectLength(this.$store.state.globalState.selectedProducts)==0&&this.$getObjectLength(this.$store.state.creatorStore.creatorSpotlightCatalogs)>0&&(this.$store.state.globalState.selectedProducts=this.$store.state.creatorStore.creatorSpotlightCatalogs)),(this.$route.name=="ChooseBrandProducts"||this.$route.name=="ChooseCategoryProducts")&&this.$store.state.globalState.curatedCollections.length==0&&this.$router.go(-2),(this.$route.name=="ChooseBrandProducts"||this.$route.name=="ChooseCategoryProducts")&&(this.submitText="Add to collection",this.$store.state.globalState.selectedProducts=this.$store.state.globalState.productsInCuratedCollections.collection.structured,this.addedCatalogsInArray=this.$store.state.globalState.productsInCuratedCollections.collection.catalog_info),Object.entries(this.$store.state.creatorStore.creatorSpecificCollectionCatalogs).length==0&&(this.$route.name=="BrandProductsEditCollection"||this.$route.name=="CategoryProductsEditCollection")&&this.$router.go(-2),(this.$route.name=="BrandProductsEditCollection"||this.$route.name=="CategoryProductsEditCollection")&&(this.submitText="Add to collection",this.$store.state.globalState.selectedProducts=this.$store.state.creatorStore.creatorSpecificCollectionCatalogs),this.target=document.querySelector(".product-footer"),this.target&&(this.observer=k(this.target,this.callback)),Object.keys(this.$store.state.globalState.sortedBrands).length==0&&await this.getListOfBrands(),this.$route.params.lvlTwoId?(await this.getLevelThreeCategories(),await this.getBrandFilterByCategoryId(),this.filterCategories=[{name:"Category",tab:"category"},{name:"Brands",tab:"brand"}]):this.$route.params.brandId&&(this.filterCategories=[{name:"Category",tab:"category"}])},data(){return{apiCallTimer:null,products:[],oosProducts:[],receivedAllProducts:!1,isLoading:!1,isFilterLoading:!1,addProductsLoader:!1,target:null,observer:null,selectedProducts:{},selectedProductsPopup:!1,page:0,showEditCollectionPopup:!1,showSortingPopup:!1,collection:{collectionName:"",collectionImage:null},removedCatalogsWhileEditing:{},addedCatalogsInArray:[],sortingOptions:[{name:"recommended",value:0},{name:"price high to low",value:-1},{name:"price low to high",value:1}],selectedSortingOption:{name:"recommended",value:0},showFilters:!1,currentFilterTab:"category",filterCategories:[],searchQuery:"",pageTitle:"",categoryFilter:[],brandFilter:[],selectedBrands:{},selectedCategories:{},appliedFilters:{},submitText:"Add to store",showSearchBar:!1,productSearchQuery:"",spotlightProducts:[],catalogIds:[],totalCatalogsLength:0,catalogsSent:0,productsObject:{},draftingCollection:!1,publishingCollection:!1}},computed:{noOfselectedProducts(){return this.$getObjectLength(this.$store.state.globalState.selectedProducts)}},methods:{trackProductCardClick(){C("MyStore_Productpage_Product_Click")},sortPop(){C("MyStore_Sortby_Click"),this.showSortingPopup=!this.showSortingPopup},async getProductIds(){this.isLoading=!0;let s;try{s=await this.axios({method:"GET",url:this.$catalogURL+"/api/app/influencer/products",params:{type:"self"},withCredentials:!0,headers:{"Content-Type":"application/json"}}),s.data.payload&&(this.catalogIds=[...s.data.payload.catalog_ids],this.totalCatalogsLength=this.catalogIds.length)}catch(t){console.log(t)}finally{this.isLoading=!1}},async getProductsByCatalogIds(){let s=0;this.totalCatalogsLength>20?s=20:s=this.totalCatalogsLength;var t=new URLSearchParams;for(let n=this.catalogsSent+0;n<this.catalogsSent+s;n++)t.append("id",this.catalogIds[n]),this.totalCatalogsLength-=1;this.isLoading=!0;let d;try{d=await this.axios({method:"GET",url:this.$catalogURL+"/api/v2/app/catalog/basic",withCredentials:!0,headers:{"Content-Type":"application/json"},params:t}),d.data.payload&&(this.spotlightProducts=[...this.spotlightProducts,...d.data.payload],this.productsObject={...this.productsObject,...this.spotlightProducts.reduce((n,e)=>Object.assign(n,{[e.id]:e}),{})},this.$store.dispatch("creatorStore/setCreatorSpotlightCatalogs",this.productsObject),this.catalogsSent=this.catalogsSent+s,this.isLoading=!1)}catch(n){this.isLoading=!1,console.log(n)}d.data.payload==null&&(this.isLoading=!1)},changeFilterTab(s){s=="brand"?C("MyStore_Filter_Brand_Click"):s=="category"&&C("MyStore_Filter_Category_Click"),this.currentFilterTab=s},closeOrClearSearchBar(){this.productSearchQuery.length>0?(this.productSearchQuery="",this.products=[],this.page=0):this.showSearchBar=!1,this.receivedAllProducts=!1,this.observer&&this.target&&(this.observer=k(this.target,this.callback))},openSearchBar(){this.showSearchBar||(this.showSearchBar=!0)},trackSearchClick(){C("MyStore_Collection_CreateCollection_Search_Click")},async searchProducts(){this.products=[],this.oosProducts=[],this.page=0,this.receivedAllProducts=!1,this.observer=k(this.target,this.callback)},showApplyButton(){return!0},applyFilters(){C("MyStore_Filter_Click"),this.page=0,this.products=[],this.oosProducts=[],this.pageTitle="",this.show
1Filters=!1,this.receivedAllProducts=!1,this.observer&&this.target&&(this.observer=k(this.target,this.callback))},clearFilters(){this.page=0,this.products=[],this.oosProducts=[],this.pageTitle="",this.showFilters=!1,this.selectedBrands={},this.selectedCategories={},this.receivedAllProducts=!1,this.observer&&this.target&&(this.observer=k(this.target,this.callback))},callback(s){s.forEach(async t=>{t.isIntersecting&&!this.isLoading&&!this.receivedAllProducts&&(this.productSearchQuery.length>0?(this.apiCallTimer&&clearTimeout(this.apiCallTimer),this.apiCallTimer=setTimeout(async()=>{await this.searchingProducts()},500)):await this.getProducts())})},async selectBrand(s){this.selectedBrands[s.id]?delete this.selectedBrands[s.id]:this.selectedBrands[s.id]=s},async searchingProducts(){var t,d,n;this.isLoading=!0;let s=new URLSearchParams;s.append("page",this.page),this.$getObjectLength(this.selectedBrands)==1&&s.append("brand_id",Object.keys(this.selectedBrands)[0]),s.append("query",this.productSearchQuery);try{let e=await this.axios({method:"GET",url:this.$catalogURL+"/api/app/search/catalog",params:s,withCredentials:!0,headers:{"Content-Type":"application/json"}});this.page++,e.data.payload.catalog?(this.receivedAllProducts=!1,(t=e.data.payload)==null||t.catalog.forEach(r=>{r.inventory_status=="out_of_stock"?this.oosProducts.push(r):this.products.push(r)}),this.oosProducts.length>this.products.length&&(this.observer=k(this.target,this.callback)),((n=(d=e.data.payload)==null?void 0:d.catalog)==null?void 0:n.length)<20&&(this.observer.unobserve(this.target),this.products=[...this.products,...this.oosProducts],this.oosProducts=[],this.receivedAllProducts=!0)):(this.target&&this.observer.unobserve(this.target),this.products=[...this.products,...this.oosProducts],this.oosProducts=[],this.receivedAllProducts=!0)}catch(e){console.log(e),this.isLoading=!1,this.receivedAllProducts=!1}this.isLoading=!1},async selectCategory(s){this.selectedCategories[s.id]?delete this.selectedCategories[s.id]:this.selectedCategories[s.id]=s},async publishNewCollection(s){this.publishingCollection=!0,await this.createCollection(s,"create_publish")},async draftNewCollection(s){this.draftingCollection=!0,await this.createCollection(s,"create_draft")},async getListOfBrands(){var s,t,d;try{let n=new URLSearchParams;n.append("mappedResponse",!0);let e=await this.axios({method:"GET",url:this.$entityURL+"/api/app/v2/brands",withCredentials:!0,params:n,headers:{"Content-Type":"application/json"}});e.data.payload&&this.$store.dispatch("globalState/setSortedBrands",e.data.payload)}catch(n){console.log((d=(t=(s=n==null?void 0:n.data)==null?void 0:s.error)==null?void 0:t[0])==null?void 0:d.message)}},async getLevelThreeCategories(){this.isFilterLoading=!0;try{var s=await this.axios({method:"GET",url:this.$catalogURL+`/api/app/category/${this.$route.params.lvlTwoId}/lvl2`,withCredentials:!0,headers:{"Content-Type":"application/json"}});s.data.payload&&(this.categoryFilter=[...s.data.payload])}catch(t){console.log(t)}finally{this.isFilterLoading=!1}},async getLevelThreeCategoriesInfo(s){try{await this.axios({method:"GET",url:this.$catalogURL+"/api/getanylevelinfobyid",data:{id:[...s]},withCredentials:!0,headers:{"Content-Type":"application/json"}})}catch(t){alert(t[0].message)}},async getLevelThreeCategoriesByBrandId(){this.isFilterLoading=!0;try{let t=new URLSearchParams;Object.keys(this.selectedBrands).forEach(d=>{t.append("brand_id",d)});var s=await this.axios({method:"GET",url:this.$catalogURL+"/api/app/brand/category/lvl3",params:t,withCredentials:!0,headers:{"Content-Type":"application/json"}});s.data.payload&&(this.categoryFilter=[...s.data.payload])}catch(t){console.log(t)}finally{this.isFilterLoading=!1}},async createCollection(s,t){var n,e,r;let d;if(Object.entries(s.editedImage).length>0){const P=new FormData;P.append("image",s.editedImage.imageToUpload);let u;try{u=await this.axios({method:"POST",url:this.$cmsURL+"/api/v2/image/upload",headers:{"Content-Type":"multipart/form-data"},data:P})}catch(g){this.isLoading=!1,alert(g[0].message)}if(u.data.payload){let g=u.data.payload.url.split("/assets/img").join("/filters:strip_exif()/fit-in/800x800/assets/img");this.collection.collectionImage={src:g},d={src:g}}}else this.collection.collectionImage?d={src:this.collection.collectionImage}:d=null;if(this.collection.collectionName==""){alert("Please enter a collection name."),this.publishingCollection=!1,this.draftingCollection=!1;return}else{let P="POST",u={name:this.collection.collectionName,influencer_id:this.$store.state.user.userObject.influencer_info.id,image:d,catalog_ids:Object.keys(this.$store.state.globalState.selectedProducts)};
1t=="create_publish"?u.is_draft=!1:t=="create_draft"&&(u.is_draft=!0);try{await this.axios({method:P,url:this.$catalogURL+"/api/app/influencer/collection",withCredentials:!0,headers:{"Content-Type":"application/json"},data:u}),this.$store.dispatch("user/setUserData",{...this.$store.state.user.userObject,influencer_info:{...this.$store.state.user.userObject.influencer_info,content_count:{...this.$store.state.user.userObject.influencer_info.content_count,collections:((r=(e=(n=this.$store.state.user.userObject)==null?void 0:n.influencer_info)==null?void 0:e.content_count)==null?void 0:r.collections)+1}}})}catch(g){console.log(g),this.publishingCollection=!1,this.draftingCollection=!1,alert(g[0].message)}setTimeout(()=>{this.draftingCollection=!1,this.publishingCollection=!1,this.$router.go(-2)},2500)}},updateCollectionName(s){this.collection.collectionName=s},closeEditCollection(){this.showEditCollectionPopup=!1},async sortProducts(s){this.selectedSortingOption.value!==s&&(this.products=[],this.page=0,this.selectedSortingOption=s,this.showSortingPopup=!1),await this.getProducts()},async addProducts(){var s,t,d,n,e,r,P;if(C("MyStore_Productpage_AddSelectedProducts_Click"),this.$route.path.includes("create-collection/")){if(this.$getObjectLength(this.$store.state.globalState.selectedProducts)<4){alert("Please keep atleast 4 products in collection");return}this.showEditCollectionPopup=!0}else if(this.$route.name=="BrandProductsEditCollection"||this.$route.name=="CategoryProductsEditCollection"){if(this.$getObjectLength(this.$store.state.globalState.selectedProducts)<4){alert("Please keep atleast 4 products in collection");return}let u={...this.$store.state.creatorStore.creatorSpecificCollection},g;(s=u==null?void 0:u.image)!=null&&s.src?g={src:(t=u==null?void 0:u.image)==null?void 0:t.src}:g=null;let O=new Set([...Object.keys(this.$store.state.globalState.selectedProducts)]),F=Array.from(O),B={id:u.id,name:u.name,influencer_id:this.$store.state.user.userObject.influencer_info._id,image:g,catalog_ids:F,status:u.status};((e=(n=(d=this.$store.state.creatorStore)==null?void 0:d.creatorSpecificCollection)==null?void 0:n.pinned_product_ids)==null?void 0:e.length)>0&&(B.pinned_product_ids=[...(P=(r=this.$store.state.creatorStore)==null?void 0:r.creatorSpecificCollection)==null?void 0:P.pinned_product_ids]);try{this.addProductsLoader=!0,await this.axios({method:"PUT",url:this.$catalogURL+"/api/app/influencer/collection",withCredentials:!0,headers:{"Content-Type":"application/json"},data:B}),this.addProductsLoader=!1}catch(j){this.addProductsLoader=!1,alert(j[0].message)}this.$router.go()}else if(this.$route.name=="BrandProductsAddProducts"||this.$route.name=="CategoryProductsAddProducts"){if(this.removedCatalogsWhileEditing.length>0&&await this.deleteAddCatalogsAPI("DELETE",this.removedCatalogsWhileEditing),this.$getObjectLength(this.$store.state.globalState.selectedProducts)>0){for(let u in this.$store.state.globalState.pinnedSpotlightProducts)this.$store.dispatch("globalState/deleteSelectedProduct",{id:u});await this.deleteAddCatalogsAPI("POST",Object.keys(this.$store.state.globalState.selectedProducts),Object.keys(this.$store.state.globalState.pinnedSpotlightProducts))}}else if(this.$route.name=="ChooseProducts"||this.$route.name=="ChooseBrandProducts"||this.$route.name=="ChooseCategoryProducts"){if(this.$getObjectLength(this.$store.state.globalState.selectedProducts)<4){alert("Please keep atleast 4 products in collection");return}this.$store.dispatch("globalState/setProductsToCuratedCollection",{...this.$store.state.globalState.productsInCuratedCollections,collection:{...this.$store.state.globalState.productsInCuratedCollections.collection,catalog_info:[...this.addedCatalogsInArray],structured:this.$store.state.globalState.selectedProducts}}),this.$router.go(-2)}},async deleteAddCatalogsAPI(s,t,d){this.addProductsLoader=!0;try{await this.axios({method:s,url:this.$catalogURL+"/api/app/influencer/products",data:{catalog_ids:t,pinned_product_ids:[...d]},withCredentials:!0,headers:{"Content-Type":"application/json"}}),this.addProductsLoader=!1,s=="POST"&&this.$router.replace({name:"Products"})}catch(n){this.addProductsLoader=!1,alert(n.response.data.error[0].message)}},async getBrandFilterByCategoryId(){try{let s=new URLSearchParams;s.append("category_id",this.$route.params.lvlTwoId);let t=await this.axios({method:"GET",url:this.$catalogURL+"/api/app/category/brand",params:s});t.data.payload&&t.data.payload.brand_info&&(this.brandFilter=[...t.data.payload.brand_info])}catch(s){console.log(s)}},async getBrandInfoById(s){var t={ids:[]};this.$route.params.brandId?t.ids=[this.$route.params.brandId]:s.length>
10&&s.forEach(d=>{t.ids.push(d.key)});try{let d=await this.axios({method:"POST",url:this.$entityURL+"/api/app/brand/basic",withCredentials:!0,data:t,headers:{"Content-Type":"application/json"}});d.data.payload&&(this.$route.params.brandId?(this.selectedBrands[this.$route.params.brandId]=d.data.payload[0],this.pageTitle=this.selectedBrands[this.$route.params.brandId].name,await this.getLevelThreeCategoriesByBrandId()):this.brandFilter.length==0&&(this.brandFilter=d.data.payload))}catch(d){console.log(d)}},async getProducts(){var t,d,n;this.isLoading=!0;try{let e={brand_ids:[],category_lvl3:[],page:this.page};Object.keys(this.selectedBrands).length>0?(e.brand_ids=Object.keys(this.selectedBrands),Object.keys(this.selectedBrands).length==1?this.pageTitle=Object.values(this.selectedBrands)[0].name:this.pageTitle=0):this.$route.params.brandId&&(e.brand_ids.push(this.$route.params.brandId),this.getBrandInfoById()),this.$route.params.lvlTwoId&&(e.category_id=this.$route.params.lvlTwoId),this.selectedSortingOption.value!==0&&(e.sort=this.selectedSortingOption.value),Object.keys(this.selectedCategories).length>0&&(e.category_lvl3=Object.keys(this.selectedCategories)),this.appliedFilters=e,this.appliedFilters=JSON.parse(JSON.stringify(this.appliedFilters));var s;try{s=await this.axios({method:"POST",url:this.$catalogURL+"/api/catalog/category",data:e,withCredentials:!0,headers:{"Content-Type":"application/json"}}),s.data.payload.data?((t=s.data.payload)==null||t.data.forEach(r=>{r.inventory_status=="out_of_stock"?this.oosProducts.push(r):this.products.push(r)}),this.oosProducts.length>this.products.length&&(this.observer=k(this.target,this.callback)),((n=(d=s.data.payload)==null?void 0:d.data)==null?void 0:n.length)<20&&(this.observer.unobserve(this.target),this.receivedAllProducts=!0,this.products=[...this.products,...this.oosProducts],this.oosProducts=[])):(this.observer.unobserve(this.target),this.products=[...this.products,...this.oosProducts],this.oosProducts=[],this.receivedAllProducts=!0),this.page++,this.isLoading=!1}catch(r){this.isLoading=!1,this.receivedAllProducts=!1,alert(r[0].message)}}catch(e){console.log(e),this.isLoading=!1}},addProduct(s){(this.$route.name=="ChooseProducts"||this.$route.name=="ChooseBrandProducts"||this.$route.name=="ChooseCategoryProducts")&&this.addedCatalogsInArray.push(s),this.$store.dispatch("globalState/addSelectedProduct",s),delete this.removedCatalogsWhileEditing[s==null?void 0:s.id]},removeProduct(s){(this.$route.name=="CategoryProductsAddProducts"||this.$route.name=="BrandProductsAddProducts")&&this.$store.dispatch("globalState/deletePinnedProductFromComponent",s),this.removedCatalogsWhileEditing[s==null?void 0:s.id]=s;let t=this.addedCatalogsInArray.findIndex(d=>d.id==s.id);this.addedCatalogsInArray.splice(t,1),this.$store.dispatch("globalState/deleteSelectedProduct",s),this.closeSelectedProducts(),(this.$route.name==="BrandProductsEditCollection"||this.$route.name==="CategoryProductsEditCollection")&&this.$store.dispatch("creatorStore/removeCreatorSpecificCollectionCatalog",s)},showSelectedProducts(){C("MyStore_Productpage_ViewProducts_Click"),document.body.style.overflowY="hidden",this.selectedProductsPopup=!0},closeSelectedProducts(){this.selectedProductsPopup=!1,document.body.style.overflowY="scroll"},openSortingPopup(){this.showSortingPopup=!0},goToFiltersView(){this.showFilters=!0}}},K={class:"choose-products-section"},X={key:1,class:"page-title"},tt={key:2,class:"search-bar-wrapper"},et={class:"brand-search-bar search-bar"},st=["placeholder"],ot={class:"filter-section-desktop"},rt={class:"heading"},it=["onClick"],at={key:0,class:"tab-view"},lt={key:0,class:"category-filter-wrapper"},dt={key:0,class:"filter-loader"},nt=["onClick"],ct={style:{display:"flex","align-items":"center",gap:"10px"}},ht=["src"],ut={key:1,class:"brand-filter-wrapper"},pt=["onClick"],gt={class:"logo-name-wrapper"},Ct=["src"],mt={class:"middle-section-wrapper"},yt={class:"search-bar-wrapper"},ft={class:"search-input"},Pt=["placeholder"],bt={key:0,class:"sort-menu"},wt=["onClick"],kt={key:1,class:"products-loader"},vt={key:2,class:"empty-products-screen"},St={key:0,class:"empty-subtitle"},_t={key:1,class:"empty-subtitle"},Bt={key:6,class:"selected-products-wrapper"},Lt={class:"heading"},Tt={class:""},xt={class:"added-product-wrapper"},Ot={class:"create-store-btn"},Ft={key:7,class:"selected-products-mobile"},jt={class:"added-products-wrapper"},At={class:"number-of-products"},It={class:"selected-products-content"},Et={key:9,class:"sort-bottom-sheet"},Mt={class:"sort-options-wrapper"},Ut=["onClick"],Rt={class:"radio-btn"},Nt={key:0,class:"selected-radio-btn"},$t={key:10,class:"filter-view"},Qt={class:"top-bar"},Dt={style:{display:"flex","align-items":"center",gap:"14px"}},Vt={class:"sidebar"}
1,Gt=["onClick"],Ht={class:"tab"},Zt={key:0,class:"mapped-brands-wrapper"},Wt={class:"brands-wrapper"},zt=["onClick"],qt={class:"logo-name-wrapper"},Yt=["src"],Jt={key:1,class:"category-filter-wrapper"},Kt={key:0,class:"filter-loader"},Xt=["onClick"],te={style:{display:"flex","align-items":"center",gap:"10px"}},ee=["src"],se={class:"filter-btns"};function oe(s,t,d,n,e,r){const P=b("EditCollectionComponent"),u=b("MagnifyingGlass"),g=b("BackArrow"),O=b("CrossIcon"),F=b("ProductCard"),B=b("SelectedProductsPanel"),j=b("SortFilter"),U=b("SelectedProductComponent"),L=b("ButtonComponent");return a(),l("div",K,[e.showEditCollectionPopup?(a(),w(P,{key:0,showDraft:!0,onCloseEditCollection:r.closeEditCollection,onUpdateCollectionName:r.updateCollectionName,onSubmit:r.publishNewCollection,onDraft:r.draftNewCollection,source:"choose-products",isDrafting:e.draftingCollection,savingChanges:e.publishingCollection},null,8,["onCloseEditCollection","onUpdateCollectionName","onSubmit","onDraft","isDrafting","savingChanges"])):h("",!0),e.pageTitle.length>0&&!e.showSearchBar?(a(),l("div",X,p(e.pageTitle),1)):h("",!0),e.showSearchBar||e.productSearchQuery.length>0?(a(),l("div",tt,[o("div",et,[t[18]||(t[18]=o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M7.66634 14.0002C11.1641 14.0002 13.9997 11.1646 13.9997 7.66683C13.9997 4.16903 11.1641 1.3335 7.66634 1.3335C4.16854 1.3335 1.33301 4.16903 1.33301 7.66683C1.33301 11.1646 4.16854 14.0002 7.66634 14.0002Z",stroke:"#BEBEBE","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M14.6663 14.6668L13.333 13.3335",stroke:"#BEBEBE","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),E(o("input",{ref:"productSearchBar",type:"text",placeholder:`Searching in ${e.pageTitle.length>0?e.pageTitle:"all products"}`,onInput:t[0]||(t[0]=(...i)=>r.searchProducts&&r.searchProducts(...i)),onClick:t[1]||(t[1]=(...i)=>r.trackSearchClick&&r.trackSearchClick(...i)),"onUpdate:modelValue":t[2]||(t[2]=i=>e.productSearchQuery=i)},null,40,st),[[M,e.productSearchQuery]]),(a(),l("svg",{onClick:t[3]||(t[3]=(...i)=>r.closeOrClearSearchBar&&r.closeOrClearSearchBar(...i)),style:{position:"relative",right:"-2px",top:"-1px"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t[17]||(t[17]=[o("path",{d:"M8.1499 16.8506L16.6352 8.3653",stroke:"#292D32","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),o("path",{d:"M16.6352 16.8505L8.1499 8.36523",stroke:"#292D32","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])))])])):h("",!0),e.showSearchBar?h("",!0):(a(),l("svg",{key:3,onClick:t[4]||(t[4]=(...i)=>r.openSearchBar&&r.openSearchBar(...i)),class:"search-icon",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t[19]||(t[19]=[o("path",{d:"M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z",stroke:"#13141B","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),o("path",{d:"M22 22L20 20",stroke:"#13141B","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))),o("div",{class:f(["add-product-wrapper",{"three-columns":r.noOfselectedProducts>0}])},[o("div",ot,[o("div",rt,[t[20]||(t[20]=o("span",null,"Filter",-1)),r.showApplyButton?(a(),l("button",{key:0,onClick:t[5]||(t[5]=(...i)=>r.applyFilters&&r.applyFilters(...i)),class:"apply-filter-btn"}," Apply ")):h("",!0)]),(a(!0),l(m,null,y(e.filterCategories,i=>(a(),l("div",{class:"filter-wrapper",key:i},[o("div",{onClick:c=>r.changeFilterTab(i.tab),class:f([{"active-filter-heading":i.tab===e.currentFilterTab},"filter-heading"])},[o("span",null,p(i.name),1),(a(),l("svg",{class:f({rotate:i.tab===e.currentFilterTab}),width:"13",height:"7",viewBox:"0 0 13 7",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t[21]||(t[21]=[o("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.2555 0.806832L11.9946 5.54594C12.3273 5.87863 12.3273 6.41778 11.9946 6.75048C11.6619 7.08317 11.
11228 7.08317 10.7901 6.75048L6.57421 2.53462L2.35834 6.75048C2.02565 7.08317 1.4865 7.08317 1.15381 6.75048C0.821124 6.41778 0.821124 5.87863 1.15381 5.54594L5.89292 0.806832C6.26922 0.430532 6.87919 0.430532 7.25549 0.806832H7.2555Z",fill:"black"},null,-1)]),2))],10,it),i.tab==e.currentFilterTab?(a(),l("div",at,[e.currentFilterTab=="category"?(a(),l("div",lt,[e.isFilterLoading?(a(),l("div",dt,t[22]||(t[22]=[o("div",{class:"filter-spinner"},null,-1)]))):(a(!0),l(m,{key:1},y(e.categoryFilter,(c,S)=>{var _,v;return a(),l("div",{class:"category-filter",style:{"border-bottom":"0"},onClick:A=>r.selectCategory(c),key:S},[o("div",ct,[c.level1_info&&c.level1_info.thumbnail?(a(),l("img",{key:0,src:c.level1_info.thumbnail.src,style:{width:"24px",height:"24px","object-fit":"cover","border-radius":"6px"},onError:t[6]||(t[6]=A=>{A.target.style.display="none",A.target.nextElementSibling.style.display="flex"})},null,40,ht)):h("",!0),o("div",{class:"category-thumb-fallback",style:I(c.level1_info&&c.level1_info.thumbnail?"display:none":"display:flex")},p((v=(_=c==null?void 0:c.name)==null?void 0:_.charAt(0))==null?void 0:v.toUpperCase()),5),x(" "+p(c==null?void 0:c.name),1)]),o("div",{class:f(["checkbox",{"selected-checkbox":e.selectedCategories[c.id]}])},t[23]||(t[23]=[o("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M0.75 3.99998L3.58 6.82998L9.25 1.16998",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],8,nt)}),128))])):h("",!0),e.currentFilterTab=="brand"?(a(),l("div",ut,[(a(!0),l(m,null,y(e.brandFilter,c=>(a(),l("div",{class:"brand-wrapper",onClick:S=>r.selectBrand(c),key:c.id},[o("div",gt,[o("img",{style:{width:"32px",height:"32px","box-sizing":"border-box",border:"0.5px solid rgba(0, 0, 0, 0.05)","border-radius":"50%","object-fit":"cover"},src:c.logo.src,alt:""},null,8,Ct),o("span",null,p(c.name),1)]),o("div",{class:f(["checkbox",{"selected-checkbox":e.selectedBrands[c.id]}])},t[24]||(t[24]=[o("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M0.75 3.99998L3.58 6.82998L9.25 1.16998",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],8,pt))),128))])):h("",!0)])):h("",!0),t[25]||(t[25]=o("div",{class:"filter-"},null,-1))]))),128))]),o("div",mt,[o("div",yt,[o("div",ft,[e.productSearchQuery.length==0?(a(),w(u,{key:0,width:"16",height:"16",class:"light-color"})):(a(),w(g,{key:1,width:"16",height:"16",onClick:r.closeOrClearSearchBar,style:{cursor:"pointer"}},null,8,["onClick"])),E(o("input",{type:"text",placeholder:`Search in ${e.pageTitle.length>0?e.pageTitle:"all products"}`,onInput:t[7]||(t[7]=(...i)=>r.searchProducts&&r.searchProducts(...i)),onClick:t[8]||(t[8]=(...i)=>r.trackSearchClick&&r.trackSearchClick(...i)),"onUpdate:modelValue":t[9]||(t[9]=i=>e.productSearchQuery=i)},null,40,Pt),[[M,e.productSearchQuery]]),e.productSearchQuery.length>0?(a(),w(O,{key:2,width:"16",height:"16",onClick:r.closeOrClearSearchBar,style:{cursor:"pointer"}},null,8,["onClick"])):h("",!0)]),o("div",{class:"sort",onClick:t[10]||(t[10]=(...i)=>r.sortPop&&r.sortPop(...i))},t[26]||(t[26]=[o("svg",{width:"15",height:"12",viewBox:"0 0 15 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.49704 0.556641H1.27919C0.849936 0.556641 0.501953 0.904623 0.501953 1.33387C0.501953 1.76313 0.849936 2.11111 1.27919 2.11111H7.49704C7.9263 2.11111 8.27428 1.76312 8.27428 1.33387C8.27428 0.904615 7.92629 0.556641 7.49704 0.556641ZM5.94258 5.22003H1.27919C0.849936 5.22003 0.501953 5.56802 0.501953 5.99727C0.501953 6.42652 0.849936 6.7745 1.27919 6.7745H5.94258C6.37184 6.7745 6.71981 6.42652 6.71981 5.99727C6.71981 5.56801 6.37183 5.22003 5.94258 5.22003ZM4.38811 9.88343H1.27919C0.849936 9.88343 0.501953 10.2314 0.501953 10.6607C0.501953 11.0899 0.849936 11.4379 1.27919 11.4379H4.38811C4.81737 11.4379 5.16535 11.0899 5.16535 10.6607C5.16535 10.2314 4.81736 9.88343 4.38811 9.88343ZM14.2667 7.77713C14.1207 7.62999 13.9221 7.54722 13.7149 7.54722C13.5076 7.54722 13.309 7.62999 13.163 7.77713L12.1604 8.78753V1.33387C12.1604 0.904623 11.8124 0.556641 11.3832 0.556641C10.9539 0.556641 10.6059 0.904623 10.6059 1.33387V8.78753L9.6033 7.77713C9.29853 7.47236 8.80439 7.47236 8.49963 7.77713C8.19486 8.0819 8.19486 8.57603 8.49963 8.8808L10.8313 11.2125C10.9773 11.3596 11.
11759 11.4424 11.3832 11.4424C11.5904 11.4424 11.7891 11.3596 11.935 11.2125L14.2667 8.8808C14.4138 8.73486 14.4966 8.5362 14.4966 8.32896C14.4966 8.12172 14.4138 7.92307 14.2667 7.77713Z",fill:"#342546"})],-1),o("div",{class:"sort-text"},"Sort By",-1)])),e.showSortingPopup?(a(),l("div",bt,[o("div",{class:"close",onClick:t[11]||(t[11]=i=>e.showSortingPopup=!1)},t[27]||(t[27]=[o("img",{src:H,alt:""},null,-1)])),(a(!0),l(m,null,y(e.sortingOptions,i=>(a(),l("div",{key:i.name,onClick:c=>r.sortProducts(i),class:"low-high sort-by"},p(i.name),9,wt))),128))])):h("",!0)]),(e.products.length>0||e.oosProducts.length>0)&&e.productSearchQuery.length==0?(a(),l("div",{key:0,class:f(["product-listing product-listing-wrapper",{"padding-bottom":r.noOfselectedProducts>0}])},[(a(!0),l(m,null,y(e.products,i=>(a(),w(F,{product_info:i,key:i.id,onTrackProductCardClick:r.trackProductCardClick,onAddProduct:r.addProduct,onRemoveProduct:r.removeProduct,isSelected:!!s.$store.state.globalState.selectedProducts[i.id]},null,8,["product_info","onTrackProductCardClick","onAddProduct","onRemoveProduct","isSelected"]))),128))],2)):h("",!0),e.isLoading?(a(),l("div",kt,t[28]||(t[28]=[o("div",{class:"products-spinner"},null,-1)]))):h("",!0),e.products.length==0&&e.oosProducts.length==0&&!e.isLoading?(a(),l("div",vt,[t[29]||(t[29]=o("img",{src:Y,alt:""},null,-1)),t[30]||(t[30]=o("div",{class:"empty-title"},"No Products Found",-1)),e.productSearchQuery.length>0?(a(),l("div",St,' No results for "'+p(e.productSearchQuery)+'" ',1)):(a(),l("div",_t," There are no products available here yet "))])):h("",!0),t[31]||(t[31]=o("div",{class:"product-footer"},null,-1))]),r.noOfselectedProducts>0?(a(),w(B,{key:0,buttonText:e.submitText,loading:e.addProductsLoader,onAddToStore:r.addProducts,onRemoveProduct:r.removeProduct},null,8,["buttonText","loading","onAddToStore","onRemoveProduct"])):h("",!0)],2),e.productSearchQuery.length==0||e.searchQuery.length==0?(a(),w(j,{key:4,style:I(`margin-bottom: ${r.noOfselectedProducts>0?75:0}px`),onOpenSorting:r.openSortingPopup,onOpenFilters:r.goToFiltersView},null,8,["style","onOpenSorting","onOpenFilters"])):h("",!0),e.selectedProductsPopup&&r.noOfselectedProducts>0?(a(),l("div",{key:5,class:"selected-products-backdrop",onClick:t[12]||(t[12]=(...i)=>r.closeSelectedProducts&&r.closeSelectedProducts(...i))})):h("",!0),e.selectedProductsPopup&&r.noOfselectedProducts>0?(a(),l("div",Bt,[t[32]||(t[32]=o("div",{class:"pill"},null,-1)),o("div",Lt,[o("div",Tt,"Added Products ("+p(r.noOfselectedProducts)+")",1)]),o("div",xt,[(a(!0),l(m,null,y(s.$store.state.globalState.selectedProducts,(i,c)=>(a(),w(U,{class:"selected-product",productInfo:i,onRemoveProduct:r.removeProduct,key:c},null,8,["productInfo","onRemoveProduct"]))),128))]),o("div",Ot,[T(L,{onSubmit:r.addProducts,defaultText:"Add Products",type:"primary",loading:e.addProductsLoader},null,8,["onSubmit","loading"])])])):h("",!0),r.noOfselectedProducts>0?(a(),l("div",Ft,[o("div",jt,[o("div",At,p(r.noOfselectedProducts>9?r.noOfselectedProducts:`0${r.noOfselectedProducts}`),1),o("div",It,[t[33]||(t[33]=o("span",null,"Added Products",-1)),o("button",{onClick:t[13]||(t[13]=(...i)=>r.showSelectedProducts&&r.showSelectedProducts(...i)),class:"link"}," View Products ")])]),T(L,{style:{width:"40%"},onSubmit:r.addProducts,defaultText:"Add Products",type:"primary",loading:e.addProductsLoader},null,8,["onSubmit","loading"])])):h("",!0),e.showSortingPopup?(a(),l("div",{key:8,class:"backdrop",onClick:t[14]||(t[14]=i=>e.showSortingPopup=!e.showSortingPopup)})):h("",!0),e.showSortingPopup?(a(),l("div",Et,[t[34]||(t[34]=o("div",{class:"heading"},"Sort By:",-1)),o("div",Mt,[(a(!0),l(m,null,y(e.sortingOptions,i=>(a(),l("div",{onClick:c=>r.sortProducts(i),class:f([{"selected-option":e.selectedSortingOption.value===i.value},"sort-option"]),key:i.value},[x(p(i.name)+" ",1),o("div",Rt,[e.selectedSortingOption.value===i.value?(a(),l("div",Nt)):h("",!0)])],10,Ut))),128))])])):h("",!0),e.showFilters?(a(),l("div",$t,[o("div",Qt,[o("div",Dt,[(a(),l("svg",{onClick:t[15]||(t[15]=i=>e.showFilters=!e.showFilters),width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t[35]||(t[35]=[o("path",{d:"M23 12L2 12",stroke:"#13141B","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),o("path",{d:"M2 12C5.25 11 7.25 9 8 6",stroke:"#13141B","stroke-width":"1.5","stroke-linecap":"round"},null,-1),o("path",{d:"M2 12C5.25 13 7.25 15 8 18",stroke:"#13141B","stroke-width":"1.5","stroke-linecap":"round"},null,-1)]))),t[36]||(t[36]=x(" Filters "))])]),o("div",Vt,[(a(!0),l(m,null,y(e.filterCategories,i=>(a(),l("div",{onClick:c=>r.changeFilterTab(i.tab),class:f([{"active-item":e.currentFilterTab==i.tab},"sidebar-item"]),key:i.name},[o("span",null,p(i.name),1)],10,Gt))),128))]),o("div",Ht,[e.currentFilterTab=="brand"?(a(),l("div",Zt,[o("div",Wt,[(a(!0),l(m,null,y(e.brandFilter,i=>(a(),l("div",{class:"brand-wrapper",onClick:c=>
1r.selectBrand(i),key:i.id},[o("div",qt,[o("img",{src:i.logo.src,alt:""},null,8,Yt),o("span",null,p(i.name),1)]),o("div",{class:f(["checkbox",{"selected-checkbox":e.selectedBrands[i.id]}])},t[37]||(t[37]=[o("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M0.75 3.99998L3.58 6.82998L9.25 1.16998",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],8,zt))),128))])])):h("",!0),e.currentFilterTab=="category"?(a(),l("div",Jt,[e.isFilterLoading?(a(),l("div",Kt,t[38]||(t[38]=[o("div",{class:"filter-spinner"},null,-1)]))):(a(!0),l(m,{key:1},y(e.categoryFilter,(i,c)=>{var S,_;return a(),l("div",{class:"category-filter",onClick:v=>r.selectCategory(i),key:c},[o("div",te,[i.level1_info&&i.level1_info.thumbnail?(a(),l("img",{key:0,src:i.level1_info.thumbnail.src,style:{width:"24px",height:"24px","object-fit":"cover","border-radius":"6px"},onError:t[16]||(t[16]=v=>{v.target.style.display="none",v.target.nextElementSibling.style.display="flex"})},null,40,ee)):h("",!0),o("div",{class:"category-thumb-fallback",style:I(i.level1_info&&i.level1_info.thumbnail?"display:none":"display:flex")},p((_=(S=i==null?void 0:i.name)==null?void 0:S.charAt(0))==null?void 0:_.toUpperCase()),5),x(" "+p(i==null?void 0:i.name),1)]),o("div",{class:f(["checkbox",{"selected-checkbox":e.selectedCategories[i.id]}])},t[39]||(t[39]=[o("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M0.75 3.99998L3.58 6.82998L9.25 1.16998",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],8,Xt)}),128))])):h("",!0)]),o("div",se,[T(L,{type:"back",defaultText:"Reset",onSubmit:r.clearFilters},null,8,["onSubmit"]),T(L,{type:"primary",defaultText:"Apply",onSubmit:r.applyFilters},null,8,["onSubmit"])])])):h("",!0)])}const he=R(J,[["render",oe],["__scopeId","data-v-033bc208"]]);export{he as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.