node-red-contrib-tak-registration 0.3.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/node_modules/@turf/along/package.json +41 -69
- package/node_modules/@turf/angle/package.json +44 -75
- package/node_modules/@turf/area/package.json +38 -68
- package/node_modules/@turf/bbox/package.json +37 -81
- package/node_modules/@turf/bbox-clip/package.json +44 -81
- package/node_modules/@turf/bbox-polygon/package.json +36 -66
- package/node_modules/@turf/bearing/package.json +36 -70
- package/node_modules/@turf/bezier-spline/package.json +39 -67
- package/node_modules/@turf/boolean-clockwise/package.json +42 -83
- package/node_modules/@turf/boolean-contains/package.json +46 -80
- package/node_modules/@turf/boolean-crosses/package.json +45 -79
- package/node_modules/@turf/boolean-disjoint/package.json +44 -79
- package/node_modules/@turf/boolean-equal/package.json +47 -84
- package/node_modules/@turf/boolean-intersects/package.json +42 -77
- package/node_modules/@turf/boolean-overlap/package.json +48 -82
- package/node_modules/@turf/boolean-parallel/package.json +42 -73
- package/node_modules/@turf/boolean-point-in-polygon/package.json +37 -77
- package/node_modules/@turf/boolean-point-on-line/package.json +39 -73
- package/node_modules/@turf/boolean-within/package.json +46 -79
- package/node_modules/@turf/buffer/package.json +47 -84
- package/node_modules/@turf/center/package.json +42 -73
- package/node_modules/@turf/center-mean/package.json +45 -78
- package/node_modules/@turf/center-median/package.json +45 -76
- package/node_modules/@turf/center-of-mass/package.json +40 -68
- package/node_modules/@turf/centroid/package.json +40 -74
- package/node_modules/@turf/circle/package.json +41 -71
- package/node_modules/@turf/clean-coords/package.json +40 -75
- package/node_modules/@turf/clone/package.json +36 -81
- package/node_modules/@turf/clusters/package.json +39 -70
- package/node_modules/@turf/clusters-dbscan/package.json +51 -88
- package/node_modules/@turf/clusters-kmeans/package.json +53 -90
- package/node_modules/@turf/collect/package.json +42 -73
- package/node_modules/@turf/combine/package.json +37 -65
- package/node_modules/@turf/concave/package.json +56 -111
- package/node_modules/@turf/convex/package.json +39 -68
- package/node_modules/@turf/destination/package.json +41 -75
- package/node_modules/@turf/difference/package.json +35 -63
- package/node_modules/@turf/dissolve/package.json +38 -66
- package/node_modules/@turf/distance/package.json +38 -83
- package/node_modules/@turf/distance-weight/package.json +40 -72
- package/node_modules/@turf/ellipse/package.json +43 -75
- package/node_modules/@turf/envelope/package.json +36 -65
- package/node_modules/@turf/explode/package.json +36 -67
- package/node_modules/@turf/flatten/package.json +39 -73
- package/node_modules/@turf/flip/package.json +36 -64
- package/node_modules/@turf/great-circle/package.json +41 -78
- package/node_modules/@turf/helpers/package.json +38 -184
- package/node_modules/@turf/hex-grid/package.json +50 -97
- package/node_modules/@turf/interpolate/package.json +47 -78
- package/node_modules/@turf/intersect/package.json +39 -69
- package/node_modules/@turf/invariant/package.json +36 -126
- package/node_modules/@turf/isobands/package.json +52 -83
- package/node_modules/@turf/isolines/package.json +48 -79
- package/node_modules/@turf/kinks/package.json +35 -63
- package/node_modules/@turf/length/package.json +43 -78
- package/node_modules/@turf/line-arc/package.json +36 -65
- package/node_modules/@turf/line-chunk/package.json +44 -84
- package/node_modules/@turf/line-intersect/package.json +46 -85
- package/node_modules/@turf/line-offset/package.json +41 -78
- package/node_modules/@turf/line-overlap/package.json +48 -80
- package/node_modules/@turf/line-segment/package.json +38 -70
- package/node_modules/@turf/line-slice/package.json +39 -67
- package/node_modules/@turf/line-slice-along/package.json +36 -65
- package/node_modules/@turf/line-split/package.json +46 -77
- package/node_modules/@turf/line-to-polygon/package.json +43 -74
- package/node_modules/@turf/mask/package.json +35 -63
- package/node_modules/@turf/meta/package.json +39 -128
- package/node_modules/@turf/midpoint/package.json +36 -64
- package/node_modules/@turf/moran-index/package.json +39 -70
- package/node_modules/@turf/nearest-point/package.json +39 -69
- package/node_modules/@turf/nearest-point-on-line/package.json +40 -71
- package/node_modules/@turf/nearest-point-to-line/package.json +47 -78
- package/node_modules/@turf/planepoint/package.json +34 -62
- package/node_modules/@turf/point-grid/package.json +45 -80
- package/node_modules/@turf/point-on-feature/package.json +40 -68
- package/node_modules/@turf/point-to-line-distance/package.json +46 -78
- package/node_modules/@turf/points-within-polygon/package.json +35 -64
- package/node_modules/@turf/polygon-smooth/package.json +37 -68
- package/node_modules/@turf/polygon-tangents/package.json +43 -77
- package/node_modules/@turf/polygon-to-line/package.json +39 -69
- package/node_modules/@turf/polygonize/package.json +43 -77
- package/node_modules/@turf/projection/package.json +44 -77
- package/node_modules/@turf/random/package.json +34 -62
- package/node_modules/@turf/rectangle-grid/package.json +43 -77
- package/node_modules/@turf/rewind/package.json +43 -83
- package/node_modules/@turf/rhumb-bearing/package.json +43 -85
- package/node_modules/@turf/rhumb-destination/package.json +44 -85
- package/node_modules/@turf/rhumb-distance/package.json +44 -84
- package/node_modules/@turf/sample/package.json +32 -60
- package/node_modules/@turf/sector/package.json +37 -65
- package/node_modules/@turf/shortest-path/package.json +45 -79
- package/node_modules/@turf/simplify/package.json +43 -77
- package/node_modules/@turf/square/package.json +33 -62
- package/node_modules/@turf/square-grid/package.json +40 -69
- package/node_modules/@turf/standard-deviational-ellipse/package.json +43 -74
- package/node_modules/@turf/tag/package.json +38 -66
- package/node_modules/@turf/tesselate/package.json +40 -80
- package/node_modules/@turf/tin/package.json +34 -63
- package/node_modules/@turf/transform-rotate/package.json +45 -80
- package/node_modules/@turf/transform-scale/package.json +51 -86
- package/node_modules/@turf/transform-translate/package.json +44 -78
- package/node_modules/@turf/triangle-grid/package.json +42 -71
- package/node_modules/@turf/truncate/package.json +40 -72
- package/node_modules/@turf/turf/package.json +74 -102
- package/node_modules/@turf/union/package.json +39 -67
- package/node_modules/@turf/unkink-polygon/package.json +40 -68
- package/node_modules/@turf/voronoi/package.json +43 -83
- package/node_modules/@types/geojson/package.json +42 -66
- package/node_modules/adm-zip/LICENSE +21 -21
- package/node_modules/adm-zip/adm-zip.js +25 -22
- package/node_modules/adm-zip/headers/mainHeader.js +2 -1
- package/node_modules/adm-zip/package.json +28 -57
- package/node_modules/adm-zip/util/utils.js +1 -0
- package/node_modules/asynckit/package.json +40 -68
- package/node_modules/axios/CHANGELOG.md +473 -837
- package/node_modules/axios/LICENSE +4 -16
- package/node_modules/axios/MIGRATION_GUIDE.md +3 -0
- package/node_modules/axios/README.md +518 -114
- package/node_modules/axios/SECURITY.md +4 -3
- package/node_modules/axios/dist/axios.js +2759 -2070
- package/node_modules/axios/dist/axios.js.map +1 -0
- package/node_modules/axios/dist/axios.min.js +2 -2
- package/node_modules/axios/dist/axios.min.js.map +1 -0
- package/node_modules/axios/dist/browser/axios.cjs +3210 -0
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -0
- package/node_modules/axios/dist/esm/axios.js +3232 -0
- package/node_modules/axios/dist/esm/axios.js.map +1 -0
- package/node_modules/axios/dist/esm/axios.min.js +2 -0
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -0
- package/node_modules/axios/dist/node/axios.cjs +4237 -0
- package/node_modules/axios/dist/node/axios.cjs.map +1 -0
- package/node_modules/axios/index.d.cts +532 -0
- package/node_modules/axios/index.d.ts +398 -72
- package/node_modules/axios/index.js +41 -1
- package/node_modules/axios/lib/adapters/adapters.js +59 -0
- package/node_modules/axios/lib/adapters/http.js +479 -217
- package/node_modules/axios/lib/adapters/xhr.js +95 -54
- package/node_modules/axios/lib/axios.js +49 -20
- package/node_modules/axios/lib/cancel/CancelToken.js +91 -89
- package/node_modules/axios/lib/cancel/CanceledError.js +25 -0
- package/node_modules/axios/lib/cancel/isCancel.js +2 -2
- package/node_modules/axios/lib/core/Axios.js +155 -100
- package/node_modules/axios/lib/core/AxiosError.js +100 -0
- package/node_modules/axios/lib/core/AxiosHeaders.js +288 -0
- package/node_modules/axios/lib/core/InterceptorManager.js +62 -45
- package/node_modules/axios/lib/core/buildFullPath.js +5 -4
- package/node_modules/axios/lib/core/dispatchRequest.js +27 -33
- package/node_modules/axios/lib/core/mergeConfig.js +58 -52
- package/node_modules/axios/lib/core/settle.js +8 -6
- package/node_modules/axios/lib/core/transformData.js +15 -9
- package/node_modules/axios/lib/defaults/index.js +76 -41
- package/node_modules/axios/lib/defaults/transitional.js +1 -1
- package/node_modules/axios/lib/env/classes/FormData.js +2 -0
- package/node_modules/axios/lib/env/data.js +1 -3
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +191 -0
- package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +58 -0
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
- package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +28 -0
- package/node_modules/axios/lib/helpers/bind.js +3 -7
- package/node_modules/axios/lib/helpers/buildURL.js +26 -33
- package/node_modules/axios/lib/helpers/callbackify.js +16 -0
- package/node_modules/axios/lib/helpers/combineURLs.js +3 -2
- package/node_modules/axios/lib/helpers/cookies.js +43 -44
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +4 -2
- package/node_modules/axios/lib/helpers/formDataToJSON.js +92 -0
- package/node_modules/axios/lib/helpers/formDataToStream.js +111 -0
- package/node_modules/axios/lib/helpers/fromDataURI.js +53 -0
- package/node_modules/axios/lib/helpers/isAbsoluteURL.js +3 -2
- package/node_modules/axios/lib/helpers/isAxiosError.js +4 -3
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +44 -45
- package/node_modules/axios/lib/helpers/null.js +2 -0
- package/node_modules/axios/lib/helpers/parseHeaders.js +24 -22
- package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
- package/node_modules/axios/lib/helpers/readBlob.js +15 -0
- package/node_modules/axios/lib/helpers/speedometer.js +55 -0
- package/node_modules/axios/lib/helpers/spread.js +3 -2
- package/node_modules/axios/lib/helpers/throttle.js +33 -0
- package/node_modules/axios/lib/helpers/toFormData.js +203 -39
- package/node_modules/axios/lib/helpers/toURLEncodedForm.js +18 -0
- package/node_modules/axios/lib/helpers/validator.js +27 -18
- package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
- package/node_modules/axios/lib/platform/browser/index.js +64 -0
- package/node_modules/axios/lib/platform/index.js +3 -0
- package/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
- package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
- package/node_modules/axios/lib/platform/node/index.js +12 -0
- package/node_modules/axios/lib/utils.js +517 -144
- package/node_modules/axios/package.json +194 -93
- package/node_modules/call-bind/package.json +78 -109
- package/node_modules/combined-stream/package.json +14 -46
- package/node_modules/commander/package.json +20 -53
- package/node_modules/concaveman/node_modules/quickselect/package.json +43 -0
- package/node_modules/{@turf/collect → concaveman}/node_modules/rbush/README.md +22 -95
- package/node_modules/{@turf/unkink-polygon → concaveman}/node_modules/rbush/index.js +131 -181
- package/node_modules/concaveman/node_modules/rbush/package.json +56 -0
- package/node_modules/concaveman/node_modules/rbush/rbush.js +574 -0
- package/node_modules/concaveman/node_modules/rbush/rbush.min.js +1 -0
- package/node_modules/concaveman/package.json +15 -46
- package/node_modules/d3-array/package.json +19 -47
- package/node_modules/d3-geo/package.json +24 -52
- package/node_modules/d3-voronoi/package.json +19 -47
- package/node_modules/deep-equal/package.json +34 -64
- package/node_modules/define-properties/.eslintrc +10 -3
- package/node_modules/define-properties/.github/FUNDING.yml +12 -0
- package/node_modules/define-properties/.nycrc +9 -0
- package/node_modules/define-properties/CHANGELOG.md +39 -0
- package/node_modules/define-properties/README.md +11 -13
- package/node_modules/define-properties/index.js +12 -17
- package/node_modules/define-properties/package.json +85 -95
- package/node_modules/delayed-stream/package.json +14 -49
- package/node_modules/density-clustering/package.json +46 -70
- package/node_modules/earcut/README.md +12 -3
- package/node_modules/earcut/dist/earcut.dev.js +47 -50
- package/node_modules/earcut/dist/earcut.min.js +1 -1
- package/node_modules/earcut/package.json +26 -60
- package/node_modules/earcut/src/earcut.js +46 -49
- package/node_modules/follow-redirects/README.md +8 -1
- package/node_modules/follow-redirects/index.js +83 -36
- package/node_modules/follow-redirects/package.json +38 -74
- package/node_modules/form-data/package.json +37 -70
- package/node_modules/function-bind/package.json +23 -56
- package/node_modules/functions-have-names/.editorconfig +20 -0
- package/node_modules/functions-have-names/.eslintrc +19 -0
- package/node_modules/functions-have-names/.github/FUNDING.yml +12 -0
- package/node_modules/functions-have-names/.nycrc +9 -0
- package/node_modules/functions-have-names/CHANGELOG.md +89 -0
- package/node_modules/functions-have-names/LICENSE +21 -0
- package/node_modules/functions-have-names/README.md +40 -0
- package/node_modules/functions-have-names/index.js +31 -0
- package/node_modules/functions-have-names/package.json +55 -0
- package/node_modules/functions-have-names/test/index.js +65 -0
- package/node_modules/geojson-equality/package.json +23 -55
- package/node_modules/geojson-rbush/node_modules/quickselect/package.json +43 -0
- package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/rbush/README.md +22 -95
- package/node_modules/{@turf/collect → geojson-rbush}/node_modules/rbush/index.js +131 -181
- package/node_modules/geojson-rbush/node_modules/rbush/package.json +56 -0
- package/node_modules/geojson-rbush/node_modules/rbush/rbush.js +574 -0
- package/node_modules/geojson-rbush/node_modules/rbush/rbush.min.js +1 -0
- package/node_modules/geojson-rbush/package.json +32 -71
- package/node_modules/get-intrinsic/.eslintrc +3 -8
- package/node_modules/get-intrinsic/.nycrc +0 -4
- package/node_modules/get-intrinsic/CHANGELOG.md +53 -0
- package/node_modules/get-intrinsic/README.md +7 -1
- package/node_modules/get-intrinsic/index.js +29 -8
- package/node_modules/get-intrinsic/package.json +91 -104
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +26 -12
- package/node_modules/has/package.json +21 -46
- package/node_modules/has-property-descriptors/.eslintrc +13 -0
- package/node_modules/has-property-descriptors/.github/FUNDING.yml +12 -0
- package/node_modules/has-property-descriptors/.nycrc +9 -0
- package/node_modules/has-property-descriptors/CHANGELOG.md +16 -0
- package/node_modules/has-property-descriptors/LICENSE +21 -0
- package/node_modules/has-property-descriptors/README.md +43 -0
- package/node_modules/has-property-descriptors/index.js +33 -0
- package/node_modules/has-property-descriptors/package.json +70 -0
- package/node_modules/has-property-descriptors/test/index.js +57 -0
- package/node_modules/has-proto/.eslintrc +5 -0
- package/node_modules/has-proto/.github/FUNDING.yml +12 -0
- package/node_modules/has-proto/CHANGELOG.md +23 -0
- package/node_modules/has-proto/LICENSE +21 -0
- package/node_modules/has-proto/README.md +38 -0
- package/node_modules/has-proto/index.js +11 -0
- package/node_modules/has-proto/package.json +74 -0
- package/node_modules/has-proto/test/index.js +19 -0
- package/node_modules/has-symbols/package.json +99 -125
- package/node_modules/has-tostringtag/package.json +82 -109
- package/node_modules/is-arguments/package.json +89 -114
- package/node_modules/is-date-object/package.json +77 -108
- package/node_modules/is-regex/package.json +84 -112
- package/node_modules/mime-db/HISTORY.md +8 -0
- package/node_modules/mime-db/LICENSE +19 -18
- package/node_modules/mime-db/README.md +1 -1
- package/node_modules/mime-db/db.json +54 -6
- package/node_modules/mime-db/index.js +1 -0
- package/node_modules/mime-db/package.json +24 -66
- package/node_modules/mime-types/HISTORY.md +9 -0
- package/node_modules/mime-types/README.md +1 -1
- package/node_modules/mime-types/package.json +19 -62
- package/node_modules/object-assign/package.json +15 -49
- package/node_modules/object-is/package.json +85 -112
- package/node_modules/object-keys/package.json +86 -116
- package/node_modules/point-in-polygon/package.json +19 -48
- package/node_modules/polygon-clipping/package.json +41 -80
- package/node_modules/proxy-from-env/.eslintrc +29 -0
- package/node_modules/proxy-from-env/.travis.yml +10 -0
- package/node_modules/proxy-from-env/LICENSE +20 -0
- package/node_modules/proxy-from-env/README.md +131 -0
- package/node_modules/proxy-from-env/index.js +108 -0
- package/node_modules/proxy-from-env/package.json +34 -0
- package/node_modules/proxy-from-env/test.js +483 -0
- package/node_modules/quickselect/package.json +13 -41
- package/node_modules/rbush/README.md +95 -22
- package/node_modules/rbush/index.js +181 -131
- package/node_modules/rbush/package.json +39 -71
- package/node_modules/rbush/rbush.js +412 -360
- package/node_modules/rbush/rbush.min.js +1 -1
- package/node_modules/regexp.prototype.flags/.eslintrc +1 -0
- package/node_modules/regexp.prototype.flags/CHANGELOG.md +19 -0
- package/node_modules/regexp.prototype.flags/implementation.js +9 -0
- package/node_modules/regexp.prototype.flags/package.json +98 -122
- package/node_modules/regexp.prototype.flags/test/shimmed.js +2 -1
- package/node_modules/regexp.prototype.flags/test/tests.js +7 -5
- package/node_modules/robust-predicates/package.json +25 -52
- package/node_modules/skmeans/package.json +18 -53
- package/node_modules/splaytree/Readme.md +58 -57
- package/node_modules/splaytree/dist/splay.esm.js +21 -8
- package/node_modules/splaytree/dist/splay.esm.js.map +1 -1
- package/node_modules/splaytree/dist/splay.js +21 -8
- package/node_modules/splaytree/dist/splay.js.map +1 -1
- package/node_modules/splaytree/package.json +36 -68
- package/node_modules/splaytree/src/index.ts +16 -4
- package/node_modules/tinyqueue/package.json +34 -59
- package/node_modules/topojson-client/package.json +28 -56
- package/node_modules/topojson-server/package.json +27 -55
- package/node_modules/turf-jsts/package.json +33 -68
- package/node_modules/uuid/CHANGELOG.md +39 -0
- package/node_modules/uuid/README.md +30 -73
- package/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
- package/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
- package/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
- package/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
- package/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
- package/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
- package/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
- package/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
- package/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
- package/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
- package/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
- package/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
- package/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
- package/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
- package/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
- package/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +23 -23
- package/node_modules/uuid/dist/esm-browser/native.js +4 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +2 -2
- package/node_modules/uuid/dist/esm-browser/rng.js +4 -5
- package/node_modules/uuid/dist/esm-browser/sha1.js +26 -26
- package/node_modules/uuid/dist/esm-browser/stringify.js +9 -6
- package/node_modules/uuid/dist/esm-browser/v1.js +17 -17
- package/node_modules/uuid/dist/esm-browser/v3.js +1 -1
- package/node_modules/uuid/dist/esm-browser/v35.js +12 -10
- package/node_modules/uuid/dist/esm-browser/v4.js +9 -4
- package/node_modules/uuid/dist/esm-browser/v5.js +1 -1
- package/node_modules/uuid/dist/esm-browser/version.js +1 -1
- package/node_modules/uuid/dist/esm-node/native.js +4 -0
- package/node_modules/uuid/dist/esm-node/stringify.js +7 -3
- package/node_modules/uuid/dist/esm-node/v1.js +2 -2
- package/node_modules/uuid/dist/esm-node/v35.js +6 -4
- package/node_modules/uuid/dist/esm-node/v4.js +7 -2
- package/node_modules/uuid/dist/esm-node/version.js +1 -1
- package/node_modules/uuid/dist/index.js +18 -18
- package/node_modules/uuid/dist/native-browser.js +11 -0
- package/node_modules/uuid/dist/native.js +15 -0
- package/node_modules/uuid/dist/rng-browser.js +2 -3
- package/node_modules/uuid/dist/stringify.js +8 -3
- package/node_modules/uuid/dist/v1.js +2 -2
- package/node_modules/uuid/dist/v35.js +7 -5
- package/node_modules/uuid/dist/v4.js +8 -2
- package/node_modules/uuid/dist/version.js +1 -1
- package/node_modules/uuid/package.json +87 -120
- package/package.json +12 -8
- package/tak-ingest.html +40 -0
- package/tak-ingest.js +48 -0
- package/tak-registration.html +13 -2
- package/tak-registration.js +55 -7
- package/node_modules/@turf/collect/node_modules/quickselect/package.json +0 -69
- package/node_modules/@turf/collect/node_modules/rbush/package.json +0 -85
- package/node_modules/@turf/collect/node_modules/rbush/rbush.js +0 -626
- package/node_modules/@turf/collect/node_modules/rbush/rbush.min.js +0 -1
- package/node_modules/@turf/unkink-polygon/node_modules/quickselect/package.json +0 -69
- package/node_modules/@turf/unkink-polygon/node_modules/rbush/package.json +0 -85
- package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.js +0 -626
- package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.min.js +0 -1
- package/node_modules/axios/UPGRADE_GUIDE.md +0 -168
- package/node_modules/axios/dist/axios.map +0 -1
- package/node_modules/axios/dist/axios.min.map +0 -1
- package/node_modules/axios/lib/cancel/Cancel.js +0 -19
- package/node_modules/axios/lib/core/createError.js +0 -18
- package/node_modules/axios/lib/core/enhanceError.js +0 -43
- package/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
- package/node_modules/axios/tsconfig.json +0 -14
- package/node_modules/axios/tslint.json +0 -6
- package/node_modules/combined-stream/yarn.lock +0 -17
- package/node_modules/d3-array/yarn.lock +0 -939
- package/node_modules/define-properties/.jscs.json +0 -175
- package/node_modules/define-properties/.travis.yml +0 -233
- package/node_modules/define-properties/test/index.js +0 -125
- package/node_modules/get-intrinsic/.eslintignore +0 -1
- package/node_modules/uuid/dist/umd/uuid.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
- /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/LICENSE +0 -0
- /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/README.md +0 -0
- /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/index.js +0 -0
- /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/quickselect.js +0 -0
- /package/node_modules/{@turf/collect → concaveman}/node_modules/rbush/LICENSE +0 -0
- /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/LICENSE +0 -0
- /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/README.md +0 -0
- /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/index.js +0 -0
- /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/quickselect.js +0 -0
- /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/rbush/LICENSE +0 -0
|
@@ -1,70 +1,73 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import bind from './helpers/bind.js';
|
|
4
4
|
|
|
5
5
|
// utils is a library of generic helper functions non-specific to axios
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const {toString} = Object.prototype;
|
|
8
|
+
const {getPrototypeOf} = Object;
|
|
9
|
+
|
|
10
|
+
const kindOf = (cache => thing => {
|
|
11
|
+
const str = toString.call(thing);
|
|
12
|
+
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
13
|
+
})(Object.create(null));
|
|
14
|
+
|
|
15
|
+
const kindOfTest = (type) => {
|
|
16
|
+
type = type.toLowerCase();
|
|
17
|
+
return (thing) => kindOf(thing) === type
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const typeOfTest = type => thing => typeof thing === type;
|
|
8
21
|
|
|
9
22
|
/**
|
|
10
23
|
* Determine if a value is an Array
|
|
11
24
|
*
|
|
12
25
|
* @param {Object} val The value to test
|
|
26
|
+
*
|
|
13
27
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
14
28
|
*/
|
|
15
|
-
|
|
16
|
-
return Array.isArray(val);
|
|
17
|
-
}
|
|
29
|
+
const {isArray} = Array;
|
|
18
30
|
|
|
19
31
|
/**
|
|
20
32
|
* Determine if a value is undefined
|
|
21
33
|
*
|
|
22
|
-
* @param {
|
|
34
|
+
* @param {*} val The value to test
|
|
35
|
+
*
|
|
23
36
|
* @returns {boolean} True if the value is undefined, otherwise false
|
|
24
37
|
*/
|
|
25
|
-
|
|
26
|
-
return typeof val === 'undefined';
|
|
27
|
-
}
|
|
38
|
+
const isUndefined = typeOfTest('undefined');
|
|
28
39
|
|
|
29
40
|
/**
|
|
30
41
|
* Determine if a value is a Buffer
|
|
31
42
|
*
|
|
32
|
-
* @param {
|
|
43
|
+
* @param {*} val The value to test
|
|
44
|
+
*
|
|
33
45
|
* @returns {boolean} True if value is a Buffer, otherwise false
|
|
34
46
|
*/
|
|
35
47
|
function isBuffer(val) {
|
|
36
48
|
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
|
37
|
-
&&
|
|
49
|
+
&& isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
38
50
|
}
|
|
39
51
|
|
|
40
52
|
/**
|
|
41
53
|
* Determine if a value is an ArrayBuffer
|
|
42
54
|
*
|
|
43
|
-
* @param {
|
|
55
|
+
* @param {*} val The value to test
|
|
56
|
+
*
|
|
44
57
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
45
58
|
*/
|
|
46
|
-
|
|
47
|
-
return toString.call(val) === '[object ArrayBuffer]';
|
|
48
|
-
}
|
|
59
|
+
const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
49
60
|
|
|
50
|
-
/**
|
|
51
|
-
* Determine if a value is a FormData
|
|
52
|
-
*
|
|
53
|
-
* @param {Object} val The value to test
|
|
54
|
-
* @returns {boolean} True if value is an FormData, otherwise false
|
|
55
|
-
*/
|
|
56
|
-
function isFormData(val) {
|
|
57
|
-
return toString.call(val) === '[object FormData]';
|
|
58
|
-
}
|
|
59
61
|
|
|
60
62
|
/**
|
|
61
63
|
* Determine if a value is a view on an ArrayBuffer
|
|
62
64
|
*
|
|
63
|
-
* @param {
|
|
65
|
+
* @param {*} val The value to test
|
|
66
|
+
*
|
|
64
67
|
* @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
|
|
65
68
|
*/
|
|
66
69
|
function isArrayBufferView(val) {
|
|
67
|
-
|
|
70
|
+
let result;
|
|
68
71
|
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
|
69
72
|
result = ArrayBuffer.isView(val);
|
|
70
73
|
} else {
|
|
@@ -76,144 +79,145 @@ function isArrayBufferView(val) {
|
|
|
76
79
|
/**
|
|
77
80
|
* Determine if a value is a String
|
|
78
81
|
*
|
|
79
|
-
* @param {
|
|
82
|
+
* @param {*} val The value to test
|
|
83
|
+
*
|
|
80
84
|
* @returns {boolean} True if value is a String, otherwise false
|
|
81
85
|
*/
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
const isString = typeOfTest('string');
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Determine if a value is a Function
|
|
90
|
+
*
|
|
91
|
+
* @param {*} val The value to test
|
|
92
|
+
* @returns {boolean} True if value is a Function, otherwise false
|
|
93
|
+
*/
|
|
94
|
+
const isFunction = typeOfTest('function');
|
|
85
95
|
|
|
86
96
|
/**
|
|
87
97
|
* Determine if a value is a Number
|
|
88
98
|
*
|
|
89
|
-
* @param {
|
|
99
|
+
* @param {*} val The value to test
|
|
100
|
+
*
|
|
90
101
|
* @returns {boolean} True if value is a Number, otherwise false
|
|
91
102
|
*/
|
|
92
|
-
|
|
93
|
-
return typeof val === 'number';
|
|
94
|
-
}
|
|
103
|
+
const isNumber = typeOfTest('number');
|
|
95
104
|
|
|
96
105
|
/**
|
|
97
106
|
* Determine if a value is an Object
|
|
98
107
|
*
|
|
99
|
-
* @param {
|
|
108
|
+
* @param {*} thing The value to test
|
|
109
|
+
*
|
|
100
110
|
* @returns {boolean} True if value is an Object, otherwise false
|
|
101
111
|
*/
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
112
|
+
const isObject = (thing) => thing !== null && typeof thing === 'object';
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Determine if a value is a Boolean
|
|
116
|
+
*
|
|
117
|
+
* @param {*} thing The value to test
|
|
118
|
+
* @returns {boolean} True if value is a Boolean, otherwise false
|
|
119
|
+
*/
|
|
120
|
+
const isBoolean = thing => thing === true || thing === false;
|
|
105
121
|
|
|
106
122
|
/**
|
|
107
123
|
* Determine if a value is a plain Object
|
|
108
124
|
*
|
|
109
|
-
* @param {
|
|
110
|
-
*
|
|
125
|
+
* @param {*} val The value to test
|
|
126
|
+
*
|
|
127
|
+
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
111
128
|
*/
|
|
112
|
-
|
|
113
|
-
if (
|
|
129
|
+
const isPlainObject = (val) => {
|
|
130
|
+
if (kindOf(val) !== 'object') {
|
|
114
131
|
return false;
|
|
115
132
|
}
|
|
116
133
|
|
|
117
|
-
|
|
118
|
-
return prototype === null || prototype === Object.prototype;
|
|
134
|
+
const prototype = getPrototypeOf(val);
|
|
135
|
+
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
|
119
136
|
}
|
|
120
137
|
|
|
121
138
|
/**
|
|
122
139
|
* Determine if a value is a Date
|
|
123
140
|
*
|
|
124
|
-
* @param {
|
|
141
|
+
* @param {*} val The value to test
|
|
142
|
+
*
|
|
125
143
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
126
144
|
*/
|
|
127
|
-
|
|
128
|
-
return toString.call(val) === '[object Date]';
|
|
129
|
-
}
|
|
145
|
+
const isDate = kindOfTest('Date');
|
|
130
146
|
|
|
131
147
|
/**
|
|
132
148
|
* Determine if a value is a File
|
|
133
149
|
*
|
|
134
|
-
* @param {
|
|
150
|
+
* @param {*} val The value to test
|
|
151
|
+
*
|
|
135
152
|
* @returns {boolean} True if value is a File, otherwise false
|
|
136
153
|
*/
|
|
137
|
-
|
|
138
|
-
return toString.call(val) === '[object File]';
|
|
139
|
-
}
|
|
154
|
+
const isFile = kindOfTest('File');
|
|
140
155
|
|
|
141
156
|
/**
|
|
142
157
|
* Determine if a value is a Blob
|
|
143
158
|
*
|
|
144
|
-
* @param {
|
|
159
|
+
* @param {*} val The value to test
|
|
160
|
+
*
|
|
145
161
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
146
162
|
*/
|
|
147
|
-
|
|
148
|
-
return toString.call(val) === '[object Blob]';
|
|
149
|
-
}
|
|
163
|
+
const isBlob = kindOfTest('Blob');
|
|
150
164
|
|
|
151
165
|
/**
|
|
152
|
-
* Determine if a value is a
|
|
166
|
+
* Determine if a value is a FileList
|
|
153
167
|
*
|
|
154
|
-
* @param {
|
|
155
|
-
*
|
|
168
|
+
* @param {*} val The value to test
|
|
169
|
+
*
|
|
170
|
+
* @returns {boolean} True if value is a File, otherwise false
|
|
156
171
|
*/
|
|
157
|
-
|
|
158
|
-
return toString.call(val) === '[object Function]';
|
|
159
|
-
}
|
|
172
|
+
const isFileList = kindOfTest('FileList');
|
|
160
173
|
|
|
161
174
|
/**
|
|
162
175
|
* Determine if a value is a Stream
|
|
163
176
|
*
|
|
164
|
-
* @param {
|
|
177
|
+
* @param {*} val The value to test
|
|
178
|
+
*
|
|
165
179
|
* @returns {boolean} True if value is a Stream, otherwise false
|
|
166
180
|
*/
|
|
167
|
-
|
|
168
|
-
return isObject(val) && isFunction(val.pipe);
|
|
169
|
-
}
|
|
181
|
+
const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
170
182
|
|
|
171
183
|
/**
|
|
172
|
-
* Determine if a value is a
|
|
184
|
+
* Determine if a value is a FormData
|
|
173
185
|
*
|
|
174
|
-
* @param {
|
|
175
|
-
*
|
|
186
|
+
* @param {*} thing The value to test
|
|
187
|
+
*
|
|
188
|
+
* @returns {boolean} True if value is an FormData, otherwise false
|
|
176
189
|
*/
|
|
177
|
-
|
|
178
|
-
|
|
190
|
+
const isFormData = (thing) => {
|
|
191
|
+
let kind;
|
|
192
|
+
return thing && (
|
|
193
|
+
(typeof FormData === 'function' && thing instanceof FormData) || (
|
|
194
|
+
isFunction(thing.append) && (
|
|
195
|
+
(kind = kindOf(thing)) === 'formdata' ||
|
|
196
|
+
// detect form-data instance
|
|
197
|
+
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
|
198
|
+
)
|
|
199
|
+
)
|
|
200
|
+
)
|
|
179
201
|
}
|
|
180
202
|
|
|
181
203
|
/**
|
|
182
|
-
*
|
|
204
|
+
* Determine if a value is a URLSearchParams object
|
|
183
205
|
*
|
|
184
|
-
* @param {
|
|
185
|
-
*
|
|
206
|
+
* @param {*} val The value to test
|
|
207
|
+
*
|
|
208
|
+
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
186
209
|
*/
|
|
187
|
-
|
|
188
|
-
return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
|
|
189
|
-
}
|
|
210
|
+
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
190
211
|
|
|
191
212
|
/**
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
* This allows axios to run in a web worker, and react-native.
|
|
195
|
-
* Both environments support XMLHttpRequest, but not fully standard globals.
|
|
213
|
+
* Trim excess whitespace off the beginning and end of a string
|
|
196
214
|
*
|
|
197
|
-
*
|
|
198
|
-
* typeof window -> undefined
|
|
199
|
-
* typeof document -> undefined
|
|
215
|
+
* @param {String} str The String to trim
|
|
200
216
|
*
|
|
201
|
-
*
|
|
202
|
-
* navigator.product -> 'ReactNative'
|
|
203
|
-
* nativescript
|
|
204
|
-
* navigator.product -> 'NativeScript' or 'NS'
|
|
217
|
+
* @returns {String} The String freed of excess whitespace
|
|
205
218
|
*/
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
navigator.product === 'NativeScript' ||
|
|
209
|
-
navigator.product === 'NS')) {
|
|
210
|
-
return false;
|
|
211
|
-
}
|
|
212
|
-
return (
|
|
213
|
-
typeof window !== 'undefined' &&
|
|
214
|
-
typeof document !== 'undefined'
|
|
215
|
-
);
|
|
216
|
-
}
|
|
219
|
+
const trim = (str) => str.trim ?
|
|
220
|
+
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
217
221
|
|
|
218
222
|
/**
|
|
219
223
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
@@ -226,13 +230,19 @@ function isStandardBrowserEnv() {
|
|
|
226
230
|
*
|
|
227
231
|
* @param {Object|Array} obj The object to iterate
|
|
228
232
|
* @param {Function} fn The callback to invoke for each item
|
|
233
|
+
*
|
|
234
|
+
* @param {Boolean} [allOwnKeys = false]
|
|
235
|
+
* @returns {any}
|
|
229
236
|
*/
|
|
230
|
-
function forEach(obj, fn) {
|
|
237
|
+
function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
231
238
|
// Don't bother if no value provided
|
|
232
239
|
if (obj === null || typeof obj === 'undefined') {
|
|
233
240
|
return;
|
|
234
241
|
}
|
|
235
242
|
|
|
243
|
+
let i;
|
|
244
|
+
let l;
|
|
245
|
+
|
|
236
246
|
// Force an array if not already something iterable
|
|
237
247
|
if (typeof obj !== 'object') {
|
|
238
248
|
/*eslint no-param-reassign:0*/
|
|
@@ -241,19 +251,44 @@ function forEach(obj, fn) {
|
|
|
241
251
|
|
|
242
252
|
if (isArray(obj)) {
|
|
243
253
|
// Iterate over array values
|
|
244
|
-
for (
|
|
254
|
+
for (i = 0, l = obj.length; i < l; i++) {
|
|
245
255
|
fn.call(null, obj[i], i, obj);
|
|
246
256
|
}
|
|
247
257
|
} else {
|
|
248
258
|
// Iterate over object keys
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
259
|
+
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
260
|
+
const len = keys.length;
|
|
261
|
+
let key;
|
|
262
|
+
|
|
263
|
+
for (i = 0; i < len; i++) {
|
|
264
|
+
key = keys[i];
|
|
265
|
+
fn.call(null, obj[key], key, obj);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
function findKey(obj, key) {
|
|
271
|
+
key = key.toLowerCase();
|
|
272
|
+
const keys = Object.keys(obj);
|
|
273
|
+
let i = keys.length;
|
|
274
|
+
let _key;
|
|
275
|
+
while (i-- > 0) {
|
|
276
|
+
_key = keys[i];
|
|
277
|
+
if (key === _key.toLowerCase()) {
|
|
278
|
+
return _key;
|
|
253
279
|
}
|
|
254
280
|
}
|
|
281
|
+
return null;
|
|
255
282
|
}
|
|
256
283
|
|
|
284
|
+
const _global = (() => {
|
|
285
|
+
/*eslint no-undef:0*/
|
|
286
|
+
if (typeof globalThis !== "undefined") return globalThis;
|
|
287
|
+
return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
|
|
288
|
+
})();
|
|
289
|
+
|
|
290
|
+
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
291
|
+
|
|
257
292
|
/**
|
|
258
293
|
* Accepts varargs expecting each argument to be an object, then
|
|
259
294
|
* immutably merges the properties of each object and returns result.
|
|
@@ -269,24 +304,27 @@ function forEach(obj, fn) {
|
|
|
269
304
|
* ```
|
|
270
305
|
*
|
|
271
306
|
* @param {Object} obj1 Object to merge
|
|
307
|
+
*
|
|
272
308
|
* @returns {Object} Result of all merge properties
|
|
273
309
|
*/
|
|
274
310
|
function merge(/* obj1, obj2, obj3, ... */) {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
311
|
+
const {caseless} = isContextDefined(this) && this || {};
|
|
312
|
+
const result = {};
|
|
313
|
+
const assignValue = (val, key) => {
|
|
314
|
+
const targetKey = caseless && findKey(result, key) || key;
|
|
315
|
+
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
316
|
+
result[targetKey] = merge(result[targetKey], val);
|
|
279
317
|
} else if (isPlainObject(val)) {
|
|
280
|
-
result[
|
|
318
|
+
result[targetKey] = merge({}, val);
|
|
281
319
|
} else if (isArray(val)) {
|
|
282
|
-
result[
|
|
320
|
+
result[targetKey] = val.slice();
|
|
283
321
|
} else {
|
|
284
|
-
result[
|
|
322
|
+
result[targetKey] = val;
|
|
285
323
|
}
|
|
286
324
|
}
|
|
287
325
|
|
|
288
|
-
for (
|
|
289
|
-
forEach(arguments[i], assignValue);
|
|
326
|
+
for (let i = 0, l = arguments.length; i < l; i++) {
|
|
327
|
+
arguments[i] && forEach(arguments[i], assignValue);
|
|
290
328
|
}
|
|
291
329
|
return result;
|
|
292
330
|
}
|
|
@@ -297,16 +335,18 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
297
335
|
* @param {Object} a The object to be extended
|
|
298
336
|
* @param {Object} b The object to copy properties from
|
|
299
337
|
* @param {Object} thisArg The object to bind function to
|
|
300
|
-
*
|
|
338
|
+
*
|
|
339
|
+
* @param {Boolean} [allOwnKeys]
|
|
340
|
+
* @returns {Object} The resulting value of object a
|
|
301
341
|
*/
|
|
302
|
-
|
|
303
|
-
forEach(b,
|
|
304
|
-
if (thisArg &&
|
|
342
|
+
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
343
|
+
forEach(b, (val, key) => {
|
|
344
|
+
if (thisArg && isFunction(val)) {
|
|
305
345
|
a[key] = bind(val, thisArg);
|
|
306
346
|
} else {
|
|
307
347
|
a[key] = val;
|
|
308
348
|
}
|
|
309
|
-
});
|
|
349
|
+
}, {allOwnKeys});
|
|
310
350
|
return a;
|
|
311
351
|
}
|
|
312
352
|
|
|
@@ -314,36 +354,369 @@ function extend(a, b, thisArg) {
|
|
|
314
354
|
* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
|
|
315
355
|
*
|
|
316
356
|
* @param {string} content with BOM
|
|
317
|
-
*
|
|
357
|
+
*
|
|
358
|
+
* @returns {string} content value without BOM
|
|
318
359
|
*/
|
|
319
|
-
|
|
360
|
+
const stripBOM = (content) => {
|
|
320
361
|
if (content.charCodeAt(0) === 0xFEFF) {
|
|
321
362
|
content = content.slice(1);
|
|
322
363
|
}
|
|
323
364
|
return content;
|
|
324
365
|
}
|
|
325
366
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
367
|
+
/**
|
|
368
|
+
* Inherit the prototype methods from one constructor into another
|
|
369
|
+
* @param {function} constructor
|
|
370
|
+
* @param {function} superConstructor
|
|
371
|
+
* @param {object} [props]
|
|
372
|
+
* @param {object} [descriptors]
|
|
373
|
+
*
|
|
374
|
+
* @returns {void}
|
|
375
|
+
*/
|
|
376
|
+
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
377
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
378
|
+
constructor.prototype.constructor = constructor;
|
|
379
|
+
Object.defineProperty(constructor, 'super', {
|
|
380
|
+
value: superConstructor.prototype
|
|
381
|
+
});
|
|
382
|
+
props && Object.assign(constructor.prototype, props);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Resolve object with deep prototype chain to a flat object
|
|
387
|
+
* @param {Object} sourceObj source object
|
|
388
|
+
* @param {Object} [destObj]
|
|
389
|
+
* @param {Function|Boolean} [filter]
|
|
390
|
+
* @param {Function} [propFilter]
|
|
391
|
+
*
|
|
392
|
+
* @returns {Object}
|
|
393
|
+
*/
|
|
394
|
+
const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
|
|
395
|
+
let props;
|
|
396
|
+
let i;
|
|
397
|
+
let prop;
|
|
398
|
+
const merged = {};
|
|
399
|
+
|
|
400
|
+
destObj = destObj || {};
|
|
401
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
402
|
+
if (sourceObj == null) return destObj;
|
|
403
|
+
|
|
404
|
+
do {
|
|
405
|
+
props = Object.getOwnPropertyNames(sourceObj);
|
|
406
|
+
i = props.length;
|
|
407
|
+
while (i-- > 0) {
|
|
408
|
+
prop = props[i];
|
|
409
|
+
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
|
|
410
|
+
destObj[prop] = sourceObj[prop];
|
|
411
|
+
merged[prop] = true;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
sourceObj = filter !== false && getPrototypeOf(sourceObj);
|
|
415
|
+
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
416
|
+
|
|
417
|
+
return destObj;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Determines whether a string ends with the characters of a specified string
|
|
422
|
+
*
|
|
423
|
+
* @param {String} str
|
|
424
|
+
* @param {String} searchString
|
|
425
|
+
* @param {Number} [position= 0]
|
|
426
|
+
*
|
|
427
|
+
* @returns {boolean}
|
|
428
|
+
*/
|
|
429
|
+
const endsWith = (str, searchString, position) => {
|
|
430
|
+
str = String(str);
|
|
431
|
+
if (position === undefined || position > str.length) {
|
|
432
|
+
position = str.length;
|
|
433
|
+
}
|
|
434
|
+
position -= searchString.length;
|
|
435
|
+
const lastIndex = str.indexOf(searchString, position);
|
|
436
|
+
return lastIndex !== -1 && lastIndex === position;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Returns new array from array like object or null if failed
|
|
442
|
+
*
|
|
443
|
+
* @param {*} [thing]
|
|
444
|
+
*
|
|
445
|
+
* @returns {?Array}
|
|
446
|
+
*/
|
|
447
|
+
const toArray = (thing) => {
|
|
448
|
+
if (!thing) return null;
|
|
449
|
+
if (isArray(thing)) return thing;
|
|
450
|
+
let i = thing.length;
|
|
451
|
+
if (!isNumber(i)) return null;
|
|
452
|
+
const arr = new Array(i);
|
|
453
|
+
while (i-- > 0) {
|
|
454
|
+
arr[i] = thing[i];
|
|
455
|
+
}
|
|
456
|
+
return arr;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Checking if the Uint8Array exists and if it does, it returns a function that checks if the
|
|
461
|
+
* thing passed in is an instance of Uint8Array
|
|
462
|
+
*
|
|
463
|
+
* @param {TypedArray}
|
|
464
|
+
*
|
|
465
|
+
* @returns {Array}
|
|
466
|
+
*/
|
|
467
|
+
// eslint-disable-next-line func-names
|
|
468
|
+
const isTypedArray = (TypedArray => {
|
|
469
|
+
// eslint-disable-next-line func-names
|
|
470
|
+
return thing => {
|
|
471
|
+
return TypedArray && thing instanceof TypedArray;
|
|
472
|
+
};
|
|
473
|
+
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* For each entry in the object, call the function with the key and value.
|
|
477
|
+
*
|
|
478
|
+
* @param {Object<any, any>} obj - The object to iterate over.
|
|
479
|
+
* @param {Function} fn - The function to call for each entry.
|
|
480
|
+
*
|
|
481
|
+
* @returns {void}
|
|
482
|
+
*/
|
|
483
|
+
const forEachEntry = (obj, fn) => {
|
|
484
|
+
const generator = obj && obj[Symbol.iterator];
|
|
485
|
+
|
|
486
|
+
const iterator = generator.call(obj);
|
|
487
|
+
|
|
488
|
+
let result;
|
|
489
|
+
|
|
490
|
+
while ((result = iterator.next()) && !result.done) {
|
|
491
|
+
const pair = result.value;
|
|
492
|
+
fn.call(obj, pair[0], pair[1]);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* It takes a regular expression and a string, and returns an array of all the matches
|
|
498
|
+
*
|
|
499
|
+
* @param {string} regExp - The regular expression to match against.
|
|
500
|
+
* @param {string} str - The string to search.
|
|
501
|
+
*
|
|
502
|
+
* @returns {Array<boolean>}
|
|
503
|
+
*/
|
|
504
|
+
const matchAll = (regExp, str) => {
|
|
505
|
+
let matches;
|
|
506
|
+
const arr = [];
|
|
507
|
+
|
|
508
|
+
while ((matches = regExp.exec(str)) !== null) {
|
|
509
|
+
arr.push(matches);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
return arr;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
516
|
+
const isHTMLForm = kindOfTest('HTMLFormElement');
|
|
517
|
+
|
|
518
|
+
const toCamelCase = str => {
|
|
519
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
|
|
520
|
+
function replacer(m, p1, p2) {
|
|
521
|
+
return p1.toUpperCase() + p2;
|
|
522
|
+
}
|
|
523
|
+
);
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
/* Creating a function that will check if an object has a property. */
|
|
527
|
+
const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Determine if a value is a RegExp object
|
|
531
|
+
*
|
|
532
|
+
* @param {*} val The value to test
|
|
533
|
+
*
|
|
534
|
+
* @returns {boolean} True if value is a RegExp object, otherwise false
|
|
535
|
+
*/
|
|
536
|
+
const isRegExp = kindOfTest('RegExp');
|
|
537
|
+
|
|
538
|
+
const reduceDescriptors = (obj, reducer) => {
|
|
539
|
+
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
540
|
+
const reducedDescriptors = {};
|
|
541
|
+
|
|
542
|
+
forEach(descriptors, (descriptor, name) => {
|
|
543
|
+
if (reducer(descriptor, name, obj) !== false) {
|
|
544
|
+
reducedDescriptors[name] = descriptor;
|
|
545
|
+
}
|
|
546
|
+
});
|
|
547
|
+
|
|
548
|
+
Object.defineProperties(obj, reducedDescriptors);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Makes all methods read-only
|
|
553
|
+
* @param {Object} obj
|
|
554
|
+
*/
|
|
555
|
+
|
|
556
|
+
const freezeMethods = (obj) => {
|
|
557
|
+
reduceDescriptors(obj, (descriptor, name) => {
|
|
558
|
+
// skip restricted props in strict mode
|
|
559
|
+
if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
560
|
+
return false;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
const value = obj[name];
|
|
564
|
+
|
|
565
|
+
if (!isFunction(value)) return;
|
|
566
|
+
|
|
567
|
+
descriptor.enumerable = false;
|
|
568
|
+
|
|
569
|
+
if ('writable' in descriptor) {
|
|
570
|
+
descriptor.writable = false;
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
if (!descriptor.set) {
|
|
575
|
+
descriptor.set = () => {
|
|
576
|
+
throw Error('Can not rewrite read-only method \'' + name + '\'');
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
const toObjectSet = (arrayOrString, delimiter) => {
|
|
583
|
+
const obj = {};
|
|
584
|
+
|
|
585
|
+
const define = (arr) => {
|
|
586
|
+
arr.forEach(value => {
|
|
587
|
+
obj[value] = true;
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
592
|
+
|
|
593
|
+
return obj;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
const noop = () => {}
|
|
597
|
+
|
|
598
|
+
const toFiniteNumber = (value, defaultValue) => {
|
|
599
|
+
value = +value;
|
|
600
|
+
return Number.isFinite(value) ? value : defaultValue;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
const ALPHA = 'abcdefghijklmnopqrstuvwxyz'
|
|
604
|
+
|
|
605
|
+
const DIGIT = '0123456789';
|
|
606
|
+
|
|
607
|
+
const ALPHABET = {
|
|
608
|
+
DIGIT,
|
|
609
|
+
ALPHA,
|
|
610
|
+
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
614
|
+
let str = '';
|
|
615
|
+
const {length} = alphabet;
|
|
616
|
+
while (size--) {
|
|
617
|
+
str += alphabet[Math.random() * length|0]
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
return str;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* If the thing is a FormData object, return true, otherwise return false.
|
|
625
|
+
*
|
|
626
|
+
* @param {unknown} thing - The thing to check.
|
|
627
|
+
*
|
|
628
|
+
* @returns {boolean}
|
|
629
|
+
*/
|
|
630
|
+
function isSpecCompliantForm(thing) {
|
|
631
|
+
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
const toJSONObject = (obj) => {
|
|
635
|
+
const stack = new Array(10);
|
|
636
|
+
|
|
637
|
+
const visit = (source, i) => {
|
|
638
|
+
|
|
639
|
+
if (isObject(source)) {
|
|
640
|
+
if (stack.indexOf(source) >= 0) {
|
|
641
|
+
return;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
if(!('toJSON' in source)) {
|
|
645
|
+
stack[i] = source;
|
|
646
|
+
const target = isArray(source) ? [] : {};
|
|
647
|
+
|
|
648
|
+
forEach(source, (value, key) => {
|
|
649
|
+
const reducedValue = visit(value, i + 1);
|
|
650
|
+
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
651
|
+
});
|
|
652
|
+
|
|
653
|
+
stack[i] = undefined;
|
|
654
|
+
|
|
655
|
+
return target;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
return source;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
return visit(obj, 0);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
666
|
+
|
|
667
|
+
const isThenable = (thing) =>
|
|
668
|
+
thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
669
|
+
|
|
670
|
+
export default {
|
|
671
|
+
isArray,
|
|
672
|
+
isArrayBuffer,
|
|
673
|
+
isBuffer,
|
|
674
|
+
isFormData,
|
|
675
|
+
isArrayBufferView,
|
|
676
|
+
isString,
|
|
677
|
+
isNumber,
|
|
678
|
+
isBoolean,
|
|
679
|
+
isObject,
|
|
680
|
+
isPlainObject,
|
|
681
|
+
isUndefined,
|
|
682
|
+
isDate,
|
|
683
|
+
isFile,
|
|
684
|
+
isBlob,
|
|
685
|
+
isRegExp,
|
|
686
|
+
isFunction,
|
|
687
|
+
isStream,
|
|
688
|
+
isURLSearchParams,
|
|
689
|
+
isTypedArray,
|
|
690
|
+
isFileList,
|
|
691
|
+
forEach,
|
|
692
|
+
merge,
|
|
693
|
+
extend,
|
|
694
|
+
trim,
|
|
695
|
+
stripBOM,
|
|
696
|
+
inherits,
|
|
697
|
+
toFlatObject,
|
|
698
|
+
kindOf,
|
|
699
|
+
kindOfTest,
|
|
700
|
+
endsWith,
|
|
701
|
+
toArray,
|
|
702
|
+
forEachEntry,
|
|
703
|
+
matchAll,
|
|
704
|
+
isHTMLForm,
|
|
705
|
+
hasOwnProperty,
|
|
706
|
+
hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
|
|
707
|
+
reduceDescriptors,
|
|
708
|
+
freezeMethods,
|
|
709
|
+
toObjectSet,
|
|
710
|
+
toCamelCase,
|
|
711
|
+
noop,
|
|
712
|
+
toFiniteNumber,
|
|
713
|
+
findKey,
|
|
714
|
+
global: _global,
|
|
715
|
+
isContextDefined,
|
|
716
|
+
ALPHABET,
|
|
717
|
+
generateString,
|
|
718
|
+
isSpecCompliantForm,
|
|
719
|
+
toJSONObject,
|
|
720
|
+
isAsyncFn,
|
|
721
|
+
isThenable
|
|
349
722
|
};
|