PageSourceSearch

https://gi-ga.tech/_next/static/chunks/pages/shop/product/[[...lien]]-c4aadf9689d9a986.js

js gi-ga.tech collected 2026-09-30 02:22:52 UTC 13,935 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[538],{75731:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/shop/product/[[...lien]]",function(){return t(92320)}])},92320:function(e,i,t){"use strict";t.r(i),t.d(i,{__N_SSG:function(){return re},default:function(){return oe}});var l=t(85893),n=t(42820),r=t(29815),o=t(26003),s=t(47869),a=t(82857),d=t(6557),c=t(15239),u=t(33941),v=t(16740),x=t(19988),p=t(94184),m=t.n(p),f=t(11163),h=t(62687),g={1921:{slidesPerView:5},1780:{slidesPerView:5},1536:{slidesPerView:5},1280:{slidesPerView:4},1024:{slidesPerView:4},640:{slidesPerView:3},360:{slidesPerView:1},0:{slidesPerView:1}},b=function(e){var i=e.sectionHeading,t=e.categorySlug,n=e.className,r=void 0===n?"":n,p=e.products,b=e.loading,j=e.error,N=e.limit,y=e.uniqueKey,k=e.carouselBreakpoint,w=(0,v.Z)().width,P=(0,f.useRouter)().locale,_=(0,h.M)(P);return w<767&&(N=4),(0,l.jsxs)("div",{className:m()("relative",r),children:[i&&(0,l.jsx)("div",{className:" mb-5 md:mb-6",children:(0,l.jsx)(o.Z,{sectionHeading:i,className:"mb-0 block-title"})}),j?(0,l.jsx)("div",{className:"2xl:pe-10",children:(0,l.jsx)(c.Z,{message:j})}):(0,l.jsx)("div",{className:"heightFull xl:-me-40 2xl:-me-28 4xl:me-0 relative after-item-opacity",children:(0,l.jsx)(a.Z,{breakpoints:k||g,className:" ",prevButtonClassName:"start-3 -top-12 3xl:top-auto 3xl:-translate-y-2 4xl:-translate-y-10",nextButtonClassName:"end-3 -top-12 3xl:top-auto transform 2xl:translate-x-0 3xl:-translate-y-2 ".concat("rtl"===_?"xl:-translate-x-2.5":"xl:translate-x-2.5"),children:b?Array.from({length:12}).map((function(e,i){return(0,l.jsx)(d.o5,{className:"px-1.5 md:px-2 xl:px-2.5",children:(0,l.jsx)("article",{className:"flex flex-col product-card m-3 h-full",children:(0,l.jsx)(x.Z,{uniqueKey:"product--key-".concat(i)},"product--key-".concat(i))},"product--key-".concat(i))},"".concat(y,"-").concat(i))})):(0,l.jsxs)(l.Fragment,{children:[p&&(null===p||void 0===p?void 0:p.slice(0,N).map((function(e,i){return(0,l.jsx)(d.o5,{className:"",children:(0,l.jsx)(s.Z,{isConfig:!0,product:e})},"".concat(y,"-").concat(i))}))),(0,l.jsx)(d.o5,{className:"p-2.5 flex items-center justify-center",children:(0,l.jsx)(u.Z,{href:t})})]})})})]})},j=t(64251),N=function(e){var i=e.carouselBreakpoint,t=e.className,n=e.products,o=e.uniqueKey,s=void 0===o?"related-product-popup":o,a=e.isLoading2,d=e.error,c=e.categorySlug,u=void 0===c?"#":c;return(0,l.jsx)(b,{sectionHeading:"PRODUITS SIMILAIRES",categorySlug:u,className:t,products:(0,r.Z)((null===n||void 0===n?void 0:n.part1Products)||[]).concat((0,r.Z)((null===n||void 0===n?void 0:n.part2Products)||[]),(0,r.Z)((null===n||void 0===n?void 0:n.part3Products)||[])),loading:a,error:null===d||void 0===d?void 0:d.message,limit:j.b.RELATED_PRODUCTS_LIMITS,uniqueKey:s,carouselBreakpoint:i})},y=t(67294),k=t(14685),w=t(11129),P=t(22349),_=t(21737),S=t(39792),C=t(41609),I=t.n(C),Z=t(41941),E=t(63879),T=t(54904),L=t(59965);function O(e){var i=e.description,t=e.attributes,n=(0,y.useState)(["DESCRIPTION","FICHE TECHNIQUE"])[0];return(0,l.jsx)("div",{className:"w-full py-6 lg:py-8 xl:py-5 sm:px-0",children:(0,l.jsxs)(L.O.Group,{children:[(0,l.jsx)(L.O.List,{className:"block border-b border-skin-base space-s-8",children:n.map((function(e){return(0,l.jsx)(L.O,{className:function(e){return function(){for(var e=arguments.length,i=new Array(e),t=0;t<e;t++)i[t]=arguments[t];return i.filter(Boolean).join(" ")}("relative inline-block transition-all text-18px lg:text-[20px] leading-5 text-skin-base focus:outline-none font-semibold pb-3 lg:pb-4 hover:text-skin-base",e.selected?" after:absolute after:w-full after:h-0.5 after:bottom-0 after:translate-y-[1px] after:start-0 after:bg-skin-primary":" text-gray-400")},children:e},e)}))}),(0,l.jsxs)(L.O.Panels,{className:"mt-5 lg:mt-6",children:[(0,l.jsx)(L.O.Panel,{className:"innerhtml__description lg:flex",children:(0,l.jsx)("div",{dangerouslySetInnerHTML:{__html:i}})}),(0,l.jsx)(L.O.Panel,{children:null===t||void 0===t?void 0:t.map((function(e){return(0,l.jsxs)("div",{className:"flex items-center justify-between border-b border-skin-muted py-3 md:max-w-2xl",children:[(0,l.jsx)("p",{className:"text-sm lg:text-base text-skin-muted",children:e.cle}),(0,l.jsx)("p",{className:"text-sm lg:text-base text-skin-base",children:e.valeur})]},e._id)}))})]})]})})}var D=t(18446),R=t.n(D),V=t(82860),F=t(86501),A=t(27654),B=t(79965),M=t(5152),q=t.n(M),H=function(e){var i=e.product,t=e.selectedQuantity,n=e.price;return(0,l.jsx)(l.Fragment,{children:(null===i||void 0===i?void 0:i.ram)?(0,l.jsx)("div",{className:"flex items-center justify-center mt-5",children:(null===i||void 0===i?void 0:i.prixEnPromo)?(0,l.jsxs)("div",{className:"text-skin-primary font-semibold text-base md:text-xl xl:text-[30px]",children:[(0,l.jsxs)("span",{className:"inline-block font-semibold ",children:[n*t," DT"]}),(0,l.jsxs)("del",{className:"text-sm text-gray-400 text-opacity-70",children:[n*t," DT"]})]}):(0,l.jsx)("div",{className:"text-skin-primary font-semibold text-base md:text-xl xl:text-[30px]",children:(0,l.jsxs)("span",{className:"inline-block font-semibold",children:[n*t," DT"]})})}):(0,l.jsx)("div",{className:"flex items-center justify-center mt-5",children:(null===i||void 0===i?void 0:i.prixEnPromo)?(0,l.jsxs)("div",{className:"text-skin-primary font-semibold text-base md:text-xl xl:text-[30px]",children:[(0,l.jsxs)("span",{className:"inline-block font-semibold ",children:[n*t," DT"]}),(0,l.jsxs)("del",{className:"text-sm text-gray-400 text-opacity-70",children:[(null===i||void 0===i?void 0:i.price)*t," DT"]})]}):(0,l.jsx)("div",{className:"text-skin-primary font-semibold text-base md:text-xl xl:text-[30px]",children:(0,l.jsxs)("span",{className:"inline-block font-semibold",children:[n*t," DT"]})})})})},U=t(94738),K=q()((function(){return t.e(705).then(t.bind(t,14705))}),{loadableGenerated:{webpack:function(){return[14705]}}}),Q=function(e){var i,t,n,r,o=e.product,s=function(){if(J){var e=(0,S.z)(o,X);if((0,U.Kz)("Cart","".concat(null===e||void 0===e?void 0:e.title," Ajout\xe9e au panier")),o.ram){var i=Object.values(q).join("/");i&&""!==i&&(e.updatedProduct=i,e.title=null===o||void 0===o?void 0:o.referenceInterne),e.prixEnPromo=void 0,e.price=c}m(e,N),F.ZP.success("Ajout\xe9e au panier",{position:x>768?"bottom-right":"top-right"})}},a=(0,f.useRouter)(),d=(0,y.useState)((null===o||void 0===o?void 0:o.prixEnPromo)?null===o||void 0===o?void 0:o.prixEnPromo:null===o||void 0===o?void 0:o.price),c=d[0],u=d[1],x=(0,v.Z)().width,p=(0,_.jD)(),m=p.addItemToCart,h=p.isInCart,g=p.getItemFromCart,b=p.isInStock,j=(0,y.useState)(1),N=j[0],C=j[1],L=(0,y.useState)({}),D=L[0],M=(L[1],(0,y.useState)({}
1)),q=M[0],Q=M[1],z=(0,B.a)().canReset,G=(0,P.y)(null===o||void 0===o?void 0:o.variations),J=!!I()(G)||!I()(D)&&Object.keys(G).every((function(e){return D.hasOwnProperty(e)})),X={};if(J){var W=[];X=null===W||void 0===W?void 0:W.find((function(e){return R()(e.options.map((function(e){return e.value})).sort(),Object.values(D).sort())}))}var Y=(0,S.z)(o,X),$=h(Y._id)&&!b(Y._id)||0===Y.stock,ee=(0,V.J)(null===o||void 0===o||null===(i=o.gallerie)||void 0===i?void 0:i.urlPhoto[0]);return(0,y.useEffect)((function(){var e;u(null!==(e=null===o||void 0===o?void 0:o.prixEnPromo)&&void 0!==e?e:null===o||void 0===o?void 0:o.price)}),[o]),(0,l.jsxs)("div",{className:"pt-6 md:pt-7 pb-2",children:[(0,l.jsxs)("div",{className:"lg:grid grid-cols-10 gap-7 2xl:gap-8",children:[(0,l.jsx)("div",{className:"col-span-5 xl:col-span-4 overflow-hidden mb-4 md:mb-6 lg:mb-0",children:(null===o||void 0===o||null===(t=o.images)||void 0===t?void 0:t.length)?(0,l.jsx)(Z.Z,{blurImages:o.images,gallery:null===o||void 0===o||null===(n=o.gallerie)||void 0===n?void 0:n.urlPhoto,thumbnailClassName:"xl:w-[700px] 2xl:w-[850px]",galleryClassName:"xl:w-[100px] 2xl:w-[120px]",showBtnLightBox:!0}):(0,l.jsx)("div",{className:"w-auto flex",children:(0,l.jsx)(E.Z,{blurDataURL:null===(r=null===o||void 0===o?void 0:o.images[0])||void 0===r?void 0:r.imgBlur,placeholder:"blur",src:null!==ee&&void 0!==ee?ee:"/product-placeholder.svg",priority:!0,className:"rounded-lg",loading:"eager",alt:null===o||void 0===o?void 0:o.title,width:900,height:900})})}),(0,l.jsxs)("div",{className:"flex-shrink-0 flex flex-col col-span-5 xl:col-span-4 xl:ps-2",children:[(0,l.jsxs)("div",{className:"pb-4 lg:pb-5",children:[(0,l.jsxs)("div",{className:"md:mb-2.5 block -mt-1.5",children:[(0,l.jsx)("h1",{className:"text-skin-base text-lg md:text-xl xl:text-2xl font-medium transition-colors duration-300",children:null===o||void 0===o?void 0:o.title}),(0,l.jsxs)("p",{className:"text-xs my-2",children:["R\xe9f\xe9rence: ",null===o||void 0===o?void 0:o.referenceInterne]})]}),(0,l.jsx)(A.Z,{product:o,isShowStock:!0})]}),z&&(0,l.jsx)("a",{href:"https://backend.megapc.tn/product/detail/".concat(o._id),target:"_blank",rel:"noreferrer",className:" bg-yellow-400 my-3 xl:w-36 p-1 text-center rounded-md",children:"Modifer"}),(0,l.jsx)("div",{className:"innerhtml__specs productView-info text-xs leading-8 pb-5 mb-5 border-b border-black/8",children:(0,l.jsx)("div",{dangerouslySetInnerHTML:{__html:null===o||void 0===o?void 0:o.miniDescription_fr}})})]}),(0,l.jsxs)("div",{className:"col-span-2",children:[(0,l.jsx)(H,{product:o,selectedQuantity:N,price:c}),(0,l.jsxs)("div",{className:"pt-1.5 lg:pt-3 xl:pt-4 space-y-2.5 md:space-y-3.5",children:[(0,l.jsx)(w.Z,{variant:"single",value:N,onIncrement:function(){((null===o||void 0===o?void 0:o.visible)||(null===o||void 0===o?void 0:o.displayForPublic))&&C((function(e){return e+1}))},onDecrement:function(){return C((function(e){return 1!==e?e-1:1}))},disabled:h(Y._id)?g(Y._id).quantity+N>=Number(Y.stock):N>=Number(Y.stock)}),(0,l.jsxs)(k.Z,{onClick:s,className:"w-full px-1.5 text-xs",disabled:!J||$||!(null===o||void 0===o?void 0:o.visible)||!(null===o||void 0===o?void 0:o.displayForPublic),children:[(0,l.jsx)(T.Z,{color:"#ffffff",className:"me-3"}),"Ajouter au panier"]})," ",(0,l.jsx)(k.Z,{onClick:function(){s(),a.push("/shop/checkout")},className:"w-full px-1.5 text-xs",disabled:!J||$||!(null===o||void 0===o?void 0:o.visible)||!(null===o||void 0===o?void 0:o.displayForPublic),children:"COMMANDE"})]})]})]}),(null===o||void 0===o?void 0:o.ram)&&(0,l.jsx)(K,{setUpdatedProduct:Q,setPrice:u,price:c,product:o}),(0,l.jsx)(O,{attributes:null===o||void 0===o?void 0:o.attributes,description:null===o||void 0===o?void 0:o.description_fr})]})},z=t(2962),G=t(89183),J=function(e){var i,t,n,r=e.product,o="".concat("https://megapc.tn","/shop/product/").concat(null===r||void 0===r?void 0:r.lien),s=(0,V.J)(null===r||void 0===r||null===(i=r.gallerie)||void 0===i?void 0:i.urlPhoto[0]),a=(null===r||void 0===r?void 0:r.ratingValue)&&!isNaN(parseFloat(r.ratingValue))?parseFloat(r.ratingValue):4,d=(null===r||void 0===r?void 0:r.reviewCount)&&!isNaN(parseInt(r.reviewCount,10))?parseInt(r.reviewCount,10):4,c=(null===r||void 0===r?void 0:r.stock)>0?"http://schema.org/InStock":"http://schema.org/OutOfStock";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(G.Z,{description:(null===r||void 0===r?void 0:r.desciprtionSeo)||(null===r||void 0===r?void 0:r.description),title:(null===r||void 0===r?void 0:r.titleSeo)||(null===r||void 0===r?void 0:r.title),path:"/shop/product/".concat(null===r||void 0===r?void 0:r.lien),imageUrl:s}),(0,l.jsx)(z.Qb,{aggregateRating:{ratingValue:String(a),reviewCount:String(d)},category:null===r||void 0===r||null===(t=r.categorie)||void 0===t?void 0:t.t
1itre,productName:(null===r||void 0===r?void 0:r.titleSeo)||(null===r||void 0===r?void 0:r.title),images:[s],description:(null===r||void 0===r?void 0:r.desciprtionSeo)||(null===r||void 0===r?void 0:r.description),brand:null===r||void 0===r||null===(n=r.marque)||void 0===n?void 0:n.titre,offers:{price:(null===r||void 0===r?void 0:r.prixEnPromo)?null===r||void 0===r?void 0:r.prixEnPromo:(null===r||void 0===r?void 0:r.price)||200,priceCurrency:"TND",url:o,availability:c},reviews:[{reviewRating:{ratingValue:String(a),bestRating:"5",worstRating:"1"},author:{name:"mega tech",type:"Person"}}]})]})},X=t(89146),W=t(60512),Y=t(98121),$=t(36492),ee=t(47568),ie=t(10092),te=t(46274),le=function(){var e=(0,ee.Z)((function(e){return(0,ie.__generator)(this,(function(i){switch(i.label){case 0:return[4,te.BE.post("/produitSimilaire/getProduitSimilaire",e)];case 1:return[2,i.sent().data]}}))}));return function(i){return e.apply(this,arguments)}}(),ne=function(e){var i,t,n=e.product,o=e.category,s=e.subCategory,a=function(e){var i=(0,$.a)(["getProduitSimilaire",e._id],(function(){var i;return le({filscategId:null===e||void 0===e||null===(i=e.filscateg)||void 0===i?void 0:i._id,price:null===e||void 0===e?void 0:e.price})}),{staleTime:36e5,enabled:!!e});return{products:i.data,isLoading2:i.isLoading,error:i.error}}(n),d=a.products,c=a.isLoading2,u=a.error,v=function(e,i,t){return[{href:"/",title:"Accueil"}].concat((0,r.Z)(e?[{href:"/shop/Nos-Categories/".concat(e),title:null===e||void 0===e?void 0:e.toLocaleLowerCase()}].concat((0,r.Z)(i?[{href:"/shop/Nos-Categories/".concat(e,"/").concat(i),title:null===i||void 0===i?void 0:i.toLocaleLowerCase()}]:[])):[]),[{href:"#",title:null===t||void 0===t?void 0:t.title}])}(o||"",s||"",n),x=(null===n||void 0===n||null===(i=n.categorie)||void 0===i?void 0:i.titre)&&(null===n||void 0===n||null===(t=n.filscateg)||void 0===t?void 0:t.titre);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(J,{product:n}),(0,l.jsx)(Y.Z,{}),(0,l.jsx)("div",{className:"pt-6 lg:pt-7 pb-10 ",children:(0,l.jsxs)(X.Z,{children:[(0,l.jsx)("div",{className:"pt-6",children:(0,l.jsx)(W.Z,{links:v})}),(0,l.jsx)(Q,{product:n}),x&&(0,l.jsx)(N,{products:d,categorySlug:"/shop/".concat(n.categorie.titre,"/").concat(n.filscateg.titre),isLoading2:c,uniqueKey:"PRODUITS SIMILAIRES",className:"mb-8 lg:mb-12",error:u})]})})]})};ne.Layout=n.Z;var re=!0,oe=ne}},function(e){e.O(0,[736,592,888,179],(function(){return i=75731,e(e.s=i);var i}));var i=e.O();_N_E=i}]);

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.