PageSourceSearch

https://fondoambiente.it/_next/static/chunks/pages/collezioni-a5f21ffce8df0dff5ef6.js

js fondoambiente.it collected 2026-09-24 08:51:37 UTC 16,940 bytes, 1 lines download raw bytes

1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[46],{MJc2:function(e,t,r){var n=r("KEM+");function i(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 o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var a=r("ERkP"),c=r("8cHP").Link;e.exports=function(e){return a.createElement(e.route?c:"a",o(o({},e),{},{href:e.route||e.to||""}),e.children)}},OvWy:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(e){return e&&Object.keys(e).length?Object.keys(e).map((function(t){var r=Array.isArray(e[t]);return!e[t]||r&&!e[t].length?"":"".concat(t,"=").concat(r?e[t].join(","):e[t])})).filter((function(e){return e})).join("&"):""}},Xhfp:function(e,t,r){"use strict";var n=r("QsI/"),i=r("r4FT"),o=r("0D0S");function a(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var a=n&&n.prototype instanceof u?n:u,l=Object.create(a.prototype);return c(l,"_invoke",function(r,n,i){var o,a,c,u=0,l=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return o=t,a=0,c=e,p.n=r,s}};function h(r,n){for(a=r,c=n,t=0;!f&&u&&!i&&t<l.length;t++){var i,o=l[t],h=p.p,d=o[2];r>3?(i=d===n)&&(c=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=r<2&&h<o[1])?(a=0,p.v=n,p.n=o[1]):h<d&&(i=r<3||o[0]>n||n>d)&&(o[4]=r,o[5]=n,p.n=d,a=0))}if(i||r>1)return s;throw f=!0,n}return function(i,l,d){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,d),a=l,c=d;(t=a<2?e:c)||!f;){o||(a?a<3?(a>1&&(p.n=-1),h(a,c)):p.n=c:p.v=c);try{if(u=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(c=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(f=p.n<0)?c:r.call(n,p))!==s)break}catch(t){o=e,a=1,c=t}finally{u=1}}return{value:t,done:f}}}(r,i,o),!0),l}var s={};function u(){}function l(){}function f(){}t=Object.getPrototypeOf;var p=[][n]?t(t([][n]())):(c(t={},n,(function(){return this})),t),h=f.prototype=u.prototype=Object.create(p);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(h),e}return l.prototype=f,c(h,"constructor",f),c(f,"constructor",l),l.displayName="GeneratorFunction",c(f,i,"GeneratorFunction"),c(h),c(h,i,"Generator"),c(h,n,(function(){return this})),c(h,"toString",(function(){return"[object Generator]"})),(a=function(){return{w:o,m:d}})()}function c(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(c=function(e,t,r,n){function o(t,r){c(e,t,(function(e){return this._invoke(t,r,e)}))}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(o("next",0),o("throw",1),o("return",2))})(e,t,r,n)}var s=r.n(o)()().publicRuntimeConfig,u=s.COMWORK_URL,l=s.COMWORK_CLIENT_ID,f=s.COMWORK_CLIENT_SECRET,p=s.COMWORK_APP_ID,h="".concat(u,"/oauth/token?grant_type=client_credentials&scope=read&client_id=").concat(l,"&client_secret=").concat(f),d=function(){var e=Object(n.a)(a().m((function e(){var t;return a().w((function(e){for(;;)switch(e.n){case 0:return e.n=1,i.a.post(h);case 1:return t=e.v,e.a(2,t.data.access_token)}}),e)})));return function(){return e.apply(this,arguments)}}(),b=function(){var e=Object(n.a)(a().m((function e(t,r,n){var o;return a().w((function(e){for(;;)switch(e.n){case 0:if(r){e.n=2;break}return e.n=1,d();case 1:r=e.v;case 2:return t+="?appid=".concat(p).concat(n?"&"+n:""),e.n=3,i.a.get(t,{headers:{Authorization:"Bearer ".concat(r)}}).then((function(e){return e.data})).catch((function(){return!1}));case 3:if(o=e.v){e.n=6;break}return e.n=4,d();case 4:return r=e.v,e.n=5,i.a.get(t,{headers:{Authorization:"Bearer ".concat(r)}}).then((function(e){return e.data}));case 5:o=e.v;case 6:return e.a(2,{token:r,response:o})}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}();t.a=b},Xsj4:function(e,t,r){"use strict";r.r(t);var n=r("QsI/"),i=r("zjfJ"),o=r("HbGN"),a=r("9fIP"),c=r("MMYH"),s=r("K/z8"),u=r("sRHE"),l=r("8K1b"),f=r("ERkP"),p=r.n(f),h=r("7xIC"),d=r.n(h),b=r("j/s1"),y=r("QtE3"),v=r("uPMs"),O=function(e){return"undefined"===typeof e?{}:{title:e.title,link:"/collezioni/".concat(e.id,"/"),thumbnail:{url:e.thumbnailUrl},showArrowForward:!0}},g=r("Lm5w"),m=r("0D0S"),w=r.n(m),j=r("fwig"),S=r("Xhfp");function k(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 P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?k(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var C=w()().publicRuntimeConfig.COMWORK_URL,_="".concat(C,"/public/api/catalogue/collections"),E=function(e,t,r){return Object(S.a)(_,e,t).then((function(e){var t=e.token,n=e.response;return{token:t,result:n.result,filters:P(P({},n.filters.reduce((function(e,t){return P(P({},e),{},Object(i.a)({},t.name,t.values))}),{})),r?{q:r}:{}),facets:n.facets,blocksize:n.blocksize,page:n.page,totalSize:n.totalSize,appliedFilters:n.filters}}))},z=r("OvWy"),T=["seo"],x=p.a.createElement;function F(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var s=n&&n.prototype instanceof c?n:c,u=Object.create(s.prototype);return L(u,"_invoke",function(r,n,i){var o,c,s,u=0,l=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return o=t,c=0,s=e,p.n=r,a}};function h(r,n){for(c=r,s=n,t=0;!f&&u&&!i&&t<l.length;t++){var i,o=l[t],h=p.p,d=o[2];r>3?(i=d===n)&&(s=o[(c=o[4])?5:(c=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=r<2&&h<o[1])?(c=0,p.v=n,p.n=o[1]):h<d&&(i=r<3||o[0]>n||n>d)&&(o[4]=r,o[5]=n,p.n=d,c=0))}if(i||r>1)return a;throw f=!0,n}return function(i,l,d){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,d),c=l,s=d;(t=c<2?e:s)||!f;){o||(c?c<3?(c>1&&(p.n=-1),h(c,s)):p.n=s:p.v=s);try{if(u=2,o){if(c||(i="next"),t=o[i]){if(!(t=t.call(o,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,c<2&&(c=0)}else 1===c&&(t=o.return)&&t.call(o),c<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),c=1);o=e}else if((t=(f=p.n<0)?s:r.call(n,p))!==a)break}catch(t){o=e,c=1,s=t}finally{u=1}}return{value:t,done:f}}}(r,i,o),!0),u}var a={};function c(){}function s(){}function u(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(L(t={},n,(function(){return this})),t),f=u.prototype=c.prototype=Object.create(l);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,L(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=u,L(f,"constructor",u),L(u,"constructor",s),s.displayName="GeneratorFunction",L(u,i,"GeneratorFunction"),L(f),L(f,i,"Generator"),L(f,n,(function(){return this})),L(f,"toString",(function(){return"[object Generator]"})),(F=function(){return{w:o,m:p}})()}function L(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(L=function(e,t,r,n){function o(t,r){L(e,t,(function(e){return this._invoke(t,r,e)}))}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(o("next",0),o("throw",1),o("return",2))})(e,t,r,n)}function M(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 R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function D(e,t,r){return t=Object(u.a)(t),Object(s.a)(e,function(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return function(){return!!e}()}()?Reflect.construct(t,r||[],Object(u.a)(e).constructor):t.apply(e,r))}var N=w()().publicRuntimeConfig.APP_DOMAIN,I=function(e){function t(e){var r;Object(a.a)(this,t),r=D(this,t);e.seo;var n=Object(o.a)(e,T);return r.state=R({meta:{loading:!0}},n),r.handleSearchChange=r.handleSearchChange.bind(r),r.handleSearchReset=r.handleSearchReset.bind(r),r.handlePaginationChange=r.handlepaginationChange.bind(r),r.handlerClearFilter=r.handlerClearFilter.bind(r),r.search=r.search.bind(r),r.serializeFilters=z.a,r.canLoadMore=r.canloadmore.bind(r),r.canLoadMorep=!1,r}return Object(l.a)(t,e),Object(c.a)(t,[{key:"canloadmore",value:function(){var e=this.state.totalSize/this.state.blocksize,t=this.state.page+1;this.canLoadMorep=e>t}}
1,{key:"setLoading",value:function(e){this.setState(R(R({},this.state),{},{meta:R(R({},this.state.meta),{},{loading:e})}))}},{key:"componentDidMount",value:function(){this.setLoading(!1),this.canLoadMore()}},{key:"search",value:function(){var e=Object(n.a)(F().m((function e(){var t,r;return F().w((function(e){for(;;)switch(e.n){case 0:t=this.state.filters,r=this.serializeFilters(t),window.location.href="/collezioniCatalogo".concat(r?"?".concat(r):""),this.canLoadMore();case 1:return e.a(2)}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"reload",value:function(){var e=Object(n.a)(F().m((function e(){var t,r,n,i,o;return F().w((function(e){for(;;)switch(e.n){case 0:return this.setLoading(!0),t=this.state,r=t.token,n=t.filters,i=this.state.result,e.n=1,E(r,this.serializeFilters(n));case 1:(o=e.v).result=i.concat(o.result),this.setState(R(R({},this.state),o)),this.canLoadMore(),this.updateRoute(),this.setLoading(!1);case 2:return e.a(2)}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"handleSearchChange",value:function(e){this.setState(R(R({},this.state),{},{filters:R(R({},this.state.filters),e)})),this.canLoadMore()}},{key:"handleSearchReset",value:function(){var e=this;this.setState(R(R({},this.state),{},{filters:{}})),setTimeout(Object(n.a)(F().m((function t(){return F().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,e.search();case 1:return t.a(2,t.v)}}),t)}))))}},{key:"handlepaginationChange",value:function(){var e=this,t=this.state.page;this.setState(R(R({},this.state),{},{filters:R(R({},this.state.filters),{},{page:t+1})})),setTimeout(Object(n.a)(F().m((function t(){return F().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,e.reload();case 1:return t.a(2,t.v)}}),t)}))))}},{key:"handlerClearFilter",value:function(){var e=Object(n.a)(F().m((function e(t){var r,o,a,c=this;return F().w((function(e){for(;;)switch(e.n){case 0:r=t.split(".")[0],o=t.split(".")[1],a=R(R({},this.state.filters),{},Object(i.a)({page:0},r,this.state.filters[r].filter((function(e){return e!==o})))),this.setState(R(R({},this.state),{},{filters:a})),setTimeout(Object(n.a)(F().m((function e(){return F().w((function(e){for(;;)switch(e.n){case 0:return e.n=1,c.search();case 1:return e.a(2,e.v)}}),e)}))));case 1:return e.a(2)}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateRoute",value:function(){var e=this.serializeFilters(this.state.filters);d.a.replace({pathname:"/collezioni"},"/collezioni".concat(e?"?".concat(e):""),{shallow:!0}),this.canLoadMore()}},{key:"render",value:function(){var e=this.props.seo,t=this.state,r=t.meta,n=t.loading,i=t.loadingMore,o=t.result,a=t.filters,c=t.facets,s=(t.blocksize,t.page,t.totalSize,t.appliedFilters);return x(v.a,{seo:e},r&&r.loading&&x(y.Loading,null),x(y.CollectionsHero,{title:e.title,breadCrumbs:[["/","Home"],["/collezioni","Collezioni"]],height:"extra-small"}),x(y.Background,{color:"grey"},x(y.Wrapper,{size:"big"},x(A,null,x(y.CollectionsFilters,{filters:a,facets:c,appliedFilters:s,onlySearch:!0,handleSearchChange:this.handleSearchChange,handleSearchSubmit:this.search,handleSearchReset:this.handleSearchReset,handlerClearFilter:this.handlerClearFilter}),x(G,null,"Il catalogo online \xe8 in costante implementazione e verr\xe0 periodicamente aggiornato, revisionato e arricchito.",x("br",null),x("br",null),"The catalogue is continually being compiled, and as such it will be periodically updated, revised and expanded.")),0===o.length&&x(y.Padder,{size:"medium",align:"center"},x("div",{style:{textAlign:"center"}},"Non ci sono collezioni")),o.length>0&&x(p.a.Fragment,null,x(y.CollectionsListOfCards,{samesize:"true",cards:o.map(O),CardComponent:y.CollectionsListCard,vertical:!0}),this.canLoadMorep&&!n&&x(y.Padder,{size:"small"},x(y.Button,{onClick:this.handlePaginationChange,children:i?"Carico...":"Mostra altri",centered:!0}))))),x(y.FasciaNewsletterApp,null),x(y.FasciaSupporto,null))}}],[{key:"getInitialProps",value:function(){var e=Object(n.a)(F().m((function e(t){var r,n,i,o,a,c;return F().w((function(e){for(;;)switch(e.n){case 0:return r=t.req,n=t.res,i=t.query,o=Object(j.b)(r),e.n=1,E(o,Object(z.a)(i),null===i||void 0===i?void 0:i.q);case 1:return a=e.v,n.setHeader("Set-Cookie",Object(j.a)(a.token)),c={url:"".concat(N,"/collezioni"),title:"Il patrimonio e le collezioni del FAI"},e.a(2,R({seo:c},a))}}),e)})));return function(t){return e.apply(this,arguments)}}()}])}(f.Component),A=b.d.div.withConfig({displayName:"collezioni__SideFilters",componentId:"sc-1xl7mwd-0"})(["flex-shrink:0;flex-basis:30%;background:#f2f2f2;padding:1rem;"]),G=b.d.p.withConfig({displayName:"collezioni__FiltersDescription",componentId:"sc-1xl7mwd-1"})(["margin-top:40px;"]),H=Object(g.b)(I);t.default=H},fwig:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return o}
1));var n=r("s9SB"),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e.headers.cookie)return t;var r=Object(n.parse)(e.headers.cookie);return r.comworkToken},o=function(e){return Object(n.serialize)("comworkToken",String(e,{httpOnly:!0,maxAge:2592e3,path:"/",sameSite:"Strict",secure:!0}))}},s9SB:function(e,t,r){"use strict";t.parse=function(e,t){if("string"!==typeof e)throw new TypeError("argument str must be a string");var r={},n=(t||{}).decode||o,i=0;for(;i<e.length;){var a=e.indexOf("=",i);if(-1===a)break;var s=e.indexOf(";",i);if(-1===s)s=e.length;else if(s<a){i=e.lastIndexOf(";",a-1)+1;continue}var u=e.slice(i,a).trim();if(void 0===r[u]){var l=e.slice(a+1,s).trim();34===l.charCodeAt(0)&&(l=l.slice(1,-1)),r[u]=c(l,n)}i=s+1}return r},t.serialize=function(e,t,r){var o=r||{},c=o.encode||a;if("function"!==typeof c)throw new TypeError("option encode is invalid");if(!i.test(e))throw new TypeError("argument name is invalid");var s=c(t);if(s&&!i.test(s))throw new TypeError("argument val is invalid");var u=e+"="+s;if(null!=o.maxAge){var l=o.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");u+="; Max-Age="+Math.floor(l)}if(o.domain){if(!i.test(o.domain))throw new TypeError("option domain is invalid");u+="; Domain="+o.domain}if(o.path){if(!i.test(o.path))throw new TypeError("option path is invalid");u+="; Path="+o.path}if(o.expires){var f=o.expires;if(!function(e){return"[object Date]"===n.call(e)||e instanceof Date}(f)||isNaN(f.valueOf()))throw new TypeError("option expires is invali
1d");u+="; Expires="+f.toUTCString()}o.httpOnly&&(u+="; HttpOnly");o.secure&&(u+="; Secure");if(o.priority){switch("string"===typeof o.priority?o.priority.toLowerCase():o.priority){case"low":u+="; Priority=Low";break;case"medium":u+="; Priority=Medium";break;case"high":u+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(o.sameSite){switch("string"===typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return u};var n=Object.prototype.toString,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function o(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function a(e){return encodeURIComponent(e)}function c(e,t){try{return t(e)}catch(r){return e}}},zghX:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/collezioni",function(){return r("Xsj4")}])}},[["zghX",1,0,5,7,3,2,6,4,8,9,10,11,13,12,15,14,16]]]);

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.