1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[75],{"+H2D":function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a}));var r="LOCATION_REQUEST",o="LOCATION_COMMIT",a="LOCATION_FAILURE"},FAGI:function(t,e,n){"use strict";var r=n("fGyu"),o=n("QsI/"),a=n("9fIP"),i=n("MMYH"),c=n("K/z8"),u=n("sRHE"),s=n("8K1b"),l=n("ERkP"),f=n("wuXC"),p=n.n(f);function d(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof c?r:c,s=Object.create(u.prototype);return h(s,"_invoke",function(n,r,o){var a,c,u,s=0,l=o||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return a=e,c=0,u=t,p.n=n,i}};function d(n,r){for(c=n,u=r,e=0;!f&&s&&!o&&e<l.length;e++){var o,a=l[e],d=p.p,h=a[2];n>3?(o=h===r)&&(u=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=t):a[0]<=d&&((o=n<2&&d<a[1])?(c=0,p.v=r,p.n=a[1]):d<h&&(o=n<3||a[0]>r||r>h)&&(a[4]=n,a[5]=r,p.n=h,c=0))}if(o||n>1)return i;throw f=!0,r}return function(o,l,h){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),c=l,u=h;(e=c<2?t:u)||!f;){a||(c?c<3?(c>1&&(p.n=-1),d(c,u)):p.n=u:p.v=u);try{if(s=2,a){if(c||(o="next"),e=a[o]){if(!(e=e.call(a,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,c<2&&(c=0)}else 1===c&&(e=a.return)&&e.call(a),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);a=t}else if((e=(f=p.n<0)?u:n.call(r,p))!==i)break}catch(e){a=t,c=1,u=e}finally{s=1}}return{value:e,done:f}}}(n,o,a),!0),s}var i={};function c(){}function u(){}function s(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(h(e={},r,(function(){return this})),e),f=s.prototype=c.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,h(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=s,h(f,"constructor",s),h(s,"constructor",u),u.displayName="GeneratorFunction",h(s,o,"GeneratorFunction"),h(f),h(f,o,"Generator"),h(f,r,(function(){return this})),h(f,"toString",(function(){return"[object Generator]"})),(d=function(){return{w:a,m:p}})()}function h(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}(h=function(t,e,n,r){function a(e,n){h(t,e,(function(t){return this._invoke(e,n,t)}))}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))})(t,e,n,r)}function g(t,e,n){return e=Object(u.a)(e),Object(c.a)(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,n||[],Object(u.a)(t).constructor):e.apply(t,n))}var b={items:[],page:1,nextPage:null,total:0,working:!1},m=function(t){function e(){var t;return Object(a.a)(this,e),(t=g(this,e)).state=b,t.loadMore=t.loadMore.bind(t),t}return Object(s.a)(e,t),Object(i.a)(e,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(t,e){p()(t.queryObject,this.props.queryObject)?this.state.page===e.page||1===this.state.page||this.update():this.setState({page:1,items:[]},this.update)}},{key:"loadMore",value:function(){this.prevY=document.documentElement.scrollTop;var t=this.state.items;this.lastItemId=t[t.length-1].id,this.setState({page:this.state.page+1})}},{key:"update",value:function(){var t=this;this.setState({working:!0},Object(o.a)(d().m((function e(){var n,o,a,i,c,u,s,l;return d().w((function(e){for(;;)switch(e.n){case 0:if(n=t.props,o=n.apiRequest,a=n.queryObject,o){e.n=1;break}return t.setState({working:!1}),e.a(2);case 1:return i=t.state.page,e.n=2,o({page:i,queryObject:a});case 2:if(c=e.v){e.n=3;break}return t.setState({working:!1}),e.a(2);case 3:u=c.items,s=c.nextPage,l=c.total,t.setState({items:[].concat(Object(r.a)(t.state.items),Object(r.a)(null!==u&&void 0!==u?u:[])),nextPage:s,total:l,working:!1},(function(){if(t.lastItemId){var e=document.querySelector("[data-id='"+t.lastItemId+"']");e&&e.offsetWidth>0&&e.offsetHeight>0&&(e.scrollIntoView(),window.scrollBy(0,-200))}else document.documentElement.scrollTop=t.prevY}));case 4:return e.a(2)}}),e)}))))}},{key:"render",value:function(){var t=this.state,e=t.items,n=t.nextPage,r=t.total,o=t.working;return this.props.children({items:e,loadMore:this.loadMore,nextPage:n,total:r,working:o})}}])}(l.Component);e.a=m},NAJH:function(t,e,n){"use strict";var r=n("Z2Hg");n.d(e,"a",(function(){return r.a}));var o=n("w2w1");n.d(e,"b",(function(){return o.a}));n("Gae8");var a=n("Zee3");n.d(e,"c",(function(){return a.a}));var i=n("KZWD");n.d(e,"d",(function(){return i.a}));n("pxt2");var c=n("KtlO");n.d(e,"e",(function(){return c.a}));n("u2PW"),n("xQZi")},NJQB:function(t,e,n){"use strict";n.r(e);var r=n("QsI/"),o=n("cxan"),a=n("9fIP"),i=n("MMYH"),c=n("K/z8"),u=n("sRHE"),s=n("8K1b"),l=n("ERkP"),f=n.n(l),p=n("j/s1"),d=n("QtE3"),h=n("uPMs"),g=n("zjfJ"),b=n("zygG"),m=n("es+e"),y=n("fN3Q"),O=n.n(y),v=n("6780"),j=n("ttF7"),w=f.a.createElement;function S(t,e,n){return e=Object(u.a)(e),Object(c.a)(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,n||[],Object(u.a)(t).constructor):e.apply(t,n))}var k=function(t){function e(t){var n;return Object(a.a)(this,e),(n=S(this,e,[t])).state={comuni:[],province:[],regioni:[]},n.update=n.update.bind(n),n}
1return Object(s.a)(e,t),Object(i.a)(e,[{key:"componentDidMount",value:function(){this.props.search&&this.update()}},{key:"componentDidUpdate",value:function(t){t.search!==this.props.search&&this.update()}},{key:"update",value:function(){var t=this,e=this.props.search;Object(j.c)(e).then((function(e){return t.setState({comuni:e})})),Object(j.g)(e).then((function(e){return t.setState({province:e})})),Object(j.h)(e).then((function(e){return t.setState({regioni:e})}))}},{key:"render",value:function(){var t=this.props,e=t.search,n=t.comune,r=t.provincia,o=t.regione,a=this.state,i=a.comuni,c=a.province,u=a.regioni;if(e&&0===e.length||""===e||void 0===e||n||r||o||!(i&&i.length>0||c&&c.length>0||u&&u.length>0))return null;var s,l=(s="nome",function(t,e){return t.map((function(t){return[t[s],"?".concat(e,"=").concat(t[s])]}))}),p=[i&&i.length>0&&{title:"Comuni",tags:l(i,"comune")},c&&c.length>0&&{title:"Province",tags:l(c,"provincia")},u&&u.length>0&&{title:"Regioni",tags:l(u,"regione")}].filter((function(t){return t}));return w(f.a.Fragment,null,w(d.Wrapper,{size:"big"},w(d.Tags,{tagsGroups:p})))}}])}(f.a.Component),A=n("6qMH"),P=f.a.createElement;function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function R(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){Object(g.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function x(t,e,n){return e=Object(u.a)(e),Object(c.a)(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,n||[],Object(u.a)(t).constructor):e.apply(t,n))}var M=n("tTwn"),_=function(t){var e=t.handleSearch,n=t.handleShowMap,r=t.search,o=t.comune,a=t.provincia,i=t.regione,c=t.selectedOptions,u=t.tipologie,s=t.checkIfShowError,l=t.meta,f=t.showMap,p=Object(m.d)(u),h=Object(m.p)(u),g=function(t,e){var n=t.find((function(t){return t&&t.id===e}));return n?n.macrotipologia:null},y=Object.entries(p).map((function(t){var e=Object(b.a)(t,2),n=e[0],r=e[1];return{name:g(h,n),options:r&&r.length>0&&r.map((function(t){var e=t.id,n=t.tipologia;return{macrotipologia:t.macrotipologia,name:n,id:e}}))}})),v={id:O()(),type:"dropdown",name:"Tipologie",groups:y};O()();return P(d.Background,{color:"white"},P(L,null,P(F,null,P(D,null,P(q,{active:!f,onClick:function(t){return n(!1)}},"Lista"),P(q,{active:f,onClick:function(t){return n(!0)}},"Mappa"))),f||P(N,null,P(d.FiltersBar,{searchPlaceholder:"Cerca ".concat(Object(m.c)({comune:o,provincia:a,regione:i})),onChange:e,searchValue:r,selectedOptions:c,model:[v],checkIfShowError:s,error:l&&l.queryError,radio:!0,mfiVariant:!0}))))},I=function(t){var e=t.total,n=t.search,r=t.comune,o=t.provincia,a=t.regione,i=t.nearby,c=(r||o||a)&&'<h1 style="text-align:center; margin-bottom: .5rem;">\n Luoghi '.concat(Object(m.c)({comune:r,provincia:o,regione:a}),"\n </h1>\n "),u='<p><a href="/il-fai/grandi-campagne/giornate-fai-per-le-scuole/i-luoghi-aperti/">Resetta la ricerca</a></p>',s=[c&&c,n&&'<h1 style="text-align:center; margin-bottom: .5rem;">Hai cercato <strong>"'.concat(M(n),'"</strong></h1>'),i&&'<h2 style="text-align:center; margin-bottom: .5rem;">Stai cercando nel raggio di 100 km dalla tua posizione attuale</h2>',u].filter((function(t){return t})).join("");return P(f.a.Fragment,null,P(d.FiltersResults,{total:e,message:s}))},C=function(t){function e(t){var n;return Object(a.a)(this,e),(n=x(this,e,[t])).state={meta:{queryError:null},showResult:!Object(m.e)(t.queryObject)},n.handleSearch=n.handleSearch.bind(n),n.handleShowMap=n.handleShowMap.bind(n),n.checkIfShowError=n.checkIfShowError.bind(n),n}return Object(s.a)(e,t),Object(i.a)(e,[{key:"componentDidUpdate",value:function(t,e){var n=this.props.coords;!t.coords&&n&&this.handleLocation()}},{key:"checkIfShowError",value:function(t){return t&&t.length<3?(this.setState({meta:{queryError:"Devi scrivere almeno 3 caratteri"}}),!0):(this.setState({meta:{queryError:null}}),!1)}},{key:"handleLocation",value:function(){var t=this.props,e=t.coords;(0,t.setQueryString)(R(R({},e),{},{nearby:!0}))}},{key:"handleShowMap",value:function(t){(0,this.props.setQueryString)(R({},Object(m.b)({showMap:t})),!0)}},{key:"handleSearch",value:function(t){var e=this.props,n=e.setQueryString,r=e.queryObject,o=r.comune,a=r.provincia,i=r.regione,c=r.showMap,u=e.requestLocation,s=e.coords,l=t.selectedOptions,f=t.search;if(this.checkIfShowError(f))return!1;var p=l&&l.length&&"geolocation"===l.find((function(t){return"geolocation"===t}));if(p&&!s)return"function"===typeof u&&u();var d=Object(m.b)(R(R({},t),{},{comune:o,provincia:a,regione:i,showMap:c}));this.setState({showResult:!0}),n(R(R({},d),p?R(R({},s),{},{nearby:!0}):{}),!0)}},{key:"render",value:function(){if(!this.props.listOfMfi)return null;var t=this.props,e=t.canLoadMore,r=t.loading,a=t.loadMore,i=t.listOfMfi,c=(t.originUrl,t.queryObject),u=t.tipologie,s=t.total,l=this.state,p=l.meta,h=l.showResult,g=c.comune,b=c.provincia,y=c.regione,O=c.showMap;
1return P(d.Background,{color:"grey"},P(_,Object(o.a)({},Object(m.o)(c),{tipologie:u,handleSearch:this.handleSearch,checkIfShowError:this.checkIfShowError,meta:p,handleShowMap:this.handleShowMap,showMap:O})),O?P(A.a,{getPage:n.e(27).then(n.bind(null,"pAYN")),api:"mfi"}):P(f.a.Fragment,null,r&&P(d.Loading,{text:"<h4>Caricamento in corso</h4>"}),(h||g||b||y)&&P(I,Object(o.a)({total:s},c)),P(k,Object(o.a)({},this.props,c)),!r&&i&&0===i.length?P(d.Padder,{size:"small"},P("div",{style:{textAlign:"center"}},P(d.FiltersResults,{total:"0"}))):P(v.a,{getPage:n.e(27).then(n.bind(null,"pAYN"))},(function(t){var e=t.handleCardClick;return P(f.a.Fragment,null,P(d.ListOfCards,{wrap:"big",cards:i.map(m.f),CardComponent:function(t){return P(d.ListCard,Object(o.a)({},t,{onClick:function(){return e({slug:t.slug,id:t.id})}}))},vertical:!0}))})),e&&!r&&P(d.Padder,{size:"small"},P(d.Button,{onClick:a,children:r?"Carico...":"Mostra altri",centered:!0}))))}}])}(f.a.Component),L=p.d.div.withConfig({displayName:"LuoghiApertiMfi__FlexContainer",componentId:"sc-jmpr6o-0"})(["display:flex;flex-flow:row wrap;background:white;max-width:1440px;margin:auto;"]),F=p.d.div.withConfig({displayName:"LuoghiApertiMfi__FlexChildBtn",componentId:"sc-jmpr6o-1"})(["flex:200px 0 0;"]),N=p.d.div.withConfig({displayName:"LuoghiApertiMfi__FlexChild",componentId:"sc-jmpr6o-2"})(["flex-grow:0;@media screen and (min-width:1024px){flex-grow:1;}"]),D=p.d.div.withConfig({displayName:"LuoghiApertiMfi__FlexButtonsContainer",componentId:"sc-jmpr6o-3"})(['display:flex;justify-content:center;flex-flow:row wrap;margin:auto;height:100%;&:before{border-left:none;}@media screen and (min-width:1024px){&:before{content:"";border-left:2px solid ',";}}"],(function(t){return t.theme.colors.borderGreyLight})),q=p.d.div.withConfig({displayName:"LuoghiApertiMfi__FlexButton",componentId:"sc-jmpr6o-4"})(['flex-grow:1;display:flex;cursor:pointer;font-size:0.875rem;text-transform:uppercase;letter-spacing:0.06em;font-weight:800;font-family:"Benton Sans",sans-serif;justify-content:center;align-items:center;background:',";color:",";padding:20px 0px;@media screen and (min-width:1024px){padding:none;}"],(function(t){return t.active?t.theme.colors.orange:"white"}),(function(t){return t.active?"white":t.theme.colors.darkGrey})),G=C,T=n("NbfL"),B=n("Lm5w"),Q=n("FAGI"),z=n("TGUm"),H=n("D/vV"),U=n("cXXW"),K=n("0D0S"),Z=n.n(K),W=f.a.createElement;function J(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof c?r:c,s=Object.create(u.prototype);return X(s,"_invoke",function(n,r,o){var a,c,u,s=0,l=o||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return a=e,c=0,u=t,p.n=n,i}};function d(n,r){for(c=n,u=r,e=0;!f&&s&&!o&&e<l.length;e++){var o,a=l[e],d=p.p,h=a[2];n>3?(o=h===r)&&(u=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=t):a[0]<=d&&((o=n<2&&d<a[1])?(c=0,p.v=r,p.n=a[1]):d<h&&(o=n<3||a[0]>r||r>h)&&(a[4]=n,a[5]=r,p.n=h,c=0))}if(o||n>1)return i;throw f=!0,r}return function(o,l,h){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),c=l,u=h;(e=c<2?t:u)||!f;){a||(c?c<3?(c>1&&(p.n=-1),d(c,u)):p.n=u:p.v=u);try{if(s=2,a){if(c||(o="next"),e=a[o]){if(!(e=e.call(a,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,c<2&&(c=0)}else 1===c&&(e=a.return)&&e.call(a),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);a=t}else if((e=(f=p.n<0)?u:n.call(r,p))!==i)break}catch(e){a=t,c=1,u=e}finally{s=1}}return{value:e,done:f}}}(n,o,a),!0),s}var i={};function c(){}function u(){}function s(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(X(e={},r,(function(){return this})),e),f=s.prototype=c.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,X(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=s,X(f,"constructor",s),X(s,"constructor",u),u.displayName="GeneratorFunction",X(s,o,"GeneratorFunction"),X(f),X(f,o,"Generator"),X(f,r,(function(){return this})),X(f,"toString",(function(){return"[object Generator]"})),(J=function(){return{w:a,m:p}})()}function X(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}(X=function(t,e,n,r){function a(e,n){X(t,e,(function(t){return this._invoke(e,n,t)}))}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))})(t,e,n,r)}function Y(t,e,n){return e=Object(u.a)(e),Object(c.a)(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,n||[],Object(u.a)(t).constructor):e.apply(t,n))}var V=Z()().publicRuntimeConfig.APP_DOMAIN,$=function(t){var e=t.page,n=t.queryObject;return Object(j.e)({page:e,query:Object(m.m)(n)}).then((function(t){return{items:t.data,nextPage:t.next_page_url,total:t.total}}))},tt=function(t){function e(){return Object(a.a)(this,e),Y(this,e,arguments)}return Object(s.a)(e,t),Object(i.a)(e,[{key:"handleSearchError",value:function(){this.setState({loading:!1,searchErrorMessage:"Digita almeno 3 caratteri"})}},{key:"render",value:function(){var t=this,e=this.props.seo;return W(h.a,{seo:e},W(et,null),W(T.a,{data:["mfi"]}),W(U.a,null,(function(e){var n=e.requestLocation,r=e.coords;return W(H.a,null,(function(e){return W(z.a,{queryString:e},(function(e){var a=e.getQueryObject,i=e.setQueryString;return W(Q.a,{apiRequest:$,queryObject:a()},(function(e){var c=e.items,u=e.loadMore,s=e.nextPage,l=e.total,f=e.working;return W(G,Object(o.a)({},t.props,{setQueryString:i,total:l,queryObject:a(),listOfMfi:c,canLoadMore:s,loadMore:u,loading:f,requestLocation:n,coords:r}))}))}))}))})),W("div",null,W(d.Wrapper,{size:"big"},W(d.Padder,{size:"small"},W(d.Figure,{image:{url:"https://fai-website.imgix.net/images/FL_GFS_2024.jpg",alt:"Fascia loghi Giornate FAI per le scuole",title:"Fascia loghi Giornate FAI per le scuole"}})))))}}],[{key:"getInitialProps",value:function(){var t=Object(r.a)(J().m((function t(e){var n,r,o,a;return J().w((function(t){for(;;)switch(t.n){case 0:return n=e.req,t.n=1,Object(j.j)();case 1:return r=t.v,o={title:"Partecipa con la tua classe alle Giornate FAI per le scuole",description:"Torna l'evento nazionale del FAI dedicato al mondo della scuola. Una settimana di visite scolastiche condotte dagli Apprendisti Ciceroni",url:"".concat(V).concat(m.a),ogImage:"https://fai-website.imgix.net/images/CondivisioneGFS2021.jpg"},a=n?m.a:window.location.href,t.a(2,{seo:o,originUrl:a,tipologie:r})}}),t)})));return function(e){return t.apply(this,arguments)}}()}])}(l.Component),et=p.d.div.withConfig({displayName:"ListOfLuoghi__SpazioSottoHeader",componentId:"sc-1p7zrdi-0"}
1)(["height:140px;@media screen and (min-width:520px){height:104px;}"]),nt=Object(B.a)({header:{alwaysFixed:!0,hasCustomHeader:!0,headerType:"mfi"}})(tt);e.default=nt},NbfL:function(t,e,n){"use strict";var r=n("cxan"),o=n("9fIP"),a=n("MMYH"),i=n("K/z8"),c=n("sRHE"),u=n("8K1b"),s=n("ERkP"),l=n.n(s),f=n("voCV"),p=n("NAJH"),d=n("QtE3"),h=n("r4FT"),g=n("0D0S"),b=n.n(g)()().publicRuntimeConfig.WP_API,m=function(t){return h.a.get("".concat(b,"mrr/v1/menus/").concat(t)).then((function(t){return t.data})).catch((function(){return[]}))},y=n("aWzz"),O=n.n(y);function v(t,e,n){return e=Object(c.a)(e),Object(i.a)(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,n||[],Object(c.a)(t).constructor):e.apply(t,n))}var j=function(t){function e(){return Object(o.a)(this,e),v(this,e,arguments)}return Object(u.a)(e,t),Object(a.a)(e,[{key:"render",value:function(){return this.props.children(this.context.slug)}}])}(l.a.Component);j.contextTypes={slug:O.a.string};var w=j,S=l.a.createElement;function k(t,e,n){return e=Object(c.a)(e),Object(i.a)(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,n||[],Object(c.a)(t).constructor):e.apply(t,n))}e.a=Object(f.a)(Object(p.d)([{prop:"data",type:"api",resource:"menus",exact:1,label:"Seleziona menu"}]),(function(t){var e=function(e){function n(){var t;return Object(o.a)(this,n),(t=k(this,n)).state={tabs:[]},t.child=l.a.createRef(),t}return Object(u.a)(n,e),Object(a.a)(n,[{key:"componentDidMount",value:function(){this.props.data&&this.getData(this.props.data)}},{key:"componentWillReceiveProps",value:function(t){t.data&&this.getData(t.data)}},{key:"getData",value:function(t){var e=this;m(t[0]).then((function(t){e.setState({tabs:t.map((function(t){return{id:t.id,href:t.permalink,label:t.text}}))},(function(){return"function"===typeof e.child.current.maybeCenter&&e.child.current.maybeCenter()}))}))}},{key:"render",value:function(){return S(t,Object(r.a)({},this.props,{tabs:this.state.tabs,innerRef:this.child}))}}])}(s.Component);return e.displayName=Object(f.i)(t,"WithMenu"),e}))((function(t){var e=t.tabs,n=t.innerRef;return S(w,null,(function(t){var r=e.find((function(e){return e.href===t})),o=r&&r.id;return S(d.TabsNavigation,{tabs:e,selectedId:o,isMenu:!0,ref:n})}))}))},TGUm:function(t,e,n){"use strict";var r=n("zygG"),o=n("HbGN"),a=n("zjfJ"),i=n("9fIP"),c=n("MMYH"),u=n("K/z8"),s=n("sRHE"),l=n("8K1b"),f=n("ERkP"),p=n("cr+I"),d=n.n(p),h=n("wuXC"),g=n.n(h),b=["ids"];function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){Object(a.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function O(t,e,n){return e=Object(s.a)(e),Object(u.a)(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,n||[],Object(s.a)(t).constructor):e.apply(t,n))}var v={origin:"",path:"",queryObject:{}},j=function(t){function e(t){var n;return Object(i.a)(this,e),(n=O(this,e,[t])).state=y(y({},v),{},{queryObject:t.queryString}),n.setQueryString=n.setQueryString.bind(n),n.getQueryString=n.getQueryString.bind(n),n.update=n.update.bind(n),n}return Object(l.a)(e,t),Object(c.a)(e,[{key:"componentDidUpdate",value:function(t,e){var n=this.state.queryObject;g()(e.queryObject,n)||this.update()}},{key:"update",value:function(){var t=this.props.noUpdate,e=this.state.queryObject;if(!t){var n=e,a=n.ids,i=Object(o.a)(n,b);
1if(a)e=y(y({},a.reduce((function(t,e){if("string"===typeof e&&e.indexOf(!0)){var n=e.split(":"),o=Object(r.a)(n,2),a=o[0],i=o[1];t[a]=t[a]||[],t[a].push(i)}else t.ids=t.ids||[],t.ids.push(e);return t}),{})),i);window.history.pushState({},"","".concat(window.location.origin).concat(window.location.pathname,"?").concat(d.a.stringify(e,{arrayFormat:"bracket"})))}}},{key:"setQueryString",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.state.queryObject;this.setState({queryObject:y(y({},e?{}:n),t)})}},{key:"getQueryString",value:function(){return this.state.queryObject}},{key:"render",value:function(){return this.props.children({setQueryString:this.setQueryString,getQueryObject:this.getQueryString})}}])}(f.Component);e.a=j},cXXW:function(t,e,n){"use strict";var r=n("uDfI"),o=n("j46Z"),a=n("o2OV");e.a=Object(r.b)((function(t){return{coords:Object(a.c)(t),status:Object(a.d)(t),code:Object(a.b)(t)}}),o)((function(t){var e=t.coords,n=t.status,r=t.requestLocation,o=t.code;return(0,t.children)({coords:e,status:n,requestLocation:r,code:o})}))},j46Z:function(t,e,n){"use strict";n.r(e),n.d(e,"requestLocation",(function(){return o})),n.d(e,"commitLocation",(function(){return a})),n.d(e,"failLocation",(function(){return i}));var r=n("+H2D"),o=function(){return{type:r.c}},a=function(t){var e=t.lat,n=t.lng;return{type:r.a,payload:{coords:{lat:e,lng:n}}}},i=function(t){var e=t.code;return{type:r.b,meta:{code:e}}}},o2OV:function(t,e,n){"use strict";n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return s})),n.d(e,"b",(function(){return l}));var r=n("zjfJ"),o=n("+H2D");function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){Object(r.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c=function(t){return t.location?t.location:null},u=function(t){var e=c(t);return e&&e.coords},s=function(t){var e=c(t);return e&&e.status},l=function(t){var e=c(t);return e&&e.meta&&e.meta.code};e.a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case o.c:return i(i({},t),{},{status:"LOADING"});case o.a:return i(i({},t),{},{status:"SUCCESSFUL",coords:e.payload.coords});case o.b:return i(i({},t),{},{status:"FAILURE",meta:e.meta});default:return t}}},ttF7:function(t,e,n){"use strict";n.d(e,"f",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"e",(function(){return s})),n.d(e,"b",(function(){return l})),n.d(e,"i",(function(){return f})),n.d(e,"j",(function(){return p})),n.d(e,"g",(function(){return h})),n.d(e,"c",(function(){return g})),n.d(e,"h",(function(){return b})),n.d(e,"a",(function(){return m}));var r=n("zygG"),o=n("r4FT"),a=n("0D0S"),i=n.n(a)()().publicRuntimeConfig.PLATFORM,c=function(t){return o.a.get("".concat(i,"/").concat("luoghi?limit=100&with=mfi,mfi.media&has=mfi").concat(t)).then((function(t){return t.data.data}))},u=function(){return o.a.get("".concat(i,"/verticals/?id=MFI")).then((function(t){return t.data.data[0]}))},s=function(t){var e=t.page,n=t.query;return o.a.get("".concat(i,"/luoghi/?with=tipologia,mfi,mfi.media&has=mfi&limit=24&page=").concat(e,"&").concat(n||"")).then((function(t){return t.data}))},l=function(t){var e=t.coord_geo_lat,n=t.mfi,r=t.coord_geo_long,a=t.comune,c=parseFloat(e||a.coord_geo_lat).toFixed(2),u=parseFloat(r||a.coord_geo_long).toFixed(2),s=["limit=8","page=1","id[]=".concat(n.id_luogo,"|NOT")];return o.a.get("".concat(i,"/luoghi/?radius[coords]=").concat(c,",").concat(u,"&radius[distance]=100&with=media,mfi,mfi.media,tipologia&has=mfi&").concat(s.join("&"))).then((function(t){return t.data.data}))},f=function(t){return o.a.get("".concat(i,"/luoghi/?id_gf_itinerario=").concat(t,"&has=mfi&with=mfi,mfi.media&limit=8&page=1")).then((function(t){return t.data.data}))},p=function(){return o.a.get("".concat(i,"/luoghi/tipologie?with=macrotipologia&fl_ldc=true&limit=100")).then((function(t){return t.data.data}
1)).catch((function(t){return[]}))},d=function(t){if(!t)return t;var e=t.replace("\u2019","'");return e="MONZA E BRIANZA"===e||"MONZA-E-BRIANZA"===e?"MONZA E DELLA BRIANZA":"GALLURA-NORD-EST-SARDEGNA"===e||"GALLURA NORD-EST SARDEGNA"===e?"GALLURA NORD-EST SARDEGNA":"MASSA CARRARA"===e||"MASSA-CARRARA"===e?"MASSA-CARRARA":e.replaceAll("-"," ")},h=function(t){return o.a.get("".concat(i,"/province?nome=*").concat(d(t),"*|LIKE&has=luoghi.mfi")).then((function(t){return t.data.data}))},g=function(t){return o.a.get("".concat(i,"/comuni?nome=*").concat(d(t),"*|LIKE&limit=999&has=luoghi.mfi")).then((function(t){return t.data.data}))},b=function(t){return o.a.get("".concat(i,"/regioni?nome=*").concat(d(t),"*|LIKE")).then((function(t){return t.data.data}))},m=function(t,e){var n=function(t,e){if("object"!==typeof e||"string"!==typeof t)throw new Error("Params should be an object");var n=Object.entries(e).map((function(t){var e=Object(r.a)(t,2),n=e[0],o=e[1];return"".concat(n,"=").concat(Array.isArray(o)?o.join(","):o)})).join("&"),o=t.replace(/^\/+|\/+$/g,"");return"".concat(i,"/").concat(o,"?").concat(n)}(t,e);return o.a.get(n).then((function(t){return t.data}))}},xKjR:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/mfi/listOfLuoghi",function(){return n("NJQB")}])}},[["xKjR",1,0,5,7,3,2,6,4,8,9,10,11,13,12,15,14,16,17,18,19,20,21,22,24]]]);
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.