@twinmatrix/spatialverse-sdk-web 0.1.0 → 3.1.1

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.
Files changed (154) hide show
  1. package/README.md +1 -0
  2. package/lib/types/meta-atlas-sdk/3DMap/auth/authentication.d.ts +7 -0
  3. package/lib/types/meta-atlas-sdk/3DMap/auth/authentication.d.ts.map +1 -0
  4. package/lib/types/meta-atlas-sdk/3DMap/data/Constants.d.ts +17 -0
  5. package/lib/types/meta-atlas-sdk/3DMap/data/Constants.d.ts.map +1 -0
  6. package/lib/types/meta-atlas-sdk/3DMap/data/DataManager.d.ts +69 -0
  7. package/lib/types/meta-atlas-sdk/3DMap/data/DataManager.d.ts.map +1 -0
  8. package/lib/types/meta-atlas-sdk/3DMap/data/auth.d.ts +10 -0
  9. package/lib/types/meta-atlas-sdk/3DMap/data/auth.d.ts.map +1 -0
  10. package/lib/types/meta-atlas-sdk/3DMap/data/data.service.d.ts +12 -0
  11. package/lib/types/meta-atlas-sdk/3DMap/data/data.service.d.ts.map +1 -0
  12. package/lib/types/meta-atlas-sdk/3DMap/data/jewel-data.d.ts +8 -0
  13. package/lib/types/meta-atlas-sdk/3DMap/data/jewel-data.d.ts.map +1 -0
  14. package/lib/types/meta-atlas-sdk/3DMap/deckgl/DeckGLManager.d.ts +71 -0
  15. package/lib/types/meta-atlas-sdk/3DMap/deckgl/DeckGLManager.d.ts.map +1 -0
  16. package/lib/types/meta-atlas-sdk/3DMap/deckgl/MVTFloorLayer.d.ts +77 -0
  17. package/lib/types/meta-atlas-sdk/3DMap/deckgl/MVTFloorLayer.d.ts.map +1 -0
  18. package/lib/types/meta-atlas-sdk/3DMap/legacy/Changi.d.ts +1 -0
  19. package/lib/types/meta-atlas-sdk/3DMap/legacy/Changi.d.ts.map +1 -0
  20. package/lib/types/meta-atlas-sdk/3DMap/{CustomThreeJsWrapper → legacy/CustomThreeJsWrapper}/CustomThreeJsWrapper.d.ts +26 -3
  21. package/lib/types/meta-atlas-sdk/3DMap/legacy/CustomThreeJsWrapper/CustomThreeJsWrapper.d.ts.map +1 -0
  22. package/lib/types/meta-atlas-sdk/3DMap/legacy/DeckglLayerFactory.d.ts +322 -0
  23. package/lib/types/meta-atlas-sdk/3DMap/legacy/DeckglLayerFactory.d.ts.map +1 -0
  24. package/lib/types/meta-atlas-sdk/3DMap/legacy/DeckglLayerManager.d.ts +121 -0
  25. package/lib/types/meta-atlas-sdk/3DMap/legacy/DeckglLayerManager.d.ts.map +1 -0
  26. package/lib/types/meta-atlas-sdk/3DMap/legacy/EventEmitter.d.ts +10 -0
  27. package/lib/types/meta-atlas-sdk/3DMap/legacy/EventEmitter.d.ts.map +1 -0
  28. package/lib/types/meta-atlas-sdk/3DMap/legacy/Jewel.d.ts +35 -0
  29. package/lib/types/meta-atlas-sdk/3DMap/legacy/Jewel.d.ts.map +1 -0
  30. package/lib/types/meta-atlas-sdk/3DMap/legacy/MainMap.d.ts +314 -0
  31. package/lib/types/meta-atlas-sdk/3DMap/legacy/MainMap.d.ts.map +1 -0
  32. package/lib/types/meta-atlas-sdk/3DMap/legacy/Marker.d.ts +17 -0
  33. package/lib/types/meta-atlas-sdk/3DMap/legacy/Marker.d.ts.map +1 -0
  34. package/lib/types/meta-atlas-sdk/3DMap/legacy/MicrophoneBubbleFactory.d.ts +71 -0
  35. package/lib/types/meta-atlas-sdk/3DMap/legacy/MicrophoneBubbleFactory.d.ts.map +1 -0
  36. package/lib/types/meta-atlas-sdk/3DMap/legacy/aeroport.d.ts +6 -0
  37. package/lib/types/meta-atlas-sdk/3DMap/legacy/aeroport.d.ts.map +1 -0
  38. package/lib/types/meta-atlas-sdk/3DMap/legacy/deckgl-helper.d.ts +14 -0
  39. package/lib/types/meta-atlas-sdk/3DMap/legacy/deckgl-helper.d.ts.map +1 -0
  40. package/lib/types/meta-atlas-sdk/3DMap/legacy/helper-utils.d.ts +4 -0
  41. package/lib/types/meta-atlas-sdk/3DMap/legacy/helper-utils.d.ts.map +1 -0
  42. package/lib/types/meta-atlas-sdk/3DMap/legacy/hotspot-utils.d.ts +13 -0
  43. package/lib/types/meta-atlas-sdk/3DMap/legacy/hotspot-utils.d.ts.map +1 -0
  44. package/lib/types/meta-atlas-sdk/3DMap/legacy/loader.d.ts +3 -0
  45. package/lib/types/meta-atlas-sdk/3DMap/legacy/loader.d.ts.map +1 -0
  46. package/lib/types/meta-atlas-sdk/3DMap/legacy/mapIcons.d.ts +12 -0
  47. package/lib/types/meta-atlas-sdk/3DMap/legacy/mapIcons.d.ts.map +1 -0
  48. package/lib/types/meta-atlas-sdk/3DMap/legacy/markers.d.ts +4 -0
  49. package/lib/types/meta-atlas-sdk/3DMap/legacy/markers.d.ts.map +1 -0
  50. package/lib/types/meta-atlas-sdk/3DMap/legacy/timestampUtils.d.ts +6 -0
  51. package/lib/types/meta-atlas-sdk/3DMap/legacy/timestampUtils.d.ts.map +1 -0
  52. package/lib/types/meta-atlas-sdk/3DMap/legacy/types/aeroport-legacy.d.ts +65 -0
  53. package/lib/types/meta-atlas-sdk/3DMap/legacy/types/aeroport-legacy.d.ts.map +1 -0
  54. package/lib/types/meta-atlas-sdk/3DMap/legacy/types/apiParams.d.ts +25 -0
  55. package/lib/types/meta-atlas-sdk/3DMap/legacy/types/apiParams.d.ts.map +1 -0
  56. package/lib/types/meta-atlas-sdk/3DMap/legacy/types/cameraMatrix.d.ts +8 -0
  57. package/lib/types/meta-atlas-sdk/3DMap/legacy/types/cameraMatrix.d.ts.map +1 -0
  58. package/lib/types/meta-atlas-sdk/3DMap/legacy/types/extrusionSettings.d.ts +32 -0
  59. package/lib/types/meta-atlas-sdk/3DMap/legacy/types/extrusionSettings.d.ts.map +1 -0
  60. package/lib/types/meta-atlas-sdk/3DMap/legacy/types/marker-data.d.ts +12 -0
  61. package/lib/types/meta-atlas-sdk/3DMap/legacy/types/marker-data.d.ts.map +1 -0
  62. package/lib/types/meta-atlas-sdk/3DMap/legacy/types/modelSettings.d.ts +7 -0
  63. package/lib/types/meta-atlas-sdk/3DMap/legacy/types/modelSettings.d.ts.map +1 -0
  64. package/lib/types/meta-atlas-sdk/3DMap/legacy/types/panoramaSettings.d.ts +18 -0
  65. package/lib/types/meta-atlas-sdk/3DMap/legacy/types/panoramaSettings.d.ts.map +1 -0
  66. package/lib/types/meta-atlas-sdk/3DMap/meta-atlas-sdk-3D.d.ts +80 -0
  67. package/lib/types/meta-atlas-sdk/3DMap/meta-atlas-sdk-3D.d.ts.map +1 -0
  68. package/lib/types/meta-atlas-sdk/3DMap/threejs/ThreeJSManager.d.ts +92 -0
  69. package/lib/types/meta-atlas-sdk/3DMap/threejs/ThreeJSManager.d.ts.map +1 -0
  70. package/lib/types/meta-atlas-sdk/3DMap/threejs/utility/CameraSync.d.ts.map +1 -0
  71. package/lib/types/meta-atlas-sdk/3DMap/threejs/utility/CameraUtils.d.ts.map +1 -0
  72. package/lib/types/meta-atlas-sdk/3DMap/threejs/utility/constants.d.ts.map +1 -0
  73. package/lib/types/meta-atlas-sdk/3DMap/threejs/utility/suncalc.d.ts.map +1 -0
  74. package/lib/types/meta-atlas-sdk/3DMap/{CustomThreeJsWrapper → threejs}/utility/utils.d.ts +1 -1
  75. package/lib/types/meta-atlas-sdk/3DMap/threejs/utility/utils.d.ts.map +1 -0
  76. package/lib/types/meta-atlas-sdk/3DMap/types/aeroport.d.ts +14 -0
  77. package/lib/types/meta-atlas-sdk/3DMap/types/aeroport.d.ts.map +1 -0
  78. package/lib/types/meta-atlas-sdk/3DMap/types/render-manager.interface.d.ts +130 -0
  79. package/lib/types/meta-atlas-sdk/3DMap/types/render-manager.interface.d.ts.map +1 -0
  80. package/lib/types/meta-atlas-sdk/3DMap/utils/EventBus.d.ts +35 -0
  81. package/lib/types/meta-atlas-sdk/3DMap/utils/EventBus.d.ts.map +1 -0
  82. package/lib/types/meta-atlas-sdk/3DMap/utils/colors.d.ts +8 -0
  83. package/lib/types/meta-atlas-sdk/3DMap/utils/colors.d.ts.map +1 -0
  84. package/lib/types/meta-atlas-sdk/3DMap/utils/feature-transform.d.ts +12 -0
  85. package/lib/types/meta-atlas-sdk/3DMap/utils/feature-transform.d.ts.map +1 -0
  86. package/lib/types/meta-atlas-sdk/3DMap/utils/helper.d.ts +2 -0
  87. package/lib/types/meta-atlas-sdk/3DMap/utils/helper.d.ts.map +1 -0
  88. package/lib/types/meta-atlas-sdk/IfcModelLoader/index.d.ts +14 -0
  89. package/lib/types/meta-atlas-sdk/IfcModelLoader/index.d.ts.map +1 -0
  90. package/lib/types/meta-atlas-sdk/MetaAtlasCore/custom-map-objects-manager.d.ts +57 -0
  91. package/lib/types/meta-atlas-sdk/MetaAtlasCore/custom-map-objects-manager.d.ts.map +1 -0
  92. package/lib/types/meta-atlas-sdk/MetaAtlasCore/focus-core/focus-tree-state.d.ts +4 -0
  93. package/lib/types/meta-atlas-sdk/MetaAtlasCore/focus-core/focus-tree-state.d.ts.map +1 -0
  94. package/lib/types/meta-atlas-sdk/MetaAtlasCore/focus-core/focus-tree-types.d.ts +45 -0
  95. package/lib/types/meta-atlas-sdk/MetaAtlasCore/focus-core/focus-tree-types.d.ts.map +1 -0
  96. package/lib/types/meta-atlas-sdk/MetaAtlasCore/focus-core/focus-tree-utils.d.ts +72 -0
  97. package/lib/types/meta-atlas-sdk/MetaAtlasCore/focus-core/focus-tree-utils.d.ts.map +1 -0
  98. package/lib/types/meta-atlas-sdk/MetaAtlasCore/{focustree.d.ts → focus-core/focustree.d.ts} +376 -131
  99. package/lib/types/meta-atlas-sdk/MetaAtlasCore/focus-core/focustree.d.ts.map +1 -0
  100. package/lib/types/meta-atlas-sdk/MetaAtlasCore/focus-core/index.d.ts +661 -0
  101. package/lib/types/meta-atlas-sdk/MetaAtlasCore/focus-core/index.d.ts.map +1 -0
  102. package/lib/types/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.d.ts +37 -407
  103. package/lib/types/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.d.ts.map +1 -1
  104. package/lib/types/meta-atlas-sdk/MetaAtlasCore/routing-core/routing-helpers.d.ts.map +1 -1
  105. package/lib/types/meta-atlas-sdk/{customerLayer.d.ts → MetaAtlasCore/shared-layers/customerLayer.d.ts} +530 -536
  106. package/lib/types/meta-atlas-sdk/{customerLayer.d.ts.map → MetaAtlasCore/shared-layers/customerLayer.d.ts.map} +1 -1
  107. package/lib/types/meta-atlas-sdk/MetaAtlasCore/shared-layers/customerLayerService.d.ts +108 -0
  108. package/lib/types/meta-atlas-sdk/MetaAtlasCore/shared-layers/customerLayerService.d.ts.map +1 -0
  109. package/lib/types/meta-atlas-sdk/meta-atlas-sdk.d.ts +52 -413
  110. package/lib/types/meta-atlas-sdk/meta-atlas-sdk.d.ts.map +1 -1
  111. package/lib/types/meta-atlas-sdk/utils/helpers.d.ts.map +1 -1
  112. package/lib/types/meta-atlas-sdk/utils/mapobjects-store.d.ts +5 -0
  113. package/lib/types/meta-atlas-sdk/utils/mapobjects-store.d.ts.map +1 -1
  114. package/lib/types/react/MetaAtlasMap.d.ts.map +1 -1
  115. package/lib/types/react/hooks/useCustomMapObject/index.d.ts +3 -0
  116. package/lib/types/react/hooks/useCustomMapObject/index.d.ts.map +1 -0
  117. package/lib/types/react/hooks/useCustomMapObject/types.d.ts +30 -0
  118. package/lib/types/react/hooks/useCustomMapObject/types.d.ts.map +1 -0
  119. package/lib/types/react/hooks/useFocus/index.d.ts.map +1 -1
  120. package/lib/types/react/hooks/useFocus/types.d.ts +11 -0
  121. package/lib/types/react/hooks/useFocus/types.d.ts.map +1 -1
  122. package/lib/types/react/hooks/useMapEvents/index.d.ts.map +1 -1
  123. package/lib/types/react/hooks/useMapOverlays/index.d.ts.map +1 -1
  124. package/lib/types/react/hooks/useMapOverlays/types.d.ts +16 -0
  125. package/lib/types/react/hooks/useMapOverlays/types.d.ts.map +1 -1
  126. package/lib/types/react/hooks/useMetaAtlas/index.d.ts.map +1 -1
  127. package/lib/types/react/index.d.ts +3 -0
  128. package/lib/types/react/index.d.ts.map +1 -1
  129. package/lib/types/react/stores/useMapDataStore.d.ts +2 -0
  130. package/lib/types/react/stores/useMapDataStore.d.ts.map +1 -1
  131. package/lib/types/react/stores/useMetaAtlasStore.d.ts +2 -0
  132. package/lib/types/react/stores/useMetaAtlasStore.d.ts.map +1 -1
  133. package/lib/types/react/types/index.d.ts +8 -0
  134. package/lib/types/react/types/index.d.ts.map +1 -1
  135. package/package.json +18 -9
  136. package/lib/cjs/index.js +0 -642
  137. package/lib/cjs/react/index.js +0 -642
  138. package/lib/esm/index.js +0 -642
  139. package/lib/esm/react/index.js +0 -642
  140. package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.d.ts.map +0 -1
  141. package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraSync.d.ts.map +0 -1
  142. package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraUtils.d.ts.map +0 -1
  143. package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/constants.d.ts.map +0 -1
  144. package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/suncalc.d.ts.map +0 -1
  145. package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.d.ts.map +0 -1
  146. package/lib/types/meta-atlas-sdk/3DMap/MainMap.d.ts +0 -28
  147. package/lib/types/meta-atlas-sdk/3DMap/MainMap.d.ts.map +0 -1
  148. package/lib/types/meta-atlas-sdk/MetaAtlasCore/focustree.d.ts.map +0 -1
  149. package/lib/types/meta-atlas-sdk/customerLayerVariant.d.ts +0 -5156
  150. package/lib/types/meta-atlas-sdk/customerLayerVariant.d.ts.map +0 -1
  151. /package/lib/types/meta-atlas-sdk/3DMap/{CustomThreeJsWrapper → threejs}/utility/CameraSync.d.ts +0 -0
  152. /package/lib/types/meta-atlas-sdk/3DMap/{CustomThreeJsWrapper → threejs}/utility/CameraUtils.d.ts +0 -0
  153. /package/lib/types/meta-atlas-sdk/3DMap/{CustomThreeJsWrapper → threejs}/utility/constants.d.ts +0 -0
  154. /package/lib/types/meta-atlas-sdk/3DMap/{CustomThreeJsWrapper → threejs}/utility/suncalc.d.ts +0 -0
@@ -1,642 +0,0 @@
1
- import{jsx as e}from"react/jsx-runtime";import t,{useMemo as n,useRef as r,useEffect as o,useCallback as i}from"react";import{Map as a}from"react-map-gl/maplibre";import*as s from"maplibre-gl";import l,{Popup as c,Marker as u}from"maplibre-gl";import"maplibre-gl/dist/maplibre-gl.css";import h from"@mapbox/geojson-extent";import*as p from"three";import{Group as f,Matrix4 as d,Vector3 as m,OrthographicCamera as g,Quaternion as y,Scene as v,WebGLRenderer as w,ACESFilmicToneMapping as b,SRGBColorSpace as _,PerspectiveCamera as x,DirectionalLight as E,HemisphereLight as T,AmbientLight as S,Vector2 as C,ExtrudeGeometry as P,Shape as O,Path as A,Mesh as k,Box3 as L,Object3D as I}from"three";import"gsap";import"three/examples/jsm/loaders/GLTFLoader";import{Text as M}from"troika-three-text";import j from"three-spritetext";import{createRoot as R}from"react-dom/client";function F(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;var D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var N,B={};
2
- /*!
3
- * jQuery JavaScript Library v3.7.1
4
- * https://jquery.com/
5
- *
6
- * Copyright OpenJS Foundation and other contributors
7
- * Released under the MIT license
8
- * https://jquery.org/license
9
- *
10
- * Date: 2023-08-28T13:37Z
11
- */
12
- N={get exports(){return B},set exports(e){B=e}},function(e,t){N.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}}("undefined"!=typeof window?window:D,function(e,t){var n=[],r=Object.getPrototypeOf,o=n.slice,i=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},a=n.push,s=n.indexOf,l={},c=l.toString,u=l.hasOwnProperty,h=u.toString,p=h.call(Object),f={},d=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},m=function(e){return null!=e&&e===e.window},g=e.document,y={type:!0,src:!0,nonce:!0,noModule:!0};function v(e,t,n){var r,o,i=(n=n||g).createElement("script");if(i.text=e,t)for(r in y)(o=t[r]||t.getAttribute&&t.getAttribute(r))&&i.setAttribute(r,o);n.head.appendChild(i).parentNode.removeChild(i)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.7.1",_=/HTML$/i,x=function(e,t){return new x.fn.init(e,t)};function E(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!d(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function T(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}x.fn=x.prototype={jquery:b,constructor:x,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return x.each(this,e)},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(x.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(x.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},x.extend=x.fn.extend=function(){var e,t,n,r,o,i,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||d(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(c&&r&&(x.isPlainObject(r)||(o=Array.isArray(r)))?(n=a[t],i=o&&!Array.isArray(n)?[]:o||x.isPlainObject(n)?n:{},o=!1,a[t]=x.extend(c,i,r)):void 0!==r&&(a[t]=r));return a},x.extend({expando:"jQuery"+(b+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e)||(t=r(e))&&("function"!=typeof(n=u.call(t,"constructor")&&t.constructor)||h.call(n)!==p))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){v(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(E(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,o=e.nodeType;if(!o)for(;t=e[r++];)n+=x.text(t);return 1===o||11===o?e.textContent:9===o?e.documentElement.textContent:3===o||4===o?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(E(Object(e))?x.merge(n,"string"==typeof e?[e]:e):a.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:s.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!_.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,o=e.length;r<n;r++)e[o++]=t[r];return e.length=o,e},grep:function(e,t,n){for(var r=[],o=0,i=e.length,a=!n;o<i;o++)!t(e[o],o)!==a&&r.push(e[o]);return r},map:function(e,t,n){var r,o,a=0,s=[];if(E(e))for(r=e.length;a<r;a++)null!=(o=t(e[a],a,n))&&s.push(o);else for(a in e)null!=(o=t(e[a],a,n))&&s.push(o);return i(s)},guid:1,support:f}),"function"==typeof Symbol&&(x.fn[Symbol.iterator]=n[Symbol.iterator]),x.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});var S=n.pop,C=n.sort,P=n.splice,O="[\\x20\\t\\r\\n\\f]",A=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g");x.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var k=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function L(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}x.escapeSelector=function(e){return(e+"").replace(k,L)};var I=g,M=a;!function(){var t,r,i,a,l,c,h,p,d,m,g=M,y=x.expando,v=0,w=0,b=ee(),_=ee(),E=ee(),k=ee(),L=function(e,t){return e===t&&(l=!0),0},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="(?:\\\\[\\da-fA-F]{1,6}"+O+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",F="\\["+O+"*("+R+")(?:"+O+"*([*^$|!~]?=)"+O+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+O+"*\\]",D=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+F+")*)|.*)\\)|)",z=new RegExp(O+"+","g"),N=new RegExp("^"+O+"*,"+O+"*"),B=new RegExp("^"+O+"*([>+~]|"+O+")"+O+"*"),U=new RegExp(O+"|>"),W=new RegExp(D),$=new RegExp("^"+R+"$"),H={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+D),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+O+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,G=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Y=new RegExp("\\\\[\\da-fA-F]{1,6}"+O+"?|\\\\([^\\r\\n\\f])","g"),X=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},Z=function(){le()},K=pe(function(e){return!0===e.disabled&&T(e,"fieldset")},{dir:"parentNode",next:"legend"});try{g.apply(n=o.call(I.childNodes),I.childNodes),n[I.childNodes.length].nodeType}catch(e){g={apply:function(e,t){M.apply(e,o.call(t))},call:function(e){M.apply(e,o.call(arguments,1))}}}function Q(e,t,n,r){var o,i,a,s,l,u,h,m=t&&t.ownerDocument,v=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==v&&9!==v&&11!==v)return n;if(!r&&(le(t),t=t||c,p)){if(11!==v&&(l=G.exec(e)))if(o=l[1]){if(9===v){if(!(a=t.getElementById(o)))return n;if(a.id===o)return g.call(n,a),n}else if(m&&(a=m.getElementById(o))&&Q.contains(t,a)&&a.id===o)return g.call(n,a),n}else{if(l[2])return g.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&t.getElementsByClassName)return g.apply(n,t.getElementsByClassName(o)),n}if(!(k[e+" "]||d&&d.test(e))){if(h=e,m=t,1===v&&(U.test(e)||B.test(e))){for((m=J.test(e)&&se(t.parentNode)||t)==t&&f.scope||((s=t.getAttribute("id"))?s=x.escapeSelector(s):t.setAttribute("id",s=y)),i=(u=ue(e)).length;i--;)u[i]=(s?"#"+s:":scope")+" "+he(u[i]);h=u.join(",")}try{return g.apply(n,m.querySelectorAll(h)),n}catch(t){k(e,!0)}finally{s===y&&t.removeAttribute("id")}}}return ve(e.replace(A,"$1"),t,n,r)}function ee(){var e=[];return function t(n,o){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=o}}function te(e){return e[y]=!0,e}function ne(e){var t=c.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function re(e){return function(t){return T(t,"input")&&t.type===e}}function oe(e){return function(t){return(T(t,"input")||T(t,"button"))&&t.type===e}}function ie(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&K(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ae(e){return te(function(t){return t=+t,te(function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))})})}function se(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var t,n=e?e.ownerDocument||e:I;return n!=c&&9===n.nodeType&&n.documentElement?(h=(c=n).documentElement,p=!x.isXMLDoc(c),m=h.matches||h.webkitMatchesSelector||h.msMatchesSelector,h.msMatchesSelector&&I!=c&&(t=c.defaultView)&&t.top!==t&&t.addEventListener("unload",Z),f.getById=ne(function(e){return h.appendChild(e).id=x.expando,!c.getElementsByName||!c.getElementsByName(x.expando).length}),f.disconnectedMatch=ne(function(e){return m.call(e,"*")}),f.scope=ne(function(){return c.querySelectorAll(":scope")}),f.cssHas=ne(function(){try{return c.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),f.getById?(r.filter.ID=function(e){var t=e.replace(Y,X);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&p){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Y,X);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&p){var n,r,o,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(o=t.getElementsByName(e),r=0;i=o[r++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),r.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},r.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&p)return t.getElementsByClassName(e)},d=[],ne(function(e){var t;h.appendChild(e).innerHTML="<a id='"+y+"' href='' disabled='disabled'></a><select id='"+y+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+O+"*(?:value|"+j+")"),e.querySelectorAll("[id~="+y+"-]").length||d.push("~="),e.querySelectorAll("a#"+y+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=c.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=c.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+O+"*name"+O+"*="+O+"*(?:''|\"\")")}),f.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),L=function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!f.sortDetached&&t.compareDocumentPosition(e)===n?e===c||e.ownerDocument==I&&Q.contains(I,e)?-1:t===c||t.ownerDocument==I&&Q.contains(I,t)?1:a?s.call(a,e)-s.call(a,t):0:4&n?-1:1)},c):c}for(t in Q.matches=function(e,t){return Q(e,null,null,t)},Q.matchesSelector=function(e,t){if(le(e),p&&!k[t+" "]&&(!d||!d.test(t)))try{var n=m.call(e,t);if(n||f.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){k(t,!0)}return Q(t,c,null,[e]).length>0},Q.contains=function(e,t){return(e.ownerDocument||e)!=c&&le(e),x.contains(e,t)},Q.attr=function(e,t){(e.ownerDocument||e)!=c&&le(e);var n=r.attrHandle[t.toLowerCase()],o=n&&u.call(r.attrHandle,t.toLowerCase())?n(e,t,!p):void 0;return void 0!==o?o:e.getAttribute(t)},Q.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},x.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!f.sortStable,a=!f.sortStable&&o.call(e,0),C.call(e,L),l){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)P.call(e,n[r],1)}return a=null,e},x.fn.uniqueSort=function(){return this.pushStack(x.uniqueSort(o.apply(this)))},r=x.expr={cacheLength:50,createPseudo:te,match:H,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Y,X),e[3]=(e[3]||e[4]||e[5]||"").replace(Y,X),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Q.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Q.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return H.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&W.test(n)&&(t=ue(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Y,X).toLowerCase();return"*"===e?function(){return!0}:function(e){return T(e,t)}},CLASS:function(e){var t=b[e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&b(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var o=Q.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o.replace(z," ")+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var c,u,h,p,f,d=i!==a?"nextSibling":"previousSibling",m=t.parentNode,g=s&&t.nodeName.toLowerCase(),w=!l&&!s,b=!1;if(m){if(i){for(;d;){for(h=t;h=h[d];)if(s?T(h,g):1===h.nodeType)return!1;f=d="only"===e&&!f&&"nextSibling"}return!0}if(f=[a?m.firstChild:m.lastChild],a&&w){for(b=(p=(c=(u=m[y]||(m[y]={}))[e]||[])[0]===v&&c[1])&&c[2],h=p&&m.childNodes[p];h=++p&&h&&h[d]||(b=p=0)||f.pop();)if(1===h.nodeType&&++b&&h===t){u[e]=[v,p,b];break}}else if(w&&(b=p=(c=(u=t[y]||(t[y]={}))[e]||[])[0]===v&&c[1]),!1===b)for(;(h=++p&&h&&h[d]||(b=p=0)||f.pop())&&(!(s?T(h,g):1===h.nodeType)||!++b||(w&&((u=h[y]||(h[y]={}))[e]=[v,b]),h!==t)););return(b-=o)===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,t){var n,o=r.pseudos[e]||r.setFilters[e.toLowerCase()]||Q.error("unsupported pseudo: "+e);return o[y]?o(t):o.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?te(function(e,n){for(var r,i=o(e,t),a=i.length;a--;)e[r=s.call(e,i[a])]=!(n[r]=i[a])}):function(e){return o(e,0,n)}):o}},pseudos:{not:te(function(e){var t=[],n=[],r=ye(e.replace(A,"$1"));return r[y]?te(function(e,t,n,o){for(var i,a=r(e,null,o,[]),s=e.length;s--;)(i=a[s])&&(e[s]=!(t[s]=i))}):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}}),has:te(function(e){return function(t){return Q(e,t).length>0}}),contains:te(function(e){return e=e.replace(Y,X),function(t){return(t.textContent||x.text(t)).indexOf(e)>-1}}),lang:te(function(e){return $.test(e||"")||Q.error("unsupported lang: "+e),e=e.replace(Y,X).toLowerCase(),function(t){var n;do{if(n=p?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===function(){try{return c.activeElement}catch(e){}}()&&c.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:ie(!1),disabled:ie(!0),checked:function(e){return T(e,"input")&&!!e.checked||T(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return q.test(e.nodeName)},input:function(e){return V.test(e.nodeName)},button:function(e){return T(e,"input")&&"button"===e.type||T(e,"button")},text:function(e){var t;return T(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ae(function(){return[0]}),last:ae(function(e,t){return[t-1]}),eq:ae(function(e,t,n){return[n<0?n+t:n]}),even:ae(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ae(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ae(function(e,t,n){var r;for(r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e}),gt:ae(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},r.pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=re(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=oe(t);function ce(){}function ue(e,t){var n,o,i,a,s,l,c,u=_[e+" "];if(u)return t?0:u.slice(0);for(s=e,l=[],c=r.preFilter;s;){for(a in n&&!(o=N.exec(s))||(o&&(s=s.slice(o[0].length)||s),l.push(i=[])),n=!1,(o=B.exec(s))&&(n=o.shift(),i.push({value:n,type:o[0].replace(A," ")}),s=s.slice(n.length)),r.filter)!(o=H[a].exec(s))||c[a]&&!(o=c[a](o))||(n=o.shift(),i.push({value:n,type:a,matches:o}),s=s.slice(n.length));if(!n)break}return t?s.length:s?Q.error(e):_(e,l).slice(0)}function he(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function pe(e,t,n){var r=t.dir,o=t.next,i=o||r,a=n&&"parentNode"===i,s=w++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,o);return!1}:function(t,n,l){var c,u,h=[v,s];if(l){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(u=t[y]||(t[y]={}),o&&T(t,o))t=t[r]||t;else{if((c=u[i])&&c[0]===v&&c[1]===s)return h[2]=c[2];if(u[i]=h,h[2]=e(t,n,l))return!0}return!1}}function fe(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function de(e,t,n,r,o){for(var i,a=[],s=0,l=e.length,c=null!=t;s<l;s++)(i=e[s])&&(n&&!n(i,r,o)||(a.push(i),c&&t.push(s)));return a}function me(e,t,n,r,o,i){return r&&!r[y]&&(r=me(r)),o&&!o[y]&&(o=me(o,i)),te(function(i,a,l,c){var u,h,p,f,d=[],m=[],y=a.length,v=i||function(e,t,n){for(var r=0,o=t.length;r<o;r++)Q(e,t[r],n);return n}(t||"*",l.nodeType?[l]:l,[]),w=!e||!i&&t?v:de(v,d,e,l,c);if(n?n(w,f=o||(i?e:y||r)?[]:a,l,c):f=w,r)for(u=de(f,m),r(u,[],l,c),h=u.length;h--;)(p=u[h])&&(f[m[h]]=!(w[m[h]]=p));if(i){if(o||e){if(o){for(u=[],h=f.length;h--;)(p=f[h])&&u.push(w[h]=p);o(null,f=[],u,c)}for(h=f.length;h--;)(p=f[h])&&(u=o?s.call(i,p):d[h])>-1&&(i[u]=!(a[u]=p))}}else f=de(f===a?f.splice(y,f.length):f),o?o(null,a,f,c):g.apply(a,f)})}function ge(e){for(var t,n,o,a=e.length,l=r.relative[e[0].type],c=l||r.relative[" "],u=l?1:0,h=pe(function(e){return e===t},c,!0),p=pe(function(e){return s.call(t,e)>-1},c,!0),f=[function(e,n,r){var o=!l&&(r||n!=i)||((t=n).nodeType?h(e,n,r):p(e,n,r));return t=null,o}];u<a;u++)if(n=r.relative[e[u].type])f=[pe(fe(f),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[y]){for(o=++u;o<a&&!r.relative[e[o].type];o++);return me(u>1&&fe(f),u>1&&he(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(A,"$1"),n,u<o&&ge(e.slice(u,o)),o<a&&ge(e=e.slice(o)),o<a&&he(e))}f.push(n)}return fe(f)}function ye(e,t){var n,o=[],a=[],s=E[e+" "];if(!s){for(t||(t=ue(e)),n=t.length;n--;)(s=ge(t[n]))[y]?o.push(s):a.push(s);s=E(e,function(e,t){var n=t.length>0,o=e.length>0,a=function(a,s,l,u,h){var f,d,m,y=0,w="0",b=a&&[],_=[],E=i,T=a||o&&r.find.TAG("*",h),C=v+=null==E?1:Math.random()||.1,P=T.length;for(h&&(i=s==c||s||h);w!==P&&null!=(f=T[w]);w++){if(o&&f){for(d=0,s||f.ownerDocument==c||(le(f),l=!p);m=e[d++];)if(m(f,s||c,l)){g.call(u,f);break}h&&(v=C)}n&&((f=!m&&f)&&y--,a&&b.push(f))}if(y+=w,n&&w!==y){for(d=0;m=t[d++];)m(b,_,s,l);if(a){if(y>0)for(;w--;)b[w]||_[w]||(_[w]=S.call(u));_=de(_)}g.apply(u,_),h&&!a&&_.length>0&&y+t.length>1&&x.uniqueSort(u)}return h&&(v=C,i=E),b};return n?te(a):a}(a,o)),s.selector=e}return s}function ve(e,t,n,o){var i,a,s,l,c,u="function"==typeof e&&e,h=!o&&ue(e=u.selector||e);if(n=n||[],1===h.length){if((a=h[0]=h[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===t.nodeType&&p&&r.relative[a[1].type]){if(!(t=(r.find.ID(s.matches[0].replace(Y,X),t)||[])[0]))return n;u&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(i=H.needsContext.test(e)?0:a.length;i--&&(s=a[i],!r.relative[l=s.type]);)if((c=r.find[l])&&(o=c(s.matches[0].replace(Y,X),J.test(a[0].type)&&se(t.parentNode)||t))){if(a.splice(i,1),!(e=o.length&&he(a)))return g.apply(n,o),n;break}}return(u||ye(e,h))(o,t,!p,n,!t||J.test(e)&&se(t.parentNode)||t),n}ce.prototype=r.filters=r.pseudos,r.setFilters=new ce,f.sortStable=y.split("").sort(L).join("")===y,le(),f.sortDetached=ne(function(e){return 1&e.compareDocumentPosition(c.createElement("fieldset"))}),x.find=Q,x.expr[":"]=x.expr.pseudos,x.unique=x.uniqueSort,Q.compile=ye,Q.select=ve,Q.setDocument=le,Q.tokenize=ue,Q.escape=x.escapeSelector,Q.getText=x.text,Q.isXML=x.isXMLDoc,Q.selectors=x.expr,Q.support=x.support,Q.uniqueSort=x.uniqueSort}();var j=function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&x(e).is(n))break;r.push(e)}return r},R=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},F=x.expr.match.needsContext,D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function z(e,t,n){return d(t)?x.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?x.grep(e,function(e){return e===t!==n}):"string"!=typeof t?x.grep(e,function(e){return s.call(t,e)>-1!==n}):x.filter(t,e,n)}x.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},x.fn.extend({find:function(e){var t,n,r=this.length,o=this;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;t<r;t++)if(x.contains(o[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)x.find(e,o[t],n);return r>1?x.uniqueSort(n):n},filter:function(e){return this.pushStack(z(this,e||[],!1))},not:function(e){return this.pushStack(z(this,e||[],!0))},is:function(e){return!!z(this,"string"==typeof e&&F.test(e)?x(e):e||[],!1).length}});var N,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||N,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:B.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),D.test(r[1])&&x.isPlainObject(t))for(r in t)d(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(o=g.getElementById(r[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):d(e)?void 0!==n.ready?n.ready(e):e(x):x.makeArray(e,this)}).prototype=x.fn,N=x(g);var U=/^(?:parents|prev(?:Until|All))/,W={children:!0,contents:!0,next:!0,prev:!0};function $(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}x.fn.extend({has:function(e){var t=x(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(x.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,o=this.length,i=[],a="string"!=typeof e&&x(e);if(!F.test(e))for(;r<o;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?x.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?s.call(x(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return j(e,"parentNode")},parentsUntil:function(e,t,n){return j(e,"parentNode",n)},next:function(e){return $(e,"nextSibling")},prev:function(e){return $(e,"previousSibling")},nextAll:function(e){return j(e,"nextSibling")},prevAll:function(e){return j(e,"previousSibling")},nextUntil:function(e,t,n){return j(e,"nextSibling",n)},prevUntil:function(e,t,n){return j(e,"previousSibling",n)},siblings:function(e){return R((e.parentNode||{}).firstChild,e)},children:function(e){return R(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(T(e,"template")&&(e=e.content||e),x.merge([],e.childNodes))}},function(e,t){x.fn[e]=function(n,r){var o=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=x.filter(r,o)),this.length>1&&(W[e]||x.uniqueSort(o),U.test(e)&&o.reverse()),this.pushStack(o)}});var H=/[^\x20\t\r\n\f]+/g;function V(e){return e}function q(e){throw e}function G(e,t,n,r){var o;try{e&&d(o=e.promise)?o.call(e).done(t).fail(n):e&&d(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}x.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return x.each(e.match(H)||[],function(e,n){t[n]=!0}),t}(e):x.extend({},e);var t,n,r,o,i=[],a=[],s=-1,l=function(){for(o=o||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<i.length;)!1===i[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=i.length,n=!1);e.memory||(n=!1),t=!1,o&&(i=n?[]:"")},c={add:function(){return i&&(n&&!t&&(s=i.length-1,a.push(n)),function t(n){x.each(n,function(n,r){d(r)?e.unique&&c.has(r)||i.push(r):r&&r.length&&"string"!==w(r)&&t(r)})}(arguments),n&&!t&&l()),this},remove:function(){return x.each(arguments,function(e,t){for(var n;(n=x.inArray(t,i,n))>-1;)i.splice(n,1),n<=s&&s--}),this},has:function(e){return e?x.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=a=[],n||t||(i=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},x.extend({Deferred:function(t){var n=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],r="pending",o={state:function(){return r},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return x.Deferred(function(t){x.each(n,function(n,r){var o=d(e[r[4]])&&e[r[4]];i[r[1]](function(){var e=o&&o.apply(this,arguments);e&&d(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,o?[e]:arguments)})}),e=null}).promise()},then:function(t,r,o){var i=0;function a(t,n,r,o){return function(){var s=this,l=arguments,c=function(){var e,c;if(!(t<i)){if((e=r.apply(s,l))===n.promise())throw new TypeError("Thenable self-resolution");c=e&&("object"==typeof e||"function"==typeof e)&&e.then,d(c)?o?c.call(e,a(i,n,V,o),a(i,n,q,o)):(i++,c.call(e,a(i,n,V,o),a(i,n,q,o),a(i,n,V,n.notifyWith))):(r!==V&&(s=void 0,l=[e]),(o||n.resolveWith)(s,l))}},u=o?c:function(){try{c()}catch(e){x.Deferred.exceptionHook&&x.Deferred.exceptionHook(e,u.error),t+1>=i&&(r!==q&&(s=void 0,l=[e]),n.rejectWith(s,l))}};t?u():(x.Deferred.getErrorHook?u.error=x.Deferred.getErrorHook():x.Deferred.getStackHook&&(u.error=x.Deferred.getStackHook()),e.setTimeout(u))}}return x.Deferred(function(e){n[0][3].add(a(0,e,d(o)?o:V,e.notifyWith)),n[1][3].add(a(0,e,d(t)?t:V)),n[2][3].add(a(0,e,d(r)?r:q))}).promise()},promise:function(e){return null!=e?x.extend(e,o):o}},i={};return x.each(n,function(e,t){var a=t[2],s=t[5];o[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),i[t[0]]=function(){return i[t[0]+"With"](this===i?void 0:this,arguments),this},i[t[0]+"With"]=a.fireWith}),o.promise(i),t&&t.call(i,i),i},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=x.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&(G(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||d(i[n]&&i[n].then)))return a.then();for(;n--;)G(i[n],s(n),a.reject);return a.promise()}});var J=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&J.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},x.readyException=function(t){e.setTimeout(function(){throw t})};var Y=x.Deferred();function X(){g.removeEventListener("DOMContentLoaded",X),e.removeEventListener("load",X),x.ready()}x.fn.ready=function(e){return Y.then(e).catch(function(e){x.readyException(e)}),this},x.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--x.readyWait:x.isReady)||(x.isReady=!0,!0!==e&&--x.readyWait>0||Y.resolveWith(g,[x]))}}),x.ready.then=Y.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?e.setTimeout(x.ready):(g.addEventListener("DOMContentLoaded",X),e.addEventListener("load",X));var Z=function(e,t,n,r,o,i,a){var s=0,l=e.length,c=null==n;if("object"===w(n))for(s in o=!0,n)Z(e,t,s,n[s],!0,i,a);else if(void 0!==r&&(o=!0,d(r)||(a=!0),c&&(a?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(x(e),n)})),t))for(;s<l;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return o?e:c?t.call(e):l?t(e[0],n):i},K=/^-ms-/,Q=/-([a-z])/g;function ee(e,t){return t.toUpperCase()}function te(e){return e.replace(K,"ms-").replace(Q,ee)}var ne=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function re(){this.expando=x.expando+re.uid++}re.uid=1,re.prototype={cache:function(e){var t=e[this.expando];return t||(t={},ne(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,o=this.cache(e);if("string"==typeof t)o[te(t)]=n;else for(r in t)o[te(r)]=t[r];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][te(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(te):(t=te(t))in r?[t]:t.match(H)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||x.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!x.isEmptyObject(t)}};var oe=new re,ie=new re,ae=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,se=/[A-Z]/g;function le(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(se,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ae.test(e)?JSON.parse(e):e)}(n)}catch(e){}ie.set(e,t,n)}else n=void 0;return n}x.extend({hasData:function(e){return ie.hasData(e)||oe.hasData(e)},data:function(e,t,n){return ie.access(e,t,n)},removeData:function(e,t){ie.remove(e,t)},_data:function(e,t,n){return oe.access(e,t,n)},_removeData:function(e,t){oe.remove(e,t)}}),x.fn.extend({data:function(e,t){var n,r,o,i=this[0],a=i&&i.attributes;if(void 0===e){if(this.length&&(o=ie.get(i),1===i.nodeType&&!oe.get(i,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=te(r.slice(5)),le(i,r,o[r]));oe.set(i,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){ie.set(this,e)}):Z(this,function(t){var n;if(i&&void 0===t)return void 0!==(n=ie.get(i,e))||void 0!==(n=le(i,e))?n:void 0;this.each(function(){ie.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ie.remove(this,e)})}}),x.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=oe.get(e,t),n&&(!r||Array.isArray(n)?r=oe.access(e,t,x.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,o=n.shift(),i=x._queueHooks(e,t);"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,function(){x.dequeue(e,t)},i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return oe.get(e,n)||oe.access(e,n,{empty:x.Callbacks("once memory").add(function(){oe.remove(e,[t+"queue",n])})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?x.queue(this[0],e):void 0===t?this:this.each(function(){var n=x.queue(this,e,t);x._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,o=x.Deferred(),i=this,a=this.length,s=function(){--r||o.resolveWith(i,[i])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=oe.get(i[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),o.promise(t)}});var ce=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ue=new RegExp("^(?:([+-])=|)("+ce+")([a-z%]*)$","i"),he=["Top","Right","Bottom","Left"],pe=g.documentElement,fe=function(e){return x.contains(e.ownerDocument,e)},de={composed:!0};pe.getRootNode&&(fe=function(e){return x.contains(e.ownerDocument,e)||e.getRootNode(de)===e.ownerDocument});var me=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&fe(e)&&"none"===x.css(e,"display")};function ge(e,t,n,r){var o,i,a=20,s=r?function(){return r.cur()}:function(){return x.css(e,t,"")},l=s(),c=n&&n[3]||(x.cssNumber[t]?"":"px"),u=e.nodeType&&(x.cssNumber[t]||"px"!==c&&+l)&&ue.exec(x.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;a--;)x.style(e,t,u+c),(1-i)*(1-(i=s()/l||.5))<=0&&(a=0),u/=i;u*=2,x.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=u,r.end=o)),o}var ye={};function ve(e){var t,n=e.ownerDocument,r=e.nodeName,o=ye[r];return o||(t=n.body.appendChild(n.createElement(r)),o=x.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),ye[r]=o,o)}function we(e,t){for(var n,r,o=[],i=0,a=e.length;i<a;i++)(r=e[i]).style&&(n=r.style.display,t?("none"===n&&(o[i]=oe.get(r,"display")||null,o[i]||(r.style.display="")),""===r.style.display&&me(r)&&(o[i]=ve(r))):"none"!==n&&(o[i]="none",oe.set(r,"display",n)));for(i=0;i<a;i++)null!=o[i]&&(e[i].style.display=o[i]);return e}x.fn.extend({show:function(){return we(this,!0)},hide:function(){return we(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){me(this)?x(this).show():x(this).hide()})}});var be,_e,xe=/^(?:checkbox|radio)$/i,Ee=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Te=/^$|^module$|\/(?:java|ecma)script/i;be=g.createDocumentFragment().appendChild(g.createElement("div")),(_e=g.createElement("input")).setAttribute("type","radio"),_e.setAttribute("checked","checked"),_e.setAttribute("name","t"),be.appendChild(_e),f.checkClone=be.cloneNode(!0).cloneNode(!0).lastChild.checked,be.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!be.cloneNode(!0).lastChild.defaultValue,be.innerHTML="<option></option>",f.option=!!be.lastChild;var Se={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Ce(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&T(e,t)?x.merge([e],n):n}function Pe(e,t){for(var n=0,r=e.length;n<r;n++)oe.set(e[n],"globalEval",!t||oe.get(t[n],"globalEval"))}Se.tbody=Se.tfoot=Se.colgroup=Se.caption=Se.thead,Se.th=Se.td,f.option||(Se.optgroup=Se.option=[1,"<select multiple='multiple'>","</select>"]);var Oe=/<|&#?\w+;/;function Ae(e,t,n,r,o){for(var i,a,s,l,c,u,h=t.createDocumentFragment(),p=[],f=0,d=e.length;f<d;f++)if((i=e[f])||0===i)if("object"===w(i))x.merge(p,i.nodeType?[i]:i);else if(Oe.test(i)){for(a=a||h.appendChild(t.createElement("div")),s=(Ee.exec(i)||["",""])[1].toLowerCase(),l=Se[s]||Se._default,a.innerHTML=l[1]+x.htmlPrefilter(i)+l[2],u=l[0];u--;)a=a.lastChild;x.merge(p,a.childNodes),(a=h.firstChild).textContent=""}else p.push(t.createTextNode(i));for(h.textContent="",f=0;i=p[f++];)if(r&&x.inArray(i,r)>-1)o&&o.push(i);else if(c=fe(i),a=Ce(h.appendChild(i),"script"),c&&Pe(a),n)for(u=0;i=a[u++];)Te.test(i.type||"")&&n.push(i);return h}var ke=/^([^.]*)(?:\.(.+)|)/;function Le(){return!0}function Ie(){return!1}function Me(e,t,n,r,o,i){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Me(e,s,n,r,t[s],i);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=Ie;else if(!o)return e;return 1===i&&(a=o,o=function(e){return x().off(e),a.apply(this,arguments)},o.guid=a.guid||(a.guid=x.guid++)),e.each(function(){x.event.add(this,t,o,r,n)})}function je(e,t,n){n?(oe.set(e,t,!1),x.event.add(e,t,{namespace:!1,handler:function(e){var n,r=oe.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(x.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=o.call(arguments),oe.set(this,t,r),this[t](),n=oe.get(this,t),oe.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(oe.set(this,t,x.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Le)}})):void 0===oe.get(e,t)&&x.event.add(e,t,Le)}x.event={global:{},add:function(e,t,n,r,o){var i,a,s,l,c,u,h,p,f,d,m,g=oe.get(e);if(ne(e))for(n.handler&&(n=(i=n).handler,o=i.selector),o&&x.find.matchesSelector(pe,o),n.guid||(n.guid=x.guid++),(l=g.events)||(l=g.events=Object.create(null)),(a=g.handle)||(a=g.handle=function(t){return void 0!==x&&x.event.triggered!==t.type?x.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(H)||[""]).length;c--;)f=m=(s=ke.exec(t[c])||[])[1],d=(s[2]||"").split(".").sort(),f&&(h=x.event.special[f]||{},f=(o?h.delegateType:h.bindType)||f,h=x.event.special[f]||{},u=x.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:d.join(".")},i),(p=l[f])||((p=l[f]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,r,d,a)||e.addEventListener&&e.addEventListener(f,a)),h.add&&(h.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),o?p.splice(p.delegateCount++,0,u):p.push(u),x.event.global[f]=!0)},remove:function(e,t,n,r,o){var i,a,s,l,c,u,h,p,f,d,m,g=oe.hasData(e)&&oe.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(H)||[""]).length;c--;)if(f=m=(s=ke.exec(t[c])||[])[1],d=(s[2]||"").split(".").sort(),f){for(h=x.event.special[f]||{},p=l[f=(r?h.delegateType:h.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=p.length;i--;)u=p[i],!o&&m!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(p.splice(i,1),u.selector&&p.delegateCount--,h.remove&&h.remove.call(e,u));a&&!p.length&&(h.teardown&&!1!==h.teardown.call(e,d,g.handle)||x.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)x.event.remove(e,f+t[c],n,r,!0);x.isEmptyObject(l)&&oe.remove(e,"handle events")}},dispatch:function(e){var t,n,r,o,i,a,s=new Array(arguments.length),l=x.event.fix(e),c=(oe.get(this,"events")||Object.create(null))[l.type]||[],u=x.event.special[l.type]||{};for(s[0]=l,t=1;t<arguments.length;t++)s[t]=arguments[t];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){for(a=x.event.handlers.call(this,l,c),t=0;(o=a[t++])&&!l.isPropagationStopped();)for(l.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==i.namespace&&!l.rnamespace.test(i.namespace)||(l.handleObj=i,l.data=i.data,void 0!==(r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,s))&&!1===(l.result=r)&&(l.preventDefault(),l.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,r,o,i,a,s=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(i=[],a={},n=0;n<l;n++)void 0===a[o=(r=t[n]).selector+" "]&&(a[o]=r.needsContext?x(o,this).index(c)>-1:x.find(o,this,null,[c]).length),a[o]&&i.push(r);i.length&&s.push({elem:c,handlers:i})}return c=this,l<t.length&&s.push({elem:c,handlers:t.slice(l)}),s},addProp:function(e,t){Object.defineProperty(x.Event.prototype,e,{enumerable:!0,configurable:!0,get:d(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[x.expando]?e:new x.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return xe.test(t.type)&&t.click&&T(t,"input")&&je(t,"click",!0),!1},trigger:function(e){var t=this||e;return xe.test(t.type)&&t.click&&T(t,"input")&&je(t,"click"),!0},_default:function(e){var t=e.target;return xe.test(t.type)&&t.click&&T(t,"input")&&oe.get(t,"click")||T(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},x.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},x.Event=function(e,t){if(!(this instanceof x.Event))return new x.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Le:Ie,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[x.expando]=!0},x.Event.prototype={constructor:x.Event,isDefaultPrevented:Ie,isPropagationStopped:Ie,isImmediatePropagationStopped:Ie,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Le,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Le,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Le,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},x.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},x.event.addProp),x.each({focus:"focusin",blur:"focusout"},function(e,t){function n(e){if(g.documentMode){var n=oe.get(this,"handle"),r=x.event.fix(e);r.type="focusin"===e.type?"focus":"blur",r.isSimulated=!0,n(e),r.target===r.currentTarget&&n(r)}else x.event.simulate(t,e.target,x.event.fix(e))}x.event.special[e]={setup:function(){var r;if(je(this,e,!0),!g.documentMode)return!1;(r=oe.get(this,t))||this.addEventListener(t,n),oe.set(this,t,(r||0)+1)},trigger:function(){return je(this,e),!0},teardown:function(){var e;if(!g.documentMode)return!1;(e=oe.get(this,t)-1)?oe.set(this,t,e):(this.removeEventListener(t,n),oe.remove(this,t))},_default:function(t){return oe.get(t.target,e)},delegateType:t},x.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,o=g.documentMode?this:r,i=oe.get(o,t);i||(g.documentMode?this.addEventListener(t,n):r.addEventListener(e,n,!0)),oe.set(o,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,o=g.documentMode?this:r,i=oe.get(o,t)-1;i?oe.set(o,t,i):(g.documentMode?this.removeEventListener(t,n):r.removeEventListener(e,n,!0),oe.remove(o,t))}}}),x.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,o=e.handleObj;return r&&(r===this||x.contains(this,r))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.fn.extend({on:function(e,t,n,r){return Me(this,e,t,n,r)},one:function(e,t,n,r){return Me(this,e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,x(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ie),this.each(function(){x.event.remove(this,e,n,t)})}});var Re=/<script|<style|<link/i,Fe=/checked\s*(?:[^=]|=\s*.checked.)/i,De=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function ze(e,t){return T(e,"table")&&T(11!==t.nodeType?t:t.firstChild,"tr")&&x(e).children("tbody")[0]||e}function Ne(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Be(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ue(e,t){var n,r,o,i,a,s;if(1===t.nodeType){if(oe.hasData(e)&&(s=oe.get(e).events))for(o in oe.remove(t,"handle events"),s)for(n=0,r=s[o].length;n<r;n++)x.event.add(t,o,s[o][n]);ie.hasData(e)&&(i=ie.access(e),a=x.extend({},i),ie.set(t,a))}}function We(e,t){var n=t.nodeName.toLowerCase();"input"===n&&xe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function $e(e,t,n,r){t=i(t);var o,a,s,l,c,u,h=0,p=e.length,m=p-1,g=t[0],y=d(g);if(y||p>1&&"string"==typeof g&&!f.checkClone&&Fe.test(g))return e.each(function(o){var i=e.eq(o);y&&(t[0]=g.call(this,o,i.html())),$e(i,t,n,r)});if(p&&(a=(o=Ae(t,e[0].ownerDocument,!1,e,r)).firstChild,1===o.childNodes.length&&(o=a),a||r)){for(l=(s=x.map(Ce(o,"script"),Ne)).length;h<p;h++)c=o,h!==m&&(c=x.clone(c,!0,!0),l&&x.merge(s,Ce(c,"script"))),n.call(e[h],c,h);if(l)for(u=s[s.length-1].ownerDocument,x.map(s,Be),h=0;h<l;h++)c=s[h],Te.test(c.type||"")&&!oe.access(c,"globalEval")&&x.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?x._evalUrl&&!c.noModule&&x._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):v(c.textContent.replace(De,""),c,u))}return e}function He(e,t,n){for(var r,o=t?x.filter(t,e):e,i=0;null!=(r=o[i]);i++)n||1!==r.nodeType||x.cleanData(Ce(r)),r.parentNode&&(n&&fe(r)&&Pe(Ce(r,"script")),r.parentNode.removeChild(r));return e}x.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,o,i,a,s=e.cloneNode(!0),l=fe(e);if(!(f.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(a=Ce(s),r=0,o=(i=Ce(e)).length;r<o;r++)We(i[r],a[r]);if(t)if(n)for(i=i||Ce(e),a=a||Ce(s),r=0,o=i.length;r<o;r++)Ue(i[r],a[r]);else Ue(e,s);return(a=Ce(s,"script")).length>0&&Pe(a,!l&&Ce(e,"script")),s},cleanData:function(e){for(var t,n,r,o=x.event.special,i=0;void 0!==(n=e[i]);i++)if(ne(n)){if(t=n[oe.expando]){if(t.events)for(r in t.events)o[r]?x.event.remove(n,r):x.removeEvent(n,r,t.handle);n[oe.expando]=void 0}n[ie.expando]&&(n[ie.expando]=void 0)}}}),x.fn.extend({detach:function(e){return He(this,e,!0)},remove:function(e){return He(this,e)},text:function(e){return Z(this,function(e){return void 0===e?x.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return $e(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||ze(this,e).appendChild(e)})},prepend:function(){return $e(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ze(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(Ce(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return Z(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Re.test(e)&&!Se[(Ee.exec(e)||["",""])[1].toLowerCase()]){e=x.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(x.cleanData(Ce(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return $e(this,arguments,function(t){var n=this.parentNode;x.inArray(this,e)<0&&(x.cleanData(Ce(this)),n&&n.replaceChild(t,this))},e)}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){for(var n,r=[],o=x(e),i=o.length-1,s=0;s<=i;s++)n=s===i?this:this.clone(!0),x(o[s])[t](n),a.apply(r,n.get());return this.pushStack(r)}});var Ve=new RegExp("^("+ce+")(?!px)[a-z%]+$","i"),qe=/^--/,Ge=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Je=function(e,t,n){var r,o,i={};for(o in t)i[o]=e.style[o],e.style[o]=t[o];for(o in r=n.call(e),t)e.style[o]=i[o];return r},Ye=new RegExp(he.join("|"),"i");function Xe(e,t,n){var r,o,i,a,s=qe.test(t),l=e.style;return(n=n||Ge(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(A,"$1")||void 0),""!==a||fe(e)||(a=x.style(e,t)),!f.pixelBoxStyles()&&Ve.test(a)&&Ye.test(t)&&(r=l.width,o=l.minWidth,i=l.maxWidth,l.minWidth=l.maxWidth=l.width=a,a=n.width,l.width=r,l.minWidth=o,l.maxWidth=i)),void 0!==a?a+"":a}function Ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",pe.appendChild(c).appendChild(u);var t=e.getComputedStyle(u);r="1%"!==t.top,l=12===n(t.marginLeft),u.style.right="60%",a=36===n(t.right),o=36===n(t.width),u.style.position="absolute",i=12===n(u.offsetWidth/3),pe.removeChild(c),u=null}}function n(e){return Math.round(parseFloat(e))}var r,o,i,a,s,l,c=g.createElement("div"),u=g.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===u.style.backgroundClip,x.extend(f,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),i},reliableTrDimensions:function(){var t,n,r,o;return null==s&&(t=g.createElement("table"),n=g.createElement("tr"),r=g.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="box-sizing:content-box;border:1px solid",n.style.height="1px",r.style.height="9px",r.style.display="block",pe.appendChild(t).appendChild(n).appendChild(r),o=e.getComputedStyle(n),s=parseInt(o.height,10)+parseInt(o.borderTopWidth,10)+parseInt(o.borderBottomWidth,10)===n.offsetHeight,pe.removeChild(t)),s}}))}();var Ke=["Webkit","Moz","ms"],Qe=g.createElement("div").style,et={};function tt(e){return x.cssProps[e]||et[e]||(e in Qe?e:et[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Ke.length;n--;)if((e=Ke[n]+t)in Qe)return e}(e)||e)}var nt=/^(none|table(?!-c[ea]).+)/,rt={position:"absolute",visibility:"hidden",display:"block"},ot={letterSpacing:"0",fontWeight:"400"};function it(e,t,n){var r=ue.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function at(e,t,n,r,o,i){var a="width"===t?1:0,s=0,l=0,c=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(c+=x.css(e,n+he[a],!0,o)),r?("content"===n&&(l-=x.css(e,"padding"+he[a],!0,o)),"margin"!==n&&(l-=x.css(e,"border"+he[a]+"Width",!0,o))):(l+=x.css(e,"padding"+he[a],!0,o),"padding"!==n?l+=x.css(e,"border"+he[a]+"Width",!0,o):s+=x.css(e,"border"+he[a]+"Width",!0,o));return!r&&i>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-l-s-.5))||0),l+c}function st(e,t,n){var r=Ge(e),o=(!f.boxSizingReliable()||n)&&"border-box"===x.css(e,"boxSizing",!1,r),i=o,a=Xe(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Ve.test(a)){if(!n)return a;a="auto"}return(!f.boxSizingReliable()&&o||!f.reliableTrDimensions()&&T(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===x.css(e,"display",!1,r))&&e.getClientRects().length&&(o="border-box"===x.css(e,"boxSizing",!1,r),(i=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+at(e,t,n||(o?"border":"content"),i,r,a)+"px"}function lt(e,t,n,r,o){return new lt.prototype.init(e,t,n,r,o)}x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Xe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,i,a,s=te(t),l=qe.test(t),c=e.style;if(l||(t=tt(s)),a=x.cssHooks[t]||x.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(o=a.get(e,!1,r))?o:c[t];"string"==(i=typeof n)&&(o=ue.exec(n))&&o[1]&&(n=ge(e,t,o),i="number"),null!=n&&n==n&&("number"!==i||l||(n+=o&&o[3]||(x.cssNumber[s]?"":"px")),f.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var o,i,a,s=te(t);return qe.test(t)||(t=tt(s)),(a=x.cssHooks[t]||x.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=Xe(e,t,r)),"normal"===o&&t in ot&&(o=ot[t]),""===n||n?(i=parseFloat(o),!0===n||isFinite(i)?i||0:o):o}}),x.each(["height","width"],function(e,t){x.cssHooks[t]={get:function(e,n,r){if(n)return!nt.test(x.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?st(e,t,r):Je(e,rt,function(){return st(e,t,r)})},set:function(e,n,r){var o,i=Ge(e),a=!f.scrollboxSize()&&"absolute"===i.position,s=(a||r)&&"border-box"===x.css(e,"boxSizing",!1,i),l=r?at(e,t,r,s,i):0;return s&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-at(e,t,"border",!1,i)-.5)),l&&(o=ue.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=x.css(e,t)),it(0,n,l)}}}),x.cssHooks.marginLeft=Ze(f.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Xe(e,"marginLeft"))||e.getBoundingClientRect().left-Je(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];r<4;r++)o[e+he[r]+t]=i[r]||i[r-2]||i[0];return o}},"margin"!==e&&(x.cssHooks[e+t].set=it)}),x.fn.extend({css:function(e,t){return Z(this,function(e,t,n){var r,o,i={},a=0;if(Array.isArray(t)){for(r=Ge(e),o=t.length;a<o;a++)i[t[a]]=x.css(e,t[a],!1,r);return i}return void 0!==n?x.style(e,t,n):x.css(e,t)},e,t,arguments.length>1)}}),x.Tween=lt,lt.prototype={constructor:lt,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||x.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(x.cssNumber[n]?"":"px")},cur:function(){var e=lt.propHooks[this.prop];return e&&e.get?e.get(this):lt.propHooks._default.get(this)},run:function(e){var t,n=lt.propHooks[this.prop];return this.options.duration?this.pos=t=x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):lt.propHooks._default.set(this),this}},lt.prototype.init.prototype=lt.prototype,lt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=x.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):1!==e.elem.nodeType||!x.cssHooks[e.prop]&&null==e.elem.style[tt(e.prop)]?e.elem[e.prop]=e.now:x.style(e.elem,e.prop,e.now+e.unit)}}},lt.propHooks.scrollTop=lt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},x.fx=lt.prototype.init,x.fx.step={};var ct,ut,ht=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;function ft(){ut&&(!1===g.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(ft):e.setTimeout(ft,x.fx.interval),x.fx.tick())}function dt(){return e.setTimeout(function(){ct=void 0}),ct=Date.now()}function mt(e,t){var n,r=0,o={height:e};for(t=t?1:0;r<4;r+=2-t)o["margin"+(n=he[r])]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function gt(e,t,n){for(var r,o=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),i=0,a=o.length;i<a;i++)if(r=o[i].call(n,t,e))return r}function yt(e,t,n){var r,o,i=0,a=yt.prefilters.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var t=ct||dt(),n=Math.max(0,c.startTime+c.duration-t),r=1-(n/c.duration||0),i=0,a=c.tweens.length;i<a;i++)c.tweens[i].run(r);return s.notifyWith(e,[c,r,n]),r<1&&a?n:(a||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{},easing:x.easing._default},n),originalProperties:t,originalOptions:n,startTime:ct||dt(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(r),r},stop:function(t){var n=0,r=t?c.tweens.length:0;if(o)return this;for(o=!0;n<r;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),u=c.props;for(function(e,t){var n,r,o,i,a;for(n in e)if(o=t[r=te(n)],i=e[n],Array.isArray(i)&&(o=i[1],i=e[n]=i[0]),n!==r&&(e[r]=i,delete e[n]),(a=x.cssHooks[r])&&"expand"in a)for(n in i=a.expand(i),delete e[r],i)n in e||(e[n]=i[n],t[n]=o);else t[r]=o}(u,c.opts.specialEasing);i<a;i++)if(r=yt.prefilters[i].call(c,e,u,c.opts))return d(r.stop)&&(x._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return x.map(u,gt,c),d(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),x.fx.timer(x.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}x.Animation=x.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ge(n.elem,e,ue.exec(t),n),n}]},tweener:function(e,t){d(e)?(t=e,e=["*"]):e=e.match(H);for(var n,r=0,o=e.length;r<o;r++)n=e[r],yt.tweeners[n]=yt.tweeners[n]||[],yt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,o,i,a,s,l,c,u,h="width"in t||"height"in t,p=this,f={},d=e.style,m=e.nodeType&&me(e),g=oe.get(e,"fxshow");for(r in n.queue||(null==(a=x._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,x.queue(e,"fx").length||a.empty.fire()})})),t)if(o=t[r],ht.test(o)){if(delete t[r],i=i||"toggle"===o,o===(m?"hide":"show")){if("show"!==o||!g||void 0===g[r])continue;m=!0}f[r]=g&&g[r]||x.style(e,r)}if((l=!x.isEmptyObject(t))||!x.isEmptyObject(f))for(r in h&&1===e.nodeType&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],null==(c=g&&g.display)&&(c=oe.get(e,"display")),"none"===(u=x.css(e,"display"))&&(c?u=c:(we([e],!0),c=e.style.display||c,u=x.css(e,"display"),we([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===x.css(e,"float")&&(l||(p.done(function(){d.display=c}),null==c&&(u=d.display,c="none"===u?"":u)),d.display="inline-block")),n.overflow&&(d.overflow="hidden",p.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]})),l=!1,f)l||(g?"hidden"in g&&(m=g.hidden):g=oe.access(e,"fxshow",{display:c}),i&&(g.hidden=!m),m&&we([e],!0),p.done(function(){for(r in m||we([e]),oe.remove(e,"fxshow"),f)x.style(e,r,f[r])})),l=gt(m?g[r]:0,r,p),r in g||(g[r]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||d(e)&&e,duration:e,easing:n&&t||t&&!d(t)&&t};return x.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in x.fx.speeds?r.duration=x.fx.speeds[r.duration]:r.duration=x.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){d(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(me).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var o=x.isEmptyObject(e),i=x.speed(t,n,r),a=function(){var t=yt(this,x.extend({},e),i);(o||oe.get(this,"finish"))&&t.stop(!0)};return a.finish=a,o||!1===i.queue?this.each(a):this.queue(i.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",i=x.timers,a=oe.get(this);if(o)a[o]&&a[o].stop&&r(a[o]);else for(o in a)a[o]&&a[o].stop&&pt.test(o)&&r(a[o]);for(o=i.length;o--;)i[o].elem!==this||null!=e&&i[o].queue!==e||(i[o].anim.stop(n),t=!1,i.splice(o,1));!t&&n||x.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=oe.get(this),r=n[e+"queue"],o=n[e+"queueHooks"],i=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===e&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(mt(t,!0),e,r,o)}}),x.each({slideDown:mt("show"),slideUp:mt("hide"),slideToggle:mt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.timers=[],x.fx.tick=function(){var e,t=0,n=x.timers;for(ct=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||x.fx.stop(),ct=void 0},x.fx.timer=function(e){x.timers.push(e),x.fx.start()},x.fx.interval=13,x.fx.start=function(){ut||(ut=!0,ft())},x.fx.stop=function(){ut=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fn.delay=function(t,n){return t=x.fx&&x.fx.speeds[t]||t,n=n||"fx",this.queue(n,function(n,r){var o=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(o)}})},function(){var e=g.createElement("input"),t=g.createElement("select").appendChild(g.createElement("option"));e.type="checkbox",f.checkOn=""!==e.value,f.optSelected=t.selected,(e=g.createElement("input")).value="t",e.type="radio",f.radioValue="t"===e.value}();var vt,wt=x.expr.attrHandle;x.fn.extend({attr:function(e,t){return Z(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})}}),x.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===e.getAttribute?x.prop(e,t,n):(1===i&&x.isXMLDoc(e)||(o=x.attrHooks[t.toLowerCase()]||(x.expr.match.bool.test(t)?vt:void 0)),void 0!==n?null===n?void x.removeAttr(e,t):o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(r=o.get(e,t))?r:null==(r=x.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!f.radioValue&&"radio"===t&&T(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,o=t&&t.match(H);if(o&&1===e.nodeType)for(;n=o[r++];)e.removeAttribute(n)}}),vt={set:function(e,t,n){return!1===t?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,t){var n=wt[t]||x.find.attr;wt[t]=function(e,t,r){var o,i,a=t.toLowerCase();return r||(i=wt[a],wt[a]=o,o=null!=n(e,t,r)?a:null,wt[a]=i),o}});var bt=/^(?:input|select|textarea|button)$/i,_t=/^(?:a|area)$/i;function xt(e){return(e.match(H)||[]).join(" ")}function Et(e){return e.getAttribute&&e.getAttribute("class")||""}function Tt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(H)||[]}x.fn.extend({prop:function(e,t){return Z(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[x.propFix[e]||e]})}}),x.extend({prop:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&x.isXMLDoc(e)||(t=x.propFix[t]||t,o=x.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||_t.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.fn.extend({addClass:function(e){var t,n,r,o,i,a;return d(e)?this.each(function(t){x(this).addClass(e.call(this,t,Et(this)))}):(t=Tt(e)).length?this.each(function(){if(r=Et(this),n=1===this.nodeType&&" "+xt(r)+" "){for(i=0;i<t.length;i++)o=t[i],n.indexOf(" "+o+" ")<0&&(n+=o+" ");a=xt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(e){var t,n,r,o,i,a;return d(e)?this.each(function(t){x(this).removeClass(e.call(this,t,Et(this)))}):arguments.length?(t=Tt(e)).length?this.each(function(){if(r=Et(this),n=1===this.nodeType&&" "+xt(r)+" "){for(i=0;i<t.length;i++)for(o=t[i];n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");a=xt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(e,t){var n,r,o,i,a=typeof e,s="string"===a||Array.isArray(e);return d(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,Et(this),t),t)}):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=Tt(e),this.each(function(){if(s)for(i=x(this),o=0;o<n.length;o++)r=n[o],i.hasClass(r)?i.removeClass(r):i.addClass(r);else void 0!==e&&"boolean"!==a||((r=Et(this))&&oe.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===e?"":oe.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+xt(Et(n))+" ").indexOf(t)>-1)return!0;return!1}});var St=/\r/g;x.fn.extend({val:function(e){var t,n,r,o=this[0];return arguments.length?(r=d(e),this.each(function(n){var o;1===this.nodeType&&(null==(o=r?e.call(this,n,x(this).val()):e)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),(t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))})):o?(t=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(St,""):null==n?"":n:void 0}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:xt(x.text(e))}},select:{get:function(e){var t,n,r,o=e.options,i=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?i+1:o.length;for(r=i<0?l:a?i:0;r<l;r++)if(((n=o[r]).selected||r===i)&&!n.disabled&&(!n.parentNode.disabled||!T(n.parentNode,"optgroup"))){if(t=x(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,o=e.options,i=x.makeArray(t),a=o.length;a--;)((r=o[a]).selected=x.inArray(x.valHooks.option.get(r),i)>-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=x.inArray(x(e).val(),t)>-1}},f.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Ct=e.location,Pt={guid:Date.now()},Ot=/\?/;x.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){}return r=n&&n.getElementsByTagName("parsererror")[0],n&&!r||x.error("Invalid XML: "+(r?x.map(r.childNodes,function(e){return e.textContent}).join("\n"):t)),n};var At=/^(?:focusinfocus|focusoutblur)$/,kt=function(e){e.stopPropagation()};x.extend(x.event,{trigger:function(t,n,r,o){var i,a,s,l,c,h,p,f,y=[r||g],v=u.call(t,"type")?t.type:t,w=u.call(t,"namespace")?t.namespace.split("."):[];if(a=f=s=r=r||g,3!==r.nodeType&&8!==r.nodeType&&!At.test(v+x.event.triggered)&&(v.indexOf(".")>-1&&(w=v.split("."),v=w.shift(),w.sort()),c=v.indexOf(":")<0&&"on"+v,(t=t[x.expando]?t:new x.Event(v,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=w.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),p=x.event.special[v]||{},o||!p.trigger||!1!==p.trigger.apply(r,n))){if(!o&&!p.noBubble&&!m(r)){for(l=p.delegateType||v,At.test(l+v)||(a=a.parentNode);a;a=a.parentNode)y.push(a),s=a;s===(r.ownerDocument||g)&&y.push(s.defaultView||s.parentWindow||e)}for(i=0;(a=y[i++])&&!t.isPropagationStopped();)f=a,t.type=i>1?l:p.bindType||v,(h=(oe.get(a,"events")||Object.create(null))[t.type]&&oe.get(a,"handle"))&&h.apply(a,n),(h=c&&a[c])&&h.apply&&ne(a)&&(t.result=h.apply(a,n),!1===t.result&&t.preventDefault());return t.type=v,o||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(y.pop(),n)||!ne(r)||c&&d(r[v])&&!m(r)&&((s=r[c])&&(r[c]=null),x.event.triggered=v,t.isPropagationStopped()&&f.addEventListener(v,kt),r[v](),t.isPropagationStopped()&&f.removeEventListener(v,kt),x.event.triggered=void 0,s&&(r[c]=s)),t.result}},simulate:function(e,t,n){var r=x.extend(new x.Event,n,{type:e,isSimulated:!0});x.event.trigger(r,null,t)}}),x.fn.extend({trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return x.event.trigger(e,t,n,!0)}});var Lt=/\[\]$/,It=/\r?\n/g,Mt=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;function Rt(e,t,n,r){var o;if(Array.isArray(t))x.each(t,function(t,o){n||Lt.test(e)?r(e,o):Rt(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,r)});else if(n||"object"!==w(t))r(e,t);else for(o in t)Rt(e+"["+o+"]",t[o],n,r)}x.param=function(e,t){var n,r=[],o=function(e,t){var n=d(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(n in e)Rt(n,e[n],t,o);return r.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&jt.test(this.nodeName)&&!Mt.test(e)&&(this.checked||!xe.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:Array.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(It,"\r\n")}}):{name:t.name,value:n.replace(It,"\r\n")}}).get()}});var Ft=/%20/g,Dt=/#.*$/,zt=/([?&])_=[^&]*/,Nt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Bt=/^(?:GET|HEAD)$/,Ut=/^\/\//,Wt={},$t={},Ht="*/".concat("*"),Vt=g.createElement("a");function qt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,o=0,i=t.toLowerCase().match(H)||[];if(d(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Gt(e,t,n,r){var o={},i=e===$t;function a(s){var l;return o[s]=!0,x.each(e[s]||[],function(e,s){var c=s(t,n,r);return"string"!=typeof c||i||o[c]?i?!(l=c):void 0:(t.dataTypes.unshift(c),a(c),!1)}),l}return a(t.dataTypes[0])||!o["*"]&&a("*")}function Jt(e,t){var n,r,o=x.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&x.extend(!0,e,r),e}Vt.href=Ct.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ht,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Jt(Jt(e,x.ajaxSettings),t):Jt(x.ajaxSettings,e)},ajaxPrefilter:qt(Wt),ajaxTransport:qt($t),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,o,i,a,s,l,c,u,h,p,f=x.ajaxSetup({},n),d=f.context||f,m=f.context&&(d.nodeType||d.jquery)?x(d):x.event,y=x.Deferred(),v=x.Callbacks("once memory"),w=f.statusCode||{},b={},_={},E="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a)for(a={};t=Nt.exec(i);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?i:null},setRequestHeader:function(e,t){return null==c&&(e=_[e.toLowerCase()]=_[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||E;return r&&r.abort(t),S(0,t),this}};if(y.promise(T),f.url=((t||f.url||Ct.href)+"").replace(Ut,Ct.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(H)||[""],null==f.crossDomain){l=g.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Vt.protocol+"//"+Vt.host!=l.protocol+"//"+l.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=x.param(f.data,f.traditional)),Gt(Wt,f,n,T),c)return T;for(h in(u=x.event&&f.global)&&0===x.active++&&x.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Bt.test(f.type),o=f.url.replace(Dt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Ft,"+")):(p=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(Ot.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace(zt,"$1"),p=(Ot.test(o)?"&":"?")+"_="+Pt.guid+++p),f.url=o+p),f.ifModified&&(x.lastModified[o]&&T.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&T.setRequestHeader("If-None-Match",x.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ht+"; q=0.01":""):f.accepts["*"]),f.headers)T.setRequestHeader(h,f.headers[h]);if(f.beforeSend&&(!1===f.beforeSend.call(d,T,f)||c))return T.abort();if(E="abort",v.add(f.complete),T.done(f.success),T.fail(f.error),r=Gt($t,f,n,T)){if(T.readyState=1,u&&m.trigger("ajaxSend",[T,f]),c)return T;f.async&&f.timeout>0&&(s=e.setTimeout(function(){T.abort("timeout")},f.timeout));try{c=!1,r.send(b,S)}catch(e){if(c)throw e;S(-1,e)}}else S(-1,"No Transport");function S(t,n,a,l){var h,p,g,b,_,E=n;c||(c=!0,s&&e.clearTimeout(s),r=void 0,i=l||"",T.readyState=t>0?4:0,h=t>=200&&t<300||304===t,a&&(b=function(e,t,n){for(var r,o,i,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in s)if(s[o]&&s[o].test(r)){l.unshift(o);break}if(l[0]in n)i=l[0];else{for(o in n){if(!l[0]||e.converters[o+" "+l[0]]){i=o;break}a||(a=o)}i=i||a}if(i)return i!==l[0]&&l.unshift(i),n[i]}(f,T,a)),!h&&x.inArray("script",f.dataTypes)>-1&&x.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),b=function(e,t,n,r){var o,i,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(i=u.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=i,i=u.shift())if("*"===i)i=l;else if("*"!==l&&l!==i){if(!(a=c[l+" "+i]||c["* "+i]))for(o in c)if((s=o.split(" "))[1]===i&&(a=c[l+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[o]:!0!==c[o]&&(i=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+i}}}return{state:"success",data:t}}(f,b,T,h),h?(f.ifModified&&((_=T.getResponseHeader("Last-Modified"))&&(x.lastModified[o]=_),(_=T.getResponseHeader("etag"))&&(x.etag[o]=_)),204===t||"HEAD"===f.type?E="nocontent":304===t?E="notmodified":(E=b.state,p=b.data,h=!(g=b.error))):(g=E,!t&&E||(E="error",t<0&&(t=0))),T.status=t,T.statusText=(n||E)+"",h?y.resolveWith(d,[p,E,T]):y.rejectWith(d,[T,E,g]),T.statusCode(w),w=void 0,u&&m.trigger(h?"ajaxSuccess":"ajaxError",[T,f,h?p:g]),v.fireWith(d,[T,E]),u&&(m.trigger("ajaxComplete",[T,f]),--x.active||x.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,t){return x.get(e,void 0,t,"script")}}),x.each(["get","post"],function(e,t){x[t]=function(e,n,r,o){return d(n)&&(o=o||r,r=n,n=void 0),x.ajax(x.extend({url:e,type:t,dataType:o,data:n,success:r},x.isPlainObject(e)&&e))}}),x.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),x._evalUrl=function(e,t,n){return x.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){x.globalEval(e,t,n)}})},x.fn.extend({wrapAll:function(e){var t;return this[0]&&(d(e)&&(e=e.call(this[0])),t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return d(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=d(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){x(this).replaceWith(this.childNodes)}),this}}),x.expr.pseudos.hidden=function(e){return!x.expr.pseudos.visible(e)},x.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Xt=x.ajaxSettings.xhr();f.cors=!!Xt&&"withCredentials"in Xt,f.ajax=Xt=!!Xt,x.ajaxTransport(function(t){var n,r;if(f.cors||Xt&&!t.crossDomain)return{send:function(o,i){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)s.setRequestHeader(a,o[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Yt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),x.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),x.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,o){t=x("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),g.head.appendChild(t[0])},abort:function(){n&&n()}}});var Zt,Kt=[],Qt=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||x.expando+"_"+Pt.guid++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(t,n,r){var o,i,a,s=!1!==t.jsonp&&(Qt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=d(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Qt,"$1"+o):!1!==t.jsonp&&(t.url+=(Ot.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return a||x.error(o+" was not called"),a[0]},t.dataTypes[0]="json",i=e[o],e[o]=function(){a=arguments},r.always(function(){void 0===i?x(e).removeProp(o):e[o]=i,t[o]&&(t.jsonpCallback=n.jsonpCallback,Kt.push(o)),a&&d(i)&&i(a[0]),a=i=void 0}),"script"}),f.createHTMLDocument=((Zt=g.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Zt.childNodes.length),x.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(f.createHTMLDocument?((r=(t=g.implementation.createHTMLDocument("")).createElement("base")).href=g.location.href,t.head.appendChild(r)):t=g),i=!n&&[],(o=D.exec(e))?[t.createElement(o[1])]:(o=Ae([e],t,i),i&&i.length&&x(i).remove(),x.merge([],o.childNodes)));var r,o,i},x.fn.load=function(e,t,n){var r,o,i,a=this,s=e.indexOf(" ");return s>-1&&(r=xt(e.slice(s)),e=e.slice(0,s)),d(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),a.length>0&&x.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){i=arguments,a.html(r?x("<div>").append(x.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,i||[e.responseText,t,e])})}),this},x.expr.pseudos.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length},x.offset={setOffset:function(e,t,n){var r,o,i,a,s,l,c=x.css(e,"position"),u=x(e),h={};"static"===c&&(e.style.position="relative"),s=u.offset(),i=x.css(e,"top"),l=x.css(e,"left"),("absolute"===c||"fixed"===c)&&(i+l).indexOf("auto")>-1?(a=(r=u.position()).top,o=r.left):(a=parseFloat(i)||0,o=parseFloat(l)||0),d(t)&&(t=t.call(e,n,x.extend({},s))),null!=t.top&&(h.top=t.top-s.top+a),null!=t.left&&(h.left=t.left-s.left+o),"using"in t?t.using.call(e,h):u.css(h)}},x.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){x.offset.setOffset(this,e,t)});var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],o={top:0,left:0};if("fixed"===x.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===x.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((o=x(e).offset()).top+=x.css(e,"borderTopWidth",!0),o.left+=x.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-x.css(r,"marginTop",!0),left:t.left-o.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===x.css(e,"position");)e=e.offsetParent;return e||pe})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;x.fn[e]=function(r){return Z(this,function(e,r,o){var i;if(m(e)?i=e:9===e.nodeType&&(i=e.defaultView),void 0===o)return i?i[t]:e[r];i?i.scrollTo(n?i.pageXOffset:o,n?o:i.pageYOffset):e[r]=o},e,r,arguments.length)}}),x.each(["top","left"],function(e,t){x.cssHooks[t]=Ze(f.pixelPosition,function(e,n){if(n)return n=Xe(e,t),Ve.test(n)?x(e).position()[t]+"px":n})}),x.each({Height:"height",Width:"width"},function(e,t){x.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){x.fn[r]=function(o,i){var a=arguments.length&&(n||"boolean"!=typeof o),s=n||(!0===o||!0===i?"margin":"border");return Z(this,function(t,n,o){var i;return m(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===o?x.css(t,n,s):x.style(t,n,o,s)},t,a?o:void 0,a)}})}),x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),x.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}});var en=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;x.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),d(e))return r=o.call(arguments,2),i=function(){return e.apply(t||this,r.concat(o.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i},x.holdReady=function(e){e?x.readyWait++:x.ready(!0)},x.isArray=Array.isArray,x.parseJSON=JSON.parse,x.nodeName=T,x.isFunction=d,x.isWindow=m,x.camelCase=te,x.type=w,x.now=Date.now,x.isNumeric=function(e){var t=x.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},x.trim=function(e){return null==e?"":(e+"").replace(en,"$1")};var tn=e.jQuery,nn=e.$;return x.noConflict=function(t){return e.$===x&&(e.$=nn),t&&e.jQuery===x&&(e.jQuery=tn),x},void 0===t&&(e.jQuery=e.$=x),x});var U=B,W=6371008.8,$={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:39.37*W,kilometers:6371.0088,kilometres:6371.0088,meters:W,metres:W,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:W/1852,radians:1,yards:6967335.223679999};function H(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function V(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ee(e[0])||!ee(e[1]))throw new Error("coordinates must contain numbers");return H({type:"Point",coordinates:e},t,n)}function q(e,t,n){void 0===n&&(n={});for(var r=0,o=e;r<o.length;r++){var i=o[r];if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<i[i.length-1].length;a++)if(i[i.length-1][a]!==i[0][a])throw new Error("First and last Position are not equivalent.")}return H({type:"Polygon",coordinates:e},t,n)}function G(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return H({type:"LineString",coordinates:e},t,n)}function J(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function Y(e,t,n){return void 0===n&&(n={}),H({type:"MultiPoint",coordinates:e},t,n)}function X(e,t){void 0===t&&(t="kilometers");var n=$[t];if(!n)throw new Error(t+" units is invalid");return e*n}function Z(e,t){void 0===t&&(t="kilometers");var n=$[t];if(!n)throw new Error(t+" units is invalid");return e/n}function K(e){return e%(2*Math.PI)*180/Math.PI}function Q(e){return e%360*Math.PI/180}function ee(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function te(e){return!!e&&e.constructor===Object}function ne(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function re(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function oe(e){return"Feature"===e.type?e.geometry:e}function ie(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}function ae(e,t,n){void 0===n&&(n={});var r=ne(e),o=ne(t),i=Q(o[1]-r[1]),a=Q(o[0]-r[0]),s=Q(r[1]),l=Q(o[1]),c=Math.pow(Math.sin(i/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(l);return X(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),n.units)}function se(e,t,n){if(null!==e)for(var r,o,i,a,s,l,c,u,h=0,p=0,f=e.type,d="FeatureCollection"===f,m="Feature"===f,g=d?e.features.length:1,y=0;y<g;y++){s=(u=!!(c=d?e.features[y].geometry:m?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var v=0;v<s;v++){var w=0,b=0;if(null!==(a=u?c.geometries[v]:c)){l=a.coordinates;var _=a.type;switch(h=!n||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(l,p,y,w,b))return!1;p++,w++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===t(l[r],p,y,w,b))return!1;p++,"MultiPoint"===_&&w++}"LineString"===_&&w++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(o=0;o<l[r].length-h;o++){if(!1===t(l[r][o],p,y,w,b))return!1;p++}"MultiLineString"===_&&w++,"Polygon"===_&&b++}"Polygon"===_&&w++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(b=0,o=0;o<l[r].length;o++){for(i=0;i<l[r][o].length-h;i++){if(!1===t(l[r][o][i],p,y,w,b))return!1;p++}b++}w++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===se(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function le(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function ce(e,t){var n,r,o,i,a,s,l,c,u,h,p=0,f="FeatureCollection"===e.type,d="Feature"===e.type,m=f?e.features.length:1;for(n=0;n<m;n++){for(s=f?e.features[n].geometry:d?e.geometry:e,c=f?e.features[n].properties:d?e.properties:{},u=f?e.features[n].bbox:d?e.bbox:void 0,h=f?e.features[n].id:d?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,o=0;o<a;o++)if(null!==(i=l?s.geometries[o]:s))switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(i,p,c,u,h))return!1;break;case"GeometryCollection":for(r=0;r<i.geometries.length;r++)if(!1===t(i.geometries[r],p,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,p,c,u,h))return!1;p++}}function ue(e,t){ce(e,function(e,n,r,o,i){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(H(e,r,{bbox:o,id:i}),n,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<e.coordinates.length;l++){var c=e.coordinates[l];if(!1===t(H({type:a,coordinates:c},r),n,l))return!1}})}function he(e,t){return void 0===t&&(t={}),function(e,t,n){var r=n,o=!1;return function(e,t){ue(e,function(e,n,r){var o=0;if(e.geometry){var i=e.geometry.type;if("Point"!==i&&"MultiPoint"!==i){var a,s=0,l=0,c=0;return!1!==se(e,function(i,u,h,p,f){if(void 0===a||n>s||p>l||f>c)return a=i,s=n,l=p,c=f,void(o=0);var d=G([a,i],e.properties);if(!1===t(d,n,r,f,o))return!1;o++,a=i})&&void 0}}})}(e,function(e,i,a,s,l){r=!1===o&&void 0===n?e:t(r,e,i,a,s,l),o=!0}),r}(e,function(e,n){var r=n.geometry.coordinates;return e+ae(r[0],r[1],t)},0)}var pe=6378137;function fe(e){return function(e){var t=0;return ce(e,function(e,n,r,o,i){t=t+function(e){var t,n=0;switch(e.type){case"Polygon":return de(e.coordinates);case"MultiPolygon":for(t=0;t<e.coordinates.length;t++)n+=de(e.coordinates[t]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(e)}),t}(e)}function de(e){var t=0;if(e&&e.length>0){t+=Math.abs(me(e[0]));for(var n=1;n<e.length;n++)t-=Math.abs(me(e[n]))}return t}function me(e){var t,n,r,o,i,a,s=0,l=e.length;if(l>2){for(a=0;a<l;a++)a===l-2?(r=l-2,o=l-1,i=0):a===l-1?(r=l-1,o=0,i=1):(r=a,o=a+1,i=a+2),t=e[r],n=e[o],s+=(ge(e[i][0])-ge(t[0]))*Math.sin(ge(n[1]));s=s*pe*pe/2}return s}function ge(e){return e*Math.PI/180}var ye=function(e,t){return e===t||e!=e&&t!=t},ve=ye,we=function(e,t){for(var n=e.length;n--;)if(ve(e[n][0],t))return n;return-1},be=we,_e=Array.prototype.splice,xe=we,Ee=we,Te=we,Se=function(){this.__data__=[],this.size=0};function Ce(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ce.prototype.clear=Se,Ce.prototype.delete=function(e){var t=this.__data__,n=be(t,e);return!(n<0||(n==t.length-1?t.pop():_e.call(t,n,1),--this.size,0))},Ce.prototype.get=function(e){var t=this.__data__,n=xe(t,e);return n<0?void 0:t[n][1]},Ce.prototype.has=function(e){return Ee(this.__data__,e)>-1},Ce.prototype.set=function(e,t){var n=this.__data__,r=Te(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Pe,Oe=Ce,Ae=Oe,ke="object"==typeof D&&D&&D.Object===Object&&D,Le=ke,Ie="object"==typeof self&&self&&self.Object===Object&&self,Me=Le||Ie||Function("return this")(),je=Me.Symbol,Re=je,Fe=Object.prototype,De=Fe.hasOwnProperty,ze=Fe.toString,Ne=Re?Re.toStringTag:void 0,Be=Object.prototype.toString,Ue=function(e){var t=De.call(e,Ne),n=e[Ne];try{e[Ne]=void 0;var r=!0}catch(e){}var o=ze.call(e);return r&&(t?e[Ne]=n:delete e[Ne]),o},We=je?je.toStringTag:void 0,$e=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":We&&We in Object(e)?Ue(e):function(e){return Be.call(e)}(e)},He=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Ve=$e,qe=He,Ge=function(e){if(!qe(e))return!1;var t=Ve(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Je=Me["__core-js_shared__"],Ye=(Pe=/[^.]+$/.exec(Je&&Je.keys&&Je.keys.IE_PROTO||""))?"Symbol(src)_1."+Pe:"",Xe=Function.prototype.toString,Ze=function(e){if(null!=e){try{return Xe.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Ke=Ge,Qe=function(e){return!!Ye&&Ye in e},et=He,tt=Ze,nt=/^\[object .+?Constructor\]$/,rt=Function.prototype,ot=Object.prototype,it=rt.toString,at=ot.hasOwnProperty,st=RegExp("^"+it.call(at).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lt=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!et(e)||Qe(e))&&(Ke(e)?st:nt).test(tt(e))}(n)?n:void 0},ct=lt(Me,"Map"),ut=lt(Object,"create"),ht=ut,pt=ut,ft=Object.prototype.hasOwnProperty,dt=ut,mt=Object.prototype.hasOwnProperty,gt=ut,yt=function(){this.__data__=ht?ht(null):{},this.size=0},vt=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},wt=function(e){var t=this.__data__;if(pt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ft.call(t,e)?t[e]:void 0};function bt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}bt.prototype.clear=yt,bt.prototype.delete=vt,bt.prototype.get=wt,bt.prototype.has=function(e){var t=this.__data__;return dt?void 0!==t[e]:mt.call(t,e)},bt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=gt&&void 0===t?"__lodash_hash_undefined__":t,this};var _t=bt,xt=Oe,Et=ct,Tt=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map},St=Tt,Ct=Tt,Pt=Tt,Ot=Tt;function At(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}At.prototype.clear=function(){this.size=0,this.__data__={hash:new _t,map:new(Et||xt),string:new _t}},At.prototype.delete=function(e){var t=St(this,e).delete(e);return this.size-=t?1:0,t},At.prototype.get=function(e){return Ct(this,e).get(e)},At.prototype.has=function(e){return Pt(this,e).has(e)},At.prototype.set=function(e,t){var n=Ot(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var kt=Oe,Lt=ct,It=At,Mt=Oe,jt=function(){this.__data__=new Ae,this.size=0},Rt=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ft=function(e){return this.__data__.get(e)},Dt=function(e){return this.__data__.has(e)};function zt(e){var t=this.__data__=new Mt(e);this.size=t.size}zt.prototype.clear=jt,zt.prototype.delete=Rt,zt.prototype.get=Ft,zt.prototype.has=Dt,zt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof kt){var r=n.__data__;if(!Lt||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new It(r)}return n.set(e,t),this.size=n.size,this};var Nt=zt,Bt=lt,Ut=function(){try{var e=Bt(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Wt=function(e,t,n){"__proto__"==t&&Ut?Ut(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},$t=Wt,Ht=ye,Vt=Object.prototype.hasOwnProperty,qt=function(e,t,n){var r=e[t];Vt.call(e,t)&&Ht(r,n)&&(void 0!==n||t in e)||$t(e,t,n)},Gt=qt,Jt=Wt,Yt=function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?Jt(n,s,l):Gt(n,s,l)}return n},Xt=function(e){return null!=e&&"object"==typeof e},Zt=$e,Kt=Xt,Qt=function(e){return Kt(e)&&"[object Arguments]"==Zt(e)},en=Xt,tn=Object.prototype,nn=tn.hasOwnProperty,rn=tn.propertyIsEnumerable,on=Qt(function(){return arguments}())?Qt:function(e){return en(e)&&nn.call(e,"callee")&&!rn.call(e,"callee")},an=Array.isArray,sn={},ln=function(){return!1};!function(e,t){var n=Me,r=ln,o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;e.exports=s}({get exports(){return sn},set exports(e){sn=e}},sn);var cn=/^(?:0|[1-9]\d*)$/,un=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},hn=$e,pn=un,fn=Xt,dn={};dn["[object Float32Array]"]=dn["[object Float64Array]"]=dn["[object Int8Array]"]=dn["[object Int16Array]"]=dn["[object Int32Array]"]=dn["[object Uint8Array]"]=dn["[object Uint8ClampedArray]"]=dn["[object Uint16Array]"]=dn["[object Uint32Array]"]=!0,dn["[object Arguments]"]=dn["[object Array]"]=dn["[object ArrayBuffer]"]=dn["[object Boolean]"]=dn["[object DataView]"]=dn["[object Date]"]=dn["[object Error]"]=dn["[object Function]"]=dn["[object Map]"]=dn["[object Number]"]=dn["[object Object]"]=dn["[object RegExp]"]=dn["[object Set]"]=dn["[object String]"]=dn["[object WeakMap]"]=!1;var mn=function(e){return function(t){return e(t)}},gn={};!function(e,t){var n=ke,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=a}({get exports(){return gn},set exports(e){gn=e}},gn);var yn=function(e){return fn(e)&&pn(e.length)&&!!dn[hn(e)]},vn=mn,wn=gn&&gn.isTypedArray,bn=wn?vn(wn):yn,_n=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},xn=on,En=an,Tn=sn,Sn=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&cn.test(e))&&e>-1&&e%1==0&&e<t},Cn=bn,Pn=Object.prototype.hasOwnProperty,On=function(e,t){var n=En(e),r=!n&&xn(e),o=!n&&!r&&Tn(e),i=!n&&!r&&!o&&Cn(e),a=n||r||o||i,s=a?_n(e.length,String):[],l=s.length;for(var c in e)!t&&!Pn.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Sn(c,l))||s.push(c);return s},An=Object.prototype,kn=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||An)},Ln=function(e,t){return function(n){return e(t(n))}},In=Ln(Object.keys,Object),Mn=kn,jn=In,Rn=Object.prototype.hasOwnProperty,Fn=Ge,Dn=un,zn=function(e){return null!=e&&Dn(e.length)&&!Fn(e)},Nn=On,Bn=zn,Un=function(e){return Bn(e)?Nn(e):function(e){if(!Mn(e))return jn(e);var t=[];for(var n in Object(e))Rn.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)},Wn=Yt,$n=Un,Hn=He,Vn=kn,qn=Object.prototype.hasOwnProperty,Gn=On,Jn=function(e){if(!Hn(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Vn(e),n=[];for(var r in e)("constructor"!=r||!t&&qn.call(e,r))&&n.push(r);return n},Yn=zn,Xn=function(e){return Yn(e)?Gn(e,!0):Jn(e)},Zn=Yt,Kn=Xn,Qn={};!function(e,t){var n=Me,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r?n.Buffer:void 0,a=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}}({get exports(){return Qn},set exports(e){Qn=e}},Qn);var er=function(){return[]},tr=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i},nr=er,rr=Object.prototype.propertyIsEnumerable,or=Object.getOwnPropertySymbols,ir=or?function(e){return null==e?[]:(e=Object(e),tr(or(e),function(t){return rr.call(e,t)}))}:nr,ar=Yt,sr=ir,lr=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},cr=Ln(Object.getPrototypeOf,Object),ur=lr,hr=cr,pr=ir,fr=er,dr=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)ur(t,pr(e)),e=hr(e);return t}:fr,mr=Yt,gr=dr,yr=lr,vr=an,wr=function(e,t,n){var r=t(e);return vr(e)?r:yr(r,n(e))},br=wr,_r=ir,xr=Un,Er=wr,Tr=dr,Sr=Xn,Cr=lt(Me,"DataView"),Pr=ct,Or=lt(Me,"Promise"),Ar=lt(Me,"Set"),kr=lt(Me,"WeakMap"),Lr=$e,Ir=Ze,Mr="[object Map]",jr="[object Promise]",Rr="[object Set]",Fr="[object WeakMap]",Dr="[object DataView]",zr=Ir(Cr),Nr=Ir(Pr),Br=Ir(Or),Ur=Ir(Ar),Wr=Ir(kr),$r=Lr;(Cr&&$r(new Cr(new ArrayBuffer(1)))!=Dr||Pr&&$r(new Pr)!=Mr||Or&&$r(Or.resolve())!=jr||Ar&&$r(new Ar)!=Rr||kr&&$r(new kr)!=Fr)&&($r=function(e){var t=Lr(e),n="[object Object]"==t?e.constructor:void 0,r=n?Ir(n):"";if(r)switch(r){case zr:return Dr;case Nr:return Mr;case Br:return jr;case Ur:return Rr;case Wr:return Fr}return t});var Hr=$r,Vr=Object.prototype.hasOwnProperty,qr=Me.Uint8Array,Gr=function(e){var t=new e.constructor(e.byteLength);return new qr(t).set(new qr(e)),t},Jr=Gr,Yr=/\w*$/,Xr=je?je.prototype:void 0,Zr=Xr?Xr.valueOf:void 0,Kr=Gr,Qr=Gr,eo=function(e,t){var n=t?Jr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},to=function(e){var t=new e.constructor(e.source,Yr.exec(e));return t.lastIndex=e.lastIndex,t},no=He,ro=Object.create,oo=function(){function e(){}return function(t){if(!no(t))return{};if(ro)return ro(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),io=cr,ao=kn,so=Hr,lo=Xt,co=mn,uo=gn&&gn.isMap,ho=uo?co(uo):function(e){return lo(e)&&"[object Map]"==so(e)},po=Hr,fo=Xt,mo=mn,go=gn&&gn.isSet,yo=go?mo(go):function(e){return fo(e)&&"[object Set]"==po(e)},vo=Nt,wo=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},bo=qt,_o=function(e,t){return e&&Wn(t,$n(t),e)},xo=function(e,t){return e&&Zn(t,Kn(t),e)},Eo=Qn,To=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},So=function(e,t){return ar(e,sr(e),t)},Co=function(e,t){return mr(e,gr(e),t)},Po=function(e){return br(e,xr,_r)},Oo=function(e){return Er(e,Sr,Tr)},Ao=Hr,ko=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Vr.call(e,"index")&&(n.index=e.index,n.input=e.input),n},Lo=function(e,t,n){var r,o=e.constructor;switch(t){case"[object ArrayBuffer]":return Qr(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return eo(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?Kr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(e);case"[object RegExp]":return to(e);case"[object Symbol]":return r=e,Zr?Object(Zr.call(r)):{}}},Io=function(e){return"function"!=typeof e.constructor||ao(e)?{}:oo(io(e))},Mo=an,jo=sn,Ro=ho,Fo=He,Do=yo,zo=Un,No=Xn,Bo="[object Arguments]",Uo="[object Function]",Wo="[object Object]",$o={};$o[Bo]=$o["[object Array]"]=$o["[object ArrayBuffer]"]=$o["[object DataView]"]=$o["[object Boolean]"]=$o["[object Date]"]=$o["[object Float32Array]"]=$o["[object Float64Array]"]=$o["[object Int8Array]"]=$o["[object Int16Array]"]=$o["[object Int32Array]"]=$o["[object Map]"]=$o["[object Number]"]=$o[Wo]=$o["[object RegExp]"]=$o["[object Set]"]=$o["[object String]"]=$o["[object Symbol]"]=$o["[object Uint8Array]"]=$o["[object Uint8ClampedArray]"]=$o["[object Uint16Array]"]=$o["[object Uint32Array]"]=!0,$o["[object Error]"]=$o[Uo]=$o["[object WeakMap]"]=!1;var Ho=function e(t,n,r,o,i,a){var s,l=1&n,c=2&n,u=4&n;if(r&&(s=i?r(t,o,i,a):r(t)),void 0!==s)return s;if(!Fo(t))return t;var h=Mo(t);if(h){if(s=ko(t),!l)return To(t,s)}else{var p=Ao(t),f=p==Uo||"[object GeneratorFunction]"==p;if(jo(t))return Eo(t,l);if(p==Wo||p==Bo||f&&!i){if(s=c||f?{}:Io(t),!l)return c?Co(t,xo(s,t)):So(t,_o(s,t))}else{if(!$o[p])return i?t:{};s=Lo(t,p,l)}}a||(a=new vo);var d=a.get(t);if(d)return d;a.set(t,s),Do(t)?t.forEach(function(o){s.add(e(o,n,r,o,t,a))}):Ro(t)&&t.forEach(function(o,i){s.set(i,e(o,n,r,i,t,a))});var m=h?void 0:(u?c?Oo:Po:c?No:zo)(t);return wo(m||t,function(o,i){m&&(o=t[i=o]),bo(s,i,e(o,n,r,i,t,a))}),s},Vo=function(e){return Ho(e,5)},qo={};({get exports(){return qo},set exports(e){qo=e}}).exports=function(){var e=function(e,t){var n={drag:[],click:[],mousemove:[],mousedown:[],mouseup:[],mouseout:[],keydown:[],keyup:[],touchstart:[],touchmove:[],touchend:[],tap:[]},r={on:function(e,t,r){if(void 0===n[e])throw new Error("Invalid event type: "+e);n[e].push({selector:t,fn:r})},render:function(e){t.store.featureChanged(e)}},o=function(e,o){for(var i=n[e],a=i.length;a--;){var s=i[a];if(s.selector(o)){s.fn.call(r,o)||t.store.render(),t.ui.updateMapClasses();break}}};return e.start.call(r),{render:e.render,stop:function(){e.stop&&e.stop()},trash:function(){e.trash&&(e.trash(),t.store.render())},combineFeatures:function(){e.combineFeatures&&e.combineFeatures()},uncombineFeatures:function(){e.uncombineFeatures&&e.uncombineFeatures()},drag:function(e){o("drag",e)},click:function(e){o("click",e)},mousemove:function(e){o("mousemove",e)},mousedown:function(e){o("mousedown",e)},mouseup:function(e){o("mouseup",e)},mouseout:function(e){o("mouseout",e)},keydown:function(e){o("keydown",e)},keyup:function(e){o("keyup",e)},touchstart:function(e){o("touchstart",e)},touchmove:function(e){o("touchmove",e)},touchend:function(e){o("touchend",e)},tap:function(e){o("tap",e)}}};var t={},n=6378137;function r(e){var t=0;if(e&&e.length>0){t+=Math.abs(o(e[0]));for(var n=1;n<e.length;n++)t-=Math.abs(o(e[n]))}return t}function o(e){var t,r,o,a,s,l,c=0,u=e.length;if(u>2){for(l=0;l<u;l++)l===u-2?(o=u-2,a=u-1,s=0):l===u-1?(o=u-1,a=0,s=1):(o=l,a=l+1,s=l+2),t=e[o],r=e[a],c+=(i(e[s][0])-i(t[0]))*Math.sin(i(r[1]));c=c*n*n/2}return c}function i(e){return e*Math.PI/180}t.geometry=function e(t){var n,o=0;switch(t.type){case"Polygon":return r(t.coordinates);case"MultiPolygon":for(n=0;n<t.coordinates.length;n++)o+=r(t.coordinates[n]);return o;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(n=0;n<t.geometries.length;n++)o+=e(t.geometries[n]);return o}},t.ring=o;var a={CONTROL_BASE:"mapboxgl-ctrl",CONTROL_PREFIX:"mapboxgl-ctrl-",CONTROL_BUTTON:"mapbox-gl-draw_ctrl-draw-btn",CONTROL_BUTTON_LINE:"mapbox-gl-draw_line",CONTROL_BUTTON_POLYGON:"mapbox-gl-draw_polygon",CONTROL_BUTTON_POINT:"mapbox-gl-draw_point",CONTROL_BUTTON_TRASH:"mapbox-gl-draw_trash",CONTROL_BUTTON_COMBINE_FEATURES:"mapbox-gl-draw_combine",CONTROL_BUTTON_UNCOMBINE_FEATURES:"mapbox-gl-draw_uncombine",CONTROL_GROUP:"mapboxgl-ctrl-group",ATTRIBUTION:"mapboxgl-ctrl-attrib",ACTIVE_BUTTON:"active",BOX_SELECT:"mapbox-gl-draw_boxselect"},s={HOT:"mapbox-gl-draw-hot",COLD:"mapbox-gl-draw-cold"},l={ADD:"add",MOVE:"move",DRAG:"drag",POINTER:"pointer",NONE:"none"},c={POLYGON:"polygon",LINE:"line_string",POINT:"point"},u={FEATURE:"Feature",POLYGON:"Polygon",LINE_STRING:"LineString",POINT:"Point",FEATURE_COLLECTION:"FeatureCollection",MULTI_PREFIX:"Multi",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon"},h={DRAW_LINE_STRING:"draw_line_string",DRAW_POLYGON:"draw_polygon",DRAW_POINT:"draw_point",SIMPLE_SELECT:"simple_select",DIRECT_SELECT:"direct_select",STATIC:"static"},p={CREATE:"draw.create",DELETE:"draw.delete",UPDATE:"draw.update",SELECTION_CHANGE:"draw.selectionchange",MODE_CHANGE:"draw.modechange",ACTIONABLE:"draw.actionable",RENDER:"draw.render",COMBINE_FEATURES:"draw.combine",UNCOMBINE_FEATURES:"draw.uncombine"},f={MOVE:"move",CHANGE_COORDINATES:"change_coordinates"},d={FEATURE:"feature",MIDPOINT:"midpoint",VERTEX:"vertex"},m={ACTIVE:"true",INACTIVE:"false"},g=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"],y=Object.freeze({__proto__:null,classes:a,sources:s,cursors:l,types:c,geojsonTypes:u,modes:h,events:p,updateActions:f,meta:d,activeStates:m,interactions:g,LAT_MIN:-90,LAT_RENDERED_MIN:-85,LAT_MAX:90,LAT_RENDERED_MAX:85,LNG_MIN:-270,LNG_MAX:270}),v={Point:0,LineString:1,MultiLineString:1,Polygon:2};function w(e,t){var n=v[e.geometry.type]-v[t.geometry.type];return 0===n&&e.geometry.type===u.POLYGON?e.area-t.area:n}function b(e){return e.map(function(e){return e.geometry.type===u.POLYGON&&(e.area=t.geometry({type:u.FEATURE,property:{},geometry:e.geometry})),e}).sort(w).map(function(e){return delete e.area,e})}function _(e,t){return void 0===t&&(t=0),[[e.point.x-t,e.point.y-t],[e.point.x+t,e.point.y+t]]}function x(e){if(this._items={},this._nums={},this._length=e?e.length:0,e)for(var t=0,n=e.length;t<n;t++)this.add(e[t]),void 0!==e[t]&&("string"==typeof e[t]?this._items[e[t]]=t:this._nums[e[t]]=t)}x.prototype.add=function(e){return this.has(e)||(this._length++,"string"==typeof e?this._items[e]=this._length:this._nums[e]=this._length),this},x.prototype.delete=function(e){return!1===this.has(e)||(this._length--,delete this._items[e],delete this._nums[e]),this},x.prototype.has=function(e){return!("string"!=typeof e&&"number"!=typeof e||void 0===this._items[e]&&void 0===this._nums[e])},x.prototype.values=function(){var e=this,t=[];return Object.keys(this._items).forEach(function(n){t.push({k:n,v:e._items[n]})}),Object.keys(this._nums).forEach(function(n){t.push({k:JSON.parse(n),v:e._nums[n]})}),t.sort(function(e,t){return e.v-t.v}).map(function(e){return e.k})},x.prototype.clear=function(){return this._length=0,this._items={},this._nums={},this};var E=[d.FEATURE,d.MIDPOINT,d.VERTEX],T={click:function(e,t,n){return S(e,t,n,n.options.clickBuffer)},touch:function(e,t,n){return S(e,t,n,n.options.touchBuffer)}};function S(e,t,n,r){if(null===n.map)return[];var o=e?_(e,r):t,i={};n.options.styles&&(i.layers=n.options.styles.map(function(e){return e.id}));var a=n.map.queryRenderedFeatures(o,i).filter(function(e){return-1!==E.indexOf(e.properties.meta)}),s=new x,l=[];return a.forEach(function(e){var t=e.properties.id;s.has(t)||(s.add(t),l.push(e))}),b(l)}function C(e,t){var n=T.click(e,null,t),r={mouse:l.NONE};return n[0]&&(r.mouse=n[0].properties.active===m.ACTIVE?l.MOVE:l.POINTER,r.feature=n[0].properties.meta),-1!==t.events.currentModeName().indexOf("draw")&&(r.mouse=l.ADD),t.ui.queueMapClasses(r),t.ui.updateMapClasses(),n[0]}function P(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function O(e,t,n){void 0===n&&(n={});var r=null!=n.fineTolerance?n.fineTolerance:4,o=null!=n.grossTolerance?n.grossTolerance:12,i=null!=n.interval?n.interval:500;e.point=e.point||t.point,e.time=e.time||t.time;var a=P(e.point,t.point);return a<r||a<o&&t.time-e.time<i}function A(e,t,n){void 0===n&&(n={});var r=null!=n.tolerance?n.tolerance:25,o=null!=n.interval?n.interval:250;return e.point=e.point||t.point,e.time=e.time||t.time,P(e.point,t.point)<r&&t.time-e.time<o}var k={},L={get exports(){return k},set exports(e){k=e}}.exports=function(e,t){if(t||(t=16),void 0===e&&(e=128),e<=0)return"0";for(var n=Math.log(Math.pow(2,e))/Math.log(t),r=2;n===1/0;r*=2)n=Math.log(Math.pow(2,e/r))/Math.log(t)*r;var o=n-Math.floor(n),i="";for(r=0;r<Math.floor(n);r++)i=Math.floor(Math.random()*t).toString(t)+i;if(o){var a=Math.pow(t,o);i=Math.floor(Math.random()*a).toString(t)+i}var s=parseInt(i,t);return s!==1/0&&s>=Math.pow(2,e)?L(e,t):i};L.rack=function(e,t,n){var r=function(r){var i=0;do{if(i++>10){if(!n)throw new Error("too many ID collisions, use more bits");e+=n}var a=L(e,t)}while(Object.hasOwnProperty.call(o,a));return o[a]=r,a},o=r.hats={};return r.get=function(e){return r.hats[e]},r.set=function(e,t){return r.hats[e]=t,r},r.bits=e||128,r.base=t||16,r};var I=function(e,t){this.ctx=e,this.properties=t.properties||{},this.coordinates=t.geometry.coordinates,this.id=t.id||k(),this.type=t.geometry.type};I.prototype.changed=function(){this.ctx.store.featureChanged(this.id)},I.prototype.incomingCoords=function(e){this.setCoordinates(e)},I.prototype.setCoordinates=function(e){this.coordinates=e,this.changed()},I.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.coordinates))},I.prototype.setProperty=function(e,t){this.properties[e]=t},I.prototype.toGeoJSON=function(){return JSON.parse(JSON.stringify({id:this.id,type:u.FEATURE,properties:this.properties,geometry:{coordinates:this.getCoordinates(),type:this.type}}))},I.prototype.internal=function(e){var t={id:this.id,meta:d.FEATURE,"meta:type":this.type,active:m.INACTIVE,mode:e};if(this.ctx.options.userProperties)for(var n in this.properties)t["user_"+n]=this.properties[n];return{type:u.FEATURE,properties:t,geometry:{coordinates:this.getCoordinates(),type:this.type}}};var M=function(e,t){I.call(this,e,t)};(M.prototype=Object.create(I.prototype)).isValid=function(){return"number"==typeof this.coordinates[0]&&"number"==typeof this.coordinates[1]},M.prototype.updateCoordinate=function(e,t,n){this.coordinates=3===arguments.length?[t,n]:[e,t],this.changed()},M.prototype.getCoordinate=function(){return this.getCoordinates()};var j=function(e,t){I.call(this,e,t)};(j.prototype=Object.create(I.prototype)).isValid=function(){return this.coordinates.length>1},j.prototype.addCoordinate=function(e,t,n){this.changed();var r=parseInt(e,10);this.coordinates.splice(r,0,[t,n])},j.prototype.getCoordinate=function(e){var t=parseInt(e,10);return JSON.parse(JSON.stringify(this.coordinates[t]))},j.prototype.removeCoordinate=function(e){this.changed(),this.coordinates.splice(parseInt(e,10),1)},j.prototype.updateCoordinate=function(e,t,n){var r=parseInt(e,10);this.coordinates[r]=[t,n],this.changed()};var R=function(e,t){I.call(this,e,t),this.coordinates=this.coordinates.map(function(e){return e.slice(0,-1)})};(R.prototype=Object.create(I.prototype)).isValid=function(){return 0!==this.coordinates.length&&this.coordinates.every(function(e){return e.length>2})},R.prototype.incomingCoords=function(e){this.coordinates=e.map(function(e){return e.slice(0,-1)}),this.changed()},R.prototype.setCoordinates=function(e){this.coordinates=e,this.changed()},R.prototype.addCoordinate=function(e,t,n){this.changed();var r=e.split(".").map(function(e){return parseInt(e,10)});this.coordinates[r[0]].splice(r[1],0,[t,n])},R.prototype.removeCoordinate=function(e){this.changed();var t=e.split(".").map(function(e){return parseInt(e,10)}),n=this.coordinates[t[0]];n&&(n.splice(t[1],1),n.length<3&&this.coordinates.splice(t[0],1))},R.prototype.getCoordinate=function(e){var t=e.split(".").map(function(e){return parseInt(e,10)}),n=this.coordinates[t[0]];return JSON.parse(JSON.stringify(n[t[1]]))},R.prototype.getCoordinates=function(){return this.coordinates.map(function(e){return e.concat([e[0]])})},R.prototype.updateCoordinate=function(e,t,n){this.changed();var r=e.split("."),o=parseInt(r[0],10),i=parseInt(r[1],10);void 0===this.coordinates[o]&&(this.coordinates[o]=[]),this.coordinates[o][i]=[t,n]};var F={MultiPoint:M,MultiLineString:j,MultiPolygon:R},z=function(e,t,n,r,o){var i=n.split("."),a=parseInt(i[0],10),s=i[1]?i.slice(1).join("."):null;return e[a][t](s,r,o)},N=function(e,t){if(I.call(this,e,t),delete this.coordinates,this.model=F[t.geometry.type],void 0===this.model)throw new TypeError(t.geometry.type+" is not a valid type");this.features=this._coordinatesToFeatures(t.geometry.coordinates)};function B(e){this.map=e.map,this.drawConfig=JSON.parse(JSON.stringify(e.options||{})),this._ctx=e}(N.prototype=Object.create(I.prototype))._coordinatesToFeatures=function(e){var t=this,n=this.model.bind(this);return e.map(function(e){return new n(t.ctx,{id:k(),type:u.FEATURE,properties:{},geometry:{coordinates:e,type:t.type.replace("Multi","")}})})},N.prototype.isValid=function(){return this.features.every(function(e){return e.isValid()})},N.prototype.setCoordinates=function(e){this.features=this._coordinatesToFeatures(e),this.changed()},N.prototype.getCoordinate=function(e){return z(this.features,"getCoordinate",e)},N.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.features.map(function(e){return e.type===u.POLYGON?e.getCoordinates():e.coordinates})))},N.prototype.updateCoordinate=function(e,t,n){z(this.features,"updateCoordinate",e,t,n),this.changed()},N.prototype.addCoordinate=function(e,t,n){z(this.features,"addCoordinate",e,t,n),this.changed()},N.prototype.removeCoordinate=function(e){z(this.features,"removeCoordinate",e),this.changed()},N.prototype.getFeatures=function(){return this.features},B.prototype.setSelected=function(e){return this._ctx.store.setSelected(e)},B.prototype.setSelectedCoordinates=function(e){var t=this;this._ctx.store.setSelectedCoordinates(e),e.reduce(function(e,n){return void 0===e[n.feature_id]&&(e[n.feature_id]=!0,t._ctx.store.get(n.feature_id).changed()),e},{})},B.prototype.getSelected=function(){return this._ctx.store.getSelected()},B.prototype.getSelectedIds=function(){return this._ctx.store.getSelectedIds()},B.prototype.isSelected=function(e){return this._ctx.store.isSelected(e)},B.prototype.getFeature=function(e){return this._ctx.store.get(e)},B.prototype.select=function(e){return this._ctx.store.select(e)},B.prototype.deselect=function(e){return this._ctx.store.deselect(e)},B.prototype.deleteFeature=function(e,t){return void 0===t&&(t={}),this._ctx.store.delete(e,t)},B.prototype.addFeature=function(e){return this._ctx.store.add(e)},B.prototype.clearSelectedFeatures=function(){return this._ctx.store.clearSelected()},B.prototype.clearSelectedCoordinates=function(){return this._ctx.store.clearSelectedCoordinates()},B.prototype.setActionableState=function(e){void 0===e&&(e={});var t={trash:e.trash||!1,combineFeatures:e.combineFeatures||!1,uncombineFeatures:e.uncombineFeatures||!1};return this._ctx.events.actionable(t)},B.prototype.changeMode=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this._ctx.events.changeMode(e,t,n)},B.prototype.updateUIClasses=function(e){return this._ctx.ui.queueMapClasses(e)},B.prototype.activateUIButton=function(e){return this._ctx.ui.setActiveButton(e)},B.prototype.featuresAt=function(e,t,n){if(void 0===n&&(n="click"),"click"!==n&&"touch"!==n)throw new Error("invalid buffer type");return T[n](e,t,this._ctx)},B.prototype.newFeature=function(e){var t=e.geometry.type;return t===u.POINT?new M(this._ctx,e):t===u.LINE_STRING?new j(this._ctx,e):t===u.POLYGON?new R(this._ctx,e):new N(this._ctx,e)},B.prototype.isInstanceOf=function(e,t){if(e===u.POINT)return t instanceof M;if(e===u.LINE_STRING)return t instanceof j;if(e===u.POLYGON)return t instanceof R;if("MultiFeature"===e)return t instanceof N;throw new Error("Unknown feature class: "+e)},B.prototype.doRender=function(e){return this._ctx.store.featureChanged(e)},B.prototype.onSetup=function(){},B.prototype.onDrag=function(){},B.prototype.onClick=function(){},B.prototype.onMouseMove=function(){},B.prototype.onMouseDown=function(){},B.prototype.onMouseUp=function(){},B.prototype.onMouseOut=function(){},B.prototype.onKeyUp=function(){},B.prototype.onKeyDown=function(){},B.prototype.onTouchStart=function(){},B.prototype.onTouchMove=function(){},B.prototype.onTouchEnd=function(){},B.prototype.onTap=function(){},B.prototype.onStop=function(){},B.prototype.onTrash=function(){},B.prototype.onCombineFeature=function(){},B.prototype.onUncombineFeature=function(){},B.prototype.toDisplayFeatures=function(){throw new Error("You must overwrite toDisplayFeatures")};var U={drag:"onDrag",click:"onClick",mousemove:"onMouseMove",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseout:"onMouseOut",keyup:"onKeyUp",keydown:"onKeyDown",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",tap:"onTap"},W=Object.keys(U);function $(e){return[].concat(e).filter(function(e){return void 0!==e})}function H(){var e=this;if(!e.ctx.map||void 0===e.ctx.map.getSource(s.HOT))return c();var t=e.ctx.events.currentModeName();e.ctx.ui.queueMapClasses({mode:t});var n=[],r=[];e.isDirty?r=e.getAllIds():(n=e.getChangedIds().filter(function(t){return void 0!==e.get(t)}),r=e.sources.hot.filter(function(t){return t.properties.id&&-1===n.indexOf(t.properties.id)&&void 0!==e.get(t.properties.id)}).map(function(e){return e.properties.id})),e.sources.hot=[];var o=e.sources.cold.length;e.sources.cold=e.isDirty?[]:e.sources.cold.filter(function(e){var t=e.properties.id||e.properties.parent;return-1===n.indexOf(t)});var i=o!==e.sources.cold.length||r.length>0;function a(n,r){var o=e.get(n).internal(t);e.ctx.events.currentModeRender(o,function(t){e.sources[r].push(t)})}if(n.forEach(function(e){return a(e,"hot")}),r.forEach(function(e){return a(e,"cold")}),i&&e.ctx.map.getSource(s.COLD).setData({type:u.FEATURE_COLLECTION,features:e.sources.cold}),e.ctx.map.getSource(s.HOT).setData({type:u.FEATURE_COLLECTION,features:e.sources.hot}),e._emitSelectionChange&&(e.ctx.map.fire(p.SELECTION_CHANGE,{features:e.getSelected().map(function(e){return e.toGeoJSON()}),points:e.getSelectedCoordinates().map(function(e){return{type:u.FEATURE,properties:{},geometry:{type:u.POINT,coordinates:e.coordinates}}})}),e._emitSelectionChange=!1),e._deletedFeaturesToEmit.length){var l=e._deletedFeaturesToEmit.map(function(e){return e.toGeoJSON()});e._deletedFeaturesToEmit=[],e.ctx.map.fire(p.DELETE,{features:l})}function c(){e.isDirty=!1,e.clearChangedIds()}c(),e.ctx.map.fire(p.RENDER,{})}function V(e){var t,n=this;this._features={},this._featureIds=new x,this._selectedFeatureIds=new x,this._selectedCoordinates=[],this._changedFeatureIds=new x,this._deletedFeaturesToEmit=[],this._emitSelectionChange=!1,this._mapInitialConfig={},this.ctx=e,this.sources={hot:[],cold:[]},this.render=function(){t||(t=requestAnimationFrame(function(){t=null,H.call(n)}))},this.isDirty=!1}function q(e,t){var n=e._selectedCoordinates.filter(function(t){return e._selectedFeatureIds.has(t.feature_id)});e._selectedCoordinates.length===n.length||t.silent||(e._emitSelectionChange=!0),e._selectedCoordinates=n}V.prototype.createRenderBatch=function(){var e=this,t=this.render,n=0;return this.render=function(){n++},function(){e.render=t,n>0&&e.render()}},V.prototype.setDirty=function(){return this.isDirty=!0,this},V.prototype.featureChanged=function(e){return this._changedFeatureIds.add(e),this},V.prototype.getChangedIds=function(){return this._changedFeatureIds.values()},V.prototype.clearChangedIds=function(){return this._changedFeatureIds.clear(),this},V.prototype.getAllIds=function(){return this._featureIds.values()},V.prototype.add=function(e){return this.featureChanged(e.id),this._features[e.id]=e,this._featureIds.add(e.id),this},V.prototype.delete=function(e,t){var n=this;return void 0===t&&(t={}),$(e).forEach(function(e){n._featureIds.has(e)&&(n._featureIds.delete(e),n._selectedFeatureIds.delete(e),t.silent||-1===n._deletedFeaturesToEmit.indexOf(n._features[e])&&n._deletedFeaturesToEmit.push(n._features[e]),delete n._features[e],n.isDirty=!0)}),q(this,t),this},V.prototype.get=function(e){return this._features[e]},V.prototype.getAll=function(){var e=this;return Object.keys(this._features).map(function(t){return e._features[t]})},V.prototype.select=function(e,t){var n=this;return void 0===t&&(t={}),$(e).forEach(function(e){n._selectedFeatureIds.has(e)||(n._selectedFeatureIds.add(e),n._changedFeatureIds.add(e),t.silent||(n._emitSelectionChange=!0))}),this},V.prototype.deselect=function(e,t){var n=this;return void 0===t&&(t={}),$(e).forEach(function(e){n._selectedFeatureIds.has(e)&&(n._selectedFeatureIds.delete(e),n._changedFeatureIds.add(e),t.silent||(n._emitSelectionChange=!0))}),q(this,t),this},V.prototype.clearSelected=function(e){return void 0===e&&(e={}),this.deselect(this._selectedFeatureIds.values(),{silent:e.silent}),this},V.prototype.setSelected=function(e,t){var n=this;return void 0===t&&(t={}),e=$(e),this.deselect(this._selectedFeatureIds.values().filter(function(t){return-1===e.indexOf(t)}),{silent:t.silent}),this.select(e.filter(function(e){return!n._selectedFeatureIds.has(e)}),{silent:t.silent}),this},V.prototype.setSelectedCoordinates=function(e){return this._selectedCoordinates=e,this._emitSelectionChange=!0,this},V.prototype.clearSelectedCoordinates=function(){return this._selectedCoordinates=[],this._emitSelectionChange=!0,this},V.prototype.getSelectedIds=function(){return this._selectedFeatureIds.values()},V.prototype.getSelected=function(){var e=this;return this._selectedFeatureIds.values().map(function(t){return e.get(t)})},V.prototype.getSelectedCoordinates=function(){var e=this;return this._selectedCoordinates.map(function(t){return{coordinates:e.get(t.feature_id).getCoordinate(t.coord_path)}})},V.prototype.isSelected=function(e){return this._selectedFeatureIds.has(e)},V.prototype.setFeatureProperty=function(e,t,n){this.get(e).setProperty(t,n),this.featureChanged(e)},V.prototype.storeMapConfig=function(){var e=this;g.forEach(function(t){e.ctx.map[t]&&(e._mapInitialConfig[t]=e.ctx.map[t].isEnabled())})},V.prototype.restoreMapConfig=function(){var e=this;Object.keys(this._mapInitialConfig).forEach(function(t){e._mapInitialConfig[t]?e.ctx.map[t].enable():e.ctx.map[t].disable()})},V.prototype.getInitialConfigValue=function(e){return void 0===this._mapInitialConfig[e]||this._mapInitialConfig[e]};var G=function(){for(var e=arguments,t={},n=0;n<arguments.length;n++){var r=e[n];for(var o in r)J.call(r,o)&&(t[o]=r[o])}return t},J=Object.prototype.hasOwnProperty,Y=["mode","feature","mouse"];function X(t){var n=null,r=null,o={onRemove:function(){return t.map.off("load",o.connect),clearInterval(r),o.removeLayers(),t.store.restoreMapConfig(),t.ui.removeButtons(),t.events.removeEventListeners(),t.ui.clearMapClasses(),t.map=null,t.container=null,t.store=null,n&&n.parentNode&&n.parentNode.removeChild(n),n=null,this},connect:function(){t.map.off("load",o.connect),clearInterval(r),o.addLayers(),t.store.storeMapConfig(),t.events.addEventListeners()},onAdd:function(i){var s=i.fire;return i.fire=function(e,t){var n=arguments;return 1===s.length&&1!==arguments.length&&(n=[G({},{type:e},t)]),s.apply(i,n)},t.map=i,t.events=function(t){var n=Object.keys(t.options.modes).reduce(function(e,n){return e[n]=function(e){var t=Object.keys(e);return function(n,r){void 0===r&&(r={});var o={},i=t.reduce(function(t,n){return t[n]=e[n],t},new B(n));return{start:function(){var t=this;o=i.onSetup(r),W.forEach(function(n){var r,a=U[n],s=function(){return!1};e[a]&&(s=function(){return!0}),t.on(n,s,(r=a,function(e){return i[r](o,e)}))})},stop:function(){i.onStop(o)},trash:function(){i.onTrash(o)},combineFeatures:function(){i.onCombineFeatures(o)},uncombineFeatures:function(){i.onUncombineFeatures(o)},render:function(e,t){i.toDisplayFeatures(o,e,t)}}}}(t.options.modes[n]),e},{}),r={},o={},i={},a=null,s=null;i.drag=function(e,n){n({point:e.point,time:(new Date).getTime()})?(t.ui.queueMapClasses({mouse:l.DRAG}),s.drag(e)):e.originalEvent.stopPropagation()},i.mousedrag=function(e){i.drag(e,function(e){return!O(r,e)})},i.touchdrag=function(e){i.drag(e,function(e){return!A(o,e)})},i.mousemove=function(e){if(1===(void 0!==e.originalEvent.buttons?e.originalEvent.buttons:e.originalEvent.which))return i.mousedrag(e);var n=C(e,t);e.featureTarget=n,s.mousemove(e)},i.mousedown=function(e){r={time:(new Date).getTime(),point:e.point};var n=C(e,t);e.featureTarget=n,s.mousedown(e)},i.mouseup=function(e){var n=C(e,t);e.featureTarget=n,O(r,{point:e.point,time:(new Date).getTime()})?s.click(e):s.mouseup(e)},i.mouseout=function(e){s.mouseout(e)},i.touchstart=function(e){if(e.originalEvent.preventDefault(),t.options.touchEnabled){o={time:(new Date).getTime(),point:e.point};var n=T.touch(e,null,t)[0];e.featureTarget=n,s.touchstart(e)}},i.touchmove=function(e){if(e.originalEvent.preventDefault(),t.options.touchEnabled)return s.touchmove(e),i.touchdrag(e)},i.touchend=function(e){if(e.originalEvent.preventDefault(),t.options.touchEnabled){var n=T.touch(e,null,t)[0];e.featureTarget=n,A(o,{time:(new Date).getTime(),point:e.point})?s.tap(e):s.touchend(e)}};var c=function(e){return!(8===e||46===e||e>=48&&e<=57)};function u(r,o,i){void 0===i&&(i={}),s.stop();var l=n[r];if(void 0===l)throw new Error(r+" is not valid");a=r;var c=l(t,o);s=e(c,t),i.silent||t.map.fire(p.MODE_CHANGE,{mode:r}),t.store.setDirty(),t.store.render()}i.keydown=function(e){"mapboxgl-canvas"===(e.srcElement||e.target).classList[0]&&(8!==e.keyCode&&46!==e.keyCode||!t.options.controls.trash?c(e.keyCode)?s.keydown(e):49===e.keyCode&&t.options.controls.point?u(h.DRAW_POINT):50===e.keyCode&&t.options.controls.line_string?u(h.DRAW_LINE_STRING):51===e.keyCode&&t.options.controls.polygon&&u(h.DRAW_POLYGON):(e.preventDefault(),s.trash()))},i.keyup=function(e){c(e.keyCode)&&s.keyup(e)},i.zoomend=function(){t.store.changeZoom()},i.data=function(e){if("style"===e.dataType){var n=t.setup,r=t.map,o=t.options,i=t.store;o.styles.some(function(e){return r.getLayer(e.id)})||(n.addLayers(),i.setDirty(),i.render())}};var f={trash:!1,combineFeatures:!1,uncombineFeatures:!1};return{start:function(){a=t.options.defaultMode,s=e(n[a](t),t)},changeMode:u,actionable:function(e){var n=!1;Object.keys(e).forEach(function(t){if(void 0===f[t])throw new Error("Invalid action type");f[t]!==e[t]&&(n=!0),f[t]=e[t]}),n&&t.map.fire(p.ACTIONABLE,{actions:f})},currentModeName:function(){return a},currentModeRender:function(e,t){return s.render(e,t)},fire:function(e,t){i[e]&&i[e](t)},addEventListeners:function(){t.map.on("mousemove",i.mousemove),t.map.on("mousedown",i.mousedown),t.map.on("mouseup",i.mouseup),t.map.on("data",i.data),t.map.on("touchmove",i.touchmove,{passive:!1}),t.map.on("touchstart",i.touchstart,{passive:!1}),t.map.on("touchend",i.touchend,{passive:!1}),t.container.addEventListener("mouseout",i.mouseout),t.options.keybindings&&(t.container.addEventListener("keydown",i.keydown),t.container.addEventListener("keyup",i.keyup))},removeEventListeners:function(){t.map.off("mousemove",i.mousemove),t.map.off("mousedown",i.mousedown),t.map.off("mouseup",i.mouseup),t.map.off("data",i.data),t.map.off("touchmove",i.touchmove),t.map.off("touchstart",i.touchstart),t.map.off("touchend",i.touchend),t.container.removeEventListener("mouseout",i.mouseout),t.options.keybindings&&(t.container.removeEventListener("keydown",i.keydown),t.container.removeEventListener("keyup",i.keyup))},trash:function(e){s.trash(e)},combineFeatures:function(){s.combineFeatures()},uncombineFeatures:function(){s.uncombineFeatures()},getMode:function(){return a}}}(t),t.ui=function(e){var t={},n=null,r={mode:null,feature:null,mouse:null},o={mode:null,feature:null,mouse:null};function i(e){o=G(o,e)}function s(){var t,n;if(e.container){var i=[],a=[];Y.forEach(function(e){o[e]!==r[e]&&(i.push(e+"-"+r[e]),null!==o[e]&&a.push(e+"-"+o[e]))}),i.length>0&&(t=e.container.classList).remove.apply(t,i),a.length>0&&(n=e.container.classList).add.apply(n,a),r=G(r,o)}}function l(e,t){void 0===t&&(t={});var r=document.createElement("button");return r.className=a.CONTROL_BUTTON+" "+t.className,r.setAttribute("title",t.title),t.container.appendChild(r),r.addEventListener("click",function(r){if(r.preventDefault(),r.stopPropagation(),r.target===n)return u(),void t.onDeactivate();p(e),t.onActivate()},!0),r}function u(){n&&(n.classList.remove(a.ACTIVE_BUTTON),n=null)}function p(e){u();var r=t[e];r&&r&&"trash"!==e&&(r.classList.add(a.ACTIVE_BUTTON),n=r)}return{setActiveButton:p,queueMapClasses:i,updateMapClasses:s,clearMapClasses:function(){i({mode:null,feature:null,mouse:null}),s()},addButtons:function(){var n=e.options.controls,r=document.createElement("div");return r.className=a.CONTROL_GROUP+" "+a.CONTROL_BASE,n?(n[c.LINE]&&(t[c.LINE]=l(c.LINE,{container:r,className:a.CONTROL_BUTTON_LINE,title:"LineString tool "+(e.options.keybindings?"(l)":""),onActivate:function(){return e.events.changeMode(h.DRAW_LINE_STRING)},onDeactivate:function(){return e.events.trash()}})),n[c.POLYGON]&&(t[c.POLYGON]=l(c.POLYGON,{container:r,className:a.CONTROL_BUTTON_POLYGON,title:"Polygon tool "+(e.options.keybindings?"(p)":""),onActivate:function(){return e.events.changeMode(h.DRAW_POLYGON)},onDeactivate:function(){return e.events.trash()}})),n[c.POINT]&&(t[c.POINT]=l(c.POINT,{container:r,className:a.CONTROL_BUTTON_POINT,title:"Marker tool "+(e.options.keybindings?"(m)":""),onActivate:function(){return e.events.changeMode(h.DRAW_POINT)},onDeactivate:function(){return e.events.trash()}})),n.trash&&(t.trash=l("trash",{container:r,className:a.CONTROL_BUTTON_TRASH,title:"Delete",onActivate:function(){e.events.trash()}})),n.combine_features&&(t.combine_features=l("combineFeatures",{container:r,className:a.CONTROL_BUTTON_COMBINE_FEATURES,title:"Combine",onActivate:function(){e.events.combineFeatures()}})),n.uncombine_features&&(t.uncombine_features=l("uncombineFeatures",{container:r,className:a.CONTROL_BUTTON_UNCOMBINE_FEATURES,title:"Uncombine",onActivate:function(){e.events.uncombineFeatures()}})),r):r},removeButtons:function(){Object.keys(t).forEach(function(e){var n=t[e];n.parentNode&&n.parentNode.removeChild(n),delete t[e]})}}}(t),t.container=i.getContainer(),t.store=new V(t),n=t.ui.addButtons(),t.options.boxSelect&&(i.boxZoom.disable(),i.dragPan.disable(),i.dragPan.enable()),i.loaded()?o.connect():(i.on("load",o.connect),r=setInterval(function(){i.loaded()&&o.connect()},16)),t.events.start(),n},addLayers:function(){t.map.addSource(s.COLD,{data:{type:u.FEATURE_COLLECTION,features:[]},type:"geojson"}),t.map.addSource(s.HOT,{data:{type:u.FEATURE_COLLECTION,features:[]},type:"geojson"}),t.options.styles.forEach(function(e){t.map.addLayer(e)}),t.store.setDirty(!0),t.store.render()},removeLayers:function(){t.options.styles.forEach(function(e){t.map.getLayer(e.id)&&t.map.removeLayer(e.id)}),t.map.getSource(s.COLD)&&t.map.removeSource(s.COLD),t.map.getSource(s.HOT)&&t.map.removeSource(s.HOT)}};return t.setup=o,o}var Z=[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],paint:{"fill-color":"#3bb2d0","fill-outline-color":"#3bb2d0","fill-opacity":.1}},{id:"gl-draw-polygon-fill-active",type:"fill",filter:["all",["==","active","true"],["==","$type","Polygon"]],paint:{"fill-color":"#fbb03b","fill-outline-color":"#fbb03b","fill-opacity":.1}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","$type","Point"],["==","meta","midpoint"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-polygon-stroke-active",type:"line",filter:["all",["==","active","true"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-line-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","LineString"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-line-active",type:"line",filter:["all",["==","$type","LineString"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-polygon-and-line-vertex-stroke-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-point-point-stroke-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-opacity":1,"circle-color":"#fff"}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#3bb2d0"}},{id:"gl-draw-point-stroke-active",type:"circle",filter:["all",["==","$type","Point"],["==","active","true"],["!=","meta","midpoint"]],paint:{"circle-radius":7,"circle-color":"#fff"}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["==","active","true"]],paint:{"circle-radius":5,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-fill-static",type:"fill",filter:["all",["==","mode","static"],["==","$type","Polygon"]],paint:{"fill-color":"#404040","fill-outline-color":"#404040","fill-opacity":.1}},{id:"gl-draw-polygon-stroke-static",type:"line",filter:["all",["==","mode","static"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-line-static",type:"line",filter:["all",["==","mode","static"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-point-static",type:"circle",filter:["all",["==","mode","static"],["==","$type","Point"]],paint:{"circle-radius":5,"circle-color":"#404040"}}];function K(e){return function(t){var n=t.featureTarget;return!!n&&!!n.properties&&n.properties.meta===e}}function Q(e){return!!e.originalEvent&&!!e.originalEvent.shiftKey&&0===e.originalEvent.button}function ee(e){return!!e.featureTarget&&!!e.featureTarget.properties&&e.featureTarget.properties.active===m.ACTIVE&&e.featureTarget.properties.meta===d.FEATURE}function te(e){return!!e.featureTarget&&!!e.featureTarget.properties&&e.featureTarget.properties.active===m.INACTIVE&&e.featureTarget.properties.meta===d.FEATURE}function ne(e){return void 0===e.featureTarget}function re(e){return!!e.featureTarget&&!!e.featureTarget.properties&&e.featureTarget.properties.meta===d.FEATURE}function oe(e){var t=e.featureTarget;return!!t&&!!t.properties&&t.properties.meta===d.VERTEX}function ie(e){return!!e.originalEvent&&!0===e.originalEvent.shiftKey}function ae(e){return 27===e.keyCode}function se(e){return 13===e.keyCode}var le=Object.freeze({__proto__:null,isOfMetaType:K,isShiftMousedown:Q,isActiveFeature:ee,isInactiveFeature:te,noTarget:ne,isFeature:re,isVertex:oe,isShiftDown:ie,isEscapeKey:ae,isEnterKey:se,isTrue:function(){return!0}}),ce=ue;function ue(e,t){this.x=e,this.y=t}function he(e,t){var n=t.getBoundingClientRect();return new ce(e.clientX-n.left-(t.clientLeft||0),e.clientY-n.top-(t.clientTop||0))}function pe(e,t,n,r){return{type:u.FEATURE,properties:{meta:d.VERTEX,parent:e,coord_path:n,active:r?m.ACTIVE:m.INACTIVE},geometry:{type:u.POINT,coordinates:t}}}function fe(e,t,n){var r=t.geometry.coordinates,o=n.geometry.coordinates;if(r[1]>85||r[1]<-85||o[1]>85||o[1]<-85)return null;var i={lng:(r[0]+o[0])/2,lat:(r[1]+o[1])/2};return{type:u.FEATURE,properties:{meta:d.MIDPOINT,parent:e,lng:i.lng,lat:i.lat,coord_path:n.properties.coord_path},geometry:{type:u.POINT,coordinates:[i.lng,i.lat]}}}function de(e,t,n){void 0===t&&(t={}),void 0===n&&(n=null);var r,o=e.geometry,i=o.type,a=o.coordinates,s=e.properties&&e.properties.id,l=[];function c(e,n){var r="",o=null;e.forEach(function(e,i){var a=null!=n?n+"."+i:String(i),c=pe(s,e,a,h(a));if(t.midpoints&&o){var u=fe(s,o,c);u&&l.push(u)}o=c;var p=JSON.stringify(e);r!==p&&l.push(c),0===i&&(r=p)})}function h(e){return!!t.selectedPaths&&-1!==t.selectedPaths.indexOf(e)}return i===u.POINT?l.push(pe(s,a,n,h(n))):i===u.POLYGON?a.forEach(function(e,t){c(e,null!==n?n+"."+t:String(t))}):i===u.LINE_STRING?c(a,n):0===i.indexOf(u.MULTI_PREFIX)&&(r=i.replace(u.MULTI_PREFIX,""),a.forEach(function(n,o){var i={type:u.FEATURE,properties:e.properties,geometry:{type:r,coordinates:n}};l=l.concat(de(i,t,o))})),l}ue.prototype={clone:function(){return new ue(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,n=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=n,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),n=Math.sin(e),r=t*this.x-n*this.y,o=n*this.x+t*this.y;return this.x=r,this.y=o,this},_rotateAround:function(e,t){var n=Math.cos(e),r=Math.sin(e),o=t.x+n*(this.x-t.x)-r*(this.y-t.y),i=t.y+r*(this.x-t.x)+n*(this.y-t.y);return this.x=o,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},ue.convert=function(e){return e instanceof ue?e:Array.isArray(e)?new ue(e[0],e[1]):e};var me={enable:function(e){setTimeout(function(){e.map&&e.map.doubleClickZoom&&e._ctx&&e._ctx.store&&e._ctx.store.getInitialConfigValue&&e._ctx.store.getInitialConfigValue("doubleClickZoom")&&e.map.doubleClickZoom.enable()},0)},disable:function(e){setTimeout(function(){e.map&&e.map.doubleClickZoom&&e.map.doubleClickZoom.disable()},0)}},ge={},ye={get exports(){return ge},set exports(e){ge=e}},ve=function(e){if(!e||!e.type)return null;var t=we[e.type];return t?"geometry"===t?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:e}]}:"feature"===t?{type:"FeatureCollection",features:[e]}:"featurecollection"===t?e:void 0:null},we={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featurecollection"},be=Object.freeze({__proto__:null,default:function e(t){switch(t&&t.type||null){case"FeatureCollection":return t.features=t.features.reduce(function(t,n){return t.concat(e(n))},[]),t;case"Feature":return t.geometry?e(t.geometry).map(function(e){var n={type:"Feature",properties:JSON.parse(JSON.stringify(t.properties)),geometry:e};return void 0!==t.id&&(n.id=t.id),n}):[t];case"MultiPoint":return t.coordinates.map(function(e){return{type:"Point",coordinates:e}});case"MultiPolygon":return t.coordinates.map(function(e){return{type:"Polygon",coordinates:e}});case"MultiLineString":return t.coordinates.map(function(e){return{type:"LineString",coordinates:e}});case"GeometryCollection":return t.geometries.map(e).reduce(function(e,t){return e.concat(t)},[]);case"Point":case"Polygon":case"LineString":return[t]}}}),_e=ve,xe=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(be);xe instanceof Function||(xe=xe.default);var Ee={},Te={get exports(){return Ee},set exports(e){Ee=e}}.exports=function(e){return new Se(e)};function Se(e){this.value=e}function Ce(e,t,n){var r=[],o=[],i=!0;return function e(a){var s=n?Pe(a):a,l={},c=!0,u={node:s,node_:a,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){u.isRoot||(u.parent.node[u.key]=e),u.node=e,t&&(c=!1)},delete:function(e){delete u.parent.node[u.key],e&&(c=!1)},remove:function(e){ke(u.parent.node)?u.parent.node.splice(u.key,1):delete u.parent.node[u.key],e&&(c=!1)},keys:null,before:function(e){l.before=e},after:function(e){l.after=e},pre:function(e){l.pre=e},post:function(e){l.post=e},stop:function(){i=!1},block:function(){c=!1}};if(!i)return u;function h(){if("object"==typeof u.node&&null!==u.node){u.keys&&u.node_===u.node||(u.keys=Oe(u.node)),u.isLeaf=0==u.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===a){u.circular=o[e];break}}else u.isLeaf=!0,u.keys=null;u.notLeaf=!u.isLeaf,u.notRoot=!u.isRoot}h();var p=t.call(u,u.node);return void 0!==p&&u.update&&u.update(p),l.before&&l.before.call(u,u.node),c?("object"!=typeof u.node||null===u.node||u.circular||(o.push(u),h(),Le(u.keys,function(t,o){r.push(t),l.pre&&l.pre.call(u,u.node[t],t);var i=e(u.node[t]);n&&Ie.call(u.node,t)&&(u.node[t]=i.node),i.isLast=o==u.keys.length-1,i.isFirst=0==o,l.post&&l.post.call(u,i),r.pop()}),o.pop()),l.after&&l.after.call(u,u.node),u):u}(e).node}function Pe(e){if("object"==typeof e&&null!==e){var t;if(ke(e))t=[];else if("[object Date]"===Ae(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===Ae(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===Ae(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===Ae(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===Ae(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===Ae(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return Le(Oe(e),function(n){t[n]=e[n]}),t}return e}Se.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!Ie.call(t,r)){t=void 0;break}t=t[r]}return t},Se.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!Ie.call(t,r))return!1;t=t[r]}return!0},Se.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];Ie.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},Se.prototype.map=function(e){return Ce(this.value,e,!0)},Se.prototype.forEach=function(e){return this.value=Ce(this.value,e,!1),this.value},Se.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach(function(t){this.isRoot&&n||(r=e.call(this,r,t))}),r},Se.prototype.paths=function(){var e=[];return this.forEach(function(t){e.push(this.path)}),e},Se.prototype.nodes=function(){var e=[];return this.forEach(function(t){e.push(this.node)}),e},Se.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var i=Pe(r);return e.push(r),t.push(i),Le(Oe(r),function(e){i[e]=n(r[e])}),e.pop(),t.pop(),i}return r}(this.value)};var Oe=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function Ae(e){return Object.prototype.toString.call(e)}var ke=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Le=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};Le(Oe(Se.prototype),function(e){Te[e]=function(t){var n=[].slice.call(arguments,1),r=new Se(t);return r[e].apply(r,n)}});var Ie=Object.hasOwnProperty||function(e,t){return t in e},Me=je;function je(e){if(!(this instanceof je))return new je(e);this._bbox=e||[1/0,1/0,-1/0,-1/0],this._valid=!!e}je.prototype.include=function(e){return this._valid=!0,this._bbox[0]=Math.min(this._bbox[0],e[0]),this._bbox[1]=Math.min(this._bbox[1],e[1]),this._bbox[2]=Math.max(this._bbox[2],e[0]),this._bbox[3]=Math.max(this._bbox[3],e[1]),this},je.prototype.equals=function(e){var t;return t=e instanceof je?e.bbox():e,this._bbox[0]==t[0]&&this._bbox[1]==t[1]&&this._bbox[2]==t[2]&&this._bbox[3]==t[3]},je.prototype.center=function(e){return this._valid?[(this._bbox[0]+this._bbox[2])/2,(this._bbox[1]+this._bbox[3])/2]:null},je.prototype.union=function(e){var t;return this._valid=!0,t=e instanceof je?e.bbox():e,this._bbox[0]=Math.min(this._bbox[0],t[0]),this._bbox[1]=Math.min(this._bbox[1],t[1]),this._bbox[2]=Math.max(this._bbox[2],t[2]),this._bbox[3]=Math.max(this._bbox[3],t[3]),this},je.prototype.bbox=function(){return this._valid?this._bbox:null},je.prototype.contains=function(e){if(!e)return this._fastContains();if(!this._valid)return null;var t=e[0],n=e[1];return this._bbox[0]<=t&&this._bbox[1]<=n&&this._bbox[2]>=t&&this._bbox[3]>=n},je.prototype.intersect=function(e){return this._valid?(t=e instanceof je?e.bbox():e,!(this._bbox[0]>t[2]||this._bbox[2]<t[0]||this._bbox[3]<t[1]||this._bbox[1]>t[3])):null;var t},je.prototype._fastContains=function(){if(!this._valid)return new Function("return null;");var e="return "+this._bbox[0]+"<= ll[0] &&"+this._bbox[1]+"<= ll[1] &&"+this._bbox[2]+">= ll[0] &&"+this._bbox[3]+">= ll[1]";return new Function("ll",e)},je.prototype.polygon=function(){return this._valid?{type:"Polygon",coordinates:[[[this._bbox[0],this._bbox[1]],[this._bbox[2],this._bbox[1]],[this._bbox[2],this._bbox[3]],[this._bbox[0],this._bbox[3]],[this._bbox[0],this._bbox[1]]]]}:null};var Re=function(e){if(!e)return[];var t=xe(_e(e)),n=[];return t.features.forEach(function(e){e.geometry&&(n=n.concat(function(e){return function e(t){return Array.isArray(t)&&t.length&&"number"==typeof t[0]?[t]:t.reduce(function(t,n){return Array.isArray(n)&&Array.isArray(n[0])?t.concat(e(n)):(t.push(n),t)},[])}(e)}(e.geometry.coordinates)))}),n},Fe=Ee,De=Me,ze={features:["FeatureCollection"],coordinates:["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],geometry:["Feature"],geometries:["GeometryCollection"]},Ne=Object.keys(ze);function Be(e){for(var t=De(),n=Re(e),r=0;r<n.length;r++)t.include(n[r]);return t}ye.exports=function(e){return Be(e).bbox()},ge.polygon=function(e){return Be(e).polygon()},ge.bboxify=function(e){return Fe(e).map(function(e){e&&Ne.some(function(t){return!!e[t]&&-1!==ze[t].indexOf(e.type)})&&(e.bbox=Be(e).bbox(),this.update(e))})};var Ue=-90;function We(e,t){var n=Ue,r=90,o=Ue,i=90,a=270,s=-270;e.forEach(function(e){var t=ge(e),l=t[1],c=t[3],u=t[0],h=t[2];l>n&&(n=l),c<r&&(r=c),c>o&&(o=c),l<i&&(i=l),u<a&&(a=u),h>s&&(s=h)});var l=t;return n+l.lat>85&&(l.lat=85-n),o+l.lat>90&&(l.lat=90-o),r+l.lat<-85&&(l.lat=-85-r),i+l.lat<Ue&&(l.lat=Ue-i),a+l.lng<=-270&&(l.lng+=360*Math.ceil(Math.abs(l.lng)/360)),s+l.lng>=270&&(l.lng-=360*Math.ceil(Math.abs(l.lng)/360)),l}function $e(e,t){var n=We(e.map(function(e){return e.toGeoJSON()}),t);e.forEach(function(e){var t,r=e.getCoordinates(),o=function(e){var t={lng:e[0]+n.lng,lat:e[1]+n.lat};return[t.lng,t.lat]},i=function(e){return e.map(function(e){return o(e)})};e.type===u.POINT?t=o(r):e.type===u.LINE_STRING||e.type===u.MULTI_POINT?t=r.map(o):e.type===u.POLYGON||e.type===u.MULTI_LINE_STRING?t=r.map(i):e.type===u.MULTI_POLYGON&&(t=r.map(function(e){return e.map(function(e){return i(e)})})),e.incomingCoords(t)})}var He={onSetup:function(e){var t=this,n={dragMoveLocation:null,boxSelectStartLocation:null,boxSelectElement:void 0,boxSelecting:!1,canBoxSelect:!1,dragMoving:!1,canDragMove:!1,initiallySelectedFeatureIds:e.featureIds||[]};return this.setSelected(n.initiallySelectedFeatureIds.filter(function(e){return void 0!==t.getFeature(e)})),this.fireActionable(),this.setActionableState({combineFeatures:!0,uncombineFeatures:!0,trash:!0}),n},fireUpdate:function(){this.map.fire(p.UPDATE,{action:f.MOVE,features:this.getSelected().map(function(e){return e.toGeoJSON()})})},fireActionable:function(){var e=this,t=this.getSelected(),n=t.filter(function(t){return e.isInstanceOf("MultiFeature",t)}),r=!1;if(t.length>1){r=!0;var o=t[0].type.replace("Multi","");t.forEach(function(e){e.type.replace("Multi","")!==o&&(r=!1)})}var i=n.length>0,a=t.length>0;this.setActionableState({combineFeatures:r,uncombineFeatures:i,trash:a})},getUniqueIds:function(e){return e.length?e.map(function(e){return e.properties.id}).filter(function(e){return void 0!==e}).reduce(function(e,t){return e.add(t),e},new x).values():[]},stopExtendedInteractions:function(e){e.boxSelectElement&&(e.boxSelectElement.parentNode&&e.boxSelectElement.parentNode.removeChild(e.boxSelectElement),e.boxSelectElement=null),this.map.dragPan.enable(),e.boxSelecting=!1,e.canBoxSelect=!1,e.dragMoving=!1,e.canDragMove=!1},onStop:function(){me.enable(this)},onMouseMove:function(e){return this.stopExtendedInteractions(e),!0},onMouseOut:function(e){return!e.dragMoving||this.fireUpdate()}};He.onTap=He.onClick=function(e,t){return ne(t)?this.clickAnywhere(e,t):K(d.VERTEX)(t)?this.clickOnVertex(e,t):re(t)?this.clickOnFeature(e,t):void 0},He.clickAnywhere=function(e){var t=this,n=this.getSelectedIds();n.length&&(this.clearSelectedFeatures(),n.forEach(function(e){return t.doRender(e)})),me.enable(this),this.stopExtendedInteractions(e)},He.clickOnVertex=function(e,t){this.changeMode(h.DIRECT_SELECT,{featureId:t.featureTarget.properties.parent,coordPath:t.featureTarget.properties.coord_path,startPos:t.lngLat}),this.updateUIClasses({mouse:l.MOVE})},He.startOnActiveFeature=function(e,t){this.stopExtendedInteractions(e),this.map.dragPan.disable(),this.doRender(t.featureTarget.properties.id),e.canDragMove=!0,e.dragMoveLocation=t.lngLat},He.clickOnFeature=function(e,t){var n=this;me.disable(this),this.stopExtendedInteractions(e);var r=ie(t),o=this.getSelectedIds(),i=t.featureTarget.properties.id,a=this.isSelected(i);if(!r&&a&&this.getFeature(i).type!==u.POINT)return this.changeMode(h.DIRECT_SELECT,{featureId:i});a&&r?(this.deselect(i),this.updateUIClasses({mouse:l.POINTER}),1===o.length&&me.enable(this)):!a&&r?(this.select(i),this.updateUIClasses({mouse:l.MOVE})):a||r||(o.forEach(function(e){return n.doRender(e)}),this.setSelected(i),this.updateUIClasses({mouse:l.MOVE})),this.doRender(i)},He.onMouseDown=function(e,t){return ee(t)?this.startOnActiveFeature(e,t):this.drawConfig.boxSelect&&Q(t)?this.startBoxSelect(e,t):void 0},He.startBoxSelect=function(e,t){this.stopExtendedInteractions(e),this.map.dragPan.disable(),e.boxSelectStartLocation=he(t.originalEvent,this.map.getContainer()),e.canBoxSelect=!0},He.onTouchStart=function(e,t){if(ee(t))return this.startOnActiveFeature(e,t)},He.onDrag=function(e,t){return e.canDragMove?this.dragMove(e,t):this.drawConfig.boxSelect&&e.canBoxSelect?this.whileBoxSelect(e,t):void 0},He.whileBoxSelect=function(e,t){e.boxSelecting=!0,this.updateUIClasses({mouse:l.ADD}),e.boxSelectElement||(e.boxSelectElement=document.createElement("div"),e.boxSelectElement.classList.add(a.BOX_SELECT),this.map.getContainer().appendChild(e.boxSelectElement));var n=he(t.originalEvent,this.map.getContainer()),r=Math.min(e.boxSelectStartLocation.x,n.x),o=Math.max(e.boxSelectStartLocation.x,n.x),i=Math.min(e.boxSelectStartLocation.y,n.y),s=Math.max(e.boxSelectStartLocation.y,n.y),c="translate("+r+"px, "+i+"px)";e.boxSelectElement.style.transform=c,e.boxSelectElement.style.WebkitTransform=c,e.boxSelectElement.style.width=o-r+"px",e.boxSelectElement.style.height=s-i+"px"},He.dragMove=function(e,t){e.dragMoving=!0,t.originalEvent.stopPropagation();var n={lng:t.lngLat.lng-e.dragMoveLocation.lng,lat:t.lngLat.lat-e.dragMoveLocation.lat};$e(this.getSelected(),n),e.dragMoveLocation=t.lngLat},He.onTouchEnd=He.onMouseUp=function(e,t){var n=this;if(e.dragMoving)this.fireUpdate();else if(e.boxSelecting){var r=[e.boxSelectStartLocation,he(t.originalEvent,this.map.getContainer())],o=this.featuresAt(null,r,"click"),i=this.getUniqueIds(o).filter(function(e){return!n.isSelected(e)});i.length&&(this.select(i),i.forEach(function(e){return n.doRender(e)}),this.updateUIClasses({mouse:l.MOVE}))}this.stopExtendedInteractions(e)},He.toDisplayFeatures=function(e,t,n){t.properties.active=this.isSelected(t.properties.id)?m.ACTIVE:m.INACTIVE,n(t),this.fireActionable(),t.properties.active===m.ACTIVE&&t.geometry.type!==u.POINT&&de(t).forEach(n)},He.onTrash=function(){this.deleteFeature(this.getSelectedIds()),this.fireActionable()},He.onCombineFeatures=function(){var e=this.getSelected();if(!(0===e.length||e.length<2)){for(var t=[],n=[],r=e[0].type.replace("Multi",""),o=0;o<e.length;o++){var i=e[o];if(i.type.replace("Multi","")!==r)return;i.type.includes("Multi")?i.getCoordinates().forEach(function(e){t.push(e)}):t.push(i.getCoordinates()),n.push(i.toGeoJSON())}if(n.length>1){var a=this.newFeature({type:u.FEATURE,properties:n[0].properties,geometry:{type:"Multi"+r,coordinates:t}});this.addFeature(a),this.deleteFeature(this.getSelectedIds(),{silent:!0}),this.setSelected([a.id]),this.map.fire(p.COMBINE_FEATURES,{createdFeatures:[a.toGeoJSON()],deletedFeatures:n})}this.fireActionable()}},He.onUncombineFeatures=function(){var e=this,t=this.getSelected();if(0!==t.length){for(var n=[],r=[],o=function(o){var i=t[o];e.isInstanceOf("MultiFeature",i)&&(i.getFeatures().forEach(function(t){e.addFeature(t),t.properties=i.properties,n.push(t.toGeoJSON()),e.select([t.id])}),e.deleteFeature(i.id,{silent:!0}),r.push(i.toGeoJSON()))},i=0;i<t.length;i++)o(i);n.length>1&&this.map.fire(p.UNCOMBINE_FEATURES,{createdFeatures:n,deletedFeatures:r}),this.fireActionable()}};var Ve=K(d.VERTEX),qe=K(d.MIDPOINT),Ge={fireUpdate:function(){this.map.fire(p.UPDATE,{action:f.CHANGE_COORDINATES,features:this.getSelected().map(function(e){return e.toGeoJSON()})})},fireActionable:function(e){this.setActionableState({combineFeatures:!1,uncombineFeatures:!1,trash:e.selectedCoordPaths.length>0})},startDragging:function(e,t){this.map.dragPan.disable(),e.canDragMove=!0,e.dragMoveLocation=t.lngLat},stopDragging:function(e){this.map.dragPan.enable(),e.dragMoving=!1,e.canDragMove=!1,e.dragMoveLocation=null},onVertex:function(e,t){this.startDragging(e,t);var n=t.featureTarget.properties,r=e.selectedCoordPaths.indexOf(n.coord_path);ie(t)||-1!==r?ie(t)&&-1===r&&e.selectedCoordPaths.push(n.coord_path):e.selectedCoordPaths=[n.coord_path];var o=this.pathsToCoordinates(e.featureId,e.selectedCoordPaths);this.setSelectedCoordinates(o)},onMidpoint:function(e,t){this.startDragging(e,t);var n=t.featureTarget.properties;e.feature.addCoordinate(n.coord_path,n.lng,n.lat),this.fireUpdate(),e.selectedCoordPaths=[n.coord_path]},pathsToCoordinates:function(e,t){return t.map(function(t){return{feature_id:e,coord_path:t}})},onFeature:function(e,t){0===e.selectedCoordPaths.length?this.startDragging(e,t):this.stopDragging(e)},dragFeature:function(e,t,n){$e(this.getSelected(),n),e.dragMoveLocation=t.lngLat},dragVertex:function(e,t,n){for(var r=e.selectedCoordPaths.map(function(t){return e.feature.getCoordinate(t)}),o=We(r.map(function(e){return{type:u.FEATURE,properties:{},geometry:{type:u.POINT,coordinates:e}}}),n),i=0;i<r.length;i++){var a=r[i];e.feature.updateCoordinate(e.selectedCoordPaths[i],a[0]+o.lng,a[1]+o.lat)}},clickNoTarget:function(){this.changeMode(h.SIMPLE_SELECT)},clickInactive:function(){this.changeMode(h.SIMPLE_SELECT)},clickActiveFeature:function(e){e.selectedCoordPaths=[],this.clearSelectedCoordinates(),e.feature.changed()},onSetup:function(e){var t=e.featureId,n=this.getFeature(t);if(!n)throw new Error("You must provide a featureId to enter direct_select mode");if(n.type===u.POINT)throw new TypeError("direct_select mode doesn't handle point features");var r={featureId:t,feature:n,dragMoveLocation:e.startPos||null,dragMoving:!1,canDragMove:!1,selectedCoordPaths:e.coordPath?[e.coordPath]:[]};return this.setSelectedCoordinates(this.pathsToCoordinates(t,r.selectedCoordPaths)),this.setSelected(t),me.disable(this),this.setActionableState({trash:!0}),r},onStop:function(){me.enable(this),this.clearSelectedCoordinates()},toDisplayFeatures:function(e,t,n){e.featureId===t.properties.id?(t.properties.active=m.ACTIVE,n(t),de(t,{map:this.map,midpoints:!0,selectedPaths:e.selectedCoordPaths}).forEach(n)):(t.properties.active=m.INACTIVE,n(t)),this.fireActionable(e)},onTrash:function(e){e.selectedCoordPaths.sort(function(e,t){return t.localeCompare(e,"en",{numeric:!0})}).forEach(function(t){return e.feature.removeCoordinate(t)}),this.fireUpdate(),e.selectedCoordPaths=[],this.clearSelectedCoordinates(),this.fireActionable(e),!1===e.feature.isValid()&&(this.deleteFeature([e.featureId]),this.changeMode(h.SIMPLE_SELECT,{}))},onMouseMove:function(e,t){var n=ee(t),r=Ve(t),o=0===e.selectedCoordPaths.length;return n&&o||r&&!o?this.updateUIClasses({mouse:l.MOVE}):this.updateUIClasses({mouse:l.NONE}),this.stopDragging(e),!0},onMouseOut:function(e){return e.dragMoving&&this.fireUpdate(),!0}};Ge.onTouchStart=Ge.onMouseDown=function(e,t){return Ve(t)?this.onVertex(e,t):ee(t)?this.onFeature(e,t):qe(t)?this.onMidpoint(e,t):void 0},Ge.onDrag=function(e,t){if(!0===e.canDragMove){e.dragMoving=!0,t.originalEvent.stopPropagation();var n={lng:t.lngLat.lng-e.dragMoveLocation.lng,lat:t.lngLat.lat-e.dragMoveLocation.lat};e.selectedCoordPaths.length>0?this.dragVertex(e,t,n):this.dragFeature(e,t,n),e.dragMoveLocation=t.lngLat}},Ge.onClick=function(e,t){return ne(t)?this.clickNoTarget(e,t):ee(t)?this.clickActiveFeature(e,t):te(t)?this.clickInactive(e,t):void this.stopDragging(e)},Ge.onTap=function(e,t){return ne(t)?this.clickNoTarget(e,t):ee(t)?this.clickActiveFeature(e,t):te(t)?this.clickInactive(e,t):void 0},Ge.onTouchEnd=Ge.onMouseUp=function(e){e.dragMoving&&this.fireUpdate(),this.stopDragging(e)};var Je={};function Ye(e,t){return!!e.lngLat&&e.lngLat.lng===t[0]&&e.lngLat.lat===t[1]}Je.onSetup=function(){var e=this.newFeature({type:u.FEATURE,properties:{},geometry:{type:u.POINT,coordinates:[]}});return this.addFeature(e),this.clearSelectedFeatures(),this.updateUIClasses({mouse:l.ADD}),this.activateUIButton(c.POINT),this.setActionableState({trash:!0}),{point:e}},Je.stopDrawingAndRemove=function(e){this.deleteFeature([e.point.id],{silent:!0}),this.changeMode(h.SIMPLE_SELECT)},Je.onTap=Je.onClick=function(e,t){this.updateUIClasses({mouse:l.MOVE}),e.point.updateCoordinate("",t.lngLat.lng,t.lngLat.lat),this.map.fire(p.CREATE,{features:[e.point.toGeoJSON()]}),this.changeMode(h.SIMPLE_SELECT,{featureIds:[e.point.id]})},Je.onStop=function(e){this.activateUIButton(),e.point.getCoordinate().length||this.deleteFeature([e.point.id],{silent:!0})},Je.toDisplayFeatures=function(e,t,n){var r=t.properties.id===e.point.id;if(t.properties.active=r?m.ACTIVE:m.INACTIVE,!r)return n(t)},Je.onTrash=Je.stopDrawingAndRemove,Je.onKeyUp=function(e,t){if(ae(t)||se(t))return this.stopDrawingAndRemove(e,t)};var Xe={onSetup:function(){var e=this.newFeature({type:u.FEATURE,properties:{},geometry:{type:u.POLYGON,coordinates:[[]]}});return this.addFeature(e),this.clearSelectedFeatures(),me.disable(this),this.updateUIClasses({mouse:l.ADD}),this.activateUIButton(c.POLYGON),this.setActionableState({trash:!0}),{polygon:e,currentVertexPosition:0}},clickAnywhere:function(e,t){if(e.currentVertexPosition>0&&Ye(t,e.polygon.coordinates[0][e.currentVertexPosition-1]))return this.changeMode(h.SIMPLE_SELECT,{featureIds:[e.polygon.id]});this.updateUIClasses({mouse:l.ADD}),e.polygon.updateCoordinate("0."+e.currentVertexPosition,t.lngLat.lng,t.lngLat.lat),e.currentVertexPosition++,e.polygon.updateCoordinate("0."+e.currentVertexPosition,t.lngLat.lng,t.lngLat.lat)},clickOnVertex:function(e){return this.changeMode(h.SIMPLE_SELECT,{featureIds:[e.polygon.id]})},onMouseMove:function(e,t){e.polygon.updateCoordinate("0."+e.currentVertexPosition,t.lngLat.lng,t.lngLat.lat),oe(t)&&this.updateUIClasses({mouse:l.POINTER})}};Xe.onTap=Xe.onClick=function(e,t){return oe(t)?this.clickOnVertex(e,t):this.clickAnywhere(e,t)},Xe.onKeyUp=function(e,t){ae(t)?(this.deleteFeature([e.polygon.id],{silent:!0}),this.changeMode(h.SIMPLE_SELECT)):se(t)&&this.changeMode(h.SIMPLE_SELECT,{featureIds:[e.polygon.id]})},Xe.onStop=function(e){this.updateUIClasses({mouse:l.NONE}),me.enable(this),this.activateUIButton(),void 0!==this.getFeature(e.polygon.id)&&(e.polygon.removeCoordinate("0."+e.currentVertexPosition),e.polygon.isValid()?this.map.fire(p.CREATE,{features:[e.polygon.toGeoJSON()]}):(this.deleteFeature([e.polygon.id],{silent:!0}),this.changeMode(h.SIMPLE_SELECT,{},{silent:!0})))},Xe.toDisplayFeatures=function(e,t,n){var r=t.properties.id===e.polygon.id;if(t.properties.active=r?m.ACTIVE:m.INACTIVE,!r)return n(t);if(0!==t.geometry.coordinates.length){var o=t.geometry.coordinates[0].length;if(!(o<3)){if(t.properties.meta=d.FEATURE,n(pe(e.polygon.id,t.geometry.coordinates[0][0],"0.0",!1)),o>3){var i=t.geometry.coordinates[0].length-3;n(pe(e.polygon.id,t.geometry.coordinates[0][i],"0."+i,!1))}if(o<=4){var a=[[t.geometry.coordinates[0][0][0],t.geometry.coordinates[0][0][1]],[t.geometry.coordinates[0][1][0],t.geometry.coordinates[0][1][1]]];if(n({type:u.FEATURE,properties:t.properties,geometry:{coordinates:a,type:u.LINE_STRING}}),3===o)return}return n(t)}}},Xe.onTrash=function(e){this.deleteFeature([e.polygon.id],{silent:!0}),this.changeMode(h.SIMPLE_SELECT)};var Ze={onSetup:function(e){var t,n,r=(e=e||{}).featureId,o="forward";if(r){if(!(t=this.getFeature(r)))throw new Error("Could not find a feature with the provided featureId");var i=e.from;if(i&&"Feature"===i.type&&i.geometry&&"Point"===i.geometry.type&&(i=i.geometry),i&&"Point"===i.type&&i.coordinates&&2===i.coordinates.length&&(i=i.coordinates),!i||!Array.isArray(i))throw new Error("Please use the `from` property to indicate which point to continue the line from");var a=t.coordinates.length-1;if(t.coordinates[a][0]===i[0]&&t.coordinates[a][1]===i[1])n=a+1,t.addCoordinate.apply(t,[n].concat(t.coordinates[a]));else{if(t.coordinates[0][0]!==i[0]||t.coordinates[0][1]!==i[1])throw new Error("`from` should match the point at either the start or the end of the provided LineString");o="backwards",n=0,t.addCoordinate.apply(t,[n].concat(t.coordinates[0]))}}else t=this.newFeature({type:u.FEATURE,properties:{},geometry:{type:u.LINE_STRING,coordinates:[]}}),n=0,this.addFeature(t);return this.clearSelectedFeatures(),me.disable(this),this.updateUIClasses({mouse:l.ADD}),this.activateUIButton(c.LINE),this.setActionableState({trash:!0}),{line:t,currentVertexPosition:n,direction:o}},clickAnywhere:function(e,t){if(e.currentVertexPosition>0&&Ye(t,e.line.coordinates[e.currentVertexPosition-1])||"backwards"===e.direction&&Ye(t,e.line.coordinates[e.currentVertexPosition+1]))return this.changeMode(h.SIMPLE_SELECT,{featureIds:[e.line.id]});this.updateUIClasses({mouse:l.ADD}),e.line.updateCoordinate(e.currentVertexPosition,t.lngLat.lng,t.lngLat.lat),"forward"===e.direction?(e.currentVertexPosition++,e.line.updateCoordinate(e.currentVertexPosition,t.lngLat.lng,t.lngLat.lat)):e.line.addCoordinate(0,t.lngLat.lng,t.lngLat.lat)},clickOnVertex:function(e){return this.changeMode(h.SIMPLE_SELECT,{featureIds:[e.line.id]})},onMouseMove:function(e,t){e.line.updateCoordinate(e.currentVertexPosition,t.lngLat.lng,t.lngLat.lat),oe(t)&&this.updateUIClasses({mouse:l.POINTER})}};Ze.onTap=Ze.onClick=function(e,t){if(oe(t))return this.clickOnVertex(e,t);this.clickAnywhere(e,t)},Ze.onKeyUp=function(e,t){se(t)?this.changeMode(h.SIMPLE_SELECT,{featureIds:[e.line.id]}):ae(t)&&(this.deleteFeature([e.line.id],{silent:!0}),this.changeMode(h.SIMPLE_SELECT))},Ze.onStop=function(e){me.enable(this),this.activateUIButton(),void 0!==this.getFeature(e.line.id)&&(e.line.removeCoordinate(""+e.currentVertexPosition),e.line.isValid()?this.map.fire(p.CREATE,{features:[e.line.toGeoJSON()]}):(this.deleteFeature([e.line.id],{silent:!0}),this.changeMode(h.SIMPLE_SELECT,{},{silent:!0})))},Ze.onTrash=function(e){this.deleteFeature([e.line.id],{silent:!0}),this.changeMode(h.SIMPLE_SELECT)},Ze.toDisplayFeatures=function(e,t,n){var r=t.properties.id===e.line.id;if(t.properties.active=r?m.ACTIVE:m.INACTIVE,!r)return n(t);t.geometry.coordinates.length<2||(t.properties.meta=d.FEATURE,n(pe(e.line.id,t.geometry.coordinates["forward"===e.direction?t.geometry.coordinates.length-2:1],""+("forward"===e.direction?t.geometry.coordinates.length-2:1),!1)),n(t))};var Ke={simple_select:He,direct_select:Ge,draw_point:Je,draw_polygon:Xe,draw_line_string:Ze},Qe={defaultMode:h.SIMPLE_SELECT,keybindings:!0,touchEnabled:!0,clickBuffer:2,touchBuffer:25,boxSelect:!0,displayControlsDefault:!0,styles:Z,modes:Ke,controls:{},userProperties:!1},et={point:!0,line_string:!0,polygon:!0,trash:!0,combine_features:!0,uncombine_features:!0},tt={point:!1,line_string:!1,polygon:!1,trash:!1,combine_features:!1,uncombine_features:!1};function nt(e,t){return e.map(function(e){return e.source?e:G(e,{id:e.id+"."+t,source:"hot"===t?s.HOT:s.COLD})})}var rt={};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",l="[object Error]",c="[object Function]",u="[object Map]",h="[object Number]",p="[object Object]",f="[object Promise]",d="[object RegExp]",m="[object Set]",g="[object String]",y="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",b=/^\[object .+?Constructor\]$/,_=/^(?:0|[1-9]\d*)$/,x={};x["[object Float32Array]"]=x["[object Float64Array]"]=x["[object Int8Array]"]=x["[object Int16Array]"]=x["[object Int32Array]"]=x["[object Uint8Array]"]=x["[object Uint8ClampedArray]"]=x["[object Uint16Array]"]=x["[object Uint32Array]"]=!0,x[o]=x[i]=x[v]=x[a]=x[w]=x[s]=x[l]=x[c]=x[u]=x[h]=x[p]=x[d]=x[m]=x[g]=x[y]=!1;var E="object"==typeof D&&D&&D.Object===Object&&D,T="object"==typeof self&&self&&self.Object===Object&&self,S=E||T||Function("return this")(),C=t&&!t.nodeType&&t,P=C&&e&&!e.nodeType&&e,O=P&&P.exports===C,A=O&&E.process,k=function(){try{return A&&A.binding&&A.binding("util")}catch(e){}}(),L=k&&k.isTypedArray;function I(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function M(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function j(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var R,F,z,N=Array.prototype,B=Function.prototype,U=Object.prototype,W=S["__core-js_shared__"],$=B.toString,H=U.hasOwnProperty,V=(R=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||""))?"Symbol(src)_1."+R:"",q=U.toString,G=RegExp("^"+$.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),J=O?S.Buffer:void 0,Y=S.Symbol,X=S.Uint8Array,Z=U.propertyIsEnumerable,K=N.splice,Q=Y?Y.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=J?J.isBuffer:void 0,ne=(F=Object.keys,z=Object,function(e){return F(z(e))}),re=Oe(S,"DataView"),oe=Oe(S,"Map"),ie=Oe(S,"Promise"),ae=Oe(S,"Set"),se=Oe(S,"WeakMap"),le=Oe(Object,"create"),ce=Ie(re),ue=Ie(oe),he=Ie(ie),pe=Ie(ae),fe=Ie(se),de=Y?Y.prototype:void 0,me=de?de.valueOf:void 0;function ge(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function we(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ve;++t<n;)this.add(e[t])}function be(e){var t=this.__data__=new ye(e);this.size=t.size}function _e(e,t){for(var n=e.length;n--;)if(Me(e[n][0],t))return n;return-1}function xe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Q&&Q in Object(e)?function(e){var t=H.call(e,Q),n=e[Q];try{e[Q]=void 0;var r=!0}catch(e){}var o=q.call(e);return r&&(t?e[Q]=n:delete e[Q]),o}(e):function(e){return q.call(e)}(e)}function Ee(e){return Be(e)&&xe(e)==o}function Te(e,t,n,r,c){return e===t||(null==e||null==t||!Be(e)&&!Be(t)?e!=e&&t!=t:function(e,t,n,r,c,f){var y=Re(e),b=Re(t),_=y?i:ke(e),x=b?i:ke(t),E=(_=_==o?p:_)==p,T=(x=x==o?p:x)==p,S=_==x;if(S&&Fe(e)){if(!Fe(t))return!1;y=!0,E=!1}if(S&&!E)return f||(f=new be),y||Ue(e)?Se(e,t,n,r,c,f):function(e,t,n,r,o,i,c){switch(n){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case v:return!(e.byteLength!=t.byteLength||!i(new X(e),new X(t)));case a:case s:case h:return Me(+e,+t);case l:return e.name==t.name&&e.message==t.message;case d:case g:return e==t+"";case u:var p=M;case m:var f=1&r;if(p||(p=j),e.size!=t.size&&!f)return!1;var y=c.get(e);if(y)return y==t;r|=2,c.set(e,t);var b=Se(p(e),p(t),r,o,i,c);return c.delete(e),b;case"[object Symbol]":if(me)return me.call(e)==me.call(t)}return!1}(e,t,_,n,r,c,f);if(!(1&n)){var C=E&&H.call(e,"__wrapped__"),P=T&&H.call(t,"__wrapped__");if(C||P){var O=C?e.value():e,A=P?t.value():t;return f||(f=new be),c(O,A,n,r,f)}}return!!S&&(f||(f=new be),function(e,t,n,r,o,i){var a=1&n,s=Ce(e),l=s.length;if(l!=Ce(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:H.call(t,u)))return!1}var h=i.get(e);if(h&&i.get(t))return h==t;var p=!0;i.set(e,t),i.set(t,e);for(var f=a;++c<l;){var d=e[u=s[c]],m=t[u];if(r)var g=a?r(m,d,u,t,e,i):r(d,m,u,e,t,i);if(!(void 0===g?d===m||o(d,m,n,r,i):g)){p=!1;break}f||(f="constructor"==u)}if(p&&!f){var y=e.constructor,v=t.constructor;y==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v||(p=!1)}return i.delete(e),i.delete(t),p}(e,t,n,r,c,f))}(e,t,n,r,Te,c))}function Se(e,t,n,r,o,i){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=i.get(e);if(c&&i.get(t))return c==t;var u=-1,h=!0,p=2&n?new we:void 0;for(i.set(e,t),i.set(t,e);++u<s;){var f=e[u],d=t[u];if(r)var m=a?r(d,f,u,t,e,i):r(f,d,u,e,t,i);if(void 0!==m){if(m)continue;h=!1;break}if(p){if(!I(t,function(e,t){if(a=t,!p.has(a)&&(f===e||o(f,e,n,r,i)))return p.push(t);var a})){h=!1;break}}else if(f!==d&&!o(f,d,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h}function Ce(e){return function(e,t,n){var r=t(e);return Re(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,We,Ae)}function Pe(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Oe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ne(e)||function(e){return!!V&&V in e}(e))&&(De(e)?G:b).test(Ie(e))}(n)?n:void 0}ge.prototype.clear=function(){this.__data__=le?le(null):{},this.size=0},ge.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ge.prototype.get=function(e){var t=this.__data__;if(le){var r=t[e];return r===n?void 0:r}return H.call(t,e)?t[e]:void 0},ge.prototype.has=function(e){var t=this.__data__;return le?void 0!==t[e]:H.call(t,e)},ge.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=le&&void 0===t?n:t,this},ye.prototype.clear=function(){this.__data__=[],this.size=0},ye.prototype.delete=function(e){var t=this.__data__,n=_e(t,e);return!(n<0||(n==t.length-1?t.pop():K.call(t,n,1),--this.size,0))},ye.prototype.get=function(e){var t=this.__data__,n=_e(t,e);return n<0?void 0:t[n][1]},ye.prototype.has=function(e){return _e(this.__data__,e)>-1},ye.prototype.set=function(e,t){var n=this.__data__,r=_e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ve.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(oe||ye),string:new ge}},ve.prototype.delete=function(e){var t=Pe(this,e).delete(e);return this.size-=t?1:0,t},ve.prototype.get=function(e){return Pe(this,e).get(e)},ve.prototype.has=function(e){return Pe(this,e).has(e)},ve.prototype.set=function(e,t){var n=Pe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},we.prototype.add=we.prototype.push=function(e){return this.__data__.set(e,n),this},we.prototype.has=function(e){return this.__data__.has(e)},be.prototype.clear=function(){this.__data__=new ye,this.size=0},be.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},be.prototype.get=function(e){return this.__data__.get(e)},be.prototype.has=function(e){return this.__data__.has(e)},be.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ye){var r=n.__data__;if(!oe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ve(r)}return n.set(e,t),this.size=n.size,this};var Ae=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(ee(e),function(t){return Z.call(e,t)}))}:function(){return[]},ke=xe;function Le(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||_.test(e))&&e>-1&&e%1==0&&e<t}function Ie(e){if(null!=e){try{return $.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Me(e,t){return e===t||e!=e&&t!=t}(re&&ke(new re(new ArrayBuffer(1)))!=w||oe&&ke(new oe)!=u||ie&&ke(ie.resolve())!=f||ae&&ke(new ae)!=m||se&&ke(new se)!=y)&&(ke=function(e){var t=xe(e),n=t==p?e.constructor:void 0,r=n?Ie(n):"";if(r)switch(r){case ce:return w;case ue:return u;case he:return f;case pe:return m;case fe:return y}return t});var je=Ee(function(){return arguments}())?Ee:function(e){return Be(e)&&H.call(e,"callee")&&!Z.call(e,"callee")},Re=Array.isArray,Fe=te||function(){return!1};function De(e){if(!Ne(e))return!1;var t=xe(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ze(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Ne(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Be(e){return null!=e&&"object"==typeof e}var Ue=L?function(e){return function(t){return e(t)}}(L):function(e){return Be(e)&&ze(e.length)&&!!x[xe(e)]};function We(e){return null!=(t=e)&&ze(t.length)&&!De(t)?function(e,t){var n=Re(e),r=!n&&je(e),o=!n&&!r&&Fe(e),i=!n&&!r&&!o&&Ue(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!H.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Le(c,l))||s.push(c);return s}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||U))return ne(e);var t,n,r=[];for(var o in Object(e))H.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t}e.exports=function(e,t){return Te(e,t)}}({get exports(){return rt},set exports(e){rt=e}},rt);var ot=rt;function it(e,t){return e.length===t.length&&JSON.stringify(e.map(function(e){return e}).sort())===JSON.stringify(t.map(function(e){return e}).sort())}var at={Polygon:R,LineString:j,Point:M,MultiPolygon:N,MultiLineString:N,MultiPoint:N},st=Object.freeze({__proto__:null,CommonSelectors:le,constrainFeatureMovement:We,createMidPoint:fe,createSupplementaryPoints:de,createVertex:pe,doubleClickZoom:me,euclideanDistance:P,featuresAt:T,getFeatureAtAndSetCursors:C,isClick:O,isEventAtCoordinates:Ye,isTap:A,mapEventToBoundingBox:_,ModeHandler:e,moveFeatures:$e,sortFeatures:b,stringSetsAreEqual:it,StringSet:x,theme:Z,toDenseArray:$});function lt(e){!function(e,t){var n={options:e=function(e){void 0===e&&(e={});var t=G(e);return e.controls||(t.controls={}),!1===e.displayControlsDefault?t.controls=G(tt,e.controls):t.controls=G(et,e.controls),(t=G(Qe,t)).styles=nt(t.styles,"cold").concat(nt(t.styles,"hot")),t}(e)};t=function(e,t){return t.modes=h,t.getFeatureIdsAt=function(t){return T.click({point:t},null,e).map(function(e){return e.properties.id})},t.getSelectedIds=function(){return e.store.getSelectedIds()},t.getSelected=function(){return{type:u.FEATURE_COLLECTION,features:e.store.getSelectedIds().map(function(t){return e.store.get(t)}).map(function(e){return e.toGeoJSON()})}},t.getSelectedPoints=function(){return{type:u.FEATURE_COLLECTION,features:e.store.getSelectedCoordinates().map(function(e){return{type:u.FEATURE,properties:{},geometry:{type:u.POINT,coordinates:e.coordinates}}})}},t.set=function(n){if(void 0===n.type||n.type!==u.FEATURE_COLLECTION||!Array.isArray(n.features))throw new Error("Invalid FeatureCollection");var r=e.store.createRenderBatch(),o=e.store.getAllIds().slice(),i=t.add(n),a=new x(i);return(o=o.filter(function(e){return!a.has(e)})).length&&t.delete(o),r(),i},t.add=function(t){var n=JSON.parse(JSON.stringify(ve(t))).features.map(function(t){if(t.id=t.id||k(),null===t.geometry)throw new Error("Invalid geometry: null");if(void 0===e.store.get(t.id)||e.store.get(t.id).type!==t.geometry.type){var n=at[t.geometry.type];if(void 0===n)throw new Error("Invalid geometry type: "+t.geometry.type+".");var r=new n(e,t);e.store.add(r)}else{var o=e.store.get(t.id);o.properties=t.properties,ot(o.getCoordinates(),t.geometry.coordinates)||o.incomingCoords(t.geometry.coordinates)}return t.id});return e.store.render(),n},t.get=function(t){var n=e.store.get(t);if(n)return n.toGeoJSON()},t.getAll=function(){return{type:u.FEATURE_COLLECTION,features:e.store.getAll().map(function(e){return e.toGeoJSON()})}},t.delete=function(n){return e.store.delete(n,{silent:!0}),t.getMode()!==h.DIRECT_SELECT||e.store.getSelectedIds().length?e.store.render():e.events.changeMode(h.SIMPLE_SELECT,void 0,{silent:!0}),t},t.deleteAll=function(){return e.store.delete(e.store.getAllIds(),{silent:!0}),t.getMode()===h.DIRECT_SELECT?e.events.changeMode(h.SIMPLE_SELECT,void 0,{silent:!0}):e.store.render(),t},t.changeMode=function(n,r){return void 0===r&&(r={}),n===h.SIMPLE_SELECT&&t.getMode()===h.SIMPLE_SELECT?(it(r.featureIds||[],e.store.getSelectedIds())||(e.store.setSelected(r.featureIds,{silent:!0}),e.store.render()),t):(n===h.DIRECT_SELECT&&t.getMode()===h.DIRECT_SELECT&&r.featureId===e.store.getSelectedIds()[0]||e.events.changeMode(n,r,{silent:!0}),t)},t.getMode=function(){return e.events.getMode()},t.trash=function(){return e.events.trash({silent:!0}),t},t.combineFeatures=function(){return e.events.combineFeatures({silent:!0}),t},t.uncombineFeatures=function(){return e.events.uncombineFeatures({silent:!0}),t},t.setFeatureProperty=function(n,r,o){return e.store.setFeatureProperty(n,r,o),t},t}(n,t),n.api=t;var r=X(n);t.onAdd=r.onAdd,t.onRemove=r.onRemove,t.types=c,t.options=e}(e,this)}return lt.modes=Ke,lt.constants=y,lt.lib=st,lt}();var Go=z(qo);const Jo=[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==",["geometry-type"],"Polygon"]],paint:{"fill-color":"#3bb2d0","fill-outline-color":"#3bb2d0","fill-opacity":.1}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==",["geometry-type"],"Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":4}},{id:"gl-draw-line-inactive",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["!",["has","marker"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":4}},{id:"gl-draw-line-inactive-clickable-area",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["!",["has","marker"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":14,"line-opacity":.01}},{id:"gl-draw-polygon-and-line-vertex-stroke-inactive",type:"circle",filter:["all",["==",["geometry-type"],"Point"]],paint:{"circle-radius":5,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-inactive",type:"circle",filter:["all",["==",["geometry-type"],"Point"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-point-point-stroke-inactive",type:"circle",filter:["all",["==",["geometry-type"],"Point"]],paint:{"circle-radius":5,"circle-opacity":1,"circle-color":"#fff"}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==",["geometry-type"],"Point"]],paint:{"circle-radius":3,"circle-color":"#3bb2d0"}},{id:"marker-static",type:"symbol",filter:["all",["==",["geometry-type"],"LineString"],["has","marker"]],paint:{"icon-opacity":1},layout:{"icon-image":"live_user","icon-offset":[0,-23],"icon-allow-overlap":!0}}],Yo=[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],paint:{"fill-color":"#3bb2d0","fill-outline-color":"#3bb2d0","fill-opacity":.1}},{id:"gl-draw-polygon-fill-active",type:"fill",filter:["all",["==","active","true"],["==","$type","Polygon"]],paint:{"fill-color":"#fbb03b","fill-outline-color":"#fbb03b","fill-opacity":.1}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","$type","Point"],["==","meta","midpoint"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-polygon-stroke-active",type:"line",filter:["all",["==","active","true"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-line-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","LineString"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-line-active",type:"line",filter:["all",["==","$type","LineString"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-polygon-and-line-vertex-stroke-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-point-point-stroke-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-opacity":1,"circle-color":"#fff"}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#3bb2d0"}},{id:"gl-draw-point-stroke-active",type:"circle",filter:["all",["==","$type","Point"],["==","active","true"],["!=","meta","midpoint"]],paint:{"circle-radius":7,"circle-color":"#fff"}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["==","active","true"]],paint:{"circle-radius":5,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-fill-static",type:"fill",filter:["all",["==","mode","static"],["==","$type","Polygon"]],paint:{"fill-color":"#404040","fill-outline-color":"#404040","fill-opacity":.1}},{id:"gl-draw-polygon-stroke-static",type:"line",filter:["all",["==","mode","static"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-line-static",type:"line",filter:["all",["==","mode","static"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-point-static",type:"circle",filter:["all",["==","mode","static"],["==","$type","Point"]],paint:{"circle-radius":5,"circle-color":"#404040"}},{id:"marker-active",type:"symbol",filter:["all",["==","$type","LineString"],["==","meta","feature"],["==","active","true"],["has","user_marker"]],paint:{"icon-opacity":1},layout:{"icon-image":"live_user_forbidden","icon-offset":[0,-23],"icon-allow-overlap":!0}},{id:"marker-inactive",type:"symbol",filter:["all",["==","$type","LineString"],["==","meta","feature"],["==","active","false"],["has","user_marker"]],paint:{"icon-opacity":1},layout:{"icon-image":"live_user","icon-offset":[0,-23],"icon-allow-overlap":!0}}],Xo={ADD:"add",MOVE:"move",DRAG:"drag",POINTER:"pointer",NONE:"none"},Zo={POLYGON:"polygon",LINE:"line_string",POINT:"point"},Ko={FEATURE:"Feature",POLYGON:"Polygon",LINE_STRING:"LineString",POINT:"Point",FEATURE_COLLECTION:"FeatureCollection",MULTI_PREFIX:"Multi",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon"},Qo={DRAW_LINE_STRING:"draw_line_string",DRAW_POLYGON:"draw_polygon",DRAW_POINT:"draw_point",SIMPLE_SELECT:"simple_select",DIRECT_SELECT:"direct_select",STATIC:"static"},ei={CREATE:"draw.create",DELETE:"draw.delete",UPDATE:"draw.update",SELECTION_CHANGE:"draw.selectionchange",MODE_CHANGE:"draw.modechange",ACTIONABLE:"draw.actionable",RENDER:"draw.render",COMBINE_FEATURES:"draw.combine",UNCOMBINE_FEATURES:"draw.uncombine"},ti={MOVE:"move",CHANGE_COORDINATES:"change_coordinates"},ni={FEATURE:"feature",MIDPOINT:"midpoint",VERTEX:"vertex"},ri={ACTIVE:"true",INACTIVE:"false"};var oi=Object.freeze({__proto__:null,classes:{CONTROL_BASE:"mapboxgl-ctrl",CONTROL_PREFIX:"mapboxgl-ctrl-",CONTROL_BUTTON:"mapbox-gl-draw_ctrl-draw-btn",CONTROL_BUTTON_LINE:"mapbox-gl-draw_line",CONTROL_BUTTON_POLYGON:"mapbox-gl-draw_polygon",CONTROL_BUTTON_POINT:"mapbox-gl-draw_point",CONTROL_BUTTON_TRASH:"mapbox-gl-draw_trash",CONTROL_BUTTON_COMBINE_FEATURES:"mapbox-gl-draw_combine",CONTROL_BUTTON_UNCOMBINE_FEATURES:"mapbox-gl-draw_uncombine",CONTROL_GROUP:"mapboxgl-ctrl-group",ATTRIBUTION:"mapboxgl-ctrl-attrib",ACTIVE_BUTTON:"active",BOX_SELECT:"mapbox-gl-draw_boxselect"},sources:{HOT:"mapbox-gl-draw-hot",COLD:"mapbox-gl-draw-cold"},cursors:Xo,types:Zo,geojsonTypes:Ko,modes:Qo,events:ei,updateActions:ti,meta:ni,activeStates:ri,interactions:["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"],LAT_MIN:-90,LAT_RENDERED_MIN:-85,LAT_MAX:90,LAT_RENDERED_MAX:85,LNG_MIN:-270,LNG_MAX:270});function ii(e){return function(t){const n=t.featureTarget;return!!n&&!!n.properties&&n.properties.meta===e}}function ai(e){return!!e.featureTarget&&!!e.featureTarget.properties&&e.featureTarget.properties.active===ri.ACTIVE&&e.featureTarget.properties.meta===ni.FEATURE}function si(e){return!!e.featureTarget&&!!e.featureTarget.properties&&e.featureTarget.properties.active===ri.INACTIVE&&e.featureTarget.properties.meta===ni.FEATURE}function li(e){return void 0===e.featureTarget}function ci(e){const t=e.featureTarget;return!!t&&!!t.properties&&t.properties.meta===ni.VERTEX}function ui(e){return!!e.originalEvent&&!0===e.originalEvent.shiftKey}function hi(e,t){return!!e.lngLat&&e.lngLat.lng===t[0]&&e.lngLat.lat===t[1]}var pi={enable(e){setTimeout(()=>{e.map&&e.map.doubleClickZoom&&e._ctx&&e._ctx.store&&e._ctx.store.getInitialConfigValue&&e._ctx.store.getInitialConfigValue("doubleClickZoom")&&e.map.doubleClickZoom.enable()},0)},disable(e){setTimeout(()=>{e.map&&e.map.doubleClickZoom&&e.map.doubleClickZoom.disable()},0)}};function fi(e,t,n,r){return{type:Ko.FEATURE,properties:{meta:ni.VERTEX,parent:e,coord_path:n,active:r?ri.ACTIVE:ri.INACTIVE},geometry:{type:Ko.POINT,coordinates:t}}}const di={};function mi(e,t={},n=null){const{type:r,coordinates:o}=e.geometry,i=e.properties&&e.properties.id;let a=[];function s(e,n){let r="",o=null;e.forEach((e,s)=>{const c=null!=n?`${n}.${s}`:String(s),u=fi(i,e,c,l(c));if(t.midpoints&&o){const e=function(e,t,n){const r=t.geometry.coordinates,o=n.geometry.coordinates;if(r[1]>85||r[1]<-85||o[1]>85||o[1]<-85)return null;const i={lng:(r[0]+o[0])/2,lat:(r[1]+o[1])/2};return{type:Ko.FEATURE,properties:{meta:ni.MIDPOINT,parent:e,lng:i.lng,lat:i.lat,coord_path:n.properties.coord_path},geometry:{type:Ko.POINT,coordinates:[i.lng,i.lat]}}}(i,o,u);e&&a.push(e)}o=u;const h=JSON.stringify(e);r!==h&&a.push(u),0===s&&(r=h)})}function l(e){return!!t.selectedPaths&&-1!==t.selectedPaths.indexOf(e)}return r===Ko.POINT?a.push(fi(i,o,n,l(n))):r===Ko.POLYGON?o.forEach((e,t)=>{s(e,null!==n?`${n}.${t}`:String(t))}):r===Ko.LINE_STRING?s(o,n):0===r.indexOf(Ko.MULTI_PREFIX)&&function(){const n=r.replace(Ko.MULTI_PREFIX,"");o.forEach((r,o)=>{const i={type:Ko.FEATURE,properties:e.properties,geometry:{type:n,coordinates:r}};a=a.concat(mi(i,t,o))})}(),a}di.onSetup=function(e){const t=(e=e||{}).featureId;let n,r,o="forward";if(t){if(n=this.getFeature(t),!n)throw new Error("Could not find a feature with the provided featureId");let i=e.from;if(i&&"Feature"===i.type&&i.geometry&&"Point"===i.geometry.type&&(i=i.geometry),i&&"Point"===i.type&&i.coordinates&&2===i.coordinates.length&&(i=i.coordinates),!i||!Array.isArray(i))throw new Error("Please use the `from` property to indicate which point to continue the line from");const a=n.coordinates.length-1;if(n.coordinates[a][0]===i[0]&&n.coordinates[a][1]===i[1])r=a+1,n.addCoordinate(r,...n.coordinates[a]);else{if(n.coordinates[0][0]!==i[0]||n.coordinates[0][1]!==i[1])throw new Error("`from` should match the point at either the start or the end of the provided LineString");o="backwards",r=0,n.addCoordinate(r,...n.coordinates[0])}}else n=this.newFeature({type:Ko.FEATURE,properties:{marker:!0},geometry:{type:Ko.LINE_STRING,coordinates:[]}}),r=0,this.addFeature(n);return this.clearSelectedFeatures(),pi.disable(this),this.updateUIClasses({mouse:Xo.ADD}),this.activateUIButton(Zo.LINE),this.setActionableState({trash:!0}),{line:n,currentVertexPosition:r,direction:o}},di.clickAnywhere=function(e,t){return e.currentVertexPosition>0&&hi(t,e.line.coordinates[e.currentVertexPosition-1])||"backwards"===e.direction&&hi(t,e.line.coordinates[e.currentVertexPosition+1])||(this.updateUIClasses({mouse:Xo.ADD}),e.line.updateCoordinate(e.currentVertexPosition,t.lngLat.lng,t.lngLat.lat),"forward"===e.direction?(e.currentVertexPosition++,e.line.updateCoordinate(e.currentVertexPosition,t.lngLat.lng,t.lngLat.lat)):e.line.addCoordinate(0,t.lngLat.lng,t.lngLat.lat),e.line.addCoordinate(0,t.lngLat.lng+1e-5,t.lngLat.lat)),this.changeMode(Qo.SIMPLE_SELECT,{featureIds:[e.line.id]})},di.clickOnVertex=function(e){return this.changeMode(Qo.SIMPLE_SELECT,{featureIds:[e.line.id]})},di.onMouseMove=function(e,t){e.line.updateCoordinate(e.currentVertexPosition,t.lngLat.lng,t.lngLat.lat),ci(t)&&this.updateUIClasses({mouse:Xo.POINTER})},di.onTap=di.onClick=function(e,t){if(ci(t))return this.clickOnVertex(e,t);this.clickAnywhere(e,t)},di.onKeyUp=function(e,t){!function(e){return 13===e.keyCode}(t)?function(e){return 27===e.keyCode}(t)&&(this.deleteFeature([e.line.id],{silent:!0}),this.changeMode(Qo.SIMPLE_SELECT)):this.changeMode(Qo.SIMPLE_SELECT,{featureIds:[e.line.id]})},di.onStop=function(e){pi.enable(this),this.activateUIButton(),void 0!==this.getFeature(e.line.id)&&(e.line.removeCoordinate(`${e.currentVertexPosition}`),e.line.isValid()?this.map.fire(ei.CREATE,{features:[e.line.toGeoJSON()]}):(this.deleteFeature([e.line.id],{silent:!0}),this.changeMode(Qo.SIMPLE_SELECT,{},{silent:!0})))},di.onTrash=function(e){this.deleteFeature([e.line.id],{silent:!0}),this.changeMode(Qo.SIMPLE_SELECT)},di.toDisplayFeatures=function(e,t,n){const r=t.properties.id===e.line.id;if(t.properties.active=r?ri.ACTIVE:ri.INACTIVE,!r)return n(t);t.geometry.coordinates.length<2||(t.properties.meta=ni.FEATURE,n(fi(e.line.id,t.geometry.coordinates["forward"===e.direction?t.geometry.coordinates.length-2:1],""+("forward"===e.direction?t.geometry.coordinates.length-2:1),!1)),n(t))};const{LAT_MIN:gi,LAT_MAX:yi,LAT_RENDERED_MIN:vi,LAT_RENDERED_MAX:wi,LNG_MIN:bi,LNG_MAX:_i}=oi;function xi(e,t){let n=gi,r=yi,o=gi,i=yi,a=_i,s=bi;e.forEach(e=>{const t=h(e),l=t[1],c=t[3],u=t[0],p=t[2];l>n&&(n=l),c<r&&(r=c),c>o&&(o=c),l<i&&(i=l),u<a&&(a=u),p>s&&(s=p)});const l=t;return n+l.lat>wi&&(l.lat=wi-n),o+l.lat>yi&&(l.lat=yi-o),r+l.lat<vi&&(l.lat=vi-r),i+l.lat<gi&&(l.lat=gi-i),a+l.lng<=bi&&(l.lng+=360*Math.ceil(Math.abs(l.lng)/360)),s+l.lng>=_i&&(l.lng-=360*Math.ceil(Math.abs(l.lng)/360)),l}const Ei=ii(ni.VERTEX),Ti=ii(ni.MIDPOINT),Si={fireUpdate:function(){this.map.fire(ei.UPDATE,{action:ti.CHANGE_COORDINATES,features:this.getSelected().map(e=>e.toGeoJSON())})},fireActionable:function(e){this.setActionableState({combineFeatures:!1,uncombineFeatures:!1,trash:e.selectedCoordPaths.length>0})},startDragging:function(e,t){this.map.dragPan.disable(),e.canDragMove=!0,e.dragMoveLocation=t.lngLat},stopDragging:function(e){this.map.dragPan.enable(),e.dragMoving=!1,e.canDragMove=!1,e.dragMoveLocation=null},onVertex:function(e,t){this.startDragging(e,t);const n=t.featureTarget.properties,r=e.selectedCoordPaths.indexOf(n.coord_path);ui(t)||-1!==r?ui(t)&&-1===r&&e.selectedCoordPaths.push(n.coord_path):e.selectedCoordPaths=[n.coord_path];const o=this.pathsToCoordinates(e.featureId,e.selectedCoordPaths);this.setSelectedCoordinates(o)},onMidpoint:function(e,t){this.startDragging(e,t);const n=t.featureTarget.properties;e.feature.addCoordinate(n.coord_path,n.lng,n.lat),this.fireUpdate(),e.selectedCoordPaths=[n.coord_path]},pathsToCoordinates:function(e,t){return t.map(t=>({feature_id:e,coord_path:t}))},onFeature:function(e,t){0===e.selectedCoordPaths.length?this.startDragging(e,t):this.stopDragging(e)},dragFeature:function(e,t,n){!function(e,t){const n=xi(e.map(e=>e.toGeoJSON()),t);e.forEach(e=>{const t=e.getCoordinates(),r=e=>{const t={lng:e[0]+n.lng,lat:e[1]+n.lat};return[t.lng,t.lat]},o=e=>e.map(e=>r(e));let i;e.type===Ko.POINT?i=r(t):e.type===Ko.LINE_STRING||e.type===Ko.MULTI_POINT?i=t.map(r):e.type===Ko.POLYGON||e.type===Ko.MULTI_LINE_STRING?i=t.map(o):e.type===Ko.MULTI_POLYGON&&(i=t.map(e=>e.map(e=>o(e)))),e.incomingCoords(i)})}(this.getSelected(),n),e.dragMoveLocation=t.lngLat},dragVertex:function(e,t,n){const r=e.selectedCoordPaths.map(t=>e.feature.getCoordinate(t)),o=xi(r.map(e=>({type:Ko.FEATURE,properties:{},geometry:{type:Ko.POINT,coordinates:e}})),n);for(let t=0;t<r.length;t++){const n=r[t];e.feature.updateCoordinate(e.selectedCoordPaths[t],n[0]+o.lng,n[1]+o.lat)}},clickNoTarget:function(){this.changeMode(Qo.SIMPLE_SELECT)},clickInactive:function(){this.changeMode(Qo.SIMPLE_SELECT)},clickActiveFeature:function(e){e.selectedCoordPaths=[],this.clearSelectedCoordinates(),e.feature.changed()},onSetup:function(e){const t=e.featureId,n=this.getFeature(t);if(!n)throw new Error("You must provide a featureId to enter direct_select mode");if(n.type===Ko.POINT)throw new TypeError("direct_select mode doesn't handle point features");const r={featureId:t,feature:n,dragMoveLocation:e.startPos||null,dragMoving:!1,canDragMove:!1,selectedCoordPaths:e.coordPath?[e.coordPath]:[]};return this.setSelectedCoordinates(this.pathsToCoordinates(t,r.selectedCoordPaths)),this.setSelected(t),pi.disable(this),this.setActionableState({trash:!0}),r},onStop:function(){pi.enable(this),this.clearSelectedCoordinates()}};Si.toDisplayFeatures=function(e,t,n){e.featureId===t.properties.id?(t.properties.active=ri.ACTIVE,n(t),mi(t,{map:this.map,midpoints:!0,selectedPaths:e.selectedCoordPaths}).forEach(n)):(t.properties.active=ri.INACTIVE,n(t)),this.fireActionable(e)},Si.onTrash=function(e){e.selectedCoordPaths.sort((e,t)=>t.localeCompare(e,"en",{numeric:!0})).forEach(t=>e.feature.removeCoordinate(t)),this.fireUpdate(),e.selectedCoordPaths=[],this.clearSelectedCoordinates(),this.fireActionable(e),!1===e.feature.isValid()&&(this.deleteFeature([e.featureId]),this.changeMode(Qo.SIMPLE_SELECT,{}))},Si.onMouseMove=function(e,t){const n=ai(t),r=Ei(t),o=Ti(t),i=0===e.selectedCoordPaths.length;return n&&i||r&&!i?this.updateUIClasses({mouse:Xo.MOVE}):this.updateUIClasses({mouse:Xo.NONE}),(r||n||o)&&e.dragMoving&&this.fireUpdate(),this.stopDragging(e),!0},Si.onMouseOut=function(e){return e.dragMoving&&this.fireUpdate(),!0},Si.onTouchStart=Si.onMouseDown=function(e,t){return Ei(t)?this.onVertex(e,t):ai(t)?this.onFeature(e,t):Ti(t)?this.onMidpoint(e,t):void 0},Si.onDrag=function(e,t){if(!0!==e.canDragMove)return;e.dragMoving=!0,t.originalEvent.stopPropagation();const n={lng:t.lngLat.lng-e.dragMoveLocation.lng,lat:t.lngLat.lat-e.dragMoveLocation.lat};this.dragFeature(e,t,n),e.dragMoveLocation=t.lngLat},Si.onClick=function(e,t){return li(t)?this.clickNoTarget(e,t):ai(t)?this.clickActiveFeature(e,t):si(t)?this.clickInactive(e,t):void this.stopDragging(e)},Si.onTap=function(e,t){return li(t)?this.clickNoTarget(e,t):ai(t)?this.clickActiveFeature(e,t):si(t)?this.clickInactive(e,t):void 0},Si.onTouchEnd=Si.onMouseUp=function(e){e.dragMoving&&this.fireUpdate(),this.stopDragging(e)};const Ci={Singapore:{name:"Singapore",taxonomyPath:"where.innotech",cameraConfigs:{mobile:{center:[103.825527,1.294554],zoom:13.5,bearing:.1,pitch:46},web:{center:[103.825527,1.294554],zoom:13.5,bearing:.1,pitch:46}}},MBS:{name:"Marina Bay Sands Singapore",taxonomyPath:"where.innotech.mbss",cameraConfigs:{mobile:{center:[103.8578066293374,1.281924896340982],zoom:19,bearing:-57,pitch:46},web:{center:[103.8578066293374,1.281924896340982],zoom:19,bearing:-57,pitch:46}},buildings:[{name:"Sands Expo And Convention Center",taxonomyPath:"where.innotech.mbss.secc",defaultFloorPath:"where.innotech.mbss.secc.floor_4",cameraConfigs:{mobile:{center:[103.8578066293374,1.281924896340982],zoom:19,bearing:-57,pitch:46},web:{center:[103.8578066293374,1.281924896340982],zoom:19,bearing:-57,pitch:46}},bounds:[[[103.85859581714203,1.2844735642963911],[103.8570358797869,1.281924416525456],[103.85846122981656,1.2809666283285566],[103.86007017323448,1.283585000187756],[103.85859581714203,1.2844735642963911]]],floors:[{id:"floor_4",name:"Level 4",taxonomyPath:"where.innotech.mbss.secc.floor_4",levelIndex:3,groundStackHeight:21,zoomLevel:19.3}]}]},"National Stadium":{name:"National Stadium",taxonomyPath:"where.innotech.national_stadium",cameraConfigs:{mobile:{center:[103.87434269838687,1.3044718849258268],zoom:17.912909915488857,bearing:-142.99999999999952,pitch:46},web:{center:[103.87434269838687,1.3044718849258268],zoom:17.912909915488857,bearing:-142.99999999999952,pitch:46}},buildings:[{name:"National Stadium",taxonomyPath:"where.innotech.national_stadium.building",defaultFloorPath:"where.innotech.national_stadium.building.ground",cameraConfigs:{mobile:{center:[103.87434269838687,1.3044718849258268],zoom:17.912909915488857,bearing:-142.99999999999952,pitch:46},web:{center:[103.87434269838687,1.3044718849258268],zoom:17.912909915488857,bearing:-142.99999999999952,pitch:46}},bounds:[[[103.87434134373848,1.306789290159284],[103.8741111984366,1.3067779867756477],[103.87388326956594,1.3067441854828055],[103.87365975221206,1.3066882118065837],[103.87344279897471,1.3066106048055424],[103.87323449923696,1.3065121118794898],[103.87303685904308,1.3063936815715387],[103.87285178177908,1.3062564544330242],[103.872681049842,1.306101752039268],[103.87252630747429,1.3059310642619693],[103.87238904492897,1.3057460349208097],[103.87227058411756,1.30554844595245],[103.8721720658795,1.305340200249396],[103.87209443899536,1.3051233033339937],[103.87203845104972,1.3048998440440658],[103.8720046412316,1.3046719744161843],[103.87199333514212,1.3044418889603253],[103.87200464165892,1.304211803525506],[103.87203845188799,1.3039839339599337],[103.87209444021234,1.3037604747711913],[103.87217206742841,1.303543577991962],[103.87227058593888,1.303335332454834],[103.8723890469527,1.303137743675779],[103.87252630962269,1.3029527145400264],[103.87268105203248,1.302782026976344],[103.87285178392749,1.3026273247962041],[103.87303686106684,1.3024900978630969],[103.8732345010583,1.3023716677444503],[103.87344280052362,1.3022731749843244],[103.87365975342901,1.3021955681194555],[103.87388327040419,1.3021395945444192],[103.87411119886393,1.3021057933138864],[103.87434134373848,1.3020944899512892],[103.87457148861301,1.3021057933138864],[103.87479941707277,1.3021395945444192],[103.87502293404793,1.3021955681194555],[103.87523988695334,1.3022731749843244],[103.87544818641867,1.3023716677444503],[103.8756458264101,1.3024900978630969],[103.87583090354947,1.3026273247962041],[103.87600163544448,1.302782026976344],[103.87615637785426,1.3029527145400264],[103.87629364052425,1.303137743675779],[103.87641210153808,1.303335332454834],[103.87651062004853,1.303543577991962],[103.8765882472646,1.3037604747711913],[103.87664423558897,1.3039839339599337],[103.87667804581802,1.304211803525506],[103.87668935233484,1.3044418889603253],[103.87667804624537,1.3046719744161843],[103.87664423642724,1.3048998440440658],[103.87658824848158,1.3051233033339937],[103.87651062159746,1.305340200249396],[103.8764121033594,1.30554844595245],[103.87629364254799,1.3057460349208097],[103.87615638000267,1.3059310642619693],[103.87600163763496,1.306101752039268],[103.87583090569788,1.3062564544330242],[103.87564582843387,1.3063936815715387],[103.87544818824,1.3065121118794898],[103.87523988850225,1.3066106048055424],[103.8750229352649,1.3066882118065837],[103.87479941791102,1.3067441854828055],[103.87457148904036,1.3067779867756477],[103.87434134373848,1.306789290159284]]],floors:[{name:"Ground",taxonomyPath:"where.innotech.national_stadium.building.ground"}]}]},Campus:{name:"Campus",taxonomyPath:"where.innotech.campus",cameraConfigs:{mobile:{center:[103.77671029357063,1.2977084296881416],zoom:17.912909915488857,bearing:-160,pitch:46},web:{center:[103.77671029357063,1.2977084296881416],zoom:17.912909915488857,bearing:-160,pitch:46}},buildings:[{name:"Campus",taxonomyPath:"where.innotech.campus.building",defaultFloorPath:"where.innotech.campus.building.floor",cameraConfigs:{mobile:{center:[103.77735057222827,1.2973241399841977],zoom:17.912909915488857,bearing:-160,pitch:46},web:{center:[103.77735057222827,1.2973241399841977],zoom:17.912909915488857,bearing:-160,pitch:46}},bounds:[[[103.77826492745807,1.2964226276488022],[103.77621696852229,1.2975176909970332],[103.77660563982079,1.2982785693215733],[103.77836112271805,1.297291982969634],[103.77826492745807,1.2964226276488022]]],floors:[{name:"Campus",taxonomyPath:"where.innotech.campus.building.floor"},{name:"Hospital",taxonomyPath:"where.innotech.campus.building.floor_2"}]}]},Changi:{name:"Changi",isAirport:!0,taxonomyPath:"where.changi",cameraConfigs:{mobile:{center:[103.98562,1.351615],zoom:13.95,bearing:22.5},web:{center:[103.985201,1.350226],zoom:15.42,bearing:-67.2}},buildings:[{name:"T1",taxonomyPath:"where.changi.terminals.t1",cameraConfigs:{mobile:{center:[103.9905346,1.3618405],zoom:18.43,bearing:23.2},web:{center:[103.9905346,1.3618405],zoom:18.43,bearing:23.2}},defaultFloorPath:"where.changi.terminals.t1.l1",bounds:[[[103.98961992369539,1.3670421359525875],[103.98842900939542,1.362079916164717],[103.98906925735787,1.3609528132339506],[103.99067926179725,1.3602175963884946],[103.99204645334589,1.360527735150555],[103.99472978189493,1.3648681124808348],[103.98961992369539,1.3670421359525875]]],floors:[{name:"B2",taxonomyPath:"where.changi.terminals.t1.b2"},{name:"B1",taxonomyPath:"where.changi.terminals.t1.b1",bounds:[[[103.98918843926157,1.3612426524543935],[103.98924614540368,1.3605054815768511],[103.99025871248523,1.3600597614751564],[103.99087416981104,1.3605241384348687],[103.98918843926157,1.3612426524543935]]]},{name:"B1M",taxonomyPath:"where.changi.terminals.t1.b1m",bounds:[[[103.98988836719957,1.3615353273637965],[103.98943398349144,1.3604589724938592],[103.9901013583156,1.360173120218974],[103.99055815584893,1.3612466632272486],[103.98988836719957,1.3615353273637965]]]},{name:"L1",taxonomyPath:"where.changi.terminals.t1.l1"},{name:"L2",taxonomyPath:"where.changi.terminals.t1.l2"},{name:"L3",taxonomyPath:"where.changi.terminals.t1.l3"}]},{name:"T2",taxonomyPath:"where.changi.terminals.t2",cameraConfigs:{mobile:{center:[103.988933,1.354811],zoom:18.16},web:{center:[103.988933,1.354811],zoom:18.16}},defaultFloorPath:"where.changi.terminals.t2.l1",bounds:[[[103.98843372402342,1.3535180665347042],[103.9875780973623,1.35154426089737],[103.9873244322336,1.3516476370442092],[103.98701233213114,1.352584830139051],[103.98947659904684,1.3584444924566554],[103.99081002652872,1.3588581876674084],[103.9916222701022,1.3607101151843324],[103.99210211513525,1.360495049302699],[103.99418373546513,1.3569575913172969],[103.99134351842446,1.3503305150212839],[103.98706147270155,1.3487629738430797],[103.98632777875605,1.3490444758358109],[103.98658958391678,1.349651157012687],[103.98739006614227,1.3505615515273774],[103.9886193620244,1.3534433958332102],[103.98843372402342,1.3535180665347042]]],floors:[{name:"B1",taxonomyPath:"where.changi.terminals.t2.b1"},{name:"L1",taxonomyPath:"where.changi.terminals.t2.l1"},{name:"L2",taxonomyPath:"where.changi.terminals.t2.l2"},{name:"L3",taxonomyPath:"where.changi.terminals.t2.l3"}]},{name:"T3",taxonomyPath:"where.changi.terminals.t3",cameraConfigs:{mobile:{center:[103.986463,1.356268],zoom:18.16},web:{center:[103.986463,1.356268],zoom:18.16}},defaultFloorPath:"where.changi.terminals.t3.l1",bounds:[[[103.98185918568726,1.3492439098261002],[103.98587342344706,1.3587686767671698],[103.98852142770454,1.3624410125698887],[103.98886497298838,1.3622873667304702],[103.98795253266195,1.3599629435060194],[103.98921756630114,1.3587358070209063],[103.98656724489638,1.3526533153424367],[103.98290890163503,1.3487842250299167],[103.98185918568726,1.3492439098261002]]],floors:[{name:"B3",taxonomyPath:"where.changi.terminals.t3.b3"},{name:"B2",taxonomyPath:"where.changi.terminals.t3.b2"},{name:"B1",taxonomyPath:"where.changi.terminals.t3.b1"},{name:"L1",taxonomyPath:"where.changi.terminals.t3.l1"},{name:"L2",taxonomyPath:"where.changi.terminals.t3.l2"},{name:"L3",taxonomyPath:"where.changi.terminals.t3.l3"},{name:"L4",taxonomyPath:"where.changi.terminals.t3.l4"}]},{name:"T4",taxonomyPath:"where.changi.terminals.t4",cameraConfigs:{mobile:{center:[103.983654,1.338401],zoom:18.22},web:{center:[103.983654,1.338401],zoom:18.22}},defaultFloorPath:"where.changi.terminals.t4.l1",bounds:[[[103.98159697986523,1.3391127207761997],[103.98164155038592,1.3357191495382494],[103.98340530920888,1.3350026590817379],[103.98629594828645,1.3418479334193592],[103.98486678856739,1.3424485320278023],[103.98319023831016,1.3396670019029528],[103.98204480882845,1.3401483644638859],[103.98159697986523,1.3391127207761997]]],floors:[{name:"B1",taxonomyPath:"where.changi.terminals.t4.b1"},{name:"L1",taxonomyPath:"where.changi.terminals.t4.l1"},{name:"L1M",taxonomyPath:"where.changi.terminals.t4.l1m"},{name:"L2",taxonomyPath:"where.changi.terminals.t4.l2"},{name:"L2M",taxonomyPath:"where.changi.terminals.t4.l2m"}]},{name:"Jewel",taxonomyPath:"where.changi.terminals.jewel",cameraConfigs:{mobile:{center:[103.989892,1.360604],zoom:18.11},web:{center:[103.989892,1.360604],zoom:18.11}},defaultFloorPath:"where.changi.terminals.jewel.l1",bounds:[[[103.98848114348914,1.3599722568208108],[103.98909658473747,1.3613985760035376],[103.99099962143055,1.360577907610363],[103.99038991760119,1.3591465604439747],[103.98848114348914,1.3599722568208108]]],floors:[{name:"B5",taxonomyPath:"where.changi.terminals.jewel.b5"},{name:"B4",taxonomyPath:"where.changi.terminals.jewel.b4"},{name:"B3",taxonomyPath:"where.changi.terminals.jewel.b3"},{name:"B2",taxonomyPath:"where.changi.terminals.jewel.b2"},{name:"B2M",taxonomyPath:"where.changi.terminals.jewel.b2m"},{name:"B1",taxonomyPath:"where.changi.terminals.jewel.b1"},{name:"B1M",taxonomyPath:"where.changi.terminals.jewel.b1m"},{name:"L1",taxonomyPath:"where.changi.terminals.jewel.l1"},{name:"L2",taxonomyPath:"where.changi.terminals.jewel.l2"},{name:"L3",taxonomyPath:"where.changi.terminals.jewel.l3"},{name:"L4",taxonomyPath:"where.changi.terminals.jewel.l4"},{name:"L5",taxonomyPath:"where.changi.terminals.jewel.l5d"}]}]},"STE Office":{name:"STE",taxonomyPath:"where.ste",cameraConfigs:{mobile:{center:[103.84633872450354,1.3894512089945608],zoom:17.912909915488857,bearing:-15,pitch:46},web:{center:[103.84633872450354,1.3894512089945608],zoom:17.912909915488857,bearing:-15,pitch:46}},buildings:[{name:"STE Office",taxonomyPath:"where.ste.digihub",defaultFloorPath:"where.ste.digihub.l1",cameraConfigs:{mobile:{center:[103.84633872450354,1.3894512089945608],zoom:17.912909915488857,bearing:-15,pitch:46},web:{center:[103.84633872450354,1.3894512089945608],zoom:17.912909915488857,bearing:-15,pitch:46}},bounds:[[[103.84566280788353,1.3896228198885348],[103.84684566196856,1.3898748733664488],[103.84698513682665,1.3891937926302356],[103.8459337109733,1.3889122434496304],[103.84566280788353,1.3896228198885348]]],floors:[{name:"Level 1",taxonomyPath:"where.ste.digihub.l1",bounds:[[[103.84566280788353,1.3896228198885348],[103.84684566196856,1.3898748733664488],[103.84698513682665,1.3891937926302356],[103.8459337109733,1.3889122434496304],[103.84566280788353,1.3896228198885348]]]},{name:"Level 3",taxonomyPath:"where.ste.digihub.l3",bounds:[[[103.84566280788353,1.3896228198885348],[103.84684566196856,1.3898748733664488],[103.84698513682665,1.3891937926302356],[103.8459337109733,1.3889122434496304],[103.84566280788353,1.3896228198885348]]]}]}]}},Pi={food:["what.shop.food_anchor","what.shop.food"],fun:["what.shop.fun"],retail:["what.shop.retail_anchor","what.shop.retail"],carpark:["what.infra.carpark"],entrance:["what.infra.entrance"],exit:["what.infra.exit"],escalator:["what.infra.escalator"],lift:["what.infra.lift"],stairs:["what.infra.stairs"],"bicycle parking":["what.infra.parking_bike"],"bicycle locker":["what.infra.parking_bike_locked"],"airport transfer":["what.service.airport_transfer"],immigration:["what.service.immigration"],"ground transport concierge":["what.service.ground_transport_concierge"],"tax refund":["what.service.tax_refund"],information:["what.service.information"],"baggage claim":["what.service.baggage_claim"],"baggage storage":["what.service.baggage_storage"],checkin:["what.service.checkin"],"checkin early":["what.service.checkin_early"],"money exchange":["what.service.money_exchange"],"movie theatre":["what.service.movie_theatre"],"changi rewards":["what.service.changi_rewards"],"connect changi":["what.service.connect_changi"],"attraction tour":["what.service.attraction_tour"],atm:["what.service.atm"],"charging point":["what.service.device_charging"],internet:["what.service.internet"],clinic:["what.service.clinic"],"lost and found":["what.service.lost_and_found"],post:["what.service.post"],"airline lounge":["what.service.airline_lounge"],"changi lounge":["what.service.lounge_changi"],"pay per use lounge":["what.service.pay_per_use_lounge"],"tv lounge":["what.service.tv_lounge"],lodging:["what.service.lodging"],"meditation room":["what.service.meditation_room"],"prayer room":["what.service.prayer_room"],"rest area":["what.service.rest_area"],"smoking area":["what.service.smoking_area"],"adult diaper change":["what.service.adult_diaper_change"],"baby care":["what.service.baby_care"],shower:["what.service.shower"],toilet:["what.service.toilet"],"toilet accessible":["what.service.toilet_accessible"],"transit entry":["what.transit.transit_entry"],"transit exit":["what.transit.transit_exit"],bus:["what.transport.bus","what.transport.type_bus"],"meeting point":["what.transport.meeting_point"],pickup:["what.transport.pickup"],skytrain:["what.transport.skytrain"],"taxi queue":["what.transport.taxi_queue"],train:["what.transport.train"],"airplane gate":["what.airplane_gate"],security:["what.security"]};function Oi(e){var t=[1/0,1/0,-1/0,-1/0];return se(e,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}function Ai(e,t,n){if(void 0===n&&(n={}),!0===n.final)return function(e,t){var n=Ai(t,e);return(n+180)%360}(e,t);var r=ne(e),o=ne(t),i=Q(r[0]),a=Q(o[0]),s=Q(r[1]),l=Q(o[1]),c=Math.sin(a-i)*Math.cos(l),u=Math.cos(s)*Math.sin(l)-Math.sin(s)*Math.cos(l)*Math.cos(a-i);return K(Math.atan2(c,u))}function ki(e,t,n,r){void 0===r&&(r={});var o=ne(e),i=Q(o[0]),a=Q(o[1]),s=Q(n),l=Z(t,r.units),c=Math.asin(Math.sin(a)*Math.cos(l)+Math.cos(a)*Math.sin(l)*Math.cos(s));return V([K(i+Math.atan2(Math.sin(s)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(c))),K(c)],r.properties)}function Li(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var r=ne(e),o=oe(t),i=o.type,a=t.bbox,s=o.coordinates;if(a&&!1===function(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}(r,a))return!1;"Polygon"===i&&(s=[s]);for(var l=!1,c=0;c<s.length&&!l;c++)if(Ii(r,s[c][0],n.ignoreBoundary)){for(var u=!1,h=1;h<s[c].length&&!u;)Ii(r,s[c][h],!n.ignoreBoundary)&&(u=!0),h++;u||(l=!0)}return l}function Ii(e,t,n){var r=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var o=0,i=t.length-1;o<t.length;i=o++){var a=t[o][0],s=t[o][1],l=t[i][0],c=t[i][1];if(e[1]*(a-l)+s*(l-e[0])+c*(e[0]-a)===0&&(a-e[0])*(l-e[0])<=0&&(s-e[1])*(c-e[1])<=0)return!n;s>e[1]!=c>e[1]&&e[0]<(l-a)*(e[1]-s)/(c-s)+a&&(r=!r)}return r}function Mi(e,t){return function(){return e.apply(t,arguments)}}Oi.default=Oi;const{toString:ji}=Object.prototype,{getPrototypeOf:Ri}=Object,{iterator:Fi,toStringTag:Di}=Symbol,zi=(Ni=Object.create(null),e=>{const t=ji.call(e);return Ni[t]||(Ni[t]=t.slice(8,-1).toLowerCase())});var Ni;const Bi=e=>(e=e.toLowerCase(),t=>zi(t)===e),Ui=e=>t=>typeof t===e,{isArray:Wi}=Array,$i=Ui("undefined");function Hi(e){return null!==e&&!$i(e)&&null!==e.constructor&&!$i(e.constructor)&&Gi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Vi=Bi("ArrayBuffer"),qi=Ui("string"),Gi=Ui("function"),Ji=Ui("number"),Yi=e=>null!==e&&"object"==typeof e,Xi=e=>{if("object"!==zi(e))return!1;const t=Ri(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Di in e||Fi in e)},Zi=Bi("Date"),Ki=Bi("File"),Qi=Bi("Blob"),ea=Bi("FileList"),ta=Bi("URLSearchParams"),[na,ra,oa,ia]=["ReadableStream","Request","Response","Headers"].map(Bi);function aa(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),Wi(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Hi(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function sa(e,t){if(Hi(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const la="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ca=e=>!$i(e)&&e!==la,ua=(ha="undefined"!=typeof Uint8Array&&Ri(Uint8Array),e=>ha&&e instanceof ha);var ha;const pa=Bi("HTMLFormElement"),fa=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),da=Bi("RegExp"),ma=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};aa(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)},ga=Bi("AsyncFunction"),ya=(va="function"==typeof setImmediate,wa=Gi(la.postMessage),va?setImmediate:wa?(ba=`axios@${Math.random()}`,_a=[],la.addEventListener("message",({source:e,data:t})=>{e===la&&t===ba&&_a.length&&_a.shift()()},!1),e=>{_a.push(e),la.postMessage(ba,"*")}):e=>setTimeout(e));var va,wa,ba,_a;const xa="undefined"!=typeof queueMicrotask?queueMicrotask.bind(la):"undefined"!=typeof process&&process.nextTick||ya;var Ea={isArray:Wi,isArrayBuffer:Vi,isBuffer:Hi,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Gi(e.append)&&("formdata"===(t=zi(e))||"object"===t&&Gi(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Vi(e.buffer),t},isString:qi,isNumber:Ji,isBoolean:e=>!0===e||!1===e,isObject:Yi,isPlainObject:Xi,isEmptyObject:e=>{if(!Yi(e)||Hi(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:na,isRequest:ra,isResponse:oa,isHeaders:ia,isUndefined:$i,isDate:Zi,isFile:Ki,isBlob:Qi,isRegExp:da,isFunction:Gi,isStream:e=>Yi(e)&&Gi(e.pipe),isURLSearchParams:ta,isTypedArray:ua,isFileList:ea,forEach:aa,merge:function e(){const{caseless:t,skipUndefined:n}=ca(this)&&this||{},r={},o=(o,i)=>{const a=t&&sa(r,i)||i;Xi(r[a])&&Xi(o)?r[a]=e(r[a],o):Xi(o)?r[a]=e({},o):Wi(o)?r[a]=o.slice():n&&$i(o)||(r[a]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&aa(arguments[e],o);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(aa(t,(t,r)=>{n&&Gi(t)?e[r]=Mi(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&Ri(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:zi,kindOfTest:Bi,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Wi(e))return e;let t=e.length;if(!Ji(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Fi]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:pa,hasOwnProperty:fa,hasOwnProp:fa,reduceDescriptors:ma,freezeMethods:e=>{ma(e,(t,n)=>{if(Gi(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Gi(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Wi(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:sa,global:la,isContextDefined:ca,isSpecCompliantForm:function(e){return!!(e&&Gi(e.append)&&"FormData"===e[Di]&&e[Fi])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Yi(e)){if(t.indexOf(e)>=0)return;if(Hi(e))return e;if(!("toJSON"in e)){t[r]=e;const o=Wi(e)?[]:{};return aa(e,(e,t)=>{const i=n(e,r+1);!$i(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:ga,isThenable:e=>e&&(Yi(e)||Gi(e))&&Gi(e.then)&&Gi(e.catch),setImmediate:ya,asap:xa,isIterable:e=>null!=e&&Gi(e[Fi])};function Ta(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}Ea.inherits(Ta,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ea.toJSONObject(this.config),code:this.code,status:this.status}}});const Sa=Ta.prototype,Ca={};function Pa(e){return Ea.isPlainObject(e)||Ea.isArray(e)}function Oa(e){return Ea.endsWith(e,"[]")?e.slice(0,-2):e}function Aa(e,t,n){return e?e.concat(t).map(function(e,t){return e=Oa(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ca[e]={value:e}}),Object.defineProperties(Ta,Ca),Object.defineProperty(Sa,"isAxiosError",{value:!0}),Ta.from=(e,t,n,r,o,i)=>{const a=Object.create(Sa);Ea.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return Ta.call(a,s,l,n,r,o),e&&null==a.cause&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};const ka=Ea.toFlatObject(Ea,{},null,function(e){return/^is[A-Z]/.test(e)});function La(e,t,n){if(!Ea.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Ea.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Ea.isUndefined(t[e])})).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Ea.isSpecCompliantForm(t);if(!Ea.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Ea.isDate(e))return e.toISOString();if(Ea.isBoolean(e))return e.toString();if(!s&&Ea.isBlob(e))throw new Ta("Blob is not supported. Use a Buffer instead.");return Ea.isArrayBuffer(e)||Ea.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(Ea.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Ea.isArray(e)&&function(e){return Ea.isArray(e)&&!e.some(Pa)}(e)||(Ea.isFileList(e)||Ea.endsWith(n,"[]"))&&(s=Ea.toArray(e)))return n=Oa(n),s.forEach(function(e,r){!Ea.isUndefined(e)&&null!==e&&t.append(!0===a?Aa([n],r,i):null===a?n:n+"[]",l(e))}),!1;return!!Pa(e)||(t.append(Aa(o,n,i),l(e)),!1)}const u=[],h=Object.assign(ka,{defaultVisitor:c,convertValue:l,isVisitable:Pa});if(!Ea.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Ea.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Ea.forEach(n,function(n,i){!0===(!(Ea.isUndefined(n)||null===n)&&o.call(t,n,Ea.isString(i)?i.trim():i,r,h))&&e(n,r?r.concat(i):[i])}),u.pop()}}(e),t}function Ia(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Ma(e,t){this._pairs=[],e&&La(e,this,t)}const ja=Ma.prototype;function Ra(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Fa(e,t,n){if(!t)return e;const r=n&&n.encode||Ra;Ea.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):Ea.isURLSearchParams(t)?t.toString():new Ma(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}ja.append=function(e,t){this._pairs.push([e,t])},ja.toString=function(e){const t=e?function(t){return e.call(this,t,Ia)}:Ia;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class Da{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ea.forEach(this.handlers,function(t){null!==t&&e(t)})}}var za={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Na={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ma,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Ba="undefined"!=typeof window&&"undefined"!=typeof document,Ua="object"==typeof navigator&&navigator||void 0,Wa=Ba&&(!Ua||["ReactNative","NativeScript","NS"].indexOf(Ua.product)<0),$a="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ha=Ba&&window.location.href||"http://localhost";var Va={...Object.freeze({__proto__:null,hasBrowserEnv:Ba,hasStandardBrowserWebWorkerEnv:$a,hasStandardBrowserEnv:Wa,navigator:Ua,origin:Ha}),...Na};function qa(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;return i=!i&&Ea.isArray(r)?r.length:i,s?(Ea.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&Ea.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&Ea.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a)}if(Ea.isFormData(e)&&Ea.isFunction(e.entries)){const n={};return Ea.forEachEntry(e,(e,r)=>{t(function(e){return Ea.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const Ga={transitional:za,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Ea.isObject(e);if(o&&Ea.isHTMLForm(e)&&(e=new FormData(e)),Ea.isFormData(e))return r?JSON.stringify(qa(e)):e;if(Ea.isArrayBuffer(e)||Ea.isBuffer(e)||Ea.isStream(e)||Ea.isFile(e)||Ea.isBlob(e)||Ea.isReadableStream(e))return e;if(Ea.isArrayBufferView(e))return e.buffer;if(Ea.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return La(e,new Va.classes.URLSearchParams,{visitor:function(e,t,n,r){return Va.isNode&&Ea.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=Ea.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return La(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e){if(Ea.isString(e))try{return(0,JSON.parse)(e),Ea.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ga.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Ea.isResponse(e)||Ea.isReadableStream(e))return e;if(e&&Ea.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw Ta.from(e,Ta.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Va.classes.FormData,Blob:Va.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ea.forEach(["delete","get","head","post","put","patch"],e=>{Ga.headers[e]={}});const Ja=Ea.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ya=Symbol("internals");function Xa(e){return e&&String(e).trim().toLowerCase()}function Za(e){return!1===e||null==e?e:Ea.isArray(e)?e.map(Za):String(e)}function Ka(e,t,n,r,o){return Ea.isFunction(r)?r.call(this,t,n):(o&&(t=n),Ea.isString(t)?Ea.isString(r)?-1!==t.indexOf(r):Ea.isRegExp(r)?r.test(t):void 0:void 0)}class Qa{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Xa(t);if(!o)throw new Error("header name must be a non-empty string");const i=Ea.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Za(e))}const i=(e,t)=>Ea.forEach(e,(e,n)=>o(e,n,t));if(Ea.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Ea.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Ja[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(Ea.isObject(e)&&Ea.isIterable(e)){let n,r,o={};for(const t of e){if(!Ea.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?Ea.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=Xa(e)){const n=Ea.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Ea.isFunction(t))return t.call(this,e,n);if(Ea.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Xa(e)){const n=Ea.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ka(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Xa(e)){const o=Ea.findKey(n,e);!o||t&&!Ka(0,n[o],o,t)||(delete n[o],r=!0)}}return Ea.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Ka(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Ea.forEach(this,(r,o)=>{const i=Ea.findKey(n,o);if(i)return t[i]=Za(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=Za(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ea.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Ea.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Ya]=this[Ya]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Xa(e);t[r]||(function(e,t){const n=Ea.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return Ea.isArray(e)?e.forEach(r):r(e),this}}function es(e,t){const n=this||Ga,r=t||n,o=Qa.from(r.headers);let i=r.data;return Ea.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function ts(e){return!(!e||!e.__CANCEL__)}function ns(e,t,n){Ta.call(this,null==e?"canceled":e,Ta.ERR_CANCELED,t,n),this.name="CanceledError"}function rs(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ta("Request failed with status code "+n.status,[Ta.ERR_BAD_REQUEST,Ta.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Qa.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ea.reduceDescriptors(Qa.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Ea.freezeMethods(Qa),Ea.inherits(ns,Ta,{__CANCEL__:!0});const os=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];o||(o=l),n[i]=s,r[i]=l;let u=a,h=0;for(;u!==i;)h+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const p=c&&l-c;return p?Math.round(1e3*h/p):void 0}}(50,250);return function(n,i){let a,s,l=0,c=1e3/i;const u=(n,i=Date.now())=>{l=i,a=null,s&&(clearTimeout(s),s=null),(n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,l=o(s);r=i,e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})})(...n)};return[(...e)=>{const t=Date.now(),n=t-l;n>=c?u(e,t):(a=e,s||(s=setTimeout(()=>{s=null,u(a)},c-n)))},()=>a&&u(a)]}(0,n)},is=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},as=e=>(...t)=>Ea.asap(()=>e(...t));var ss=Va.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Va.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Va.origin),Va.navigator&&/(msie|trident)/i.test(Va.navigator.userAgent)):()=>!0,ls=Va.hasStandardBrowserEnv?{write(e,t,n,r,o,i,a){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];Ea.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Ea.isString(r)&&s.push(`path=${r}`),Ea.isString(o)&&s.push(`domain=${o}`),!0===i&&s.push("secure"),Ea.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function cs(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const us=e=>e instanceof Qa?{...e}:e;function hs(e,t){t=t||{};const n={};function r(e,t,n,r){return Ea.isPlainObject(e)&&Ea.isPlainObject(t)?Ea.merge.call({caseless:r},e,t):Ea.isPlainObject(t)?Ea.merge({},t):Ea.isArray(t)?t.slice():t}function o(e,t,n,o){return Ea.isUndefined(t)?Ea.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!Ea.isUndefined(t))return r(void 0,t)}function a(e,t){return Ea.isUndefined(t)?Ea.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(us(e),us(t),0,!0)};return Ea.forEach(Object.keys({...e,...t}),function(r){const i=l[r]||o,a=i(e[r],t[r],r);Ea.isUndefined(a)&&i!==s||(n[r]=a)}),n}var ps=e=>{const t=hs({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;if(t.headers=a=Qa.from(a),t.url=Fa(cs(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Ea.isFormData(n))if(Va.hasStandardBrowserEnv||Va.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(Ea.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&a.set(e,n)})}if(Va.hasStandardBrowserEnv&&(r&&Ea.isFunction(r)&&(r=r(t)),r||!1!==r&&ss(t.url))){const e=o&&i&&ls.read(i);e&&a.set(o,e)}return t},fs="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=ps(e);let o=r.data;const i=Qa.from(r.headers).normalize();let a,s,l,c,u,{responseType:h,onUploadProgress:p,onDownloadProgress:f}=r;function d(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=Qa.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());rs(function(e){t(e),d()},function(e){n(e),d()},{data:h&&"text"!==h&&"json"!==h?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new Ta("Request aborted",Ta.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=new Ta(t&&t.message?t.message:"Network Error",Ta.ERR_NETWORK,e,m);r.event=t||null,n(r),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||za;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Ta(t,o.clarifyTimeoutError?Ta.ETIMEDOUT:Ta.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&Ea.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),Ea.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),h&&"json"!==h&&(m.responseType=r.responseType),f&&([l,u]=os(f,!0),m.addEventListener("progress",l)),p&&m.upload&&([s,c]=os(p),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new ns(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===Va.protocols.indexOf(y)?n(new Ta("Unsupported protocol "+y+":",Ta.ERR_BAD_REQUEST,e)):m.send(o||null)})};const ds=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Ta?t:new ns(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Ta(`timeout ${t} of ms exceeded`,Ta.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>Ea.asap(a),s}},ms=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},gs=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*ms(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:ys}=Ea,vs=(({Request:e,Response:t})=>({Request:e,Response:t}))(Ea.global),{ReadableStream:ws,TextEncoder:bs}=Ea.global,_s=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},xs=e=>{e=Ea.merge.call({skipUndefined:!0},vs,e);const{fetch:t,Request:n,Response:r}=e,o=t?ys(t):"function"==typeof fetch,i=ys(n),a=ys(r);if(!o)return!1;const s=o&&ys(ws),l=o&&("function"==typeof bs?(c=new bs,e=>c.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var c;const u=i&&s&&_s(()=>{let e=!1;const t=new n(Va.origin,{body:new ws,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),h=a&&s&&_s(()=>Ea.isReadableStream(new r("").body)),p={stream:h&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!p[e]&&(p[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Ta(`Response type '${e}' is not supported`,Ta.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:o,method:a,data:s,signal:c,cancelToken:f,timeout:d,onDownloadProgress:m,onUploadProgress:g,responseType:y,headers:v,withCredentials:w="same-origin",fetchOptions:b}=ps(e),_=t||fetch;y=y?(y+"").toLowerCase():"text";let x=ds([c,f&&f.toAbortSignal()],d),E=null;const T=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let S;try{if(g&&u&&"get"!==a&&"head"!==a&&0!==(S=await(async(e,t)=>{const r=Ea.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Ea.isBlob(e))return e.size;if(Ea.isSpecCompliantForm(e)){const t=new n(Va.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Ea.isArrayBufferView(e)||Ea.isArrayBuffer(e)?e.byteLength:(Ea.isURLSearchParams(e)&&(e+=""),Ea.isString(e)?(await l(e)).byteLength:void 0)})(t):r})(v,s))){let e,t=new n(o,{method:"POST",body:s,duplex:"half"});if(Ea.isFormData(s)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,n]=is(S,os(as(g)));s=gs(t.body,65536,e,n)}}Ea.isString(w)||(w=w?"include":"omit");const t=i&&"credentials"in n.prototype,c={...b,signal:x,method:a.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:"half",credentials:t?w:void 0};E=i&&new n(o,c);let f=await(i?_(E,b):_(o,c));const d=h&&("stream"===y||"response"===y);if(h&&(m||d&&T)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=f[t]});const t=Ea.toFiniteNumber(f.headers.get("content-length")),[n,o]=m&&is(t,os(as(m),!0))||[];f=new r(gs(f.body,65536,n,()=>{o&&o(),T&&T()}),e)}y=y||"text";let C=await p[Ea.findKey(p,y)||"text"](f,e);return!d&&T&&T(),await new Promise((t,n)=>{rs(t,n,{data:C,headers:Qa.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:E})})}catch(t){if(T&&T(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Ta("Network Error",Ta.ERR_NETWORK,e,E),{cause:t.cause||t});throw Ta.from(t,t&&t.code,e,E)}}},Es=new Map,Ts=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let a,s,l=i.length,c=Es;for(;l--;)a=i[l],s=c.get(a),void 0===s&&c.set(a,s=l?new Map:xs(t)),c=s;return s};Ts();const Ss={http:null,xhr:fs,fetch:{get:Ts}};Ea.forEach(Ss,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Cs=e=>`- ${e}`,Ps=e=>Ea.isFunction(e)||null===e||!1===e;var Os=function(e,t){e=Ea.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let a=0;a<n;a++){let n;if(r=e[a],o=r,!Ps(r)&&(o=Ss[(n=String(r)).toLowerCase()],void 0===o))throw new Ta(`Unknown adapter '${n}'`);if(o&&(Ea.isFunction(o)||(o=o.get(t))))break;i[n||"#"+a]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Ta("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Cs).join("\n"):" "+Cs(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function As(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ns(null,e)}function ks(e){return As(e),e.headers=Qa.from(e.headers),e.data=es.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Os(e.adapter||Ga.adapter,e)(e).then(function(t){return As(e),t.data=es.call(e,e.transformResponse,t),t.headers=Qa.from(t.headers),t},function(t){return ts(t)||(As(e),t&&t.response&&(t.response.data=es.call(e,e.transformResponse,t.response),t.response.headers=Qa.from(t.response.headers))),Promise.reject(t)})}const Ls="1.13.2",Is={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Is[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Ms={};Is.transitional=function(e,t,n){return(r,o,i)=>{if(!1===e)throw new Ta(function(e,t){return"[Axios v"+Ls+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}(o," has been removed"+(t?" in "+t:"")),Ta.ERR_DEPRECATED);return t&&!Ms[o]&&(Ms[o]=!0),!e||e(r,o,i)}},Is.spelling=function(e){return(e,t)=>!0};var js={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Ta("options must be an object",Ta.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new Ta("option "+i+" must be "+n,Ta.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Ta("Unknown option "+i,Ta.ERR_BAD_OPTION)}},validators:Is};const Rs=js.validators;class Fs{constructor(e){this.defaults=e||{},this.interceptors={request:new Da,response:new Da}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=hs(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&js.assertOptions(n,{silentJSONParsing:Rs.transitional(Rs.boolean),forcedJSONParsing:Rs.transitional(Rs.boolean),clarifyTimeoutError:Rs.transitional(Rs.boolean)},!1),null!=r&&(Ea.isFunction(r)?t.paramsSerializer={serialize:r}:js.assertOptions(r,{encode:Rs.function,serialize:Rs.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),js.assertOptions(t,{baseUrl:Rs.spelling("baseURL"),withXsrfToken:Rs.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Ea.merge(o.common,o[t.method]);o&&Ea.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Qa.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,h=0;if(!s){const e=[ks.bind(this),void 0];for(e.unshift(...a),e.push(...l),u=e.length,c=Promise.resolve(t);h<u;)c=c.then(e[h++],e[h++]);return c}u=a.length;let p=t;for(;h<u;){const e=a[h++],t=a[h++];try{p=e(p)}catch(e){t.call(this,e);break}}try{c=ks.call(this,p)}catch(e){return Promise.reject(e)}for(h=0,u=l.length;h<u;)c=c.then(l[h++],l[h++]);return c}getUri(e){return Fa(cs((e=hs(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Ea.forEach(["delete","get","head","options"],function(e){Fs.prototype[e]=function(t,n){return this.request(hs(n||{},{method:e,url:t,data:(n||{}).data}))}}),Ea.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(hs(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Fs.prototype[e]=t(),Fs.prototype[e+"Form"]=t(!0)});class Ds{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new ns(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Ds(function(t){e=t}),cancel:e}}}const zs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(zs).forEach(([e,t])=>{zs[t]=e});const Ns=function e(t){const n=new Fs(t),r=Mi(Fs.prototype.request,n);return Ea.extend(r,Fs.prototype,n,{allOwnKeys:!0}),Ea.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(hs(t,n))},r}(Ga);Ns.Axios=Fs,Ns.CanceledError=ns,Ns.CancelToken=Ds,Ns.isCancel=ts,Ns.VERSION=Ls,Ns.toFormData=La,Ns.AxiosError=Ta,Ns.Cancel=Ns.CanceledError,Ns.all=function(e){return Promise.all(e)},Ns.spread=function(e){return function(t){return e.apply(null,t)}},Ns.isAxiosError=function(e){return Ea.isObject(e)&&!0===e.isAxiosError},Ns.mergeConfig=hs,Ns.AxiosHeaders=Qa,Ns.formToJSON=e=>qa(Ea.isHTMLForm(e)?new FormData(e):e),Ns.getAdapter=Os,Ns.HttpStatusCode=zs,Ns.default=Ns;class Bs{constructor(){this.storage={}}contains(e){return e in this.storage}getString(e){return this.contains(e)?this.storage[e]:null}set(e,t){this.storage[e]=t}clearAll(){this.storage={}}}const Us=(e,t,n)=>F(void 0,void 0,void 0,function*(){const r="AES-CBC",o=Uint8Array.from(atob(t),e=>e.charCodeAt(0)),i=yield crypto.subtle.importKey("raw",(new TextEncoder).encode(n),{name:r},!1,["decrypt"]),a=yield crypto.subtle.decrypt({name:r,iv:o},i,function(e){const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)t[n/2]=parseInt(e.substr(n,2),16);return t}(e));let s=(new TextDecoder).decode(a);return s=JSON.parse(s),s}),Ws=function(){let e;return{setState:function(t){e=t},getState:function(){return e}}}(),$s=function(){let e;return{setState:function(t){e=t},getState:function(){return e}}}();var Hs,Vs;function qs(e){return e===Hs.Routing?"generate-route-json-per-role":e===Hs.MapObjects?"generate-map-objects-per-role":void 0}function Gs(e,t){return t.valueOf()+e}!function(e){e.Routing="routing",e.MapObjects="mapObjects"}(Hs||(Hs={})),function(e){e.Ready="Ready",e.Awaiting="Awaiting",e.DownloadingResources="DownloadingResources",e.Unavailable="Unavailable"}(Vs||(Vs={}));const Js=Ws.setState,Ys=$s.setState;function Xs(e,t){return F(this,void 0,void 0,function*(){const n=e.publishedDataType,r=Gs("version",n);let o=Vs.Awaiting,i=function(e){return e===Hs.Routing?Js:e===Hs.MapObjects?Ys:void 0}(n);const a=()=>F(this,void 0,void 0,function*(){const i=t.contains(r)?t.getString(r):"0.0.0";return new Promise((a,s)=>{Ns({url:`${e.URL}/check-published-versions`,headers:{Authorization:`Bearer ${e.accessToken}`,"Content-Type":"application/json"},method:"POST",data:JSON.stringify({version:i,dataType:qs(e.publishedDataType)})}).then(e=>{const i=e.data,s={currentVersion:void 0,remoteVersion:void 0,URL:void 0,data:void 0},l=t.getString(r);let c=l;if(i.hasOwnProperty("version")&&(c=i.version),s.currentVersion=l,s.remoteVersion=c,l){const e=t.getString(Gs("data",n));t.getString(Gs("encryptionTag",n))&&e&&(s.data=e)}c&&(i.hasOwnProperty("downloadUrl")&&(s.URL=i.downloadUrl),(l&&c>l||!l||!s.data)&&(o=s.URL?Vs.DownloadingResources:o)),a(s)}).catch(function(e){e.response||e.request,s(e)})})}),s=()=>{try{(()=>{const r=t.getString(Gs("data",n)),a=t.getString(Gs("encryptionTag",n));if(r&&a){const t=Us(r,a,e.secretKey);return i({data:t}),o=Vs.Ready,!0}return!1})()||(o=Vs.Unavailable)}catch(e){o=Vs.Unavailable,t.clearAll()}};try{const l=yield a();if(o===Vs.DownloadingResources&&l.URL)try{const a=yield fetch(l.URL);if(!a.ok)throw new Error(`HTTP error! Status: ${a.status}`);const s=yield a.json(),{data:c,tag:u}=s,h=yield Us(c,u,e.secretKey),p=((e,o,i)=>{try{return t.set(Gs("data",n),e),t.set(r,o),t.set(Gs("encryptionTag",n),i),!0}catch(e){return!1}})(c,l.remoteVersion,u);p&&(i({data:h}),o=Vs.Ready)}catch(e){s()}else{const n=t.getString("encryptionTag");if(l.data&&n){const t=Us(l.data,n,e.secretKey);i({data:t}),o=Vs.Ready}else s()}}catch(e){s()}return o})}var Zs,Ks;!function(e){e.Name="Name",e.WhereDimension="WhereDimension",e.Relevance="Relevance",e.RelevanceStrict="RelevanceStrict"}(Zs||(Zs={})),function(e){e.Name="title",e.LocalRef="localRef",e.WhatTaxonomy="dimension_what"}(Ks||(Ks={}));class Qs{constructor(){this.defaultFocusedTaxonomy="where.changi",this.searchableGeoJsonFeatures=[],this.currentFocus=this.defaultFocusedTaxonomy,this.token="",this.empApi="",this.atomsAPIAccessToken="",this.apiRequestLimit=5e3,this.secretKeyForDecryption="",this.routingStatus=Vs.Awaiting,this.searchStatus=Vs.Awaiting,this.storage=new Bs,this.ignoredLayers=["Aerodrome","Aerodrome names","Aerobridge","Aerobridge gates","Airplanes","Airplanes outline","Building Extrusion","Building icon","Building overlay","Building overlay outline","Building underlay","Building underlay icon","Building underlay selected outline","building_outline","Changi Airport Connector","Changi Airport Connector Text","Changi Walkway Text","T2 overlay outline copy","Building overlay base","Skytrain track outdoor"],this.lastClicked={mapObjectId:null,coordinates:null,name:null,whatDimension:null,whereDimension:null,geometry:null,properties:null,clickEvent:null}}init(e,t,n,r){this.empApi=e,this.token=t,this.secretKeyForDecryption=n,this.getAtomsAPIAccessToken(r)}getAtomsAPIAccessToken(e){const t=JSON.stringify({strategy:"atomstoken",atomsSdkToken:this.token,clientEngine:"API",clientOS:"Linux"}),n={method:"post",url:`${this.empApi}/authentication`,headers:{"Content-Type":"application/json"},data:t};Ns(n).then(t=>F(this,void 0,void 0,function*(){var n;(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.accessToken)&&(this.atomsAPIAccessToken=t.data.accessToken,e({authenticated:!0}))})).catch(function(t){e({authenticated:!1,error:t})})}setupRouting(e){return F(this,void 0,void 0,function*(){const t=yield Xs({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:Hs.Routing},this.storage);this.routingStatus=t,e&&e(t===Vs.Ready)})}getRoutingStatus(){return this.routingStatus}setLastClickedFeature(e){e.mapObjectId?this.getMapObjectById(e.mapObjectId,t=>{const n=null==t?void 0:t[0];n&&(this.lastClicked=Object.assign(Object.assign({},e),{properties:Object.assign(Object.assign({},e.properties),{booth_info:n.properties.booth_info})}))}):this.lastClicked=e}getLastClickedFeature(){let e=this.lastClicked;if(!this.lastClicked||this.lastClicked&&(null===this.lastClicked.name||null===this.lastClicked.whereDimension)){const t={mapObjectId:null,coordinates:null,name:null,whatDimension:null,whereDimension:null,geometry:null,properties:null,clickEvent:null};this.setLastClickedFeature(t),e=t}return e}isClickableFeature(e){return!(!e.properties.isSearchable||"Transit"===e.properties.title||"Public"===e.properties.title)}getMidPointOfFeature(e){if(!e)return null;if(e.lngLat)return e.lngLat;if(!e.geometry)return null;if("Point"===e.geometry.type)return e.geometry.coordinates;let t=H(e.geometry);if("LineString"===t.geometry.type||"MultiLineString"===t.geometry.type&&1==t.geometry.coordinates.length){t=G(e.geometry.coordinates);let n=he(t);return function(e,t,n,r){if(!te(r=r||{}))throw new Error("options is invalid");var o,i=[];if("Feature"===e.type)o=e.geometry.coordinates;else{if("LineString"!==e.type)throw new Error("input must be a LineString Feature or Geometry");o=e.coordinates}for(var a,s,l,c=o.length,u=0,h=0;h<o.length&&!(t>=u&&h===o.length-1);h++){if(u>t&&0===i.length){if(!(a=t-u))return i.push(o[h]),G(i);s=Ai(o[h],o[h-1])-180,l=ki(o[h],a,s,r),i.push(l.geometry.coordinates)}if(u>=n)return(a=n-u)?(s=Ai(o[h],o[h-1])-180,l=ki(o[h],a,s,r),i.push(l.geometry.coordinates),G(i)):(i.push(o[h]),G(i));if(u>=t&&i.push(o[h]),h===o.length-1)return G(i);u+=ae(o[h],o[h+1],r)}if(u<t&&o.length===c)throw new Error("Start position is beyond line");var p=o[o.length-1];return G([p,p])}(t,n/2,n).geometry.coordinates[0]}return function(e,t){void 0===t&&(t={});var n=Oi(e);return V([(n[0]+n[2])/2,(n[1]+n[3])/2],t.properties,t)}(t).geometry.coordinates}getFocusTree(){return Ci}getWhatTaxonomies(){return Pi}getCurrentFocus(){return this.currentFocus}getCurrentFocusBuilding(){for(const e in Ci){const t=Ci[e];if(t&&t.buildings)if(Array.isArray(t.buildings)){for(const e of t.buildings)if(e&&e.taxonomyPath&&this.currentFocus.includes(e.taxonomyPath))return e}else for(const e in t.buildings){const n=t.buildings[e];if(n&&n.taxonomyPath&&this.currentFocus.includes(n.taxonomyPath))return n}}return null}getCurrentFocusFloor(){let e=this.getCurrentFocusBuilding();if(e){for(let t in e.floors)if(this.currentFocus===e.floors[t].taxonomyPath)return e.floors[t];return null}}getUserViewportBuilding(e){let t=V(e);for(const e in Ci){const n=Ci[e];if(n&&n.buildings)if(Array.isArray(n.buildings)){for(const e of n.buildings)if(e&&e.hasOwnProperty("bounds")&&Li(t,q(e.bounds)))return e}else for(const e in n.buildings){let r=n.buildings[e];if(r&&r.hasOwnProperty("bounds")&&Li(t,q(r.bounds)))return r}}return null}checkUserViewport(e,t,n){let r=V(e);if(null==t)return!1;if(!t.hasOwnProperty("bounds"))return!1;let o=Li(r,q(t.bounds));if(null==n)return o;if(!n.hasOwnProperty("bounds"))return o;let i=Li(r,q(n.bounds));return o||i}filterBaseMapWhereDimension(e,t){let n=t;if(!n)return;this.currentFocus=n;let r=[n],o=null;for(const e in Ci){const t=Ci[e];if(t&&t.taxonomyPath===n){o=t;break}}if(o)if(r=[],o.buildings){const e=Array.isArray(o.buildings)?o.buildings:Object.values(o.buildings);for(const t of e)if(t&&t.floors&&Array.isArray(t.floors))for(const e of t.floors)e&&e.taxonomyPath&&r.push(e.taxonomyPath);0===r.length&&(r=[o.taxonomyPath])}else r=[o.taxonomyPath];else{let e=null;for(const t in Ci){const r=Ci[t];if(!r||!r.buildings)continue;const o=Array.isArray(r.buildings)?r.buildings:Object.values(r.buildings);for(const t of o)if(t&&t.taxonomyPath===n){e=t;break}if(e)break}if(e){if(r=[],e.floors&&Array.isArray(e.floors))for(const t of e.floors)t&&t.taxonomyPath&&r.push(t.taxonomyPath);0===r.length&&(r=[e.taxonomyPath])}}if(e.length>0)for(let t=0;t<e.length;t+=1){const n=e[t].id;this.ignoredLayers.includes(n)||this.filterLayer(e[t],r)}return e}filterLayersWhereDimension(e,t){if(!t)return;let n=[];n=[t];for(let t=0;t<e.length;t+=1)this.filterLayer(e[t],n);return e}filterLayer(e,t){const n=e.filter;if(n){let e=!1;for(let r=0;r<n.length;r+=1){const o=n[r];if(Array.isArray(o[1])&&"dimension_where"===o[1][1]){o[0]="in",o[2]=["literal",t],e=!0;break}}e||n.push(["in",["get","dimension_where"],["literal",t]])}}getFlyToLocation(e,t=!0){const n=e=>t?e.cameraConfigs.mobile:e.cameraConfigs.web;for(const t in Ci){const r=Ci[t];if(r.taxonomyPath===e)return n(r);if(r.buildings)for(const t of r.buildings){if(t.taxonomyPath===e)return n(t);for(const r of t.floors)if(r.taxonomyPath===e)return n(t)}}return{center:[0,0],zoom:10,bearing:0}}filterLayersByCategories(e,t,n,r,o,i){if(n){for(let a=0;a<e.length;a+=1){const s=e[a].id,l=e[a];let c;const u=l.filter;if(r){c=["any",["!",["all",["==",["geometry-type"],r],["==",["get","dimension_what"],o]]]];for(let e=0;e<n.length;e++){const r=n[e];c[1][1].splice(1,0,["!",["in",r,["get",t]]])}}else{c=["all"];for(let e=0;e<n.length;e++){const r=n[e];c.push(["all",["in",r,["get",t]]])}}if(u){let e=!1;for(let o=0;o<u.length;o+=1){let i=u[o];if(r){if("any"===i[0]&&Array.isArray(i[1])&&Array.isArray(i[1][1])&&"!"===i[1][0]&&"all"===i[1][1][0]){const r=i[1][1];r.length>3&&r.splice(1,r.length-3);for(let e=0;e<n.length;e++){const r=n[e];i[1][1].splice(1,0,["!",["in",r,["get",t]]])}e=!0;break}}else if(Array.isArray(i[1])&&Array.isArray(i[1][1])&&"!"===i[0]&&i[1][1][1]===t){i[0]="!",i[1][2]=["literal",n],e=!0;break}}e||u.push(c)}if(s.includes("Retail")){const e=l.paint,r=["case"];for(let e=0;e<n.length;e++){const o=n[e];r.push(["boolean",["in",o,["get",t]],!0]),r.push(.99)}if(r.push(.25),"fill"===l.type){const t="fill-opacity";e["fill-opacity"]=r,i.setPaintProperty(s,t,e[t])}if("line"===l.type){const t="line-opacity";e["line-opacity"]=r,i.setPaintProperty(s,t,e[t])}}}return e}}filterLayersByType(e,t,n,r){if(n){for(let o=0;o<e.length;o+=1){let i;const a=e[o].filter;if(i=r?["case",["!",["in",["get",t],["literal",n]]],!0,["all",["in",["get",t],["literal",n]],["!=",["geometry-type"],r]],!0,!1]:["in",["get",t],["literal",n]],a){let e=!1;for(let o=0;o<a.length;o+=1){let i=a[o];if(r){if("case"===i[0]&&Array.isArray(i[1])&&Array.isArray(i[3])&&Array.isArray(i[3][1])&&Array.isArray(i[3][1])&&Array.isArray(i[3][1][1])&&Array.isArray(i[3][1][2])&&Array.isArray(i[3][2])&&i[3][1][1][1]===t&&i[3][2][2]===r){i[1][1][2]=["literal",n],i[1][1][1]=["get",t],i[3][1][2]=["literal",n],i[3][1][1]=["get",t],i[3][2][2]=r,e=!0;break}}else if(Array.isArray(i[1])&&"!"===i[0]&&i[1][1]===t){i[2]=["literal",n],e=!0;break}}e||a.push(i)}}return e}}createFilterForStyle(e,t,n,r){function o(e,t){const n=t.filter(t=>!e.includes(t));return e.push(...n),e}return function e(i){if(Array.isArray(i)&&"match"===i[0]){let a=[...i];return Array.isArray(a[1])&&a[1][1]===t?function(e,t){for(let i=3;i<t.length;i+=2){if(e[i]===r){const t=o(e[i-1],n);return void(e[i-1]=t)}i+2===t.length&&e.splice(i+1,0,n,r)}}(a,i):a[a.length-1]=e(a[a.length-1]),a}return["match",["get",t],n,r,i]}(e)}styleLayersByType(e,t,n,r,o){if(n){for(let i=0;i<e.length;i+=1){const a=e[i],s=a.paint,l=a.type;if((l&&"fill"===l||"line"===l)&&s[r]){let e=s[r];if(e){const i=this.createFilterForStyle(e,t,n,o);s[r]=i}}}return e}}createFilterForClearStyle(e,t,n){return function e(r){if(Array.isArray(r)&&"match"===r[0]){let o=[...r];return Array.isArray(o[1])&&o[1][1]===t?n.length>0?function(e,t){for(let r=2;r<t.length;r+=2)Array.isArray(e[r])&&n.forEach(t=>{const n=e[r].indexOf(t);n>-1&&(e[r].length>1?e[r].splice(n,1):e[r]=[""])})}(o,r):o=o[o.length-1]:o[o.length-1]=e(o[o.length-1]),o}}(e)}clearStyleLayersByType(e,t,n,r){for(let o=0;o<e.length;o+=1){const i=e[o],a=i.paint,s=i.type;if((s&&"fill"===s||"line"===s)&&a[r]){let e=a[r];if(e){const o=this.createFilterForClearStyle(e,t,n);a[r]=o}}}return e}normalize(e){return e.trim().toLowerCase()}relevanceSort(e,t,n=!1){function r(e){const r=[-1,0,e.name];if(e.name){const o=e.name.toLowerCase(),i=t.toLowerCase();return o===i?[1e3,-e.name.length,o]:o.startsWith(i)?[500,-e.name.length,o]:o.split(" ").some(e=>e.startsWith(i))?[200,-e.name.length,o]:n?r:o.includes(i)?[0,-e.name.length,o]:r}return r}return e.sort((e,t)=>{const n=r(e),o=r(t);return o[0]-n[0]||o[1]-n[1]||n[2].localeCompare(o[2])}).filter(e=>r(e)[0]>=0)}sort(e,t,n=""){const r=(e,t)=>e&&t?e.localeCompare(t):0;return t===Zs.Name?e.sort((e,t)=>r(e.name,t.name)):t===Zs.WhereDimension?e.sort((e,t)=>{const n=r(e.whereDimension,t.whereDimension);return 0===n?r(e.name,t.name):n}):t===Zs.Relevance?this.relevanceSort(e,n):t===Zs.RelevanceStrict?this.relevanceSort(e,n,!0):void 0}setupMapObjectSearch(e){return F(this,void 0,void 0,function*(){const t=yield Xs({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:Hs.MapObjects},this.storage);this.searchStatus=t;const n=$s.getState().data;for(let e=0;e<n.length;e++){const t=n[e];if(t){const e=t.lngLat,n=Array.isArray(e)&&Array.isArray(e[0])?{type:"LineString",coordinates:e}:{type:"Point",coordinates:e},r={mapObjectId:t.mID,coordinates:t.lngLat,name:t.name,whatDimension:t.what,whereDimension:t.where,geometry:n,properties:{myMapObjectId:t.mID,title:t.name,localRef:t.localRef,dimension_what:t.what,dimension_where:t.where,booth_info:{overview:t.overview,images:t.images,videos:t.videos,files:t.files,products:t.products,logos:t.logos},metadata:t.metadata?JSON.parse(t.metadata):null}};this.searchableGeoJsonFeatures.push(r)}}e&&e(t===Vs.Ready)})}getMapObjectsByFilteredLocalRef(e,t=!1,n,r){const o=new Set,i=[],a=this.normalize(String(e));for(const e of this.searchableGeoJsonFeatures){const n=e.properties.myMapObjectId,r=this.normalize(String(e.properties.localRef));if(t&&!r.includes(a))continue;if(!t&&r!==a)continue;if(o.has(n))continue;o.add(n);const s={mapObjectId:String(e.properties.myMapObjectId),coordinates:null,name:e.properties.title,whatDimension:e.properties.dimension_what,whereDimension:e.properties.dimension_where,geometry:e.geometry,properties:e.properties};i.push(s)}r(this.sort(i,n,e))}getMapObjectsByName(e,t=!1,n,r){const o=new Set,i=[],a=this.normalize(String(e));for(const e of this.searchableGeoJsonFeatures){const n=e.properties.myMapObjectId,r=this.normalize(String(e.properties.title));if(t&&!r.includes(a))continue;if(!t&&r!==a)continue;if(o.has(n))continue;o.add(n);const s={mapObjectId:String(e.properties.myMapObjectId),coordinates:null,name:e.properties.title,whatDimension:e.properties.dimension_what,whereDimension:e.properties.dimension_where,geometry:e.geometry,properties:e.properties};i.push(s)}r(this.sort(i,n,e))}getMapObjectById(e,t){let n=[];for(const t of this.searchableGeoJsonFeatures)if(String(t.properties.myMapObjectId)===String(e)){const e={mapObjectId:String(t.properties.myMapObjectId),coordinates:t.coordinates,name:t.properties.title,whatDimension:t.properties.dimension_what,whereDimension:t.properties.dimension_where,geometry:t.geometry,properties:t.properties};n.push(e)}t(n)}getMapObjectByLocalRef(e,t){let n=[];for(const t of this.searchableGeoJsonFeatures)if(String(t.properties.localRef)===String(e)){const e={mapObjectId:String(t.properties.myMapObjectId),coordinates:t.coordinates,name:t.properties.title,whatDimension:t.properties.dimension_what,whereDimension:t.properties.dimension_where,geometry:t.geometry,properties:t.properties};n.push(e)}t(n)}getMapObjectMatchingLocalRef(e,t){let n=[];for(const t of this.searchableGeoJsonFeatures)if(String(t.properties.localRef).includes(String(e))){const e={mapObjectId:String(t.properties.myMapObjectId),coordinates:t.coordinates,name:t.properties.title,whatDimension:t.properties.dimension_what,whereDimension:t.properties.dimension_where,geometry:t.geometry,properties:t.properties};n.push(e)}t(n)}getMapObjectsMatchingLocalRefs(e,t){let n=[];const r=Array.isArray(e)?e:[e];for(const e of this.searchableGeoJsonFeatures){const t=String(e.properties.localRef);if(r.some(e=>t.includes(String(e)))){const t={mapObjectId:String(e.properties.myMapObjectId),coordinates:e.coordinates,name:e.properties.title,whatDimension:e.properties.dimension_what,whereDimension:e.properties.dimension_where,geometry:e.geometry,properties:e.properties};n.push(t)}}t(n)}getMapObjectsByWhatTaxonomy(e,t){let n=[];for(const t of this.searchableGeoJsonFeatures){const r=String(t.properties.dimension_what);if(!e||r===String(e)){const e={mapObjectId:String(t.properties.myMapObjectId),coordinates:t.coordinates,name:t.properties.title,whatDimension:t.properties.dimension_what,whereDimension:t.properties.dimension_where,geometry:t.geometry,properties:t.properties};n.push(e)}}t(n)}getMapObjectsByWhereTaxonomy(e,t){let n=[];for(const t of this.searchableGeoJsonFeatures)if(String(t.properties.dimension_where)===String(e)){const e={mapObjectId:String(t.properties.myMapObjectId),coordinates:t.coordinates,name:t.properties.title,whatDimension:t.properties.dimension_what,whereDimension:t.properties.dimension_where,geometry:t.geometry,properties:t.properties};n.push(e)}t(n)}getMapObjectsByWhatAndWhereTaxonomy(e,t,n){let r=[];for(const n of this.searchableGeoJsonFeatures){const o=String(n.properties.dimension_where),i=String(n.properties.dimension_what);if(o===String(t)&&i===String(e)){const e={mapObjectId:String(n.properties.myMapObjectId),coordinates:n.coordinates,name:n.properties.title,whatDimension:n.properties.dimension_what,whereDimension:n.properties.dimension_where,geometry:n.geometry,properties:n.properties};r.push(e)}}n(r)}getMapObjectsInWhatTaxonomy(e,t){let n=[];for(const t of this.searchableGeoJsonFeatures){const r=String(t.properties.dimension_what);if(e.includes(r)){const e={mapObjectId:String(t.properties.myMapObjectId),coordinates:t.coordinates,name:t.properties.title,whatDimension:t.properties.dimension_what,whereDimension:t.properties.dimension_where,geometry:t.geometry,properties:t.properties};n.push(e)}}t(n)}getMapObjectsInWhereTaxonomy(e,t){let n=[];for(const t of this.searchableGeoJsonFeatures){const r=String(t.properties.dimension_where);if(e.includes(r)){const e={mapObjectId:String(t.properties.myMapObjectId),coordinates:t.coordinates,name:t.properties.title,whatDimension:t.properties.dimension_what,whereDimension:t.properties.dimension_where,geometry:t.geometry,properties:t.properties};n.push(e)}}t(n)}getMapObjectsInWhatAndWhereTaxonomy(e,t,n){let r=[];for(const n of this.searchableGeoJsonFeatures){const o=String(n.properties.dimension_where),i=String(n.properties.dimension_what);if(t.includes(o)&&e.includes(i)){const e={mapObjectId:String(n.properties.myMapObjectId),coordinates:n.coordinates,name:n.properties.title,whatDimension:n.properties.dimension_what,whereDimension:n.properties.dimension_where,geometry:n.geometry,properties:n.properties};r.push(e)}}n(r)}getMapObjectsApi(e=""){return new Promise((t,n)=>{Ns({url:`${this.empApi}/map-objects${e}`,headers:{Authorization:`Bearer ${this.atomsAPIAccessToken}`},method:"get"}).then(e=>{const n=e.data.data;t(n)}).catch(function(e){n(e)})})}getMapObjectsByWhatTaxonomyAPI(e,t){let n=`?$limit=${this.apiRequestLimit}`;e&&(n+=`&taxonomy2Path=${e}`),this.getMapObjectsApi(n).then(t).catch(t)}}const el=1024e3,tl=.1/180*Math.PI,nl=Math.atan(3/4),rl=6371008.8,ol={WORLD_SIZE:el,PROJECTION_WORLD_SIZE:el/(rl*Math.PI*2),MERCATOR_A:rl,DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,EARTH_RADIUS:rl,EARTH_CIRCUMFERENCE:2*Math.PI*rl,EARTH_CIRCUMFERENCE_EQUATOR:40075017,FOV_ORTHO:tl,FOV:nl,FOV_DEGREES:180*nl/Math.PI,TILE_SIZE:512};class il{constructor(e,t,n){this.map=e,this.camera=t,this.active=!0,this.camera.matrixAutoUpdate=!1,this.world=n||new f,this.world.position.x=this.world.position.y=ol.WORLD_SIZE/2,this.world.matrixAutoUpdate=!1,this.state={translateCenter:(new d).makeTranslation(ol.WORLD_SIZE/2,-ol.WORLD_SIZE/2,0),worldSizeRatio:ol.TILE_SIZE/ol.WORLD_SIZE,worldSize:ol.TILE_SIZE*this.map.transform.scale};let r=this;this.map.on("move",function(){r.updateCamera()}),this.map.on("resize",function(){r.setupCamera()}),this.setupCamera()}setupCamera(){const e=this.map.transform;this.camera.aspect=e.width/e.height,this.halfFov=e._fov/2,this.cameraToCenterDistance=.5/Math.tan(this.halfFov)*e.height;const t=e._maxPitch*Math.PI/180;this.acuteAngle=Math.PI/2-t,this.updateCamera()}updateCamera(e){if(!this.camera)return;const t=this.map.transform;this.camera.aspect=t.width/t.height;const n=t.centerOffset||new m;let r=0,o=0;this.halfFov=t._fov/2;const i=Math.PI/2+t._pitch,a=Math.cos(Math.PI/2-t._pitch);this.cameraToCenterDistance=.5/Math.tan(this.halfFov)*t.height;const s=this.worldSize();o=a*(Math.sin(this.halfFov)*this.cameraToCenterDistance/Math.sin(Math.PI-i-this.halfFov))+this.cameraToCenterDistance,r=1.01*o,this.cameraTranslateZ=(new d).makeTranslation(0,0,this.cameraToCenterDistance);const l=t.height/50,c=Math.max(l*a,l),u=t.height,h=t.width;var p,f,y,v,w,b,_,x;this.camera instanceof g?this.camera.projectionMatrix=function(e,t,n,r,o,i){var a=new d;const s=1/(t-e),l=1/(n-r),c=1/(i-o);var u=[2*s,0,0,0,0,2*l,0,0,0,0,-1*c,0,-((t+e)*s),-((n+r)*l),-o*c,1];return a.elements=u,a}(h/-2,h/2,u/2,u/-2,c,r):this.camera.projectionMatrix=(p=t._fov,f=h/u,y=c,v=r,w=new d,x=[(b=1/Math.tan(p/2))/f,0,0,0,0,b,0,0,0,0,(v+y)*(_=1/(y-v)),-1,0,0,2*v*y*_,0],w.elements=x,w),this.camera.projectionMatrix.elements[8]=2*-n.x/t.width,this.camera.projectionMatrix.elements[9]=2*n.y/t.height;let E=this.calcCameraMatrix(t._pitch,t.angle);t.elevation&&(E.elements[14]=t._camera.position[2]*s),this.camera.matrixWorld.copy(E);let T=t.scale*this.state.worldSizeRatio,S=new d,C=new d,P=new d;S.makeScale(T,T,T);let O=t.x||t.point.x,A=t.y||t.point.y;C.makeTranslation(-O,A,0),P.makeRotationZ(Math.PI),this.world.matrix=(new d).premultiply(P).premultiply(this.state.translateCenter).premultiply(S).premultiply(C),this.map.fire("CameraSynced",{detail:{nearZ:c,farZ:r,pitch:t._pitch,angle:t.angle,furthestDistance:o,cameraToCenterDistance:this.cameraToCenterDistance,t:this.map.transform,tbProjMatrix:this.camera.projectionMatrix.elements,tbWorldMatrix:this.world.matrix.elements,cameraSyn:il}})}worldSize(){let e=this.map.transform;return e.tileSize*e.scale}worldSizeFromZoom(){let e=this.map.transform;return Math.pow(2,e.zoom)*e.tileSize}mercatorZfromAltitude(e,t){return e/this.circumferenceAtLatitude(t)}mercatorZfromZoom(){return this.cameraToCenterDistance/this.worldSizeFromZoom()}circumferenceAtLatitude(e){return ol.EARTH_CIRCUMFERENCE*Math.cos(e*Math.PI/180)}calcCameraMatrix(e,t,n){const r=this.map.transform,o=void 0===e?r._pitch:e,i=void 0===t?r.angle:t,a=void 0===n?this.cameraTranslateZ:n;return(new d).premultiply(a).premultiply((new d).makeRotationX(o)).premultiply((new d).makeRotationZ(i))}updateCameraState(){let e=this.map.transform;if(!e.height)return;const t=e._camera.forward(),n=e.cameraToCenterDistance,r=e.point,o=this.mercatorZfromZoom(e)-this.mercatorZfromAltitude(e._centerAltitude,e.center.lat),i=e.cameraToCenterDistance/o;return[r.x/this.worldSize()-t[0]*n/i,r.y/this.worldSize()-t[1]*n/i,this.mercatorZfromAltitude(e._centerAltitude,e._center.lat)+-t[2]*n/i]}getWorldToCamera(e,t){let n=this.map.transform;const r=new d,o=new d,i=n._camera._orientation,a=n._camera.position,s=new m(a[0],a[1],a[2]),l=new y;l.set(i[0],i[1],i[2],i[3]);const c=l.conjugate();return s.multiplyScalar(-e),o.makeTranslation(s.x,s.y,s.z),r.makeRotationFromQuaternion(c).premultiply(o),r.elements[1]*=-1,r.elements[5]*=-1,r.elements[9]*=-1,r.elements[13]*=-1,r.elements[8]*=t,r.elements[9]*=t,r.elements[10]*=t,r.elements[11]*=t,r}translate(e,t,n){let r,o,i,a,s,l,c,u,h,p,f,d,m=n[0]||n.x,g=n[1]||n.y,y=n[2]||n.z;return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(r=t[0],o=t[1],i=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],p=t[9],f=t[10],d=t[11],e[0]=r,e[1]=o,e[2]=i,e[3]=a,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=p,e[10]=f,e[11]=d,e[12]=r*m+s*g+h*y+t[12],e[13]=o*m+l*g+p*y+t[13],e[14]=i*m+c*g+f*y+t[14],e[15]=a*m+u*g+d*y+t[15]),e}}function al(e){var t,n=[-ol.MERCATOR_A*ol.DEG2RAD*e[0]*ol.PROJECTION_WORLD_SIZE,-ol.MERCATOR_A*Math.log(Math.tan(.25*Math.PI+.5*ol.DEG2RAD*e[1]))*ol.PROJECTION_WORLD_SIZE];if(e[2]){var r=(t=e[1],Math.abs(ol.WORLD_SIZE/Math.cos(ol.DEG2RAD*t)/ol.EARTH_CIRCUMFERENCE));n.push(e[2]*r)}else n.push(0);return new m(n[0],n[1],n[2])}function sl(e,t){return Number(e.toFixed(t))}class ll{constructor(e){this.scene=new v,this.map=e;const t=null==e?void 0:e.getCanvas(),n=(null==t?void 0:t.getContext("webgl"))||(null==t?void 0:t.getContext("webgl2"));if(!n&&!this.isWebglSupported())return;this.renderer=new w({alpha:!0,antialias:!0,preserveDrawingBuffer:!1,canvas:e.getCanvas(),context:n}),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.map.getCanvas().clientWidth,this.map.getCanvas().clientHeight),this.renderer.autoClear=!1,this.renderer.toneMapping=b,this.renderer.outputColorSpace=_,this.fov=ol.FOV_DEGREES;const r=this.map.getCanvas().clientHeight,o=this.map.getCanvas().clientWidth;this.camera=new x(this.fov,o/r,.1,1e3),this.cameraSync=new il(e,this.camera,this.scene)}resize(){const e=this.map.getCanvas().clientWidth,t=this.map.getCanvas().clientHeight;this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),this.renderer.setSize(e,t)}isWebglSupported(){if(window.WebGLRenderingContext){const e=document.createElement("canvas");try{const t=e.getContext("webgl2")||e.getContext("webgl");if(t&&"function"==typeof t.getParameter)return!0}catch(e){}return!1}return!1}repaint(){this.map.repaint=!0}clear(e=null){return F(this,void 0,void 0,function*(){return new Promise((t,n)=>{const r=[];this.scene.children.forEach(function(e){r.push(e)});for(let t=0;t<r.length;t++){const n=r[t];n.layers!==e&&e||this.remove(n)}t("clear")})})}clearMeshes(){return F(this,void 0,void 0,function*(){return new Promise((e,t)=>{const n=[];this.scene.children.forEach(function(e){"Mesh"===e.type&&n.push(e)});for(let e=0;e<n.length;e++)this.remove(n[e]);e("clear")})})}filter3DObjects(e){Array.isArray(e)&&(0===e.length?this.scene.children.forEach(function(e){e.visible=!0}):this.scene.children.forEach(function(t){"Mesh"===t.type&&(e.includes(t.userData.whatDimension)?t.visible=!1:t.visible=!0)}))}add(e){this.scene.add(e)}setEnvironment(){const e=new E(16777215,2);e.position.set(10,10,10),e.castShadow=!0;const t=new T("white","white",1.5),n=new S("white",1);this.scene.add(e),this.scene.add(t),this.scene.add(n)}buildPoints(e,t){const n=[],r=al([t[0][0],t[0][1],0]);for(let t=0;t<e.length;t++){const o=al([e[t][0],e[t][1],0]);n.push(new C(sl(o.x-r.x,9),sl(o.y-r.y,9)))}return n}buildGeometry(e,t){const n=new P(e,t);return n.computeBoundingBox(),n}buildShape(e){if(e[0]instanceof(C||m))return new O(e);let t=new O;for(let n=0;n<e.length;n++)0===n?t=new O(this.buildPoints(e[0],e[0])):t.holes.push(new A(this.buildPoints(e[n],e[0])));return t}extrusion(e){const t=this.buildShape(e.coordinates),n=this.buildGeometry(t,e.geometryOptions),r=new k(n,e.materials);return e.visible||(r.visible=!1),r}centerMesh(e){const t=new L;e.geometry.computeBoundingBox(),t.copy(e.geometry.boundingBox).applyMatrix4(e.matrixWorld);let n=new m;t.getCenter(n);const r=new I;r.add(e),n=e.localToWorld(n);const o=e.position.clone().sub(n);return e.geometry.translate(o.x,o.y,0),r}dispose(e){e instanceof k?(e.material&&("function"!=typeof e.material.dispose||e.material._isDisposed||(e.material.dispose(),e.material._isDisposed=!0),e.material=null),e.geometry&&("function"!=typeof e.geometry.dispose||e.geometry._isDisposed||(e.geometry.dispose(),e.geometry._isDisposed=!0),e.geometry=null)):e instanceof I&&(e.removeFromParent(),this.disposeObject(e))}disposeObject(e){e.traverse(e=>{e instanceof k&&e.material&&(Array.isArray(e.material)?e.material.forEach(e=>{this.disposeMaterial(e)}):this.disposeMaterial(e.material)),e instanceof k&&e.geometry&&this.disposeGeometry(e.geometry),e instanceof k&&e.material&&e.material.map&&this.disposeTexture(e.material.map),requestAnimationFrame(()=>e.children.length=0)}),e.parent&&e.parent.remove(e)}disposeMaterial(e){e.dispose&&e.dispose()}disposeTexture(e){e.dispose&&e.dispose()}disposeGeometry(e){e.dispose&&e.dispose()}remove(e){this.scene.remove(e),e=null}update(){this.map.repaint&&(this.map.repaint=!1),this.scene.updateMatrixWorld(!0),this.renderer.resetState(),this.renderer.render(this.scene,this.camera)}}class cl{constructor(e){if(this.getAllPolygonCoordinates=()=>{const e=this.map;if(!e)return[];const t=[];if(e.getSource("custom")){const n=e.querySourceFeatures("custom",{sourceLayer:"geojson",filter:["==",["geometry-type"],"Polygon"]});n&&n.length>0&&n.forEach(e=>{var n;"Polygon"!==e.geometry.type&&"MultiPolygon"!==e.geometry.type||"what.booth"!==e.properties.dimension_what||t.push({id:e.properties.mapObjectId,name:(null===(n=e.properties)||void 0===n?void 0:n.title)||"Unnamed Polygon",coordinates:e.geometry.coordinates,properties:Object.assign(Object.assign({},e.properties),{hasImage:!!Math.round(Math.random())})})})}return t},this.updatePolygons=e=>{e.map(e=>F(this,void 0,void 0,function*(){const t=function(e,t){void 0===t&&(t={});var n=0,r=0,o=0;return se(e,function(e){n+=e[0],r+=e[1],o++},!0),V([n/o,r/o],t.properties)}(q(e.geometry.coordinates)).geometry.coordinates;if(!e.properties.hasImage&&e.properties.dimension_where&&"where.lima.mahsuri_center.exhibition_floor"===e.properties.dimension_where){const n=new j;n.color="black";let r=e.properties.title;r=this.addNewLine(r),n.text=r,n.textHeight=100;const o=al(t);n.rotation.x=Math.PI,n.rotation.y=Math.PI,n.scale.set(.1,.1,.01),n.position.set(o.x,o.y,.1),this.threebox.add(n)}}))},this.addLogo=(e,t)=>{const n=(new p.TextureLoader).load(e),r=new p.BoxGeometry(4,0,2),o=new p.MeshBasicMaterial({color:new p.Color(16777215)}),i=[o,o,new p.MeshStandardMaterial({map:n,side:p.DoubleSide,transparent:!0}),o,o,o],a=new p.Mesh(r,i);return a.rotation.x=Math.PI/2,a.rotation.y=-Math.PI/1.45,a.position.set(t.x+.5,t.y-.3,t.z),this.threebox.add(a),a},this.addTitle=(e,t)=>{const n=new M;return n.text=e,n.fontSize=.2,n.color=0,n.anchorX="50%",n.anchorY="bottom-baseline",n.fontWeight="bold",n.textAlign="center",n.position.set(t.x,t.y,t.z),n.rotation.z=-Math.PI/1.45,this.threebox.add(n),n.sync(),n},cl.mainInstance)return cl.mainInstance;cl.mainInstance=this,this.metaAtlasCore=e}init(e){this.map=e,this.initThreebox()}initThreebox(){const e=this.map,t=new ll(e);return t.setEnvironment(),e.addLayer({id:"3d-model-layer",type:"custom",renderingMode:"3d",onAdd:()=>{},render:()=>{t.update()}}),this.threebox=t,t}getThreebox(){return this.threebox}addNewLine(e){return e.replace(/ /g,"\r\n")}}cl.mainInstance=null;
13
- /**
14
- * @license
15
- * Copyright 2017 Google LLC
16
- *
17
- * Licensed under the Apache License, Version 2.0 (the "License");
18
- * you may not use this file except in compliance with the License.
19
- * You may obtain a copy of the License at
20
- *
21
- * http://www.apache.org/licenses/LICENSE-2.0
22
- *
23
- * Unless required by applicable law or agreed to in writing, software
24
- * distributed under the License is distributed on an "AS IS" BASIS,
25
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26
- * See the License for the specific language governing permissions and
27
- * limitations under the License.
28
- */
29
- /**
30
- * @license
31
- * Copyright 2017 Google LLC
32
- *
33
- * Licensed under the Apache License, Version 2.0 (the "License");
34
- * you may not use this file except in compliance with the License.
35
- * You may obtain a copy of the License at
36
- *
37
- * http://www.apache.org/licenses/LICENSE-2.0
38
- *
39
- * Unless required by applicable law or agreed to in writing, software
40
- * distributed under the License is distributed on an "AS IS" BASIS,
41
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
42
- * See the License for the specific language governing permissions and
43
- * limitations under the License.
44
- */
45
- const ul=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);o<128?t[n++]=o:o<2048?(t[n++]=o>>6|192,t[n++]=63&o|128):55296==(64512&o)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++r)),t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=63&o|128):(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=63&o|128)}return t},hl={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t<e.length;t+=3){const o=e[t],i=t+1<e.length,a=i?e[t+1]:0,s=t+2<e.length,l=s?e[t+2]:0,c=o>>2,u=(3&o)<<4|a>>4;let h=(15&a)<<2|l>>6,p=63&l;s||(p=64,i||(h=64)),r.push(n[c],n[u],n[h],n[p])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(ul(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,r=0;for(;n<e.length;){const o=e[n++];if(o<128)t[r++]=String.fromCharCode(o);else if(o>191&&o<224){const i=e[n++];t[r++]=String.fromCharCode((31&o)<<6|63&i)}else if(o>239&&o<365){const i=((7&o)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(i>>10)),t[r++]=String.fromCharCode(56320+(1023&i))}else{const i=e[n++],a=e[n++];t[r++]=String.fromCharCode((15&o)<<12|(63&i)<<6|63&a)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t<e.length;){const o=n[e.charAt(t++)],i=t<e.length?n[e.charAt(t)]:0;++t;const a=t<e.length?n[e.charAt(t)]:64;++t;const s=t<e.length?n[e.charAt(t)]:64;if(++t,null==o||null==i||null==a||null==s)throw new pl;const l=o<<2|i>>4;if(r.push(l),64!==a){const e=i<<4&240|a>>2;if(r.push(e),64!==s){const e=a<<6&192|s;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class pl extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const fl=function(e){return function(e){const t=ul(e);return hl.encodeByteArray(t,!0)}(e).replace(/\./g,"")},dl=()=>{try{
46
- /**
47
- * @license
48
- * Copyright 2022 Google LLC
49
- *
50
- * Licensed under the Apache License, Version 2.0 (the "License");
51
- * you may not use this file except in compliance with the License.
52
- * You may obtain a copy of the License at
53
- *
54
- * http://www.apache.org/licenses/LICENSE-2.0
55
- *
56
- * Unless required by applicable law or agreed to in writing, software
57
- * distributed under the License is distributed on an "AS IS" BASIS,
58
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59
- * See the License for the specific language governing permissions and
60
- * limitations under the License.
61
- */
62
- return function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}
63
- /**
64
- * @license
65
- * Copyright 2022 Google LLC
66
- *
67
- * Licensed under the Apache License, Version 2.0 (the "License");
68
- * you may not use this file except in compliance with the License.
69
- * You may obtain a copy of the License at
70
- *
71
- * http://www.apache.org/licenses/LICENSE-2.0
72
- *
73
- * Unless required by applicable law or agreed to in writing, software
74
- * distributed under the License is distributed on an "AS IS" BASIS,
75
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
76
- * See the License for the specific language governing permissions and
77
- * limitations under the License.
78
- */().__FIREBASE_DEFAULTS__||(()=>{if("undefined"==typeof process||void 0===process.env)return;const e=process.env.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}const t=e&&function(e){try{return hl.decodeString(e,!0)}catch(e){}return null}(e[1]);return t&&JSON.parse(t)})()}catch(e){return}},ml=()=>{var e;return null===(e=dl())||void 0===e?void 0:e.config};
79
- /**
80
- * @license
81
- * Copyright 2017 Google LLC
82
- *
83
- * Licensed under the Apache License, Version 2.0 (the "License");
84
- * you may not use this file except in compliance with the License.
85
- * You may obtain a copy of the License at
86
- *
87
- * http://www.apache.org/licenses/LICENSE-2.0
88
- *
89
- * Unless required by applicable law or agreed to in writing, software
90
- * distributed under the License is distributed on an "AS IS" BASIS,
91
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
92
- * See the License for the specific language governing permissions and
93
- * limitations under the License.
94
- */
95
- class gl{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof e&&(this.promise.catch(()=>{}),1===e.length?e(t):e(t,n))}}}function yl(){try{return"object"==typeof indexedDB}catch(e){return!1}}function vl(){return new Promise((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",o=self.indexedDB.open(r);o.onsuccess=()=>{o.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},o.onupgradeneeded=()=>{n=!1},o.onerror=()=>{var e;t((null===(e=o.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}})}class wl extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,wl.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,bl.prototype.create)}}class bl{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},r=`${this.service}/${e}`,o=this.errors[e],i=o?function(e,t){return e.replace(_l,(e,n)=>{const r=t[n];return null!=r?String(r):`<${n}?>`})}(o,n):"Error",a=`${this.serviceName}: ${i} (${r}).`;return new wl(r,a,n)}}const _l=/\{\$([^}]+)}/g;function xl(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const o of n){if(!r.includes(o))return!1;const n=e[o],i=t[o];if(El(n)&&El(i)){if(!xl(n,i))return!1}else if(n!==i)return!1}for(const e of r)if(!n.includes(e))return!1;return!0}function El(e){return null!==e&&"object"==typeof e}
96
- /**
97
- * @license
98
- * Copyright 2019 Google LLC
99
- *
100
- * Licensed under the Apache License, Version 2.0 (the "License");
101
- * you may not use this file except in compliance with the License.
102
- * You may obtain a copy of the License at
103
- *
104
- * http://www.apache.org/licenses/LICENSE-2.0
105
- *
106
- * Unless required by applicable law or agreed to in writing, software
107
- * distributed under the License is distributed on an "AS IS" BASIS,
108
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
109
- * See the License for the specific language governing permissions and
110
- * limitations under the License.
111
- */function Tl(e,t=1e3,n=2){const r=t*Math.pow(n,e),o=Math.round(.5*r*(Math.random()-.5)*2);return Math.min(144e5,r+o)}
112
- /**
113
- * @license
114
- * Copyright 2021 Google LLC
115
- *
116
- * Licensed under the Apache License, Version 2.0 (the "License");
117
- * you may not use this file except in compliance with the License.
118
- * You may obtain a copy of the License at
119
- *
120
- * http://www.apache.org/licenses/LICENSE-2.0
121
- *
122
- * Unless required by applicable law or agreed to in writing, software
123
- * distributed under the License is distributed on an "AS IS" BASIS,
124
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
125
- * See the License for the specific language governing permissions and
126
- * limitations under the License.
127
- */function Sl(e){return e&&e._delegate?e._delegate:e}class Cl{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}
128
- /**
129
- * @license
130
- * Copyright 2019 Google LLC
131
- *
132
- * Licensed under the Apache License, Version 2.0 (the "License");
133
- * you may not use this file except in compliance with the License.
134
- * You may obtain a copy of the License at
135
- *
136
- * http://www.apache.org/licenses/LICENSE-2.0
137
- *
138
- * Unless required by applicable law or agreed to in writing, software
139
- * distributed under the License is distributed on an "AS IS" BASIS,
140
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
141
- * See the License for the specific language governing permissions and
142
- * limitations under the License.
143
- */const Pl="[DEFAULT]";
144
- /**
145
- * @license
146
- * Copyright 2019 Google LLC
147
- *
148
- * Licensed under the Apache License, Version 2.0 (the "License");
149
- * you may not use this file except in compliance with the License.
150
- * You may obtain a copy of the License at
151
- *
152
- * http://www.apache.org/licenses/LICENSE-2.0
153
- *
154
- * Unless required by applicable law or agreed to in writing, software
155
- * distributed under the License is distributed on an "AS IS" BASIS,
156
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
157
- * See the License for the specific language governing permissions and
158
- * limitations under the License.
159
- */class Ol{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new gl;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r)return null;throw e}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}
160
- /**
161
- * @license
162
- * Copyright 2019 Google LLC
163
- *
164
- * Licensed under the Apache License, Version 2.0 (the "License");
165
- * you may not use this file except in compliance with the License.
166
- * You may obtain a copy of the License at
167
- *
168
- * http://www.apache.org/licenses/LICENSE-2.0
169
- *
170
- * Unless required by applicable law or agreed to in writing, software
171
- * distributed under the License is distributed on an "AS IS" BASIS,
172
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
173
- * See the License for the specific language governing permissions and
174
- * limitations under the License.
175
- */(e))try{this.getOrInitializeService({instanceIdentifier:Pl})}catch(e){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e=Pl){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>"_delete"in e).map(e=>e._delete())])}isComponentSet(){return null!=this.component}isInitialized(e=Pl){return this.instances.has(e)}getOptions(e=Pl){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[e,t]of this.instancesDeferred.entries())n===this.normalizeInstanceIdentifier(e)&&t.resolve(r);return r}onInit(e,t){var n;const r=this.normalizeInstanceIdentifier(t),o=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;o.add(e),this.onInitCallbacks.set(r,o);const i=this.instances.get(r);return i&&e(i,r),()=>{o.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const r of n)try{r(e,t)}catch(e){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(r=e,r===Pl?void 0:r),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch(e){}var r;return n||null}normalizeInstanceIdentifier(e=Pl){return this.component?this.component.multipleInstances?e:Pl:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class Al{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new Ol(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}
176
- /**
177
- * @license
178
- * Copyright 2017 Google LLC
179
- *
180
- * Licensed under the Apache License, Version 2.0 (the "License");
181
- * you may not use this file except in compliance with the License.
182
- * You may obtain a copy of the License at
183
- *
184
- * http://www.apache.org/licenses/LICENSE-2.0
185
- *
186
- * Unless required by applicable law or agreed to in writing, software
187
- * distributed under the License is distributed on an "AS IS" BASIS,
188
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
- * See the License for the specific language governing permissions and
190
- * limitations under the License.
191
- */var kl;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(kl||(kl={}));const Ll={debug:kl.DEBUG,verbose:kl.VERBOSE,info:kl.INFO,warn:kl.WARN,error:kl.ERROR,silent:kl.SILENT},Il=kl.INFO,Ml={[kl.DEBUG]:"log",[kl.VERBOSE]:"log",[kl.INFO]:"info",[kl.WARN]:"warn",[kl.ERROR]:"error"},jl=(e,t,...n)=>{if(!(t<e.logLevel||((new Date).toISOString(),Ml[t])))throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class Rl{constructor(e){this.name=e,this._logLevel=Il,this._logHandler=jl,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in kl))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?Ll[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,kl.DEBUG,...e),this._logHandler(this,kl.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,kl.VERBOSE,...e),this._logHandler(this,kl.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,kl.INFO,...e),this._logHandler(this,kl.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,kl.WARN,...e),this._logHandler(this,kl.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,kl.ERROR,...e),this._logHandler(this,kl.ERROR,...e)}}let Fl,Dl;const zl=new WeakMap,Nl=new WeakMap,Bl=new WeakMap,Ul=new WeakMap,Wl=new WeakMap;let $l={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return Nl.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Bl.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Vl(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Hl(e){return"function"==typeof e?(t=e)!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(Dl||(Dl=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(ql(this),e),Vl(zl.get(this))}:function(...e){return Vl(t.apply(ql(this),e))}:function(e,...n){const r=t.call(ql(this),e,...n);return Bl.set(r,e.sort?e.sort():[e]),Vl(r)}:(e instanceof IDBTransaction&&function(e){if(Nl.has(e))return;const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",i),e.removeEventListener("abort",i)},o=()=>{t(),r()},i=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",i),e.addEventListener("abort",i)});Nl.set(e,t)}(e),n=e,(Fl||(Fl=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(e=>n instanceof e)?new Proxy(e,$l):e);var t,n}function Vl(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",i)},o=()=>{t(Vl(e.result)),r()},i=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",i)});return t.then(t=>{t instanceof IDBCursor&&zl.set(t,e)}).catch(()=>{}),Wl.set(t,e),t}(e);if(Ul.has(e))return Ul.get(e);const t=Hl(e);return t!==e&&(Ul.set(e,t),Wl.set(t,e)),t}const ql=e=>Wl.get(e);function Gl(e,t,{blocked:n,upgrade:r,blocking:o,terminated:i}={}){const a=indexedDB.open(e,t),s=Vl(a);return r&&a.addEventListener("upgradeneeded",e=>{r(Vl(a.result),e.oldVersion,e.newVersion,Vl(a.transaction),e)}),n&&a.addEventListener("blocked",e=>n(e.oldVersion,e.newVersion,e)),s.then(e=>{i&&e.addEventListener("close",()=>i()),o&&e.addEventListener("versionchange",e=>o(e.oldVersion,e.newVersion,e))}).catch(()=>{}),s}const Jl=["get","getKey","getAll","getAllKeys","count"],Yl=["put","add","delete","clear"],Xl=new Map;function Zl(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Xl.get(t))return Xl.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=Yl.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!Jl.includes(n))return;const i=async function(e,...t){const i=this.transaction(e,o?"readwrite":"readonly");let a=i.store;return r&&(a=a.index(t.shift())),(await Promise.all([a[n](...t),o&&i.done]))[0]};return Xl.set(t,i),i}var Kl;Kl=$l,$l={...Kl,get:(e,t,n)=>Zl(e,t)||Kl.get(e,t,n),has:(e,t)=>!!Zl(e,t)||Kl.has(e,t)};
192
- /**
193
- * @license
194
- * Copyright 2019 Google LLC
195
- *
196
- * Licensed under the Apache License, Version 2.0 (the "License");
197
- * you may not use this file except in compliance with the License.
198
- * You may obtain a copy of the License at
199
- *
200
- * http://www.apache.org/licenses/LICENSE-2.0
201
- *
202
- * Unless required by applicable law or agreed to in writing, software
203
- * distributed under the License is distributed on an "AS IS" BASIS,
204
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205
- * See the License for the specific language governing permissions and
206
- * limitations under the License.
207
- */
208
- class Ql{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null}).filter(e=>e).join(" ")}}const ec="@firebase/app",tc="0.10.13",nc=new Rl("@firebase/app"),rc="@firebase/app-compat",oc="@firebase/analytics-compat",ic="@firebase/analytics",ac="@firebase/app-check-compat",sc="@firebase/app-check",lc="@firebase/auth",cc="@firebase/auth-compat",uc="@firebase/database",hc="@firebase/data-connect",pc="@firebase/database-compat",fc="@firebase/functions",dc="@firebase/functions-compat",mc="@firebase/installations",gc="@firebase/installations-compat",yc="@firebase/messaging",vc="@firebase/messaging-compat",wc="@firebase/performance",bc="@firebase/performance-compat",_c="@firebase/remote-config",xc="@firebase/remote-config-compat",Ec="@firebase/storage",Tc="@firebase/storage-compat",Sc="@firebase/firestore",Cc="@firebase/vertexai-preview",Pc="@firebase/firestore-compat",Oc="firebase",Ac="[DEFAULT]",kc={[ec]:"fire-core",[rc]:"fire-core-compat",[ic]:"fire-analytics",[oc]:"fire-analytics-compat",[sc]:"fire-app-check",[ac]:"fire-app-check-compat",[lc]:"fire-auth",[cc]:"fire-auth-compat",[uc]:"fire-rtdb",[hc]:"fire-data-connect",[pc]:"fire-rtdb-compat",[fc]:"fire-fn",[dc]:"fire-fn-compat",[mc]:"fire-iid",[gc]:"fire-iid-compat",[yc]:"fire-fcm",[vc]:"fire-fcm-compat",[wc]:"fire-perf",[bc]:"fire-perf-compat",[_c]:"fire-rc",[xc]:"fire-rc-compat",[Ec]:"fire-gcs",[Tc]:"fire-gcs-compat",[Sc]:"fire-fst",[Pc]:"fire-fst-compat",[Cc]:"fire-vertex","fire-js":"fire-js",[Oc]:"fire-js-all"},Lc=new Map,Ic=new Map,Mc=new Map;function jc(e,t){try{e.container.addComponent(t)}catch(n){nc.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function Rc(e){const t=e.name;if(Mc.has(t))return nc.debug(`There were multiple attempts to register component ${t}.`),!1;Mc.set(t,e);for(const t of Lc.values())jc(t,e);for(const t of Ic.values())jc(t,e);return!0}function Fc(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}
209
- /**
210
- * @license
211
- * Copyright 2019 Google LLC
212
- *
213
- * Licensed under the Apache License, Version 2.0 (the "License");
214
- * you may not use this file except in compliance with the License.
215
- * You may obtain a copy of the License at
216
- *
217
- * http://www.apache.org/licenses/LICENSE-2.0
218
- *
219
- * Unless required by applicable law or agreed to in writing, software
220
- * distributed under the License is distributed on an "AS IS" BASIS,
221
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
222
- * See the License for the specific language governing permissions and
223
- * limitations under the License.
224
- */const Dc=new bl("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});
225
- /**
226
- * @license
227
- * Copyright 2019 Google LLC
228
- *
229
- * Licensed under the Apache License, Version 2.0 (the "License");
230
- * you may not use this file except in compliance with the License.
231
- * You may obtain a copy of the License at
232
- *
233
- * http://www.apache.org/licenses/LICENSE-2.0
234
- *
235
- * Unless required by applicable law or agreed to in writing, software
236
- * distributed under the License is distributed on an "AS IS" BASIS,
237
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
238
- * See the License for the specific language governing permissions and
239
- * limitations under the License.
240
- */
241
- class zc{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new Cl("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Dc.create("app-deleted",{appName:this._name})}}function Nc(e,t={}){let n=e;"object"!=typeof t&&(t={name:t});const r=Object.assign({name:Ac,automaticDataCollectionEnabled:!1},t),o=r.name;if("string"!=typeof o||!o)throw Dc.create("bad-app-name",{appName:String(o)});if(n||(n=ml()),!n)throw Dc.create("no-options");const i=Lc.get(o);if(i){if(xl(n,i.options)&&xl(r,i.config))return i;throw Dc.create("duplicate-app",{appName:o})}const a=new Al(o);for(const e of Mc.values())a.addComponent(e);const s=new zc(n,r,a);return Lc.set(o,s),s}function Bc(e,t,n){var r;let o=null!==(r=kc[e])&&void 0!==r?r:e;n&&(o+=`-${n}`);const i=o.match(/\s|\//),a=t.match(/\s|\//);if(i||a){const e=[`Unable to register library "${o}" with version "${t}":`];return i&&e.push(`library name "${o}" contains illegal characters (whitespace or "/")`),i&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void nc.warn(e.join(" "))}Rc(new Cl(`${o}-version`,()=>({library:o,version:t}),"VERSION"))}
242
- /**
243
- * @license
244
- * Copyright 2021 Google LLC
245
- *
246
- * Licensed under the Apache License, Version 2.0 (the "License");
247
- * you may not use this file except in compliance with the License.
248
- * You may obtain a copy of the License at
249
- *
250
- * http://www.apache.org/licenses/LICENSE-2.0
251
- *
252
- * Unless required by applicable law or agreed to in writing, software
253
- * distributed under the License is distributed on an "AS IS" BASIS,
254
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
255
- * See the License for the specific language governing permissions and
256
- * limitations under the License.
257
- */const Uc="firebase-heartbeat-store";let Wc=null;function $c(){return Wc||(Wc=Gl("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(Uc)}catch(e){}}}).catch(e=>{throw Dc.create("idb-open",{originalErrorMessage:e.message})})),Wc}async function Hc(e,t){try{const n=(await $c()).transaction(Uc,"readwrite"),r=n.objectStore(Uc);await r.put(t,Vc(e)),await n.done}catch(e){if(e instanceof wl)nc.warn(e.message);else{const t=Dc.create("idb-set",{originalErrorMessage:null==e?void 0:e.message});nc.warn(t.message)}}}function Vc(e){return`${e.name}!${e.options.appId}`}
258
- /**
259
- * @license
260
- * Copyright 2021 Google LLC
261
- *
262
- * Licensed under the Apache License, Version 2.0 (the "License");
263
- * you may not use this file except in compliance with the License.
264
- * You may obtain a copy of the License at
265
- *
266
- * http://www.apache.org/licenses/LICENSE-2.0
267
- *
268
- * Unless required by applicable law or agreed to in writing, software
269
- * distributed under the License is distributed on an "AS IS" BASIS,
270
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
271
- * See the License for the specific language governing permissions and
272
- * limitations under the License.
273
- */class qc{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new Jc(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){var e,t;try{const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=Gc();if(null==(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)&&(this._heartbeatsCache=await this._heartbeatsCachePromise,null==(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats)))return;if(this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(e=>e.date===r))return;return this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6}),this._storage.overwrite(this._heartbeatsCache)}catch(e){nc.warn(e)}}async getHeartbeatsHeader(){var e;try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null==(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)||0===this._heartbeatsCache.heartbeats.length)return"";const t=Gc(),{heartbeatsToSend:n,unsentEntries:r}=function(e,t=1024){const n=[];let r=e.slice();for(const o of e){const e=n.find(e=>e.agent===o.agent);if(e){if(e.dates.push(o.date),Yc(n)>t){e.dates.pop();break}}else if(n.push({agent:o.agent,dates:[o.date]}),Yc(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),o=fl(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),o}catch(e){return nc.warn(e),""}}}function Gc(){return(new Date).toISOString().substring(0,10)}class Jc{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!yl()&&vl().then(()=>!0).catch(()=>!1)}async read(){if(await this._canUseIndexedDBPromise){const e=await async function(e){try{const t=(await $c()).transaction(Uc),n=await t.objectStore(Uc).get(Vc(e));return await t.done,n}catch(e){if(e instanceof wl)nc.warn(e.message);else{const t=Dc.create("idb-get",{originalErrorMessage:null==e?void 0:e.message});nc.warn(t.message)}}}(this.app);return(null==e?void 0:e.heartbeats)?e:{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return Hc(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return Hc(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function Yc(e){return fl(JSON.stringify({version:2,heartbeats:e})).length}
274
- /**
275
- * @license
276
- * Copyright 2019 Google LLC
277
- *
278
- * Licensed under the Apache License, Version 2.0 (the "License");
279
- * you may not use this file except in compliance with the License.
280
- * You may obtain a copy of the License at
281
- *
282
- * http://www.apache.org/licenses/LICENSE-2.0
283
- *
284
- * Unless required by applicable law or agreed to in writing, software
285
- * distributed under the License is distributed on an "AS IS" BASIS,
286
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
287
- * See the License for the specific language governing permissions and
288
- * limitations under the License.
289
- */Rc(new Cl("platform-logger",e=>new Ql(e),"PRIVATE")),Rc(new Cl("heartbeat",e=>new qc(e),"PRIVATE")),Bc(ec,tc,""),Bc(ec,tc,"esm2017"),Bc("fire-js",""),
290
- /**
291
- * @license
292
- * Copyright 2020 Google LLC
293
- *
294
- * Licensed under the Apache License, Version 2.0 (the "License");
295
- * you may not use this file except in compliance with the License.
296
- * You may obtain a copy of the License at
297
- *
298
- * http://www.apache.org/licenses/LICENSE-2.0
299
- *
300
- * Unless required by applicable law or agreed to in writing, software
301
- * distributed under the License is distributed on an "AS IS" BASIS,
302
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
303
- * See the License for the specific language governing permissions and
304
- * limitations under the License.
305
- */
306
- Bc("firebase","10.14.1","app");const Xc="@firebase/installations",Zc="0.6.9",Kc=`w:${Zc}`,Qc="FIS_v2",eu=new bl("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function tu(e){return e instanceof wl&&e.code.includes("request-failed")}
307
- /**
308
- * @license
309
- * Copyright 2019 Google LLC
310
- *
311
- * Licensed under the Apache License, Version 2.0 (the "License");
312
- * you may not use this file except in compliance with the License.
313
- * You may obtain a copy of the License at
314
- *
315
- * http://www.apache.org/licenses/LICENSE-2.0
316
- *
317
- * Unless required by applicable law or agreed to in writing, software
318
- * distributed under the License is distributed on an "AS IS" BASIS,
319
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
320
- * See the License for the specific language governing permissions and
321
- * limitations under the License.
322
- */function nu({projectId:e}){return`https://firebaseinstallations.googleapis.com/v1/projects/${e}/installations`}function ru(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}async function ou(e,t){const n=(await t.json()).error;return eu.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function iu({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}async function au(e){const t=await e();return t.status>=500&&t.status<600?e():t}
323
- /**
324
- * @license
325
- * Copyright 2019 Google LLC
326
- *
327
- * Licensed under the Apache License, Version 2.0 (the "License");
328
- * you may not use this file except in compliance with the License.
329
- * You may obtain a copy of the License at
330
- *
331
- * http://www.apache.org/licenses/LICENSE-2.0
332
- *
333
- * Unless required by applicable law or agreed to in writing, software
334
- * distributed under the License is distributed on an "AS IS" BASIS,
335
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
336
- * See the License for the specific language governing permissions and
337
- * limitations under the License.
338
- */
339
- function su(e){return new Promise(t=>{setTimeout(t,e)})}
340
- /**
341
- * @license
342
- * Copyright 2019 Google LLC
343
- *
344
- * Licensed under the Apache License, Version 2.0 (the "License");
345
- * you may not use this file except in compliance with the License.
346
- * You may obtain a copy of the License at
347
- *
348
- * http://www.apache.org/licenses/LICENSE-2.0
349
- *
350
- * Unless required by applicable law or agreed to in writing, software
351
- * distributed under the License is distributed on an "AS IS" BASIS,
352
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
353
- * See the License for the specific language governing permissions and
354
- * limitations under the License.
355
- */
356
- /**
357
- * @license
358
- * Copyright 2019 Google LLC
359
- *
360
- * Licensed under the Apache License, Version 2.0 (the "License");
361
- * you may not use this file except in compliance with the License.
362
- * You may obtain a copy of the License at
363
- *
364
- * http://www.apache.org/licenses/LICENSE-2.0
365
- *
366
- * Unless required by applicable law or agreed to in writing, software
367
- * distributed under the License is distributed on an "AS IS" BASIS,
368
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
369
- * See the License for the specific language governing permissions and
370
- * limitations under the License.
371
- */
372
- const lu=/^[cdef][\w-]{21}$/;function cu(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const t=function(e){var t;return(t=e,btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22)}
373
- /**
374
- * @license
375
- * Copyright 2019 Google LLC
376
- *
377
- * Licensed under the Apache License, Version 2.0 (the "License");
378
- * you may not use this file except in compliance with the License.
379
- * You may obtain a copy of the License at
380
- *
381
- * http://www.apache.org/licenses/LICENSE-2.0
382
- *
383
- * Unless required by applicable law or agreed to in writing, software
384
- * distributed under the License is distributed on an "AS IS" BASIS,
385
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
386
- * See the License for the specific language governing permissions and
387
- * limitations under the License.
388
- */(e);return lu.test(t)?t:""}catch(e){return""}}function uu(e){return`${e.appName}!${e.appId}`}
389
- /**
390
- * @license
391
- * Copyright 2019 Google LLC
392
- *
393
- * Licensed under the Apache License, Version 2.0 (the "License");
394
- * you may not use this file except in compliance with the License.
395
- * You may obtain a copy of the License at
396
- *
397
- * http://www.apache.org/licenses/LICENSE-2.0
398
- *
399
- * Unless required by applicable law or agreed to in writing, software
400
- * distributed under the License is distributed on an "AS IS" BASIS,
401
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
402
- * See the License for the specific language governing permissions and
403
- * limitations under the License.
404
- */const hu=new Map;function pu(e,t){const n=uu(e);fu(n,t),function(e,t){const n=(!du&&"BroadcastChannel"in self&&(du=new BroadcastChannel("[Firebase] FID Change"),du.onmessage=e=>{fu(e.data.key,e.data.fid)}),du);n&&n.postMessage({key:e,fid:t}),0===hu.size&&du&&(du.close(),du=null)}(n,t)}function fu(e,t){const n=hu.get(e);if(n)for(const e of n)e(t)}let du=null;
405
- /**
406
- * @license
407
- * Copyright 2019 Google LLC
408
- *
409
- * Licensed under the Apache License, Version 2.0 (the "License");
410
- * you may not use this file except in compliance with the License.
411
- * You may obtain a copy of the License at
412
- *
413
- * http://www.apache.org/licenses/LICENSE-2.0
414
- *
415
- * Unless required by applicable law or agreed to in writing, software
416
- * distributed under the License is distributed on an "AS IS" BASIS,
417
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
418
- * See the License for the specific language governing permissions and
419
- * limitations under the License.
420
- */
421
- const mu="firebase-installations-store";let gu=null;function yu(){return gu||(gu=Gl("firebase-installations-database",1,{upgrade:(e,t)=>{0===t&&e.createObjectStore(mu)}})),gu}async function vu(e,t){const n=uu(e),r=(await yu()).transaction(mu,"readwrite"),o=r.objectStore(mu),i=await o.get(n);return await o.put(t,n),await r.done,i&&i.fid===t.fid||pu(e,t.fid),t}async function wu(e){const t=uu(e),n=(await yu()).transaction(mu,"readwrite");await n.objectStore(mu).delete(t),await n.done}async function bu(e,t){const n=uu(e),r=(await yu()).transaction(mu,"readwrite"),o=r.objectStore(mu),i=await o.get(n),a=t(i);return void 0===a?await o.delete(n):await o.put(a,n),await r.done,!a||i&&i.fid===a.fid||pu(e,a.fid),a}
422
- /**
423
- * @license
424
- * Copyright 2019 Google LLC
425
- *
426
- * Licensed under the Apache License, Version 2.0 (the "License");
427
- * you may not use this file except in compliance with the License.
428
- * You may obtain a copy of the License at
429
- *
430
- * http://www.apache.org/licenses/LICENSE-2.0
431
- *
432
- * Unless required by applicable law or agreed to in writing, software
433
- * distributed under the License is distributed on an "AS IS" BASIS,
434
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
435
- * See the License for the specific language governing permissions and
436
- * limitations under the License.
437
- */async function _u(e){let t;const n=await bu(e.appConfig,n=>{const r=function(e){return Tu(e||{fid:cu(),registrationStatus:0})}(n),o=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine)return{installationEntry:t,registrationPromise:Promise.reject(eu.create("app-offline"))};const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=async function(e,t){try{const n=
438
- /**
439
- * @license
440
- * Copyright 2019 Google LLC
441
- *
442
- * Licensed under the Apache License, Version 2.0 (the "License");
443
- * you may not use this file except in compliance with the License.
444
- * You may obtain a copy of the License at
445
- *
446
- * http://www.apache.org/licenses/LICENSE-2.0
447
- *
448
- * Unless required by applicable law or agreed to in writing, software
449
- * distributed under the License is distributed on an "AS IS" BASIS,
450
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
451
- * See the License for the specific language governing permissions and
452
- * limitations under the License.
453
- */await async function({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const r=nu(e),o=iu(e),i=t.getImmediate({optional:!0});if(i){const e=await i.getHeartbeatsHeader();e&&o.append("x-firebase-client",e)}const a={fid:n,authVersion:Qc,appId:e.appId,sdkVersion:Kc},s={method:"POST",headers:o,body:JSON.stringify(a)},l=await au(()=>fetch(r,s));if(l.ok){const e=await l.json();return{fid:e.fid||n,registrationStatus:2,refreshToken:e.refreshToken,authToken:ru(e.authToken)}}throw await ou("Create Installation",l)}(e,t);return vu(e.appConfig,n)}catch(n){throw tu(n)&&409===n.customData.serverCode?await wu(e.appConfig):await vu(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:xu(e)}:{installationEntry:t}}(e,r);return t=o.registrationPromise,o.installationEntry});return""===n.fid?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}async function xu(e){let t=await Eu(e.appConfig);for(;1===t.registrationStatus;)await su(100),t=await Eu(e.appConfig);if(0===t.registrationStatus){const{installationEntry:t,registrationPromise:n}=await _u(e);return n||t}return t}function Eu(e){return bu(e,e=>{if(!e)throw eu.create("installation-not-found");return Tu(e)})}function Tu(e){return 1===(t=e).registrationStatus&&t.registrationTime+1e4<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t;
454
- /**
455
- * @license
456
- * Copyright 2019 Google LLC
457
- *
458
- * Licensed under the Apache License, Version 2.0 (the "License");
459
- * you may not use this file except in compliance with the License.
460
- * You may obtain a copy of the License at
461
- *
462
- * http://www.apache.org/licenses/LICENSE-2.0
463
- *
464
- * Unless required by applicable law or agreed to in writing, software
465
- * distributed under the License is distributed on an "AS IS" BASIS,
466
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
467
- * See the License for the specific language governing permissions and
468
- * limitations under the License.
469
- */}async function Su({appConfig:e,heartbeatServiceProvider:t},n){const r=function(e,{fid:t}){return`${nu(e)}/${t}/authTokens:generate`}
470
- /**
471
- * @license
472
- * Copyright 2019 Google LLC
473
- *
474
- * Licensed under the Apache License, Version 2.0 (the "License");
475
- * you may not use this file except in compliance with the License.
476
- * You may obtain a copy of the License at
477
- *
478
- * http://www.apache.org/licenses/LICENSE-2.0
479
- *
480
- * Unless required by applicable law or agreed to in writing, software
481
- * distributed under the License is distributed on an "AS IS" BASIS,
482
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
483
- * See the License for the specific language governing permissions and
484
- * limitations under the License.
485
- */(e,n),o=function(e,{refreshToken:t}){const n=iu(e);return n.append("Authorization",function(e){return`${Qc} ${e}`}(t)),n}(e,n),i=t.getImmediate({optional:!0});if(i){const e=await i.getHeartbeatsHeader();e&&o.append("x-firebase-client",e)}const a={installation:{sdkVersion:Kc,appId:e.appId}},s={method:"POST",headers:o,body:JSON.stringify(a)},l=await au(()=>fetch(r,s));if(l.ok)return ru(await l.json());throw await ou("Generate Auth Token",l)}async function Cu(e,t=!1){let n;const r=await bu(e.appConfig,r=>{if(!Ou(r))throw eu.create("not-registered");const o=r.authToken;if(!t&&(2===(i=o).requestStatus&&!function(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+36e5}(i)))return r;var i;if(1===o.requestStatus)return n=async function(e,t){let n=await Pu(e.appConfig);for(;1===n.authToken.requestStatus;)await su(100),n=await Pu(e.appConfig);const r=n.authToken;return 0===r.requestStatus?Cu(e,t):r}(e,t),r;{if(!navigator.onLine)throw eu.create("app-offline");const t=function(e){const t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}(r);return n=async function(e,t){try{const n=await Su(e,t),r=Object.assign(Object.assign({},t),{authToken:n});return await vu(e.appConfig,r),n}catch(n){if(!tu(n)||401!==n.customData.serverCode&&404!==n.customData.serverCode){const n=Object.assign(Object.assign({},t),{authToken:{requestStatus:0}});await vu(e.appConfig,n)}else await wu(e.appConfig);throw n}}(e,t),t}});return n?await n:r.authToken}function Pu(e){return bu(e,e=>{if(!Ou(e))throw eu.create("not-registered");return 1===(t=e.authToken).requestStatus&&t.requestTime+1e4<Date.now()?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e;var t;
486
- /**
487
- * @license
488
- * Copyright 2019 Google LLC
489
- *
490
- * Licensed under the Apache License, Version 2.0 (the "License");
491
- * you may not use this file except in compliance with the License.
492
- * You may obtain a copy of the License at
493
- *
494
- * http://www.apache.org/licenses/LICENSE-2.0
495
- *
496
- * Unless required by applicable law or agreed to in writing, software
497
- * distributed under the License is distributed on an "AS IS" BASIS,
498
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
499
- * See the License for the specific language governing permissions and
500
- * limitations under the License.
501
- */})}function Ou(e){return void 0!==e&&2===e.registrationStatus}function Au(e){return eu.create("missing-app-config-values",{valueName:e})}
502
- /**
503
- * @license
504
- * Copyright 2020 Google LLC
505
- *
506
- * Licensed under the Apache License, Version 2.0 (the "License");
507
- * you may not use this file except in compliance with the License.
508
- * You may obtain a copy of the License at
509
- *
510
- * http://www.apache.org/licenses/LICENSE-2.0
511
- *
512
- * Unless required by applicable law or agreed to in writing, software
513
- * distributed under the License is distributed on an "AS IS" BASIS,
514
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
515
- * See the License for the specific language governing permissions and
516
- * limitations under the License.
517
- */const ku="installations";Rc(new Cl(ku,e=>{const t=e.getProvider("app").getImmediate(),n=
518
- /**
519
- * @license
520
- * Copyright 2019 Google LLC
521
- *
522
- * Licensed under the Apache License, Version 2.0 (the "License");
523
- * you may not use this file except in compliance with the License.
524
- * You may obtain a copy of the License at
525
- *
526
- * http://www.apache.org/licenses/LICENSE-2.0
527
- *
528
- * Unless required by applicable law or agreed to in writing, software
529
- * distributed under the License is distributed on an "AS IS" BASIS,
530
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
531
- * See the License for the specific language governing permissions and
532
- * limitations under the License.
533
- */
534
- function(e){if(!e||!e.options)throw Au("App Configuration");if(!e.name)throw Au("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw Au(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:Fc(t,"heartbeat"),_delete:()=>Promise.resolve()}},"PUBLIC")),Rc(new Cl("installations-internal",e=>{const t=Fc(e.getProvider("app").getImmediate(),ku).getImmediate();return{getId:()=>async function(e){const t=e,{installationEntry:n,registrationPromise:r}=await _u(t);return r?r.catch(console.error):Cu(t).catch(console.error),n.fid}
535
- /**
536
- * @license
537
- * Copyright 2019 Google LLC
538
- *
539
- * Licensed under the Apache License, Version 2.0 (the "License");
540
- * you may not use this file except in compliance with the License.
541
- * You may obtain a copy of the License at
542
- *
543
- * http://www.apache.org/licenses/LICENSE-2.0
544
- *
545
- * Unless required by applicable law or agreed to in writing, software
546
- * distributed under the License is distributed on an "AS IS" BASIS,
547
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
548
- * See the License for the specific language governing permissions and
549
- * limitations under the License.
550
- */(t),getToken:e=>async function(e,t=!1){const n=e;return await async function(e){const{registrationPromise:t}=await _u(e);t&&await t}(n),(await Cu(n,t)).token}(t,e)}},"PRIVATE")),Bc(Xc,Zc),Bc(Xc,Zc,"esm2017");
551
- /**
552
- * @license
553
- * Copyright 2019 Google LLC
554
- *
555
- * Licensed under the Apache License, Version 2.0 (the "License");
556
- * you may not use this file except in compliance with the License.
557
- * You may obtain a copy of the License at
558
- *
559
- * http://www.apache.org/licenses/LICENSE-2.0
560
- *
561
- * Unless required by applicable law or agreed to in writing, software
562
- * distributed under the License is distributed on an "AS IS" BASIS,
563
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
564
- * See the License for the specific language governing permissions and
565
- * limitations under the License.
566
- */
567
- const Lu="analytics",Iu="https://www.googletagmanager.com/gtag/js",Mu=new Rl("@firebase/analytics"),ju=new bl("analytics","Analytics",{"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."});
568
- /**
569
- * @license
570
- * Copyright 2019 Google LLC
571
- *
572
- * Licensed under the Apache License, Version 2.0 (the "License");
573
- * you may not use this file except in compliance with the License.
574
- * You may obtain a copy of the License at
575
- *
576
- * http://www.apache.org/licenses/LICENSE-2.0
577
- *
578
- * Unless required by applicable law or agreed to in writing, software
579
- * distributed under the License is distributed on an "AS IS" BASIS,
580
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
581
- * See the License for the specific language governing permissions and
582
- * limitations under the License.
583
- */
584
- function Ru(e){if(!e.startsWith(Iu)){const t=ju.create("invalid-gtag-resource",{gtagURL:e});return Mu.warn(t.message),""}return e}function Fu(e){return Promise.all(e.map(e=>e.catch(e=>e)))}const Du=new class{constructor(e={},t=1e3){this.throttleMetadata=e,this.intervalMillis=t}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,t){this.throttleMetadata[e]=t}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}};function zu(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}async function Nu(e,t=Du,n){const{appId:r,apiKey:o,measurementId:i}=e.options;if(!r)throw ju.create("no-app-id");if(!o){if(i)return{measurementId:i,appId:r};throw ju.create("no-api-key")}const a=t.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},s=new Uu;return setTimeout(async()=>{s.abort()},void 0!==n?n:6e4),Bu({appId:r,apiKey:o,measurementId:i},a,s,t)}async function Bu(e,{throttleEndTimeMillis:t,backoffCount:n},r,o=Du){var i;const{appId:a,measurementId:s}=e;try{await function(e,t){return new Promise((n,r)=>{const o=Math.max(t-Date.now(),0),i=setTimeout(n,o);e.addEventListener(()=>{clearTimeout(i),r(ju.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}(r,t)}catch(e){if(s)return Mu.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${s} provided in the "measurementId" field in the local Firebase config. [${null==e?void 0:e.message}]`),{appId:a,measurementId:s};throw e}try{const t=await async function(e){var t;const{appId:n,apiKey:r}=e,o={method:"GET",headers:zu(r)},i="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",n),a=await fetch(i,o);if(200!==a.status&&304!==a.status){let e="";try{const n=await a.json();(null===(t=n.error)||void 0===t?void 0:t.message)&&(e=n.error.message)}catch(e){}throw ju.create("config-fetch-failed",{httpStatus:a.status,responseMessage:e})}return a.json()}(e);return o.deleteThrottleMetadata(a),t}catch(t){const l=t;if(!function(e){if(!(e instanceof wl&&e.customData))return!1;const t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(l)){if(o.deleteThrottleMetadata(a),s)return Mu.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${s} provided in the "measurementId" field in the local Firebase config. [${null==l?void 0:l.message}]`),{appId:a,measurementId:s};throw t}const c=503===Number(null===(i=null==l?void 0:l.customData)||void 0===i?void 0:i.httpStatus)?Tl(n,o.intervalMillis,30):Tl(n,o.intervalMillis),u={throttleEndTimeMillis:Date.now()+c,backoffCount:n+1};return o.setThrottleMetadata(a,u),Mu.debug(`Calling attemptFetch again in ${c} millis`),Bu(e,u,r,o)}}class Uu{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function Wu(e,t,n,r,o,i,a){var s;const l=Nu(e);l.then(t=>{n[t.measurementId]=t.appId,e.options.measurementId&&t.measurementId!==e.options.measurementId&&Mu.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${t.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(e=>Mu.error(e)),t.push(l);const c=
585
- /**
586
- * @license
587
- * Copyright 2020 Google LLC
588
- *
589
- * Licensed under the Apache License, Version 2.0 (the "License");
590
- * you may not use this file except in compliance with the License.
591
- * You may obtain a copy of the License at
592
- *
593
- * http://www.apache.org/licenses/LICENSE-2.0
594
- *
595
- * Unless required by applicable law or agreed to in writing, software
596
- * distributed under the License is distributed on an "AS IS" BASIS,
597
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
598
- * See the License for the specific language governing permissions and
599
- * limitations under the License.
600
- */
601
- async function(){if(!yl())return Mu.warn(ju.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await vl()}catch(e){return Mu.warn(ju.create("indexeddb-unavailable",{errorInfo:null==e?void 0:e.toString()}).message),!1}return!0}().then(e=>e?r.getId():void 0),[u,h]=await Promise.all([l,c]);(function(e){const t=window.document.getElementsByTagName("script");for(const n of Object.values(t))if(n.src&&n.src.includes(Iu)&&n.src.includes(e))return n;return null}
602
- /**
603
- * @license
604
- * Copyright 2020 Google LLC
605
- *
606
- * Licensed under the Apache License, Version 2.0 (the "License");
607
- * you may not use this file except in compliance with the License.
608
- * You may obtain a copy of the License at
609
- *
610
- * http://www.apache.org/licenses/LICENSE-2.0
611
- *
612
- * Unless required by applicable law or agreed to in writing, software
613
- * distributed under the License is distributed on an "AS IS" BASIS,
614
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
615
- * See the License for the specific language governing permissions and
616
- * limitations under the License.
617
- */)(i)||function(e,t){const n=function(e,t){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy("firebase-js-sdk-policy",t)),n}(0,{createScriptURL:Ru}),r=document.createElement("script"),o=`${Iu}?l=${e}&id=${t}`;r.src=n?null==n?void 0:n.createScriptURL(o):o,r.async=!0,document.head.appendChild(r)}(i,u.measurementId),o("js",new Date);const p=null!==(s=null==a?void 0:a.config)&&void 0!==s?s:{};return p.origin="firebase",p.update=!0,null!=h&&(p.firebase_id=h),o("config",u.measurementId,p),u.measurementId}
618
- /**
619
- * @license
620
- * Copyright 2019 Google LLC
621
- *
622
- * Licensed under the Apache License, Version 2.0 (the "License");
623
- * you may not use this file except in compliance with the License.
624
- * You may obtain a copy of the License at
625
- *
626
- * http://www.apache.org/licenses/LICENSE-2.0
627
- *
628
- * Unless required by applicable law or agreed to in writing, software
629
- * distributed under the License is distributed on an "AS IS" BASIS,
630
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
631
- * See the License for the specific language governing permissions and
632
- * limitations under the License.
633
- */class $u{constructor(e){this.app=e}_delete(){return delete Hu[this.app.options.appId],Promise.resolve()}}let Hu={},Vu=[];const qu={};let Gu,Ju,Yu="dataLayer",Xu=!1;function Zu(e,t,n){!function(){const e=[];if(function(){const e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}()&&e.push("This is a browser extension environment."),"undefined"!=typeof navigator&&navigator.cookieEnabled||e.push("Cookies are not available."),e.length>0){const t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),n=ju.create("invalid-analytics-context",{errorInfo:t});Mu.warn(n.message)}}();const r=e.options.appId;if(!r)throw ju.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw ju.create("no-api-key");Mu.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`)}if(null!=Hu[r])throw ju.create("already-exists",{id:r});if(!Xu){!function(e){let t=[];Array.isArray(window[e])?t=window[e]:window[e]=t}(Yu);const{wrappedGtag:e,gtagCore:t}=function(e,t,n,r,o){let i=function(...e){window[r].push(arguments)};return window[o]&&"function"==typeof window[o]&&(i=window[o]),window[o]=function(e,t,n,r){return async function(o,...i){try{if("event"===o){const[r,o]=i;await async function(e,t,n,r,o){try{let i=[];if(o&&o.send_to){let e=o.send_to;Array.isArray(e)||(e=[e]);const r=await Fu(n);for(const n of e){const e=r.find(e=>e.measurementId===n),o=e&&t[e.appId];if(!o){i=[];break}i.push(o)}}0===i.length&&(i=Object.values(t)),await Promise.all(i),e("event",r,o||{})}catch(e){Mu.error(e)}}(e,t,n,r,o)}else if("config"===o){const[o,a]=i;await async function(e,t,n,r,o,i){const a=r[o];try{if(a)await t[a];else{const e=(await Fu(n)).find(e=>e.measurementId===o);e&&await t[e.appId]}}catch(e){Mu.error(e)}e("config",o,i)}(e,t,n,r,o,a)}else if("consent"===o){const[t,n]=i;e("consent",t,n)}else if("get"===o){const[t,n,r]=i;e("get",t,n,r)}else if("set"===o){const[t]=i;e("set",t)}else e(o,...i)}catch(e){Mu.error(e)}}}(i,e,t,n),{gtagCore:i,wrappedGtag:window[o]}}(Hu,Vu,qu,Yu,"gtag");Ju=e,Gu=t,Xu=!0}return Hu[r]=Wu(e,Vu,qu,t,Gu,Yu,n),new $u(e)}function Ku(e,t,n,r){e=Sl(e),async function(e,t,n,r,o){if(o&&o.global)e("event",n,r);else{const o=await t;e("event",n,Object.assign(Object.assign({},r),{send_to:o}))}}(Ju,Hu[e.app.options.appId],t,n,r).catch(e=>Mu.error(e))}const Qu="@firebase/analytics",eh="0.10.8";Rc(new Cl(Lu,(e,{options:t})=>Zu(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t),"PUBLIC")),Rc(new Cl("analytics-internal",function(e){try{const t=e.getProvider(Lu).getImmediate();return{logEvent:(e,n,r)=>Ku(t,e,n,r)}}catch(e){throw ju.create("interop-component-reg-failed",{reason:e})}},"PRIVATE")),Bc(Qu,eh),Bc(Qu,eh,"esm2017");var th={};function nh(e){if(!e)throw new Error("geojson is required");var t=[];return ue(e,function(e){!function(e,t){var n=[],r=e.geometry;if(null!==r){switch(r.type){case"Polygon":n=re(r);break;case"LineString":n=[re(r)]}n.forEach(function(n){var r=function(e,t){var n=[];return e.reduce(function(e,r){var o,i,a,s,l,c,u=G([e,r],t);return u.bbox=(i=r,a=(o=e)[0],s=o[1],[a<(l=i[0])?a:l,s<(c=i[1])?s:c,a>l?a:l,s>c?s:c]),n.push(u),r}),n}(n,e.properties);r.forEach(function(e){e.id=t.length,t.push(e)})})}}(e,t)}),J(t)}
634
- /**
635
- * @license
636
- * Lodash <https://lodash.com/>
637
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
638
- * Released under MIT license <https://lodash.com/license>
639
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
640
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
641
- */
642
- !function(e,t){(function(){var n,r="Expected a function",o="__lodash_hash_undefined__",i="__lodash_placeholder__",a=32,s=128,l=1/0,c=9007199254740991,u=NaN,h=4294967295,p=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",256]],f="[object Arguments]",d="[object Array]",m="[object Boolean]",g="[object Date]",y="[object Error]",v="[object Function]",w="[object GeneratorFunction]",b="[object Map]",_="[object Number]",x="[object Object]",E="[object Promise]",T="[object RegExp]",S="[object Set]",C="[object String]",P="[object Symbol]",O="[object WeakMap]",A="[object ArrayBuffer]",k="[object DataView]",L="[object Float32Array]",I="[object Float64Array]",M="[object Int8Array]",j="[object Int16Array]",R="[object Int32Array]",F="[object Uint8Array]",z="[object Uint8ClampedArray]",N="[object Uint16Array]",B="[object Uint32Array]",U=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,q=RegExp(H.source),G=RegExp(V.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ne=/^\s+/,re=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ie=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,ue=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,de=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,we=/['\n\r\u2028\u2029\\]/g,be="\\ud800-\\udfff",_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xe="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\ufe0e\\ufe0f",Ce="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pe="["+be+"]",Oe="["+Ce+"]",Ae="["+_e+"]",ke="\\d+",Le="["+xe+"]",Ie="["+Ee+"]",Me="[^"+be+Ce+ke+xe+Ee+Te+"]",je="\\ud83c[\\udffb-\\udfff]",Re="[^"+be+"]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",ze="["+Te+"]",Ne="\\u200d",Be="(?:"+Ie+"|"+Me+")",Ue="(?:"+ze+"|"+Me+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",$e="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+Ae+"|"+je+")?",Ve="["+Se+"]?",qe=Ve+He+"(?:"+Ne+"(?:"+[Re,Fe,De].join("|")+")"+Ve+He+")*",Ge="(?:"+[Le,Fe,De].join("|")+")"+qe,Je="(?:"+[Re+Ae+"?",Ae,Fe,De,Pe].join("|")+")",Ye=RegExp("['’]","g"),Xe=RegExp(Ae,"g"),Ze=RegExp(je+"(?="+je+")|"+Je+qe,"g"),Ke=RegExp([ze+"?"+Ie+"+"+We+"(?="+[Oe,ze,"$"].join("|")+")",Ue+"+"+$e+"(?="+[Oe,ze+Be,"$"].join("|")+")",ze+"?"+Be+"+"+We,ze+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ke,Ge].join("|"),"g"),Qe=RegExp("["+Ne+be+_e+Se+"]"),et=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,rt={};rt[L]=rt[I]=rt[M]=rt[j]=rt[R]=rt[F]=rt[z]=rt[N]=rt[B]=!0,rt[f]=rt[d]=rt[A]=rt[m]=rt[k]=rt[g]=rt[y]=rt[v]=rt[b]=rt[_]=rt[x]=rt[T]=rt[S]=rt[C]=rt[O]=!1;var ot={};ot[f]=ot[d]=ot[A]=ot[k]=ot[m]=ot[g]=ot[L]=ot[I]=ot[M]=ot[j]=ot[R]=ot[b]=ot[_]=ot[x]=ot[T]=ot[S]=ot[C]=ot[P]=ot[F]=ot[z]=ot[N]=ot[B]=!0,ot[y]=ot[v]=ot[O]=!1;var it={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,st=parseInt,lt="object"==typeof D&&D&&D.Object===Object&&D,ct="object"==typeof self&&self&&self.Object===Object&&self,ut=lt||ct||Function("return this")(),ht=t&&!t.nodeType&&t,pt=ht&&e&&!e.nodeType&&e,ft=pt&&pt.exports===ht,dt=ft&&lt.process,mt=function(){try{return pt&&pt.require&&pt.require("util").types||dt&&dt.binding&&dt.binding("util")}catch(e){}}(),gt=mt&&mt.isArrayBuffer,yt=mt&&mt.isDate,vt=mt&&mt.isMap,wt=mt&&mt.isRegExp,bt=mt&&mt.isSet,_t=mt&&mt.isTypedArray;function xt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Et(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function St(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Ct(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Pt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function Ot(e,t){return!(null==e||!e.length)&&zt(e,t,0)>-1}function At(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function kt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Lt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function It(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Mt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Rt=Wt("length");function Ft(e,t,n){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=n,!1}),r}function Dt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function zt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Dt(e,Bt,n)}function Nt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Bt(e){return e!=e}function Ut(e,t){var n=null==e?0:e.length;return n?Vt(e,t)/n:u}function Wt(e){return function(t){return null==t?n:t[e]}}function $t(e){return function(t){return null==e?n:e[t]}}function Ht(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function Vt(e,t){for(var r,o=-1,i=e.length;++o<i;){var a=t(e[o]);a!==n&&(r=r===n?a:r+a)}return r}function qt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Gt(e){return e?e.slice(0,hn(e)+1).replace(ne,""):e}function Jt(e){return function(t){return e(t)}}function Yt(e,t){return kt(t,function(t){return e[t]})}function Xt(e,t){return e.has(t)}function Zt(e,t){for(var n=-1,r=e.length;++n<r&&zt(t,e[n],0)>-1;);return n}function Kt(e,t){for(var n=e.length;n--&&zt(t,e[n],0)>-1;);return n}var Qt=$t({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),en=$t({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function tn(e){return"\\"+it[e]}function nn(e){return Qe.test(e)}function rn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function on(e,t){return function(n){return e(t(n))}}function an(e,t){for(var n=-1,r=e.length,o=0,a=[];++n<r;){var s=e[n];s!==t&&s!==i||(e[n]=i,a[o++]=n)}return a}function sn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function ln(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function cn(e){return nn(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Rt(e)}function un(e){return nn(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function hn(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var pn=$t({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),fn=function e(t){var D=(t=null==t?ut:fn.defaults(ut.Object(),t,fn.pick(ut,tt))).Array,re=t.Date,be=t.Error,_e=t.Function,xe=t.Math,Ee=t.Object,Te=t.RegExp,Se=t.String,Ce=t.TypeError,Pe=D.prototype,Oe=_e.prototype,Ae=Ee.prototype,ke=t["__core-js_shared__"],Le=Oe.toString,Ie=Ae.hasOwnProperty,Me=0,je=function(){var e=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Re=Ae.toString,Fe=Le.call(Ee),De=ut._,ze=Te("^"+Le.call(Ie).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ne=ft?t.Buffer:n,Be=t.Symbol,Ue=t.Uint8Array,We=Ne?Ne.allocUnsafe:n,$e=on(Ee.getPrototypeOf,Ee),He=Ee.create,Ve=Ae.propertyIsEnumerable,qe=Pe.splice,Ge=Be?Be.isConcatSpreadable:n,Je=Be?Be.iterator:n,Ze=Be?Be.toStringTag:n,Qe=function(){try{var e=li(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),it=t.clearTimeout!==ut.clearTimeout&&t.clearTimeout,lt=re&&re.now!==ut.Date.now&&re.now,ct=t.setTimeout!==ut.setTimeout&&t.setTimeout,ht=xe.ceil,pt=xe.floor,dt=Ee.getOwnPropertySymbols,mt=Ne?Ne.isBuffer:n,Rt=t.isFinite,$t=Pe.join,dn=on(Ee.keys,Ee),mn=xe.max,gn=xe.min,yn=re.now,vn=t.parseInt,wn=xe.random,bn=Pe.reverse,_n=li(t,"DataView"),xn=li(t,"Map"),En=li(t,"Promise"),Tn=li(t,"Set"),Sn=li(t,"WeakMap"),Cn=li(Ee,"create"),Pn=Sn&&new Sn,On={},An=ji(_n),kn=ji(xn),Ln=ji(En),In=ji(Tn),Mn=ji(Sn),jn=Be?Be.prototype:n,Rn=jn?jn.valueOf:n,Fn=jn?jn.toString:n;function Dn(e){if(Za(e)&&!Ba(e)&&!(e instanceof Un)){if(e instanceof Bn)return e;if(Ie.call(e,"__wrapped__"))return Ri(e)}return new Bn(e)}var zn=function(){function e(){}return function(t){if(!Xa(t))return{};if(He)return He(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Nn(){}function Bn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Hn;++t<n;)this.add(e[t])}function qn(e){var t=this.__data__=new $n(e);this.size=t.size}function Gn(e,t){var n=Ba(e),r=!n&&Na(e),o=!n&&!r&&Ha(e),i=!n&&!r&&!o&&is(e),a=n||r||o||i,s=a?qt(e.length,Se):[],l=s.length;for(var c in e)!t&&!Ie.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mi(c,l))||s.push(c);return s}function Jn(e){var t=e.length;return t?e[Hr(0,t-1)]:n}function Yn(e,t){return Li(Co(e),or(t,0,e.length))}function Xn(e){return Li(Co(e))}function Zn(e,t,r){(r!==n&&!Fa(e[t],r)||r===n&&!(t in e))&&nr(e,t,r)}function Kn(e,t,r){var o=e[t];Ie.call(e,t)&&Fa(o,r)&&(r!==n||t in e)||nr(e,t,r)}function Qn(e,t){for(var n=e.length;n--;)if(Fa(e[n][0],t))return n;return-1}function er(e,t,n,r){return cr(e,function(e,o,i){t(r,e,n(e),i)}),r}function tr(e,t){return e&&Po(t,Ps(t),e)}function nr(e,t,n){"__proto__"==t&&Qe?Qe(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function rr(e,t){for(var r=-1,o=t.length,i=D(o),a=null==e;++r<o;)i[r]=a?n:xs(e,t[r]);return i}function or(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function ir(e,t,r,o,i,a){var s,l=1&t,c=2&t,u=4&t;if(r&&(s=i?r(e,o,i,a):r(e)),s!==n)return s;if(!Xa(e))return e;var h=Ba(e);if(h){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Co(e,s)}else{var p=hi(e),d=p==v||p==w;if(Ha(e))return bo(e,l);if(p==x||p==f||d&&!i){if(s=c||d?{}:fi(e),!l)return c?function(e,t){return Po(e,ui(e),t)}(e,function(e,t){return e&&Po(t,Os(t),e)}(s,e)):function(e,t){return Po(e,ci(e),t)}(e,tr(s,e))}else{if(!ot[p])return i?e:{};s=function(e,t,n){var r,o=e.constructor;switch(t){case A:return _o(e);case m:case g:return new o(+e);case k:return function(e,t){var n=t?_o(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case I:case M:case j:case R:case F:case z:case N:case B:return xo(e,n);case b:return new o;case _:case C:return new o(e);case T:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case S:return new o;case P:return r=e,Rn?Ee(Rn.call(r)):{}}}(e,p,l)}}a||(a=new qn);var y=a.get(e);if(y)return y;a.set(e,s),ns(e)?e.forEach(function(n){s.add(ir(n,t,r,n,e,a))}):Ka(e)&&e.forEach(function(n,o){s.set(o,ir(n,t,r,o,e,a))});var E=h?n:(u?c?ti:ei:c?Os:Ps)(e);return Tt(E||e,function(n,o){E&&(n=e[o=n]),Kn(s,o,ir(n,t,r,o,e,a))}),s}function ar(e,t,r){var o=r.length;if(null==e)return!o;for(e=Ee(e);o--;){var i=r[o],a=t[i],s=e[i];if(s===n&&!(i in e)||!a(s))return!1}return!0}function sr(e,t,o){if("function"!=typeof e)throw new Ce(r);return Pi(function(){e.apply(n,o)},t)}function lr(e,t,n,r){var o=-1,i=Ot,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=kt(t,Jt(n))),r?(i=At,a=!1):t.length>=200&&(i=Xt,a=!1,t=new Vn(t));e:for(;++o<s;){var u=e[o],h=null==n?u:n(u);if(u=r||0!==u?u:0,a&&h==h){for(var p=c;p--;)if(t[p]===h)continue e;l.push(u)}else i(t,h,r)||l.push(u)}return l}Dn.templateSettings={escape:J,evaluate:Y,interpolate:X,variable:"",imports:{_:Dn}},Dn.prototype=Nn.prototype,Dn.prototype.constructor=Dn,Bn.prototype=zn(Nn.prototype),Bn.prototype.constructor=Bn,Un.prototype=zn(Nn.prototype),Un.prototype.constructor=Un,Wn.prototype.clear=function(){this.__data__=Cn?Cn(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(Cn){var r=t[e];return r===o?n:r}return Ie.call(t,e)?t[e]:n},Wn.prototype.has=function(e){var t=this.__data__;return Cn?t[e]!==n:Ie.call(t,e)},Wn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Cn&&t===n?o:t,this},$n.prototype.clear=function(){this.__data__=[],this.size=0},$n.prototype.delete=function(e){var t=this.__data__,n=Qn(t,e);return!(n<0||(n==t.length-1?t.pop():qe.call(t,n,1),--this.size,0))},$n.prototype.get=function(e){var t=this.__data__,r=Qn(t,e);return r<0?n:t[r][1]},$n.prototype.has=function(e){return Qn(this.__data__,e)>-1},$n.prototype.set=function(e,t){var n=this.__data__,r=Qn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Hn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(xn||$n),string:new Wn}},Hn.prototype.delete=function(e){var t=ai(this,e).delete(e);return this.size-=t?1:0,t},Hn.prototype.get=function(e){return ai(this,e).get(e)},Hn.prototype.has=function(e){return ai(this,e).has(e)},Hn.prototype.set=function(e,t){var n=ai(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Vn.prototype.add=Vn.prototype.push=function(e){return this.__data__.set(e,o),this},Vn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.clear=function(){this.__data__=new $n,this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},qn.prototype.get=function(e){return this.__data__.get(e)},qn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof $n){var r=n.__data__;if(!xn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hn(r)}return n.set(e,t),this.size=n.size,this};var cr=ko(yr),ur=ko(vr,!0);function hr(e,t){var n=!0;return cr(e,function(e,r,o){return n=!!t(e,r,o)}),n}function pr(e,t,r){for(var o=-1,i=e.length;++o<i;){var a=e[o],s=t(a);if(null!=s&&(l===n?s==s&&!os(s):r(s,l)))var l=s,c=a}return c}function fr(e,t){var n=[];return cr(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function dr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=di),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?dr(s,t-1,n,r,o):Lt(o,s):r||(o[o.length]=s)}return o}var mr=Lo(),gr=Lo(!0);function yr(e,t){return e&&mr(e,t,Ps)}function vr(e,t){return e&&gr(e,t,Ps)}function wr(e,t){return Pt(t,function(t){return Ga(e[t])})}function br(e,t){for(var r=0,o=(t=go(t,e)).length;null!=e&&r<o;)e=e[Mi(t[r++])];return r&&r==o?e:n}function _r(e,t,n){var r=t(e);return Ba(e)?r:Lt(r,n(e))}function xr(e){return null==e?e===n?"[object Undefined]":"[object Null]":Ze&&Ze in Ee(e)?function(e){var t=Ie.call(e,Ze),r=e[Ze];try{e[Ze]=n;var o=!0}catch(e){}var i=Re.call(e);return o&&(t?e[Ze]=r:delete e[Ze]),i}(e):function(e){return Re.call(e)}(e)}function Er(e,t){return e>t}function Tr(e,t){return null!=e&&Ie.call(e,t)}function Sr(e,t){return null!=e&&t in Ee(e)}function Cr(e,t,r){for(var o=r?At:Ot,i=e[0].length,a=e.length,s=a,l=D(a),c=1/0,u=[];s--;){var h=e[s];s&&t&&(h=kt(h,Jt(t))),c=gn(h.length,c),l[s]=!r&&(t||i>=120&&h.length>=120)?new Vn(s&&h):n}h=e[0];var p=-1,f=l[0];e:for(;++p<i&&u.length<c;){var d=h[p],m=t?t(d):d;if(d=r||0!==d?d:0,!(f?Xt(f,m):o(u,m,r))){for(s=a;--s;){var g=l[s];if(!(g?Xt(g,m):o(e[s],m,r)))continue e}f&&f.push(m),u.push(d)}}return u}function Pr(e,t,r){var o=null==(e=Ti(e,t=go(t,e)))?e:e[Mi(qi(t))];return null==o?n:xt(o,e,r)}function Or(e){return Za(e)&&xr(e)==f}function Ar(e,t,r,o,i){return e===t||(null==e||null==t||!Za(e)&&!Za(t)?e!=e&&t!=t:function(e,t,r,o,i,a){var s=Ba(e),l=Ba(t),c=s?d:hi(e),u=l?d:hi(t),h=(c=c==f?x:c)==x,p=(u=u==f?x:u)==x,v=c==u;if(v&&Ha(e)){if(!Ha(t))return!1;s=!0,h=!1}if(v&&!h)return a||(a=new qn),s||is(e)?Ko(e,t,r,o,i,a):function(e,t,n,r,o,i,a){switch(n){case k:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case A:return!(e.byteLength!=t.byteLength||!i(new Ue(e),new Ue(t)));case m:case g:case _:return Fa(+e,+t);case y:return e.name==t.name&&e.message==t.message;case T:case C:return e==t+"";case b:var s=rn;case S:var l=1&r;if(s||(s=sn),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=Ko(s(e),s(t),r,o,i,a);return a.delete(e),u;case P:if(Rn)return Rn.call(e)==Rn.call(t)}return!1}(e,t,c,r,o,i,a);if(!(1&r)){var w=h&&Ie.call(e,"__wrapped__"),E=p&&Ie.call(t,"__wrapped__");if(w||E){var O=w?e.value():e,L=E?t.value():t;return a||(a=new qn),i(O,L,r,o,a)}}return!!v&&(a||(a=new qn),function(e,t,r,o,i,a){var s=1&r,l=ei(e),c=l.length;if(c!=ei(t).length&&!s)return!1;for(var u=c;u--;){var h=l[u];if(!(s?h in t:Ie.call(t,h)))return!1}var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var d=!0;a.set(e,t),a.set(t,e);for(var m=s;++u<c;){var g=e[h=l[u]],y=t[h];if(o)var v=s?o(y,g,h,t,e,a):o(g,y,h,e,t,a);if(!(v===n?g===y||i(g,y,r,o,a):v)){d=!1;break}m||(m="constructor"==h)}if(d&&!m){var w=e.constructor,b=t.constructor;w==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b||(d=!1)}return a.delete(e),a.delete(t),d}(e,t,r,o,i,a))}(e,t,r,o,Ar,i))}function kr(e,t,r,o){var i=r.length,a=i,s=!o;if(null==e)return!a;for(e=Ee(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){var c=(l=r[i])[0],u=e[c],h=l[1];if(s&&l[2]){if(u===n&&!(c in e))return!1}else{var p=new qn;if(o)var f=o(u,h,c,e,t,p);if(!(f===n?Ar(h,u,3,o,p):f))return!1}}return!0}function Lr(e){return!(!Xa(e)||(t=e,je&&je in t))&&(Ga(e)?ze:de).test(ji(e));var t}function Ir(e){return"function"==typeof e?e:null==e?Qs:"object"==typeof e?Ba(e)?Dr(e[0],e[1]):Fr(e):ll(e)}function Mr(e){if(!bi(e))return dn(e);var t=[];for(var n in Ee(e))Ie.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jr(e,t){return e<t}function Rr(e,t){var n=-1,r=Wa(e)?D(e.length):[];return cr(e,function(e,o,i){r[++n]=t(e,o,i)}),r}function Fr(e){var t=si(e);return 1==t.length&&t[0][2]?xi(t[0][0],t[0][1]):function(n){return n===e||kr(n,e,t)}}function Dr(e,t){return yi(e)&&_i(t)?xi(Mi(e),t):function(r){var o=xs(r,e);return o===n&&o===t?Es(r,e):Ar(t,o,3)}}function zr(e,t,r,o,i){e!==t&&mr(t,function(a,s){if(i||(i=new qn),Xa(a))!function(e,t,r,o,i,a,s){var l=Si(e,r),c=Si(t,r),u=s.get(c);if(u)Zn(e,r,u);else{var h=a?a(l,c,r+"",e,t,s):n,p=h===n;if(p){var f=Ba(c),d=!f&&Ha(c),m=!f&&!d&&is(c);h=c,f||d||m?Ba(l)?h=l:$a(l)?h=Co(l):d?(p=!1,h=bo(c,!0)):m?(p=!1,h=xo(c,!0)):h=[]:es(c)||Na(c)?(h=l,Na(l)?h=fs(l):Xa(l)&&!Ga(l)||(h=fi(c))):p=!1}p&&(s.set(c,h),i(h,c,o,a,s),s.delete(c)),Zn(e,r,h)}}(e,t,s,r,zr,o,i);else{var l=o?o(Si(e,s),a,s+"",e,t,i):n;l===n&&(l=a),Zn(e,s,l)}},Os)}function Nr(e,t){var r=e.length;if(r)return mi(t+=t<0?r:0,r)?e[t]:n}function Br(e,t,n){t=t.length?kt(t,function(e){return Ba(e)?function(t){return br(t,1===e.length?e[0]:e)}:e}):[Qs];var r=-1;t=kt(t,Jt(ii()));var o=Rr(e,function(e,n,o){var i=kt(t,function(t){return t(e)});return{criteria:i,index:++r,value:e}});return function(e){var t=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var l=Eo(o[r],i[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(o)}function Ur(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=br(e,a);n(s,a)&&Yr(i,go(a,e),s)}return i}function Wr(e,t,n,r){var o=r?Nt:zt,i=-1,a=t.length,s=e;for(e===t&&(t=Co(t)),n&&(s=kt(e,Jt(n)));++i<a;)for(var l=0,c=t[i],u=n?n(c):c;(l=o(s,u,l,r))>-1;)s!==e&&qe.call(s,l,1),qe.call(e,l,1);return e}function $r(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;mi(o)?qe.call(e,o,1):so(e,o)}}return e}function Hr(e,t){return e+pt(wn()*(t-e+1))}function Vr(e,t){var n="";if(!e||t<1||t>c)return n;do{t%2&&(n+=e),(t=pt(t/2))&&(e+=e)}while(t);return n}function qr(e,t){return Oi(Ei(e,t,Qs),e+"")}function Gr(e){return Jn(Fs(e))}function Jr(e,t){var n=Fs(e);return Li(n,or(t,0,n.length))}function Yr(e,t,r,o){if(!Xa(e))return e;for(var i=-1,a=(t=go(t,e)).length,s=a-1,l=e;null!=l&&++i<a;){var c=Mi(t[i]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=s){var h=l[c];(u=o?o(h,c,l):n)===n&&(u=Xa(h)?h:mi(t[i+1])?[]:{})}Kn(l,c,u),l=l[c]}return e}var Xr=Pn?function(e,t){return Pn.set(e,t),e}:Qs,Zr=Qe?function(e,t){return Qe(e,"toString",{configurable:!0,enumerable:!1,value:Xs(t),writable:!0})}:Qs;function Kr(e){return Li(Fs(e))}function Qr(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=D(o);++r<o;)i[r]=e[r+t];return i}function eo(e,t){var n;return cr(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}function to(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!os(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return no(e,t,Qs,n)}function no(e,t,r,o){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,l=null===t,c=os(t),u=t===n;i<a;){var h=pt((i+a)/2),p=r(e[h]),f=p!==n,d=null===p,m=p==p,g=os(p);if(s)var y=o||m;else y=u?m&&(o||f):l?m&&f&&(o||!d):c?m&&f&&!d&&(o||!g):!d&&!g&&(o?p<=t:p<t);y?i=h+1:a=h}return gn(a,4294967294)}function ro(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Fa(s,l)){var l=s;i[o++]=0===a?0:a}}return i}function oo(e){return"number"==typeof e?e:os(e)?u:+e}function io(e){if("string"==typeof e)return e;if(Ba(e))return kt(e,io)+"";if(os(e))return Fn?Fn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ao(e,t,n){var r=-1,o=Ot,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=At;else if(i>=200){var c=t?null:qo(e);if(c)return sn(c);a=!1,o=Xt,l=new Vn}else l=t?[]:s;e:for(;++r<i;){var u=e[r],h=t?t(u):u;if(u=n||0!==u?u:0,a&&h==h){for(var p=l.length;p--;)if(l[p]===h)continue e;t&&l.push(h),s.push(u)}else o(l,h,n)||(l!==s&&l.push(h),s.push(u))}return s}function so(e,t){return null==(e=Ti(e,t=go(t,e)))||delete e[Mi(qi(t))]}function lo(e,t,n,r){return Yr(e,t,n(br(e,t)),r)}function co(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?Qr(e,r?0:i,r?i+1:o):Qr(e,r?i+1:0,r?o:i)}function uo(e,t){var n=e;return n instanceof Un&&(n=n.value()),It(t,function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))},n)}function ho(e,t,n){var r=e.length;if(r<2)return r?ao(e[0]):[];for(var o=-1,i=D(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=lr(i[o]||a,e[s],t,n));return ao(dr(i,1),t,n)}function po(e,t,r){for(var o=-1,i=e.length,a=t.length,s={};++o<i;){var l=o<a?t[o]:n;r(s,e[o],l)}return s}function fo(e){return $a(e)?e:[]}function mo(e){return"function"==typeof e?e:Qs}function go(e,t){return Ba(e)?e:yi(e,t)?[e]:Ii(ds(e))}var yo=qr;function vo(e,t,r){var o=e.length;return r=r===n?o:r,!t&&r>=o?e:Qr(e,t,r)}var wo=it||function(e){return ut.clearTimeout(e)};function bo(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function _o(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function xo(e,t){var n=t?_o(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Eo(e,t){if(e!==t){var r=e!==n,o=null===e,i=e==e,a=os(e),s=t!==n,l=null===t,c=t==t,u=os(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||o&&s&&c||!r&&c||!i)return 1;if(!o&&!a&&!u&&e<t||u&&r&&i&&!o&&!a||l&&r&&i||!s&&i||!c)return-1}return 0}function To(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,l=t.length,c=mn(i-a,0),u=D(l+c),h=!r;++s<l;)u[s]=t[s];for(;++o<a;)(h||o<i)&&(u[n[o]]=e[o]);for(;c--;)u[s++]=e[o++];return u}function So(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,l=-1,c=t.length,u=mn(i-s,0),h=D(u+c),p=!r;++o<u;)h[o]=e[o];for(var f=o;++l<c;)h[f+l]=t[l];for(;++a<s;)(p||o<i)&&(h[f+n[a]]=e[o++]);return h}function Co(e,t){var n=-1,r=e.length;for(t||(t=D(r));++n<r;)t[n]=e[n];return t}function Po(e,t,r,o){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=o?o(r[l],e[l],l,r,e):n;c===n&&(c=e[l]),i?nr(r,l,c):Kn(r,l,c)}return r}function Oo(e,t){return function(n,r){var o=Ba(n)?Et:er,i=t?t():{};return o(n,e,ii(r,2),i)}}function Ao(e){return qr(function(t,r){var o=-1,i=r.length,a=i>1?r[i-1]:n,s=i>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(i--,a):n,s&&gi(r[0],r[1],s)&&(a=i<3?n:a,i=1),t=Ee(t);++o<i;){var l=r[o];l&&e(t,l,o,a)}return t})}function ko(e,t){return function(n,r){if(null==n)return n;if(!Wa(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Ee(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Lo(e){return function(t,n,r){for(var o=-1,i=Ee(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(i[l],l,i))break}return t}}function Io(e){return function(t){var r=nn(t=ds(t))?un(t):n,o=r?r[0]:t.charAt(0),i=r?vo(r,1).join(""):t.slice(1);return o[e]()+i}}function Mo(e){return function(t){return It(Gs(Ns(t).replace(Ye,"")),e,"")}}function jo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=zn(e.prototype),r=e.apply(n,t);return Xa(r)?r:n}}function Ro(e){return function(t,r,o){var i=Ee(t);if(!Wa(t)){var a=ii(r,3);t=Ps(t),r=function(e){return a(i[e],e,i)}}var s=e(t,r,o);return s>-1?i[a?t[s]:s]:n}}function Fo(e){return Qo(function(t){var o=t.length,i=o,a=Bn.prototype.thru;for(e&&t.reverse();i--;){var s=t[i];if("function"!=typeof s)throw new Ce(r);if(a&&!l&&"wrapper"==ri(s))var l=new Bn([],!0)}for(i=l?i:o;++i<o;){var c=ri(s=t[i]),u="wrapper"==c?ni(s):n;l=u&&vi(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[ri(u[0])].apply(l,u[3]):1==s.length&&vi(s)?l[c]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Ba(n))return l.plant(n).value();for(var r=0,i=o?t[r].apply(this,e):n;++r<o;)i=t[r].call(this,i);return i}})}function Do(e,t,r,o,i,a,l,c,u,h){var p=t&s,f=1&t,d=2&t,m=24&t,g=512&t,y=d?n:jo(e);return function s(){for(var v=arguments.length,w=D(v),b=v;b--;)w[b]=arguments[b];if(m)var _=oi(s),x=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,_);if(o&&(w=To(w,o,i,m)),a&&(w=So(w,a,l,m)),v-=x,m&&v<h){var E=an(w,_);return Ho(e,t,Do,s.placeholder,r,w,E,c,u,h-v)}var T=f?r:this,S=d?T[e]:e;return v=w.length,c?w=function(e,t){for(var r=e.length,o=gn(t.length,r),i=Co(e);o--;){var a=t[o];e[o]=mi(a,r)?i[a]:n}return e}(w,c):g&&v>1&&w.reverse(),p&&u<v&&(w.length=u),this&&this!==ut&&this instanceof s&&(S=y||jo(S)),S.apply(T,w)}}function zo(e,t){return function(n,r){return function(e,t,n,r){return yr(e,function(e,o,i){t(r,n(e),o,i)}),r}(n,e,t(r),{})}}function No(e,t){return function(r,o){var i;if(r===n&&o===n)return t;if(r!==n&&(i=r),o!==n){if(i===n)return o;"string"==typeof r||"string"==typeof o?(r=io(r),o=io(o)):(r=oo(r),o=oo(o)),i=e(r,o)}return i}}function Bo(e){return Qo(function(t){return t=kt(t,Jt(ii())),qr(function(n){var r=this;return e(t,function(e){return xt(e,r,n)})})})}function Uo(e,t){var r=(t=t===n?" ":io(t)).length;if(r<2)return r?Vr(t,e):t;var o=Vr(t,ht(e/cn(t)));return nn(t)?vo(un(o),0,e).join(""):o.slice(0,e)}function Wo(e){return function(t,r,o){return o&&"number"!=typeof o&&gi(t,r,o)&&(r=o=n),t=cs(t),r===n?(r=t,t=0):r=cs(r),function(e,t,n,r){for(var o=-1,i=mn(ht((t-e)/(n||1)),0),a=D(i);i--;)a[r?i:++o]=e,e+=n;return a}(t,r,o=o===n?t<r?1:-1:cs(o),e)}}function $o(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ps(t),n=ps(n)),e(t,n)}}function Ho(e,t,r,o,i,s,l,c,u,h){var p=8&t;t|=p?a:64,4&(t&=~(p?64:a))||(t&=-4);var f=[e,t,i,p?s:n,p?l:n,p?n:s,p?n:l,c,u,h],d=r.apply(n,f);return vi(e)&&Ci(d,f),d.placeholder=o,Ai(d,e,t)}function Vo(e){var t=xe[e];return function(e,n){if(e=ps(e),(n=null==n?0:gn(us(n),292))&&Rt(e)){var r=(ds(e)+"e").split("e");return+((r=(ds(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var qo=Tn&&1/sn(new Tn([,-0]))[1]==l?function(e){return new Tn(e)}:ol;function Go(e){return function(t){var n=hi(t);return n==b?rn(t):n==S?ln(t):function(e,t){return kt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Jo(e,t,o,l,c,u,h,p){var f=2&t;if(!f&&"function"!=typeof e)throw new Ce(r);var d=l?l.length:0;if(d||(t&=-97,l=c=n),h=h===n?h:mn(us(h),0),p=p===n?p:us(p),d-=c?c.length:0,64&t){var m=l,g=c;l=c=n}var y=f?n:ni(e),v=[e,t,o,l,c,m,g,u,h,p];if(y&&function(e,t){var n=e[1],r=t[1],o=n|r,a=o<131,l=r==s&&8==n||r==s&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!l)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var c=t[3];if(c){var u=e[3];e[3]=u?To(u,c,t[4]):c,e[4]=u?an(e[3],i):t[4]}(c=t[5])&&(u=e[5],e[5]=u?So(u,c,t[6]):c,e[6]=u?an(e[5],i):t[6]),(c=t[7])&&(e[7]=c),r&s&&(e[8]=null==e[8]?t[8]:gn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(v,y),e=v[0],t=v[1],o=v[2],l=v[3],c=v[4],!(p=v[9]=v[9]===n?f?0:e.length:mn(v[9]-d,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,r){var o=jo(e);return function i(){for(var a=arguments.length,s=D(a),l=a,c=oi(i);l--;)s[l]=arguments[l];var u=a<3&&s[0]!==c&&s[a-1]!==c?[]:an(s,c);return(a-=u.length)<r?Ho(e,t,Do,i.placeholder,n,s,u,n,n,r-a):xt(this&&this!==ut&&this instanceof i?o:e,this,s)}}(e,t,p):t!=a&&33!=t||c.length?Do.apply(n,v):function(e,t,n,r){var o=1&t,i=jo(e);return function t(){for(var a=-1,s=arguments.length,l=-1,c=r.length,u=D(c+s),h=this&&this!==ut&&this instanceof t?i:e;++l<c;)u[l]=r[l];for(;s--;)u[l++]=arguments[++a];return xt(h,o?n:this,u)}}(e,t,o,l);else var w=function(e,t,n){var r=1&t,o=jo(e);return function t(){return(this&&this!==ut&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,o);return Ai((y?Xr:Ci)(w,v),e,t)}function Yo(e,t,r,o){return e===n||Fa(e,Ae[r])&&!Ie.call(o,r)?t:e}function Xo(e,t,r,o,i,a){return Xa(e)&&Xa(t)&&(a.set(t,e),zr(e,t,n,Xo,a),a.delete(t)),e}function Zo(e){return es(e)?n:e}function Ko(e,t,r,o,i,a){var s=1&r,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var p=-1,f=!0,d=2&r?new Vn:n;for(a.set(e,t),a.set(t,e);++p<l;){var m=e[p],g=t[p];if(o)var y=s?o(g,m,p,t,e,a):o(m,g,p,e,t,a);if(y!==n){if(y)continue;f=!1;break}if(d){if(!jt(t,function(e,t){if(!Xt(d,t)&&(m===e||i(m,e,r,o,a)))return d.push(t)})){f=!1;break}}else if(m!==g&&!i(m,g,r,o,a)){f=!1;break}}return a.delete(e),a.delete(t),f}function Qo(e){return Oi(Ei(e,n,Ui),e+"")}function ei(e){return _r(e,Ps,ci)}function ti(e){return _r(e,Os,ui)}var ni=Pn?function(e){return Pn.get(e)}:ol;function ri(e){for(var t=e.name+"",n=On[t],r=Ie.call(On,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function oi(e){return(Ie.call(Dn,"placeholder")?Dn:e).placeholder}function ii(){var e=Dn.iteratee||el;return e=e===el?Ir:e,arguments.length?e(arguments[0],arguments[1]):e}function ai(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function si(e){for(var t=Ps(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,_i(o)]}return t}function li(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Lr(r)?r:n}var ci=dt?function(e){return null==e?[]:(e=Ee(e),Pt(dt(e),function(t){return Ve.call(e,t)}))}:hl,ui=dt?function(e){for(var t=[];e;)Lt(t,ci(e)),e=$e(e);return t}:hl,hi=xr;function pi(e,t,n){for(var r=-1,o=(t=go(t,e)).length,i=!1;++r<o;){var a=Mi(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Ya(o)&&mi(a,o)&&(Ba(e)||Na(e))}function fi(e){return"function"!=typeof e.constructor||bi(e)?{}:zn($e(e))}function di(e){return Ba(e)||Na(e)||!!(Ge&&e&&e[Ge])}function mi(e,t){var n=typeof e;return!!(t=null==t?c:t)&&("number"==n||"symbol"!=n&&ge.test(e))&&e>-1&&e%1==0&&e<t}function gi(e,t,n){if(!Xa(n))return!1;var r=typeof t;return!!("number"==r?Wa(n)&&mi(t,n.length):"string"==r&&t in n)&&Fa(n[t],e)}function yi(e,t){if(Ba(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!os(e))||K.test(e)||!Z.test(e)||null!=t&&e in Ee(t)}function vi(e){var t=ri(e),n=Dn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var r=ni(n);return!!r&&e===r[0]}(_n&&hi(new _n(new ArrayBuffer(1)))!=k||xn&&hi(new xn)!=b||En&&hi(En.resolve())!=E||Tn&&hi(new Tn)!=S||Sn&&hi(new Sn)!=O)&&(hi=function(e){var t=xr(e),r=t==x?e.constructor:n,o=r?ji(r):"";if(o)switch(o){case An:return k;case kn:return b;case Ln:return E;case In:return S;case Mn:return O}return t});var wi=ke?Ga:pl;function bi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function _i(e){return e==e&&!Xa(e)}function xi(e,t){return function(r){return null!=r&&r[e]===t&&(t!==n||e in Ee(r))}}function Ei(e,t,r){return t=mn(t===n?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=mn(n.length-t,0),a=D(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=D(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),xt(e,this,s)}}function Ti(e,t){return t.length<2?e:br(e,Qr(t,0,-1))}function Si(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ci=ki(Xr),Pi=ct||function(e,t){return ut.setTimeout(e,t)},Oi=ki(Zr);function Ai(e,t,n){var r=t+"";return Oi(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Tt(p,function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ie);return t?t[1].split(ae):[]}(r),n)))}function ki(e){var t=0,r=0;return function(){var o=yn(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Li(e,t){var r=-1,o=e.length,i=o-1;for(t=t===n?o:t;++r<t;){var a=Hr(r,i),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var Ii=function(){var e=ka(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,function(e,n,r,o){t.push(r?o.replace(ce,"$1"):n||e)}),t},function(e){return 500===t.size&&t.clear(),e}),t=e.cache;return e}();function Mi(e){if("string"==typeof e||os(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ji(e){if(null!=e){try{return Le.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ri(e){if(e instanceof Un)return e.clone();var t=new Bn(e.__wrapped__,e.__chain__);return t.__actions__=Co(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Fi=qr(function(e,t){return $a(e)?lr(e,dr(t,1,$a,!0)):[]}),Di=qr(function(e,t){var r=qi(t);return $a(r)&&(r=n),$a(e)?lr(e,dr(t,1,$a,!0),ii(r,2)):[]}),zi=qr(function(e,t){var r=qi(t);return $a(r)&&(r=n),$a(e)?lr(e,dr(t,1,$a,!0),n,r):[]});function Ni(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:us(n);return o<0&&(o=mn(r+o,0)),Dt(e,ii(t,3),o)}function Bi(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o-1;return r!==n&&(i=us(r),i=r<0?mn(o+i,0):gn(i,o-1)),Dt(e,ii(t,3),i,!0)}function Ui(e){return null!=e&&e.length?dr(e,1):[]}function Wi(e){return e&&e.length?e[0]:n}var $i=qr(function(e){var t=kt(e,fo);return t.length&&t[0]===e[0]?Cr(t):[]}),Hi=qr(function(e){var t=qi(e),r=kt(e,fo);return t===qi(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Cr(r,ii(t,2)):[]}),Vi=qr(function(e){var t=qi(e),r=kt(e,fo);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Cr(r,n,t):[]});function qi(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Gi=qr(Ji);function Ji(e,t){return e&&e.length&&t&&t.length?Wr(e,t):e}var Yi=Qo(function(e,t){var n=null==e?0:e.length,r=rr(e,t);return $r(e,kt(t,function(e){return mi(e,n)?+e:e}).sort(Eo)),r});function Xi(e){return null==e?e:bn.call(e)}var Zi=qr(function(e){return ao(dr(e,1,$a,!0))}),Ki=qr(function(e){var t=qi(e);return $a(t)&&(t=n),ao(dr(e,1,$a,!0),ii(t,2))}),Qi=qr(function(e){var t=qi(e);return t="function"==typeof t?t:n,ao(dr(e,1,$a,!0),n,t)});function ea(e){if(!e||!e.length)return[];var t=0;return e=Pt(e,function(e){if($a(e))return t=mn(e.length,t),!0}),qt(t,function(t){return kt(e,Wt(t))})}function ta(e,t){if(!e||!e.length)return[];var r=ea(e);return null==t?r:kt(r,function(e){return xt(t,n,e)})}var na=qr(function(e,t){return $a(e)?lr(e,t):[]}),ra=qr(function(e){return ho(Pt(e,$a))}),oa=qr(function(e){var t=qi(e);return $a(t)&&(t=n),ho(Pt(e,$a),ii(t,2))}),ia=qr(function(e){var t=qi(e);return t="function"==typeof t?t:n,ho(Pt(e,$a),n,t)}),aa=qr(ea),sa=qr(function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,ta(e,r)});function la(e){var t=Dn(e);return t.__chain__=!0,t}function ca(e,t){return t(e)}var ua=Qo(function(e){var t=e.length,r=t?e[0]:0,o=this.__wrapped__,i=function(t){return rr(t,e)};return!(t>1||this.__actions__.length)&&o instanceof Un&&mi(r)?((o=o.slice(r,+r+(t?1:0))).__actions__.push({func:ca,args:[i],thisArg:n}),new Bn(o,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e})):this.thru(i)}),ha=Oo(function(e,t,n){Ie.call(e,n)?++e[n]:nr(e,n,1)}),pa=Ro(Ni),fa=Ro(Bi);function da(e,t){return(Ba(e)?Tt:cr)(e,ii(t,3))}function ma(e,t){return(Ba(e)?St:ur)(e,ii(t,3))}var ga=Oo(function(e,t,n){Ie.call(e,n)?e[n].push(t):nr(e,n,[t])}),ya=qr(function(e,t,n){var r=-1,o="function"==typeof t,i=Wa(e)?D(e.length):[];return cr(e,function(e){i[++r]=o?xt(t,e,n):Pr(e,t,n)}),i}),va=Oo(function(e,t,n){nr(e,n,t)});function wa(e,t){return(Ba(e)?kt:Rr)(e,ii(t,3))}var ba=Oo(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),_a=qr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&gi(e,t[0],t[1])?t=[]:n>2&&gi(t[0],t[1],t[2])&&(t=[t[0]]),Br(e,dr(t,1),[])}),xa=lt||function(){return ut.Date.now()};function Ea(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Jo(e,s,n,n,n,n,t)}function Ta(e,t){var o;if("function"!=typeof t)throw new Ce(r);return e=us(e),function(){return--e>0&&(o=t.apply(this,arguments)),e<=1&&(t=n),o}}var Sa=qr(function(e,t,n){var r=1;if(n.length){var o=an(n,oi(Sa));r|=a}return Jo(e,r,t,n,o)}),Ca=qr(function(e,t,n){var r=3;if(n.length){var o=an(n,oi(Ca));r|=a}return Jo(t,r,e,n,o)});function Pa(e,t,o){var i,a,s,l,c,u,h=0,p=!1,f=!1,d=!0;if("function"!=typeof e)throw new Ce(r);function m(t){var r=i,o=a;return i=a=n,h=t,l=e.apply(o,r)}function g(e){var r=e-u;return u===n||r>=t||r<0||f&&e-h>=s}function y(){var e=xa();if(g(e))return v(e);c=Pi(y,function(e){var n=t-(e-u);return f?gn(n,s-(e-h)):n}(e))}function v(e){return c=n,d&&i?m(e):(i=a=n,l)}function w(){var e=xa(),r=g(e);if(i=arguments,a=this,u=e,r){if(c===n)return function(e){return h=e,c=Pi(y,t),p?m(e):l}(u);if(f)return wo(c),c=Pi(y,t),m(u)}return c===n&&(c=Pi(y,t)),l}return t=ps(t)||0,Xa(o)&&(p=!!o.leading,s=(f="maxWait"in o)?mn(ps(o.maxWait)||0,t):s,d="trailing"in o?!!o.trailing:d),w.cancel=function(){c!==n&&wo(c),h=0,i=u=a=c=n},w.flush=function(){return c===n?l:v(xa())},w}var Oa=qr(function(e,t){return sr(e,1,t)}),Aa=qr(function(e,t,n){return sr(e,ps(t)||0,n)});function ka(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ce(r);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ka.Cache||Hn),n}function La(e){if("function"!=typeof e)throw new Ce(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ka.Cache=Hn;var Ia=yo(function(e,t){var n=(t=1==t.length&&Ba(t[0])?kt(t[0],Jt(ii())):kt(dr(t,1),Jt(ii()))).length;return qr(function(r){for(var o=-1,i=gn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return xt(e,this,r)})}),Ma=qr(function(e,t){var r=an(t,oi(Ma));return Jo(e,a,n,t,r)}),ja=qr(function(e,t){var r=an(t,oi(ja));return Jo(e,64,n,t,r)}),Ra=Qo(function(e,t){return Jo(e,256,n,n,n,t)});function Fa(e,t){return e===t||e!=e&&t!=t}var Da=$o(Er),za=$o(function(e,t){return e>=t}),Na=Or(function(){return arguments}())?Or:function(e){return Za(e)&&Ie.call(e,"callee")&&!Ve.call(e,"callee")},Ba=D.isArray,Ua=gt?Jt(gt):function(e){return Za(e)&&xr(e)==A};function Wa(e){return null!=e&&Ya(e.length)&&!Ga(e)}function $a(e){return Za(e)&&Wa(e)}var Ha=mt||pl,Va=yt?Jt(yt):function(e){return Za(e)&&xr(e)==g};function qa(e){if(!Za(e))return!1;var t=xr(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!es(e)}function Ga(e){if(!Xa(e))return!1;var t=xr(e);return t==v||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==us(e)}function Ya(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function Xa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Za(e){return null!=e&&"object"==typeof e}var Ka=vt?Jt(vt):function(e){return Za(e)&&hi(e)==b};function Qa(e){return"number"==typeof e||Za(e)&&xr(e)==_}function es(e){if(!Za(e)||xr(e)!=x)return!1;var t=$e(e);if(null===t)return!0;var n=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Le.call(n)==Fe}var ts=wt?Jt(wt):function(e){return Za(e)&&xr(e)==T},ns=bt?Jt(bt):function(e){return Za(e)&&hi(e)==S};function rs(e){return"string"==typeof e||!Ba(e)&&Za(e)&&xr(e)==C}function os(e){return"symbol"==typeof e||Za(e)&&xr(e)==P}var is=_t?Jt(_t):function(e){return Za(e)&&Ya(e.length)&&!!rt[xr(e)]},as=$o(jr),ss=$o(function(e,t){return e<=t});function ls(e){if(!e)return[];if(Wa(e))return rs(e)?un(e):Co(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=hi(e);return(t==b?rn:t==S?sn:Fs)(e)}function cs(e){return e?(e=ps(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function us(e){var t=cs(e),n=t%1;return t==t?n?t-n:t:0}function hs(e){return e?or(us(e),0,h):0}function ps(e){if("number"==typeof e)return e;if(os(e))return u;if(Xa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Gt(e);var n=fe.test(e);return n||me.test(e)?st(e.slice(2),n?2:8):pe.test(e)?u:+e}function fs(e){return Po(e,Os(e))}function ds(e){return null==e?"":io(e)}var ms=Ao(function(e,t){if(bi(t)||Wa(t))Po(t,Ps(t),e);else for(var n in t)Ie.call(t,n)&&Kn(e,n,t[n])}),gs=Ao(function(e,t){Po(t,Os(t),e)}),ys=Ao(function(e,t,n,r){Po(t,Os(t),e,r)}),vs=Ao(function(e,t,n,r){Po(t,Ps(t),e,r)}),ws=Qo(rr),bs=qr(function(e,t){e=Ee(e);var r=-1,o=t.length,i=o>2?t[2]:n;for(i&&gi(t[0],t[1],i)&&(o=1);++r<o;)for(var a=t[r],s=Os(a),l=-1,c=s.length;++l<c;){var u=s[l],h=e[u];(h===n||Fa(h,Ae[u])&&!Ie.call(e,u))&&(e[u]=a[u])}return e}),_s=qr(function(e){return e.push(n,Xo),xt(ks,n,e)});function xs(e,t,r){var o=null==e?n:br(e,t);return o===n?r:o}function Es(e,t){return null!=e&&pi(e,t,Sr)}var Ts=zo(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),e[t]=n},Xs(Qs)),Ss=zo(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),Ie.call(e,t)?e[t].push(n):e[t]=[n]},ii),Cs=qr(Pr);function Ps(e){return Wa(e)?Gn(e):Mr(e)}function Os(e){return Wa(e)?Gn(e,!0):function(e){if(!Xa(e))return function(e){var t=[];if(null!=e)for(var n in Ee(e))t.push(n);return t}(e);var t=bi(e),n=[];for(var r in e)("constructor"!=r||!t&&Ie.call(e,r))&&n.push(r);return n}(e)}var As=Ao(function(e,t,n){zr(e,t,n)}),ks=Ao(function(e,t,n,r){zr(e,t,n,r)}),Ls=Qo(function(e,t){var n={};if(null==e)return n;var r=!1;t=kt(t,function(t){return t=go(t,e),r||(r=t.length>1),t}),Po(e,ti(e),n),r&&(n=ir(n,7,Zo));for(var o=t.length;o--;)so(n,t[o]);return n}),Is=Qo(function(e,t){return null==e?{}:function(e,t){return Ur(e,t,function(t,n){return Es(e,n)})}(e,t)});function Ms(e,t){if(null==e)return{};var n=kt(ti(e),function(e){return[e]});return t=ii(t),Ur(e,n,function(e,n){return t(e,n[0])})}var js=Go(Ps),Rs=Go(Os);function Fs(e){return null==e?[]:Yt(e,Ps(e))}var Ds=Mo(function(e,t,n){return t=t.toLowerCase(),e+(n?zs(t):t)});function zs(e){return qs(ds(e).toLowerCase())}function Ns(e){return(e=ds(e))&&e.replace(ye,Qt).replace(Xe,"")}var Bs=Mo(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Us=Mo(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Ws=Io("toLowerCase"),$s=Mo(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Hs=Mo(function(e,t,n){return e+(n?" ":"")+qs(t)}),Vs=Mo(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),qs=Io("toUpperCase");function Gs(e,t,r){return e=ds(e),(t=r?n:t)===n?function(e){return et.test(e)}(e)?function(e){return e.match(Ke)||[]}(e):function(e){return e.match(se)||[]}(e):e.match(t)||[]}var Js=qr(function(e,t){try{return xt(e,n,t)}catch(e){return qa(e)?e:new be(e)}}),Ys=Qo(function(e,t){return Tt(t,function(t){t=Mi(t),nr(e,t,Sa(e[t],e))}),e});function Xs(e){return function(){return e}}var Zs=Fo(),Ks=Fo(!0);function Qs(e){return e}function el(e){return Ir("function"==typeof e?e:ir(e,1))}var tl=qr(function(e,t){return function(n){return Pr(n,e,t)}}),nl=qr(function(e,t){return function(n){return Pr(e,n,t)}});function rl(e,t,n){var r=Ps(t),o=wr(t,r);null!=n||Xa(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=wr(t,Ps(t)));var i=!(Xa(n)&&"chain"in n&&!n.chain),a=Ga(e);return Tt(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Co(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})}),e}function ol(){}var il=Bo(kt),al=Bo(Ct),sl=Bo(jt);function ll(e){return yi(e)?Wt(Mi(e)):function(e){return function(t){return br(t,e)}}(e)}var cl=Wo(),ul=Wo(!0);function hl(){return[]}function pl(){return!1}var fl,dl=No(function(e,t){return e+t},0),ml=Vo("ceil"),gl=No(function(e,t){return e/t},1),yl=Vo("floor"),vl=No(function(e,t){return e*t},1),wl=Vo("round"),bl=No(function(e,t){return e-t},0);return Dn.after=function(e,t){if("function"!=typeof t)throw new Ce(r);return e=us(e),function(){if(--e<1)return t.apply(this,arguments)}},Dn.ary=Ea,Dn.assign=ms,Dn.assignIn=gs,Dn.assignInWith=ys,Dn.assignWith=vs,Dn.at=ws,Dn.before=Ta,Dn.bind=Sa,Dn.bindAll=Ys,Dn.bindKey=Ca,Dn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ba(e)?e:[e]},Dn.chain=la,Dn.chunk=function(e,t,r){t=(r?gi(e,t,r):t===n)?1:mn(us(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=D(ht(o/t));i<o;)s[a++]=Qr(e,i,i+=t);return s},Dn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Dn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=D(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Lt(Ba(n)?Co(n):[n],dr(t,1))},Dn.cond=function(e){var t=null==e?0:e.length,n=ii();return e=t?kt(e,function(e){if("function"!=typeof e[1])throw new Ce(r);return[n(e[0]),e[1]]}):[],qr(function(n){for(var r=-1;++r<t;){var o=e[r];if(xt(o[0],this,n))return xt(o[1],this,n)}})},Dn.conforms=function(e){return function(e){var t=Ps(e);return function(n){return ar(n,e,t)}}(ir(e,1))},Dn.constant=Xs,Dn.countBy=ha,Dn.create=function(e,t){var n=zn(e);return null==t?n:tr(n,t)},Dn.curry=function e(t,r,o){var i=Jo(t,8,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},Dn.curryRight=function e(t,r,o){var i=Jo(t,16,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},Dn.debounce=Pa,Dn.defaults=bs,Dn.defaultsDeep=_s,Dn.defer=Oa,Dn.delay=Aa,Dn.difference=Fi,Dn.differenceBy=Di,Dn.differenceWith=zi,Dn.drop=function(e,t,r){var o=null==e?0:e.length;return o?Qr(e,(t=r||t===n?1:us(t))<0?0:t,o):[]},Dn.dropRight=function(e,t,r){var o=null==e?0:e.length;return o?Qr(e,0,(t=o-(t=r||t===n?1:us(t)))<0?0:t):[]},Dn.dropRightWhile=function(e,t){return e&&e.length?co(e,ii(t,3),!0,!0):[]},Dn.dropWhile=function(e,t){return e&&e.length?co(e,ii(t,3),!0):[]},Dn.fill=function(e,t,r,o){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&gi(e,t,r)&&(r=0,o=i),function(e,t,r,o){var i=e.length;for((r=us(r))<0&&(r=-r>i?0:i+r),(o=o===n||o>i?i:us(o))<0&&(o+=i),o=r>o?0:hs(o);r<o;)e[r++]=t;return e}(e,t,r,o)):[]},Dn.filter=function(e,t){return(Ba(e)?Pt:fr)(e,ii(t,3))},Dn.flatMap=function(e,t){return dr(wa(e,t),1)},Dn.flatMapDeep=function(e,t){return dr(wa(e,t),l)},Dn.flatMapDepth=function(e,t,r){return r=r===n?1:us(r),dr(wa(e,t),r)},Dn.flatten=Ui,Dn.flattenDeep=function(e){return null!=e&&e.length?dr(e,l):[]},Dn.flattenDepth=function(e,t){return null!=e&&e.length?dr(e,t=t===n?1:us(t)):[]},Dn.flip=function(e){return Jo(e,512)},Dn.flow=Zs,Dn.flowRight=Ks,Dn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Dn.functions=function(e){return null==e?[]:wr(e,Ps(e))},Dn.functionsIn=function(e){return null==e?[]:wr(e,Os(e))},Dn.groupBy=ga,Dn.initial=function(e){return null!=e&&e.length?Qr(e,0,-1):[]},Dn.intersection=$i,Dn.intersectionBy=Hi,Dn.intersectionWith=Vi,Dn.invert=Ts,Dn.invertBy=Ss,Dn.invokeMap=ya,Dn.iteratee=el,Dn.keyBy=va,Dn.keys=Ps,Dn.keysIn=Os,Dn.map=wa,Dn.mapKeys=function(e,t){var n={};return t=ii(t,3),yr(e,function(e,r,o){nr(n,t(e,r,o),e)}),n},Dn.mapValues=function(e,t){var n={};return t=ii(t,3),yr(e,function(e,r,o){nr(n,r,t(e,r,o))}),n},Dn.matches=function(e){return Fr(ir(e,1))},Dn.matchesProperty=function(e,t){return Dr(e,ir(t,1))},Dn.memoize=ka,Dn.merge=As,Dn.mergeWith=ks,Dn.method=tl,Dn.methodOf=nl,Dn.mixin=rl,Dn.negate=La,Dn.nthArg=function(e){return e=us(e),qr(function(t){return Nr(t,e)})},Dn.omit=Ls,Dn.omitBy=function(e,t){return Ms(e,La(ii(t)))},Dn.once=function(e){return Ta(2,e)},Dn.orderBy=function(e,t,r,o){return null==e?[]:(Ba(t)||(t=null==t?[]:[t]),Ba(r=o?n:r)||(r=null==r?[]:[r]),Br(e,t,r))},Dn.over=il,Dn.overArgs=Ia,Dn.overEvery=al,Dn.overSome=sl,Dn.partial=Ma,Dn.partialRight=ja,Dn.partition=ba,Dn.pick=Is,Dn.pickBy=Ms,Dn.property=ll,Dn.propertyOf=function(e){return function(t){return null==e?n:br(e,t)}},Dn.pull=Gi,Dn.pullAll=Ji,Dn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,ii(n,2)):e},Dn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Wr(e,t,n,r):e},Dn.pullAt=Yi,Dn.range=cl,Dn.rangeRight=ul,Dn.rearg=Ra,Dn.reject=function(e,t){return(Ba(e)?Pt:fr)(e,La(ii(t,3)))},Dn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ii(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return $r(e,o),n},Dn.rest=function(e,t){if("function"!=typeof e)throw new Ce(r);return qr(e,t=t===n?t:us(t))},Dn.reverse=Xi,Dn.sampleSize=function(e,t,r){return t=(r?gi(e,t,r):t===n)?1:us(t),(Ba(e)?Yn:Jr)(e,t)},Dn.set=function(e,t,n){return null==e?e:Yr(e,t,n)},Dn.setWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:Yr(e,t,r,o)},Dn.shuffle=function(e){return(Ba(e)?Xn:Kr)(e)},Dn.slice=function(e,t,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&gi(e,t,r)?(t=0,r=o):(t=null==t?0:us(t),r=r===n?o:us(r)),Qr(e,t,r)):[]},Dn.sortBy=_a,Dn.sortedUniq=function(e){return e&&e.length?ro(e):[]},Dn.sortedUniqBy=function(e,t){return e&&e.length?ro(e,ii(t,2)):[]},Dn.split=function(e,t,r){return r&&"number"!=typeof r&&gi(e,t,r)&&(t=r=n),(r=r===n?h:r>>>0)?(e=ds(e))&&("string"==typeof t||null!=t&&!ts(t))&&!(t=io(t))&&nn(e)?vo(un(e),0,r):e.split(t,r):[]},Dn.spread=function(e,t){if("function"!=typeof e)throw new Ce(r);return t=null==t?0:mn(us(t),0),qr(function(n){var r=n[t],o=vo(n,0,t);return r&&Lt(o,r),xt(e,this,o)})},Dn.tail=function(e){var t=null==e?0:e.length;return t?Qr(e,1,t):[]},Dn.take=function(e,t,r){return e&&e.length?Qr(e,0,(t=r||t===n?1:us(t))<0?0:t):[]},Dn.takeRight=function(e,t,r){var o=null==e?0:e.length;return o?Qr(e,(t=o-(t=r||t===n?1:us(t)))<0?0:t,o):[]},Dn.takeRightWhile=function(e,t){return e&&e.length?co(e,ii(t,3),!1,!0):[]},Dn.takeWhile=function(e,t){return e&&e.length?co(e,ii(t,3)):[]},Dn.tap=function(e,t){return t(e),e},Dn.throttle=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new Ce(r);return Xa(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),Pa(e,t,{leading:o,maxWait:t,trailing:i})},Dn.thru=ca,Dn.toArray=ls,Dn.toPairs=js,Dn.toPairsIn=Rs,Dn.toPath=function(e){return Ba(e)?kt(e,Mi):os(e)?[e]:Co(Ii(ds(e)))},Dn.toPlainObject=fs,Dn.transform=function(e,t,n){var r=Ba(e),o=r||Ha(e)||is(e);if(t=ii(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Xa(e)&&Ga(i)?zn($e(e)):{}}return(o?Tt:yr)(e,function(e,r,o){return t(n,e,r,o)}),n},Dn.unary=function(e){return Ea(e,1)},Dn.union=Zi,Dn.unionBy=Ki,Dn.unionWith=Qi,Dn.uniq=function(e){return e&&e.length?ao(e):[]},Dn.uniqBy=function(e,t){return e&&e.length?ao(e,ii(t,2)):[]},Dn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?ao(e,n,t):[]},Dn.unset=function(e,t){return null==e||so(e,t)},Dn.unzip=ea,Dn.unzipWith=ta,Dn.update=function(e,t,n){return null==e?e:lo(e,t,mo(n))},Dn.updateWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:lo(e,t,mo(r),o)},Dn.values=Fs,Dn.valuesIn=function(e){return null==e?[]:Yt(e,Os(e))},Dn.without=na,Dn.words=Gs,Dn.wrap=function(e,t){return Ma(mo(t),e)},Dn.xor=ra,Dn.xorBy=oa,Dn.xorWith=ia,Dn.zip=aa,Dn.zipObject=function(e,t){return po(e||[],t||[],Kn)},Dn.zipObjectDeep=function(e,t){return po(e||[],t||[],Yr)},Dn.zipWith=sa,Dn.entries=js,Dn.entriesIn=Rs,Dn.extend=gs,Dn.extendWith=ys,rl(Dn,Dn),Dn.add=dl,Dn.attempt=Js,Dn.camelCase=Ds,Dn.capitalize=zs,Dn.ceil=ml,Dn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=ps(r))==r?r:0),t!==n&&(t=(t=ps(t))==t?t:0),or(ps(e),t,r)},Dn.clone=function(e){return ir(e,4)},Dn.cloneDeep=function(e){return ir(e,5)},Dn.cloneDeepWith=function(e,t){return ir(e,5,t="function"==typeof t?t:n)},Dn.cloneWith=function(e,t){return ir(e,4,t="function"==typeof t?t:n)},Dn.conformsTo=function(e,t){return null==t||ar(e,t,Ps(t))},Dn.deburr=Ns,Dn.defaultTo=function(e,t){return null==e||e!=e?t:e},Dn.divide=gl,Dn.endsWith=function(e,t,r){e=ds(e),t=io(t);var o=e.length,i=r=r===n?o:or(us(r),0,o);return(r-=t.length)>=0&&e.slice(r,i)==t},Dn.eq=Fa,Dn.escape=function(e){return(e=ds(e))&&G.test(e)?e.replace(V,en):e},Dn.escapeRegExp=function(e){return(e=ds(e))&&te.test(e)?e.replace(ee,"\\$&"):e},Dn.every=function(e,t,r){var o=Ba(e)?Ct:hr;return r&&gi(e,t,r)&&(t=n),o(e,ii(t,3))},Dn.find=pa,Dn.findIndex=Ni,Dn.findKey=function(e,t){return Ft(e,ii(t,3),yr)},Dn.findLast=fa,Dn.findLastIndex=Bi,Dn.findLastKey=function(e,t){return Ft(e,ii(t,3),vr)},Dn.floor=yl,Dn.forEach=da,Dn.forEachRight=ma,Dn.forIn=function(e,t){return null==e?e:mr(e,ii(t,3),Os)},Dn.forInRight=function(e,t){return null==e?e:gr(e,ii(t,3),Os)},Dn.forOwn=function(e,t){return e&&yr(e,ii(t,3))},Dn.forOwnRight=function(e,t){return e&&vr(e,ii(t,3))},Dn.get=xs,Dn.gt=Da,Dn.gte=za,Dn.has=function(e,t){return null!=e&&pi(e,t,Tr)},Dn.hasIn=Es,Dn.head=Wi,Dn.identity=Qs,Dn.includes=function(e,t,n,r){e=Wa(e)?e:Fs(e),n=n&&!r?us(n):0;var o=e.length;return n<0&&(n=mn(o+n,0)),rs(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&zt(e,t,n)>-1},Dn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:us(n);return o<0&&(o=mn(r+o,0)),zt(e,t,o)},Dn.inRange=function(e,t,r){return t=cs(t),r===n?(r=t,t=0):r=cs(r),function(e,t,n){return e>=gn(t,n)&&e<mn(t,n)}(e=ps(e),t,r)},Dn.invoke=Cs,Dn.isArguments=Na,Dn.isArray=Ba,Dn.isArrayBuffer=Ua,Dn.isArrayLike=Wa,Dn.isArrayLikeObject=$a,Dn.isBoolean=function(e){return!0===e||!1===e||Za(e)&&xr(e)==m},Dn.isBuffer=Ha,Dn.isDate=Va,Dn.isElement=function(e){return Za(e)&&1===e.nodeType&&!es(e)},Dn.isEmpty=function(e){if(null==e)return!0;if(Wa(e)&&(Ba(e)||"string"==typeof e||"function"==typeof e.splice||Ha(e)||is(e)||Na(e)))return!e.length;var t=hi(e);if(t==b||t==S)return!e.size;if(bi(e))return!Mr(e).length;for(var n in e)if(Ie.call(e,n))return!1;return!0},Dn.isEqual=function(e,t){return Ar(e,t)},Dn.isEqualWith=function(e,t,r){var o=(r="function"==typeof r?r:n)?r(e,t):n;return o===n?Ar(e,t,n,r):!!o},Dn.isError=qa,Dn.isFinite=function(e){return"number"==typeof e&&Rt(e)},Dn.isFunction=Ga,Dn.isInteger=Ja,Dn.isLength=Ya,Dn.isMap=Ka,Dn.isMatch=function(e,t){return e===t||kr(e,t,si(t))},Dn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,kr(e,t,si(t),r)},Dn.isNaN=function(e){return Qa(e)&&e!=+e},Dn.isNative=function(e){if(wi(e))throw new be("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Lr(e)},Dn.isNil=function(e){return null==e},Dn.isNull=function(e){return null===e},Dn.isNumber=Qa,Dn.isObject=Xa,Dn.isObjectLike=Za,Dn.isPlainObject=es,Dn.isRegExp=ts,Dn.isSafeInteger=function(e){return Ja(e)&&e>=-9007199254740991&&e<=c},Dn.isSet=ns,Dn.isString=rs,Dn.isSymbol=os,Dn.isTypedArray=is,Dn.isUndefined=function(e){return e===n},Dn.isWeakMap=function(e){return Za(e)&&hi(e)==O},Dn.isWeakSet=function(e){return Za(e)&&"[object WeakSet]"==xr(e)},Dn.join=function(e,t){return null==e?"":$t.call(e,t)},Dn.kebabCase=Bs,Dn.last=qi,Dn.lastIndexOf=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==n&&(i=(i=us(r))<0?mn(o+i,0):gn(i,o-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Dt(e,Bt,i,!0)},Dn.lowerCase=Us,Dn.lowerFirst=Ws,Dn.lt=as,Dn.lte=ss,Dn.max=function(e){return e&&e.length?pr(e,Qs,Er):n},Dn.maxBy=function(e,t){return e&&e.length?pr(e,ii(t,2),Er):n},Dn.mean=function(e){return Ut(e,Qs)},Dn.meanBy=function(e,t){return Ut(e,ii(t,2))},Dn.min=function(e){return e&&e.length?pr(e,Qs,jr):n},Dn.minBy=function(e,t){return e&&e.length?pr(e,ii(t,2),jr):n},Dn.stubArray=hl,Dn.stubFalse=pl,Dn.stubObject=function(){return{}},Dn.stubString=function(){return""},Dn.stubTrue=function(){return!0},Dn.multiply=vl,Dn.nth=function(e,t){return e&&e.length?Nr(e,us(t)):n},Dn.noConflict=function(){return ut._===this&&(ut._=De),this},Dn.noop=ol,Dn.now=xa,Dn.pad=function(e,t,n){e=ds(e);var r=(t=us(t))?cn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Uo(pt(o),n)+e+Uo(ht(o),n)},Dn.padEnd=function(e,t,n){e=ds(e);var r=(t=us(t))?cn(e):0;return t&&r<t?e+Uo(t-r,n):e},Dn.padStart=function(e,t,n){e=ds(e);var r=(t=us(t))?cn(e):0;return t&&r<t?Uo(t-r,n)+e:e},Dn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),vn(ds(e).replace(ne,""),t||0)},Dn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&gi(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=cs(e),t===n?(t=e,e=0):t=cs(t)),e>t){var o=e;e=t,t=o}if(r||e%1||t%1){var i=wn();return gn(e+i*(t-e+at("1e-"+((i+"").length-1))),t)}return Hr(e,t)},Dn.reduce=function(e,t,n){var r=Ba(e)?It:Ht,o=arguments.length<3;return r(e,ii(t,4),n,o,cr)},Dn.reduceRight=function(e,t,n){var r=Ba(e)?Mt:Ht,o=arguments.length<3;return r(e,ii(t,4),n,o,ur)},Dn.repeat=function(e,t,r){return t=(r?gi(e,t,r):t===n)?1:us(t),Vr(ds(e),t)},Dn.replace=function(){var e=arguments,t=ds(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Dn.result=function(e,t,r){var o=-1,i=(t=go(t,e)).length;for(i||(i=1,e=n);++o<i;){var a=null==e?n:e[Mi(t[o])];a===n&&(o=i,a=r),e=Ga(a)?a.call(e):a}return e},Dn.round=wl,Dn.runInContext=e,Dn.sample=function(e){return(Ba(e)?Jn:Gr)(e)},Dn.size=function(e){if(null==e)return 0;if(Wa(e))return rs(e)?cn(e):e.length;var t=hi(e);return t==b||t==S?e.size:Mr(e).length},Dn.snakeCase=$s,Dn.some=function(e,t,r){var o=Ba(e)?jt:eo;return r&&gi(e,t,r)&&(t=n),o(e,ii(t,3))},Dn.sortedIndex=function(e,t){return to(e,t)},Dn.sortedIndexBy=function(e,t,n){return no(e,t,ii(n,2))},Dn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=to(e,t);if(r<n&&Fa(e[r],t))return r}return-1},Dn.sortedLastIndex=function(e,t){return to(e,t,!0)},Dn.sortedLastIndexBy=function(e,t,n){return no(e,t,ii(n,2),!0)},Dn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=to(e,t,!0)-1;if(Fa(e[n],t))return n}return-1},Dn.startCase=Hs,Dn.startsWith=function(e,t,n){return e=ds(e),n=null==n?0:or(us(n),0,e.length),t=io(t),e.slice(n,n+t.length)==t},Dn.subtract=bl,Dn.sum=function(e){return e&&e.length?Vt(e,Qs):0},Dn.sumBy=function(e,t){return e&&e.length?Vt(e,ii(t,2)):0},Dn.template=function(e,t,r){var o=Dn.templateSettings;r&&gi(e,t,r)&&(t=n),e=ds(e),t=ys({},t,o,Yo);var i,a,s=ys({},t.imports,o.imports,Yo),l=Ps(s),c=Yt(s,l),u=0,h=t.interpolate||ve,p="__p += '",f=Te((t.escape||ve).source+"|"+h.source+"|"+(h===X?ue:ve).source+"|"+(t.evaluate||ve).source+"|$","g"),d="//# sourceURL="+(Ie.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(f,function(t,n,r,o,s,l){return r||(r=o),p+=e.slice(u,l).replace(we,tn),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t}),p+="';\n";var m=Ie.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new be("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(U,""):p).replace(W,"$1").replace($,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Js(function(){return _e(l,d+"return "+p).apply(n,c)});if(g.source=p,qa(g))throw g;return g},Dn.times=function(e,t){if((e=us(e))<1||e>c)return[];var n=h,r=gn(e,h);t=ii(t),e-=h;for(var o=qt(r,t);++n<e;)t(n);return o},Dn.toFinite=cs,Dn.toInteger=us,Dn.toLength=hs,Dn.toLower=function(e){return ds(e).toLowerCase()},Dn.toNumber=ps,Dn.toSafeInteger=function(e){return e?or(us(e),-9007199254740991,c):0===e?e:0},Dn.toString=ds,Dn.toUpper=function(e){return ds(e).toUpperCase()},Dn.trim=function(e,t,r){if((e=ds(e))&&(r||t===n))return Gt(e);if(!e||!(t=io(t)))return e;var o=un(e),i=un(t);return vo(o,Zt(o,i),Kt(o,i)+1).join("")},Dn.trimEnd=function(e,t,r){if((e=ds(e))&&(r||t===n))return e.slice(0,hn(e)+1);if(!e||!(t=io(t)))return e;var o=un(e);return vo(o,0,Kt(o,un(t))+1).join("")},Dn.trimStart=function(e,t,r){if((e=ds(e))&&(r||t===n))return e.replace(ne,"");if(!e||!(t=io(t)))return e;var o=un(e);return vo(o,Zt(o,un(t))).join("")},Dn.truncate=function(e,t){var r=30,o="...";if(Xa(t)){var i="separator"in t?t.separator:i;r="length"in t?us(t.length):r,o="omission"in t?io(t.omission):o}var a=(e=ds(e)).length;if(nn(e)){var s=un(e);a=s.length}if(r>=a)return e;var l=r-cn(o);if(l<1)return o;var c=s?vo(s,0,l).join(""):e.slice(0,l);if(i===n)return c+o;if(s&&(l+=c.length-l),ts(i)){if(e.slice(l).search(i)){var u,h=c;for(i.global||(i=Te(i.source,ds(he.exec(i))+"g")),i.lastIndex=0;u=i.exec(h);)var p=u.index;c=c.slice(0,p===n?l:p)}}else if(e.indexOf(io(i),l)!=l){var f=c.lastIndexOf(i);f>-1&&(c=c.slice(0,f))}return c+o},Dn.unescape=function(e){return(e=ds(e))&&q.test(e)?e.replace(H,pn):e},Dn.uniqueId=function(e){var t=++Me;return ds(e)+t},Dn.upperCase=Vs,Dn.upperFirst=qs,Dn.each=da,Dn.eachRight=ma,Dn.first=Wi,rl(Dn,(fl={},yr(Dn,function(e,t){Ie.call(Dn.prototype,t)||(fl[t]=e)}),fl),{chain:!1}),Dn.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Dn[e].placeholder=Dn}),Tt(["drop","take"],function(e,t){Un.prototype[e]=function(r){r=r===n?1:mn(us(r),0);var o=this.__filtered__&&!t?new Un(this):this.clone();return o.__filtered__?o.__takeCount__=gn(r,o.__takeCount__):o.__views__.push({size:gn(r,h),type:e+(o.__dir__<0?"Right":"")}),o},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Tt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ii(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Tt(["head","last"],function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}}),Tt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}}),Un.prototype.compact=function(){return this.filter(Qs)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=qr(function(e,t){return"function"==typeof e?new Un(this):this.map(function(n){return Pr(n,e,t)})}),Un.prototype.reject=function(e){return this.filter(La(ii(e)))},Un.prototype.slice=function(e,t){e=us(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Un(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=us(t))<0?r.dropRight(-t):r.take(t-e)),r)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(h)},yr(Un.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=Dn[o?"take"+("last"==t?"Right":""):t],a=o||/^find/.test(t);i&&(Dn.prototype[t]=function(){var t=this.__wrapped__,s=o?[1]:arguments,l=t instanceof Un,c=s[0],u=l||Ba(t),h=function(e){var t=i.apply(Dn,Lt([e],s));return o&&p?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var p=this.__chain__,f=!!this.__actions__.length,d=a&&!p,m=l&&!f;if(!a&&u){t=m?t:new Un(this);var g=e.apply(t,s);return g.__actions__.push({func:ca,args:[h],thisArg:n}),new Bn(g,p)}return d&&m?e.apply(this,s):(g=this.thru(h),d?o?g.value()[0]:g.value():g)})}),Tt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Pe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Dn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ba(o)?o:[],e)}return this[n](function(n){return t.apply(Ba(n)?n:[],e)})}}),yr(Un.prototype,function(e,t){var n=Dn[t];if(n){var r=n.name+"";Ie.call(On,r)||(On[r]=[]),On[r].push({name:t,func:n})}}),On[Do(n,2).name]=[{name:"wrapper",func:n}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=Co(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Co(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Co(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ba(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=gn(t,e+a);break;case"takeRight":e=mn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,l=s-a,c=r?s:a-1,u=this.__iteratees__,h=u.length,p=0,f=gn(l,this.__takeCount__);if(!n||!r&&o==l&&f==l)return uo(e,this.__actions__);var d=[];e:for(;l--&&p<f;){for(var m=-1,g=e[c+=t];++m<h;){var y=u[m],v=y.iteratee,w=y.type,b=v(g);if(2==w)g=b;else if(!b){if(1==w)continue e;break e}}d[p++]=g}return d},Dn.prototype.at=ua,Dn.prototype.chain=function(){return la(this)},Dn.prototype.commit=function(){return new Bn(this.value(),this.__chain__)},Dn.prototype.next=function(){this.__values__===n&&(this.__values__=ls(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Dn.prototype.plant=function(e){for(var t,r=this;r instanceof Nn;){var o=Ri(r);o.__index__=0,o.__values__=n,t?i.__wrapped__=o:t=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,t},Dn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:ca,args:[Xi],thisArg:n}),new Bn(t,this.__chain__)}return this.thru(Xi)},Dn.prototype.toJSON=Dn.prototype.valueOf=Dn.prototype.value=function(){return uo(this.__wrapped__,this.__actions__)},Dn.prototype.first=Dn.prototype.head,Je&&(Dn.prototype[Je]=function(){return this}),Dn}();pt?((pt.exports=fn)._=fn,ht._=fn):ut._=fn}).call(D)}({get exports(){return th},set exports(e){th=e}},th);var rh={},oh={get exports(){return rh},set exports(e){rh=e}},ih={};({get exports(){return ih},set exports(e){ih=e}}).exports=function(){function e(e,r,o,i,a){!function e(n,r,o,i,a){for(;i>o;){if(i-o>600){var s=i-o+1,l=r-o+1,c=Math.log(s),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);e(n,r,Math.max(o,Math.floor(r-l*u/s+h)),Math.min(i,Math.floor(r+(s-l)*u/s+h)),a)}var p=n[r],f=o,d=i;for(t(n,o,r),a(n[i],p)>0&&t(n,o,i);f<d;){for(t(n,f,d),f++,d--;a(n[f],p)<0;)f++;for(;a(n[d],p)>0;)d--}0===a(n[o],p)?t(n,o,d):t(n,++d,i),d<=r&&(o=d+1),r<=d&&(i=d-1)}}(e,r,o||0,i||e.length-1,a||n)}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return e<t?-1:e>t?1:0}var r=function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function i(e,t){a(e,0,e.children.length,t,e)}function a(e,t,n,r,o){o||(o=d(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(var i=t;i<n;i++){var a=e.children[i];s(o,e.leaf?r(a):a)}return o}function s(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function l(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function u(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function h(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function f(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function d(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(t,n,r,o,i){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=o)){var s=n+Math.ceil((r-n)/o/2)*o;e(t,s,n,r,i),a.push(n,s,s,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,n=[];if(!f(e,t))return n;for(var r=this.toBBox,o=[];t;){for(var i=0;i<t.children.length;i++){var a=t.children[i],s=t.leaf?r(a):a;f(e,s)&&(t.leaf?n.push(a):p(e,s)?this._all(a,n):o.push(a))}t=o.pop()}return n},r.prototype.collides=function(e){var t=this.data;if(!f(e,t))return!1;for(var n=[];t;){for(var r=0;r<t.children.length;r++){var o=t.children[r],i=t.leaf?this.toBBox(o):o;if(f(e,i)){if(t.leaf||p(e,i))return!0;n.push(o)}}t=n.pop()}return!1},r.prototype.load=function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},r.prototype.clear=function(){return this.data=d([]),this},r.prototype.remove=function(e,t){if(!e)return this;for(var n,r,i,a=this.data,s=this.toBBox(e),l=[],c=[];a||l.length;){if(a||(a=l.pop(),r=l[l.length-1],n=c.pop(),i=!0),a.leaf){var u=o(e,a.children,t);if(-1!==u)return a.children.splice(u,1),l.push(a),this._condense(l),this}i||a.leaf||!p(a,s)?r?(n++,a=r.children[n],i=!1):a=null:(l.push(a),c.push(n),n=0,r=a,a=a.children[0])}return this},r.prototype.toBBox=function(e){return e},r.prototype.compareMinX=function(e,t){return e.minX-t.minX},r.prototype.compareMinY=function(e,t){return e.minY-t.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(e){return this.data=e,this},r.prototype._all=function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t},r.prototype._build=function(e,t,n,r){var o,a=n-t+1,s=this._maxEntries;if(a<=s)return i(o=d(e.slice(t,n+1)),this.toBBox),o;r||(r=Math.ceil(Math.log(a)/Math.log(s)),s=Math.ceil(a/Math.pow(s,r-1))),(o=d([])).leaf=!1,o.height=r;var l=Math.ceil(a/s),c=l*Math.ceil(Math.sqrt(s));m(e,t,n,c,this.compareMinX);for(var u=t;u<=n;u+=c){var h=Math.min(u+c-1,n);m(e,u,h,l,this.compareMinY);for(var p=u;p<=h;p+=l){var f=Math.min(p+l-1,h);o.children.push(this._build(e,p,f,r-1))}}return i(o,this.toBBox),o},r.prototype._chooseSubtree=function(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){for(var o=1/0,i=1/0,a=void 0,s=0;s<t.children.length;s++){var l=t.children[s],c=u(l),h=(p=e,f=l,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-c);h<i?(i=h,o=c<o?c:o,a=l):h===i&&c<o&&(o=c,a=l)}t=a||t.children[0]}var p,f;return t},r.prototype._insert=function(e,t,n){var r=n?e:this.toBBox(e),o=[],i=this._chooseSubtree(r,this.data,t,o);for(i.children.push(e),s(i,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},r.prototype._split=function(e,t){var n=e[t],r=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,r);var a=this._chooseSplitIndex(n,o,r),s=d(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,i(n,this.toBBox),i(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)},r.prototype._splitRoot=function(e,t){this.data=d([e,t]),this.data.height=e.height+1,this.data.leaf=!1,i(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,n){for(var r,o,i,s,l,c,h,p=1/0,f=1/0,d=t;d<=n-t;d++){var m=a(e,0,d,this.toBBox),g=a(e,d,n,this.toBBox),y=(o=m,i=g,void 0,void 0,void 0,void 0,s=Math.max(o.minX,i.minX),l=Math.max(o.minY,i.minY),c=Math.min(o.maxX,i.maxX),h=Math.min(o.maxY,i.maxY),Math.max(0,c-s)*Math.max(0,h-l)),v=u(m)+u(g);y<p?(p=y,r=d,f=v<f?v:f):y===p&&v<f&&(f=v,r=d)}return r||n-t},r.prototype._chooseSplitAxis=function(e,t,n){var r=e.leaf?this.compareMinX:l,o=e.leaf?this.compareMinY:c;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,o)&&e.children.sort(r)},r.prototype._allDistMargin=function(e,t,n,r){e.children.sort(r);for(var o=this.toBBox,i=a(e,0,t,o),l=a(e,n-t,n,o),c=h(i)+h(l),u=t;u<n-t;u++){var p=e.children[u];s(i,e.leaf?o(p):p),c+=h(i)}for(var f=n-t-1;f>=t;f--){var d=e.children[f];s(l,e.leaf?o(d):d),c+=h(l)}return c},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)s(t[r],e)},r.prototype._condense=function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.indexOf(e[t]),1):this.clear():i(e[t],this.toBBox)},r}();var ah={};!function(e){function t(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function n(e,n,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(e[0])||!p(e[1]))throw new Error("coordinates must contain numbers");return t({type:"Point",coordinates:e},n,r)}function r(e,n,r){void 0===r&&(r={});for(var o=0,i=e;o<i.length;o++){var a=i[o];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return t({type:"Polygon",coordinates:e},n,r)}function o(e,n,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return t({type:"LineString",coordinates:e},n,r)}function i(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function a(e,n,r){return void 0===r&&(r={}),t({type:"MultiLineString",coordinates:e},n,r)}function s(e,n,r){return void 0===r&&(r={}),t({type:"MultiPoint",coordinates:e},n,r)}function l(e,n,r){return void 0===r&&(r={}),t({type:"MultiPolygon",coordinates:e},n,r)}function c(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t*r}function u(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t/r}function h(e){return e%(2*Math.PI)*180/Math.PI}function p(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},e.feature=t,e.geometry=function(e,t,i){switch(e){case"Point":return n(t).geometry;case"LineString":return o(t).geometry;case"Polygon":return r(t).geometry;case"MultiPoint":return s(t).geometry;case"MultiLineString":return a(t).geometry;case"MultiPolygon":return l(t).geometry;default:throw new Error(e+" is invalid")}},e.point=n,e.points=function(e,t,r){return void 0===r&&(r={}),i(e.map(function(e){return n(e,t)}),r)},e.polygon=r,e.polygons=function(e,t,n){return void 0===n&&(n={}),i(e.map(function(e){return r(e,t)}),n)},e.lineString=o,e.lineStrings=function(e,t,n){return void 0===n&&(n={}),i(e.map(function(e){return o(e,t)}),n)},e.featureCollection=i,e.multiLineString=a,e.multiPoint=s,e.multiPolygon=l,e.geometryCollection=function(e,n,r){return void 0===r&&(r={}),t({type:"GeometryCollection",geometries:e},n,r)},e.round=function(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n},e.radiansToLength=c,e.lengthToRadians=u,e.lengthToDegrees=function(e,t){return h(u(e,t))},e.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},e.radiansToDegrees=h,e.degreesToRadians=function(e){return e%360*Math.PI/180},e.convertLength=function(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return c(u(e,t),n)},e.convertArea=function(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var o=e.areaFactors[n];if(!o)throw new Error("invalid original units");var i=e.areaFactors[r];if(!i)throw new Error("invalid final units");return t/o*i},e.isNumber=p,e.isObject=function(e){return!!e&&e.constructor===Object},e.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(function(e){if(!p(e))throw new Error("bbox must only contain numbers")})},e.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}}(ah);var sh={};Object.defineProperty(sh,"__esModule",{value:!0});var lh=ah;function ch(e,t,n){if(null!==e)for(var r,o,i,a,s,l,c,u,h=0,p=0,f=e.type,d="FeatureCollection"===f,m="Feature"===f,g=d?e.features.length:1,y=0;y<g;y++){s=(u=!!(c=d?e.features[y].geometry:m?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var v=0;v<s;v++){var w=0,b=0;if(null!==(a=u?c.geometries[v]:c)){l=a.coordinates;var _=a.type;switch(h=!n||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(l,p,y,w,b))return!1;p++,w++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===t(l[r],p,y,w,b))return!1;p++,"MultiPoint"===_&&w++}"LineString"===_&&w++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(o=0;o<l[r].length-h;o++){if(!1===t(l[r][o],p,y,w,b))return!1;p++}"MultiLineString"===_&&w++,"Polygon"===_&&b++}"Polygon"===_&&w++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(b=0,o=0;o<l[r].length;o++){for(i=0;i<l[r][o].length-h;i++){if(!1===t(l[r][o][i],p,y,w,b))return!1;p++}b++}w++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===ch(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function uh(e,t){var n;switch(e.type){case"FeatureCollection":for(n=0;n<e.features.length&&!1!==t(e.features[n].properties,n);n++);break;case"Feature":t(e.properties,0)}}function hh(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function ph(e,t){var n,r,o,i,a,s,l,c,u,h,p=0,f="FeatureCollection"===e.type,d="Feature"===e.type,m=f?e.features.length:1;for(n=0;n<m;n++){for(s=f?e.features[n].geometry:d?e.geometry:e,c=f?e.features[n].properties:d?e.properties:{},u=f?e.features[n].bbox:d?e.bbox:void 0,h=f?e.features[n].id:d?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,o=0;o<a;o++)if(null!==(i=l?s.geometries[o]:s))switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(i,p,c,u,h))return!1;break;case"GeometryCollection":for(r=0;r<i.geometries.length;r++)if(!1===t(i.geometries[r],p,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,p,c,u,h))return!1;p++}}function fh(e,t){ph(e,function(e,n,r,o,i){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(lh.feature(e,r,{bbox:o,id:i}),n,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<e.coordinates.length;l++){var c={type:a,coordinates:e.coordinates[l]};if(!1===t(lh.feature(c,r),n,l))return!1}})}function dh(e,t){fh(e,function(e,n,r){var o=0;if(e.geometry){var i=e.geometry.type;if("Point"!==i&&"MultiPoint"!==i){var a,s=0,l=0,c=0;return!1!==ch(e,function(i,u,h,p,f){if(void 0===a||n>s||p>l||f>c)return a=i,s=n,l=p,c=f,void(o=0);var d=lh.lineString([a,i],e.properties);if(!1===t(d,n,r,f,o))return!1;o++,a=i})&&void 0}}})}function mh(e,t){if(!e)throw new Error("geojson is required");fh(e,function(e,n,r){if(null!==e.geometry){var o=e.geometry.type,i=e.geometry.coordinates;switch(o){case"LineString":if(!1===t(e,n,r,0,0))return!1;break;case"Polygon":for(var a=0;a<i.length;a++)if(!1===t(lh.lineString(i[a],e.properties),n,r,a))return!1}}})}sh.coordAll=function(e){var t=[];return ch(e,function(e){t.push(e)}),t},sh.coordEach=ch,sh.coordReduce=function(e,t,n,r){var o=n;return ch(e,function(e,r,i,a,s){o=0===r&&void 0===n?e:t(o,e,r,i,a,s)},r),o},sh.featureEach=hh,sh.featureReduce=function(e,t,n){var r=n;return hh(e,function(e,o){r=0===o&&void 0===n?e:t(r,e,o)}),r},sh.findPoint=function(e,t){if(t=t||{},!lh.isObject(t))throw new Error("options is invalid");var n,r=t.featureIndex||0,o=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.coordIndex||0,s=t.properties;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),s=s||e.features[r].properties,n=e.features[r].geometry;break;case"Feature":s=s||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":return lh.point(l,s,t);case"MultiPoint":return o<0&&(o=l.length+o),lh.point(l[o],s,t);case"LineString":return a<0&&(a=l.length+a),lh.point(l[a],s,t);case"Polygon":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a),lh.point(l[i][a],s,t);case"MultiLineString":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),lh.point(l[o][a],s,t);case"MultiPolygon":return o<0&&(o=l.length+o),i<0&&(i=l[o].length+i),a<0&&(a=l[o][i].length-a),lh.point(l[o][i][a],s,t)}throw new Error("geojson is invalid")},sh.findSegment=function(e,t){if(t=t||{},!lh.isObject(t))throw new Error("options is invalid");var n,r=t.featureIndex||0,o=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.segmentIndex||0,s=t.properties;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),s=s||e.features[r].properties,n=e.features[r].geometry;break;case"Feature":s=s||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=l.length+a-1),lh.lineString([l[a],l[a+1]],s,t);case"Polygon":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a-1),lh.lineString([l[i][a],l[i][a+1]],s,t);case"MultiLineString":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a-1),lh.lineString([l[o][a],l[o][a+1]],s,t);case"MultiPolygon":return o<0&&(o=l.length+o),i<0&&(i=l[o].length+i),a<0&&(a=l[o][i].length-a-1),lh.lineString([l[o][i][a],l[o][i][a+1]],s,t)}throw new Error("geojson is invalid")},sh.flattenEach=fh,sh.flattenReduce=function(e,t,n){var r=n;return fh(e,function(e,o,i){r=0===o&&0===i&&void 0===n?e:t(r,e,o,i)}),r},sh.geomEach=ph,sh.geomReduce=function(e,t,n){var r=n;return ph(e,function(e,o,i,a,s){r=0===o&&void 0===n?e:t(r,e,o,i,a,s)}),r},sh.lineEach=mh,sh.lineReduce=function(e,t,n){var r=n;return mh(e,function(e,o,i,a){r=0===o&&void 0===n?e:t(r,e,o,i,a)}),r},sh.propEach=uh,sh.propReduce=function(e,t,n){var r=n;return uh(e,function(e,o){r=0===o&&void 0===n?e:t(r,e,o)}),r},sh.segmentEach=dh,sh.segmentReduce=function(e,t,n){var r=n,o=!1;return dh(e,function(e,i,a,s,l){r=!1===o&&void 0===n?e:t(r,e,i,a,s,l),o=!0}),r};var gh={};Object.defineProperty(gh,"__esModule",{value:!0});var yh=sh;function vh(e){var t=[1/0,1/0,-1/0,-1/0];return yh.coordEach(e,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}vh.default=vh,gh.default=vh;var wh=ih,bh=ah,_h=sh,xh=gh.default,Eh=_h.featureEach;_h.coordEach;var Th=bh.featureCollection;function Sh(e){var t=new wh(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:xh(e),wh.prototype.insert.call(this,e)},t.load=function(e){var t=[];return Array.isArray(e)?e.forEach(function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:xh(e),t.push(e)}):Eh(e,function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:xh(e),t.push(e)}),wh.prototype.load.call(this,t)},t.remove=function(e,t){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:xh(e),wh.prototype.remove.call(this,e,t)},t.clear=function(){return wh.prototype.clear.call(this)},t.search=function(e){var t=wh.prototype.search.call(this,this.toBBox(e));return Th(t)},t.collides=function(e){return wh.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=wh.prototype.all.call(this);return Th(e)},t.toJSON=function(){return wh.prototype.toJSON.call(this)},t.fromJSON=function(e){return wh.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var t;if(e.bbox)t=e.bbox;else if(Array.isArray(e)&&4===e.length)t=e;else if(Array.isArray(e)&&6===e.length)t=[e[0],e[1],e[3],e[4]];else if("Feature"===e.type)t=xh(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=xh(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}function Ch(e,t){var n={},r=[];if("LineString"===e.type&&(e=H(e)),"LineString"===t.type&&(t=H(t)),"Feature"===e.type&&"Feature"===t.type&&null!==e.geometry&&null!==t.geometry&&"LineString"===e.geometry.type&&"LineString"===t.geometry.type&&2===e.geometry.coordinates.length&&2===t.geometry.coordinates.length){var o=Ph(e,t);return o&&r.push(o),J(r)}var i=rh();return i.load(nh(t)),le(nh(e),function(e){le(i.search(e),function(t){var o=Ph(e,t);if(o){var i=re(o).join(",");n[i]||(n[i]=!0,r.push(o))}})}),J(r)}function Ph(e,t){var n=re(e),r=re(t);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==r.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var o=n[0][0],i=n[0][1],a=n[1][0],s=n[1][1],l=r[0][0],c=r[0][1],u=r[1][0],h=r[1][1],p=(h-c)*(a-o)-(u-l)*(s-i);if(0===p)return null;var f=((u-l)*(i-c)-(h-c)*(o-l))/p,d=((a-o)*(i-c)-(s-i)*(o-l))/p;return f>=0&&f<=1&&d>=0&&d<=1?V([o+f*(a-o),i+f*(s-i)]):null}function Oh(e,t,n){void 0===n&&(n={});var r=V([1/0,1/0],{dist:1/0}),o=0;return ue(e,function(e){for(var i=re(e),a=0;a<i.length-1;a++){var s=V(i[a]);s.properties.dist=ae(t,s,n);var l=V(i[a+1]);l.properties.dist=ae(t,l,n);var c=ae(s,l,n),u=Math.max(s.properties.dist,l.properties.dist),h=Ai(s,l),p=ki(t,u,h+90,n),f=ki(t,u,h-90,n),d=Ch(G([p.geometry.coordinates,f.geometry.coordinates]),G([s.geometry.coordinates,l.geometry.coordinates])),m=null;d.features.length>0&&((m=d.features[0]).properties.dist=ae(t,m,n),m.properties.location=o+ae(s,m,n)),s.properties.dist<r.properties.dist&&((r=s).properties.index=a,r.properties.location=o),l.properties.dist<r.properties.dist&&((r=l).properties.index=a+1,r.properties.location=o+c),m&&m.properties.dist<r.properties.dist&&((r=m).properties.index=a),o+=c}}),r}function Ah(e){var t={type:"Feature"};return Object.keys(e).forEach(function(n){switch(n){case"type":case"properties":case"geometry":return;default:t[n]=e[n]}}),t.properties=kh(e.properties),t.geometry=Lh(e.geometry),t}function kh(e){var t={};return e?(Object.keys(e).forEach(function(n){var r=e[n];"object"==typeof r?null===r?t[n]=null:Array.isArray(r)?t[n]=r.map(function(e){return e}):t[n]=kh(r):t[n]=r}),t):t}function Lh(e){var t={type:e.type};return e.bbox&&(t.bbox=e.bbox),"GeometryCollection"===e.type?(t.geometries=e.geometries.map(function(e){return Lh(e)}),t):(t.coordinates=Ih(e.coordinates),t)}function Ih(e){var t=e;return"object"!=typeof t[0]?t.slice():t.map(function(e){return Ih(e)})}function Mh(e,t,n,r){if(!te(r=r||{}))throw new Error("options is invalid");var o=r.units,i=r.zTranslation,a=r.mutate;if(!e)throw new Error("geojson is required");if(null==t||isNaN(t))throw new Error("distance is required");if(i&&"number"!=typeof i&&isNaN(i))throw new Error("zTranslation is not a number");if(i=void 0!==i?i:0,0===t&&0===i)return e;if(null==n||isNaN(n))throw new Error("direction is required");return t<0&&(t=-t,n+=180),!1!==a&&void 0!==a||(e=function(e){if(!e)throw new Error("geojson is required");switch(e.type){case"Feature":return Ah(e);case"FeatureCollection":return function(e){var t={type:"FeatureCollection"};return Object.keys(e).forEach(function(n){switch(n){case"type":case"features":return;default:t[n]=e[n]}}),t.features=e.features.map(function(e){return Ah(e)}),t}(e);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return Lh(e);default:throw new Error("unknown GeoJSON type")}}(e)),se(e,function(e){var r=re(function(e,t,n,r){void 0===r&&(r={});var o=t<0,i=function(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return X(Z(e,t),n)}(Math.abs(t),r.units,"meters");o&&(i=-Math.abs(i));var a=ne(e),s=function(e,t,n,r){var o=t/(r=void 0===r?W:Number(r)),i=e[0]*Math.PI/180,a=Q(e[1]),s=Q(n),l=o*Math.cos(s),c=a+l;Math.abs(c)>Math.PI/2&&(c=c>0?Math.PI-c:-Math.PI-c);var u=Math.log(Math.tan(c/2+Math.PI/4)/Math.tan(a/2+Math.PI/4)),h=Math.abs(u)>1e-11?l/u:Math.cos(a);return[(180*(i+o*Math.sin(s)/h)/Math.PI+540)%360-180,180*c/Math.PI]}(a,i,n);return s[0]+=s[0]-a[0]>180?-360:a[0]-s[0]>180?360:0,V(s,r.properties)}(e,t,n,{units:o}));e[0]=r[0],e[1]=r[1],i&&3===e.length&&(e[2]+=i)}),e}oh.exports=Sh,rh.default=Sh;const jh="meters",Rh=1.42;var Fh,Dh,zh,Nh;function Bh(e,t){void 0===t&&(t={});var n=oe(e);switch(t.properties||"Feature"!==e.type||(t.properties=e.properties),n.type){case"Polygon":return function(e,t){return void 0===t&&(t={}),Uh(oe(e).coordinates,t.properties?t.properties:"Feature"===e.type?e.properties:{})}(n,t);case"MultiPolygon":return function(e,t){void 0===t&&(t={});var n=oe(e).coordinates,r=t.properties?t.properties:"Feature"===e.type?e.properties:{},o=[];return n.forEach(function(e){o.push(Uh(e,r))}),J(o)}(n,t);default:throw new Error("invalid poly")}}function Uh(e,t){return e.length>1?function(e,t,n){return void 0===n&&(n={}),H({type:"MultiLineString",coordinates:e},t,n)}(e,t):G(e[0],t)}function Wh(e,t){var n=!0;return ue(e,function(e){ue(t,function(t){if(!1===n)return!1;n=function(e,t){switch(e.type){case"Point":switch(t.type){case"Point":return n=e.coordinates,r=t.coordinates,!(n[0]===r[0]&&n[1]===r[1]);case"LineString":return!$h(t,e);case"Polygon":return!Li(e,t)}break;case"LineString":switch(t.type){case"Point":return!$h(e,t);case"LineString":return!(Ch(e,t).features.length>0);case"Polygon":return!Hh(t,e)}break;case"Polygon":switch(t.type){case"Point":return!Li(t,e);case"LineString":return!Hh(e,t);case"Polygon":return!function(e,t){for(var n=0,r=e.coordinates[0];n<r.length;n++)if(Li(r[n],t))return!0;for(var o=0,i=t.coordinates[0];o<i.length;o++)if(Li(i[o],e))return!0;return Ch(Bh(e),Bh(t)).features.length>0}(t,e)}}var n,r;return!1}(e.geometry,t.geometry)})}),n}function $h(e,t){for(var n=0;n<e.coordinates.length-1;n++)if(Vh(e.coordinates[n],e.coordinates[n+1],t.coordinates))return!0;return!1}function Hh(e,t){for(var n=0,r=t.coordinates;n<r.length;n++)if(Li(r[n],e))return!0;return Ch(t,Bh(e)).features.length>0}function Vh(e,t,n){var r=n[0]-e[0],o=n[1]-e[1],i=t[0]-e[0],a=t[1]-e[1];return 0===r*a-o*i&&(Math.abs(i)>=Math.abs(a)?i>0?e[0]<=n[0]&&n[0]<=t[0]:t[0]<=n[0]&&n[0]<=e[0]:a>0?e[1]<=n[1]&&n[1]<=t[1]:t[1]<=n[1]&&n[1]<=e[1])}function qh(e,t,n){var r=re(n);if("LineString"!==ie(n))throw new Error("line must be a LineString");for(var o,i=Oh(n,e),a=Oh(n,t),s=[(o=i.properties.index<=a.properties.index?[i,a]:[a,i])[0].geometry.coordinates],l=o[0].properties.index+1;l<o[1].properties.index+1;l++)s.push(r[l]);return s.push(o[1].geometry.coordinates),G(s,n.properties)}function Gh(e,t){if(!new.target)return new Gh(e,t);if(Array.isArray(e)||(t=e,e=[]),t=t||{},this.data=e||[],this.length=this.data.length,this.compare=t.compare||Yh,this.setNodeId=t.setNodeId||Jh,this.length>0)for(var n=this.length>>1;n>=0;n--)this._down(n);if(t.setNodeId)for(n=0;n<this.length;++n)this.setNodeId(this.data[n],n)}function Jh(){}function Yh(e,t){return e-t}function Xh(e){this.node=e,this.parent=null,this.closed=!1,this.open=0,this.distanceToSource=Number.POSITIVE_INFINITY,this.fScore=Number.POSITIVE_INFINITY,this.heapIndex=-1}!function(e){e[e.TwoWay=2]="TwoWay",e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(Fh||(Fh={})),function(e){e.Transit="transit",e.Public="public"}(Dh||(Dh={})),function(e){e.Edge="what.route_edge",e.Network="what.route_network",e.PortalNetwork="what.link"}(zh||(zh={})),function(e){e.escalator="escalator",e.lift="lift",e.liftAnchor="liftAnchor",e.bus="airport_transfer",e.skytrain="skytrain",e.entrance="entrance",e.exit="exit",e.staircase="staircase",e.unknown=""}(Nh||(Nh={})),Gh.prototype={push:function(e){this.data.push(e),this.setNodeId(e,this.length),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var e=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this.setNodeId(this.data[0],0),this._down(0)),this.data.pop(),e}},peek:function(){return this.data[0]},updateItem:function(e){this._down(e),this._up(e)},_up:function(e){for(var t=this.data,n=this.compare,r=this.setNodeId,o=t[e];e>0;){var i=e-1>>1,a=t[i];if(n(o,a)>=0)break;t[e]=a,r(a,e),e=i}t[e]=o,r(o,e)},_down:function(e){for(var t=this.data,n=this.compare,r=this.length>>1,o=t[e],i=this.setNodeId;e<r;){var a=1+(e<<1),s=a+1,l=t[a];if(s<this.length&&n(t[s],l)<0&&(a=s,l=t[s]),n(l,o)>=0)break;t[e]=l,i(l,e),e=a}t[e]=o,i(o,e)}};const Zh=[];"function"==typeof Object.freeze&&Object.freeze(Zh);const Kh={heuristic:function(){return 0},distance:function(){return 1},blocked:function(){return!1},compareFScore:function(e,t){return e.fScore-t.fScore},NO_PATH:Zh,setHeapIndex:function(e,t){e.heapIndex=t},setH1:function(e,t){e.h1=t},setH2:function(e,t){e.h2=t},compareF1Score:function(e,t){return e.f1-t.f1},compareF2Score:function(e,t){return e.f2-t.f2}};var Qh=Kh.NO_PATH;function ep(e,t){var n=(t=t||{}).oriented,r=t.blocked;r||(r=Kh.blocked);var o=t.heuristic;o||(o=Kh.heuristic);var i=t.distance;i||(i=Kh.distance);var a=function(){var e=0,t=[];return{createNewState:function(n){var r=t[e];return r?(r.node=n,r.parent=null,r.closed=!1,r.open=0,r.distanceToSource=Number.POSITIVE_INFINITY,r.fScore=Number.POSITIVE_INFINITY,r.heapIndex=-1):(r=new Xh(n),t[e]=r),e++,r},reset:function(){e=0}}}();return{find:function(t,s){var l=e.getNode(t);if(!l)throw new Error("fromId is not defined in this graph: "+t);var c=e.getNode(s);if(!c)throw new Error("toId is not defined in this graph: "+s);a.reset();var u,h=new Map,p=new Gh({compare:Kh.compareFScore,setNodeId:Kh.setHeapIndex}),f=a.createNewState(l);for(h.set(t,f),f.fScore=o(l,c),f.distanceToSource=0,p.push(f),f.open=1;p.length>0;){if(tp(u=p.pop(),c))return np(u);u.closed=!0,e.forEachLinkedNode(u.node.id,d,n)}return Qh;function d(e,t){var n=h.get(e.id);if(n||(n=a.createNewState(e),h.set(e.id,n)),!n.closed&&(0===n.open&&(p.push(n),n.open=1),!r(e,u.node,t))){var s=u.distanceToSource+i(e,u.node,t);s>=n.distanceToSource||(n.parent=u,n.distanceToSource=s,n.fScore=s+o(n.node,c),p.updateItem(n.heapIndex))}}}}}function tp(e,t){return e.node===t}function np(e){for(var t=[e.node],n=e.parent;n;)t.push(n.node),n=n.parent;return t}function rp(e){if("uniqueLinkId"in(e=e||{})&&(e.multigraph=e.uniqueLinkId),void 0===e.multigraph&&(e.multigraph=!1),"function"!=typeof Map)throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var t,n=new Map,r=new Map,o={},i=0,a=e.multigraph?function(e,t,n){var r=sp(e,t),i=o.hasOwnProperty(r);if(i||_(e,t)){i||(o[r]=0);var a="@"+ ++o[r];r=sp(e+a,t+a)}return new ap(e,t,n,r)}:function(e,t,n){var o=sp(e,t),i=r.get(o);return i?(i.data=n,i):new ap(e,t,n,o)},s=[],l=x,c=x,u=x,h=x,p={version:20,addNode:m,addLink:function(e,t,n){u();var o=g(e)||m(e),i=g(t)||m(t),s=a(e,t,n),c=r.has(s.id);return r.set(s.id,s),ip(o,s),e!==t&&ip(i,s),l(s,c?"update":"add"),h(),s},removeLink:function(e,t){return void 0!==t&&(e=_(e,t)),b(e)},removeNode:y,getNode:g,getNodeCount:v,getLinkCount:w,getEdgeCount:w,getLinksCount:w,getNodesCount:v,getLinks:function(e){var t=g(e);return t?t.links:null},forEachNode:S,forEachLinkedNode:function(e,t,r){var o=g(e);if(o&&o.links&&"function"==typeof t)return r?function(e,t,r){for(var o=e.values(),i=o.next();!i.done;){var a=i.value;if(a.fromId===t&&r(n.get(a.toId),a))return!0;i=o.next()}}(o.links,e,t):function(e,t,r){for(var o=e.values(),i=o.next();!i.done;){var a=i.value,s=a.fromId===t?a.toId:a.fromId;if(r(n.get(s),a))return!0;i=o.next()}}(o.links,e,t)},forEachLink:function(e){if("function"==typeof e)for(var t=r.values(),n=t.next();!n.done;){if(e(n.value))return!0;n=t.next()}},beginUpdate:u,endUpdate:h,clear:function(){u(),S(function(e){y(e.id)}),h()},hasLink:_,hasNode:g,getLink:_,getLinkById:function(e){return void 0===e?void 0:r.get(e)}};return function(e){!function(e){if(!e)throw new Error("Eventify cannot use falsy object as events subject");const t=["on","fire","off"];for(let n=0;n<t.length;++n)if(e.hasOwnProperty(t[n]))throw new Error("Subject cannot be eventified, since it already has property '"+t[n]+"'")}(e);const t=function(e){let t=Object.create(null);return{on:function(n,r,o){if("function"!=typeof r)throw new Error("callback is expected to be a function");let i=t[n];return i||(i=t[n]=[]),i.push({callback:r,ctx:o}),e},off:function(n,r){if(void 0===n)return t=Object.create(null),e;if(t[n])if("function"!=typeof r)delete t[n];else{const e=t[n];for(let t=0;t<e.length;++t)e[t].callback===r&&e.splice(t,1)}return e},fire:function(n){const r=t[n];if(!r)return e;let o;arguments.length>1&&(o=Array.prototype.slice.call(arguments,1));for(let e=0;e<r.length;++e){const t=r[e];t.callback.apply(t.ctx,o)}return e}}}(e);e.on=t.on,e.off=t.off,e.fire=t.fire}(p),t=p.on,p.on=function(){return p.beginUpdate=u=E,p.endUpdate=h=T,l=f,c=d,p.on=t,t.apply(p,arguments)},p;function f(e,t){s.push({link:e,changeType:t})}function d(e,t){s.push({node:e,changeType:t})}function m(e,t){if(void 0===e)throw new Error("Invalid node identifier");u();var r=g(e);return r?(r.data=t,c(r,"update")):(r=new op(e,t),c(r,"add")),n.set(e,r),h(),r}function g(e){return n.get(e)}function y(e){var t=g(e);if(!t)return!1;u();var r=t.links;return r&&(r.forEach(b),t.links=null),n.delete(e),c(t,"remove"),h(),!0}function v(){return n.size}function w(){return r.size}function b(e){if(!e)return!1;if(!r.get(e.id))return!1;u(),r.delete(e.id);var t=g(e.fromId),n=g(e.toId);return t&&t.links.delete(e),n&&n.links.delete(e),l(e,"remove"),h(),!0}function _(e,t){if(void 0!==e&&void 0!==t)return r.get(sp(e,t))}function x(){}function E(){i+=1}function T(){0==(i-=1)&&s.length>0&&(p.fire("changed",s),s.length=0)}function S(e){if("function"!=typeof e)throw new Error("Function is expected to iterate over graph nodes. You passed "+e);for(var t=n.values(),r=t.next();!r.done;){if(e(r.value))return!0;r=t.next()}}}function op(e,t){this.id=e,this.links=null,this.data=t}function ip(e,t){e.links?e.links.add(t):e.links=new Set([t])}function ap(e,t,n,r){this.fromId=e,this.toId=t,this.data=n,this.id=r}function sp(e,t){return e.toString()+"👉 "+t.toString()}function lp(e,t){void 0===t&&(t={});var n="object"==typeof t?t.mutate:t;if(!e)throw new Error("geojson is required");var r=ie(e),o=[];switch(r){case"LineString":o=cp(e);break;case"MultiLineString":case"Polygon":re(e).forEach(function(e){o.push(cp(e))});break;case"MultiPolygon":re(e).forEach(function(e){var t=[];e.forEach(function(e){t.push(cp(e))}),o.push(t)});break;case"Point":return e;case"MultiPoint":var i={};re(e).forEach(function(e){var t=e.join("-");Object.prototype.hasOwnProperty.call(i,t)||(o.push(e),i[t]=!0)});break;default:throw new Error(r+" geometry not supported")}return e.coordinates?!0===n?(e.coordinates=o,e):{type:r,coordinates:o}:!0===n?(e.geometry.coordinates=o,e):H({type:r,coordinates:o},e.properties,{bbox:e.bbox,id:e.id})}function cp(e){var t=re(e);if(2===t.length&&!up(t[0],t[1]))return t;var n=[],r=t.length-1,o=n.length;n.push(t[0]);for(var i=1;i<r;i++){var a=n[n.length-1];t[i][0]===a[0]&&t[i][1]===a[1]||(n.push(t[i]),(o=n.length)>2&&hp(n[o-3],n[o-1],n[o-2])&&n.splice(n.length-2,1))}if(n.push(t[t.length-1]),o=n.length,up(t[0],t[t.length-1])&&o<4)throw new Error("invalid polygon");return hp(n[o-3],n[o-1],n[o-2])&&n.splice(n.length-2,1),n}function up(e,t){return e[0]===t[0]&&e[1]===t[1]}function hp(e,t,n){var r=n[0],o=n[1],i=e[0],a=e[1],s=t[0],l=t[1],c=s-i,u=l-a;return 0===(r-i)*u-(o-a)*c&&(Math.abs(c)>=Math.abs(u)?c>0?i<=r&&r<=s:s<=r&&r<=i:u>0?a<=o&&o<=l:l<=o&&o<=a)}function pp(e,t=!0){const n=Ws.getState().data;if(!n.hasOwnProperty(zh.Network))return[];const r=n[zh.Network],o=[];for(let n=0;n<r.length;n++){const i=r[n];i&&i.properties&&i.properties.dimension_where&&(t?i.properties.dimension_where.includes(e)&&o.push(i):i.properties.dimension_where===e&&o.push(i))}return th.cloneDeep(o)}function fp(e,t=!0){return pp(e,t)}function dp(e){const t=function(e){const t=Ws.getState().data;if("string"==typeof e){if(!e||!t.hasOwnProperty(zh.Edge)||!t[zh.Edge].edges.hasOwnProperty(e))return;return th.cloneDeep(t[zh.Edge].edges[e])}{const n=pp(e.whereDimension);if(n.length<1)return null;let r,o,i=1/0;n.map(t=>{const n=Oh(lp(t),e.sourceCoords),a=ae(n.geometry.coordinates,e.sourceCoords);a<i&&(i=a,r=n,o=t)});const a=[G([e.sourceCoords,r.geometry.coordinates],{title:"user_edgeLine",zone:o.properties.zone,wheelchair:1,direction:Fh.TwoWay,dimension_where:e.whereDimension})],s={id:"user_position",name:"Custom Position",coords:e.sourceCoords,lines:a,where:e.whereDimension,what:"",zone:o.properties.zone};return t[zh.Edge][s.id]=s,s}}(e);return t}function mp(e){return function(e){const t=Ws.getState().data;return e&&t.hasOwnProperty("what.service.immigration")&&t["what.service.immigration"].hasOwnProperty(e)?t["what.service.immigration"][e]:[]}(e)}ep.l2=function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)},ep.l1=function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.abs(n)+Math.abs(r)};const gp=.001;function yp(e,t,n=!0){const r=(n,r)=>{const o=Oh(lp(r),n);void 0!==o.properties.index&&(t.geometry.coordinates.splice(o.properties.index+1,0,e.geometry.coordinates),t.properties&&(t.properties.modified=1))};if(n){const n=function(e,t){let n=-1;return se(e,(e,r,o,i,a)=>{if(-1===n){const o=V(e);ae(t,o,{units:"meters"})<gp&&(n=r)}}),n}(t,e);-1===n?r(e.geometry.coordinates,t):(t.geometry.coordinates[n]=e.geometry.coordinates,t.properties&&(t.properties.modified=1))}else r(e.geometry.coordinates,t)}function vp(e,t){const n=rh();n.load(t),e.forEach(e=>{const t=Oi(e);n.search(t).features.forEach(t=>{const n=t;if(e.properties&&e.properties.dimension_where&&n.properties&&n.properties.dimension_where&&e.properties.dimension_where===n.properties.dimension_where){!function(e,t){"LineString"===ie(e)&&se(e,(n,r,o,i,a)=>{const s=V(n),l=Oh(lp(t),s,{units:"meters"});if(l&&void 0!==l.properties.dist&&void 0!==l.properties.index){const n=V(t.geometry.coordinates[l.properties.index]);ae(s,n,{units:"meters"})<gp?(l.geometry.coordinates=n.geometry.coordinates,e.geometry.coordinates[r]=l.geometry.coordinates,e.properties&&(e.properties.modified=1)):l.properties.dist<gp&&(e.geometry.coordinates[r]=l.geometry.coordinates,t.geometry.coordinates.splice(l.properties.index+1,0,l.geometry.coordinates),e.properties&&(e.properties.modified=1))}})}(e,n);const t=Ch(e,n);if(t.features.length>0)for(let r=0;r<t.features.length;r+=1){const o=t.features[r];yp(o,e,!1),yp(o,n,!1)}}})})}function wp(e){const t=e.split("."),n=t[t.length-1];return e.replace(".".concat(n),"")}function bp(e,t){const n=[],r={};for(const o in e)if(e[o].where.includes(t)){const t=e[o];r[o]=t,n.push(...t.lines),t.links.forEach(e=>{n.push(...e.lines)})}return{edgeData:r,lines:n}}function _p(e,t){const n=[],r={};return t.forEach(o=>{if(o in e&&t.has(e[o].id)){const t=e[o];r[o]=t,n.push(...t.lines),t.links.forEach(e=>{n.push(...e.lines)})}}),{edgeData:r,lines:n}}const xp=function(){let e,t,n="where.singapore",r=!0,o=!0,i=!1,a={edgeData:{},lines:[]};function s(e,t,n,r,o,i,a=!1){const s=`${t.toString()},${r}`;let l=e.getNode(s);if(void 0===l){const a={mapObjectId:n,coords:t,where:r,what:o,zone:i,zoneUnionVertex:!1};l=e.addNode(s,a)}else a&&(l.data.mapObjectId=n,l.data.zone!==i&&(l.data.zoneUnionVertex=!0),l.data.zone=i);return l}function l(e,t,n,o){const{cost:i,description:a}=o,s=o.isPortal?i/Rh:i;(!r||r&&o.wheelChairAccesible)&&e.addLink(t.id,n.id,{weight:s,cost:i,description:a})}function c(e,t){return ae(V(e),V(t),{units:"meters"})}function u(e,t){const n=t;if(n){const t=s(e,n.coords,n.id,n.where,n.what,n.zone,!0);for(let t=0;t<n.lines.length;t+=1){const r=n.lines[t],o=re(r);for(let t=0;t<o.length-1;t+=1){const i=s(e,o[t],"vertex",n.where,zh.Edge,r.properties.zone),a=s(e,o[t+1],"vertex",n.where,zh.Edge,r.properties.zone);if(i.id!==a.id){const n=c(o[t],o[t+1]);r.properties.direction!==Fh.Forward&&r.properties.direction!==Fh.TwoWay||l(e,i,a,{wheelChairAccesible:r.properties.wheelchair,cost:n,isPortal:!1,description:null}),r.properties.direction!==Fh.Backward&&r.properties.direction!==Fh.TwoWay||l(e,a,i,{wheelChairAccesible:r.properties.wheelchair,cost:n,isPortal:!1,description:null})}}}return t}}function h(e,t){const n=t;if(void 0!==n)return s(e,n.coords,n.id,n.where,n.what,n.zone,!0)}function p(e){return{type:"Feature",geometry:{type:"LineString",coordinates:[e.data.coords]},properties:{dimension_where:e.data.where,zone:e.data.zone,cost:0}}}function f(t,n,r,i){const f=rp(),d=u(f,t),m=u(f,n);if(d&&m){!function(e,t){for(const n in t){const r=t[n];for(let t=0;t<r.links.length;t+=1){const n=r.links[t];let{cost:o}=n;o=th.toInteger(o);const{direction:i,wheelchair:a,description:s}=n,c=h(e,r),p=h(e,n);void 0!==c&&void 0!==p&&c.id!==p.id&&(i!==Fh.Forward&&i!==Fh.TwoWay||l(e,c,p,{wheelChairAccesible:a,cost:o,description:s,isPortal:!0}),i!==Fh.Backward&&i!==Fh.TwoWay||l(e,p,c,{wheelChairAccesible:a,cost:o,description:s,isPortal:!0}),u(e,n))}u(e,r)}}(f,r),function(e,t){for(let n=0;n<t.length;n+=1){const r=t[n];if("LineString"===r.geometry.type){const t=re(r);if(r.properties){const n=r.properties.dimension_where,o=zh.Network,{zone:i}=r.properties;for(let a=0;a<t.length-1;a+=1){const u=s(e,t[a],"vertex",n,o,i,!0),h=s(e,t[a+1],"vertex",n,o,i,!0);if(u.id!==h.id){const n=c(t[a],t[a+1]);r.properties.direction!==Fh.Forward&&r.properties.direction!==Fh.TwoWay||l(e,u,h,{wheelChairAccesible:r.properties.wheelchair,cost:n,isPortal:!1,description:null}),r.properties.direction!==Fh.Backward&&r.properties.direction!==Fh.TwoWay||l(e,h,u,{wheelChairAccesible:r.properties.wheelchair,cost:n,isPortal:!1,description:null})}}}}}}(f,i);const g=function(t,n,r){return ep(r,{oriented:!0,distance:(e,t,n)=>n.data.weight,blocked(t,n,r){if(o&&(null==t?void 0:t.data.zone)!==(null==n?void 0:n.data.zone)){const r=wp(t.data.where),o=wp(e.where),i=wp(n.data.where);if(r!==o&&i!==o)return!0}return!1}}).find(t.id,n.id).reverse()}(d,m,f),y=function(e,t,n,r){if(n.length<=1)return{};const o=e,i=t,s=[];let l=n[0].data;const c=[p(n[0])];for(let e=1;e<n.length;e+=1){const t=n[e],o=n[e-1],i=c[c.length-1];if("vertex"!==t.data.mapObjectId||t.data.zoneUnionVertex){let c;if(Rp(o.data.what)&&Rp(t.data.what)){let e;if(o.data.zone,t.data.zone,Mp(o.data.what)){const n=(e,t,n,r=!1)=>{const o=n.data.mapObjectId,i=_p(e,(new Set).add(o));if(i&&i.edgeData[o]){const e=i.edgeData[o];for(let o=0;o<e.links.length;o+=1){const i=e.links[o];if(i.id===t.data.mapObjectId&&i.pathFeatures&&i.pathFeatures.length>0){const e=i.pathFeatures[0],o=!1===r?n.data.coords:t.data.coords,a=!1===r?t.data.coords:n.data.coords;return G(ae(o,e.geometry.coordinates[0])<ae(a,e.geometry.coordinates[0])?e.geometry.coordinates:e.geometry.coordinates.slice().reverse())}}}return null};e=n(a.edgeData,t,o,!1),e||(e=n(a.edgeData,o,t,!0))}const n=r.getLink(o.id,t.id),i=n&&n.data.cost?n.data.cost:void 0,u=n&&n.data.description?n.data.description:void 0;c={geojson:Y([o.data.coords,t.data.coords],{zone:t.data.zone}),edges:[o.data.mapObjectId,t.data.mapObjectId],startFloor:o.data.where,endFloor:t.data.where,isPortal:!0,portalPath:e,cost:i,description:u},s.push(c),l=t.data}else{const r=e+1<n.length?n[e+1]:void 0;t.data.zoneUnionVertex&&o&&r&&(null==o?void 0:o.data.zone)===(null==r?void 0:r.data.zone)||(c={geojson:i,edges:[l.mapObjectId,t.data.mapObjectId],startFloor:l.where,endFloor:l.where,isPortal:!1,portalPath:void 0,cost:i.properties.cost},s.push(c),l=t.data)}}if(Rp(o.data.what)&&Rp(t.data.what))i.geometry.coordinates.length<2&&c.pop(),c.push(p(t));else{const e=r.getLink(o.id,t.id),n=e&&e.data.cost?e.data.cost:void 0;i.geometry.coordinates.push(t.data.coords),i.properties.cost+=n}if(t.data.zoneUnionVertex){const r=e>0?n[e-1]:void 0,o=e+1<n.length?n[e+1]:void 0;if(r&&o&&(null==r?void 0:r.data.zone)===(null==o?void 0:o.data.zone));else if(o){const e=th.cloneDeep(t);e.data.zone=o.data.zone,c.push(p(e))}else c.push(p(t))}}return{startNode:o,endNode:i,routes:s,distance:0}}(t,n,g,f);return y}return{}}function d(e,t,r){const o=new Set;for(let e=0;r.routes&&e<r.routes.length;e+=1){const t=r.routes[e];t.isPortal&&(o.add(t.edges[0]),o.add(t.edges[1]))}let s=performance.now();const l=fp(n),c=_p(a.edgeData,o);s=performance.now();const u=e.lines.concat(t.lines,c.lines),h=l;return i&&vp(u,h),f(e,t,c.edgeData,h)}return{getRoute:function(s,l,c){if(r=c,s===l)return{};"string"==typeof s&&"string"==typeof l||(i=!0);const u=dp(s),h=dp(l);if(e=u,t=h,e&&e.where){const t=e.where.split(".");t.length>=2&&(n=`${t[0]}.${t[1]}`)}let p=performance.now();if(a=function(){const e=Ws.getState().data;return e.hasOwnProperty("portal")?e.portal:{edgeData:{},lines:[]}}(),p=performance.now(),e&&t){o=!0;const r=()=>{const r=function(e,t){let n=performance.now();const r=fp(wp(e.where)),o=fp(wp(t.where)),s=bp(a.edgeData,wp(e.where)),l=bp(a.edgeData,wp(t.where));n=performance.now();const c=e.lines.concat(t.lines,s.lines,l.lines),u=r.concat(o);return i&&vp(c,u),f(e,t,Object.assign(Object.assign({},s.edgeData),l.edgeData),u)}(e,t);if(th.isEmpty(r)){const r=function(e,t){let r=performance.now();const o=fp(n);r=performance.now();const s=e.lines.concat(t.lines,a.lines),l=o;return i&&vp(s,l),f(e,t,a.edgeData,l)}(e,t);return d(e,t,r)}return d(e,t,r)};let s=r();return th.isEmpty(s)&&(o=!1,s=r()),s}return{}}}}();var Ep,Tp,Sp;function Cp(e){const t=dp(e.edges[0]),n=dp(e.edges[1]);return{maneuverType:Ep.Static,coordinates:[],distance:0,features:[],time:0,startEdge:{mapObjectId:e.edges[0],whereDimension:e.startFloor,whatDimension:t?t.what:"",name:t?t.name:"Your Location"},endEdge:{mapObjectId:e.edges[1],whereDimension:e.endFloor,whatDimension:n?n.what:"",name:n?n.name:""},isPortal:e.isPortal,instructions:[],patchNumber:-1,whereDimension:"",zone:"",cost:e.cost,description:e.description}}function Pp(e){return e.maneuverType===Ep.RouteOverview||e.maneuverType===Ep.SectionOverview}function Op(e,t){for(let n=0;n<e.length;n+=1){e[n].properties.highlight=!!t}return e}function Ap(e,t,n,r,o=""){if(0===e.length)return[];const i=[V(e,{segmentNumber:t,dimension_where:o,patchNumber:r,isNode:!0})];return Op(i,n),i}function kp(e,t,n,r,o,i=""){if(0===e.length)return[];const a={segmentNumber:t,dimension_where:i,patchNumber:r,isNode:!1,zone:o},s=G(e,Object.assign(Object.assign({},a),{featureBelongsToLineString:!0})),l=V(e[0],Object.assign(Object.assign({},a),{featureBelongsToLineString:!1})),c=V(e[e.length-1],Object.assign(Object.assign({},a),{featureBelongsToLineString:!1})),u=[];return u.push(l,s,c),Op(u,n),u}function Lp(e,t=0){const n=th.cloneDeep(e.segments[1]),r=e.segments.length>1?e.segments[1].startEdge.whereDimension:"";n.coordinates=[],n.features=[],n.time=0,n.distance=0,n.isPortal=!1,n.maneuverType=Ep.RouteOverview,n.patchNumber=t,n.instructions=["Overview"];for(let t=1;t<e.segments.length;t+=1)if(e.segments[t].maneuverType!==Ep.SectionOverview){for(let r=0;r<e.segments[t].coordinates.length;r+=1){const o=e.segments[t].coordinates[r];n.coordinates.push(o)}for(let o=0;o<e.segments[t].features.length;o+=1){const i=th.cloneDeep(e.segments[t].features[o]);i.properties&&!i.properties.isNode&&(i.properties.dimension_where!==r?i.properties.isNonHighlightedOverview="1":i.properties.isNonHighlightedOverview="0",i.properties.dimension_where=r,i.properties.patchNumber=n.patchNumber,i.properties.segmentNumber=n.patchNumber,n.features.push(i))}}return n.endEdge=th.cloneDeep(e.segments[e.segments.length-1].endEdge),n.time=e.walkingTime+e.transportTime,n.distance=e.walkingDistance+e.transportDistance,n}function Ip(e,t,n){var r;let o=[];for(let i=0;i<e.segments.length;i+=1){const a=e.segments[i];if(n.includeOverviewFeatures){if(Pp(a)){const e=[],t=[];for(let o=0;o<a.features.length;o++){const i=a.features[o];void 0!==(null===(r=i.properties)||void 0===r?void 0:r.patchNumber)&&i.properties.patchNumber===n.patchNumberForOverviewFeatures&&void 0!==i.properties.isNonHighlightedOverview&&("1"===i.properties.isNonHighlightedOverview?e.push(i):t.push(i))}const i=e.concat(t);o=o.concat(i)}}else a.patchNumber===t&&(Pp(a)||(o=o.concat(a.features)))}return o}function Mp(e){return!!Object.values(Tp).includes(e)}function jp(e){return!!Object.values(Sp).includes(e)}function Rp(e){return!(!Mp(e)&&!jp(e))}function Fp(e){switch(e){case"what.transport.skytrain":return"Skytrain";case"what.service.airport_transfer":return"Bus";case"what.infra.escalator":return"Escalator";case"what.infra.lift":return"Lift";case"what.infra.entrance":case"what.infra.exit":return"";default:return e}}function Dp(e,t){const n=function(e){const t=e.split(".").slice(-2).join("").toUpperCase().match(/^(T\d+|JEWEL)([A-Za-z]\d+[A-Za-z]?)$/);if(t){let e;switch(t[1][0]){case"T":e="Terminal";break;case"J":e="Jewel";break;default:e="Level"}const n="Terminal"===e?`${e} ${t[1][1]}`:`${e}`;let r;switch(t[2][0]){case"L":default:r="Level";break;case"B":r="Basement"}return{Terminal:n,Level:`${r} ${t[2].substring(1)}`}}return null}(t);if(n){if((r=e)===Tp.Skytrain||r===Tp.Bus)return n.Terminal;if(e===Tp.Escalator||e===Tp.Lift)return n.Level;if(jp(e))return n.Terminal}var r;return t.split(".").slice(-2).join(" ").toUpperCase()}!function(e){e.RouteOverview="Route Overview",e.SectionOverview="Section Overview",e.LeftHairPinTurn="Left hairpin turn",e.RightHairPinTurn="Right hairpin turn",e.LeftTurn="Turn left",e.RightTurn="Turn right",e.ContinueStraight="Continue straight",e.EnterPortal="Enter Portal",e.TravelPortal="Travel Portal",e.ExitPortal="Exit Portal",e.Static="Static",e.ChangeZone="Change Zone",e.PassThroughImmigration="Pass Through Immigration"}(Ep||(Ep={})),function(e){e.Skytrain="what.transport.skytrain",e.Bus="what.service.airport_transfer",e.Escalator="what.infra.escalator",e.Lift="what.infra.lift"}(Tp||(Tp={})),function(e){e.Entrance="what.infra.entrance",e.Exit="what.infra.exit"}(Sp||(Sp={}));const zp=["match",["get","isNonHighlightedOverview"],"1","#A7A6BA","0",["match",["get","zone"],"transit","#4F7EF8","public","#CF9FFF","#CF9FFF"],["match",["get","zone"],"transit","#4F7EF8","public","#CF9FFF","#CF9FFF"]],Np=[{id:"route-line-outline-inactive",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","highlight"],!1]],paint:{"line-color":"#FFFFFF","line-gap-width":6},layout:{"line-cap":"round","line-join":"round"}},{id:"route-line-inactive",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","highlight"],!1]],style:{lineCap:"round",lineJoin:"round",lineColor:zp,lineWidth:5},paint:{"line-color":zp,"line-width":5},layout:{"line-cap":"round","line-join":"round"},belowLayerID:"route-line-animate"},{id:"route-line-active",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","highlight"],!0]],style:{lineCap:"round",lineJoin:"round",lineColor:zp,lineWidth:6},paint:{"line-color":zp,"line-width":6},layout:{"line-cap":"round","line-join":"round"},belowLayerID:"route-line-animate"},{id:"route-line-outline-active",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","highlight"],!0]],style:{lineCap:"round",lineJoin:"round",lineColor:"#FFFFFF",lineGapWidth:6},paint:{"line-color":"#FFFFFF","line-gap-width":6},layout:{"line-cap":"round","line-join":"round"}},{id:"route-line-endpoint-active",type:"circle",filter:["all",["==",["geometry-type"],"Point"],["==",["get","highlight"],!0],["==",["get","isNode"],!0]],style:{circleRadius:2,circleOpacity:0,circleStrokeWidth:2,circleStrokeColor:"#FFFFFF",circleStrokeOpacity:.7},paint:{"circle-radius":2,"circle-opacity":0,"circle-stroke-width":2,"circle-stroke-color":"#FFFFFF","circle-stroke-opacity":.7}},{id:"route-line-endpoint-fill-active",type:"circle",filter:["all",["==",["geometry-type"],"Point"],["==",["get","highlight"],!0],["==",["get","isNode"],!0]],style:{circleRadius:2,circleColor:"#FFFFFF",circleOpacity:.7},paint:{"circle-color":"#FFFFFF","circle-radius":2,"circle-opacity":.7}}],Bp=[{id:"route-line-animate",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","highlight"],!0]],style:{lineCap:"round",lineJoin:"round",lineColor:"#FFFFFF",lineOpacity:.7,lineWidth:4},paint:{"line-color":"#FFFFFF","line-width":4,"line-opacity":.7},layout:{"line-cap":"round","line-join":"round"},isAnimationLayer:!0}];class Up{constructor(e){this.routeSourceName="routeGeojson",this.patchFeatureCollection={type:"FeatureCollection",features:[]},this.highlightedSegmentNumber=-1,this.currentPatchNumber=-1,this.animateRouteSourceName="routeAnimateGeojson",this.animationFrameID=-1,this.animateRouteSegmentFeatureCollection={type:"FeatureCollection",features:[]},this.animationStartTime=0,this.end={from:0,to:0},this.animateHighlightedRouteSegment=()=>{const e=th.cloneDeep(this.animateRouteSegmentFeatureCollection.features[0]);if(e){const t=Date.now()-this.animationStartTime,n=(e,t)=>{e.geometry.coordinates=t;const n=this.map.getSource(this.animateRouteSourceName);n&&n.setData({type:"FeatureCollection",features:[e]})},r=2e3;if(t<r){const o=1-t/r,i=e.geometry.coordinates,{end:a}=this;let s;if(o>.5){const e=2*(o-.5);s=a.from*(1-e)+e*a.to}else{const e=2*o;s=a.from*(1-e)+e*a.to}let l=0,c=0,u=i.length-1;for(;c<s&&u>0;)l=c,c+=ae(V(i[u]),V(i[u-1])),u-=1;if(o>.5){const t=(s-l)/(c-l),r=1-t;n(e,[...i.slice(0,u+1),[i[u][0]*t+i[u+1][0]*r,i[u][1]*t+i[u+1][1]*r]])}else{c<=s&&n(e,[...i.slice(i.length-2,i.length)]);const t=(s-l)/(c-l),r=1-t;n(e,[[i[u][0]*t+i[u+1][0]*r,i[u][1]*t+i[u+1][1]*r],...i.slice(u+1,i.length)])}this.animationFrameID=requestAnimationFrame(this.animateHighlightedRouteSegment)}else this.resetRouteSegmentAnimation()}},this.main=e}getCurrentFocus(){return this.main.getCurrentFocus()}filterWhereDimension(e){this.main.focusTo(e,!1)}setupRouting(e){this.map=e,this.map.addSource(this.routeSourceName,{type:"geojson",data:this.patchFeatureCollection});for(const e of Np)e.source=this.routeSourceName,this.map.addLayer(e);this.map.addSource(this.animateRouteSourceName,{type:"geojson",data:this.animateRouteSegmentFeatureCollection});for(const e of Bp)e.source=this.animateRouteSourceName,this.map.addLayer(e)}computeRoute(e,t,n=!1,r=!0,o=0){return F(this,void 0,void 0,function*(){this.currentPatchNumber=-1;const i=yield function(e,t,n,r=!0,o=0){return F(this,void 0,void 0,function*(){const i=xp.getRoute(e,t,n).routes,a=[];let s;for(let e=0;i&&e<i.length;e+=1){const t=i[e],n=t.geojson.properties.zone;if(t.isPortal){s=Object.assign(Object.assign({},Cp(t)),{maneuverType:Ep.Static,coordinates:[t.geojson.geometry.coordinates[1]],zone:n,isPortal:!1});const e=Object.assign(Object.assign({},Cp(t)),{maneuverType:Ep.EnterPortal,coordinates:[t.geojson.geometry.coordinates[0]]});a.push(e);const r=Object.assign(Object.assign({},Cp(t)),{maneuverType:Ep.ExitPortal,coordinates:[t.geojson.geometry.coordinates[1]]});a.push(r);const o=a.length>0?a[a.length-1]:void 0;if(o&&o.maneuverType===Ep.ExitPortal){if(a.pop(),t.portalPath){const e=Object.assign(Object.assign({},Cp(t)),{maneuverType:Ep.TravelPortal,coordinates:t.portalPath.geometry.coordinates,zone:n});a.push(e)}a.push(r)}}else{const r=t.geojson.geometry.coordinates;let o=Ep.Static;if(0===a.length){const e=Object.assign(Object.assign({},Cp(t)),{maneuverType:Ep.Static,coordinates:[r[0]]});a.push(e)}if(e>0&&a.length>0){const t=i[e-1];if(n!==t.geojson.properties.zone){const e=t.geojson.geometry.coordinates,r=Object.assign(Object.assign({},Cp(t)),{maneuverType:Ep.ChangeZone,zone:n,coordinates:[e[e.length-1]]});a.push(r),o=Ep.ChangeZone}}if(r.length>2)for(let e=0;e<r.length-2;e+=1){const i=r[e],l=r[e+1],c=r[e+2];let u;s=Object.assign(Object.assign({},Cp(t)),{maneuverType:Ep.Static,coordinates:[c],zone:n}),u=Ep.ContinueStraight;const h=Object.assign(Object.assign({},Cp(t)),{maneuverType:u,zone:n});o===Ep.ContinueStraight?(e+3===r.length?a[a.length-1].coordinates.push(l,c):a[a.length-1].coordinates.push(l),a[a.length-1].maneuverType=u):(h.coordinates.push(i,l),a.push(h),e+3===r.length&&(u===Ep.ContinueStraight?a[a.length-1].coordinates.push(c):a.push(Object.assign(Object.assign({},Cp(t)),{maneuverType:Ep.ContinueStraight,coordinates:[l,c],zone:n})))),o=u}else{const e=Object.assign(Object.assign({},Cp(t)),{maneuverType:Ep.ContinueStraight,coordinates:r,zone:n});a.push(e)}const l=()=>{if(a.length>0){const e=a[a.length-1];e.maneuverType===Ep.ChangeZone&&e.zone===Dh.Transit&&a.pop()}};let c=a.length>0?a[a.length-1]:void 0;if(c&&c.maneuverType===Ep.ContinueStraight){const e=mp(c.startEdge.whereDimension),r=G(c.coordinates);for(let o=0;o<e.length;o+=1){const i=e[o];if(!Wh(r,i)){const e=Ch(r,i);if(e.features.length>1){a.pop();const o=qh(re(r)[0],ne(e.features[0]),r);if(he(o,{units:"meters"})>=10){const e=Object.assign(Object.assign({},Cp(t)),{maneuverType:Ep.ContinueStraight,zone:n,coordinates:re(o)});a.push(e)}else if(a.length>0)if(c=a[a.length-1],c.maneuverType===Ep.ChangeZone){const e=re(o);if(c.coordinates=[e[e.length-1]],a.length>1){const e=a[a.length-2];e.coordinates=e.coordinates.concat(re(o))}}else c.coordinates.concat(re(o));const i=qh(ne(e.features[0]),ne(e.features[1]),r),s=Object.assign(Object.assign({},Cp(t)),{maneuverType:Ep.PassThroughImmigration,zone:n,coordinates:re(i)});0===a.length&&(s.coordinates=o.geometry.coordinates.concat(s.coordinates)),l(),a.push(s);const u=re(r),h=qh(ne(e.features[1]),u[u.length-1],r),p=Object.assign(Object.assign({},Cp(t)),{maneuverType:Ep.ContinueStraight,zone:n,coordinates:re(h)});a.push(p)}else if(e.features.length>0)if(Li(re(r)[0],i)){a.pop();const o=qh(re(r)[0],ne(e.features[0]),r),i=Object.assign(Object.assign({},Cp(t)),{maneuverType:Ep.PassThroughImmigration,zone:n,coordinates:re(o)});if(c=a.length>0?a[a.length-1]:void 0,c&&c.maneuverType===Ep.ChangeZone){const e=a.pop();if(a.length>1){const t=a[a.length-1];t.maneuverType===Ep.PassThroughImmigration&&(a.pop(),e.coordinates=[t.coordinates[0]],a.push(e),i.coordinates=t.coordinates.concat(i.coordinates))}}l(),a.push(i);const s=re(r),u=qh(ne(e.features[0]),s[s.length-1],r),h=Object.assign(Object.assign({},Cp(t)),{maneuverType:Ep.ContinueStraight,zone:n,coordinates:re(u)});a.push(h)}else{const o=qh(re(r)[0],ne(e.features[0]),r);c.coordinates=re(o);const i=re(r),s=qh(ne(e.features[0]),i[i.length-1],r),l=Object.assign(Object.assign({},Cp(t)),{maneuverType:Ep.PassThroughImmigration,zone:n,coordinates:re(s)});a.push(l)}}}}}}s&&a.push(s);const l={segments:a,walkingDistance:0,transportDistance:0,walkingTime:0,transportTime:0,distanceUnit:jh,speed:Rh};if(l.segments.length>0){const e=r;let t=0;if(e){const e=th.cloneDeep(l.segments[0]);e.maneuverType=Ep.RouteOverview,l.segments.unshift(e),t=1}let n=o+t,i=l.segments.length>t?l.segments[t].startEdge.whereDimension:"";for(let e=t;e<l.segments.length;e+=1){const t=!1,r=l.segments[e],a=o+e;if(r.isPortal){if(r.maneuverType===Ep.EnterPortal){const o=Ap(r.coordinates[0],a,t,n,r.startEdge.whereDimension),s=[];for(const e of o)s.push(e);r.features=s,r.patchNumber=n,r.whereDimension=i;const c=l.segments.length>=e+2?l.segments[e+1]:void 0;if(c&&c.maneuverType!==Ep.TravelPortal){const e=r.cost;r.time=e||0}else r.time=0;r.distance=0}if(r.maneuverType===Ep.TravelPortal){r.features=kp(r.coordinates,a,t,n,r.zone,r.startEdge.whereDimension),r.patchNumber=n,r.whereDimension=i;const o=r.cost;let s;r.time=o||0,s=r.coordinates.length>1?he(G(r.coordinates),{units:l.distanceUnit}):0,r.distance=s,e>0&&(l.segments[e-1].time=0)}r.maneuverType===Ep.ExitPortal&&(n+=1,i=r.endEdge.whereDimension,l.segments.splice(e,1),e-=1);const o=l.segments.length>=e+2?l.segments[e+1]:void 0;o&&o.maneuverType===Ep.TravelPortal&&(n+=1)}else{r.maneuverType===Ep.Static||r.maneuverType===Ep.ChangeZone?(r.features=Ap(r.coordinates[0],a,t,n,r.endEdge.whereDimension),r.patchNumber=n,r.whereDimension=i):(r.features=kp(r.coordinates,a,t,n,r.zone,r.startEdge.whereDimension),r.patchNumber=n,r.whereDimension=i);const e=r.coordinates;let o;o=e.length>1?he(G(e),{units:l.distanceUnit}):0,r.distance=o,r.maneuverType!==Ep.PassThroughImmigration?r.time=r.distance/l.speed:r.time=0}r.maneuverType===Ep.TravelPortal?(l.transportDistance+=r.distance,l.transportTime+=r.time):(l.walkingDistance+=r.distance,l.walkingTime+=r.time)}if(e){const e=Lp(l,o);l.segments[0]=e}}return l})}(e,t,n,r,o);return function(e){const t=t=>0===t||1===t&&e.segments[t-1].maneuverType===Ep.RouteOverview,n=e=>e.startEdge.whereDimension.toLowerCase().includes("l1")?"Clear Arrival Immigration":"Clear Departure Immigration";for(let r=0;r<e.segments.length;r+=1){const o=e.segments[r];if(o.instructions=[],o.maneuverType===Ep.RouteOverview){const e="Overview";o.instructions.push(e)}if(r>0&&o.maneuverType===Ep.ChangeZone){let t="";e.segments[r-1].zone===Dh.Public&&o.zone===Dh.Transit?t=n(o):e.segments[r-1].zone===Dh.Transit&&o.zone===Dh.Public&&(t="Exit Baggage Claim Hall"),o.instructions.push(t)}else if(o.maneuverType===Ep.ContinueStraight||o.maneuverType===Ep.PassThroughImmigration){const t=o.maneuverType===Ep.ContinueStraight?`Walk for ${Math.ceil(o.distance)} ${e.distanceUnit}`:n(o);let i;e.segments[r-1].maneuverType===Ep.ChangeZone||(e.segments[r-1].maneuverType,Ep.PassThroughImmigration),i=t,o.instructions.push(i)}else if(o.maneuverType===Ep.Static)t(r)&&o.instructions.push(`Start at ${o.startEdge.name}`),r===e.segments.length-1&&o.instructions.push(`Arrive at ${o.endEdge.name}`);else if(o.maneuverType===Ep.EnterPortal){let t=`Enter ${o.startEdge.name} at ${o.startEdge.whereDimension.split(".").slice(-2).join(" ").toUpperCase()}`;if(jp(o.startEdge.whatDimension))t=`Continue to ${Dp(o.startEdge.whatDimension,o.endEdge.whereDimension)}`,o.instructions.push(t);else if(Mp(o.startEdge.whatDimension)){const n=r+1<=e.segments.length-1?e.segments[r+1]:void 0;n&&n.maneuverType===Ep.TravelPortal?(o.instructions.push(t),r+=1,t=`Take ${Fp(n.startEdge.whatDimension)} to ${Dp(o.startEdge.whatDimension,o.endEdge.whereDimension)}`,n.instructions.push(t),o.description&&n.instructions.push(o.description)):(t=`Take ${Fp(o.startEdge.whatDimension)} to ${Dp(o.startEdge.whatDimension,o.endEdge.whereDimension)}`,o.instructions.push(t))}}}}(i),i})}handleAllRouteUpdate(e,t,n){const r=e[n].features.filter(e=>"LineString"===e.geometry.type)[0],o=G(r.geometry.coordinates.slice(1)),i=Oh(G([r.geometry.coordinates[0],r.geometry.coordinates[1]]),t.sourceCoords);o.geometry.coordinates.unshift(t.sourceCoords,i.geometry.coordinates);const a=o.geometry.coordinates,s=i.properties.index,l=a.slice(s);o.geometry.coordinates=l,o.geometry.coordinates.unshift(t.sourceCoords),o.properties=r.properties;let c=-1;e[n].features.map((e,t)=>{"LineString"===e.geometry.type&&(c=t)}),e[n].features[c]=o,e[n].coordinates=o.geometry.coordinates}computeRoutes(e,t=!1){return F(this,void 0,void 0,function*(){if(e.length<2)return;const n={segments:[],walkingDistance:0,transportDistance:0,walkingTime:0,transportTime:0,distanceUnit:jh,speed:Rh};n.segments.push({});let r=1;for(let o=0;o<e.length-1;o+=1){let i=e[o];const a=e[o+1],s=!0,l=e[0];if("string"!=typeof e[0]){const e=Ws.getState().data,t=this.map.project([l.sourceCoords[0],l.sourceCoords[1]]);this.map.queryRenderedFeatures(t).map(t=>{e[zh.Edge].hasOwnProperty(t.properties.mapObjectId)&&e[zh.Edge][t.properties.mapObjectId].lines.length>0&&(i=t.properties.mapObjectId)})}const c=yield this.computeRoute(i,a,t,s,r);if(c.segments,c.segments.length>0){const e=c.segments[0];e.maneuverType=Ep.SectionOverview,e.instructions=[`${e.startEdge.name} to ${e.endEdge.name}`]}for(let e=0;e<c.segments.length;e+=1){const t=c.segments[e];n.segments.push(t)}n.walkingDistance+=c.walkingDistance,n.transportDistance+=c.transportDistance,n.walkingTime+=c.walkingTime,n.transportTime+=c.transportTime,r+=c.segments.length}if(n.segments.length>1){const e=Lp(n);n.segments[0]=e}else n.segments.length=0;return n})}updateRouteSource(e){if(!this.map)return!1;this.patchFeatureCollection=e;const t=this.map.getSource(this.routeSourceName);return t&&t.setData(e),!0}updateAnimateRouteSource(e){if(!this.map)return!1;this.animateRouteSegmentFeatureCollection=e;const t=this.map.getSource(this.animateRouteSourceName);return t&&t.setData(e),!0}setActiveRoute(e){this.route=e}getActiveRoute(){return this.route}resetRouteSegmentAnimation(){this.animationStartTime=Date.now(),cancelAnimationFrame(this.animationFrameID),this.animateRouteSegmentFeatureCollection.features.length>0&&"LineString"===this.animateRouteSegmentFeatureCollection.features[0].geometry.type&&this.animateHighlightedRouteSegment()}updateFeaturesToAnimate(e,t){if(this.route&&this.route.segments.length>e){const n=this.route.segments[e];if(n.features.length>0){const e=function(e,t=""){const n=[];for(let r=0;r<e.features.length;r+=1){const o=e.features[r];o.properties.featureBelongsToLineString&&(""!==t?o.properties.dimension_where&&o.properties.dimension_where===t&&n.push(o):n.push(o))}return n}(n,t);if(e.length>0){this.updateAnimateRouteSource({type:"FeatureCollection",features:e});const t=e[0],n=Oh(t,V(e[0].geometry.coordinates[0])),r=he(t)-n.properties.location;this.end={from:0,to:r}}else this.updateAnimateRouteSource({type:"FeatureCollection",features:[]});this.resetRouteSegmentAnimation()}}}highlightRouteSegment(e,t=!0){const{route:n}=this;if(n&&n.segments.length>e&&n.segments[e].coordinates.length>0){this.highlightedSegmentNumber=e;const r=n.segments[e],o=r.maneuverType===Ep.ExitPortal||r.maneuverType===Ep.Static?r.endEdge.whereDimension:r.startEdge.whereDimension;let i=this.patchFeatureCollection.features;const a=r.features[0].properties.patchNumber;this.currentPatchNumber!==a&&(this.currentPatchNumber=a,i=Ip(n,a,{includeOverviewFeatures:Pp(r),patchNumberForOverviewFeatures:a})),o&&o!==this.getCurrentFocus()&&t&&this.filterWhereDimension(o);const s=function(e,t,n=!1){for(let r=0;r<e.length;r+=1){const o=e[r];o.properties.segmentNumber===t?n?!0===o.properties.startPoint&&Op([o],!0):Op([o],!0):Op([o],!1)}return e}(i,e);if(this.updateRouteSource({type:"FeatureCollection",features:s}),Pp(r)?this.updateAnimateRouteSource({type:"FeatureCollection",features:[]}):this.updateFeaturesToAnimate(e,o),r){const e=e=>"Point"===e.geometry.type?e.geometry.coordinates:e.geometry.coordinates[0],t=this.map.getCanvas(),o=t.clientWidth,i=t.clientHeight,a={padding:{top:.2*i,bottom:.2*i,left:.2*o,right:.2*o},duration:1e3,bearing:this.map.getBearing(),pitch:this.map.getPitch()};if(r.coordinates.length>1){const t=function(e,t=0){let n=[];for(let r=0;r<e.segments.length;r+=1){const o=e.segments[r];o.patchNumber===t&&(n=n.concat(o.features))}return n}(n,r.patchNumber),o=e(t[0]),i=new l.LngLat(o[0],o[1]),s=new l.LngLat(o[0],o[1]),c=new l.LngLatBounds(i,s);for(let e=0;e<t.length;e++){const n=t[e];if("Point"===n.geometry.type)c.extend(n.geometry.coordinates);else for(const e of n.geometry.coordinates)c.extend(e)}this.map.fitBounds(c,a)}else{const e={type:"FeatureCollection",features:[V(r.coordinates[0])]},t=Mh(e,.025,3).features[0].geometry.coordinates,n=[Mh(e,-.025,-3).features[0].geometry.coordinates,t];this.map.fitBounds(n,a)}}}}clearRoute(){const e={type:"FeatureCollection",features:[]};this.updateRouteSource(e),this.updateAnimateRouteSource(e),this.route=null,cancelAnimationFrame(this.animationFrameID)}}const Wp=["case",["boolean",["in","Galleries",["get","localRef"]],!0],"#E8E8E9",["boolean",["in","Insights",["get","localRef"]],!0],"#C6E8E9",["boolean",["in","Encounter",["get","localRef"]],!0],"#D8EBCB",["boolean",["in","Kabinett",["get","localRef"]],!0],"#FFE0AE",["boolean",["in","Discoveries",["get","localRef"]],!0],"#D1D3EA",["boolean",["in","Film",["get","localRef"]],!0],"#710829","#95A8A9"];var $p=[{id:"Airiside - CAD Polygons v2",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside"],["==",["get","dimension_where"],"where.changi.tarmac.private"],["match",["get","title"],["FRAME","RWY_Coordinates","RWY2_CLOSURE","Area_CLOSURE","RWY_Strip"],!1,!0]],paint:{"fill-color":{base:1,type:"categorical",property:"layer",stops:[["TWY_Shoulder","rgba(0,100,0, 0.2)"],["Apron_Zone","rgba(200,200,200, 0.8)"],["pond","rgba(0,100,200, 0.2)"],["DRAIN","rgba(0,100,200, 0.2)"],["Drain_Hatch","rgba(0,100,200, 0.2)"],["Acft Stand_Push back line","rgb(120,80,80)"],["Acft Stands Lead-in line","rgb(220,80,80)"],["Bldg_External","rgba(150,120,150,0.5)"],["Bldg_Ancillary","rgba(150,120,150,0.5)"],["Bldg_Cargo_Hatch","rgba(150,120,150,0.5)"],["Bldg_Hangar","rgba(150,120,150,0.5)"]],default:"rgba(50,50,50, 0.2)"}}},{id:"Aerodrome Lines",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside"],["==",["get","dimension_where"],"where.changi.tarmac.private"],["match",["get","title"],["FRAME","RWY_Coordinates"],!1,!0]],paint:{"line-color":{base:1,type:"categorical",property:"layer",stops:[["Acft Stand_Push back line","rgb(120,80,80)"],["Acft Stands Lead-in line","rgb(220,80,80)"],["Apron_Apron Boundary Line","rgb(120,120,120)"],["TWY_Centreline","rgb(0,0,120)"],["TWY_Shoulder","rgb(0,0,160)"],["TWY_Holding PSN","rgb(0,0,200)"],["Road_Airside_E","rgb(100,100,200)"],["DRAIN","rgb(80,80,180)"],["Dec_2019 Aerodrome Map_To DMO$0$LAYOUT","rgb(80,80,180)"],["Roads_Public","rgb(100,100,100)"]],default:"rgb(80,80,80)"},"line-opacity":{base:1,type:"categorical",property:"title",stops:[["Roads_Public",.5]],default:.5},"line-width":2}},{id:"Aerodrome names",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:13,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.airside"],["==",["get","dimension_where"],"where.changi.tarmac.private"]],layout:{visibility:"visible","text-field":"{text}","text-font":["Lato Regular"],"text-padding":0,"text-size":12},paint:{"text-halo-color":"hsl(194, 0%, 60%)","text-color":"hsl(194, 0%, 100%)","text-halo-width":2}},{id:"Building overlay base - changi",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","#97b5bc"],["where.changi.terminals.t1.l1","#92a7b8"],["where.changi.terminals.t2.l1","#d59d99"],["where.changi.terminals.t3.l1","#8ab8b5"],["where.changi.terminals.t4.l1","#a891aa"],["where.sjc.terminal_a.l1","#92a7b8"]],default:"#e7e7e7"},"fill-opacity":.9,"fill-antialias":!1}},{id:"Aerobridge",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.aerobridge","what.infra.tunnel"]]]],paint:{"fill-color":"hsl(0, 0%, 68%)","fill-opacity":{base:1,stops:[[15,0],[15.5,.99]]},"fill-antialias":!1}},{id:"Airplanes",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.plane"]],paint:{"fill-color":{base:1,stops:[[15,"hsl(0, 0%, 53%)"],[15.5,"hsl(0, 0%, 100%)"]]},"fill-outline-color":"hsl(0, 0%, 50%)","fill-opacity":{base:1,stops:[[15,0],[15.5,.99]]},"fill-antialias":!1}},{id:"building_outline",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","subType"],"building_outline"]],paint:{"fill-color":"hsl(0, 0%, 82%)","fill-opacity":.2,"fill-outline-color":"hsl(0, 0%, 82%)"}},{id:"Skytrain track outdoor",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["get","dimension_where"],"where.changi.terminals.t2.l2"],["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.skytrain"]],paint:{"fill-color":"hsl(0, 0%, 100%)","fill-opacity":.99,"fill-outline-color":"hsl(0, 0%, 69%)"}},{id:"Skytrain line outdoor",type:"line",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.transport.skytrain"]],paint:{"line-color":"hsl(13, 97%, 67%)","line-width":3}},{id:"Building underlay icon",type:"symbol",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",minzoom:1,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-size":{base:1,stops:[[13,.21],[14,.3],[15,.6],[16,1]]},"text-font":["Lato Regular"],"text-size":50,"icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-image":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","building_Jewel"],["where.changi.terminals.t1.l1","building_T1"],["where.changi.terminals.t2.l1","building_T2"],["where.changi.terminals.t3.l1","building_T3"],["where.changi.terminals.t4.l1","building_T4"]],default:"building_T1"},"icon-offset":[0,0]},paint:{"text-color":"hsl(0, 0%, 100%)","text-halo-color":"rgba(0,136,128,1)","text-halo-width":2,"text-opacity":1,"icon-opacity":1}},{id:"Floor",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.floor","what.floor"]]]],paint:{"fill-color":"hsl(0, 0%, 100%)","fill-opacity":.99,"fill-antialias":!1}},{id:"Floor outline aka wall fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.wall","what.wall"]]]],paint:{"fill-color":"hsl(0, 0%, 56%)"}},{id:"Floor outline aka wall",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["in",["get","dimension_what"],["literal",["what.infra.wall","what.wall"]]]],paint:{"line-width":{base:1,stops:[[15.5,1],[22,3]]},"line-color":"hsl(0, 0%, 56%)"}},{id:"Office",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.office.meeting_room","what.office.workstation","what.office.workspace"]]]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.office.meeting_room","#758ccb"],["what.office.workstation","#a6cee3"],["what.office.workspace","#d5f0f1"]],default:"hsl(267, 31%, 52%)"},"fill-opacity":.99,"fill-antialias":!1}},{id:"Office Extrusion",type:"fill-extrusion",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.office.meeting_room","what.office.workstation","what.office.workspace"]]]],paint:{"fill-extrusion-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.office.meeting_room","#758ccb"],["what.office.workstation","#a6cee3"],["what.office.workspace","#d5f0f1"]],default:"hsl(267, 31%, 52%)"},"fill-extrusion-opacity":1,"fill-extrusion-height":2,"fill-extrusion-base":0}},{id:"Restarea fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.rest_area"]]]],paint:{"fill-color":"#7C93D2","fill-opacity":.99,"fill-antialias":!1}},{id:"Skytrain track",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.skytrain"]],layout:{visibility:"none"},paint:{"fill-color":"hsl(0, 0%, 100%)","fill-opacity":.99,"fill-outline-color":"hsl(0, 0%, 69%)"}},{id:"Changi Airport Connector",type:"fill",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.walkway"]],layout:{visibility:"visible"},paint:{"fill-color":"#faefd6","fill-opacity":.99,"fill-outline-color":"#cd9d2d"}},{id:"Changi Airport Connector Text",type:"symbol",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.transport.walkway"]],layout:{"symbol-placement":"line","symbol-spacing":300,"text-field":"{title}","text-font":["Lato Regular"],"text-max-angle":30,"text-pitch-alignment":"viewport","text-rotation-alignment":"map","text-size":12,"text-transform":"none"},paint:{"text-halo-color":"#cd9d2d","text-color":"#ffffff","text-halo-width":2}},{id:"Changi Sheltered Walkway",type:"fill",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.walkway_sheltered"]],layout:{visibility:"visible"},paint:{"fill-color":"#d6e2fa","fill-opacity":.99,"fill-outline-color":"#375692"}},{id:"Carpark Area",metadata:{"source-type":"steerpath_floor_tiles"},maxzoom:24,type:"fill-extrusion",source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.carpark","what.transport.pickup","what.infra.parking_bike_locked"]]]],paint:{"fill-extrusion-color":{stops:[[18,"#dddddd"],[19.25,"#c0c0c0"]]},"fill-extrusion-opacity":1,"fill-extrusion-height":.2,"fill-extrusion-base":0}},{id:"Exhibition Experience",type:"fill-extrusion",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.food","what.service.toilet","what.service.prayer_room","what.service.checkin","what.infra.lift","what.infra.stairs","what.infra.escalator","what.infra.exit","what.other","what.wall","what.office.workspace","what.service.information"]]]],paint:{"fill-extrusion-color":["case",["in",["get","dimension_what"],["literal",["what.shop.food","what.service.toilet","what.service.prayer_room","what.service.checkin","what.infra.lift","what.infra.stairs","what.infra.escalator","what.infra.exit","what.other","what.wall","what.office.workspace","what.service.information"]]],["match",["get","dimension_what"],"what.service.toilet","#e0e0e0","what.service.prayer_room","#EAE3F4","what.infra.lift","#e0e0e0","what.infra.stairs","#e0e0e0","what.infra.exit","#e0e0e0","what.infra.escalator","#e0e0e0","what.service.checkin","#89CBDF","what.office.workspace","#d5f0f1","what.other","#EAE3F4","what.wall","hsl(0, 0%, 56%)","what.shop.food","#FFE3CE","what.service.information","#EAE3F4","#FFFFFF"],"#FFFFFF"],"fill-extrusion-height":["match",["get","dimension_what"],"what.service.toilet",1,"what.service.prayer_room",1,"what.service.information",1,"what.service.checkin",1,"what.infra.lift",1,"what.infra.stairs",1,"what.infra.exit",1,"what.infra.escalator",1,"what.office.workspace",2,"what.other",.75,"what.wall",.5,"what.shop.food",2,2],"fill-extrusion-base":0,"fill-extrusion-opacity":1}},{id:"Eventhall Extrusion",type:"fill-extrusion",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.event_hall"]]]],paint:{"fill-extrusion-color":["case",["has","color"],["get","color"],"#B7A7CB"],"fill-extrusion-height":2,"fill-extrusion-base":0,"fill-extrusion-opacity":1}},{id:"Eventhall Open Extrusion",type:"fill-extrusion",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.event_hall.open"]]]],paint:{"fill-extrusion-color":["case",["has","color"],["get","color"],"#B7A7CB"],"fill-extrusion-height":.1,"fill-extrusion-base":0,"fill-extrusion-opacity":1}},{id:"Resetarea Extrusion",metadata:{"source-type":"steerpath_floor_tiles"},maxzoom:24,type:"fill-extrusion",source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.rest_area"]]]],paint:{"fill-extrusion-color":"#7C93D2","fill-extrusion-opacity":1,"fill-extrusion-height":1,"fill-extrusion-base":0}},{id:"Public",type:"fill",minzoom:15,maxzoom:18,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Public"]],layout:{visibility:"none"},paint:{"fill-color":"hsl(43, 100%, 98%)","fill-opacity":.3,"fill-antialias":!1}},{id:"Transit",type:"fill",minzoom:15,maxzoom:17,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"]],layout:{visibility:"none"},paint:{"fill-color":"hsl(0, 0%, 100%)","fill-antialias":!1,"fill-opacity":.99}},{id:"Hole fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.hole"]],paint:{"fill-color":"hsl(0, 0%, 90%)","fill-opacity":.99,"fill-antialias":!1}},{id:"Immigration",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.service.immigration"]],paint:{"fill-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 79%, 91%)"]]},"fill-opacity":.99,"fill-antialias":!1}},{id:"Other service areas",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:16,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.baggage_claim","what.service.atm","what.service.baby_care","what.service.baggage_storage","what.service.clinic","what.service.tax_refund","what.service.free_singapore_tour","what.service.internet","what.service.laptop_access","what.service.meditation_room","what.service.money_exchange","what.service.phone","what.service.post","what.service.smoking_area","what.service.cloakroom","what.service.family_room","what.service.wifi","what.service.adult_diaper_change","what.service.changi_rewards","what.service.toilet_accessible","what.service.shower"]]]],paint:{"fill-color":"hsl(263, 75%, 96%)","fill-opacity":.99,"fill-antialias":!1}},{id:"Retail",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.retail","what.shop.retail_anchor"]]]],paint:{"fill-color":Wp,"fill-opacity":.99,"fill-antialias":!1}},{id:"Lounge",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.airline_lounge","what.service.pay_per_use_lounge","what.service.lodging","what.service.airport_transfer","what.service.vip_counter","what.service.connect_changi","what.service.lounge_changi"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(224, 46%, 72%)"],[17.5,"hsl(215, 66%, 94%)"]]},"fill-opacity":.99,"fill-antialias":!1}},{id:"Gate",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.airplane_gate","what.gate_airplane"]]]],paint:{"fill-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 79%, 91%)"]]},"fill-opacity":.99,"fill-antialias":!1}},{id:"Gate screening",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.security"]],layout:{visibility:"visible"},paint:{"fill-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 54%, 85%)"]]},"fill-opacity":.99,"fill-antialias":!1}},{id:"Travelator",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.travelator"]],paint:{"fill-color":"hsl(0, 0%, 96%)","fill-opacity":{base:1,stops:[[17,0],[17.5,.99]]}}},{id:"Checkin",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.checkin","what.service.checkin_early"]]]],paint:{"fill-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 79%, 91%)"]]},"fill-opacity":.99,"fill-antialias":!1}},{id:"Entertainment",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.fun","what.service.movie_theatre","what.service.tv_lounge","what.service.attraction_tour"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(1, 100%, 82%)"],[17.5,"hsl(0, 100%, 95%)"]]},"fill-opacity":.99,"fill-antialias":!1}},{id:"Entertainment outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.fun","what.service.movie_theatre","what.service.tv_lounge","what.service.attraction_tour"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(330, 100%, 82%)"],[17.5,"hsl(330, 100%, 68%)"]]},"line-width":1}},{id:"Water fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.water"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(195, 87%, 63%)"],[17.5,"hsl(197, 71%, 91%)"]]},"fill-opacity":.99,"fill-antialias":!0}},{id:"Water outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.water"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(190, 91%, 53%)"],[17.5,"hsl(190, 100%, 41%)"]]},"line-width":1}},{id:"Garden fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.garden"]],paint:{"fill-color":{base:1,type:"categorical",property:"localRef",stops:[["gbtb_garden_californian-garden","#D29BA5"],["gbtb_garden_succulent-garden","#D29BA5"],["gbtb_garden_the-baobabs","#D29BA5"],["gbtb_garden_olive-grove","#E09FDE"],["gbtb_garden_mediterrainean-garden","#C9A798"],["gbtb_garden_south-african-garden","#F1838F"],["gbtb_garden_south-american-garden","#D8BE9A"],["gbtb_garden_australian-garden","#FCB68E"],["gbtb_garden_flower-field","#F4E099"],["gbtb_event_flower-field-hall","#B7A7CB"]],default:"hsl(181, 49%, 89%)"},"fill-opacity":{base:1,stops:[[17,.99],[17.5,.8]]},"fill-antialias":!0}},{id:"Garden outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.garden"]],paint:{"line-color":{base:1,type:"categorical",property:"localRef",stops:[["gbtb_garden_californian-garden","#482229"],["gbtb_garden_succulent-garden","#482229"],["gbtb_garden_the-baobabs","#482229"],["gbtb_garden_olive-grove","#91268E"],["gbtb_garden_mediterrainean-garden","#9C664E"],["gbtb_garden_south-african-garden","#CB2435"],["gbtb_garden_south-american-garden","#896D46"],["gbtb_garden_australian-garden","#F36F23"],["gbtb_garden_flower-field","#FFC706"],["gbtb_event_flower-field-hall","#8D7BA1"]],default:"hsl(164, 100%, 35%)"},"line-width":1}},{id:"Event hall outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:20.5,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.service.event_hall"]],paint:{"line-color":["case",["has","color"],["get","color"],"#8D7BA1"],"line-width":{base:1,stops:[[17,0],[17.5,1]]},"line-opacity":["interpolate",["linear"],["zoom"],20.5,0,21.5,.8]}},{id:"Event hall open outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:20.5,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.service.event_hall.open"]],paint:{"line-color":["case",["has","color"],["get","color"],"#8D7BA1"],"line-width":{base:1,stops:[[17,0],[17.5,1]]},"line-opacity":["interpolate",["linear"],["zoom"],20.5,0,21.5,.8]}},{id:"Pickup zone outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.transport.pickup","what.transport.pickup_car"]]]],paint:{"line-color":"hsl(0, 0%, 78%)","line-width":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Food",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.food_anchor","what.shop.food_anchor"]]]],paint:{"fill-color":{base:1,stops:[[17,"#FFD3B3"],[17.5,"#FFE3CE"]]},"fill-opacity":1,"fill-antialias":!1}},{id:"Road marking fill",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:19,maxzoom:24,filter:["all",["in",["get","$type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","dimension_what"],"what.road.marking_fill"]],paint:{"fill-opacity":{base:1,stops:[[19,0],[19.25,1]]},"fill-color":"#ffffff"}},{id:"road marking line",metadata:{"source-type":"steerpath_floor_tiles"},type:"line",source:"custom",minzoom:19,maxzoom:24,filter:["all",["==",["get","dimension_what"],"what.road.marking_line"]],paint:{"line-opacity":{base:1,stops:[[19,0],[19.25,1]]},"line-color":"#ffffff","line-width":1.5}},{id:"Kerb",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:18,maxzoom:24,filter:["all",["==",["get","dimension_what"],"what.road.kerb"]],paint:{"line-opacity":{base:1,stops:[[18,0],[18.25,1]]},"line-color":"hsl(0, 0%, 63%)","line-width":1.5}},{id:"Hole outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.hole"]],paint:{"line-opacity":{base:1,stops:[[17,0],[17.5,1]]},"line-color":"hsl(0, 0%, 68%)","line-width":1}},{id:"Travelator outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:16,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.travelator"]],layout:{},paint:{"line-color":"hsl(0, 0%, 81%)","line-width":3,"line-opacity":1}},{id:"Airplanes outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.airplane"]],layout:{},paint:{"line-color":"hsl(0, 0%, 76%)","line-opacity":{base:1,stops:[[15,0],[15.5,1]]}}},{id:"Immigration outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.service.immigration"]],layout:{visibility:"none"},paint:{"line-color":"hsl(0, 0%, 85%)","line-width":2}},{id:"Checkin outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.checkin","what.service.checkin_early"]]]],paint:{"line-width":1,"line-color":"#89CBDF"}},{id:"Other service outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:20.5,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.baggage_claim","what.service.atm","what.service.baby_care","what.service.baggage_storage","what.service.clinic","what.service.free_singapore_tour","what.service.information","what.service.internet","what.service.laptop_access","what.service.meditation_room","what.service.money_exchange","what.service.phone","what.service.post","what.service.prayer_room","what.service.smoking_area","what.service.tax_refund","what.service.cloakroom","what.service.toilet","what.service.family_room","what.service.wifi","what.other","what.service.prayer_room","what.service.adult_diaper_change","what.service.changi_rewards","what.service.toilet_accessible","what.service.shower"]]]],paint:{"line-color":"hsl(0, 0%, 78%)","line-width":{base:1,stops:[[17,0],[17.5,1]]},"line-opacity":["interpolate",["linear"],["zoom"],20.5,0,21.5,.8]}},{id:"Retail outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.retail","what.shop.retail_anchor"]]]],paint:{"line-color":Wp,"line-width":1}},{id:"Lounge outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.airline_lounge","what.service.pay_per_use_lounge","what.service.lodging","what.service.airport_transfer","what.service.vip_counter","what.service.connect_changi","what.service.lounge_changi"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(224, 46%, 72%)"],[17.5,"hsl(224, 43%, 58%)"]]},"line-width":1}},{id:"Food outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:20.5,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.food","what.shop.food","what.shop.food_anchor","what.shop.food_anchor"]]]],paint:{"line-color":{base:1,stops:[[17,"#C2988B"],[17.5,"#C6B3A3"]]},"line-width":1}},{id:"Gate and outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["in",["get","$type"],["literal",["LineString","Polygon"]]],["in",["get","dimension_what"],["literal",["what.airplane_gate","what.gate_airplane","what.security"]]]],paint:{"line-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 56%, 49%)"]]},"line-width":1}},{id:"highlight_custom_fill",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",minzoom:18,source:"custom",filter:["all",["all",["==",["geometry-type"],"Polygon"]]],layout:{visibility:"none"},paint:{"fill-color":"#f6f6f6","fill-opacity":{stops:[[16,0],[16.5,.5]]}}},{id:"CCTV fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.security.cctv"]]]],paint:{"fill-color":"hsl(148, 100%, 65%)","fill-opacity":.5}},{id:"CCTV outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.security.cctv"]]]],paint:{"line-color":"hsl(148, 100%, 65%)","line-width":1}},{id:"incident fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.incident"]]]],paint:{"fill-color":"hsl(0, 100%, 65%)","fill-opacity":.5}},{id:"incident outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.incident"]]]],paint:{"line-color":"hsl(0, 100%, 65%)","line-width":1}},{id:"highlight_custom_outline",metadata:{"source-type":"steerpath_floor_tiles"},type:"line",minzoom:18,source:"custom",filter:["all",["all",["==",["geometry-type"],"Polygon"]]],layout:{visibility:"none","line-join":"round","line-cap":"round"},paint:{"line-color":"#5d5d5d","line-blur":10,"line-width":20,"line-opacity":{stops:[[16,0],[16.5,1]]}}},{id:"Public outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","title"],"Public"],["==",["get","dimension_what"],"what.infra.wing"]],layout:{visibility:"none"},paint:{"line-width":2,"line-color":"hsl(0, 0%, 46%)"}},{id:"Transit border",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Transit"]],paint:{"line-color":"hsl(270, 41%, 46%)","line-width":2}},{id:"T2 overlay outline copy",metadata:{"source-type":"steerpath_floor_tiles"},type:"line",source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","subType"],"building_outline"]],layout:{visibility:"none"},paint:{"line-color":"#ee3424","line-opacity":1,"line-width":3}},{id:"Aerobridge gates",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.aerobridge"]],layout:{visibility:"none","text-field":"{cad_text}","text-font":["Lato Regular"],"text-padding":0,"text-size":15,"text-ignore-placement":!0},paint:{"text-opacity":{base:1,stops:[[15,0],[15.5,1],[17,1],[17.5,0]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(194, 64%, 49%)","text-halo-width":2}},{id:"Gate names",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.airplane_gate","what.gate_airplane"]]]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-ignore-placement":!0,"text-size":12,"text-allow-overlap":!0},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(194, 79%, 91%)","text-color":"hsl(194, 64%, 49%)","text-halo-width":2}},{id:"Lounge title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.service.airline_lounge","what.service.lodging","what.service.vip_counter","what.service.checkin_early","what.service.connect_changi","what.service.lounge_changi"]]],["has","title"],["!=",["get","title"],""],["!=",["get","title"],"unknown"]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,5],[20,12]]},"text-padding":2,"text-font":["Lato Regular"],"text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"icon-offset":[0,-32],"text-anchor":"top","icon-size":{base:1,stops:[[17,.3],[22,1]]},"icon-padding":1},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-blur":0,"text-color":"#ffffff","text-halo-width":2,"text-halo-color":"#9FA5AC","text-translate":[0,0],"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Pay Per Use Lounge title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.service.pay_per_use_lounge"]]],["has","title"],["!=",["get","title"],""],["!=",["get","title"],"unknown"]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"text-padding":2,"text-font":["Lato Regular"],"text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"icon-image":"what.service.airline_lounge","icon-offset":[0,-32],"text-anchor":"top","icon-size":{base:1,stops:[[17,.3],[22,1]]},"icon-padding":1},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-blur":0,"text-halo-color":"hsl(224, 43%, 58%)","text-halo-width":1.5,"text-color":"#ffffff","text-translate":[0,0],"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Tenant title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.shop.retail","what.shop.food","what.office.workspace","what.office.meeting_room","what.other"]]],["!=",["get","title"],""],["!=",["get","title"],"unknown"]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]},"icon-offset":[0,-20],"text-font":["Lato Regular"],"text-padding":1,"icon-size":{base:1,stops:[[17,.3],[21,1]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"text-max-width":5},paint:{"text-color":"#ffffff","text-halo-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.office.meeting_room","#52628E"],["what.office.workstation","#ABA6AF"],["what.office.workspace","#95A8A9"],["what.other","#ABA6AF"]],default:"#7D6F65"},"text-halo-blur":0,"text-opacity":{base:1,stops:[[16,0],[17,1]]},"text-halo-width":2,"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Anchor tenant title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:19,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.shop.retail_anchor","what.shop.food_anchor"]]],["!=",["get","title"],""],["!=",["get","title"],"unknown"]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]},"icon-offset":[0,-20],"icon-image":{base:1,type:"categorical",property:"dimension_what",stops:[["what.shop.retail_anchor","what.shop.retail"],["what.shop.food_anchor","what.shop.food"]],default:"what.shop.retail"},"text-font":["Lato Regular"],"text-padding":1,"icon-size":{base:1,stops:[[17,.3],[21,1]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"text-max-width":5},paint:{"text-color":"#ffffff","text-halo-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.shop.retail_anchor","hsl(267, 31%, 52%)"],["what.shop.food_anchor","hsl(25, 76%, 58%)"]],default:"hsl(267, 31%, 52%)"},"text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2,"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Entrance texts",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.entrance"]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]},"text-ignore-placement":!0,"text-max-width":5},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"#608E9C","text-color":"#ffffff","text-halo-width":2}},{id:"Exit texts",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.exit"]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]},"text-ignore-placement":!0},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2}},{id:"Changi Walkway Text",type:"symbol",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.transport.walkway"]],layout:{"text-field":"{title}","text-font":["Lato Regular"],"text-pitch-alignment":"viewport","text-size":12},paint:{"text-halo-color":"#cd9d2d","text-color":"#ffffff","text-halo-width":2,"text-opacity":0}},{id:"Changi Sheltered Walkway Text",type:"symbol",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.transport.walkway_sheltered"]],layout:{"text-field":"{title}","text-font":["Lato Regular"],"text-pitch-alignment":"viewport","text-size":12},paint:{"text-halo-color":"#375692","text-color":"#ffffff","text-halo-width":2}},{id:"Checkin row text",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.checkin"]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]}},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"#608E9C","text-color":"#ffffff","text-halo-width":2}},{id:"Event hall text",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.event_hall"],["!=",["get","title"],"unknown"],["!=",["get","title"],""],["any",["!",["has","logo"]],["==",["get","logo"],!1]],["!=",["get","title"],"Main Plenary"]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]}},paint:{"text-opacity":1,"text-color":"#ffffff","text-halo-color":["case",["has","text_color"],["get","text_color"],"#80758E"],"text-halo-width":2}},{id:"Event hall text - Main Plenary",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.event_hall"],["!=",["get","title"],"unknown"],["!=",["get","title"],""],["any",["!",["has","logo"]],["==",["get","logo"],!1]],["==",["get","title"],"Main Plenary"]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-allow-overlap":!0,"symbol-avoid-edges":!1,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]}},paint:{"text-opacity":1,"text-color":"#ffffff","text-halo-color":["case",["has","text_color"],["get","text_color"],"#80758E"],"text-halo-width":2}},{id:"Event hall open text",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.event_hall.open"],["!=",["get","title"],"unknown"],["!=",["get","title"],""],["any",["!",["has","logo"]],["==",["get","logo"],!1]],["!=",["get","title"],"Stamford Foyer"]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]}},paint:{"text-opacity":1,"text-color":"#ffffff","text-halo-color":["case",["has","text_color"],["get","text_color"],"#80758E"],"text-halo-width":2}},{id:"Event hall open text - Stamford Foyer",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.event_hall.open"],["!=",["get","title"],"unknown"],["!=",["get","title"],""],["any",["!",["has","logo"]],["==",["get","logo"],!1]],["==",["get","title"],"Stamford Foyer"]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-allow-overlap":!0,"symbol-avoid-edges":!1,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]}},paint:{"text-opacity":1,"text-color":"#ffffff","text-halo-color":["case",["has","text_color"],["get","text_color"],"#80758E"],"text-halo-width":2}},{id:"Event hall icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.event_hall"],["!=",["get","title"],"unknown"],["!=",["get","title"],""]],layout:{visibility:"visible","icon-image":"{title}","icon-size":{base:1,stops:[[17,.08],[20,.4],[22,.6]]},"icon-padding":0,"icon-allow-overlap":!0,"icon-ignore-placement":!0},paint:{"icon-opacity":1}},{id:"Event hall open icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.event_hall.open"],["!=",["get","title"],"unknown"],["!=",["get","title"],""]],layout:{visibility:"visible","icon-image":"{title}","icon-size":{base:1,stops:[[17,.08],[20,.4],[22,.6]]},"icon-padding":0,"icon-allow-overlap":!0,"icon-ignore-placement":!0},paint:{"icon-opacity":1}},{id:"Garden text",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.garden"],["!=",["get","title"],"unknown"],["!=",["get","title"],""]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[17,8],[18,15]]}},paint:{"text-opacity":{base:1,stops:[[1,.5],[17.5,1]]},"text-halo-color":"#119C9E","text-color":"#ffffff","text-halo-width":2,"text-halo-blur":0}},{id:"Belt text",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.baggage_claim"]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[17,8],[18,15]]}},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2}},{id:"Infrastructure icons",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.infra.ramp","what.infra.escalator"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.03],[22,.1]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Attraction text and icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["has","title"],["!=",["get","title"],""],["!=",["get","title"],"unknown"],["in",["get","dimension_what"],["literal",["what.shop.fun","what.service.attraction_tour"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[22,15]]},"icon-offset":[0,-30],"icon-image":"{dimension_what}","text-transform":"uppercase","text-font":["Lato Regular"],visibility:"visible","icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":1,"text-halo-color":{base:1,stops:[[17,"hsl(1, 100%, 57.4%)"],[17.5,"hsl(0, 100%, 66.5%)"]]},"text-halo-width":2,"text-halo-blur":0,"text-color":"hsl(0, 0%, 100%)"}},{id:"Rest area text and icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.rest_area"]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[22,15]]},"text-transform":"uppercase","text-font":["Lato Regular"],visibility:"visible","text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"#fff","text-halo-width":2,"text-halo-blur":0,"text-color":"#52628E"}},{id:"Airport transfer icon and text",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.airport_transfer"]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,-40],"icon-image":"{dimension_what}","text-font":["Lato Regular"],visibility:"visible","icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"#ec7033","text-halo-width":2,"text-halo-blur":0,"text-color":"hsl(0, 0%, 100%)"}},{id:"Other Attraction icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["has","title"],["!=",["get","title"],""],["!=",["get","title"],"unknown"],["in",["get","dimension_what"],["literal",["what.service.movie_theatre"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[22,15]]},"icon-offset":[0,-30],"icon-image":"{dimension_what}","text-transform":"uppercase","text-font":["Lato Regular"],visibility:"visible","icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(330, 100%, 68%)","text-halo-width":2,"text-halo-blur":0,"text-color":"hsl(0, 0%, 100%)"}},{id:"Other Service icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.infra.lift","what.service.phone","what.service.baggage_storage","what.service.atm","what.service.money_exchange","what.service.internet","what.service.tv_lounge","what.service.toilet","what.service.family_room","what.service.baby_care","what.service.post","what.service.wifi","what.service.tax_refund","what.service.device_charging","what.service.meditation_room","what.service.information","what.service.cloakroom","what.service.prayer_room","what.service.adult_diaper_change","what.service.changi_rewards","what.service.toilet_accessible","what.service.shower"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.3],[24,1]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Other Service titles",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.service.toilet","what.service.clinic","what.service.smoking_area","what.service.information","what.service.prayer_room","what.infra.lift","what.infra.stairs"]]]],layout:{"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]},"text-padding":1,"text-font":["Lato Regular"],"text-anchor":"center","text-field":"{title}","text-letter-spacing":0,"text-max-width":5},paint:{"text-color":"#ffffff","text-halo-color":"#ABA6AF","text-halo-blur":0,"text-halo-width":2,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"iShop Changi",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","title"],"iShop Changi"]],layout:{visibility:"visible","icon-padding":1,"icon-size":{base:1,stops:[[17,.3],[22,1]]},"text-field":"{title}","text-font":["Lato Regular"],"text-max-width":4,"text-size":{base:1,stops:[[16,6],[20,18]]},"text-letter-spacing":-.05,"text-line-height":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 47%)","text-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Pickup Zone Text",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.transport.pickup","what.transport.pickup_car"]]]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]}},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2}},{id:"Gate screening icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.security"]],layout:{visibility:"visible","icon-image":"{dimension_what}","icon-size":{base:1,stops:[[17,.1],[19,1]]},"text-field":"{title}","text-font":["Lato Regular"],"text-size":{base:1,stops:[[16,5],[20,12]]},"text-offset":[0,3],"text-anchor":"center","text-padding":1,"text-max-width":5},paint:{"text-halo-color":"#467A89","text-color":"#ffffff","text-halo-width":2,"text-halo-blur":0,"text-opacity":1,"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Immigration icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.immigration"]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.3],[22,1]]},"icon-allow-overlap":!0,"text-size":{base:1,stops:[[17,1],[20,18]]},"text-letter-spacing":-.05},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Parking icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.infra.carpark","what.infra.parking_bike","what.infra.parking_bike_locked"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]},"icon-offset":[0,-40],"icon-image":"{dimension_what}","text-font":["Lato Regular"],visibility:"visible","text-offset":[0,0],"icon-size":{base:1,stops:[[17,.3],[22,1]]},"text-anchor":"top","text-field":"{title}","icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[16,0],[17,1]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":{base:1,stops:[[18,"#9B9B9B"],[19.25,"#868686"]]},"text-halo-width":2,"text-opacity":{base:1,stops:[[16,0],[17,1]]}}},{id:"Transport Taxi, Bus, Consierge and Train",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.transport.taxi_queue","what.transport.taxi","what.transport.type_bus","what.transport.bus","what.transport.train","what.service.ground_transport_concierge"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,0],"icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-allow-overlap":!0,visibility:"visible","text-offset":[0,1],"icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"#ec7033","text-halo-width":2,"text-halo-blur":0,"text-translate":[0,0]}},{id:"SCDF Meeting Room icon",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.office.meeting_room"]]]],layout:{"text-size":{base:1,stops:[[16,5],[20,12]]},"text-padding":1,"text-font":["Lato Regular"],"text-anchor":"center","text-field":"{title}","text-letter-spacing":0,"text-max-width":5},paint:{"text-color":"#ffffff","text-halo-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.office.meeting_room","#52628E"],["what.office.workstation","#ABA6AF"],["what.office.workspace","#d5f0f1"]],default:"hsl(267, 31%, 52%)"},"text-halo-blur":0,"text-halo-width":2,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"SCDF Helpdesk icon",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.office.help_desk"]]]],layout:{visibility:"visible","icon-image":"what.service.vip_counter","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.3],[24,1]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Construction area",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.construction"]],paint:{"fill-color":{base:1,stops:[[17,"hsl(0, 0%, 100%)"],[17.5,"hsl(0, 0%, 70%)"]]},"fill-opacity":.99,"fill-antialias":!1}},{id:"Construction outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.construction"]],paint:{"line-color":"hsl(0, 0%, 70%)","line-opacity":1,"line-width":1}},{id:"Construction text",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.construction"]],layout:{visibility:"visible","text-letter-spacing":-.05,"icon-size":{base:1,stops:[[17,.3],[22,1]]},"icon-allow-overlap":!0,"text-size":{base:1,stops:[[17,1],[20,20]]},"text-max-width":5,"text-field":"{title}","text-font":["Lato Regular"]},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 39%)","text-halo-color":"hsl(0, 0%, 70%)","text-halo-width":4}},{id:"CCTV icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.security.cctv"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,-40],"icon-image":"live_asset","text-font":["Lato Regular"],visibility:"visible","text-offset":[0,0],"icon-size":{base:1,stops:[[17,.3],[22,1]]},"text-anchor":"top","text-field":"{title}","icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"#297b72","text-halo-width":2,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"incident icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.incident"]]]],layout:{visibility:"visible","icon-image":"what.incident","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.45],[24,1.5]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Fire Safety (others) icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.fire_safety.exit","what.fire_safety.extinguisher","what.fire_safety.hose_outlet","what.fire_safety.hydrant","what.fire_safety.breeching_inlet"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.45],[24,1.5]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Cell Tower signal heatmap",type:"heatmap",source:"custom",maxzoom:10,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.cell_tower.health_red","what.cell_tower.health_yellow","what.cell_tower.health_green"]]]],paint:{"heatmap-weight":1,"heatmap-intensity":["interpolate",["linear"],["zoom"],0,1,11,1.5],"heatmap-color":["interpolate",["linear"],["heatmap-density"],0,"rgba(101, 133, 247, 0)",.2,"rgba(101, 133, 247, 0.02)",.4,"rgba(101, 133, 247, 0.1)",.6,"rgba(76, 111, 237, 0.3)",.8,"rgba(76, 111, 237, 0.5)",1,"rgba(76, 111, 237, 0.7)"],"heatmap-radius":["interpolate",["linear"],["zoom"],0,0,5,3,8,16,11,32],"heatmap-opacity":["interpolate",["linear"],["zoom"],8,.9,11,0]}},{id:"Cell Tower polygon range",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:10,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.cell_tower.health_red","what.cell_tower.health_yellow","what.cell_tower.health_green"]]]],paint:{"fill-color":"blue","fill-opacity":.02}},{id:"Cell Tower polygon range outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:10,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.cell_tower.health_red","what.cell_tower.health_yellow","what.cell_tower.health_green"]]]],paint:{"line-color":"blue","line-opacity":.06}},{id:"Cell Tower icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:10,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.cell_tower.health_red","what.cell_tower.health_yellow","what.cell_tower.health_green"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","icon-size":{base:1,stops:[[10,.45],[24,1.5]]},"icon-padding":1},paint:{"icon-opacity":1}},{id:"highlight_custom_symbol",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:18,filter:["all",["all",["==",["geometry-type"],"Point"]]],layout:{visibility:"none","icon-image":"{dimension_what}","icon-size":1,"icon-optional":!0,"text-field":"{title}","text-max-width":4,"text-padding":2,"text-line-height":.8,"text-optional":!0,"text-font":["Lato Regular"],"icon-offset":[0,-16],"text-offset":[0,.2],"text-anchor":"top","text-size":{stops:[[16,10],[18,16]]}},paint:{"icon-opacity":{stops:[[16,0],[16.5,1]]},"text-color":"#fff","text-halo-width":2,"text-halo-color":"#373737","text-halo-blur":1,"text-opacity":{stops:[[18,0],[18.5,1]]}}},{id:"Fire Zone Polygon",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.fire_safety.fire_zone"]]]],paint:{"fill-color":"#ff75df","fill-opacity":.1}},{id:"Fire Zone Outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.fire_safety.fire_zone"]]]],paint:{"line-color":"#ff75df","line-width":2,"line-dasharray":[4,2]}},{id:"Fire Safety Icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.fire_safety.smoke_detector.general","what.fire_safety.manual_call_point"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,-20],"icon-image":"{dimension_what}","text-font":["Lato Regular"],"text-padding":1,"icon-size":{base:1,stops:[[17,.3],[21,1]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"icon-allow-overlap":!0,"text-allow-overlap":!0},paint:{"text-color":"#ffffff","text-halo-color":"#ff75df","text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2,"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Fire Zone Title",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.fire_safety.fire_zone"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,14],[20,24]]},"text-font":["Lato Regular"],"text-padding":1,"text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"text-allow-overlap":!0},paint:{"text-color":"#ffffff","text-halo-color":"#ff75df","text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2}},{id:"Transit overlay",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:15,maxzoom:17,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Transit"]],paint:{"fill-color":"hsl(250, 75%, 33%)","fill-antialias":!1,"fill-opacity":{base:1,stops:[[16,.4],[16.5,0]]}}},{id:"Public overlay",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:15,maxzoom:17,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Public"]],paint:{"fill-color":"hsl(31, 100%, 43%)","fill-opacity":{base:1,stops:[[16,.4],[16.5,0]]},"fill-antialias":!1}},{id:"Public overlay text",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:15,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Public"]],layout:{visibility:"visible","icon-offset":[0,-104],"icon-size":1,"text-field":"Public","text-size":25,"text-font":["Lato Regular"],"text-allow-overlap":!0},paint:{"icon-opacity":{base:1,stops:[[13,1],[13.5,0]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"hsl(22, 38%, 45%)","text-halo-width":2,"text-halo-blur":2,"text-opacity":{base:1,stops:[[15,0],[15.5,1],[16.25,1],[16.5,0]]}}},{id:"Transit overlay text",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:15,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Transit"]],layout:{visibility:"visible","icon-offset":[0,-104],"icon-size":1,"text-field":"Transit","text-font":["Lato Regular"],"text-size":25,"text-allow-overlap":!0},paint:{"icon-opacity":{base:1,stops:[[13,1],[13.5,0]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"hsl(254, 56%, 46%)","text-halo-width":2,"text-halo-blur":2,"text-opacity":{base:1,stops:[[15,0],[15.5,1],[16.25,1],[16.5,0]]}}},{id:"Skytrain line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.transport.skytrain"]],layout:{visibility:"none"},paint:{"line-color":"hsl(13, 97%, 67%)","line-width":3}},{id:"Skytrain icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.transport.skytrain"]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,0],"icon-image":"{dimension_what}","text-font":["Lato Regular"],visibility:"visible","text-offset":[0,1],"icon-size":.4,"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":2,"text-max-width":10},paint:{"icon-opacity":{base:1,stops:[[15,0],[15.5,1]]},"text-color":"hsl(0, 0%, 100%)","text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"#ec7033","text-halo-width":2,"text-halo-blur":0,"text-translate":[0,0]}},{id:"Building Extrusion",type:"fill-extrusion",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.building.extruded"]]]],paint:{"fill-extrusion-color":"#E1E1E0","fill-extrusion-height":30,"fill-extrusion-opacity":1}},{id:"Building overlay - changi",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},maxzoom:17.5,source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","#008FBA"],["where.changi.terminals.t1.l1","#1a72B6"],["where.changi.terminals.t2.l1","#ee3424"],["where.changi.terminals.t3.l1","#008880"],["where.changi.terminals.t4.l1","#6f2770"]],default:"#a9a9a9"},"fill-opacity":{base:1,stops:[[17,.99],[17.5,0]]},"fill-antialias":!1}},{id:"Building overlay outline - changi",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:15.5,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","#008FBA"],["where.changi.terminals.t1.l1","#1a72B6"],["where.changi.terminals.t2.l1","#ee3424"],["where.changi.terminals.t3.l1","#008880"],["where.changi.terminals.t4.l1","#6f2770"]],default:"#747474"},"line-opacity":1,"line-width":2}},{id:"Building icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:1,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-size":{base:1,stops:[[13,.21],[14,.3],[15,.6],[16,1]]},"text-font":["Lato Regular"],"text-size":50,"icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-image":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","building_Jewel"],["where.changi.terminals.t1.l1","building_T1"],["where.changi.terminals.t2.l1","building_T2"],["where.changi.terminals.t3.l1","building_T3"],["where.changi.terminals.t4.l1","building_T4"]],default:"building_T1"},"icon-offset":[0,0]},paint:{"text-color":"hsl(0, 0%, 100%)","text-halo-color":"rgba(0,136,128,1)","text-halo-width":2,"text-opacity":{base:1,stops:[[15.5,1],[15.6,0]]},"icon-opacity":{base:1,stops:[[15,1],[15.5,0]]}}},{id:"Building text other",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:1,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.building"],["!",["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]]],layout:{visibility:"visible","text-size":12,"text-field":"{title}","text-font":["Lato Regular"],"icon-allow-overlap":!1},paint:{"text-color":"hsl(0, 0%, 100%)","text-halo-color":"rgba(0,136,128,1)","text-halo-width":2}},{id:"VAPT Polygons",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside"],["==",["get","dimension_where"],"where.changi.tarmac.public"]],paint:{"fill-color":"hsl(0, 0%, 68%)"}},{id:"VAPT Lines",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside"],["==",["get","dimension_where"],"where.changi.tarmac.public"]],paint:{"line-color":"rgb(80,80,80)","line-opacity":1,"line-width":2}},{id:"VAPT names",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:13,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.airside"],["==",["get","dimension_where"],"where.changi.tarmac.public"]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":12},paint:{"text-halo-color":"hsl(194, 0%, 60%)","text-color":"hsl(194, 0%, 100%)","text-halo-width":2}},{id:"Province Polygons",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:3,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.country.province","what.mangrove_area.hectares_0","what.mangrove_area.hectares_1_1000","what.mangrove_area.hectares_1001_5000","what.mangrove_area.hectares_5001_10000","what.mangrove_area.hectares_10001_25000","what.mangrove_area.hectares_25001_55000"]]]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.country.province","white"],["what.mangrove_area.hectares_0","white"],["what.mangrove_area.hectares_1_1000","#dbffba"],["what.mangrove_area.hectares_1001_5000","#b0e67e"],["what.mangrove_area.hectares_5001_10000","#97d65c"],["what.mangrove_area.hectares_10001_25000","#79b83e"],["what.mangrove_area.hectares_25001_55000","#4c8219"]],default:"white"},"fill-opacity":.75}},{id:"Province Outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:3,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.country.province","what.mangrove_area.hectares_0","what.mangrove_area.hectares_1_1000","what.mangrove_area.hectares_1001_5000","what.mangrove_area.hectares_5001_10000","what.mangrove_area.hectares_10001_25000","what.mangrove_area.hectares_25001_55000"]]]],paint:{"line-color":"grey","line-width":1,"line-opacity":.5}},{id:"Path Direction",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.path.direction"]]],["has","title"],["!=",["get","title"],""],["!=",["get","title"],"unknown"]],layout:{"icon-overlap":"always","icon-image":"{dimension_what}","icon-size":["interpolate",["linear"],["zoom"],17,.02,19,.05,22,.1],"icon-padding":1,"icon-rotate":["get","bearing"],"icon-rotation-alignment":"map"},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Path Direction Title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.path.direction"]]],["has","title"],["!=",["get","title"],""],["!=",["get","title"],"unknown"]],layout:{"text-field":"{title}","text-font":["Lato Regular"],"text-size":14,"text-padding":2,"text-anchor":"center","text-letter-spacing":0,"text-max-width":10,"text-offset":[0,2.5]},paint:{"text-color":"hsl(220, 18%, 30%)","text-halo-color":"hsl(220, 40%, 94%)","text-halo-width":1.5,"text-halo-blur":1,"text-opacity":{base:1,stops:[[15,0],[15.5,1]]}}},{id:"Booth-extrusion",type:"fill-extrusion",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.booth"]]]],paint:{"fill-extrusion-color":["case",["has","color"],["get","color"],"#323174"],"fill-extrusion-height":1.5,"fill-extrusion-opacity":1}},{id:"Booths outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:20.5,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.booth"]]]],paint:{"line-color":["get","color"],"line-width":1,"line-opacity":["interpolate",["linear"],["zoom"],20.5,0,21.5,.8]}},{id:"Booth title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.booth"]]],["!=",["get","title"],""],["!=",["get","title"],"unknown"]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]},"icon-offset":[0,0],"text-font":["step",["zoom"],["literal",["Lato Regular"]],20,["match",["get","tier"],"platinum",["literal",["Lato Bold"]],"gold",["literal",["Lato Bold"]],"silver",["literal",["Lato Bold"]],"bronze",["literal",["Lato Bold"]],["literal",["Lato Regular"]]]],"text-padding":1,"text-anchor":"center","text-field":"{title}","text-letter-spacing":0,"text-max-width":5},paint:{"text-halo-color":["case",["has","text_color"],["get","text_color"],"#80758E"],"text-color":"#ffffff","text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2,"icon-opacity":{base:1,stops:[[15,0],[15.5,1]]}}},{id:"Booth Icons",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.booth"]]],["has","title"],["!=",["get","title"],""],["!=",["get","title"],"unknown"]],layout:{"icon-offset":[0,0],"icon-overlap":"always","icon-allow-overlap":!0,"icon-image":"{title}","icon-size":function(e){const t=Object.keys(e.zoomScales).map(Number).sort((e,t)=>e-t),n=["interpolate",["linear"],["zoom"]];return t.forEach(t=>{const r=e.zoomScales[t],o=["match",["get","tier"],...Object.entries(e.tierSizes).flatMap(([e,t])=>"default"===e?[]:[e,t*r]),e.tierSizes.default*r];n.push(t,o)}),n}({tierSizes:{platinum:.2,gold:.18,silver:.15,bronze:.15,basic:.15,default:.05},zoomScales:{15:.05,17:.25,19:.5,21:1,22:1}}),"icon-padding":1}}];const Hp=["case",["boolean",["in","Galleries",["get","localRef"]],!0],"#E8E8E9",["boolean",["in","Insights",["get","localRef"]],!0],"#C6E8E9",["boolean",["in","Encounter",["get","localRef"]],!0],"#D8EBCB",["boolean",["in","Kabinett",["get","localRef"]],!0],"#FFE0AE",["boolean",["in","Discoveries",["get","localRef"]],!0],"#D1D3EA",["boolean",["in","Film",["get","localRef"]],!0],"#710829","#95A8A9"];var Vp,qp,Gp=[{id:"Airiside - CAD Polygons v2",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside"],["==",["get","dimension_where"],"where.changi.tarmac.private"],["match",["get","title"],["FRAME","RWY_Coordinates","RWY2_CLOSURE","Area_CLOSURE","RWY_Strip"],!1,!0]],paint:{"fill-color":{base:1,type:"categorical",property:"layer",stops:[["TWY_Shoulder","rgba(0,100,0, 0.2)"],["Apron_Zone","rgba(200,200,200, 0.8)"],["pond","rgba(0,100,200, 0.2)"],["DRAIN","rgba(0,100,200, 0.2)"],["Drain_Hatch","rgba(0,100,200, 0.2)"],["Acft Stand_Push back line","rgb(120,80,80)"],["Acft Stands Lead-in line","rgb(220,80,80)"],["Bldg_External","rgba(150,120,150,0.5)"],["Bldg_Ancillary","rgba(150,120,150,0.5)"],["Bldg_Cargo_Hatch","rgba(150,120,150,0.5)"],["Bldg_Hangar","rgba(150,120,150,0.5)"]],default:"rgba(50,50,50, 0.2)"}}},{id:"Aerodrome Lines",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside"],["==",["get","dimension_where"],"where.changi.tarmac.private"],["match",["get","title"],["FRAME","RWY_Coordinates"],!1,!0]],paint:{"line-color":{base:1,type:"categorical",property:"layer",stops:[["Acft Stand_Push back line","rgb(120,80,80)"],["Acft Stands Lead-in line","rgb(220,80,80)"],["Apron_Apron Boundary Line","rgb(120,120,120)"],["TWY_Centreline","rgb(0,0,120)"],["TWY_Shoulder","rgb(0,0,160)"],["TWY_Holding PSN","rgb(0,0,200)"],["Road_Airside_E","rgb(100,100,200)"],["DRAIN","rgb(80,80,180)"],["Dec_2019 Aerodrome Map_To DMO$0$LAYOUT","rgb(80,80,180)"],["Roads_Public","rgb(100,100,100)"]],default:"rgb(80,80,80)"},"line-opacity":{base:1,type:"categorical",property:"title",stops:[["Roads_Public",.5]],default:.5},"line-width":2}},{id:"Aerodrome names",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:13,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.airside"],["==",["get","dimension_where"],"where.changi.tarmac.private"]],layout:{visibility:"visible","text-field":"{text}","text-font":["Lato Regular"],"text-padding":0,"text-size":12},paint:{"text-halo-color":"hsl(194, 0%, 60%)","text-color":"hsl(194, 0%, 100%)","text-halo-width":2}},{id:"Building overlay base - changi",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","#97b5bc"],["where.changi.terminals.t1.l1","#92a7b8"],["where.changi.terminals.t2.l1","#d59d99"],["where.changi.terminals.t3.l1","#8ab8b5"],["where.changi.terminals.t4.l1","#a891aa"],["where.sjc.terminal_a.l1","#92a7b8"]],default:"#e7e7e7"},"fill-opacity":.9,"fill-antialias":!1}},{id:"Aerobridge",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.aerobridge","what.infra.tunnel"]]]],paint:{"fill-color":"hsl(0, 0%, 68%)","fill-opacity":{base:1,stops:[[15,0],[15.5,.99]]},"fill-antialias":!1}},{id:"Airplanes",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.plane"]],paint:{"fill-color":{base:1,stops:[[15,"hsl(0, 0%, 53%)"],[15.5,"hsl(0, 0%, 100%)"]]},"fill-outline-color":"hsl(0, 0%, 50%)","fill-opacity":{base:1,stops:[[15,0],[15.5,.99]]},"fill-antialias":!1}},{id:"building_outline",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","subType"],"building_outline"]],paint:{"fill-color":"hsl(0, 0%, 82%)","fill-opacity":.2,"fill-outline-color":"hsl(0, 0%, 82%)"}},{id:"Skytrain track outdoor",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["get","dimension_where"],"where.changi.terminals.t2.l2"],["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.skytrain"]],paint:{"fill-color":"hsl(0, 0%, 100%)","fill-opacity":.99,"fill-outline-color":"hsl(0, 0%, 69%)"}},{id:"Skytrain line outdoor",type:"line",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.transport.skytrain"]],paint:{"line-color":"hsl(13, 97%, 67%)","line-width":3}},{id:"Building underlay icon",type:"symbol",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",minzoom:1,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-size":{base:1,stops:[[13,.21],[14,.3],[15,.6],[16,1]]},"text-font":["Lato Regular"],"text-size":50,"icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-image":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","building_Jewel"],["where.changi.terminals.t1.l1","building_T1"],["where.changi.terminals.t2.l1","building_T2"],["where.changi.terminals.t3.l1","building_T3"],["where.changi.terminals.t4.l1","building_T4"]],default:"building_T1"},"icon-offset":[0,0]},paint:{"text-color":"hsl(0, 0%, 100%)","text-halo-color":"rgba(0,136,128,1)","text-halo-width":2,"text-opacity":1,"icon-opacity":1}},{id:"Floor outline aka wall fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.wall","what.wall"]]]],paint:{"fill-color":"hsl(0, 0%, 56%)"}},{id:"Floor outline aka wall",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["in",["get","dimension_what"],["literal",["what.infra.wall","what.wall"]]]],paint:{"line-width":{base:1,stops:[[15.5,1],[22,3]]},"line-color":"hsl(0, 0%, 56%)"}},{id:"Floor",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.floor","what.floor"]]]],paint:{"fill-color":"hsl(0, 0%, 100%)","fill-opacity":.99,"fill-antialias":!1}},{id:"Skytrain track",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.skytrain"]],layout:{visibility:"none"},paint:{"fill-color":"hsl(0, 0%, 100%)","fill-opacity":.99,"fill-outline-color":"hsl(0, 0%, 69%)"}},{id:"Changi Airport Connector",type:"fill",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.walkway"]],layout:{visibility:"visible"},paint:{"fill-color":"#faefd6","fill-opacity":.99,"fill-outline-color":"#cd9d2d"}},{id:"Changi Airport Connector Text",type:"symbol",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.transport.walkway"]],layout:{"symbol-placement":"line","symbol-spacing":300,"text-field":"{title}","text-font":["Lato Regular"],"text-max-angle":30,"text-pitch-alignment":"viewport","text-rotation-alignment":"map","text-size":12,"text-transform":"none"},paint:{"text-halo-color":"#cd9d2d","text-color":"#ffffff","text-halo-width":2}},{id:"Changi Sheltered Walkway",type:"fill",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.walkway_sheltered"]],layout:{visibility:"visible"},paint:{"fill-color":"#d6e2fa","fill-opacity":.99,"fill-outline-color":"#375692"}},{id:"Navigation & Access Facilities",metadata:{"source-type":"steerpath_floor_tiles"},maxzoom:24,type:"fill-extrusion",source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.carpark","what.transport.pickup","what.infra.lift","what.infra.parking_bike_locked"]]]],paint:{"fill-extrusion-color":"#FFC419","fill-extrusion-height":1,"fill-extrusion-base":0,"fill-extrusion-opacity":1}},{id:"Resetarea Extrusion",metadata:{"source-type":"steerpath_floor_tiles"},maxzoom:24,type:"fill-extrusion",source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.rest_area"]]]],paint:{"fill-extrusion-color":"#C0E4C5","fill-extrusion-opacity":.99,"fill-extrusion-height":1,"fill-extrusion-base":0}},{id:"Smoking Area",type:"fill-extrusion",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.smoking_area"]]]],paint:{"fill-extrusion-color":"hsla(211, 94%, 81%, 1)","fill-extrusion-height":3,"fill-extrusion-base":0,"fill-extrusion-opacity":1}},{id:"Transit",type:"fill",minzoom:15,maxzoom:17,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"]],layout:{visibility:"none"},paint:{"fill-color":"hsl(0, 0%, 100%)","fill-antialias":!1,"fill-opacity":.99}},{id:"Hole fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.hole"]],paint:{"fill-color":"hsl(0, 0%, 90%)","fill-opacity":.99,"fill-antialias":!1}},{id:"Immigration",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.service.immigration"]],paint:{"fill-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 79%, 91%)"]]},"fill-opacity":.99,"fill-antialias":!1}},{id:"Other Service Areas",type:"fill-extrusion",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.other","what.service.information"]]]],paint:{"fill-extrusion-color":"#ebebeb","fill-extrusion-height":3,"fill-extrusion-base":0,"fill-extrusion-opacity":.99}},{id:"Retail",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.retail","what.shop.retail_anchor"]]]],paint:{"fill-color":Hp,"fill-opacity":.99,"fill-antialias":!1}},{id:"Lounge",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.pay_per_use_lounge","what.service.lodging","what.service.airport_transfer","what.service.vip_counter","what.service.connect_changi","what.service.lounge_changi"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(224, 46%, 72%)"],[17.5,"hsl(215, 66%, 94%)"]]},"fill-opacity":.99,"fill-antialias":!1}},{id:"Gate",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.airplane_gate","what.gate_airplane"]]]],paint:{"fill-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 79%, 91%)"]]},"fill-opacity":.99,"fill-antialias":!1}},{id:"Travelator",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.travelator"]],paint:{"fill-color":"hsl(0, 0%, 96%)","fill-opacity":{base:1,stops:[[17,0],[17.5,.99]]}}},{id:"Checkin",type:"fill-extrusion",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.checkin","what.service.checkin_early"]]]],paint:{"fill-extrusion-color":"#A2CEFC","fill-extrusion-height":5,"fill-extrusion-base":0,"fill-extrusion-opacity":.99}},{id:"Entertainment",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.fun","what.service.movie_theatre","what.service.tv_lounge","what.service.attraction_tour"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(1, 100%, 82%)"],[17.5,"hsl(0, 100%, 95%)"]]},"fill-opacity":.99,"fill-antialias":!1}},{id:"Entertainment outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.fun","what.service.movie_theatre","what.service.tv_lounge","what.service.attraction_tour"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(330, 100%, 82%)"],[17.5,"hsl(330, 100%, 68%)"]]},"line-width":1}},{id:"Water fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.water"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(195, 87%, 63%)"],[17.5,"hsl(197, 71%, 91%)"]]},"fill-opacity":.99,"fill-antialias":!0}},{id:"Water outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.water"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(190, 91%, 53%)"],[17.5,"hsl(190, 100%, 41%)"]]},"line-width":1}},{id:"Garden fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.garden"]],paint:{"fill-color":{base:1,type:"categorical",property:"localRef",stops:[["gbtb_garden_californian-garden","#D29BA5"],["gbtb_garden_succulent-garden","#D29BA5"],["gbtb_garden_the-baobabs","#D29BA5"],["gbtb_garden_olive-grove","#E09FDE"],["gbtb_garden_mediterrainean-garden","#C9A798"],["gbtb_garden_south-african-garden","#F1838F"],["gbtb_garden_south-american-garden","#D8BE9A"],["gbtb_garden_australian-garden","#FCB68E"],["gbtb_garden_flower-field","#F4E099"],["gbtb_event_flower-field-hall","#B7A7CB"]],default:"hsl(181, 49%, 89%)"},"fill-opacity":{base:1,stops:[[17,.99],[17.5,.8]]},"fill-antialias":!0}},{id:"Garden outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.garden"]],paint:{"line-color":{base:1,type:"categorical",property:"localRef",stops:[["gbtb_garden_californian-garden","#482229"],["gbtb_garden_succulent-garden","#482229"],["gbtb_garden_the-baobabs","#482229"],["gbtb_garden_olive-grove","#91268E"],["gbtb_garden_mediterrainean-garden","#9C664E"],["gbtb_garden_south-african-garden","#CB2435"],["gbtb_garden_south-american-garden","#896D46"],["gbtb_garden_australian-garden","#F36F23"],["gbtb_garden_flower-field","#FFC706"],["gbtb_event_flower-field-hall","#8D7BA1"]],default:"hsl(164, 100%, 35%)"},"line-width":1}},{id:"Pickup zone outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.transport.pickup","what.transport.pickup_car"]]]],paint:{"line-color":"hsl(0, 0%, 78%)","line-width":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Food, Retail & Rest Areas",type:"fill-extrusion",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.food","what.shop.food_anchor","what.service.airline_lounge","what.service.toilet","what.service.prayer_room","what.service.clinic"]]]],paint:{"fill-extrusion-color":"#57C79E","fill-extrusion-height":3,"fill-extrusion-base":0,"fill-extrusion-opacity":1}},{id:"Road marking fill",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:19,maxzoom:24,filter:["all",["in",["get","$type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","dimension_what"],"what.road.marking_fill"]],paint:{"fill-opacity":{base:1,stops:[[19,0],[19.25,1]]},"fill-color":"#ffffff"}},{id:"road marking line",metadata:{"source-type":"steerpath_floor_tiles"},type:"line",source:"custom",minzoom:19,maxzoom:24,filter:["all",["==",["get","dimension_what"],"what.road.marking_line"]],paint:{"line-opacity":{base:1,stops:[[19,0],[19.25,1]]},"line-color":"#ffffff","line-width":1.5}},{id:"Kerb",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:18,maxzoom:24,filter:["all",["==",["get","dimension_what"],"what.road.kerb"]],paint:{"line-opacity":{base:1,stops:[[18,0],[18.25,1]]},"line-color":"hsl(0, 0%, 63%)","line-width":1.5}},{id:"Hole outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.hole"]],paint:{"line-opacity":{base:1,stops:[[17,0],[17.5,1]]},"line-color":"hsl(0, 0%, 68%)","line-width":1}},{id:"Travelator outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:16,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.travelator"]],layout:{},paint:{"line-color":"hsl(0, 0%, 81%)","line-width":3,"line-opacity":1}},{id:"Airplanes outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.airplane"]],layout:{},paint:{"line-color":"hsl(0, 0%, 76%)","line-opacity":{base:1,stops:[[15,0],[15.5,1]]}}},{id:"Immigration outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.service.immigration"]],layout:{visibility:"none"},paint:{"line-color":"hsl(0, 0%, 85%)","line-width":2}},{id:"Checkin outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.checkin","what.service.checkin_early","what.security"]]]],paint:{"line-width":1,"line-color":"#58A6FA"}},{id:"Retail outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.retail","what.shop.retail_anchor"]]]],paint:{"line-color":Hp,"line-width":1}},{id:"Lounge outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.pay_per_use_lounge","what.service.lodging","what.service.airport_transfer","what.service.vip_counter","what.service.connect_changi","what.service.lounge_changi"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(224, 46%, 72%)"],[17.5,"hsl(224, 43%, 58%)"]]},"line-width":1}},{id:"Gate and outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["in",["get","$type"],["literal",["LineString","Polygon"]]],["in",["get","dimension_what"],["literal",["what.airplane_gate","what.gate_airplane","what.security"]]]],paint:{"line-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 56%, 49%)"]]},"line-width":1}},{id:"highlight_custom_fill",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",minzoom:18,source:"custom",filter:["all",["all",["==",["geometry-type"],"Polygon"]]],layout:{visibility:"none"},paint:{"fill-color":"#f6f6f6","fill-opacity":{stops:[[16,0],[16.5,.5]]}}},{id:"CCTV fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.security.cctv"]]]],paint:{"fill-color":"hsl(148, 100%, 65%)","fill-opacity":.5}},{id:"CCTV outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.security.cctv"]]]],paint:{"line-color":"hsl(148, 100%, 65%)","line-width":1}},{id:"incident fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.incident"]]]],paint:{"fill-color":"hsl(0, 100%, 65%)","fill-opacity":.5}},{id:"incident outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.incident"]]]],paint:{"line-color":"hsl(0, 100%, 65%)","line-width":1}},{id:"highlight_custom_outline",metadata:{"source-type":"steerpath_floor_tiles"},type:"line",minzoom:18,source:"custom",filter:["all",["all",["==",["geometry-type"],"Polygon"]]],layout:{visibility:"none","line-join":"round","line-cap":"round"},paint:{"line-color":"#5d5d5d","line-blur":10,"line-width":20,"line-opacity":{stops:[[16,0],[16.5,1]]}}},{id:"Public outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","title"],"Public"],["==",["get","dimension_what"],"what.infra.wing"]],layout:{visibility:"none"},paint:{"line-width":2,"line-color":"hsl(0, 0%, 46%)"}},{id:"Transit border",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Transit"]],paint:{"line-color":"hsl(270, 41%, 46%)","line-width":2}},{id:"T2 overlay outline copy",metadata:{"source-type":"steerpath_floor_tiles"},type:"line",source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","subType"],"building_outline"]],layout:{visibility:"none"},paint:{"line-color":"#ee3424","line-opacity":1,"line-width":3}},{id:"Aerobridge gates",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.aerobridge"]],layout:{visibility:"none","text-field":"{cad_text}","text-font":["Lato Regular"],"text-padding":0,"text-size":15,"text-ignore-placement":!0},paint:{"text-opacity":{base:1,stops:[[15,0],[15.5,1],[17,1],[17.5,0]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(194, 64%, 49%)","text-halo-width":2}},{id:"Gate names",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.airplane_gate","what.gate_airplane"]]]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-ignore-placement":!0,"text-size":12,"text-allow-overlap":!0},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(194, 79%, 91%)","text-color":"hsl(194, 64%, 49%)","text-halo-width":2}},{id:"Pay Per Use Lounge title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.service.pay_per_use_lounge"]]],["has","title"],["!=",["get","title"],""],["!=",["get","title"],"unknown"]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"text-padding":2,"text-font":["Lato Regular"],"text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"icon-image":"what.service.airline_lounge","icon-offset":[0,-32],"text-anchor":"top","icon-size":{base:1,stops:[[17,.3],[22,1]]},"icon-padding":1},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-blur":0,"text-halo-color":"hsl(224, 43%, 58%)","text-halo-width":1.5,"text-color":"#ffffff","text-translate":[0,0],"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Office",type:"fill-extrusion",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.office.workstation","what.office.workspace"]]]],paint:{"fill-extrusion-color":"#C0E4C5","fill-extrusion-height":3,"fill-extrusion-base":0,"fill-extrusion-opacity":1}},{id:"Exhibition Experience",type:"fill-extrusion",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.office.meeting_room","what.service.event_hall"]]]],paint:{"fill-extrusion-color":"#FF9758","fill-extrusion-height":3,"fill-extrusion-base":0,"fill-extrusion-opacity":1}},{id:"Tenant title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:19,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.shop.retail","what.shop.food","what.infra.carpark","what.office.workspace","what.office.meeting_room","what.service.event_hall","what.service.airline_lounge","what.service.information","what.service.checkin","what.transport.pickup","what.security","what.service.smoking_area","what.service.toilet","what.service.clinic","what.other","what.infra.lift","what.infra.stairs"]]],["!=",["get","title"],""],["!=",["get","title"],"unknown"]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]},"text-font":["Lato Regular"],"text-padding":1,"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"text-allow-overlap":!0,"text-ignore-placement":!0,"text-optional":!0},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":["match",["get","dimension_what"],"what.security","#B3908D","what.infra.carpark","#FFE8A6","what.infra.cafe","#7190B0","what.shop.food","#7190B0","what.shop.retail","#FFD6A5","what.office.workspace","#95A8A9","what.office.meeting_room","#52628E","what.service.event_hall","#86A08A","what.service.airline_lounge","#9FA5AC","what.service.information","#A9A9A9","what.infra.lift","#A9A9A9","what.infra.stairs","#A9A9A9","what.service.checkin","#7190B0","what.transport.pickup","#B3A274","what.service.smoking_area","#ABA6AF","what.service.toilet","#B3A274","what.service.clinic","#B3908D","what.other","#ABA6AF","rgba(214, 214, 214, 0.70)"],"text-color":"#ffffff","text-halo-width":2}},{id:"Anchor tenant title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:19,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.shop.retail_anchor","what.shop.food_anchor"]]],["!=",["get","title"],""],["!=",["get","title"],"unknown"]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]},"icon-offset":[0,-20],"icon-image":{base:1,type:"categorical",property:"dimension_what",stops:[["what.shop.retail_anchor","what.shop.retail"],["what.shop.food_anchor","what.shop.food"]],default:"what.shop.retail"},"text-font":["Lato Regular"],"text-padding":1,"icon-size":{base:1,stops:[[17,.3],[21,1]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"text-max-width":5},paint:{"text-color":"#ffffff","text-halo-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.shop.retail_anchor","hsl(267, 31%, 52%)"],["what.shop.food_anchor","hsl(25, 76%, 58%)"]],default:"hsl(267, 31%, 52%)"},"text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[18.5,1]]},"text-halo-width":2,"icon-opacity":{base:1,stops:[[17,0],[18.5,1]]}}},{id:"Entrance texts",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.entrance"]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]},"text-ignore-placement":!0,"text-max-width":5},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2}},{id:"Exit texts",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.exit"]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]},"text-ignore-placement":!0},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2}},{id:"Floor outline aka wall fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.wall","what.wall"]]]],paint:{"fill-color":"hsl(0, 0%, 56%)"}},{id:"Floor outline aka wall",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["in",["get","dimension_what"],["literal",["what.infra.wall","what.wall"]]]],paint:{"line-width":{base:1,stops:[[15.5,1],[22,3]]},"line-color":"hsl(0, 0%, 56%)"}},{id:"Changi Walkway Text",type:"symbol",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.transport.walkway"]],layout:{"text-field":"{title}","text-font":["Lato Regular"],"text-pitch-alignment":"viewport","text-size":12},paint:{"text-halo-color":"#cd9d2d","text-color":"#ffffff","text-halo-width":2,"text-opacity":0}},{id:"Changi Sheltered Walkway Text",type:"symbol",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.transport.walkway_sheltered"]],layout:{"text-field":"{title}","text-font":["Lato Regular"],"text-pitch-alignment":"viewport","text-size":12},paint:{"text-halo-color":"#375692","text-color":"#ffffff","text-halo-width":2}},{id:"Garden text",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.garden"],["!=",["get","title"],"unknown"],["!=",["get","title"],""]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[17,8],[18,15]]}}},{id:"Belt text",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.baggage_claim"]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[17,8],[18,15]]}},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2}},{id:"Infrastructure icons",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.infra.ramp","what.infra.escalator"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.3],[22,.7]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Attraction text and icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["has","title"],["!=",["get","title"],""],["!=",["get","title"],"unknown"],["in",["get","dimension_what"],["literal",["what.shop.fun","what.service.attraction_tour"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[22,15]]},"icon-offset":[0,-30],"icon-image":"{dimension_what}","text-transform":"uppercase","text-font":["Lato Regular"],visibility:"visible","icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(330, 100%, 68%)","text-halo-width":2,"text-halo-blur":0,"text-color":"hsl(0, 0%, 100%)"}},{id:"Rest area text and icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.rest_area"]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[22,15]]},"text-transform":"uppercase","text-font":["Lato Regular"],visibility:"visible","text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"#fff","text-halo-width":2,"text-halo-blur":0,"text-color":"#86A08A"}},{id:"Airport transfer icon and text",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.airport_transfer"]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,-40],"icon-image":"{dimension_what}","text-font":["Lato Regular"],visibility:"visible","icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"#ec7033","text-halo-width":2,"text-halo-blur":0,"text-color":"hsl(0, 0%, 100%)"}},{id:"Other Attraction icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["has","title"],["!=",["get","title"],""],["!=",["get","title"],"unknown"],["in",["get","dimension_what"],["literal",["what.service.movie_theatre"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[22,15]]},"icon-offset":[0,-30],"icon-image":"{dimension_what}","text-transform":"uppercase","text-font":["Lato Regular"],visibility:"visible","icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(330, 100%, 68%)","text-halo-width":2,"text-halo-blur":0,"text-color":"hsl(0, 0%, 100%)"}},{id:"Other Service icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.infra.lift","what.service.phone","what.service.baggage_storage","what.service.atm","what.service.money_exchange","what.service.internet","what.service.tv_lounge","what.service.family_room","what.service.baby_care","what.service.post","what.service.wifi","what.service.prayer_room","what.service.tax_refund","what.service.device_charging","what.service.meditation_room","what.service.smoking_area","what.service.cloakroom","what.service.prayer_room","what.service.adult_diaper_change","what.service.changi_rewards","what.service.toilet_accessible","what.service.shower"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.3],[24,1]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"iShop Changi",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","title"],"iShop Changi"]],layout:{visibility:"visible","icon-padding":1,"icon-size":{base:1,stops:[[17,.3],[22,1]]},"text-field":"{title}","text-font":["Lato Regular"],"text-max-width":4,"text-size":{base:1,stops:[[16,6],[20,18]]},"text-letter-spacing":-.05,"text-line-height":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 47%)","text-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Tenant Icons",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:19,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.security","what.infra.carpark","what.infra.cafe","what.transport.pickup","what.service.clinic","what.service.airline_lounge","what.service.event_hall","what.shop.food","what.other","what.office.workspace","what.office.meeting_room","what.service.checkin","what.service.toilet","what.service.smoking_area"]]]],layout:{visibility:"visible","icon-image":["case",["in",["get","title"],["literal",["MEDIA CENTRE","MEDIA"]]],"_media_room",["in",["get","title"],["literal",["RMAF VIEWING GALLERY","VIEWING GALLERY"]]],"_gallery",["match",["get","dimension_what"],"what.security","_security","what.infra.carpark","_parking","what.infra.cafe","_cafe","what.shop.food","_cafe","what.transport.pickup","_dropoff","what.service.clinic","_medical","what.service.airline_lounge","_lounge","what.service.event_hall","_event_hall","what.office.workspace","_event_hall","what.office.meeting_room","_office","what.service.checkin","_registration","what.service.toilet","_toilet","what.service.smoking_area","_smoking","what.other","_other","_other"]],"text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.2],[24,.2]]},"icon-padding":1,"icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-offset":[0,-120]},paint:{"text-color":"#ffffff","text-halo-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.office.meeting_room","#52628E"],["what.office.workstation","#ABA6AF"],["what.office.workspace","#95A8A9"],["what.other","#ABA6AF"],["what.service.event_hall","#635671"]],default:"hsl(267, 31%, 52%)"},"text-halo-width":2,"text-halo-blur":0,"icon-opacity":{base:1,stops:[[17,0],[18.5,1]]}}},{id:"Immigration icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.immigration"]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.3],[22,1]]},"icon-allow-overlap":!0,"text-size":{base:1,stops:[[17,1],[20,18]]},"text-letter-spacing":-.05},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Transport Taxi, Bus, Consierge and Train",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.transport.taxi_queue","what.transport.taxi","what.transport.type_bus","what.transport.bus","what.transport.train","what.service.ground_transport_concierge"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,0],"icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-allow-overlap":!0,visibility:"visible","text-offset":[0,1],"icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"#ec7033","text-halo-width":2,"text-halo-blur":0,"text-translate":[0,0]}},{id:"SCDF Helpdesk icon",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.office.help_desk"]]]],layout:{visibility:"visible","icon-image":"what.service.vip_counter","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.3],[24,1]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Construction area",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.construction"]],paint:{"fill-color":{base:1,stops:[[17,"hsl(0, 0%, 100%)"],[17.5,"hsl(0, 0%, 70%)"]]},"fill-opacity":.99,"fill-antialias":!1}},{id:"Construction outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.construction"]],paint:{"line-color":"hsl(0, 0%, 70%)","line-opacity":1,"line-width":1}},{id:"Construction text",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.construction"]],layout:{visibility:"visible","text-letter-spacing":-.05,"icon-size":{base:1,stops:[[17,.3],[22,1]]},"icon-allow-overlap":!0,"text-size":{base:1,stops:[[17,1],[20,20]]},"text-max-width":5,"text-field":"{title}","text-font":["Lato Regular"]},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 39%)","text-halo-color":"hsl(0, 0%, 70%)","text-halo-width":4}},{id:"CCTV icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.security.cctv"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,-40],"icon-image":"live_asset","text-font":["Lato Regular"],visibility:"visible","text-offset":[0,0],"icon-size":{base:1,stops:[[17,.3],[22,1]]},"text-anchor":"top","text-field":"{title}","icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"#297b72","text-halo-width":2,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"incident icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.incident"]]]],layout:{visibility:"visible","icon-image":"what.incident","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.45],[24,1.5]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Fire Safety (others) icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.fire_safety.exit","what.fire_safety.extinguisher","what.fire_safety.hose_outlet","what.fire_safety.hydrant","what.fire_safety.breeching_inlet"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.45],[24,1.5]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Cell Tower signal heatmap",type:"heatmap",source:"custom",maxzoom:10,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.cell_tower.health_red","what.cell_tower.health_yellow","what.cell_tower.health_green"]]]],paint:{"heatmap-weight":1,"heatmap-intensity":["interpolate",["linear"],["zoom"],0,1,11,1.5],"heatmap-color":["interpolate",["linear"],["heatmap-density"],0,"rgba(101, 133, 247, 0)",.2,"rgba(101, 133, 247, 0.02)",.4,"rgba(101, 133, 247, 0.1)",.6,"rgba(76, 111, 237, 0.3)",.8,"rgba(76, 111, 237, 0.5)",1,"rgba(76, 111, 237, 0.7)"],"heatmap-radius":["interpolate",["linear"],["zoom"],0,0,5,3,8,16,11,32],"heatmap-opacity":["interpolate",["linear"],["zoom"],8,.9,11,0]}},{id:"Cell Tower polygon range",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:10,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.cell_tower.health_red","what.cell_tower.health_yellow","what.cell_tower.health_green"]]]],paint:{"fill-color":"blue","fill-opacity":.02}},{id:"Cell Tower polygon range outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:10,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.cell_tower.health_red","what.cell_tower.health_yellow","what.cell_tower.health_green"]]]],paint:{"line-color":"blue","line-opacity":.06}},{id:"Cell Tower icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:10,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.cell_tower.health_red","what.cell_tower.health_yellow","what.cell_tower.health_green"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","icon-size":{base:1,stops:[[10,.45],[24,1.5]]},"icon-padding":1},paint:{"icon-opacity":1}},{id:"highlight_custom_symbol",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:18,filter:["all",["all",["==",["geometry-type"],"Point"]]],layout:{visibility:"none","icon-image":"{dimension_what}","icon-size":1,"icon-optional":!0,"text-field":"{title}","text-max-width":4,"text-padding":2,"text-line-height":.8,"text-optional":!0,"text-font":["Lato Regular"],"icon-offset":[0,-16],"text-offset":[0,.2],"text-anchor":"top","text-size":{stops:[[16,10],[18,16]]}},paint:{"icon-opacity":{stops:[[16,0],[16.5,1]]},"text-color":"#fff","text-halo-width":2,"text-halo-color":"#373737","text-halo-blur":1,"text-opacity":{stops:[[18,0],[18.5,1]]}}},{id:"Fire Zone Polygon",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.fire_safety.fire_zone"]]]],paint:{"fill-color":"#ff75df","fill-opacity":.1}},{id:"Fire Zone Outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.fire_safety.fire_zone"]]]],paint:{"line-color":"#ff75df","line-width":2,"line-dasharray":[4,2]}},{id:"Fire Safety Icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.fire_safety.smoke_detector.general","what.fire_safety.manual_call_point"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,-20],"icon-image":"{dimension_what}","text-font":["Lato Regular"],"text-padding":1,"icon-size":{base:1,stops:[[17,.3],[21,1]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"icon-allow-overlap":!0,"text-allow-overlap":!0},paint:{"text-color":"#ffffff","text-halo-color":"#ff75df","text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2,"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Fire Zone Title",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.fire_safety.fire_zone"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,14],[20,24]]},"text-font":["Lato Regular"],"text-padding":1,"text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"text-allow-overlap":!0},paint:{"text-color":"#ffffff","text-halo-color":"#ff75df","text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2}},{id:"Transit overlay",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:15,maxzoom:17,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Transit"]],paint:{"fill-color":"hsl(250, 75%, 33%)","fill-antialias":!1,"fill-opacity":{base:1,stops:[[16,.4],[16.5,0]]}}},{id:"Public overlay",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:15,maxzoom:17,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Public"]],paint:{"fill-color":"hsl(31, 100%, 43%)","fill-opacity":{base:1,stops:[[16,.4],[16.5,0]]},"fill-antialias":!1}},{id:"Transit overlay text",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:15,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Transit"]],layout:{visibility:"visible","icon-offset":[0,-104],"icon-size":1,"text-field":"Transit","text-font":["Lato Regular"],"text-size":25,"text-allow-overlap":!0},paint:{"icon-opacity":{base:1,stops:[[13,1],[13.5,0]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"hsl(254, 56%, 46%)","text-halo-width":2,"text-halo-blur":2,"text-opacity":{base:1,stops:[[15,0],[15.5,1],[16.25,1],[16.5,0]]}}},{id:"Skytrain line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.transport.skytrain"]],layout:{visibility:"none"},paint:{"line-color":"hsl(13, 97%, 67%)","line-width":3}},{id:"Skytrain icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.transport.skytrain"]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,0],"icon-image":"{dimension_what}","text-font":["Lato Regular"],visibility:"visible","text-offset":[0,1],"icon-size":.4,"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":2,"text-max-width":10},paint:{"icon-opacity":{base:1,stops:[[15,0],[15.5,1]]},"text-color":"hsl(0, 0%, 100%)","text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"#ec7033","text-halo-width":2,"text-halo-blur":0,"text-translate":[0,0]}},{id:"Building Extrusion",type:"fill-extrusion",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.building.extruded"]]]],paint:{"fill-extrusion-color":"#E1E1E0","fill-extrusion-height":30,"fill-extrusion-opacity":1}},{id:"Building overlay - changi",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},maxzoom:17.5,source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","#008FBA"],["where.changi.terminals.t1.l1","#1a72B6"],["where.changi.terminals.t2.l1","#ee3424"],["where.changi.terminals.t3.l1","#008880"],["where.changi.terminals.t4.l1","#6f2770"]],default:"#a9a9a9"},"fill-opacity":{base:1,stops:[[17,.99],[17.5,0]]},"fill-antialias":!1}},{id:"Building overlay outline - changi",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:15.5,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","#008FBA"],["where.changi.terminals.t1.l1","#1a72B6"],["where.changi.terminals.t2.l1","#ee3424"],["where.changi.terminals.t3.l1","#008880"],["where.changi.terminals.t4.l1","#6f2770"]],default:"#747474"},"line-opacity":1,"line-width":2}},{id:"Building icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:1,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-size":{base:1,stops:[[13,.21],[14,.3],[15,.6],[16,1]]},"text-font":["Lato Regular"],"text-size":50,"icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-image":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","building_Jewel"],["where.changi.terminals.t1.l1","building_T1"],["where.changi.terminals.t2.l1","building_T2"],["where.changi.terminals.t3.l1","building_T3"],["where.changi.terminals.t4.l1","building_T4"]],default:"building_T1"},"icon-offset":[0,0]},paint:{"text-color":"hsl(0, 0%, 100%)","text-halo-color":"rgba(0,136,128,1)","text-halo-width":2,"text-opacity":{base:1,stops:[[15.5,1],[15.6,0]]},"icon-opacity":{base:1,stops:[[15,1],[15.5,0]]}}},{id:"Building text other",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:1,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.building"],["!",["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]]],layout:{visibility:"visible","text-size":12,"text-field":"{title}","text-font":["Lato Regular"],"icon-allow-overlap":!1},paint:{"text-color":"hsl(0, 0%, 100%)","text-halo-color":"rgba(0,136,128,1)","text-halo-width":2}},{id:"VAPT Polygons",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside"],["==",["get","dimension_where"],"where.changi.tarmac.public"]],paint:{"fill-color":"hsl(0, 0%, 68%)"}},{id:"VAPT Lines",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside"],["==",["get","dimension_where"],"where.changi.tarmac.public"]],paint:{"line-color":"rgb(80,80,80)","line-opacity":1,"line-width":2}},{id:"VAPT names",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:13,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.airside"],["==",["get","dimension_where"],"where.changi.tarmac.public"]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":12},paint:{"text-halo-color":"hsl(194, 0%, 60%)","text-color":"hsl(194, 0%, 100%)","text-halo-width":2}},{id:"Province Polygons",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:3,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.country.province","what.mangrove_area.hectares_0","what.mangrove_area.hectares_1_1000","what.mangrove_area.hectares_1001_5000","what.mangrove_area.hectares_5001_10000","what.mangrove_area.hectares_10001_25000","what.mangrove_area.hectares_25001_55000"]]]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.country.province","white"],["what.mangrove_area.hectares_0","white"],["what.mangrove_area.hectares_1_1000","#dbffba"],["what.mangrove_area.hectares_1001_5000","#b0e67e"],["what.mangrove_area.hectares_5001_10000","#97d65c"],["what.mangrove_area.hectares_10001_25000","#79b83e"],["what.mangrove_area.hectares_25001_55000","#4c8219"]],default:"white"},"fill-opacity":.75}},{id:"Province Outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:3,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.country.province","what.mangrove_area.hectares_0","what.mangrove_area.hectares_1_1000","what.mangrove_area.hectares_1001_5000","what.mangrove_area.hectares_5001_10000","what.mangrove_area.hectares_10001_25000","what.mangrove_area.hectares_25001_55000"]]]],paint:{"line-color":"grey","line-width":1,"line-opacity":.5}},{id:"ZoneA",maxzoom:18,type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Zone A"]],paint:{"fill-color":"hsl(228, 91%, 75%)","fill-opacity":{stops:[[15,0],[15.2,.15],[16.3,.15],[18,0]]},"fill-antialias":!1}},{id:"ZoneB",maxzoom:18,type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Zone B"]],paint:{"fill-color":"hsl(132, 56%, 76%)","fill-opacity":{stops:[[15,0],[15.2,.2],[16.3,.2],[18,0]]},"fill-antialias":!1}},{id:"ZoneC",maxzoom:18,type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Zone C"]],paint:{"fill-color":"hsl(45, 100%, 75%)","fill-opacity":{stops:[[15,0],[15.2,.2],[16.3,.2],[18,0]]},"fill-antialias":!1}},{id:"ZoneD",maxzoom:18,type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Zone D"]],paint:{"fill-color":"hsl(4, 100%, 82%)","fill-opacity":{stops:[[15,0],[15.2,.15],[16.3,.15],[18,0]]},"fill-antialias":!1}},{id:"Hall A overlay text",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:15,maxzoom:18,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.wing"]],layout:{visibility:"visible","icon-offset":[0,-104],"icon-size":1,"text-field":["match",["get","title"],"Zone A","Hall A","Zone B","Hall B","Zone C","Hall C","Zone D","Hall D",""],"text-size":25,"text-font":["Lato Regular"],"text-allow-overlap":!0},paint:{"icon-opacity":{base:1,stops:[[13,1],[13.5,0]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"hsl(22, 38%, 45%)","text-halo-width":2,"text-halo-blur":2,"text-opacity":{base:1,stops:[[15,0],[15.5,1],[16.25,1],[18,0]]}}},{id:"Booth-extrusion",type:"fill-extrusion",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.booth"]]]],paint:{"fill-extrusion-color":["case",["==",["get","tier"],"basic"],"#6BB8C7",["get","color"]],"fill-extrusion-height":3,"fill-extrusion-opacity":1}},{id:"Booths outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:20.5,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.booth"]]]],paint:{"line-color":["get","color"],"line-width":1,"line-opacity":["interpolate",["linear"],["zoom"],20.5,0,21.5,.8]}},{id:"Booth title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.booth"]]],["!=",["get","title"],""],["!=",["get","title"],"unknown"]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,7],[18,11],[20,15]]},"icon-offset":[0,0],"text-font":["step",["zoom"],["literal",["Lato Regular"]],20,["match",["get","tier"],"premium",["literal",["Lato Bold"]],"premiumplus",["literal",["Lato Bold"]],["literal",["Lato Regular"]]]],"text-padding":1,"text-anchor":"center","text-field":"{title}","text-letter-spacing":0,"text-max-width":5},paint:{"text-halo-color":["get","text_color"],"text-color":"#ffffff","text-halo-blur":0,"text-opacity":1,"text-halo-width":2,"icon-opacity":{base:1,stops:[[15,0],[15.5,1]]}}},{id:"Booth Icons",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.booth"]]],["has","title"],["!=",["get","title"],""],["!=",["get","title"],"unknown"]],layout:{"icon-offset":[0,0],"icon-overlap":"always","icon-image":"{title}","icon-size":["interpolate",["linear"],["zoom"],17,["match",["get","tier"],"premiumplus",.1,"premium",.05,"standard",0,"basic",0,.025],19,["match",["get","tier"],"premiumplus",.3,"premium",.15,"standard",.08,"basic",.04,.05],21,["match",["get","tier"],"premiumplus",.8,"premium",.6,"standard",.4,"basic",.2,.2],22,["match",["get","tier"],"premiumplus",.8,"premium",.6,"standard",.5,"basic",.35,.5]],"icon-padding":1}}];!function(e){e.Name="title",e.LocalRef="localRef",e.WhatTaxonomy="dimension_what"}(Vp||(Vp={})),function(e){e.UrlLoad="url_load",e.MapClick="map_click",e.BannerClick="banner_click",e.SearchInput="search_input",e.ListClick="list_click",e.InfoPopupClick="info_popup_click",e.Chatbot="chatbot",e.RoutingUI="routing_ui",e.StampRallyClick="stamp_rally_click"}(qp||(qp={}));const Jp="https://api.maptiler.com/maps/01985ac8-56d2-707b-afa8-68abfe8f18be/style.json?key=12H5hrITUbJ1sDrVPqkq";class Yp{setupFirebase(){this.firebaseApp=Nc({apiKey:"AIzaSyBDWO2wNkotbgjbkyqVrC_OEAJ3mbvlheI",authDomain:"tmt-lenovo-tech-day-26-id.firebaseapp.com",projectId:"tmt-lenovo-tech-day-26-id",storageBucket:"tmt-lenovo-tech-day-26-id.firebasestorage.app",messagingSenderId:"618619544262",appId:"1:618619544262:web:cb7a7953a908aeed212dc7",measurementId:"G-HN2FS1L0P4"}),this.analytics=function(e=function(e=Ac){const t=Lc.get(e);if(!t&&e===Ac&&ml())return Nc();if(!t)throw Dc.create("no-app",{appName:e});return t}()){const t=Fc(e=Sl(e),Lu);return t.isInitialized()?t.getImmediate():function(e,t={}){const n=Fc(e,Lu);if(n.isInitialized()){const e=n.getImmediate();if(xl(t,n.getOptions()))return e;throw ju.create("already-initialized")}return n.initialize({options:t})}(e)}(this.firebaseApp)}logAnalyticsEvent(e,t){this.analytics&&(t?Ku(this.analytics,e,t):Ku(this.analytics,e))}onLoad(){!0===this.mapLoaded&&!0===this.apiAuthenticationCallbackReceived&&(this.routingVisualizer.setupRouting(this.map),this.onLoadCallback&&this.onLoadCallback())}onLoadFail(e){!1===this.onFailCallbackSent&&(this.onFailCallbackSent=!0,this.onLoadFailCallback&&this.onLoadFailCallback(e))}initMetaAtlasCore(e,t){this.metaAtlasCore.init(this.empApiURL,this.accessToken,this.secretKey,n=>{this.apiAuthenticationCallbackReceived=!0,n.authenticated?(this.metaAtlasCore.setupRouting(e),this.metaAtlasCore.setupMapObjectSearch(t),this.map3D=new cl(this.metaAtlasCore),this.onLoad()):this.onLoadFail("Failed to authenticate token")})}constructor(e,t,n=()=>{},r=e=>{},o=()=>{},i=()=>{}){this.onLoadCallback=void 0,this.onLoadFailCallback=void 0,this.mapLoaded=!1,this.onFailCallbackSent=!1,this.UserLayers=[],this.defaultFocusedTaxonomy="where.gbtb",this.currentFocus=this.defaultFocusedTaxonomy,this.apiAuthenticationCallbackReceived=!1,this.routingVisualizer=new Up(this),this.tileServer="https://atoms-map-tiles-middleware.sandbox.spatialverse.online",this.HOST="https://atoms-sdk.sandbox.spatialverse.online/",this.empApiURL="https://atoms-api.sandbox.spatialverse.online",this.mapBoxDrawSourceID="drawnDataSource",this.drawGeojsonData={type:"FeatureCollection",features:[]},this.popups=[],this.markers=[],this.addCustomerLayer=(e,t,n)=>{let r=t.customerLayerUrl,o=t.sourceLayer;U.getJSON(r,t=>{this.CustomerLayers=t;for(const t of this.CustomerLayers)t["source-layer"]=o,e.addLayer(t),this.map.on("click",t.id,e=>{const t=e.features[0];if(this.overRideSelectionOfDrawnPointGeometry(t),this.logAnalyticsEvent("feature_clicked",{feature_clicked:t.properties.title}),t.properties.isSearchable&&"Transit"!=t.properties.title&&"Public"!=t.properties.title){const n="Polygon"===t.geometry.type?JSON.parse(t.properties.center):t.geometry.coordinates;this.metaAtlasCore.setLastClickedFeature({mapObjectId:t.properties.myMapObjectId,coordinates:n,name:t.properties.title,whatDimension:t.properties.dimension_what,whereDimension:t.properties.dimension_where,geometry:t.geometry,properties:t.properties,clickEvent:e})}});n()})},this.accessToken=e,this.secretKey=t,this.onLoadCallback=n,this.onLoadFailCallback=r,this.map=null,this.mapBoxDraw=null,this.maplibregl=s,this.CustomerLayers=$p,this.CustomerLayersVariant=Gp,this.roleName="changipublic",this.verNum="1",this.metaAtlasCore=new Qs,this.initMetaAtlasCore(o,i),this.setupFirebase()}setupMap(e,t){this.roleName=e,this.map="string"==typeof t?new s.Map({container:t,style:Jp,center:[110.40560122701005,1.5626614114987702],zoom:18,pitch:42,bearing:23.4,antialias:!0,attributionControl:!1}):t;const n=()=>{this.map.addSource("custom",{type:"vector",url:this.tileServer+"/"+this.roleName+"/"+this.verNum+"/geojson?accessToken="+this.accessToken}),this.logAnalyticsEvent("open_app",{type:"web",token:this.accessToken}),this.map.on("click",e=>{this.metaAtlasCore.setLastClickedFeature({mapObjectId:null,coordinates:null,name:null,whatDimension:null,whereDimension:null,geometry:null,properties:null,clickEvent:e}),this.lastClickedDrawing=this.setDrawing()});const e=this.CustomerLayers;for(const t of e)t["source-layer"]="geojson",this.map.addLayer(t),this.map.on("click",t.id,e=>{var t=e.features[0];if(this.logAnalyticsEvent("feature_clicked",{feature_clicked:t.properties.title}),this.overRideSelectionOfDrawnPointGeometry(t),t.properties.dimension_what.includes("what.infra.garden")||t.properties.isSearchable&&"Transit"!=t.properties.title&&"Public"!=t.properties.title){const n="Polygon"===t.geometry.type||"MultiPolygon"===t.geometry.type?JSON.parse(t.properties.center):t.geometry.coordinates;this.metaAtlasCore.setLastClickedFeature({mapObjectId:t.properties.myMapObjectId,coordinates:n,name:t.properties.title,whatDimension:t.properties.dimension_what,whereDimension:t.properties.dimension_where,geometry:t.geometry,properties:t.properties,clickEvent:e})}});this.mapLoaded=!0,this.setupMapBoxDraw()};this.map.loaded()?n():this.map.on("load",n),this.map.on("error",e=>{this.onLoadFail(e.message)})}setupMapBoxDraw(){this.mapBoxDraw=new Go({displayControlsDefault:!1,userProperties:!0,modes:Object.assign(Object.assign({},Go.modes),{draw_marker:di,marker_select:Si}),styles:Yo}),this.map.addControl(this.mapBoxDraw),this.map.addSource(this.mapBoxDrawSourceID,{type:"geojson",data:this.drawGeojsonData});for(let e=0;e<Jo.length;e++){const t=Jo[e];t.source=this.mapBoxDrawSourceID,this.map.addLayer(t),this.map.on("click",t.id,e=>{this.metaAtlasCore.setLastClickedFeature({mapObjectId:null,coordinates:null,name:null,whatDimension:null,whereDimension:null,geometry:null,properties:null,clickEvent:e});var t=e.features[0];this.overRideSelectionOfDrawnPointGeometry(t),t.properties.id?this.lastClickedDrawing=this.getDrawingById(t.properties.id):this.lastClickedDrawing=this.setDrawing()})}this.mapLoaded=!0,this.onLoad()}overRideSelectionOfDrawnPointGeometry(e){if(this.mapBoxDraw&&"simple_select"===this.mapBoxDraw.getMode()&&1===this.mapBoxDraw.getAll().features.length){const t=this.mapBoxDraw.getAll().features;void 0===e.properties.id?this.mapBoxDraw.deleteAll():void 0!==e.properties.id&&t[0].id!==e.properties.id&&(this.mapBoxDraw.deleteAll(),e.properties.id)}}getFocusTree(){return this.metaAtlasCore.getFocusTree()}setDrawing(e=null,t=null,n=null,r=null){return{id:e,where:t,geometry:n,properties:r}}getLastClickedFeature(){return this.metaAtlasCore.getLastClickedFeature()}getLastClickedDrawing(){let e=this.lastClickedDrawing;return this.lastClickedDrawing&&(!this.lastClickedDrawing||null!==this.lastClickedDrawing.id&&null!==this.lastClickedDrawing.where)||(e=this.setDrawing()),e}getMidPointOfFeature(e){return this.metaAtlasCore.getMidPointOfFeature(e)}dropPin(e,t,n=!0){const r={feature:e,popupStyle:t},o=document.createElement("div");o.innerHTML=r.popupStyle;const i=new s.Marker({element:o}).setLngLat(this.getMidPointOfFeature(r.feature)).addTo(this.map);return n?this.popups.length>1?(this.popups[this.popups.length-1].popup.remove(),this.popups[this.popups.length-1].popup=i,this.popups[this.popups.length-1].id=r.feature.mapObjectId):(this.popups.length>0&&this.popups[this.popups.length-1].popup.remove(),this.popups=[{popup:i,id:r.feature.mapObjectId}]):this.popups.push({popup:i,id:r.feature.mapObjectId}),this.popups[this.popups.length-1].id}dropMarkerForRouting(e){e.forEach(e=>{var t,n,r;const o=(null===(t=e.selectedLocation)||void 0===t?void 0:t.coordinates)?e.selectedLocation.coordinates:null===(r=null===(n=e.selectedLocation)||void 0===n?void 0:n.geometry)||void 0===r?void 0:r.coordinates;if(o&&2===o.length){const e=new this.maplibregl.Marker({color:"#188689"}).setLngLat([o[0],o[1]]).addTo(this.map);this.markers.push(e)}})}clearMarker(){this.markers&&this.markers.length>0&&this.markers.forEach(e=>{e.remove()}),this.markers=[]}extractLocation(e){const t=e.match(/^(?:[^_]*_){3}([^_]*)/);return t?t[1]:null}hidePin(e="-1"){let t;if("-1"===e){const e=this.popups[this.popups.length-1];if(!e)return;t=e.id}else t=e;const n=this.popups.find(e=>e.id===t);if(n){let e=n.popup.getElement();e&&(e.style.display="none")}}hidePins(){this.popups.length>0&&this.popups.forEach(e=>{let t=e.popup.getElement();t&&(t.style.display="none")})}showPin(e="-1"){let t;if("-1"===e){const e=this.popups[this.popups.length-1];if(!e)return;t=e.id}else t=e;const n=this.popups.find(e=>e.id===t);if(n){let e=n.popup.getElement();e&&(e.style.display="flex")}}showPins(){this.popups.length>0&&this.popups.forEach(e=>{let t=e.popup.getElement();t&&(t.style.display="flex")})}clearPin(e="-1"){let t;if("-1"===e){if(t=this.popups.length-1,t<0)return}else if(t=this.popups.findIndex(t=>t.id===e),-1===t)return;this.popups[t]&&(this.popups[t].popup.remove(),this.popups.splice(t,1))}clearPins(){this.popups.length>0&&(this.popups.forEach(e=>{e.popup.remove()}),this.popups.length=0)}removePin(){U(".mapboxgl-popup").remove()}getCurrentFocus(){return this.metaAtlasCore.getCurrentFocus()}getCurrentFocusBuilding(){return this.metaAtlasCore.getCurrentFocusBuilding()}getCurrentFocusFloor(){return this.metaAtlasCore.getCurrentFocusFloor()}addUserLayer(e){this.UserLayers.push(e),this.map.addLayer(e),this.map.on("click",e.id,e=>{var t=e.features[0];const n="Polygon"===t.geometry.type?JSON.parse(t.properties.center):t.geometry.coordinates;this.metaAtlasCore.setLastClickedFeature({mapObjectId:t.properties.id,coordinates:n,name:t.properties.name,whatDimension:t.properties.dimension_what,whereDimension:t.properties.dimension_where,geometry:t.geometry,properties:t.properties,clickEvent:e})})}filterWhereDimension(e){let t=Vo(this.UserLayers);if(t.length>0){let n=this.metaAtlasCore.filterBaseMapWhereDimension(t,e);for(let e=0;e<n.length;e++){const r=n[e].id,o=n[e].filter;t[e].filter=o,this.map.setFilter(r,o)}}let n=Vo(this.CustomerLayers);for(let e=0;e<n.length;e+=1){const t=n[e].id,r=this.map.getFilter(t);n[e].filter=r}let r=this.metaAtlasCore.filterBaseMapWhereDimension(n,e);for(let e=0;e<r.length;e+=1){const t=r[e].id,n=r[e].filter;this.map.setFilter(t,n)}}focusTo(e,t=!0){const n=this.map;let r=e;if(!r||!n)return;this.filterWhereDimension(r);const o=window.innerWidth<768;if(t){const e=this.metaAtlasCore.getFlyToLocation(r,o);this.map.flyTo({center:e.center?e.center:this.map.getCenter(),zoom:e.zoom?e.zoom:this.map.getZoom(),bearing:e.bearing?e.bearing:this.map.getBearing(),speed:.8})}}filterLayersByCategories(e,t,n,r){const o=this.map;if(!t||!o)return;let i=Vo(this.CustomerLayers);for(let e=0;e<i.length;e+=1){const t=i[e].id,n=this.map.getFilter(t);i[e].filter=n}let a=this.metaAtlasCore.filterLayersByCategories(i,e,t,n,r,this.map);for(let e=0;e<a.length;e+=1){const t=a[e].id,n=a[e].filter;this.map.setFilter(t,n)}}filterLayersByType(e,t,n=""){const r=this.map;if(!t||!r)return;let o=Vo(this.UserLayers);if(o.length>0){let r=this.metaAtlasCore.filterLayersByType(o,e,t,n);for(let e=0;e<r.length;e++){const t=r[e].id,n=r[e].filter;o[e].filter=n,this.map.setFilter(t,n)}}}styleLayersByType(e,t,n,r){if(!t||!this.map)return;let o=this.map.getStyle().layers,i=this.metaAtlasCore.styleLayersByType(o,e,t,n,r);for(let e=0;e<i.length;e+=1){const t=i[e].id,r=i[e].paint,o=i[e].type;!o||"fill"!==o&&"line"!==o||r[n]&&this.map.setPaintProperty(t,n,r[n])}}clearStyleLayersByType(e,t,n){if(!this.map)return;let r=this.map.getStyle().layers,o=this.metaAtlasCore.clearStyleLayersByType(r,e,t,n);for(let e=0;e<o.length;e+=1){const t=o[e].id,r=o[e].paint,i=o[e].type;!i||"fill"!==i&&"line"!==i||r[n]&&this.map.setPaintProperty(t,n,r[n])}}changeTerminalInFocusToUserViewpoint(e={}){let t=this.map.getCenter().wrap();const n=[t.lng,t.lat];if(this.metaAtlasCore.checkUserViewport(n,this.getCurrentFocusBuilding(),this.getCurrentFocusFloor()))return!0;let r=this.metaAtlasCore.getUserViewportBuilding(n);return!(!r||r.name in e&&(this.focusTo(e[r.name],!1),0))}isLocationWithinHongKong(e){const t=q([[[103.59716039266556,1.2570288388163817],[103.5792058079661,1.2001127572538621],[103.69481581677104,1.2005505778590049],[103.9124604166791,1.2408297702235416],[104.07843084598773,1.3003717948835174],[104.09332001378709,1.3428384139758691],[104.06568408463107,1.4395702492902842],[104.01405273250049,1.430831826129534],[103.94486100905976,1.4264524124152587],[103.88661860370877,1.4347670822090777],[103.84020398120549,1.470670314084117],[103.79466396668937,1.467591709607774],[103.75700361138325,1.4470255906078648],[103.72197278477057,1.4605952336399213],[103.68041038922672,1.4408697939934143],[103.64577440712543,1.379174061413977],[103.59716039266556,1.2570288388163817],[103.59716039266556,1.2570288388163817]]]);return Li(V(e),t)}getMapObjectsByFilteredLocalRef(...e){return this.metaAtlasCore.getMapObjectsByFilteredLocalRef(...e)}getMapObjectsByName(...e){return this.metaAtlasCore.getMapObjectsByName(...e)}getMapObjectById(...e){return this.metaAtlasCore.getMapObjectById(...e)}getMapObjectByLocalRef(...e){return this.metaAtlasCore.getMapObjectByLocalRef(...e)}getMapObjectMatchingLocalRef(...e){return this.metaAtlasCore.getMapObjectMatchingLocalRef(...e)}getMapObjectsMatchingLocalRefs(...e){return this.metaAtlasCore.getMapObjectsMatchingLocalRefs(...e)}getMapObjectsByWhatTaxonomy(...e){return this.metaAtlasCore.getMapObjectsByWhatTaxonomy(...e)}getMapObjectsByWhatTaxonomyAPI(...e){return this.metaAtlasCore.getMapObjectsByWhatTaxonomyAPI(...e)}getMapObjectsByWhereTaxonomy(...e){return this.metaAtlasCore.getMapObjectsByWhereTaxonomy(...e)}getMapObjectsByWhatAndWhereTaxonomy(...e){return this.metaAtlasCore.getMapObjectsByWhatAndWhereTaxonomy(...e)}getMapObjectsInWhatTaxonomy(...e){return this.metaAtlasCore.getMapObjectsInWhatTaxonomy(...e)}getMapObjectsInWhereTaxonomy(...e){return this.metaAtlasCore.getMapObjectsInWhereTaxonomy(...e)}computeRoute(...e){return this.routingVisualizer.computeRoute(...e)}computeRoutes(e,t=!1,n){const r=this;return(()=>{F(this,void 0,void 0,function*(){const t=yield(e=>F(this,void 0,void 0,function*(){const t=e.map(e=>(e=>new Promise(t=>{"string"!=typeof e&&t("User GPS Location"),r.getMapObjectById(e,e=>{var n;t(null===(n=e[0])||void 0===n?void 0:n.name)})}))(e));return yield Promise.all(t)}))(e);t.forEach(e=>{this.logAnalyticsEvent("route_per_object",{destination:e,route_per_object_event_source:n})}),this.logAnalyticsEvent("route",{destinations:t,route_event_source:n})})})(),this.routingVisualizer.computeRoutes(e,t)}setActiveRoute(...e){return this.routingVisualizer.setActiveRoute(...e)}getActiveRoute(...e){return this.routingVisualizer.getActiveRoute(...e)}highlightRouteSegment(...e){return this.routingVisualizer.highlightRouteSegment(...e)}clearRoute(...e){return this.routingVisualizer.clearRoute(...e)}drawGeometryOnMap(e,t,n=!1){if("simple_select"!==this.mapBoxDraw.getMode())return!1;let r=!1;return"draw_point"===e?(this.mapBoxDraw.changeMode("draw_point"),r=!0):"draw_line_string"===e?(this.mapBoxDraw.changeMode("draw_line_string"),r=!0):"draw_polygon"===e?(this.mapBoxDraw.changeMode("draw_polygon"),r=!0):"draw_marker"===e&&(this.mapBoxDraw.changeMode("draw_marker"),r=!0),r&&(this.map.once("draw.create",e=>{let r=e.features[0];r.properties.id=r.id,r.properties.dimension_where=n?this.getCurrentFocus():this.defaultFocusedTaxonomy,t(r)}),this.map.once("draw.modechange",()=>{this.mapBoxDraw.deleteAll()})),r}isInDrawMode(){return this.mapBoxDraw&&this.mapBoxDraw.getAll().features.length>0}addDrawingsToBaseMap(e){this.drawGeojsonData.features=this.drawGeojsonData.features.concat(e),this.map.getSource(this.mapBoxDrawSourceID).setData(this.drawGeojsonData)}getDrawingById(e){for(let t=0;t<this.drawGeojsonData.features.length;t++){const n=this.drawGeojsonData.features[t];if(n.id===e)return n}}editDrawing(e){if(void 0===e)return!1;let t=this.getDrawingById(e);if(void 0===t)return!1;let n={type:"FeatureCollection",features:[t]};this.mapBoxDraw.set(n);const r=e=>{const t=this.mapBoxDraw.get(e);if(this.mapBoxDraw.deleteAll(),t){let e=!1;for(let n=0;n<this.drawGeojsonData.features.length;n++)this.drawGeojsonData.features[n].id===t.id&&(this.drawGeojsonData.features[n]=t,e=!0);e&&this.map.getSource(this.mapBoxDrawSourceID).setData(this.drawGeojsonData)}};if("Point"!==t.geometry.type)void 0!==t.properties.marker?this.mapBoxDraw.changeMode("marker_select",{featureId:t.id}):this.mapBoxDraw.changeMode("direct_select",{featureId:t.id}),this.map.once("draw.modechange",()=>{"simple_select"===this.mapBoxDraw.getMode()&&r(t.id)});else{let e=!1;const n=o=>{o.features.length>0&&o.features[0].id===t.id?e||(e=!0):e&&(r(t.id),this.map.off("draw.selectionchange",n))};this.map.on("draw.selectionchange",n)}return!0}removeDrawing(e){for(let t=0;t<this.drawGeojsonData.features.length;t++)if(this.drawGeojsonData.features[t].id===e)return this.drawGeojsonData.features.splice(t,1),this.map.getSource(this.mapBoxDrawSourceID).setData(this.drawGeojsonData),!0;return!1}createMarker(e){void 0===e&&(e={}),e.draggable=!0,e.color="#FFB52E";const t=new s.Marker(e).setLngLat(this.map.getCenter()).addTo(this.map);return this.map.once("click",()=>{t.setDraggable(!1);const e="#3FB1CE";t.getElement().querySelectorAll('svg g[fill="'+t._color+'"]')[0].setAttribute("fill",e),t._color=e}),t}getCoordinates(e){return re(e)}getLength(e,t={units:"kilometers"}){if(e.geometry&&e.geometry.type){const n=e.geometry.type;if("LineString"===n||"MultiLineString"===n)return he(e,t)}}getArea(e){return fe(e)}getMap3D(){return this.map3D}}const Xp=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e))},a=t=e(r,o,i);return i},Zp=e=>e,Kp=e=>{const n=(e=>e?Xp(e):Xp)(e),r=e=>function(e,n=Zp){const r=t.useSyncExternalStore(e.subscribe,t.useCallback(()=>n(e.getState()),[e,n]),t.useCallback(()=>n(e.getInitialState()),[e,n]));return t.useDebugValue(r),r}(n,e);return Object.assign(r,n),r},Qp=e=>e?Kp(e):Kp,ef=Qp()((e,t)=>({sdk:null,mapCoreReady:!1,routingReady:!1,searchReady:!1,error:null,setSdk:t=>e({sdk:t}),setMapCoreReady:t=>e({mapCoreReady:t}),setRoutingReady:t=>e({routingReady:t}),setSearchReady:t=>e({searchReady:t}),setError:t=>e({error:t})})),tf=()=>ef(e=>e.mapCoreReady&&e.routingReady&&e.searchReady);function nf(){const e=ef(e=>e.sdk),t=ef(e=>e.mapCoreReady),r=ef(e=>e.error),o=tf();return n(()=>{if(!e){const e=()=>{},t=()=>Promise.resolve([]),n=()=>Promise.reject(new Error("SDK not ready")),o=()=>!1,i=()=>"",a=()=>null;return{sdk:null,error:r,map:null,focusTo:e,getCurrentFocus:i,getCurrentFocusBuilding:a,getCurrentFocusFloor:a,getFocusTree:a,getMapObjectsByName:t,getMapObjectById:t,getMapObjectByLocalRef:t,getMapObjectsByWhatTaxonomy:t,getMapObjectsByWhereTaxonomy:t,getMapObjectsByWhatAndWhereTaxonomy:t,getMapObjectsInWhatTaxonomy:t,getMapObjectsInWhereTaxonomy:t,getMapObjectsByFilteredLocalRef:t,getMapObjectMatchingLocalRef:t,getMapObjectsMatchingLocalRefs:t,getMapObjectsByWhatTaxonomyAPI:t,getWhatTaxonomies:a,filterWhereDimension:e,filterLayersByType:e,filterLayersByCategories:e,styleLayersByType:e,clearStyleLayersByType:e,getLastClickedFeature:a,getLastClickedDrawing:a,drawGeometryOnMap:o,addDrawingsToBaseMap:e,editDrawing:o,removeDrawing:o,getDrawingById:a,isInDrawMode:o,computeRoute:n,computeRoutes:n,setActiveRoute:e,getActiveRoute:a,highlightRouteSegment:e,clearRoute:e,dropPin:i,dropMarkerForRouting:e,clearMarker:e,hidePin:e,showPin:e,clearPin:e,clearPins:e,addUserLayer:e,getCoordinates:a,getLength:a,getArea:a,changeTerminalInFocusToUserViewpoint:o,isLocationWithinHongKong:o,getMap3D:a,logAnalyticsEvent:e}}const n=e=>(...t)=>{if(!o){const e=new Error("Search services are not ready. Please wait for initialization.");return Promise.reject(e)}return e(...t)},i=e=>(...t)=>{if(!o)throw new Error("Routing services are not ready. Please wait for initialization.");return e(...t)},a=e=>(...n)=>{if(!t)throw new Error("Map core is not ready. Please wait for initialization.");return e(...n)};return{sdk:e,error:r,map:e.map,focusTo:a((...t)=>e.focusTo(...t)),getCurrentFocus:a((...t)=>e.getCurrentFocus(...t)),getCurrentFocusBuilding:a((...t)=>e.getCurrentFocusBuilding(...t)),getCurrentFocusFloor:a((...t)=>e.getCurrentFocusFloor(...t)),getFocusTree:(...t)=>e.getFocusTree(...t),getMapObjectsByName:n((...t)=>e.getMapObjectsByName(...t)),getMapObjectById:n((...t)=>e.getMapObjectById(...t)),getMapObjectByLocalRef:n((...t)=>e.getMapObjectByLocalRef(...t)),getMapObjectsByWhatTaxonomy:n((...t)=>e.getMapObjectsByWhatTaxonomy(...t)),getMapObjectsByWhereTaxonomy:n((...t)=>e.getMapObjectsByWhereTaxonomy(...t)),getMapObjectsByWhatAndWhereTaxonomy:n((...t)=>e.getMapObjectsByWhatAndWhereTaxonomy(...t)),getMapObjectsInWhatTaxonomy:n((...t)=>e.getMapObjectsInWhatTaxonomy(...t)),getMapObjectsInWhereTaxonomy:n((...t)=>e.getMapObjectsInWhereTaxonomy(...t)),getMapObjectsByFilteredLocalRef:n((...t)=>e.getMapObjectsByFilteredLocalRef(...t)),getMapObjectMatchingLocalRef:n((...t)=>e.getMapObjectMatchingLocalRef(...t)),getMapObjectsMatchingLocalRefs:n((...t)=>e.getMapObjectsMatchingLocalRefs(...t)),getMapObjectsByWhatTaxonomyAPI:n((...t)=>e.getMapObjectsByWhatTaxonomyAPI(...t)),getWhatTaxonomies:a(()=>e.metaAtlasCore.getWhatTaxonomies()),filterWhereDimension:a((...t)=>e.filterWhereDimension(...t)),filterLayersByType:a((...t)=>e.filterLayersByType(...t)),filterLayersByCategories:a((...t)=>e.filterLayersByCategories(...t)),styleLayersByType:a((...t)=>e.styleLayersByType(...t)),clearStyleLayersByType:a((...t)=>e.clearStyleLayersByType(...t)),getLastClickedFeature:a((...t)=>e.getLastClickedFeature(...t)),getLastClickedDrawing:a((...t)=>e.getLastClickedDrawing(...t)),drawGeometryOnMap:a((...t)=>e.drawGeometryOnMap(...t)),addDrawingsToBaseMap:a((...t)=>e.addDrawingsToBaseMap(...t)),editDrawing:a((...t)=>e.editDrawing(...t)),removeDrawing:a((...t)=>e.removeDrawing(...t)),getDrawingById:a((...t)=>e.getDrawingById(...t)),isInDrawMode:a((...t)=>e.isInDrawMode(...t)),computeRoute:i((...t)=>e.computeRoute(...t)),computeRoutes:i((...t)=>e.computeRoutes(...t)),setActiveRoute:i((...t)=>e.setActiveRoute(...t)),getActiveRoute:i((...t)=>e.getActiveRoute(...t)),highlightRouteSegment:i((...t)=>e.highlightRouteSegment(...t)),clearRoute:i((...t)=>e.clearRoute(...t)),dropPin:a((...t)=>e.dropPin(...t)),dropMarkerForRouting:i((...t)=>e.dropMarkerForRouting(...t)),clearMarker:a((...t)=>e.clearMarker(...t)),hidePin:a((...t)=>e.hidePin(...t)),showPin:a((...t)=>e.showPin(...t)),clearPin:a((...t)=>e.clearPin(...t)),clearPins:a((...t)=>e.clearPins(...t)),addUserLayer:a((...t)=>e.addUserLayer(...t)),getCoordinates:a((...t)=>e.getCoordinates(...t)),getLength:a((...t)=>e.getLength(...t)),getArea:a((...t)=>e.getArea(...t)),changeTerminalInFocusToUserViewpoint:a((...t)=>e.changeTerminalInFocusToUserViewpoint(...t)),isLocationWithinHongKong:a((...t)=>e.isLocationWithinHongKong(...t)),getMap3D:a((...t)=>e.getMap3D(...t)),logAnalyticsEvent:a((...t)=>e.logAnalyticsEvent(...t))}},[e,t,o,r])}function rf(){const{focusTo:e,getCurrentFocus:t,getCurrentFocusBuilding:n,getCurrentFocusFloor:r,getFocusTree:o}=nf(),i=ef(e=>e.mapCoreReady),a=e=>{if(!e)return null;const t=Object.keys(e);return 0===t.length?null:e[t[0]]},s=(e,t)=>{if(!e)return null;for(const n in e){const r=e[n];if(r&&r.taxonomyPath===t)return r}return null};return{focusTo:e,getCurrentFocus:t,getCurrentFocusBuilding:n,getCurrentFocusFloor:r,getFocusTree:o,getSites:()=>{if(!i)return[];const e=o();if(!e)return[];const t=[];for(const n in e){const r=e[n];r&&r.taxonomyPath&&t.push({name:r.name||"",whereTaxonomy:r.taxonomyPath||""})}return t},getBuildingList:e=>{if(!i)return[];const t=o();if(!t)return[];let n=null;if(n=e?s(t,e):a(t),!n||!n.buildings)return[];const r=[],l=n.buildings;if(Array.isArray(l))return l.map(e=>({name:e.name||"",whereTaxonomy:e.taxonomyPath||""}));for(const e in l){const t=l[e];t&&t.taxonomyPath&&r.push({name:t.name||"",whereTaxonomy:t.taxonomyPath||""})}return r},getLevelList:e=>{if(!i)return[];const t=o();if(!t)return[];let n=null;for(const r in t){const o=t[r];if(!o||!o.buildings)continue;const i=o.buildings;if(Array.isArray(i)){if(n=i.find(t=>t.taxonomyPath===e),n)break}else{for(const t in i){const r=i[t];if(r&&r.taxonomyPath===e){n=r;break}}if(n)break}}if(!n||!n.floors)return[];const r=n.floors;if(Array.isArray(r))return r.map(e=>({name:e.name||"",whereTaxonomy:e.taxonomyPath||""}));{const e=[];for(const t in r){const n=r[t];n&&n.taxonomyPath&&e.push({name:n.name||"",whereTaxonomy:n.taxonomyPath||""})}return e}},getRootSiteCameraProps:(e="web",t)=>{const n=o();if(!n)return null;let r=null;if(r=t?s(n,t):a(n),!r||!r.cameraConfigs)return null;const i=r.cameraConfigs,l=i[e]||i.web||i.mobile;return!l||!l.center||!Array.isArray(l.center)||l.center.length<2?null:{longitude:l.center[0],latitude:l.center[1],zoom:l.zoom||0,bearing:l.bearing,pitch:l.pitch}},isReady:i}}function of({accessToken:t,secretKey:s,role:c="changipublic",onLoad:u,onLoadFail:h,onRoutingStatusUpdate:p=e=>{},onSearchStatusUpdate:f=e=>{},initialViewState:d,style:m,children:g}){const y=r(null),v=ef(e=>e.sdk),w=ef(e=>e.mapCoreReady),b=ef(e=>e.setSdk),_=ef(e=>e.setMapCoreReady),x=ef(e=>e.setRoutingReady),E=ef(e=>e.setSearchReady),T=ef(e=>e.setError),{getRootSiteCameraProps:S,isReady:C}=rf(),P=n(()=>{if(d)return d;const e=S("web");return e?{longitude:e.longitude,latitude:e.latitude,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}:null},[d,C,S]);o(()=>{const e=new Yp(t,s,()=>{null==u||u()},e=>{T(e),_(!1),null==h||h(e)},e=>{x(e),null==p||p(e)},e=>{E(e),null==f||f(e)});return b(e),()=>{}},[t,s]);const O=i(()=>{if(y.current&&v&&!w){const e=y.current.getMap();v.setupMap(c,e),_(!0)}},[v,_,w]);return P?e(a,Object.assign({ref:y,mapLib:l,initialViewState:P,onLoad:O,style:m||{width:"100%",height:"100%"},mapStyle:Jp},{children:g})):null}const af=Qp(e=>({booths:{data:null,loading:!1,error:null},allMetaFeatures:{data:null,loading:!1,error:null},setData:(t,n)=>e(e=>Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},e[t]),{data:n})})),setLoading:(t,n)=>e(e=>Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},e[t]),{loading:n})})),setError:(t,n)=>e(e=>Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},e[t]),{error:n})})),activeObject:null,setActiveObject:t=>{e(e=>Object.assign(Object.assign({},e),{activeObject:t}))},marker:null,setMarker:t=>{e(e=>Object.assign(Object.assign({},e),{marker:t}))},popup:null,setPopup:t=>{e(e=>Object.assign(Object.assign({},e),{popup:t}))}}));function sf(){const{computeRoute:e,computeRoutes:t,setActiveRoute:n,getActiveRoute:r,highlightRouteSegment:o,clearRoute:i,clearMarker:a,dropMarkerForRouting:s}=nf();return{computeRoute:e,computeRoutes:t,setActiveRoute:n,getActiveRoute:r,highlightRouteSegment:o,clearRoute:i,clearMarker:a,dropMarkerForRouting:s,isReady:tf()}}function lf(){const{getMapObjectsByName:e,getMapObjectById:t,getMapObjectByLocalRef:n,getMapObjectsByWhatTaxonomy:r,getMapObjectsByWhereTaxonomy:o,getMapObjectsByWhatAndWhereTaxonomy:i,getMapObjectsInWhatTaxonomy:a,getMapObjectsInWhereTaxonomy:s,getMapObjectsByFilteredLocalRef:l,getMapObjectMatchingLocalRef:c,getMapObjectsMatchingLocalRefs:u,getMapObjectsByWhatTaxonomyAPI:h,getWhatTaxonomies:p}=nf(),f=tf();return{getMapObjectsByName:e,getMapObjectById:t,getMapObjectByLocalRef:n,getMapObjectsByWhatTaxonomy:r,getMapObjectsByWhereTaxonomy:o,getMapObjectsByWhatAndWhereTaxonomy:i,getMapObjectsInWhatTaxonomy:a,getMapObjectsInWhereTaxonomy:s,getMapObjectsByFilteredLocalRef:l,getMapObjectMatchingLocalRef:c,getMapObjectsMatchingLocalRefs:u,getMapObjectsByWhatTaxonomyAPI:h,getWhatTaxonomies:p,isReady:f,getAllMetaFeatures:()=>new Promise(e=>{r("",t=>{e(t)})})}}function cf(){const{drawGeometryOnMap:e,addDrawingsToBaseMap:t,editDrawing:n,removeDrawing:r,getDrawingById:o,isInDrawMode:i}=nf();return{drawGeometryOnMap:e,addDrawingsToBaseMap:t,editDrawing:n,removeDrawing:r,getDrawingById:o,isInDrawMode:i,isReady:ef(e=>e.mapCoreReady)}}function uf(){const{map:e,getLastClickedFeature:t}=nf(),n=ef(e=>e.mapCoreReady),i=r(new Set),a=r(new Set),s=r(new Set),l=r(new Set);return o(()=>{if(!e||!n)return;const r=e=>{const n=t();n.clickEvent||(n.clickEvent=e);const r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(n,["clickEvent"]);af.getState().setActiveObject(r),i.current.forEach(e=>e(n)),l.current.size>0&&(l.current.forEach(e=>e(n)),l.current.clear())};e.on("click",r);const o=()=>{a.current.forEach(e=>e())};e.on("load",o);const c=()=>{s.current.forEach(e=>e())};return e.on("moveend",c),()=>{e.off("click",r),e.off("load",o),e.off("moveend",c)}},[e,n]),{onMapClick:e=>(i.current.add(e),()=>{i.current.delete(e)}),onMapLoad:e=>(a.current.add(e),()=>{a.current.delete(e)}),onMapMoveEnd:e=>(s.current.add(e),()=>{s.current.delete(e)}),onceMapClick:e=>{l.current.add(e)},isReady:n}}function hf(){const{map:e,addUserLayer:t}=nf(),n=ef(e=>e.mapCoreReady);return{createReactPopup:(t,r,o)=>{if(!e||!n)return null;const i=document.createElement("div"),a=R(i);a.render(r);const s=new c(o).setLngLat(t).setDOMContent(i).addTo(e),l=()=>{a.unmount(),s.off("close",l)};return s.on("close",l),s},addLayer:e=>{n&&t(e)},createMarker:(t,r,o)=>{if(!e||!n)return null;const i=new u(r).setLngLat(t).addTo(e);return o&&(i.setPopup(o),i.togglePopup()),i},isReady:n}}function pf(){const{map:e}=nf();return{isReady:tf(),setUpStampRally:t=>new Promise(n=>{e&&Promise.all(t.map(({name:t,url:n})=>((e,t,n)=>new Promise((r,o)=>{if(e.hasImage(t))return r();e.loadImage(n,(n,i)=>{!n&&i?(e.addImage(t,i),r()):o(n)})}))(e,"stamp_locked"==t?t:`stamp-${t}`,n))).then(()=>{e.getSource("Stamp Rally")||(e.addSource("Stamp Rally",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),e.addLayer({id:"stamps-layer",type:"symbol",source:"Stamp Rally",layout:{"icon-image":["get","icon"],"icon-size":.05,"icon-allow-overlap":!0}},void 0),n(!0))}).catch(()=>{n(!1)})}),showStamps:t=>{var n;if(!e)return;const r=function(e){return e.map(e=>{if(e.geojson){const t=`stamp-${e.exhibitorName}`;e.isCollected()?e.geojson.properties.icon=t:e.geojson.properties.icon="stamp_locked"}return e.geojson})}(t);null===(n=e.getSource("Stamp Rally"))||void 0===n||n.setData({type:"FeatureCollection",features:r})},hideStamps:()=>{var t;e&&(null===(t=e.getSource("Stamp Rally"))||void 0===t||t.setData({type:"FeatureCollection",features:[]}))}}}export{of as MetaAtlasMap,cf as useDrawing,rf as useFocus,af as useMapDataStore,uf as useMapEvents,hf as useMapOverlays,nf as useMetaAtlas,ef as useMetaAtlasStore,sf as useRouting,lf as useSearch,tf as useServicesReady,pf as useStampRally};