@deck.gl/json
Advanced tools
Comparing version 7.0.6 to 7.0.7
@@ -1,1 +0,1 @@ | ||
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("deck"));else if("function"==typeof define&&define.amd)define(["deck"],e);else{var n="object"==typeof exports?e(require("deck")):e(t.deck);for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(e,n){e.exports=t},function(t,e,n){(function(e){const r=n(3),o=("undefined"==typeof window?e:window).deck||{};if(!o.Layer)throw new Error("@deck.gl/core is not found");t.exports=Object.assign(o,r)}).call(this,n(2))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n.r(e);var o=n(0);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,f(e).apply(this,arguments))}var n,r,i;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(e,o["CompositeLayer"]),n=e,(r=[{key:"initializeState",value:function(){this.state={layers:[]}}},{key:"updateState",value:function(t){var e=t.props,n=t.oldProps;if(e.data!==n.data||e.configuration!==n.configuration){var r="string"==typeof e.data?JSON.parse(e.data):e.data;this.state.layers=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,n=e.layers||{};return t.map(function(t){var r=n[t.type],o=function(t,e){var n={};for(var r in t){var o=t[r];r.startsWith("get")?n[r]=V(o,e):n[r]=o}return n}(t,e);return o.fetch=_,r&&new r(o)})}(r,e.configuration)}}},{key:"renderLayers",value:function(){return this.state.layers}}])&&u(n.prototype,r),i&&u(n,i),e}();function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function p(t,e){var n=function(t){if("string"==typeof t){var e=v[t];return e||(e=t.split("."),v[t]=e),e}return Array.isArray(t)?t:[t]}(e),r=t,o=!0,i=!1,u=void 0;try{for(var a,f=n[Symbol.iterator]();!(o=(a=f.next()).done);o=!0){var c=a.value;r=y(r)?r[c]:void 0}}catch(t){i=!0,u=t}finally{try{o||null==f.return||f.return()}finally{if(i)throw u}}return r}function y(t){return null!==t&&"object"===s(t)}l.layerName="JSONLayer",l.defaultProps={configuration:[]};var v={};var b={},d={},h=34,m=10,w=13;function S(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}")}var g=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,o=[],i=t.length,u=0,a=0,f=i<=0,c=!1;function l(){if(f)return d;if(c)return c=!1,b;var e,r,o=u;if(t.charCodeAt(o)===h){for(;u++<i&&t.charCodeAt(u)!==h||t.charCodeAt(++u)===h;);return(e=u)>=i?f=!0:(r=t.charCodeAt(u++))===m?c=!0:r===w&&(c=!0,t.charCodeAt(u)===m&&++u),t.slice(o+1,e-1).replace(/""/g,'"')}for(;u<i;){if((r=t.charCodeAt(e=u++))===m)c=!0;else if(r===w)c=!0,t.charCodeAt(u)===m&&++u;else if(r!==n)continue;return t.slice(o,e)}return f=!0,t.slice(o,i)}for(t.charCodeAt(i-1)===m&&--i,t.charCodeAt(i-1)===w&&--i;(r=l())!==d;){for(var s=[];r!==b&&r!==d;)s.push(r),r=l();e&&null==(s=e(s,a++))||o.push(s)}return o}function o(e){return e.map(i).join(t)}function i(t){return null==t?"":e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,o,i=r(t,function(t,r){if(n)return n(t,r-1);o=t,n=e?function(t,e){var n=S(t);return function(r,o){return e(n(r),o,t)}}(t,e):S(t)});return i.columns=o||[],i},parseRows:r,format:function(e,n){return null==n&&(n=function(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var r in t)r in e||n.push(e[r]=r)}),n}(e)),[n.map(i).join(t)].concat(e.map(function(e){return n.map(function(t){return i(e[t])}).join(t)})).join("\n")},formatRows:function(t){return t.map(o).join("\n")}}},O=g(","),j=(O.parse,O.parseRows),x=(O.format,O.formatRows,g("\t")),P=(x.parse,x.parseRows,x.format,x.formatRows,{MapView:o.MapView,FirstPersonView:o.FirstPersonView,OrbitView:o.OrbitView,OrthographicView:o.OrthographicView}),k={style:"mapbox://styles/mapbox/light-v9"};function C(t,e){var n=t;return n.layers&&(n.layers=function(t,e){return[new l({data:t,configuration:e})]}(t.layers,e)),n.views&&(n.views=function(t,e){if(!t)return t;var n=e.views||{};return(t=Array.isArray(t)?t:[t]).map(function(t){var e=n[t.type]||P[t.type];if(e){var r=Object.assign({},t);return delete r.type,new e(r)}return null}).filter(Boolean)}(t.views,e)),"initialViewState"in n&&(n.viewState=n.viewState||n.initialViewState),function(t,e){(t.map||t.mapStyle)&&(t.map=Object.assign({},k,t.map));if(!t.map)return;"mapStyle"in t&&(t.map.style=t.mapStyle,t.map.mapStyle=t.mapStyle,delete t.mapStyle);"viewState"in t&&(t.map.viewState=t.viewState)}(n),n}function V(t,e){return"-"===t?function(t){return t}:"string"==typeof t?function(e){return p(e,t)}:t}function _(t){return fetch(t).then(function(t){return t.text()}).then(function(t){try{return JSON.parse(t)}catch(e){return function(t){var e=j(t);e.length>0&&e.shift();var n=!0,r=!1,o=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value;for(var f in a){var c=parseFloat(a[f])||0;Number.isNaN(c)||(a[f]=c)}}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}return e}(t)}})}function N(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var A=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.configuration={},this.onJSONChange=function(){},this.setProps(e)}var e,n,o;return e=t,(n=[{key:"finalize",value:function(){}},{key:"setProps",value:function(t){"configuration"in t&&(this.configuration=t.configuration),"onJSONChange"in t&&(this.onJSONChange=t.onJSONChange)}},{key:"convertJsonToDeckProps",value:function(t){if(!t||t===this.json)return this.deckProps;this.json=t;var e=C(function(t){return"string"==typeof t?JSON.parse(t):Object.assign({},t)}(t),this.configuration);"initialViewState"in e&&((!this.initialViewState||!function(t,e){if(t===e)return!0;if("object"!==r(t)||null===t||"object"!==r(e)||null===e)return!1;if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(!(n in e)||t[n]!==e[n])return!1;for(var o in e)if(!(o in t))return!1;return!0}(e.initialViewState,this.initialViewState))&&(e.viewState=e.initialViewState,this.initialViewState=e.initialViewState),delete e.initialViewState);return this.deckProps=e,e}}])&&N(e.prototype,n),o&&N(e,o),t}();n.d(e,"_JSONConverter",function(){return A}),n.d(e,"_JSONLayer",function(){return l})}])}); | ||
!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("deck"));else if("function"==typeof define&&define.amd)define(["deck"],n);else{var e="object"==typeof exports?n(require("deck")):n(t.deck);for(var r in e)("object"==typeof exports?exports:t)[r]=e[r]}}(window,function(t){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=7)}([function(n,e){n.exports=t},function(t,n){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(n){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=r=function(t){return e(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},r(n)}t.exports=r},function(t,n){t.exports=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}},function(t,n){function e(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}},function(t,n,e){var r=e(1),o=e(9);t.exports=function(t,n){return!n||"object"!==r(n)&&"function"!=typeof n?o(t):n}},function(t,n){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e},function(t,n,e){var r=e(10);t.exports=function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&r(t,n)}},function(t,n,e){(function(n){const r=e(11),o=("undefined"==typeof window?n:window).deck||{};if(!o.Layer)throw new Error("@deck.gl/core is not found");t.exports=Object.assign(o,r)}).call(this,e(8))},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,n){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t},e(n,r)}t.exports=e},function(t,n,e){"use strict";e.r(n);var r=e(2),o=e.n(r),i=e(3),u=e.n(i),a=e(1),f=e.n(a);var c=e(0),s=e(4),l=e.n(s),p=e(5),y=e.n(p),v=e(6),d=e.n(v),h=function(t){function n(){return o()(this,n),l()(this,y()(n).apply(this,arguments))}return d()(n,t),u()(n,[{key:"initializeState",value:function(){this.state={layers:[]}}},{key:"updateState",value:function(t){var n=t.props,e=t.oldProps;if(n.data!==e.data||n.configuration!==e.configuration){var r="string"==typeof n.data?JSON.parse(n.data):n.data;this.state.layers=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,e=n.layers||{};return t.map(function(t){var r=e[t.type],o=function(t,n){var e={};for(var r in t){var o=t[r];r.startsWith("get")?e[r]=R(o,n):e[r]=o}return e}(t,n);return o.fetch=E,r&&new r(o)})}(r,n.configuration)}}},{key:"renderLayers",value:function(){return this.state.layers}}]),n}(c.CompositeLayer);function b(t,n){var e=function(t){if("string"==typeof t){var n=m[t];return n||(n=t.split("."),m[t]=n),n}return Array.isArray(t)?t:[t]}(n),r=t,o=!0,i=!1,u=void 0;try{for(var a,f=e[Symbol.iterator]();!(o=(a=f.next()).done);o=!0){var c=a.value;r=w(r)?r[c]:void 0}}catch(t){i=!0,u=t}finally{try{o||null==f.return||f.return()}finally{if(i)throw u}}return r}function w(t){return null!==t&&"object"===f()(t)}h.layerName="JSONLayer",h.defaultProps={configuration:[]};var m={};var S={},g={},O=34,j=10,x=13;function P(t){return new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}")}var k=function(t){var n=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function r(t,n){var r,o=[],i=t.length,u=0,a=0,f=i<=0,c=!1;function s(){if(f)return g;if(c)return c=!1,S;var n,r,o=u;if(t.charCodeAt(o)===O){for(;u++<i&&t.charCodeAt(u)!==O||t.charCodeAt(++u)===O;);return(n=u)>=i?f=!0:(r=t.charCodeAt(u++))===j?c=!0:r===x&&(c=!0,t.charCodeAt(u)===j&&++u),t.slice(o+1,n-1).replace(/""/g,'"')}for(;u<i;){if((r=t.charCodeAt(n=u++))===j)c=!0;else if(r===x)c=!0,t.charCodeAt(u)===j&&++u;else if(r!==e)continue;return t.slice(o,n)}return f=!0,t.slice(o,i)}for(t.charCodeAt(i-1)===j&&--i,t.charCodeAt(i-1)===x&&--i;(r=s())!==g;){for(var l=[];r!==S&&r!==g;)l.push(r),r=s();n&&null==(l=n(l,a++))||o.push(l)}return o}function o(n){return n.map(i).join(t)}function i(t){return null==t?"":n.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,n){var e,o,i=r(t,function(t,r){if(e)return e(t,r-1);o=t,e=n?function(t,n){var e=P(t);return function(r,o){return n(e(r),o,t)}}(t,n):P(t)});return i.columns=o||[],i},parseRows:r,format:function(n,e){return null==e&&(e=function(t){var n=Object.create(null),e=[];return t.forEach(function(t){for(var r in t)r in n||e.push(n[r]=r)}),e}(n)),[e.map(i).join(t)].concat(n.map(function(n){return e.map(function(t){return i(n[t])}).join(t)})).join("\n")},formatRows:function(t){return t.map(o).join("\n")}}},V=k(","),C=(V.parse,V.parseRows),_=(V.format,V.formatRows,k("\t")),N=(_.parse,_.parseRows,_.format,_.formatRows,{MapView:c.MapView,FirstPersonView:c.FirstPersonView,OrbitView:c.OrbitView,OrthographicView:c.OrthographicView}),A={style:"mapbox://styles/mapbox/light-v9"};function J(t,n){var e=t;return e.layers&&(e.layers=function(t,n){return[new h({data:t,configuration:n})]}(t.layers,n)),e.views&&(e.views=function(t,n){if(!t)return t;var e=n.views||{};return(t=Array.isArray(t)?t:[t]).map(function(t){var n=e[t.type]||N[t.type];if(n){var r=Object.assign({},t);return delete r.type,new n(r)}return null}).filter(Boolean)}(t.views,n)),"initialViewState"in e&&(e.viewState=e.viewState||e.initialViewState),function(t,n){(t.map||t.mapStyle)&&(t.map=Object.assign({},A,t.map));if(!t.map)return;"mapStyle"in t&&(t.map.style=t.mapStyle,t.map.mapStyle=t.mapStyle,delete t.mapStyle);"viewState"in t&&(t.map.viewState=t.viewState)}(e),e}function R(t,n){return"-"===t?function(t){return t}:"string"==typeof t?function(n){return b(n,t)}:t}function E(t){return fetch(t).then(function(t){return t.text()}).then(function(t){try{return JSON.parse(t)}catch(n){return function(t){var n=C(t);n.length>0&&n.shift();var e=!0,r=!1,o=void 0;try{for(var i,u=n[Symbol.iterator]();!(e=(i=u.next()).done);e=!0){var a=i.value;for(var f in a){var c=parseFloat(a[f])||0;Number.isNaN(c)||(a[f]=c)}}}catch(t){r=!0,o=t}finally{try{e||null==u.return||u.return()}finally{if(r)throw o}}return n}(t)}})}var M=function(){function t(n){o()(this,t),this.configuration={},this.onJSONChange=function(){},this.setProps(n)}return u()(t,[{key:"finalize",value:function(){}},{key:"setProps",value:function(t){"configuration"in t&&(this.configuration=t.configuration),"onJSONChange"in t&&(this.onJSONChange=t.onJSONChange)}},{key:"convertJsonToDeckProps",value:function(t){if(!t||t===this.json)return this.deckProps;this.json=t;var n=J(function(t){return"string"==typeof t?JSON.parse(t):Object.assign({},t)}(t),this.configuration);"initialViewState"in n&&((!this.initialViewState||!function(t,n){if(t===n)return!0;if("object"!==f()(t)||null===t||"object"!==f()(n)||null===n)return!1;if(Object.keys(t).length!==Object.keys(n).length)return!1;for(var e in t)if(!(e in n)||t[e]!==n[e])return!1;for(var r in n)if(!(r in t))return!1;return!0}(n.initialViewState,this.initialViewState))&&(n.viewState=n.initialViewState,this.initialViewState=n.initialViewState),delete n.initialViewState);return this.deckProps=n,n}}]),t}();e.d(n,"_JSONConverter",function(){return M}),e.d(n,"_JSONLayer",function(){return h})}])}); |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "7.0.6", | ||
"version": "7.0.7", | ||
"publishConfig": { | ||
@@ -8,0 +8,0 @@ "access": "public" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
152869