PageSourceSearch

https://meny.dk/_next/static/chunks/4036.609dfa7055036a6afe62.js

js meny.dk collected 2026-09-24 20:49:18 UTC 13,059 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4036],{95878:function(e,t,r){"use strict";var n=r(85893),a=r(85061),i=r(96156),s=r(17375),o=r(67294),l=r(29163),c=r(17714),u=r(9669),d=r.n(u),f=r(11163),p=r(59658),m=r(77837),g=r(31974),v=r(32554);function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){(0,i.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}m.Z.get("modal","filters");t.Z=function(e){var t=function(t){var r=t.defaultParams,l=(0,s.Z)(t,["defaultParams"]),u=(0,f.useRouter)(),b=(0,c.v9)((function(e){return e.location})),y=b&&b.query&&b.query.filters||null,x={};y&&y.split(";").forEach((function(e){var t=e.split(":").shift(),r=e.substr(e.indexOf(":")+1,e.length);x[t]=r&&r.split(",")}));(0,g.Z)().isMobile;var j=(0,o.useState)(r),w=j[0],_=j[1],O=(0,o.useState)(null),S=O[0],C=O[1],Z=(0,o.useState)(null),P=Z[0],D=Z[1],E=(0,o.useState)(null),N=E[0],q=E[1],R=(0,o.useState)(null),F=R[0],I=R[1],A=(0,o.useState)(x),M=A[0],T=A[1],V=(0,o.useCallback)((function(){var e=w.facets;for(var t in e)"values"in e[t]&&e[t].values.length>0&&(M[t]=e[t].values);T(M);var n=setTimeout((function(){var e=h(h({},r),{},{filter:W()});"query"in w&&(e.query=w.query),"limit"in w&&(e.limit=w.limit),"sort"in w&&(e.sort=w.sort),"facets"in w&&(e.facet=z()),"fields"in w&&(e.fields=w.fields),C(e)}),100);return function(){clearTimeout(n)}}),[w]),z=(0,o.useCallback)((function(){var e={},t=w.facets;for(var r in t)switch(t[r].type){case"checkboxes":case"date-range":case"links":e[r]={type:"terms",field:t[r].field,sort:{index:"asc"},limit:-1,domain:{excludeTags:r},prefix:t[r].prefix}}return e}),[w]),Y=(0,o.useCallback)((function(){var e={},t=w.facets;for(var r in t)r in F&&(e[r]=L(F[r].buckets,t[r]));q(e)}),[F,w]),L=(0,o.useCallback)((function(e,t){var r=e.map((function(e){return Q(e,t)}));return"function"===typeof t.sortValues&&(r=t.sortValues(r)),r}),[]),Q=(0,o.useCallback)((function(e,t){var r=t.valueLabel;return{value:String(e.val),label:"function"===typeof r?r(String(e.val)):String(e.val),count:e.count}}),[]),W=(0,o.useCallback)((function(){var e=[],t=w.facets;w.filters&&e.push.apply(e,(0,a.Z)(w.filters));var r=function(r){if(M[r]&&M[r].length){var n=M[r].map((function(e){var n=~e.indexOf("[")?e:'"'.concat(e,'"');return"".concat(t[r].field,":").concat(n)}));"OR"===t[r].op?e.push("{!tag=".concat(r,"}(").concat(n.join(" OR "),")")):e.push("(".concat(n.join(" AND "),")"))}};for(var n in t)r(n);return e}),[M,w]),$=(0,o.useCallback)((function(){S&&C(h(h({},S),{},{filter:W()}))}),[M,S]),J=(0,o.useCallback)((function(){if(S){var e="".concat(b.origin,"/search"),t=[];w.rawQuery&&w.rawQuery.length>0&&t.push.apply(t,(0,a.Z)(w.rawQuery)),w.fields&&w.fields.length>0&&t.push.apply(t,(0,a.Z)(w.fields)),t.length>0&&(e+="?".concat(t.join("&"))),d().post(e,S,{headers:{"Content-Type":"application/json"}}).then((function(e){D(e.data&&(e.data.response||e.data.grouped)),I(e.data&&e.data.facets)})).catch((function(e){return console.log(e.message,h({},e))}))}}),[S]),X=(0,o.useCallback)((function(e){e.label;if(N){var t=w.facets,r=[],a=!1,s=function(e){if(!a&&e in M&&M[e].length>0&&(a=!0),e in N&&(N[e].length>0||"date-range"===e)){var s=["facet","facet--".concat(e),"facet--".concat(t[e].type),"facet--".concat(t[e].type,"--").concat(e)],o=m.Z.get("facet",s);r.push((0,n.jsx)(o,{options:N[e],config:t[e],updateFilter:function(t){return T(h(h({},M),{},(0,i.Z)({},e,t)))},name:e,values:M[e]},e))}};for(var o in t)s(o);return r.length<=0?null:(0,n.jsx)(k,{children:r})}}),[w,N,M]),B=(0,o.useCallback)((function(){T({})}),[]);(0,v.Z)(B);return(0,p.Z)(V,[w]),(0,p.Z)(J,[S]),(0,p.Z)(Y,[F]),(0,p.Z)($,[M]),(0,p.Z)((function(){if(S){var e=[];
1Object.keys(M).forEach((function(t){var r=M[t];r.length>0&&e.push("".concat(t,":").concat(r.join(",")))}));var t=e.length>0?"?filters=".concat(e.join(";")):"";u.push("/","".concat(b.pathname).concat(t),{shallow:!0})}}),[M]),(0,n.jsx)(e,h(h({},l),{},{updateParams:_,results:P,facets:N,clearResults:function(){return D(null)},renderFacets:X,filters:M,clearValues:B,deleteRecipes:function(e,t,r){e.preventDefault();for(var n=0;n<M[t].length;n++)M[t][n]==r&&M[t].splice(n,1);0==Object.keys(M[t]).length&&delete M[t],T(h({},M))}}))};return t.defaultProps={defaultParams:{params:{wt:"json"}}},t};l.default.div.withConfig({displayName:"Solr__Label",componentId:"cx2bp1-0"})(["display:flex;justify-content:space-between;margin-top:18px;margin-bottom:18px;align-items:center;align-content:center;line-height:24px;span{font-size:12px;top:4px;left:auto;right:0px;padding:0px;text-decoration:underline;&:hover{text-decoration:none;}}"]);var k=l.default.div.withConfig({displayName:"Solr__FacetsWrap",componentId:"cx2bp1-1"})(["display:flex;margin-bottom:35px;.recipeFilters{position:absolute;right:50px;bottom:5px;}"]);l.default.button.withConfig({displayName:"Solr__Button",componentId:"cx2bp1-2"})(["width:35px;height:35px;border-radius:5px;text-align:center;border:none;transition:border-color 0.3s ease;cursor:pointer;position:absolute;right:10px;bottom:5px;background-color:#cc092f;svg{vertical-align:top;padding-top:5px;path{transition:fill 0.3s ease;}}"])},32554:function(e,t,r){"use strict";var n=r(85061),a=r(67294);t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[13],i=(0,a.useCallback)((function(t){(r.includes(t.keyCode)||r.includes(t.charCode))&&e(t)}),[e].concat((0,n.Z)(t)));return i}},14036:function(e,t,r){"use strict";r.r(t);var n=r(85893),a=r(96156),i=r(28481),s=r(9669),o=r.n(s),l=r(11163),c=r(67294),u=r(17714),d=r(29163),f=r(94007),p=r(95878),m=r(26838),g=r(77837);function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){(0,a.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var h=g.Z.get("form","textfield"),k=g.Z.get("form","select"),y=g.Z.get("form","checkbox");t.default=(0,p.Z)((function(e){var t=e.updateParams,r=e.results,s=e.selected_butik_title,d=(0,c.useState)({}),f=d[0],p=d[1],g=(0,c.useState)(),v=g[0],E=g[1],N=(0,c.useState)(null),q=N[0],R=N[1],F=(0,m.Z)("spar"),I=(0,i.Z)(F,2)[1],A=(0,u.v9)((function(e){return e})).domain,M=(0,l.useRouter)(),T=(0,c.useState)({firstname:"",lastname:"",emailaddress:"",favoritestore:"",terms:!1}),V=T[0],z=T[1];(0,c.useEffect)((function(){var e=[];e.push('ss_search_api_datasource:"entity:node"'),e.push("bs_status:true"),e.push('ss_type:"store"'),t({query:e.join(" AND "),limit:1e3})}),[]),(0,c.useEffect)((function(){if(r&&r.docs){var e={};r.docs.forEach((function(t){var r=t.tm_X3b_en_title&&t.tm_X3b_en_title[0]||"";t.ss_field_customer_number&&(e[t.ss_field_customer_number]=r),s&&r===s&&L("favoritestore",t.ss_field_customer_number)})),p(e)}}),[r]);var Y=function(e){var t,r=e.target;z(b(b({},V),{},(0,a.Z)({},(null===r||void 0===r||null===(t=r.dataset)||void 0===t?void 0:t.name)||r.name||"","terms"===r.name?r.checked:r.value)))},L=function(e,t){return z(b(b({},V),{},(0,a.Z)({},e,t)))};return(0,n.jsx)(j,{children:(0,n.jsxs)(w,{onSubmit:function(e){e.preventDefault();var t=!1;for(var r in V)V[r]||(t=!0);if(!V.terms)return E(I?Z:C);R(""),E(null),t||o().put("/loyalty/newsletter/subscribe",V).then((function(e){var t;200===(null===e||void 0===e?void 0:e.status)?M.push("/node/".concat(A.config.newsletter_landing_page)):E(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error)}
1)).catch((function(e){var t,r=e.response;E(null===r||void 0===r||null===(t=r.data)||void 0===t?void 0:t.error)}))},children:[(0,n.jsx)(h,{placeholder:"Navn",value:V.firstname,type:"text",name:"name","data-name":"firstname",size:"60",maxlength:"128",require:!0,onChange:Y,title:"Navn"}),(0,n.jsx)(h,{placeholder:"Efternavn",value:V.lastname,type:"text",name:"surname","data-name":"lastname",size:"60",maxlength:"128",require:!0,onChange:Y,title:"Efternavn"}),(0,n.jsx)(h,{placeholder:"E-mail",value:V.emailaddress,type:"email",name:"email","data-name":"emailaddress",size:"60",maxlength:"128",require:!0,onChange:Y,title:"E-mail"}),(0,n.jsx)(k,{placeholder:"Favoritbutik",defaultValue:V.favoritestore,options:f,name:"favoritestore",require:!0,required:!0,setValue:L,sortOptions:!0}),(0,n.jsxs)(O,{isDomainSpar:I,children:[(0,n.jsx)(y,{id:"edit-terms",name:"terms",checked:V.terms,onChange:Y}),(0,n.jsx)(_,{children:I?D:P})]}),(v||q)&&(0,n.jsx)(S,{$error:!!v,children:v||q}),(0,n.jsx)(x,{type:"submit",className:"btn btn-primary",children:"Tilmeld"})]})})}));var x=d.default.button.withConfig({displayName:"Subscribe__Submit",componentId:"sc-1tcqwl4-0"})(["margin-top:24px;border:unset;cursor:pointer;"]),j=d.default.div.withConfig({displayName:"Subscribe__Wrap",componentId:"sc-1tcqwl4-1"})(["padding:40px 0;"]),w=d.default.form.withConfig({displayName:"Subscribe__Form",componentId:"sc-1tcqwl4-2"})([""]),_=d.default.span.withConfig({displayName:"Subscribe__CheckboxCustomLabel",componentId:"sc-1tcqwl4-3"})(["border:unset;background:unset;text-align:left;padding:0;margin:30px 0 0 0;font-weight:300;a{font-weight:500;}",""],(function(e){return e.isDomainSpar&&"\n      margin-top:25px;\n  "})),O=d.default.div.withConfig({displayName:"Subscribe__CheckboxWrapper",componentId:"sc-1tcqwl4-4"})(["display:flex;justify-content:flex-start;align-items:flex-start;"]),S=d.default.div.withConfig({displayName:"Subscribe__MessageContainer",componentId:"sc-1tcqwl4-5"})(["border:1px solid ",";background-color:",";margin:30px 0;padding:30px;display:flex;justify-content:center;align-items:center;"],(function(e){return e.$error?"#cc092f":"#254C26"}),(function(e){return e.$error?"rgba(204, 9, 47, 0.1)":"#EDF7ED"})),C=(0,n.jsx)("div",{children:"Du mangler at acceptere samtykke f\xf8r du kan tilmelde dig vores nyhedsbrev."}),Z=(0,n.jsx)("div",{children:"Du mangler at acceptere samtykke f\xf8r du kan tilmelde dig vores nyhedsbrev."}),P=(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("span",{children:["Jeg samtykker til at modtage markedsf\xf8ring via e-mail i form af nyheder, gode tips, opskrifter, ugens avis, invitationer til konkurrencer, samt information om skarpe priser og s\xe6rlige kampagner vedr\xf8rende MENY\u2019s varesortiment.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Dit samtykke indeb\xe6rer, at MENY behandler dine oplysninger (navn, e-mail adresse, favoritbutik, s\xf8ge- og klikadf\xe6rd), og oplysninger som er indsamlet via s\xe6rskilt cookiesamtykke, til at m\xe5lrette markedsf\xf8ring til dig i e-mail, p\xe5 MENY\u2019s hjemmesider og platforme og p\xe5 MENY\u2019s samarbejdspartneres hjemmesider og platforme.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Du kan til enhver tid tilbagekalde dit samtykke til modtagelse af e-mails ved at klikke p\xe5 \u2018afmelde dig her\u2019 i bunden af en e-mail eller ved at logge ind p\xe5 Meny.dk.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Du kan l\xe6se mere om vores behandling af dine personoplysninger og vores brug af tracking pixels og cookies i\xa0",(0,n.jsx)(f.Z,{href:"https://www.dagrofa.dk/privatlivspolitik/",children:"Dagrofa privatlivspolitik og cookie-politik. *"})]})}),D=(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("span",{children:["Jeg samtykker til at modtage markedsf\xf8ring via e-mail i form af nyheder, gode tips, opskrifter, ugens avis, invitationer til konkurrencer, samt information om skarpe priser og s\xe6rlige kampagner vedr\xf8rende SPAR\u2019s varesortiment.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Dit samtykke indeb\xe6rer, at SPAR behandler dine oplysninger (navn, e-mailadresse, favoritbutik, s\xf8ge- og klikadf\xe6rd), eller som er indsamlet via s\xe6rskilt cookiesamtykke, til at m\xe5lrette markedsf\xf8ring til dig i e-mails, p\xe5 SPAR\u2019s hjemmeside og p\xe5 SPAR\u2019s samarbejdspartneres hjemmesider.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Du kan til enhver tid tilbagekalde dit samtykke til modtagelse af e-mails ved at klikke p\xe5 \u2018afmelde dig her\u2019 i bunden af en e-mail eller ved at logge ind p\xe5 SPAR.dk.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Du kan l\xe6se mere om vores behandling af dine personoplysninger og vores brug af tracking pixels og cookies i\xa0",(0,n.jsx)(f.Z,{className:"spar-bold",href:"https://www.dagrofa.dk/privatlivspolitik/",children:"Dagrofa privatlivspolitik og cookie-politik. *"})]})})}}]);

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.