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
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import utils from '../utils.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
|
|
7
|
+
*
|
|
8
|
+
* @param {string} name - The name of the property to get.
|
|
9
|
+
*
|
|
10
|
+
* @returns An array of strings.
|
|
11
|
+
*/
|
|
12
|
+
function parsePropPath(name) {
|
|
13
|
+
// foo[x][y][z]
|
|
14
|
+
// foo.x.y.z
|
|
15
|
+
// foo-x-y-z
|
|
16
|
+
// foo x y z
|
|
17
|
+
return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
18
|
+
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Convert an array to an object.
|
|
24
|
+
*
|
|
25
|
+
* @param {Array<any>} arr - The array to convert to an object.
|
|
26
|
+
*
|
|
27
|
+
* @returns An object with the same keys and values as the array.
|
|
28
|
+
*/
|
|
29
|
+
function arrayToObject(arr) {
|
|
30
|
+
const obj = {};
|
|
31
|
+
const keys = Object.keys(arr);
|
|
32
|
+
let i;
|
|
33
|
+
const len = keys.length;
|
|
34
|
+
let key;
|
|
35
|
+
for (i = 0; i < len; i++) {
|
|
36
|
+
key = keys[i];
|
|
37
|
+
obj[key] = arr[key];
|
|
38
|
+
}
|
|
39
|
+
return obj;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* It takes a FormData object and returns a JavaScript object
|
|
44
|
+
*
|
|
45
|
+
* @param {string} formData The FormData object to convert to JSON.
|
|
46
|
+
*
|
|
47
|
+
* @returns {Object<string, any> | null} The converted object.
|
|
48
|
+
*/
|
|
49
|
+
function formDataToJSON(formData) {
|
|
50
|
+
function buildPath(path, value, target, index) {
|
|
51
|
+
let name = path[index++];
|
|
52
|
+
const isNumericKey = Number.isFinite(+name);
|
|
53
|
+
const isLast = index >= path.length;
|
|
54
|
+
name = !name && utils.isArray(target) ? target.length : name;
|
|
55
|
+
|
|
56
|
+
if (isLast) {
|
|
57
|
+
if (utils.hasOwnProp(target, name)) {
|
|
58
|
+
target[name] = [target[name], value];
|
|
59
|
+
} else {
|
|
60
|
+
target[name] = value;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return !isNumericKey;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (!target[name] || !utils.isObject(target[name])) {
|
|
67
|
+
target[name] = [];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const result = buildPath(path, value, target[name], index);
|
|
71
|
+
|
|
72
|
+
if (result && utils.isArray(target[name])) {
|
|
73
|
+
target[name] = arrayToObject(target[name]);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return !isNumericKey;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
|
|
80
|
+
const obj = {};
|
|
81
|
+
|
|
82
|
+
utils.forEachEntry(formData, (name, value) => {
|
|
83
|
+
buildPath(parsePropPath(name), value, obj, 0);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
return obj;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export default formDataToJSON;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import {TextEncoder} from 'util';
|
|
2
|
+
import {Readable} from 'stream';
|
|
3
|
+
import utils from "../utils.js";
|
|
4
|
+
import readBlob from "./readBlob.js";
|
|
5
|
+
|
|
6
|
+
const BOUNDARY_ALPHABET = utils.ALPHABET.ALPHA_DIGIT + '-_';
|
|
7
|
+
|
|
8
|
+
const textEncoder = new TextEncoder();
|
|
9
|
+
|
|
10
|
+
const CRLF = '\r\n';
|
|
11
|
+
const CRLF_BYTES = textEncoder.encode(CRLF);
|
|
12
|
+
const CRLF_BYTES_COUNT = 2;
|
|
13
|
+
|
|
14
|
+
class FormDataPart {
|
|
15
|
+
constructor(name, value) {
|
|
16
|
+
const {escapeName} = this.constructor;
|
|
17
|
+
const isStringValue = utils.isString(value);
|
|
18
|
+
|
|
19
|
+
let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${
|
|
20
|
+
!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ''
|
|
21
|
+
}${CRLF}`;
|
|
22
|
+
|
|
23
|
+
if (isStringValue) {
|
|
24
|
+
value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
|
|
25
|
+
} else {
|
|
26
|
+
headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
this.headers = textEncoder.encode(headers + CRLF);
|
|
30
|
+
|
|
31
|
+
this.contentLength = isStringValue ? value.byteLength : value.size;
|
|
32
|
+
|
|
33
|
+
this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;
|
|
34
|
+
|
|
35
|
+
this.name = name;
|
|
36
|
+
this.value = value;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async *encode(){
|
|
40
|
+
yield this.headers;
|
|
41
|
+
|
|
42
|
+
const {value} = this;
|
|
43
|
+
|
|
44
|
+
if(utils.isTypedArray(value)) {
|
|
45
|
+
yield value;
|
|
46
|
+
} else {
|
|
47
|
+
yield* readBlob(value);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
yield CRLF_BYTES;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
static escapeName(name) {
|
|
54
|
+
return String(name).replace(/[\r\n"]/g, (match) => ({
|
|
55
|
+
'\r' : '%0D',
|
|
56
|
+
'\n' : '%0A',
|
|
57
|
+
'"' : '%22',
|
|
58
|
+
}[match]));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const formDataToStream = (form, headersHandler, options) => {
|
|
63
|
+
const {
|
|
64
|
+
tag = 'form-data-boundary',
|
|
65
|
+
size = 25,
|
|
66
|
+
boundary = tag + '-' + utils.generateString(size, BOUNDARY_ALPHABET)
|
|
67
|
+
} = options || {};
|
|
68
|
+
|
|
69
|
+
if(!utils.isFormData(form)) {
|
|
70
|
+
throw TypeError('FormData instance required');
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (boundary.length < 1 || boundary.length > 70) {
|
|
74
|
+
throw Error('boundary must be 10-70 characters long')
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);
|
|
78
|
+
const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF);
|
|
79
|
+
let contentLength = footerBytes.byteLength;
|
|
80
|
+
|
|
81
|
+
const parts = Array.from(form.entries()).map(([name, value]) => {
|
|
82
|
+
const part = new FormDataPart(name, value);
|
|
83
|
+
contentLength += part.size;
|
|
84
|
+
return part;
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
contentLength += boundaryBytes.byteLength * parts.length;
|
|
88
|
+
|
|
89
|
+
contentLength = utils.toFiniteNumber(contentLength);
|
|
90
|
+
|
|
91
|
+
const computedHeaders = {
|
|
92
|
+
'Content-Type': `multipart/form-data; boundary=${boundary}`
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (Number.isFinite(contentLength)) {
|
|
96
|
+
computedHeaders['Content-Length'] = contentLength;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
headersHandler && headersHandler(computedHeaders);
|
|
100
|
+
|
|
101
|
+
return Readable.from((async function *() {
|
|
102
|
+
for(const part of parts) {
|
|
103
|
+
yield boundaryBytes;
|
|
104
|
+
yield* part.encode();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
yield footerBytes;
|
|
108
|
+
})());
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export default formDataToStream;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import AxiosError from '../core/AxiosError.js';
|
|
4
|
+
import parseProtocol from './parseProtocol.js';
|
|
5
|
+
import platform from '../platform/index.js';
|
|
6
|
+
|
|
7
|
+
const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Parse data uri to a Buffer or Blob
|
|
11
|
+
*
|
|
12
|
+
* @param {String} uri
|
|
13
|
+
* @param {?Boolean} asBlob
|
|
14
|
+
* @param {?Object} options
|
|
15
|
+
* @param {?Function} options.Blob
|
|
16
|
+
*
|
|
17
|
+
* @returns {Buffer|Blob}
|
|
18
|
+
*/
|
|
19
|
+
export default function fromDataURI(uri, asBlob, options) {
|
|
20
|
+
const _Blob = options && options.Blob || platform.classes.Blob;
|
|
21
|
+
const protocol = parseProtocol(uri);
|
|
22
|
+
|
|
23
|
+
if (asBlob === undefined && _Blob) {
|
|
24
|
+
asBlob = true;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (protocol === 'data') {
|
|
28
|
+
uri = protocol.length ? uri.slice(protocol.length + 1) : uri;
|
|
29
|
+
|
|
30
|
+
const match = DATA_URL_PATTERN.exec(uri);
|
|
31
|
+
|
|
32
|
+
if (!match) {
|
|
33
|
+
throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const mime = match[1];
|
|
37
|
+
const isBase64 = match[2];
|
|
38
|
+
const body = match[3];
|
|
39
|
+
const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8');
|
|
40
|
+
|
|
41
|
+
if (asBlob) {
|
|
42
|
+
if (!_Blob) {
|
|
43
|
+
throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return new _Blob([buffer], {type: mime});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return buffer;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT);
|
|
53
|
+
}
|
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
* Determines whether the specified URL is absolute
|
|
5
5
|
*
|
|
6
6
|
* @param {string} url The URL to test
|
|
7
|
+
*
|
|
7
8
|
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
+
export default function isAbsoluteURL(url) {
|
|
10
11
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
11
12
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
12
13
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
13
14
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
14
|
-
}
|
|
15
|
+
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import utils from './../utils.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Determines whether the payload is an error thrown by Axios
|
|
7
7
|
*
|
|
8
8
|
* @param {*} payload The value to test
|
|
9
|
+
*
|
|
9
10
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
+
export default function isAxiosError(payload) {
|
|
12
13
|
return utils.isObject(payload) && (payload.isAxiosError === true);
|
|
13
|
-
}
|
|
14
|
+
}
|
|
@@ -1,68 +1,67 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import utils from './../utils.js';
|
|
4
|
+
import platform from '../platform/index.js';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
utils.isStandardBrowserEnv() ?
|
|
6
|
+
export default platform.isStandardBrowserEnv ?
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
// Standard browser envs have full support of the APIs needed to test
|
|
9
|
+
// whether the request URL is of the same origin as current location.
|
|
10
|
+
(function standardBrowserEnv() {
|
|
11
|
+
const msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
12
|
+
const urlParsingNode = document.createElement('a');
|
|
13
|
+
let originURL;
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
16
|
* Parse a URL to discover it's components
|
|
17
17
|
*
|
|
18
18
|
* @param {String} url The URL to be parsed
|
|
19
19
|
* @returns {Object}
|
|
20
20
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
function resolveURL(url) {
|
|
22
|
+
let href = url;
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
if (msie) {
|
|
25
25
|
// IE needs attribute set twice to normalize properties
|
|
26
|
-
urlParsingNode.setAttribute('href', href);
|
|
27
|
-
href = urlParsingNode.href;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
26
|
urlParsingNode.setAttribute('href', href);
|
|
31
|
-
|
|
32
|
-
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
|
33
|
-
return {
|
|
34
|
-
href: urlParsingNode.href,
|
|
35
|
-
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
|
36
|
-
host: urlParsingNode.host,
|
|
37
|
-
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
|
38
|
-
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
|
39
|
-
hostname: urlParsingNode.hostname,
|
|
40
|
-
port: urlParsingNode.port,
|
|
41
|
-
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
|
42
|
-
urlParsingNode.pathname :
|
|
43
|
-
'/' + urlParsingNode.pathname
|
|
44
|
-
};
|
|
27
|
+
href = urlParsingNode.href;
|
|
45
28
|
}
|
|
46
29
|
|
|
47
|
-
|
|
30
|
+
urlParsingNode.setAttribute('href', href);
|
|
31
|
+
|
|
32
|
+
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
|
33
|
+
return {
|
|
34
|
+
href: urlParsingNode.href,
|
|
35
|
+
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
|
36
|
+
host: urlParsingNode.host,
|
|
37
|
+
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
|
38
|
+
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
|
39
|
+
hostname: urlParsingNode.hostname,
|
|
40
|
+
port: urlParsingNode.port,
|
|
41
|
+
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
|
42
|
+
urlParsingNode.pathname :
|
|
43
|
+
'/' + urlParsingNode.pathname
|
|
44
|
+
};
|
|
45
|
+
}
|
|
48
46
|
|
|
49
|
-
|
|
47
|
+
originURL = resolveURL(window.location.href);
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
50
|
* Determine if a URL shares the same origin as the current location
|
|
51
51
|
*
|
|
52
52
|
* @param {String} requestURL The URL to test
|
|
53
53
|
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
54
54
|
*/
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
return function isURLSameOrigin(requestURL) {
|
|
56
|
+
const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
57
|
+
return (parsed.protocol === originURL.protocol &&
|
|
58
|
+
parsed.host === originURL.host);
|
|
59
|
+
};
|
|
60
|
+
})() :
|
|
61
61
|
|
|
62
62
|
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
);
|
|
63
|
+
(function nonStandardBrowserEnv() {
|
|
64
|
+
return function isURLSameOrigin() {
|
|
65
|
+
return true;
|
|
66
|
+
};
|
|
67
|
+
})();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import utils from './../utils.js';
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// RawAxiosHeaders whose duplicates are ignored by node
|
|
6
6
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
7
|
-
|
|
7
|
+
const ignoreDuplicateOf = utils.toObjectSet([
|
|
8
8
|
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
|
9
9
|
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
|
10
10
|
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
|
11
11
|
'referer', 'retry-after', 'user-agent'
|
|
12
|
-
];
|
|
12
|
+
]);
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Parse headers into an object
|
|
@@ -21,31 +21,33 @@ var ignoreDuplicateOf = [
|
|
|
21
21
|
* Transfer-Encoding: chunked
|
|
22
22
|
* ```
|
|
23
23
|
*
|
|
24
|
-
* @param {String}
|
|
24
|
+
* @param {String} rawHeaders Headers needing to be parsed
|
|
25
|
+
*
|
|
25
26
|
* @returns {Object} Headers parsed into an object
|
|
26
27
|
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (!headers) { return parsed; }
|
|
28
|
+
export default rawHeaders => {
|
|
29
|
+
const parsed = {};
|
|
30
|
+
let key;
|
|
31
|
+
let val;
|
|
32
|
+
let i;
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
|
|
36
35
|
i = line.indexOf(':');
|
|
37
|
-
key =
|
|
38
|
-
val =
|
|
36
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
37
|
+
val = line.substring(i + 1).trim();
|
|
39
38
|
|
|
40
|
-
if (key) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (key === 'set-cookie') {
|
|
44
|
+
if (parsed[key]) {
|
|
45
|
+
parsed[key].push(val);
|
|
46
46
|
} else {
|
|
47
|
-
parsed[key] =
|
|
47
|
+
parsed[key] = [val];
|
|
48
48
|
}
|
|
49
|
+
} else {
|
|
50
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
49
51
|
}
|
|
50
52
|
});
|
|
51
53
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const {asyncIterator} = Symbol;
|
|
2
|
+
|
|
3
|
+
const readBlob = async function* (blob) {
|
|
4
|
+
if (blob.stream) {
|
|
5
|
+
yield* blob.stream()
|
|
6
|
+
} else if (blob.arrayBuffer) {
|
|
7
|
+
yield await blob.arrayBuffer()
|
|
8
|
+
} else if (blob[asyncIterator]) {
|
|
9
|
+
yield* blob[asyncIterator]();
|
|
10
|
+
} else {
|
|
11
|
+
yield blob;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default readBlob;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Calculate data maxRate
|
|
5
|
+
* @param {Number} [samplesCount= 10]
|
|
6
|
+
* @param {Number} [min= 1000]
|
|
7
|
+
* @returns {Function}
|
|
8
|
+
*/
|
|
9
|
+
function speedometer(samplesCount, min) {
|
|
10
|
+
samplesCount = samplesCount || 10;
|
|
11
|
+
const bytes = new Array(samplesCount);
|
|
12
|
+
const timestamps = new Array(samplesCount);
|
|
13
|
+
let head = 0;
|
|
14
|
+
let tail = 0;
|
|
15
|
+
let firstSampleTS;
|
|
16
|
+
|
|
17
|
+
min = min !== undefined ? min : 1000;
|
|
18
|
+
|
|
19
|
+
return function push(chunkLength) {
|
|
20
|
+
const now = Date.now();
|
|
21
|
+
|
|
22
|
+
const startedAt = timestamps[tail];
|
|
23
|
+
|
|
24
|
+
if (!firstSampleTS) {
|
|
25
|
+
firstSampleTS = now;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
bytes[head] = chunkLength;
|
|
29
|
+
timestamps[head] = now;
|
|
30
|
+
|
|
31
|
+
let i = tail;
|
|
32
|
+
let bytesCount = 0;
|
|
33
|
+
|
|
34
|
+
while (i !== head) {
|
|
35
|
+
bytesCount += bytes[i++];
|
|
36
|
+
i = i % samplesCount;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
head = (head + 1) % samplesCount;
|
|
40
|
+
|
|
41
|
+
if (head === tail) {
|
|
42
|
+
tail = (tail + 1) % samplesCount;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (now - firstSampleTS < min) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const passed = startedAt && now - startedAt;
|
|
50
|
+
|
|
51
|
+
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default speedometer;
|
|
@@ -18,10 +18,11 @@
|
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
20
20
|
* @param {Function} callback
|
|
21
|
+
*
|
|
21
22
|
* @returns {Function}
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
export default function spread(callback) {
|
|
24
25
|
return function wrap(arr) {
|
|
25
26
|
return callback.apply(null, arr);
|
|
26
27
|
};
|
|
27
|
-
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Throttle decorator
|
|
5
|
+
* @param {Function} fn
|
|
6
|
+
* @param {Number} freq
|
|
7
|
+
* @return {Function}
|
|
8
|
+
*/
|
|
9
|
+
function throttle(fn, freq) {
|
|
10
|
+
let timestamp = 0;
|
|
11
|
+
const threshold = 1000 / freq;
|
|
12
|
+
let timer = null;
|
|
13
|
+
return function throttled(force, args) {
|
|
14
|
+
const now = Date.now();
|
|
15
|
+
if (force || now - timestamp > threshold) {
|
|
16
|
+
if (timer) {
|
|
17
|
+
clearTimeout(timer);
|
|
18
|
+
timer = null;
|
|
19
|
+
}
|
|
20
|
+
timestamp = now;
|
|
21
|
+
return fn.apply(null, args);
|
|
22
|
+
}
|
|
23
|
+
if (!timer) {
|
|
24
|
+
timer = setTimeout(() => {
|
|
25
|
+
timer = null;
|
|
26
|
+
timestamp = Date.now();
|
|
27
|
+
return fn.apply(null, args);
|
|
28
|
+
}, threshold - (now - timestamp));
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default throttle;
|