1import{a as H}from"./chunk-ARZFX6IV.js";import{a as A}from"./chunk-GIIMJHN6.js";import{a as j}from"./chunk-QN3GDSSY.js";import{a as N}from"./chunk-2MN7HZTO.js";import{a as $}from"./chunk-SZVS3FHI.js";import{a as F}from"./chunk-ZMMM2NJV.js";import"./chunk-IJ2PWAPC.js";import"./chunk-IKQR3USM.js";import"./chunk-ZV7NG4F4.js";import"./chunk-DJ5AJG3T.js";import"./chunk-6EF6RNOO.js";import"./chunk-T3DWPM4S.js";import"./chunk-K6QYQNRN.js";import"./chunk-WF4KZOYP.js";import"./chunk-EB6TJ75L.js";import{a as P}from"./chunk-AB6CKZTE.js";import{e as R}from"./chunk-YQZAETCE.js";import{o as U,x as z}from"./chunk-EO42E46J.js";import"./chunk-3QVSKJ3X.js";import{I as D,c as V}from"./chunk-ERUCNOOT.js";import{$b as E,Ba as x,Fa as k,Jb as _,Lb as v,Qb as p,Sb as O,Tb as S,Ub as I,Vb as i,Wb as a,Xb as d,_a as g,da as u,db as o,fc as T,gc as c,la as M,ma as b,sb as w,tc as l,uc as s,vc as y,yb as m}from"./chunk-DBE7WQEG.js";import{g as h}from"./chunk-W7GRJBO5.js";function B(n,e){n&1&&(i(0,"div",0),d(1,"div",2),a())}function W(n,e){n&1&&(i(0,"div",1),d(1,"i",3),i(2,"h1"),l(3,"Produit introuvable"),a(),i(4,"p"),l(5,"Ce produit n'est plus disponible sur la marketplace Hou.la."),a(),i(6,"a",4),l(7,"D\xE9couvrir la marketplace"),a()()),n&2&&(o(6),_("href","https://hou.la",g))}function q(n,e){if(n&1&&d(0,"img",8),n&2){let t=c(),r=c(2);_("src",r.selectedImage(),g)("alt",t.title)}}function G(n,e){n&1&&(i(0,"div",9),d(1,"i",23),a())}function J(n,e){if(n&1){let t=E();i(0,"button",25),T("click",function(){let C=M(t).$implicit,f=c(4);return b(f.selectImage(C))}),d(1,"img",8),a()}if(n&2){let t=e.$implicit,r=c(2),C=c(2);v("is-active",t===C.selectedImage()),o(),_("src",t,g)("alt",r.title)}}function K(n,e){if(n&1&&(i(0,"div",10),S(1,J,2,4,"button",24,O),a()),n&2){let t=c(),r=c(2);o(),I(r.galleryImages(t))}}function Q(n,e){if(n&1&&(i(0,"div",12),l(1),a()),n&2){let t=c();o(),s(t.brand)}}function X(n,e){if(n&1&&d(0,"img",8),n&2){let t=c(2);_("src",t.seller.avatarUrl,g)("alt",t.seller.displayName)}}function Y(n,e){if(n&1&&(i(0,"a",14),m(1,X,1,2,"img",8),i(2,"span"),l(3,"Vendu par "),i(4,"strong"),l(5),a()()()),n&2){let t=c(),r=c(2);_("href",r.buyUrl(t),g),o(),p(t.seller.avatarUrl?1:-1),o(4),s(t.seller.displayName)}}function Z(n,e){if(n&1&&(i(0,"span",26),l(1),a(),i(2,"span",27),l(3),a()),n&2){let t=c(),r=c(2);o(),s(r.formatPrice(t.salePriceCents,t.currency)),o(2),s(r.formatPrice(t.priceCents,t.currency))}}function tt(n,e){if(n&1&&(i(0,"span",16),l(1),a()),n&2){let t=c(),r=c(2);o(),s(r.formatPrice(t.priceCents,t.currency))}}function et(n,e){n&1&&(d(0,"i",28),l(1," En stock "))}function nt(n,e){n&1&&(d(0,"i",29),l(1," Rupture de stock "))}function it(n,e){if(n&1&&(i(0,"div",20),d(1,"i",30),l(2),i(3,"span"),l(4),a()()),n&2){let t=c();o(2),y(" ",t.averageRating," / 5 "),o(2),y("(",t.reviewCount," avis)")}}function ot(n,e){if(n&1&&(i(0,"section",21)(1,"h2"),l(2,"Description"),a(),d(3,"p",31),a()),n&2){let t=c();o(3),_("innerText",t.description)}}function at(n,e){if(n&1&&(i(0,"dt"),l(1,"Marque"),a(),i(2,"dd"),l(3),a()),n&2){let t=c();o(3),s(t.brand)}}function rt(n,e){if(n&1&&(i(0,"dt"),l(1,"GTIN"),a(),i(2,"dd"),l(3),a()),n&2){let t=c();o(3),s(t.gtin)}}function lt(n,e){if(n&1&&(i(0,"dt"),l(1,"R\xE9f\xE9rence"),a(),i(2,"dd"),l(3),a()),n&2){let t=c();o(3),s(t.sku)}}function ct(n,e){if(n&1&&(i(0,"dt"),l(1,"\xC9tat"),a(),i(2,"dd"),l(3),a()),n&2){let t=c();o(3),s(t.condition)}}function pt(n,e){if(n&1&&(i(0,"article",5)(1,"div",6)(2,"div",7),m(3,q,1,2,"img",8)(4,G,2,0,"div",9),a(),m(5,K,3,0,"div",10),a(),i(6,"div",11),m(7,Q,2,1,"div",12),i(8,"h1",13),l(9),a(),m(10,Y,6,3,"a",14),i(11,"div",15),m(12,Z,4,2)(13,tt,2,1,"span",16),a(),i(14,"div",17),m(15,et,2,0)(16,nt,2,0),a(),i(17,"a",18),d(18,"i",19),l(19," Acheter sur Hou.la "),a(),m(20,it,5,2,"div",20)(21,ot,4,1,"section",21),i(22,"dl",22),m(23,at,4,1)(24,rt,4,1)(25,lt,4,1)(26,ct,4,1),a()()()),n&2){let t=e,r=c(2);o(3),p(r.selectedImage()?3:4),o(2),p(r.galleryImages(t).length>1?5:-1),o(2),p(t.brand?7:-1),o(2),s(t.title),o(),p(t.seller?10:-1),o(2),p(r.hasDiscount(t)?12:13),o(2),v("is-in",t.availability==="in_stock")("is-out",t.availability==="out_of_stock"),o(),p(t.availability==="in_stock"?15:16),o(2),v("is-disabled",t.availability==="out_of_stock"),_("href",r.buyUrl(t),g),o(3),p(t.averageRating&&t.reviewCount?20:-1),o(),p(t.description?21:-1),o(2),p(t.brand?23:-1),o(),p(t.gtin?24:-1),o(),p(t.sku?25:-1),o(),p(t.condition?26:-1)}}function dt(n,e){if(n&1&&m(0,pt,27,20,"article",5),n&2){let t,r=c();p((t=r.product())?0:-1,t)}}var L=class n{route=u(U);shopService=u(A);seo=u(F);structuredData=u(j);platformId=u(k);ssrStatus=u(H,{optional:!0});product=x(null);loading=x(!0);notFound=x(!1);selectedImage=x(null);
1ngOnInit(){return h(this,null,function*(){let e=this.route.snapshot.paramMap.get("id");if(!e){this.fail();return}try{let t=yield this.shopService.getMarketplaceProduct(e);this.product.set(t),this.selectedImage.set(t.imageUrl||(t.galleryUrls?.[0]??null)),this.applySeo(t),this.loading.set(!1)}catch{this.fail()}})}fail(){this.notFound.set(!0),this.loading.set(!1),this.seo.disableFollow(),this.ssrStatus&&(this.ssrStatus.code=404)}hasDiscount(e){return!!e.salePriceCents&&e.salePriceCents>0&&e.salePriceCents<e.priceCents}effectivePriceCents(e){return this.hasDiscount(e)?e.salePriceCents:e.priceCents}formatPrice(e,t){return new Intl.NumberFormat("fr-FR",{style:"currency",currency:t||"EUR"}).format((e||0)/100)}buyUrl(e){let t=e.seller?.username;return t?`${P.app}/@${t}/bio?v=shop`:`${P.app}`}galleryImages(e){let t=[e.imageUrl,...e.galleryUrls??[]].filter(r=>!!r);return Array.from(new Set(t))}selectImage(e){V(this.platformId)&&this.selectedImage.set(e)}applySeo(e){let t=e.seller?.displayName||"Hou.la",r=`${e.title} \u2014 ${t} | Hou.la`,C=e.shortDescription||(e.description?e.description.slice(0,160):e.title),f=`${P.app}/marketplace/product/${e.id}`;this.seo.updateTitle(r),this.seo.updateDescription(C),this.seo.updateCanonical(`marketplace/product/${e.id}`),this.seo.updateOgUrl(f),this.seo.updateOgType("website"),e.imageUrl&&this.seo.updateOgImage(e.imageUrl),this.structuredData.setProductData({name:e.title,description:e.description||e.shortDe
1scription,image:this.galleryImages(e),url:f,priceCents:this.effectivePriceCents(e),currency:e.currency||"EUR",availability:e.availability,brand:e.brand,gtin:e.gtin,sku:e.sku,sellerName:t,averageRating:e.averageRating??null,reviewCount:e.reviewCount??null})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["app-view-marketplace-product"]],decls:5,vars:1,consts:[[1,"mp-product","mp-product--loading"],[1,"mp-product","mp-product--empty"],[1,"mp-spinner"],[1,"pi","pi-box"],[1,"mp-btn","mp-btn--primary",3,"href"],[1,"mp-product"],[1,"mp-gallery"],[1,"mp-gallery__main"],[3,"src","alt"],[1,"mp-gallery__placeholder"],[1,"mp-gallery__thumbs"],[1,"mp-info"],[1,"mp-brand"],[1,"mp-title"],[1,"mp-seller",3,"href"],[1,"mp-price"],[1,"mp-price__current"],[1,"mp-availability"],[1,"mp-btn","mp-btn--primary","mp-cta",3,"href"],[1,"pi","pi-shopping-cart"],[1,"mp-rating"],[1,"mp-description"],[1,"mp-specs"],[1,"pi","pi-image"],["type","button",1,"mp-gallery__thumb",3,"is-active"],["type","button",1,"mp-gallery__thumb",3,"click"],[1,"mp-price__sale"],[1,"mp-price__strike"],[1,"pi","pi-check-circle"],[1,"pi","pi-times-circle"],[1,"pi","pi-star-fill"],[3,"innerText"]],template:function(t,r){t&1&&(d(0,"app-widget-landing-nav"),m(1,B,2,0,"div",0)(2,W,8,1,"div",1)(3,dt,1,1),d(4,"app-widget-landing-footer")),t&2&&(o(),p(r.loading()?1:r.notFound()?2:3))},dependencies:[D,z,R,N,$],styles:["[_nghost-%COMP%]{display:block;--mp-accent: #2f8eef;--mp-accent-bright: #54a6f6;background:#0a0a14;color:#fff;font-family:Inter,system-ui,sans-serif}.mp-product[_ngcontent-%COMP%]{max-width:1100px;margin:0 auto;padding:128px 16px 64px;display:grid;grid-template-columns:1fr 1fr;gap:40px}@media (max-width: 768px){.mp-product[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:24px}}.mp-product--loading[_ngcontent-%COMP%], .mp-product--empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:50vh;gap:12px}.mp-product--loading[_ngcontent-%COMP%] i[_ngcontent-%COMP%], .mp-product--empty[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:48px;opacity:.4}.mp-spinner[_ngcontent-%COMP%]{width:36px;height:36px;border:3px solid rgba(127,127,127,.25);border-top-color:var(--mp-accent);border-radius:50%;animation:_ngcontent-%COMP%_mp-spin .8s linear infinite}@keyframes _ngcontent-%COMP%_mp-spin{to{transform:rotate(360deg)}}.mp-gallery__main[_ngcontent-%COMP%]{aspect-ratio:1;border-radius:16px;overflow:hidden;background:#7f7f7f14}.mp-gallery__main[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.mp-gallery__placeholder[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%;font-size:48px;opacity:.3}.mp-gallery__thumbs[_ngcontent-%COMP%]{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.mp-gallery__thumb[_ngcontent-%COMP%]{width:64px;height:64px;border-radius:10px;overflow:hidden;border:2px solid transparent;padding:0;cursor:pointer;background:none}.mp-gallery__thumb.is-active[_ngcontent-%COMP%]{border-color:var(--mp-accent)}.mp-gallery__thumb[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.mp-brand[_ngcontent-%COMP%]{text-transform:uppercase;letter-spacing:.04em;font-size:13px;opacity:.6;margin-bottom:4px}.mp-title[_ngcontent-%COMP%]{font-size:28px;line-height:1.2;margin:0 0 12px}.mp-seller[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;text-decoration:none;color:inherit;opacity:.85;margin-bottom:16px}.mp-seller[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:50%;object-fit:cover}.mp-price[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:12px;margin:8px 0}.mp-price__current[_ngcontent-%COMP%], .mp-price__sale[_ngcontent-%COMP%]{font-size:30px;font-weight:700}.mp-price__sale[_ngcontent-%COMP%]{color:var(--mp-accent)}.mp-price__strike[_ngcontent-%COMP%]{text-decoration:line-through;opacity:.5;font-size:18px}.mp-availability[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:14px;margin:8px 0 20px}.mp-availability.is-in[_ngcontent-%COMP%]{color:#1f9d55}.mp-availability.is-out[_ngcontent-%COMP%]{color:#d64545}.mp-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:14px 24px;border-radius:12px;font-weight:600;text-decoration:none;cursor:pointer;border:none}.mp-btn--primary[_ngcontent-%COMP%]{background:var(--mp-accent);color:#fff}.mp-btn.is-disabled[_ngcontent-%COMP%]{opacity:.5;pointer-events:none}.mp-cta[_ngcontent-%COMP%]{width:100%}.mp-rating[_ngcontent-%COMP%]{margin-top:14px;font-size:14px;opacity:.8}.mp-rating[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#f5a623}.mp-rating[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.6}.mp-description[_ngcontent-%COMP%]{margin-top:28px}.mp-description[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:18px;margin-bottom:8px}.mp-description[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{white-space:pre-line;line-height:1.6;opacity:.9}.mp-specs[_ngcontent-%COMP%]{margin-top:24px;display:grid;grid-template-columns:auto 1fr;gap:4px 16px;font-size:14px}.mp-specs[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{opacity:.55}.mp-specs[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;font-weight:500}"]})};
1export{L as ViewMarketplaceProductComponent};
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.