PageSourceSearch

https://www.idealwine.com/_next/static/chunks/pages/cote/[region]-9933285387ce0b01.js

js idealwine.com collected 2026-09-24 09:30:36 UTC 12,871 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[97422],{24807:function(e,n,t){"use strict";t.d(n,{n:function(){return a}});var o=t(33416);function a(e){(0,o.useEffect)(()=>{e()},[])}},41173:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/cote/[region]",function(){return t(20039)}])},49981:function(e,n,t){"use strict";var o=t(15440),a=t(62901),i=t(74147),r=t.n(i),l=t(52500),s=t.n(l);let c=e=>{let{page:n,currentPage:t,goToPage:i,getPageLink:l}=e,c=n===t,d=l?l(n):void 0;return void 0!==d?(0,o.jsx)(r(),{href:d,className:(0,a.Z)(s().cursorPointer,c&&s().currentPage),children:(0,o.jsx)("button",{className:s().pageNumber,children:n})}):(0,o.jsx)("button",{onClick:()=>null==i?void 0:i(n),className:(0,a.Z)(s().pageNumber,s().cursorPointer,c&&s().currentPage),children:n})};n.Z=e=>{let{pages:n,nbPages:t,currentPage:i,goToPage:r,getPageLink:l,className:d}=e,u=0===t||1===t,_=n.includes(1)||0===t,g=n.includes(t)||u,p=n.includes(2)||u,h=n.includes(t-1)||u;return(0,o.jsxs)("div",{className:(0,a.Z)(s().paginationContainer,d),children:[!_&&(0,o.jsx)(c,{page:1,goToPage:r,currentPage:i,getPageLink:l}),!p&&(0,o.jsx)("span",{className:s().pageNumber,children:"..."}),n.map(e=>(0,o.jsx)(c,{page:e,goToPage:r,currentPage:i,getPageLink:l},e)),!h&&(0,o.jsx)("span",{className:s().pageNumber,children:"..."}),!g&&(0,o.jsx)(c,{page:t,goToPage:r,currentPage:i,getPageLink:l})]})}},20464:function(e,n,t){"use strict";t.d(n,{R:function(){return s},gK:function(){return l}});var o=t(15440),a=t(33416),i=t(6884),r=t(49981);let l=50,s=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,o=Math.max(1,e-t),a=Math.min(n,e+t);return a-o<2*t&&(1===o?a=Math.min(n,o+2*t):o=Math.max(1,a-2*t)),Array.from({length:a-o+1},(e,n)=>o+n)};n.ZP=e=>{let{totalItems:n,itemsPerPage:t,currentPage:l,isLoading:c,setCurrentPage:d,className:u}=e,{setIsFullPageLoaderOpen:_}=(0,i.a)();(0,a.useEffect)(()=>{_(c)},[c,_]);let g=Math.ceil(n/t),p=s(l,g);return(0,o.jsx)(r.Z,{pages:p,nbPages:g,currentPage:l,goToPage:e=>{d(e),window.scrollTo({top:0,behavior:"smooth"})},className:u})}},20039:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return R},default:function(){return L}});var o=t(15440),a=t(38653),i=t(10212),r=t(24807),l=t(54686),s=t.n(l),c=t(11859),d=t(62136),u=t.n(d),_=t(76943),g=t(33416),p=t(56820),h=t(26021),v=t(49981),m=t(20464),O=e=>{var n;let{totalItems:t,itemsPerPage:a,className:i,queryParamsToPreserve:r="all"}=e,{query:l,asPath:s}=(0,_.useRouter)(),c=parseInt((null!==(n=l.page)&&void 0!==n?n:"1").toString()),d=Math.ceil(t/a),u=(0,m.R)(c,d);return(0,o.jsx)(v.Z,{pages:u,nbPages:d,currentPage:c,getPageLink:e=>{var n;let t;let o=new URLSearchParams(null!==(n=s.split("?")[1])&&void 0!==n?n:"");"all"===r?t=o:(t=new URLSearchParams,"none"!==r&&r.forEach(e=>{let n=o.get(e);null!==n&&t.set(e,n)})),t.set("page",e.toString()),1===e&&t.delete("page");let a=(0,h.DY)(t.toString());return"".concat(s.split("?")[0]).concat(a)},className:i})},w=t(16498),P=t(125),b=t(21569),S=t(33028),f=t.n(S),k=e=>{let{vintageRatings:n,region:t}=e,{t:a,lang:i}=(0,h.$G)(),r=e=>{var n,o,r,l;let s="".concat(e.productId.toString(),"-").concat(null!==(n=e.year)&&void 0!==n?n:"----"),c=a("enums:formatWithoutCount.BOUTEILLE"),d=a("enums:region.".concat(t.toUpperCase())),u="string"==typeof e.classification?a("enums:classification.".concat(e.classification)):"",_=a("enums:color.".concat(e.color.toUpperCase())),{completeUrl:g}=(0,P.$R)(s,c,d.replace("Rh\xf4ne","Vallee-du-Rhone"),null!==(o=e.appellation)&&void 0!==o?o:"",u,null!==(r=e.climate)&&void 0!==r?r:"",null!==(l=e.estateName)&&void 0!==l?l:"",_.toLowerCase(),i);return g};return(0,o.jsx)("div",{className:f().container,children:n.map(e=>{var n;return(0,o.jsx)(w.Z,{href:r(e),dontTranslate:!0,children:(0,o.jsxs)("div",{className:f().cote,children:[null!==(n=e.year)&&void 0!==n?n:"----"," ",(0,o.jsx)(b.Z,{price:e.value,className:f().strong,size:"small",dontDisplayCents:!0})]})},e.id)})})},x=t(12258),C=t(99025);let y=(e,n,t,o)=>(0,C.zq)({url:"/api/v2/shop/vintage-ratings-by-product-for-region-d-t-os/by-region/".concat(e),method:"GET",params:n,signal:o},t),D=(e,n)=>["/api/v2/shop/vintage-ratings-by-product-for-region-d-t-os/by-region/".concat(e),...n?[n]:[]],N=(e,n,t)=>{var o;let{query:a,request:i}=null!=t?t:{};return{queryKey:null!==(o=null==a?void 0:a.queryKey)&&void 0!==o?o:D(e,n),queryFn:t=>{let{signal:o}=t;return y(e,n,i,o)},enabled:!!e,...a}};var T=t(20893),j=t.n(T),R=!0,L=e=>{var n,t;let{region:l,page:d,search:v}=e,{t:m,lang:w}=(0,h.$G)("cote-region"),P=(0,_.useRouter)(),b=(0,g.useRef)(null),S=""!==v?v:void 0,{data:f}=function(e,n,t){let o=N(e,n,void 0),a=(0,x.a)(o);return a.queryKey=o.queryKey,a}(l,{itemsPerPage:20,page:d,search:S}),C=()=>{var e,n;let t=(null!==(n=null===(e=b.current)||void 0===e?void 0:e.value)&&void 0!==n?n:"").trim(),o={region:l};""!==t&&(o.search=t),P.push({pathname:P.pathname,query:o})},y=null!==(n=null==f?void 0:f["hydra:totalItems"])&&void 0!==n?n:0,D=[],T=null!==(t=null==f?void 0:f["hydra:member"].reduce((e,n)=>{var t;return void 0===e[n.productId]&&(e[n.productId]=[],D.push(n.productId)),null===(t=e[n.productId])||void 0===t||t.push(n),e},{}))&&void 0!==t?t:{},R=m("enums:region.".concat(l.toUpperCase())),L=m("seo.title",{region:R}),M=m("seo.description",{region:R});return(0,r.n)(()=>{(0,i.sendGTMEvent)({page:"page_cote_region_".concat(l),pageChapter1:"cotation_des_vins",pageChapter2:""})}),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.PB,{title:L,description:M}),(0,o.jsx)("div",{className:j().bannerTitle,children:(0,o.jsx)("p",{dangerouslySetInnerHTML:{__html:s().sanitize(m("TitrePage",{region:R}))}})}),(0,o.jsx)("form",{className:j().searchContainer,onSubmit:e=>{e.preventDefault(),C()},children:(0,o.jsx)(p.Z,{ref:b,className:j().searchInput,placeholder:m("searchPlaceholder"),rightIcon:a.wn,onRightIconClick:C,defaultValue:v})}),null!=S&&0===D.length&&(0,o.jsx)("div",{className:j().noResults,children:m("noResults",{search:S})}),(0,o.jsx)("div",{className:j().gridContainer,children:D.map(e=>{var n,t,a,i,r,s,c,d,_;let g=T[e],p=null!==(s=null==g?void 0:null===(n=g[0])||void 0===n?void 0:n.appellation2)&&void 0!==s?s:"";return(0,o.jsxs)("div",{className:j().gridItem,children:[(0,o.jsxs)("div",{className:j().breadCrumpReg
1ion,children:[R,""===p?"":" > ".concat(p)]}),(0,o.jsxs)("div",{className:j().nameWine,children:[null==g?void 0:null===(t=g[0])||void 0===t?void 0:t.wineName," ",(0,o.jsxs)("span",{className:j().colorDisplay,children:["(",m("enums:color.".concat(null!==(c=null==g?void 0:null===(a=g[0])||void 0===a?void 0:a.color.toUpperCase())&&void 0!==c?c:"")),")"]})]}),(0,o.jsx)("div",{className:j().containerPicture,children:(0,o.jsx)(u(),{unoptimized:!0,className:j().currentRatingPicture,src:null!==(d=null==g?void 0:null===(i=g[0])||void 0===i?void 0:i.path)&&void 0!==d?d:"/_no_picture_".concat(w,".jpg"),alt:null!==(_=null==g?void 0:null===(r=g[0])||void 0===r?void 0:r.wineName)&&void 0!==_?_:"",width:200,height:150})}),g&&(0,o.jsx)(k,{vintageRatings:g,region:l})]},e)})}),(0,o.jsx)("div",{children:(0,o.jsx)(O,{totalItems:y,itemsPerPage:20,queryParamsToPreserve:["search"]})})]})}},125:function(e,n,t){"use strict";t.d(n,{$R:function(){return s},Yk:function(){return c},bW:function(){return d}});var o=t(33416),a=t(48818),i=t(26021),r=t(45996),l=t(49006);let s=(e,n,t,o,i,l,s,c,d)=>{let u=[e,n,t,o,i,l,s,c].filter(e=>{var n;return(null!==(n=null==e?void 0:e.trim())&&void 0!==n?n:"")!==""}).join("-"),_=(0,r.SS)(u),g=(0,a.nu)("VINTAGE_RATING_WITH_SLUG_URL",d,{slug:_});return{normalizedSlug:_,completeUrl:g}},c=()=>{let{t:e,lang:n}=(0,i.$G)();return{generateRatingUrlFromVariant:(0,o.useCallback)(t=>{var o,a,i,r,c,d,u,_,g,p,h,v,m;let O=e("enums:formatWithoutCount.BOUTEILLE"),w="string"==typeof(null===(o=t.product)||void 0===o?void 0:o.classification)?e("enums:classification.".concat(t.product.classification)):"",P="string"==typeof(null===(a=t.product)||void 0===a?void 0:a.color)?e("enums:color.".concat(t.product.color)).toLocaleLowerCase():"",b=(0,l.kE)(null===(r=t.product)||void 0===r?void 0:null===(i=r.region)||void 0===i?void 0:i.name)?e("enums:region.".concat(t.product.region.name)):"",{completeUrl:S}=s(null!==(p=null===(c=t.productVintage)||void 0===c?void 0:c.code)&&void 0!==p?p:"",O,b,null!==(h=null===(d=t.product)||void 0===d?void 0:d.appellation)&&void 0!==h?h:"",w,null!==(v=null===(u=t.product)||void 0===u?void 0:u.climate)&&void 0!==v?v:"",null!==(m=null===(g=t.product)||void 0===g?void 0:null===(_=g.estate)||void 0===_?void 0:_.name)&&void 0!==m?m:"",P,n);return S},[n,e])}},d=()=>{let{t:e,lang:n}=(0,i.$G)();return(0,o.useCallback)(t=>{var o,a,i,r,c,d,u,_,g,p,h,v;let m=e("enums:formatWithoutCount.BOUTEILLE"),O="string"==typeof(null===(o=t.product)||void 0===o?void 0:o.classification)?e("enums:classification.".concat(t.product.classification)):"",w="string"==typeof(null===(a=t.product)||void 0===a?void 0:a.color)?e("enums:color.".concat(t.product.color)).toLocaleLowerCase():"",P=(0,l.kE)(null===(r=t.product)||void 0===r?void 0:null===(i=r.region)||void 0===i?void 0:i.name)?e("enums:region.".concat(t.product.region.name)):"",{completeUrl:b}=s(null!==(g=t.code)&&void 0!==g?g:"",m,P,null!==(p=null===(c=t.product)||void 0===c?void 0:c.appellation)&&void 0!==p?p:"",O,null!==(h=null===(d=t.product)||void 0===d?void 0:d.climate)&&void 0!==h?h:"",null!==(v=null===(_=t.product)||void 0===_?void 0:null===(u=_.estate)||void 0===u?void 0:u.name)&&void 0!==v?v:"",w,n);return b},[n,e])}},52500:function(e){e.exports={dontShowOnMobile:"Pagination_dontShowOnMobile__TixMl",dontShowOnDesktop:"Pagination_dontShowOnDesktop__JWTlk",dontShowOnMobileOrTablet:"Pagination_dontShowOnMobileOrTablet__xP_QM",dontShowOnLargeOrExtraLargeDesktop:"Pagination_dontShowOnLargeOrExtraLargeDesktop__Um9_D",dontShowOnTabletOrDesktop:"Pagination_dontShowOnTabletOrDesktop__dfNCF",showOnlyOnLargeDesktop:"Pagination_showOnlyOnLargeDesktop__kIZwi",showOnlyOnTabletOrSmallDesktop:"Pagination_showOnlyOnTabletOrSmallDesktop__HtUZw",showOnlyOnMobile:"Pagination_showOnlyOnMobile__Wn3BX",dontShowOnSmallDesktop:"Pagination_dontShowOnSmallDesktop__5I0yl",hideOnPrint:"Pagination_hideOnPrint__4Csg3",paginationContainer:"Pagination_paginationContainer__9Y0se",pageNumber:"Pagination_pageNumber__pUyzY",cursorPointer:"Pagination_cursorPointer__NusR3",currentPage:"Pagination_currentPage__Io_oc"}},33028:function(e){e.exports={dontShowOnMobile:"VintageRatingsCards_dontShowOnMobile__dpqK_",dontShowOnDesktop:"VintageRatingsCards_dontShowOnDesktop__kQx3C",dontShowOnMobileOrTablet:"VintageRatingsCards_dontShowOnMobileOrTablet__82EY2",dontShowOnLargeOrExtraLargeDesktop:"VintageRatingsCards_dontShowOnLargeOrExtraLargeDesktop__3iWr3",dontShowOnTabletOrDesktop:"VintageRatingsCards_dontShowOnTabletOrDesktop__5C9hw",showOnlyOnLargeDesktop:"VintageRatingsCards_showOnlyOnLargeDesktop__5ifzK",showOnlyOnTabletOrSmallDesktop:"VintageRatingsCards_showOnlyOnTabletOrSmallDesktop__nkZk_",showOnlyOnMobile:"VintageRatingsCards_showOnlyOnMobile__57lPC",dontShowOnSmallDesktop:"VintageRatingsCards_dontShowOnSmallDesktop__shaFh",hideOnPrint:"VintageRatingsCards_hideOnPrint__zijO7",container:"VintageRatingsCards_container__m_TZj",cote:"VintageRatingsCards_cote__H0Z2A",strong:"VintageRatingsCards_strong__QPMg2",results:"VintageRatingsCards_results__fmBI_"}},20893:function(e){e.exports={dontShowOnMobile:"cote_dontShowOnMobile__2dGnE",dontShowOnDesktop:"cote_dontShowOnDesktop__0jFbZ",dontShowOnMobileOrTablet:"cote_dontShowOnMobileOrTablet__7zzhY",dontShowOnLargeOrExtraLargeDesktop:"cote_dontShowOnLargeOrExtraLargeDesktop__2maxi",dontShowOnTabletOrDesktop:"cote_dontShowOnTabletOrDesktop__Zad10",showOnlyOnLargeDesktop:"cote_showOnlyOnLargeDesktop__kWhje",showOnlyOnTabletOrSmallDesktop:"cote_showOnlyOnTabletOrSmallDesktop__aePJ9",showOnlyOnMobile:"cote_showOnlyOnMobile__WbQyJ",dontShowOnSmallDesktop:"cote_dontShowOnSmallDesktop__1jldt",hideOnPrint:"cote_hideOnPrint__st9Bt",cantFindARating:"cote_cantFindARating__Ca8Oc",link:"cote_link__mDgOX",gridContainer:"cote_gridContainer__ZYp_2",gridItem:"cote_gridItem___dC3b",title:"cote_title__mW5PG",text:"cote_text__LLleJ",searchBoxs:"cote_searchBoxs__SPsyy",bannerTitle:"cote_bannerTitle__WHN8j",searchContainer:"cote_searchContainer__X5ZhV",searchInput:"cote_searchInput___WNSs",noResults:"cote_noResults__DKYHc",breadCrumpReg
1ion:"cote_breadCrumpRegion__xzjeq",colorDisplay:"cote_colorDisplay__VWf8N",nameWine:"cote_nameWine__v1UwE",containerPicture:"cote_containerPicture__29UfK",currentRatingPicture:"cote_currentRatingPicture__2pvow",articlesSection:"cote_articlesSection__LzQxP",articleContainer:"cote_articleContainer__mNKrj",articleTitle:"cote_articleTitle__zKc8n",content:"cote_content__x3sj9",description:"cote_description__wmkW1",readMore:"cote_readMore__or9Ko"}}},function(e){e.O(0,[92888,49774,40179],function(){return e(e.s=41173)}),_N_E=e.O()}]);

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.