PageSourceSearch

https://resourcewatch.org/_next/static/chunks/pages/embed/embed/[id]-fdf514a6fe8c9051.js

js resourcewatch.org collected 2026-09-24 08:54:34 UTC 9,167 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7226],{47908:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(41664),i=n.n(r),o=n(85893);function c(){return(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:15},children:["Powered by",(0,o.jsx)(i(),{href:"/",children:(0,o.jsx)("a",{target:"_blank",rel:"noopener noreferrer",children:(0,o.jsx)("img",{src:"/static/images/logo-embed.png",alt:"Resource Watch logo",style:{display:"block",height:21,margin:"0 0 0 10px"}})})})]})}},22543:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(59499),i=(n(67294),n(94184)),o=n.n(i),c=n(58350),a=n(60307),s=n(96602),l=n(85893),u=function(e){var t=e.title,n=e.description,i=e.className,u=e.thumbnailUrl,d=e.children;return(0,l.jsxs)("div",{className:o()("l-page",(0,r.Z)({},i,!!i)),children:[(0,l.jsx)(a.Z,{title:t,description:n,thumbnail:u}),(0,l.jsx)(c.Icons,{}),(0,l.jsx)(s.Z,{}),d]})};u.defaultProps={thumbnailUrl:null,className:null};var d=u},25178:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return x},default:function(){return P}});var r=n(59499),i=n(14416),o=n(66198),c=n(92777),a=n(82262),s=n(45959),l=n(63553),u=n(37247),d=n(67294),f=n(22543),g=n(52202),p=n(77677),h=n(47908),v=n(60718),m=n(85893);function j(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,u.Z)(e);if(t){var i=(0,u.Z)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,l.Z)(this,n)}}var b=function(e){(0,s.Z)(n,e);var t=j(n);function n(e){var r;return(0,c.Z)(this,n),(r=t.call(this,e)).state={modalOpened:!1},r}return(0,a.Z)(n,[{key:"getModal",value:function(){var e=this.props.widget.description;return(0,m.jsxs)("div",{className:"widget-modal",children:[!e&&(0,m.jsx)("p",{children:"No additional information is available"}),e&&(0,m.jsxs)("div",{children:[(0,m.jsx)("h4",{children:"Description"}),(0,m.jsx)("p",{children:e})]})]})}},{key:"render",value:function(){var e=this,t=this.props,n=t.widget,r=t.loading,i=t.error,o=t.favourited,c=t.user,a=t.setIfFavorited,s=this.state.modalOpened,l=o?"star-full":"star-empty",u=(0,v.M)(),d=n.name,j=n.description,b=n.dataset,w=n.id,y=n.widgetConfig;return r?(0,m.jsx)(f.Z,{title:"Loading widget...",description:"",children:(0,m.jsx)("div",{className:"c-embed-widget",children:(0,m.jsx)(g.Z,{isLoading:!0,className:"-light"})})}):i?(0,m.jsx)(f.Z,{title:"Resource Watch",description:"",children:(0,m.jsxs)("div",{className:"c-embed-widget",children:[(0,m.jsx)("div",{className:"widget-title",children:(0,m.jsx)("h4",{children:"\u2013"})}),(0,m.jsx)("div",{className:"widget-content",children:(0,m.jsx)("p",{children:"Sorry, the widget couldn't be loaded"})}),u&&(0,m.jsx)("div",{className:"widget-footer",children:(0,m.jsx)("a",{href:"/",target:"_blank",rel:"noopener noreferrer",children:(0,m.jsx)("img",{className:"embed-logo",src:"/static/images/logo-embed.png",alt:"Resource Watch"})})})]})}):(0,m.jsx)(f.Z,{title:"".concat(d),description:"".concat(j||""),children:(0,m.jsxs)("div",{className:"c-embed-widget",children:[(0,m.jsxs)("div",{className:"widget-title",children:[(0,m.jsx)("a",{href:"/data/explore/".concat(b),target:"_blank",rel:"noopener noreferrer",children:(0,m.jsx)("h4",{children:d})}),(0,m.jsxs)("div",{className:"buttons",children:[c.id&&(0,m.jsx)("button",{onClick:function(){a(w,!o)},children:(0,m.jsx)(p.Z,{name:"icon-".concat(l),className:"c-icon -small"})}),(0,m.jsx)("button",{"aria-label":"".concat(s?"Close":"Open"," information modal"),onClick:function(){return e.setState({modalOpened:!s})},children:(0,m.jsx)(p.Z,{name:"icon-".concat(s?"cross":"info"),className:"c-icon -small"})})]})]}),(0,m.jsxs)("div",{className:"widget-content",style:{padding:0},children:[!s&&(0,m.jsx)("iframe",{title:d,src:y.url,frameBorder:"0"}),s&&this.getModal()]}),u&&(0,m.jsx)(h.Z,{})]})})}}]),n}(d.PureComponent);b.defaultProps={error:null};var w=b,y=(0,i.connect)((function(e){return{widget:e.widget.data,loading:e.widget.loading,error:e.widget.error,favourited:e.widget.favourite.favourited,user:e.user}}),{setIfFavorited:o.B4})(w);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var x=!0;function P(e){return(0,m.jsx)(y,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?O(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e))}},60718:function(e,t,n){"use strict";n.d(t,{M:function(){return u},s:function(){return d}});var r=n(59499),i=n(6192);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var a=["aoi","type","geostore_env","geostore_id"],s=["aoi","type","geostore_env","geostore_id"],l=["geostore_env","geostore_id","country"],u=function(){return"undefined"!==typeof document&&""!==document.referrer&&!/localhost|(staging\.)?resourcewatch.org/.test(document.referrer)},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.id,o=(0,i.h$)(e),u=l;"map-swipe"===o&&(u=s),"map"===o&&(u=a);var d=Object.keys(t).filter((function(e){return u.includes(e)})).reduce((function(e,n){return c(c({},e),{},(0,r.Z)({},n,t[n]))}),{}),f=new URLSearchParams(d);return{link:"".concat(window.location.origin,"/data/widget/").concat(n).concat(f.toString().length?"?".concat(f.toString()):""),embed:"".concat(window.location.origin,"/embed/").concat(o,"/").concat(n).concat(f.toString().length?"?".concat(f.toString()):"")}}},6192:function(e,t,n){"use strict";n.d(t,{Lu:function(){return l},_U:function(){return u},h$:function(){return f},pR:function(){return a},tA:function(){return d},uG:function(){return s}});var r=n(59499),i=n(22109);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"type"in e&&"map"===e.type},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!(!e||!(e.paramsConfig&&"embed"===e.paramsConfig.visualizationType||e.type&&"embed"===e.type))},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"type"in e&&"text"===e.type},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!!Object.prototype.hasOwnProperty.call(e,"widgetConfig")&&(!(!e.widgetConfig||null===e.widgetConfig)&&(e.widgetConfig instanceof Object&&!(e.widgetConfig instanceof Array)))},d=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return c(c({},e),{},{name:(0,i.replace)(e.name,n),widgetConfig:c(c({},(null===e||void 0===e?void 0:e.widgetConfig)||{}),{},{data:((null===e||void 0===e||null===(t=e.widgetConfig)||void 0===t?void 0:t.data)||[]).map((function(e){return null!==e&&void 0!==e&&e.url?c(c({},e),{},{url:r?window.encodeURI((0,i.replace)(e.url,n)):(0,i.replace)(e.url,n)}):e}))})})},f=function(e){if(!e)throw new Error("getWidgetType: widget not found");var t=e.widgetConfig;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(e)&&"layersLeft"in(e.paramsConfig||{})&&"layersRight"in(e.paramsConfig||{})}(t)?"map-swipe":a(t)?"map":s(t)?"embed":function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"type"in e&&"ranking"===e.type}(t)?"ranking":"widget"}},79146:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/embed/embed/[id]",function(){return n(25178)}])}},function(e){e.O(0,[9774,2888,179],(function(){return t=79146,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.