-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsrc_app_world_world_module_ts-es2015.js.map
1 lines (1 loc) · 80.8 KB
/
src_app_world_world_module_ts-es2015.js.map
1
{"version":3,"file":"src_app_world_world_module_ts-es2015.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAA0D;AACoB;;AAE9E;AACA;AACA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,aAAa;AAChC;;AAEA;AACA,+CAA+C,aAAa;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB,cAAc,cAAc;AAChE;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ,cAAc;AACjC,WAAW,QAAQ,WAAW;AAC9B,WAAW,eAAe;AAC1B,WAAW,eAAe;AAC1B,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,YAAY;AACvB,WAAW,QAAQ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;AACA,cAAc,2BAA2B;AACzC;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,QAAQ,cAAc;AACjC,WAAW,QAAQ,WAAW;AAC9B,WAAW,eAAe;AAC1B,WAAW,eAAe;AAC1B,aAAa,qBAAqB;AAClC,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,QAAQ,cAAc;AACjC,WAAW,QAAQ,WAAW;AAC9B,WAAW,eAAe;AAC1B,WAAW,eAAe;AAC1B,aAAa,uBAAuB;AACpC,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,mCAAmC;AACjD;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,QAAQ,cAAc;AACjC,WAAW,QAAQ,WAAW;AAC9B,WAAW,eAAe;AAC1B,WAAW,eAAe;AAC1B,aAAa,6BAA6B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA,+CAA+C,aAAa;AAC5D;AACA;AACA;AACA;AACA;AACA,WAAW,8CAA8C;AACzD,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,eAAe;AACvD,yBAAyB,mBAAmB;AAC5C;AACA;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE,yBAAyB,mBAAmB;AAC5C;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,gBAAgB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa,eAAe;AAC5B,YAAY,OAAO;AACnB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA,+CAA+C,aAAa;;;AAG5D;AACA;AACA;AACA,wCAAwC,oBAAoB;AAC5D;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ,WAAW;AAC9B,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA,+CAA+C,aAAa;;;AAG5D;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ,WAAW;AAC9B,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY,YAAY;AACxB,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,iBAAiB;AACjC,iBAAiB,8BAA8B;AAC/C;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA,2BAA2B,yCAAO;AAClC;AACA;AACA;AACA,0DAA0D,yDAAS;AACnE,SAAS;AACT;AACA,oBAAoB,qDAAmB,uBAAuB,mDAAG;AACjE;AACA,2DAA2D,yBAAyB;AACpF;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,UAAU,0BAA0B;AAC/E,aAAa;AACb,wCAAwC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DAAW;QAEX,qFAA+B;QAC7B,gHAAwN;QAC1N,4DAAW;QACb,4DAAM;;;;;;QApBiC,0DAA+B;QAA/B,kFAA+B;QAG5C,0DAAiC;QAAjC,kFAAiC;QACjC,0DAA8B;QAA9B,kFAA8B;QAC9B,0DAA+B;QAA/B,kFAA+B;QAKX,2DAAW;QAAX,iFAAW;QAIb,0DAAS;QAAT,+EAAS;QAIN,0DAAY;QAAZ,kFAAY;;ADUb;IAA3C,mDAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;8CAA2B;AAR3D,YAAY;IANxB,oEAAY,EAAE;GAMF,YAAY,CAkFxB;AAlFwB;;;;;;;;;;;;;;;;;;AEtB8B;AACJ;;;AAEnD,MAAM,MAAM,GAAW;IACrB,EAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,4DAAY,EAAE;IACjD,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,4DAAY,EAAE;CACzC,CAAC;AAMK,MAAM,kBAAkB;;oFAAlB,kBAAkB;+GAAlB,kBAAkB;mHAHpB,CAAC,kEAAqB,CAAC,MAAM,CAAC,CAAC,EAC9B,yDAAY;mIAEX,kBAAkB,oFAFnB,yDAAY;;;;;;;;;;;;;;;;;;;;;;;;ACVuB;AACa;AACT;AACI;AACK;AACH;AACQ;AACV;;AAiBhD,MAAM,WAAW;;sEAAX,WAAW;wGAAX,WAAW;4GANb;YACP,yDAAY;YACZ,+DAAY;YACZ,qEAAkB;SACnB;mIAEU,WAAW,mBAbpB,4DAAY;QACZ,qEAAe;QACf,qEAAe;QACf,kEAAc;QACd,gEAAa;QACb,0EAAkB,aAGlB,yDAAY;QACZ,+DAAY;QACZ,qEAAkB","sources":["./node_modules/geofirex/dist/index.esm.js","./src/app/world/map/map.component.ts","./src/app/world/map/map.component.html","./src/app/world/world-routing.module.ts","./src/app/world/world.module.ts"],"sourcesContent":["import { Subject, Observable, combineLatest } from 'rxjs';\nimport { map, takeUntil, shareReplay, finalize, first } from 'rxjs/operators';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\n\nfunction unwrapExports (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar helpers = createCommonjsModule(function (module, exports) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexports.earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexports.factors = {\n centimeters: exports.earthRadius * 100,\n centimetres: exports.earthRadius * 100,\n degrees: exports.earthRadius / 111325,\n feet: exports.earthRadius * 3.28084,\n inches: exports.earthRadius * 39.370,\n kilometers: exports.earthRadius / 1000,\n kilometres: exports.earthRadius / 1000,\n meters: exports.earthRadius,\n metres: exports.earthRadius,\n miles: exports.earthRadius / 1609.344,\n millimeters: exports.earthRadius * 1000,\n millimetres: exports.earthRadius * 1000,\n nauticalmiles: exports.earthRadius / 1852,\n radians: 1,\n yards: exports.earthRadius / 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexports.unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.370,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / exports.earthRadius,\n yards: 1 / 1.0936,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexports.areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nfunction feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\nexports.feature = feature;\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nfunction geometry(type, coordinates, options) {\n switch (type) {\n case \"Point\": return point(coordinates).geometry;\n case \"LineString\": return lineString(coordinates).geometry;\n case \"Polygon\": return polygon(coordinates).geometry;\n case \"MultiPoint\": return multiPoint(coordinates).geometry;\n case \"MultiLineString\": return multiLineString(coordinates).geometry;\n case \"MultiPolygon\": return multiPolygon(coordinates).geometry;\n default: throw new Error(type + \" is invalid\");\n }\n}\nexports.geometry = geometry;\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nfunction point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.point = point;\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nfunction points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\nexports.points = points;\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nfunction polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.polygon = polygon;\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nfunction polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\nexports.polygons = polygons;\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nfunction lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.lineString = lineString;\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nfunction lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\nexports.lineStrings = lineStrings;\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nfunction featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\nexports.featureCollection = featureCollection;\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nfunction multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.multiLineString = multiLineString;\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nfunction multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.multiPoint = multiPoint;\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nfunction multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.multiPolygon = multiPolygon;\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nfunction geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\nexports.geometryCollection = geometryCollection;\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nfunction round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\nexports.round = round;\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, or kilometers inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nfunction radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = exports.factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\nexports.radiansToLength = radiansToLength;\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, or kilometers inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nfunction lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = exports.factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\nexports.lengthToRadians = lengthToRadians;\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, or kilometers inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nfunction lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\nexports.lengthToDegrees = lengthToDegrees;\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nfunction bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\nexports.bearingToAzimuth = bearingToAzimuth;\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nfunction radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return degrees * 180 / Math.PI;\n}\nexports.radiansToDegrees = radiansToDegrees;\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nfunction degreesToRadians(degrees) {\n var radians = degrees % 360;\n return radians * Math.PI / 180;\n}\nexports.degreesToRadians = degreesToRadians;\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nfunction convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\nexports.convertLength = convertLength;\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted distance\n */\nfunction convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = exports.areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = exports.areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\nexports.convertArea = convertArea;\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nfunction isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num) && !/^\\s*$/.test(num);\n}\nexports.isNumber = isNumber;\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nfunction isObject(input) {\n return (!!input) && (input.constructor === Object);\n}\nexports.isObject = isObject;\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nfunction validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\nexports.validateBBox = validateBBox;\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nfunction validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\nexports.validateId = validateId;\n// Deprecated methods\nfunction radians2degrees() {\n throw new Error(\"method has been renamed to `radiansToDegrees`\");\n}\nexports.radians2degrees = radians2degrees;\nfunction degrees2radians() {\n throw new Error(\"method has been renamed to `degreesToRadians`\");\n}\nexports.degrees2radians = degrees2radians;\nfunction distanceToDegrees() {\n throw new Error(\"method has been renamed to `lengthToDegrees`\");\n}\nexports.distanceToDegrees = distanceToDegrees;\nfunction distanceToRadians() {\n throw new Error(\"method has been renamed to `lengthToRadians`\");\n}\nexports.distanceToRadians = distanceToRadians;\nfunction radiansToDistance() {\n throw new Error(\"method has been renamed to `radiansToLength`\");\n}\nexports.radiansToDistance = radiansToDistance;\nfunction bearingToAngle() {\n throw new Error(\"method has been renamed to `bearingToAzimuth`\");\n}\nexports.bearingToAngle = bearingToAngle;\nfunction convertDistance() {\n throw new Error(\"method has been renamed to `convertLength`\");\n}\nexports.convertDistance = convertDistance;\n});\n\nvar index = unwrapExports(helpers);\nvar helpers_1 = helpers.earthRadius;\nvar helpers_2 = helpers.factors;\nvar helpers_3 = helpers.unitsFactors;\nvar helpers_4 = helpers.areaFactors;\nvar helpers_5 = helpers.feature;\nvar helpers_6 = helpers.geometry;\nvar helpers_7 = helpers.point;\nvar helpers_8 = helpers.points;\nvar helpers_9 = helpers.polygon;\nvar helpers_10 = helpers.polygons;\nvar helpers_11 = helpers.lineString;\nvar helpers_12 = helpers.lineStrings;\nvar helpers_13 = helpers.featureCollection;\nvar helpers_14 = helpers.multiLineString;\nvar helpers_15 = helpers.multiPoint;\nvar helpers_16 = helpers.multiPolygon;\nvar helpers_17 = helpers.geometryCollection;\nvar helpers_18 = helpers.round;\nvar helpers_19 = helpers.radiansToLength;\nvar helpers_20 = helpers.lengthToRadians;\nvar helpers_21 = helpers.lengthToDegrees;\nvar helpers_22 = helpers.bearingToAzimuth;\nvar helpers_23 = helpers.radiansToDegrees;\nvar helpers_24 = helpers.degreesToRadians;\nvar helpers_25 = helpers.convertLength;\nvar helpers_26 = helpers.convertArea;\nvar helpers_27 = helpers.isNumber;\nvar helpers_28 = helpers.isObject;\nvar helpers_29 = helpers.validateBBox;\nvar helpers_30 = helpers.validateId;\nvar helpers_31 = helpers.radians2degrees;\nvar helpers_32 = helpers.degrees2radians;\nvar helpers_33 = helpers.distanceToDegrees;\nvar helpers_34 = helpers.distanceToRadians;\nvar helpers_35 = helpers.radiansToDistance;\nvar helpers_36 = helpers.bearingToAngle;\nvar helpers_37 = helpers.convertDistance;\n\nvar helpers$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n 'default': index,\n __moduleExports: helpers,\n earthRadius: helpers_1,\n factors: helpers_2,\n unitsFactors: helpers_3,\n areaFactors: helpers_4,\n feature: helpers_5,\n geometry: helpers_6,\n point: helpers_7,\n points: helpers_8,\n polygon: helpers_9,\n polygons: helpers_10,\n lineString: helpers_11,\n lineStrings: helpers_12,\n featureCollection: helpers_13,\n multiLineString: helpers_14,\n multiPoint: helpers_15,\n multiPolygon: helpers_16,\n geometryCollection: helpers_17,\n round: helpers_18,\n radiansToLength: helpers_19,\n lengthToRadians: helpers_20,\n lengthToDegrees: helpers_21,\n bearingToAzimuth: helpers_22,\n radiansToDegrees: helpers_23,\n degreesToRadians: helpers_24,\n convertLength: helpers_25,\n convertArea: helpers_26,\n isNumber: helpers_27,\n isObject: helpers_28,\n validateBBox: helpers_29,\n validateId: helpers_30,\n radians2degrees: helpers_31,\n degrees2radians: helpers_32,\n distanceToDegrees: helpers_33,\n distanceToRadians: helpers_34,\n radiansToDistance: helpers_35,\n bearingToAngle: helpers_36,\n convertDistance: helpers_37\n});\n\nvar helpers_1$1 = ( helpers$1 && index ) || helpers$1;\n\nvar invariant = createCommonjsModule(function (module, exports) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\r\n/**\r\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\r\n *\r\n * @name getCoord\r\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\r\n * @returns {Array<number>} coordinates\r\n * @example\r\n * var pt = turf.point([10, 10]);\r\n *\r\n * var coord = turf.getCoord(pt);\r\n * //= [10, 10]\r\n */\r\nfunction getCoord(coord) {\r\n if (!coord) {\r\n throw new Error(\"coord is required\");\r\n }\r\n if (!Array.isArray(coord)) {\r\n if (coord.type === \"Feature\" && coord.geometry !== null && coord.geometry.type === \"Point\") {\r\n return coord.geometry.coordinates;\r\n }\r\n if (coord.type === \"Point\") {\r\n return coord.coordinates;\r\n }\r\n }\r\n if (Array.isArray(coord) && coord.length >= 2 && !Array.isArray(coord[0]) && !Array.isArray(coord[1])) {\r\n return coord;\r\n }\r\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\r\n}\r\nexports.getCoord = getCoord;\r\n/**\r\n * Unwrap coordinates from a Feature, Geometry Object or an Array\r\n *\r\n * @name getCoords\r\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\r\n * @returns {Array<any>} coordinates\r\n * @example\r\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\r\n *\r\n * var coords = turf.getCoords(poly);\r\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\r\n */\r\nfunction getCoords(coords) {\r\n if (Array.isArray(coords)) {\r\n return coords;\r\n }\r\n // Feature\r\n if (coords.type === \"Feature\") {\r\n if (coords.geometry !== null) {\r\n return coords.geometry.coordinates;\r\n }\r\n }\r\n else {\r\n // Geometry\r\n if (coords.coordinates) {\r\n return coords.coordinates;\r\n }\r\n }\r\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\r\n}\r\nexports.getCoords = getCoords;\r\n/**\r\n * Checks if coordinates contains a number\r\n *\r\n * @name containsNumber\r\n * @param {Array<any>} coordinates GeoJSON Coordinates\r\n * @returns {boolean} true if Array contains a number\r\n */\r\nfunction containsNumber(coordinates) {\r\n if (coordinates.length > 1 && helpers_1$1.isNumber(coordinates[0]) && helpers_1$1.isNumber(coordinates[1])) {\r\n return true;\r\n }\r\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\r\n return containsNumber(coordinates[0]);\r\n }\r\n throw new Error(\"coordinates must only contain numbers\");\r\n}\r\nexports.containsNumber = containsNumber;\r\n/**\r\n * Enforce expectations about types of GeoJSON objects for Turf.\r\n *\r\n * @name geojsonType\r\n * @param {GeoJSON} value any GeoJSON object\r\n * @param {string} type expected GeoJSON type\r\n * @param {string} name name of calling function\r\n * @throws {Error} if value is not the expected type.\r\n */\r\nfunction geojsonType(value, type, name) {\r\n if (!type || !name) {\r\n throw new Error(\"type and name required\");\r\n }\r\n if (!value || value.type !== type) {\r\n throw new Error(\"Invalid input to \" + name + \": must be a \" + type + \", given \" + value.type);\r\n }\r\n}\r\nexports.geojsonType = geojsonType;\r\n/**\r\n * Enforce expectations about types of {@link Feature} inputs for Turf.\r\n * Internally this uses {@link geojsonType} to judge geometry types.\r\n *\r\n * @name featureOf\r\n * @param {Feature} feature a feature with an expected geometry type\r\n * @param {string} type expected GeoJSON type\r\n * @param {string} name name of calling function\r\n * @throws {Error} error if value is not the expected type.\r\n */\r\nfunction featureOf(feature, type, name) {\r\n if (!feature) {\r\n throw new Error(\"No feature passed\");\r\n }\r\n if (!name) {\r\n throw new Error(\".featureOf() requires a name\");\r\n }\r\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\r\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\r\n }\r\n if (!feature.geometry || feature.geometry.type !== type) {\r\n throw new Error(\"Invalid input to \" + name + \": must be a \" + type + \", given \" + feature.geometry.type);\r\n }\r\n}\r\nexports.featureOf = featureOf;\r\n/**\r\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\r\n * Internally this uses {@link geojsonType} to judge geometry types.\r\n *\r\n * @name collectionOf\r\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\r\n * @param {string} type expected GeoJSON type\r\n * @param {string} name name of calling function\r\n * @throws {Error} if value is not the expected type.\r\n */\r\nfunction collectionOf(featureCollection, type, name) {\r\n if (!featureCollection) {\r\n throw new Error(\"No featureCollection passed\");\r\n }\r\n if (!name) {\r\n throw new Error(\".collectionOf() requires a name\");\r\n }\r\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\r\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\r\n }\r\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\r\n var feature = _a[_i];\r\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\r\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\r\n }\r\n if (!feature.geometry || feature.geometry.type !== type) {\r\n throw new Error(\"Invalid input to \" + name + \": must be a \" + type + \", given \" + feature.geometry.type);\r\n }\r\n }\r\n}\r\nexports.collectionOf = collectionOf;\r\n/**\r\n * Get Geometry from Feature or Geometry Object\r\n *\r\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\r\n * @returns {Geometry|null} GeoJSON Geometry Object\r\n * @throws {Error} if geojson is not a Feature or Geometry Object\r\n * @example\r\n * var point = {\r\n * \"type\": \"Feature\",\r\n * \"properties\": {},\r\n * \"geometry\": {\r\n * \"type\": \"Point\",\r\n * \"coordinates\": [110, 40]\r\n * }\r\n * }\r\n * var geom = turf.getGeom(point)\r\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\r\n */\r\nfunction getGeom(geojson) {\r\n if (geojson.type === \"Feature\") {\r\n return geojson.geometry;\r\n }\r\n return geojson;\r\n}\r\nexports.getGeom = getGeom;\r\n/**\r\n * Get GeoJSON object's type, Geometry type is prioritize.\r\n *\r\n * @param {GeoJSON} geojson GeoJSON object\r\n * @param {string} [name=\"geojson\"] name of the variable to display in error message\r\n * @returns {string} GeoJSON type\r\n * @example\r\n * var point = {\r\n * \"type\": \"Feature\",\r\n * \"properties\": {},\r\n * \"geometry\": {\r\n * \"type\": \"Point\",\r\n * \"coordinates\": [110, 40]\r\n * }\r\n * }\r\n * var geom = turf.getType(point)\r\n * //=\"Point\"\r\n */\r\nfunction getType(geojson, name) {\r\n if (geojson.type === \"FeatureCollection\") {\r\n return \"FeatureCollection\";\r\n }\r\n if (geojson.type === \"GeometryCollection\") {\r\n return \"GeometryCollection\";\r\n }\r\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\r\n return geojson.geometry.type;\r\n }\r\n return geojson.type;\r\n}\r\nexports.getType = getType;\n});\n\nvar index$1 = unwrapExports(invariant);\nvar invariant_1 = invariant.getCoord;\nvar invariant_2 = invariant.getCoords;\nvar invariant_3 = invariant.containsNumber;\nvar invariant_4 = invariant.geojsonType;\nvar invariant_5 = invariant.featureOf;\nvar invariant_6 = invariant.collectionOf;\nvar invariant_7 = invariant.getGeom;\nvar invariant_8 = invariant.getType;\n\nvar invariant$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n 'default': index$1,\n __moduleExports: invariant,\n getCoord: invariant_1,\n getCoords: invariant_2,\n containsNumber: invariant_3,\n geojsonType: invariant_4,\n featureOf: invariant_5,\n collectionOf: invariant_6,\n getGeom: invariant_7,\n getType: invariant_8\n});\n\nvar invariant_1$1 = ( invariant$1 && index$1 ) || invariant$1;\n\nvar C__Users_jeffd23_apps_geofirex_node_modules__turf_distance = createCommonjsModule(function (module, exports) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\n\n//http://en.wikipedia.org/wiki/Haversine_formula\n//http://www.movable-type.co.uk/scripts/latlong.html\n/**\n * Calculates the distance between two {@link Point|points} in degrees, radians, miles, or kilometers.\n * This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature.\n *\n * @name distance\n * @param {Coord} from origin point\n * @param {Coord} to destination point\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers\n * @returns {number} distance between the two points\n * @example\n * var from = turf.point([-75.343, 39.984]);\n * var to = turf.point([-75.534, 39.123]);\n * var options = {units: 'miles'};\n *\n * var distance = turf.distance(from, to, options);\n *\n * //addToMap\n * var addToMap = [from, to];\n * from.properties.distance = distance;\n * to.properties.distance = distance;\n */\nfunction distance(from, to, options) {\n if (options === void 0) { options = {}; }\n var coordinates1 = invariant_1$1.getCoord(from);\n var coordinates2 = invariant_1$1.getCoord(to);\n var dLat = helpers_1$1.degreesToRadians((coordinates2[1] - coordinates1[1]));\n var dLon = helpers_1$1.degreesToRadians((coordinates2[0] - coordinates1[0]));\n var lat1 = helpers_1$1.degreesToRadians(coordinates1[1]);\n var lat2 = helpers_1$1.degreesToRadians(coordinates2[1]);\n var a = Math.pow(Math.sin(dLat / 2), 2) +\n Math.pow(Math.sin(dLon / 2), 2) * Math.cos(lat1) * Math.cos(lat2);\n return helpers_1$1.radiansToLength(2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), options.units);\n}\nexports.default = distance;\n});\n\nvar turfDistance = unwrapExports(C__Users_jeffd23_apps_geofirex_node_modules__turf_distance);\n\nvar bearing_1 = createCommonjsModule(function (module, exports) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\n\n// http://en.wikipedia.org/wiki/Haversine_formula\n// http://www.movable-type.co.uk/scripts/latlong.html\n/**\n * Takes two {@link Point|points} and finds the geographic bearing between them,\n * i.e. the angle measured in degrees from the north line (0 degrees)\n *\n * @name bearing\n * @param {Coord} start starting Point\n * @param {Coord} end ending Point\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.final=false] calculates the final bearing if true\n * @returns {number} bearing in decimal degrees, between -180 and 180 degrees (positive clockwise)\n * @example\n * var point1 = turf.point([-75.343, 39.984]);\n * var point2 = turf.point([-75.534, 39.123]);\n *\n * var bearing = turf.bearing(point1, point2);\n *\n * //addToMap\n * var addToMap = [point1, point2]\n * point1.properties['marker-color'] = '#f00'\n * point2.properties['marker-color'] = '#0f0'\n * point1.properties.bearing = bearing\n */\nfunction bearing(start, end, options) {\n if (options === void 0) { options = {}; }\n // Reverse calculation\n if (options.final === true) {\n return calculateFinalBearing(start, end);\n }\n var coordinates1 = invariant_1$1.getCoord(start);\n var coordinates2 = invariant_1$1.getCoord(end);\n var lon1 = helpers_1$1.degreesToRadians(coordinates1[0]);\n var lon2 = helpers_1$1.degreesToRadians(coordinates2[0]);\n var lat1 = helpers_1$1.degreesToRadians(coordinates1[1]);\n var lat2 = helpers_1$1.degreesToRadians(coordinates2[1]);\n var a = Math.sin(lon2 - lon1) * Math.cos(lat2);\n var b = Math.cos(lat1) * Math.sin(lat2) -\n Math.sin(lat1) * Math.cos(lat2) * Math.cos(lon2 - lon1);\n return helpers_1$1.radiansToDegrees(Math.atan2(a, b));\n}\n/**\n * Calculates Final Bearing\n *\n * @private\n * @param {Coord} start starting Point\n * @param {Coord} end ending Point\n * @returns {number} bearing\n */\nfunction calculateFinalBearing(start, end) {\n // Swap start & end\n var bear = bearing(end, start);\n bear = (bear + 180) % 360;\n return bear;\n}\nexports.default = bearing;\n});\n\nvar turfBearing = unwrapExports(bearing_1);\n\nfunction distance(from, to) {\r\n return turfDistance(toGeoJSONFeature(from), toGeoJSONFeature(to));\r\n}\r\nfunction bearing(from, to) {\r\n return turfBearing(toGeoJSONFeature(from), toGeoJSONFeature(to));\r\n}\r\nfunction toGeoJSONFeature(coordinates, props) {\r\n coordinates = flip(coordinates);\r\n return {\r\n type: 'Feature',\r\n geometry: {\r\n type: 'Point',\r\n coordinates: coordinates\r\n },\r\n properties: props\r\n };\r\n}\r\nfunction flip(arr) {\r\n return [arr[1], arr[0]];\r\n}\r\nfunction setPrecsion(km) {\r\n switch (true) {\r\n case km <= 0.00477:\r\n return 9;\r\n case km <= 0.0382:\r\n return 8;\r\n case km <= 0.153:\r\n return 7;\r\n case km <= 1.22:\r\n return 6;\r\n case km <= 4.89:\r\n return 5;\r\n case km <= 39.1:\r\n return 4;\r\n case km <= 156:\r\n return 3;\r\n case km <= 1250:\r\n return 2;\r\n default:\r\n return 1;\r\n }\r\n // 1\t≤ 5,000km\t×\t5,000km\r\n // 2\t≤ 1,250km\t×\t625km\r\n // 3\t≤ 156km\t×\t156km\r\n // 4\t≤ 39.1km\t×\t19.5km\r\n // 5\t≤ 4.89km\t×\t4.89km\r\n // 6\t≤ 1.22km\t×\t0.61km\r\n // 7\t≤ 153m\t×\t153m\r\n // 8\t≤ 38.2m\t×\t19.1m\r\n // 9\t≤ 4.77m\t×\t4.77m\r\n}\r\n/////// NGEOHASH ////////\r\nvar BASE32_CODES = '0123456789bcdefghjkmnpqrstuvwxyz';\r\nvar BASE32_CODES_DICT = {};\r\nfor (var i = 0; i < BASE32_CODES.length; i++) {\r\n BASE32_CODES_DICT[BASE32_CODES.charAt(i)] = i;\r\n}\r\nvar ENCODE_AUTO = 'auto';\r\n/**\r\n * Significant Figure Hash Length\r\n *\r\n * This is a quick and dirty lookup to figure out how long our hash\r\n * should be in order to guarantee a certain amount of trailing\r\n * significant figures. This was calculated by determining the error:\r\n * 45/2^(n-1) where n is the number of bits for a latitude or\r\n * longitude. Key is # of desired sig figs, value is minimum length of\r\n * the geohash.\r\n * @type Array\r\n */\r\n// Desired sig figs: 0 1 2 3 4 5 6 7 8 9 10\r\nvar SIGFIG_HASH_LENGTH = [0, 5, 7, 8, 11, 12, 13, 15, 16, 17, 18];\r\n/**\r\n * Encode\r\n *\r\n * Create a Geohash out of a latitude and longitude that is\r\n * `numberOfChars` long.\r\n *\r\n * @param {Number|String} latitude\r\n * @param {Number|String} longitude\r\n * @param {Number} numberOfChars\r\n * @returns {String}\r\n */\r\nvar encode = function (latitude, longitude, numberOfChars) {\r\n if (numberOfChars === ENCODE_AUTO) {\r\n if (typeof latitude === 'number' || typeof longitude === 'number') {\r\n throw new Error('string notation required for auto precision.');\r\n }\r\n var decSigFigsLat = latitude.split('.')[1].length;\r\n var decSigFigsLong = longitude.split('.')[1].length;\r\n var numberOfSigFigs = Math.max(decSigFigsLat, decSigFigsLong);\r\n numberOfChars = SIGFIG_HASH_LENGTH[numberOfSigFigs];\r\n }\r\n else if (numberOfChars === undefined) {\r\n numberOfChars = 9;\r\n }\r\n var chars = [], bits = 0, bitsTotal = 0, hash_value = 0, maxLat = 90, minLat = -90, maxLon = 180, minLon = -180, mid;\r\n while (chars.length < numberOfChars) {\r\n if (bitsTotal % 2 === 0) {\r\n mid = (maxLon + minLon) / 2;\r\n if (longitude > mid) {\r\n hash_value = (hash_value << 1) + 1;\r\n minLon = mid;\r\n }\r\n else {\r\n hash_value = (hash_value << 1) + 0;\r\n maxLon = mid;\r\n }\r\n }\r\n else {\r\n mid = (maxLat + minLat) / 2;\r\n if (latitude > mid) {\r\n hash_value = (hash_value << 1) + 1;\r\n minLat = mid;\r\n }\r\n else {\r\n hash_value = (hash_value << 1) + 0;\r\n maxLat = mid;\r\n }\r\n }\r\n bits++;\r\n bitsTotal++;\r\n if (bits === 5) {\r\n var code = BASE32_CODES[hash_value];\r\n chars.push(code);\r\n bits = 0;\r\n hash_value = 0;\r\n }\r\n }\r\n return chars.join('');\r\n};\r\n/**\r\n * Decode Bounding Box\r\n *\r\n * Decode hashString into a bound box matches it. Data returned in a four-element array: [minlat, minlon, maxlat, maxlon]\r\n * @param {String} hash_string\r\n * @returns {Array}\r\n */\r\nvar decode_bbox = function (hash_string) {\r\n var isLon = true, maxLat = 90, minLat = -90, maxLon = 180, minLon = -180, mid;\r\n var hashValue = 0;\r\n for (var i = 0, l = hash_string.length; i < l; i++) {\r\n var code = hash_string[i].toLowerCase();\r\n hashValue = BASE32_CODES_DICT[code];\r\n for (var bits = 4; bits >= 0; bits--) {\r\n var bit = (hashValue >> bits) & 1;\r\n if (isLon) {\r\n mid = (maxLon + minLon) / 2;\r\n if (bit === 1) {\r\n minLon = mid;\r\n }\r\n else {\r\n maxLon = mid;\r\n }\r\n }\r\n else {\r\n mid = (maxLat + minLat) / 2;\r\n if (bit === 1) {\r\n minLat = mid;\r\n }\r\n else {\r\n maxLat = mid;\r\n }\r\n }\r\n isLon = !isLon;\r\n }\r\n }\r\n return [minLat, minLon, maxLat, maxLon];\r\n};\r\n/**\r\n * Decode\r\n *\r\n * Decode a hash string into pair of latitude and longitude. A javascript object is returned with keys `latitude`,\r\n * `longitude` and `error`.\r\n * @param {String} hashString\r\n * @returns {Object}\r\n */\r\nvar decode = function (hashString) {\r\n var bbox = decode_bbox(hashString);\r\n var lat = (bbox[0] + bbox[2]) / 2;\r\n var lon = (bbox[1] + bbox[3]) / 2;\r\n var latErr = bbox[2] - lat;\r\n var lonErr = bbox[3] - lon;\r\n return {\r\n latitude: lat,\r\n longitude: lon,\r\n error: { latitude: latErr, longitude: lonErr }\r\n };\r\n};\r\n/**\r\n * Neighbors\r\n *\r\n * Returns all neighbors' hashstrings clockwise from north around to northwest\r\n * 7 0 1\r\n * 6 x 2\r\n * 5 4 3\r\n * @param {String} hash_string\r\n * @returns {encoded neighborHashList|Array}\r\n */\r\nvar neighbors = function (hash_string) {\r\n var hashstringLength = hash_string.length;\r\n var lonlat = decode(hash_string);\r\n var lat = lonlat.latitude;\r\n var lon = lonlat.longitude;\r\n var latErr = lonlat.error.latitude * 2;\r\n var lonErr = lonlat.error.longitude * 2;\r\n var neighbor_lat, neighbor_lon;\r\n var neighborHashList = [\r\n encodeNeighbor(1, 0),\r\n encodeNeighbor(1, 1),\r\n encodeNeighbor(0, 1),\r\n encodeNeighbor(-1, 1),\r\n encodeNeighbor(-1, 0),\r\n encodeNeighbor(-1, -1),\r\n encodeNeighbor(0, -1),\r\n encodeNeighbor(1, -1)\r\n ];\r\n function encodeNeighbor(neighborLatDir, neighborLonDir) {\r\n neighbor_lat = lat + neighborLatDir * latErr;\r\n neighbor_lon = lon + neighborLonDir * lonErr;\r\n return encode(neighbor_lat, neighbor_lon, hashstringLength);\r\n }\r\n return neighborHashList;\r\n};\n\n// import { firestore } from './interfaces';\r\nvar defaultOpts = { units: 'km', log: false };\r\nvar GeoFireQuery = /** @class */ (function () {\r\n function GeoFireQuery(app, ref) {\r\n this.app = app;\r\n this.ref = ref;\r\n if (typeof ref === 'string') {\r\n this.ref = this.app.firestore().collection(ref);\r\n }\r\n }\r\n // GEO QUERIES\r\n /**\r\n * Queries the Firestore collection based on geograpic radius\r\n * @param {FirePoint} center the starting point for the query, i.e gfx.point(lat, lng)\r\n * @param {number} radius the radius to search from the centerpoint\r\n * @param {string} field the document field that contains the FirePoint data\r\n * @param {GeoQueryOptions} opts=defaultOpts\r\n * @returns {Observable<GeoQueryDocument>} sorted by nearest to farthest\r\n */\r\n GeoFireQuery.prototype.within = function (center, radius, field, opts) {\r\n var _this = this;\r\n opts = __assign(__assign({}, defaultOpts), opts);\r\n var tick = Date.now();\r\n var precision = setPrecsion(radius);\r\n var radiusBuffer = radius * 1.02; // buffer for edge distances\r\n var centerHash = center.geohash.substr(0, precision);\r\n var area = neighbors(centerHash).concat(centerHash);\r\n var _a = center.geopoint, centerLat = _a.latitude, centerLng = _a.longitude;\r\n // Used to cancel the individual geohash subscriptions\r\n var complete = new Subject();\r\n // Map geohash neighbors to individual queries\r\n var queries = area.map(function (hash) {\r\n var query = _this.queryPoint(hash, field);\r\n return createStream(query).pipe(snapToData(), takeUntil(complete));\r\n });\r\n // Combine all queries concurrently\r\n var combo = combineLatest.apply(void 0, queries).pipe(map(function (arr) {\r\n // Combine results into a single array\r\n var reduced = arr.reduce(function (acc, cur) { return acc.concat(cur); });\r\n // Filter by radius\r\n var filtered = reduced.filter(function (val) {\r\n var _a = val[field].geopoint, latitude = _a.latitude, longitude = _a.longitude;\r\n return (distance([centerLat, centerLng], [latitude, longitude]) <=\r\n radiusBuffer);\r\n });\r\n // Optional logging\r\n if (opts.log) {\r\n console.group('GeoFireX Query');\r\n console.log(\"\\uD83C\\uDF10 Center \" + [centerLat, centerLng] + \". Radius \" + radius);\r\n console.log(\"\\uD83D\\uDCCD Hits: \" + reduced.length);\r\n console.log(\"\\u231A Elapsed time: \" + (Date.now() - tick) + \"ms\");\r\n console.log(\"\\uD83D\\uDFE2 Within Radius: \" + filtered.length);\r\n console.groupEnd();\r\n }\r\n // Map and sort to final output\r\n return filtered\r\n .map(function (val) {\r\n var _a = val[field].geopoint, latitude = _a.latitude, longitude = _a.longitude;\r\n var hitMetadata = {\r\n distance: distance([centerLat, centerLng], [latitude, longitude]),\r\n bearing: bearing([centerLat, centerLng], [latitude, longitude])\r\n };\r\n return __assign(__assign({}, val), { hitMetadata: hitMetadata });\r\n })\r\n .sort(function (a, b) { return a.hitMetadata.distance - b.hitMetadata.distance; });\r\n }), shareReplay(1), finalize(function () {\r\n opts.log && console.log('✋ Query complete');\r\n complete.next(true);\r\n }));\r\n return combo;\r\n };\r\n GeoFireQuery.prototype.queryPoint = function (geohash, field) {\r\n var end = geohash + '~';\r\n return this.ref\r\n .orderBy(field + \".geohash\")\r\n .startAt(geohash)\r\n .endAt(end);\r\n };\r\n return GeoFireQuery;\r\n}());\r\nfunction snapToData(id) {\r\n if (id === void 0) { id = 'id'; }\r\n return map(function (querySnapshot) {\r\n return querySnapshot.docs.map(function (v) {\r\n var _a;\r\n return __assign(__assign({}, (id ? (_a = {}, _a[id] = v.id, _a) : null)), v.data());\r\n });\r\n });\r\n}\r\n/**\r\ninternal, do not use. Converts callback to Observable.\r\n */\r\nfunction createStream(input) {\r\n return new Observable(function (observer) {\r\n var unsubscribe = input.onSnapshot(function (val) { return observer.next(val); }, function (err) { return observer.error(err); });\r\n return { unsubscribe: unsubscribe };\r\n });\r\n}\r\n/**\r\n * RxJS operator that converts a collection to a GeoJSON FeatureCollection\r\n * @param {string} field the document field that contains the FirePoint\r\n * @param {boolean=false} includeProps\r\n */\r\nfunction toGeoJSON(field, includeProps) {\r\n if (includeProps === void 0) { includeProps = false; }\r\n return map(function (data) {\r\n return {\r\n type: 'FeatureCollection',\r\n features: data.map(function (v) {\r\n return toGeoJSONFeature([v[field].geopoint.latitude, v[field].geopoint.longitude], includeProps ? __assign({}, v) : {});\r\n })\r\n };\r\n });\r\n}\r\n/**\r\n * Helper function to convert any query from an RxJS Observable to a Promise\r\n * Example usage: await get( collection.within(a, b, c) )\r\n * @param {Observable<any>} observable\r\n * @returns {Promise<any>}\r\n */\r\nfunction get(observable) {\r\n return observable.pipe(first()).toPromise();\r\n}\n\nvar GeoFireClient = /** @class */ (function () {\r\n function GeoFireClient(app) {\r\n this.app = app;\r\n }\r\n /**\r\n * Creates reference to a Firestore collection that can be used to make geoqueries\r\n * @param {firestore.CollectionReference | firestore.Query | string} ref path to collection\r\n * @returns {GeoFireQuery}\r\n */\r\n GeoFireClient.prototype.query = function (ref) {\r\n return new GeoFireQuery(this.app, ref);\r\n };\r\n /**\r\n * Creates an object with a geohash. Save it to a field in Firestore to make geoqueries.\r\n * @param {number} latitude\r\n * @param {number} longitude\r\n * @returns FirePoint\r\n */\r\n GeoFireClient.prototype.point = function (latitude, longitude) {\r\n return {\r\n geopoint: new this.app.firestore.GeoPoint(latitude, longitude),\r\n geohash: encode(latitude, longitude, 9)\r\n };\r\n };\r\n /**\r\n * Haversine distance between points\r\n * @param {FirePoint} from\r\n * @param {FirePoint} to\r\n * @returns number\r\n */\r\n GeoFireClient.prototype.distance = function (from, to) {\r\n return distance([from.geopoint.latitude, from.geopoint.longitude], [to.geopoint.latitude, to.geopoint.longitude]);\r\n };\r\n /**\r\n * Haversine bearing between points\r\n * @param {FirePoint} from\r\n * @param {FirePoint} to\r\n * @returns number\r\n */\r\n GeoFireClient.prototype.bearing = function (from, to) {\r\n return bearing([from.geopoint.latitude, from.geopoint.longitude], [to.geopoint.latitude, to.geopoint.longitude]);\r\n };\r\n return GeoFireClient;\r\n}());\r\n/**\r\n * Initialize the library by passing it your Firebase app\r\n * @param {firestore.FirebaseApp} app\r\n * @returns GeoFireClient\r\n */\r\nfunction init(app) {\r\n return new GeoFireClient(app);\r\n}\n\nexport { GeoFireClient, GeoFireQuery, get, init, toGeoJSON };\n","import { Component, OnInit, OnDestroy } from '@angular/core';\r\nimport { MapboxService } from 'src/app/services/mapbox.service';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { Store, Select } from '@ngxs/store';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport * as geofirex from 'geofirex';\r\nimport * as firebase from 'firebase/app';\r\nimport { Observable, combineLatest } from 'rxjs';\r\nimport { switchMap } from 'rxjs/operators';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { CacheService } from 'src/app/services/cache.service';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { MarkerType, LocationType, StoreType, FactionType } from 'src/app/shared/type/common.type';\r\nimport { GeoFireClient } from 'geofirex';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-map',\r\n templateUrl: './map.component.html',\r\n styleUrls: ['./map.component.scss'],\r\n})\r\nexport class MapComponent implements OnInit, OnDestroy {\r\n\r\n geofirex: GeoFireClient = geofirex.init(firebase);\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n container = 'map';\r\n locations: any[] = [];\r\n stores: any[] = [];\r\n factions: any[] = [];\r\n @Select((state: any) => state.auth.kingdom) kingdom$: Observable<any>;\r\n\r\n constructor(\r\n public mapboxService: MapboxService,\r\n private angularFirestore: AngularFirestore,\r\n private store: Store,\r\n private activatedRoute: ActivatedRoute,\r\n private cacheService: CacheService,\r\n private notificationService: NotificationService,\r\n private loadingService: LoadingService,\r\n ) {\r\n this.loadingService.startLoading();\r\n }\r\n\r\n async ngOnInit(): Promise<void> {\r\n this.mapboxService.initialize(this.container);\r\n this.mapboxService.map.once('load', async () => {\r\n // resize map in case drawer has changed\r\n this.mapboxService.resizeMap();\r\n // print icons surrounding kingdom\r\n combineLatest([\r\n this.angularFirestore.collection<any>('kingdoms').valueChanges({ idField: 'fid' }),\r\n this.angularFirestore.doc<any>(`kingdoms/${this.uid}`).valueChanges()\r\n .pipe(switchMap((kingdom: any) => this.geofirex.query(this.angularFirestore.collection<any>('quests').ref).within(kingdom.position, Math.max(1000, kingdom.power) / 1000, 'position'))),\r\n this.angularFirestore.doc<any>(`kingdoms/${this.uid}`).valueChanges()\r\n .pipe(switchMap((kingdom: any) => this.geofirex.query(this.angularFirestore.collection<any>('shops').ref).within(kingdom.position, Math.max(1000, kingdom.power) / 1000, 'position'))),\r\n ])\r\n .pipe(untilDestroyed(this))\r\n .subscribe(([kingdoms, quests, shops]) => {\r\n this.notificationService.warning('world.map.update');\r\n // this.mapboxService.clearMarkers();\r\n kingdoms.forEach((kingdom: any) => {\r\n this.mapboxService.addMarker(kingdom, MarkerType.KINGDOM, kingdom.id === this.uid,\r\n this.activatedRoute.snapshot.params.kingdom\r\n ? this.activatedRoute.snapshot.params.kingdom === kingdom.id\r\n : false,\r\n );\r\n });\r\n quests.forEach((quest: any) => this.mapboxService.addMarker(quest, MarkerType.QUEST, false, false));\r\n shops.forEach((shop: any) => this.mapboxService.addMarker(shop, MarkerType.SHOP, false, false));\r\n this.mapboxService.refreshMarkers();\r\n });\r\n this.loadingService.stopLoading();\r\n });\r\n // menus\r\n this.stores = await this.cacheService.getStores();\r\n this.locations = await this.cacheService.getLocations();\r\n this.factions = (await this.cacheService.getFactions()).filter((faction: any) => faction.id !== 'grey');\r\n }\r\n\r\n addShop(type: StoreType): void {\r\n this.notificationService.warning('world.map.add');\r\n this.mapboxService.addShopByClick(type);\r\n }\r\n\r\n addQuest(type: LocationType): void {\r\n this.notificationService.warning('world.map.add');\r\n this.mapboxService.addQuestByClick(type);\r\n }\r\n\r\n addKingdom(type: FactionType): void {\r\n this.notificationService.warning('world.map.add');\r\n this.mapboxService.addKingdomByClick(type);\r\n }\r\n\r\n populateMap(): void {\r\n this.notificationService.warning('world.map.add');\r\n this.mapboxService.populateMapByClick();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.mapboxService.terminalize();\r\n }\r\n\r\n}\r\n","<div id=\"map\" class=\"map-container\"></div>\r\n\r\n<div class=\"map-admin\">\r\n <button mat-mini-fab color=\"primary\" [matMenuTriggerFor]=\"adminMenu\"><mat-icon>security</mat-icon></button>\r\n\r\n <mat-menu #adminMenu=\"matMenu\">\r\n <button mat-menu-item [matMenuTriggerFor]=\"kingdomMenu\"><mat-icon>person</mat-icon>Bot</button>\r\n <button mat-menu-item [matMenuTriggerFor]=\"shopMenu\"><mat-icon>attach_money</mat-icon>Tienda</button>\r\n <button mat-menu-item [matMenuTriggerFor]=\"questMenu\"><mat-icon>search</mat-icon>Lugar</button>\r\n <button mat-menu-item (click)=\"populateMap()\"><mat-icon>map</mat-icon>Mapa</button>\r\n </mat-menu>\r\n\r\n <mat-menu #kingdomMenu=\"matMenu\">\r\n <button mat-menu-item *ngFor=\"let faction of factions\" (click)=\"addKingdom(faction.id)\" class=\"map-admin-button\"><img [src]=\"faction.marker\" [alt]=\"faction.name | translate\">{{ faction.name | translate }}</button>\r\n </mat-menu>\r\n\r\n <mat-menu #shopMenu=\"matMenu\">\r\n <button mat-menu-item *ngFor=\"let store of stores\" (click)=\"addShop(store.id)\" class=\"map-admin-button\"><img [src]=\"store.image\" [alt]=\"store.name | translate\">{{ store.name | translate }}</button>\r\n </mat-menu>\r\n\r\n <mat-menu #questMenu=\"matMenu\">\r\n <button mat-menu-item *ngFor=\"let location of locations\" (click)=\"addQuest(location.id)\" class=\"map-admin-button\"><img [src]=\"location.image | translate\" [alt]=\"location.name\">{{ location.name | translate }}</button>\r\n </mat-menu>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { MapComponent } from './map/map.component';\r\n\r\nconst routes: Routes = [\r\n { path: 'map/:kingdom', component: MapComponent },\r\n { path: 'map', component: MapComponent },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule],\r\n})\r\nexport class WorldRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { WorldRoutingModule } from './world-routing.module';\r\nimport { MapComponent } from './map/map.component';\r\nimport { SharedModule } from '../shared/shared.module';\r\nimport { MarkerComponent } from './marker/marker.component';\r\nimport { PopupComponent } from './popup/popup.component';\r\nimport { AdventureComponent } from './popup/adventure.component';\r\nimport { DealComponent } from './popup/deal.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n MapComponent,\r\n MarkerComponent,\r\n MarkerComponent,\r\n PopupComponent,\r\n DealComponent,\r\n AdventureComponent,\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedModule,\r\n WorldRoutingModule,\r\n ],\r\n})\r\nexport class WorldModule { }\r\n"],"names":[],"sourceRoot":"webpack:///"}