text: !function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/upfront-info/",e(e.s=122)}([function(t,e,n){"use strict";var r=n(165),i=n(166),o=n(191),a=n(192),s=n(225),u=n(226),l={allowsArrayErrors:!0,empty:{},emptyList:[],getIn:i.a,setIn:o.a,deepEqual:a.a,deleteIn:s.a,forEach:function(t,e){return t.forEach(e)},fromJS:function(t){return t},keys:u.a,size:function(t){return t?t.length:0},some:function(t,e){return t.some(e)},splice:r.a,toJS:function(t){return t}};e.a=l},function(t,e,n){"use strict";t.exports=n(129)},function(t,e,n){t.exports=n(141)()},function(t,e,n){"use strict";var r=n(140),i=(n(60),n(144));n.d(e,"a",function(){return r.a}),n.d(e,"b",function(){return i.a})},function(t,e,n){"use strict";function r(t){return"[object Array]"===S.call(t)}function i(t){return"[object ArrayBuffer]"===S.call(t)}function o(t){return"undefined"!==typeof FormData&&t instanceof FormData}function a(t){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function s(t){return"string"===typeof t}function u(t){return"number"===typeof t}function l(t){return"undefined"===typeof t}function c(t){return null!==t&&"object"===typeof t}function p(t){return"[object Date]"===S.call(t)}function f(t){return"[object File]"===S.call(t)}function h(t){return"[object Blob]"===S.call(t)}function d(t){return"[object Function]"===S.call(t)}function m(t){return c(t)&&d(t.pipe)}function y(t){return"undefined"!==typeof URLSearchParams&&t instanceof URLSearchParams}function v(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function _(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),r(t))for(var n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}function b(){function t(t,n){"object"===typeof e[n]&&"object"===typeof t?e[n]=b(e[n],t):e[n]=t}for(var e={},n=0,r=arguments.length;n<r;n++)_(arguments[n],t);return e}function x(t,e,n){return _(e,function(e,r){t[r]=n&&"function"===typeof e?w(e,n):e}),t}var w=n(102),E=n(325),S=Object.prototype.toString;t.exports={isArray:r,isArrayBuffer:i,isBuffer:E,isFormData:o,isArrayBufferView:a,isString:s,isNumber:u,isObject:c,isUndefined:l,isDate:p,isFile:f,isBlob:h,isFunction:d,isStream:m,isURLSearchParams:y,isStandardBrowserEnv:g,forEach:_,merge:b,extend:x,trim:v}},function(t,e,n){"use strict";var r=Array.isArray;e.a=r},function(t,e,n){"use strict";var r=n(65),i="object"==typeof self&&self&&self.Object===Object&&self,o=r.a||i||Function("return this")();e.a=o},function(t,e,n){"use strict";function r(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}e.a=r},function(t,e,n){"use strict";function r(t){return t}function i(t){return t}function o(t){return t}function a(t){if(!(this instanceof a))return new a(t);l(this,t)}function s(t){var e,n,s,l;return t=t||{},e=t.init||r,n=t.request||i,s=t.success||t.response||o,l=t.error||function(){return Promise.resolve((t.response||o).apply(this,arguments)).then(Promise.reject.bind(Promise))},function(r,i){function o(t){var e,u;return e={},u={arguments:Array.prototype.slice.call(arguments),client:o},t="string"===typeof t?{path:t}:t||{},t.originator=t.originator||o,c(n.call(e,t,i,u),function(t){var n,o,c;return c=r,t instanceof a&&(o=t.abort,c=t.client||c,n=t.response,t=t.request),n=n||Promise.resolve(t).then(function(t){return Promise.resolve(c(t)).then(function(t){return s.call(e,t,i,u)},function(t){return l.call(e,t,i,u)})}),o?Promise.race([n,o]):n},function(e){return Promise.reject({request:t,error:e})})}return"object"===typeof r&&(i=r),"function"!==typeof r&&(r=t.client||u),i=e(i||{}),p(o,r)}}var u,l,c,p;u=n(111),l=n(35),c=n(56),p=n(55),s.ComplexRequest=a,t.exports=s},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"===typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function r(t){return null!=t&&"object"==typeof t}e.a=r},function(t,e,n){"use strict";var r=n(68),i=(n(40),n(69),n(70),n(71),n(72),n(156),n(157),n(73),n(159),n(160));n.d(e,"a",function(){return i.a});var o=(n(227),n(230),n(248),n(250),n(254),n(256),n(258),n(260),n(262),n(264),n(266),n(268),n(270),n(272),n(274),n(277),n(278),n(279),n(281),n(283),n(285));n.d(e,"c",function(){return o.a});var a=n(316);n.d(e,"b",function(){return a.a});n(319),r.a.arrayInsert,r.a.arrayMove,r.a.arrayPop,r.a.arrayPush,r.a.arrayRemove,r.a.arrayRemoveAll,r.a.arrayShift,r.a.arraySplice,r.a.arraySwap,r.a.arrayUnshift,r.a.autofill,r.a.blur,r.a.change,r.a.clearAsyncError,r.a.clearFields,r.a.clearSubmitErrors,r.a.destroy,r.a.focus,r.a.initialize,r.a.registerField,r.a.reset,r.a.resetSection,r.a.setSubmitFailed,r.a.setSubmitSucceeded,r.a.startAsyncValidation,r.a.startSubmit,r.a.stopAsyncValidation,r.a.stopSubmit,r.a.submit,r.a.touch,r.a.unregisterField,r.a.untouch,r.a.updateSyncWarnings},function(t,e,n){"use strict";function r(t,e){var n=Object(o.a)(t,e);return Object(i.a)(n)?n:void 0}var i=n(172),o=n(175);e.a=r},function(t,e,n){"use strict";var r=function(t,e,n,r,i,o,a,s){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,s],c=0;u=new Error(e.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};t.exports=r},function(t,e,n){"use strict";function r(t){if("object"!==("undefined"===typeof t?"undefined":d(t))||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function i(t,e,n){function o(){g===v&&(g=v.slice())}function a(){if(_)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return y}function s(t){if("function"!==typeof t)throw new Error("Expected the listener to be a function.");if(_)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var e=!0;return o(),g.push(t),function(){if(e){if(_)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");e=!1,o();var n=g.indexOf(t);g.splice(n,1)}}}function u(t){if(!r(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"===typeof t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(_)throw new Error("Reducers may not dispatch actions.");try{_=!0,y=m(y,t)}finally{_=!1}for(var e=v=g,n=0;n<e.length;n++){(0,e[n])()}return t}function l(t){if("function"!==typeof t)throw new Error("Expected the nextReducer to be a function.");m=t,u({type:h.REPLACE})}function c(){var t,e=s;return t={subscribe:function(t){function n(){t.next&&t.next(a())}if("object"!==("undefined"===typeof t?"undefined":d(t))||null===t)throw new TypeError("Expected the observer to be an object.");return n(),{unsubscribe:e(n)}}},t[f.a]=function(){return this},t}var p;if("function"===typeof e&&"undefined"===typeof n&&(n=e,e=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error("Expected the enhancer to be a function.");return n(i)(t,e)}if("function"!==typeof t)throw new Error("Expected the reducer to be a function.");var m=t,y=e,v=[],g=v,_=!1;return u({type:h.INIT}),p={dispatch:u,subscribe:s,getState:a,replaceReducer:l},p[f.a]=c,p}function o(t,e){var n=e&&e.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function a(t){Object.keys(t).forEach(function(e){var n=t[e];if("undefined"===typeof n(void 0,{type:h.INIT}))throw new Error('Reducer "'+e+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if("undefined"===typeof n(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")}))throw new Error('Reducer "'+e+"\" returned undefined when probed with a random type. Don't try to handle "+h.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}function s(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var i=e[r];"function"===typeof t[i]&&(n[i]=t[i])}var s=Object.keys(n),u=void 0;try{a(n)}catch(t){u=t}return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];if(u)throw u;for(var r=!1,i={},a=0;a<s.length;a++){var l=s[a],c=n[l],p=t[l],f=c(p,e);if("undefined"===typeof f){var h=o(l,e);throw new Error(h)}i[l]=f,r=r||f!==p}return r?i:t}}function u(t,e){return function(){return e(t.apply(this,arguments))}}function l(t,e){if("function"===typeof t)return u(t,e);if("object"!==("undefined"===typeof t?"undefined":d(t))||null===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":"undefined"===typeof t?"undefined":d(t))+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(t),r={},i=0;i<n.length;i++){var o=n[i],a=t[o];"function"===typeof a&&(r[o]=u(a,e))}return r}function c(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}function p(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=t.apply(void 0,r),a=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},s={getState:o.getState,dispatch:function(){return a.apply(void 0,arguments)}},u=e.map(function(t){return t(s)});return a=c.apply(void 0,u)(o.dispatch),m({},o,{dispatch:a})}}}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"createStore",function(){return i}),n.d(e,"combineReducers",function(){return s}),n.d(e,"bindActionCreators",function(){return l}),n.d(e,"applyMiddleware",function(){return p}),n.d(e,"compose",function(){return c}),n.d(e,"__DO_NOT_USE__ActionTypes",function(){return h});var f=n(147),h={INIT:"@@redux/INIT"+Math.random().toString(36).substring(7).split("").join("."),REPLACE:"@@redux/REPLACE"+Math.random().toString(36).substring(7).split("").join(".")},d="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},function(t,e,n){"use strict";function r(t){return null==t?void 0===t?u:s:l&&l in Object(t)?Object(o.a)(t):Object(a.a)(t)}var i=n(21),o=n(149),a=n(150),s="[object Null]",u="[object Undefined]",l=i.a?i.a.toStringTag:void 0;e.a=r},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){"use strict";var r=function(t,e){var n=t._reduxForm.sectionPrefix;return n?n+"."+e:e};e.a=r},function(t,e,n){"use strict";function r(t,e){return t===e||t!==t&&e!==e}e.a=r},function(t,e,n){"use strict";function r(t){if("string"==typeof t||Object(i.a)(t))return t;var e=t+"";return"0"==e&&1/t==-o?"-0":e}var i=n(23),o=1/0;e.a=r},function(t,e,n){"use strict";function r(t){return null!=t&&Object(o.a)(t.length)&&!Object(i.a)(t)}var i=n(42),o=n(47);e.a=r},function(t,e,n){"use strict";var r=n(6),i=r.a.Symbol;e.a=i},function(t,e,n){"use strict";function r(t){return Object(a.a)(t)?Object(i.a)(t,l.a):Object(s.a)(t)?[t]:Object(o.a)(Object(u.a)(Object(c.a)(t)))}var i=n(78),o=n(79),a=n(5),s=n(23),u=n(80),l=n(19),c=n(82);e.a=r},function(t,e,n){"use strict";function r(t){return"symbol"==typeof t||Object(o.a)(t)&&Object(i.a)(t)==a}var i=n(15),o=n(10),a="[object Symbol]";e.a=r},function(t,e,n){"use strict";var r=n(12),i=Object(r.a)(Object,"create");e.a=i},function(t,e,n){"use strict";function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}var i=n(180),o=n(181),a=n(182),s=n(183),u=n(184);r.prototype.clear=i.a,r.prototype.delete=o.a,r.prototype.get=a.a,r.prototype.has=s.a,r.prototype.set=u.a,e.a=r},function(t,e,n){"use strict";function r(t,e){for(var n=t.length;n--;)if(Object(i.a)(t[n][0],e))return n;return-1}var i=n(18);e.a=r},function(t,e,n){"use strict";function r(t,e){var n=t.__data__;return Object(i.a)(e)?n["string"==typeof e?"string":"hash"]:n.map}var i=n(186);e.a=r},function(t,e,n){"use strict";function r(t,e,n,a,s){return t===e||(null==t||null==e||!Object(o.a)(t)&&!Object(o.a)(e)?t!==t&&e!==e:Object(i.a)(t,e,n,a,r,s))}var i=n(193),o=n(10);e.a=r},function(t,e,n){"use strict";var r=n(215),i=n(10),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=Object(r.a)(function(){return arguments}())?r.a:function(t){return Object(i.a)(t)&&a.call(t,"callee")&&!s.call(t,"callee")};e.a=u},function(t,e,n){"use strict";(function(t){var r=n(6),i=n(216),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o,u=s?r.a.Buffer:void 0,l=u?u.isBuffer:void 0,c=l||i.a;e.a=c}).call(e,n(16)(t))},function(t,e,n){"use strict";var r=n(217),i=n(218),o=n(219),a=o.a&&o.a.isTypedArray,s=a?Object(i.a)(a):r.a;e.a=s},function(t,e,n){"use strict";function r(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}var i=Object.prototype;e.a=r},function(t,e,n){"use strict";function r(t,e,n){"__proto__"==e&&i.a?Object(i.a)(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var i=n(90);e.a=r},function(t,e,n){t.exports=n(324)},function(t,e,n){"use strict";function r(t){var e,n,r,o;for(t||(t={}),e=1,n=arguments.length;e<n;e+=1){r=arguments[e];for(o in r)o in t&&(t[o]===r[o]||o in i&&i[o]===r[o])||(t[o]=r[o])}return t}var i={};t.exports=r},function(t,e,n){"use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,s,u=r(t),l=1;l<arguments.length;l++){n=Object(arguments[l]);for(var c in n)o.call(n,c)&&(u[c]=n[c]);if(i){s=i(n);for(var p=0;p<s.length;p++)a.call(n,s[p])&&(u[s[p]]=n[s[p]])}}return u}},function(t,e,n){"use strict";function r(t,e,n,r,o,a,s,u){if(i(e),!t){var l;if(void 0===e)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,s,u],p=0;l=new Error(e.replace(/%s/g,function(){return c[p++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}}var i=function(t){};t.exports=r},function(t,e,n){"use strict";function r(t){return function(){return t}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(t){return t},t.exports=i},function(t,e,n){"use strict";function r(t){"undefined"!==typeof console&&"function"===typeof console.error&&console.error(t);try{throw new Error(t)}catch(t){}}e.a=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"prefix",function(){return r}),n.d(e,"ARRAY_INSERT",function(){return i}),n.d(e,"ARRAY_MOVE",function(){return o}),n.d(e,"ARRAY_POP",function(){return a}),n.d(e,"ARRAY_PUSH",function(){return s}),n.d(e,"ARRAY_REMOVE",function(){return u}),n.d(e,"ARRAY_REMOVE_ALL",function(){return l}),n.d(e,"ARRAY_SHIFT",function(){return c}),n.d(e,"ARRAY_SPLICE",function(){return p}),n.d(e,"ARRAY_UNSHIFT",function(){return f}),n.d(e,"ARRAY_SWAP",function(){return h}),n.d(e,"AUTOFILL",function(){return d}),n.d(e,"BLUR",function(){return m}),n.d(e,"CHANGE",function(){return y}),n.d(e,"CLEAR_FIELDS",function(){return v}),n.d(e,"CLEAR_SUBMIT",function(){return g}),n.d(e,"CLEAR_SUBMIT_ERRORS",function(){return _}),n.d(e,"CLEAR_ASYNC_ERROR",function(){return b}),n.d(e,"DESTROY",function(){return x}),n.d(e,"FOCUS",function(){return w}),n.d(e,"INITIALIZE",function(){return E}),n.d(e,"REGISTER_FIELD",function(){return S}),n.d(e,"RESET",function(){return T}),n.d(e,"RESET_SECTION",function(){return C}),n.d(e,"SET_SUBMIT_FAILED",function(){return A}),n.d(e,"SET_SUBMIT_SUCCEEDED",function(){return O}),n.d(e,"START_ASYNC_VALIDATION",function(){return k}),n.d(e,"START_SUBMIT",function(){return I}),n.d(e,"STOP_ASYNC_VALIDATION",function(){return P}),n.d(e,"STOP_SUBMIT",function(){return z}),n.d(e,"SUBMIT",function(){return R}),n.d(e,"TOUCH",function(){return M}),n.d(e,"UNREGISTER_FIELD",function(){return j}),n.d(e,"UNTOUCH",function(){return D}),n.d(e,"UPDATE_SYNC_ERRORS",function(){return L}),n.d(e,"UPDATE_SYNC_WARNINGS",function(){return F});var r="@@redux-form/",i=r+"ARRAY_INSERT",o=r+"ARRAY_MOVE",a=r+"ARRAY_POP",s=r+"ARRAY_PUSH",u=r+"ARRAY_REMOVE",l=r+"ARRAY_REMOVE_ALL",c=r+"ARRAY_SHIFT",p=r+"ARRAY_SPLICE",f=r+"ARRAY_UNSHIFT",h=r+"ARRAY_SWAP",d=r+"AUTOFILL",m=r+"BLUR",y=r+"CHANGE",v=r+"CLEAR_FIELDS",g=r+"CLEAR_SUBMIT",_=r+"CLEAR_SUBMIT_ERRORS",b=r+"CLEAR_ASYNC_ERROR",x=r+"DESTROY",w=r+"FOCUS",E=r+"INITIALIZE",S=r+"REGISTER_FIELD",T=r+"RESET",C=r+"RESET_SECTION",A=r+"SET_SUBMIT_FAILED",O=r+"SET_SUBMIT_SUCCEEDED",k=r+"START_ASYNC_VALIDATION",I=r+"START_SUBMIT",P=r+"STOP_ASYNC_VALIDATION",z=r+"STOP_SUBMIT",R=r+"SUBMIT",M=r+"TOUCH",j=r+"UNREGISTER_FIELD",D=r+"UNTOUCH",L=r+"UPDATE_SYNC_ERRORS",F=r+"UPDATE_SYNC_WARNINGS"},function(t,e,n){"use strict";function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}var i=n(169),o=n(185),a=n(187),s=n(188),u=n(189);r.prototype.clear=i.a,r.prototype.delete=o.a,r.prototype.get=a.a,r.prototype.has=s.a,r.prototype.set=u.a,e.a=r},function(t,e,n){"use strict";function r(t){if(!Object(o.a)(t))return!1;var e=Object(i.a)(t);return e==s||e==u||e==a||e==l}var i=n(15),o=n(7),a="[object AsyncFunction]",s="[object Function]",u="[object GeneratorFunction]",l="[object Proxy]";e.a=r},function(t,e,n){"use strict";var r=n(12),i=n(6),o=Object(r.a)(i.a,"Map");e.a=o},function(t,e,n){"use strict";function r(t){var e=this.__data__=new i.a(t);this.size=e.size}var i=n(25),o=n(194),a=n(195),s=n(196),u=n(197),l=n(198);r.prototype.clear=o.a,r.prototype.delete=a.a,r.prototype.get=s.a,r.prototype.has=u.a,r.prototype.set=l.a,e.a=r},function(t,e,n){"use strict";function r(t){return Object(a.a)(t)?Object(i.a)(t):Object(o.a)(t)}var i=n(86),o=n(87),a=n(20);e.a=r},function(t,e,n){"use strict";function r(t,e){var n=typeof t;return!!(e=null==e?i:e)&&("number"==n||"symbol"!=n&&o.test(t))&&t>-1&&t%1==0&&t<e}var i=9007199254740991,o=/^(?:0|[1-9]\d*)$/;e.a=r},function(t,e,n){"use strict";function r(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=i}var i=9007199254740991;e.a=r},function(t,e,n){"use strict";function r(t,e){var n={};return e=Object(a.a)(e,3),Object(o.a)(t,function(t,r,o){Object(i.a)(n,r,e(t,r,o))}),n}var i=n(33),o=n(233),a=n(235);e.a=r},function(t,e,n){"use strict";function r(t,e){if(Object(i.a)(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Object(o.a)(t))||(s.test(t)||!a.test(t)||null!=e&&t in Object(e))}var i=n(5),o=n(23),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.a=r},function(t,e,n){"use strict";function r(t){return t}e.a=r},function(t,e,n){"use strict";var r=n(276),i=function(t){var e=t.getIn,n=t.keys,i=Object(r.a)(t);return function(t,r){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(a){var s=r||function(t){return e(t,"form")},u=s(a);if(e(u,t+".syncError"))return!1;if(!o){if(e(u,t+".error"))return!1}var l=e(u,t+".syncErrors"),c=e(u,t+".asyncErrors"),p=o?void 0:e(u,t+".submitErrors");if(!l&&!c&&!p)return!0;var f=e(u,t+".registeredFields");return!f||!n(f).filter(function(t){return e(f,"['"+t+"'].count")>0}).some(function(t){return i(e(f,"['"+t+"']"),l,c,p)})}}};e.a=i},function(t,e){function n(t){return!!t&&("object"===typeof t||"function"===typeof t)&&"function"===typeof t.then}t.exports=n},function(t,e,n){"use strict";(function(e){function r(t,e){!i.isUndefined(t)&&i.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var i=n(4),o=n(327),a={"Content-Type":"application/x-www-form-urlencoded"},s={adapter:function(){var t;return"undefined"!==typeof XMLHttpRequest?t=n(104):"undefined"!==typeof e&&(t=n(104)),t}(),transformRequest:[function(t,e){return o(e,"Content-Type"),i.isFormData(t)||i.isArrayBuffer(t)||i.isBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t)?t:i.isArrayBufferView(t)?t.buffer:i.isURLSearchParams(t)?(r(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):i.isObject(t)?(r(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"===typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(t){s.headers[t]={}}),i.forEach(["post","put","patch"],function(t){s.headers[t]=i.merge(a)}),t.exports=s}).call(e,n(103))},function(t,e,n){"use strict";(function(t){"undefined"===typeof Promise&&n(354).polyfill(),t.export=Promise}).call(e,n(110)(t))},function(t,e,n){"use strict";t.exports=function(t,e){return e&&(t.skip=function(){return e}),t.wrap=function(e,n){return e(t,n)},t.chain=function(){return"undefined"!==typeof console&&console.log("rest.js: client.chain() is deprecated, use client.wrap() instead"),t.wrap.apply(this,arguments)},t}},function(t,e,n){"use strict";function r(t,e){return t.then(function(t){return t&&t[e]},function(t){return Promise.reject(t&&t[e])})}function i(){return r(this,"entity")}function o(){return r(r(this,"status"),"code")}function a(){return r(this,"headers")}function s(t){return t=p(t),r(this.headers(),t)}function u(t){return t=[].concat(t),l(t.reduce(function(t,e){return t.then(function(t){if("string"===typeof e&&(e={rel:e}),"function"!==typeof t.entity.clientFor)throw new Error("Hypermedia response expected");return t.entity.clientFor(e.rel)({params:e.params})})},this))}function l(t){return t.status=o,t.headers=a,t.header=s,t.entity=i,t.follow=u,t}function c(t,e,n){return l(Promise.resolve(t).then(e,n))}var p=n(112);c.make=l,c.reject=function(t){return l(Promise.reject(t))},c.promise=function(t){return l(new Promise(t))},t.exports=c},function(t,e,n){"use strict";function r(){}function i(t){try{return t.then}catch(t){return v=t,g}}function o(t,e){try{return t(e)}catch(t){return v=t,g}}function a(t,e,n){try{t(e,n)}catch(t){return v=t,g}}function s(t){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof t)throw new TypeError("Promise constructor's argument is not a function");this._75=0,this._83=0,this._18=null,this._38=null,t!==r&&m(t,this)}function u(t,e,n){return new t.constructor(function(i,o){var a=new s(r);a.then(i,o),l(t,new d(e,n,a))})}function l(t,e){for(;3===t._83;)t=t._18;if(s._47&&s._47(t),0===t._83)return 0===t._75?(t._75=1,void(t._38=e)):1===t._75?(t._75=2,void(t._38=[t._38,e])):void t._38.push(e);c(t,e)}function c(t,e){y(function(){var n=1===t._83?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._83?p(e.promise,t._18):f(e.promise,t._18));var r=o(n,t._18);r===g?f(e.promise,v):p(e.promise,r)})}function p(t,e){if(e===t)return f(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"===typeof e||"function"===typeof e)){var n=i(e);if(n===g)return f(t,v);if(n===t.then&&e instanceof s)return t._83=3,t._18=e,void h(t);if("function"===typeof n)return void m(n.bind(e),t)}t._83=1,t._18=e,h(t)}function f(t,e){t._83=2,t._18=e,s._71&&s._71(t,e),h(t)}function h(t){if(1===t._75&&(l(t,t._38),t._38=null),2===t._75){for(var e=0;e<t._38.length;e++)l(t,t._38[e]);t._38=null}}function d(t,e,n){this.onFulfilled="function"===typeof t?t:null,this.onRejected="function"===typeof e?e:null,this.promise=n}function m(t,e){var n=!1,r=a(t,function(t){n||(n=!0,p(e,t))},function(t){n||(n=!0,f(e,t))});n||r!==g||(n=!0,f(e,v))}var y=n(125),v=null,g={};t.exports=s,s._47=null,s._71=null,s._44=r,s.prototype.then=function(t,e){if(this.constructor!==s)return u(this,t,e);var n=new s(r);return l(this,new d(t,e,n)),n}},function(t,e,n){"use strict";var r={};t.exports=r},function(t,e,n){"use strict";n.d(e,"b",function(){return o}),n.d(e,"a",function(){return a});var r=n(2),i=n.n(r),o=i.a.shape({trySubscribe:i.a.func.isRequired,tryUnsubscribe:i.a.func.isRequired,notifyNestedSubs:i.a.func.isRequired,isSubscribed:i.a.func.isRequired}),a=i.a.shape({subscribe:i.a.func.isRequired,dispatch:i.a.func.isRequired,getState:i.a.func.isRequired})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function s(){}function u(t,e){var n={run:function(r){try{var i=t(e.getState(),r);(i!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=i,n.error=null)}catch(t){n.shouldComponentUpdate=!0,n.error=t}}};return n}function l(t){var e,n,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=l.getDisplayName,f=void 0===c?function(t){return"ConnectAdvanced("+t+")"}:c,b=l.methodName,x=void 0===b?"connectAdvanced":b,w=l.renderCountProp,E=void 0===w?void 0:w,S=l.shouldHandleStateChanges,T=void 0===S||S,C=l.storeKey,A=void 0===C?"store":C,O=l.withRef,k=void 0!==O&&O,I=a(l,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),P=A+"Subscription",z=g++,R=(e={},e[A]=y.a,e[P]=y.b,e),M=(n={},n[P]=y.b,n);return function(e){h()("function"==typeof e,"You must pass a component to the function returned by "+x+". Instead received "+JSON.stringify(e));var n=e.displayName||e.name||"Component",a=f(n),l=v({},I,{getDisplayName:f,methodName:x,renderCountProp:E,shouldHandleStateChanges:T,storeKey:A,withRef:k,displayName:a,wrappedComponentName:n,WrappedComponent:e}),c=function(n){function c(t,e){r(this,c);var o=i(this,n.call(this,t,e));return o.version=z,o.state={},o.renderCount=0,o.store=t[A]||e[A],o.propsMode=Boolean(t[A]),o.setWrappedInstance=o.setWrappedInstance.bind(o),h()(o.store,'Could not find "'+A+'" in either the context or props of "'+a+'". Either wrap the root component in a <Provider>, or explicitly pass "'+A+'" as a prop to "'+a+'".'),o.initSelector(),o.initSubscription(),o}return o(c,n),c.prototype.getChildContext=function(){var t,e=this.propsMode?null:this.subscription;return t={},t[P]=e||this.context[P],t},c.prototype.componentDidMount=function(){T&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},c.prototype.componentWillReceiveProps=function(t){this.selector.run(t)},c.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},c.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=s,this.store=null,this.selector.run=s,this.selector.shouldComponentUpdate=!1},c.prototype.getWrappedInstance=function(){return h()(k,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+x+"() call."),this.wrappedInstance},c.prototype.setWrappedInstance=function(t){this.wrappedInstance=t},c.prototype.initSelector=function(){var e=t(this.store.dispatch,l);this.selector=u(e,this.store),this.selector.run(this.props)},c.prototype.initSubscription=function(){if(T){var t=(this.propsMode?this.props:this.context)[P];this.subscription=new m.a(this.store,t,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},c.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(_)):this.notifyNestedSubs()},c.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},c.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},c.prototype.addExtraProps=function(t){if(!k&&!E&&(!this.propsMode||!this.subscription))return t;var e=v({},t);return k&&(e.ref=this.setWrappedInstance),E&&(e[E]=this.renderCount++),this.propsMode&&this.subscription&&(e[P]=this.subscription),e},c.prototype.render=function(){var t=this.selector;if(t.shouldComponentUpdate=!1,t.error)throw t.error;return Object(d.createElement)(e,this.addExtraProps(t.props))},c}(d.Component);return c.WrappedComponent=e,c.displayName=a,c.childContextTypes=M,c.contextTypes=R,c.propTypes=R,p()(c,e)}}e.a=l;var c=n(61),p=n.n(c),f=n(13),h=n.n(f),d=n(1),m=(n.n(d),n(143)),y=n(59),v=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},g=0,_={}},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";var t={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n=Object.defineProperty,r=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,o=Object.getOwnPropertyDescriptor,a=Object.getPrototypeOf,s=a&&a(Object);return function u(l,c,p){if("string"!==typeof c){if(s){var f=a(c);f&&f!==s&&u(l,f,p)}var h=r(c);i&&(h=h.concat(i(c)));for(var d=0;d<h.length;++d){var m=h[d];if(!t[m]&&!e[m]&&(!p||!p[m])){var y=o(c,m);try{n(l,m,y)}catch(t){}}}return l}return l}})},function(t,e,n){"use strict";function r(t){return function(e,n){function r(){return i}var i=t(e,n);return r.dependsOnOwnProps=!1,r}}function i(t){return null!==t.dependsOnOwnProps&&void 0!==t.dependsOnOwnProps?Boolean(t.dependsOnOwnProps):1!==t.length}function o(t,e){return function(e,n){var r=(n.displayName,function(t,e){return r.dependsOnOwnProps?r.mapToProps(t,e):r.mapToProps(t)});return r.dependsOnOwnProps=!0,r.mapToProps=function(e,n){r.mapToProps=t,r.dependsOnOwnProps=i(t);var o=r(e,n);return"function"===typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=i(o),o=r(e,n)),o},r}}e.a=r,e.b=o;n(63)},function(t,e,n){"use strict";n(64),n(39)},function(t,e,n){"use strict";function r(t){if(!Object(a.a)(t)||Object(i.a)(t)!=s)return!1;var e=Object(o.a)(t);if(null===e)return!0;var n=p.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==f}var i=n(15),o=n(66),a=n(10),s="[object Object]",u=Function.prototype,l=Object.prototype,c=u.toString,p=l.hasOwnProperty,f=c.call(Object);e.a=r},function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(e,n(9))},function(t,e,n){"use strict";var r=n(67),i=Object(r.a)(Object.getPrototypeOf,Object);e.a=i},function(t,e,n){"use strict";function r(t,e){return function(n){return t(e(n))}}e.a=r},function(t,e,n){"use strict";var r=n(40),i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=function(t,e,n,i){return{type:r.ARRAY_INSERT,meta:{form:t,field:e,index:n},payload:i}},a=function(t,e,n,i){return{type:r.ARRAY_MOVE,meta:{form:t,field:e,from:n,to:i}}},s=function(t,e){return{type:r.ARRAY_POP,meta:{form:t,field:e}}},u=function(t,e,n){return{type:r.ARRAY_PUSH,meta:{form:t,field:e},payload:n}},l=function(t,e,n){return{type:r.ARRAY_REMOVE,meta:{form:t,field:e,index:n}}},c=function(t,e){return{type:r.ARRAY_REMOVE_ALL,meta:{form:t,field:e}}},p=function(t,e){return{type:r.ARRAY_SHIFT,meta:{form:t,field:e}}},f=function(t,e,n,i,o){var a={type:r.ARRAY_SPLICE,meta:{form:t,field:e,index:n,removeNum:i}};return void 0!==o&&(a.payload=o),a},h=function(t,e,n,i){if(n===i)throw new Error("Swap indices cannot be equal");if(n<0||i<0)throw new Error("Swap indices cannot be negative");return{type:r.ARRAY_SWAP,meta:{form:t,field:e,indexA:n,indexB:i}}},d=function(t,e,n){return{type:r.ARRAY_UNSHIFT,meta:{form:t,field:e},payload:n}},m=function(t,e,n){return{type:r.AUTOFILL,meta:{form:t,field:e},payload:n}},y=function(t,e,n,i){return{type:r.BLUR,meta:{form:t,field:e,touch:i},payload:n}},v=function(t,e,n,i,o){return{type:r.CHANGE,meta:{form:t,field:e,touch:i,persistentSubmitErrors:o},payload:n}},g=function(t){return{type:r.CLEAR_SUBMIT,meta:{form:t}}},_=function(t){return{type:r.CLEAR_SUBMIT_ERRORS,meta:{form:t}}},b=function(t,e){return{type:r.CLEAR_ASYNC_ERROR,meta:{form:t,field:e}}},x=function(t,e,n){for(var i=arguments.length,o=Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return{type:r.CLEAR_FIELDS,meta:{form:t,keepTouched:e,persistentSubmitErrors:n,fields:o}}},w=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return{type:r.DESTROY,meta:{form:e}}},E=function(t,e){return{type:r.FOCUS,meta:{form:t,field:e}}},S=function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return n instanceof Object&&(o=n,n=!1),{type:r.INITIALIZE,meta:i({form:t,keepDirty:n},o),payload:e}},T=function(t,e,n){return{type:r.REGISTER_FIELD,meta:{form:t},payload:{name:e,type:n}}},C=function(t){return{type:r.RESET,meta:{form:t}}},A=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return{type:r.RESET_SECTION,meta:{form:t,sections:n}}},O=function(t,e){return{type:r.START_ASYNC_VALIDATION,meta:{form:t,field:e}}},k=function(t){return{type:r.START_SUBMIT,meta:{form:t}}},I=function(t,e){return{type:r.STOP_ASYNC_VALIDATION,meta:{form:t},payload:e,error:!(!e||!Object.keys(e).length)}},P=function(t,e){return{type:r.STOP_SUBMIT,meta:{form:t},payload:e,error:!(!e||!Object.keys(e).length)}},z=function(t){return{type:r.SUBMIT,meta:{form:t}}},R=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return{type:r.SET_SUBMIT_FAILED,meta:{form:t,fields:n},error:!0}},M=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return{type:r.SET_SUBMIT_SUCCEEDED,meta:{form:t,fields:n},error:!1}},j=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return{type:r.TOUCH,meta:{form:t,fields:n}}},D=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:r.UNREGISTER_FIELD,meta:{form:t},payload:{name:e,destroyOnUnmount:n}}},L=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return{type:r.UNTOUCH,meta:{form:t,fields:n}}},F=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];return{type:r.UPDATE_SYNC_ERRORS,meta:{form:t},payload:{syncErrors:e,error:n}}},B=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];return{type:r.UPDATE_SYNC_WARNINGS,meta:{form:t},payload:{syncWarnings:e,warning:n}}},N={arrayInsert:o,arrayMove:a,arrayPop:s,arrayPush:u,arrayRemove:l,arrayRemoveAll:c,arrayShift:p,arraySplice:f,arraySwap:h,arrayUnshift:d,autofill:m,blur:y,change:v,clearFields:x,clearSubmit:g,clearSubmitErrors:_,clearAsyncError:b,destroy:w,focus:E,initialize:S,registerField:T,reset:C,resetSection:A,startAsyncValidation:O,startSubmit:k,stopAsyncValidation:I,stopSubmit:P,submit:z,setSubmitFailed:R,setSubmitSucceeded:M,touch:j,unregisterField:D,untouch:L,updateSyncErrors:F,updateSyncWarnings:B};e.a=N},function(t,e,n){"use strict";var r=function(t){var e=t.initialized,n=t.trigger,r=t.pristine;if(!t.syncValidationPasses)return!1;switch(n){case"blur":case"change":return!0;case"submit":return!r||!e;default:return!1}};e.a=r},function(t,e,n){"use strict";var r=function(t){var e=t.values,n=t.nextProps,r=t.initialRender,i=t.lastFieldValidatorKeys,o=t.fieldValidatorKeys,a=t.structure;return!!r||(!a.deepEqual(e,n&&n.values)||!a.deepEqual(i,o))};e.a=r},function(t,e,n){"use strict";var r=function(t){var e=t.values,n=t.nextProps,r=t.initialRender,i=t.lastFieldValidatorKeys,o=t.fieldValidatorKeys,a=t.structure;return!!r||(!a.deepEqual(e,n&&n.values)||!a.deepEqual(i,o))};e.a=r},function(t,e,n){"use strict";var r=function(t){var e=t.values,n=t.nextProps,r=t.initialRender,i=t.lastFieldValidatorKeys,o=t.fieldValidatorKeys,a=t.structure;return!!r||(!a.deepEqual(e,n&&n.values)||!a.deepEqual(i,o))};e.a=r},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(158),s=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,"Submit Validation Failed"));return n.errors=t,n}return o(e,t),e}(a.a);e.a=s},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=function(t,e,n,r){var o=e.value;return"checkbox"===t?i({},e,{checked:!!o}):"radio"===t?i({},e,{checked:r(o,n),value:n}):"select-multiple"===t?i({},e,{value:o||[]}):"file"===t?i({},e,{value:o||void 0}):e},a=function(t,e,n){var a=t.getIn,s=t.toJS,u=t.deepEqual,l=n.asyncError,c=n.asyncValidating,p=n.onBlur,f=n.onChange,h=n.onDrop,d=n.onDragStart,m=n.dirty,y=n.dispatch,v=n.onFocus,g=n.form,_=n.format,b=n.initial,x=(n.parse,n.pristine),w=n.props,E=n.state,S=n.submitError,T=n.submitFailed,C=n.submitting,A=n.syncError,O=n.syncWarning,k=(n.validate,n.value),I=n._value,P=(n.warn,r(n,["asyncError","asyncValidating","onBlur","onChange","onDrop","onDragStart","dirty","dispatch","onFocus","form","format","initial","parse","pristine","props","state","submitError","submitFailed","submitting","syncError","syncWarning","validate","value","_value","warn"])),z=A||l||S,R=O,M=function(t,n){if(null===n)return t;var r=null==t?"":t;return n?n(t,e):r}(k,_);return{input:o(P.type,{name:e,onBlur:p,onChange:f,onDragStart:d,onDrop:h,onFocus:v,value:M},I,u),meta:i({},s(E),{active:!(!E||!a(E,"active")),asyncValidating:c,autofilled:!(!E||!a(E,"autofilled")),dirty:m,dispatch:y,error:z,form:g,initial:b,warning:R,invalid:!!z,pristine:x,submitting:!!C,submitFailed:!!T,touched:!(!E||!a(E,"touched")),valid:!z,visited:!(!E||!a(E,"visited"))}),custom:i({},P,w)}};e.a=a},function(t,e,n){"use strict";var r=n(163),i=n(77),o=function(t,e){var n=e.name,o=e.parse,a=e.normalize,s=Object(r.a)(t,i.a);return o&&(s=o(s,n)),a&&(s=a(n,s)),s};e.a=o},function(t,e,n){"use strict";var r=function(t){return!!(t&&t.stopPropagation&&t.preventDefault)};e.a=r},function(t,e,n){"use strict";var r="undefined"!==typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product;e.a=r},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}e.a=r},function(t,e,n){"use strict";function r(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}e.a=r},function(t,e,n){"use strict";var r=n(167),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=Object(r.a)(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,function(t,n,r,i){e.push(r?i.replace(o,"$1"):n||t)}),e});e.a=a},function(t,e,n){"use strict";function r(t){if(null!=t){try{return o.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var i=Function.prototype,o=i.toString;e.a=r},function(t,e,n){"use strict";function r(t){return null==t?"":Object(i.a)(t)}var i=n(190);e.a=r},function(t,e,n){"use strict";function r(t,e,n){n="function"==typeof n?n:void 0;var r=n?n(t,e):void 0;return void 0===r?Object(i.a)(t,e,void 0,n):!!r}var i=n(28);e.a=r},function(t,e,n){"use strict";function r(t,e,n,r,l,c){var p=n&s,f=t.length,h=e.length;if(f!=h&&!(p&&h>f))return!1;var d=c.get(t);if(d&&c.get(e))return d==e;var m=-1,y=!0,v=n&u?new i.a:void 0;for(c.set(t,e),c.set(e,t);++m<f;){var g=t[m],_=e[m];if(r)var b=p?r(_,g,m,e,t,c):r(g,_,m,t,e,c);if(void 0!==b){if(b)continue;y=!1;break}if(v){if(!Object(o.a)(e,function(t,e){if(!Object(a.a)(v,e)&&(g===t||l(g,t,n,r,c)))return v.push(e)})){y=!1;break}}else if(g!==_&&!l(g,_,n,r,c)){y=!1;break}}return c.delete(t),c.delete(e),y}var i=n(199),o=n(202),a=n(203),s=1,u=2;e.a=r},function(t,e,n){"use strict";var r=n(6),i=r.a.Uint8Array;e.a=i},function(t,e,n){"use strict";function r(t,e){var n=Object(a.a)(t),r=!n&&Object(o.a)(t),c=!n&&!r&&Object(s.a)(t),f=!n&&!r&&!c&&Object(l.a)(t),h=n||r||c||f,d=h?Object(i.a)(t.length,String):[],m=d.length;for(var y in t)!e&&!p.call(t,y)||h&&("length"==y||c&&("offset"==y||"parent"==y)||f&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||Object(u.a)(y,m))||d.push(y);return d}var i=n(214),o=n(29),a=n(5),s=n(30),u=n(46),l=n(31),c=Object.prototype,p=c.hasOwnProperty;e.a=r},function(t,e,n){"use strict";function r(t){if(!Object(i.a)(t))return Object(o.a)(t);var e=[];for(var n in Object(t))s.call(t,n)&&"constructor"!=n&&e.push(n);return e}var i=n(32),o=n(220),a=Object.prototype,s=a.hasOwnProperty;e.a=r},function(t,e,n){"use strict";var r=n(221),i=n(43),o=n(222),a=n(223),s=n(224),u=n(15),l=n(81),c=Object(l.a)(r.a),p=Object(l.a)(i.a),f=Object(l.a)(o.a),h=Object(l.a)(a.a),d=Object(l.a)(s.a),m=u.a;(r.a&&"[object DataView]"!=m(new r.a(new ArrayBuffer(1)))||i.a&&"[object Map]"!=m(new i.a)||o.a&&"[object Promise]"!=m(o.a.resolve())||a.a&&"[object Set]"!=m(new a.a)||s.a&&"[object WeakMap]"!=m(new s.a))&&(m=function(t){var e=Object(u.a)(t),n="[object Object]"==e?t.constructor:void 0,r=n?Object(l.a)(n):"";if(r)switch(r){case c:return"[object DataView]";case p:return"[object Map]";case f:return"[object Promise]";case h:return"[object Set]";case d:return"[object WeakMap]"}return e}),e.a=m},function(t,e,n){"use strict";var r=n(83),i=function(t,e,n,r,i,o){if(o)return t===e},o=function(t,e,n){var o=Object(r.a)(t.props,e,i),a=Object(r.a)(t.state,n,i);return!o||!a};e.a=o},function(t,e,n){"use strict";var r=n(12),i=function(){try{var t=Object(r.a)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();e.a=i},function(t,e,n){"use strict";var r=n(234),i=Object(r.a)();e.a=i},function(t,e,n){"use strict";function r(t){return t===t&&!Object(i.a)(t)}var i=n(7);e.a=r},function(t,e,n){"use strict";function r(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}e.a=r},function(t,e,n){"use strict";function r(t,e){e=Object(i.a)(e,t);for(var n=0,r=e.length;null!=t&&n<r;)t=t[Object(o.a)(e[n++])];return n&&n==r?t:void 0}var i=n(95),o=n(19);e.a=r},function(t,e,n){"use strict";function r(t,e){return Object(i.a)(t)?t:Object(o.a)(t,e)?[t]:Object(a.a)(Object(s.a)(t))}var i=n(5),o=n(49),a=n(80),s=n(82);e.a=r},function(t,e,n){"use strict";var r=function(t){var e=t.deepEqual,n=t.empty,r=t.getIn;return function(t,i){return function(o){var a=i||function(t){return r(t,"form")},s=a(o),u=r(s,t+".initial")||n,l=r(s,t+".values")||u;return e(u,l)}}};e.a=r},function(t,e,n){"use strict";function r(t,e,n){(void 0===n||Object(o.a)(t[e],n))&&(void 0!==n||e in t)||Object(i.a)(t,e,n)}var i=n(33),o=n(18);e.a=r},function(t,e,n){"use strict";function r(t,e){return"__proto__"==e?void 0:t[e]}e.a=r},function(t,e,n){"use strict";function r(t){return Object(a.a)(t)?Object(i.a)(t,!0):Object(o.a)(t)}var i=n(86),o=n(299),a=n(20);e.a=r},function(t,e,n){"use strict";var r=n(76),i=function(t){var e=Object(r.a)(t);return e&&t.preventDefault(),e};e.a=i},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"c",function(){return o}),n.d(e,"d",function(){return a}),n.d(e,"b",function(){return s}),n.d(e,"f",function(){return u}),n.d(e,"e",function(){return l}),n.d(e,"h",function(){return c}),n.d(e,"i",function(){return p}),n.d(e,"g",function(){return f});var r=n(34),i=(n.n(r),"CHANGE_POINTS_COORDINATES"),o="SET_ZONING_ABBREVIATION",a="SET_ZONING_DESCRIPTION",s="SET_ADDRESS",u=function(t){return{type:i,payload:t}},l=function(t){return{type:"CHANGE_CENTER_COORDINATES",payload:t}},c=function(t){return{type:o,payload:t}},p=function(t){return{type:a,payload:t}},f=function(t){return console.log(t),{type:s,payload:t}}},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(c===setTimeout)return setTimeout(t,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(p===clearTimeout)return clearTimeout(t);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(t);try{return p(t)}catch(e){try{return p.call(null,t)}catch(e){return p.call(this,t)}}}function a(){m&&h&&(m=!1,h.length?d=h.concat(d):y=-1,d.length&&s())}function s(){if(!m){var t=i(a);m=!0;for(var e=d.length;e;){for(h=d,d=[];++y<e;)h&&h[y].run();y=-1,e=d.length}h=null,m=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function l(){}var c,p,f=t.exports={};!function(){try{c="function"===typeof setTimeout?setTimeout:n}catch(t){c=n}try{p="function"===typeof clearTimeout?clearTimeout:r}catch(t){p=r}}();var h,d=[],m=!1,y=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new u(t,e)),1!==d.length||m||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=l,f.addListener=l,f.once=l,f.off=l,f.removeListener=l,f.removeAllListeners=l,f.emit=l,f.prependListener=l,f.prependOnceListener=l,f.listeners=function(t){return[]},f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(t,e,n){"use strict";var r=n(4),i=n(328),o=n(330),a=n(331),s=n(332),u=n(105),l="undefined"!==typeof window&&window.btoa&&window.btoa.bind(window)||n(333);t.exports=function(t){return new Promise(function(e,c){var p=t.data,f=t.headers;r.isFormData(p)&&delete f["Content-Type"];var h=new XMLHttpRequest,d="onreadystatechange",m=!1;if("undefined"===typeof window||!window.XDomainRequest||"withCredentials"in h||s(t.url)||(h=new window.XDomainRequest,d="onload",m=!0,h.onprogress=function(){},h.ontimeout=function(){}),t.auth){var y=t.auth.username||"",v=t.auth.password||"";f.Authorization="Basic "+l(y+":"+v)}if(h.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),h.timeout=t.timeout,h[d]=function(){if(h&&(4===h.readyState||m)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,r=t.responseType&&"text"!==t.responseType?h.response:h.responseText,o={data:r,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:n,config:t,request:h};i(e,c,o),h=null}},h.onerror=function(){c(u("Network Error",t,null,h)),h=null},h.ontimeout=function(){c(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var g=n(334),_=(t.withCredentials||s(t.url))&&t.xsrfCookieName?g.read(t.xsrfCookieName):void 0;_&&(f[t.xsrfHeaderName]=_)}if("setRequestHeader"in h&&r.forEach(f,function(t,e){"undefined"===typeof p&&"content-type"===e.toLowerCase()?delete f[e]:h.setRequestHeader(e,t)}),t.withCredentials&&(h.withCredentials=!0),t.responseType)try{h.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"===typeof t.onDownloadProgress&&h.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){h&&(h.abort(),c(t),h=null)}),void 0===p&&(p=null),h.send(p)})}},function(t,e,n){"use strict";var r=n(329);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e){function n(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var i in n)r.call(n,i)&&(t[i]=n[i])}return t}t.exports=n;var r=Object.prototype.hasOwnProperty},function(t,e,n){"use strict";var r=function(t,e,n,r,i,o,a,s){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,s],c=0;u=new Error(e.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};t.exports=r},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";function r(){return o.apply(void 0,arguments)}var i,o,a;i=n(55),"function"!==typeof Promise&&console&&console.log&&console.log("An ES6 Promise implementation is required to use rest.js. See https://github.com/cujojs/when/blob/master/docs/es6-promise-shim.md for using when.js as a Promise polyfill."),r.setDefaultClient=function(t){o=t},r.getDefaultClient=function(){return o},r.resetDefaultClient=function(){o=a},r.setPlatformDefaultClient=function(t){if(a)throw new Error("Unable to redefine platformDefaultClient");o=a=t},t.exports=i(r)},function(t,e,n){"use strict";function r(t){return t.toLowerCase().split("-").map(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}).join("-")}t.exports=r},function(t,e,n){"use strict";function r(t,e){return 0===t.indexOf(e)}function i(t,e){return t.lastIndexOf(e)+e.length===t.length}var o,a;o=n(8),a=n(358),t.exports=o({request:function(t,e){var n;return e.prefix&&!new a(t.path).isFullyQualified()&&(n=e.prefix,t.path&&(i(n,"/")||r(t.path,"/")||(n+="/"),n+=t.path),t.path=n),t}})},function(t,e,n){"use strict";function r(t){return t=encodeURIComponent(t),t.replace(a,"+")}function i(t){return t=t.replace(s," "),decodeURIComponent(t)}function o(t,e,n){return Array.isArray(n)?n.forEach(function(n){t=o(t,e,n)}):(t.length>0&&(t+="&"),t+=r(e),void 0!==n&&null!==n&&(t+="="+r(n))),t}var a,s;a=/%20/g,s=/\+/g,t.exports={read:function(t){var e={};return t.split("&").forEach(function(t){var n,r,o;n=t.split("="),r=i(n[0]),o=2===n.length?i(n[1]):null,r in e?(Array.isArray(e[r])||(e[r]=[e[r]]),e[r].push(o)):e[r]=o}),e},write:function(t){var e="";return Object.keys(t).forEach(function(n){e=o(e,n,t[n])}),e}}},function(t,e,n){"use strict";function r(t){var e,n;return e=t.split(";"),n=e[0].trim().split("+"),{raw:t,type:n[0],suffix:n[1]?"+"+n[1]:"",params:e.slice(1).reduce(function(t,e){return e=e.split("="),t[e[0].trim()]=e[1]?e[1].trim():void 0,t},{})}}t.exports={parse:r}},function(t,e,n){"use strict";var r,i,o;r=n(8),i=n(362),o=n(35),t.exports=r({init:function(t){return t.params=t.params||{},t.template=t.template||"",t},request:function(t,e){var n,r;return n=t.path||e.template,r=o({},t.params,e.params),t.path=i.expand(n,r),delete t.params,t}})},function(t,e,n){"use strict";function r(t){try{return Promise.resolve(t())}catch(t){return Promise.reject(t)}}t.exports=r},function(t,e,n){"use strict";e.decode=e.parse=n(375),e.encode=e.stringify=n(376)},function(t,e,n){"use strict";n.d(e,"b",function(){return o}),n.d(e,"a",function(){return a}),n.d(e,"d",function(){return s}),n.d(e,"c",function(){return u});var r=n(34),i=n.n(r),o="RECEIVE_ZONING_TABLE",a="RECEIVE_PERMIT_TABLE",s=function(){return function(t){i.a.get("./zoningTable.json").then(function(e){t(l(e.data))}).catch(function(t){console.log(t)})}},u=function(){return function(t){i.a.get("./permitTable.json").then(function(e){t(c(e.data))}).catch(function(t){console.log(t)})}},l=function(t){return{type:o,payload:t}},c=function(t){return{type:a,payload:t}}},function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return a});var r=n(34),i=n.n(r),o="RECEIVE_GRAPH",a=function(){return function(t){i.a.get("./graph.json").then(function(e){t(s(e.data))}).catch(function(t){console.log(t)})}},s=function(t){return{type:o,payload:t}}},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r="MOVE_POSITION",i=function(t){return{type:r,payload:t}}},function(t,e,n){n(123),t.exports=n(128)},function(t,e,n){"use strict";"undefined"===typeof Promise&&(n(124).enable(),window.Promise=n(126)),n(127),Object.assign=n(36)},function(t,e,n){"use strict";function r(){l=!1,s._47=null,s._71=null}function i(t){function e(e){(t.allRejections||a(p[e].error,t.whitelist||u))&&(p[e].displayId=c++,t.onUnhandled?(p[e].logged=!0,t.onUnhandled(p[e].displayId,p[e].error)):(p[e].logged=!0,o(p[e].displayId,p[e].error)))}function n(e){p[e].logged&&(t.onHandled?t.onHandled(p[e].displayId,p[e].error):p[e].onUnhandled||(console.warn("Promise Rejection Handled (id: "+p[e].displayId+"):"),console.warn('  This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+p[e].displayId+".")))}t=t||{},l&&r(),l=!0;var i=0,c=0,p={};s._47=function(t){2===t._83&&p[t._56]&&(p[t._56].logged?n(t._56):clearTimeout(p[t._56].timeout),delete p[t._56])},s._71=function(t,n){0===t._75&&(t._56=i++,p[t._56]={displayId:null,error:n,timeout:setTimeout(e.bind(null,t._56),a(n,u)?100:2e3),logged:!1})}}function o(t,e){console.warn("Possible Unhandled Promise Rejection (id: "+t+"):"),((e&&(e.stack||e))+"").split("\n").forEach(function(t){console.warn("  "+t)})}function a(t,e){return e.some(function(e){return t instanceof e})}var s=n(57),u=[ReferenceError,TypeError,RangeError],l=!1;e.disable=r,e.enable=i},function(t,e,n){"use strict";(function(e){function n(t){a.length||(o(),s=!0),a[a.length]=t}function r(){for(;u<a.length;){var t=u;if(u+=1,a[t].call(),u>l){for(var e=0,n=a.length-u;e<n;e++)a[e]=a[e+u];a.length-=u,u=0}}a.length=0,u=0,s=!1}function i(t){return function(){function e(){clearTimeout(n),clearInterval(r),t()}var n=setTimeout(e,0),r=setInterval(e,50)}}t.exports=n;var o,a=[],s=!1,u=0,l=1024,c="undefined"!==typeof e?e:self,p=c.MutationObserver||c.WebKitMutationObserver;o="function"===typeof p?function(t){var e=1,n=new p(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}(r):i(r),n.requestFlush=o,n.makeRequestCallFromTimer=i}).call(e,n(9))},function(t,e,n){"use strict";function r(t){var e=new i(i._44);return e._83=1,e._18=t,e}var i=n(57);t.exports=i;var o=r(!0),a=r(!1),s=r(null),u=r(void 0),l=r(0),c=r("");i.resolve=function(t){if(t instanceof i)return t;if(null===t)return s;if(void 0===t)return u;if(!0===t)return o;if(!1===t)return a;if(0===t)return l;if(""===t)return c;if("object"===typeof t||"function"===typeof t)try{var e=t.then;if("function"===typeof e)return new i(e.bind(t))}catch(t){return new i(function(e,n){n(t)})}return r(t)},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,n){function r(a,s){if(s&&("object"===typeof s||"function"===typeof s)){if(s instanceof i&&s.then===i.prototype.then){for(;3===s._83;)s=s._18;return 1===s._83?r(a,s._18):(2===s._83&&n(s._18),void s.then(function(t){r(a,t)},n))}var u=s.then;if("function"===typeof u){return void new i(u.bind(s)).then(function(t){r(a,t)},n)}}e[a]=s,0===--o&&t(e)}if(0===e.length)return t([]);for(var o=e.length,a=0;a<e.length;a++)r(a,e[a])})},i.reject=function(t){return new i(function(e,n){n(t)})},i.race=function(t){return new i(function(e,n){t.forEach(function(t){i.resolve(t).then(e,n)})})},i.prototype.catch=function(t){return this.then(null,t)}},function(t,e){!function(t){"use strict";function e(t){if("string"!==typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function n(t){return"string"!==typeof t&&(t=String(t)),t}function r(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return v.iterable&&(e[Symbol.iterator]=function(){return e}),e}function i(t){this.map={},t instanceof i?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function o(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function a(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function s(t){var e=new FileReader,n=a(e);return e.readAsArrayBuffer(t),n}function u(t){var e=new FileReader,n=a(e);return e.readAsText(t),n}function l(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}function c(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"===typeof t)this._bodyText=t;else if(v.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(v.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(v.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(v.arrayBuffer&&v.blob&&_(t))this._bodyArrayBuffer=c(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!v.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!b(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=c(t)}else this._bodyText="";this.headers.get("content-type")||("string"===typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):v.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},v.blob&&(this.blob=function(){var t=o(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?o(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var t=o(this);if(t)return t;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(l(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},v.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function f(t){var e=t.toUpperCase();return x.indexOf(e)>-1?e:t}function h(t,e){e=e||{};var n=e.body;if(t instanceof h){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new i(t.headers)),this.method=t.method,this.mode=t.mode,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new i(e.headers)),this.method=f(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function m(t){var e=new i;return t.split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}}),e}function y(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new i(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var v={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(v.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],_=function(t){return t&&DataView.prototype.isPrototypeOf(t)},b=ArrayBuffer.isView||function(t){return t&&g.indexOf(Object.prototype.toString.call(t))>-1};i.prototype.append=function(t,r){t=e(t),r=n(r);var i=this.map[t];this.map[t]=i?i+","+r:r},i.prototype.delete=function(t){delete this.map[e(t)]},i.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},i.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},i.prototype.set=function(t,r){this.map[e(t)]=n(r)},i.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},i.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),r(t)},i.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),r(t)},i.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),r(t)},v.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var x=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.clone=function(){return new h(this,{body:this._bodyInit})},p.call(h.prototype),p.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},y.error=function(){var t=new y(null,{status:0,statusText:""});return t.type="error",t};var w=[301,302,303,307,308];y.redirect=function(t,e){if(-1===w.indexOf(e))throw new RangeError("Invalid status code");return new y(null,{status:e,headers:{location:t}})},t.Headers=i,t.Request=h,t.Response=y,t.fetch=function(t,e){return new Promise(function(n,r){var i=new h(t,e),o=new XMLHttpRequest;o.onload=function(){var t={status:o.status,statusText:o.statusText,headers:m(o.getAllResponseHeaders()||"")};t.url="responseURL"in o?o.responseURL:t.headers.get("X-Request-URL");var e="response"in o?o.response:o.responseText;n(new y(e,t))},o.onerror=function(){r(new TypeError("Network request failed"))},o.ontimeout=function(){r(new TypeError("Network request failed"))},o.open(i.method,i.url,!0),"include"===i.credentials&&(o.withCredentials=!0),"responseType"in o&&v.blob&&(o.responseType="blob"),i.headers.forEach(function(t,e){o.setRequestHeader(e,t)}),o.send("undefined"===typeof i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),o=n(130),a=n.n(o),s=n(138),u=(n.n(s),n(139)),l=n(384),c=n(385),p=(n.n(c),n(386)),f=(n.n(p),n(387)),h=n.n(f),d=n(3),m=n(14),y=n(388),v=n(393),g=(n.n(v),Object(m.createStore)(y.a,Object(v.composeWithDevTools)(Object(m.applyMiddleware)(h.a))));a.a.render(i.a.createElement(d.a,{store:g},i.a.createElement(u.a,null)),document.getElementById("root")),Object(l.a)()},function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="http://reactjs.org/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);g(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function i(t,e,n){this.props=t,this.context=e,this.refs=_,this.updater=n||P}function o(){}function a(t,e,n){this.props=t,this.context=e,this.refs=_,this.updater=n||P}function s(t,e,n){var r=void 0,i={},o=null,a=null;if(null!=e)for(r in void 0!==e.ref&&(a=e.ref),void 0!==e.key&&(o=""+e.key),e)M.call(e,r)&&!j.hasOwnProperty(r)&&(i[r]=e[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var u=Array(s),l=0;l<s;l++)u[l]=arguments[l+2];i.children=u}if(t&&t.defaultProps)for(r in s=t.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:w,type:t,key:o,ref:a,props:i,_owner:R.current}}function u(t){return"object"===typeof t&&null!==t&&t.$$typeof===w}function l(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}function c(t,e,n,r){if(L.length){var i=L.pop();return i.result=t,i.keyPrefix=e,i.func=n,i.context=r,i.count=0,i}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function p(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>L.length&&L.push(t)}function f(t,e,n,i){var o=typeof t;"undefined"!==o&&"boolean"!==o||(t=null);var a=!1;if(null===t)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case w:case E:a=!0}}if(a)return n(i,t,""===e?"."+h(t,0):e),1;if(a=0,e=""===e?".":e+":",Array.isArray(t))for(var s=0;s<t.length;s++){o=t[s];var u=e+h(o,s);a+=f(o,u,n,i)}else if(null===t||"undefined"===typeof t?u=null:(u=I&&t[I]||t["@@iterator"],u="function"===typeof u?u:null),"function"===typeof u)for(t=u.call(t),s=0;!(o=t.next()).done;)o=o.value,u=e+h(o,s++),a+=f(o,u,n,i);else"object"===o&&(n=""+t,r("31","[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return a}function h(t,e){return"object"===typeof t&&null!==t&&null!=t.key?l(t.key):e.toString(36)}function d(t,e){t.func.call(t.context,e,t.count++)}function m(t,e,n){var r=t.result,i=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?y(t,r,n,b.thatReturnsArgument):null!=t&&(u(t)&&(e=i+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(D,"$&/")+"/")+n,t={$$typeof:w,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}),r.push(t))}function y(t,e,n,r,i){var o="";null!=n&&(o=(""+n).replace(D,"$&/")+"/"),e=c(e,o,r,i),null==t||f(t,"",m,e),p(e)}var v=n(36),g=n(37),_=n(58),b=n(38),x="function"===typeof Symbol&&Symbol.for,w=x?Symbol.for("react.element"):60103,E=x?Symbol.for("react.portal"):60106,S=x?Symbol.for("react.fragment"):60107,T=x?Symbol.for("react.strict_mode"):60108,C=x?Symbol.for("react.provider"):60109,A=x?Symbol.for("react.context"):60110,O=x?Symbol.for("react.async_mode"):60111,k=x?Symbol.for("react.forward_ref"):60112,I="function"===typeof Symbol&&Symbol.iterator,P={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};i.prototype.isReactComponent={},i.prototype.setState=function(t,e){"object"!==typeof t&&"function"!==typeof t&&null!=t&&r("85"),this.updater.enqueueSetState(this,t,e,"setState")},i.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},o.prototype=i.prototype;var z=a.prototype=new o;z.constructor=a,v(z,i.prototype),z.isPureReactComponent=!0;var R={current:null},M=Object.prototype.hasOwnProperty,j={key:!0,ref:!0,__self:!0,__source:!0},D=/\/+/g,L=[],F={Children:{map:function(t,e,n){if(null==t)return t;var r=[];return y(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;e=c(null,null,e,n),null==t||f(t,"",d,e),p(e)},count:function(t){return null==t?0:f(t,"",b.thatReturnsNull,null)},toArray:function(t){var e=[];return y(t,e,null,b.thatReturnsArgument),e},only:function(t){return u(t)||r("143"),t}},createRef:function(){return{current:null}},Component:i,PureComponent:a,createContext:function(t,e){return void 0===e&&(e=null),t={$$typeof:A,_calculateChangedBits:e,_defaultValue:t,_currentValue:t,_changedBits:0,Provider:null,Consumer:null},t.Provider={$$typeof:C,_context:t},t.Consumer=t},forwardRef:function(t){return{$$typeof:k,render:t}},Fragment:S,StrictMode:T,unstable_AsyncMode:O,createElement:s,cloneElement:function(t,e,n){(null===t||void 0===t)&&r("267",t);var i=void 0,o=v({},t.props),a=t.key,s=t.ref,u=t._owner;if(null!=e){void 0!==e.ref&&(s=e.ref,u=R.current),void 0!==e.key&&(a=""+e.key);var l=void 0;t.type&&t.type.defaultProps&&(l=t.type.defaultProps);for(i in e)M.call(e,i)&&!j.hasOwnProperty(i)&&(o[i]=void 0===e[i]&&void 0!==l?l[i]:e[i])}if(1===(i=arguments.length-2))o.children=n;else if(1<i){l=Array(i);for(var c=0;c<i;c++)l[c]=arguments[c+2];o.children=l}return{$$typeof:w,type:t.type,key:a,ref:s,props:o,_owner:u}},createFactory:function(t){var e=s.bind(null,t);return e.type=t,e},isValidElement:u,version:"16.3.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:R,assign:v}},B=Object.freeze({default:F}),N=B&&F||B;t.exports=N.default?N.default:N},function(t,e,n){"use strict";function r(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(t){console.error(t)}}r(),t.exports=n(131)},function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="http://reactjs.org/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);ln(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function i(t,e,n,r,i,o,a,s,u){this._hasCaughtError=!1,this._caughtError=null;var l=Array.prototype.slice.call(arguments,3);try{e.apply(n,l)}catch(t){this._caughtError=t,this._hasCaughtError=!0}}function o(){if(gn._hasRethrowError){var t=gn._rethrowError;throw gn._rethrowError=null,gn._hasRethrowError=!1,t}}function a(){if(_n)for(var t in bn){var e=bn[t],n=_n.indexOf(t);if(-1<n||r("96",t),!xn[n]){e.extractEvents||r("97",t),xn[n]=e,n=e.eventTypes;for(var i in n){var o=void 0,a=n[i],u=e,l=i;wn.hasOwnProperty(l)&&r("99",l),wn[l]=a;var c=a.phasedRegistrationNames;if(c){for(o in c)c.hasOwnProperty(o)&&s(c[o],u,l);o=!0}else a.registrationName?(s(a.registrationName,u,l),o=!0):o=!1;o||r("98",i,t)}}}}function s(t,e,n){En[t]&&r("100",t),En[t]=e,Sn[t]=e.eventTypes[n].dependencies}function u(t){_n&&r("101"),_n=Array.prototype.slice.call(t),a()}function l(t){var e,n=!1;for(e in t)if(t.hasOwnProperty(e)){var i=t[e];bn.hasOwnProperty(e)&&bn[e]===i||(bn[e]&&r("102",e),bn[e]=i,n=!0)}n&&a()}function c(t,e,n,r){e=t.type||"unknown-event",t.currentTarget=On(r),gn.invokeGuardedCallbackAndCatchFirstError(e,n,void 0,t),t.currentTarget=null}function p(t,e){return null==e&&r("30"),null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}function f(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}function h(t,e){if(t){var n=t._dispatchListeners,r=t._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!t.isPropagationStopped();i++)c(t,e,n[i],r[i]);else n&&c(t,e,n,r);t._dispatchListeners=null,t._dispatchInstances=null,t.isPersistent()||t.constructor.release(t)}}function d(t){return h(t,!0)}function m(t){return h(t,!1)}function y(t,e){var n=t.stateNode;if(!n)return null;var i=Cn(n);if(!i)return null;n=i[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(i=!i.disabled)||(t=t.type,i=!("button"===t||"input"===t||"select"===t||"textarea"===t)),t=!i;break t;default:t=!1}return t?null:(n&&"function"!==typeof n&&r("231",e,typeof n),n)}function v(t,e){null!==t&&(kn=p(kn,t)),t=kn,kn=null,t&&(e?f(t,d):f(t,m),kn&&r("95"),gn.rethrowCaughtError())}function g(t,e,n,r){for(var i=null,o=0;o<xn.length;o++){var a=xn[o];a&&(a=a.extractEvents(t,e,n,r))&&(i=p(i,a))}v(i,!1)}function _(t){if(t[Rn])return t[Rn];for(;!t[Rn];){if(!t.parentNode)return null;t=t.parentNode}return t=t[Rn],5===t.tag||6===t.tag?t:null}function b(t){if(5===t.tag||6===t.tag)return t.stateNode;r("33")}function x(t){return t[Mn]||null}function w(t){do{t=t.return}while(t&&5!==t.tag);return t||null}function E(t,e,n){for(var r=[];t;)r.push(t),t=w(t);for(t=r.length;0<t--;)e(r[t],"captured",n);for(t=0;t<r.length;t++)e(r[t],"bubbled",n)}function S(t,e,n){(e=y(t,n.dispatchConfig.phasedRegistrationNames[e]))&&(n._dispatchListeners=p(n._dispatchListeners,e),n._dispatchInstances=p(n._dispatchInstances,t))}function T(t){t&&t.dispatchConfig.phasedRegistrationNames&&E(t._targetInst,S,t)}function C(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst;e=e?w(e):null,E(e,S,t)}}function A(t,e,n){t&&n&&n.dispatchConfig.registrationName&&(e=y(t,n.dispatchConfig.registrationName))&&(n._dispatchListeners=p(n._dispatchListeners,e),n._dispatchInstances=p(n._dispatchInstances,t))}function O(t){t&&t.dispatchConfig.registrationName&&A(t._targetInst,null,t)}function k(t){f(t,T)}function I(t,e,n,r){if(n&&r)t:{for(var i=n,o=r,a=0,s=i;s;s=w(s))a++;s=0;for(var u=o;u;u=w(u))s++;for(;0<a-s;)i=w(i),a--;for(;0<s-a;)o=w(o),s--;for(;a--;){if(i===o||i===o.alternate)break t;i=w(i),o=w(o)}i=null}else i=null;for(o=i,i=[];n&&n!==o&&(null===(a=n.alternate)||a!==o);)i.push(n),n=w(n);for(n=[];r&&r!==o&&(null===(a=r.alternate)||a!==o);)n.push(r),r=w(r);for(r=0;r<i.length;r++)A(i[r],"bubbled",t);for(t=n.length;0<t--;)A(n[t],"captured",e)}function P(){return!Ln&&pn.canUseDOM&&(Ln="textContent"in document.documentElement?"textContent":"innerText"),Ln}function z(){if(Fn._fallbackText)return Fn._fallbackText;var t,e,n=Fn._startText,r=n.length,i=R(),o=i.length;for(t=0;t<r&&n[t]===i[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===i[o-e];e++);return Fn._fallbackText=i.slice(t,1<e?1-e:void 0),Fn._fallbackText}function R(){return"value"in Fn._root?Fn._root.value:Fn._root[P()]}function M(t,e,n,r){this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n,t=this.constructor.Interface;for(var i in t)t.hasOwnProperty(i)&&((e=t[i])?this[i]=e(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?hn.thatReturnsTrue:hn.thatReturnsFalse,this.isPropagationStopped=hn.thatReturnsFalse,this}function j(t,e,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,t,e,n,r),i}return new this(t,e,n,r)}function D(t){t instanceof this||r("223"),t.destructor(),10>this.eventPool.length&&this.eventPool.push(t)}function L(t){t.eventPool=[],t.getPooled=j,t.release=D}function F(t,e){switch(t){case"topKeyUp":return-1!==qn.indexOf(e.keyCode);case"topKeyDown":return 229!==e.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function B(t){return t=t.detail,"object"===typeof t&&"data"in t?t.data:null}function N(t,e){switch(t){case"topCompositionEnd":return B(e);case"topKeyPress":return 32!==e.which?null:(Xn=!0,Hn);case"topTextInput":return t=e.data,t===Hn&&Xn?null:t;default:return null}}function V(t,e){if(Yn)return"topCompositionEnd"===t||!Wn&&F(t,e)?(t=z(),Fn._root=null,Fn._startText=null,Fn._fallbackText=null,Yn=!1,t):null;switch(t){case"topPaste":return null;case"topKeyPress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"topCompositionEnd":return Gn?null:e.data;default:return null}}function U(t){if(t=An(t)){Qn&&"function"===typeof Qn.restoreControlledState||r("194");var e=Cn(t.stateNode);Qn.restoreControlledState(t.stateNode,t.type,e)}}function q(t){er?nr?nr.push(t):nr=[t]:er=t}function W(){return null!==er||null!==nr}function $(){if(er){var t=er,e=nr;if(nr=er=null,U(t),e)for(t=0;t<e.length;t++)U(e[t])}}function Z(t,e){return t(e)}function G(t,e,n){return t(e,n)}function H(){}function K(t,e){if(ir)return t(e);ir=!0;try{return Z(t,e)}finally{ir=!1,W()&&(H(),$())}}function X(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!or[t.type]:"textarea"===e}function Y(t){return t=t.target||window,t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}function J(t,e){return!(!pn.canUseDOM||e&&!("addEventListener"in document))&&(t="on"+t,e=t in document,e||(e=document.createElement("div"),e.setAttribute(t,"return;"),e="function"===typeof e[t]),e)}function Q(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function tt(t){var e=Q(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&"function"===typeof n.get&&"function"===typeof n.set)return Object.defineProperty(t,e,{configurable:!0,get:function(){return n.get.call(this)},set:function(t){r=""+t,n.set.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}function et(t){t._valueTracker||(t._valueTracker=tt(t))}function nt(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Q(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function rt(t){return null===t||"undefined"===typeof t?null:(t=gr&&t[gr]||t["@@iterator"],"function"===typeof t?t:null)}function it(t){if("function"===typeof(t=t.type))return t.displayName||t.name;if("string"===typeof t)return t;switch(t){case fr:return"ReactFragment";case pr:return"ReactPortal";case lr:return"ReactCall";case cr:return"ReactReturn"}if("object"===typeof t&&null!==t)switch(t.$$typeof){case vr:return t=t.render.displayName||t.render.name||"",""!==t?"ForwardRef("+t+")":"ForwardRef"}return null}function ot(t){var e="";do{t:switch(t.tag){case 0:case 1:case 2:case 5:var n=t._debugOwner,r=t._debugSource,i=it(t),o=null;n&&(o=it(n)),n=r,i="\n    in "+(i||"Unknown")+(n?" (at "+n.fileName.replace(/^.*[\\\/]/,"")+":"+n.lineNumber+")":o?" (created by "+o+")":"");break t;default:i=""}e+=i,t=t.return}while(t);return e}function at(t){return!!xr.hasOwnProperty(t)||!br.hasOwnProperty(t)&&(_r.test(t)?xr[t]=!0:(br[t]=!0,!1))}function st(t,e,n,r){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}function ut(t,e,n,r){if(null===e||"undefined"===typeof e||st(t,e,n,r))return!0;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function lt(t,e,n,r,i){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e}function ct(t){return t[1].toUpperCase()}function pt(t,e,n,r){var i=wr.hasOwnProperty(e)?wr[e]:null;(null!==i?0===i.type:!r&&(2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])))||(ut(e,n,i,r)&&(n=null),r||null===i?at(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=null===n?3!==i.type&&"":n:(e=i.attributeName,r=i.attributeNamespace,null===n?t.removeAttribute(e):(i=i.type,n=3===i||4===i&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}function ft(t,e){var n=e.checked;return fn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function ht(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=gt(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function dt(t,e){null!=(e=e.checked)&&pt(t,"checked",e,!1)}function mt(t,e){dt(t,e);var n=gt(e.value);null!=n&&("number"===e.type?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n)),e.hasOwnProperty("value")?vt(t,e.type,n):e.hasOwnProperty("defaultValue")&&vt(t,e.type,gt(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function yt(t,e){(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue"))&&(""===t.value&&(t.value=""+t._wrapperState.initialValue),t.defaultValue=""+t._wrapperState.initialValue),e=t.name,""!==e&&(t.name=""),t.defaultChecked=!t.defaultChecked,t.defaultChecked=!t.defaultChecked,""!==e&&(t.name=e)}function vt(t,e,n){"number"===e&&t.ownerDocument.activeElement===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}function gt(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function _t(t,e,n){return t=M.getPooled(Sr.change,t,e,n),t.type="change",q(n),k(t),t}function bt(t){v(t,!1)}function xt(t){if(nt(b(t)))return t}function wt(t,e){if("topChange"===t)return e}function Et(){Tr&&(Tr.detachEvent("onpropertychange",St),Cr=Tr=null)}function St(t){"value"===t.propertyName&&xt(Cr)&&(t=_t(Cr,t,Y(t)),K(bt,t))}function Tt(t,e,n){"topFocus"===t?(Et(),Tr=e,Cr=n,Tr.attachEvent("onpropertychange",St)):"topBlur"===t&&Et()}function Ct(t){if("topSelectionChange"===t||"topKeyUp"===t||"topKeyDown"===t)return xt(Cr)}function At(t,e){if("topClick"===t)return xt(e)}function Ot(t,e){if("topInput"===t||"topChange"===t)return xt(e)}function kt(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=Ir[t])&&!!e[t]}function It(){return kt}function Pt(t){var e=t;if(t.alternate)for(;e.return;)e=e.return;else{if(0!==(2&e.effectTag))return 1;for(;e.return;)if(e=e.return,0!==(2&e.effectTag))return 1}return 3===e.tag?2:3}function zt(t){return!!(t=t._reactInternalFiber)&&2===Pt(t)}function Rt(t){2!==Pt(t)&&r("188")}function Mt(t){var e=t.alternate;if(!e)return e=Pt(t),3===e&&r("188"),1===e?null:t;for(var n=t,i=e;;){var o=n.return,a=o?o.alternate:null;if(!o||!a)break;if(o.child===a.child){for(var s=o.child;s;){if(s===n)return Rt(o),t;if(s===i)return Rt(o),e;s=s.sibling}r("188")}if(n.return!==i.return)n=o,i=a;else{s=!1;for(var u=o.child;u;){if(u===n){s=!0,n=o,i=a;break}if(u===i){s=!0,i=o,n=a;break}u=u.sibling}if(!s){for(u=a.child;u;){if(u===n){s=!0,n=a,i=o;break}if(u===i){s=!0,i=a,n=o;break}u=u.sibling}s||r("189")}}n.alternate!==i&&r("190")}return 3!==n.tag&&r("188"),n.stateNode.current===n?t:e}function jt(t){if(!(t=Mt(t)))return null;for(var e=t;;){if(5===e.tag||6===e.tag)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}function Dt(t){if(!(t=Mt(t)))return null;for(var e=t;;){if(5===e.tag||6===e.tag)return e;if(e.child&&4!==e.tag)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}function Lt(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}function Ft(t,e){var n=t[0].toUpperCase()+t.slice(1),r="on"+n;n="top"+n,e={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:e},Wr[t]=e,$r[n]=e}function Bt(t){var e=t.targetInst;do{if(!e){t.ancestors.push(e);break}var n;for(n=e;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;t.ancestors.push(e),e=_(n)}while(e);for(n=0;n<t.ancestors.length;n++)e=t.ancestors[n],g(t.topLevelType,e,t.nativeEvent,Y(t.nativeEvent))}function Nt(t){Kr=!!t}function Vt(t,e,n){if(!n)return null;t=(Gr(t)?qt:Wt).bind(null,t),n.addEventListener(e,t,!1)}function Ut(t,e,n){if(!n)return null;t=(Gr(t)?qt:Wt).bind(null,t),n.addEventListener(e,t,!0)}function qt(t,e){G(Wt,t,e)}function Wt(t,e){if(Kr){var n=Y(e);if(n=_(n),null!==n&&"number"===typeof n.tag&&2!==Pt(n)&&(n=null),Hr.length){var r=Hr.pop();r.topLevelType=t,r.nativeEvent=e,r.targetInst=n,t=r}else t={topLevelType:t,nativeEvent:e,targetInst:n,ancestors:[]};try{K(Bt,t)}finally{t.topLevelType=null,t.nativeEvent=null,t.targetInst=null,t.ancestors.length=0,10>Hr.length&&Hr.push(t)}}}function $t(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n["ms"+t]="MS"+e,n["O"+t]="o"+e.toLowerCase(),n}function Zt(t){if(Jr[t])return Jr[t];if(!Yr[t])return t;var e,n=Yr[t];for(e in n)if(n.hasOwnProperty(e)&&e in Qr)return Jr[t]=n[e];return t}function Gt(t){return Object.prototype.hasOwnProperty.call(t,ii)||(t[ii]=ri++,ni[t[ii]]={}),ni[t[ii]]}function Ht(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Kt(t,e){var n=Ht(t);t=0;for(var r;n;){if(3===n.nodeType){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=Ht(n)}}function Xt(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&"text"===t.type||"textarea"===e||"true"===t.contentEditable)}function Yt(t,e){if(ci||null==si||si!==dn())return null;var n=si;return"selectionStart"in n&&Xt(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,li&&mn(li,n)?null:(li=n,t=M.getPooled(ai.select,ui,t,e),t.type="select",t.target=si,k(t),t)}function Jt(t,e,n,r){this.tag=t,this.key=n,this.stateNode=this.type=null,this.sibling=this.child=this.return=null,this.index=0,this.ref=null,this.pendingProps=e,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function Qt(t,e,n){var r=t.alternate;return null===r?(r=new Jt(t.tag,e,t.key,t.mode),r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function te(t,e,n){var i=t.type,o=t.key;t=t.props;var a=void 0;if("function"===typeof i)a=i.prototype&&i.prototype.isReactComponent?2:0;else if("string"===typeof i)a=5;else switch(i){case fr:return ee(t.children,e,n,o);case yr:a=11,e|=3;break;case hr:a=11,e|=2;break;case lr:a=7;break;case cr:a=9;break;default:if("object"===typeof i&&null!==i)switch(i.$$typeof){case dr:a=13;break;case mr:a=12;break;case vr:a=14;break;default:if("number"===typeof i.tag)return e=i,e.pendingProps=t,e.expirationTime=n,e;r("130",null==i?i:typeof i,"")}else r("130",null==i?i:typeof i,"")}return e=new Jt(a,t,o,e),e.type=i,e.expirationTime=n,e}function ee(t,e,n,r){return t=new Jt(10,t,r,e),t.expirationTime=n,t}function ne(t,e,n){return t=new Jt(6,t,null,e),t.expirationTime=n,t}function re(t,e,n){return e=new Jt(4,null!==t.children?t.children:[],t.key,e),e.expirationTime=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function ie(t){return function(e){try{return t(e)}catch(t){}}}function oe(t){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(e.isDisabled||!e.supportsFiber)return!0;try{var n=e.inject(t);fi=ie(function(t){return e.onCommitFiberRoot(n,t)}),hi=ie(function(t){return e.onCommitFiberUnmount(n,t)})}catch(t){}return!0}function ae(t){"function"===typeof fi&&fi(t)}function se(t){"function"===typeof hi&&hi(t)}function ue(t){return{baseState:t,expirationTime:0,first:null,last:null,callbackList:null,hasForceUpdate:!1,isInitialized:!1,capturedValues:null}}function le(t,e){null===t.last?t.first=t.last=e:(t.last.next=e,t.last=e),(0===t.expirationTime||t.expirationTime>e.expirationTime)&&(t.expirationTime=e.expirationTime)}function ce(t){di=mi=null;var e=t.alternate,n=t.updateQueue;null===n&&(n=t.updateQueue=ue(null)),null!==e?null===(t=e.updateQueue)&&(t=e.updateQueue=ue(null)):t=null,di=n,mi=t!==n?t:null}function pe(t,e){ce(t),t=di;var n=mi;null===n?le(t,e):null===t.last||null===n.last?(le(t,e),le(n,e)):(le(t,e),n.last=e)}function fe(t,e,n,r){return t=t.partialState,"function"===typeof t?t.call(e,n,r):t}function he(t,e,n,r,i,o){null!==t&&t.updateQueue===n&&(n=e.updateQueue={baseState:n.baseState,expirationTime:n.expirationTime,first:n.first,last:n.last,isInitialized:n.isInitialized,capturedValues:n.capturedValues,callbackList:null,hasForceUpdate:!1}),n.expirationTime=0,n.isInitialized?t=n.baseState:(t=n.baseState=e.memoizedState,n.isInitialized=!0);for(var a=!0,s=n.first,u=!1;null!==s;){var l=s.expirationTime;if(l>o){var c=n.expirationTime;(0===c||c>l)&&(n.expirationTime=l),u||(u=!0,n.baseState=t)}else u||(n.first=s.next,null===n.first&&(n.last=null)),s.isReplace?(t=fe(s,r,t,i),a=!0):(l=fe(s,r,t,i))&&(t=a?fn({},t,l):fn(t,l),a=!1),s.isForced&&(n.hasForceUpdate=!0),null!==s.callback&&(l=n.callbackList,null===l&&(l=n.callbackList=[]),l.push(s)),null!==s.capturedValue&&(l=n.capturedValues,null===l?n.capturedValues=[s.capturedValue]:l.push(s.capturedValue));s=s.next}return null!==n.callbackList?e.effectTag|=32:null!==n.first||n.hasForceUpdate||null!==n.capturedValues||(e.updateQueue=null),u||(n.baseState=t),t}function de(t,e){var n=t.callbackList;if(null!==n)for(t.callbackList=null,t=0;t<n.length;t++){var i=n[t],o=i.callback;i.callback=null,"function"!==typeof o&&r("191",o),o.call(e)}}function me(t,e,n,r,i){function o(t,e,n,r,i,o){if(null===e||null!==t.updateQueue&&t.updateQueue.hasForceUpdate)return!0;var a=t.stateNode;return t=t.type,"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,i,o):!t.prototype||!t.prototype.isPureReactComponent||(!mn(e,n)||!mn(r,i))}function a(t,e){e.updater=d,t.stateNode=e,e._reactInternalFiber=t}function s(t,e,n,r){t=e.state,"function"===typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"===typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&d.enqueueReplaceState(e,e.state,null)}function u(t,e,n,r){if(t=t.type,"function"===typeof t.getDerivedStateFromProps)return t.getDerivedStateFromProps.call(null,n,r)}var l=t.cacheContext,c=t.getMaskedContext,p=t.getUnmaskedContext,f=t.isContextConsumer,h=t.hasContextChanged,d={isMounted:zt,enqueueSetState:function(t,r,i){t=t._reactInternalFiber,i=void 0===i?null:i;var o=n(t);pe(t,{expirationTime:o,partialState:r,callback:i,isReplace:!1,isForced:!1,capturedValue:null,next:null}),e(t,o)},enqueueReplaceState:function(t,r,i){t=t._reactInternalFiber,i=void 0===i?null:i;var o=n(t);pe(t,{expirationTime:o,partialState:r,callback:i,isReplace:!0,isForced:!1,capturedValue:null,next:null}),e(t,o)},enqueueForceUpdate:function(t,r){t=t._reactInternalFiber,r=void 0===r?null:r;var i=n(t);pe(t,{expirationTime:i,partialState:null,callback:r,isReplace:!1,isForced:!0,capturedValue:null,next:null}),e(t,i)}};return{adoptClassInstance:a,callGetDerivedStateFromProps:u,constructClassInstance:function(t,e){var n=t.type,r=p(t),i=f(t),o=i?c(t,r):vn;n=new n(e,o);var s=null!==n.state&&void 0!==n.state?n.state:null;return a(t,n),t.memoizedState=s,e=u(t,n,e,s),null!==e&&void 0!==e&&(t.memoizedState=fn({},t.memoizedState,e)),i&&l(t,r,o),n},mountClassInstance:function(t,e){var n=t.type,r=t.alternate,i=t.stateNode,o=t.pendingProps,a=p(t);i.props=o,i.state=t.memoizedState,i.refs=vn,i.context=c(t,a),"function"===typeof n.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(n=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),n!==i.state&&d.enqueueReplaceState(i,i.state,null),null!==(n=t.updateQueue)&&(i.state=he(r,t,n,i,o,e))),"function"===typeof i.componentDidMount&&(t.effectTag|=4)},resumeMountClassInstance:function(t,e){var n=t.type,a=t.stateNode;a.props=t.memoizedProps,a.state=t.memoizedState;var l=t.memoizedProps,f=t.pendingProps,d=a.context,m=p(t);m=c(t,m),(n="function"===typeof n.getDerivedStateFromProps||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(l!==f||d!==m)&&s(t,a,f,m),d=t.memoizedState,e=null!==t.updateQueue?he(null,t,t.updateQueue,a,f,e):d;var y=void 0;if(l!==f&&(y=u(t,a,f,e)),null!==y&&void 0!==y){e=null===e||void 0===e?y:fn({},e,y);var v=t.updateQueue;null!==v&&(v.baseState=fn({},v.baseState,y))}return l!==f||d!==e||h()||null!==t.updateQueue&&t.updateQueue.hasForceUpdate?((l=o(t,l,f,d,e,m))?(n||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.effectTag|=4)):("function"===typeof a.componentDidMount&&(t.effectTag|=4),r(t,f),i(t,e)),a.props=f,a.state=e,a.context=m,l):("function"===typeof a.componentDidMount&&(t.effectTag|=4),!1)},updateClassInstance:function(t,e,n){var a=e.type,l=e.stateNode;l.props=e.memoizedProps,l.state=e.memoizedState;var f=e.memoizedProps,d=e.pendingProps,m=l.context,y=p(e);y=c(e,y),(a="function"===typeof a.getDerivedStateFromProps||"function"===typeof l.getSnapshotBeforeUpdate)||"function"!==typeof l.UNSAFE_componentWillReceiveProps&&"function"!==typeof l.componentWillReceiveProps||(f!==d||m!==y)&&s(e,l,d,y),m=e.memoizedState,n=null!==e.updateQueue?he(t,e,e.updateQueue,l,d,n):m;var v=void 0;if(f!==d&&(v=u(e,l,d,n)),null!==v&&void 0!==v){n=null===n||void 0===n?v:fn({},n,v);var g=e.updateQueue;null!==g&&(g.baseState=fn({},g.baseState,v))}return f!==d||m!==n||h()||null!==e.updateQueue&&e.updateQueue.hasForceUpdate?((v=o(e,f,d,m,n,y))?(a||"function"!==typeof l.UNSAFE_componentWillUpdate&&"function"!==typeof l.componentWillUpdate||("function"===typeof l.componentWillUpdate&&l.componentWillUpdate(d,n,y),"function"===typeof l.UNSAFE_componentWillUpdate&&l.UNSAFE_componentWillUpdate(d,n,y)),"function"===typeof l.componentDidUpdate&&(e.effectTag|=4),"function"===typeof l.getSnapshotBeforeUpdate&&(e.effectTag|=2048)):("function"!==typeof l.componentDidUpdate||f===t.memoizedProps&&m===t.memoizedState||(e.effectTag|=4),"function"!==typeof l.getSnapshotBeforeUpdate||f===t.memoizedProps&&m===t.memoizedState||(e.effectTag|=2048),r(e,d),i(e,n)),l.props=d,l.state=n,l.context=y,v):("function"!==typeof l.componentDidUpdate||f===t.memoizedProps&&m===t.memoizedState||(e.effectTag|=4),"function"!==typeof l.getSnapshotBeforeUpdate||f===t.memoizedProps&&m===t.memoizedState||(e.effectTag|=2048),!1)}}}function ye(t,e,n){if(null!==(t=n.ref)&&"function"!==typeof t&&"object"!==typeof t){if(n._owner){n=n._owner;var i=void 0;n&&(2!==n.tag&&r("110"),i=n.stateNode),i||r("147",t);var o=""+t;return null!==e&&null!==e.ref&&e.ref._stringRef===o?e.ref:(e=function(t){var e=i.refs===vn?i.refs={}:i.refs;null===t?delete e[o]:e[o]=t},e._stringRef=o,e)}"string"!==typeof t&&r("148"),n._owner||r("254",t)}return t}function ve(t,e){"textarea"!==t.type&&r("31","[object Object]"===Object.prototype.toString.call(e)?"object with keys {"+Object.keys(e).join(", ")+"}":e,"")}function ge(t){function e(e,n){if(t){var r=e.lastEffect;null!==r?(r.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function i(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function o(t,e,n){return t=Qt(t,e,n),t.index=0,t.sibling=null,t}function a(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index,r<n?(e.effectTag=2,n):r):(e.effectTag=2,n):n}function s(e){return t&&null===e.alternate&&(e.effectTag=2),e}function u(t,e,n,r){return null===e||6!==e.tag?(e=ne(n,t.mode,r),e.return=t,e):(e=o(e,n,r),e.return=t,e)}function l(t,e,n,r){return null!==e&&e.type===n.type?(r=o(e,n.props,r),r.ref=ye(t,e,n),r.return=t,r):(r=te(n,t.mode,r),r.ref=ye(t,e,n),r.return=t,r)}function c(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?(e=re(n,t.mode,r),e.return=t,e):(e=o(e,n.children||[],r),e.return=t,e)}function p(t,e,n,r,i){return null===e||10!==e.tag?(e=ee(n,t.mode,r,i),e.return=t,e):(e=o(e,n,r),e.return=t,e)}function f(t,e,n){if("string"===typeof e||"number"===typeof e)return e=ne(""+e,t.mode,n),e.return=t,e;if("object"===typeof e&&null!==e){switch(e.$$typeof){case ur:return n=te(e,t.mode,n),n.ref=ye(t,null,e),n.return=t,n;case pr:return e=re(e,t.mode,n),e.return=t,e}if(yi(e)||rt(e))return e=ee(e,t.mode,n,null),e.return=t,e;ve(t,e)}return null}function h(t,e,n,r){var i=null!==e?e.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:u(t,e,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case ur:return n.key===i?n.type===fr?p(t,e,n.props.children,r,i):l(t,e,n,r):null;case pr:return n.key===i?c(t,e,n,r):null}if(yi(n)||rt(n))return null!==i?null:p(t,e,n,r,null);ve(t,n)}return null}function d(t,e,n,r,i){if("string"===typeof r||"number"===typeof r)return t=t.get(n)||null,u(e,t,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case ur:return t=t.get(null===r.key?n:r.key)||null,r.type===fr?p(e,t,r.props.children,i,r.key):l(e,t,r,i);case pr:return t=t.get(null===r.key?n:r.key)||null,c(e,t,r,i)}if(yi(r)||rt(r))return t=t.get(n)||null,p(e,t,r,i,null);ve(e,r)}return null}function m(r,o,s,u){for(var l=null,c=null,p=o,m=o=0,y=null;null!==p&&m<s.length;m++){p.index>m?(y=p,p=null):y=p.sibling;var v=h(r,p,s[m],u);if(null===v){null===p&&(p=y);break}t&&p&&null===v.alternate&&e(r,p),o=a(v,o,m),null===c?l=v:c.sibling=v,c=v,p=y}if(m===s.length)return n(r,p),l;if(null===p){for(;m<s.length;m++)(p=f(r,s[m],u))&&(o=a(p,o,m),null===c?l=p:c.sibling=p,c=p);return l}for(p=i(r,p);m<s.length;m++)(y=d(p,r,m,s[m],u))&&(t&&null!==y.alternate&&p.delete(null===y.key?m:y.key),o=a(y,o,m),null===c?l=y:c.sibling=y,c=y);return t&&p.forEach(function(t){return e(r,t)}),l}function y(o,s,u,l){var c=rt(u);"function"!==typeof c&&r("150"),null==(u=c.call(u))&&r("151");for(var p=c=null,m=s,y=s=0,v=null,g=u.next();null!==m&&!g.done;y++,g=u.next()){m.index>y?(v=m,m=null):v=m.sibling;var _=h(o,m,g.value,l);if(null===_){m||(m=v);break}t&&m&&null===_.alternate&&e(o,m),s=a(_,s,y),null===p?c=_:p.sibling=_,p=_,m=v}if(g.done)return n(o,m),c;if(null===m){for(;!g.done;y++,g=u.next())null!==(g=f(o,g.value,l))&&(s=a(g,s,y),null===p?c=g:p.sibling=g,p=g);return c}for(m=i(o,m);!g.done;y++,g=u.next())null!==(g=d(m,o,y,g.value,l))&&(t&&null!==g.alternate&&m.delete(null===g.key?y:g.key),s=a(g,s,y),null===p?c=g:p.sibling=g,p=g);return t&&m.forEach(function(t){return e(o,t)}),c}return function(t,i,a,u){"object"===typeof a&&null!==a&&a.type===fr&&null===a.key&&(a=a.props.children);var l="object"===typeof a&&null!==a;if(l)switch(a.$$typeof){case ur:t:{var c=a.key;for(l=i;null!==l;){if(l.key===c){if(10===l.tag?a.type===fr:l.type===a.type){n(t,l.sibling),i=o(l,a.type===fr?a.props.children:a.props,u),i.ref=ye(t,l,a),i.return=t,t=i;break t}n(t,l);break}e(t,l),l=l.sibling}a.type===fr?(i=ee(a.props.children,t.mode,u,a.key),i.return=t,t=i):(u=te(a,t.mode,u),u.ref=ye(t,i,a),u.return=t,t=u)}return s(t);case pr:t:{for(l=a.key;null!==i;){if(i.key===l){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(t,i.sibling),i=o(i,a.children||[],u),i.return=t,t=i;break t}n(t,i);break}e(t,i),i=i.sibling}i=re(a,t.mode,u),i.return=t,t=i}return s(t)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==i&&6===i.tag?(n(t,i.sibling),i=o(i,a,u),i.return=t,t=i):(n(t,i),i=ne(a,t.mode,u),i.return=t,t=i),s(t);if(yi(a))return m(t,i,a,u);if(rt(a))return y(t,i,a,u);if(l&&ve(t,a),"undefined"===typeof a)switch(t.tag){case 2:case 1:u=t.type,r("152",u.displayName||u.name||"Component")}return n(t,i)}}function _e(t,e,n,i,o,a,s){function u(t,e,n){l(t,e,n,e.expirationTime)}function l(t,e,n,r){e.child=null===t?gi(e,null,n,r):vi(e,t.child,n,r)}function c(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.effectTag|=128)}function p(t,e,n,r,i,o){if(c(t,e),!n&&!i)return r&&C(e,!1),m(t,e);n=e.stateNode,ar.current=e;var a=i?null:n.render();return e.effectTag|=1,i&&(l(t,e,null,o),e.child=null),l(t,e,a,o),e.memoizedState=n.state,e.memoizedProps=n.props,r&&C(e,!0),e.child}function f(t){var e=t.stateNode;e.pendingContext?T(t,e.pendingContext,e.pendingContext!==e.context):e.context&&T(t,e.context,!1),_(t,e.containerInfo)}function h(t,e,n,r){var i=t.child;for(null!==i&&(i.return=t);null!==i;){switch(i.tag){case 12:var o=0|i.stateNode;if(i.type===e&&0!==(o&n)){for(o=i;null!==o;){var a=o.alternate;if(0===o.expirationTime||o.expirationTime>r)o.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}o=o.return}o=null}else o=i.child;break;case 13:o=i.type===t.type?null:i.child;break;default:o=i.child}if(null!==o)o.return=i;else for(o=i;null!==o;){if(o===t){o=null;break}if(null!==(i=o.sibling)){o=i;break}o=o.return}i=o}}function d(t,e,n){var r=e.type._context,i=e.pendingProps,o=e.memoizedProps;if(!E()&&o===i)return e.stateNode=0,b(e),m(t,e);var a=i.value;if(e.memoizedProps=i,null===o)a=1073741823;else if(o.value===i.value){if(o.children===i.children)return e.stateNode=0,b(e),m(t,e);a=0}else{var s=o.value;if(s===a&&(0!==s||1/s===1/a)||s!==s&&a!==a){if(o.children===i.children)return e.stateNode=0,b(e),m(t,e);a=0}else if(a="function"===typeof r._calculateChangedBits?r._calculateChangedBits(s,a):1073741823,0===(a|=0)){if(o.children===i.children)return e.stateNode=0,b(e),m(t,e)}else h(e,r,a,n)}return e.stateNode=a,b(e),u(t,e,i.children),e.child}function m(t,e){if(null!==t&&e.child!==t.child&&r("153"),null!==e.child){t=e.child;var n=Qt(t,t.pendingProps,t.expirationTime);for(e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,n=n.sibling=Qt(t,t.pendingProps,t.expirationTime),n.return=e;n.sibling=null}return e.child}var y=t.shouldSetTextContent,v=t.shouldDeprioritizeSubtree,g=e.pushHostContext,_=e.pushHostContainer,b=i.pushProvider,x=n.getMaskedContext,w=n.getUnmaskedContext,E=n.hasContextChanged,S=n.pushContextProvider,T=n.pushTopLevelContextObject,C=n.invalidateContextProvider,A=o.enterHydrationState,O=o.resetHydrationState,k=o.tryToClaimNextHydratableInstance;t=me(n,a,s,function(t,e){t.memoizedProps=e},function(t,e){t.memoizedState=e});var I=t.adoptClassInstance,P=t.callGetDerivedStateFromProps,z=t.constructClassInstance,R=t.mountClassInstance,M=t.resumeMountClassInstance,j=t.updateClassInstance;return{beginWork:function(t,e,n){if(0===e.expirationTime||e.expirationTime>n){switch(e.tag){case 3:f(e);break;case 2:S(e);break;case 4:_(e,e.stateNode.containerInfo);break;case 13:b(e)}return null}switch(e.tag){case 0:null!==t&&r("155");var i=e.type,o=e.pendingProps,a=w(e);return a=x(e,a),i=i(o,a),e.effectTag|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(a=e.type,e.tag=2,e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,"function"===typeof a.getDerivedStateFromProps&&null!==(o=P(e,i,o,e.memoizedState))&&void 0!==o&&(e.memoizedState=fn({},e.memoizedState,o)),o=S(e),I(e,i),R(e,n),t=p(t,e,!0,o,!1,n)):(e.tag=1,u(t,e,i),e.memoizedProps=o,t=e.child),t;case 1:return o=e.type,n=e.pendingProps,E()||e.memoizedProps!==n?(i=w(e),i=x(e,i),o=o(n,i),e.effectTag|=1,u(t,e,o),e.memoizedProps=n,t=e.child):t=m(t,e),t;case 2:o=S(e),null===t?null===e.stateNode?(z(e,e.pendingProps),R(e,n),i=!0):i=M(e,n):i=j(t,e,n),a=!1;var s=e.updateQueue;return null!==s&&null!==s.capturedValues&&(a=i=!0),p(t,e,i,o,a,n);case 3:t:if(f(e),null!==(i=e.updateQueue)){if(a=e.memoizedState,o=he(t,e,i,null,null,n),e.memoizedState=o,null!==(i=e.updateQueue)&&null!==i.capturedValues)i=null;else{if(a===o){O(),t=m(t,e);break t}i=o.element}a=e.stateNode,(null===t||null===t.child)&&a.hydrate&&A(e)?(e.effectTag|=2,e.child=gi(e,null,i,n)):(O(),u(t,e,i)),e.memoizedState=o,t=e.child}else O(),t=m(t,e);return t;case 5:return g(e),null===t&&k(e),o=e.type,s=e.memoizedProps,i=e.pendingProps,a=null!==t?t.memoizedProps:null,E()||s!==i||((s=1&e.mode&&v(o,i))&&(e.expirationTime=1073741823),s&&1073741823===n)?(s=i.children,y(o,i)?s=null:a&&y(o,a)&&(e.effectTag|=16),c(t,e),1073741823!==n&&1&e.mode&&v(o,i)?(e.expirationTime=1073741823,e.memoizedProps=i,t=null):(u(t,e,s),e.memoizedProps=i,t=e.child)):t=m(t,e),t;case 6:return null===t&&k(e),e.memoizedProps=e.pendingProps,null;case 8:e.tag=7;case 7:return o=e.pendingProps,E()||e.memoizedProps!==o||(o=e.memoizedProps),i=o.children,e.stateNode=null===t?gi(e,e.stateNode,i,n):vi(e,t.stateNode,i,n),e.memoizedProps=o,e.stateNode;case 9:return null;case 4:return _(e,e.stateNode.containerInfo),o=e.pendingProps,E()||e.memoizedProps!==o?(null===t?e.child=vi(e,null,o,n):u(t,e,o),e.memoizedProps=o,t=e.child):t=m(t,e),t;case 14:return n=e.type.render,n=n(e.pendingProps,e.ref),u(t,e,n),e.memoizedProps=n,e.child;case 10:return n=e.pendingProps,E()||e.memoizedProps!==n?(u(t,e,n),e.memoizedProps=n,t=e.child):t=m(t,e),t;case 11:return n=e.pendingProps.children,E()||null!==n&&e.memoizedProps!==n?(u(t,e,n),e.memoizedProps=n,t=e.child):t=m(t,e),t;case 13:return d(t,e,n);case 12:t:{i=e.type,a=e.pendingProps,s=e.memoizedProps,o=i._currentValue;var l=i._changedBits;if(E()||0!==l||s!==a){e.memoizedProps=a;var T=a.unstable_observedBits;if(void 0!==T&&null!==T||(T=1073741823),e.stateNode=T,0!==(l&T))h(e,i,l,n);else if(s===a){t=m(t,e);break t}n=a.children,n=n(o),u(t,e,n),t=e.child}else t=m(t,e)}return t;default:r("156")}}}}function be(t,e,n,i,o){function a(t){t.effectTag|=4}var s=t.createInstance,u=t.createTextInstance,l=t.appendInitialChild,c=t.finalizeInitialChildren,p=t.prepareUpdate,f=t.persistence,h=e.getRootHostContainer,d=e.popHostContext,m=e.getHostContext,y=e.popHostContainer,v=n.popContextProvider,g=n.popTopLevelContextObject,_=i.popProvider,b=o.prepareToHydrateHostInstance,x=o.prepareToHydrateHostTextInstance,w=o.popHydrationState,E=void 0,S=void 0,T=void 0;return t.mutation?(E=function(){},S=function(t,e,n){(e.updateQueue=n)&&a(e)},T=function(t,e,n,r){n!==r&&a(e)}):r(f?"235":"236"),{completeWork:function(t,e,n){var i=e.pendingProps;switch(e.tag){case 1:return null;case 2:return v(e),t=e.stateNode,i=e.updateQueue,null!==i&&null!==i.capturedValues&&(e.effectTag&=-65,"function"===typeof t.componentDidCatch?e.effectTag|=256:i.capturedValues=null),null;case 3:return y(e),g(e),i=e.stateNode,i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==t&&null!==t.child||(w(e),e.effectTag&=-3),E(e),t=e.updateQueue,null!==t&&null!==t.capturedValues&&(e.effectTag|=256),null;case 5:d(e),n=h();var o=e.type;if(null!==t&&null!=e.stateNode){var f=t.memoizedProps,C=e.stateNode,A=m();C=p(C,o,f,i,n,A),S(t,e,C,o,f,i,n,A),t.ref!==e.ref&&(e.effectTag|=128)}else{if(!i)return null===e.stateNode&&r("166"),null;if(t=m(),w(e))b(e,n,t)&&a(e);else{f=s(o,i,n,t,e);t:for(A=e.child;null!==A;){if(5===A.tag||6===A.tag)l(f,A.stateNode);else if(4!==A.tag&&null!==A.child){A.child.return=A,A=A.child;continue}if(A===e)break;for(;null===A.sibling;){if(null===A.return||A.return===e)break t;A=A.return}A.sibling.return=A.return,A=A.sibling}c(f,o,i,n,t)&&a(e),e.stateNode=f}null!==e.ref&&(e.effectTag|=128)}return null;case 6:if(t&&null!=e.stateNode)T(t,e,t.memoizedProps,i);else{if("string"!==typeof i)return null===e.stateNode&&r("166"),null;t=h(),n=m(),w(e)?x(e)&&a(e):e.stateNode=u(i,t,n,e)}return null;case 7:(i=e.memoizedProps)||r("165"),e.tag=8,o=[];t:for((f=e.stateNode)&&(f.return=e);null!==f;){if(5===f.tag||6===f.tag||4===f.tag)r("247");else if(9===f.tag)o.push(f.pendingProps.value);else if(null!==f.child){f.child.return=f,f=f.child;continue}for(;null===f.sibling;){if(null===f.return||f.return===e)break t;f=f.return}f.sibling.return=f.return,f=f.sibling}return f=i.handler,i=f(i.props,o),e.child=vi(e,null!==t?t.child:null,i,n),e.child;case 8:return e.tag=7,null;case 9:case 14:case 10:case 11:return null;case 4:return y(e),E(e),null;case 13:return _(e),null;case 12:return null;case 0:r("167");default:r("156")}}}}function xe(t,e,n,r,i){var o=t.popHostContainer,a=t.popHostContext,s=e.popContextProvider,u=e.popTopLevelContextObject,l=n.popProvider;return{throwException:function(t,e,n){e.effectTag|=512,e.firstEffect=e.lastEffect=null,e={value:n,source:e,stack:ot(e)};do{switch(t.tag){case 3:return ce(t),t.updateQueue.capturedValues=[e],void(t.effectTag|=1024);case 2:if(n=t.stateNode,0===(64&t.effectTag)&&null!==n&&"function"===typeof n.componentDidCatch&&!i(n)){ce(t),n=t.updateQueue;var r=n.capturedValues;return null===r?n.capturedValues=[e]:r.push(e),void(t.effectTag|=1024)}}t=t.return}while(null!==t)},unwindWork:function(t){switch(t.tag){case 2:s(t);var e=t.effectTag;return 1024&e?(t.effectTag=-1025&e|64,t):null;case 3:return o(t),u(t),e=t.effectTag,1024&e?(t.effectTag=-1025&e|64,t):null;case 5:return a(t),null;case 4:return o(t),null;case 13:return l(t),null;default:return null}},unwindInterruptedWork:function(t){switch(t.tag){case 2:s(t);break;case 3:o(t),u(t);break;case 5:a(t);break;case 4:o(t);break;case 13:l(t)}}}}function we(t,e){var n=e.source;null===e.stack&&ot(n),null!==n&&it(n),e=e.value,null!==t&&2===t.tag&&it(t);try{e&&e.suppressReactErrorLogging||console.error(e)}catch(t){t&&t.suppressReactErrorLogging||console.error(t)}}function Ee(t,e,n,i,o){function a(t){var n=t.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(n){e(t,n)}else n.current=null}function s(t){switch("function"===typeof se&&se(t),t.tag){case 2:a(t);var n=t.stateNode;if("function"===typeof n.componentWillUnmount)try{n.props=t.memoizedProps,n.state=t.memoizedState,n.componentWillUnmount()}catch(n){e(t,n)}break;case 5:a(t);break;case 7:u(t.stateNode);break;case 4:f&&c(t)}}function u(t){for(var e=t;;)if(s(e),null===e.child||f&&4===e.tag){if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return;e=e.return}e.sibling.return=e.return,e=e.sibling}else e.child.return=e,e=e.child}function l(t){return 5===t.tag||3===t.tag||4===t.tag}function c(t){for(var e=t,n=!1,i=void 0,o=void 0;;){if(!n){n=e.return;t:for(;;){switch(null===n&&r("160"),n.tag){case 5:i=n.stateNode,o=!1;break t;case 3:case 4:i=n.stateNode.containerInfo,o=!0;break t}n=n.return}n=!0}if(5===e.tag||6===e.tag)u(e),o?w(i,e.stateNode):x(i,e.stateNode);else if(4===e.tag?i=e.stateNode.containerInfo:s(e),null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return;e=e.return,4===e.tag&&(n=!1)}e.sibling.return=e.return,e=e.sibling}}var p=t.getPublicInstance,f=t.mutation;t=t.persistence,f||r(t?"235":"236");var h=f.commitMount,d=f.commitUpdate,m=f.resetTextContent,y=f.commitTextUpdate,v=f.appendChild,g=f.appendChildToContainer,_=f.insertBefore,b=f.insertInContainerBefore,x=f.removeChild,w=f.removeChildFromContainer;return{commitBeforeMutationLifeCycles:function(t,e){switch(e.tag){case 2:if(2048&e.effectTag&&null!==t){var n=t.memoizedProps,i=t.memoizedState;t=e.stateNode,t.props=e.memoizedProps,t.state=e.memoizedState,e=t.getSnapshotBeforeUpdate(n,i),t.__reactInternalSnapshotBeforeUpdate=e}break;case 3:case 5:case 6:case 4:break;default:r("163")}},commitResetTextContent:function(t){m(t.stateNode)},commitPlacement:function(t){t:{for(var e=t.return;null!==e;){if(l(e)){var n=e;break t}e=e.return}r("160"),n=void 0}var i=e=void 0;switch(n.tag){case 5:e=n.stateNode,i=!1;break;case 3:case 4:e=n.stateNode.containerInfo,i=!0;break;default:r("161")}16&n.effectTag&&(m(e),n.effectTag&=-17);t:e:for(n=t;;){for(;null===n.sibling;){if(null===n.return||l(n.return)){n=null;break t}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue e;if(null===n.child||4===n.tag)continue e;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break t}}for(var o=t;;){if(5===o.tag||6===o.tag)n?i?b(e,o.stateNode,n):_(e,o.stateNode,n):i?g(e,o.stateNode):v(e,o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},commitDeletion:function(t){c(t),t.return=null,t.child=null,t.alternate&&(t.alternate.child=null,t.alternate.return=null)},commitWork:function(t,e){switch(e.tag){case 2:break;case 5:var n=e.stateNode;if(null!=n){var i=e.memoizedProps;t=null!==t?t.memoizedProps:i;var o=e.type,a=e.updateQueue;e.updateQueue=null,null!==a&&d(n,a,o,t,i,e)}break;case 6:null===e.stateNode&&r("162"),n=e.memoizedProps,y(e.stateNode,null!==t?t.memoizedProps:n,n);break;case 3:break;default:r("163")}},commitLifeCycles:function(t,e,n){switch(n.tag){case 2:if(t=n.stateNode,4&n.effectTag)if(null===e)t.props=n.memoizedProps,t.state=n.memoizedState,t.componentDidMount();else{var i=e.memoizedProps;e=e.memoizedState,t.props=n.memoizedProps,t.state=n.memoizedState,t.componentDidUpdate(i,e,t.__reactInternalSnapshotBeforeUpdate)}n=n.updateQueue,null!==n&&de(n,t);break;case 3:if(null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 5:t=p(n.child.stateNode);break;case 2:t=n.child.stateNode}de(e,t)}break;case 5:t=n.stateNode,null===e&&4&n.effectTag&&h(t,n.type,n.memoizedProps,n);break;case 6:case 4:break;default:r("163")}},commitErrorLogging:function(t,e){switch(t.tag){case 2:var n=t.type;e=t.stateNode;var i=t.updateQueue;(null===i||null===i.capturedValues)&&r("264");var a=i.capturedValues;for(i.capturedValues=null,"function"!==typeof n.getDerivedStateFromCatch&&o(e),e.props=t.memoizedProps,e.state=t.memoizedState,n=0;n<a.length;n++){i=a[n];var s=i.value,u=i.stack;we(t,i),e.componentDidCatch(s,{componentStack:null!==u?u:""})}break;case 3:for(n=t.updateQueue,(null===n||null===n.capturedValues)&&r("264"),a=n.capturedValues,n.capturedValues=null,n=0;n<a.length;n++)i=a[n],we(t,i),e(i.value);break;default:r("265")}},commitAttachRef:function(t){var e=t.ref;if(null!==e){var n=t.stateNode;switch(t.tag){case 5:t=p(n);break;default:t=n}"function"===typeof e?e(t):e.current=t}},commitDetachRef:function(t){null!==(t=t.ref)&&("function"===typeof t?t(null):t.current=null)}}}function Se(t,e){function n(t){return t===_i&&r("174"),t}var i=t.getChildHostContext,o=t.getRootHostContext;t=e.createCursor;var a=e.push,s=e.pop,u=t(_i),l=t(_i),c=t(_i);return{getHostContext:function(){return n(u.current)},getRootHostContainer:function(){return n(c.current)},popHostContainer:function(t){s(u,t),s(l,t),s(c,t)},popHostContext:function(t){l.current===t&&(s(u,t),s(l,t))},pushHostContainer:function(t,e){a(c,e,t),a(l,t,t),a(u,_i,t),e=o(e),s(u,t),a(u,e,t)},pushHostContext:function(t){var e=n(c.current),r=n(u.current);e=i(r,t.type,e),r!==e&&(a(l,t,t),a(u,e,t))}}}function Te(t){function e(t,e){var n=new Jt(5,null,null,0);n.type="DELETED",n.stateNode=e,n.return=t,n.effectTag=8,null!==t.lastEffect?(t.lastEffect.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n}function n(t,e){switch(t.tag){case 5:return null!==(e=a(e,t.type,t.pendingProps))&&(t.stateNode=e,!0);case 6:return null!==(e=s(e,t.pendingProps))&&(t.stateNode=e,!0);default:return!1}}function i(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag;)t=t.return;f=t}var o=t.shouldSetTextContent;if(!(t=t.hydration))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){r("175")},prepareToHydrateHostTextInstance:function(){r("176")},popHydrationState:function(){return!1}};var a=t.canHydrateInstance,s=t.canHydrateTextInstance,u=t.getNextHydratableSibling,l=t.getFirstHydratableChild,c=t.hydrateInstance,p=t.hydrateTextInstance,f=null,h=null,d=!1;return{enterHydrationState:function(t){return h=l(t.stateNode.containerInfo),f=t,d=!0},resetHydrationState:function(){h=f=null,d=!1},tryToClaimNextHydratableInstance:function(t){if(d){var r=h;if(r){if(!n(t,r)){if(!(r=u(r))||!n(t,r))return t.effectTag|=2,d=!1,void(f=t);e(f,h)}f=t,h=l(r)}else t.effectTag|=2,d=!1,f=t}},prepareToHydrateHostInstance:function(t,e,n){return e=c(t.stateNode,t.type,t.memoizedProps,e,n,t),t.updateQueue=e,null!==e},prepareToHydrateHostTextInstance:function(t){return p(t.stateNode,t.memoizedProps,t)},popHydrationState:function(t){if(t!==f)return!1;if(!d)return i(t),d=!0,!1;var n=t.type;if(5!==t.tag||"head"!==n&&"body"!==n&&!o(n,t.memoizedProps))for(n=h;n;)e(t,n),n=u(n);return i(t),h=f?u(t.stateNode):null,!0}}}function Ce(t){function e(t,e,n){t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=n}function n(t){return 2===t.tag&&null!=t.type.childContextTypes}function i(t,e){var n=t.stateNode,i=t.type.childContextTypes;if("function"!==typeof n.getChildContext)return e;n=n.getChildContext();for(var o in n)o in i||r("108",it(t)||"Unknown",o);return fn({},e,n)}var o=t.createCursor,a=t.push,s=t.pop,u=o(vn),l=o(!1),c=vn;return{getUnmaskedContext:function(t){return n(t)?c:u.current},cacheContext:e,getMaskedContext:function(t,n){var r=t.type.contextTypes;if(!r)return vn;var i=t.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===n)return i.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in r)a[o]=n[o];return i&&e(t,n,a),a},hasContextChanged:function(){return l.current},isContextConsumer:function(t){return 2===t.tag&&null!=t.type.contextTypes},isContextProvider:n,popContextProvider:function(t){n(t)&&(s(l,t),s(u,t))},popTopLevelContextObject:function(t){s(l,t),s(u,t)},pushTopLevelContextObject:function(t,e,n){null!=u.cursor&&r("168"),a(u,e,t),a(l,n,t)},processChildContext:i,pushContextProvider:function(t){if(!n(t))return!1;var e=t.stateNode;return e=e&&e.__reactInternalMemoizedMergedChildContext||vn,c=u.current,a(u,e,t),a(l,l.current,t),!0},invalidateContextProvider:function(t,e){var n=t.stateNode;if(n||r("169"),e){var o=i(t,c);n.__reactInternalMemoizedMergedChildContext=o,s(l,t),s(u,t),a(u,o,t)}else s(l,t);a(l,e,t)},findCurrentUnmaskedContext:function(t){for(2!==Pt(t)||2!==t.tag?r("170"):void 0;3!==t.tag;){if(n(t))return t.stateNode.__reactInternalMemoizedMergedChildContext;(t=t.return)||r("171")}return t.stateNode.context}}}function Ae(t){var e=t.createCursor,n=t.push,r=t.pop,i=e(null),o=e(null),a=e(0);return{pushProvider:function(t){var e=t.type._context;n(a,e._changedBits,t),n(o,e._currentValue,t),n(i,t,t),e._currentValue=t.pendingProps.value,e._changedBits=t.stateNode},popProvider:function(t){var e=a.current,n=o.current;r(i,t),r(o,t),r(a,t),t=t.type._context,t._currentValue=n,t._changedBits=e}}}function Oe(){var t=[],e=-1;return{createCursor:function(t){return{current:t}},isEmpty:function(){return-1===e},pop:function(n){0>e||(n.current=t[e],t[e]=null,e--)},push:function(n,r){e++,t[e]=n.current,n.current=r},checkThatStackIsEmpty:function(){},resetStackAfterFatalErrorInDev:function(){}}}function ke(t){function e(){if(null!==Q)for(var t=Q.return;null!==t;)z(t),t=t.return;tt=null,et=0,Q=null,it=!1}function n(t){return null!==at&&at.has(t)}function i(t){for(;;){var e=t.alternate,n=t.return,r=t.sibling;if(0===(512&t.effectTag)){e=k(e,t,et);var i=t;if(1073741823===et||1073741823!==i.expirationTime){t:switch(i.tag){case 3:case 2:var o=i.updateQueue;o=null===o?0:o.expirationTime;break t;default:o=0}for(var a=i.child;null!==a;)0!==a.expirationTime&&(0===o||o>a.expirationTime)&&(o=a.expirationTime),a=a.sibling;i.expirationTime=o}if(null!==e)return e;if(null!==n&&0===(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=t.firstEffect),n.lastEffect=t.lastEffect),1<t.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=t:n.firstEffect=t,n.lastEffect=t)),null!==r)return r;if(null===n){it=!0;break}t=n}else{if(null!==(t=P(t)))return t.effectTag&=2559,t;if(null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=512),null!==r)return r;if(null===n)break;t=n}}return null}function o(t){var e=O(t.alternate,t,et);return null===e&&(e=i(t)),ar.current=null,e}function a(t,n,a){J&&r("243"),J=!0,n===et&&t===tt&&null!==Q||(e(),tt=t,et=n,Q=Qt(tt.current,null,et),t.pendingCommitExpirationTime=0);for(var s=!1;;){try{if(a)for(;null!==Q&&!w();)Q=o(Q);else for(;null!==Q;)Q=o(Q)}catch(t){if(null===Q){s=!0,E(t);break}a=Q;var u=a.return;if(null===u){s=!0,E(t);break}I(u,a,t),Q=i(a)}break}return J=!1,s||null!==Q?null:it?(t.pendingCommitExpirationTime=n,t.current.alternate):void r("262")}function s(t,e,n,r){t={value:n,source:t,stack:ot(t)},pe(e,{expirationTime:r,partialState:null,callback:null,isReplace:!1,isForced:!1,capturedValue:t,next:null}),c(e,r)}function u(t,e){t:{J&&!rt&&r("263");for(var i=t.return;null!==i;){switch(i.tag){case 2:var o=i.stateNode;if("function"===typeof i.type.getDerivedStateFromCatch||"function"===typeof o.componentDidCatch&&!n(o)){s(t,i,e,1),t=void 0;break t}break;case 3:s(t,i,e,1),t=void 0;break t}i=i.return}3===t.tag&&s(t,t,e,1),t=void 0}return t}function l(t){return t=0!==Y?Y:J?rt?1:et:1&t.mode?xt?10*(1+((p()+15)/10|0)):25*(1+((p()+500)/25|0)):1,xt&&(0===dt||t>dt)&&(dt=t),t}function c(t,n){t:{for(;null!==t;){if((0===t.expirationTime||t.expirationTime>n)&&(t.expirationTime=n),null!==t.alternate&&(0===t.alternate.expirationTime||t.alternate.expirationTime>n)&&(t.alternate.expirationTime=n),null===t.return){if(3!==t.tag){n=void 0;break t}var i=t.stateNode;!J&&0!==et&&n<et&&e(),J&&!rt&&tt===i||d(i,n),St>Et&&r("185")}t=t.return}n=void 0}return n}function p(){return K=U()-G,H=2+(K/10|0)}function f(t,e,n,r,i){var o=Y;Y=1;try{return t(e,n,r,i)}finally{Y=o}}function h(t){if(0!==lt){if(t>lt)return;W(ct)}var e=U()-G;lt=t,ct=q(y,{timeout:10*(t-2)-e})}function d(t,e){if(null===t.nextScheduledRoot)t.remainingExpirationTime=e,null===ut?(st=ut=t,t.nextScheduledRoot=t):(ut=ut.nextScheduledRoot=t,ut.nextScheduledRoot=st);else{var n=t.remainingExpirationTime;(0===n||e<n)&&(t.remainingExpirationTime=e)}pt||(_t?bt&&(ft=t,ht=1,b(t,1,!1)):1===e?v():h(e))}function m(){var t=0,e=null;if(null!==ut)for(var n=ut,i=st;null!==i;){var o=i.remainingExpirationTime;if(0===o){if((null===n||null===ut)&&r("244"),i===i.nextScheduledRoot){st=ut=i.nextScheduledRoot=null;break}if(i===st)st=o=i.nextScheduledRoot,ut.nextScheduledRoot=o,i.nextScheduledRoot=null;else{if(i===ut){ut=n,ut.nextScheduledRoot=st,i.nextScheduledRoot=null;break}n.nextScheduledRoot=i.nextScheduledRoot,i.nextScheduledRoot=null}i=n.nextScheduledRoot}else{if((0===t||o<t)&&(t=o,e=i),i===ut)break;n=i,i=i.nextScheduledRoot}}n=ft,null!==n&&n===e&&1===t?St++:St=0,ft=e,ht=t}function y(t){g(0,!0,t)}function v(){g(1,!1,null)}function g(t,e,n){if(gt=n,m(),e)for(;null!==ft&&0!==ht&&(0===t||t>=ht)&&(!mt||p()>=ht);)b(ft,ht,!mt),m();else for(;null!==ft&&0!==ht&&(0===t||t>=ht);)b(ft,ht,!1),m();null!==gt&&(lt=0,ct=-1),0!==ht&&h(ht),gt=null,mt=!1,_()}function _(){if(St=0,null!==wt){var t=wt;wt=null;for(var e=0;e<t.length;e++){var n=t[e];try{n._onComplete()}catch(t){yt||(yt=!0,vt=t)}}}if(yt)throw t=vt,vt=null,yt=!1,t}function b(t,e,n){pt&&r("245"),pt=!0,n?(n=t.finishedWork,null!==n?x(t,n,e):(t.finishedWork=null,null!==(n=a(t,e,!0))&&(w()?t.finishedWork=n:x(t,n,e)))):(n=t.finishedWork,null!==n?x(t,n,e):(t.finishedWork=null,null!==(n=a(t,e,!1))&&x(t,n,e))),pt=!1}function x(t,e,n){var i=t.firstBatch;if(null!==i&&i._expirationTime<=n&&(null===wt?wt=[i]:wt.push(i),i._defer))return t.finishedWork=e,void(t.remainingExpirationTime=0);t.finishedWork=null,rt=J=!0,n=e.stateNode,n.current===e&&r("177"),i=n.pendingCommitExpirationTime,0===i&&r("261"),n.pendingCommitExpirationTime=0;var o=p();if(ar.current=null,1<e.effectTag)if(null!==e.lastEffect){e.lastEffect.nextEffect=e;var a=e.firstEffect}else a=e;else a=e.firstEffect;for($(n.containerInfo),nt=a;null!==nt;){var s=!1,l=void 0;try{for(;null!==nt;)2048&nt.effectTag&&R(nt.alternate,nt),nt=nt.nextEffect}catch(t){s=!0,l=t}s&&(null===nt&&r("178"),u(nt,l),null!==nt&&(nt=nt.nextEffect))}for(nt=a;null!==nt;){s=!1,l=void 0;try{for(;null!==nt;){var c=nt.effectTag;if(16&c&&M(nt),128&c){var f=nt.alternate;null!==f&&V(f)}switch(14&c){case 2:j(nt),nt.effectTag&=-3;break;case 6:j(nt),nt.effectTag&=-3,L(nt.alternate,nt);break;case 4:L(nt.alternate,nt);break;case 8:D(nt)}nt=nt.nextEffect}}catch(t){s=!0,l=t}s&&(null===nt&&r("178"),u(nt,l),null!==nt&&(nt=nt.nextEffect))}for(Z(n.containerInfo),n.current=e,nt=a;null!==nt;){c=!1,f=void 0;try{for(a=n,s=o,l=i;null!==nt;){var h=nt.effectTag;36&h&&F(a,nt.alternate,nt,s,l),256&h&&B(nt,E),128&h&&N(nt);var d=nt.nextEffect;nt.nextEffect=null,nt=d}}catch(t){c=!0,f=t}c&&(null===nt&&r("178"),u(nt,f),null!==nt&&(nt=nt.nextEffect))}J=rt=!1,"function"===typeof ae&&ae(e.stateNode),e=n.current.expirationTime,0===e&&(at=null),t.remainingExpirationTime=e}function w(){return!(null===gt||gt.timeRemaining()>Tt)&&(mt=!0)}function E(t){null===ft&&r("246"),ft.remainingExpirationTime=0,yt||(yt=!0,vt=t)}var S=Oe(),T=Se(t,S),C=Ce(S);S=Ae(S);var A=Te(t),O=_e(t,T,C,S,A,c,l).beginWork,k=be(t,T,C,S,A).completeWork;T=xe(T,C,S,c,n);var I=T.throwException,P=T.unwindWork,z=T.unwindInterruptedWork;T=Ee(t,u,c,l,function(t){null===at?at=new Set([t]):at.add(t)},p);var R=T.commitBeforeMutationLifeCycles,M=T.commitResetTextContent,j=T.commitPlacement,D=T.commitDeletion,L=T.commitWork,F=T.commitLifeCycles,B=T.commitErrorLogging,N=T.commitAttachRef,V=T.commitDetachRef,U=t.now,q=t.scheduleDeferredCallback,W=t.cancelDeferredCallback,$=t.prepareForCommit,Z=t.resetAfterCommit,G=U(),H=2,K=G,X=0,Y=0,J=!1,Q=null,tt=null,et=0,nt=null,rt=!1,it=!1,at=null,st=null,ut=null,lt=0,ct=-1,pt=!1,ft=null,ht=0,dt=0,mt=!1,yt=!1,vt=null,gt=null,_t=!1,bt=!1,xt=!1,wt=null,Et=1e3,St=0,Tt=1;return{recalculateCurrentTime:p,computeExpirationForFiber:l,scheduleWork:c,requestWork:d,flushRoot:function(t,e){pt&&r("253"),ft=t,ht=e,b(t,e,!1),v(),_()},batchedUpdates:function(t,e){var n=_t;_t=!0;try{return t(e)}finally{(_t=n)||pt||v()}},unbatchedUpdates:function(t,e){if(_t&&!bt){bt=!0;try{return t(e)}finally{bt=!1}}return t(e)},flushSync:function(t,e){pt&&r("187");var n=_t;_t=!0;try{return f(t,e)}finally{_t=n,v()}},flushControlled:function(t){var e=_t;_t=!0;try{f(t)}finally{(_t=e)||pt||g(1,!1,null)}},deferredUpdates:function(t){var e=Y;Y=25*(1+((p()+500)/25|0));try{return t()}finally{Y=e}},syncUpdates:f,interactiveUpdates:function(t,e,n){if(xt)return t(e,n);_t||pt||0===dt||(g(dt,!1,null),dt=0);var r=xt,i=_t;_t=xt=!0;try{return t(e,n)}finally{xt=r,(_t=i)||pt||v()}},flushInteractiveUpdates:function(){pt||0===dt||(g(dt,!1,null),dt=0)},computeUniqueAsyncExpiration:function(){var t=25*(1+((p()+500)/25|0));return t<=X&&(t=X+1),X=t},legacyContext:C}}function Ie(t){function e(t,e,n,r,i,o){if(r=e.current,n){n=n._reactInternalFiber;var s=u(n);n=l(n)?c(n,s):s}else n=vn;return null===e.context?e.context=n:e.pendingContext=n,e=o,pe(r,{expirationTime:i,partialState:{element:t},callback:void 0===e?null:e,isReplace:!1,isForced:!1,capturedValue:null,next:null}),a(r,i),i}var n=t.getPublicInstance;t=ke(t);var i=t.recalculateCurrentTime,o=t.computeExpirationForFiber,a=t.scheduleWork,s=t.legacyContext,u=s.findCurrentUnmaskedContext,l=s.isContextProvider,c=s.processChildContext;return{createContainer:function(t,e,n){return e=new Jt(3,null,null,e?3:0),t={current:e,containerInfo:t,pendingChildren:null,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},e.stateNode=t},updateContainer:function(t,n,r,a){var s=n.current,u=i();return s=o(s),e(t,n,r,u,s,a)},updateContainerAtExpirationTime:function(t,n,r,o,a){return e(t,n,r,i(),o,a)},flushRoot:t.flushRoot,requestWork:t.requestWork,computeUniqueAsyncExpiration:t.computeUniqueAsyncExpiration,batchedUpdates:t.batchedUpdates,unbatchedUpdates:t.unbatchedUpdates,deferredUpdates:t.deferredUpdates,syncUpdates:t.syncUpdates,interactiveUpdates:t.interactiveUpdates,flushInteractiveUpdates:t.flushInteractiveUpdates,flushControlled:t.flushControlled,flushSync:t.flushSync,getPublicRootInstance:function(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return n(t.child.stateNode);default:return t.child.stateNode}},findHostInstance:function(t){var e=t._reactInternalFiber;return void 0===e&&("function"===typeof t.render?r("188"):r("268",Object.keys(t))),t=jt(e),null===t?null:t.stateNode},findHostInstanceWithNoPortals:function(t){return t=Dt(t),null===t?null:t.stateNode},injectIntoDevTools:function(t){var e=t.findFiberByHostInstance;return oe(fn({},t,{findHostInstanceByFiber:function(t){return t=jt(t),null===t?null:t.stateNode},findFiberByHostInstance:function(t){return e?e(t):null}}))}}}function Pe(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:pr,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}function ze(t){var e="";return cn.Children.forEach(t,function(t){null==t||"string"!==typeof t&&"number"!==typeof t||(e+=t)}),e}function Re(t,e){return t=fn({children:void 0},e),(e=ze(e.children))&&(t.children=e),t}function Me(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+n,e=null,i=0;i<t.length;i++){if(t[i].value===n)return t[i].selected=!0,void(r&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function je(t,e){var n=e.value;t._wrapperState={initialValue:null!=n?n:e.defaultValue,wasMultiple:!!e.multiple}}function De(t,e){return null!=e.dangerouslySetInnerHTML&&r("91"),fn({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Le(t,e){var n=e.value;null==n&&(n=e.defaultValue,e=e.children,null!=e&&(null!=n&&r("92"),Array.isArray(e)&&(1>=e.length||r("93"),e=e[0]),n=""+e),null==n&&(n="")),t._wrapperState={initialValue:""+n}}function Fe(t,e){var n=e.value;null!=n&&(n=""+n,n!==t.value&&(t.value=n),null==e.defaultValue&&(t.defaultValue=n)),null!=e.defaultValue&&(t.defaultValue=e.defaultValue)}function Be(t){var e=t.textContent;e===t._wrapperState.initialValue&&(t.value=e)}function Ne(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ve(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?Ne(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}function Ue(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}function qe(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,o=e[n];i=null==o||"boolean"===typeof o||""===o?"":r||"number"!==typeof o||0===o||Ni.hasOwnProperty(i)&&Ni[i]?(""+o).trim():o+"px","float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}function We(t,e,n){e&&(Ui[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML)&&r("137",t,n()),null!=e.dangerouslySetInnerHTML&&(null!=e.children&&r("60"),"object"===typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML||r("61")),null!=e.style&&"object"!==typeof e.style&&r("62",n()))}function $e(t,e){if(-1===t.indexOf("-"))return"string"===typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Ze(t,e){t=9===t.nodeType||11===t.nodeType?t:t.ownerDocument;var n=Gt(t);e=Sn[e];for(var r=0;r<e.length;r++){var i=e[r];n.hasOwnProperty(i)&&n[i]||("topScroll"===i?Ut("topScroll","scroll",t):"topFocus"===i||"topBlur"===i?(Ut("topFocus","focus",t),Ut("topBlur","blur",t),n.topBlur=!0,n.topFocus=!0):"topCancel"===i?(J("cancel",!0)&&Ut("topCancel","cancel",t),n.topCancel=!0):"topClose"===i?(J("close",!0)&&Ut("topClose","close",t),n.topClose=!0):ti.hasOwnProperty(i)&&Vt(i,ti[i],t),n[i]=!0)}}function Ge(t,e,n,r){return n=9===n.nodeType?n:n.ownerDocument,r===Li.html&&(r=Ne(t)),r===Li.html?"script"===t?(t=n.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):t="string"===typeof e.is?n.createElement(t,{is:e.is}):n.createElement(t):t=n.createElementNS(r,t),t}function He(t,e){return(9===e.nodeType?e:e.ownerDocument).createTextNode(t)}function Ke(t,e,n,r){var i=$e(e,n);switch(e){case"iframe":case"object":Vt("topLoad","load",t);var o=n;break;case"video":case"audio":for(o in ei)ei.hasOwnProperty(o)&&Vt(o,ei[o],t);o=n;break;case"source":Vt("topError","error",t),o=n;break;case"img":case"image":case"link":Vt("topError","error",t),Vt("topLoad","load",t),o=n;break;case"form":Vt("topReset","reset",t),Vt("topSubmit","submit",t),o=n;break;case"details":Vt("topToggle","toggle",t),o=n;break;case"input":ht(t,n),o=ft(t,n),Vt("topInvalid","invalid",t),Ze(r,"onChange");break;case"option":o=Re(t,n);break;case"select":je(t,n),o=fn({},n,{value:void 0}),Vt("topInvalid","invalid",t),Ze(r,"onChange");break;case"textarea":Le(t,n),o=De(t,n),Vt("topInvalid","invalid",t),Ze(r,"onChange");break;default:o=n}We(e,o,qi);var a,s=o;for(a in s)if(s.hasOwnProperty(a)){var u=s[a];"style"===a?qe(t,u,qi):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&Bi(t,u):"children"===a?"string"===typeof u?("textarea"!==e||""!==u)&&Ue(t,u):"number"===typeof u&&Ue(t,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(En.hasOwnProperty(a)?null!=u&&Ze(r,a):null!=u&&pt(t,a,u,i))}switch(e){case"input":et(t),yt(t,n);break;case"textarea":et(t),Be(t,n);break;case"option":null!=n.value&&t.setAttribute("value",n.value);break;case"select":t.multiple=!!n.multiple,e=n.value,null!=e?Me(t,!!n.multiple,e,!1):null!=n.defaultValue&&Me(t,!!n.multiple,n.defaultValue,!0);break;default:"function"===typeof o.onClick&&(t.onclick=hn)}}function Xe(t,e,n,r,i){var o=null;switch(e){case"input":n=ft(t,n),r=ft(t,r),o=[];break;case"option":n=Re(t,n),r=Re(t,r),o=[];break;case"select":n=fn({},n,{value:void 0}),r=fn({},r,{value:void 0}),o=[];break;case"textarea":n=De(t,n),r=De(t,r),o=[];break;default:"function"!==typeof n.onClick&&"function"===typeof r.onClick&&(t.onclick=hn)}We(e,r,qi),e=t=void 0;var a=null;for(t in n)if(!r.hasOwnProperty(t)&&n.hasOwnProperty(t)&&null!=n[t])if("style"===t){var s=n[t];for(e in s)s.hasOwnProperty(e)&&(a||(a={}),a[e]="")}else"dangerouslySetInnerHTML"!==t&&"children"!==t&&"suppressContentEditableWarning"!==t&&"suppressHydrationWarning"!==t&&"autoFocus"!==t&&(En.hasOwnProperty(t)?o||(o=[]):(o=o||[]).push(t,null));for(t in r){var u=r[t];if(s=null!=n?n[t]:void 0,r.hasOwnProperty(t)&&u!==s&&(null!=u||null!=s))if("style"===t)if(s){for(e in s)!s.hasOwnProperty(e)||u&&u.hasOwnProperty(e)||(a||(a={}),a[e]="");for(e in u)u.hasOwnProperty(e)&&s[e]!==u[e]&&(a||(a={}),a[e]=u[e])}else a||(o||(o=[]),o.push(t,a)),a=u;else"dangerouslySetInnerHTML"===t?(u=u?u.__html:void 0,s=s?s.__html:void 0,null!=u&&s!==u&&(o=o||[]).push(t,""+u)):"children"===t?s===u||"string"!==typeof u&&"number"!==typeof u||(o=o||[]).push(t,""+u):"suppressContentEditableWarning"!==t&&"suppressHydrationWarning"!==t&&(En.hasOwnProperty(t)?(null!=u&&Ze(i,t),o||s===u||(o=[])):(o=o||[]).push(t,u))}return a&&(o=o||[]).push("style",a),o}function Ye(t,e,n,r,i){"input"===n&&"radio"===i.type&&null!=i.name&&dt(t,i),$e(n,r),r=$e(n,i);for(var o=0;o<e.length;o+=2){var a=e[o],s=e[o+1];"style"===a?qe(t,s,qi):"dangerouslySetInnerHTML"===a?Bi(t,s):"children"===a?Ue(t,s):pt(t,a,s,r)}switch(n){case"input":mt(t,i);break;case"textarea":Fe(t,i);break;case"select":t._wrapperState.initialValue=void 0,e=t._wrapperState.wasMultiple,t._wrapperState.wasMultiple=!!i.multiple,n=i.value,null!=n?Me(t,!!i.multiple,n,!1):e!==!!i.multiple&&(null!=i.defaultValue?Me(t,!!i.multiple,i.defaultValue,!0):Me(t,!!i.multiple,i.multiple?[]:"",!1))}}function Je(t,e,n,r,i){switch(e){case"iframe":case"object":Vt("topLoad","load",t);break;case"video":case"audio":for(var o in ei)ei.hasOwnProperty(o)&&Vt(o,ei[o],t);break;case"source":Vt("topError","error",t);break;case"img":case"image":case"link":Vt("topError","error",t),Vt("topLoad","load",t);break;case"form":Vt("topReset","reset",t),Vt("topSubmit","submit",t);break;case"details":Vt("topToggle","toggle",t);break;case"input":ht(t,n),Vt("topInvalid","invalid",t),Ze(i,"onChange");break;case"select":je(t,n),Vt("topInvalid","invalid",t),Ze(i,"onChange");break;case"textarea":Le(t,n),Vt("topInvalid","invalid",t),Ze(i,"onChange")}We(e,n,qi),r=null;for(var a in n)n.hasOwnProperty(a)&&(o=n[a],"children"===a?"string"===typeof o?t.textContent!==o&&(r=["children",o]):"number"===typeof o&&t.textContent!==""+o&&(r=["children",""+o]):En.hasOwnProperty(a)&&null!=o&&Ze(i,a));switch(e){case"input":et(t),yt(t,n);break;case"textarea":et(t),Be(t,n);break;case"select":case"option":break;default:"function"===typeof n.onClick&&(t.onclick=hn)}return r}function Qe(t,e){return t.nodeValue!==e}function tn(t){this._expirationTime=Gi.computeUniqueAsyncExpiration(),this._root=t,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function en(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function nn(t,e,n){this._internalRoot=Gi.createContainer(t,e,n)}function rn(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function on(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function an(t,e){if(e||(e=t?9===t.nodeType?t.documentElement:t.firstChild:null,e=!(!e||1!==e.nodeType||!e.hasAttribute("data-reactroot"))),!e)for(var n;n=t.lastChild;)t.removeChild(n);return new nn(t,!1,e)}function sn(t,e,n,i,o){rn(n)||r("200");var a=n._reactRootContainer;if(a){if("function"===typeof o){var s=o;o=function(){var t=Gi.getPublicRootInstance(a._internalRoot);s.call(t)}}null!=t?a.legacy_renderSubtreeIntoContainer(t,e,o):a.render(e,o)}else{if(a=n._reactRootContainer=an(n,i),"function"===typeof o){var u=o;o=function(){var t=Gi.getPublicRootInstance(a._internalRoot);u.call(t)}}Gi.unbatchedUpdates(function(){null!=t?a.legacy_renderSubtreeIntoContainer(t,e,o):a.render(e,o)})}return Gi.getPublicRootInstance(a._internalRoot)}function un(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return rn(e)||r("200"),Pe(t,e,null,n)}var ln=n(37),cn=n(1),pn=n(132),fn=n(36),hn=n(38),dn=n(133),mn=n(134),yn=n(135),vn=n(58);cn||r("227");var gn={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(t,e,n,r,o,a,s,u,l){i.apply(gn,arguments)},invokeGuardedCallbackAndCatchFirstError:function(t,e,n,r,i,o,a,s,u){if(gn.invokeGuardedCallback.apply(this,arguments),gn.hasCaughtError()){var l=gn.clearCaughtError();gn._hasRethrowError||(gn._hasRethrowError=!0,gn._rethrowError=l)}},rethrowCaughtError:function(){return o.apply(gn,arguments)},hasCaughtError:function(){return gn._hasCaughtError},clearCaughtError:function(){if(gn._hasCaughtError){var t=gn._caughtError;return gn._caughtError=null,gn._hasCaughtError=!1,t}r("198")}},_n=null,bn={},xn=[],wn={},En={},Sn={},Tn=Object.freeze({plugins:xn,eventNameDispatchConfigs:wn,registrationNameModules:En,registrationNameDependencies:Sn,possibleRegistrationNames:null,injectEventPluginOrder:u,injectEventPluginsByName:l}),Cn=null,An=null,On=null,kn=null,In={injectEventPluginOrder:u,injectEventPluginsByName:l},Pn=Object.freeze({injection:In,getListener:y,runEventsInBatch:v,runExtractedEventsInBatch:g}),zn=Math.random().toString(36).slice(2),Rn="__reactInternalInstance$"+zn,Mn="__reactEventHandlers$"+zn,jn=Object.freeze({precacheFiberNode:function(t,e){e[Rn]=t},getClosestInstanceFromNode:_,getInstanceFromNode:function(t){return t=t[Rn],!t||5!==t.tag&&6!==t.tag?null:t},getNodeFromInstance:b,getFiberCurrentPropsFromNode:x,updateFiberProps:function(t,e){t[Mn]=e}}),Dn=Object.freeze({accumulateTwoPhaseDispatches:k,accumulateTwoPhaseDispatchesSkipTarget:function(t){f(t,C)},accumulateEnterLeaveDispatches:I,accumulateDirectDispatches:function(t){f(t,O)}}),Ln=null,Fn={_root:null,_startText:null,_fallbackText:null},Bn="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),Nn={type:null,target:null,currentTarget:hn.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};fn(M.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!==typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=hn.thatReturnsTrue)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!==typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=hn.thatReturnsTrue)},persist:function(){this.isPersistent=hn.thatReturnsTrue},isPersistent:hn.thatReturnsFalse,destructor:function(){var t,e=this.constructor.Interface;for(t in e)this[t]=null;for(e=0;e<Bn.length;e++)this[Bn[e]]=null}}),M.Interface=Nn,M.extend=function(t){function e(){}function n(){return r.apply(this,arguments)}var r=this;e.prototype=r.prototype;var i=new e;return fn(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=fn({},r.Interface,t),n.extend=r.extend,L(n),n},L(M);var Vn=M.extend({data:null}),Un=M.extend({data:null}),qn=[9,13,27,32],Wn=pn.canUseDOM&&"CompositionEvent"in window,$n=null;pn.canUseDOM&&"documentMode"in document&&($n=document.documentMode);var Zn=pn.canUseDOM&&"TextEvent"in window&&!$n,Gn=pn.canUseDOM&&(!Wn||$n&&8<$n&&11>=$n),Hn=String.fromCharCode(32),Kn={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},Xn=!1,Yn=!1,Jn={eventTypes:Kn,extractEvents:function(t,e,n,r){var i=void 0,o=void 0;if(Wn)t:{switch(t){case"topCompositionStart":i=Kn.compositionStart;break t;case"topCompositionEnd":i=Kn.compositionEnd;break t;case"topCompositionUpdate":i=Kn.compositionUpdate;break t}i=void 0}else Yn?F(t,n)&&(i=Kn.compositionEnd):"topKeyDown"===t&&229===n.keyCode&&(i=Kn.compositionStart);return i?(Gn&&(Yn||i!==Kn.compositionStart?i===Kn.compositionEnd&&Yn&&(o=z()):(Fn._root=r,Fn._startText=R(),Yn=!0)),i=Vn.getPooled(i,e,n,r),o?i.data=o:null!==(o=B(n))&&(i.data=o),k(i),o=i):o=null,(t=Zn?N(t,n):V(t,n))?(e=Un.getPooled(Kn.beforeInput,e,n,r),e.data=t,k(e)):e=null,null===o?e:null===e?o:[o,e]}},Qn=null,tr={injectFiberControlledHostComponent:function(t){Qn=t}},er=null,nr=null,rr=Object.freeze({injection:tr,enqueueStateRestore:q,needsStateRestore:W,restoreStateIfNeeded:$}),ir=!1,or={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},ar=cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,sr="function"===typeof Symbol&&Symbol.for,ur=sr?Symbol.for("react.element"):60103,lr=sr?Symbol.for("react.call"):60104,cr=sr?Symbol.for("react.return"):60105,pr=sr?Symbol.for("react.portal"):60106,fr=sr?Symbol.for("react.fragment"):60107,hr=sr?Symbol.for("react.strict_mode"):60108,dr=sr?Symbol.for("react.provider"):60109,mr=sr?Symbol.for("react.context"):60110,yr=sr?Symbol.for("react.async_mode"):60111,vr=sr?Symbol.for("react.forward_ref"):60112,gr="function"===typeof Symbol&&Symbol.iterator,_r=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,br={},xr={},wr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){wr[t]=new lt(t,0,!1,t,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];wr[e]=new lt(e,1,!1,t[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){wr[t]=new lt(t,2,!1,t.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(t){wr[t]=new lt(t,2,!1,t,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){wr[t]=new lt(t,3,!1,t.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(t){wr[t]=new lt(t,3,!0,t.toLowerCase(),null)}),["capture","download"].forEach(function(t){wr[t]=new lt(t,4,!1,t.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(t){wr[t]=new lt(t,6,!1,t.toLowerCase(),null)}),["rowSpan","start"].forEach(function(t){wr[t]=new lt(t,5,!1,t.toLowerCase(),null)});var Er=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Er,ct);wr[e]=new lt(e,1,!1,t,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Er,ct);wr[e]=new lt(e,1,!1,t,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Er,ct);wr[e]=new lt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace")}),wr.tabIndex=new lt("tabIndex",1,!1,"tabindex",null);var Sr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}},Tr=null,Cr=null,Ar=!1;pn.canUseDOM&&(Ar=J("input")&&(!document.documentMode||9<document.documentMode));var Or={eventTypes:Sr,_isInputEventSupported:Ar,extractEvents:function(t,e,n,r){var i=e?b(e):window,o=void 0,a=void 0,s=i.nodeName&&i.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===i.type?o=wt:X(i)?Ar?o=Ot:(o=Ct,a=Tt):(s=i.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(o=At),o&&(o=o(t,e)))return _t(o,n,r);a&&a(t,i,e),"topBlur"===t&&null!=e&&(t=e._wrapperState||i._wrapperState)&&t.controlled&&"number"===i.type&&vt(i,"number",i.value)}},kr=M.extend({view:null,detail:null}),Ir={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},Pr=kr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:It,button:null,buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)}}),zr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},Rr={eventTypes:zr,extractEvents:function(t,e,n,r){if("topMouseOver"===t&&(n.relatedTarget||n.fromElement)||"topMouseOut"!==t&&"topMouseOver"!==t)return null;var i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window;if("topMouseOut"===t?(t=e,e=(e=n.relatedTarget||n.toElement)?_(e):null):t=null,t===e)return null;var o=null==t?i:b(t);i=null==e?i:b(e);var a=Pr.getPooled(zr.mouseLeave,t,n,r);return a.type="mouseleave",a.target=o,a.relatedTarget=i,n=Pr.getPooled(zr.mouseEnter,e,n,r),n.type="mouseenter",n.target=i,n.relatedTarget=o,I(a,n,t,e),[a,n]}},Mr=M.extend({animationName:null,elapsedTime:null,pseudoElement:null}),jr=M.extend({clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Dr=kr.extend({relatedTarget:null}),Lr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Br=kr.extend({key:function(t){if(t.key){var e=Lr[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?(t=Lt(t),13===t?"Enter":String.fromCharCode(t)):"keydown"===t.type||"keyup"===t.type?Fr[t.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:It,charCode:function(t){return"keypress"===t.type?Lt(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?Lt(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}}),Nr=Pr.extend({dataTransfer:null}),Vr=kr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:It}),Ur=M.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),qr=Pr.extend({deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null}),Wr={},$r={};"blur cancel click close contextMenu copy cut doubleClick dragEnd dragStart drop focus input invalid keyDown keyPress keyUp mouseDown mouseUp paste pause play rateChange reset seeked submit touchCancel touchEnd touchStart volumeChange".split(" ").forEach(function(t){Ft(t,!0)}),"abort animationEnd animationIteration animationStart canPlay canPlayThrough drag dragEnter dragExit dragLeave dragOver durationChange emptied encrypted ended error load loadedData loadedMetadata loadStart mouseMove mouseOut mouseOver playing progress scroll seeking stalled suspend timeUpdate toggle touchMove transitionEnd waiting wheel".split(" ").forEach(function(t){Ft(t,!1)});var Zr={eventTypes:Wr,isInteractiveTopLevelEventType:function(t){return void 0!==(t=$r[t])&&!0===t.isInteractive},extractEvents:function(t,e,n,r){var i=$r[t];if(!i)return null;switch(t){case"topKeyPress":if(0===Lt(n))return null;case"topKeyDown":case"topKeyUp":t=Br;break;case"topBlur":case"topFocus":t=Dr;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":t=Pr;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":t=Nr;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":t=Vr;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":t=Mr;break;case"topTransitionEnd":t=Ur;break;case"topScroll":t=kr;break;case"topWheel":t=qr;break;case"topCopy":case"topCut":case"topPaste":t=jr;break;default:t=M}return e=t.getPooled(i,e,n,r),k(e),e}},Gr=Zr.isInteractiveTopLevelEventType,Hr=[],Kr=!0,Xr=Object.freeze({get _enabled(){return Kr},setEnabled:Nt,isEnabled:function(){return Kr},trapBubbledEvent:Vt,trapCapturedEvent:Ut,dispatchEvent:Wt}),Yr={animationend:$t("Animation","AnimationEnd"),animationiteration:$t("Animation","AnimationIteration"),animationstart:$t("Animation","AnimationStart"),transitionend:$t("Transition","TransitionEnd")},Jr={},Qr={};pn.canUseDOM&&(Qr=document.createElement("div").style,"AnimationEvent"in window||(delete Yr.animationend.animation,delete Yr.animationiteration.animation,delete Yr.animationstart.animation),"TransitionEvent"in window||delete Yr.transitionend.transition);var ti={topAnimationEnd:Zt("animationend"),topAnimationIteration:Zt("animationiteration"),topAnimationStart:Zt("animationstart"),topBlur:"blur",topCancel:"cancel",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoad:"load",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:Zt("transitionend"),topWheel:"wheel"},ei={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},ni={},ri=0,ii="_reactListenersID"+(""+Math.random()).slice(2),oi=pn.canUseDOM&&"documentMode"in document&&11>=document.documentMode,ai={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},si=null,ui=null,li=null,ci=!1,pi={eventTypes:ai,extractEvents:function(t,e,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){t:{o=Gt(o),i=Sn.onSelect;for(var a=0;a<i.length;a++){var s=i[a];if(!o.hasOwnProperty(s)||!o[s]){o=!1;break t}}o=!0}i=!o}if(i)return null;switch(o=e?b(e):window,t){case"topFocus":(X(o)||"true"===o.contentEditable)&&(si=o,ui=e,li=null);break;case"topBlur":li=ui=si=null;break;case"topMouseDown":ci=!0;break;case"topContextMenu":case"topMouseUp":return ci=!1,Yt(n,r);case"topSelectionChange":if(oi)break;case"topKeyDown":case"topKeyUp":return Yt(n,r)}return null}};In.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),Cn=jn.getFiberCurrentPropsFromNode,An=jn.getInstanceFromNode,On=jn.getNodeFromInstance,In.injectEventPluginsByName({SimpleEventPlugin:Zr,EnterLeaveEventPlugin:Rr,ChangeEventPlugin:Or,SelectEventPlugin:pi,BeforeInputEventPlugin:Jn});var fi=null,hi=null;new Set;var di=void 0,mi=void 0,yi=Array.isArray,vi=ge(!0),gi=ge(!1),_i={},bi=Object.freeze({default:Ie}),xi=bi&&Ie||bi,wi=xi.default?xi.default:xi,Ei="object"===typeof performance&&"function"===typeof performance.now,Si=void 0;Si=Ei?function(){return performance.now()}:function(){return Date.now()};var Ti=void 0,Ci=void 0;if(pn.canUseDOM)if("function"!==typeof requestIdleCallback||"function"!==typeof cancelIdleCallback){var Ai=null,Oi=!1,ki=-1,Ii=!1,Pi=0,zi=33,Ri=33,Mi=void 0;Mi=Ei?{didTimeout:!1,timeRemaining:function(){var t=Pi-performance.now();return 0<t?t:0}}:{didTimeout:!1,timeRemaining:function(){var t=Pi-Date.now();return 0<t?t:0}};var ji="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(t){if(t.source===window&&t.data===ji){if(Oi=!1,t=Si(),0>=Pi-t){if(!(-1!==ki&&ki<=t))return void(Ii||(Ii=!0,requestAnimationFrame(Di)));Mi.didTimeout=!0}else Mi.didTimeout=!1;ki=-1,t=Ai,Ai=null,null!==t&&t(Mi)}},!1);var Di=function(t){Ii=!1;var e=t-Pi+Ri;e<Ri&&zi<Ri?(8>e&&(e=8),Ri=e<zi?zi:e):zi=e,Pi=t+Ri,Oi||(Oi=!0,window.postMessage(ji,"*"))};Ti=function(t,e){return Ai=t,null!=e&&"number"===typeof e.timeout&&(ki=Si()+e.timeout),Ii||(Ii=!0,requestAnimationFrame(Di)),0},Ci=function(){Ai=null,Oi=!1,ki=-1}}else Ti=window.requestIdleCallback,Ci=window.cancelIdleCallback;else Ti=function(t){return setTimeout(function(){t({timeRemaining:function(){return 1/0},didTimeout:!1})})},Ci=function(t){clearTimeout(t)};var Li={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},Fi=void 0,Bi=function(t){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n)})}:t}(function(t,e){if(t.namespaceURI!==Li.svg||"innerHTML"in t)t.innerHTML=e;else{for(Fi=Fi||document.createElement("div"),Fi.innerHTML="<svg>"+e+"</svg>",e=Fi.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}}),Ni={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Vi=["Webkit","ms","Moz","O"];Object.keys(Ni).forEach(function(t){Vi.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Ni[e]=Ni[t]})});var Ui=fn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),qi=hn.thatReturns(""),Wi=Object.freeze({createElement:Ge,createTextNode:He,setInitialProperties:Ke,diffProperties:Xe,updateProperties:Ye,diffHydratedProperties:Je,diffHydratedText:Qe,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(t,e,n){switch(e){case"input":if(mt(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var i=n[e];if(i!==t&&i.form===t.form){var o=x(i);o||r("90"),nt(i),mt(i,o)}}}break;case"textarea":Fe(t,n);break;case"select":null!=(e=n.value)&&Me(t,!!n.multiple,e,!1)}}});tr.injectFiberControlledHostComponent(Wi);var $i=null,Zi=null;tn.prototype.render=function(t){this._defer||r("250"),this._hasChildren=!0,this._children=t;var e=this._root._internalRoot,n=this._expirationTime,i=new en;return Gi.updateContainerAtExpirationTime(t,e,null,n,i._onCommit),i},tn.prototype.then=function(t){if(this._didComplete)t();else{var e=this._callbacks;null===e&&(e=this._callbacks=[]),e.push(t)}},tn.prototype.commit=function(){var t=this._root._internalRoot,e=t.firstBatch;if(this._defer&&null!==e||r("251"),this._hasChildren){var n=this._expirationTime;if(e!==this){this._hasChildren&&(n=this._expirationTime=e._expirationTime,this.render(this._children));for(var i=null,o=e;o!==this;)i=o,o=o._next;null===i&&r("251"),i._next=o._next,this._next=e,t.firstBatch=this}this._defer=!1,Gi.flushRoot(t,n),e=this._next,this._next=null,e=t.firstBatch=e,null!==e&&e._hasChildren&&e.render(e._children)}else this._next=null,this._defer=!1},tn.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var t=this._callbacks;if(null!==t)for(var e=0;e<t.length;e++)(0,t[e])()}},en.prototype.then=function(t){if(this._didCommit)t();else{var e=this._callbacks;null===e&&(e=this._callbacks=[]),e.push(t)}},en.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var t=this._callbacks;if(null!==t)for(var e=0;e<t.length;e++){var n=t[e];"function"!==typeof n&&r("191",n),n()}}},nn.prototype.render=function(t,e){var n=this._internalRoot,r=new en;return e=void 0===e?null:e,null!==e&&r.then(e),Gi.updateContainer(t,n,null,r._onCommit),r},nn.prototype.unmount=function(t){var e=this._internalRoot,n=new en;return t=void 0===t?null:t,null!==t&&n.then(t),Gi.updateContainer(null,e,null,n._onCommit),n},nn.prototype.legacy_renderSubtreeIntoContainer=function(t,e,n){var r=this._internalRoot,i=new en;return n=void 0===n?null:n,null!==n&&i.then(n),Gi.updateContainer(e,r,t,i._onCommit),i},nn.prototype.createBatch=function(){var t=new tn(this),e=t._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=t,t._next=null;else{for(n=null;null!==r&&r._expirationTime<=e;)n=r,r=r._next;t._next=r,null!==n&&(n._next=t)}return t};var Gi=wi({getRootHostContext:function(t){var e=t.nodeType;switch(e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ve(null,"");break;default:e=8===e?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ve(t,e)}return t},getChildHostContext:function(t,e){return Ve(t,e)},getPublicInstance:function(t){return t},prepareForCommit:function(){$i=Kr;var t=dn();if(Xt(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{var n=window.getSelection&&window.getSelection();if(n&&0!==n.rangeCount){e=n.anchorNode;var r=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{e.nodeType,i.nodeType}catch(t){e=null;break t}var o=0,a=-1,s=-1,u=0,l=0,c=t,p=null;e:for(;;){for(var f;c!==e||0!==r&&3!==c.nodeType||(a=o+r),c!==i||0!==n&&3!==c.nodeType||(s=o+n),3===c.nodeType&&(o+=c.nodeValue.length),null!==(f=c.firstChild);)p=c,c=f;for(;;){if(c===t)break e;if(p===e&&++u===r&&(a=o),p===i&&++l===n&&(s=o),null!==(f=c.nextSibling))break;c=p,p=c.parentNode}c=f}e=-1===a||-1===s?null:{start:a,end:s}}else e=null}e=e||{start:0,end:0}}else e=null;Zi={focusedElem:t,selectionRange:e},Nt(!1)},resetAfterCommit:function(){var t=Zi,e=dn(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&yn(document.documentElement,n)){if(Xt(n))if(e=r.start,t=r.end,void 0===t&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(window.getSelection){e=window.getSelection();var i=n[P()].length;t=Math.min(r.start,i),r=void 0===r.end?t:Math.min(r.end,i),!e.extend&&t>r&&(i=r,r=t,t=i),i=Kt(n,t);var o=Kt(n,r);if(i&&o&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)){var a=document.createRange();a.setStart(i.node,i.offset),e.removeAllRanges(),t>r?(e.addRange(a),e.extend(o.node,o.offset)):(a.setEnd(o.node,o.offset),e.addRange(a))}}for(e=[],t=n;t=t.parentNode;)1===t.nodeType&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}Zi=null,Nt($i),$i=null},createInstance:function(t,e,n,r,i){return t=Ge(t,e,n,r),t[Rn]=i,t[Mn]=e,t},appendInitialChild:function(t,e){t.appendChild(e)},finalizeInitialChildren:function(t,e,n,r){return Ke(t,e,n,r),on(e,n)},prepareUpdate:function(t,e,n,r,i){return Xe(t,e,n,r,i)},shouldSetTextContent:function(t,e){return"textarea"===t||"string"===typeof e.children||"number"===typeof e.children||"object"===typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&"string"===typeof e.dangerouslySetInnerHTML.__html},shouldDeprioritizeSubtree:function(t,e){return!!e.hidden},createTextInstance:function(t,e,n,r){return t=He(t,e),t[Rn]=r,t},now:Si,mutation:{commitMount:function(t,e,n){on(e,n)&&t.focus()},commitUpdate:function(t,e,n,r,i){t[Mn]=i,Ye(t,e,n,r,i)},resetTextContent:function(t){Ue(t,"")},commitTextUpdate:function(t,e,n){t.nodeValue=n},appendChild:function(t,e){t.appendChild(e)},appendChildToContainer:function(t,e){8===t.nodeType?t.parentNode.insertBefore(e,t):t.appendChild(e)},insertBefore:function(t,e,n){t.insertBefore(e,n)},insertInContainerBefore:function(t,e,n){8===t.nodeType?t.parentNode.insertBefore(e,n):t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},removeChildFromContainer:function(t,e){8===t.nodeType?t.parentNode.removeChild(e):t.removeChild(e)}},hydration:{canHydrateInstance:function(t,e){return 1!==t.nodeType||e.toLowerCase()!==t.nodeName.toLowerCase()?null:t},canHydrateTextInstance:function(t,e){return""===e||3!==t.nodeType?null:t},getNextHydratableSibling:function(t){for(t=t.nextSibling;t&&1!==t.nodeType&&3!==t.nodeType;)t=t.nextSibling;return t},getFirstHydratableChild:function(t){for(t=t.firstChild;t&&1!==t.nodeType&&3!==t.nodeType;)t=t.nextSibling;return t},hydrateInstance:function(t,e,n,r,i,o){return t[Rn]=o,t[Mn]=n,Je(t,e,n,i,r)},hydrateTextInstance:function(t,e,n){return t[Rn]=n,Qe(t,e)},didNotMatchHydratedContainerTextInstance:function(){},didNotMatchHydratedTextInstance:function(){},didNotHydrateContainerInstance:function(){},didNotHydrateInstance:function(){},didNotFindHydratableContainerInstance:function(){},didNotFindHydratableContainerTextInstance:function(){},didNotFindHydratableInstance:function(){},didNotFindHydratableTextInstance:function(){}},scheduleDeferredCallback:Ti,cancelDeferredCallback:Ci}),Hi=Gi;Z=Hi.batchedUpdates,G=Hi.interactiveUpdates,H=Hi.flushInteractiveUpdates;var Ki={createPortal:un,findDOMNode:function(t){return null==t?null:1===t.nodeType?t:Gi.findHostInstance(t)},hydrate:function(t,e,n){return sn(null,t,e,!0,n)},render:function(t,e,n){return sn(null,t,e,!1,n)},unstable_renderSubtreeIntoContainer:function(t,e,n,i){return(null==t||void 0===t._reactInternalFiber)&&r("38"),sn(t,e,n,!1,i)},unmountComponentAtNode:function(t){return rn(t)||r("40"),!!t._reactRootContainer&&(Gi.unbatchedUpdates(function(){sn(null,null,t,!1,function(){t._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return un.apply(void 0,arguments)},unstable_batchedUpdates:Gi.batchedUpdates,unstable_deferredUpdates:Gi.deferredUpdates,flushSync:Gi.flushSync,unstable_flushControlled:Gi.flushControlled,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:Pn,EventPluginRegistry:Tn,EventPropagators:Dn,ReactControlledComponent:rr,ReactDOMComponentTree:jn,ReactDOMEventListener:Xr},unstable_createRoot:function(t,e){return new nn(t,!0,null!=e&&!0===e.hydrate)}};Gi.injectIntoDevTools({findFiberByHostInstance:_,bundleType:0,version:"16.3.2",rendererPackageName:"react-dom"});var Xi=Object.freeze({default:Ki}),Yi=Xi&&Ki||Xi;t.exports=Yi.default?Yi.default:Yi},function(t,e,n){"use strict";var r=!("undefined"===typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=i},function(t,e,n){"use strict";function r(t){if("undefined"===typeof(t=t||("undefined"!==typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}t.exports=r},function(t,e,n){"use strict";function r(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t&&e!==e}function i(t,e){if(r(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!o.call(e,n[a])||!r(t[n[a]],e[n[a]]))return!1;return!0}var o=Object.prototype.hasOwnProperty;t.exports=i},function(t,e,n){"use strict";function r(t,e){return!(!t||!e)&&(t===e||!i(t)&&(i(e)?r(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var i=n(136);t.exports=r},function(t,e,n){"use strict";function r(t){return i(t)&&3==t.nodeType}var i=n(137);t.exports=r},function(t,e,n){"use strict";function r(t){var e=t?t.ownerDocument||t:document,n=e.defaultView||window;return!(!t||!("function"===typeof n.Node?t instanceof n.Node:"object"===typeof t&&"number"===typeof t.nodeType&&"string"===typeof t.nodeName))}t.exports=r},function(t,e){},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(1),s=n.n(a),u=n(3),l=n(155),c=n(321),p=n(322),f=n(381),h=n(382),d=n(383),m=n(120),y=n(121),v=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),g=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.forwardNode=n.forwardNode.bind(n),n}return o(e,t),v(e,[{key:"componentDidMount",value:function(){(0,this.props.fetchGraph)()}},{key:"forwardNode",value:function(t,e){e.preventDefault(),(0,this.props.movePosition)(t)}},{key:"render",value:function(){var t=this.props,e=t.graph,n=t.position;if(void 0===e.nodes)return s.a.createElement("div",null,"Loading...");var r=e.nodes[n],i=r.question,o=r.q_type,a=void 0;if("dropdown"===o)a=s.a.createElement(c.a,{question:i,options:r.a_choices,handleSubmit:this.forwardNode.bind(null,e.adjancey[n][0])});else if("input"===o)a=s.a.createElement(l.a,{question:i,handleSubmit:this.forwardNode.bind(null,e.adjancey[n][0])});else if("mapQuery"===o)a=s.a.createElement(p.a,{question:i,handleSubmit:this.forwardNode.bind(null,e.adjancey[n][0])});else if("zoningInfo"===o){var u=r.heading;a=s.a.createElement(f.a,{heading:u,handleSubmit:this.forwardNode.bind(null,e.adjancey[n][0])})}else if("singleStatement"===o){var m=r.heading;a=s.a.createElement(h.a,{heading:m,handleSubmit:this.forwardNode.bind(null,e.adjancey[n][0])})}else if("lookupStatement"===o){var y=r.heading;a=s.a.createElement(d.a,{heading:y,handleSubmit:this.forwardNode.bind(null,e.adjancey[n][0])})}return s.a.createElement("div",{className:"App"},s.a.createElement("header",{className:"App-header"},s.a.createElement("div",{className:"container"},s.a.createElement("h1",null,"Upfront Info"))),s.a.createElement("section",{className:"progress"},s.a.createElement("div",{className:"container"},s.a.createElement("div",{className:"progress__point"},s.a.createElement("h3",null,"Business Type")),s.a.createElement("div",{className:"progress__point"},s.a.createElement("h3",null,">")),s.a.createElement("div",{className:"progress__point"},s.a.createElement("h3",null,"Location")))),s.a.createElement("main",null,s.a.createElement("div",{className:"container"},a)))}}]),e}(a.Component),_=function(t){return{position:t.position,graph:t.graph}},b=function(t){return{fetchGraph:function(){t(Object(m.b)())},movePosition:function(e){t(Object(y.b)(e))}}};e.a=Object(u.b)(_,b)(g)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(1),s=(n.n(a),n(2)),u=n.n(s),l=n(59);n(39);e.a=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"store",n=arguments[1],s=n||e+"Subscription",c=function(t){function n(o,a){r(this,n);var s=i(this,t.call(this,o,a));return s[e]=o.store,s}return o(n,t),n.prototype.getChildContext=function(){var t;return t={},t[e]=this[e],t[s]=null,t},n.prototype.render=function(){return a.Children.only(this.props.children)},n}(a.Component);return c.propTypes={store:l.a.isRequired,children:u.a.element.isRequired},c.childContextTypes=(t={},t[e]=l.a.isRequired,t[s]=l.b,t),c}()},function(t,e,n){"use strict";var r=n(38),i=n(37),o=n(142);t.exports=function(){function t(t,e,n,r,a,s){s!==o&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=r,n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(){var t=[],e=[];return{clear:function(){e=o,t=o},notify:function(){for(var n=t=e,r=0;r<n.length;r++)n[r]()},get:function(){return e},subscribe:function(n){var r=!0;return e===t&&(e=t.slice()),e.push(n),function(){r&&t!==o&&(r=!1,e===t&&(e=t.slice()),e.splice(e.indexOf(n),1))}}}}n.d(e,"a",function(){return s});var o=null,a={notify:function(){}},s=function(){function t(e,n,i){r(this,t),this.store=e,this.parentSub=n,this.onStateChange=i,this.unsubscribe=null,this.listeners=a}return t.prototype.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},t.prototype.notifyNestedSubs=function(){this.listeners.notify()},t.prototype.isSubscribed=function(){return Boolean(this.unsubscribe)},t.prototype.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=i())},t.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=a)},t}()},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e,n){for(var r=e.length-1;r>=0;r--){var i=e[r](t);if(i)return i}return function(e,r){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function o(t,e){return t===e}var a=n(60),s=n(145),u=n(146),l=n(151),c=n(152),p=n(153),f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.connectHOC,n=void 0===e?a.a:e,h=t.mapStateToPropsFactories,d=void 0===h?l.a:h,m=t.mapDispatchToPropsFactories,y=void 0===m?u.a:m,v=t.mergePropsFactories,g=void 0===v?c.a:v,_=t.selectorFactory,b=void 0===_?p.a:_;return function(t,e,a){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=u.pure,c=void 0===l||l,p=u.areStatesEqual,h=void 0===p?o:p,m=u.areOwnPropsEqual,v=void 0===m?s.a:m,_=u.areStatePropsEqual,x=void 0===_?s.a:_,w=u.areMergedPropsEqual,E=void 0===w?s.a:w,S=r(u,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),T=i(t,d,"mapStateToProps"),C=i(e,y,"mapDispatchToProps"),A=i(a,g,"mergeProps");return n(b,f({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:T,initMapDispatchToProps:C,initMergeProps:A,pure:c,areStatesEqual:h,areOwnPropsEqual:v,areStatePropsEqual:x,areMergedPropsEqual:E},S))}}()},function(t,e,n){"use strict";function r(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t&&e!==e}function i(t,e){if(r(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!o.call(e,n[a])||!r(t[n[a]],e[n[a]]))return!1;return!0}e.a=i;var o=Object.prototype.hasOwnProperty},function(t,e,n){"use strict";function r(t){return"function"===typeof t?Object(s.b)(t,"mapDispatchToProps"):void 0}function i(t){return t?void 0:Object(s.a)(function(t){return{dispatch:t}})}function o(t){return t&&"object"===typeof t?Object(s.a)(function(e){return Object(a.bindActionCreators)(t,e)}):void 0}var a=n(14),s=n(62);e.a=[r,i,o]},function(t,e,n){"use strict";(function(t,r){var i,o=n(148);i="undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof t?t:r;var a=Object(o.a)(i);e.a=a}).call(e,n(9),n(16)(t))},function(t,e,n){"use strict";function r(t){var e,n=t.Symbol;return"function"===typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}e.a=r},function(t,e,n){"use strict";function r(t){var e=a.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var i=s.call(t);return r&&(e?t[u]=n:delete t[u]),i}var i=n(21),o=Object.prototype,a=o.hasOwnProperty,s=o.toString,u=i.a?i.a.toStringTag:void 0;e.a=r},function(t,e,n){"use strict";function r(t){return o.call(t)}var i=Object.prototype,o=i.toString;e.a=r},function(t,e,n){"use strict";function r(t){return"function"===typeof t?Object(o.b)(t,"mapStateToProps"):void 0}function i(t){return t?void 0:Object(o.a)(function(){return{}})}var o=n(62);e.a=[r,i]},function(t,e,n){"use strict";function r(t,e,n){return s({},n,t,e)}function i(t){return function(e,n){var r=(n.displayName,n.pure),i=n.areMergedPropsEqual,o=!1,a=void 0;return function(e,n,s){var u=t(e,n,s);return o?r&&i(u,a)||(a=u):(o=!0,a=u),a}}}function o(t){return"function"===typeof t?i(t):void 0}function a(t){return t?void 0:function(){return r}}var s=(n(63),Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t});e.a=[o,a]},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e,n,r){return function(i,o){return n(t(i,o),e(r,o),o)}}function o(t,e,n,r,i){function o(i,o){return d=i,m=o,y=t(d,m),v=e(r,m),g=n(y,v,m),h=!0,g}function a(){return y=t(d,m),e.dependsOnOwnProps&&(v=e(r,m)),g=n(y,v,m)}function s(){return t.dependsOnOwnProps&&(y=t(d,m)),e.dependsOnOwnProps&&(v=e(r,m)),g=n(y,v,m)}function u(){var e=t(d,m),r=!f(e,y);return y=e,r&&(g=n(y,v,m)),g}function l(t,e){var n=!p(e,m),r=!c(t,d);return d=t,m=e,n&&r?a():n?s():r?u():g}var c=i.areStatesEqual,p=i.areOwnPropsEqual,f=i.areStatePropsEqual,h=!1,d=void 0,m=void 0,y=void 0,v=void 0,g=void 0;return function(t,e){return h?l(t,e):o(t,e)}}function a(t,e){var n=e.initMapStateToProps,a=e.initMapDispatchToProps,s=e.initMergeProps,u=r(e,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),l=n(t,u),c=a(t,u),p=s(t,u);return(u.pure?o:i)(l,c,p,t,u)}e.a=a;n(154)},function(t,e,n){"use strict";n(39)},function(t,e,n){"use strict";function r(t){var e=t.handleSubmit,n=t.question;return o.a.createElement("form",{onSubmit:e},o.a.createElement("h1",null,n),o.a.createElement(a.a,{name:"businessAddress",component:"input"}),o.a.createElement("button",null,"Submit"))}var i=n(1),o=n.n(i),a=n(11);e.a=Object(a.c)({form:"wizard",destroyOnUnmount:!1,forceUnregisterOnUnmount:!0})(r)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(1),s=n.n(a),u=n(2),l=n.n(u),c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),p=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(!n._reduxForm)throw new Error("Form must be inside a component decorated with reduxForm()");return o}return o(e,t),c(e,[{key:"componentWillMount",value:function(){this.context._reduxForm.registerInnerOnSubmit(this.props.onSubmit)}},{key:"render",value:function(){return s.a.createElement("form",this.props)}}]),e}(a.Component);p.propTypes={onSubmit:l.a.func.isRequired},p.contextTypes={_reduxForm:l.a.object}},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(1),u=n.n(s),l=n(2),c=n.n(l),p=n(17),f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},h=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),d=function(t){function e(t,n){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(!n._reduxForm)throw new Error("FormSection must be inside a component decorated with reduxForm()");return r}return a(e,t),h(e,[{key:"getChildContext",value:function(){var t=this.context,e=this.props.name;return{_reduxForm:f({},t._reduxForm,{sectionPrefix:Object(p.a)(t,e)})}}},{key:"render",value:function(){var t=this.props,e=t.children,n=(t.name,t.component),i=r(t,["children","name","component"]);return u.a.isValidElement(e)?e:Object(s.createElement)(n,f({},i,{children:e}))}}]),e}(s.Component);d.propTypes={name:c.a.string.isRequired,component:c.a.oneOfType([c.a.func,c.a.string])},d.defaultProps={component:"div"},d.childContextTypes={_reduxForm:c.a.object.isRequired},d.contextTypes={_reduxForm:c.a.object}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return Object.defineProperty(n,"message",{configurable:!0,enumerable:!1,value:t,writable:!0}),Object.defineProperty(n,"name",{configurable:!0,enumerable:!1,value:n.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?(Error.captureStackTrace(n,n.constructor),i(n)):(Object.defineProperty(n,"stack",{configurable:!0,enumerable:!1,value:new Error(t).stack,writable:!0}),n)}return o(e,t),e}(function(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Error));e.a=a},function(t,e,n){"use strict";var r=n(2),i=n.n(r),o=i.a.any,a=i.a.bool,s=i.a.func,u=i.a.shape,l=i.a.string,c=i.a.oneOfType,p=i.a.object,f=i.a.number,h=(a.isRequired,c([a,l]).isRequired,a.isRequired,l.isRequired,a.isRequired,a.isRequired,a.isRequired,a.isRequired,a.isRequired,a.isRequired,a.isRequired,a.isRequired,u({insert:s.isRequired,move:s.isRequired,pop:s.isRequired,push:s.isRequired,remove:s.isRequired,removeAll:s.isRequired,shift:s.isRequired,splice:s.isRequired,swap:s.isRequired,unshift:s.isRequired}),s.isRequired,s.isRequired,s.isRequired,s.isRequired,s.isRequired,s.isRequired,s.isRequired,s.isRequired,s.isRequired,s.isRequired,s.isRequired,s.isRequired,s.isRequired,s.isRequired,s.isRequired,s.isRequired,s.isRequired,{checked:a,name:l.isRequired,onBlur:s.isRequired,onChange:s.isRequired,onDragStart:s.isRequired,onDrop:s.isRequired,onFocus:s.isRequired,value:o}),d={active:a.isRequired,asyncValidating:a.isRequired,autofilled:a.isRequired,dirty:a.isRequired,dispatch:s.isRequired,error:o,form:l.isRequired,invalid:a.isRequired,pristine:a.isRequired,submitting:a.isRequired,submitFailed:a.isRequired,touched:a.isRequired,valid:a.isRequired,visited:a.isRequired,warning:l},m={dirty:a.isRequired,error:o,form:l.isRequired,invalid:a.isRequired,pristine:a.isRequired,submitFailed:a,submitting:a,valid:a.isRequired,warning:l},y={name:l.isRequired,forEach:s.isRequired,get:s.isRequired,getAll:s.isRequired,insert:s.isRequired,length:f.isRequired,map:s.isRequired,move:s.isRequired,pop:s.isRequired,push:s.isRequired,reduce:s.isRequired,remove:s.isRequired,removeAll:s.isRequired,shift:s.isRequired,swap:s.isRequired,unshift:s.isRequired};u(h).isRequired,u(d).isRequired,u(y).isRequired,u(m).isRequired},function(t,e,n){"use strict";var r=n(161),i=n(0);e.a=Object(r.a)(i.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(1),s=(n.n(a),n(2)),u=n.n(s),l=n(13),c=n.n(l),p=n(162),f=n(89),h=n(17),d=n(0),m=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},y=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),v=function(t){var e=Object(p.a)(t),n=t.setIn,s=function(t){function s(t,e){r(this,s);var o=i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t,e));if(o.saveRef=function(t){return o.ref=t},o.normalize=function(t,e){var r=o.props.normalize;if(!r)return e;var i=o.context._reduxForm.getValues();return r(e,o.value,n(i,t,e),i)},!e._reduxForm)throw new Error("Field must be inside a component decorated with reduxForm()");return o}return o(s,t),y(s,[{key:"shouldComponentUpdate",value:function(t,e){return Object(f.a)(this,t,e)}},{key:"componentWillMount",value:function(){var t=this;this.context._reduxForm.register(this.name,"Field",function(){return t.props.validate},function(){return t.props.warn})}},{key:"componentWillReceiveProps",value:function(t,e){var n=Object(h.a)(this.context,this.props.name),r=Object(h.a)(e,t.name);n===r&&d.a.deepEqual(this.props.validate,t.validate)&&d.a.deepEqual(this.props.warn,t.warn)||(this.context._reduxForm.unregister(n),this.context._reduxForm.register(r,"Field",function(){return t.validate},function(){return t.warn}))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.name)}},{key:"getRenderedComponent",value:function(){return c()(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to Field"),this.ref?this.ref.getWrappedInstance().getRenderedComponent():void 0}},{key:"render",value:function(){return Object(a.createElement)(e,m({},this.props,{name:this.name,normalize:this.normalize,_reduxForm:this.context._reduxForm,ref:this.saveRef}))}},{key:"name",get:function(){return Object(h.a)(this.context,this.props.name)}},{key:"dirty",get:function(){return!this.pristine}},{key:"pristine",get:function(){return!(!this.ref||!this.ref.getWrappedInstance().isPristine())}},{key:"value",get:function(){return this.ref&&this.ref.getWrappedInstance().getValue()}}]),s}(a.Component);return s.propTypes={name:u.a.string.isRequired,component:u.a.oneOfType([u.a.func,u.a.string]).isRequired,format:u.a.func,normalize:u.a.func,onBlur:u.a.func,onChange:u.a.func,onFocus:u.a.func,onDragStart:u.a.func,onDrop:u.a.func,parse:u.a.func,props:u.a.object,validate:u.a.oneOfType([u.a.func,u.a.arrayOf(u.a.func)]),warn:u.a.oneOfType([u.a.func,u.a.arrayOf(u.a.func)]),withRef:u.a.bool},s.contextTypes={_reduxForm:u.a.object},s};e.a=v},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(1),u=(n.n(s),n(2)),l=n.n(u),c=n(3),p=n(74),f=n(75),h=n(164),d=n(0),m=n(77),y=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},v=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_=["_reduxForm"],b=function(t){return t&&"object"===("undefined"===typeof t?"undefined":g(t))},x=function(t){return t&&"function"===typeof t},w=function(t){b(t)&&x(t.preventDefault)&&t.preventDefault()},E=function(t,e){if(b(t)&&b(t.dataTransfer)&&x(t.dataTransfer.getData))return t.dataTransfer.getData(e)},S=function(t,e,n){b(t)&&b(t.dataTransfer)&&x(t.dataTransfer.setData)&&t.dataTransfer.setData(e,n)},T=function(t){var e=t.deepEqual,n=t.getIn,u=function(t,e){var n=d.a.getIn(t,e);return n&&n._error?n._error:n},g=function(t,e){var r=n(t,e);return r&&r._warning?r._warning:r},b=function(n){function u(){var t,e,n,r;i(this,u);for(var a=arguments.length,s=Array(a),l=0;l<a;l++)s[l]=arguments[l];return e=n=o(this,(t=u.__proto__||Object.getPrototypeOf(u)).call.apply(t,[this].concat(s))),n.saveRef=function(t){return n.ref=t},n.isPristine=function(){return n.props.pristine},n.getValue=function(){return n.props.value},n.handleChange=function(t){var e=n.props,r=e.name,i=e.dispatch,o=e.parse,a=e.normalize,s=e.onChange,u=e._reduxForm,l=e.value,c=Object(f.a)(t,{name:r,parse:o,normalize:a}),p=!1;s&&(m.a?s(t,c,l,r):s(y({},t,{preventDefault:function(){return p=!0,w(t)}}),c,l,r)),p||(i(u.change(r,c)),u.asyncValidate&&u.asyncValidate(r,c,"change"))},n.handleFocus=function(t){var e=n.props,r=e.name,i=e.dispatch,o=e.onFocus,a=e._reduxForm,s=!1;o&&(m.a?o(t,r):o(y({},t,{preventDefault:function(){return s=!0,w(t)}}),r)),s||i(a.focus(r))},n.handleBlur=function(t){var e=n.props,r=e.name,i=e.dispatch,o=e.parse,a=e.normalize,s=e.onBlur,u=e._reduxForm,l=e._value,c=e.value,p=Object(f.a)(t,{name:r,parse:o,normalize:a});p===l&&void 0!==l&&(p=c);var h=!1;s&&(m.a?s(t,p,c,r):s(y({},t,{preventDefault:function(){return h=!0,w(t)}}),p,c,r)),h||(i(u.blur(r,p)),u.asyncValidate&&u.asyncValidate(r,p,"blur"))},n.handleDragStart=function(t){var e=n.props,r=e.name,i=e.onDragStart,o=e.value;S(t,h.a,null==o?"":o),i&&i(t,r)},n.handleDrop=function(t){var e=n.props,r=e.name,i=e.dispatch,o=e.onDrop,a=e._reduxForm,s=e.value,u=E(t,h.a),l=!1;o&&o(y({},t,{preventDefault:function(){return l=!0,w(t)}}),u,s,r),l||(i(a.change(r,u)),w(t))},r=e,o(n,r)}return a(u,n),v(u,[{key:"shouldComponentUpdate",value:function(t){var n=this,r=Object.keys(t),i=Object.keys(this.props);return!!(this.props.children||t.children||r.length!==i.length||r.some(function(r){return!~_.indexOf(r)&&!e(n.props[r],t[r])}))}},{key:"getRenderedComponent",value:function(){return this.ref}},{key:"render",value:function(){var e=this.props,n=e.component,i=e.withRef,o=e.name,a=e._reduxForm,u=(e.normalize,e.onBlur,e.onChange,e.onFocus,e.onDragStart,e.onDrop,r(e,["component","withRef","name","_reduxForm","normalize","onBlur","onChange","onFocus","onDragStart","onDrop"])),l=Object(p.a)(t,o,y({},u,{form:a.form,onBlur:this.handleBlur,onChange:this.handleChange,onDrop:this.handleDrop,onDragStart:this.handleDragStart,onFocus:this.handleFocus})),c=l.custom,f=r(l,["custom"]);if(i&&(c.ref=this.saveRef),"string"===typeof n){var h=f.input;f.meta;return Object(s.createElement)(n,y({},h,c))}return Object(s.createElement)(n,y({},f,c))}}]),u}(s.Component);return b.propTypes={component:l.a.oneOfType([l.a.func,l.a.string]).isRequired,props:l.a.object},Object(c.b)(function(t,r){var i=r.name,o=r._reduxForm,a=o.initialValues,s=o.getFormState,l=s(t),c=n(l,"initial."+i),p=void 0!==c?c:a&&n(a,i),f=n(l,"values."+i),h=n(l,"submitting"),d=u(n(l,"syncErrors"),i),m=g(n(l,"syncWarnings"),i),y=e(f,p);return{asyncError:n(l,"asyncErrors."+i),asyncValidating:n(l,"asyncValidating")===i,dirty:!y,pristine:y,state:n(l,"fields."+i),submitError:n(l,"submitErrors."+i),submitFailed:n(l,"submitFailed"),submitting:h,syncError:d,syncWarning:m,initial:p,value:f,_value:r.value}},void 0,void 0,{withRef:!0})(b)};e.a=T},function(t,e,n){"use strict";var r=n(76),i=function(t){var e=[];if(t)for(var n=0;n<t.length;n++){var r=t[n];r.selected&&e.push(r.value)}return e},o=function(t,e){if(Object(r.a)(t)){if(!e&&t.nativeEvent&&void 0!==t.nativeEvent.text)return t.nativeEvent.text;if(e&&void 0!==t.nativeEvent)return t.nativeEvent.text;var n=t,o=n.target,a=o.type,s=o.value,u=o.checked,l=o.files,c=n.dataTransfer;return"checkbox"===a?!!u:"file"===a?l||c&&c.files:"select-multiple"===a?i(t.target.options):s}return t};e.a=o},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r="text"},function(t,e,n){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var i=function(t,e,n,i){if(t=t||[],e<t.length){if(void 0===i&&!n){var o=[].concat(r(t));return o.splice(e,0,!0),o[e]=void 0,o}if(null!=i){var a=[].concat(r(t));return a.splice(e,n,i),a}var s=[].concat(r(t));return s.splice(e,n),s}if(n)return t;var u=[].concat(r(t));return u[e]=i,u};e.a=i},function(t,e,n){"use strict";var r=n(22),i=function(t,e){if(!t)return t;var n=Object(r.a)(e),i=n.length;if(i){for(var o=t,a=0;a<i&&o;++a)o=o[n[a]];return o}};e.a=i},function(t,e,n){"use strict";function r(t){var e=Object(i.a)(t,function(t){return n.size===o&&n.clear(),t}),n=e.cache;return e}var i=n(168),o=500;e.a=r},function(t,e,n){"use strict";function r(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(r.Cache||i.a),n}var i=n(41),o="Expected a function";r.Cache=i.a,e.a=r},function(t,e,n){"use strict";function r(){this.size=0,this.__data__={hash:new i.a,map:new(a.a||o.a),string:new i.a}}var i=n(170),o=n(25),a=n(43);e.a=r},function(t,e,n){"use strict";function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}var i=n(171),o=n(176),a=n(177),s=n(178),u=n(179);r.prototype.clear=i.a,r.prototype.delete=o.a,r.prototype.get=a.a,r.prototype.has=s.a,r.prototype.set=u.a,e.a=r},function(t,e,n){"use strict";function r(){this.__data__=i.a?Object(i.a)(null):{},this.size=0}var i=n(24);e.a=r},function(t,e,n){"use strict";function r(t){return!(!Object(a.a)(t)||Object(o.a)(t))&&(Object(i.a)(t)?d:l).test(Object(s.a)(t))}var i=n(42),o=n(173),a=n(7),s=n(81),u=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,c=Function.prototype,p=Object.prototype,f=c.toString,h=p.hasOwnProperty,d=RegExp("^"+f.call(h).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.a=r},function(t,e,n){"use strict";function r(t){return!!o&&o in t}var i=n(174),o=function(){var t=/[^.]+$/.exec(i.a&&i.a.keys&&i.a.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();e.a=r},function(t,e,n){"use strict";var r=n(6),i=r.a["__core-js_shared__"];e.a=i},function(t,e,n){"use strict";function r(t,e){return null==t?void 0:t[e]}e.a=r},function(t,e,n){"use strict";function r(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}e.a=r},function(t,e,n){"use strict";function r(t){var e=this.__data__;if(i.a){var n=e[t];return n===o?void 0:n}return s.call(e,t)?e[t]:void 0}var i=n(24),o="__lodash_hash_undefined__",a=Object.prototype,s=a.hasOwnProperty;e.a=r},function(t,e,n){"use strict";function r(t){var e=this.__data__;return i.a?void 0!==e[t]:a.call(e,t)}var i=n(24),o=Object.prototype,a=o.hasOwnProperty;e.a=r},function(t,e,n){"use strict";function r(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=i.a&&void 0===e?o:e,this}var i=n(24),o="__lodash_hash_undefined__";e.a=r},function(t,e,n){"use strict";function r(){this.__data__=[],this.size=0}e.a=r},function(t,e,n){"use strict";function r(t){var e=this.__data__,n=Object(i.a)(e,t);return!(n<0)&&(n==e.length-1?e.pop():a.call(e,n,1),--this.size,!0)}var i=n(26),o=Array.prototype,a=o.splice;e.a=r},function(t,e,n){"use strict";function r(t){var e=this.__data__,n=Object(i.a)(e,t);return n<0?void 0:e[n][1]}var i=n(26);e.a=r},function(t,e,n){"use strict";function r(t){return Object(i.a)(this.__data__,t)>-1}var i=n(26);e.a=r},function(t,e,n){"use strict";function r(t,e){var n=this.__data__,r=Object(i.a)(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var i=n(26);e.a=r},function(t,e,n){"use strict";function r(t){var e=Object(i.a)(this,t).delete(t);return this.size-=e?1:0,e}var i=n(27);e.a=r},function(t,e,n){"use strict";function r(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}e.a=r},function(t,e,n){"use strict";function r(t){return Object(i.a)(this,t).get(t)}var i=n(27);e.a=r},function(t,e,n){"use strict";function r(t){return Object(i.a)(this,t).has(t)}var i=n(27);e.a=r},function(t,e,n){"use strict";function r(t,e){var n=Object(i.a)(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var i=n(27);e.a=r},function(t,e,n){"use strict";function r(t){if("string"==typeof t)return t;if(Object(a.a)(t))return Object(o.a)(t,r)+"";if(Object(s.a)(t))return c?c.call(t):"";var e=t+"";return"0"==e&&1/t==-u?"-0":e}var i=n(21),o=n(78),a=n(5),s=n(23),u=1/0,l=i.a?i.a.prototype:void 0,c=l?l.toString:void 0;e.a=r},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i=n(22),o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=function t(e,n,i,a){if(a>=i.length)return n;var s=i[a],u=e&&(Array.isArray(e)?e[Number(s)]:e[s]),l=t(u,n,i,a+1);if(!e){if(isNaN(s))return r({},s,l);var c=[];return c[parseInt(s,10)]=l,c}if(Array.isArray(e)){var p=[].concat(e);return p[parseInt(s,10)]=l,p}return o({},e,r({},s,l))},s=function(t,e,n){return a(t,n,Object(i.a)(e),0)};e.a=s},function(t,e,n){"use strict";var r=n(83),i=n(1),o=n.n(i),a=function(t,e){if(t===e)return!0;if(!t&&!e){return(null===t||void 0===t||""===t)===(null===e||void 0===e||""===e)}return(!t||!e||t._error===e._error)&&((!t||!e||t._warning===e._warning)&&(!o.a.isValidElement(t)&&!o.a.isValidElement(e)&&void 0))},s=function(t,e){return Object(r.a)(t,e,a)};e.a=s},function(t,e,n){"use strict";function r(t,e,n,r,y,g){var _=Object(l.a)(t),b=Object(l.a)(e),x=_?d:Object(u.a)(t),w=b?d:Object(u.a)(e);x=x==h?m:x,w=w==h?m:w;var E=x==m,S=w==m,T=x==w;if(T&&Object(c.a)(t)){if(!Object(c.a)(e))return!1;_=!0,E=!1}if(T&&!E)return g||(g=new i.a),_||Object(p.a)(t)?Object(o.a)(t,e,n,r,y,g):Object(a.a)(t,e,x,n,r,y,g);if(!(n&f)){var C=E&&v.call(t,"__wrapped__"),A=S&&v.call(e,"__wrapped__");if(C||A){var O=C?t.value():t,k=A?e.value():e;return g||(g=new i.a),y(O,k,n,r,g)}}return!!T&&(g||(g=new i.a),Object(s.a)(t,e,n,r,y,g))}var i=n(44),o=n(84),a=n(204),s=n(207),u=n(88),l=n(5),c=n(30),p=n(31),f=1,h="[object Arguments]",d="[object Array]",m="[object Object]",y=Object.prototype,v=y.hasOwnProperty;e.a=r},function(t,e,n){"use strict";function r(){this.__data__=new i.a,this.size=0}var i=n(25);e.a=r},function(t,e,n){"use strict";function r(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}e.a=r},function(t,e,n){"use strict";function r(t){return this.__data__.get(t)}e.a=r},function(t,e,n){"use strict";function r(t){return this.__data__.has(t)}e.a=r},function(t,e,n){"use strict";function r(t,e){var n=this.__data__;if(n instanceof i.a){var r=n.__data__;if(!o.a||r.length<s-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new a.a(r)}return n.set(t,e),this.size=n.size,this}var i=n(25),o=n(43),a=n(41),s=200;e.a=r},function(t,e,n){"use strict";function r(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new i.a;++e<n;)this.add(t[e])}var i=n(41),o=n(200),a=n(201);r.prototype.add=r.prototype.push=o.a,r.prototype.has=a.a,e.a=r},function(t,e,n){"use strict";function r(t){return this.__data__.set(t,i),this}var i="__lodash_hash_undefined__";e.a=r},function(t,e,n){"use strict";function r(t){return this.__data__.has(t)}e.a=r},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}e.a=r},function(t,e,n){"use strict";function r(t,e){return t.has(e)}e.a=r},function(t,e,n){"use strict";function r(t,e,n,r,i,E,T){switch(n){case w:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case x:return!(t.byteLength!=e.byteLength||!E(new o.a(t),new o.a(e)));case f:case h:case y:return Object(a.a)(+t,+e);case d:return t.name==e.name&&t.message==e.message;case v:case _:return t==e+"";case m:var C=u.a;case g:var A=r&c;if(C||(C=l.a),t.size!=e.size&&!A)return!1;var O=T.get(t);if(O)return O==e;r|=p,T.set(t,e);var k=Object(s.a)(C(t),C(e),r,i,E,T);return T.delete(t),k;case b:if(S)return S.call(t)==S.call(e)}return!1}var i=n(21),o=n(85),a=n(18),s=n(84),u=n(205),l=n(206),c=1,p=2,f="[object Boolean]",h="[object Date]",d="[object Error]",m="[object Map]",y="[object Number]",v="[object RegExp]",g="[object Set]",_="[object String]",b="[object Symbol]",x="[object ArrayBuffer]",w="[object DataView]",E=i.a?i.a.prototype:void 0,S=E?E.valueOf:void 0;e.a=r},function(t,e,n){"use strict";function r(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}e.a=r},function(t,e,n){"use strict";function r(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}e.a=r},function(t,e,n){"use strict";function r(t,e,n,r,a,u){var l=n&o,c=Object(i.a)(t),p=c.length;if(p!=Object(i.a)(e).length&&!l)return!1;for(var f=p;f--;){var h=c[f];if(!(l?h in e:s.call(e,h)))return!1}var d=u.get(t);if(d&&u.get(e))return d==e;var m=!0;u.set(t,e),u.set(e,t);for(var y=l;++f<p;){h=c[f];var v=t[h],g=e[h];if(r)var _=l?r(g,v,h,e,t,u):r(v,g,h,t,e,u);if(!(void 0===_?v===g||a(v,g,n,r,u):_)){m=!1;break}y||(y="constructor"==h)}if(m&&!y){var b=t.constructor,x=e.constructor;b!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x)&&(m=!1)}return u.delete(t),u.delete(e),m}var i=n(208),o=1,a=Object.prototype,s=a.hasOwnProperty;e.a=r},function(t,e,n){"use strict";function r(t){return Object(i.a)(t,a.a,o.a)}var i=n(209),o=n(211),a=n(45);e.a=r},function(t,e,n){"use strict";function r(t,e,n){var r=e(t);return Object(o.a)(t)?r:Object(i.a)(r,n(t))}var i=n(210),o=n(5);e.a=r},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}e.a=r},function(t,e,n){"use strict";var r=n(212),i=n(213),o=Object.prototype,a=o.propertyIsEnumerable,s=Object.getOwnPropertySymbols,u=s?function(t){return null==t?[]:(t=Object(t),Object(r.a)(s(t),function(e){return a.call(t,e)}))}:i.a;e.a=u},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}e.a=r},function(t,e,n){"use strict";function r(){return[]}e.a=r},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}e.a=r},function(t,e,n){"use strict";function r(t){return Object(o.a)(t)&&Object(i.a)(t)==a}var i=n(15),o=n(10),a="[object Arguments]";e.a=r},function(t,e,n){"use strict";function r(){return!1}e.a=r},function(t,e,n){"use strict";function r(t){return Object(a.a)(t)&&Object(o.a)(t.length)&&!!s[Object(i.a)(t)]}var i=n(15),o=n(47),a=n(10),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.a=r},function(t,e,n){"use strict";function r(t){return function(e){return t(e)}}e.a=r},function(t,e,n){"use strict";(function(t){var r=n(65),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a&&r.a.process,u=function(){try{var t=o&&o.require&&o.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}();e.a=u}).call(e,n(16)(t))},function(t,e,n){"use strict";var r=n(67),i=Object(r.a)(Object.keys,Object);e.a=i},function(t,e,n){"use strict";var r=n(12),i=n(6),o=Object(r.a)(i.a,"DataView");e.a=o},function(t,e,n){"use strict";var r=n(12),i=n(6),o=Object(r.a)(i.a,"Promise");e.a=o},function(t,e,n){"use strict";var r=n(12),i=n(6),o=Object(r.a)(i.a,"Set");e.a=o},function(t,e,n){"use strict";var r=n(12),i=n(6),o=Object(r.a)(i.a,"WeakMap");e.a=o},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function o(t,e){if(void 0===t||null===t||void 0===e||null===e)return t;for(var n=arguments.length,a=Array(n>2?n-2:0),u=2;u<n;u++)a[u-2]=arguments[u];if(a.length){if(Array.isArray(t)){if(isNaN(e))throw new Error('Must access array elements with a number, not "'+String(e)+'".');var l=Number(e);if(l<t.length){var c=o.apply(void 0,[t&&t[l]].concat(i(a)));if(c!==t[l]){var p=[].concat(i(t));return p[l]=c,p}}return t}if(e in t){var f=o.apply(void 0,[t&&t[e]].concat(i(a)));return t[e]===f?t:s({},t,r({},e,f))}return t}if(Array.isArray(t)){if(isNaN(e))throw new Error('Cannot delete non-numerical index from an array. Given: "'+String(e));var h=Number(e);if(h<t.length){var d=[].concat(i(t));return d.splice(h,1),d}return t}if(e in t){var m=s({},t);return delete m[e],m}return t}var a=n(22),s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=function(t,e){return o.apply(void 0,[t].concat(i(Object(a.a)(e))))};e.a=u},function(t,e,n){"use strict";function r(t){return t?Array.isArray(t)?t.map(function(t){return t.name}):Object.keys(t):[]}e.a=r},function(t,e,n){"use strict";var r=n(228),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(1),s=(n.n(a),n(2)),u=n.n(s),l=n(13),c=n.n(l),p=n(229),f=n(89),h=n(0),d=n(17),m=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},y=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),v=function(t){return t?Array.isArray(t)||t._isFieldArray?void 0:new Error('Invalid prop "names" supplied to <Fields/>. Must be either an array of strings or the fields array generated by FieldArray.'):new Error('No "names" prop was specified <Fields/>')},g=function(t){var e=Object(p.a)(t),n=function(t){function n(t,e){r(this,n);var o=i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e));if(!e._reduxForm)throw new Error("Fields must be inside a component decorated with reduxForm()");return o}return o(n,t),y(n,[{key:"shouldComponentUpdate",value:function(t){return Object(f.a)(this,t)}},{key:"componentWillMount",value:function(){var t=v(this.props.names);if(t)throw t;var e=this.context,n=e._reduxForm.register;this.names.forEach(function(t){return n(t,"Field")})}},{key:"componentWillReceiveProps",value:function(t){if(!h.a.deepEqual(this.props.names,t.names)){var e=this.context,n=e._reduxForm,r=n.register,i=n.unregister;this.props.names.forEach(function(t){return i(Object(d.a)(e,t))}),t.names.forEach(function(t){return r(Object(d.a)(e,t),"Field")})}}},{key:"componentWillUnmount",value:function(){var t=this.context,e=t._reduxForm.unregister;this.props.names.forEach(function(n){return e(Object(d.a)(t,n))})}},{key:"getRenderedComponent",value:function(){return c()(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to Fields"),this.refs.connected.getWrappedInstance().getRenderedComponent()}},{key:"render",value:function(){var t=this.context;return Object(a.createElement)(e,m({},this.props,{names:this.props.names.map(function(e){return Object(d.a)(t,e)}),_reduxForm:this.context._reduxForm,ref:"connected"}))}},{key:"names",get:function(){var t=this.context;return this.props.names.map(function(e){return Object(d.a)(t,e)})}},{key:"dirty",get:function(){return this.refs.connected.getWrappedInstance().isDirty()}},{key:"pristine",get:function(){return!this.dirty}},{key:"values",get:function(){return this.refs.connected&&this.refs.connected.getWrappedInstance().getValues()}}]),n}(a.Component);return n.propTypes={names:function(t,e){return v(t[e])},component:u.a.oneOfType([u.a.func,u.a.string]).isRequired,format:u.a.func,parse:u.a.func,props:u.a.object,withRef:u.a.bool},n.contextTypes={_reduxForm:u.a.object},n};e.a=g},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(1),u=(n.n(s),n(2)),l=n.n(u),c=n(3),p=n(74),f=n(0),h=n(75),d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},m=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),y=["_reduxForm"],v=function(t){var e=t.deepEqual,n=t.getIn,u=t.size,v=function(t,e){return f.a.getIn(t,e+"._error")||f.a.getIn(t,e)},g=function(t,e){var r=n(t,e);return r&&r._warning?r._warning:r},_=function(n){function l(t){i(this,l);var e=o(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,t));return e.onChangeFns={},e.onFocusFns={},e.onBlurFns={},e.prepareEventHandlers=function(t){return t.names.forEach(function(t){e.onChangeFns[t]=function(n){return e.handleChange(t,n)},e.onFocusFns[t]=function(){return e.handleFocus(t)},e.onBlurFns[t]=function(n){return e.handleBlur(t,n)}})},e.handleChange=function(t,n){var r=e.props,i=r.dispatch,o=r.parse,a=r._reduxForm,s=Object(h.a)(n,{name:t,parse:o});i(a.change(t,s)),a.asyncValidate&&a.asyncValidate(t,s,"change")},e.handleFocus=function(t){var n=e.props;(0,n.dispatch)(n._reduxForm.focus(t))},e.handleBlur=function(t,n){var r=e.props,i=r.dispatch,o=r.parse,a=r._reduxForm,s=Object(h.a)(n,{name:t,parse:o});i(a.blur(t,s)),a.asyncValidate&&a.asyncValidate(t,s,"blur")},e.prepareEventHandlers(t),e}return a(l,n),m(l,[{key:"componentWillReceiveProps",value:function(t){var e=this;this.props.names===t.names||u(this.props.names)===u(t.names)&&!t.names.some(function(t){return!e.props._fields[t]})||this.prepareEventHandlers(t)}},{key:"shouldComponentUpdate",value:function(t){var n=this,r=Object.keys(t),i=Object.keys(this.props);return!!(this.props.children||t.children||r.length!==i.length||r.some(function(r){return!~y.indexOf(r)&&!e(n.props[r],t[r])}))}},{key:"isDirty",value:function(){var t=this.props._fields;return Object.keys(t).some(function(e){return t[e].dirty})}},{key:"getValues",value:function(){var t=this.props._fields;return Object.keys(t).reduce(function(e,n){return f.a.setIn(e,n,t[n].value)},{})}},{key:"getRenderedComponent",value:function(){return this.refs.renderedComponent}},{key:"render",value:function(){var e=this,n=this.props,i=n.component,o=n.withRef,a=n._fields,u=n._reduxForm,l=r(n,["component","withRef","_fields","_reduxForm"]),c=u.sectionPrefix,h=u.form,m=Object.keys(a).reduce(function(n,i){var o=a[i],s=Object(p.a)(t,i,d({},o,l,{form:h,onBlur:e.onBlurFns[i],onChange:e.onChangeFns[i],onFocus:e.onFocusFns[i]})),u=s.custom,m=r(s,["custom"]);n.custom=u;var y=c?i.replace(c+".",""):i;return f.a.setIn(n,y,m)},{}),y=m.custom,v=r(m,["custom"]);return o&&(v.ref="renderedComponent"),Object(s.createElement)(i,d({},v,y))}}]),l}(s.Component);return _.propTypes={component:l.a.oneOfType([l.a.func,l.a.string]).isRequired,_fields:l.a.object.isRequired,props:l.a.object},Object(c.b)(function(t,e){var r=e.names,i=e._reduxForm,o=i.initialValues,a=i.getFormState,s=a(t);return{_fields:r.reduce(function(t,r){var i=n(s,"initial."+r),a=void 0!==i?i:o&&n(o,r),u=n(s,"values."+r),l=v(n(s,"syncErrors"),r),c=g(n(s,"syncWarnings"),r),p=n(s,"submitting"),f=u===a;return t[r]={asyncError:n(s,"asyncErrors."+r),asyncValidating:n(s,"asyncValidating")===r,dirty:!f,initial:a,pristine:f,state:n(s,"fields."+r),submitError:n(s,"submitErrors."+r),submitFailed:n(s,"submitFailed"),submitting:p,syncError:l,syncWarning:c,value:u,_value:e.value},t},{})}},void 0,void 0,{withRef:!0})(_)};e.a=v},function(t,e,n){"use strict";var r=n(231),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=n(1),u=(n.n(s),n(2)),l=n.n(u),c=n(13),p=n.n(c),f=n(232),h=n(17),d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},m=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),y=function(t){return Array.isArray(t)?t:[t]},v=function(t,e){return t&&function(){for(var n=y(t),r=0;r<n.length;r++){var i=n[r].apply(n,arguments);if(i)return a({},e,i)}}},g=function(t){var e=Object(f.a)(t),n=function(t){function n(t,e){r(this,n);var o=i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e));if(o.saveRef=function(t){o.ref=t},!e._reduxForm)throw new Error("FieldArray must be inside a component decorated with reduxForm()");return o}return o(n,t),m(n,[{key:"componentWillMount",value:function(){var t=this;this.context._reduxForm.register(this.name,"FieldArray",function(){return v(t.props.validate,"_error")},function(){return v(t.props.warn,"_warning")})}},{key:"componentWillReceiveProps",value:function(t,e){var n=Object(h.a)(this.context,this.props.name),r=Object(h.a)(e,t.name);n!==r&&(this.context._reduxForm.unregister(n),this.context._reduxForm.register(r,"FieldArray"))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.name)}},{key:"getRenderedComponent",value:function(){return p()(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to FieldArray"),this.ref&&this.ref.getWrappedInstance().getRenderedComponent()}},{key:"render",value:function(){return Object(s.createElement)(e,d({},this.props,{name:this.name,_reduxForm:this.context._reduxForm,ref:this.saveRef}))}},{key:"name",get:function(){return Object(h.a)(this.context,this.props.name)}},{key:"dirty",get:function(){return!this.ref||this.ref.getWrappedInstance().dirty}},{key:"pristine",get:function(){return!(!this.ref||!this.ref.getWrappedInstance().pristine)}},{key:"value",get:function(){return this.ref?this.ref.getWrappedInstance().value:void 0}}]),n}(s.Component);return n.propTypes={name:l.a.string.isRequired,component:l.a.func.isRequired,props:l.a.object,validate:l.a.oneOfType([l.a.func,l.a.arrayOf(l.a.func)]),warn:l.a.oneOfType([l.a.func,l.a.arrayOf(l.a.func)]),withRef:l.a.bool},n.contextTypes={_reduxForm:l.a.object},n};e.a=g},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(48),u=n(1),l=(n.n(u),n(2)),c=n.n(l),p=n(3),f=n(14),h=n(247),d=n(0),m=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),y=["_reduxForm","value"],v=function(t){var e=t.deepEqual,n=t.getIn,l=t.size,v=function(t,e){return d.a.getIn(t,e+"._error")},g=function(t,e){return n(t,e+"._warning")},_=function(s){function l(){var t,e,r,a;i(this,l);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return e=r=o(this,(t=l.__proto__||Object.getPrototypeOf(l)).call.apply(t,[this].concat(u))),r.saveRef=function(t){r.ref=t},r.getValue=function(t){return r.props.value&&n(r.props.value,String(t))},a=e,o(r,a)}return a(l,s),m(l,[{key:"shouldComponentUpdate",value:function(t){var n=this,r=this.props.value,i=t.value;if(r&&i){var o=i.every(function(t){return~r.indexOf(t)}),a=i.some(function(t,e){return t!==r[e]});if(r.length!==i.length||o&&a||t.rerenderOnEveryChange&&r.some(function(t,n){return!e(t,i[n])}))return!0}var s=Object.keys(t),u=Object.keys(this.props);return!!(this.props.children||t.children||s.length!==u.length||s.some(function(r){return!~y.indexOf(r)&&!e(n.props[r],t[r])}))}},{key:"getRenderedComponent",value:function(){return this.ref}},{key:"render",value:function(){var e=this.props,n=e.component,i=e.withRef,o=e.name,a=e._reduxForm,s=(e.validate,e.warn,e.rerenderOnEveryChange,r(e,["component","withRef","name","_reduxForm","validate","warn","rerenderOnEveryChange"])),l=Object(h.a)(t,o,a.form,a.sectionPrefix,this.getValue,s);return i&&(l.ref=this.saveRef),Object(u.createElement)(n,l)}},{key:"dirty",get:function(){return this.props.dirty}},{key:"pristine",get:function(){return this.props.pristine}},{key:"value",get:function(){return this.props.value}}]),l}(u.Component);return _.propTypes={component:c.a.oneOfType([c.a.func,c.a.string]).isRequired,props:c.a.object,rerenderOnEveryChange:c.a.bool},_.defaultProps={rerenderOnEveryChange:!1},_.contextTypes={_reduxForm:c.a.object},Object(p.b)(function(t,r){var i=r.name,o=r._reduxForm,a=o.initialValues,s=o.getFormState,u=s(t),c=n(u,"initial."+i)||a&&n(a,i),p=n(u,"values."+i),f=n(u,"submitting"),h=v(n(u,"syncErrors"),i),d=g(n(u,"syncWarnings"),i),m=e(p,c);return{asyncError:n(u,"asyncErrors."+i+"._error"),dirty:!m,pristine:m,state:n(u,"fields."+i),submitError:n(u,"submitErrors."+i+"._error"),submitFailed:n(u,"submitFailed"),submitting:f,syncError:h,syncWarning:d,value:p,length:l(p)}},function(t,e){var n=e.name,r=e._reduxForm,i=r.arrayInsert,o=r.arrayMove,a=r.arrayPop,u=r.arrayPush,l=r.arrayRemove,c=r.arrayRemoveAll,p=r.arrayShift,h=r.arraySplice,d=r.arraySwap,m=r.arrayUnshift;return Object(s.a)({arrayInsert:i,arrayMove:o,arrayPop:a,arrayPush:u,arrayRemove:l,arrayRemoveAll:c,arrayShift:p,arraySplice:h,arraySwap:d,arrayUnshift:m},function(e){return Object(f.bindActionCreators)(e.bind(null,n),t)})},void 0,{withRef:!0})(_)};e.a=v},function(t,e,n){"use strict";function r(t,e){return t&&Object(i.a)(t,e,o.a)}var i=n(91),o=n(45);e.a=r},function(t,e,n){"use strict";function r(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}e.a=r},function(t,e,n){"use strict";function r(t){return"function"==typeof t?t:null==t?a.a:"object"==typeof t?Object(s.a)(t)?Object(o.a)(t[0],t[1]):Object(i.a)(t):Object(u.a)(t)}var i=n(236),o=n(239),a=n(50),s=n(5),u=n(244);e.a=r},function(t,e,n){"use strict";function r(t){var e=Object(o.a)(t);return 1==e.length&&e[0][2]?Object(a.a)(e[0][0],e[0][1]):function(n){return n===t||Object(i.a)(n,t,e)}}var i=n(237),o=n(238),a=n(93);e.a=r},function(t,e,n){"use strict";function r(t,e,n,r){var u=n.length,l=u,c=!r;if(null==t)return!l;for(t=Object(t);u--;){var p=n[u];if(c&&p[2]?p[1]!==t[p[0]]:!(p[0]in t))return!1}for(;++u<l;){p=n[u];var f=p[0],h=t[f],d=p[1];if(c&&p[2]){if(void 0===h&&!(f in t))return!1}else{var m=new i.a;if(r)var y=r(h,d,f,t,e,m);if(!(void 0===y?Object(o.a)(d,h,a|s,r,m):y))return!1}}return!0}var i=n(44),o=n(28),a=1,s=2;e.a=r},function(t,e,n){"use strict";function r(t){for(var e=Object(o.a)(t),n=e.length;n--;){var r=e[n],a=t[r];e[n]=[r,a,Object(i.a)(a)]}return e}var i=n(92),o=n(45);e.a=r},function(t,e,n){"use strict";function r(t,e){return Object(s.a)(t)&&Object(u.a)(e)?Object(l.a)(Object(c.a)(t),e):function(n){var r=Object(o.a)(n,t);return void 0===r&&r===e?Object(a.a)(n,t):Object(i.a)(e,r,p|f)}}var i=n(28),o=n(240),a=n(241),s=n(49),u=n(92),l=n(93),c=n(19),p=1,f=2;e.a=r},function(t,e,n){"use strict";function r(t,e,n){var r=null==t?void 0:Object(i.a)(t,e);return void 0===r?n:r}var i=n(94);e.a=r},function(t,e,n){"use strict";function r(t,e){return null!=t&&Object(o.a)(t,e,i.a)}var i=n(242),o=n(243);e.a=r},function(t,e,n){"use strict";function r(t,e){return null!=t&&e in Object(t)}e.a=r},function(t,e,n){"use strict";function r(t,e,n){e=Object(i.a)(e,t);for(var r=-1,c=e.length,p=!1;++r<c;){var f=Object(l.a)(e[r]);if(!(p=null!=t&&n(t,f)))break;t=t[f]}return p||++r!=c?p:!!(c=null==t?0:t.length)&&Object(u.a)(c)&&Object(s.a)(f,c)&&(Object(a.a)(t)||Object(o.a)(t))}var i=n(95),o=n(29),a=n(5),s=n(46),u=n(47),l=n(19);e.a=r},function(t,e,n){"use strict";function r(t){return Object(a.a)(t)?Object(i.a)(Object(s.a)(t)):Object(o.a)(t)}var i=n(245),o=n(246),a=n(49),s=n(19);e.a=r},function(t,e,n){"use strict";function r(t){return function(e){return null==e?void 0:e[t]}}e.a=r},function(t,e,n){"use strict";function r(t){return function(e){return Object(i.a)(e,t)}}var i=n(94);e.a=r},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=function(t,e,n,o,a,s){var u=t.getIn,l=s.arrayInsert,c=s.arrayMove,p=s.arrayPop,f=s.arrayPush,h=s.arrayRemove,d=s.arrayRemoveAll,m=s.arrayShift,y=(s.arraySplice,s.arraySwap),v=s.arrayUnshift,g=s.asyncError,_=s.dirty,b=s.length,x=s.pristine,w=s.submitError,E=(s.state,s.submitFailed),S=s.submitting,T=s.syncError,C=s.syncWarning,A=s.value,O=s.props,k=r(s,["arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncError","dirty","length","pristine","submitError","state","submitFailed","submitting","syncError","syncWarning","value","props"]),I=T||g||w,P=C,z=o?e.replace(o+".",""):e,R=i({fields:{_isFieldArray:!0,forEach:function(t){return(A||[]).forEach(function(e,n){return t(z+"["+n+"]",n,R.fields)})},get:a,getAll:function(){return A},insert:l,length:b,map:function(t){return(A||[]).map(function(e,n){return t(z+"["+n+"]",n,R.fields)})},move:c,name:e,pop:function(){return p(),u(A,String(b-1))},push:f,reduce:function(t,e){return(A||[]).reduce(function(e,n,r){return t(e,z+"["+r+"]",r,R.fields)},e)},remove:h,removeAll:d,shift:function(){return m(),u(A,"0")},swap:y,unshift:v},meta:{dirty:_,error:I,form:n,warning:P,invalid:!!I,pristine:x,submitting:S,submitFailed:E,valid:!I}},O,k);return R};e.a=o},function(t,e,n){"use strict";var r=n(249),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=n(13),i=n.n(r),o=n(0),a=function(t){var e=t.getIn;return function(t,n){i()(t,"Form value must be specified");var r=n||function(t){return e(t,"form")};return function(n){for(var a=arguments.length,s=Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];return i()(s.length,"No fields specified"),1===s.length?e(r(n),t+".values."+s[0]):s.reduce(function(i,a){var s=e(r(n),t+".values."+a);return void 0===s?i:o.a.setIn(i,a,s)},{})}}};e.a=a},function(t,e,n){"use strict";var r=n(251),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function s(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=n(48),l=n(252),c=n(253),p=n(1),f=n.n(p),h=n(2),d=n.n(h),m=n(3),y=n(17),v=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},g=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),_=function(t){var e=t.getIn;return function(t){for(var n=arguments.length,p=Array(n>1?n-1:0),h=1;h<n;h++)p[h-1]=arguments[h];return function(n){var h=function(h){function d(t,e){o(this,d);var n=a(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,t,e));if(!e._reduxForm)throw new Error("formValues() must be used inside a React tree decorated with reduxForm()");return n.updateComponent(t),n}return s(d,h),g(d,[{key:"componentWillReceiveProps",value:function(e){"function"===typeof t&&this.updateComponent(e)}},{key:"render",value:function(){var t=this.Component;return f.a.createElement(t,v({sectionPrefix:this.context._reduxForm.sectionPrefix},this.props))}},{key:"updateComponent",value:function(e){var n=void 0,r="function"===typeof t?t(e):t;if(n="string"===typeof r?p.reduce(function(t,e){return t[e]=e,t},i({},r,r)):r,Object(c.a)(n))throw new Error("formValues(): You must specify values to get as formValues(name1, name2, ...) or formValues({propName1: propPath1, ...}) or formValues((props) => name) or formValues((props) => ({propName1: propPath1, ...}))");Object(l.a)(n,this._valuesMap)||(this._valuesMap=n,this.setComponent())}},{key:"setComponent",value:function(){var t=this,i=function(n,r){var i=(r.sectionPrefix,t.context._reduxForm.getValues),o=i();return Object(u.a)(t._valuesMap,function(n){return e(o,Object(y.a)(t.context,n))})};this.Component=Object(m.b)(i,function(){return{}})(function(t){var e=(t.sectionPrefix,r(t,["sectionPrefix"]));return f.a.createElement(n,e)})}}]),d}(f.a.Component);return h.contextTypes={_reduxForm:d.a.object},h}}};e.a=_},function(t,e,n){"use strict";function r(t,e){return Object(i.a)(t,e)}var i=n(28);e.a=r},function(t,e,n){"use strict";function r(t){if(null==t)return!0;if(Object(u.a)(t)&&(Object(s.a)(t)||"string"==typeof t||"function"==typeof t.splice||Object(l.a)(t)||Object(p.a)(t)||Object(a.a)(t)))return!t.length;var e=Object(o.a)(t);if(e==f||e==h)return!t.size;if(Object(c.a)(t))return!Object(i.a)(t).length;for(var n in t)if(m.call(t,n))return!1;return!0}var i=n(87),o=n(88),a=n(29),s=n(5),u=n(20),l=n(30),c=n(32),p=n(31),f="[object Map]",h="[object Set]",d=Object.prototype,m=d.hasOwnProperty;e.a=r},function(t,e,n){"use strict";var r=n(255),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t,n){return function(r){return e((n||function(t){return e(t,"form")})(r),t+".error")}}};e.a=r},function(t,e,n){"use strict";var r=n(257),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";function r(t){var e=t.getIn,n=t.keys;return function(t){return function(r){return n((t||function(t){return e(t,"form")})(r))}}}e.a=r},function(t,e,n){"use strict";var r=n(259),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t,n){return function(r){return e((n||function(t){return e(t,"form")})(r),t+".values")}}};e.a=r},function(t,e,n){"use strict";var r=n(261),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t,n){return function(r){return e((n||function(t){return e(t,"form")})(r),t+".initial")}}};e.a=r},function(t,e,n){"use strict";var r=n(263),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=function(t){var e=t.getIn,n=t.empty;return function(t,r){return function(i){return e((r||function(t){return e(t,"form")})(i),t+".syncErrors")||n}}};e.a=r},function(t,e,n){"use strict";var r=n(265),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=function(t){var e=t.getIn,n=t.empty;return function(t,r){return function(i){return e((r||function(t){return e(t,"form")})(i),t+".fields")||n}}};e.a=r},function(t,e,n){"use strict";var r=n(267),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t,n){return function(r){return e((n||function(t){return e(t,"form")})(r),t+".asyncErrors")}}};e.a=r},function(t,e,n){"use strict";var r=n(269),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=function(t){var e=t.getIn,n=t.empty;return function(t,r){return function(i){return e((r||function(t){return e(t,"form")})(i),t+".syncWarnings")||n}}};e.a=r},function(t,e,n){"use strict";var r=n(271),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=function(t){var e=t.getIn,n=t.empty;return function(t,r){return function(i){return e((r||function(t){return e(t,"form")})(i),t+".submitErrors")||n}}};e.a=r},function(t,e,n){"use strict";var r=n(273),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=n(96),i=function(t){return function(e,n){var i=Object(r.a)(t)(e,n);return function(t){return!i(t)}}};e.a=i},function(t,e,n){"use strict";var r=n(275),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=n(51),i=function(t){return function(e,n){var i=Object(r.a)(t)(e,n);return function(t){return!i(t)}}};e.a=i},function(t,e,n){"use strict";var r=function(t,e){switch(e){case"Field":return[t,t+"._error"];case"FieldArray":return[t+"._error"];default:throw new Error("Unknown field type")}},i=function(t){var e=t.getIn;return function(t,n,i,o){if(!n&&!i&&!o)return!1;var a=e(t,"name"),s=e(t,"type");return r(a,s).some(function(t){return e(n,t)||e(i,t)||e(o,t)})}};e.a=i},function(t,e,n){"use strict";var r=n(96),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=n(51),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=n(280),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t,n){return function(r){return!!e((n||function(t){return e(t,"form")})(r),t+".submitting")}}};e.a=r},function(t,e,n){"use strict";var r=n(282),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t,n){return function(r){return!!e((n||function(t){return e(t,"form")})(r),t+".submitSucceeded")}}};e.a=r},function(t,e,n){"use strict";var r=n(284),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t,n){return function(r){return!!e((n||function(t){return e(t,"form")})(r),t+".submitFailed")}}};e.a=r},function(t,e,n){"use strict";var r=n(286),i=n(0);e.a=Object(r.a)(i.a)},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var u=n(287),l=n(48),c=n(61),p=n.n(c),f=n(13),h=n.n(f),d=n(52),m=n.n(d),y=n(2),v=n.n(y),g=n(1),_=(n.n(g),n(3)),b=n(14),x=n(68),w=n(310),E=n(69),S=n(70),T=n(71),C=n(72),A=n(100),O=n(311),k=n(312),I=n(313),P=n(51),z=n(0),R=n(314),M=n(315),j=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),D=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},L="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F=function(t){return Boolean(t&&t.prototype&&"object"===L(t.prototype.isReactComponent))},B=x.a.arrayInsert,N=x.a.arrayMove,V=x.a.arrayPop,U=x.a.arrayPush,q=x.a.arrayRemove,W=x.a.arrayRemoveAll,$=x.a.arrayShift,Z=x.a.arraySplice,G=x.a.arraySwap,H=x.a.arrayUnshift,K=x.a.blur,X=x.a.change,Y=x.a.focus,J=s(x.a,["arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","blur","change","focus"]),Q={arrayInsert:B,arrayMove:N,arrayPop:V,arrayPush:U,arrayRemove:q,arrayRemoveAll:W,arrayShift:$,arraySplice:Z,arraySwap:G,arrayUnshift:H},tt=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(Object.keys(x.a)),["array","asyncErrors","initialValues","syncErrors","syncWarnings","values","registeredFields"]),et=function(t){if(!t||"function"!==typeof t)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");return t},nt=function(t){var e=t.deepEqual,n=t.empty,c=t.getIn,f=t.setIn,d=t.keys,y=t.fromJS,x=Object(P.a)(t);return function(P){var L=D({touchOnBlur:!0,touchOnChange:!1,persistentSubmitErrors:!1,destroyOnUnmount:!0,shouldAsyncValidate:E.a,shouldValidate:S.a,shouldError:T.a,shouldWarn:C.a,enableReinitialize:!1,keepDirtyOnReinitialize:!1,updateUnregisteredFields:!1,getFormState:function(t){return c(t,"form")},pure:!0,forceUnregisterOnUnmount:!1},P);return function(E){var P=function(n){function l(){var e,n,r,a;i(this,l);for(var s=arguments.length,u=Array(s),p=0;p<s;p++)u[p]=arguments[p];return n=r=o(this,(e=l.__proto__||Object.getPrototypeOf(l)).call.apply(e,[this].concat(u))),r.destroyed=!1,r.fieldCounts={},r.fieldValidators={},r.lastFieldValidatorKeys=[],r.fieldWarners={},r.lastFieldWarnerKeys=[],r.innerOnSubmit=void 0,r.submitPromise=void 0,r.getValues=function(){return r.props.values},r.isValid=function(){return r.props.valid},r.isPristine=function(){return r.props.pristine},r.register=function(t,e,n,i){var o=r.fieldCounts[t],a=(o||0)+1;r.fieldCounts[t]=a,r.props.registerField(t,e),n&&(r.fieldValidators[t]=n),i&&(r.fieldWarners[t]=i)},r.unregister=function(t){var e=r.fieldCounts[t];if(1===e?delete r.fieldCounts[t]:null!=e&&(r.fieldCounts[t]=e-1),!r.destroyed){var n=r.props,i=n.destroyOnUnmount,o=n.forceUnregisterOnUnmount,a=n.unregisterField;i||o?(a(t,i),r.fieldCounts[t]||(delete r.fieldValidators[t],delete r.fieldWarners[t])):a(t,!1)}},r.getFieldList=function(t){var e=r.props.registeredFields,n=[];if(!e)return n;var i=d(e);return t&&t.excludeFieldArray&&(i=i.filter(function(t){return"FieldArray"!==c(e,"['"+t+"'].type")})),y(i.reduce(function(t,e){return t.push(e),t},n))},r.getValidators=function(){var t={};return Object.keys(r.fieldValidators).forEach(function(e){var n=r.fieldValidators[e]();n&&(t[e]=n)}),t},r.generateValidator=function(){var e=r.getValidators();return Object.keys(e).length?Object(k.a)(e,t):void 0},r.getWarners=function(){var t={};return Object.keys(r.fieldWarners).forEach(function(e){var n=r.fieldWarners[e]();n&&(t[e]=n)}),t},r.generateWarner=function(){var e=r.getWarners();return Object.keys(e).length?Object(k.a)(e,t):void 0},r.asyncValidate=function(t,e,n){var i=r.props,o=i.asyncBlurFields,a=i.asyncChangeFields,s=i.asyncErrors,u=i.asyncValidate,l=i.dispatch,p=i.initialized,h=i.pristine,d=i.shouldAsyncValidate,m=i.startAsyncValidation,y=i.stopAsyncValidation,v=i.syncErrors,g=i.values,_=!t;if(u){var b=_?g:f(g,t,e),x=_||!c(v,t);if(function(){var e=o&&t&&~o.indexOf(t.replace(/\[[0-9]+\]/g,"[]")),r=a&&t&&~a.indexOf(t.replace(/\[[0-9]+\]/g,"[]")),i=!(o||a);return _||i||("blur"===n?e:r)}()&&d({asyncErrors:s,initialized:p,trigger:_?"submit":n,blurredField:t,pristine:h,syncValidationPasses:x}))return Object(w.a)(function(){return u(b,l,r.props,t)},m,y,t)}},r.submitCompleted=function(t){return delete r.submitPromise,t},r.submitFailed=function(t){throw delete r.submitPromise,t},r.listenToSubmit=function(t){return m()(t)?(r.submitPromise=t,t.then(r.submitCompleted,r.submitFailed)):t},r.submit=function(t){var e=r.props,n=e.onSubmit,i=e.blur,o=e.change,a=e.dispatch;return t&&!Object(A.a)(t)?Object(O.a)(function(){return!r.submitPromise&&r.listenToSubmit(Object(I.a)(et(t),D({},r.props,Object(b.bindActionCreators)({blur:i,change:o},a)),r.props.validExceptSubmit,r.asyncValidate,r.getFieldList({excludeFieldArray:!0})))}):r.submitPromise?void 0:r.innerOnSubmit&&r.innerOnSubmit!==r.submit?r.innerOnSubmit():r.listenToSubmit(Object(I.a)(et(n),D({},r.props,Object(b.bindActionCreators)({blur:i,change:o},a)),r.props.validExceptSubmit,r.asyncValidate,r.getFieldList({excludeFieldArray:!0})))},r.reset=function(){return r.props.reset()},a=n,o(r,a)}return a(l,n),j(l,[{key:"getChildContext",value:function(){var t=this;return{_reduxForm:D({},this.props,{getFormState:function(e){return c(t.props.getFormState(e),t.props.form)},asyncValidate:this.asyncValidate,getValues:this.getValues,sectionPrefix:void 0,register:this.register,unregister:this.unregister,registerInnerOnSubmit:function(e){return t.innerOnSubmit=e}})}}},{key:"initIfNeeded",value:function(t){var n=this.props.enableReinitialize;if(t){if((n||!t.initialized)&&!e(this.props.initialValues,t.initialValues)){var r=t.initialized&&this.props.keepDirtyOnReinitialize;this.props.initialize(t.initialValues,r,{lastInitialValues:this.props.initialValues,updateUnregisteredFields:t.updateUnregisteredFields})}}else!this.props.initialValues||this.props.initialized&&!n||this.props.initialize(this.props.initialValues,this.props.keepDirtyOnReinitialize,{updateUnregisteredFields:this.props.updateUnregisteredFields})}},{key:"updateSyncErrorsIfNeeded",value:function(t,e,n){var r=this.props,i=r.error,o=r.updateSyncErrors,a=(!n||!Object.keys(n).length)&&!i,s=(!t||!Object.keys(t).length)&&!e;a&&s||z.a.deepEqual(n,t)&&z.a.deepEqual(i,e)||o(t,e)}},{key:"clearSubmitPromiseIfNeeded",value:function(t){var e=this.props.submitting;this.submitPromise&&e&&!t.submitting&&delete this.submitPromise}},{key:"submitIfNeeded",value:function(t){var e=this.props,n=e.clearSubmit;!e.triggerSubmit&&t.triggerSubmit&&(n(),this.submit())}},{key:"shouldErrorFunction",value:function(){var t=this.props,e=t.shouldValidate,n=t.shouldError,r=e!==S.a,i=n!==T.a;return r&&!i?e:n}},{key:"validateIfNeeded",value:function(e){var n=this.props,r=n.validate,i=n.values,o=this.shouldErrorFunction(),a=this.generateValidator();if(r||a){var l=void 0===e,c=Object.keys(this.getValidators());if(o({values:i,nextProps:e,props:this.props,initialRender:l,lastFieldValidatorKeys:this.lastFieldValidatorKeys,fieldValidatorKeys:c,structure:t})){var p=l||!e?this.props:e,f=Object(u.a)(r?r(p.values,p)||{}:{},a?a(p.values,p)||{}:{}),h=f._error,d=s(f,["_error"]);this.lastFieldValidatorKeys=c,this.updateSyncErrorsIfNeeded(d,h,p.syncErrors)}}else this.lastFieldValidatorKeys=[]}},{key:"updateSyncWarningsIfNeeded",value:function(t,e,n){var r=this.props,i=r.warning,o=r.syncWarnings,a=r.updateSyncWarnings,s=(!o||!Object.keys(o).length)&&!i,u=(!t||!Object.keys(t).length)&&!e;s&&u||z.a.deepEqual(n,t)&&z.a.deepEqual(i,e)||a(t,e)}},{key:"shouldWarnFunction",value:function(){var t=this.props,e=t.shouldValidate,n=t.shouldWarn,r=e!==S.a,i=n!==C.a;return r&&!i?e:n}},{key:"warnIfNeeded",value:function(e){var n=this.props,r=n.warn,i=n.values,o=this.shouldWarnFunction(),a=this.generateWarner();if(r||a){var l=void 0===e,c=Object.keys(this.getWarners());if(o({values:i,nextProps:e,props:this.props,initialRender:l,lastFieldValidatorKeys:this.lastFieldWarnerKeys,fieldValidatorKeys:c,structure:t})){var p=l||!e?this.props:e,f=Object(u.a)(r?r(p.values,p):{},a?a(p.values,p):{}),h=f._warning,d=s(f,["_warning"]);this.lastFieldWarnerKeys=c,this.updateSyncWarningsIfNeeded(d,h,p.syncWarnings)}}}},{key:"componentWillMount",value:function(){Object(M.a)()||(this.initIfNeeded(),this.validateIfNeeded(),this.warnIfNeeded()),h()(this.props.shouldValidate,"shouldValidate() is deprecated and will be removed in v8.0.0. Use shouldWarn() or shouldError() instead.")}},{key:"componentWillReceiveProps",value:function(t){this.initIfNeeded(t),this.validateIfNeeded(t),this.warnIfNeeded(t),this.clearSubmitPromiseIfNeeded(t),this.submitIfNeeded(t);var n=t.onChange,r=t.values,i=t.dispatch;n&&!e(r,this.props.values)&&n(r,i,t,this.props.values)}},{key:"shouldComponentUpdate",value:function(t){var n=this;if(!this.props.pure)return!0;var r=L.immutableProps,i=void 0===r?[]:r;return!!(this.props.children||t.children||Object.keys(t).some(function(r){return~i.indexOf(r)?n.props[r]!==t[r]:!~tt.indexOf(r)&&!e(n.props[r],t[r])}))}},{key:"componentDidMount",value:function(){Object(M.a)()||(this.initIfNeeded(this.props),this.validateIfNeeded(),this.warnIfNeeded()),h()(this.props.shouldValidate,"shouldValidate() is deprecated and will be removed in v8.0.0. Use shouldWarn() or shouldError() instead.")}},{key:"componentWillUnmount",value:function(){var t=this.props,e=t.destroyOnUnmount,n=t.destroy;e&&!Object(M.a)()&&(this.destroyed=!0,n())}},{key:"render",value:function(){var t=this.props,e=t.anyTouched,n=t.array,i=(t.arrayInsert,t.arrayMove,t.arrayPop,t.arrayPush,t.arrayRemove,t.arrayRemoveAll,t.arrayShift,t.arraySplice,t.arraySwap,t.arrayUnshift,t.asyncErrors,t.asyncValidate,t.asyncValidating),o=t.blur,a=t.change,u=t.clearSubmit,l=t.destroy,c=(t.destroyOnUnmount,t.forceUnregisterOnUnmount,t.dirty),p=t.dispatch,f=(t.enableReinitialize,t.error),h=(t.focus,t.form),d=(t.getFormState,t.initialize),m=t.initialized,y=t.initialValues,v=t.invalid,_=(t.keepDirtyOnReinitialize,t.updateUnregisteredFields,t.pristine),x=t.propNamespace,w=(t.registeredFields,t.registerField,t.reset),S=t.resetSection,T=(t.setSubmitFailed,t.setSubmitSucceeded,t.shouldAsyncValidate,t.shouldValidate,t.shouldError,t.shouldWarn,t.startAsyncValidation,t.startSubmit,t.stopAsyncValidation,t.stopSubmit,t.submitting),C=t.submitFailed,A=t.submitSucceeded,O=t.touch,k=(t.touchOnBlur,t.touchOnChange,t.persistentSubmitErrors,t.syncErrors,t.syncWarnings,t.unregisterField,t.untouch),I=(t.updateSyncErrors,t.updateSyncWarnings,t.valid),P=(t.validExceptSubmit,t.values,t.warning),z=s(t,["anyTouched","array","arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncErrors","asyncValidate","asyncValidating","blur","change","clearSubmit","destroy","destroyOnUnmount","forceUnregisterOnUnmount","dirty","dispatch","enableReinitialize","error","focus","form","getFormState","initialize","initialized","initialValues","invalid","keepDirtyOnReinitialize","updateUnregisteredFields","pristine","propNamespace","registeredFields","registerField","reset","resetSection","setSubmitFailed","setSubmitSucceeded","shouldAsyncValidate","shouldValidate","shouldError","shouldWarn","startAsyncValidation","startSubmit","stopAsyncValidation","stopSubmit","submitting","submitFailed","submitSucceeded","touch","touchOnBlur","touchOnChange","persistentSubmitErrors","syncErrors","syncWarnings","unregisterField","untouch","updateSyncErrors","updateSyncWarnings","valid","validExceptSubmit","values","warning"]),R=D({array:n,anyTouched:e,asyncValidate:this.asyncValidate,asyncValidating:i},Object(b.bindActionCreators)({blur:o,change:a},p),{clearSubmit:u,destroy:l,dirty:c,dispatch:p,error:f,form:h,handleSubmit:this.submit,initialize:d,initialized:m,initialValues:y,invalid:v,pristine:_,reset:w,resetSection:S,submitting:T,submitFailed:C,submitSucceeded:A,touch:O,untouch:k,valid:I,warning:P}),M=D({},x?r({},x,R):R,z);return F(E)&&(M.ref="wrapped"),Object(g.createElement)(E,M)}}]),l}(g.Component);P.displayName="Form("+Object(R.a)(E)+")",P.WrappedComponent=E,P.childContextTypes={_reduxForm:v.a.object.isRequired},P.propTypes={destroyOnUnmount:v.a.bool,forceUnregisterOnUnmount:v.a.bool,form:v.a.string.isRequired,initialValues:v.a.oneOfType([v.a.array,v.a.object]),getFormState:v.a.func,onSubmitFail:v.a.func,onSubmitSuccess:v.a.func,propNamespace:v.a.string,validate:v.a.func,warn:v.a.func,touchOnBlur:v.a.bool,touchOnChange:v.a.bool,triggerSubmit:v.a.bool,persistentSubmitErrors:v.a.bool,registeredFields:v.a.any};var B=Object(_.b)(function(t,r){var i=r.form,o=r.getFormState,a=r.initialValues,s=r.enableReinitialize,u=r.keepDirtyOnReinitialize,l=c(o(t)||n,i)||n,p=c(l,"initial"),f=!!p,h=s&&f&&!e(a,p),d=h&&!u,m=a||p||n;h&&(m=p||n);var y=c(l,"values")||m;d&&(y=m);var v=d||e(m,y),g=c(l,"asyncErrors"),_=c(l,"syncErrors")||{},b=c(l,"syncWarnings")||{},w=c(l,"registeredFields"),E=x(i,o,!1)(t),S=x(i,o,!0)(t),T=!!c(l,"anyTouched"),C=!!c(l,"submitting"),A=!!c(l,"submitFailed"),O=!!c(l,"submitSucceeded"),k=c(l,"error"),I=c(l,"warning"),P=c(l,"triggerSubmit");return{anyTouched:T,asyncErrors:g,asyncValidating:c(l,"asyncValidating")||!1,dirty:!v,error:k,initialized:f,invalid:!E,pristine:v,registeredFields:w,submitting:C,submitFailed:A,submitSucceeded:O,syncErrors:_,syncWarnings:b,triggerSubmit:P,values:y,valid:E,validExceptSubmit:S,warning:I}},function(t,e){var n=function(t){return t.bind(null,e.form)},r=Object(l.a)(J,n),i=Object(l.a)(Q,n),o=function(t,n){return K(e.form,t,n,!!e.touchOnBlur)},a=function(t,n){return X(e.form,t,n,!!e.touchOnChange,!!e.persistentSubmitErrors)},s=n(Y),u=Object(b.bindActionCreators)(r,t),c={insert:Object(b.bindActionCreators)(i.arrayInsert,t),move:Object(b.bindActionCreators)(i.arrayMove,t),pop:Object(b.bindActionCreators)(i.arrayPop,t),push:Object(b.bindActionCreators)(i.arrayPush,t),remove:Object(b.bindActionCreators)(i.arrayRemove,t),removeAll:Object(b.bindActionCreators)(i.arrayRemoveAll,t),shift:Object(b.bindActionCreators)(i.arrayShift,t),splice:Object(b.bindActionCreators)(i.arraySplice,t),swap:Object(b.bindActionCreators)(i.arraySwap,t),unshift:Object(b.bindActionCreators)(i.arrayUnshift,t)},p=D({},u,i,{blur:o,change:a,array:c,focus:s,dispatch:t});return function(){return p}},void 0,{withRef:!0}),N=p()(B(P),E);N.defaultProps=L;var V=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),j(e,[{key:"submit",value:function(){return this.ref&&this.ref.getWrappedInstance().submit()}},{key:"reset",value:function(){this.ref&&this.ref.getWrappedInstance().reset()}},{key:"render",value:function(){var t=this,e=this.props,n=e.initialValues,r=s(e,["initialValues"]);return Object(g.createElement)(N,D({},r,{ref:function(e){return t.ref=e},initialValues:y(n)}))}},{key:"valid",get:function(){return!(!this.ref||!this.ref.getWrappedInstance().isValid())}},{key:"invalid",get:function(){return!this.valid}},{key:"pristine",get:function(){return!(!this.ref||!this.ref.getWrappedInstance().isPristine())}},{key:"dirty",get:function(){return!this.pristine}},{key:"values",get:function(){return this.ref?this.ref.getWrappedInstance().getValues():n}},{key:"fieldList",get:function(){return this.ref?this.ref.getWrappedInstance().getFieldList():[]}},{key:"wrappedInstance",get:function(){return this.ref&&this.ref.getWrappedInstance().refs.wrapped}}]),e}(g.Component);return p()(V,E)}}};e.a=nt},function(t,e,n){"use strict";var r=n(288),i=n(301),o=Object(i.a)(function(t,e,n){Object(r.a)(t,e,n)});e.a=o},function(t,e,n){"use strict";function r(t,e,n,p,f){t!==e&&Object(a.a)(e,function(a,l){if(Object(u.a)(a))f||(f=new i.a),Object(s.a)(t,e,l,n,r,p,f);else{var h=p?p(Object(c.a)(t,l),a,l+"",t,e,f):void 0;void 0===h&&(h=a),Object(o.a)(t,l,h)}},l.a)}var i=n(44),o=n(97),a=n(91),s=n(289),u=n(7),l=n(99),c=n(98);e.a=r},function(t,e,n){"use strict";function r(t,e,n,r,_,b,x){var w=Object(v.a)(t,n),E=Object(v.a)(e,n),S=x.get(E);if(S)return void Object(i.a)(t,n,S);var T=b?b(w,E,n+"",t,e,x):void 0,C=void 0===T;if(C){var A=Object(c.a)(E),O=!A&&Object(f.a)(E),k=!A&&!O&&Object(y.a)(E);T=E,A||O||k?Object(c.a)(w)?T=w:Object(p.a)(w)?T=Object(s.a)(w):O?(C=!1,T=Object(o.a)(E,!0)):k?(C=!1,T=Object(a.a)(E,!0)):T=[]:Object(m.a)(E)||Object(l.a)(E)?(T=w,Object(l.a)(w)?T=Object(g.a)(w):(!Object(d.a)(w)||r&&Object(h.a)(w))&&(T=Object(u.a)(E))):C=!1}C&&(x.set(E,T),_(T,E,r,b,x),x.delete(E)),Object(i.a)(t,n,T)}var i=n(97),o=n(290),a=n(291),s=n(79),u=n(293),l=n(29),c=n(5),p=n(295),f=n(30),h=n(42),d=n(7),m=n(64),y=n(31),v=n(98),g=n(296);e.a=r},function(t,e,n){"use strict";(function(t){function r(t,e){if(e)return t.slice();var n=t.length,r=l?l(n):new t.constructor(n);return t.copy(r),r}var i=n(6),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o,u=s?i.a.Buffer:void 0,l=u?u.allocUnsafe:void 0;e.a=r}).call(e,n(16)(t))},function(t,e,n){"use strict";function r(t,e){var n=e?Object(i.a)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var i=n(292);e.a=r},function(t,e,n){"use strict";function r(t){var e=new t.constructor(t.byteLength);return new i.a(e).set(new i.a(t)),e}var i=n(85);e.a=r},function(t,e,n){"use strict";function r(t){return"function"!=typeof t.constructor||Object(a.a)(t)?{}:Object(i.a)(Object(o.a)(t))}var i=n(294),o=n(66),a=n(32);e.a=r},function(t,e,n){"use strict";var r=n(7),i=Object.create,o=function(){function t(){}return function(e){if(!Object(r.a)(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();e.a=o},function(t,e,n){"use strict";function r(t){return Object(o.a)(t)&&Object(i.a)(t)}var i=n(20),o=n(10);e.a=r},function(t,e,n){"use strict";function r(t){return Object(i.a)(t,Object(o.a)(t))}var i=n(297),o=n(99);e.a=r},function(t,e,n){"use strict";function r(t,e,n,r){var a=!n;n||(n={});for(var s=-1,u=e.length;++s<u;){var l=e[s],c=r?r(n[l],t[l],l,n,t):void 0;void 0===c&&(c=t[l]),a?Object(o.a)(n,l,c):Object(i.a)(n,l,c)}return n}var i=n(298),o=n(33);e.a=r},function(t,e,n){"use strict";function r(t,e,n){var r=t[e];s.call(t,e)&&Object(o.a)(r,n)&&(void 0!==n||e in t)||Object(i.a)(t,e,n)}var i=n(33),o=n(18),a=Object.prototype,s=a.hasOwnProperty;e.a=r},function(t,e,n){"use strict";function r(t){if(!Object(i.a)(t))return Object(a.a)(t);var e=Object(o.a)(t),n=[];for(var r in t)("constructor"!=r||!e&&u.call(t,r))&&n.push(r);return n}var i=n(7),o=n(32),a=n(300),s=Object.prototype,u=s.hasOwnProperty;e.a=r},function(t,e,n){"use strict";function r(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}e.a=r},function(t,e,n){"use strict";function r(t){return Object(i.a)(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,s&&Object(o.a)(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var u=n[r];u&&t(e,u,r,a)}return e})}var i=n(302),o=n(309);e.a=r},function(t,e,n){"use strict";function r(t,e){return Object(a.a)(Object(o.a)(t,e,i.a),t+"")}var i=n(50),o=n(303),a=n(305);e.a=r},function(t,e,n){"use strict";function r(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var r=arguments,a=-1,s=o(r.length-e,0),u=Array(s);++a<s;)u[a]=r[e+a];a=-1;for(var l=Array(e+1);++a<e;)l[a]=r[a];return l[e]=n(u),Object(i.a)(t,this,l)}}var i=n(304),o=Math.max;e.a=r},function(t,e,n){"use strict";function r(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}e.a=r},function(t,e,n){"use strict";var r=n(306),i=n(308),o=Object(i.a)(r.a);e.a=o},function(t,e,n){"use strict";var r=n(307),i=n(90),o=n(50),a=i.a?function(t,e){return Object(i.a)(t,"toString",{configurable:!0,enumerable:!1,value:Object(r.a)(e),writable:!0})}:o.a;e.a=a},function(t,e,n){"use strict";function r(t){return function(){return t}}e.a=r},function(t,e,n){"use strict";function r(t){var e=0,n=0;return function(){var r=a(),s=o-(r-n);if(n=r,s>0){if(++e>=i)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var i=800,o=16,a=Date.now;e.a=r},function(t,e,n){"use strict";function r(t,e,n){if(!Object(s.a)(n))return!1;var r=typeof e;return!!("number"==r?Object(o.a)(n)&&Object(a.a)(e,n.length):"string"==r&&e in n)&&Object(i.a)(n[e],t)}var i=n(18),o=n(20),a=n(46),s=n(7);e.a=r},function(t,e,n){"use strict";var r=n(52),i=n.n(r),o=function(t,e,n,r){e(r);var o=t();if(!i()(o))throw new Error("asyncValidate function passed to reduxForm must return a promise");var a=function(t){return function(e){if(e&&Object.keys(e).length)return n(e),e;if(t)throw n(),new Error("Asynchronous validation promise was rejected without errors.");return n(),Promise.resolve()}};return o.then(a(!1),a(!0))};e.a=o},function(t,e,n){"use strict";var r=n(100),i=function(t){return function(e){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return Object(r.a)(e)?t.apply(void 0,i):t.apply(void 0,[e].concat(i))}};e.a=i},function(t,e,n){"use strict";var r=n(0),i=function(t){return Array.isArray(t)?t:[t]},o=function(t,e,n,r,o){for(var a=i(r),s=0;s<a.length;s++){var u=a[s](t,e,n,o);if(u)return u}},a=function(t,e){var n=e.getIn;return function(e,i){var a={};return Object.keys(t).forEach(function(s){var u=n(e,s),l=o(u,e,i,t[s],s);l&&(a=r.a.setIn(a,s,l))}),a}};e.a=a},function(t,e,n){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var i=n(52),o=n.n(i),a=n(73),s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=function(t,e,n,i,u){var l=e.dispatch,c=e.onSubmitFail,p=e.onSubmitSuccess,f=e.startSubmit,h=e.stopSubmit,d=e.setSubmitFailed,m=e.setSubmitSucceeded,y=e.syncErrors,v=e.asyncErrors,g=e.touch,_=e.values,b=e.persistentSubmitErrors;if(g.apply(void 0,r(u)),n||b){var x=function(){var n=void 0;try{n=t(_,l,e)}catch(t){var i=t instanceof a.a?t.errors:void 0;if(h(i),d.apply(void 0,r(u)),c&&c(i,l,t,e),i||c)return i;throw t}return o()(n)?(f(),n.then(function(t){return h(),m(),p&&p(t,l,e),t},function(t){var n=t instanceof a.a?t.errors:void 0;if(h(n),d.apply(void 0,r(u)),c&&c(n,l,t,e),n||c)return n;throw t})):(m(),p&&p(n,l,e),n)},w=i&&i();return w?w.then(function(t){if(t)throw t;return x()}).catch(function(t){return d.apply(void 0,r(u)),c&&c(t,l,null,e),Promise.reject(t)}):x()}d.apply(void 0,r(u));var E=s({},v,y);return c&&c(E,l,null,e),E};e.a=u},function(t,e,n){"use strict";var r=function(t){return t.displayName||t.name||"Component"};e.a=r},function(t,e,n){"use strict";(function(t){var n=function(){return!("undefined"===typeof t||!t.hot||"function"!==typeof t.hot.status||"apply"!==t.hot.status())};e.a=n}).call(e,n(16)(t))},function(t,e,n){"use strict";var r=n(317),i=n(0);e.a=Object(r.a)(i.a)},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function o(t){function e(t){return t.plugin=function(t){var n=this;return e(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{type:"NONE"},i=function(n,i){var o=f(n,i),a=t[i](o,r,f(e,i));return a!==o?h(n,i,a):n},o=n(e,r),a=r&&r.meta&&r.meta.form;return a?t[a]?i(o,a):o:Object.keys(t).reduce(i,o)})},t}var n,o=t.deepEqual,c=t.empty,p=t.forEach,f=t.getIn,h=t.setIn,d=t.deleteIn,m=t.fromJS,y=t.keys,v=t.size,g=t.some,_=t.splice,b=Object(s.a)(t),x=Object(s.a)(u.a),w=function(t,e,n,r,i,o,a){var s=f(t,e+"."+n);return s||a?h(t,e+"."+n,_(s,r,i,o)):t},E=function(t,e,n,r,i,o,a){var s=f(t,e),l=u.a.getIn(s,n);return l||a?h(t,e,u.a.setIn(s,n,u.a.splice(l,r,i,o))):t},S=["values","fields","submitErrors","asyncErrors"],T=function(t,e,n,r,i){var o=t,a=null!=i?c:void 0;return o=w(o,"values",e,n,r,i,!0),o=w(o,"fields",e,n,r,a),o=E(o,"syncErrors",e,n,r,void 0),o=E(o,"syncWarnings",e,n,r,void 0),o=w(o,"submitErrors",e,n,r,void 0),o=w(o,"asyncErrors",e,n,r,void 0)},C=(n={},r(n,a.ARRAY_INSERT,function(t,e){var n=e.meta,r=n.field,i=n.index,o=e.payload;return T(t,r,i,0,o)}),r(n,a.ARRAY_MOVE,function(t,e){var n=e.meta,r=n.field,i=n.from,o=n.to,a=f(t,"values."+r),s=a?v(a):0,u=t;return s&&S.forEach(function(t){var e=t+"."+r;if(f(u,e)){var n=f(u,e+"["+i+"]");u=h(u,e,_(f(u,e),i,1)),u=h(u,e,_(f(u,e),o,0,n))}}),u}),r(n,a.ARRAY_POP,function(t,e){var n=e.meta.field,r=f(t,"values."+n),i=r?v(r):0;return i?T(t,n,i-1,1):t}),r(n,a.ARRAY_PUSH,function(t,e){var n=e.meta.field,r=e.payload,i=f(t,"values."+n),o=i?v(i):0;return T(t,n,o,0,r)}),r(n,a.ARRAY_REMOVE,function(t,e){var n=e.meta,r=n.field,i=n.index;return T(t,r,i,1)}),r(n,a.ARRAY_REMOVE_ALL,function(t,e){var n=e.meta.field,r=f(t,"values."+n),i=r?v(r):0;return i?T(t,n,0,i):t}),r(n,a.ARRAY_SHIFT,function(t,e){var n=e.meta.field;return T(t,n,0,1)}),r(n,a.ARRAY_SPLICE,function(t,e){var n=e.meta,r=n.field,i=n.index,o=n.removeNum,a=e.payload;return T(t,r,i,o,a)}),r(n,a.ARRAY_SWAP,function(t,e){var n=e.meta,r=n.field,i=n.indexA,o=n.indexB,a=t;return S.forEach(function(t){var e=f(a,t+"."+r+"["+i+"]"),n=f(a,t+"."+r+"["+o+"]");void 0===e&&void 0===n||(a=h(a,t+"."+r+"["+i+"]",n),a=h(a,t+"."+r+"["+o+"]",e))}),a}),r(n,a.ARRAY_UNSHIFT,function(t,e){var n=e.meta.field,r=e.payload;return T(t,n,0,0,r)}),r(n,a.AUTOFILL,function(t,e){var n=e.meta.field,r=e.payload,i=t;return i=b(i,"asyncErrors."+n),i=b(i,"submitErrors."+n),i=h(i,"fields."+n+".autofilled",!0),i=h(i,"values."+n,r)}),r(n,a.BLUR,function(t,e){var n=e.meta,r=n.field,i=n.touch,o=e.payload,a=t;return void 0===f(a,"initial."+r)&&""===o?a=b(a,"values."+r):void 0!==o&&(a=h(a,"values."+r,o)),r===f(a,"active")&&(a=d(a,"active")),a=d(a,"fields."+r+".active"),i&&(a=h(a,"fields."+r+".touched",!0),a=h(a,"anyTouched",!0)),a}),r(n,a.CHANGE,function(t,e){var n=e.meta,r=n.field,i=n.touch,o=n.persistentSubmitErrors,a=e.payload,s=t;return void 0===f(s,"initial."+r)&&""===a?s=b(s,"values."+r):void 0!==a&&(s=h(s,"values."+r,a)),s=b(s,"asyncErrors."+r),o||(s=b(s,"submitErrors."+r)),s=b(s,"fields."+r+".autofilled"),i&&(s=h(s,"fields."+r+".touched",!0),s=h(s,"anyTouched",!0)),s}),r(n,a.CLEAR_SUBMIT,function(t){return d(t,"triggerSubmit")}),r(n,a.CLEAR_SUBMIT_ERRORS,function(t){var e=t;return e=b(e,"submitErrors"),e=d(e,"error")}),r(n,a.CLEAR_ASYNC_ERROR,function(t,e){var n=e.meta.field;return d(t,"asyncErrors."+n)}),r(n,a.CLEAR_FIELDS,function(t,e){var n=e.meta,r=n.keepTouched,i=n.persistentSubmitErrors,o=n.fields,a=t;o.forEach(function(t){a=b(a,"values."+t),a=b(a,"asyncErrors."+t),i||(a=b(a,"submitErrors."+t)),a=b(a,"fields."+t+".autofilled"),r||(a=d(a,"fields."+t+".touched"))});var s=g(y(f(a,"registeredFields")),function(t){return f(a,"fields."+t+".touched")});return a=s?h(a,"anyTouched",!0):d(a,"anyTouched")}),r(n,a.FOCUS,function(t,e){var n=e.meta.field,r=t,i=f(t,"active");return r=d(r,"fields."+i+".active"),r=h(r,"fields."+n+".visited",!0),r=h(r,"fields."+n+".active",!0),r=h(r,"active",n)}),r(n,a.INITIALIZE,function(t,e){var n=e.payload,r=e.meta,i=r.keepDirty,a=r.keepSubmitSucceeded,s=r.updateUnregisteredFields,u=r.keepValues,l=m(n),d=c,v=f(t,"warning");v&&(d=h(d,"warning",v));var g=f(t,"syncWarnings");g&&(d=h(d,"syncWarnings",g));var _=f(t,"error");_&&(d=h(d,"error",_));var b=f(t,"syncErrors");b&&(d=h(d,"syncErrors",b));var x=f(t,"registeredFields");x&&(d=h(d,"registeredFields",x));var w=f(t,"values"),E=f(t,"initial"),S=l,T=w;if(i&&x){if(!o(S,E)){var C=function(t){var e=f(E,t),n=f(w,t);if(o(n,e)){var r=f(S,t);f(T,t)!==r&&(T=h(T,t,r))}};s||p(y(x),function(t){return C(t)}),p(y(S),function(t){if("undefined"===typeof f(E,t)){var e=f(S,t);T=h(T,t,e)}s&&C(t)})}}else T=S;return u&&(p(y(w),function(t){var e=f(w,t);T=h(T,t,e)}),p(y(E),function(t){var e=f(E,t);S=h(S,t,e)})),a&&f(t,"submitSucceeded")&&(d=h(d,"submitSucceeded",!0)),d=h(d,"values",T),d=h(d,"initial",S)}),r(n,a.REGISTER_FIELD,function(t,e){var n=e.payload,r=n.name,i=n.type,o="registeredFields['"+r+"']",a=f(t,o);if(a){var s=f(a,"count")+1;a=h(a,"count",s)}else a=m({name:r,type:i,count:1});return h(t,o,a)}),r(n,a.RESET,function(t){var e=c,n=f(t,"registeredFields");n&&(e=h(e,"registeredFields",n));var r=f(t,"initial");return r&&(e=h(e,"values",r),e=h(e,"initial",r)),e}),r(n,a.RESET_SECTION,function(t,e){var n=e.meta.sections,r=t;n.forEach(function(e){r=b(r,"asyncErrors."+e),r=b(r,"submitErrors."+e),r=b(r,"fields."+e);var n=f(t,"initial."+e);r=n?h(r,"values."+e,n):b(r,"values."+e)});var i=g(y(f(r,"registeredFields")),function(t){return f(r,"fields."+t+".touched")});return r=i?h(r,"anyTouched",!0):d(r,"anyTouched")}),r(n,a.SUBMIT,function(t){return h(t,"triggerSubmit",!0)}),r(n,a.START_ASYNC_VALIDATION,function(t,e){var n=e.meta.field;return h(t,"asyncValidating",n||!0)}),r(n,a.START_SUBMIT,function(t){return h(t,"submitting",!0)}),r(n,a.STOP_ASYNC_VALIDATION,function(t,e){var n=e.payload,r=t;if(r=d(r,"asyncValidating"),n&&Object.keys(n).length){var o=n._error,a=i(n,["_error"]);o&&(r=h(r,"error",o)),Object.keys(a).length&&(r=h(r,"asyncErrors",m(a)))}else r=d(r,"error"),r=d(r,"asyncErrors");return r}),r(n,a.STOP_SUBMIT,function(t,e){var n=e.payload,r=t;if(r=d(r,"submitting"),r=d(r,"submitFailed"),r=d(r,"submitSucceeded"),n&&Object.keys(n).length){var o=n._error,a=i(n,["_error"]);r=o?h(r,"error",o):d(r,"error"),r=Object.keys(a).length?h(r,"submitErrors",m(a)):d(r,"submitErrors"),r=h(r,"submitFailed",!0)}else r=d(r,"error"),r=d(r,"submitErrors");return r}),r(n,a.SET_SUBMIT_FAILED,function(t,e){var n=e.meta.fields,r=t;return r=h(r,"submitFailed",!0),r=d(r,"submitSucceeded"),r=d(r,"submitting"),n.forEach(function(t){return r=h(r,"fields."+t+".touched",!0)}),n.length&&(r=h(r,"anyTouched",!0)),r}),r(n,a.SET_SUBMIT_SUCCEEDED,function(t){var e=t;return e=d(e,"submitFailed"),e=h(e,"submitSucceeded",!0)}),r(n,a.TOUCH,function(t,e){var n=e.meta.fields,r=t;return n.forEach(function(t){return r=h(r,"fields."+t+".touched",!0)}),r=h(r,"anyTouched",!0)}),r(n,a.UNREGISTER_FIELD,function(t,e){var n=e.payload,r=n.name,i=n.destroyOnUnmount,a=t,s="registeredFields['"+r+"']",l=f(a,s);if(!l)return a;var p=f(l,"count")-1;if(p<=0&&i){a=d(a,s),o(f(a,"registeredFields"),c)&&(a=d(a,"registeredFields"));var m=f(a,"syncErrors");m&&(m=x(m,r),a=u.a.deepEqual(m,u.a.empty)?d(a,"syncErrors"):h(a,"syncErrors",m));var y=f(a,"syncWarnings");y&&(y=x(y,r),a=u.a.deepEqual(y,u.a.empty)?d(a,"syncWarnings"):h(a,"syncWarnings",y)),a=b(a,"submitErrors."+r),a=b(a,"asyncErrors."+r)}else l=h(l,"count",p),a=h(a,s,l);return a}),r(n,a.UNTOUCH,function(t,e){var n=e.meta.fields,r=t;n.forEach(function(t){return r=d(r,"fields."+t+".touched")});var i=g(y(f(r,"registeredFields")),function(t){return f(r,"fields."+t+".touched")});return r=i?h(r,"anyTouched",!0):d(r,"anyTouched")}),r(n,a.UPDATE_SYNC_ERRORS,function(t,e){var n=e.payload,r=n.syncErrors,i=n.error,o=t;return i?(o=h(o,"error",i),o=h(o,"syncError",!0)):(o=d(o,"error"),o=d(o,"syncError")),o=Object.keys(r).length?h(o,"syncErrors",r):d(o,"syncErrors")}),r(n,a.UPDATE_SYNC_WARNINGS,function(t,e){var n=e.payload,r=n.syncWarnings,i=n.warning,o=t;return o=i?h(o,"warning",i):d(o,"warning"),o=Object.keys(r).length?h(o,"syncWarnings",r):d(o,"syncWarnings")}),n),A=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,e=arguments[1],n=C[e.type];return n?n(t,e):t};return e(function(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{type:"NONE"},r=n&&n.meta&&n.meta.form;if(!r||!l(n))return e;if(n.type===a.DESTROY&&n.meta&&n.meta.form)return n.meta.form.reduce(function(t,e){return b(t,e)},e);var i=f(e,r),o=t(i,n);return o===i?e:h(e,r,o)}}(A))}var a=n(40),s=n(318),u=n(0),l=function(t){return t&&t.type&&t.type.length>a.prefix.length&&t.type.substring(0,a.prefix.length)===a.prefix};e.a=o},function(t,e,n){"use strict";function r(t){var e=t.deepEqual,n=t.empty,r=t.getIn,o=t.deleteIn,a=t.setIn;return function t(s,u){if("]"===u[u.length-1]){var l=Object(i.a)(u);l.pop();return r(s,l.join("."))?a(s,u):s}var c=s;void 0!==r(s,u)&&(c=o(s,u));var p=u.lastIndexOf(".");if(p>0){var f=u.substring(0,p);if("]"!==f[f.length-1]){var h=r(c,f);if(e(h,n))return t(c,f)}}return c}}var i=n(22);e.a=r},function(t,e,n){"use strict";var r=n(320),i=n(0);Object(r.a)(i.a)},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i=n(3),o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=function(t){var e=t.getIn;return function(t){var n=o({prop:"values",getFormState:function(t){return e(t,"form")}},t),a=n.form,s=n.prop,u=n.getFormState;return Object(i.b)(function(t){return r({},s,e(u(t),a+".values"))})}};e.a=a},function(t,e,n){"use strict";function r(t){var e=t.question,n=t.options,r=t.handleSubmit;return o.a.createElement("div",{className:"card"},o.a.createElement("h3",null,e),o.a.createElement("form",{className:"question-form",onSubmit:r},o.a.createElement(a.a,{className:"input input-form",name:"businessType",component:"select"},n.map(function(t,e){return o.a.createElement("option",{key:e},t)})),o.a.createElement("button",null,"Submit")))}var i=n(1),o=n.n(i),a=n(11);e.a=Object(a.c)({form:"wizard",destroyOnUnmount:!1,initialValues:{businessType:"Bar"},forceUnregisterOnUnmount:!0})(r)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(1),s=n.n(a),u=n(11),l=n(323),c=n.n(l),p=n(3),f=n(101),h=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),d=n(342);c.a.accessToken="pk.eyJ1IjoiYnJ1Y2V3b25nMjEiLCJhIjoiY2poZndkeTR4MWFwOTM2bmdkMmx6Mm4ybyJ9.1H2g7mh2iviU707N3mkJ4Q";var m=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.renderMap=n.renderMap.bind(n),n}return o(e,t),h(e,[{key:"renderMap",value:function(){var t=this.props,e=t.setZoningAbbreviation,n=t.setZoningDescription,r=t.changePointCoordinates,i=t.setAddress;this.map=new c.a.Map({container:"map-container",style:"style.json",center:[-121.8929,37.3351],zoom:14,maxZoom:24}),this.geocoder=new d({accessToken:c.a.accessToken}),this.map.on("load",function(){this.map.addSource("single-point",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:"point",source:"single-point",type:"circle",paint:{"circle-radius":10,"circle-color":"#007cbf"}})}.bind(this)),this.map.on("click",function(t){var r=t.point,i=this.map.queryRenderedFeatures(r,{layers:["zoning-201804191549049432-8zfao8"]}),o=i[0].properties,a=o.ZONING,s=o.ZONINGABBR;n(a),e(s)}.bind(this)),this.geocoder.on("result",function(t){var o=this;this.map.getSource("single-point").setData(t.result.geometry),i({address:t.result.place_name,name:t.result.text}),this.map.once("moveend",function(i){var a=t.result.geometry.coordinates[0],s=t.result.geometry.coordinates[1],u=[a,s],l=o.map.project(u);r(l);var c=o.map.queryRenderedFeatures(l,{layers:["zoning-201804191549049432-8zfao8"]});if(c[0]){var p=c[0].properties,f=p.ZONING,h=p.ZONINGABBR;n(f),e(h)}})}.bind(this)),this.geocoder.on("result",function(t){this.map.getSource("single-point").setData(t.result.geometry)}.bind(this)),document.getElementById("geocoder-container").appendChild(this.geocoder.onAdd(this.map))}},{key:"componentDidMount",value:function(){this.renderMap()}},{key:"render",value:function(){var t=this.props,e=t.handleSubmit,n=t.question,r=t.zoningDescription,i=t.zoningAbbreviation,o=t.address,a=t.addressName;return s.a.createElement("div",{className:"address-form"},s.a.createElement("div",{className:"card"},s.a.createElement("div",{className:"address-form__field"},s.a.createElement("h3",null,n),s.a.createElement("div",{id:"geocoder-container"}))),s.a.createElement("div",{className:"card card--no-paddding"},s.a.createElement("div",{id:"map-container",style:{display:"flex",flexAlign:"center",height:"300px"}}),s.a.createElement("div",{className:"card__body"},s.a.createElement("div",{className:"address-form__results"},s.a.createElement("table",null,s.a.createElement("thead",null,s.a.createElement("tr",null,s.a.createElement("th",null,"Place"),s.a.createElement("th",null,"Zone Description"),s.a.createElement("th",null,"Zone Abbreviation"),s.a.createElement("th",null,"Address"))),s.a.createElement("tbody",null,s.a.createElement("tr",null,s.a.createElement("td",null,a," "),s.a.createElement("td",null,r),s.a.createElement("td",null,i),s.a.createElement("td",null,o)))))),s.a.createElement("form",{onSubmit:e},s.a.createElement(u.a,{name:"businessAddress",component:"hidden"}),s.a.createElement("button",null,"Next"))))}}]),e}(a.Component),y=function(t){return{zoningAbbreviation:t.map.zoningAbbreviation,zoningDescription:t.map.zoningDescription,point:t.map.point,address:t.map.address,addressName:t.map.name}},v=function(t){return{changePointCoordinates:function(e){t(Object(f.f)(e))},changeCenterCoordinates:function(e){t(Object(f.e)(e))},setZoningDescription:function(e){t(Object(f.i)(e))},setZoningAbbreviation:function(e){t(Object(f.h)(e))},setAddress:function(e){return t(Object(f.g)(e))}}},g=Object(p.b)(y,v)(m);e.a=Object(u.c)({form:"wizard",destroyOnUnmount:!1,forceUnregisterOnUnmount:!0})(g)},function(t,e,n){(function(e){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t,e){if(n)if(r){var o="var sharedChunk = {}; ("+n+")(sharedChunk); ("+r+")(sharedChunk);",a={};n(a),i=e(a),i.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))}else r=e;else n=e}var n,r,i;return t(["exports"],function(t){function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function r(t,e){return t(e={exports:{}},e.exports),e.exports}function i(t,e,n,r){this.cx=3*t,this.bx=3*(n-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=n,this.p2y=r}function o(t,e){this.x=t,this.y=e}function a(t,e,n,r){var i=new Ln(t,e,n,r);return function(t){return i.solve(t)}}function s(t,e,n){return Math.min(n,Math.max(e,t))}function u(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var r=0,i=e;r<i.length;r+=1){var o=i[r];for(var a in o)t[a]=o[a]}return t}function l(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})}function c(t,e){return-1!==t.indexOf(e,t.length-e.length)}function p(t,e,n){var r={};for(var i in t)r[i]=e.call(n||this,t[i],i,t);return r}function f(t,e,n){var r={};for(var i in t)e.call(n||this,t[i],i,t)&&(r[i]=t[i]);return r}function h(t){return Array.isArray(t)?t.map(h):"object"==typeof t&&t?p(t,h):t}function d(t){Un[t]||("undefined"!=typeof console&&console.warn(t),Un[t]=!0)}function m(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)}function y(t){for(var e=0,n=0,r=t.length,i=r-1,o=void 0,a=void 0;n<r;i=n++)o=t[n],e+=((a=t[i]).x-o.x)*(o.y+a.y);return e}function v(t){var e=new self.XMLHttpRequest;for(var n in e.open("GET",t.url,!0),t.headers)e.setRequestHeader(n,t.headers[n]);return e.withCredentials="include"===t.credentials,e}function g(t,e,n){n[t]=n[t]||[],n[t].push(e)}function _(t,e,n){if(n&&n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}function b(t){var e=t.key,n=t.value;return n?[new Xn(e,n,"constants have been deprecated as of v8")]:[]}function x(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var r=0,i=e;r<i.length;r+=1){var o=i[r];for(var a in o)t[a]=o[a]}return t}function w(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function E(t){return Array.isArray(t)?t.map(E):w(t)}function S(t,e){return{kind:"array",itemType:t,N:e}}function T(t){if("array"===t.kind){var e=T(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}function C(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&!C(t.itemType,e.itemType)&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var n=0,r=sr;n<r.length;n+=1)if(!C(r[n],e))return null}return"Expected "+T(t)+" but found "+T(e)+" instead."}function A(t,e,n,r){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof n&&n>=0&&n<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value ["+[t,e,n,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof r?[t,e,n,r]:[t,e,n]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function O(t){if(null===t)return Qn;if("string"==typeof t)return er;if("boolean"==typeof t)return nr;if("number"==typeof t)return tr;if(t instanceof lr)return rr;if(t instanceof cr)return ar;if(Array.isArray(t)){for(var e,n=t.length,r=0,i=t;r<i.length;r+=1){var o=O(i[r]);if(e){if(e===o)continue;e=or;break}e=o}return S(e||or,n)}return ir}function k(t){if(t instanceof wr){if("get"===t.name&&1===t.args.length)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}var e=!0;return t.eachChild(function(t){e&&!k(t)&&(e=!1)}),e}function I(t,e){if(t instanceof wr&&e.indexOf(t.name)>=0)return!1;var n=!0;return t.eachChild(function(t){n&&!I(t,e)&&(n=!1)}),n}function P(t,e){for(var n,r,i=0,o=t.length-1,a=0;i<=o;){if(n=t[a=Math.floor((i+o)/2)],r=t[a+1],e===n||e>n&&e<r)return a;if(n<e)i=a+1;else{if(!(n>e))throw new hr("Input is not a number.");o=a-1}}return Math.max(a-1,0)}function z(t,e,n){return t*(1-n)+e*n}function R(t,e,n,r){var i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}function M(t){return"string"===t.kind||"number"===t.kind||"boolean"===t.kind||"null"===t.kind}function j(t,e){return function(){function n(t,e,n){this.type=nr,this.lhs=t,this.rhs=e,this.collator=n}return n.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var r=e.parse(t[1],1,or);if(!r)return null;var i=e.parse(t[2],2,or);if(!i)return null;if(!M(r.type)&&!M(i.type))return e.error("Expected at least one argument to be a string, number, boolean, or null, but found ("+T(r.type)+", "+T(i.type)+") instead.");if(r.type.kind!==i.type.kind&&"value"!==r.type.kind&&"value"!==i.type.kind)return e.error("Cannot compare "+T(r.type)+" and "+T(i.type)+".");var o=null;if(4===t.length){if("string"!==r.type.kind&&"string"!==i.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(o=e.parse(t[3],3,ar)))return null}return new n(r,i,o)},n.prototype.evaluate=function(t){var n=this.collator?0===this.collator.evaluate(t).compare(this.lhs.evaluate(t),this.rhs.evaluate(t)):this.lhs.evaluate(t)===this.rhs.evaluate(t);return e?!n:n},n.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},n.prototype.possibleOutputs=function(){return[!0,!1]},n.prototype.serialize=function(){var e=[t];return this.eachChild(function(t){e.push(t.serialize())}),e},n}()}function D(t,e){var n=e[0],r=e[1],i=e[2],o=e[3];n=n.evaluate(t),r=r.evaluate(t),i=i.evaluate(t);var a=o?o.evaluate(t):1,s=A(n,r,i,a);if(s)throw new hr(s);return new lr(n/255*a,r/255*a,i/255*a,a)}function L(t,e){return t in e}function F(t,e){var n=e[t];return void 0===n?null:n}function B(t,e){var n=e[0],r=e[1];return n.evaluate(t)<r.evaluate(t)}function N(t,e){var n=e[0],r=e[1];return n.evaluate(t)>r.evaluate(t)}function V(t,e){var n=e[0],r=e[1];return n.evaluate(t)<=r.evaluate(t)}function U(t,e){var n=e[0],r=e[1];return n.evaluate(t)>=r.evaluate(t)}function q(t){return{type:t}}function W(t){return{result:"success",value:t}}function $(t){return{result:"error",value:t}}function Z(t){return t>qr?Math.pow(t,1/3):t/Ur+Nr}function G(t){return t>Vr?t*t*t:Ur*(t-Nr)}function H(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function K(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function X(t){var e=K(t.r),n=K(t.g),r=K(t.b),i=Z((.4124564*e+.3575761*n+.1804375*r)/Lr),o=Z((.2126729*e+.7151522*n+.072175*r)/Fr);return{l:116*o-16,a:500*(i-o),b:200*(o-Z((.0193339*e+.119192*n+.9503041*r)/Br)),alpha:t.a}}function Y(t){var e=(t.l+16)/116,n=isNaN(t.a)?e:e+t.a/500,r=isNaN(t.b)?e:e-t.b/200;return e=Fr*G(e),n=Lr*G(n),r=Br*G(r),new lr(H(3.2404542*n-1.5371385*e-.4985314*r),H(-.969266*n+1.8760108*e+.041556*r),H(.0556434*n-.2040259*e+1.0572252*r),t.alpha)}function J(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Q(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function tt(t){return t}function et(t,e,n){return void 0!==t?t:void 0!==e?e:void 0!==n?n:void 0}function nt(t,e,n,r,i){return et(typeof n===i?r[n]:void 0,t.default,e.default)}function rt(t,e,n){if("number"!==J(n))return et(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[r-1][0])return t.stops[r-1][1];var i=at(t.stops,n);return t.stops[i][1]}function it(t,e,n){var r=void 0!==t.base?t.base:1;if("number"!==J(n))return et(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[i-1][0])return t.stops[i-1][1];var o=at(t.stops,n),a=function(t,e,n,r){var i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}(n,r,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],u=t.stops[o+1][1],l=Cr[e.type]||tt;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=Hr[t.colorSpace];l=function(t,e){return c.reverse(c.interpolate(c.forward(t),c.forward(e),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=s.evaluate.apply(void 0,t),r=u.evaluate.apply(void 0,t);if(void 0!==n&&void 0!==r)return l(n,r,a)}}:l(s,u,a)}function ot(t,e,n){return"color"===e.type?n=lr.parse(n):J(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),et(n,t.default,e.default)}function at(t,e){for(var n,r,i=0,o=t.length-1,a=0;i<=o;){if(n=t[a=Math.floor((i+o)/2)][0],r=t[a+1][0],e===n||e>n&&e<r)return a;n<e?i=a+1:n>e&&(o=a-1)}return Math.max(a-1,0)}function st(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Dr}function ut(t,e){var n=new Sr(Dr,[],function(t){var e={color:rr,string:er,number:tr,enum:er,boolean:nr};return"array"===t.type?S(e[t.value]||or,t.length):e[t.type]||null}(e)),r=n.parse(t);return r?W(new Kr(r,e)):$(n.errors)}function lt(t,e){if("error"===(t=ut(t,e)).result)return t;var n=t.value.expression,r=k(n);if(!r&&!e["property-function"])return $([new Yn("","property expressions not supported")]);var i=I(n,["zoom"]);if(!i&&!1===e["zoom-function"])return $([new Yn("","zoom expressions not supported")]);var o=function t(e){var n=null;if(e instanceof kr)n=t(e.result);else if(e instanceof Or)for(var r=0,i=e.args;r<i.length;r+=1){var o=i[r];if(n=t(o))break}else(e instanceof Tr||e instanceof Ar)&&e.input instanceof wr&&"zoom"===e.input.name&&(n=e);return n instanceof Yn?n:(e.eachChild(function(e){var r=t(e);r instanceof Yn?n=r:!n&&r?n=new Yn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):n&&r&&n!==r&&(n=new Yn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),n)}(n);return o||i?o instanceof Yn?$([o]):o instanceof Ar&&"piecewise-constant"===e.function?$([new Yn("",'"interpolate" expressions cannot be used with this property')]):W(o?new Yr(r?"camera":"composite",t.value,o):new Xr(r?"constant":"source",t.value)):$([new Yn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}function ct(t,e){if(Q(t))return new Jr(t,e);if(st(t)){var n=lt(t,e);if("error"===n.result)throw new Error(n.value.map(function(t){return t.key+": "+t.message}).join(", "));return n.value}var r=t;return"string"==typeof t&&"color"===e.type&&(r=lr.parse(t)),{kind:"constant",evaluate:function(){return r}}}function pt(t){var e=t.key,n=t.value,r=t.valueSpec||{},i=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],u=J(n);if("object"!==u)return[new Xn(e,n,"object expected, "+u+" found")];for(var l in n){var c=l.split(".")[0],p=r[c]||r["*"],f=void 0;if(i[c])f=i[c];else if(r[c])f=Rt;else if(i["*"])f=i["*"];else{if(!r["*"]){s.push(new Xn(e,n[l],'unknown property "'+l+'"'));continue}f=Rt}s=s.concat(f({key:(e?e+".":e)+l,value:n[l],valueSpec:p,style:o,styleSpec:a,object:n,objectKey:l},n))}for(var h in r)i[h]||r[h].required&&void 0===r[h].default&&void 0===n[h]&&s.push(new Xn(e,n,'missing required property "'+h+'"'));return s}function ft(t){var e=t.value,n=t.valueSpec,r=t.style,i=t.styleSpec,o=t.key,a=t.arrayElementValidator||Rt;if("array"!==J(e))return[new Xn(o,e,"array expected, "+J(e)+" found")];if(n.length&&e.length!==n.length)return[new Xn(o,e,"array length "+n.length+" expected, length "+e.length+" found")];if(n["min-length"]&&e.length<n["min-length"])return[new Xn(o,e,"array length at least "+n["min-length"]+" expected, length "+e.length+" found")];var s={type:n.value};i.$version<7&&(s.function=n.function),"object"===J(n.value)&&(s=n.value);for(var u=[],l=0;l<e.length;l++)u=u.concat(a({array:e,arrayIndex:l,value:e[l],valueSpec:s,style:r,styleSpec:i,key:o+"["+l+"]"}));return u}function ht(t){var e=t.key,n=t.value,r=t.valueSpec,i=J(n);return"number"!==i?[new Xn(e,n,"number expected, "+i+" found")]:"minimum"in r&&n<r.minimum?[new Xn(e,n,n+" is less than the minimum value "+r.minimum)]:"maximum"in r&&n>r.maximum?[new Xn(e,n,n+" is greater than the maximum value "+r.maximum)]:[]}function dt(t){function e(t){var e=[],r=t.value,s=t.key;if("array"!==J(r))return[new Xn(s,r,"array expected, "+J(r)+" found")];if(2!==r.length)return[new Xn(s,r,"array length 2 expected, length "+r.length+" found")];if(p){if("object"!==J(r[0]))return[new Xn(s,r,"object expected, "+J(r[0])+" found")];if(void 0===r[0].zoom)return[new Xn(s,r,"object stop key must have zoom")];if(void 0===r[0].value)return[new Xn(s,r,"object stop key must have value")];if(o&&o>w(r[0].zoom))return[new Xn(s,r[0].zoom,"stop zoom values must appear in ascending order")];w(r[0].zoom)!==o&&(o=w(r[0].zoom),i=void 0,u={}),e=e.concat(pt({key:s+"[0]",value:r[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:ht,value:n}}))}else e=e.concat(n({key:s+"[0]",value:r[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},r));return e.concat(Rt({key:s+"[1]",value:r[1],valueSpec:a,style:t.style,styleSpec:t.styleSpec}))}function n(t,e){var n=J(t.value),o=w(t.value),l=null!==t.value?t.value:e;if(r){if(n!==r)return[new Xn(t.key,l,n+" stop domain type must match previous stop domain type "+r)]}else r=n;if("number"!==n&&"string"!==n&&"boolean"!==n)return[new Xn(t.key,l,"stop domain value must be a number, string, or boolean")];if("number"!==n&&"categorical"!==s){var c="number expected, "+n+" found";return a["property-function"]&&void 0===s&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Xn(t.key,l,c)]}return"categorical"!==s||"number"!==n||isFinite(o)&&Math.floor(o)===o?"categorical"!==s&&"number"===n&&void 0!==i&&o<i?[new Xn(t.key,l,"stop domain values must appear in ascending order")]:(i=o,"categorical"===s&&o in u?[new Xn(t.key,l,"stop domain values must be unique")]:(u[o]=!0,[])):[new Xn(t.key,l,"integer expected, found "+o)]}var r,i,o,a=t.valueSpec,s=w(t.value.type),u={},l="categorical"!==s&&void 0===t.value.property,c=!l,p="array"===J(t.value.stops)&&"array"===J(t.value.stops[0])&&"object"===J(t.value.stops[0][0]),f=pt({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===s)return[new Xn(t.key,t.value,'identity function may not have a "stops" property')];var n=[],r=t.value;return n=n.concat(ft({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:e})),"array"===J(r)&&0===r.length&&n.push(new Xn(t.key,r,"array must have at least one stop")),n},default:function(t){return Rt({key:t.key,value:t.value,valueSpec:a,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===s&&l&&f.push(new Xn(t.key,t.value,'missing required property "property"')),"identity"===s||t.value.stops||f.push(new Xn(t.key,t.value,'missing required property "stops"')),"exponential"===s&&"piecewise-constant"===t.valueSpec.function&&f.push(new Xn(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(c&&!t.valueSpec["property-function"]?f.push(new Xn(t.key,t.value,"property functions not supported")):l&&!t.valueSpec["zoom-function"]&&"heatmap-color"!==t.objectKey&&"line-gradient"!==t.objectKey&&f.push(new Xn(t.key,t.value,"zoom functions not supported"))),"categorical"!==s&&!p||void 0!==t.value.property||f.push(new Xn(t.key,t.value,'"property" property is required')),f}function mt(t){var e=("property"===t.expressionContext?lt:ut)(E(t.value),t.valueSpec);return"error"===e.result?e.value.map(function(e){return new Xn(""+t.key+e.key,t.value,e.message)}):"property"===t.expressionContext&&"text-font"===t.propertyKey&&-1!==e.value._styleExpression.expression.possibleOutputs().indexOf(void 0)?[new Xn(t.key,t.value,'Invalid data expression for "text-font". Output values must be contained as literals within the expression.')]:[]}function yt(t){var e=t.key,n=t.value,r=t.valueSpec,i=[];return Array.isArray(r.values)?-1===r.values.indexOf(w(n))&&i.push(new Xn(e,n,"expected one of ["+r.values.join(", ")+"], "+JSON.stringify(n)+" found")):-1===Object.keys(r.values).indexOf(w(n))&&i.push(new Xn(e,n,"expected one of ["+Object.keys(r.values).join(", ")+"], "+JSON.stringify(n)+" found")),i}function vt(t){if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3===t.length&&(Array.isArray(t[1])||Array.isArray(t[2]));case"any":case"all":for(var e=0,n=t.slice(1);e<n.length;e+=1){var r=n[e];if(!vt(r)&&"boolean"!=typeof r)return!1}return!0;default:return!0}}function gt(t){if(!t)return function(){return!0};vt(t)||(t=bt(t));var e=ut(t,Qr);if("error"===e.result)throw new Error(e.value.map(function(t){return t.key+": "+t.message}).join(", "));return function(t,n){return e.value.evaluate(t,n)}}function _t(t,e){return t<e?-1:t>e?1:0}function bt(t){if(!t)return!0;var e,n=t[0];return t.length<=1?"any"!==n:"=="===n?xt(t[1],t[2],"=="):"!="===n?St(xt(t[1],t[2],"==")):"<"===n||">"===n||"<="===n||">="===n?xt(t[1],t[2],n):"any"===n?(e=t.slice(1),["any"].concat(e.map(bt))):"all"===n?["all"].concat(t.slice(1).map(bt)):"none"===n?["all"].concat(t.slice(1).map(bt).map(St)):"in"===n?wt(t[1],t.slice(2)):"!in"===n?St(wt(t[1],t.slice(2))):"has"===n?Et(t[1]):"!has"!==n||St(Et(t[1]))}function xt(t,e,n){switch(t){case"$type":return["filter-type-"+n,e];case"$id":return["filter-id-"+n,e];default:return["filter-"+n,t,e]}}function wt(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(function(t){return typeof t!=typeof e[0]})?["filter-in-large",t,["literal",e.sort(_t)]]:["filter-in-small",t,["literal",e]]}}function Et(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function St(t){return["!",t]}function Tt(t){return vt(E(t.value))?mt(x({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var n=e.value,r=e.key;if("array"!==J(n))return[new Xn(r,n,"array expected, "+J(n)+" found")];var i,o=e.styleSpec,a=[];if(n.length<1)return[new Xn(r,n,"filter array must have at least 1 element")];switch(a=a.concat(yt({key:r+"[0]",value:n[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),w(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===w(n[1])&&a.push(new Xn(r,n,'"$type" cannot be use with operator "'+n[0]+'"'));case"==":case"!=":3!==n.length&&a.push(new Xn(r,n,'filter array for operator "'+n[0]+'" must have 3 elements'));case"in":case"!in":n.length>=2&&"string"!==(i=J(n[1]))&&a.push(new Xn(r+"[1]",n[1],"string expected, "+i+" found"));for(var s=2;s<n.length;s++)i=J(n[s]),"$type"===w(n[1])?a=a.concat(yt({key:r+"["+s+"]",value:n[s],valueSpec:o.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==i&&"number"!==i&&"boolean"!==i&&a.push(new Xn(r+"["+s+"]",n[s],"string, number, or boolean expected, "+i+" found"));break;case"any":case"all":case"none":for(var u=1;u<n.length;u++)a=a.concat(t({key:r+"["+u+"]",value:n[u],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":i=J(n[1]),2!==n.length?a.push(new Xn(r,n,'filter array for "'+n[0]+'" operator must have 2 elements')):"string"!==i&&a.push(new Xn(r+"[1]",n[1],"string expected, "+i+" found"))}return a}(t)}function Ct(t,e){var n=t.key,r=t.style,i=t.styleSpec,o=t.value,a=t.objectKey,s=i[e+"_"+t.layerType];if(!s)return[];var u=a.match(/^(.*)-transition$/);if("paint"===e&&u&&s[u[1]]&&s[u[1]].transition)return Rt({key:n,value:o,valueSpec:i.transition,style:r,styleSpec:i});var l,c=t.valueSpec||s[a];if(!c)return[new Xn(n,o,'unknown property "'+a+'"')];if("string"===J(o)&&c["property-function"]&&!c.tokens&&(l=/^{([^}]+)}$/.exec(o)))return[new Xn(n,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(l[1])+" }`.")];var p=[];return"symbol"===t.layerType&&("text-field"===a&&r&&!r.glyphs&&p.push(new Xn(n,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&Q(E(o))&&"identity"===w(o.type)&&p.push(new Xn(n,o,'"text-font" does not support identity functions'))),p.concat(Rt({key:t.key,value:o,valueSpec:c,style:r,styleSpec:i,expressionContext:"property",propertyKey:a}))}function At(t){return Ct(t,"paint")}function Ot(t){return Ct(t,"layout")}function kt(t){var e=[],n=t.value,r=t.key,i=t.style,o=t.styleSpec;n.type||n.ref||e.push(new Xn(r,n,'either "type" or "ref" is required'));var a,s=w(n.type),u=w(n.ref);if(n.id)for(var l=w(n.id),c=0;c<t.arrayIndex;c++){var p=i.layers[c];w(p.id)===l&&e.push(new Xn(r,n.id,'duplicate layer id "'+n.id+'", previously used at line '+p.id.__line__))}if("ref"in n)["type","source","source-layer","filter","layout"].forEach(function(t){t in n&&e.push(new Xn(r,n[t],'"'+t+'" is prohibited for ref layers'))}),i.layers.forEach(function(t){w(t.id)===u&&(a=t)}),a?a.ref?e.push(new Xn(r,n.ref,"ref cannot reference another ref layer")):s=w(a.type):e.push(new Xn(r,n.ref,'ref layer "'+u+'" not found'));else if("background"!==s)if(n.source){var f=i.sources&&i.sources[n.source],h=f&&w(f.type);f?"vector"===h&&"raster"===s?e.push(new Xn(r,n.source,'layer "'+n.id+'" requires a raster source')):"raster"===h&&"raster"!==s?e.push(new Xn(r,n.source,'layer "'+n.id+'" requires a vector source')):"vector"!==h||n["source-layer"]?"raster-dem"===h&&"hillshade"!==s?e.push(new Xn(r,n.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!n.paint||!n.paint["line-gradient"]||"geojson"===h&&f.lineMetrics||e.push(new Xn(r,n,'layer "'+n.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new Xn(r,n,'layer "'+n.id+'" must specify a "source-layer"')):e.push(new Xn(r,n.source,'source "'+n.source+'" not found'))}else e.push(new Xn(r,n,'missing required property "source"'));return e=e.concat(pt({key:r,value:n,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Rt({key:r+".type",value:n.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:n,objectKey:"type"})},filter:Tt,layout:function(t){return pt({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Ot(x({layerType:s},t))}}})},paint:function(t){return pt({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return At(x({layerType:s},t))}}})}}}))}function It(t){var e=t.value,n=t.key,r=t.styleSpec,i=t.style;if(!e.type)return[new Xn(n,e,'"type" is required')];var o=w(e.type),a=[];switch(o){case"vector":case"raster":case"raster-dem":if(a=a.concat(pt({key:n,value:e,valueSpec:r["source_"+o.replace("-","_")],style:t.style,styleSpec:r})),"url"in e)for(var s in e)["type","url","tileSize"].indexOf(s)<0&&a.push(new Xn(n+"."+s,e[s],'a source with a "url" property may not include a "'+s+'" property'));return a;case"geojson":return pt({key:n,value:e,valueSpec:r.source_geojson,style:i,styleSpec:r});case"video":return pt({key:n,value:e,valueSpec:r.source_video,style:i,styleSpec:r});case"image":return pt({key:n,value:e,valueSpec:r.source_image,style:i,styleSpec:r});case"canvas":return a.push(new Xn(n,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")),a;default:return yt({key:n+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,styleSpec:r})}}function Pt(t){var e=t.value,n=t.styleSpec,r=n.light,i=t.style,o=[],a=J(e);if(void 0===e)return o;if("object"!==a)return o=o.concat([new Xn("light",e,"object expected, "+a+" found")]);for(var s in e){var u=s.match(/^(.*)-transition$/);o=u&&r[u[1]]&&r[u[1]].transition?o.concat(Rt({key:s,value:e[s],valueSpec:n.transition,style:i,styleSpec:n})):r[s]?o.concat(Rt({key:s,value:e[s],valueSpec:r[s],style:i,styleSpec:n})):o.concat([new Xn(s,e[s],'unknown property "'+s+'"')])}return o}function zt(t){var e=t.value,n=t.key,r=J(e);return"string"!==r?[new Xn(n,e,"string expected, "+r+" found")]:[]}function Rt(t){var e=t.value,n=t.valueSpec,r=t.styleSpec;return n.function&&Q(w(e))?dt(t):n.function&&st(E(e))?mt(t):n.type&&ti[n.type]?ti[n.type](t):pt(x({},t,{valueSpec:n.type?r[n.type]:n}))}function Mt(t){var e=t.value,n=t.key,r=zt(t);return r.length?r:(-1===e.indexOf("{fontstack}")&&r.push(new Xn(n,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&r.push(new Xn(n,e,'"glyphs" url must include a "{range}" token')),r)}function jt(t,e){e=e||Kn;var n=[];return n=n.concat(Rt({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Mt,"*":function(){return[]}}})),t.constants&&(n=n.concat(b({key:"constants",value:t.constants,style:t,styleSpec:e}))),Dt(n)}function Dt(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function Lt(t){return function(){return Dt(t.apply(this,arguments))}}function Ft(t,e){var n=!1;if(e&&e.length)for(var r=0,i=e;r<i.length;r+=1){var o=i[r];t.fire(new Gn(new Error(o.message))),n=!0}return n}function Bt(t,e,n){var r=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var i=new Int32Array(this.arrayBuffer);t=i[0],e=i[1],n=i[2],this.d=e+2*n;for(var o=0;o<this.d*this.d;o++){var a=i[ai+o],s=i[ai+o+1];r.push(a===s?null:i.subarray(a,s))}var u=i[ai+r.length],l=i[ai+r.length+1];this.keys=i.subarray(u,l),this.bboxes=i.subarray(l),this.insert=this._insertReadonly}else{this.d=e+2*n;for(var c=0;c<this.d*this.d;c++)r.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=n,this.scale=e/t,this.uid=0;var p=n/e*t;this.min=-p,this.max=t+p}function Nt(t,e,n){void 0===n&&(n={}),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),ui[t]={klass:e,omit:n.omit||[],shallow:n.shallow||[]}}function Vt(t,e){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(t instanceof ArrayBuffer)return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var n=t;return e&&e.push(n.buffer),n}if(t instanceof si)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var r=[],i=0,o=t;i<o.length;i+=1){var a=o[i];r.push(Vt(a,e))}return r}if("object"==typeof t){var s=t.constructor,u=s._classRegistryKey;if(!u)throw new Error("can't serialize object of unregistered class");var l={};if(s.serialize)l._serialized=s.serialize(t,e);else{for(var c in t)if(t.hasOwnProperty(c)&&!(ui[u].omit.indexOf(c)>=0)){var p=t[c];l[c]=ui[u].shallow.indexOf(c)>=0?p:Vt(p,e)}t instanceof Error&&(l.message=t.message)}return{name:u,properties:l}}throw new Error("can't serialize object of type "+typeof t)}function Ut(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof si)return t;if(Array.isArray(t))return t.map(function(t){return Ut(t)});if("object"==typeof t){var e=t,n=e.name,r=e.properties;if(!n)throw new Error("can't deserialize object of anonymous class");var i=ui[n].klass;if(!i)throw new Error("can't deserialize unregistered class "+n);if(i.deserialize)return i.deserialize(r._serialized);for(var o=Object.create(i.prototype),a=0,s=Object.keys(r);a<s.length;a+=1){var u=s[a];o[u]=ui[n].shallow.indexOf(u)>=0?r[u]:Ut(r[u])}return o}throw new Error("can't deserialize object of type "+typeof t)}function qt(t){for(var e=0,n=t;e<n.length;e+=1)if($t(n[e].charCodeAt(0)))return!0;return!1}function Wt(t){return!fi.Arabic(t)&&!fi["Arabic Supplement"](t)&&!fi["Arabic Extended-A"](t)&&!fi["Arabic Presentation Forms-A"](t)&&!fi["Arabic Presentation Forms-B"](t)}function $t(t){return 746===t||747===t||!(t<4352)&&(!!fi["Bopomofo Extended"](t)||!!fi.Bopomofo(t)||!(!fi["CJK Compatibility Forms"](t)||t>=65097&&t<=65103)||!!fi["CJK Compatibility Ideographs"](t)||!!fi["CJK Compatibility"](t)||!!fi["CJK Radicals Supplement"](t)||!!fi["CJK Strokes"](t)||!(!fi["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||!!fi["CJK Unified Ideographs Extension A"](t)||!!fi["CJK Unified Ideographs"](t)||!!fi["Enclosed CJK Letters and Months"](t)||!!fi["Hangul Compatibility Jamo"](t)||!!fi["Hangul Jamo Extended-A"](t)||!!fi["Hangul Jamo Extended-B"](t)||!!fi["Hangul Jamo"](t)||!!fi["Hangul Syllables"](t)||!!fi.Hiragana(t)||!!fi["Ideographic Description Characters"](t)||!!fi.Kanbun(t)||!!fi["Kangxi Radicals"](t)||!!fi["Katakana Phonetic Extensions"](t)||!(!fi.Katakana(t)||12540===t)||!(!fi["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!fi["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||!!fi["Unified Canadian Aboriginal Syllabics"](t)||!!fi["Unified Canadian Aboriginal Syllabics Extended"](t)||!!fi["Vertical Forms"](t)||!!fi["Yijing Hexagram Symbols"](t)||!!fi["Yi Syllables"](t)||!!fi["Yi Radicals"](t))}function Zt(t){return!($t(t)||function(t){return!!(fi["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||fi["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||fi["Letterlike Symbols"](t)||fi["Number Forms"](t)||fi["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||fi["Control Pictures"](t)&&9251!==t||fi["Optical Character Recognition"](t)||fi["Enclosed Alphanumerics"](t)||fi["Geometric Shapes"](t)||fi["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||fi["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||fi["CJK Symbols and Punctuation"](t)||fi.Katakana(t)||fi["Private Use Area"](t)||fi["CJK Compatibility Forms"](t)||fi["Small Form Variants"](t)||fi["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function Gt(t,e){return!(!e&&(t>=1424&&t<=2303||fi["Arabic Presentation Forms-A"](t)||fi["Arabic Presentation Forms-B"](t)))&&!(t>=2304&&t<=3583||t>=3840&&t<=4255||fi.Khmer(t))}function Ht(t,e){void 0===e&&(e=1);var n=0,r=0;return{members:t.map(function(t){var i,o=(i=t.type,Ri[i].BYTES_PER_ELEMENT),a=n=Kt(n,Math.max(e,o)),s=t.components||1;return r=Math.max(r,o),n+=o*s,{name:t.name,type:t.type,components:s,offset:a}}),size:Kt(n,Math.max(r,e)),alignment:e}}function Kt(t,e){return Math.ceil(t/e)*e}function Xt(t){return[fo(255*t.r,255*t.g),fo(255*t.b,255*t.a)]}function Yt(t,e){return{"text-opacity":"opacity","icon-opacity":"opacity","text-color":"fill_color","icon-color":"fill_color","text-halo-color":"halo_color","icon-halo-color":"halo_color","text-halo-blur":"halo_blur","icon-halo-blur":"halo_blur","text-halo-width":"halo_width","icon-halo-width":"halo_width","line-gap-width":"gapwidth"}[t]||t.replace(e+"-","").replace(/-/g,"_")}function Jt(t){for(var e=bo/t.extent,n=t.loadGeometry(),r=0;r<n.length;r++)for(var i=n[r],o=0;o<i.length;o++){var a=i[o];a.x=Math.round(a.x*e),a.y=Math.round(a.y*e),(a.x<xo.min||a.x>xo.max||a.y<xo.min||a.y>xo.max)&&d("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return n}function Qt(t,e,n,r,i){t.emplaceBack(2*e+(r+1)/2,2*n+(i+1)/2)}function te(t,e,n){for(var r=0;r<t.length;r++){var i=t[r];if(le(i,e))return!0;if(ae(e,i,n))return!0}return!1}function ee(t,e){if(1===t.length&&1===t[0].length)return ue(e,t[0][0]);for(var n=0;n<e.length;n++)for(var r=e[n],i=0;i<r.length;i++)if(ue(t,r[i]))return!0;for(var o=0;o<t.length;o++){for(var a=t[o],s=0;s<a.length;s++)if(ue(e,a[s]))return!0;for(var u=0;u<e.length;u++)if(ie(a,e[u]))return!0}return!1}function ne(t,e,n){for(var r=0;r<e.length;r++)for(var i=e[r],o=0;o<t.length;o++){var a=t[o];if(a.length>=3)for(var s=0;s<i.length;s++)if(le(a,i[s]))return!0;if(re(a,i,n))return!0}return!1}function re(t,e,n){if(t.length>1){if(ie(t,e))return!0;for(var r=0;r<e.length;r++)if(ae(e[r],t,n))return!0}for(var i=0;i<t.length;i++)if(ae(t[i],e,n))return!0;return!1}function ie(t,e){if(0===t.length||0===e.length)return!1;for(var n=0;n<t.length-1;n++)for(var r=t[n],i=t[n+1],o=0;o<e.length-1;o++)if(oe(r,i,e[o],e[o+1]))return!0;return!1}function oe(t,e,n,r){return m(t,n,r)!==m(e,n,r)&&m(t,e,n)!==m(t,e,r)}function ae(t,e,n){var r=n*n;if(1===e.length)return t.distSqr(e[0])<r;for(var i=1;i<e.length;i++)if(se(t,e[i-1],e[i])<r)return!0;return!1}function se(t,e,n){var r=e.distSqr(n);if(0===r)return t.distSqr(e);var i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/r;return i<0?t.distSqr(e):i>1?t.distSqr(n):t.distSqr(n.sub(e)._mult(i)._add(e))}function ue(t,e){for(var n,r,i,o=!1,a=0;a<t.length;a++)for(var s=0,u=(n=t[a]).length-1;s<n.length;u=s++)r=n[s],i=n[u],r.y>e.y!=i.y>e.y&&e.x<(i.x-r.x)*(e.y-r.y)/(i.y-r.y)+r.x&&(o=!o);return o}function le(t,e){for(var n=!1,r=0,i=t.length-1;r<t.length;i=r++){var o=t[r],a=t[i];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(n=!n)}return n}function ce(t,e,n){var r=e.paint.get(t).value;return"constant"===r.kind?r.value:n.programConfigurations.get(e.id).binders[t].statistics.max}function pe(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function fe(t,e,n,r,i){if(!e[0]&&!e[1])return t;var o=Bn.convert(e);"viewport"===n&&o._rotate(-r);for(var a=[],s=0;s<t.length;s++){for(var u=t[s],l=[],c=0;c<u.length;c++)l.push(u[c].sub(o._mult(i)));a.push(l)}return a}function he(t,e,n){var r=To.transformMat4([],[t.x,t.y,0,1],e);return new Bn((r[0]/r[3]+1)*n.width*.5,(r[1]/r[3]+1)*n.height*.5)}function de(t,e,n,r){var i=e.width,o=e.height;if(r){if(r.length!==i*o*n)throw new RangeError("mismatched image size")}else r=new Uint8Array(i*o*n);return t.width=i,t.height=o,t.data=r,t}function me(t,e,n){var r=e.width,i=e.height;if(r!==t.width||i!==t.height){var o=de({},{width:r,height:i},n);ye(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,r),height:Math.min(t.height,i)},n),t.width=r,t.height=i,t.data=o.data}}function ye(t,e,n,r,i,o){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,u=0;u<i.height;u++)for(var l=((n.y+u)*t.width+n.x)*o,c=((r.y+u)*e.width+r.x)*o,p=0;p<i.width*o;p++)s[c+p]=a[l+p];return e}function ve(t,e){for(var n=new Uint8Array(1024),r={},i=0,o=0;i<256;i++,o+=4){r[e]=i/255;var a=t.evaluate(r);n[o+0]=Math.floor(255*a.r/a.a),n[o+1]=Math.floor(255*a.g/a.a),n[o+2]=Math.floor(255*a.b/a.a),n[o+3]=Math.floor(255*a.a)}return new Io({width:256,height:1},n)}function ge(t,e,n){n=n||2;var r,i,o,a,s,u,l,c=e&&e.length,p=c?e[0]*n:t.length,f=_e(t,0,p,n,!0),h=[];if(!f)return h;if(c&&(f=function(t,e,n,r){var i,o,a,s,u,l=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(u=_e(t,a,s,r,!1))===u.next&&(u.steiner=!0),l.push(ke(u));for(l.sort(Ce),i=0;i<l.length;i++)Ae(l[i],n),n=be(n,n.next);return n}(t,e,f,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var d=n;d<p;d+=n)(s=t[d])<r&&(r=s),(u=t[d+1])<i&&(i=u),s>o&&(o=s),u>a&&(a=u);l=0!==(l=Math.max(o-r,a-i))?1/l:0}return xe(f,h,n,r,i,l),h}function _e(t,e,n,r,i){var o,a;if(i===Ne(t,e,n,r)>0)for(o=e;o<n;o+=r)a=Le(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=Le(o,t[o],t[o+1],a);return a&&Re(a,a.next)&&(Fe(a),a=a.next),a}function be(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Re(r,r.next)&&0!==ze(r.prev,r,r.next))r=r.next;else{if(Fe(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function xe(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Oe(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<l&&(s++,r=r.nextZ);e++);for(u=l;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(t,r,i,o);for(var s,u,l=t;t.prev!==t.next;)if(s=t.prev,u=t.next,o?Ee(t,r,i,o):we(t))e.push(s.i/n),e.push(t.i/n),e.push(u.i/n),Fe(t),t=u.next,l=u.next;else if((t=u)===l){a?1===a?xe(t=Se(t,e,n),e,n,r,i,o,2):2===a&&Te(t,e,n,r,i,o):xe(be(t),e,n,r,i,o,1);break}}}function we(t){var e=t.prev,n=t,r=t.next;if(ze(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Ie(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&ze(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Ee(t,e,n,r){var i=t.prev,o=t,a=t.next;if(ze(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,u=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,l=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,p=Oe(s,u,e,n,r),f=Oe(l,c,e,n,r),h=t.prevZ,d=t.nextZ;h&&h.z>=p&&d&&d.z<=f;){if(h!==t.prev&&h!==t.next&&Ie(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&ze(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,d!==t.prev&&d!==t.next&&Ie(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&ze(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;h&&h.z>=p;){if(h!==t.prev&&h!==t.next&&Ie(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&ze(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&Ie(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&ze(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Se(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Re(i,o)&&Me(i,r,r.next,o)&&je(i,o)&&je(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Fe(r),Fe(r.next),r=t=o),r=r.next}while(r!==t);return r}function Te(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Pe(a,s)){var u=De(a,s);return a=be(a,a.next),u=be(u,u.next),xe(a,e,n,r,i,o),void xe(u,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function Ce(t,e){return t.x-e.x}function Ae(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var u,l=n,c=n.x,p=n.y,f=1/0;for(r=n.next;r!==l;)i>=r.x&&r.x>=c&&i!==r.x&&Ie(o<p?i:a,o,c,p,o<p?a:i,o,r.x,r.y)&&((u=Math.abs(o-r.y)/(i-r.x))<f||u===f&&r.x>n.x)&&je(r,t)&&(n=r,f=u),r=r.next;return n}(t,e)){var n=De(e,t);be(n,n.next)}}function Oe(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function ke(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Ie(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Pe(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Me(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&je(t,e)&&je(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function ze(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Re(t,e){return t.x===e.x&&t.y===e.y}function Me(t,e,n,r){return!!(Re(t,e)&&Re(n,r)||Re(t,r)&&Re(n,e))||ze(t,e,n)>0!=ze(t,e,r)>0&&ze(n,r,t)>0!=ze(n,r,e)>0}function je(t,e){return ze(t.prev,t,t.next)<0?ze(t,e,t.next)>=0&&ze(t,t.prev,e)>=0:ze(t,e,t.prev)<0||ze(t,t.next,e)<0}function De(t,e){var n=new Be(t.i,t.x,t.y),r=new Be(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function Le(t,e,n,r){var i=new Be(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Fe(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Be(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ne(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}function Ve(t,e,n,r,i){!function t(e,n,r,i,o){for(;i>r;){if(i-r>600){var a=i-r+1,s=n-r+1,u=Math.log(a),l=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*l*(a-l)/a)*(s-a/2<0?-1:1);t(e,n,Math.max(r,Math.floor(n-s*l/a+c)),Math.min(i,Math.floor(n+(a-s)*l/a+c)),o)}var p=e[n],f=r,h=i;for(Ue(e,r,n),o(e[i],p)>0&&Ue(e,r,i);f<h;){for(Ue(e,f,h),f++,h--;o(e[f],p)<0;)f++;for(;o(e[h],p)>0;)h--}0===o(e[r],p)?Ue(e,r,h):Ue(e,++h,i),h<=n&&(r=h+1),n<=h&&(i=h-1)}}(t,e,n||0,r||t.length-1,i||qe)}function Ue(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function qe(t,e){return t<e?-1:t>e?1:0}function We(t,e){var n=t.length;if(n<=1)return[t];for(var r,i,o=[],a=0;a<n;a++){var s=y(t[a]);0!==s&&(t[a].area=Math.abs(s),void 0===i&&(i=s<0),i===s<0?(r&&o.push(r),r=[t[a]]):r.push(t[a]))}if(r&&o.push(r),e>1)for(var u=0;u<o.length;u++)o[u].length<=e||(Fo(o[u],e,1,o[u].length-1,$e),o[u]=o[u].slice(0,e));return o}function $e(t,e){return e.area-t.area}function Ze(t,e,n,r,i,o,a,s){t.emplaceBack(e,n,2*Math.floor(r*Wo)+a,i*Wo*2,o*Wo*2,Math.round(s))}function Ge(t,e){return t.x===e.x&&(t.x<0||t.x>bo)||t.y===e.y&&(t.y<0||t.y>bo)}function He(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>bo})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>bo})}function Ke(t,e,n,r,i){this.properties={},this.extent=n,this.type=0,this._pbf=t,this._geometry=-1,this._keys=r,this._values=i,t.readFields(Xe,this,e)}function Xe(t,e,n){1==t?e.id=n.readVarint():2==t?function(t,e){for(var n=t.readVarint()+t.pos;t.pos<n;){var r=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[r]=i}}(n,e):3==t?e.type=n.readVarint():4==t&&(e._geometry=n.pos)}function Ye(t){for(var e,n,r=0,i=0,o=t.length,a=o-1;i<o;a=i++)e=t[i],r+=((n=t[a]).x-e.x)*(e.y+n.y);return r}function Je(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(Qe,this,e),this.length=this._features.length}function Qe(t,e,n){15===t?e.version=n.readVarint():1===t?e.name=n.readString():5===t?e.extent=n.readVarint():2===t?e._features.push(n.pos):3===t?e._keys.push(n.readString()):4===t&&e._values.push(function(t){for(var e=null,n=t.readVarint()+t.pos;t.pos<n;){var r=t.readVarint()>>3;e=1===r?t.readString():2===r?t.readFloat():3===r?t.readDouble():4===r?t.readVarint64():5===r?t.readVarint():6===r?t.readSVarint():7===r?t.readBoolean():null}return e}(n))}function tn(t,e,n){if(3===t){var r=new Xo(n,n.readVarint()+n.pos);r.length&&(e[r.name]=r)}}function en(t,e,n,r,i,o,a){t.emplaceBack(e.x,e.y,r?1:0,i?1:-1,Math.round(Qo*n.x)+128,Math.round(Qo*n.y)+128,1+(0===o?0:o<0?-1:1)|(a*ea&63)<<2,a*ea>>6)}function nn(t,e){return(t/e.tileTotal*(e.end-e.start)+e.start)*(na-1)}function rn(t,e){return e>0?e+2*t:t}function on(t,e,n){var r=e.layout.get("text-transform").evaluate(n);return"uppercase"===r?t=t.toLocaleUpperCase():"lowercase"===r&&(t=t.toLocaleLowerCase()),vi.applyArabicShaping&&(t=vi.applyArabicShaping(t)),t}function an(t,e){var n=e.expression;if("constant"===n.kind)return{functionType:"constant",layoutSize:n.evaluate(new gi(t+1))};if("source"===n.kind)return{functionType:"source"};for(var r=n.zoomStops,i=0;i<r.length&&r[i]<=t;)i++;for(var o=i=Math.max(0,i-1);o<r.length&&r[o]<t+1;)o++;o=Math.min(r.length-1,o);var a={min:r[i],max:r[o]};return"composite"===n.kind?{functionType:"composite",zoomRange:a,propertyValue:e.value}:{functionType:"camera",layoutSize:n.evaluate(new gi(t+1)),zoomRange:a,sizeRange:{min:n.evaluate(new gi(a.min)),max:n.evaluate(new gi(a.max))},propertyValue:e.value}}function sn(t,e,n,r,i,o,a,s){t.emplaceBack(e,n,Math.round(32*r),Math.round(32*i),o,a,s?s[0]:0,s?s[1]:0)}function un(t,e,n){t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n)}function ln(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function cn(t){return t.type===ln.Bytes?t.readVarint()+t.pos:t.pos+1}function pn(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function fn(t,e,n){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=t;i--)n.buf[i+r]=n.buf[i]}function hn(t,e){for(var n=0;n<t.length;n++)e.writeVarint(t[n])}function dn(t,e){for(var n=0;n<t.length;n++)e.writeSVarint(t[n])}function mn(t,e){for(var n=0;n<t.length;n++)e.writeFloat(t[n])}function yn(t,e){for(var n=0;n<t.length;n++)e.writeDouble(t[n])}function vn(t,e){for(var n=0;n<t.length;n++)e.writeBoolean(t[n])}function gn(t,e){for(var n=0;n<t.length;n++)e.writeFixed32(t[n])}function _n(t,e){for(var n=0;n<t.length;n++)e.writeSFixed32(t[n])}function bn(t,e){for(var n=0;n<t.length;n++)e.writeFixed64(t[n])}function xn(t,e){for(var n=0;n<t.length;n++)e.writeSFixed64(t[n])}function wn(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function En(t,e,n){t[n]=e,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function Sn(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function Tn(t,e,n){1===t&&n.readMessage(Cn,e)}function Cn(t,e,n){if(3===t){var r=n.readMessage(An,{}),i=r.id,o=r.bitmap,a=r.width,s=r.height,u=r.left,l=r.top,c=r.advance;e.push({id:i,bitmap:new ko({width:a+2*Ma,height:s+2*Ma},o),metrics:{width:a,height:s,left:u,top:l,advance:c}})}}function An(t,e,n){1===t?e.id=n.readVarint():2===t?e.bitmap=n.readBytes():3===t?e.width=n.readVarint():4===t?e.height=n.readVarint():5===t?e.left=n.readSVarint():6===t?e.top=n.readSVarint():7===t&&(e.advance=n.readVarint())}function On(t,e,n,r){(t*=2)<0&&(t=-1*t-1);var i=1<<e;return 32*(i*i*t+i*r+n)+e}function kn(t,e){return e-t}function In(t,e,n,r){var i=Math.pow(t-e,2);return r?t<e?i/2:2*i:i+Math.abs(n)*n}function Pn(t,e){var n=0;return 10===t&&(n-=1e4),40!==t&&65288!==t||(n+=50),41!==e&&65289!==e||(n+=50),n}function zn(t,e,n,r,i,o){for(var a=null,s=In(e,n,i,o),u=0,l=r;u<l.length;u+=1){var c=l[u],p=In(e-c.x,n,i,o)+c.badness;p<=s&&(a=c,s=p)}return{index:t,x:e,priorBreak:a,badness:s}}function Rn(t,e,n,r){if(!n)return[];if(!t)return[];for(var i,o=[],a=function(t,e,n,r){for(var i=0,o=0;o<t.length;o++){var a=r[t.charCodeAt(o)];a&&(i+=a.metrics.advance+e)}return i/Math.max(1,Math.ceil(i/n))}(t,e,n,r),s=0,u=0;u<t.length;u++){var l=t.charCodeAt(u),c=r[l];c&&!Ha[l]&&(s+=c.metrics.advance+e),u<t.length-1&&(Ka[l]||!((i=l)<11904)&&(fi["Bopomofo Extended"](i)||fi.Bopomofo(i)||fi["CJK Compatibility Forms"](i)||fi["CJK Compatibility Ideographs"](i)||fi["CJK Compatibility"](i)||fi["CJK Radicals Supplement"](i)||fi["CJK Strokes"](i)||fi["CJK Symbols and Punctuation"](i)||fi["CJK Unified Ideographs Extension A"](i)||fi["CJK Unified Ideographs"](i)||fi["Enclosed CJK Letters and Months"](i)||fi["Halfwidth and Fullwidth Forms"](i)||fi.Hiragana(i)||fi["Ideographic Description Characters"](i)||fi["Kangxi Radicals"](i)||fi["Katakana Phonetic Extensions"](i)||fi.Katakana(i)||fi["Vertical Forms"](i)||fi["Yi Radicals"](i)||fi["Yi Syllables"](i)))&&o.push(zn(u+1,s,a,o,Pn(l,t.charCodeAt(u+1)),!1))}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(zn(t.length,s,a,o,0,!0))}function Mn(t){var e=.5,n=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":n=1;break;case"top":case"top-right":case"top-left":n=0}return{horizontalAlign:e,verticalAlign:n}}function jn(t,e,n,r,i){if(i){var o=e[t[r].glyph];if(o)for(var a=o.metrics.advance,s=(t[r].x+a)*i,u=n;u<=r;u++)t[u].x-=s}}var Dn="undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{},Ln=i;i.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},i.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},i.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},i.prototype.solveCurveX=function(t,e){var n,r,i,o,a;for(void 0===e&&(e=1e-6),i=t,a=0;a<8;a++){if(o=this.sampleCurveX(i)-t,Math.abs(o)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=o/s}if((i=t)<(n=0))return n;if(i>(r=1))return r;for(;n<r;){if(o=this.sampleCurveX(i),Math.abs(o-t)<e)return i;t>o?n=i:r=i,i=.5*(r-n)+n}return i},i.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var Fn=function(t,e,n){this.column=t,this.row=e,this.zoom=n};Fn.prototype.clone=function(){return new Fn(this.column,this.row,this.zoom)},Fn.prototype.zoomTo=function(t){return this.clone()._zoomTo(t)},Fn.prototype.sub=function(t){return this.clone()._sub(t)},Fn.prototype._zoomTo=function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},Fn.prototype._sub=function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this};var Bn=o;o.prototype={clone:function(){return new o(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},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(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,n=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=n,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=e*this.x-n*this.y,i=n*this.x+e*this.y;return this.x=r,this.y=i,this},_rotateAround:function(t,e){var n=Math.cos(t),r=Math.sin(t),i=e.x+n*(this.x-e.x)-r*(this.y-e.y),o=e.y+r*(this.x-e.x)+n*(this.y-e.y);return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(t){return t instanceof o?t:Array.isArray(t)?new o(t[0],t[1]):t};var Nn=a(.25,.1,.25,1),Vn=1,Un={},qn={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(qn);var Wn=function(t){function e(e,n,r){t.call(this,e),this.status=n,this.url=r,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error),$n=function(t,e){var n=v(t);return n.responseType="arraybuffer",n.onerror=function(){e(new Error(n.statusText))},n.onload=function(){var r=n.response;if(0===r.byteLength&&200===n.status)return e(new Error("http status 200 returned without content."));n.status>=200&&n.status<300&&n.response?e(null,{data:r,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires")}):e(new Wn(n.statusText,n.status,t.url))},n.send(),n},Zn=function(t,e){void 0===e&&(e={}),u(this,e),this.type=t},Gn=function(t){function e(e,n){void 0===n&&(n={}),t.call(this,"error",u({error:e},n))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Zn),Hn=function(){};Hn.prototype.on=function(t,e){return this._listeners=this._listeners||{},g(t,e,this._listeners),this},Hn.prototype.off=function(t,e){return _(t,e,this._listeners),_(t,e,this._oneTimeListeners),this},Hn.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},g(t,e,this._oneTimeListeners),this},Hn.prototype.fire=function(t){"string"==typeof t&&(t=new Zn(t,arguments[1]||{}));var e=t.type;if(this.listens(e)){t.target=this;for(var n=0,r=this._listeners&&this._listeners[e]?this._listeners[e].slice():[];n<r.length;n+=1)r[n].call(this,t);for(var i=0,o=this._oneTimeListeners&&this._oneTimeListeners[e]?this._oneTimeListeners[e].slice():[];i<o.length;i+=1){var a=o[i];_(e,a,this._oneTimeListeners),a.call(this,t)}var s=this._eventedParent;s&&(u(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),s.fire(t))}else c(e,"error")?console.error(t&&t.error||t||"Empty error event"):c(e,"warning")&&console.warn(t&&t.warning||t||"Empty warning event");return this},Hn.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},Hn.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var Kn={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},lineMetrics:{type:"boolean",default:!1}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_fill:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_circle:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_line:{"line-cap":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{butt:{},round:{},square:{}},default:"butt"},"line-join":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{bevel:{},round:{},miter:{}},default:"miter"},"line-miter-limit":{type:"number",default:2,function:"interpolated","zoom-function":!0,requires:[{"line-join":"miter"}]},"line-round-limit":{type:"number",default:1.05,function:"interpolated","zoom-function":!0,requires:[{"line-join":"round"}]},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_symbol:{"symbol-placement":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{point:{},line:{}},default:"point"},"symbol-spacing":{type:"number",default:250,minimum:1,function:"interpolated","zoom-function":!0,units:"pixels",requires:[{"symbol-placement":"line"}]},"symbol-avoid-edges":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1},"icon-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image"]},"icon-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image"]},"icon-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image","text-field"]},"icon-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"]},"icon-size":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,units:"factor of the original icon size",requires:["icon-image"]},"icon-text-fit":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"]},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",function:"interpolated","zoom-function":!0,requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}]},"icon-image":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,tokens:!0},"icon-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,"property-function":!0,units:"degrees",requires:["icon-image"]},"icon-padding":{type:"number",default:2,minimum:0,function:"interpolated","zoom-function":!0,units:"pixels",requires:["icon-image"]},"icon-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"icon-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"]},"icon-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"]},"text-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"]},"text-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"]},"text-field":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:"",tokens:!0},"text-font":{type:"array",value:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"]},"text-size":{type:"number",default:16,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-line-height":{type:"number",default:1.2,units:"ems",function:"interpolated","zoom-function":!0,requires:["text-field"]},"text-letter-spacing":{type:"number",default:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-justify":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{left:{},center:{},right:{}},default:"center",requires:["text-field"]},"text-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field"]},"text-max-angle":{type:"number",default:45,units:"degrees",function:"interpolated","zoom-function":!0,requires:["text-field",{"symbol-placement":"line"}]},"text-rotate":{type:"number",default:0,period:360,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,requires:["text-field"]},"text-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"]},"text-offset":{type:"array",value:"number",units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,length:2,default:[0,0],requires:["text-field"]},"text-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["text-field"]},"text-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["text-field"]},"text-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["text-field","icon-image"]},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Heatmap"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},transition:!1,"zoom-function":!0,"property-function":!1,function:"piecewise-constant"},position:{type:"array",default:[1.15,210,30],length:3,value:"number",transition:!0,function:"interpolated","zoom-function":!0,"property-function":!1},color:{type:"color",default:"#ffffff",function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0},intensity:{type:"number",default:.5,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0},"fill-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"fill-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"}]},"fill-outline-color":{type:"color",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}]},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"fill-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["fill-translate"]},"fill-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0}},paint_line:{"line-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"line-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"line-pattern"}]},"line-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"line-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["line-translate"]},"line-width":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-gap-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-offset":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-dasharray":{type:"array",value:"number",function:"piecewise-constant","zoom-function":!0,minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}]},"line-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0},"line-gradient":{type:"color",function:"interpolated","zoom-function":!1,"property-function":!1,transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}]}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-blur":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"circle-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["circle-translate"]},"circle-pitch-scale":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map"},"circle-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"viewport"},"circle-stroke-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-stroke-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"heatmap-weight":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!1},"heatmap-intensity":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],function:"interpolated","zoom-function":!1,"property-function":!1,transition:!1},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"]},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"]}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-hue-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,transition:!0,units:"degrees"},"raster-brightness-min":{type:"number",function:"interpolated","zoom-function":!0,default:0,minimum:0,maximum:1,transition:!0},"raster-brightness-max":{type:"number",function:"interpolated","zoom-function":!0,default:1,minimum:0,maximum:1,transition:!0},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-fade-duration":{type:"number",default:300,minimum:0,function:"interpolated","zoom-function":!0,transition:!1,units:"milliseconds"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,function:"interpolated","zoom-function":!0,transition:!1},"hillshade-illumination-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"viewport"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"hillshade-shadow-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,transition:!0},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",function:"interpolated","zoom-function":!0,transition:!0},"hillshade-accent-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,transition:!0}},paint_background:{"background-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,transition:!0,requires:[{"!":"background-pattern"}]},"background-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!1,default:1,minimum:0,maximum:1,transition:!0},"fill-extrusion-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-extrusion-pattern"}]},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"fill-extrusion-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"]},"fill-extrusion-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0},"fill-extrusion-height":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,units:"meters",transition:!0},"fill-extrusion-base":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"]}}},Xn=function(t,e,n,r){this.message=(t?t+": ":"")+n,r&&(this.identifier=r),null!=e&&e.__line__&&(this.line=e.__line__)},Yn=function(t){function e(e,n){t.call(this,n),this.message=n,this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),Jn=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var n=0,r=e;n<r.length;n+=1){var i=r[n],o=i[0],a=i[1];this.bindings[o]=a}};Jn.prototype.concat=function(t){return new Jn(this,t)},Jn.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},Jn.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var Qn={kind:"null"},tr={kind:"number"},er={kind:"string"},nr={kind:"boolean"},rr={kind:"color"},ir={kind:"object"},or={kind:"value"},ar={kind:"collator"},sr=[Qn,tr,er,nr,rr,ir,S(or)],ur=r(function(t,e){function n(t){return(t=Math.round(t))<0?0:t>255?255:t}function r(t){return t<0?0:t>1?1:t}function i(t){return n("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return r("%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))}function a(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}var s={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{e.parseCSSColor=function(t){var e,r=t.replace(/ /g,"").toLowerCase();if(r in s)return s[r].slice();if("#"===r[0])return 4===r.length?(e=parseInt(r.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===r.length&&(e=parseInt(r.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var u=r.indexOf("("),l=r.indexOf(")");if(-1!==u&&l+1===r.length){var c=r.substr(0,u),p=r.substr(u+1,l-(u+1)).split(","),f=1;switch(c){case"rgba":if(4!==p.length)return null;f=o(p.pop());case"rgb":return 3!==p.length?null:[i(p[0]),i(p[1]),i(p[2]),f];case"hsla":if(4!==p.length)return null;f=o(p.pop());case"hsl":if(3!==p.length)return null;var h=(parseFloat(p[0])%360+360)%360/360,d=o(p[1]),m=o(p[2]),y=m<=.5?m*(d+1):m+d-m*d,v=2*m-y;return[n(255*a(v,y,h+1/3)),n(255*a(v,y,h)),n(255*a(v,y,h-1/3)),f];default:return null}}return null}}catch(t){}}).parseCSSColor,lr=function(t,e,n,r){void 0===r&&(r=1),this.r=t,this.g=e,this.b=n,this.a=r};lr.parse=function(t){if(t){if(t instanceof lr)return t;if("string"==typeof t){var e=ur(t);if(e)return new lr(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},lr.prototype.toString=function(){var t=this.toArray(),e=t[0],n=t[1],r=t[2],i=t[3];return"rgba("+Math.round(e)+","+Math.round(n)+","+Math.round(r)+","+i+")"},lr.prototype.toArray=function(){var t=this.r,e=this.g,n=this.b,r=this.a;return 0===r?[0,0,0,0]:[255*t/r,255*e/r,255*n/r,r]},lr.black=new lr(0,0,0,1),lr.white=new lr(1,1,1,1),lr.transparent=new lr(0,0,0,0);var cr=function(t,e,n){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};cr.prototype.compare=function(t,e){return this.collator.compare(t,e)},cr.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var pr=function(t,e,n){this.type=ar,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e};pr.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var n=t[1];if("object"!=typeof n||Array.isArray(n))return e.error("Collator options argument must be an object.");var r=e.parse(void 0!==n["case-sensitive"]&&n["case-sensitive"],1,nr);if(!r)return null;var i=e.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,nr);if(!i)return null;var o=null;return n.locale&&!(o=e.parse(n.locale,1,er))?null:new pr(r,i,o)},pr.prototype.evaluate=function(t){return new cr(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},pr.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},pr.prototype.possibleOutputs=function(){return[void 0]},pr.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var fr=function(t,e){this.type=t,this.value=e};fr.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!function t(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof lr)return!0;if(e instanceof cr)return!0;if(Array.isArray(e)){for(var n=0,r=e;n<r.length;n+=1)if(!t(r[n]))return!1;return!0}if("object"==typeof e){for(var i in e)if(!t(e[i]))return!1;return!0}return!1}(t[1]))return e.error("invalid value");var n=t[1],r=O(n),i=e.expectedType;return"array"!==r.kind||0!==r.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(r=i),new fr(r,n)},fr.prototype.evaluate=function(){return this.value},fr.prototype.eachChild=function(){},fr.prototype.possibleOutputs=function(){return[this.value]},fr.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof lr?["rgba"].concat(this.value.toArray()):this.value};var hr=function(t){this.name="ExpressionEvaluationError",this.message=t};hr.prototype.toJSON=function(){return this.message};var dr={string:er,number:tr,boolean:nr,object:ir},mr=function(t,e){this.type=t,this.args=e};mr.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");for(var n=t[0],r=dr[n],i=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,or);if(!a)return null;i.push(a)}return new mr(r,i)},mr.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var n=this.args[e].evaluate(t);if(!C(this.type,O(n)))return n;if(e===this.args.length-1)throw new hr("Expected value to be of type "+T(this.type)+", but found "+T(O(n))+" instead.")}return null},mr.prototype.eachChild=function(t){this.args.forEach(t)},mr.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},mr.prototype.serialize=function(){return[this.type.kind].concat(this.args.map(function(t){return t.serialize()}))};var yr={string:er,number:tr,boolean:nr},vr=function(t,e){this.type=t,this.input=e};vr.parse=function(t,e){if(t.length<2||t.length>4)return e.error("Expected 1, 2, or 3 arguments, but found "+(t.length-1)+" instead.");var n,r;if(t.length>2){var i=t[1];if("string"!=typeof i||!(i in yr))return e.error('The item type argument of "array" must be one of string, number, boolean',1);n=yr[i]}else n=or;if(t.length>3){if("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2]))return e.error('The length argument to "array" must be a positive integer literal',2);r=t[2]}var o=S(n,r),a=e.parse(t[t.length-1],t.length-1,or);return a?new vr(o,a):null},vr.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(C(this.type,O(e)))throw new hr("Expected value to be of type "+T(this.type)+", but found "+T(O(e))+" instead.");return e},vr.prototype.eachChild=function(t){t(this.input)},vr.prototype.possibleOutputs=function(){return this.input.possibleOutputs()},vr.prototype.serialize=function(){var t=["array"],e=this.type.itemType;if("string"===e.kind||"number"===e.kind||"boolean"===e.kind){t.push(e.kind);var n=this.type.N;"number"==typeof n&&t.push(n)}return t.push(this.input.serialize()),t};var gr={"to-number":tr,"to-color":rr},_r=function(t,e){this.type=t,this.args=e};_r.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");for(var n=t[0],r=gr[n],i=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,or);if(!a)return null;i.push(a)}return new _r(r,i)},_r.prototype.evaluate=function(t){if("color"===this.type.kind){for(var e,n,r=0,i=this.args;r<i.length;r+=1)if(n=null,"string"==typeof(e=i[r].evaluate(t))){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(n=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":A(e[0],e[1],e[2],e[3])))return new lr(e[0]/255,e[1]/255,e[2]/255,e[3]);throw new hr(n||"Could not parse color from value '"+("string"==typeof e?e:JSON.stringify(e))+"'")}for(var a=null,s=0,u=this.args;s<u.length;s+=1)if(null!==(a=u[s].evaluate(t))){var l=Number(a);if(!isNaN(l))return l}throw new hr("Could not convert "+JSON.stringify(a)+" to number.")},_r.prototype.eachChild=function(t){this.args.forEach(t)},_r.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},_r.prototype.serialize=function(){var t=["to-"+this.type.kind];return this.eachChild(function(e){t.push(e.serialize())}),t};var br=["Unknown","Point","LineString","Polygon"],xr=function(){this._parseColorCache={}};xr.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},xr.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?br[this.feature.type]:this.feature.type:null},xr.prototype.properties=function(){return this.feature&&this.feature.properties||{}},xr.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=lr.parse(t)),e};var wr=function(t,e,n,r){this.name=t,this.type=e,this._evaluate=n,this.args=r};wr.prototype.evaluate=function(t){return this._evaluate(t,this.args)},wr.prototype.eachChild=function(t){this.args.forEach(t)},wr.prototype.possibleOutputs=function(){return[void 0]},wr.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},wr.parse=function(t,e){var n=t[0],r=wr.definitions[n];if(!r)return e.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var i=Array.isArray(r)?r[0]:r.type,o=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,a=o.filter(function(e){var n=e[0];return!Array.isArray(n)||n.length===t.length-1}),s=[],u=1;u<t.length;u++){var l=t[u],c=void 0;if(1===a.length){var p=a[0][0];c=Array.isArray(p)?p[u-1]:p.type}var f=e.parse(l,1+s.length,c);if(!f)return null;s.push(f)}for(var h=null,d=0,m=a;d<m.length;d+=1){var y=m[d],v=y[0],g=y[1];if(h=new Sr(e.registry,e.path,null,e.scope),Array.isArray(v)&&v.length!==s.length)h.error("Expected "+v.length+" arguments, but found "+s.length+" instead.");else{for(var _=0;_<s.length;_++){var b=Array.isArray(v)?v[_]:v.type,x=s[_];h.concat(_+1).checkSubtype(b,x.type)}if(0===h.errors.length)return new wr(n,i,g,s)}}if(1===a.length)e.errors.push.apply(e.errors,h.errors);else{var w=(a.length?a:o).map(function(t){var e;return e=t[0],Array.isArray(e)?"("+e.map(T).join(", ")+")":"("+T(e.type)+"...)"}).join(" | "),E=s.map(function(t){return T(t.type)}).join(", ");e.error("Expected arguments of type "+w+", but found ("+E+") instead.")}return null},wr.register=function(t,e){for(var n in wr.definitions=e,e)t[n]=wr};var Er=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Er.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var n=t[1];return e.scope.has(n)?new Er(n,e.scope.get(n)):e.error('Unknown variable "'+n+'". Make sure "'+n+'" has been bound in an enclosing "let" expression before using it.',1)},Er.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Er.prototype.eachChild=function(){},Er.prototype.possibleOutputs=function(){return[void 0]},Er.prototype.serialize=function(){return["var",this.name]};var Sr=function(t,e,n,r,i){void 0===e&&(e=[]),void 0===r&&(r=new Jn),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return"["+t+"]"}).join(""),this.scope=r,this.errors=i,this.expectedType=n};Sr.prototype.parse=function(t,e,n,r,i){return void 0===i&&(i={}),e?this.concat(e,n,r)._parse(t,i):this._parse(t,i)},Sr.prototype._parse=function(t,e){if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[n];if(r){var i=r.parse(t,this);if(!i)return null;if(this.expectedType){var o=this.expectedType,a=i.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind||"value"!==a.kind)if("array"===o.kind&&"value"===a.kind)e.omitTypeAnnotations||(i=new vr(o,i));else if("color"!==o.kind||"value"!==a.kind&&"string"!==a.kind){if(this.checkSubtype(this.expectedType,i.type))return null}else e.omitTypeAnnotations||(i=new _r(o,[i]));else e.omitTypeAnnotations||(i=new mr(o,[i]))}if(!(i instanceof fr)&&function t(e){if(e instanceof Er)return t(e.boundExpression);if(e instanceof wr&&"error"===e.name)return!1;if(e instanceof pr)return!1;var n=e instanceof _r||e instanceof mr||e instanceof vr,r=!0;return e.eachChild(function(e){r=n?r&&t(e):r&&e instanceof fr}),!!r&&(k(e)&&I(e,["zoom","heatmap-density","line-progress","is-supported-script"]))}(i)){var s=new xr;try{i=new fr(i.type,i.evaluate(s))}catch(t){return this.error(t.message),null}}return i}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Sr.prototype.concat=function(t,e,n){var r="number"==typeof t?this.path.concat(t):this.path,i=n?this.scope.concat(n):this.scope;return new Sr(this.registry,r,e||null,i,this.errors)},Sr.prototype.error=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var r=""+this.key+e.map(function(t){return"["+t+"]"}).join("");this.errors.push(new Yn(r,t))},Sr.prototype.checkSubtype=function(t,e){var n=C(t,e);return n&&this.error(n),n};var Tr=function(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var r=0,i=n;r<i.length;r+=1){var o=i[r],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};Tr.parse=function(t,e){var n=t[1],r=t.slice(2);if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(n=e.parse(n,1,tr)))return null;var i=[],o=null;e.expectedType&&"value"!==e.expectedType.kind&&(o=e.expectedType),r.unshift(-1/0);for(var a=0;a<r.length;a+=2){var s=r[a],u=r[a+1],l=a+1,c=a+2;if("number"!=typeof s)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(i.length&&i[i.length-1][0]>=s)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var p=e.parse(u,c,o);if(!p)return null;o=o||p.type,i.push([s,p])}return new Tr(o,n,i)},Tr.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var i=e.length;return r>=e[i-1]?n[i-1].evaluate(t):n[P(e,r)].evaluate(t)},Tr.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1)t(n[e])},Tr.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}));var t},Tr.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Cr=Object.freeze({number:z,color:function(t,e,n){return new lr(z(t.r,e.r,n),z(t.g,e.g,n),z(t.b,e.b,n),z(t.a,e.a,n))},array:function(t,e,n){return t.map(function(t,r){return z(t,e[r],n)})}}),Ar=function(t,e,n,r){this.type=t,this.interpolation=e,this.input=n,this.labels=[],this.outputs=[];for(var i=0,o=r;i<o.length;i+=1){var a=o[i],s=a[0],u=a[1];this.labels.push(s),this.outputs.push(u)}};Ar.interpolationFactor=function(t,e,n,r){var i=0;if("exponential"===t.name)i=R(e,t.base,n,r);else if("linear"===t.name)i=R(e,1,n,r);else if("cubic-bezier"===t.name){var o=t.controlPoints;i=new Ln(o[0],o[1],o[2],o[3]).solve(R(e,1,n,r))}return i},Ar.parse=function(t,e){var n=t[1],r=t[2],i=t.slice(3);if(!Array.isArray(n)||0===n.length)return e.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var o=n[1];if("number"!=typeof o)return e.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:o}}else{if("cubic-bezier"!==n[0])return e.error("Unknown interpolation type "+String(n[0]),1,0);var a=n.slice(1);if(4!==a.length||a.some(function(t){return"number"!=typeof t||t<0||t>1}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:a}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(r=e.parse(r,2,tr)))return null;var s=[],u=null;e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var l=0;l<i.length;l+=2){var c=i[l],p=i[l+1],f=l+3,h=l+4;if("number"!=typeof c)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(s.length&&s[s.length-1][0]>=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var d=e.parse(p,h,u);if(!d)return null;u=u||d.type,s.push([c,d])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new Ar(u,n,r,s):e.error("Type "+T(u)+" is not interpolatable.")},Ar.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var i=e.length;if(r>=e[i-1])return n[i-1].evaluate(t);var o=P(e,r),a=e[o],s=e[o+1],u=Ar.interpolationFactor(this.interpolation,r,a,s),l=n[o].evaluate(t),c=n[o+1].evaluate(t);return Cr[this.type.kind.toLowerCase()](l,c,u)},Ar.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1)t(n[e])},Ar.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}));var t},Ar.prototype.serialize=function(){for(var t=["interpolate","linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints),this.input.serialize()],e=0;e<this.labels.length;e++)t.push(this.labels[e],this.outputs[e].serialize());return t};var Or=function(t,e){this.type=t,this.args=e};Or.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var n=null,r=e.expectedType;r&&"value"!==r.kind&&(n=r);for(var i=[],o=0,a=t.slice(1);o<a.length;o+=1){var s=a[o],u=e.parse(s,1+i.length,n,void 0,{omitTypeAnnotations:!0});if(!u)return null;n=n||u.type,i.push(u)}var l=r&&i.some(function(t){return C(r,t.type)});return new Or(l?or:n,i)},Or.prototype.evaluate=function(t){for(var e=null,n=0,r=this.args;n<r.length&&null===(e=r[n].evaluate(t));n+=1);return e},Or.prototype.eachChild=function(t){this.args.forEach(t)},Or.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},Or.prototype.serialize=function(){var t=["coalesce"];return this.eachChild(function(e){t.push(e.serialize())}),t};var kr=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};kr.prototype.evaluate=function(t){return this.result.evaluate(t)},kr.prototype.eachChild=function(t){for(var e=0,n=this.bindings;e<n.length;e+=1)t(n[e][1]);t(this.result)},kr.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var n=[],r=1;r<t.length-1;r+=2){var i=t[r];if("string"!=typeof i)return e.error("Expected string, but found "+typeof i+" instead.",r);if(/[^a-zA-Z0-9_]/.test(i))return e.error("Variable names must contain only alphanumeric characters or '_'.",r);var o=e.parse(t[r+1],r+1);if(!o)return null;n.push([i,o])}var a=e.parse(t[t.length-1],t.length-1,void 0,n);return a?new kr(n,a):null},kr.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},kr.prototype.serialize=function(){for(var t=["let"],e=0,n=this.bindings;e<n.length;e+=1){var r=n[e],i=r[0],o=r[1];t.push(i,o.serialize())}return t.push(this.result.serialize()),t};var Ir=function(t,e,n){this.type=t,this.index=e,this.input=n};Ir.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,tr),r=e.parse(t[2],2,S(e.expectedType||or));if(!n||!r)return null;var i=r.type;return new Ir(i.itemType,n,r)},Ir.prototype.evaluate=function(t){var e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new hr("Array index out of bounds: "+e+" < 0.");if(e>=n.length)throw new hr("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new hr("Array index must be an integer, but found "+e+" instead.");return n[e]},Ir.prototype.eachChild=function(t){t(this.index),t(this.input)},Ir.prototype.possibleOutputs=function(){return[void 0]},Ir.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Pr=function(t,e,n,r,i,o){this.inputType=t,this.type=e,this.input=n,this.cases=r,this.outputs=i,this.otherwise=o};Pr.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var n,r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var i={},o=[],a=2;a<t.length-1;a+=2){var s=t[a],u=t[a+1];Array.isArray(s)||(s=[s]);var l=e.concat(a);if(0===s.length)return l.error("Expected at least one branch label.");for(var c=0,p=s;c<p.length;c+=1){var f=p[c];if("number"!=typeof f&&"string"!=typeof f)return l.error("Branch labels must be numbers or strings.");if("number"==typeof f&&Math.abs(f)>Number.MAX_SAFE_INTEGER)return l.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof f&&Math.floor(f)!==f)return l.error("Numeric branch labels must be integer values.");if(n){if(l.checkSubtype(n,O(f)))return null}else n=O(f);if(void 0!==i[String(f)])return l.error("Branch labels must be unique.");i[String(f)]=o.length}var h=e.parse(u,a,r);if(!h)return null;r=r||h.type,o.push(h)}var d=e.parse(t[1],1,n);if(!d)return null;var m=e.parse(t[t.length-1],t.length-1,r);return m?new Pr(n,r,d,i,o,m):null},Pr.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Pr.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Pr.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},Pr.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],n=[],r={},i=0,o=Object.keys(this.cases).sort();i<o.length;i+=1){var a=o[i],s=r[t.cases[a]];void 0===s?(r[t.cases[a]]=n.length,n.push([t.cases[a],[a]])):n[s][1].push(a)}for(var u=function(e){return"number"===t.input.type.kind?Number(e):e},l=0,c=n;l<c.length;l+=1){var p=c[l],f=p[0],h=p[1];1===h.length?e.push(u(h[0])):e.push(h.map(u)),e.push(t.outputs[f].serialize())}return e.push(this.otherwise.serialize()),e};var zr=function(t,e,n){this.type=t,this.branches=e,this.otherwise=n};zr.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var r=[],i=1;i<t.length-1;i+=2){var o=e.parse(t[i],i,nr);if(!o)return null;var a=e.parse(t[i+1],i+1,n);if(!a)return null;r.push([o,a]),n=n||a.type}var s=e.parse(t[t.length-1],t.length-1,n);return s?new zr(n,r,s):null},zr.prototype.evaluate=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var r=n[e],i=r[0],o=r[1];if(i.evaluate(t))return o.evaluate(t)}return this.otherwise.evaluate(t)},zr.prototype.eachChild=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var r=n[e],i=r[0],o=r[1];t(i),t(o)}t(this.otherwise)},zr.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.branches.map(function(t){return t[0],t[1].possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},zr.prototype.serialize=function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Rr=j("==",!1),Mr=j("!=",!0),jr=function(t){this.type=tr,this.input=t};jr.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?e.error("Expected argument of type string or array, but found "+T(n.type)+" instead."):new jr(n):null},jr.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new hr("Expected value to be of type string or array, but found "+T(O(e))+" instead.")},jr.prototype.eachChild=function(t){t(this.input)},jr.prototype.possibleOutputs=function(){return[void 0]},jr.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Dr={"==":Rr,"!=":Mr,array:vr,at:Ir,boolean:mr,case:zr,coalesce:Or,collator:pr,interpolate:Ar,length:jr,let:kr,literal:fr,match:Pr,number:mr,object:mr,step:Tr,string:mr,"to-color":_r,"to-number":_r,var:Er};wr.register(Dr,{error:[{kind:"error"},[er],function(t,e){var n=e[0];throw new hr(n.evaluate(t))}],typeof:[er,[or],function(t,e){return T(O(e[0].evaluate(t)))}],"to-string":[er,[or],function(t,e){var n=e[0],r=typeof(n=n.evaluate(t));return null===n?"":"string"===r||"number"===r||"boolean"===r?String(n):n instanceof lr?n.toString():JSON.stringify(n)}],"to-boolean":[nr,[or],function(t,e){var n=e[0];return Boolean(n.evaluate(t))}],"to-rgba":[S(tr,4),[rr],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[rr,[tr,tr,tr],D],rgba:[rr,[tr,tr,tr,tr],D],has:{type:nr,overloads:[[[er],function(t,e){return L(e[0].evaluate(t),t.properties())}],[[er,ir],function(t,e){var n=e[0],r=e[1];return L(n.evaluate(t),r.evaluate(t))}]]},get:{type:or,overloads:[[[er],function(t,e){return F(e[0].evaluate(t),t.properties())}],[[er,ir],function(t,e){var n=e[0],r=e[1];return F(n.evaluate(t),r.evaluate(t))}]]},properties:[ir,[],function(t){return t.properties()}],"geometry-type":[er,[],function(t){return t.geometryType()}],id:[or,[],function(t){return t.id()}],zoom:[tr,[],function(t){return t.globals.zoom}],"heatmap-density":[tr,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[tr,[],function(t){return t.globals.lineProgress||0}],"+":[tr,q(tr),function(t,e){for(var n=0,r=0,i=e;r<i.length;r+=1)n+=i[r].evaluate(t);return n}],"*":[tr,q(tr),function(t,e){for(var n=1,r=0,i=e;r<i.length;r+=1)n*=i[r].evaluate(t);return n}],"-":{type:tr,overloads:[[[tr,tr],function(t,e){var n=e[0],r=e[1];return n.evaluate(t)-r.evaluate(t)}],[[tr],function(t,e){return-e[0].evaluate(t)}]]},"/":[tr,[tr,tr],function(t,e){var n=e[0],r=e[1];return n.evaluate(t)/r.evaluate(t)}],"%":[tr,[tr,tr],function(t,e){var n=e[0],r=e[1];return n.evaluate(t)%r.evaluate(t)}],ln2:[tr,[],function(){return Math.LN2}],pi:[tr,[],function(){return Math.PI}],e:[tr,[],function(){return Math.E}],"^":[tr,[tr,tr],function(t,e){var n=e[0],r=e[1];return Math.pow(n.evaluate(t),r.evaluate(t))}],sqrt:[tr,[tr],function(t,e){var n=e[0];return Math.sqrt(n.evaluate(t))}],log10:[tr,[tr],function(t,e){var n=e[0];return Math.log10(n.evaluate(t))}],ln:[tr,[tr],function(t,e){var n=e[0];return Math.log(n.evaluate(t))}],log2:[tr,[tr],function(t,e){var n=e[0];return Math.log2(n.evaluate(t))}],sin:[tr,[tr],function(t,e){var n=e[0];return Math.sin(n.evaluate(t))}],cos:[tr,[tr],function(t,e){var n=e[0];return Math.cos(n.evaluate(t))}],tan:[tr,[tr],function(t,e){var n=e[0];return Math.tan(n.evaluate(t))}],asin:[tr,[tr],function(t,e){var n=e[0];return Math.asin(n.evaluate(t))}],acos:[tr,[tr],function(t,e){var n=e[0];return Math.acos(n.evaluate(t))}],atan:[tr,[tr],function(t,e){var n=e[0];return Math.atan(n.evaluate(t))}],min:[tr,q(tr),function(t,e){return Math.min.apply(Math,e.map(function(e){return e.evaluate(t)}))}],max:[tr,q(tr),function(t,e){return Math.max.apply(Math,e.map(function(e){return e.evaluate(t)}))}],abs:[tr,[tr],function(t,e){var n=e[0];return Math.abs(n.evaluate(t))}],round:[tr,[tr],function(t,e){var n=e[0].evaluate(t);return n<0?-Math.round(-n):Math.round(n)}],floor:[tr,[tr],function(t,e){var n=e[0];return Math.floor(n.evaluate(t))}],ceil:[tr,[tr],function(t,e){var n=e[0];return Math.ceil(n.evaluate(t))}],"filter-==":[nr,[er,or],function(t,e){var n=e[0],r=e[1];return t.properties()[n.value]===r.value}],"filter-id-==":[nr,[or],function(t,e){var n=e[0];return t.id()===n.value}],"filter-type-==":[nr,[er],function(t,e){var n=e[0];return t.geometryType()===n.value}],"filter-<":[nr,[er,or],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i<o}],"filter-id-<":[nr,[or],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r<i}],"filter->":[nr,[er,or],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i>o}],"filter-id->":[nr,[or],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r>i}],"filter-<=":[nr,[er,or],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i<=o}],"filter-id-<=":[nr,[or],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r<=i}],"filter->=":[nr,[er,or],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i>=o}],"filter-id->=":[nr,[or],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r>=i}],"filter-has":[nr,[or],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[nr,[],function(t){return null!==t.id()}],"filter-type-in":[nr,[S(er)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[nr,[S(or)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[nr,[er,S(or)],function(t,e){var n=e[0];return e[1].value.indexOf(t.properties()[n.value])>=0}],"filter-in-large":[nr,[er,S(or)],function(t,e){var n=e[0],r=e[1];return function(t,e,n,r){for(;n<=r;){var i=n+r>>1;if(e[i]===t)return!0;e[i]>t?r=i-1:n=i+1}return!1}(t.properties()[n.value],r.value,0,r.value.length-1)}],">":{type:nr,overloads:[[[tr,tr],N],[[er,er],N],[[er,er,ar],function(t,e){var n=e[0],r=e[1];return e[2].evaluate(t).compare(n.evaluate(t),r.evaluate(t))>0}]]},"<":{type:nr,overloads:[[[tr,tr],B],[[er,er],B],[[er,er,ar],function(t,e){var n=e[0],r=e[1];return e[2].evaluate(t).compare(n.evaluate(t),r.evaluate(t))<0}]]},">=":{type:nr,overloads:[[[tr,tr],U],[[er,er],U],[[er,er,ar],function(t,e){var n=e[0],r=e[1];return e[2].evaluate(t).compare(n.evaluate(t),r.evaluate(t))>=0}]]},"<=":{type:nr,overloads:[[[tr,tr],V],[[er,er],V],[[er,er,ar],function(t,e){var n=e[0],r=e[1];return e[2].evaluate(t).compare(n.evaluate(t),r.evaluate(t))<=0}]]},all:{type:nr,overloads:[[[nr,nr],function(t,e){var n=e[0],r=e[1];return n.evaluate(t)&&r.evaluate(t)}],[q(nr),function(t,e){for(var n=0,r=e;n<r.length;n+=1)if(!r[n].evaluate(t))return!1;return!0}]]},any:{type:nr,overloads:[[[nr,nr],function(t,e){var n=e[0],r=e[1];return n.evaluate(t)||r.evaluate(t)}],[q(nr),function(t,e){for(var n=0,r=e;n<r.length;n+=1)if(r[n].evaluate(t))return!0;return!1}]]},"!":[nr,[nr],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[nr,[er],function(t,e){var n=e[0],r=t.globals&&t.globals.isSupportedScript;return!r||r(n.evaluate(t))}],upcase:[er,[er],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[er,[er],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[er,q(er),function(t,e){return e.map(function(e){return e.evaluate(t)}).join("")}],"resolved-locale":[er,[ar],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var Lr=.95047,Fr=1,Br=1.08883,Nr=4/29,Vr=6/29,Ur=3*Vr*Vr,qr=Vr*Vr*Vr,Wr=Math.PI/180,$r=180/Math.PI,Zr={forward:X,reverse:Y,interpolate:function(t,e,n){return{l:z(t.l,e.l,n),a:z(t.a,e.a,n),b:z(t.b,e.b,n),alpha:z(t.alpha,e.alpha,n)}}},Gr={forward:function(t){var e=X(t),n=e.l,r=e.a,i=e.b,o=Math.atan2(i,r)*$r;return{h:o<0?o+360:o,c:Math.sqrt(r*r+i*i),l:n,alpha:t.a}},reverse:function(t){var e=t.h*Wr,n=t.c;return Y({l:t.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:t.alpha})},interpolate:function(t,e,n){return{h:function(t,e,n){var r=e-t;return t+n*(r>180||r<-180?r-360*Math.round(r/360):r)}(t.h,e.h,n),c:z(t.c,e.c,n),l:z(t.l,e.l,n),alpha:z(t.alpha,e.alpha,n)}}},Hr=Object.freeze({lab:Zr,hcl:Gr}),Kr=function(t,e){var n;this.expression=t,this._warningHistory={},this._defaultValue="color"===(n=e).type&&Q(n.default)?new lr(0,0,0,0):"color"===n.type?lr.parse(n.default)||null:void 0===n.default?null:n.default,"enum"===e.type&&(this._enumValues=e.values)};Kr.prototype.evaluateWithoutErrorHandling=function(t,e){return this._evaluator||(this._evaluator=new xr),this._evaluator.globals=t,this._evaluator.feature=e,this.expression.evaluate(this._evaluator)},Kr.prototype.evaluate=function(t,e){this._evaluator||(this._evaluator=new xr),this._evaluator.globals=t,this._evaluator.feature=e;try{var n=this.expression.evaluate(this._evaluator);if(null==n)return this._defaultValue;if(this._enumValues&&!(n in this._enumValues))throw new hr("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(n)+" instead.");return n}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Xr=function(t,e){this.kind=t,this._styleExpression=e};Xr.prototype.evaluateWithoutErrorHandling=function(t,e){return this._styleExpression.evaluateWithoutErrorHandling(t,e)},Xr.prototype.evaluate=function(t,e){return this._styleExpression.evaluate(t,e)};var Yr=function(t,e,n){this.kind=t,this.zoomStops=n.labels,this._styleExpression=e,n instanceof Ar&&(this._interpolationType=n.interpolation)};Yr.prototype.evaluateWithoutErrorHandling=function(t,e){return this._styleExpression.evaluateWithoutErrorHandling(t,e)},Yr.prototype.evaluate=function(t,e){return this._styleExpression.evaluate(t,e)},Yr.prototype.interpolationFactor=function(t,e,n){return this._interpolationType?Ar.interpolationFactor(this._interpolationType,t,e,n):0};var Jr=function(t,e){this._parameters=t,this._specification=e,x(this,function t(e,n){var r,i,o,a="color"===n.type,s=e.stops&&"object"==typeof e.stops[0][0],u=s||void 0!==e.property,l=s||!u,c=e.type||("interpolated"===n.function?"exponential":"interval");if(a&&((e=x({},e)).stops&&(e.stops=e.stops.map(function(t){return[t[0],lr.parse(t[1])]})),e.default?e.default=lr.parse(e.default):e.default=lr.parse(n.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!Hr[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===c)r=it;else if("interval"===c)r=rt;else if("categorical"===c){r=nt,i=Object.create(null);for(var p=0,f=e.stops;p<f.length;p+=1){var h=f[p];i[h[0]]=h[1]}o=typeof e.stops[0][0]}else{if("identity"!==c)throw new Error('Unknown function type "'+c+'"');r=ot}if(s){for(var d={},m=[],y=0;y<e.stops.length;y++){var v=e.stops[y],g=v[0].zoom;void 0===d[g]&&(d[g]={zoom:g,type:e.type,property:e.property,default:e.default,stops:[]},m.push(g)),d[g].stops.push([v[0].value,v[1]])}for(var _=[],b=0,w=m;b<w.length;b+=1){var E=w[b];_.push([d[E].zoom,t(d[E],n)])}return{kind:"composite",interpolationFactor:Ar.interpolationFactor.bind(void 0,{name:"linear"}),zoomStops:_.map(function(t){return t[0]}),evaluate:function(t,r){var i=t.zoom;return it({stops:_,base:e.base},n,i).evaluate(i,r)}}}return l?{kind:"camera",interpolationFactor:"exponential"===c?Ar.interpolationFactor.bind(void 0,{name:"exponential",base:void 0!==e.base?e.base:1}):function(){return 0},zoomStops:e.stops.map(function(t){return t[0]}),evaluate:function(t){var a=t.zoom;return r(e,n,a,i,o)}}:{kind:"source",evaluate:function(t,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?et(e.default,n.default):r(e,n,s,i,o)}}}(this._parameters,this._specification))};Jr.deserialize=function(t){return new Jr(t._parameters,t._specification)},Jr.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var Qr={type:"boolean",default:!1,function:!0,"property-function":!0,"zoom-function":!0},ti={"*":function(){return[]},array:ft,boolean:function(t){var e=t.value,n=t.key,r=J(e);return"boolean"!==r?[new Xn(n,e,"boolean expected, "+r+" found")]:[]},number:ht,color:function(t){var e=t.key,n=t.value,r=J(n);return"string"!==r?[new Xn(e,n,"color expected, "+r+" found")]:null===ur(n)?[new Xn(e,n,'color expected, "'+n+'" found')]:[]},constants:b,enum:yt,filter:Tt,function:dt,layer:kt,object:pt,source:It,light:Pt,string:zt};jt.source=Lt(It),jt.light=Lt(Pt),jt.layer=Lt(kt),jt.filter=Lt(Tt),jt.paintProperty=Lt(At),jt.layoutProperty=Lt(Ot);var ei=jt,ni=jt.light,ri=jt.paintProperty,ii=jt.layoutProperty,oi=Bt,ai=3;Bt.prototype.insert=function(t,e,n,r,i){this._forEachCell(e,n,r,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)},Bt.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},Bt.prototype._insertCell=function(t,e,n,r,i,o){this.cells[i].push(o)},Bt.prototype.query=function(t,e,n,r){var i=this.min,o=this.max;if(t<=i&&e<=i&&o<=n&&o<=r)return Array.prototype.slice.call(this.keys);var a=[];return this._forEachCell(t,e,n,r,this._queryCell,a,{}),a},Bt.prototype._queryCell=function(t,e,n,r,i,o,a){var s=this.cells[i];if(null!==s)for(var u=this.keys,l=this.bboxes,c=0;c<s.length;c++){var p=s[c];if(void 0===a[p]){var f=4*p;t<=l[f+2]&&e<=l[f+3]&&n>=l[f+0]&&r>=l[f+1]?(a[p]=!0,o.push(u[p])):a[p]=!1}}},Bt.prototype._forEachCell=function(t,e,n,r,i,o,a){for(var s=this._convertToCellCoord(t),u=this._convertToCellCoord(e),l=this._convertToCellCoord(n),c=this._convertToCellCoord(r),p=s;p<=l;p++)for(var f=u;f<=c;f++){var h=this.d*f+p;if(i.call(this,t,e,n,r,h,o,a))return}},Bt.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Bt.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=ai+this.cells.length+1+1,n=0,r=0;r<this.cells.length;r++)n+=this.cells[r].length;var i=new Int32Array(e+n+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;for(var o=e,a=0;a<t.length;a++){var s=t[a];i[ai+a]=o,i.set(s,o),o+=s.length}return i[ai+t.length]=o,i.set(this.keys,o),o+=this.keys.length,i[ai+t.length+1]=o,i.set(this.bboxes,o),o+=this.bboxes.length,i.buffer};var si=self.ImageData,ui={};for(var li in Nt("Object",Object),oi.serialize=function(t,e){var n=t.toArrayBuffer();return e&&e.push(n),n},oi.deserialize=function(t){return new oi(t)},Nt("Grid",oi),Nt("Color",lr),Nt("Error",Error),Nt("StylePropertyFunction",Jr),Nt("StyleExpression",Kr,{omit:["_evaluator"]}),Nt("ZoomDependentExpression",Yr),Nt("ZoomConstantExpression",Xr),Nt("CompoundExpression",wr,{omit:["_evaluate"]}),Dr)Dr[li]._classRegistryKey||Nt("Expression_"+li,Dr[li]);var ci=function(){this.first=!0};ci.prototype.update=function(t,e){var n=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<n&&(this.lastIntegerZoom=n,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=n,!0))};var pi,fi={"Latin-1 Supplement":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}},hi=!1,di=null,mi=!1,yi=new Hn,vi={applyArabicShaping:null,processBidirectionalText:null,isLoaded:function(){return mi||null!=vi.applyArabicShaping}},gi=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new ci,this.transition={})};gi.prototype.isSupportedScript=function(t){return function(t,e){for(var n=0,r=t;n<r.length;n+=1)if(!Gt(r[n].charCodeAt(0),e))return!1;return!0}(t,vi.isLoaded())},gi.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)};var _i=function(t,e){this.property=t,this.value=e,this.expression=ct(void 0===e?t.specification.default:e,t.specification)};_i.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},_i.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var bi=function(t){this.property=t,this.value=new _i(t,void 0)};bi.prototype.transitioned=function(t,e){return new wi(this.property,this.value,e,u({},t.transition,this.transition),t.now)},bi.prototype.untransitioned=function(){return new wi(this.property,this.value,null,{},0)};var xi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};xi.prototype.getValue=function(t){return h(this._values[t].value.value)},xi.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new bi(this._values[t].property)),this._values[t].value=new _i(this._values[t].property,null===e?void 0:h(e))},xi.prototype.getTransition=function(t){return h(this._values[t].transition)},xi.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new bi(this._values[t].property)),this._values[t].transition=h(e)||void 0},xi.prototype.serialize=function(){for(var t={},e=0,n=Object.keys(this._values);e<n.length;e+=1){var r=n[e],i=this.getValue(r);void 0!==i&&(t[r]=i);var o=this.getTransition(r);void 0!==o&&(t[r+"-transition"]=o)}return t},xi.prototype.transitioned=function(t,e){for(var n=new Ei(this._properties),r=0,i=Object.keys(this._values);r<i.length;r+=1){var o=i[r];n._values[o]=this._values[o].transitioned(t,e._values[o])}return n},xi.prototype.untransitioned=function(){for(var t=new Ei(this._properties),e=0,n=Object.keys(this._values);e<n.length;e+=1){var r=n[e];t._values[r]=this._values[r].untransitioned()}return t};var wi=function(t,e,n,r,i){this.property=t,this.value=e,this.begin=i+r.delay||0,this.end=this.begin+r.duration||0,t.specification.transition&&(r.delay||r.duration)&&(this.prior=n)};wi.prototype.possiblyEvaluate=function(t){var e=t.now||0,n=this.value.possiblyEvaluate(t),r=this.prior;if(r){if(e>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(e<this.begin)return r.possiblyEvaluate(t);var i=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(r.possiblyEvaluate(t),n,function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}(i))}return n};var Ei=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Ei.prototype.possiblyEvaluate=function(t){for(var e=new Ci(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var i=r[n];e._values[i]=this._values[i].possiblyEvaluate(t)}return e},Ei.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1){var n=e[t];if(this._values[n].prior)return!0}return!1};var Si=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};Si.prototype.getValue=function(t){return h(this._values[t].value)},Si.prototype.setValue=function(t,e){this._values[t]=new _i(this._values[t].property,null===e?void 0:h(e))},Si.prototype.serialize=function(){for(var t={},e=0,n=Object.keys(this._values);e<n.length;e+=1){var r=n[e],i=this.getValue(r);void 0!==i&&(t[r]=i)}return t},Si.prototype.possiblyEvaluate=function(t){for(var e=new Ci(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var i=r[n];e._values[i]=this._values[i].possiblyEvaluate(t)}return e};var Ti=function(t,e,n){this.property=t,this.value=e,this.globals=n};Ti.prototype.isConstant=function(){return"constant"===this.value.kind},Ti.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},Ti.prototype.evaluate=function(t){return this.property.evaluate(this.value,this.globals,t)};var Ci=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};Ci.prototype.get=function(t){return this._values[t]};var Ai=function(t){this.specification=t};Ai.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},Ai.prototype.interpolate=function(t,e,n){var r=Cr[this.specification.type];return r?r(t,e,n):t};var Oi=function(t){this.specification=t};Oi.prototype.possiblyEvaluate=function(t,e){return"constant"===t.expression.kind||"camera"===t.expression.kind?new Ti(this,{kind:"constant",value:t.expression.evaluate(e)},e):new Ti(this,t.expression,e)},Oi.prototype.interpolate=function(t,e,n){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new Ti(this,{kind:"constant",value:void 0},t.globals);var r=Cr[this.specification.type];return r?new Ti(this,{kind:"constant",value:r(t.value.value,e.value.value,n)},t.globals):t},Oi.prototype.evaluate=function(t,e,n){return"constant"===t.kind?t.value:t.evaluate(e,n)};var ki=function(t){this.specification=t};ki.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if("constant"===t.expression.kind){var n=t.expression.evaluate(e);return this._calculate(n,n,n,e)}return this._calculate(t.expression.evaluate(new gi(Math.floor(e.zoom-1),e)),t.expression.evaluate(new gi(Math.floor(e.zoom),e)),t.expression.evaluate(new gi(Math.floor(e.zoom+1),e)),e)}},ki.prototype._calculate=function(t,e,n,r){var i=r.zoom,o=i-Math.floor(i),a=r.crossFadingFactor();return i>r.zoomHistory.lastIntegerZoom?{from:t,to:e,fromScale:2,toScale:1,t:o+(1-o)*a}:{from:n,to:e,fromScale:.5,toScale:1,t:1-(1-a)*o}},ki.prototype.interpolate=function(t){return t};var Ii=function(t){this.specification=t};Ii.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},Ii.prototype.interpolate=function(){return!1};var Pi=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},t){var n=t[e],r=this.defaultPropertyValues[e]=new _i(n,void 0),i=this.defaultTransitionablePropertyValues[e]=new bi(n);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=r.possiblyEvaluate({})}};Nt("DataDrivenProperty",Oi),Nt("DataConstantProperty",Ai),Nt("CrossFadedProperty",ki),Nt("ColorRampProperty",Ii);var zi=function(t){function e(e,n){for(var r in t.call(this),this.id=e.id,this.metadata=e.metadata,this.type=e.type,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,this.visibility="visible","background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),this._featureFilter=function(){return!0},n.layout&&(this._unevaluatedLayout=new Si(n.layout)),this._transitionablePaint=new xi(n.paint),e.paint)this.setPaintProperty(r,e.paint[r],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,n){if(null!=e){var r="layers."+this.id+".layout."+t;if(this._validate(ii,r,t,e,n))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility="none"===e?e:"visible"},e.prototype.getPaintProperty=function(t){return c(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,n){if(null!=e){var r="layers."+this.id+".paint."+t;if(this._validate(ri,r,t,e,n))return}c(t,"-transition")?this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0):this._transitionablePaint.setValue(t,e)},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return"none"===this.visibility&&(t.layout=t.layout||{},t.layout.visibility="none"),f(t,function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)})},e.prototype._validate=function(t,e,n,r,i){return(!i||!1!==i.validate)&&Ft(this,t.call(ei,{key:e,layerType:this.type,objectKey:n,value:r,styleSpec:Kn,style:{glyphs:!0,sprite:!0}}))},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e}(Hn),Ri={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Mi=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},ji=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};ji.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},ji.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},ji.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ji.prototype.clear=function(){this.length=0},ji.prototype.resize=function(t){this.reserve(t),this.length=t},ji.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},ji.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Di=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var n=this.length;this.resize(n+1);var r=2*n;return this.int16[r+0]=t,this.int16[r+1]=e,n},e}(ji);Di.prototype.bytesPerElement=4,Nt("StructArrayLayout2i4",Di);var Li=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r){var i=this.length;this.resize(i+1);var o=4*i;return this.int16[o+0]=t,this.int16[o+1]=e,this.int16[o+2]=n,this.int16[o+3]=r,i},e}(ji);Li.prototype.bytesPerElement=8,Nt("StructArrayLayout4i8",Li);var Fi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o){var a=this.length;this.resize(a+1);var s=6*a;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=i,this.int16[s+5]=o,a},e}(ji);Fi.prototype.bytesPerElement=12,Nt("StructArrayLayout2i4i12",Fi);var Bi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s){var u=this.length;this.resize(u+1);var l=6*u,c=12*u;return this.int16[l+0]=t,this.int16[l+1]=e,this.int16[l+2]=n,this.int16[l+3]=r,this.uint8[c+8]=i,this.uint8[c+9]=o,this.uint8[c+10]=a,this.uint8[c+11]=s,u},e}(ji);Bi.prototype.bytesPerElement=12,Nt("StructArrayLayout4i4ub12",Bi);var Ni=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s){var u=this.length;this.resize(u+1);var l=8*u;return this.int16[l+0]=t,this.int16[l+1]=e,this.int16[l+2]=n,this.int16[l+3]=r,this.uint16[l+4]=i,this.uint16[l+5]=o,this.uint16[l+6]=a,this.uint16[l+7]=s,u},e}(ji);Ni.prototype.bytesPerElement=16,Nt("StructArrayLayout4i4ui16",Ni);var Vi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n){var r=this.length;this.resize(r+1);var i=3*r;return this.float32[i+0]=t,this.float32[i+1]=e,this.float32[i+2]=n,r},e}(ji);Vi.prototype.bytesPerElement=12,Nt("StructArrayLayout3f12",Vi);var Ui=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var n=1*e;return this.uint32[n+0]=t,e},e}(ji);Ui.prototype.bytesPerElement=4,Nt("StructArrayLayout1ul4",Ui);var qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s,u,l,c){var p=this.length;this.resize(p+1);var f=12*p,h=6*p;return this.int16[f+0]=t,this.int16[f+1]=e,this.int16[f+2]=n,this.int16[f+3]=r,this.int16[f+4]=i,this.int16[f+5]=o,this.uint32[h+3]=a,this.uint16[f+8]=s,this.uint16[f+9]=u,this.int16[f+10]=l,this.int16[f+11]=c,p},e}(ji);qi.prototype.bytesPerElement=24,Nt("StructArrayLayout6i1ul2ui2i24",qi);var Wi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o){var a=this.length;this.resize(a+1);var s=6*a;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=i,this.int16[s+5]=o,a},e}(ji);Wi.prototype.bytesPerElement=12,Nt("StructArrayLayout2i2i2i12",Wi);var $i=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var n=this.length;this.resize(n+1);var r=4*n;return this.uint8[r+0]=t,this.uint8[r+1]=e,n},e}(ji);$i.prototype.bytesPerElement=4,Nt("StructArrayLayout2ub4",$i);var Zi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s,u,l,c,p,f,h){var d=this.length;this.resize(d+1);var m=20*d,y=10*d,v=40*d;return this.int16[m+0]=t,this.int16[m+1]=e,this.uint16[m+2]=n,this.uint16[m+3]=r,this.uint32[y+2]=i,this.uint32[y+3]=o,this.uint32[y+4]=a,this.uint16[m+10]=s,this.uint16[m+11]=u,this.uint16[m+12]=l,this.float32[y+7]=c,this.float32[y+8]=p,this.uint8[v+36]=f,this.uint8[v+37]=h,d},e}(ji);Zi.prototype.bytesPerElement=40,Nt("StructArrayLayout2i2ui3ul3ui2f2ub40",Zi);var Gi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var n=1*e;return this.float32[n+0]=t,e},e}(ji);Gi.prototype.bytesPerElement=4,Nt("StructArrayLayout1f4",Gi);var Hi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n){var r=this.length;this.resize(r+1);var i=3*r;return this.int16[i+0]=t,this.int16[i+1]=e,this.int16[i+2]=n,r},e}(ji);Hi.prototype.bytesPerElement=6,Nt("StructArrayLayout3i6",Hi);var Ki=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n){var r=this.length;this.resize(r+1);var i=2*r,o=4*r;return this.uint32[i+0]=t,this.uint16[o+2]=e,this.uint16[o+3]=n,r},e}(ji);Ki.prototype.bytesPerElement=8,Nt("StructArrayLayout1ul2ui8",Ki);var Xi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n){var r=this.length;this.resize(r+1);var i=3*r;return this.uint16[i+0]=t,this.uint16[i+1]=e,this.uint16[i+2]=n,r},e}(ji);Xi.prototype.bytesPerElement=6,Nt("StructArrayLayout3ui6",Xi);var Yi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var n=this.length;this.resize(n+1);var r=2*n;return this.uint16[r+0]=t,this.uint16[r+1]=e,n},e}(ji);Yi.prototype.bytesPerElement=4,Nt("StructArrayLayout2ui4",Yi);var Ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var n=this.length;this.resize(n+1);var r=2*n;return this.float32[r+0]=t,this.float32[r+1]=e,n},e}(ji);Ji.prototype.bytesPerElement=8,Nt("StructArrayLayout2f8",Ji);var Qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r){var i=this.length;this.resize(i+1);var o=4*i;return this.float32[o+0]=t,this.float32[o+1]=e,this.float32[o+2]=n,this.float32[o+3]=r,i},e}(ji);Qi.prototype.bytesPerElement=16,Nt("StructArrayLayout4f16",Qi);var to=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return n.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},n.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},n.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},n.x1.get=function(){return this._structArray.int16[this._pos2+2]},n.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},n.y1.get=function(){return this._structArray.int16[this._pos2+3]},n.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},n.x2.get=function(){return this._structArray.int16[this._pos2+4]},n.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},n.y2.get=function(){return this._structArray.int16[this._pos2+5]},n.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},n.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},n.radius.get=function(){return this._structArray.int16[this._pos2+10]},n.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},n.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},n.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},n.anchorPoint.get=function(){return new Bn(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,n),e}(Mi);to.prototype.size=24;var eo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new to(this,t)},e}(qi);Nt("CollisionBoxArray",eo);var no=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},hidden:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},n.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},n.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},n.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},n.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},n.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},n.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},n.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},n.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},n.segment.get=function(){return this._structArray.uint16[this._pos2+10]},n.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},n.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},n.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},n.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},n.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},n.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},n.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},n.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},n.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},n.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},n.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},n.hidden.get=function(){return this._structArray.uint8[this._pos1+37]},n.hidden.set=function(t){this._structArray.uint8[this._pos1+37]=t},Object.defineProperties(e.prototype,n),e}(Mi);no.prototype.size=40;var ro=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new no(this,t)},e}(Zi);Nt("PlacedSymbolArray",ro);var io=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={offsetX:{configurable:!0}};return n.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},n.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,n),e}(Mi);io.prototype.size=4;var oo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new io(this,t)},e}(Gi);Nt("GlyphOffsetArray",oo);var ao=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return n.x.get=function(){return this._structArray.int16[this._pos2+0]},n.x.set=function(t){this._structArray.int16[this._pos2+0]=t},n.y.get=function(){return this._structArray.int16[this._pos2+1]},n.y.set=function(t){this._structArray.int16[this._pos2+1]=t},n.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},n.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,n),e}(Mi);ao.prototype.size=6;var so=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new ao(this,t)},e}(Hi);Nt("SymbolLineVertexArray",so);var uo=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},n.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},n.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,n),e}(Mi);uo.prototype.size=8;var lo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new uo(this,t)},e}(Ki);Nt("FeatureIndexArray",lo);var co=Ht([{name:"a_pos",components:2,type:"Int16"}],4).members,po=function(t){void 0===t&&(t=[]),this.segments=t};po.prototype.prepareSegment=function(t,e,n){var r=this.segments[this.segments.length-1];return t>po.MAX_VERTEX_ARRAY_LENGTH&&d("Max vertices per segment is "+po.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!r||r.vertexLength+t>po.MAX_VERTEX_ARRAY_LENGTH)&&(r={vertexOffset:e.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},this.segments.push(r)),r},po.prototype.get=function(){return this.segments},po.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var n=e[t];for(var r in n.vaos)n.vaos[r].destroy()}},po.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Nt("SegmentVector",po);var fo=function(t,e){return 256*(t=s(Math.floor(t),0,255))+(e=s(Math.floor(e),0,255))},ho=function(t,e,n){this.value=t,this.name=e,this.type=n,this.statistics={max:-1/0}};ho.prototype.defines=function(){return["#define HAS_UNIFORM_u_"+this.name]},ho.prototype.populatePaintArray=function(){},ho.prototype.upload=function(){},ho.prototype.destroy=function(){},ho.prototype.setUniforms=function(t,e,n,r){var i=r.constantOr(this.value),o=t.gl;"color"===this.type?o.uniform4f(e.uniforms["u_"+this.name],i.r,i.g,i.b,i.a):o.uniform1f(e.uniforms["u_"+this.name],i)};var mo=function(t,e,n){this.expression=t,this.name=e,this.type=n,this.statistics={max:-1/0};var r="color"===n?Ji:Gi;this.paintVertexAttributes=[{name:"a_"+e,type:"Float32",components:"color"===n?2:1,offset:0}],this.paintVertexArray=new r};mo.prototype.defines=function(){return[]},mo.prototype.populatePaintArray=function(t,e){var n=this.paintVertexArray,r=n.length;n.reserve(t);var i=this.expression.evaluate(new gi(0),e);if("color"===this.type)for(var o=Xt(i),a=r;a<t;a++)n.emplaceBack(o[0],o[1]);else{for(var s=r;s<t;s++)n.emplaceBack(i);this.statistics.max=Math.max(this.statistics.max,i)}},mo.prototype.upload=function(t){this.paintVertexArray&&(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))},mo.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},mo.prototype.setUniforms=function(t,e){t.gl.uniform1f(e.uniforms["a_"+this.name+"_t"],0)};var yo=function(t,e,n,r,i){this.expression=t,this.name=e,this.type=n,this.useIntegerZoom=r,this.zoom=i,this.statistics={max:-1/0};var o="color"===n?Qi:Ji;this.paintVertexAttributes=[{name:"a_"+e,type:"Float32",components:"color"===n?4:2,offset:0}],this.paintVertexArray=new o};yo.prototype.defines=function(){return[]},yo.prototype.populatePaintArray=function(t,e){var n=this.paintVertexArray,r=n.length;n.reserve(t);var i=this.expression.evaluate(new gi(this.zoom),e),o=this.expression.evaluate(new gi(this.zoom+1),e);if("color"===this.type)for(var a=Xt(i),s=Xt(o),u=r;u<t;u++)n.emplaceBack(a[0],a[1],s[0],s[1]);else{for(var l=r;l<t;l++)n.emplaceBack(i,o);this.statistics.max=Math.max(this.statistics.max,i,o)}},yo.prototype.upload=function(t){this.paintVertexArray&&(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))},yo.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},yo.prototype.interpolationFactor=function(t){return this.useIntegerZoom?this.expression.interpolationFactor(Math.floor(t),this.zoom,this.zoom+1):this.expression.interpolationFactor(t,this.zoom,this.zoom+1)},yo.prototype.setUniforms=function(t,e,n){t.gl.uniform1f(e.uniforms["a_"+this.name+"_t"],this.interpolationFactor(n.zoom))};var vo=function(){this.binders={},this.cacheKey="",this._buffers=[]};vo.createDynamic=function(t,e,n){var r=new vo,i=[];for(var o in t.paint._values)if(n(o)){var a=t.paint.get(o);if(a instanceof Ti&&a.property.specification["property-function"]){var s=Yt(o,t.type),u=a.property.specification.type,l=a.property.useIntegerZoom;"constant"===a.value.kind?(r.binders[o]=new ho(a.value,s,u),i.push("/u_"+s)):"source"===a.value.kind?(r.binders[o]=new mo(a.value,s,u),i.push("/a_"+s)):(r.binders[o]=new yo(a.value,s,u,l,e),i.push("/z_"+s))}}return r.cacheKey=i.sort().join(""),r},vo.prototype.populatePaintArrays=function(t,e){for(var n in this.binders)this.binders[n].populatePaintArray(t,e)},vo.prototype.defines=function(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t},vo.prototype.setUniforms=function(t,e,n,r){for(var i in this.binders)this.binders[i].setUniforms(t,e,r,n.get(i))},vo.prototype.getPaintVertexBuffers=function(){return this._buffers},vo.prototype.upload=function(t){for(var e in this.binders)this.binders[e].upload(t);var n=[];for(var r in this.binders){var i=this.binders[r];(i instanceof mo||i instanceof yo)&&i.paintVertexBuffer&&n.push(i.paintVertexBuffer)}this._buffers=n},vo.prototype.destroy=function(){for(var t in this.binders)this.binders[t].destroy()};var go=function(t,e,n,r){void 0===r&&(r=function(){return!0}),this.programConfigurations={};for(var i=0,o=e;i<o.length;i+=1){var a=o[i];this.programConfigurations[a.id]=vo.createDynamic(a,n,r),this.programConfigurations[a.id].layoutAttributes=t}};go.prototype.populatePaintArrays=function(t,e){for(var n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(t,e)},go.prototype.get=function(t){return this.programConfigurations[t]},go.prototype.upload=function(t){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t)},go.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},Nt("ConstantBinder",ho),Nt("SourceExpressionBinder",mo),Nt("CompositeExpressionBinder",yo),Nt("ProgramConfiguration",vo,{omit:["_buffers"]}),Nt("ProgramConfigurationSet",go);var _o,bo=8192,xo=(_o=16,{min:-1*Math.pow(2,_o-1),max:Math.pow(2,_o-1)-1}),wo=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Di,this.indexArray=new Xi,this.segments=new po,this.programConfigurations=new go(co,t.layers,t.zoom)};wo.prototype.populate=function(t,e){for(var n=0,r=t;n<r.length;n+=1){var i=r[n],o=i.feature,a=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new gi(this.zoom),o)){var u=Jt(o);this.addFeature(o,u),e.featureIndex.insert(o,u,a,s,this.index)}}},wo.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},wo.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,co),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)},wo.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},wo.prototype.addFeature=function(t,e){for(var n=0,r=e;n<r.length;n+=1)for(var i=0,o=r[n];i<o.length;i+=1){var a=o[i],s=a.x,u=a.y;if(!(s<0||s>=bo||u<0||u>=bo)){var l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),c=l.vertexLength;Qt(this.layoutVertexArray,s,u,-1,-1),Qt(this.layoutVertexArray,s,u,1,-1),Qt(this.layoutVertexArray,s,u,1,1),Qt(this.layoutVertexArray,s,u,-1,1),this.indexArray.emplaceBack(c,c+1,c+2),this.indexArray.emplaceBack(c,c+3,c+2),l.vertexLength+=4,l.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},Nt("CircleBucket",wo,{omit:["layers"]});var Eo={paint:new Pi({"circle-radius":new Oi(Kn.paint_circle["circle-radius"]),"circle-color":new Oi(Kn.paint_circle["circle-color"]),"circle-blur":new Oi(Kn.paint_circle["circle-blur"]),"circle-opacity":new Oi(Kn.paint_circle["circle-opacity"]),"circle-translate":new Ai(Kn.paint_circle["circle-translate"]),"circle-translate-anchor":new Ai(Kn.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Ai(Kn.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Ai(Kn.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Oi(Kn.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Oi(Kn.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Oi(Kn.paint_circle["circle-stroke-opacity"])})},So=r(function(t,e){var n;t.exports=((n=new Float32Array(3))[0]=0,n[1]=0,n[2]=0,function(){var t=new Float32Array(4);t[0]=0,t[1]=0,t[2]=0,t[3]=0}(),{vec3:{transformMat3:function(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}},vec4:{transformMat4:function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}},mat2:{create:function(){var t=new Float32Array(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},rotate:function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+o*s,t[1]=i*u+a*s,t[2]=r*-s+o*u,t[3]=i*-s+a*u,t},scale:function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1];return t[0]=r*s,t[1]=i*s,t[2]=o*u,t[3]=a*u,t}},mat3:{create:function(){var t=new Float32Array(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromRotation:function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}},mat4:{create:function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},translate:function(t,e,n){var r,i,o,a,s,u,l,c,p,f,h,d,m=n[0],y=n[1],v=n[2];return e===t?(t[12]=e[0]*m+e[4]*y+e[8]*v+e[12],t[13]=e[1]*m+e[5]*y+e[9]*v+e[13],t[14]=e[2]*m+e[6]*y+e[10]*v+e[14],t[15]=e[3]*m+e[7]*y+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],p=e[8],f=e[9],h=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=l,t[7]=c,t[8]=p,t[9]=f,t[10]=h,t[11]=d,t[12]=r*m+s*y+p*v+e[12],t[13]=i*m+u*y+f*v+e[13],t[14]=o*m+l*y+h*v+e[14],t[15]=a*m+c*y+d*v+e[15]),t},scale:function(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},multiply:function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],p=e[8],f=e[9],h=e[10],d=e[11],m=e[12],y=e[13],v=e[14],g=e[15],_=n[0],b=n[1],x=n[2],w=n[3];return t[0]=_*r+b*s+x*p+w*m,t[1]=_*i+b*u+x*f+w*y,t[2]=_*o+b*l+x*h+w*v,t[3]=_*a+b*c+x*d+w*g,_=n[4],b=n[5],x=n[6],w=n[7],t[4]=_*r+b*s+x*p+w*m,t[5]=_*i+b*u+x*f+w*y,t[6]=_*o+b*l+x*h+w*v,t[7]=_*a+b*c+x*d+w*g,_=n[8],b=n[9],x=n[10],w=n[11],t[8]=_*r+b*s+x*p+w*m,t[9]=_*i+b*u+x*f+w*y,t[10]=_*o+b*l+x*h+w*v,t[11]=_*a+b*c+x*d+w*g,_=n[12],b=n[13],x=n[14],w=n[15],t[12]=_*r+b*s+x*p+w*m,t[13]=_*i+b*u+x*f+w*y,t[14]=_*o+b*l+x*h+w*v,t[15]=_*a+b*c+x*d+w*g,t},perspective:function(t,e,n,r,i){var o=1/Math.tan(e/2),a=1/(r-i);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+r)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*r*a,t[15]=0,t},rotateX:function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],c=e[9],p=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+l*r,t[5]=a*i+c*r,t[6]=s*i+p*r,t[7]=u*i+f*r,t[8]=l*i-o*r,t[9]=c*i-a*r,t[10]=p*i-s*r,t[11]=f*i-u*r,t},rotateZ:function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[4],c=e[5],p=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+l*r,t[1]=a*i+c*r,t[2]=s*i+p*r,t[3]=u*i+f*r,t[4]=l*i-o*r,t[5]=c*i-a*r,t[6]=p*i-s*r,t[7]=f*i-u*r,t},invert:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],p=e[9],f=e[10],h=e[11],d=e[12],m=e[13],y=e[14],v=e[15],g=n*s-r*a,_=n*u-i*a,b=n*l-o*a,x=r*u-i*s,w=r*l-o*s,E=i*l-o*u,S=c*m-p*d,T=c*y-f*d,C=c*v-h*d,A=p*y-f*m,O=p*v-h*m,k=f*v-h*y,I=g*k-_*O+b*A+x*C-w*T+E*S;return I?(I=1/I,t[0]=(s*k-u*O+l*A)*I,t[1]=(i*O-r*k-o*A)*I,t[2]=(m*E-y*w+v*x)*I,t[3]=(f*w-p*E-h*x)*I,t[4]=(u*C-a*k-l*T)*I,t[5]=(n*k-i*C+o*T)*I,t[6]=(y*b-d*E-v*_)*I,t[7]=(c*E-f*b+h*_)*I,t[8]=(a*O-s*C+l*S)*I,t[9]=(r*C-n*O-o*S)*I,t[10]=(d*w-m*b+v*g)*I,t[11]=(p*b-c*w-h*g)*I,t[12]=(s*T-a*A-u*S)*I,t[13]=(n*A-r*T+i*S)*I,t[14]=(m*_-d*x-y*g)*I,t[15]=(c*x-p*_+f*g)*I,t):null},ortho:function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*l,t[15]=1,t}}})}),To=(So.vec3,So.vec4),Co=(So.mat2,So.mat3,So.mat4),Ao=function(t){function e(e){t.call(this,e,Eo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new wo(t)},e.prototype.queryRadius=function(t){var e=t;return ce("circle-radius",this,e)+ce("circle-stroke-width",this,e)+pe(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,r,i,o,a){for(var s=fe(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),i.angle,o),u=this.paint.get("circle-radius").evaluate(e)+this.paint.get("circle-stroke-width").evaluate(e),l="map"===this.paint.get("circle-pitch-alignment"),c=l?s:function(t,e,n){return t.map(function(t){return t.map(function(t){return he(t,e,n)})})}(s,a,i),p=l?u*o:u,f=0,h=n;f<h.length;f+=1)for(var d=0,m=h[f];d<m.length;d+=1){var y=m[d],v=l?y:he(y,a,i),g=p,_=To.transformMat4([],[y.x,y.y,0,1],a);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?g*=_[3]/i.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(g*=i.cameraToCenterDistance/_[3]),te(c,v,g))return!0}return!1},e}(zi),Oo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(wo);Nt("HeatmapBucket",Oo,{omit:["layers"]});var ko=function(t,e){de(this,t,1,e)};ko.prototype.resize=function(t){me(this,t,1)},ko.prototype.clone=function(){return new ko({width:this.width,height:this.height},new Uint8Array(this.data))},ko.copy=function(t,e,n,r,i){ye(t,e,n,r,i,1)};var Io=function(t,e){de(this,t,4,e)};Io.prototype.resize=function(t){me(this,t,4)},Io.prototype.clone=function(){return new Io({width:this.width,height:this.height},new Uint8Array(this.data))},Io.copy=function(t,e,n,r,i){ye(t,e,n,r,i,4)},Nt("AlphaImage",ko),Nt("RGBAImage",Io);var Po={paint:new Pi({"heatmap-radius":new Oi(Kn.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Oi(Kn.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ai(Kn.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ii(Kn.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ai(Kn.paint_heatmap["heatmap-opacity"])})},zo=function(t){function e(e){t.call(this,e,Po),this._updateColorRamp()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Oo(t)},e.prototype.setPaintProperty=function(e,n,r){t.prototype.setPaintProperty.call(this,e,n,r),"heatmap-color"===e&&this._updateColorRamp()},e.prototype._updateColorRamp=function(){var t=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=ve(t,"heatmapDensity"),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},e}(zi),Ro={paint:new Pi({"hillshade-illumination-direction":new Ai(Kn.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Ai(Kn.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Ai(Kn.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Ai(Kn.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Ai(Kn.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Ai(Kn.paint_hillshade["hillshade-accent-color"])})},Mo=function(t){function e(e){t.call(this,e,Ro)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},e}(zi),jo=Ht([{name:"a_pos",components:2,type:"Int16"}],4).members,Do=ge,Lo=ge;ge.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,a=Math.abs(Ne(t,0,o,n));if(i)for(var s=0,u=e.length;s<u;s++){var l=e[s]*n,c=s<u-1?e[s+1]*n:t.length;a-=Math.abs(Ne(t,l,c,n))}var p=0;for(s=0;s<r.length;s+=3){var f=r[s]*n,h=r[s+1]*n,d=r[s+2]*n;p+=Math.abs((t[f]-t[d])*(t[h+1]-t[f+1])-(t[f]-t[h])*(t[d+1]-t[f+1]))}return 0===a&&0===p?0:Math.abs((p-a)/a)},ge.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[i][o][a]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n},Do.default=Lo;var Fo=Ve,Bo=Ve;Fo.default=Bo;var No=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Di,this.indexArray=new Xi,this.indexArray2=new Yi,this.programConfigurations=new go(jo,t.layers,t.zoom),this.segments=new po,this.segments2=new po};No.prototype.populate=function(t,e){for(var n=0,r=t;n<r.length;n+=1){var i=r[n],o=i.feature,a=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new gi(this.zoom),o)){var u=Jt(o);this.addFeature(o,u),e.featureIndex.insert(o,u,a,s,this.index)}}},No.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},No.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,jo),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2),this.programConfigurations.upload(t)},No.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},No.prototype.addFeature=function(t,e){for(var n=0,r=We(e,500);n<r.length;n+=1){for(var i=r[n],o=0,a=0,s=i;a<s.length;a+=1)o+=s[a].length;for(var u=this.segments.prepareSegment(o,this.layoutVertexArray,this.indexArray),l=u.vertexLength,c=[],p=[],f=0,h=i;f<h.length;f+=1){var d=h[f];if(0!==d.length){d!==i[0]&&p.push(c.length/2);var m=this.segments2.prepareSegment(d.length,this.layoutVertexArray,this.indexArray2),y=m.vertexLength;this.layoutVertexArray.emplaceBack(d[0].x,d[0].y),this.indexArray2.emplaceBack(y+d.length-1,y),c.push(d[0].x),c.push(d[0].y);for(var v=1;v<d.length;v++)this.layoutVertexArray.emplaceBack(d[v].x,d[v].y),this.indexArray2.emplaceBack(y+v-1,y+v),c.push(d[v].x),c.push(d[v].y);m.vertexLength+=d.length,m.primitiveLength+=d.length}}for(var g=Do(c,p),_=0;_<g.length;_+=3)this.indexArray.emplaceBack(l+g[_],l+g[_+1],l+g[_+2]);u.vertexLength+=o,u.primitiveLength+=g.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},Nt("FillBucket",No,{omit:["layers"]});var Vo={paint:new Pi({"fill-antialias":new Ai(Kn.paint_fill["fill-antialias"]),"fill-opacity":new Oi(Kn.paint_fill["fill-opacity"]),"fill-color":new Oi(Kn.paint_fill["fill-color"]),"fill-outline-color":new Oi(Kn.paint_fill["fill-outline-color"]),"fill-translate":new Ai(Kn.paint_fill["fill-translate"]),"fill-translate-anchor":new Ai(Kn.paint_fill["fill-translate-anchor"]),"fill-pattern":new ki(Kn.paint_fill["fill-pattern"])})},Uo=function(t){function e(e){t.call(this,e,Vo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(t){this.paint=this._transitioningPaint.possiblyEvaluate(t);var e=this.paint._values["fill-outline-color"];"constant"===e.value.kind&&void 0===e.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},e.prototype.createBucket=function(t){return new No(t)},e.prototype.queryRadius=function(){return pe(this.paint.get("fill-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,r,i,o){return ee(fe(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),i.angle,o),n)},e}(zi),qo=Ht([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,Wo=Math.pow(2,13),$o=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Fi,this.indexArray=new Xi,this.programConfigurations=new go(qo,t.layers,t.zoom),this.segments=new po};$o.prototype.populate=function(t,e){for(var n=0,r=t;n<r.length;n+=1){var i=r[n],o=i.feature,a=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new gi(this.zoom),o)){var u=Jt(o);this.addFeature(o,u),e.featureIndex.insert(o,u,a,s,this.index)}}},$o.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},$o.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,qo),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)},$o.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},$o.prototype.addFeature=function(t,e){for(var n=0,r=We(e,500);n<r.length;n+=1){for(var i=r[n],o=0,a=0,s=i;a<s.length;a+=1)o+=s[a].length;for(var u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),l=0,c=i;l<c.length;l+=1){var p=c[l];if(0!==p.length&&!He(p))for(var f=0,h=0;h<p.length;h++){var d=p[h];if(h>=1){var m=p[h-1];if(!Ge(d,m)){u.vertexLength+4>po.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var y=d.sub(m)._perp()._unit(),v=m.dist(d);f+v>32768&&(f=0),Ze(this.layoutVertexArray,d.x,d.y,y.x,y.y,0,0,f),Ze(this.layoutVertexArray,d.x,d.y,y.x,y.y,0,1,f),f+=v,Ze(this.layoutVertexArray,m.x,m.y,y.x,y.y,0,0,f),Ze(this.layoutVertexArray,m.x,m.y,y.x,y.y,0,1,f);var g=u.vertexLength;this.indexArray.emplaceBack(g,g+1,g+2),this.indexArray.emplaceBack(g+1,g+2,g+3),u.vertexLength+=4,u.primitiveLength+=2}}}}u.vertexLength+o>po.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(o,this.layoutVertexArray,this.indexArray));for(var _=[],b=[],x=u.vertexLength,w=0,E=i;w<E.length;w+=1){var S=E[w];if(0!==S.length){S!==i[0]&&b.push(_.length/2);for(var T=0;T<S.length;T++){var C=S[T];Ze(this.layoutVertexArray,C.x,C.y,0,0,1,1,0),_.push(C.x),_.push(C.y)}}}for(var A=Do(_,b),O=0;O<A.length;O+=3)this.indexArray.emplaceBack(x+A[O],x+A[O+1],x+A[O+2]);u.primitiveLength+=A.length/3,u.vertexLength+=o}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},Nt("FillExtrusionBucket",$o,{omit:["layers"]});var Zo={paint:new Pi({"fill-extrusion-opacity":new Ai(Kn["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Oi(Kn["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ai(Kn["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ai(Kn["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new ki(Kn["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Oi(Kn["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Oi(Kn["paint_fill-extrusion"]["fill-extrusion-base"])})},Go=function(t){function e(e){t.call(this,e,Zo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new $o(t)},e.prototype.queryRadius=function(){return pe(this.paint.get("fill-extrusion-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,r,i,o){return ee(fe(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),i.angle,o),n)},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("fill-extrusion-opacity")&&"none"!==this.visibility},e.prototype.resize=function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null)},e}(zi),Ho=Ht([{name:"a_pos_normal",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,Ko=Ke;Ke.types=["Unknown","Point","LineString","Polygon"],Ke.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,n=t.readVarint()+t.pos,r=1,i=0,o=0,a=0,s=[];t.pos<n;){if(i<=0){var u=t.readVarint();r=7&u,i=u>>3}if(i--,1===r||2===r)o+=t.readSVarint(),a+=t.readSVarint(),1===r&&(e&&s.push(e),e=[]),e.push(new Bn(o,a));else{if(7!==r)throw new Error("unknown command "+r);e&&e.push(e[0].clone())}}return e&&s.push(e),s},Ke.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,n=1,r=0,i=0,o=0,a=1/0,s=-1/0,u=1/0,l=-1/0;t.pos<e;){if(r<=0){var c=t.readVarint();n=7&c,r=c>>3}if(r--,1===n||2===n)(i+=t.readSVarint())<a&&(a=i),i>s&&(s=i),(o+=t.readSVarint())<u&&(u=o),o>l&&(l=o);else if(7!==n)throw new Error("unknown command "+n)}return[a,u,s,l]},Ke.prototype.toGeoJSON=function(t,e,n){function r(t){for(var e=0;e<t.length;e++){var n=t[e],r=180-360*(n.y+u)/a;t[e]=[360*(n.x+s)/a-180,360/Math.PI*Math.atan(Math.exp(r*Math.PI/180))-90]}}var i,o,a=this.extent*Math.pow(2,n),s=this.extent*t,u=this.extent*e,l=this.loadGeometry(),c=Ke.types[this.type];switch(this.type){case 1:var p=[];for(i=0;i<l.length;i++)p[i]=l[i][0];r(l=p);break;case 2:for(i=0;i<l.length;i++)r(l[i]);break;case 3:for(l=function(t){var e=t.length;if(e<=1)return[t];for(var n,r,i=[],o=0;o<e;o++){var a=Ye(t[o]);0!==a&&(void 0===r&&(r=a<0),r===a<0?(n&&i.push(n),n=[t[o]]):n.push(t[o]))}return n&&i.push(n),i}(l),i=0;i<l.length;i++)for(o=0;o<l[i].length;o++)r(l[i][o])}1===l.length?l=l[0]:c="Multi"+c;var f={type:"Feature",geometry:{type:c,coordinates:l},properties:this.properties};return"id"in this&&(f.id=this.id),f};var Xo=Je;Je.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new Ko(this._pbf,e,this.extent,this._keys,this._values)};var Yo={VectorTile:function(t,e){this.layers=t.readFields(tn,{},e)},VectorTileFeature:Ko,VectorTileLayer:Xo},Jo=Yo.VectorTileFeature.types,Qo=63,ta=Math.cos(Math.PI/180*37.5),ea=.5,na=Math.pow(2,14)/ea,ra=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Bi,this.indexArray=new Xi,this.programConfigurations=new go(Ho,t.layers,t.zoom),this.segments=new po};ra.prototype.populate=function(t,e){for(var n=0,r=t;n<r.length;n+=1){var i=r[n],o=i.feature,a=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new gi(this.zoom),o)){var u=Jt(o);this.addFeature(o,u),e.featureIndex.insert(o,u,a,s,this.index)}}},ra.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ra.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ho),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)},ra.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ra.prototype.addFeature=function(t,e){for(var n=this.layers[0].layout,r=n.get("line-join").evaluate(t),i=n.get("line-cap"),o=n.get("line-miter-limit"),a=n.get("line-round-limit"),s=0,u=e;s<u.length;s+=1){var l=u[s];this.addLine(l,t,r,i,o,a)}},ra.prototype.addLine=function(t,e,n,r,i,o){var a=null;e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end")&&(a={start:e.properties.mapbox_clip_start,end:e.properties.mapbox_clip_end,tileTotal:void 0});for(var s="Polygon"===Jo[e.type],u=t.length;u>=2&&t[u-1].equals(t[u-2]);)u--;for(var l=0;l<u-1&&t[l].equals(t[l+1]);)l++;if(!(u<(s?3:2))){a&&(a.tileTotal=function(t,e,n){for(var r,i,o=0,a=e;a<n-1;a++)r=t[a],i=t[a+1],o+=r.dist(i);return o}(t,l,u)),"bevel"===n&&(i=1.05);var c=bo/(512*this.overscaling)*15,p=t[l],f=this.segments.prepareSegment(10*u,this.layoutVertexArray,this.indexArray);this.distance=0;var h,d,m,y=r,v=s?"butt":r,g=!0,_=void 0,b=void 0,x=void 0,w=void 0;this.e1=this.e2=this.e3=-1,s&&(h=t[u-2],w=p.sub(h)._unit()._perp());for(var E=l;E<u;E++)if(!(b=s&&E===u-1?t[l+1]:t[E+1])||!t[E].equals(b)){w&&(x=w),h&&(_=h),h=t[E],w=b?b.sub(h)._unit()._perp():x;var S=(x=x||w).add(w);0===S.x&&0===S.y||S._unit();var T=S.x*w.x+S.y*w.y,C=0!==T?1/T:1/0,A=T<ta&&_&&b;if(A&&E>l){var O=h.dist(_);if(O>2*c){var k=h.sub(h.sub(_)._mult(c/O)._round());this.distance+=k.dist(_),this.addCurrentVertex(k,this.distance,x.mult(1),0,0,!1,f,a),_=k}}var I=_&&b,P=I?n:b?y:v;if(I&&"round"===P&&(C<o?P="miter":C<=2&&(P="fakeround")),"miter"===P&&C>i&&(P="bevel"),"bevel"===P&&(C>2&&(P="flipbevel"),C<i&&(P="miter")),_&&(this.distance+=h.dist(_)),"miter"===P)S._mult(C),this.addCurrentVertex(h,this.distance,S,0,0,!1,f,a);else if("flipbevel"===P){if(C>100)S=w.clone().mult(-1);else{var z=x.x*w.y-x.y*w.x>0?-1:1,R=C*x.add(w).mag()/x.sub(w).mag();S._perp()._mult(R*z)}this.addCurrentVertex(h,this.distance,S,0,0,!1,f,a),this.addCurrentVertex(h,this.distance,S.mult(-1),0,0,!1,f,a)}else if("bevel"===P||"fakeround"===P){var M=x.x*w.y-x.y*w.x>0,j=-Math.sqrt(C*C-1);if(M?(m=0,d=j):(d=0,m=j),g||this.addCurrentVertex(h,this.distance,x,d,m,!1,f,a),"fakeround"===P){for(var D=Math.floor(8*(.5-(T-.5))),L=void 0,F=0;F<D;F++)L=w.mult((F+1)/(D+1))._add(x)._unit(),this.addPieSliceVertex(h,this.distance,L,M,f,a);this.addPieSliceVertex(h,this.distance,S,M,f,a);for(var B=D-1;B>=0;B--)L=x.mult((B+1)/(D+1))._add(w)._unit(),this.addPieSliceVertex(h,this.distance,L,M,f,a)}b&&this.addCurrentVertex(h,this.distance,w,-d,-m,!1,f,a)}else"butt"===P?(g||this.addCurrentVertex(h,this.distance,x,0,0,!1,f,a),b&&this.addCurrentVertex(h,this.distance,w,0,0,!1,f,a)):"square"===P?(g||(this.addCurrentVertex(h,this.distance,x,1,1,!1,f,a),this.e1=this.e2=-1),b&&this.addCurrentVertex(h,this.distance,w,-1,-1,!1,f,a)):"round"===P&&(g||(this.addCurrentVertex(h,this.distance,x,0,0,!1,f,a),this.addCurrentVertex(h,this.distance,x,1,1,!0,f,a),this.e1=this.e2=-1),b&&(this.addCurrentVertex(h,this.distance,w,-1,-1,!0,f,a),this.addCurrentVertex(h,this.distance,w,0,0,!1,f,a)));if(A&&E<u-1){var N=h.dist(b);if(N>2*c){var V=h.add(b.sub(h)._mult(c/N)._round());this.distance+=V.dist(h),this.addCurrentVertex(V,this.distance,w.mult(1),0,0,!1,f,a),h=V}}g=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e)}},ra.prototype.addCurrentVertex=function(t,e,n,r,i,o,a,s){var u,l=this.layoutVertexArray,c=this.indexArray;s&&(e=nn(e,s)),u=n.clone(),r&&u._sub(n.perp()._mult(r)),en(l,t,u,o,!1,r,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(c.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,u=n.mult(-1),i&&u._sub(n.perp()._mult(i)),en(l,t,u,o,!0,-i,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(c.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>na/2&&!s&&(this.distance=0,this.addCurrentVertex(t,this.distance,n,r,i,o,a))},ra.prototype.addPieSliceVertex=function(t,e,n,r,i,o){n=n.mult(r?-1:1);var a=this.layoutVertexArray,s=this.indexArray;o&&(e=nn(e,o)),en(a,t,n,!1,r,0,e),this.e3=i.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),i.primitiveLength++),r?this.e2=this.e3:this.e1=this.e3},Nt("LineBucket",ra,{omit:["layers"]});var ia=new Pi({"line-cap":new Ai(Kn.layout_line["line-cap"]),"line-join":new Oi(Kn.layout_line["line-join"]),"line-miter-limit":new Ai(Kn.layout_line["line-miter-limit"]),"line-round-limit":new Ai(Kn.layout_line["line-round-limit"])}),oa={paint:new Pi({"line-opacity":new Oi(Kn.paint_line["line-opacity"]),"line-color":new Oi(Kn.paint_line["line-color"]),"line-translate":new Ai(Kn.paint_line["line-translate"]),"line-translate-anchor":new Ai(Kn.paint_line["line-translate-anchor"]),"line-width":new Oi(Kn.paint_line["line-width"]),"line-gap-width":new Oi(Kn.paint_line["line-gap-width"]),"line-offset":new Oi(Kn.paint_line["line-offset"]),"line-blur":new Oi(Kn.paint_line["line-blur"]),"line-dasharray":new ki(Kn.paint_line["line-dasharray"]),"line-pattern":new ki(Kn.paint_line["line-pattern"]),"line-gradient":new Ii(Kn.paint_line["line-gradient"])}),layout:ia},aa=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,n){return n=new gi(Math.floor(n.zoom),{now:n.now,fadeDuration:n.fadeDuration,zoomHistory:n.zoomHistory,transition:n.transition}),t.prototype.possiblyEvaluate.call(this,e,n)},e.prototype.evaluate=function(e,n,r){return n=u({},n,{zoom:Math.floor(n.zoom)}),t.prototype.evaluate.call(this,e,n,r)},e}(Oi))(oa.paint.properties["line-width"].specification);aa.useIntegerZoom=!0;var sa=function(t){function e(e){t.call(this,e,oa)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setPaintProperty=function(e,n,r){t.prototype.setPaintProperty.call(this,e,n,r),"line-gradient"===e&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=ve(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values["line-floorwidth"]=aa.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new ra(t)},e.prototype.queryRadius=function(t){var e=t,n=rn(ce("line-width",this,e),ce("line-gap-width",this,e)),r=ce("line-offset",this,e);return n/2+Math.abs(r)+pe(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,r,i,o){var a=fe(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),i.angle,o),s=o/2*rn(this.paint.get("line-width").evaluate(e),this.paint.get("line-gap-width").evaluate(e)),u=this.paint.get("line-offset").evaluate(e);return u&&(n=function(t,e){for(var n=[],r=new Bn(0,0),i=0;i<t.length;i++){for(var o=t[i],a=[],s=0;s<o.length;s++){var u=o[s-1],l=o[s],c=o[s+1],p=0===s?r:l.sub(u)._unit()._perp(),f=s===o.length-1?r:c.sub(l)._unit()._perp(),h=p._add(f)._unit(),d=h.x*f.x+h.y*f.y;h._mult(1/d),a.push(h._mult(e)._add(l))}n.push(a)}return n}(n,u*o)),ne(a,n,s)},e}(zi),ua=Ht([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),la=Ht([{name:"a_projected_pos",components:3,type:"Float32"}],4),ca=(Ht([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Ht([{name:"a_placed",components:2,type:"Uint8"}],4)),pa=(Ht([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]),Ht([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),fa=Ht([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);Ht([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"hidden"}]),Ht([{type:"Float32",name:"offsetX"}]),Ht([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var ha={"!":"\ufe15","#":"\uff03",$:"\uff04","%":"\uff05","&":"\uff06","(":"\ufe35",")":"\ufe36","*":"\uff0a","+":"\uff0b",",":"\ufe10","-":"\ufe32",".":"\u30fb","/":"\uff0f",":":"\ufe13",";":"\ufe14","<":"\ufe3f","=":"\uff1d",">":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42"},da=function(t){function e(e,n,r,i){t.call(this,e,n),this.angle=r,void 0!==i&&(this.segment=i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(Bn);Nt("Anchor",da);var ma=Yo.VectorTileFeature.types,ya=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}],va=function(t){this.layoutVertexArray=new Ni,this.indexArray=new Xi,this.programConfigurations=t,this.segments=new po,this.dynamicLayoutVertexArray=new Vi,this.opacityVertexArray=new Ui,this.placedSymbolArray=new ro};va.prototype.upload=function(t,e){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ua.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.programConfigurations.upload(t),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,la.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,ya,!0),this.opacityVertexBuffer.itemSize=1},va.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},Nt("SymbolBuffers",va);var ga=function(t,e,n){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new n,this.segments=new po,this.collisionVertexArray=new $i};ga.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,ca.members,!0)},ga.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Nt("CollisionBuffers",ga);var _a=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex;var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=an(this.zoom,e["text-size"]),this.iconSizeData=an(this.zoom,e["icon-size"]);var n=this.layers[0].layout;this.sortFeaturesByY=n.get("text-allow-overlap")||n.get("icon-allow-overlap")||n.get("text-ignore-placement")||n.get("icon-ignore-placement")};_a.prototype.createArrays=function(){this.text=new va(new go(ua.members,this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new va(new go(ua.members,this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.collisionBox=new ga(Wi,pa.members,Yi),this.collisionCircle=new ga(Wi,fa.members,Xi),this.glyphOffsetArray=new oo,this.lineVertexArray=new so},_a.prototype.populate=function(t,e){var n=this.layers[0],r=n.layout,i=r.get("text-font"),o=r.get("text-field"),a=r.get("icon-image"),s=("constant"!==o.value.kind||o.value.value.length>0)&&("constant"!==i.value.kind||i.value.value.length>0),u="constant"!==a.value.kind||a.value.value&&a.value.value.length>0;if(this.features=[],s||u){for(var l=e.iconDependencies,c=e.glyphDependencies,p=new gi(this.zoom),f=0,h=t;f<h.length;f+=1){var d=h[f],m=d.feature,y=d.index,v=d.sourceLayerIndex;if(n._featureFilter(p,m)){var g=void 0;s&&(g=on(g=n.getValueAndResolveTokens("text-field",m),n,m));var _=void 0;if(u&&(_=n.getValueAndResolveTokens("icon-image",m)),g||_){var b={text:g,icon:_,index:y,sourceLayerIndex:v,geometry:Jt(m),properties:m.properties,type:ma[m.type]};if(void 0!==m.id&&(b.id=m.id),this.features.push(b),_&&(l[_]=!0),g)for(var x=i.evaluate(m).join(","),w=c[x]=c[x]||{},E="map"===r.get("text-rotation-alignment")&&"line"===r.get("symbol-placement"),S=qt(g),T=0;T<g.length;T++)if(w[g.charCodeAt(T)]=!0,E&&S){var C=ha[g.charAt(T)];C&&(w[C.charCodeAt(0)]=!0)}}}}"line"===r.get("symbol-placement")&&(this.features=function(t){function e(e){s.push(t[e]),u++}function n(t,e,n){var r=a[t];return delete a[t],a[e]=r,s[r].geometry[0].pop(),s[r].geometry[0]=s[r].geometry[0].concat(n[0]),r}function r(t,e,n){var r=o[e];return delete o[e],o[t]=r,s[r].geometry[0].shift(),s[r].geometry[0]=n[0].concat(s[r].geometry[0]),r}function i(t,e,n){var r=n?e[0][e[0].length-1]:e[0][0];return t+":"+r.x+":"+r.y}for(var o={},a={},s=[],u=0,l=0;l<t.length;l++){var c=t[l],p=c.geometry,f=c.text;if(f){var h=i(f,p),d=i(f,p,!0);if(h in a&&d in o&&a[h]!==o[d]){var m=r(h,d,p),y=n(h,d,s[m].geometry);delete o[h],delete a[d],a[i(f,s[y].geometry,!0)]=y,s[m].geometry=null}else h in a?n(h,d,p):d in o?r(h,d,p):(e(l),o[h]=u-1,a[d]=u-1)}else e(l)}return s.filter(function(t){return t.geometry})}(this.features))}},_a.prototype.isEmpty=function(){return 0===this.symbolInstances.length},_a.prototype.upload=function(t){this.text.upload(t,this.sortFeaturesByY),this.icon.upload(t,this.sortFeaturesByY),this.collisionBox.upload(t),this.collisionCircle.upload(t)},_a.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()},_a.prototype.addToLineVertexArray=function(t,e){var n=this.lineVertexArray.length;if(void 0!==t.segment){for(var r=t.dist(e[t.segment+1]),i=t.dist(e[t.segment]),o={},a=t.segment+1;a<e.length;a++)o[a]={x:e[a].x,y:e[a].y,tileUnitDistanceFromAnchor:r},a<e.length-1&&(r+=e[a+1].dist(e[a]));for(var s=t.segment||0;s>=0;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var u=0;u<e.length;u++){var l=o[u];this.lineVertexArray.emplaceBack(l.x,l.y,l.tileUnitDistanceFromAnchor)}}return{lineStartIndex:n,lineLength:this.lineVertexArray.length-n}},_a.prototype.addSymbols=function(t,e,n,r,i,o,a,s,u,l){for(var c=t.indexArray,p=t.layoutVertexArray,f=t.dynamicLayoutVertexArray,h=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray),d=this.glyphOffsetArray.length,m=h.vertexLength,y=0,v=e;y<v.length;y+=1){var g=v[y],_=g.tl,b=g.tr,x=g.bl,w=g.br,E=g.tex,S=h.vertexLength,T=g.glyphOffset[1];sn(p,s.x,s.y,_.x,T+_.y,E.x,E.y,n),sn(p,s.x,s.y,b.x,T+b.y,E.x+E.w,E.y,n),sn(p,s.x,s.y,x.x,T+x.y,E.x,E.y+E.h,n),sn(p,s.x,s.y,w.x,T+w.y,E.x+E.w,E.y+E.h,n),un(f,s,0),c.emplaceBack(S,S+1,S+2),c.emplaceBack(S+1,S+2,S+3),h.vertexLength+=4,h.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(g.glyphOffset[0])}t.placedSymbolArray.emplaceBack(s.x,s.y,d,this.glyphOffsetArray.length-d,m,u,l,s.segment,n?n[0]:0,n?n[1]:0,r[0],r[1],a,!1),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,o)},_a.prototype._addCollisionDebugVertex=function(t,e,n,r,i){return e.emplaceBack(0,0),t.emplaceBack(n.x,n.y,r.x,r.y,Math.round(i.x),Math.round(i.y))},_a.prototype.addCollisionDebugVertices=function(t,e,n,r,i,o,a,s){var u=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),l=u.vertexLength,c=i.layoutVertexArray,p=i.collisionVertexArray;if(this._addCollisionDebugVertex(c,p,o,a.anchor,new Bn(t,e)),this._addCollisionDebugVertex(c,p,o,a.anchor,new Bn(n,e)),this._addCollisionDebugVertex(c,p,o,a.anchor,new Bn(n,r)),this._addCollisionDebugVertex(c,p,o,a.anchor,new Bn(t,r)),u.vertexLength+=4,s){var f=i.indexArray;f.emplaceBack(l,l+1,l+2),f.emplaceBack(l,l+2,l+3),u.primitiveLength+=2}else{var h=i.indexArray;h.emplaceBack(l,l+1),h.emplaceBack(l+1,l+2),h.emplaceBack(l+2,l+3),h.emplaceBack(l+3,l),u.primitiveLength+=4}},_a.prototype.generateCollisionDebugBuffers=function(){for(var t=0,e=this.symbolInstances;t<e.length;t+=1){var n=e[t];n.textCollisionFeature={boxStartIndex:n.textBoxStartIndex,boxEndIndex:n.textBoxEndIndex},n.iconCollisionFeature={boxStartIndex:n.iconBoxStartIndex,boxEndIndex:n.iconBoxEndIndex};for(var r=0;r<2;r++){var i=n[0===r?"textCollisionFeature":"iconCollisionFeature"];if(i)for(var o=i.boxStartIndex;o<i.boxEndIndex;o++){var a=this.collisionBoxArray.get(o),s=a.x1,u=a.y1,l=a.x2,c=a.y2,p=a.radius>0;this.addCollisionDebugVertices(s,u,l,c,p?this.collisionCircle:this.collisionBox,a.anchorPoint,n,p)}}}},_a.prototype.deserializeCollisionBoxes=function(t,e,n,r,i){for(var o={},a=e;a<n;a++){var s=t.get(a);if(0===s.radius){o.textBox={x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,anchorPointX:s.anchorPointX,anchorPointY:s.anchorPointY},o.textFeatureIndex=s.featureIndex;break}o.textCircles||(o.textCircles=[],o.textFeatureIndex=s.featureIndex),o.textCircles.push(s.anchorPointX,s.anchorPointY,s.radius,s.signedDistanceFromAnchor,1)}for(var u=r;u<i;u++){var l=t.get(u);if(0===l.radius){o.iconBox={x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2,anchorPointX:l.anchorPointX,anchorPointY:l.anchorPointY},o.iconFeatureIndex=l.featureIndex;break}}return o},_a.prototype.hasTextData=function(){return this.text.segments.get().length>0},_a.prototype.hasIconData=function(){return this.icon.segments.get().length>0},_a.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},_a.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},_a.prototype.sortFeatures=function(t){var e=this;if(this.sortFeaturesByY&&this.sortedAngle!==t&&(this.sortedAngle=t,!(this.text.segments.get().length>1||this.icon.segments.get().length>1))){for(var n=[],r=0;r<this.symbolInstances.length;r++)n.push(r);var i=Math.sin(t),o=Math.cos(t);n.sort(function(t,n){var r=e.symbolInstances[t],a=e.symbolInstances[n];return(i*r.anchor.x+o*r.anchor.y|0)-(i*a.anchor.x+o*a.anchor.y|0)||a.featureIndex-r.featureIndex}),this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var a=0,s=n;a<s.length;a+=1){var u=s[a],l=e.symbolInstances[u];e.featureSortOrder.push(l.featureIndex);for(var c=0,p=l.placedTextSymbolIndices;c<p.length;c+=1)for(var f=p[c],h=e.text.placedSymbolArray.get(f),d=h.vertexStartIndex+4*h.numGlyphs,m=h.vertexStartIndex;m<d;m+=4)e.text.indexArray.emplaceBack(m,m+1,m+2),e.text.indexArray.emplaceBack(m+1,m+2,m+3);var y=e.icon.placedSymbolArray.get(u);if(y.numGlyphs){var v=y.vertexStartIndex;e.icon.indexArray.emplaceBack(v,v+1,v+2),e.icon.indexArray.emplaceBack(v+1,v+2,v+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Nt("SymbolBucket",_a,{omit:["layers","collisionBoxArray","features","compareText"],shallow:["symbolInstances"]}),_a.MAX_GLYPHS=65535,_a.addDynamicAttributes=un;var ba=new Pi({"symbol-placement":new Ai(Kn.layout_symbol["symbol-placement"]),"symbol-spacing":new Ai(Kn.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ai(Kn.layout_symbol["symbol-avoid-edges"]),"icon-allow-overlap":new Ai(Kn.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Ai(Kn.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ai(Kn.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ai(Kn.layout_symbol["icon-rotation-alignment"]),"icon-size":new Oi(Kn.layout_symbol["icon-size"]),"icon-text-fit":new Ai(Kn.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ai(Kn.layout_symbol["icon-text-fit-padding"]),"icon-image":new Oi(Kn.layout_symbol["icon-image"]),"icon-rotate":new Oi(Kn.layout_symbol["icon-rotate"]),"icon-padding":new Ai(Kn.layout_symbol["icon-padding"]),"icon-keep-upright":new Ai(Kn.layout_symbol["icon-keep-upright"]),"icon-offset":new Oi(Kn.layout_symbol["icon-offset"]),"icon-anchor":new Oi(Kn.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ai(Kn.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ai(Kn.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ai(Kn.layout_symbol["text-rotation-alignment"]),"text-field":new Oi(Kn.layout_symbol["text-field"]),"text-font":new Oi(Kn.layout_symbol["text-font"]),"text-size":new Oi(Kn.layout_symbol["text-size"]),"text-max-width":new Oi(Kn.layout_symbol["text-max-width"]),"text-line-height":new Ai(Kn.layout_symbol["text-line-height"]),"text-letter-spacing":new Oi(Kn.layout_symbol["text-letter-spacing"]),"text-justify":new Oi(Kn.layout_symbol["text-justify"]),"text-anchor":new Oi(Kn.layout_symbol["text-anchor"]),"text-max-angle":new Ai(Kn.layout_symbol["text-max-angle"]),"text-rotate":new Oi(Kn.layout_symbol["text-rotate"]),"text-padding":new Ai(Kn.layout_symbol["text-padding"]),"text-keep-upright":new Ai(Kn.layout_symbol["text-keep-upright"]),"text-transform":new Oi(Kn.layout_symbol["text-transform"]),"text-offset":new Oi(Kn.layout_symbol["text-offset"]),"text-allow-overlap":new Ai(Kn.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Ai(Kn.layout_symbol["text-ignore-placement"]),"text-optional":new Ai(Kn.layout_symbol["text-optional"])}),xa={paint:new Pi({"icon-opacity":new Oi(Kn.paint_symbol["icon-opacity"]),"icon-color":new Oi(Kn.paint_symbol["icon-color"]),"icon-halo-color":new Oi(Kn.paint_symbol["icon-halo-color"]),"icon-halo-width":new Oi(Kn.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Oi(Kn.paint_symbol["icon-halo-blur"]),"icon-translate":new Ai(Kn.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ai(Kn.paint_symbol["icon-translate-anchor"]),"text-opacity":new Oi(Kn.paint_symbol["text-opacity"]),"text-color":new Oi(Kn.paint_symbol["text-color"]),"text-halo-color":new Oi(Kn.paint_symbol["text-halo-color"]),"text-halo-width":new Oi(Kn.paint_symbol["text-halo-width"]),"text-halo-blur":new Oi(Kn.paint_symbol["text-halo-blur"]),"text-translate":new Ai(Kn.paint_symbol["text-translate"]),"text-translate-anchor":new Ai(Kn.paint_symbol["text-translate-anchor"])}),layout:ba},wa=function(t){function e(e){t.call(this,e,xa)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),"auto"===this.layout.get("icon-rotation-alignment")&&("line"===this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("line"===this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"))},e.prototype.getValueAndResolveTokens=function(t,e){var n,r=this.layout.get(t).evaluate(e),i=this._unevaluatedLayout._values[t];return i.isDataDriven()||st(i.value)?r:(n=e.properties,r.replace(/{([^{}]+)}/g,function(t,e){return e in n?String(n[e]):""}))},e.prototype.createBucket=function(t){return new _a(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(zi),Ea={paint:new Pi({"background-color":new Ai(Kn.paint_background["background-color"]),"background-pattern":new ki(Kn.paint_background["background-pattern"]),"background-opacity":new Ai(Kn.paint_background["background-opacity"])})},Sa=function(t){function e(e){t.call(this,e,Ea)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(zi),Ta={paint:new Pi({"raster-opacity":new Ai(Kn.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ai(Kn.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ai(Kn.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ai(Kn.paint_raster["raster-brightness-max"]),"raster-saturation":new Ai(Kn.paint_raster["raster-saturation"]),"raster-contrast":new Ai(Kn.paint_raster["raster-contrast"]),"raster-fade-duration":new Ai(Kn.paint_raster["raster-fade-duration"])})},Ca={circle:Ao,heatmap:zo,hillshade:Mo,fill:Uo,"fill-extrusion":Go,line:sa,symbol:wa,background:Sa,raster:function(t){function e(e){t.call(this,e,Ta)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(zi)},Aa=r(function(t,e){t.exports=function(){function t(t,e,n){n=n||{},this.w=t||64,this.h=e||64,this.autoResize=!!n.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function e(t,e,n){this.x=0,this.y=t,this.w=this.free=e,this.h=n}return t.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var n,r,i,o,a=[],s=0;s<t.length;s++)if(n=t[s].w||t[s].width,r=t[s].h||t[s].height,i=t[s].id,n&&r){if(!(o=this.packOne(n,r,i)))continue;e.inPlace&&(t[s].x=o.x,t[s].y=o.y,t[s].id=o.id),a.push(o)}return this.shrink(),a},t.prototype.packOne=function(t,n,r){var i,o,a,s,u,l,c,p,f={freebin:-1,shelf:-1,waste:1/0},h=0;if("string"==typeof r||"number"==typeof r){if(i=this.getBin(r))return this.ref(i),i;"number"==typeof r&&(this.maxId=Math.max(r,this.maxId))}else r=++this.maxId;for(s=0;s<this.freebins.length;s++){if(n===(i=this.freebins[s]).maxh&&t===i.maxw)return this.allocFreebin(s,t,n,r);n>i.maxh||t>i.maxw||n<=i.maxh&&t<=i.maxw&&(a=i.maxw*i.maxh-t*n)<f.waste&&(f.waste=a,f.freebin=s)}for(s=0;s<this.shelves.length;s++)if(h+=(o=this.shelves[s]).h,!(t>o.free)){if(n===o.h)return this.allocShelf(s,t,n,r);n>o.h||n<o.h&&(a=(o.h-n)*t)<f.waste&&(f.freebin=-1,f.waste=a,f.shelf=s)}return-1!==f.freebin?this.allocFreebin(f.freebin,t,n,r):-1!==f.shelf?this.allocShelf(f.shelf,t,n,r):n<=this.h-h&&t<=this.w?(o=new e(h,this.w,n),this.allocShelf(this.shelves.push(o)-1,t,n,r)):this.autoResize?(u=l=this.h,((c=p=this.w)<=u||t>c)&&(p=2*Math.max(t,c)),(u<c||n>u)&&(l=2*Math.max(n,u)),this.resize(p,l),this.packOne(t,n,r)):null},t.prototype.allocFreebin=function(t,e,n,r){var i=this.freebins.splice(t,1)[0];return i.id=r,i.w=e,i.h=n,i.refcount=0,this.bins[r]=i,this.ref(i),i},t.prototype.allocShelf=function(t,e,n,r){var i=this.shelves[t].alloc(e,n,r);return this.bins[r]=i,this.ref(i),i},t.prototype.shrink=function(){if(this.shelves.length>0){for(var t=0,e=0,n=0;n<this.shelves.length;n++){var r=this.shelves[n];e+=r.h,t=Math.max(r.w-r.free,t)}this.resize(t,e)}},t.prototype.getBin=function(t){return this.bins[t]},t.prototype.ref=function(t){if(1==++t.refcount){var e=t.h;this.stats[e]=1+(0|this.stats[e])}return t.refcount},t.prototype.unref=function(t){return 0===t.refcount?0:(0==--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},t.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var n=0;n<this.shelves.length;n++)this.shelves[n].resize(t);return!0},e.prototype.alloc=function(t,e,n){if(t>this.free||e>this.h)return null;var r=this.x;return this.x+=t,this.free-=t,new function(t,e,n,r,i,o,a){this.id=t,this.x=e,this.y=n,this.w=r,this.h=i,this.maxw=o||r,this.maxh=a||i,this.refcount=0}(n,r,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t}()}),Oa=function(t,e){var n=e.pixelRatio;this.paddedRect=t,this.pixelRatio=n},ka={tl:{configurable:!0},br:{configurable:!0},displaySize:{configurable:!0}};ka.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},ka.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},ka.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Oa.prototype,ka);var Ia=function(t){var e=new Io({width:0,height:0}),n={},r=new Aa(0,0,{autoResize:!0});for(var i in t){var o=t[i],a=r.packOne(o.data.width+2,o.data.height+2);e.resize({width:r.w,height:r.h}),Io.copy(o.data,e,{x:0,y:0},{x:a.x+1,y:a.y+1},o.data),n[i]=new Oa(a,o)}r.shrink(),e.resize({width:r.w,height:r.h}),this.image=e,this.positions=n};Nt("ImagePosition",Oa),Nt("ImageAtlas",Ia);var Pa=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,p=n?i-1:0,f=n?-1:1,h=t[e+p];for(p+=f,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+t[e+p],p+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+p],p+=f,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=l}return(h?-1:1)*a*Math.pow(2,o-r)},za=function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,p=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+p>=1?f/u:f*Math.pow(2,1-p))*u>=2&&(a++,u/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(e*u-1)*Math.pow(2,i),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;t[n+h]=255&s,h+=d,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+h]=255&a,h+=d,a/=256,l-=8);t[n+h-d]|=128*m},Ra=ln;ln.Varint=0,ln.Fixed64=1,ln.Bytes=2,ln.Fixed32=5,ln.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos<n;){var r=this.readVarint(),i=r>>3,o=this.pos;this.type=7&r,t(i,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=wn(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=Sn(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=wn(this.buf,this.pos)+4294967296*wn(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=wn(this.buf,this.pos)+4294967296*Sn(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Pa(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Pa(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,r=this.buf;return e=127&(n=r[this.pos++]),n<128?e:(e|=(127&(n=r[this.pos++]))<<7,n<128?e:(e|=(127&(n=r[this.pos++]))<<14,n<128?e:(e|=(127&(n=r[this.pos++]))<<21,n<128?e:function(t,e,n){var r,i,o=n.buf;if(i=o[n.pos++],r=(112&i)>>4,i<128)return pn(t,r,e);if(i=o[n.pos++],r|=(127&i)<<3,i<128)return pn(t,r,e);if(i=o[n.pos++],r|=(127&i)<<10,i<128)return pn(t,r,e);if(i=o[n.pos++],r|=(127&i)<<17,i<128)return pn(t,r,e);if(i=o[n.pos++],r|=(127&i)<<24,i<128)return pn(t,r,e);if(i=o[n.pos++],r|=(1&i)<<31,i<128)return pn(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,n){for(var r="",i=e;i<n;){var o,a,s,u=t[i],l=null,c=u>239?4:u>223?3:u>191?2:1;if(i+c>n)break;1===c?u<128&&(l=u):2===c?128==(192&(o=t[i+1]))&&(l=(31&u)<<6|63&o)<=127&&(l=null):3===c?(o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&((l=(15&u)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===c&&(o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,c=1):l>65535&&(l-=65536,r+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),r+=String.fromCharCode(l),i+=c}return r}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var n=cn(this);for(t=t||[];this.pos<n;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=cn(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=cn(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=cn(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=cn(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=cn(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=cn(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=cn(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=cn(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===ln.Varint)for(;this.buf[this.pos++]>127;);else if(e===ln.Bytes)this.pos=this.readVarint()+this.pos;else if(e===ln.Fixed32)this.pos+=4;else{if(e!==ln.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var n=new Uint8Array(e);n.set(this.buf),this.buf=n,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),En(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),En(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),En(this.buf,-1&t,this.pos),En(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),En(this.buf,-1&t,this.pos),En(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var n,r;if(t>=0?(n=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,r=r+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(r,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var r,i,o=0;o<e.length;o++){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){r>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):i=r;continue}if(r<56320){t[n++]=239,t[n++]=191,t[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(t[n++]=239,t[n++]=191,t[n++]=189,i=null);r<128?t[n++]=r:(r<2048?t[n++]=r>>6|192:(r<65536?t[n++]=r>>12|224:(t[n++]=r>>18|240,t[n++]=r>>12&63|128),t[n++]=r>>6&63|128),t[n++]=63&r|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&fn(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),za(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),za(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;n<e;n++)this.buf[this.pos++]=t[n]},writeRawMessage:function(t,e){this.pos++;var n=this.pos;t(e,this);var r=this.pos-n;r>=128&&fn(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,n){this.writeTag(t,ln.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){this.writeMessage(t,hn,e)},writePackedSVarint:function(t,e){this.writeMessage(t,dn,e)},writePackedBoolean:function(t,e){this.writeMessage(t,vn,e)},writePackedFloat:function(t,e){this.writeMessage(t,mn,e)},writePackedDouble:function(t,e){this.writeMessage(t,yn,e)},writePackedFixed32:function(t,e){this.writeMessage(t,gn,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,_n,e)},writePackedFixed64:function(t,e){this.writeMessage(t,bn,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,xn,e)},writeBytesField:function(t,e){this.writeTag(t,ln.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,ln.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,ln.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,ln.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,ln.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,ln.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,ln.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,ln.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,ln.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,ln.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var Ma=3,ja=Ma,Da=function(t,e,n){this.target=t,this.parent=e,this.mapId=n,this.callbacks={},this.callbackID=0,l(["receive"],this),this.target.addEventListener("message",this.receive,!1)};Da.prototype.send=function(t,e,n,r){var i=n?this.mapId+":"+this.callbackID++:null;n&&(this.callbacks[i]=n);var o=[];this.target.postMessage({targetMapId:r,sourceMapId:this.mapId,type:t,id:String(i),data:Vt(e,o)},o)},Da.prototype.receive=function(t){var e,n=this,r=t.data,i=r.id;if(!r.targetMapId||this.mapId===r.targetMapId){var o=function(t,e){var r=[];n.target.postMessage({sourceMapId:n.mapId,type:"<response>",id:String(i),error:t?Vt(t):null,data:Vt(e,r)},r)};if("<response>"===r.type)e=this.callbacks[r.id],delete this.callbacks[r.id],e&&r.error?e(Ut(r.error)):e&&e(null,Ut(r.data));else if(void 0!==r.id&&this.parent[r.type])this.parent[r.type](r.sourceMapId,Ut(r.data),o);else if(void 0!==r.id&&this.parent.getWorkerSource){var a=r.type.split(".");this.parent.getWorkerSource(r.sourceMapId,a[0],a[1])[a[2]](Ut(r.data),o)}else this.parent[r.type](Ut(r.data))}},Da.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)};var La=n(r(function(t,e){!function(t){function e(t,e,r){e=Math.pow(2,r)-e-1;var i=n(256*t,256*e,r),o=n(256*(t+1),256*(e+1),r);return i[0]+","+i[1]+","+o[0]+","+o[1]}function n(t,e,n){var r=2*Math.PI*6378137/256/Math.pow(2,n);return[t*r-2*Math.PI*6378137/2,e*r-2*Math.PI*6378137/2]}t.getURL=function(t,n,r,i,o,a){return a=a||{},t+"?"+["bbox="+e(r,i,o),"format="+(a.format||"image/png"),"service="+(a.service||"WMS"),"version="+(a.version||"1.1.1"),"request="+(a.request||"GetMap"),"srs="+(a.srs||"EPSG:3857"),"width="+(a.width||256),"height="+(a.height||256),"layers="+n].join("&")},t.getTileBBox=e,t.getMercCoords=n,Object.defineProperty(t,"__esModule",{value:!0})}(e)})),Fa=function(t,e,n){this.z=t,this.x=e,this.y=n,this.key=On(0,t,e,n)};Fa.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Fa.prototype.url=function(t,e){var n=La.getTileBBox(this.x,this.y,this.z),r=function(t,e,n){for(var r,i="",o=t;o>0;o--)i+=(e&(r=1<<o-1)?1:0)+(n&r?2:0);return i}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",r).replace("{bbox-epsg-3857}",n)};var Ba=function(t,e){this.wrap=t,this.canonical=e,this.key=On(t,e.z,e.x,e.y)},Na=function(t,e,n,r,i){this.overscaledZ=t,this.wrap=e,this.canonical=new Fa(n,+r,+i),this.key=On(e,t,r,i)};Na.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},Na.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new Na(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Na(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},Na.prototype.isChildOf=function(t){var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},Na.prototype.children=function(t){if(this.overscaledZ>=t)return[new Na(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,n=2*this.canonical.x,r=2*this.canonical.y;return[new Na(e,this.wrap,e,n,r),new Na(e,this.wrap,e,n+1,r),new Na(e,this.wrap,e,n,r+1),new Na(e,this.wrap,e,n+1,r+1)]},Na.prototype.isLessThan=function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))},Na.prototype.wrapped=function(){return new Na(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Na.prototype.unwrapTo=function(t){return new Na(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},Na.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Na.prototype.toUnwrapped=function(){return new Ba(this.wrap,this.canonical)},Na.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Na.prototype.toCoordinate=function(){return new Fn(this.canonical.x+Math.pow(2,this.wrap),this.canonical.y,this.canonical.z)},Nt("CanonicalTileID",Fa),Nt("OverscaledTileID",Na,{omit:["posMatrix"]});var Va=function(t,e,n){if(t<=0)throw new RangeError("Level must have positive dimension");this.dim=t,this.border=e,this.stride=this.dim+2*this.border,this.data=n||new Int32Array((this.dim+2*this.border)*(this.dim+2*this.border))};Va.prototype.set=function(t,e,n){this.data[this._idx(t,e)]=n+65536},Va.prototype.get=function(t,e){return this.data[this._idx(t,e)]-65536},Va.prototype._idx=function(t,e){if(t<-this.border||t>=this.dim+this.border||e<-this.border||e>=this.dim+this.border)throw new RangeError("out of range source coordinates for DEM data");return(e+this.border)*this.stride+(t+this.border)},Nt("Level",Va);var Ua=function(t,e,n){this.uid=t,this.scale=e||1,this.level=n||new Va(256,512),this.loaded=!!n};Ua.prototype.loadFromImage=function(t,e){if(t.height!==t.width)throw new RangeError("DEM tiles must be square");if(e&&"mapbox"!==e&&"terrarium"!==e)return d('"'+e+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');var n=this.level=new Va(t.width,t.width/2),r=t.data;this._unpackData(n,r,e||"mapbox");for(var i=0;i<n.dim;i++)n.set(-1,i,n.get(0,i)),n.set(n.dim,i,n.get(n.dim-1,i)),n.set(i,-1,n.get(i,0)),n.set(i,n.dim,n.get(i,n.dim-1));n.set(-1,-1,n.get(0,0)),n.set(n.dim,-1,n.get(n.dim-1,0)),n.set(-1,n.dim,n.get(0,n.dim-1)),n.set(n.dim,n.dim,n.get(n.dim-1,n.dim-1)),this.loaded=!0},Ua.prototype._unpackMapbox=function(t,e,n){return(256*t*256+256*e+n)/10-1e4},Ua.prototype._unpackTerrarium=function(t,e,n){return 256*t+e+n/256-32768},Ua.prototype._unpackData=function(t,e,n){for(var r={mapbox:this._unpackMapbox,terrarium:this._unpackTerrarium}[n],i=0;i<t.dim;i++)for(var o=0;o<t.dim;o++){var a=4*(i*t.dim+o);t.set(o,i,this.scale*r(e[a],e[a+1],e[a+2]))}},Ua.prototype.getPixels=function(){return new Io({width:this.level.dim+2*this.level.border,height:this.level.dim+2*this.level.border},new Uint8Array(this.level.data.buffer))},Ua.prototype.backfillBorder=function(t,e,n){var r=this.level,i=t.level;if(r.dim!==i.dim)throw new Error("level mismatch (dem dimension)");var o=e*r.dim,a=e*r.dim+r.dim,u=n*r.dim,l=n*r.dim+r.dim;switch(e){case-1:o=a-1;break;case 1:a=o+1}switch(n){case-1:u=l-1;break;case 1:l=u+1}for(var c=s(o,-r.border,r.dim+r.border),p=s(a,-r.border,r.dim+r.border),f=s(u,-r.border,r.dim+r.border),h=s(l,-r.border,r.dim+r.border),d=-e*r.dim,m=-n*r.dim,y=f;y<h;y++)for(var v=c;v<p;v++)r.set(v,y,i.get(v+d,y+m))},Nt("DEMData",Ua);var qa=function(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var n=t[e];this._stringToNumber[n]=e,this._numberToString[e]=n}};qa.prototype.encode=function(t){return this._stringToNumber[t]},qa.prototype.decode=function(t){return this._numberToString[t]};var Wa=function(t,e,n,r){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=n,t._y=r,this.properties=t.properties,null!=t.id&&(this.id=t.id)},$a={geometry:{configurable:!0}};$a.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},$a.geometry.set=function(t){this._geometry=t},Wa.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&(t[e]=this[e]);return t},Object.defineProperties(Wa.prototype,$a);var Za=function(t,e,n){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=e||new oi(bo,16,0),this.featureIndexArray=n||new lo};Za.prototype.insert=function(t,e,n,r,i){var o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(n,r,i);for(var a=0;a<e.length;a++){for(var s=e[a],u=[1/0,1/0,-1/0,-1/0],l=0;l<s.length;l++){var c=s[l];u[0]=Math.min(u[0],c.x),u[1]=Math.min(u[1],c.y),u[2]=Math.max(u[2],c.x),u[3]=Math.max(u[3],c.y)}u[0]<bo&&u[1]<bo&&u[2]>=0&&u[3]>=0&&this.grid.insert(o,u[0],u[1],u[2],u[3])}},Za.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Yo.VectorTile(new Ra(this.rawTileData)).layers,this.sourceLayerCoder=new qa(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Za.prototype.query=function(t,e){var n=this;this.loadVTLayers();for(var r=t.params||{},i=bo/t.tileSize/t.scale,o=gt(r.filter),a=t.queryGeometry,s=t.queryPadding*i,u=1/0,l=1/0,c=-1/0,p=-1/0,f=0;f<a.length;f++)for(var h=a[f],d=0;d<h.length;d++){var m=h[d];u=Math.min(u,m.x),l=Math.min(l,m.y),c=Math.max(c,m.x),p=Math.max(p,m.y)}var y=this.grid.query(u-s,l-s,c+s,p+s);y.sort(kn);for(var v,g={},_=0;_<y.length;_++)!function(s){var u=y[s];if(u!==v){v=u;var l=n.featureIndexArray.get(u),c=null;n.loadMatchingFeature(g,l.bucketIndex,l.sourceLayerIndex,l.featureIndex,o,r.layers,e,function(e,r){return c||(c=Jt(e)),r.queryIntersectsFeature(a,e,c,n.z,t.transform,i,t.posMatrix)})}}(_);return g},Za.prototype.loadMatchingFeature=function(t,e,n,r,i,o,a,s){var u=this.bucketLayerIDs[e];if(!o||function(t,e){for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>=0)return!0;return!1}(o,u)){var l=this.sourceLayerCoder.decode(n),c=this.vtLayers[l].feature(r);if(i(new gi(this.tileID.overscaledZ),c))for(var p=0;p<u.length;p++){var f=u[p];if(!(o&&o.indexOf(f)<0)){var h=a[f];if(h&&(!s||s(c,h))){var d=new Wa(c,this.z,this.x,this.y);d.layer=h.serialize();var m=t[f];void 0===m&&(m=t[f]=[]),m.push({featureIndex:r,feature:d})}}}}},Za.prototype.lookupSymbolFeatures=function(t,e,n,r,i,o){var a={};this.loadVTLayers();for(var s=gt(r),u=0,l=t;u<l.length;u+=1){var c=l[u];this.loadMatchingFeature(a,e,n,c,s,i,o)}return a},Za.prototype.hasLayer=function(t){for(var e=0,n=this.bucketLayerIDs;e<n.length;e+=1)for(var r=0,i=n[e];r<i.length;r+=1)if(t===i[r])return!0;return!1},Nt("FeatureIndex",Za,{omit:["rawTileData","sourceLayerCoder"]});var Ga={horizontal:1,vertical:2,horizontalOnly:3},Ha={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Ka={};Ka[10]=!0,Ka[32]=!0,Ka[38]=!0,Ka[40]=!0,Ka[41]=!0,Ka[43]=!0,Ka[45]=!0,Ka[47]=!0,Ka[173]=!0,Ka[183]=!0,Ka[8203]=!0,Ka[8208]=!0,Ka[8211]=!0,Ka[8231]=!0,t.commonjsGlobal=Dn,t.unwrapExports=n,t.createCommonjsModule=r,t.default=self,t.default$1=Bn,t.getJSON=function(t,e){var n=v(t);return n.setRequestHeader("Accept","application/json"),n.onerror=function(){e(new Error(n.statusText))},n.onload=function(){if(n.status>=200&&n.status<300&&n.response){var r;try{r=JSON.parse(n.response)}catch(t){return e(t)}e(null,r)}else e(401===n.status&&t.url.match(/mapbox.com/)?new Wn(n.statusText+": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens",n.status,t.url):new Wn(n.statusText,n.status,t.url))},n.send(),n},t.getImage=function(t,e){return $n(t,function(t,n){if(t)e(t);else if(n){var r=new self.Image,i=self.URL||self.webkitURL;r.onload=function(){e(null,r),i.revokeObjectURL(r.src)};var o=new self.Blob([new Uint8Array(n.data)],{type:"image/png"});r.cacheControl=n.cacheControl,r.expires=n.expires,r.src=n.data.byteLength?i.createObjectURL(o):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}})},t.ResourceType=qn,t.RGBAImage=Io,t.default$2=Aa,t.ImagePosition=Oa,t.getArrayBuffer=$n,t.default$3=function(t){return new Ra(t).readFields(Tn,[])},t.default$4=fi,t.asyncAll=function(t,e,n){if(!t.length)return n(null,[]);var r=t.length,i=new Array(t.length),o=null;t.forEach(function(t,a){e(t,function(t,e){t&&(o=t),i[a]=e,0==--r&&n(o,i)})})},t.AlphaImage=ko,t.default$5=Kn,t.endsWith=c,t.extend=u,t.sphericalToCartesian=function(t){var e=t[0],n=t[1],r=t[2];return n+=90,n*=Math.PI/180,r*=Math.PI/180,{x:e*Math.cos(n)*Math.sin(r),y:e*Math.sin(n)*Math.sin(r),z:e*Math.cos(r)}},t.Evented=Hn,t.validateStyle=ei,t.validateLight=ni,t.emitValidationErrors=Ft,t.default$6=lr,t.number=z,t.Properties=Pi,t.Transitionable=xi,t.Transitioning=Ei,t.PossiblyEvaluated=Ci,t.DataConstantProperty=Ai,t.warnOnce=d,t.uniqueId=function(){return Vn++},t.default$7=Da,t.pick=function(t,e){for(var n={},r=0;r<e.length;r++){var i=e[r];i in t&&(n[i]=t[i])}return n},t.wrap=function(t,e,n){var r=n-e,i=((t-e)%r+r)%r+e;return i===e?n:i},t.clamp=s,t.Event=Zn,t.ErrorEvent=Gn,t.OverscaledTileID=Na,t.default$8=bo,t.createLayout=Ht,t.getCoordinatesCenter=function(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<t.length;o++)e=Math.min(e,t[o].column),n=Math.min(n,t[o].row),r=Math.max(r,t[o].column),i=Math.max(i,t[o].row);var a=r-e,s=i-n,u=Math.max(a,s),l=Math.max(0,Math.floor(-Math.log(u)/Math.LN2));return new Fn((e+r)/2,(n+i)/2,0).zoomTo(l)},t.CanonicalTileID=Fa,t.RasterBoundsArray=Li,t.getVideo=function(t,e){var n,r,i=self.document.createElement("video");i.onloadstart=function(){e(null,i)};for(var o=0;o<t.length;o++){var a=self.document.createElement("source");n=t[o],r=void 0,(r=self.document.createElement("a")).href=n,(r.protocol!==self.document.location.protocol||r.host!==self.document.location.host)&&(i.crossOrigin="Anonymous"),a.src=t[o],i.appendChild(a)}return i},t.default$9=Xn,t.bindAll=l,t.default$10=function t(e,n){if(Array.isArray(e)){if(!Array.isArray(n)||e.length!==n.length)return!1;for(var r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==n){if("object"!=typeof n)return!1;if(Object.keys(e).length!==Object.keys(n).length)return!1;for(var i in e)if(!t(e[i],n[i]))return!1;return!0}return e===n},t.parseCacheControl=function(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(t,n,r,i){var o=r||i;return e[n]=!o||o.toLowerCase(),""}),e["max-age"]){var n=parseInt(e["max-age"],10);isNaN(n)?delete e["max-age"]:e["max-age"]=n}return e},t.default$11=Za,t.default$12=Wa,t.default$13=gt,t.default$14=_a,t.CollisionBoxArray=eo,t.default$15=po,t.TriangleIndexArray=Xi,t.default$16=gi,t.default$17=Fn,t.keysDifference=function(t,e){var n=[];for(var r in t)r in e||n.push(r);return n},t.default$18=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.mat4=Co,t.vec4=To,t.getSizeData=an,t.evaluateSizeForFeature=function(t,e,n){var r=e;return"source"===t.functionType?n.lowerSize/10:"composite"===t.functionType?z(n.lowerSize/10,n.upperSize/10,r.uSizeT):r.uSize},t.evaluateSizeForZoom=function(t,e,n){if("constant"===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if("source"===t.functionType)return{uSizeT:0,uSize:0};if("camera"===t.functionType){var r=t.propertyValue,i=t.zoomRange,o=t.sizeRange,a=s(ct(r,n.specification).interpolationFactor(e,i.min,i.max),0,1);return{uSizeT:0,uSize:o.min+a*(o.max-o.min)}}var u=t.propertyValue,l=t.zoomRange;return{uSizeT:s(ct(u,n.specification).interpolationFactor(e,l.min,l.max),0,1),uSize:0}},t.addDynamicAttributes=un,t.default$19=xa,t.WritingMode=Ga,t.multiPolygonIntersectsBufferedPoint=te,t.multiPolygonIntersectsMultiPolygon=ee,t.multiPolygonIntersectsBufferedMultiLine=ne,t.polygonIntersectsPolygon=function(t,e){for(var n=0;n<t.length;n++)if(le(e,t[n]))return!0;for(var r=0;r<e.length;r++)if(le(t,e[r]))return!0;return!!ie(t,e)},t.distToSegmentSquared=se,t.default$20=So,t.default$21=zi,t.default$22=function(t){return new Ca[t.type](t)},t.clone=h,t.filterObject=f,t.mapObject=p,t.registerForPluginAvailability=function(t){return di?t({pluginURL:di,completionCallback:pi}):yi.once("pluginAvailable",t),t},t.evented=yi,t.default$23=ci,t.default$24=vo,t.PosArray=Di,t.UnwrappedTileID=Ba,t.ease=Nn,t.bezier=a,t.setRTLTextPlugin=function(t,e){if(hi)throw new Error("setRTLTextPlugin cannot be called multiple times.");hi=!0,di=t,pi=function(t){t?(hi=!1,di=null,e&&e(t)):mi=!0},yi.fire(new Zn("pluginAvailable",{pluginURL:di,completionCallback:pi}))},t.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},t.default$25=da,t.register=Nt,t.GLYPH_PBF_BORDER=ja,t.shapeText=function(t,e,n,r,i,o,a,s,u,l){var c=t.trim();l===Ga.vertical&&(c=function(t){for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n+1)||null,i=t.charCodeAt(n-1)||null;r&&Zt(r)&&!ha[t[n+1]]||i&&Zt(i)&&!ha[t[n-1]]||!ha[t[n]]?e+=t[n]:e+=ha[t[n]]}return e}(c));var p=[],f={positionedGlyphs:p,text:c,top:s[1],bottom:s[1],left:s[0],right:s[0],writingMode:l},h=vi.processBidirectionalText;return function(t,e,n,r,i,o,a,s,u){for(var l=0,c=-17,p=0,f=t.positionedGlyphs,h="right"===o?1:"left"===o?0:.5,d=0,m=n;d<m.length;d+=1){var y=m[d];if((y=y.trim()).length){for(var v=f.length,g=0;g<y.length;g++){var _=y.charCodeAt(g),b=e[_];b&&($t(_)&&a!==Ga.horizontal?(f.push({glyph:_,x:l,y:0,vertical:!0}),l+=u+s):(f.push({glyph:_,x:l,y:c,vertical:!1}),l+=b.metrics.advance+s))}if(f.length!==v){var x=l-s;p=Math.max(x,p),jn(f,e,v,f.length-1,h)}l=0,c+=r}else c+=r}var w=Mn(i),E=w.horizontalAlign,S=w.verticalAlign;!function(t,e,n,r,i,o,a){for(var s=(e-n)*i,u=(-r*a+.5)*o,l=0;l<t.length;l++)t[l].x+=s,t[l].y+=u}(f,h,E,S,p,r,n.length);var T=n.length*r;t.top+=-S*T,t.bottom=t.top+T,t.left+=-E*p,t.right=t.left+p}(f,e,h?h(c,Rn(c,a,n,e)):function(t,e){for(var n=[],r=0,i=0,o=e;i<o.length;i+=1){var a=o[i];n.push(t.substring(r,a)),r=a}return r<t.length&&n.push(t.substring(r,t.length)),n}(c,Rn(c,a,n,e)),r,i,o,l,a,u),!!p.length&&f},t.shapeIcon=function(t,e,n){var r=Mn(n),i=r.horizontalAlign,o=r.verticalAlign,a=e[0],s=e[1],u=a-t.displaySize[0]*i,l=u+t.displaySize[0],c=s-t.displaySize[1]*o;return{image:t,top:c,bottom:c+t.displaySize[1],left:u,right:l}},t.allowsVerticalWritingMode=qt,t.allowsLetterSpacing=function(t){for(var e=0,n=t;e<n.length;e+=1)if(!Wt(n[e].charCodeAt(0)))return!1;return!0},t.default$26=We,t.default$27=qa,t.default$28=Ia,t.default$29=Yo,t.default$30=Ra,t.default$31=Ua,t.__moduleExports=Yo,t.default$32=Bn,t.__moduleExports$1=Ra,t.plugin=vi}),t(["./chunk1.js"],function(t){function e(t){var n=typeof t;if("number"===n||"boolean"===n||"string"===n||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var r="[",i=0,o=t;i<o.length;i+=1)r+=e(o[i])+",";return r+"]"}for(var a=Object.keys(t).sort(),s="{",u=0;u<a.length;u++)s+=JSON.stringify(a[u])+":"+e(t[a[u]])+",";return s+"}"}function n(n){for(var r="",i=0,o=t.default$18;i<o.length;i+=1)r+="/"+e(n[o[i]]);return r}function r(t,e,n,r,i){if(void 0===e.segment)return!0;for(var o=e,a=e.segment+1,s=0;s>-n/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;for(var u=[],l=0;s<n/2;){var c=t[a-1],p=t[a],f=t[a+1];if(!f)return!1;var h=c.angleTo(p)-p.angleTo(f);for(h=Math.abs((h+3*Math.PI)%(2*Math.PI)-Math.PI),u.push({distance:s,angleDelta:h}),l+=h;s-u[0].distance>r;)l-=u.shift().angleDelta;if(l>i)return!1;a++,s+=p.dist(f)}return!0}function i(e,n,i,o,a,s,u,l,c){var p=o?.6*s*u:0,f=Math.max(o?o.right-o.left:0,a?a.right-a.left:0),h=0===e[0].x||e[0].x===c||0===e[0].y||e[0].y===c;return n-f*u<n/4&&(n=f*u+n/4),function e(n,i,o,a,s,u,l,c,p){for(var f=u/2,h=0,d=0;d<n.length-1;d++)h+=n[d].dist(n[d+1]);for(var m=0,y=i-o,v=[],g=0;g<n.length-1;g++){for(var _=n[g],b=n[g+1],x=_.dist(b),w=b.angleTo(_);y+o<m+x;){var E=((y+=o)-m)/x,S=t.number(_.x,b.x,E),T=t.number(_.y,b.y,E);if(S>=0&&S<p&&T>=0&&T<p&&y-f>=0&&y+f<=h){var C=new t.default$25(S,T,w,g);C._round(),a&&!r(n,C,u,a,s)||v.push(C)}}m+=x}return c||v.length||l||(v=e(n,m/2,o,a,s,u,l,!0,p)),v}(e,h?n/2*l%n:(f/2+2*s)*u*l%n,n,p,i,f*u,h,!1,c)}function o(t,e){if(!(this instanceof o))return new o(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||a,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)}function a(t,e){return t<e?-1:t>e?1:0}function s(e,n,r){void 0===n&&(n=1),void 0===r&&(r=!1);for(var i=1/0,o=1/0,a=-1/0,s=-1/0,c=e[0],p=0;p<c.length;p++){var f=c[p];(!p||f.x<i)&&(i=f.x),(!p||f.y<o)&&(o=f.y),(!p||f.x>a)&&(a=f.x),(!p||f.y>s)&&(s=f.y)}var h=a-i,d=s-o,m=Math.min(h,d),y=m/2,v=new St(null,u);if(0===m)return new t.default$1(i,o);for(var g=i;g<a;g+=m)for(var _=o;_<s;_+=m)v.push(new l(g+y,_+y,y,e));for(var b=function(t){for(var e=0,n=0,r=0,i=t[0],o=0,a=i.length,s=a-1;o<a;s=o++){var u=i[o],c=i[s],p=u.x*c.y-c.x*u.y;n+=(u.x+c.x)*p,r+=(u.y+c.y)*p,e+=3*p}return new l(n/e,r/e,0,t)}(e),x=v.length;v.length;){var w=v.pop();(w.d>b.d||!b.d)&&(b=w,r&&console.log("found best %d after %d probes",Math.round(1e4*w.d)/1e4,x)),w.max-b.d<=n||(y=w.h/2,v.push(new l(w.p.x-y,w.p.y-y,y,e)),v.push(new l(w.p.x+y,w.p.y-y,y,e)),v.push(new l(w.p.x-y,w.p.y+y,y,e)),v.push(new l(w.p.x+y,w.p.y+y,y,e)),x+=4)}return r&&(console.log("num probes: "+x),console.log("best distance: "+b.d)),b.p}function u(t,e){return e.max-t.max}function l(e,n,r,i){this.p=new t.default$1(e,n),this.h=r,this.d=function(e,n){for(var r=!1,i=1/0,o=0;o<n.length;o++)for(var a=n[o],s=0,u=a.length,l=u-1;s<u;l=s++){var c=a[s],p=a[l];c.y>e.y!=p.y>e.y&&e.x<(p.x-c.x)*(e.y-c.y)/(p.y-c.y)+c.x&&(r=!r),i=Math.min(i,t.distToSegmentSquared(e,c,p))}return(r?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}function c(e,n,r,i,o,a){e.createArrays(),e.symbolInstances=[];var s=512*e.overscaling;e.tilePixelRatio=t.default$8/s,e.compareText={},e.iconsNeedLinear=!1;var u=e.layers[0].layout,l=e.layers[0]._unevaluatedLayout._values,c={};if("composite"===e.textSizeData.functionType){var f=e.textSizeData.zoomRange,h=f.min,d=f.max;c.compositeTextSizes=[l["text-size"].possiblyEvaluate(new t.default$16(h)),l["text-size"].possiblyEvaluate(new t.default$16(d))]}if("composite"===e.iconSizeData.functionType){var m=e.iconSizeData.zoomRange,y=m.min,v=m.max;c.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new t.default$16(y)),l["icon-size"].possiblyEvaluate(new t.default$16(v))]}c.layoutTextSize=l["text-size"].possiblyEvaluate(new t.default$16(e.zoom+1)),c.layoutIconSize=l["icon-size"].possiblyEvaluate(new t.default$16(e.zoom+1)),c.textMaxSize=l["text-size"].possiblyEvaluate(new t.default$16(18));for(var g=24*u.get("text-line-height"),_="map"===u.get("text-rotation-alignment")&&"line"===u.get("symbol-placement"),b=u.get("text-keep-upright"),x=0,w=e.features;x<w.length;x+=1){var E=w[x],S=u.get("text-font").evaluate(E).join(","),T=n[S]||{},C=r[S]||{},A={},O=E.text;if(O){var k=u.get("text-offset").evaluate(E).map(function(t){return 24*t}),I=24*u.get("text-letter-spacing").evaluate(E),P=t.allowsLetterSpacing(O)?I:0,z=u.get("text-anchor").evaluate(E),R=u.get("text-justify").evaluate(E),M="line"!==u.get("symbol-placement")?24*u.get("text-max-width").evaluate(E):0;A.horizontal=t.shapeText(O,T,M,g,z,R,P,k,24,t.WritingMode.horizontal),t.allowsVerticalWritingMode(O)&&_&&b&&(A.vertical=t.shapeText(O,T,M,g,z,R,P,k,24,t.WritingMode.vertical))}var j=void 0;if(E.icon){var D=i[E.icon];D&&(j=t.shapeIcon(o[E.icon],u.get("icon-offset").evaluate(E),u.get("icon-anchor").evaluate(E)),void 0===e.sdfIcons?e.sdfIcons=D.sdf:e.sdfIcons!==D.sdf&&t.warnOnce("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),D.pixelRatio!==e.pixelRatio?e.iconsNeedLinear=!0:0!==u.get("icon-rotate").constantOr(1)&&(e.iconsNeedLinear=!0))}(A.horizontal||j)&&p(e,E,A,j,C,c)}a&&e.generateCollisionDebugBuffers()}function p(e,n,r,o,a,u){var l=u.layoutTextSize.evaluate(n),c=u.layoutIconSize.evaluate(n),p=u.textMaxSize.evaluate(n);void 0===p&&(p=l);var d=e.layers[0].layout,m=d.get("text-offset").evaluate(n),y=d.get("icon-offset").evaluate(n),v=l/24,g=e.tilePixelRatio*v,_=e.tilePixelRatio*p/24,b=e.tilePixelRatio*c,x=e.tilePixelRatio*d.get("symbol-spacing"),w=d.get("text-padding")*e.tilePixelRatio,E=d.get("icon-padding")*e.tilePixelRatio,S=d.get("text-max-angle")/180*Math.PI,T="map"===d.get("text-rotation-alignment")&&"line"===d.get("symbol-placement"),C="map"===d.get("icon-rotation-alignment")&&"line"===d.get("symbol-placement"),A=x/2,O=function(i,s){s.x<0||s.x>=t.default$8||s.y<0||s.y>=t.default$8||e.symbolInstances.push(function(e,n,r,i,o,a,s,u,l,c,p,h,d,m,y,v,g,_,b,x,w){var E,S,T=e.addToLineVertexArray(n,r),C=0,A=0,O=0,k=i.horizontal?i.horizontal.text:"",I=[];i.horizontal&&(E=new Et(s,r,n,u,l,c,i.horizontal,p,h,d,e.overscaling),A+=f(e,n,i.horizontal,a,d,b,m,T,i.vertical?t.WritingMode.horizontal:t.WritingMode.horizontalOnly,I,x,w),i.vertical&&(O+=f(e,n,i.vertical,a,d,b,m,T,t.WritingMode.vertical,I,x,w)));var P=E?E.boxStartIndex:e.collisionBoxArray.length,z=E?E.boxEndIndex:e.collisionBoxArray.length;if(o){var R=function(e,n,r,i,o,a){var s,u,l,c,p=n.image,f=r.layout,h=n.top-1/p.pixelRatio,d=n.left-1/p.pixelRatio,m=n.bottom+1/p.pixelRatio,y=n.right+1/p.pixelRatio;if("none"!==f.get("icon-text-fit")&&o){var v=y-d,g=m-h,_=f.get("text-size").evaluate(a)/24,b=o.left*_,x=o.right*_,w=o.top*_,E=x-b,S=o.bottom*_-w,T=f.get("icon-text-fit-padding")[0],C=f.get("icon-text-fit-padding")[1],A=f.get("icon-text-fit-padding")[2],O=f.get("icon-text-fit-padding")[3],k="width"===f.get("icon-text-fit")?.5*(S-g):0,I="height"===f.get("icon-text-fit")?.5*(E-v):0,P="width"===f.get("icon-text-fit")||"both"===f.get("icon-text-fit")?E:v,z="height"===f.get("icon-text-fit")||"both"===f.get("icon-text-fit")?S:g;s=new t.default$1(b+I-O,w+k-T),u=new t.default$1(b+I+C+P,w+k-T),l=new t.default$1(b+I+C+P,w+k+A+z),c=new t.default$1(b+I-O,w+k+A+z)}else s=new t.default$1(d,h),u=new t.default$1(y,h),l=new t.default$1(y,m),c=new t.default$1(d,m);var R=r.layout.get("icon-rotate").evaluate(a)*Math.PI/180;if(R){var M=Math.sin(R),j=Math.cos(R),D=[j,-M,M,j];s._matMult(D),u._matMult(D),c._matMult(D),l._matMult(D)}return[{tl:s,tr:u,bl:c,br:l,tex:p.paddedRect,writingMode:void 0,glyphOffset:[0,0]}]}(0,o,a,0,i.horizontal,b);S=new Et(s,r,n,u,l,c,o,y,v,!1,e.overscaling),C=4*R.length;var M=e.iconSizeData,j=null;"source"===M.functionType?j=[10*a.layout.get("icon-size").evaluate(b)]:"composite"===M.functionType&&(j=[10*w.compositeIconSizes[0].evaluate(b),10*w.compositeIconSizes[1].evaluate(b)]),e.addSymbols(e.icon,R,j,_,g,b,!1,n,T.lineStartIndex,T.lineLength)}var D=S?S.boxStartIndex:e.collisionBoxArray.length,L=S?S.boxEndIndex:e.collisionBoxArray.length;return e.glyphOffsetArray.length>=t.default$14.MAX_GLYPHS&&t.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),{key:k,textBoxStartIndex:P,textBoxEndIndex:z,iconBoxStartIndex:D,iconBoxEndIndex:L,textOffset:m,iconOffset:_,anchor:n,line:r,featureIndex:u,feature:b,numGlyphVertices:A,numVerticalGlyphVertices:O,numIconVertices:C,textOpacityState:new wt,iconOpacityState:new wt,isDuplicate:!1,placedTextSymbolIndices:I,crossTileID:0}}(e,s,i,r,o,e.layers[0],e.collisionBoxArray,n.index,n.sourceLayerIndex,e.index,g,w,T,m,b,E,C,y,n,a,u))};if("line"===d.get("symbol-placement"))for(var k=0,I=function(e,n,r,i,o){for(var a=[],s=0;s<e.length;s++)for(var u=e[s],l=void 0,c=0;c<u.length-1;c++){var p=u[c],f=u[c+1];p.x<0&&f.x<0||(p.x<0?p=new t.default$1(0,p.y+(f.y-p.y)*((0-p.x)/(f.x-p.x)))._round():f.x<0&&(f=new t.default$1(0,p.y+(f.y-p.y)*((0-p.x)/(f.x-p.x)))._round()),p.y<0&&f.y<0||(p.y<0?p=new t.default$1(p.x+(f.x-p.x)*((0-p.y)/(f.y-p.y)),0)._round():f.y<0&&(f=new t.default$1(p.x+(f.x-p.x)*((0-p.y)/(f.y-p.y)),0)._round()),p.x>=i&&f.x>=i||(p.x>=i?p=new t.default$1(i,p.y+(f.y-p.y)*((i-p.x)/(f.x-p.x)))._round():f.x>=i&&(f=new t.default$1(i,p.y+(f.y-p.y)*((i-p.x)/(f.x-p.x)))._round()),p.y>=o&&f.y>=o||(p.y>=o?p=new t.default$1(p.x+(f.x-p.x)*((o-p.y)/(f.y-p.y)),o)._round():f.y>=o&&(f=new t.default$1(p.x+(f.x-p.x)*((o-p.y)/(f.y-p.y)),o)._round()),l&&p.equals(l[l.length-1])||(l=[p],a.push(l)),l.push(f)))))}return a}(n.geometry,0,0,t.default$8,t.default$8);k<I.length;k+=1)for(var P=I[k],z=0,R=i(P,x,S,r.vertical||r.horizontal,o,24,_,e.overscaling,t.default$8);z<R.length;z+=1){var M=R[z],j=r.horizontal;j&&h(e,j.text,A,M)||O(P,M)}else if("Polygon"===n.type)for(var D=0,L=t.default$26(n.geometry,0);D<L.length;D+=1){var F=L[D],B=s(F,16);O(F[0],new t.default$25(B.x,B.y,0))}else if("LineString"===n.type)for(var N=0,V=n.geometry;N<V.length;N+=1){var U=V[N];O(U,new t.default$25(U[0].x,U[0].y,0))}else if("Point"===n.type)for(var q=0,W=n.geometry;q<W.length;q+=1)for(var $=0,Z=W[q];$<Z.length;$+=1){var G=Z[$];O([G],new t.default$25(G.x,G.y,0))}}function f(e,n,r,i,o,a,s,u,l,c,p,f){var h=function(e,n,r,i,o,a){for(var s=r.layout.get("text-rotate").evaluate(o)*Math.PI/180,u=r.layout.get("text-offset").evaluate(o).map(function(t){return 24*t}),l=n.positionedGlyphs,c=[],p=0;p<l.length;p++){var f=l[p],h=a[f.glyph];if(h){var d=h.rect;if(d){var m=t.GLYPH_PBF_BORDER+1,y=h.metrics.advance/2,v=i?[f.x+y,f.y]:[0,0],g=i?[0,0]:[f.x+y+u[0],f.y+u[1]],_=h.metrics.left-m-y+g[0],b=-h.metrics.top-m+g[1],x=_+d.w,w=b+d.h,E=new t.default$1(_,b),S=new t.default$1(x,b),T=new t.default$1(_,w),C=new t.default$1(x,w);if(i&&f.vertical){var A=new t.default$1(-y,y),O=-Math.PI/2,k=new t.default$1(5,0);E._rotateAround(O,A)._add(k),S._rotateAround(O,A)._add(k),T._rotateAround(O,A)._add(k),C._rotateAround(O,A)._add(k)}if(s){var I=Math.sin(s),P=Math.cos(s),z=[P,-I,I,P];E._matMult(z),S._matMult(z),T._matMult(z),C._matMult(z)}c.push({tl:E,tr:S,bl:T,br:C,tex:d,writingMode:n.writingMode,glyphOffset:v})}}}return c}(0,r,i,o,a,p),d=e.textSizeData,m=null;return"source"===d.functionType?m=[10*i.layout.get("text-size").evaluate(a)]:"composite"===d.functionType&&(m=[10*f.compositeTextSizes[0].evaluate(a),10*f.compositeTextSizes[1].evaluate(a)]),e.addSymbols(e.text,h,m,s,o,a,l,n,u.lineStartIndex,u.lineLength),c.push(e.text.placedSymbolArray.length-1),4*h.length}function h(t,e,n,r){var i=t.compareText;if(e in i){for(var o=i[e],a=o.length-1;a>=0;a--)if(r.dist(o[a])<n)return!0}else i[e]=[];return i[e].push(r),!1}function d(e,n){for(var r=new t.default$16(n),i=0,o=e;i<o.length;i+=1)o[i].recalculate(r)}function m(e,n){var r=t.getArrayBuffer(e.request,function(e,r){e?n(e):r&&n(null,{vectorTile:new t.default$29.VectorTile(new t.default$30(r.data)),rawData:r.data,cacheControl:r.cacheControl,expires:r.expires})});return function(){r.abort(),n()}}function y(t){var e=0;if(t&&t.length>0){e+=Math.abs(v(t[0]));for(var n=1;n<t.length;n++)e-=Math.abs(v(t[n]))}return e}function v(t){var e,n,r,i,o,a,s=0,u=t.length;if(u>2){for(a=0;a<u;a++)a===u-2?(r=u-2,i=u-1,o=0):a===u-1?(r=u-1,i=0,o=1):(r=a,i=a+1,o=a+2),e=t[r],n=t[i],s+=(g(t[o][0])-g(e[0]))*Math.sin(g(n[1]));s=s*Pt.RADIUS*Pt.RADIUS/2}return s}function g(t){return t*Math.PI/180}function _(t,e){return function(n){return t(n,e)}}function b(t,e){e=!!e,t[0]=x(t[0],e);for(var n=1;n<t.length;n++)t[n]=x(t[n],!e);return t}function x(t,e){return function(t){return zt.ring(t)>=0}(t)===e?t:t.reverse()}function w(t,e){this.options=e||{},this.features=t,this.length=t.length}function E(t,e){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}function S(e){var n=new t.__moduleExports$1;return function(t,e){for(var n in t.layers)e.writeMessage(3,T,t.layers[n])}(e,n),n.finish()}function T(t,e){var n;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var r={keys:[],values:[],keycache:{},valuecache:{}};for(n=0;n<t.length;n++)r.feature=t.feature(n),e.writeMessage(2,C,r);var i=r.keys;for(n=0;n<i.length;n++)e.writeStringField(3,i[n]);var o=r.values;for(n=0;n<o.length;n++)e.writeMessage(4,P,o[n])}function C(t,e){var n=t.feature;void 0!==n.id&&e.writeVarintField(1,n.id),e.writeMessage(2,A,t),e.writeVarintField(3,n.type),e.writeMessage(4,I,n)}function A(t,e){var n=t.feature,r=t.keys,i=t.values,o=t.keycache,a=t.valuecache;for(var s in n.properties){var u=o[s];void 0===u&&(r.push(s),u=r.length-1,o[s]=u),e.writeVarint(u);var l=n.properties[s],c=typeof l;"string"!==c&&"boolean"!==c&&"number"!==c&&(l=JSON.stringify(l));var p=c+":"+l,f=a[p];void 0===f&&(i.push(l),f=i.length-1,a[p]=f),e.writeVarint(f)}}function O(t,e){return(e<<3)+(7&t)}function k(t){return t<<1^t>>31}function I(t,e){for(var n=t.loadGeometry(),r=t.type,i=0,o=0,a=n.length,s=0;s<a;s++){var u=n[s],l=1;1===r&&(l=u.length),e.writeVarint(O(1,l));for(var c=3===r?u.length-1:u.length,p=0;p<c;p++){1===p&&1!==r&&e.writeVarint(O(2,c-1));var f=u[p].x-i,h=u[p].y-o;e.writeVarint(k(f)),e.writeVarint(k(h)),i+=f,o+=h}3===r&&e.writeVarint(O(7,0))}}function P(t,e){var n=typeof t;"string"===n?e.writeStringField(1,t):"boolean"===n?e.writeBooleanField(7,t):"number"===n&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}function z(t,e,n,r){R(t,n,r),R(e,2*n,2*r),R(e,2*n+1,2*r+1)}function R(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function M(t,e,n,r){var i=t-n,o=e-r;return i*i+o*o}function j(t,e,n,r,i){e=e||D,n=n||L,i=i||Array,this.nodeSize=r||64,this.points=t,this.ids=new i(t.length),this.coords=new i(2*t.length);for(var o=0;o<t.length;o++)this.ids[o]=o,this.coords[2*o]=e(t[o]),this.coords[2*o+1]=n(t[o]);qt(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function D(t){return t[0]}function L(t){return t[1]}function F(t){this.options=$(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function B(t,e,n,r,i){return{x:t,y:e,zoom:1/0,id:r,properties:i,parentId:-1,numPoints:n}}function N(t,e){var n=t.geometry.coordinates;return{x:q(n[0]),y:W(n[1]),zoom:1/0,id:e,parentId:-1}}function V(t){return{type:"Feature",properties:U(t),geometry:{type:"Point",coordinates:[360*(t.x-.5),(e=t.y,n=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(n))/Math.PI-90)]}};var e,n}function U(t){var e=t.numPoints,n=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return $($({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function q(t){return t/360+.5}function W(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function $(t,e){for(var n in e)t[n]=e[n];return t}function Z(t){return t.x}function G(t){return t.y}function H(t,e,n,r,i,o){var a=i-n,s=o-r;if(0!==a||0!==s){var u=((t-n)*a+(e-r)*s)/(a*a+s*s);u>1?(n=i,r=o):u>0&&(n+=a*u,r+=s*u)}return(a=t-n)*a+(s=e-r)*s}function K(t,e,n,r){var i={id:t||null,type:e,geometry:n,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,n=t.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)X(t,e);else if("Polygon"===n||"MultiLineString"===n)for(var r=0;r<e.length;r++)X(t,e[r]);else if("MultiPolygon"===n)for(r=0;r<e.length;r++)for(var i=0;i<e[r].length;i++)X(t,e[r][i])}(i),i}function X(t,e){for(var n=0;n<e.length;n+=3)t.minX=Math.min(t.minX,e[n]),t.minY=Math.min(t.minY,e[n+1]),t.maxX=Math.max(t.maxX,e[n]),t.maxY=Math.max(t.maxY,e[n+1])}function Y(t,e,n){if(e.geometry){var r=e.geometry.coordinates,i=e.geometry.type,o=Math.pow(n.tolerance/((1<<n.maxZoom)*n.extent),2),a=[];if("Point"===i)J(r,a);else if("MultiPoint"===i)for(var s=0;s<r.length;s++)J(r[s],a);else if("LineString"===i)Q(r,a,o,!1);else if("MultiLineString"===i)if(n.lineMetrics)for(s=0;s<r.length;s++)return a=[],Q(r[s],a,o,!1),void t.push(K(e.id,"LineString",a,e.properties));else tt(r,a,o,!1);else if("Polygon"===i)tt(r,a,o,!0);else{if("MultiPolygon"!==i){if("GeometryCollection"===i){for(s=0;s<e.geometry.geometries.length;s++)Y(t,{id:e.id,geometry:e.geometry.geometries[s],properties:e.properties},n);return}throw new Error("Input data is not a valid GeoJSON object.")}for(s=0;s<r.length;s++){var u=[];tt(r[s],u,o,!0),a.push(u)}}t.push(K(e.id,i,a,e.properties))}}function J(t,e){e.push(et(t[0])),e.push(nt(t[1])),e.push(0)}function Q(t,e,n,r){for(var i,o,a=0,s=0;s<t.length;s++){var u=et(t[s][0]),l=nt(t[s][1]);e.push(u),e.push(l),e.push(0),s>0&&(a+=r?(i*l-u*o)/2:Math.sqrt(Math.pow(u-i,2)+Math.pow(l-o,2))),i=u,o=l}var c=e.length-3;e[2]=1,function t(e,n,r,i){for(var o,a=i,s=e[n],u=e[n+1],l=e[r],c=e[r+1],p=n+3;p<r;p+=3){var f=H(e[p],e[p+1],s,u,l,c);f>a&&(o=p,a=f)}a>i&&(o-n>3&&t(e,n,o,i),e[o+2]=a,r-o>3&&t(e,o,r,i))}(e,0,c,n),e[c+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function tt(t,e,n,r){for(var i=0;i<t.length;i++){var o=[];Q(t[i],o,n,r),e.push(o)}}function et(t){return t/360+.5}function nt(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function rt(t,e,n,r,i,o,a,s){if(r/=e,o>=(n/=e)&&a<=r)return t;if(o>r||a<n)return null;for(var u=[],l=0;l<t.length;l++){var c=t[l],p=c.geometry,f=c.type,h=0===i?c.minX:c.minY,d=0===i?c.maxX:c.maxY;if(h>=n&&d<=r)u.push(c);else if(!(h>r||d<n)){var m=[];if("Point"===f||"MultiPoint"===f)it(p,m,n,r,i);else if("LineString"===f)ot(p,m,n,r,i,!1,s.lineMetrics);else if("MultiLineString"===f)st(p,m,n,r,i,!1);else if("Polygon"===f)st(p,m,n,r,i,!0);else if("MultiPolygon"===f)for(var y=0;y<p.length;y++){var v=[];st(p[y],v,n,r,i,!0),v.length&&m.push(v)}if(m.length){if(s.lineMetrics&&"LineString"===f){for(y=0;y<m.length;y++)u.push(K(c.id,f,m[y],c.tags));continue}"LineString"!==f&&"MultiLineString"!==f||(1===m.length?(f="LineString",m=m[0]):f="MultiLineString"),"Point"!==f&&"MultiPoint"!==f||(f=3===m.length?"Point":"MultiPoint"),u.push(K(c.id,f,m,c.tags))}}}return u.length?u:null}function it(t,e,n,r,i){for(var o=0;o<t.length;o+=3){var a=t[o+i];a>=n&&a<=r&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function ot(t,e,n,r,i,o,a){for(var s,u,l=at(t),c=0===i?lt:ct,p=t.start,f=0;f<t.length-3;f+=3){var h=t[f],d=t[f+1],m=t[f+2],y=t[f+3],v=t[f+4],g=0===i?h:d,_=0===i?y:v,b=!1;a&&(s=Math.sqrt(Math.pow(h-y,2)+Math.pow(d-v,2))),g<n?_>=n&&(u=c(l,h,d,y,v,n),a&&(l.start=p+s*u)):g>r?_<=r&&(u=c(l,h,d,y,v,r),a&&(l.start=p+s*u)):ut(l,h,d,m),_<n&&g>=n&&(u=c(l,h,d,y,v,n),b=!0),_>r&&g<=r&&(u=c(l,h,d,y,v,r),b=!0),!o&&b&&(a&&(l.end=p+s*u),e.push(l),l=at(t)),a&&(p+=s)}var x=t.length-3;h=t[x],d=t[x+1],m=t[x+2],(g=0===i?h:d)>=n&&g<=r&&ut(l,h,d,m),x=l.length-3,o&&x>=3&&(l[x]!==l[0]||l[x+1]!==l[1])&&ut(l,l[0],l[1],l[2]),l.length&&e.push(l)}function at(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function st(t,e,n,r,i,o){for(var a=0;a<t.length;a++)ot(t[a],e,n,r,i,o,!1)}function ut(t,e,n,r){t.push(e),t.push(n),t.push(r)}function lt(t,e,n,r,i,o){var a=(o-e)/(r-e);return t.push(o),t.push(n+(i-n)*a),t.push(1),a}function ct(t,e,n,r,i,o){var a=(o-n)/(i-n);return t.push(e+(r-e)*a),t.push(o),t.push(1),a}function pt(t,e){for(var n=[],r=0;r<t.length;r++){var i,o=t[r],a=o.type;if("Point"===a||"MultiPoint"===a||"LineString"===a)i=ft(o.geometry,e);else if("MultiLineString"===a||"Polygon"===a){i=[];for(var s=0;s<o.geometry.length;s++)i.push(ft(o.geometry[s],e))}else if("MultiPolygon"===a)for(i=[],s=0;s<o.geometry.length;s++){for(var u=[],l=0;l<o.geometry[s].length;l++)u.push(ft(o.geometry[s][l],e));i.push(u)}n.push(K(o.id,a,i,o.tags))}return n}function ft(t,e){var n=[];n.size=t.size,void 0!==t.start&&(n.start=t.start,n.end=t.end);for(var r=0;r<t.length;r+=3)n.push(t[r]+e,t[r+1],t[r+2]);return n}function ht(t,e){if(t.transformed)return t;var n,r,i,o=1<<t.z,a=t.x,s=t.y;for(n=0;n<t.features.length;n++){var u=t.features[n],l=u.geometry,c=u.type;if(u.geometry=[],1===c)for(r=0;r<l.length;r+=2)u.geometry.push(dt(l[r],l[r+1],e,o,a,s));else for(r=0;r<l.length;r++){var p=[];for(i=0;i<l[r].length;i+=2)p.push(dt(l[r][i],l[r][i+1],e,o,a,s));u.geometry.push(p)}}return t.transformed=!0,t}function dt(t,e,n,r,i,o){return[Math.round(n*(t*r-i)),Math.round(n*(e*r-o))]}function mt(t,e,n,r,i){for(var o=e===i.maxZoom?0:i.tolerance/((1<<e)*i.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:n,y:r,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){a.numFeatures++,yt(a,t[s],o,i);var u=t[s].minX,l=t[s].minY,c=t[s].maxX,p=t[s].maxY;u<a.minX&&(a.minX=u),l<a.minY&&(a.minY=l),c>a.maxX&&(a.maxX=c),p>a.maxY&&(a.maxY=p)}return a}function yt(t,e,n,r){var i=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s<i.length;s+=3)a.push(i[s]),a.push(i[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)vt(a,i,t,n,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<i.length;s++)vt(a,i[s],t,n,"Polygon"===o,0===s);else if("MultiPolygon"===o)for(var u=0;u<i.length;u++){var l=i[u];for(s=0;s<l.length;s++)vt(a,l[s],t,n,!0,0===s)}if(a.length){var c=e.tags||null;if("LineString"===o&&r.lineMetrics){for(var p in c={},e.tags)c[p]=e.tags[p];c.mapbox_clip_start=i.start/i.size,c.mapbox_clip_end=i.end/i.size}var f={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:c};null!==e.id&&(f.id=e.id),t.features.push(f)}}function vt(t,e,n,r,i,o){var a=r*r;if(r>0&&e.size<(i?a:r))n.numPoints+=e.length/3;else{for(var s=[],u=0;u<e.length;u+=3)(0===r||e[u+2]>a)&&(n.numSimplified++,s.push(e[u]),s.push(e[u+1])),n.numPoints++;i&&function(t,e){for(var n=0,r=0,i=t.length,o=i-2;r<i;o=r,r+=2)n+=(t[r]-t[o])*(t[r+1]+t[o+1]);if(n>0===e)for(r=0,i=t.length;r<i/2;r+=2){var a=t[r],s=t[r+1];t[r]=t[i-2-r],t[r+1]=t[i-1-r],t[i-2-r]=a,t[i-1-r]=s}}(s,o),t.push(s)}}function gt(t,e){var n=(e=this.options=function(t,e){for(var n in e)t[n]=e[n];return t}(Object.create(this.options),e)).debug;if(n&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");var r=function(t,e){var n=[];if("FeatureCollection"===t.type)for(var r=0;r<t.features.length;r++)Y(n,t.features[r],e);else"Feature"===t.type?Y(n,t,e):Y(n,{geometry:t},e);return n}(t,e);this.tiles={},this.tileCoords=[],n&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(r=function(t,e){var n=e.buffer/e.extent,r=t,i=rt(t,1,-1-n,n,0,-1,2,e),o=rt(t,1,1-n,2+n,0,-1,2,e);return(i||o)&&(r=rt(t,1,-n,1+n,0,-1,2,e)||[],i&&(r=pt(i,1).concat(r)),o&&(r=r.concat(pt(o,-1)))),r}(r,e)).length&&this.splitTile(r,0,0,0),n&&(r.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function _t(t,e,n){return 32*((1<<t)*n+e)+t}function bt(t,e){var n=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var r=this._geoJSONIndex.getTile(n.z,n.x,n.y);if(!r)return e(null,null);var i=new Dt(r.features),o=Bt(i);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{vectorTile:i,rawData:o.buffer})}var xt=function(t){t&&this.replace(t)};xt.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},xt.prototype.update=function(e,r){for(var i=this,o=0,a=e;o<a.length;o+=1){var s=a[o];i._layerConfigs[s.id]=s;var u=i._layers[s.id]=t.default$22(s);u._featureFilter=t.default$13(u.filter)}for(var l=0,c=r;l<c.length;l+=1){var p=c[l];delete i._layerConfigs[p],delete i._layers[p]}this.familiesBySource={};for(var f=0,h=function(t){for(var e={},r=0;r<t.length;r++){var i=n(t[r]),o=e[i];o||(o=e[i]=[]),o.push(t[r])}var a=[];for(var s in e)a.push(e[s]);return a}(t.values(this._layerConfigs));f<h.length;f+=1){var d=h[f].map(function(t){return i._layers[t.id]}),m=d[0];if("none"!==m.visibility){var y=m.source||"",v=i.familiesBySource[y];v||(v=i.familiesBySource[y]={});var g=m.sourceLayer||"_geojsonTileLayer",_=v[g];_||(_=v[g]=[]),_.push(d)}}};var wt=function(){this.opacity=0,this.targetOpacity=0,this.time=0};wt.prototype.clone=function(){var t=new wt;return t.opacity=this.opacity,t.targetOpacity=this.targetOpacity,t.time=this.time,t},t.register("OpacityState",wt);var Et=function(t,e,n,r,i,o,a,s,u,l,c){var p=a.top*s-u,f=a.bottom*s+u,h=a.left*s-u,d=a.right*s+u;if(this.boxStartIndex=t.length,l){var m=f-p,y=d-h;m>0&&(m=Math.max(10*s,m),this._addLineCollisionCircles(t,e,n,n.segment,y,m,r,i,o,c))}else t.emplaceBack(n.x,n.y,h,p,d,f,r,i,o,0,0);this.boxEndIndex=t.length};Et.prototype._addLineCollisionCircles=function(t,e,n,r,i,o,a,s,u,l){var c=o/2,p=Math.floor(i/c),f=1+.4*Math.log(l)/Math.LN2,h=Math.floor(p*f/2),d=-o/2,m=n,y=r+1,v=d,g=-i/2,_=g-i/4;do{if(--y<0){if(v>g)return;y=0;break}v-=e[y].dist(m),m=e[y]}while(v>_);for(var b=e[y].dist(e[y+1]),x=-h;x<p+h;x++){var w=x*c,E=g+w;if(w<0&&(E+=w),w>i&&(E+=w-i),!(E<v)){for(;v+b<E;){if(v+=b,++y+1>=e.length)return;b=e[y].dist(e[y+1])}var S=E-v,T=e[y],C=e[y+1].sub(T)._unit()._mult(S)._add(T)._round(),A=Math.abs(E-d)<c?0:.8*(E-d);t.emplaceBack(C.x,C.y,-o/2,-o/2,o/2,o/2,a,s,u,o/2,A)}}};var St=o,Tt=o;o.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,n=this.compare,r=e[t];t>0;){var i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r},_down:function(t){for(var e=this.data,n=this.compare,r=this.length>>1,i=e[t];t<r;){var o=1+(t<<1),a=o+1,s=e[o];if(a<this.length&&n(e[a],s)<0&&(o=a,s=e[a]),n(s,i)>=0)break;e[t]=s,t=o}e[t]=i}},St.default=Tt;var Ct=function(e){var n=new t.AlphaImage({width:0,height:0}),r={},i=new t.default$2(0,0,{autoResize:!0});for(var o in e){var a=e[o],s=r[o]={};for(var u in a){var l=a[+u];if(l&&0!==l.bitmap.width&&0!==l.bitmap.height){var c=i.packOne(l.bitmap.width+2,l.bitmap.height+2);n.resize({width:i.w,height:i.h}),t.AlphaImage.copy(l.bitmap,n,{x:0,y:0},{x:c.x+1,y:c.y+1},l.bitmap),s[u]={rect:c,metrics:l.metrics}}}}i.shrink(),n.resize({width:i.w,height:i.h}),this.image=n,this.positions=r};t.register("GlyphAtlas",Ct);var At=function(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming};At.prototype.parse=function(e,n,r,i){function o(){if(l)return i(l);if(p&&f){var e=new Ct(p),n=new t.default$28(f);for(var r in h){var o=h[r];o instanceof t.default$14&&(d(o.layers,this.zoom),c(o,p,e.positions,f,n.positions,this.showCollisionBoxes))}this.status="done",i(null,{buckets:t.values(h).filter(function(t){return!t.isEmpty()}),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,iconAtlasImage:n.image})}}var a=this;this.status="parsing",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var s=new t.default$27(Object.keys(e.layers).sort()),u=new t.default$11(this.tileID);u.bucketLayerIDs=[];var l,p,f,h={},m={featureIndex:u,iconDependencies:{},glyphDependencies:{}},y=n.familiesBySource[this.source];for(var v in y){var g=e.layers[v];if(g){1===g.version&&t.warnOnce('Vector tile source "'+a.source+'" layer "'+v+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var _=s.encode(v),b=[],x=0;x<g.length;x++){var w=g.feature(x);b.push({feature:w,index:x,sourceLayerIndex:_})}for(var E=0,S=y[v];E<S.length;E+=1){var T=S[E],C=T[0];C.minzoom&&a.zoom<Math.floor(C.minzoom)||C.maxzoom&&a.zoom>=C.maxzoom||"none"!==C.visibility&&(d(T,a.zoom),(h[C.id]=C.createBucket({index:u.bucketLayerIDs.length,layers:T,zoom:a.zoom,pixelRatio:a.pixelRatio,overscaling:a.overscaling,collisionBoxArray:a.collisionBoxArray,sourceLayerIndex:_})).populate(b,m),u.bucketLayerIDs.push(T.map(function(t){return t.id})))}}}var A=t.mapObject(m.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(A).length?r.send("getGlyphs",{uid:this.uid,stacks:A},function(t,e){l||(l=t,p=e,o.call(a))}):p={};var O=Object.keys(m.iconDependencies);O.length?r.send("getImages",{icons:O},function(t,e){l||(l=t,f=e,o.call(a))}):f={},o.call(this)};var Ot=function(t){return!(!performance||!performance.getEntriesByName)&&performance.getEntriesByName(t)},kt=function(t,e,n){this.actor=t,this.layerIndex=e,this.loadVectorData=n||m,this.loading={},this.loaded={}};kt.prototype.loadTile=function(e,n){var r=this,i=e.uid;this.loading||(this.loading={});var o=this.loading[i]=new At(e);o.abort=this.loadVectorData(e,function(a,s){if(delete r.loading[i],a||!s)return n(a);var u=s.rawData,l={};s.expires&&(l.expires=s.expires),s.cacheControl&&(l.cacheControl=s.cacheControl);var c={};if(e.request&&e.request.collectResourceTiming){var p=Ot(e.request.url);p&&(c.resourceTiming=JSON.parse(JSON.stringify(p)))}o.vectorTile=s.vectorTile,o.parse(s.vectorTile,r.layerIndex,r.actor,function(e,r){if(e||!r)return n(e);n(null,t.extend({rawTileData:u.slice(0)},r,l,c))}),r.loaded=r.loaded||{},r.loaded[i]=o})},kt.prototype.reloadTile=function(t,e){var n=this.loaded,r=t.uid,i=this;if(n&&n[r]){var o=n[r];o.showCollisionBoxes=t.showCollisionBoxes;var a=function(t,n){var r=o.reloadCallback;r&&(delete o.reloadCallback,o.parse(o.vectorTile,i.layerIndex,i.actor,r)),e(t,n)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&o.parse(o.vectorTile,this.layerIndex,this.actor,a)}},kt.prototype.abortTile=function(t,e){var n=this.loading,r=t.uid;n&&n[r]&&n[r].abort&&(n[r].abort(),delete n[r]),e()},kt.prototype.removeTile=function(t,e){var n=this.loaded,r=t.uid;n&&n[r]&&delete n[r],e()};var It=function(){this.loading={},this.loaded={}};It.prototype.loadTile=function(e,n){var r=e.uid,i=e.encoding,o=new t.default$31(r);this.loading[r]=o,o.loadFromImage(e.rawImageData,i),delete this.loading[r],this.loaded=this.loaded||{},this.loaded[r]=o,n(null,o)},It.prototype.removeTile=function(t){var e=this.loaded,n=t.uid;e&&e[n]&&delete e[n]};var Pt={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142},zt={geometry:function t(e){var n,r=0;switch(e.type){case"Polygon":return y(e.coordinates);case"MultiPolygon":for(n=0;n<e.coordinates.length;n++)r+=y(e.coordinates[n]);return r;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(n=0;n<e.geometries.length;n++)r+=t(e.geometries[n]);return r}},ring:v},Rt=function t(e,n){switch(e&&e.type||null){case"FeatureCollection":return e.features=e.features.map(_(t,n)),e;case"Feature":return e.geometry=t(e.geometry,n),e;case"Polygon":case"MultiPolygon":return function(t,e){return"Polygon"===t.type?t.coordinates=b(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(_(b,e))),t}(e,n);default:return e}},Mt=t.default$29.VectorTileFeature.prototype.toGeoJSON,jt=function(e){this._feature=e,this.extent=t.default$8,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};jt.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],n=0,r=this._feature.geometry;n<r.length;n+=1){var i=r[n];e.push([new t.default$1(i[0],i[1])])}return e}for(var o=[],a=0,s=this._feature.geometry;a<s.length;a+=1){for(var u=[],l=0,c=s[a];l<c.length;l+=1){var p=c[l];u.push(new t.default$1(p[0],p[1]))}o.push(u)}return o},jt.prototype.toGeoJSON=function(t,e,n){return Mt.call(this,t,e,n)};var Dt=function(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.default$8,this.length=e.length,this._features=e};Dt.prototype.feature=function(t){return new jt(this._features[t])};var Lt=t.__moduleExports.VectorTileFeature,Ft=w;w.prototype.feature=function(t){return new E(this.features[t],this.options.extent)},E.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var n=0;n<e.length;n++){for(var r=e[n],i=[],o=0;o<r.length;o++)i.push(new t.default$32(r[o][0],r[o][1]));this.geometry.push(i)}return this.geometry},E.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,n=-1/0,r=1/0,i=-1/0,o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.length;s++){var u=a[s];e=Math.min(e,u.x),n=Math.max(n,u.x),r=Math.min(r,u.y),i=Math.max(i,u.y)}return[e,r,n,i]},E.prototype.toGeoJSON=Lt.prototype.toGeoJSON;var Bt=S,Nt=S,Vt=function(t,e){e=e||{};var n={};for(var r in t)n[r]=new Ft(t[r].features,e),n[r].name=r,n[r].version=e.version,n[r].extent=e.extent;return S({layers:n})},Ut=Ft;Bt.fromVectorTileJs=Nt,Bt.fromGeojsonVt=Vt,Bt.GeoJSONWrapper=Ut;var qt=function t(e,n,r,i,o,a){if(!(o-i<=r)){var s=Math.floor((i+o)/2);!function t(e,n,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=r-i+1,l=Math.log(s),c=.5*Math.exp(2*l/3),p=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1);t(e,n,r,Math.max(i,Math.floor(r-u*c/s+p)),Math.min(o,Math.floor(r+(s-u)*c/s+p)),a)}var f=n[2*r+a],h=i,d=o;for(z(e,n,i,r),n[2*o+a]>f&&z(e,n,i,o);h<d;){for(z(e,n,h,d),h++,d--;n[2*h+a]<f;)h++;for(;n[2*d+a]>f;)d--}n[2*i+a]===f?z(e,n,i,d):z(e,n,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}(e,n,s,i,o,a%2),t(e,n,r,i,s-1,a+1),t(e,n,r,s+1,o,a+1)}},Wt=function(t,e,n,r,i,o,a){for(var s,u,l=[0,t.length-1,0],c=[];l.length;){var p=l.pop(),f=l.pop(),h=l.pop();if(f-h<=a)for(var d=h;d<=f;d++)s=e[2*d],u=e[2*d+1],s>=n&&s<=i&&u>=r&&u<=o&&c.push(t[d]);else{var m=Math.floor((h+f)/2);s=e[2*m],u=e[2*m+1],s>=n&&s<=i&&u>=r&&u<=o&&c.push(t[m]);var y=(p+1)%2;(0===p?n<=s:r<=u)&&(l.push(h),l.push(m-1),l.push(y)),(0===p?i>=s:o>=u)&&(l.push(m+1),l.push(f),l.push(y))}}return c},$t=function(t,e,n,r,i,o){for(var a=[0,t.length-1,0],s=[],u=i*i;a.length;){var l=a.pop(),c=a.pop(),p=a.pop();if(c-p<=o)for(var f=p;f<=c;f++)M(e[2*f],e[2*f+1],n,r)<=u&&s.push(t[f]);else{var h=Math.floor((p+c)/2),d=e[2*h],m=e[2*h+1];M(d,m,n,r)<=u&&s.push(t[h]);var y=(l+1)%2;(0===l?n-i<=d:r-i<=m)&&(a.push(p),a.push(h-1),a.push(y)),(0===l?n+i>=d:r+i>=m)&&(a.push(h+1),a.push(c),a.push(y))}}return s},Zt=function(t,e,n,r,i){return new j(t,e,n,r,i)};j.prototype={range:function(t,e,n,r){return Wt(this.ids,this.coords,t,e,n,r,this.nodeSize)},within:function(t,e,n){return $t(this.ids,this.coords,t,e,n,this.nodeSize)}};var Gt=function(t){return new F(t)};F.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&&console.time("total time");var n="prepare "+t.length+" points";e&&console.time(n),this.points=t;var r=t.map(N);e&&console.timeEnd(n);for(var i=this.options.maxZoom;i>=this.options.minZoom;i--){var o=+Date.now();this.trees[i+1]=Zt(r,Z,G,this.options.nodeSize,Float32Array),r=this._cluster(r,i),e&&console.log("z%d: %d clusters in %dms",i,r.length,+Date.now()-o)}return this.trees[this.options.minZoom]=Zt(r,Z,G,this.options.nodeSize,Float32Array),e&&console.timeEnd("total time"),this},getClusters:function(t,e){for(var n=this.trees[this._limitZoom(e)],r=n.range(q(t[0]),W(t[3]),q(t[2]),W(t[1])),i=[],o=0;o<r.length;o++){var a=n.points[r[o]];i.push(a.numPoints?V(a):this.points[a.id])}return i},getChildren:function(t,e){for(var n=this.trees[e+1].points[t],r=this.options.radius/(this.options.extent*Math.pow(2,e)),i=this.trees[e+1].within(n.x,n.y,r),o=[],a=0;a<i.length;a++){var s=this.trees[e+1].points[i[a]];s.parentId===t&&o.push(s.numPoints?V(s):this.points[s.id])}return o},getLeaves:function(t,e,n,r){n=n||10,r=r||0;var i=[];return this._appendLeaves(i,t,e,n,r,0),i},getTile:function(t,e,n){var r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),o=this.options.extent,a=this.options.radius/o,s=(n-a)/i,u=(n+1+a)/i,l={features:[]};return this._addTileFeatures(r.range((e-a)/i,s,(e+1+a)/i,u),r.points,e,n,i,l),0===e&&this._addTileFeatures(r.range(1-a/i,s,1,u),r.points,i,n,i,l),e===i-1&&this._addTileFeatures(r.range(0,s,a/i,u),r.points,-1,n,i,l),l.features.length?l:null},getClusterExpansionZoom:function(t,e){for(;e<this.options.maxZoom;){var n=this.getChildren(t,e);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e},_appendLeaves:function(t,e,n,r,i,o){for(var a=this.getChildren(e,n),s=0;s<a.length;s++){var u=a[s].properties;if(u.cluster?o+u.point_count<=i?o+=u.point_count:o=this._appendLeaves(t,u.cluster_id,n+1,r,i,o):o<i?o++:t.push(a[s]),t.length===r)break}return o},_addTileFeatures:function(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=e[t[a]];o.features.push({type:1,geometry:[[Math.round(this.options.extent*(s.x*i-n)),Math.round(this.options.extent*(s.y*i-r))]],tags:s.numPoints?U(s):this.points[s.id].properties})}},_limitZoom:function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},_cluster:function(t,e){for(var n=[],r=this.options.radius/(this.options.extent*Math.pow(2,e)),i=0;i<t.length;i++){var o=t[i];if(!(o.zoom<=e)){o.zoom=e;var a=this.trees[e+1],s=a.within(o.x,o.y,r),u=o.numPoints||1,l=o.x*u,c=o.y*u,p=null;this.options.reduce&&(p=this.options.initial(),this._accumulate(p,o));for(var f=0;f<s.length;f++){var h=a.points[s[f]];if(e<h.zoom){var d=h.numPoints||1;h.zoom=e,l+=h.x*d,c+=h.y*d,u+=d,h.parentId=i,this.options.reduce&&this._accumulate(p,h)}}1===u?n.push(o):(o.parentId=i,n.push(B(l/u,c/u,u,i,p)))}}return n},_accumulate:function(t,e){var n=e.numPoints?e.properties:this.options.map(this.points[e.id].properties);this.options.reduce(t,n)}},gt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,debug:0},gt.prototype.splitTile=function(t,e,n,r,i,o,a){for(var s=[t,e,n,r],u=this.options,l=u.debug;s.length;){r=s.pop(),n=s.pop(),e=s.pop(),t=s.pop();var c=1<<e,p=_t(e,n,r),f=this.tiles[p];if(!f&&(l>1&&console.time("creation"),f=this.tiles[p]=mt(t,e,n,r,u),this.tileCoords.push({z:e,x:n,y:r}),l)){l>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,n,r,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var h="z"+e;this.stats[h]=(this.stats[h]||0)+1,this.total++}if(f.source=t,i){if(e===u.maxZoom||e===i)continue;var d=1<<i-e;if(n!==Math.floor(o/d)||r!==Math.floor(a/d))continue}else if(e===u.indexMaxZoom||f.numPoints<=u.indexMaxPoints)continue;if(f.source=null,0!==t.length){l>1&&console.time("clipping");var m,y,v,g,_,b,x=.5*u.buffer/u.extent,w=.5-x,E=.5+x,S=1+x;m=y=v=g=null,_=rt(t,c,n-x,n+E,0,f.minX,f.maxX,u),b=rt(t,c,n+w,n+S,0,f.minX,f.maxX,u),t=null,_&&(m=rt(_,c,r-x,r+E,1,f.minY,f.maxY,u),y=rt(_,c,r+w,r+S,1,f.minY,f.maxY,u),_=null),b&&(v=rt(b,c,r-x,r+E,1,f.minY,f.maxY,u),g=rt(b,c,r+w,r+S,1,f.minY,f.maxY,u),b=null),l>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*n,2*r),s.push(y||[],e+1,2*n,2*r+1),s.push(v||[],e+1,2*n+1,2*r),s.push(g||[],e+1,2*n+1,2*r+1)}}},gt.prototype.getTile=function(t,e,n){var r=this.options,i=r.extent,o=r.debug;if(t<0||t>24)return null;var a=1<<t,s=_t(t,e=(e%a+a)%a,n);if(this.tiles[s])return ht(this.tiles[s],i);o>1&&console.log("drilling down to z%d-%d-%d",t,e,n);for(var u,l=t,c=e,p=n;!u&&l>0;)l--,c=Math.floor(c/2),p=Math.floor(p/2),u=this.tiles[_t(l,c,p)];return u&&u.source?(o>1&&console.log("found parent tile z%d-%d-%d",l,c,p),o>1&&console.time("drilling down"),this.splitTile(u.source,l,c,p,t,e,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?ht(this.tiles[s],i):null):null};var Ht=function(e){function n(t,n,r){e.call(this,t,n,bt),r&&(this.loadGeoJSON=r)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},n.prototype._loadData=function(){var t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var e=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams,this.loadGeoJSON(n,function(r,i){if(r||!i)return e(r);if("object"!=typeof i)return e(new Error("Input data is not a valid GeoJSON object."));Rt(i,!0);try{t._geoJSONIndex=n.cluster?Gt(n.superclusterOptions).load(i.features):function(t,e){return new gt(t,e)}(i,n.geojsonVtOptions)}catch(r){return e(r)}t.loaded={};var o={};if(n.request&&n.request.collectResourceTiming){var a=Ot(n.request.url);a&&(o.resourceTiming={},o.resourceTiming[n.source]=JSON.parse(JSON.stringify(a)))}e(null,o)})}},n.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},n.prototype.reloadTile=function(t,n){var r=this.loaded,i=t.uid;return r&&r[i]?e.prototype.reloadTile.call(this,t,n):this.loadTile(t,n)},n.prototype.loadGeoJSON=function(e,n){if(e.request)t.getJSON(e.request,n);else{if("string"!=typeof e.data)return n(new Error("Input data is not a valid GeoJSON object."));try{return n(null,JSON.parse(e.data))}catch(t){return n(new Error("Input data is not a valid GeoJSON object."))}}},n.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},n}(kt),Kt=function(e){var n=this;this.self=e,this.actor=new t.default$7(e,this),this.layerIndexes={},this.workerSourceTypes={vector:kt,geojson:Ht},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(n.workerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');n.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(e){if(t.plugin.isLoaded())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText}};return Kt.prototype.setLayers=function(t,e,n){this.getLayerIndex(t).replace(e),n()},Kt.prototype.updateLayers=function(t,e,n){this.getLayerIndex(t).update(e.layers,e.removedIds),n()},Kt.prototype.loadTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).loadTile(e,n)},Kt.prototype.loadDEMTile=function(t,e,n){this.getDEMWorkerSource(t,e.source).loadTile(e,n)},Kt.prototype.reloadTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).reloadTile(e,n)},Kt.prototype.abortTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).abortTile(e,n)},Kt.prototype.removeTile=function(t,e,n){this.getWorkerSource(t,e.type,e.source).removeTile(e,n)},Kt.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},Kt.prototype.removeSource=function(t,e,n){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var r=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==r.removeSource?r.removeSource(e,n):n()}},Kt.prototype.loadWorkerSource=function(t,e,n){try{this.self.importScripts(e.url),n()}catch(t){n(t.toString())}},Kt.prototype.loadRTLTextPlugin=function(e,n,r){try{t.plugin.isLoaded()||(this.self.importScripts(n),r(t.plugin.isLoaded()?null:new Error("RTL Text Plugin failed to import scripts from "+n)))}catch(t){r(t.toString())}},Kt.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new xt),e},Kt.prototype.getWorkerSource=function(t,e,n){var r=this;if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][n]){var i={send:function(e,n,i){r.actor.send(e,n,i,t)}};this.workerSources[t][e][n]=new this.workerSourceTypes[e](i,this.getLayerIndex(t))}return this.workerSources[t][e][n]},Kt.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new It),this.demWorkerSources[t][e]},"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&new Kt(self),Kt}),t(["./chunk1.js"],function(t){function e(t){if(!bt)return null;for(var e=0;e<t.length;e++)if(t[e]in bt)return t[e];return t[0]}function n(t,e){var n=i(Ct.API_URL);if(t.protocol=n.protocol,t.authority=n.authority,"/"!==n.path&&(t.path=""+n.path+t.path),!Ct.REQUIRE_ACCESS_TOKEN)return o(t);if(!(e=e||Ct.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+At);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+At);return t.params.push("access_token="+e),o(t)}function r(t){return 0===t.indexOf("mapbox:")}function i(t){var e=t.match(Rt);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function o(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}function a(t,e,n,r,i,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=r||.25,this.fontFamily=i||"sans-serif",this.fontWeight=o||"normal",this.radius=n||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function s(t,e,n,r,i,o,a){for(var s=0;s<e;s++){for(var l=0;l<n;l++)r[l]=t[l*e+s];for(u(r,i,o,a,n),l=0;l<n;l++)t[l*e+s]=i[l]}for(l=0;l<n;l++){for(s=0;s<e;s++)r[s]=t[l*e+s];for(u(r,i,o,a,e),s=0;s<e;s++)t[l*e+s]=Math.sqrt(i[s])}}function u(t,e,n,r,i){n[0]=0,r[0]=-Vt,r[1]=+Vt;for(var o=1,a=0;o<i;o++){for(var s=(t[o]+o*o-(t[n[a]]+n[a]*n[a]))/(2*o-2*n[a]);s<=r[a];)a--,s=(t[o]+o*o-(t[n[a]]+n[a]*n[a]))/(2*o-2*n[a]);n[++a]=o,r[a]=s,r[a+1]=+Vt}for(o=0,a=0;o<i;o++){for(;r[a+1]<o;)a++;e[o]=(o-n[a])*(o-n[a])+t[n[a]]}}function l(e,n,r){var i=function(e,n){if(e)return r(e);if(n){var i=t.pick(n,["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds"]);n.vector_layers&&(i.vectorLayers=n.vector_layers,i.vectorLayerIds=i.vectorLayers.map(function(t){return t.id})),r(null,i)}};e.url?t.getJSON(n(kt(e.url),t.ResourceType.Source),i):yt.frame(function(){return i(null,e)})}function c(t,e,n,r,i){var o=i.maxPitchScaleFactor(),a=t.tilesIn(n,o);a.sort(p);for(var s=[],u=0,l=a;u<l.length;u+=1){var c=l[u];s.push({wrappedTileID:c.tileID.wrapped().key,queryResults:c.tile.queryRenderedFeatures(e,c.queryGeometry,c.scale,r,i,o,t.transform.calculatePosMatrix(c.tileID.toUnwrapped()))})}return function(t){for(var e={},n={},r=0,i=t;r<i.length;r+=1){var o=i[r],a=o.queryResults,s=o.wrappedTileID,u=n[s]=n[s]||{};for(var l in a)for(var c=a[l],p=u[l]=u[l]||{},f=e[l]=e[l]||[],h=0,d=c;h<d.length;h+=1){var m=d[h];p[m.featureIndex]||(p[m.featureIndex]=!0,f.push(m.feature))}}return e}(s)}function p(t,e){var n=t.tileID,r=e.tileID;return n.overscaledZ-r.overscaledZ||n.canonical.y-r.canonical.y||n.wrap-r.wrap||n.canonical.x-r.canonical.x}function f(e,n){var r=n.zoomTo(e.canonical.z);return new t.default$1((r.column-(e.canonical.x+e.wrap*Math.pow(2,e.canonical.z)))*t.default$8,(r.row-e.canonical.y)*t.default$8)}function h(t){return"raster"===t||"image"===t||"video"===t}function d(){return new t.default.Worker(kr.workerUrl)}function m(e,n){var r={};for(var i in e)"ref"!==i&&(r[i]=e[i]);return t.default$18.forEach(function(t){t in n&&(r[t]=n[t])}),r}function y(t){t=t.slice();for(var e=Object.create(null),n=0;n<t.length;n++)e[t[n].id]=t[n];for(var r=0;r<t.length;r++)"ref"in t[r]&&(t[r]=m(t[r],e[t[r].ref]));return t}function v(t,e,n){n.push({command:Ye.addSource,args:[t,e[t]]})}function g(t,e,n){e.push({command:Ye.removeSource,args:[t]}),n[t]=!0}function _(t,e,n,r){g(t,n,r),v(t,e,n)}function b(e,n,r){var i;for(i in e[r])if(e[r].hasOwnProperty(i)&&"data"!==i&&!t.default$10(e[r][i],n[r][i]))return!1;for(i in n[r])if(n[r].hasOwnProperty(i)&&"data"!==i&&!t.default$10(e[r][i],n[r][i]))return!1;return!0}function x(e,n,r,i,o,a){var s;for(s in n=n||{},e=e||{})e.hasOwnProperty(s)&&(t.default$10(e[s],n[s])||r.push({command:a,args:[i,s,n[s],o]}));for(s in n)n.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.default$10(e[s],n[s])||r.push({command:a,args:[i,s,n[s],o]}))}function w(t){return t.id}function E(t,e){return t[e.id]=e,t}function S(e,n){if(!e)return[{command:Ye.setStyle,args:[n]}];var r=[];try{if(!t.default$10(e.version,n.version))return[{command:Ye.setStyle,args:[n]}];t.default$10(e.center,n.center)||r.push({command:Ye.setCenter,args:[n.center]}),t.default$10(e.zoom,n.zoom)||r.push({command:Ye.setZoom,args:[n.zoom]}),t.default$10(e.bearing,n.bearing)||r.push({command:Ye.setBearing,args:[n.bearing]}),t.default$10(e.pitch,n.pitch)||r.push({command:Ye.setPitch,args:[n.pitch]}),t.default$10(e.sprite,n.sprite)||r.push({command:Ye.setSprite,args:[n.sprite]}),t.default$10(e.glyphs,n.glyphs)||r.push({command:Ye.setGlyphs,args:[n.glyphs]}),t.default$10(e.transition,n.transition)||r.push({command:Ye.setTransition,args:[n.transition]}),t.default$10(e.light,n.light)||r.push({command:Ye.setLight,args:[n.light]});var i={},o=[];!function(e,n,r,i){var o;for(o in n=n||{},e=e||{})e.hasOwnProperty(o)&&(n.hasOwnProperty(o)||g(o,r,i));for(o in n)n.hasOwnProperty(o)&&(e.hasOwnProperty(o)?t.default$10(e[o],n[o])||("geojson"===e[o].type&&"geojson"===n[o].type&&b(e,n,o)?r.push({command:Ye.setGeoJSONSourceData,args:[o,n[o].data]}):_(o,n,r,i)):v(o,n,r))}(e.sources,n.sources,o,i);var a=[];e.layers&&e.layers.forEach(function(t){i[t.source]?r.push({command:Ye.removeLayer,args:[t.id]}):a.push(t)}),r=r.concat(o),function(e,n,r){n=n||[];var i,o,a,s,u,l,c,p=(e=e||[]).map(w),f=n.map(w),h=e.reduce(E,{}),d=n.reduce(E,{}),m=p.slice(),y=Object.create(null);for(i=0,o=0;i<p.length;i++)a=p[i],d.hasOwnProperty(a)?o++:(r.push({command:Ye.removeLayer,args:[a]}),m.splice(m.indexOf(a,o),1));for(i=0,o=0;i<f.length;i++)a=f[f.length-1-i],m[m.length-1-i]!==a&&(h.hasOwnProperty(a)?(r.push({command:Ye.removeLayer,args:[a]}),m.splice(m.lastIndexOf(a,m.length-o),1)):o++,l=m[m.length-i],r.push({command:Ye.addLayer,args:[d[a],l]}),m.splice(m.length-i,0,a),y[a]=!0);for(i=0;i<f.length;i++)if(s=h[a=f[i]],u=d[a],!y[a]&&!t.default$10(s,u))if(t.default$10(s.source,u.source)&&t.default$10(s["source-layer"],u["source-layer"])&&t.default$10(s.type,u.type)){for(c in x(s.layout,u.layout,r,a,null,Ye.setLayoutProperty),x(s.paint,u.paint,r,a,null,Ye.setPaintProperty),t.default$10(s.filter,u.filter)||r.push({command:Ye.setFilter,args:[a,u.filter]}),t.default$10(s.minzoom,u.minzoom)&&t.default$10(s.maxzoom,u.maxzoom)||r.push({command:Ye.setLayerZoomRange,args:[a,u.minzoom,u.maxzoom]}),s)s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?x(s[c],u[c],r,a,c.slice(6),Ye.setPaintProperty):t.default$10(s[c],u[c])||r.push({command:Ye.setLayerProperty,args:[a,c,u[c]]}));for(c in u)u.hasOwnProperty(c)&&!s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?x(s[c],u[c],r,a,c.slice(6),Ye.setPaintProperty):t.default$10(s[c],u[c])||r.push({command:Ye.setLayerProperty,args:[a,c,u[c]]}))}else r.push({command:Ye.removeLayer,args:[a]}),l=m[m.lastIndexOf(a)+1],r.push({command:Ye.addLayer,args:[u,l]})}(a,n.layers,r)}catch(t){console.warn("Unable to compute style diff:",t),r=[{command:Ye.setStyle,args:[n]}]}return r}function T(e,n,r,i,o){var a=t.mat4.identity(new Float32Array(16));return n?(t.mat4.identity(a),t.mat4.scale(a,a,[1/o,1/o,1]),r||t.mat4.rotateZ(a,a,i.angle)):(t.mat4.scale(a,a,[i.width/2,-i.height/2,1]),t.mat4.translate(a,a,[1,-1,0]),t.mat4.multiply(a,a,e)),a}function C(e,n,r,i,o){var a=t.mat4.identity(new Float32Array(16));return n?(t.mat4.multiply(a,a,e),t.mat4.scale(a,a,[o,o,1]),r||t.mat4.rotateZ(a,a,-i.angle)):(t.mat4.scale(a,a,[1,-1,1]),t.mat4.translate(a,a,[-1,-1,0]),t.mat4.scale(a,a,[2/i.width,2/i.height,1])),a}function A(e,n){var r=[e.x,e.y,0,1];D(r,r,n);var i=r[3];return{point:new t.default$1(r[0]/i,r[1]/i),signedDistanceFromCamera:i}}function O(t,e){var n=t[0]/t[3],r=t[1]/t[3];return n>=-e[0]&&n<=e[0]&&r>=-e[1]&&r<=e[1]}function k(e,n,r,i,o,a,s,u){var l=i?e.textSizeData:e.iconSizeData,c=t.evaluateSizeForZoom(l,r.transform.zoom,Qe.properties[i?"text-size":"icon-size"]),p=[256/r.width*2+1,256/r.height*2+1],f=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;f.clear();for(var h=e.lineVertexArray,d=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,m=r.transform.width/r.transform.height,y=!1,v=0;v<d.length;v++){var g=d.get(v);if(g.hidden||g.writingMode===t.WritingMode.vertical&&!y)j(g.numGlyphs,f);else{y=!1;var _=[g.anchorX,g.anchorY,0,1];if(t.vec4.transformMat4(_,_,n),O(_,p)){var b=.5+_[3]/r.transform.cameraToCenterDistance*.5,x=t.evaluateSizeForFeature(l,c,g),w=s?x*b:x/b,E=new t.default$1(g.anchorX,g.anchorY),S=A(E,o).point,T={},C=z(g,w,!1,u,n,o,a,e.glyphOffsetArray,h,f,S,E,T,m);y=C.useVertical,(C.notEnoughRoom||y||C.needsFlipping&&z(g,w,!0,u,n,o,a,e.glyphOffsetArray,h,f,S,E,T,m).notEnoughRoom)&&j(g.numGlyphs,f)}else j(g.numGlyphs,f)}}i?e.text.dynamicLayoutVertexBuffer.updateData(f):e.icon.dynamicLayoutVertexBuffer.updateData(f)}function I(t,e,n,r,i,o,a,s,u,l,c,p){var f=s.glyphStartIndex+s.numGlyphs,h=s.lineStartIndex,d=s.lineStartIndex+s.lineLength,m=e.getoffsetX(s.glyphStartIndex),y=e.getoffsetX(f-1),v=M(t*m,n,r,i,o,a,s.segment,h,d,u,l,c,p);if(!v)return null;var g=M(t*y,n,r,i,o,a,s.segment,h,d,u,l,c,p);return g?{first:v,last:g}:null}function P(e,n,r,i){return e===t.WritingMode.horizontal&&Math.abs(r.y-n.y)>Math.abs(r.x-n.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?n.y<r.y:n.x>r.x)?{needsFlipping:!0}:null}function z(e,n,r,i,o,a,s,u,l,c,p,f,h,d){var m,y=n/24,v=e.lineOffsetX*n,g=e.lineOffsetY*n;if(e.numGlyphs>1){var _=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,x=e.lineStartIndex+e.lineLength,w=I(y,u,v,g,r,p,f,e,l,a,h,!1);if(!w)return{notEnoughRoom:!0};var E=A(w.first.point,s).point,S=A(w.last.point,s).point;if(i&&!r){var T=P(e.writingMode,E,S,d);if(T)return T}m=[w.first];for(var C=e.glyphStartIndex+1;C<_-1;C++)m.push(M(y*u.getoffsetX(C),v,g,r,p,f,e.segment,b,x,l,a,h,!1));m.push(w.last)}else{if(i&&!r){var O=A(f,o).point,k=e.lineStartIndex+e.segment+1,z=new t.default$1(l.getx(k),l.gety(k)),j=A(z,o),D=j.signedDistanceFromCamera>0?j.point:R(f,z,O,1,o),L=P(e.writingMode,O,D,d);if(L)return L}var F=M(y*u.getoffsetX(e.glyphStartIndex),v,g,r,p,f,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,l,a,h,!1);if(!F)return{notEnoughRoom:!0};m=[F]}for(var B=0,N=m;B<N.length;B+=1){var V=N[B];t.addDynamicAttributes(c,V.point,V.angle)}return{}}function R(t,e,n,r,i){var o=A(t.add(t.sub(e)._unit()),i).point,a=n.sub(o);return n.add(a._mult(r/a.mag()))}function M(e,n,r,i,o,a,s,u,l,c,p,f,h){var d=i?e-n:e+n,m=d>0?1:-1,y=0;i&&(m*=-1,y=Math.PI),m<0&&(y+=Math.PI);for(var v=m>0?u+s:u+s+1,g=v,_=o,b=o,x=0,w=0,E=Math.abs(d);x+w<=E;){if((v+=m)<u||v>=l)return null;if(b=_,void 0===(_=f[v])){var S=new t.default$1(c.getx(v),c.gety(v)),T=A(S,p);if(T.signedDistanceFromCamera>0)_=f[v]=T.point;else{var C=v-m;_=R(0===x?a:new t.default$1(c.getx(C),c.gety(C)),S,b,E-x+1,p)}}x+=w,w=b.dist(_)}var O=(E-x)/w,k=_.sub(b),I=k.mult(O)._add(b);return I._add(k._unit()._perp()._mult(r*m)),{point:I,angle:y+Math.atan2(_.y-b.y,_.x-b.x),tileDistance:h?{prevTileDistance:v-m===g?0:c.gettileUnitDistanceFromAnchor(v-m),lastSegmentViewportDistance:E-x}:null}}function j(t,e){for(var n=0;n<t;n++){var r=e.length;e.resize(r+4),e.float32.set(tn,3*r)}}function D(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t[3]=n[3]*r+n[7]*i+n[15],t}function L(t,e,n){t[e+4]=n?1:0}function F(e,n,r){return n*(t.default$8/(e.tileSize*Math.pow(2,r-e.tileID.overscaledZ)))}function B(t,e,n){t.emplaceBack(e?1:0,n?1:0),t.emplaceBack(e?1:0,n?1:0),t.emplaceBack(e?1:0,n?1:0),t.emplaceBack(e?1:0,n?1:0)}function N(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,n=Math.floor(127*t.opacity);return n*un+e*ln+n*cn+e*pn+n*fn+e*hn+n*dn+e}function V(e,n,r,i,o){for(var a=0;a<r.length;a++){var s=r[a];if(i.isLessThan(s.tileID))break;if(n.key===s.tileID.key)return;if(s.tileID.isChildOf(n)){for(var u=n.children(1/0),l=0;l<u.length;l++)V(e,u[l],r.slice(a),i,o);return}}var c=n.overscaledZ-e.overscaledZ,p=new t.CanonicalTileID(c,n.canonical.x-(e.canonical.x<<c),n.canonical.y-(e.canonical.y<<c));o[p.key]=o[p.key]||p}function U(t,e,n,r,i){var o=t.context,a=o.gl,s=i?t.useProgram("collisionCircle"):t.useProgram("collisionBox");o.setDepthMode(We.disabled),o.setStencilMode($e.disabled),o.setColorMode(t.colorModeForRenderPass());for(var u=0;u<r.length;u++){var l=r[u],c=e.getTile(l),p=c.getBucket(n);if(p){var f=i?p.collisionCircle:p.collisionBox;if(f){a.uniformMatrix4fv(s.uniforms.u_matrix,!1,l.posMatrix),i||o.lineWidth.set(1),a.uniform1f(s.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance);var h=F(c,1,t.transform.zoom),d=Math.pow(2,t.transform.zoom-c.tileID.overscaledZ);a.uniform1f(s.uniforms.u_pixels_to_tile_units,h),a.uniform2f(s.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits[0]/(h*d),t.transform.pixelsToGLUnits[1]/(h*d)),a.uniform1f(s.uniforms.u_overscale_factor,c.tileID.overscaleFactor()),s.draw(o,i?a.TRIANGLES:a.LINES,n.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,null,f.collisionVertexBuffer,null)}}}}function q(t,e,n,r,i,o,a,s,u,l){var c,p=t.context,f=p.gl,h=t.transform,d="map"===s,m="map"===u,y=d&&"line"===n.layout.get("symbol-placement"),v=d&&!m&&!y,g=m;p.setDepthMode(g?t.depthModeForSublayer(0,We.ReadOnly):We.disabled);for(var _=0,b=r;_<b.length;_+=1){var x=b[_],w=e.getTile(x),E=w.getBucket(n);if(E){var S=i?E.text:E.icon;if(S&&S.segments.get().length){var A=S.programConfigurations.get(n.id),O=i||E.sdfIcons,I=i?E.textSizeData:E.iconSizeData;if(c||(c=t.useProgram(O?"symbolSDF":"symbolIcon",A),A.setUniforms(t.context,c,n.paint,{zoom:t.transform.zoom}),W(c,t,n,i,v,m,I)),p.activeTexture.set(f.TEXTURE0),f.uniform1i(c.uniforms.u_texture,0),i)w.glyphAtlasTexture.bind(f.LINEAR,f.CLAMP_TO_EDGE),f.uniform2fv(c.uniforms.u_texsize,w.glyphAtlasTexture.size);else{var P=1!==n.layout.get("icon-size").constantOr(0)||E.iconsNeedLinear,z=m||0!==h.pitch;w.iconAtlasTexture.bind(O||t.options.rotating||t.options.zooming||P||z?f.LINEAR:f.NEAREST,f.CLAMP_TO_EDGE),f.uniform2fv(c.uniforms.u_texsize,w.iconAtlasTexture.size)}f.uniformMatrix4fv(c.uniforms.u_matrix,!1,t.translatePosMatrix(x.posMatrix,w,o,a));var R=F(w,1,t.transform.zoom),M=T(x.posMatrix,m,d,t.transform,R),j=C(x.posMatrix,m,d,t.transform,R);f.uniformMatrix4fv(c.uniforms.u_gl_coord_matrix,!1,t.translatePosMatrix(j,w,o,a,!0)),y?(f.uniformMatrix4fv(c.uniforms.u_label_plane_matrix,!1,zn),k(E,x.posMatrix,t,i,M,j,m,l)):f.uniformMatrix4fv(c.uniforms.u_label_plane_matrix,!1,M),f.uniform1f(c.uniforms.u_fade_change,t.options.fadeDuration?t.symbolFadeChange:1),$(c,A,t,n,w,S,i,O,m)}}}}function W(e,n,r,i,o,a,s){var u=n.context.gl,l=n.transform;u.uniform1i(e.uniforms.u_pitch_with_map,a?1:0),u.uniform1f(e.uniforms.u_is_text,i?1:0),u.uniform1f(e.uniforms.u_pitch,l.pitch/360*2*Math.PI);var c="constant"===s.functionType||"source"===s.functionType,p="constant"===s.functionType||"camera"===s.functionType;u.uniform1i(e.uniforms.u_is_size_zoom_constant,c?1:0),u.uniform1i(e.uniforms.u_is_size_feature_constant,p?1:0),u.uniform1f(e.uniforms.u_camera_to_center_distance,l.cameraToCenterDistance);var f=t.evaluateSizeForZoom(s,l.zoom,Rn.properties[i?"text-size":"icon-size"]);void 0!==f.uSizeT&&u.uniform1f(e.uniforms.u_size_t,f.uSizeT),void 0!==f.uSize&&u.uniform1f(e.uniforms.u_size,f.uSize),u.uniform1f(e.uniforms.u_aspect_ratio,l.width/l.height),u.uniform1i(e.uniforms.u_rotate_symbol,o?1:0)}function $(t,e,n,r,i,o,a,s,u){var l=n.context,c=l.gl,p=n.transform;if(s){var f=0!==r.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(1),h=u?Math.cos(p._pitch)*p.cameraToCenterDistance:1;c.uniform1f(t.uniforms.u_gamma_scale,h),f&&(c.uniform1f(t.uniforms.u_is_halo,1),Z(o,r,l,t)),c.uniform1f(t.uniforms.u_is_halo,0)}Z(o,r,l,t)}function Z(t,e,n,r){r.draw(n,n.gl.TRIANGLES,e.id,t.layoutVertexBuffer,t.indexBuffer,t.segments,t.programConfigurations.get(e.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function G(t,e,n,r,i,o,a,s,u){var l,c,p,f,h=e.context,d=h.gl,m=i.paint.get("line-dasharray"),y=i.paint.get("line-pattern");if(s||u){var v=1/F(n,1,e.transform.tileZoom);if(m){l=e.lineAtlas.getDash(m.from,"round"===i.layout.get("line-cap")),c=e.lineAtlas.getDash(m.to,"round"===i.layout.get("line-cap"));var g=l.width*m.fromScale,_=c.width*m.toScale;d.uniform2f(t.uniforms.u_patternscale_a,v/g,-l.height/2),d.uniform2f(t.uniforms.u_patternscale_b,v/_,-c.height/2),d.uniform1f(t.uniforms.u_sdfgamma,e.lineAtlas.width/(256*Math.min(g,_)*yt.devicePixelRatio)/2)}else if(y){if(p=e.imageManager.getPattern(y.from),f=e.imageManager.getPattern(y.to),!p||!f)return;d.uniform2f(t.uniforms.u_pattern_size_a,p.displaySize[0]*y.fromScale/v,p.displaySize[1]),d.uniform2f(t.uniforms.u_pattern_size_b,f.displaySize[0]*y.toScale/v,f.displaySize[1]);var b=e.imageManager.getPixelSize(),x=b.width,w=b.height;d.uniform2fv(t.uniforms.u_texsize,[x,w])}d.uniform2f(t.uniforms.u_gl_units_to_pixels,1/e.transform.pixelsToGLUnits[0],1/e.transform.pixelsToGLUnits[1])}s&&(m?(d.uniform1i(t.uniforms.u_image,0),h.activeTexture.set(d.TEXTURE0),e.lineAtlas.bind(h),d.uniform1f(t.uniforms.u_tex_y_a,l.y),d.uniform1f(t.uniforms.u_tex_y_b,c.y),d.uniform1f(t.uniforms.u_mix,m.t)):y&&(d.uniform1i(t.uniforms.u_image,0),h.activeTexture.set(d.TEXTURE0),e.imageManager.bind(h),d.uniform2fv(t.uniforms.u_pattern_tl_a,p.tl),d.uniform2fv(t.uniforms.u_pattern_br_a,p.br),d.uniform2fv(t.uniforms.u_pattern_tl_b,f.tl),d.uniform2fv(t.uniforms.u_pattern_br_b,f.br),d.uniform1f(t.uniforms.u_fade,y.t))),h.setStencilMode(e.stencilModeForClipping(o));var E=e.translatePosMatrix(o.posMatrix,n,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"));if(d.uniformMatrix4fv(t.uniforms.u_matrix,!1,E),d.uniform1f(t.uniforms.u_ratio,1/F(n,1,e.transform.zoom)),i.paint.get("line-gradient")){h.activeTexture.set(d.TEXTURE0);var S=i.gradientTexture;if(!i.gradient)return;S||(S=i.gradientTexture=new Ft(h,i.gradient,d.RGBA)),S.bind(d.LINEAR,d.CLAMP_TO_EDGE),d.uniform1i(t.uniforms.u_image,0)}t.draw(h,d.TRIANGLES,i.id,r.layoutVertexBuffer,r.indexBuffer,r.segments,a)}function H(t,e,n,r,i){if(!Mn(n.paint.get("fill-pattern"),t))for(var o=!0,a=0,s=r;a<s.length;a+=1){var u=s[a],l=e.getTile(u),c=l.getBucket(n);c&&(t.context.setStencilMode(t.stencilModeForClipping(u)),i(t,e,n,l,u,c,o),o=!1)}}function K(t,e,n,r,i,o,a){var s=t.context.gl,u=o.programConfigurations.get(n.id);Y("fill",n.paint.get("fill-pattern"),t,u,n,r,i,a).draw(t.context,s.TRIANGLES,n.id,o.layoutVertexBuffer,o.indexBuffer,o.segments,u)}function X(t,e,n,r,i,o,a){var s=t.context.gl,u=o.programConfigurations.get(n.id),l=Y("fillOutline",n.getPaintProperty("fill-outline-color")?null:n.paint.get("fill-pattern"),t,u,n,r,i,a);s.uniform2f(l.uniforms.u_world,s.drawingBufferWidth,s.drawingBufferHeight),l.draw(t.context,s.LINES,n.id,o.layoutVertexBuffer,o.indexBuffer2,o.segments2,u)}function Y(t,e,n,r,i,o,a,s){var u,l=n.context.program.get();return e?(u=n.useProgram(t+"Pattern",r),(s||u.program!==l)&&(r.setUniforms(n.context,u,i.paint,{zoom:n.transform.zoom}),jn(e,n,u)),Dn(o,n,u)):(u=n.useProgram(t,r),(s||u.program!==l)&&r.setUniforms(n.context,u,i.paint,{zoom:n.transform.zoom})),n.context.gl.uniformMatrix4fv(u.uniforms.u_matrix,!1,n.translatePosMatrix(a.posMatrix,o,i.paint.get("fill-translate"),i.paint.get("fill-translate-anchor"))),u}function J(t,e,n,r,i,o,a){var s=t.context,u=s.gl,l=n.paint.get("fill-extrusion-pattern"),c=t.context.program.get(),p=o.programConfigurations.get(n.id),f=t.useProgram(l?"fillExtrusionPattern":"fillExtrusion",p);if((a||f.program!==c)&&p.setUniforms(s,f,n.paint,{zoom:t.transform.zoom}),l){if(Mn(l,t))return;jn(l,t,f),Dn(r,t,f),u.uniform1f(f.uniforms.u_height_factor,-Math.pow(2,i.overscaledZ)/r.tileSize/8)}t.context.gl.uniformMatrix4fv(f.uniforms.u_matrix,!1,t.translatePosMatrix(i.posMatrix,r,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor"))),function(t,e){var n=e.context.gl,r=e.style.light,i=r.properties.get("position"),o=[i.x,i.y,i.z],a=Ln.create();"viewport"===r.properties.get("anchor")&&Ln.fromRotation(a,-e.transform.angle),Bn.transformMat3(o,o,a);var s=r.properties.get("color");n.uniform3fv(t.uniforms.u_lightpos,o),n.uniform1f(t.uniforms.u_lightintensity,r.properties.get("intensity")),n.uniform3f(t.uniforms.u_lightcolor,s.r,s.g,s.b)}(f,t),f.draw(s,u.TRIANGLES,n.id,o.layoutVertexBuffer,o.indexBuffer,o.segments,p)}function Q(e,n,r){var i=e.context,o=i.gl,a=n.fbo;if(a){var s=e.useProgram("hillshade"),u=e.transform.calculatePosMatrix(n.tileID.toUnwrapped(),!0);!function(t,e,n){var r=n.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===n.paint.get("hillshade-illumination-anchor")&&(r-=e.transform.angle),e.context.gl.uniform2f(t.uniforms.u_light,n.paint.get("hillshade-exaggeration"),r)}(s,e,r);var l=function(e,n){var r=n.toCoordinate(),i=new t.default$17(r.column,r.row+1,r.zoom);return[e.transform.coordinateLocation(r).lat,e.transform.coordinateLocation(i).lat]}(e,n.tileID);i.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,a.colorAttachment.get()),o.uniformMatrix4fv(s.uniforms.u_matrix,!1,u),o.uniform2fv(s.uniforms.u_latrange,l),o.uniform1i(s.uniforms.u_image,0);var c=r.paint.get("hillshade-shadow-color");o.uniform4f(s.uniforms.u_shadow,c.r,c.g,c.b,c.a);var p=r.paint.get("hillshade-highlight-color");o.uniform4f(s.uniforms.u_highlight,p.r,p.g,p.b,p.a);var f=r.paint.get("hillshade-accent-color");if(o.uniform4f(s.uniforms.u_accent,f.r,f.g,f.b,f.a),n.maskedBoundsBuffer&&n.maskedIndexBuffer&&n.segments)s.draw(i,o.TRIANGLES,r.id,n.maskedBoundsBuffer,n.maskedIndexBuffer,n.segments);else{var h=e.rasterBoundsBuffer;e.rasterBoundsVAO.bind(i,s,h,[]),o.drawArrays(o.TRIANGLE_STRIP,0,h.length)}}}function tt(e,n,r){var i=e.context,o=i.gl;if(n.dem&&n.dem.level){var a=n.dem.level.dim,s=n.dem.getPixels();if(i.activeTexture.set(o.TEXTURE1),i.pixelStoreUnpackPremultiplyAlpha.set(!1),n.demTexture=n.demTexture||e.getTileTexture(n.tileSize),n.demTexture){var u=n.demTexture;u.update(s,{premultiply:!1}),u.bind(o.NEAREST,o.CLAMP_TO_EDGE)}else n.demTexture=new Ft(i,s,o.RGBA,{premultiply:!1}),n.demTexture.bind(o.NEAREST,o.CLAMP_TO_EDGE);i.activeTexture.set(o.TEXTURE0);var l=n.fbo;if(!l){var c=new Ft(i,{width:a,height:a,data:null},o.RGBA);c.bind(o.LINEAR,o.CLAMP_TO_EDGE),(l=n.fbo=i.createFramebuffer(a,a)).colorAttachment.set(c.texture)}i.bindFramebuffer.set(l.framebuffer),i.viewport.set([0,0,a,a]);var p=t.mat4.create();t.mat4.ortho(p,0,t.default$8,-t.default$8,0,0,1),t.mat4.translate(p,p,[0,-t.default$8,0]);var f=e.useProgram("hillshadePrepare");o.uniformMatrix4fv(f.uniforms.u_matrix,!1,p),o.uniform1f(f.uniforms.u_zoom,n.tileID.overscaledZ),o.uniform2fv(f.uniforms.u_dimension,[2*a,2*a]),o.uniform1i(f.uniforms.u_image,1),o.uniform1f(f.uniforms.u_maxzoom,r);var h=e.rasterBoundsBuffer;e.rasterBoundsVAO.bind(i,f,h,[]),o.drawArrays(o.TRIANGLE_STRIP,0,h.length),n.needsHillshadePrepare=!1}}function et(e,n,r,i,o){var a=i.paint.get("raster-fade-duration");if(a>0){var s=yt.now(),u=(s-e.timeAdded)/a,l=n?(s-n.timeAdded)/a:-1,c=r.getSource(),p=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),f=!n||Math.abs(n.tileID.overscaledZ-p)>Math.abs(e.tileID.overscaledZ-p),h=f&&e.refreshedUponExpiration?1:t.clamp(f?u:1-l,0,1);return e.refreshedUponExpiration&&u>=1&&(e.refreshedUponExpiration=!1),n?{opacity:1,mix:1-h}:{opacity:h,mix:0}}return{opacity:1,mix:0}}function nt(e,n,r){var i=e.context,o=i.gl;i.lineWidth.set(1*yt.devicePixelRatio);var a=r.posMatrix,s=e.useProgram("debug");i.setDepthMode(We.disabled),i.setStencilMode($e.disabled),i.setColorMode(e.colorModeForRenderPass()),o.uniformMatrix4fv(s.uniforms.u_matrix,!1,a),o.uniform4f(s.uniforms.u_color,1,0,0,1),e.debugVAO.bind(i,s,e.debugBuffer,[]),o.drawArrays(o.LINE_STRIP,0,e.debugBuffer.length);for(var u=function(t,e,n,r){r=r||1;var i,o,a,s,u,l,c,p,f=[];for(i=0,o=t.length;i<o;i++)if(u=Nn[t[i]]){for(p=null,a=0,s=u[1].length;a<s;a+=2)-1===u[1][a]&&-1===u[1][a+1]?p=null:(l=e+u[1][a]*r,c=200-u[1][a+1]*r,p&&f.push(p.x,p.y,l,c),p={x:l,y:c});e+=u[0]*r}return f}(r.toString(),50,0,5),l=new t.PosArray,c=0;c<u.length;c+=2)l.emplaceBack(u[c],u[c+1]);var p=i.createVertexBuffer(l,Cn.members);(new ne).bind(i,s,p,[]),o.uniform4f(s.uniforms.u_color,1,1,1,1);for(var f=n.getTile(r).tileSize,h=t.default$8/(Math.pow(2,e.transform.zoom-r.overscaledZ)*f),d=[[-1,-1],[-1,1],[1,-1],[1,1]],m=0;m<d.length;m++){var y=d[m];o.uniformMatrix4fv(s.uniforms.u_matrix,!1,t.mat4.translate([],a,[h*y[0],h*y[1],0])),o.drawArrays(o.LINES,0,p.length)}o.uniform4f(s.uniforms.u_color,0,0,0,1),o.uniformMatrix4fv(s.uniforms.u_matrix,!1,a),o.drawArrays(o.LINES,0,p.length)}function rt(t,e){if(t.row>e.row){var n=t;t=e,e=n}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function it(t,e,n,r,i){var o=Math.max(n,Math.floor(e.y0)),a=Math.min(r,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx<e.x1:t.x1-e.dy/t.dy*t.dx<e.x0){var s=t;t=e,e=s}for(var u=t.dx/t.dy,l=e.dx/e.dy,c=t.dx>0,p=e.dx<0,f=o;f<a;f++){var h=u*Math.max(0,Math.min(t.dy,f+c-t.y0))+t.x0,d=l*Math.max(0,Math.min(e.dy,f+p-e.y0))+e.x0;i(Math.floor(d),Math.ceil(h),f)}}function ot(t,e,n,r,i,o){var a,s=rt(t,e),u=rt(e,n),l=rt(n,t);s.dy>u.dy&&(a=s,s=u,u=a),s.dy>l.dy&&(a=s,s=l,l=a),u.dy>l.dy&&(a=u,u=l,l=a),s.dy&&it(l,s,r,i,o),u.dy&&it(l,u,r,i,o)}function at(t){return t*(2-t)}function st(t){t.parentNode&&t.parentNode.removeChild(t)}function ut(t,e,n){if(t=new Ht(t.lng,t.lat),e){var r=new Ht(t.lng-360,t.lat),i=new Ht(t.lng+360,t.lat),o=n.locationPoint(t).distSqr(e);n.locationPoint(r).distSqr(e)<o?t=r:n.locationPoint(i).distSqr(e)<o&&(t=i)}for(;Math.abs(t.lng-n.center.lng)>180;){var a=n.locationPoint(t);if(a.x>=0&&a.y>=0&&a.x<=n.width&&a.y<=n.height)break;t.lng>n.center.lng?t.lng-=360:t.lng+=360}return t}function lt(t,e,n){var r=t.classList;for(var i in _r)r.remove("mapboxgl-"+n+"-anchor-"+i);r.add("mapboxgl-"+n+"-anchor-"+e)}function ct(t,e,n){var r,i,o,a,s,u,l=n&&n.maxWidth||100,c=t._container.clientHeight/2,p=(r=t.unproject([0,c]),i=t.unproject([l,c]),o=Math.PI/180,a=r.lat*o,s=i.lat*o,u=Math.sin(a)*Math.sin(s)+Math.cos(a)*Math.cos(s)*Math.cos((i.lng-r.lng)*o),6371e3*Math.acos(Math.min(u,1)));if(n&&"imperial"===n.unit){var f=3.2808*p;f>5280?pt(e,l,f/5280,"mi"):pt(e,l,f,"ft")}else n&&"nautical"===n.unit?pt(e,l,p/1852,"nm"):pt(e,l,p,"m")}function pt(t,e,n,r){var i,o,a,s=(i=n,(o=Math.pow(10,(""+Math.floor(i)).length-1))*(a=(a=i/o)>=10?10:a>=5?5:a>=3?3:a>=2?2:1)),u=s/n;"m"===r&&s>=1e3&&(s/=1e3,r="km"),t.style.width=e*u+"px",t.innerHTML=s+r}var ft=t.createCommonjsModule(function(t){function e(t){return!!("undefined"!=typeof window&&"undefined"!=typeof document&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&"JSON"in window&&"parse"in JSON&&"stringify"in JSON&&function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e,n=new Blob([""],{type:"text/javascript"}),r=URL.createObjectURL(n);try{e=new Worker(r),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(r),t}()&&"Uint8ClampedArray"in window&&function(t){return void 0===n[t]&&(n[t]=function(t){var n=document.createElement("canvas"),r=Object.create(e.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=t,n.probablySupportsContext?n.probablySupportsContext("webgl",r)||n.probablySupportsContext("experimental-webgl",r):n.supportsContext?n.supportsContext("webgl",r)||n.supportsContext("experimental-webgl",r):n.getContext("webgl",r)||n.getContext("experimental-webgl",r)}(t)),n[t]}(t&&t.failIfMajorPerformanceCaveat))}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e);var n={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),ht=t.default.performance&&t.default.performance.now?t.default.performance.now.bind(t.default.performance):Date.now.bind(Date),dt=t.default.requestAnimationFrame||t.default.mozRequestAnimationFrame||t.default.webkitRequestAnimationFrame||t.default.msRequestAnimationFrame,mt=t.default.cancelAnimationFrame||t.default.mozCancelAnimationFrame||t.default.webkitCancelAnimationFrame||t.default.msCancelAnimationFrame,yt={now:ht,frame:function(t){return dt(t)},cancelFrame:function(t){return mt(t)},getImageData:function(e){var n=t.default.document.createElement("canvas"),r=n.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return n.width=e.width,n.height=e.height,r.drawImage(e,0,0,e.width,e.height),r.getImageData(0,0,e.width,e.height)},hardwareConcurrency:t.default.navigator.hardwareConcurrency||4,get devicePixelRatio(){return t.default.devicePixelRatio},supportsWebp:!1};if(t.default.document){var vt=t.default.document.createElement("img");vt.onload=function(){yt.supportsWebp=!0},vt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="}var gt,_t={create:function(e,n,r){var i=t.default.document.createElement(e);return n&&(i.className=n),r&&r.appendChild(i),i},createNS:function(e,n){return t.default.document.createElementNS(e,n)}},bt=t.default.document?t.default.document.documentElement.style:null,xt=e(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);_t.disableDrag=function(){bt&&xt&&(gt=bt[xt],bt[xt]="none")},_t.enableDrag=function(){bt&&xt&&(bt[xt]=gt)};var wt=e(["transform","WebkitTransform"]);_t.setTransform=function(t,e){t.style[wt]=e};var Et=!1;try{var St=Object.defineProperty({},"passive",{get:function(){Et=!0}});t.default.addEventListener("test",St,St),t.default.removeEventListener("test",St,St)}catch(t){Et=!1}_t.addEventListener=function(t,e,n,r){void 0===r&&(r={}),"passive"in r&&Et?t.addEventListener(e,n,r):t.addEventListener(e,n,r.capture)},_t.removeEventListener=function(t,e,n,r){void 0===r&&(r={}),"passive"in r&&Et?t.removeEventListener(e,n,r):t.removeEventListener(e,n,r.capture)};var Tt=function(e){e.preventDefault(),e.stopPropagation(),t.default.removeEventListener("click",Tt,!0)};_t.suppressClick=function(){t.default.addEventListener("click",Tt,!0),t.default.setTimeout(function(){t.default.removeEventListener("click",Tt,!0)},0)},_t.mousePos=function(e,n){var r=e.getBoundingClientRect();return n=n.touches?n.touches[0]:n,new t.default$1(n.clientX-r.left-e.clientLeft,n.clientY-r.top-e.clientTop)},_t.touchPos=function(e,n){for(var r=e.getBoundingClientRect(),i=[],o="touchend"===n.type?n.changedTouches:n.touches,a=0;a<o.length;a++)i.push(new t.default$1(o[a].clientX-r.left-e.clientLeft,o[a].clientY-r.top-e.clientTop));return i},_t.mouseButton=function(e){return void 0!==t.default.InstallTrigger&&2===e.button&&e.ctrlKey&&t.default.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:e.button},_t.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var Ct={API_URL:"https://api.mapbox.com",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null},At="See https://www.mapbox.com/api-documentation/#access-tokens",Ot=function(t,e){if(!r(t))return t;var o=i(t);return o.path="/fonts/v1"+o.path,n(o,e)},kt=function(t,e){if(!r(t))return t;var o=i(t);return o.path="/v4/"+o.authority+".json",o.params.push("secure"),n(o,e)},It=function(t,e,a,s){var u=i(t);return r(t)?(u.path="/styles/v1"+u.path+"/sprite"+e+a,n(u,s)):(u.path+=""+e+a,o(u))},Pt=/(\.(png|jpg)\d*)(?=$)/,zt=function(t,e,n){if(!e||!r(e))return t;var a=i(t),s=yt.devicePixelRatio>=2||512===n?"@2x":"",u=yt.supportsWebp?".webp":"$1";return a.path=a.path.replace(Pt,""+s+u),function(t){for(var e=0;e<t.length;e++)0===t[e].indexOf("access_token=tk.")&&(t[e]="access_token="+(Ct.ACCESS_TOKEN||""))}(a.params),o(a)},Rt=/^(\w+):\/\/([^\/?]*)(\/[^?]+)?\??(.+)?/,Mt=t.default.HTMLImageElement,jt=t.default.HTMLCanvasElement,Dt=t.default.HTMLVideoElement,Lt=t.default.ImageData,Ft=function(t,e,n,r){this.context=t,this.format=n,this.texture=t.gl.createTexture(),this.update(e,r)};Ft.prototype.update=function(t,e){var n=t.width,r=t.height,i=!this.size||this.size[0]!==n||this.size[1]!==r,o=this.context,a=o.gl;this.useMipmap=Boolean(e&&e.useMipmap),a.bindTexture(a.TEXTURE_2D,this.texture),i?(this.size=[n,r],o.pixelStoreUnpack.set(1),this.format!==a.RGBA||e&&!1===e.premultiply||o.pixelStoreUnpackPremultiplyAlpha.set(!0),t instanceof Mt||t instanceof jt||t instanceof Dt||t instanceof Lt?a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,a.UNSIGNED_BYTE,t):a.texImage2D(a.TEXTURE_2D,0,this.format,n,r,0,this.format,a.UNSIGNED_BYTE,t.data)):t instanceof Mt||t instanceof jt||t instanceof Dt||t instanceof Lt?a.texSubImage2D(a.TEXTURE_2D,0,0,0,a.RGBA,a.UNSIGNED_BYTE,t):a.texSubImage2D(a.TEXTURE_2D,0,0,0,n,r,a.RGBA,a.UNSIGNED_BYTE,t.data),this.useMipmap&&this.isSizePowerOfTwo()&&a.generateMipmap(a.TEXTURE_2D)},Ft.prototype.bind=function(t,e,n){var r=this.context.gl;r.bindTexture(r.TEXTURE_2D,this.texture),n!==r.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(n=r.LINEAR),t!==this.filter&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,n||t),this.filter=t),e!==this.wrap&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,e),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,e),this.wrap=e)},Ft.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},Ft.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var Bt=function(){this.images={},this.loaded=!1,this.requestors=[],this.shelfPack=new t.default$2(64,64,{autoResize:!0}),this.patterns={},this.atlasImage=new t.RGBAImage({width:64,height:64}),this.dirty=!0};Bt.prototype.isLoaded=function(){return this.loaded},Bt.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,n=this.requestors;e<n.length;e+=1){var r=n[e],i=r.ids,o=r.callback;this._notify(i,o)}this.requestors=[]}},Bt.prototype.getImage=function(t){return this.images[t]},Bt.prototype.addImage=function(t,e){this.images[t]=e},Bt.prototype.removeImage=function(t){delete this.images[t];var e=this.patterns[t];e&&(this.shelfPack.unref(e.bin),delete this.patterns[t])},Bt.prototype.getImages=function(t,e){var n=!0;if(!this.isLoaded())for(var r=0,i=t;r<i.length;r+=1){var o=i[r];this.images[o]||(n=!1)}this.isLoaded()||n?this._notify(t,e):this.requestors.push({ids:t,callback:e})},Bt.prototype._notify=function(t,e){for(var n={},r=0,i=t;r<i.length;r+=1){var o=i[r],a=this.images[o];a&&(n[o]={data:a.data.clone(),pixelRatio:a.pixelRatio,sdf:a.sdf})}e(null,n)},Bt.prototype.getPixelSize=function(){return{width:this.shelfPack.w,height:this.shelfPack.h}},Bt.prototype.getPattern=function(e){var n=this.patterns[e];if(n)return n.position;var r=this.getImage(e);if(!r)return null;var i=r.data.width+2,o=r.data.height+2,a=this.shelfPack.packOne(i,o);if(!a)return null;this.atlasImage.resize(this.getPixelSize());var s=r.data,u=this.atlasImage,l=a.x+1,c=a.y+1,p=s.width,f=s.height;t.RGBAImage.copy(s,u,{x:0,y:0},{x:l,y:c},{width:p,height:f}),t.RGBAImage.copy(s,u,{x:0,y:f-1},{x:l,y:c-1},{width:p,height:1}),t.RGBAImage.copy(s,u,{x:0,y:0},{x:l,y:c+f},{width:p,height:1}),t.RGBAImage.copy(s,u,{x:p-1,y:0},{x:l-1,y:c},{width:1,height:f}),t.RGBAImage.copy(s,u,{x:0,y:0},{x:l+p,y:c},{width:1,height:f}),this.dirty=!0;var h=new t.ImagePosition(a,r);return this.patterns[e]={bin:a,position:h},h},Bt.prototype.bind=function(t){var e=t.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new Ft(t,this.atlasImage,e.RGBA),this.atlasTexture.bind(e.LINEAR,e.CLAMP_TO_EDGE)};var Nt=a,Vt=1e20;a.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),n=new Uint8ClampedArray(this.size*this.size),r=0;r<this.size*this.size;r++){var i=e.data[4*r+3]/255;this.gridOuter[r]=1===i?0:0===i?Vt:Math.pow(Math.max(0,.5-i),2),this.gridInner[r]=1===i?Vt:0===i?0:Math.pow(Math.max(0,i-.5),2)}for(s(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),s(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),r=0;r<this.size*this.size;r++){var o=this.gridOuter[r]-this.gridInner[r];n[r]=Math.max(0,Math.min(255,Math.round(255-255*(o/this.radius+this.cutoff))))}return n};var Ut=function(t,e){this.requestTransform=t,this.localIdeographFontFamily=e,this.entries={}};Ut.prototype.setURL=function(t){this.url=t},Ut.prototype.getGlyphs=function(e,n){var r=this,i=[];for(var o in e)for(var a=0,s=e[o];a<s.length;a+=1){var u=s[a];i.push({stack:o,id:u})}t.asyncAll(i,function(t,e){var n=t.stack,i=t.id,o=r.entries[n];o||(o=r.entries[n]={glyphs:{},requests:{}});var a=o.glyphs[i];if(void 0===a)if(a=r._tinySDF(o,n,i))e(null,{stack:n,id:i,glyph:a});else{var s=Math.floor(i/256);if(256*s>65535)e(new Error("glyphs > 65535 not supported"));else{var u=o.requests[s];u||(u=o.requests[s]=[],Ut.loadGlyphRange(n,s,r.url,r.requestTransform,function(t,e){if(e)for(var n in e)o.glyphs[+n]=e[+n];for(var r=0,i=u;r<i.length;r+=1)(0,i[r])(t,e);delete o.requests[s]})),u.push(function(t,r){t?e(t):r&&e(null,{stack:n,id:i,glyph:r[i]||null})})}}else e(null,{stack:n,id:i,glyph:a})},function(t,e){if(t)n(t);else if(e){for(var r={},i=0,o=e;i<o.length;i+=1){var a=o[i],s=a.stack,u=a.id,l=a.glyph;(r[s]||(r[s]={}))[u]=l&&{id:l.id,bitmap:l.bitmap.clone(),metrics:l.metrics}}n(null,r)}})},Ut.prototype._tinySDF=function(e,n,r){var i=this.localIdeographFontFamily;if(i&&(t.default$4["CJK Unified Ideographs"](r)||t.default$4["Hangul Syllables"](r))){var o=e.tinySDF;if(!o){var a="400";/bold/i.test(n)?a="900":/medium/i.test(n)?a="500":/light/i.test(n)&&(a="200"),o=e.tinySDF=new Ut.TinySDF(24,3,8,.25,i,a)}return{id:r,bitmap:new t.AlphaImage({width:30,height:30},o.draw(String.fromCharCode(r))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},Ut.loadGlyphRange=function(e,n,r,i,o){var a=256*n,s=a+255,u=i(Ot(r).replace("{fontstack}",e).replace("{range}",a+"-"+s),t.ResourceType.Glyphs);t.getArrayBuffer(u,function(e,n){if(e)o(e);else if(n){for(var r={},i=0,a=t.default$3(n.data);i<a.length;i+=1){var s=a[i];r[s.id]=s}o(null,r)}})},Ut.TinySDF=Nt;var qt=function(){this.specification=t.default$5.light.position};qt.prototype.possiblyEvaluate=function(e,n){return t.sphericalToCartesian(e.expression.evaluate(n))},qt.prototype.interpolate=function(e,n,r){return{x:t.number(e.x,n.x,r),y:t.number(e.y,n.y,r),z:t.number(e.z,n.z,r)}};var Wt=new t.Properties({anchor:new t.DataConstantProperty(t.default$5.light.anchor),position:new qt,color:new t.DataConstantProperty(t.default$5.light.color),intensity:new t.DataConstantProperty(t.default$5.light.intensity)}),$t=function(e){function n(n){e.call(this),this._transitionable=new t.Transitionable(Wt),this.setLight(n),this._transitioning=this._transitionable.untransitioned()}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.getLight=function(){return this._transitionable.serialize()},n.prototype.setLight=function(e){if(!this._validate(t.validateLight,e))for(var n in e){var r=e[n];t.endsWith(n,"-transition")?this._transitionable.setTransition(n.slice(0,-"-transition".length),r):this._transitionable.setValue(n,r)}},n.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},n.prototype.hasTransition=function(){return this._transitioning.hasTransition()},n.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},n.prototype._validate=function(e,n){return t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:n,style:{glyphs:!0,sprite:!0},styleSpec:t.default$5})))},n}(t.Evented),Zt=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};Zt.prototype.getDash=function(t,e){var n=t.join(",")+String(e);return this.positions[n]||(this.positions[n]=this.addDash(t,e)),this.positions[n]},Zt.prototype.addDash=function(e,n){var r=n?7:0,i=2*r+1;if(this.nextRow+i>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a<e.length;a++)o+=e[a];for(var s=this.width/o,u=s/2,l=e.length%2==1,c=-r;c<=r;c++)for(var p=this.nextRow+r+c,f=this.width*p,h=l?-e[e.length-1]:0,d=e[0],m=1,y=0;y<this.width;y++){for(;d<y/s;)h=d,d+=e[m],l&&m===e.length-1&&(d+=e[0]),m++;var v=Math.abs(y-h*s),g=Math.abs(y-d*s),_=Math.min(v,g),b=m%2==1,x=void 0;if(n){var w=r?c/r*(u+1):0;if(b){var E=u-Math.abs(w);x=Math.sqrt(_*_+E*E)}else x=u-Math.sqrt(_*_+w*w)}else x=(b?1:-1)*_;this.data[3+4*(f+y)]=Math.max(0,Math.min(255,x+128))}var S={y:(this.nextRow+r+.5)/this.height,height:2*r/this.height,width:o};return this.nextRow+=i,this.dirty=!0,S},Zt.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.RGBA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,this.data))};var Gt=function e(n,r){this.workerPool=n,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var i=this.workerPool.acquire(this.id),o=0;o<i.length;o++){var a=i[o],s=new e.Actor(a,r,this.id);s.name="Worker "+o,this.actors.push(s)}};Gt.prototype.broadcast=function(e,n,r){r=r||function(){},t.asyncAll(this.actors,function(t,r){t.send(e,n,r)},r)},Gt.prototype.send=function(t,e,n,r){return("number"!=typeof r||isNaN(r))&&(r=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[r].send(t,e,n),r},Gt.prototype.remove=function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)},Gt.Actor=t.default$7;var Ht=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Ht.prototype.wrap=function(){return new Ht(t.wrap(this.lng,-180,180),this.lat)},Ht.prototype.toArray=function(){return[this.lng,this.lat]},Ht.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ht.prototype.toBounds=function(t){var e=360*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return new Kt(new Ht(this.lng-n,this.lat-e),new Ht(this.lng+n,this.lat+e))},Ht.convert=function(t){if(t instanceof Ht)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Ht(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Ht(Number(t.lng),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var Kt=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};Kt.prototype.setNorthEast=function(t){return this._ne=t instanceof Ht?new Ht(t.lng,t.lat):Ht.convert(t),this},Kt.prototype.setSouthWest=function(t){return this._sw=t instanceof Ht?new Ht(t.lng,t.lat):Ht.convert(t),this},Kt.prototype.extend=function(t){var e,n,r=this._sw,i=this._ne;if(t instanceof Ht)e=t,n=t;else{if(!(t instanceof Kt))return Array.isArray(t)?t.every(Array.isArray)?this.extend(Kt.convert(t)):this.extend(Ht.convert(t)):this;if(e=t._sw,n=t._ne,!e||!n)return this}return r||i?(r.lng=Math.min(e.lng,r.lng),r.lat=Math.min(e.lat,r.lat),i.lng=Math.max(n.lng,i.lng),i.lat=Math.max(n.lat,i.lat)):(this._sw=new Ht(e.lng,e.lat),this._ne=new Ht(n.lng,n.lat)),this},Kt.prototype.getCenter=function(){return new Ht((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Kt.prototype.getSouthWest=function(){return this._sw},Kt.prototype.getNorthEast=function(){return this._ne},Kt.prototype.getNorthWest=function(){return new Ht(this.getWest(),this.getNorth())},Kt.prototype.getSouthEast=function(){return new Ht(this.getEast(),this.getSouth())},Kt.prototype.getWest=function(){return this._sw.lng},Kt.prototype.getSouth=function(){return this._sw.lat},Kt.prototype.getEast=function(){return this._ne.lng},Kt.prototype.getNorth=function(){return this._ne.lat},Kt.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Kt.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Kt.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Kt.convert=function(t){return!t||t instanceof Kt?t:new Kt(t)};var Xt=function(t,e,n){this.bounds=Kt.convert(this.validateBounds(t)),this.minzoom=e||0,this.maxzoom=n||24};Xt.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},Xt.prototype.contains=function(t){var e=Math.floor(this.lngX(this.bounds.getWest(),t.z)),n=Math.floor(this.latY(this.bounds.getNorth(),t.z)),r=Math.ceil(this.lngX(this.bounds.getEast(),t.z)),i=Math.ceil(this.latY(this.bounds.getSouth(),t.z));return t.x>=e&&t.x<r&&t.y>=n&&t.y<i},Xt.prototype.lngX=function(t,e){return(t+180)*(Math.pow(2,e)/360)},Xt.prototype.latY=function(e,n){var r=t.clamp(Math.sin(Math.PI/180*e),-.9999,.9999),i=Math.pow(2,n)/(2*Math.PI);return Math.pow(2,n-1)+.5*Math.log((1+r)/(1-r))*-i};var Yt=function(e){function n(n,r,i,o){if(e.call(this),this.id=n,this.dispatcher=i,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,t.extend(this,t.pick(r,["url","scheme","tileSize"])),this._options=t.extend({type:"vector"},r),this._collectResourceTiming=r.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(o)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),l(this._options,this.map._transformRequest,function(n,r){n?e.fire(new t.ErrorEvent(n)):r&&(t.extend(e,r),r.bounds&&(e.tileBounds=new Xt(r.bounds,e.minzoom,e.maxzoom)),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},n.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.serialize=function(){return t.extend({},this._options)},n.prototype.loadTile=function(e,n){function r(t,r){return e.aborted?n(null):t?n(t):(r&&r.resourceTiming&&(e.resourceTiming=r.resourceTiming),this.map._refreshExpiredTiles&&e.setExpiryData(r),e.loadVectorData(r,this.map.painter),n(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}var i=zt(e.tileID.canonical.url(this.tiles,this.scheme),this.url),o={request:this.map._transformRequest(i,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:yt.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};o.request.collectResourceTiming=this._collectResourceTiming,void 0===e.workerID||"expired"===e.state?e.workerID=this.dispatcher.send("loadTile",o,r.bind(this)):"loading"===e.state?e.reloadCallback=n:this.dispatcher.send("reloadTile",o,r.bind(this),e.workerID)},n.prototype.abortTile=function(t){this.dispatcher.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},n.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},n.prototype.hasTransition=function(){return!1},n}(t.Evented),Jt=function(e){function n(n,r,i,o){e.call(this),this.id=n,this.dispatcher=i,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.extend({},r),t.extend(this,t.pick(r,["url","scheme","tileSize"]))}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),l(this._options,this.map._transformRequest,function(n,r){n?e.fire(new t.ErrorEvent(n)):r&&(t.extend(e,r),r.bounds&&(e.tileBounds=new Xt(r.bounds,e.minzoom,e.maxzoom)),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.serialize=function(){return t.extend({},this._options)},n.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},n.prototype.loadTile=function(e,n){var r=this,i=zt(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(i,t.ResourceType.Tile),function(t,i){if(delete e.request,e.aborted)e.state="unloaded",n(null);else if(t)e.state="errored",n(t);else if(i){r.map._refreshExpiredTiles&&e.setExpiryData(i),delete i.cacheControl,delete i.expires;var o=r.map.painter.context,a=o.gl;e.texture=r.map.painter.getTileTexture(i.width),e.texture?e.texture.update(i,{useMipmap:!0}):(e.texture=new Ft(o,i,a.RGBA,{useMipmap:!0}),e.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE,a.LINEAR_MIPMAP_NEAREST),o.extTextureFilterAnisotropic&&a.texParameterf(a.TEXTURE_2D,o.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,o.extTextureFilterAnisotropicMax)),e.state="loaded",n(null)}})},n.prototype.abortTile=function(t,e){t.request&&(t.request.abort(),delete t.request),e()},n.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},n.prototype.hasTransition=function(){return!1},n}(t.Evented),Qt=function(e){function n(n,r,i,o){e.call(this,n,r,i,o),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({},r),this.encoding=r.encoding||"mapbox"}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},n.prototype.loadTile=function(e,n){var r=zt(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(r,t.ResourceType.Tile),function(t,r){if(delete e.request,e.aborted)e.state="unloaded",n(null);else if(t)e.state="errored",n(t);else if(r){this.map._refreshExpiredTiles&&e.setExpiryData(r),delete r.cacheControl,delete r.expires;var i=yt.getImageData(r),o={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:i,encoding:this.encoding};e.workerID&&"expired"!==e.state||(e.workerID=this.dispatcher.send("loadDEMTile",o,function(t,r){t&&(e.state="errored",n(t)),r&&(e.dem=r,e.needsHillshadePrepare=!0,e.state="loaded",n(null))}.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},n.prototype._getNeighboringTiles=function(e){var n=e.canonical,r=Math.pow(2,n.z),i=(n.x-1+r)%r,o=0===n.x?e.wrap-1:e.wrap,a=(n.x+1+r)%r,s=n.x+1===r?e.wrap+1:e.wrap,u={};return u[new t.OverscaledTileID(e.overscaledZ,o,n.z,i,n.y).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y).key]={backfilled:!1},n.y>0&&(u[new t.OverscaledTileID(e.overscaledZ,o,n.z,i,n.y-1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,e.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y-1).key]={backfilled:!1}),n.y+1<r&&(u[new t.OverscaledTileID(e.overscaledZ,o,n.z,i,n.y+1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,e.wrap,n.z,n.x,n.y+1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y+1).key]={backfilled:!1}),u},n.prototype.unloadTile=function(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state="unloaded",this.dispatcher.send("removeDEMTile",{uid:t.uid,source:this.id},void 0,t.workerID)},n}(Jt),te=function(e){function n(n,r,i,o){e.call(this),this.id=n,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this.dispatcher=i,this.setEventedParent(o),this._data=r.data,this._options=t.extend({},r),this._collectResourceTiming=r.collectResourceTiming,this._resourceTiming=[],void 0!==r.maxzoom&&(this.maxzoom=r.maxzoom),r.type&&(this.type=r.type);var a=t.default$8/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:r.cluster||!1,geojsonVtOptions:{buffer:(void 0!==r.buffer?r.buffer:128)*a,tolerance:(void 0!==r.tolerance?r.tolerance:.375)*a,extent:t.default$8,maxZoom:this.maxzoom,lineMetrics:r.lineMetrics||!1},superclusterOptions:{maxZoom:void 0!==r.clusterMaxZoom?Math.min(r.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:t.default$8,radius:(r.clusterRadius||50)*a,log:!1}},r.workerOptions)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(n){if(n)e.fire(new t.ErrorEvent(n));else{var r={dataType:"source",sourceDataType:"metadata"};e._collectResourceTiming&&e._resourceTiming&&e._resourceTiming.length>0&&(r.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",r))}})},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.setData=function(e){var n=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(e){if(e)return n.fire(new t.ErrorEvent(e));var r={dataType:"source",sourceDataType:"content"};n._collectResourceTiming&&n._resourceTiming&&n._resourceTiming.length>0&&(r.resourceTiming=n._resourceTiming,n._resourceTiming=[]),n.fire(new t.Event("data",r))}),this},n.prototype._updateWorkerData=function(e){var n,r,i=this,o=t.extend({},this.workerOptions),a=this._data;"string"==typeof a?(o.request=this.map._transformRequest((n=a,(r=t.default.document.createElement("a")).href=n,r.href),t.ResourceType.Source),o.request.collectResourceTiming=this._collectResourceTiming):o.data=JSON.stringify(a),this.workerID=this.dispatcher.send(this.type+"."+o.source+".loadData",o,function(t,n){i._removed||n&&n.abandoned||(i._loaded=!0,n&&n.resourceTiming&&n.resourceTiming[i.id]&&(i._resourceTiming=n.resourceTiming[i.id].slice(0)),i.dispatcher.send(i.type+"."+o.source+".coalesce",null,null,i.workerID),e(t))},this.workerID)},n.prototype.loadTile=function(t,e){var n=this,r=void 0===t.workerID?"loadTile":"reloadTile",i={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:yt.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send(r,i,function(i,o){return t.unloadVectorData(),t.aborted?e(null):i?e(i):(t.loadVectorData(o,n.map.painter,"reloadTile"===r),e(null))},this.workerID)},n.prototype.abortTile=function(t){t.aborted=!0},n.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},null,t.workerID)},n.prototype.onRemove=function(){this._removed=!0,this.dispatcher.send("removeSource",{type:this.type,source:this.id},null,this.workerID)},n.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},n.prototype.hasTransition=function(){return!1},n}(t.Evented),ee=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),ne=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};ne.prototype.bind=function(t,e,n,r,i,o,a,s){this.context=t;for(var u=this.boundPaintVertexBuffers.length!==r.length,l=0;!u&&l<r.length;l++)this.boundPaintVertexBuffers[l]!==r[l]&&(u=!0);var c=!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==n||u||this.boundIndexBuffer!==i||this.boundVertexOffset!==o||this.boundDynamicVertexBuffer!==a||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||c?this.freshBind(e,n,r,i,o,a,s):(t.bindVertexArrayOES.set(this.vao),a&&a.bind(),i&&i.dynamicDraw&&i.bind(),s&&s.bind())},ne.prototype.freshBind=function(t,e,n,r,i,o,a){var s,u=t.numAttributes,l=this.context,c=l.gl;if(l.extVertexArrayObject)this.vao&&this.destroy(),this.vao=l.extVertexArrayObject.createVertexArrayOES(),l.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=n,this.boundIndexBuffer=r,this.boundVertexOffset=i,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=a;else{s=l.currentNumAttributes||0;for(var p=u;p<s;p++)c.disableVertexAttribArray(p)}e.enableAttributes(c,t);for(var f=0,h=n;f<h.length;f+=1)h[f].enableAttributes(c,t);o&&o.enableAttributes(c,t),a&&a.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,i);for(var d=0,m=n;d<m.length;d+=1){var y=m[d];y.bind(),y.setVertexAttribPointers(c,t,i)}o&&(o.bind(),o.setVertexAttribPointers(c,t,i)),r&&r.bind(),a&&(a.bind(),a.setVertexAttribPointers(c,t,i)),l.currentNumAttributes=u},ne.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var re=function(e){function n(t,n,r,i){e.call(this),this.id=t,this.dispatcher=r,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(i),this.options=n}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._transformRequest(this.url,t.ResourceType.Image),function(n,r){n?e.fire(new t.ErrorEvent(n)):r&&(e.image=yt.getImageData(r),e._finishLoading())})},n.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.setCoordinates=function(e){this.coordinates=e;var n=this.map,r=e.map(function(t){return n.transform.locationCoordinate(Ht.convert(t)).zoomTo(0)}),i=this.centerCoord=t.getCoordinatesCenter(r);i.column=Math.floor(i.column),i.row=Math.floor(i.row),this.tileID=new t.CanonicalTileID(i.zoom,i.column,i.row),this.minzoom=this.maxzoom=i.zoom;var o=r.map(function(e){var n=e.zoomTo(i.zoom);return new t.default$1(Math.round((n.column-i.column)*t.default$8),Math.round((n.row-i.row)*t.default$8))});return this._boundsArray=new t.RasterBoundsArray,this._boundsArray.emplaceBack(o[0].x,o[0].y,0,0),this._boundsArray.emplaceBack(o[1].x,o[1].y,t.default$8,0),this._boundsArray.emplaceBack(o[3].x,o[3].y,0,t.default$8),this._boundsArray.emplaceBack(o[2].x,o[2].y,t.default$8,t.default$8),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},n.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var t=this.map.painter.context,e=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,ee.members)),this.boundsVAO||(this.boundsVAO=new ne),this.texture||(this.texture=new Ft(t,this.image,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE)),this.tiles){var r=this.tiles[n];"loaded"!==r.state&&(r.state="loaded",r.texture=this.texture)}}},n.prototype.loadTile=function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state="errored",e(null))},n.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return!1},n}(t.Evented),ie=function(e){function n(t,n,r,i){e.call(this,t,n,r,i),this.roundZoom=!0,this.type="video",this.options=n}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(){var e=this,n=this.options;this.urls=[];for(var r=0,i=n.urls;r<i.length;r+=1){var o=i[r];e.urls.push(e.map._transformRequest(o,t.ResourceType.Source).url)}t.getVideo(this.urls,function(n,r){n?e.fire(new t.ErrorEvent(n)):r&&(e.video=r,e.video.loop=!0,e.video.addEventListener("playing",function(){e.map._rerender()}),e.map&&e.video.play(),e._finishLoading())})},n.prototype.getVideo=function(){return this.video},n.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},n.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t=this.map.painter.context,e=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,ee.members)),this.boundsVAO||(this.boundsVAO=new ne),this.texture?this.video.paused||(this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE),e.texSubImage2D(e.TEXTURE_2D,0,0,0,e.RGBA,e.UNSIGNED_BYTE,this.video)):(this.texture=new Ft(t,this.video,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE)),this.tiles){var r=this.tiles[n];"loaded"!==r.state&&(r.state="loaded",r.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this.video&&!this.video.paused},n}(re),oe=function(e){function n(n,r,i,o){e.call(this,n,r,i,o),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some(function(t){return!Array.isArray(t)||2!==t.length||t.some(function(t){return"number"!=typeof t})})||this.fire(new t.ErrorEvent(new t.default$9("sources."+n,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.default$9("sources."+n,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new t.ErrorEvent(new t.default$9("sources."+n,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof t.default.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.default$9("sources."+n,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.default$9("sources."+n,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(){this.canvas||(this.canvas=this.options.canvas instanceof t.default.HTMLCanvasElement?this.options.canvas:t.default.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map._rerender()},this.pause=function(){this._playing=!1},this._finishLoading())},n.prototype.getCanvas=function(){return this.canvas},n.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},n.prototype.onRemove=function(){this.pause()},n.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var e=this.map.painter.context,n=e.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,ee.members)),this.boundsVAO||(this.boundsVAO=new ne),this.texture?t?this.texture.update(this.canvas):this._playing&&(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.canvas)):(this.texture=new Ft(e,this.canvas,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[r];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this._playing},n.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t+=1){var n=e[t];if(isNaN(n)||n<=0)return!0}return!1},n}(re),ae={vector:Yt,raster:Jt,"raster-dem":Qt,geojson:te,video:ie,image:re,canvas:oe},se=function(e,n,r,i){var o=new ae[n.type](e,n,r,i);if(o.id!==e)throw new Error("Expected Source id to be "+e+" instead of "+o.id);return t.bindAll(["load","abort","unload","serialize","prepare"],o),o},ue=function(e,n){this.tileID=e,this.uid=t.uniqueId(),this.uses=0,this.tileSize=n,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.expiredRequestCount=0,this.state="loading"};ue.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<yt.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},ue.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},ue.prototype.loadVectorData=function(e,n,r){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){if(e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(t,e){var n={};if(!e)return n;for(var r=0,i=t;r<i.length;r+=1){var o=i[r],a=o.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==a.length){o.layers=a;for(var s=0,u=a;s<u.length;s+=1)n[u[s].id]=o}}return n}(e.buckets,n.style),r)for(var i in this.buckets){var o=this.buckets[i];o instanceof t.default$14&&(o.justReloaded=!0)}for(var a in this.queryPadding=0,this.buckets){var s=this.buckets[a];this.queryPadding=Math.max(this.queryPadding,n.style.getLayer(s.layerIds[0]).queryRadius(s))}e.iconAtlasImage&&(this.iconAtlasImage=e.iconAtlasImage),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new t.CollisionBoxArray},ue.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.iconAtlasTexture&&this.iconAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},ue.prototype.unloadDEMData=function(){this.dem=null,this.neighboringTiles=null,this.state="unloaded"},ue.prototype.getBucket=function(t){return this.buckets[t.id]},ue.prototype.upload=function(t){for(var e in this.buckets){var n=this.buckets[e];n.uploaded||(n.upload(t),n.uploaded=!0)}var r=t.gl;this.iconAtlasImage&&(this.iconAtlasTexture=new Ft(t,this.iconAtlasImage,r.RGBA),this.iconAtlasImage=null),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Ft(t,this.glyphAtlasImage,r.ALPHA),this.glyphAtlasImage=null)},ue.prototype.queryRenderedFeatures=function(t,e,n,r,i,o,a){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:e,scale:n,tileSize:this.tileSize,posMatrix:a,transform:i,params:r,queryPadding:this.queryPadding*o},t):{}},ue.prototype.querySourceFeatures=function(e,n){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData){var r=this.latestFeatureIndex.loadVTLayers(),i=n?n.sourceLayer:"",o=r._geojsonTileLayer||r[i];if(o)for(var a=t.default$13(n&&n.filter),s={z:this.tileID.overscaledZ,x:this.tileID.canonical.x,y:this.tileID.canonical.y},u=0;u<o.length;u++){var l=o.feature(u);if(a(new t.default$16(this.tileID.overscaledZ),l)){var c=new t.default$12(l,s.z,s.x,s.y);c.tile=s,e.push(c)}}}},ue.prototype.clearMask=function(){this.segments&&(this.segments.destroy(),delete this.segments),this.maskedBoundsBuffer&&(this.maskedBoundsBuffer.destroy(),delete this.maskedBoundsBuffer),this.maskedIndexBuffer&&(this.maskedIndexBuffer.destroy(),delete this.maskedIndexBuffer)},ue.prototype.setMask=function(e,n){if(!t.default$10(this.mask,e)&&(this.mask=e,this.clearMask(),!t.default$10(e,{0:!0}))){var r=new t.RasterBoundsArray,i=new t.TriangleIndexArray;this.segments=new t.default$15,this.segments.prepareSegment(0,r,i);for(var o=Object.keys(e),a=0;a<o.length;a++){var s=e[o[a]],u=t.default$8>>s.z,l=new t.default$1(s.x*u,s.y*u),c=new t.default$1(l.x+u,l.y+u),p=this.segments.prepareSegment(4,r,i);r.emplaceBack(l.x,l.y,l.x,l.y),r.emplaceBack(c.x,l.y,c.x,l.y),r.emplaceBack(l.x,c.y,l.x,c.y),r.emplaceBack(c.x,c.y,c.x,c.y);var f=p.vertexLength;i.emplaceBack(f,f+1,f+2),i.emplaceBack(f+1,f+2,f+3),p.vertexLength+=4,p.primitiveLength+=2}this.maskedBoundsBuffer=n.createVertexBuffer(r,ee.members),this.maskedIndexBuffer=n.createIndexBuffer(i)}},ue.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},ue.prototype.setExpiryData=function(e){var n=this.expirationTime;if(e.cacheControl){var r=t.parseCacheControl(e.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){var i=Date.now(),o=!1;if(this.expirationTime>i)o=!1;else if(n)if(this.expirationTime<n)o=!0;else{var a=this.expirationTime-n;a?this.expirationTime=i+Math.max(a,3e4):o=!0}else o=!0;o?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},ue.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)};var le=function(t,e){this.max=t,this.onRemove=e,this.reset()};le.prototype.reset=function(){for(var t in this.data)for(var e=0,n=this.data[t];e<n.length;e+=1){var r=n[e];r.timeout&&clearTimeout(r.timeout),this.onRemove(r.value)}return this.data={},this.order=[],this},le.prototype.add=function(t,e,n){var r=this,i=t.wrapped().key;void 0===this.data[i]&&(this.data[i]=[]);var o={value:e,timeout:void 0};if(void 0!==n&&(o.timeout=setTimeout(function(){r.remove(t,o)},n)),this.data[i].push(o),this.order.push(i),this.order.length>this.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},le.prototype.has=function(t){return t.wrapped().key in this.data},le.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},le.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},le.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},le.prototype.remove=function(t,e){if(!this.has(t))return this;var n=t.wrapped().key,r=void 0===e?0:this.data[n].indexOf(e),i=this.data[n][r];return this.data[n].splice(r,1),i.timeout&&clearTimeout(i.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(i.value),this.order.splice(this.order.indexOf(n),1),this},le.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this};var ce=function(t,e,n){this.context=t;var r=t.gl;this.buffer=r.createBuffer(),this.dynamicDraw=Boolean(n),this.unbindVAO(),t.bindElementBuffer.set(this.buffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};ce.prototype.unbindVAO=function(){this.context.extVertexArrayObject&&this.context.bindVertexArrayOES.set(null)},ce.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},ce.prototype.updateData=function(t){var e=this.context.gl;this.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},ce.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var pe={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},fe=function(t,e,n,r){this.length=e.length,this.attributes=n,this.itemSize=e.bytesPerElement,this.dynamicDraw=r,this.context=t;var i=t.gl;this.buffer=i.createBuffer(),t.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};fe.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},fe.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},fe.prototype.enableAttributes=function(t,e){for(var n=0;n<this.attributes.length;n++){var r=this.attributes[n],i=e.attributes[r.name];void 0!==i&&t.enableVertexAttribArray(i)}},fe.prototype.setVertexAttribPointers=function(t,e,n){for(var r=0;r<this.attributes.length;r++){var i=this.attributes[r],o=e.attributes[i.name];void 0!==o&&t.vertexAttribPointer(o,i.components,t[pe[i.type]],!1,this.itemSize,i.offset+this.itemSize*(n||0))}},fe.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var he=function(e){this.context=e,this.current=t.default$6.transparent};he.prototype.get=function(){return this.current},he.prototype.set=function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a||(this.context.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t)};var de=function(t){this.context=t,this.current=1};de.prototype.get=function(){return this.current},de.prototype.set=function(t){this.current!==t&&(this.context.gl.clearDepth(t),this.current=t)};var me=function(t){this.context=t,this.current=0};me.prototype.get=function(){return this.current},me.prototype.set=function(t){this.current!==t&&(this.context.gl.clearStencil(t),this.current=t)};var ye=function(t){this.context=t,this.current=[!0,!0,!0,!0]};ye.prototype.get=function(){return this.current},ye.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]||(this.context.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t)};var ve=function(t){this.context=t,this.current=!0};ve.prototype.get=function(){return this.current},ve.prototype.set=function(t){this.current!==t&&(this.context.gl.depthMask(t),this.current=t)};var ge=function(t){this.context=t,this.current=255};ge.prototype.get=function(){return this.current},ge.prototype.set=function(t){this.current!==t&&(this.context.gl.stencilMask(t),this.current=t)};var _e=function(t){this.context=t,this.current={func:t.gl.ALWAYS,ref:0,mask:255}};_e.prototype.get=function(){return this.current},_e.prototype.set=function(t){var e=this.current;t.func===e.func&&t.ref===e.ref&&t.mask===e.mask||(this.context.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t)};var be=function(t){this.context=t;var e=this.context.gl;this.current=[e.KEEP,e.KEEP,e.KEEP]};be.prototype.get=function(){return this.current},be.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]||(this.context.gl.stencilOp(t[0],t[1],t[2]),this.current=t)};var xe=function(t){this.context=t,this.current=!1};xe.prototype.get=function(){return this.current},xe.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t}};var we=function(t){this.context=t,this.current=[0,1]};we.prototype.get=function(){return this.current},we.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]||(this.context.gl.depthRange(t[0],t[1]),this.current=t)};var Ee=function(t){this.context=t,this.current=!1};Ee.prototype.get=function(){return this.current},Ee.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t}};var Se=function(t){this.context=t,this.current=t.gl.LESS};Se.prototype.get=function(){return this.current},Se.prototype.set=function(t){this.current!==t&&(this.context.gl.depthFunc(t),this.current=t)};var Te=function(t){this.context=t,this.current=!1};Te.prototype.get=function(){return this.current},Te.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t}};var Ce=function(t){this.context=t;var e=this.context.gl;this.current=[e.ONE,e.ZERO]};Ce.prototype.get=function(){return this.current},Ce.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]||(this.context.gl.blendFunc(t[0],t[1]),this.current=t)};var Ae=function(e){this.context=e,this.current=t.default$6.transparent};Ae.prototype.get=function(){return this.current},Ae.prototype.set=function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a||(this.context.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t)};var Oe=function(t){this.context=t,this.current=null};Oe.prototype.get=function(){return this.current},Oe.prototype.set=function(t){this.current!==t&&(this.context.gl.useProgram(t),this.current=t)};var ke=function(t){this.context=t,this.current=1};ke.prototype.get=function(){return this.current},ke.prototype.set=function(e){var n=this.context.lineWidthRange,r=t.clamp(e,n[0],n[1]);this.current!==r&&(this.context.gl.lineWidth(r),this.current=e)};var Ie=function(t){this.context=t,this.current=t.gl.TEXTURE0};Ie.prototype.get=function(){return this.current},Ie.prototype.set=function(t){this.current!==t&&(this.context.gl.activeTexture(t),this.current=t)};var Pe=function(t){this.context=t;var e=this.context.gl;this.current=[0,0,e.drawingBufferWidth,e.drawingBufferHeight]};Pe.prototype.get=function(){return this.current},Pe.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]||(this.context.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t)};var ze=function(t){this.context=t,this.current=null};ze.prototype.get=function(){return this.current},ze.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t}};var Re=function(t){this.context=t,this.current=null};Re.prototype.get=function(){return this.current},Re.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t}};var Me=function(t){this.context=t,this.current=null};Me.prototype.get=function(){return this.current},Me.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t}};var je=function(t){this.context=t,this.current=null};je.prototype.get=function(){return this.current},je.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t}};var De=function(t){this.context=t,this.current=null};De.prototype.get=function(){return this.current},De.prototype.set=function(t){var e=this.context.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t};var Le=function(t){this.context=t,this.current=null};Le.prototype.get=function(){return this.current},Le.prototype.set=function(t){this.current!==t&&this.context.extVertexArrayObject&&(this.context.extVertexArrayObject.bindVertexArrayOES(t),this.current=t)};var Fe=function(t){this.context=t,this.current=4};Fe.prototype.get=function(){return this.current},Fe.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t}};var Be=function(t){this.context=t,this.current=!1};Be.prototype.get=function(){return this.current},Be.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t}};var Ne=function(t,e){this.context=t,this.current=null,this.parent=e};Ne.prototype.get=function(){return this.current};var Ve=function(t){function e(e,n){t.call(this,e,n),this.dirty=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(this.dirty||this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e.prototype.setDirty=function(){this.dirty=!0},e}(Ne),Ue=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t}},e}(Ne),qe=function(t,e,n){this.context=t,this.width=e,this.height=n;var r=t.gl,i=this.framebuffer=r.createFramebuffer();this.colorAttachment=new Ve(t,i),this.depthAttachment=new Ue(t,i)};qe.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();e&&t.deleteTexture(e);var n=this.depthAttachment.get();n&&t.deleteRenderbuffer(n),t.deleteFramebuffer(this.framebuffer)};var We=function(t,e,n){this.func=t,this.mask=e,this.range=n};We.ReadOnly=!1,We.ReadWrite=!0,We.disabled=new We(519,We.ReadOnly,[0,1]);var $e=function(t,e,n,r,i,o){this.test=t,this.ref=e,this.mask=n,this.fail=r,this.depthFail=i,this.pass=o};$e.disabled=new $e({func:519,mask:0},0,0,7680,7680,7680);var Ze=function(t,e,n){this.blendFunction=t,this.blendColor=e,this.mask=n};Ze.Replace=[1,0],Ze.disabled=new Ze(Ze.Replace,t.default$6.transparent,[!1,!1,!1,!1]),Ze.unblended=new Ze(Ze.Replace,t.default$6.transparent,[!0,!0,!0,!0]),Ze.alphaBlended=new Ze([1,771],t.default$6.transparent,[!0,!0,!0,!0]);var Ge=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.lineWidthRange=t.getParameter(t.ALIASED_LINE_WIDTH_RANGE),this.clearColor=new he(this),this.clearDepth=new de(this),this.clearStencil=new me(this),this.colorMask=new ye(this),this.depthMask=new ve(this),this.stencilMask=new ge(this),this.stencilFunc=new _e(this),this.stencilOp=new be(this),this.stencilTest=new xe(this),this.depthRange=new we(this),this.depthTest=new Ee(this),this.depthFunc=new Se(this),this.blend=new Te(this),this.blendFunc=new Ce(this),this.blendColor=new Ae(this),this.program=new Oe(this),this.lineWidth=new ke(this),this.activeTexture=new Ie(this),this.viewport=new Pe(this),this.bindFramebuffer=new ze(this),this.bindRenderbuffer=new Re(this),this.bindTexture=new Me(this),this.bindVertexBuffer=new je(this),this.bindElementBuffer=new De(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Le(this),this.pixelStoreUnpack=new Fe(this),this.pixelStoreUnpackPremultiplyAlpha=new Be(this),this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&t.getExtension("OES_texture_half_float_linear")};Ge.prototype.createIndexBuffer=function(t,e){return new ce(this,t,e)},Ge.prototype.createVertexBuffer=function(t,e,n){return new fe(this,t,e,n)},Ge.prototype.createRenderbuffer=function(t,e,n){var r=this.gl,i=r.createRenderbuffer();return this.bindRenderbuffer.set(i),r.renderbufferStorage(r.RENDERBUFFER,t,e,n),this.bindRenderbuffer.set(null),i},Ge.prototype.createFramebuffer=function(t,e){return new qe(this,t,e)},Ge.prototype.clear=function(t){var e=t.color,n=t.depth,r=this.gl,i=0;e&&(i|=r.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==n&&(i|=r.DEPTH_BUFFER_BIT,this.clearDepth.set(n),this.depthMask.set(!0)),r.clear(i)},Ge.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)},Ge.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)},Ge.prototype.setColorMode=function(e){t.default$10(e.blendFunction,Ze.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)};var He=function(e){function n(t,n,r){var i=this;e.call(this),this.id=t,this.dispatcher=r,this.on("data",function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(i._sourceLoaded=!0),i._sourceLoaded&&!i._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(i.reload(),i.transform&&i.update(i.transform))}),this.on("error",function(){i._sourceErrored=!0}),this._source=se(t,n,r,this),this._tiles={},this._cache=new le(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._isIdRenderable=this._isIdRenderable.bind(this),this._coveredTiles={}}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},n.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},n.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var t in this._tiles){var e=this._tiles[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}return!0},n.prototype.getSource=function(){return this._source},n.prototype.pause=function(){this._paused=!0},n.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}},n.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},n.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,function(){})},n.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,function(){})},n.prototype.serialize=function(){return this._source.serialize()},n.prototype.prepare=function(t){for(var e in this._source.prepare&&this._source.prepare(),this._tiles)this._tiles[e].upload(t)},n.prototype.getIds=function(){var e=this;return Object.keys(this._tiles).map(Number).sort(function(n,r){var i=e._tiles[n].tileID,o=e._tiles[r].tileID,a=new t.default$1(i.canonical.x,i.canonical.y).rotate(e.transform.angle),s=new t.default$1(o.canonical.x,o.canonical.y).rotate(e.transform.angle);return i.overscaledZ-o.overscaledZ||s.y-a.y||s.x-a.x})},n.prototype.getRenderableIds=function(){return this.getIds().filter(this._isIdRenderable)},n.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0,{});return!!e&&this._isIdRenderable(e.tileID.key)},n.prototype._isIdRenderable=function(t){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]},n.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)this._reloadTile(t,"reloading")},n.prototype._reloadTile=function(t,e){var n=this._tiles[t];n&&("loading"!==n.state&&(n.state=e),this._loadTile(n,this._tileLoaded.bind(this,n,t,e)))},n.prototype._tileLoaded=function(e,n,r,i){if(i)return e.state="errored",void(404!==i.status?this._source.fire(new t.ErrorEvent(i,{tile:e})):this.update(this.transform));e.timeAdded=yt.now(),"expired"===r&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(n,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._source.fire(new t.Event("data",{dataType:"source",tile:e,coord:e.tileID})),this.map&&(this.map.painter.tileExtentVAO.vao=null)},n.prototype._backfillDEM=function(t){function e(t,e){t.needsHillshadePrepare=!0;var n=e.tileID.canonical.x-t.tileID.canonical.x,r=e.tileID.canonical.y-t.tileID.canonical.y,i=Math.pow(2,t.tileID.canonical.z),o=e.tileID.key;0===n&&0===r||Math.abs(r)>1||(Math.abs(n)>1&&(1===Math.abs(n+i)?n+=i:1===Math.abs(n-i)&&(n-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,n,r),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}for(var n=this.getRenderableIds(),r=0;r<n.length;r++){var i=n[r];if(t.neighboringTiles&&t.neighboringTiles[i]){var o=this.getTileByID(i);e(t,o),e(o,t)}}},n.prototype.getTile=function(t){return this.getTileByID(t.key)},n.prototype.getTileByID=function(t){return this._tiles[t]},n.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},n.prototype._findLoadedChildren=function(t,e,n){var r=!1;for(var i in this._tiles){var o=this._tiles[i];if(!(n[i]||!o.hasData()||o.tileID.overscaledZ<=t.overscaledZ||o.tileID.overscaledZ>e)){var a=Math.pow(2,o.tileID.canonical.z-t.canonical.z);if(Math.floor(o.tileID.canonical.x/a)===t.canonical.x&&Math.floor(o.tileID.canonical.y/a)===t.canonical.y)for(n[i]=o.tileID,r=!0;o&&o.tileID.overscaledZ-1>t.overscaledZ;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);if(!s)break;(o=this._tiles[s.key])&&o.hasData()&&(delete n[i],n[s.key]=s)}}}return r},n.prototype.findLoadedParent=function(t,e,n){for(var r=t.overscaledZ-1;r>=e;r--){var i=t.scaledTo(r);if(!i)return;var o=String(i.key),a=this._tiles[o];if(a&&a.hasData())return n[o]=i,a;if(this._cache.has(i))return n[o]=i,this._cache.get(i)}},n.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),n=Math.floor(5*e),r="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,n):n;this._cache.setMaxSize(r)},n.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,n=Math.round(e);if(this._prevLng=t,n){var r={};for(var i in this._tiles){var o=this._tiles[i];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+n),r[o.tileID.key]=o}for(var a in this._tiles=r,this._timers)clearTimeout(this._timers[a]),delete this._timers[a];for(var s in this._tiles){var u=this._tiles[s];this._setTileReloadTimer(s,u)}}},n.prototype.update=function(e){var r=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)}):(i=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter(function(t){return r._source.hasTile(t)}))):i=[];var o,a=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),s=Math.max(a-n.maxOverzooming,this._source.minzoom),u=Math.max(a+n.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a),c={};if(h(this._source.type))for(var p=Object.keys(l),f=0;f<p.length;f++){var d=p[f],m=l[d],y=r._tiles[d];if(y&&(void 0===y.fadeEndTime||y.fadeEndTime>=yt.now())){r._findLoadedChildren(m,u,l)&&(l[d]=m);var v=r.findLoadedParent(m,s,c);v&&r._addTile(v.tileID)}}for(o in c)l[o]||(r._coveredTiles[o]=!0);for(o in c)l[o]=c[o];for(var g=t.keysDifference(this._tiles,l),_=0;_<g.length;_++)r._removeTile(g[_])}},n.prototype._updateRetainedTiles=function(t,e){for(var r={},i={},o=Math.max(e-n.maxOverzooming,this._source.minzoom),a=Math.max(e+n.maxUnderzooming,this._source.minzoom),s=0;s<t.length;s++){var u=t[s],l=this._addTile(u),c=!1;if(l.hasData())r[u.key]=u;else{c=l.wasRequested(),r[u.key]=u;var p=!0;if(e+1>this._source.maxzoom){var f=u.children(this._source.maxzoom)[0],h=this.getTile(f);h&&h.hasData()?r[f.key]=f:p=!1}else{this._findLoadedChildren(u,a,r);for(var d=u.children(this._source.maxzoom),m=0;m<d.length;m++)if(!r[d[m].key]){p=!1;break}}if(!p)for(var y=u.overscaledZ-1;y>=o;--y){var v=u.scaledTo(y);if(i[v.key])break;if(i[v.key]=!0,!(l=this.getTile(v))&&c&&(l=this._addTile(v)),l&&(r[v.key]=v,c=l.wasRequested(),l.hasData()))break}}}return r},n.prototype._addTile=function(e){var n=this._tiles[e.key];if(n)return n;(n=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,n),n.tileID=e);var r=Boolean(n);return r||(n=new ue(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(n,this._tileLoaded.bind(this,n,e.key,n.state))),n?(n.uses++,this._tiles[e.key]=n,r||this._source.fire(new t.Event("dataloading",{tile:n,coord:n.tileID,dataType:"source"})),n):null},n.prototype._setTileReloadTimer=function(t,e){var n=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var r=e.getExpiryTimeout();r&&(this._timers[t]=setTimeout(function(){n._reloadTile(t,"expired"),delete n._timers[t]},r))},n.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},n.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},n.prototype.tilesIn=function(e,n){for(var r=[],i=this.getIds(),o=1/0,a=1/0,s=-1/0,u=-1/0,l=e[0].zoom,c=0;c<e.length;c++){var p=e[c];o=Math.min(o,p.column),a=Math.min(a,p.row),s=Math.max(s,p.column),u=Math.max(u,p.row)}for(var h=0;h<i.length;h++){var d=this._tiles[i[h]],m=d.tileID,y=Math.pow(2,this.transform.zoom-d.tileID.overscaledZ),v=n*d.queryPadding*t.default$8/d.tileSize/y,g=[f(m,new t.default$17(o,a,l)),f(m,new t.default$17(s,u,l))];if(g[0].x-v<t.default$8&&g[0].y-v<t.default$8&&g[1].x+v>=0&&g[1].y+v>=0){for(var _=[],b=0;b<e.length;b++)_.push(f(m,e[b]));r.push({tile:d,tileID:m,queryGeometry:[_],scale:y})}}return r},n.prototype.getVisibleCoordinates=function(){for(var t=this,e=this.getRenderableIds().map(function(e){return t._tiles[e].tileID}),n=0,r=e;n<r.length;n+=1){var i=r[n];i.posMatrix=t.transform.calculatePosMatrix(i.toUnwrapped())}return e},n.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(h(this._source.type))for(var t in this._tiles){var e=this._tiles[t];if(void 0!==e.fadeEndTime&&e.fadeEndTime>=yt.now())return!0}return!1},n}(t.Evented);He.maxOverzooming=10,He.maxUnderzooming=3;var Ke,Xe=function(){this.active={}};Xe.prototype.acquire=function(t){if(!this.workers){var e=kr.workerCount;for(this.workers=[];this.workers.length<e;)this.workers.push(new d)}return this.active[t]=!0,this.workers.slice()},Xe.prototype.release=function(t){delete this.active[t],0===Object.keys(this.active).length&&(this.workers.forEach(function(t){t.terminate()}),this.workers=null)};var Ye={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"},Je=function(t,e,n){var r=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/n),this.yCellCount=Math.ceil(e/n);for(var o=0;o<this.xCellCount*this.yCellCount;o++)r.push([]),i.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0};Je.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Je.prototype.insert=function(t,e,n,r,i){this._forEachCell(e,n,r,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)},Je.prototype.insertCircle=function(t,e,n,r){this._forEachCell(e-r,n-r,e+r,n+r,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(n),this.circles.push(r)},Je.prototype._insertBoxCell=function(t,e,n,r,i,o){this.boxCells[i].push(o)},Je.prototype._insertCircleCell=function(t,e,n,r,i,o){this.circleCells[i].push(o)},Je.prototype._query=function(t,e,n,r,i){if(n<0||t>this.width||r<0||e>this.height)return!i&&[];var o=[];if(t<=0&&e<=0&&this.width<=n&&this.height<=r){if(i)return!0;for(var a=0;a<this.boxKeys.length;a++)o.push({key:this.boxKeys[a],x1:this.bboxes[4*a],y1:this.bboxes[4*a+1],x2:this.bboxes[4*a+2],y2:this.bboxes[4*a+3]});for(var s=0;s<this.circleKeys.length;s++){var u=this.circles[3*s],l=this.circles[3*s+1],c=this.circles[3*s+2];o.push({key:this.circleKeys[s],x1:u-c,y1:l-c,x2:u+c,y2:l+c})}}else{var p={hitTest:i,seenUids:{box:{},circle:{}}};this._forEachCell(t,e,n,r,this._queryCell,o,p)}return i?o.length>0:o},Je.prototype._queryCircle=function(t,e,n,r){var i=t-n,o=t+n,a=e-n,s=e+n;if(o<0||i>this.width||s<0||a>this.height)return!r&&[];var u=[],l={hitTest:r,circle:{x:t,y:e,radius:n},seenUids:{box:{},circle:{}}};return this._forEachCell(i,a,o,s,this._queryCellCircle,u,l),r?u.length>0:u},Je.prototype.query=function(t,e,n,r){return this._query(t,e,n,r,!1)},Je.prototype.hitTest=function(t,e,n,r){return this._query(t,e,n,r,!0)},Je.prototype.hitTestCircle=function(t,e,n){return this._queryCircle(t,e,n,!0)},Je.prototype._queryCell=function(t,e,n,r,i,o,a){var s=a.seenUids,u=this.boxCells[i];if(null!==u)for(var l=this.bboxes,c=0,p=u;c<p.length;c+=1){var f=p[c];if(!s.box[f]){s.box[f]=!0;var h=4*f;if(t<=l[h+2]&&e<=l[h+3]&&n>=l[h+0]&&r>=l[h+1]){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[f],x1:l[h],y1:l[h+1],x2:l[h+2],y2:l[h+3]})}}}var d=this.circleCells[i];if(null!==d)for(var m=this.circles,y=0,v=d;y<v.length;y+=1){var g=v[y];if(!s.circle[g]){s.circle[g]=!0;var _=3*g;if(this._circleAndRectCollide(m[_],m[_+1],m[_+2],t,e,n,r)){if(a.hitTest)return o.push(!0),!0;var b=m[_],x=m[_+1],w=m[_+2];o.push({key:this.circleKeys[g],x1:b-w,y1:x-w,x2:b+w,y2:x+w})}}}},Je.prototype._queryCellCircle=function(t,e,n,r,i,o,a){var s=a.circle,u=a.seenUids,l=this.boxCells[i];if(null!==l)for(var c=this.bboxes,p=0,f=l;p<f.length;p+=1){var h=f[p];if(!u.box[h]){u.box[h]=!0;var d=4*h;if(this._circleAndRectCollide(s.x,s.y,s.radius,c[d+0],c[d+1],c[d+2],c[d+3]))return o.push(!0),!0}}var m=this.circleCells[i];if(null!==m)for(var y=this.circles,v=0,g=m;v<g.length;v+=1){var _=g[v];if(!u.circle[_]){u.circle[_]=!0;var b=3*_;if(this._circlesCollide(y[b],y[b+1],y[b+2],s.x,s.y,s.radius))return o.push(!0),!0}}},Je.prototype._forEachCell=function(t,e,n,r,i,o,a){for(var s=this._convertToXCellCoord(t),u=this._convertToYCellCoord(e),l=this._convertToXCellCoord(n),c=this._convertToYCellCoord(r),p=s;p<=l;p++)for(var f=u;f<=c;f++){var h=this.xCellCount*f+p;if(i.call(this,t,e,n,r,h,o,a))return}},Je.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},Je.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},Je.prototype._circlesCollide=function(t,e,n,r,i,o){var a=r-t,s=i-e,u=n+o;return u*u>a*a+s*s},Je.prototype._circleAndRectCollide=function(t,e,n,r,i,o,a){var s=(o-r)/2,u=Math.abs(t-(r+s));if(u>s+n)return!1;var l=(a-i)/2,c=Math.abs(e-(i+l));if(c>l+n)return!1;if(u<=s||c<=l)return!0;var p=u-s,f=c-l;return p*p+f*f<=n*n};var Qe=t.default$19.layout,tn=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);t.default$20.mat4;var en=function(t,e,n){void 0===e&&(e=new Je(t.width+200,t.height+200,25)),void 0===n&&(n=new Je(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=n,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+100,this.screenBottomBoundary=t.height+100};en.prototype.placeCollisionBox=function(t,e,n,r){var i=this.projectAndGetPerspectiveRatio(r,t.anchorPointX,t.anchorPointY),o=n*i.perspectiveRatio,a=t.x1*o+i.point.x,s=t.y1*o+i.point.y,u=t.x2*o+i.point.x,l=t.y2*o+i.point.y;return!e&&this.grid.hitTest(a,s,u,l)?{box:[],offscreen:!1}:{box:[a,s,u,l],offscreen:this.isOffscreen(a,s,u,l)}},en.prototype.approximateTileDistance=function(t,e,n,r,i){var o=i?1:r/this.pitchfactor,a=t.lastSegmentViewportDistance*n;return t.prevTileDistance+a+(o-1)*a*Math.abs(Math.sin(e))},en.prototype.placeCollisionCircles=function(e,n,r,i,o,a,s,u,l,c,p,f,h){var d=[],m=this.projectAnchor(c,a.anchorX,a.anchorY),y=l/24,v=a.lineOffsetX*l,g=a.lineOffsetY*l,_=new t.default$1(a.anchorX,a.anchorY),b=I(y,u,v,g,!1,A(_,p).point,_,a,s,p,{},!0),x=!1,w=!0,E=m.perspectiveRatio*i,S=1/(i*r),T=0,C=0;b&&(T=this.approximateTileDistance(b.first.tileDistance,b.first.angle,S,m.cameraDistance,h),C=this.approximateTileDistance(b.last.tileDistance,b.last.angle,S,m.cameraDistance,h));for(var O=0;O<e.length;O+=5){var k=e[O],P=e[O+1],z=e[O+2],R=e[O+3];if(!b||R<-T||R>C)L(e,O,!1);else{var M=this.projectPoint(c,k,P),j=z*E;if(d.length>0){var D=M.x-d[d.length-4],F=M.y-d[d.length-3];if(j*j*2>D*D+F*F&&O+8<e.length){var B=e[O+8];if(B>-T&&B<C){L(e,O,!1);continue}}}var N=O/5;if(d.push(M.x,M.y,j,N),L(e,O,!0),w=w&&this.isOffscreen(M.x-j,M.y-j,M.x+j,M.y+j),!n&&this.grid.hitTestCircle(M.x,M.y,j)){if(!f)return{circles:[],offscreen:!1};x=!0}}}return{circles:x?[]:d,offscreen:w}},en.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var n=[],r=1/0,i=1/0,o=-1/0,a=-1/0,s=0,u=e;s<u.length;s+=1){var l=u[s],c=new t.default$1(l.x+100,l.y+100);r=Math.min(r,c.x),i=Math.min(i,c.y),o=Math.max(o,c.x),a=Math.max(a,c.y),n.push(c)}for(var p={},f={},h=0,d=this.grid.query(r,i,o,a).concat(this.ignoredGrid.query(r,i,o,a));h<d.length;h+=1){var m=d[h],y=m.key;if(void 0===p[y.bucketInstanceId]&&(p[y.bucketInstanceId]={}),!p[y.bucketInstanceId][y.featureIndex]){var v=[new t.default$1(m.x1,m.y1),new t.default$1(m.x2,m.y1),new t.default$1(m.x2,m.y2),new t.default$1(m.x1,m.y2)];t.polygonIntersectsPolygon(n,v)&&(p[y.bucketInstanceId][y.featureIndex]=!0,void 0===f[y.bucketInstanceId]&&(f[y.bucketInstanceId]=[]),f[y.bucketInstanceId].push(y.featureIndex))}}return f},en.prototype.insertCollisionBox=function(t,e,n,r){var i={bucketInstanceId:n,featureIndex:r};(e?this.ignoredGrid:this.grid).insert(i,t[0],t[1],t[2],t[3])},en.prototype.insertCollisionCircles=function(t,e,n,r){for(var i=e?this.ignoredGrid:this.grid,o={bucketInstanceId:n,featureIndex:r},a=0;a<t.length;a+=4)i.insertCircle(o,t[a],t[a+1],t[a+2])},en.prototype.projectAnchor=function(t,e,n){var r=[e,n,0,1];return D(r,r,t),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/r[3]*.5,cameraDistance:r[3]}},en.prototype.projectPoint=function(e,n,r){var i=[n,r,0,1];return D(i,i,e),new t.default$1((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100)},en.prototype.projectAndGetPerspectiveRatio=function(e,n,r){var i=[n,r,0,1];return D(i,i,e),{point:new t.default$1((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/i[3]*.5}},en.prototype.isOffscreen=function(t,e,n,r){return n<100||t>=this.screenRightBoundary||r<100||e>this.screenBottomBoundary};var nn=t.default$19.layout,rn=function(t,e,n,r){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):r&&n?1:0,this.placed=n};rn.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var on=function(t,e,n,r,i){this.text=new rn(t?t.text:null,e,n,i),this.icon=new rn(t?t.icon:null,e,r,i)};on.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var an=function(t,e,n){this.text=t,this.icon=e,this.skipFade=n},sn=function(t,e){this.transform=t.clone(),this.collisionIndex=new en(this.transform),this.placements={},this.opacities={},this.stale=!1,this.fadeDuration=e,this.retainedQueryData={}};sn.prototype.placeLayerTile=function(e,n,r,i){var o=n.getBucket(e),a=n.latestFeatureIndex;if(o&&a&&e.id===o.layerIds[0]){var s=n.collisionBoxArray,u=o.layers[0].layout,l=Math.pow(2,this.transform.zoom-n.tileID.overscaledZ),c=n.tileSize/t.default$8,p=this.transform.calculatePosMatrix(n.tileID.toUnwrapped()),f=T(p,"map"===u.get("text-pitch-alignment"),"map"===u.get("text-rotation-alignment"),this.transform,F(n,1,this.transform.zoom)),h=T(p,"map"===u.get("icon-pitch-alignment"),"map"===u.get("icon-rotation-alignment"),this.transform,F(n,1,this.transform.zoom));this.retainedQueryData[o.bucketInstanceId]=new function(t,e,n,r,i){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=n,this.bucketIndex=r,this.tileID=i}(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,n.tileID),this.placeLayerBucket(o,p,f,h,l,c,r,i,s)}},sn.prototype.placeLayerBucket=function(e,n,r,i,o,a,s,u,l){for(var c=e.layers[0].layout,p=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom,nn.properties["text-size"]),f=!e.hasTextData()||c.get("text-optional"),h=!e.hasIconData()||c.get("icon-optional"),d=0,m=e.symbolInstances;d<m.length;d+=1){var y=m[d];if(!u[y.crossTileID]){var v=void 0!==y.feature.text,g=void 0!==y.feature.icon,_=!0,b=null,x=null,w=null,E=0,S=0;y.collisionArrays||(y.collisionArrays=e.deserializeCollisionBoxes(l,y.textBoxStartIndex,y.textBoxEndIndex,y.iconBoxStartIndex,y.iconBoxEndIndex)),y.collisionArrays.textFeatureIndex&&(E=y.collisionArrays.textFeatureIndex),y.collisionArrays.textBox&&(v=(b=this.collisionIndex.placeCollisionBox(y.collisionArrays.textBox,c.get("text-allow-overlap"),a,n)).box.length>0,_=_&&b.offscreen);var T=y.collisionArrays.textCircles;if(T){var C=e.text.placedSymbolArray.get(y.placedTextSymbolIndices[0]),A=t.evaluateSizeForFeature(e.textSizeData,p,C);x=this.collisionIndex.placeCollisionCircles(T,c.get("text-allow-overlap"),o,a,y.key,C,e.lineVertexArray,e.glyphOffsetArray,A,n,r,s,"map"===c.get("text-pitch-alignment")),v=c.get("text-allow-overlap")||x.circles.length>0,_=_&&x.offscreen}y.collisionArrays.iconFeatureIndex&&(S=y.collisionArrays.iconFeatureIndex),y.collisionArrays.iconBox&&(g=(w=this.collisionIndex.placeCollisionBox(y.collisionArrays.iconBox,c.get("icon-allow-overlap"),a,n)).box.length>0,_=_&&w.offscreen),f||h?h?f||(g=g&&v):v=g&&v:g=v=g&&v,v&&b&&this.collisionIndex.insertCollisionBox(b.box,c.get("text-ignore-placement"),e.bucketInstanceId,E),g&&w&&this.collisionIndex.insertCollisionBox(w.box,c.get("icon-ignore-placement"),e.bucketInstanceId,S),v&&x&&this.collisionIndex.insertCollisionCircles(x.circles,c.get("text-ignore-placement"),e.bucketInstanceId,E),this.placements[y.crossTileID]=new an(v,g,_||e.justReloaded),u[y.crossTileID]=!0}}e.justReloaded=!1},sn.prototype.commit=function(t,e){this.commitTime=e;var n=!1,r=t&&0!==this.fadeDuration?(this.commitTime-t.commitTime)/this.fadeDuration:1,i=t?t.opacities:{};for(var o in this.placements){var a=this.placements[o],s=i[o];s?(this.opacities[o]=new on(s,r,a.text,a.icon),n=n||a.text!==s.text.placed||a.icon!==s.icon.placed):(this.opacities[o]=new on(null,r,a.text,a.icon,a.skipFade),n=n||a.text||a.icon)}for(var u in i){var l=i[u];if(!this.opacities[u]){var c=new on(l,r,!1,!1);c.isHidden()||(this.opacities[u]=c,n=n||l.text.placed||l.icon.placed)}}n?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)},sn.prototype.updateLayerOpacities=function(t,e){for(var n={},r=0,i=e;r<i.length;r+=1){var o=i[r],a=o.getBucket(t);a&&o.latestFeatureIndex&&t.id===a.layerIds[0]&&this.updateBucketOpacities(a,n,o.collisionBoxArray)}},sn.prototype.updateBucketOpacities=function(t,e,n){t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexArray.clear(),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexArray.clear();for(var r=t.layers[0].layout,i=new on(null,0,!1,!1,!0),o=new on(null,0,r.get("text-allow-overlap"),r.get("icon-allow-overlap"),!0),a=0;a<t.symbolInstances.length;a++){var s=t.symbolInstances[a],u=e[s.crossTileID],l=this.opacities[s.crossTileID];u?l=i:l||(l=o,this.opacities[s.crossTileID]=l),e[s.crossTileID]=!0;var c=s.numGlyphVertices>0||s.numVerticalGlyphVertices>0,p=s.numIconVertices>0;if(c){for(var f=N(l.text),h=(s.numGlyphVertices+s.numVerticalGlyphVertices)/4,d=0;d<h;d++)t.text.opacityVertexArray.emplaceBack(f);for(var m=0,y=s.placedTextSymbolIndices;m<y.length;m+=1){var v=y[m];t.text.placedSymbolArray.get(v).hidden=l.text.isHidden()}}if(p){for(var g=N(l.icon),_=0;_<s.numIconVertices/4;_++)t.icon.opacityVertexArray.emplaceBack(g);t.icon.placedSymbolArray.get(a).hidden=l.icon.isHidden()}s.collisionArrays||(s.collisionArrays=t.deserializeCollisionBoxes(n,s.textBoxStartIndex,s.textBoxEndIndex,s.iconBoxStartIndex,s.iconBoxEndIndex));var b=s.collisionArrays;if(b){b.textBox&&t.hasCollisionBoxData()&&B(t.collisionBox.collisionVertexArray,l.text.placed,!1),b.iconBox&&t.hasCollisionBoxData()&&B(t.collisionBox.collisionVertexArray,l.icon.placed,!1);var x=b.textCircles;if(x&&t.hasCollisionCircleData())for(var w=0;w<x.length;w+=5){var E=u||0===x[w+4];B(t.collisionCircle.collisionVertexArray,l.text.placed,E)}}}t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexBuffer&&t.collisionBox.collisionVertexBuffer.updateData(t.collisionBox.collisionVertexArray),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexBuffer&&t.collisionCircle.collisionVertexBuffer.updateData(t.collisionCircle.collisionVertexArray)},sn.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration},sn.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},sn.prototype.stillRecent=function(t){return"undefined"!==this.commitTime&&this.commitTime+this.fadeDuration>t},sn.prototype.setStale=function(){this.stale=!0};var un=Math.pow(2,25),ln=Math.pow(2,24),cn=Math.pow(2,17),pn=Math.pow(2,16),fn=Math.pow(2,9),hn=Math.pow(2,8),dn=Math.pow(2,1),mn=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};mn.prototype.continuePlacement=function(t,e,n,r,i){for(;this._currentTileIndex<t.length;){var o=t[this._currentTileIndex];if(e.placeLayerTile(r,o,n,this._seenCrossTileIDs),this._currentTileIndex++,i())return!0}};var yn=function(t,e,n,r,i){this.placement=new sn(t,i),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=n,this._showCollisionBoxes=r,this._done=!1};yn.prototype.isDone=function(){return this._done},yn.prototype.continuePlacement=function(t,e,n){for(var r=this,i=yt.now(),o=function(){var t=yt.now()-i;return!r._forceFullPlacement&&t>2};this._currentPlacementIndex>=0;){var a=e[t[r._currentPlacementIndex]],s=r.placement.collisionIndex.transform.zoom;if("symbol"===a.type&&(!a.minzoom||a.minzoom<=s)&&(!a.maxzoom||a.maxzoom>s)){if(r._inProgressLayer||(r._inProgressLayer=new mn),r._inProgressLayer.continuePlacement(n[a.source],r.placement,r._showCollisionBoxes,a,o))return;delete r._inProgressLayer}r._currentPlacementIndex--}this._done=!0},yn.prototype.commit=function(t,e){return this.placement.commit(t,e),this.placement};var vn=512/t.default$8/2,gn=function(t,e,n){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(var r=0,i=e;r<i.length;r+=1){var o=i[r],a=o.key;this.indexedSymbolInstances[a]||(this.indexedSymbolInstances[a]=[]),this.indexedSymbolInstances[a].push({crossTileID:o.crossTileID,coord:this.getScaledCoordinates(o,t)})}};gn.prototype.getScaledCoordinates=function(e,n){var r=n.canonical.z-this.tileID.canonical.z,i=vn/Math.pow(2,r),o=e.anchor;return{x:Math.floor((n.canonical.x*t.default$8+o.x)*i),y:Math.floor((n.canonical.y*t.default$8+o.y)*i)}},gn.prototype.findMatches=function(t,e,n){for(var r=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),i=0,o=t;i<o.length;i+=1){var a=o[i];if(!a.crossTileID){var s=this.indexedSymbolInstances[a.key];if(s)for(var u=this.getScaledCoordinates(a,e),l=0,c=s;l<c.length;l+=1){var p=c[l];if(Math.abs(p.coord.x-u.x)<=r&&Math.abs(p.coord.y-u.y)<=r&&!n[p.crossTileID]){n[p.crossTileID]=!0,a.crossTileID=p.crossTileID;break}}}}};var _n=function(){this.maxCrossTileID=0};_n.prototype.generate=function(){return++this.maxCrossTileID};var bn=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};bn.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var n in this.indexes){var r=this.indexes[n],i={};for(var o in r){var a=r[o];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),i[a.tileID.key]=a}this.indexes[n]=i}this.lng=t},bn.prototype.addBucket=function(t,e,n){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(var r=0,i=e.symbolInstances;r<i.length;r+=1)i[r].crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var o=this.usedCrossTileIDs[t.overscaledZ];for(var a in this.indexes){var s=this.indexes[a];if(Number(a)>t.overscaledZ)for(var u in s){var l=s[u];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,o)}else{var c=s[t.scaledTo(Number(a)).key];c&&c.findMatches(e.symbolInstances,t,o)}}for(var p=0,f=e.symbolInstances;p<f.length;p+=1){var h=f[p];h.crossTileID||(h.crossTileID=n.generate(),o[h.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new gn(t,e.symbolInstances,e.bucketInstanceId),!0},bn.prototype.removeBucketCrossTileIDs=function(t,e){for(var n in e.indexedSymbolInstances)for(var r=0,i=e.indexedSymbolInstances[n];r<i.length;r+=1){var o=i[r];delete this.usedCrossTileIDs[t][o.crossTileID]}},bn.prototype.removeStaleBuckets=function(t){var e=!1;for(var n in this.indexes){var r=this.indexes[n];for(var i in r)t[r[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(n,r[i]),delete r[i],e=!0)}return e};var xn=function(){this.layerIndexes={},this.crossTileIDs=new _n,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};xn.prototype.addLayer=function(t,e,n){var r=this.layerIndexes[t.id];void 0===r&&(r=this.layerIndexes[t.id]=new bn);var i=!1,o={};r.handleWrapJump(n);for(var a=0,s=e;a<s.length;a+=1){var u=s[a],l=u.getBucket(t);l&&t.id===l.layerIds[0]&&(l.bucketInstanceId||(l.bucketInstanceId=++this.maxBucketInstanceId),r.addBucket(u.tileID,l,this.crossTileIDs)&&(i=!0),o[l.bucketInstanceId]=!0)}return r.removeStaleBuckets(o)&&(i=!0),i},xn.prototype.pruneUnusedLayers=function(t){var e={};for(var n in t.forEach(function(t){e[t]=!0}),this.layerIndexes)e[n]||delete this.layerIndexes[n]};var wn=function(e,n){return t.emitValidationErrors(e,n&&n.filter(function(t){return"source.canvas"!==t.identifier}))},En=t.pick(Ye,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Sn=t.pick(Ye,["setCenter","setZoom","setBearing","setPitch"]),Tn=function(e){function o(n,r){var i=this;void 0===r&&(r={}),e.call(this),this.map=n,this.dispatcher=new Gt((Ke||(Ke=new Xe),Ke),this),this.imageManager=new Bt,this.glyphManager=new Ut(n._transformRequest,r.localIdeographFontFamily),this.lineAtlas=new Zt(256,512),this.crossTileSymbolIndex=new xn,this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.default$23,this._loaded=!1,this._resetUpdates();var a=this;this._rtlTextPluginCallback=o.registerForPluginAvailability(function(t){for(var e in a.dispatcher.broadcast("loadRTLTextPlugin",t.pluginURL,t.completionCallback),a.sourceCaches)a.sourceCaches[e].reload()}),this.on("data",function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){var e=i.sourceCaches[t.sourceId];if(e){var n=e.getSource();if(n&&n.vectorLayerIds)for(var r in i._layers){var o=i._layers[r];o.source===n.id&&i._validateLayer(o)}}}})}return e&&(o.__proto__=e),o.prototype=Object.create(e&&e.prototype),o.prototype.constructor=o,o.prototype.loadURL=function(e,o){var a=this;void 0===o&&(o={}),this.fire(new t.Event("dataloading",{dataType:"style"}));var s="boolean"==typeof o.validate?o.validate:!r(e);e=function(t,e){if(!r(t))return t;var o=i(t);return o.path="/styles/v1"+o.path,n(o,e)}(e,o.accessToken);var u=this.map._transformRequest(e,t.ResourceType.Style);t.getJSON(u,function(e,n){e?a.fire(new t.ErrorEvent(e)):n&&a._load(n,s)})},o.prototype.loadJSON=function(e,n){var r=this;void 0===n&&(n={}),this.fire(new t.Event("dataloading",{dataType:"style"})),yt.frame(function(){r._load(e,!1!==n.validate)})},o.prototype._load=function(e,n){var r=this;if(!n||!wn(this,t.validateStyle(e))){for(var i in this._loaded=!0,this.stylesheet=e,e.sources)r.addSource(i,e.sources[i],{validate:!1});e.sprite?function(e,n,r){function i(){if(s)r(s);else if(o&&a){var e=yt.getImageData(a),n={};for(var i in o){var u=o[i],l=u.width,c=u.height,p=u.x,f=u.y,h=u.sdf,d=u.pixelRatio,m=new t.RGBAImage({width:l,height:c});t.RGBAImage.copy(e,m,{x:p,y:f},{x:0,y:0},{width:l,height:c}),n[i]={data:m,pixelRatio:d,sdf:h}}r(null,n)}}var o,a,s,u=yt.devicePixelRatio>1?"@2x":"";t.getJSON(n(It(e,u,".json"),t.ResourceType.SpriteJSON),function(t,e){s||(s=t,o=e,i())}),t.getImage(n(It(e,u,".png"),t.ResourceType.SpriteImage),function(t,e){s||(s=t,a=e,i())})}(e.sprite,this.map._transformRequest,function(e,n){if(e)r.fire(new t.ErrorEvent(e));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r.fire(new t.Event("data",{dataType:"style"}))}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var o=y(this.stylesheet.layers);this._order=o.map(function(t){return t.id}),this._layers={};for(var a=0,s=o;a<s.length;a+=1){var u=s[a];(u=t.default$22(u)).setEventedParent(r,{layer:{id:u.id}}),r._layers[u.id]=u}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new $t(this.stylesheet.light),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}},o.prototype._validateLayer=function(e){var n=this.sourceCaches[e.source];if(n){var r=e.sourceLayer;if(r){var i=n.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(r))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+r+'" does not exist on source "'+i.id+'" as specified by style layer "'+e.id+'"')))}}},o.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},o.prototype._serializeLayers=function(t){var e=this;return t.map(function(t){return e._layers[t].serialize()})},o.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},o.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},o.prototype.update=function(e){if(this._loaded){if(this._changed){var n=Object.keys(this._updatedLayers),r=Object.keys(this._removedLayers);for(var i in(n.length||r.length)&&this._updateWorkerLayers(n,r),this._updatedSources){var o=this._updatedSources[i];"reload"===o?this._reloadSource(i):"clear"===o&&this._clearSource(i)}for(var a in this._updatedPaintProps)this._layers[a].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates(),this.fire(new t.Event("data",{dataType:"style"}))}for(var s in this.sourceCaches)this.sourceCaches[s].used=!1;for(var u=0,l=this._order;u<l.length;u+=1){var c=l[u],p=this._layers[c];p.recalculate(e),!p.isHidden(e.zoom)&&p.source&&(this.sourceCaches[p.source].used=!0)}this.light.recalculate(e),this.z=e.zoom}},o.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})},o.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},o.prototype.setState=function(e){var n=this;if(this._checkLoaded(),wn(this,t.validateStyle(e)))return!1;(e=t.clone(e)).layers=y(e.layers);var r=S(this.serialize(),e).filter(function(t){return!(t.command in Sn)});if(0===r.length)return!1;var i=r.filter(function(t){return!(t.command in En)});if(i.length>0)throw new Error("Unimplemented: "+i.map(function(t){return t.command}).join(", ")+".");return r.forEach(function(t){"setTransition"!==t.command&&n[t.command].apply(n,t.args)}),this.stylesheet=e,!0},o.prototype.addImage=function(e,n){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,n),this.fire(new t.Event("data",{dataType:"style"}))},o.prototype.getImage=function(t){return this.imageManager.getImage(t)},o.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this.fire(new t.Event("data",{dataType:"style"}))},o.prototype.addSource=function(e,n,r){var i=this;if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!n.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(n).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(n.type)>=0)||!this._validate(t.validateStyle.source,"sources."+e,n,null,r)){this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);var o=this.sourceCaches[e]=new He(e,n,this.dispatcher);o.style=this,o.setEventedParent(this,function(){return{isSourceLoaded:i.loaded(),source:o.serialize(),sourceId:e}}),o.onAdd(this.map),this._changed=!0}},o.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var n in this._layers)if(this._layers[n].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+n+'" is using it.')));var r=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],r.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.clearTiles(),r.onRemove&&r.onRemove(this.map),this._changed=!0},o.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},o.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},o.prototype.addLayer=function(e,n,r){this._checkLoaded();var i=e.id;if(this.getLayer(i))this.fire(new t.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else if("object"==typeof e.source&&(this.addSource(i,e.source),e=t.clone(e),e=t.extend(e,{source:i})),!this._validate(t.validateStyle.layer,"layers."+i,e,{arrayIndex:-1},r)){var o=t.default$22(e);this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}});var a=n?this._order.indexOf(n):this._order.length;if(n&&-1===a)this.fire(new t.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.')));else{if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=o,this._removedLayers[i]&&o.source){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o)}}},o.prototype.moveLayer=function(e,n){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==n){var r=this._order.indexOf(e);this._order.splice(r,1);var i=n?this._order.indexOf(n):this._order.length;n&&-1===i?this.fire(new t.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.'))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},o.prototype.removeLayer=function(e){this._checkLoaded();var n=this._layers[e];if(n){n.setEventedParent(null);var r=this._order.indexOf(e);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=n,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e]}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},o.prototype.getLayer=function(t){return this._layers[t]},o.prototype.setLayerZoomRange=function(e,n,r){this._checkLoaded();var i=this.getLayer(e);i?i.minzoom===n&&i.maxzoom===r||(null!=n&&(i.minzoom=n),null!=r&&(i.maxzoom=r),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},o.prototype.setFilter=function(e,n){this._checkLoaded();var r=this.getLayer(e);if(r){if(!t.default$10(r.filter,n))return null==n?(r.filter=void 0,void this._updateLayer(r)):void(this._validate(t.validateStyle.filter,"layers."+r.id+".filter",n)||(r.filter=t.clone(n),this._updateLayer(r)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},o.prototype.getFilter=function(e){return t.clone(this.getLayer(e).filter)},o.prototype.setLayoutProperty=function(e,n,r){this._checkLoaded();var i=this.getLayer(e);i?t.default$10(i.getLayoutProperty(n),r)||(i.setLayoutProperty(n,r),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},o.prototype.getLayoutProperty=function(t,e){return this.getLayer(t).getLayoutProperty(e)},o.prototype.setPaintProperty=function(e,n,r){this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.default$10(i.getPaintProperty(n),r)){var o=i._transitionablePaint._values[n].value.isDataDriven();i.setPaintProperty(n,r),(i._transitionablePaint._values[n].value.isDataDriven()||o)&&this._updateLayer(i),this._changed=!0,this._updatedPaintProps[e]=!0}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},o.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},o.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},o.prototype.serialize=function(){var e=this;return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(t){return t.serialize()}),layers:this._order.map(function(t){return e._layers[t].serialize()})},function(t){return void 0!==t})},o.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},o.prototype._flattenRenderedFeatures=function(t){for(var e=[],n=this._order.length-1;n>=0;n--)for(var r=this._order[n],i=0,o=t;i<o.length;i+=1){var a=o[i][r];if(a)for(var s=0,u=a;s<u.length;s+=1){var l=u[s];e.push(l)}}return e},o.prototype.queryRenderedFeatures=function(e,n,r){n&&n.filter&&this._validate(t.validateStyle.filter,"queryRenderedFeatures.filter",n.filter);var i={};if(n&&n.layers){if(!Array.isArray(n.layers))return this.fire(new t.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var o=0,a=n.layers;o<a.length;o+=1){var s=a[o],u=this._layers[s];if(!u)return this.fire(new t.ErrorEvent(new Error("The layer '"+s+"' does not exist in the map's style and cannot be queried for features."))),[];i[u.source]=!0}}var l=[];for(var f in this.sourceCaches)n.layers&&!i[f]||l.push(c(this.sourceCaches[f],this._layers,e.worldCoordinate,n,r));return this.placement&&l.push(function(t,e,n,r,i){for(var o={},a=r.queryRenderedSymbols(e),s=[],u=0,l=Object.keys(a).map(Number);u<l.length;u+=1){var c=l[u];s.push(i[c])}s.sort(p);for(var f=0,h=s;f<h.length;f+=1)!function(){var e=h[f],r=e.featureIndex.lookupSymbolFeatures(a[e.bucketInstanceId],e.bucketIndex,e.sourceLayerIndex,n.filter,n.layers,t);for(var i in r){var s=o[i]=o[i]||[],u=r[i];u.sort(function(t,n){var r=e.featureSortOrder;if(r){var i=r.indexOf(t.featureIndex);return r.indexOf(n.featureIndex)-i}return n.featureIndex-t.featureIndex});for(var l=0,c=u;l<c.length;l+=1){var p=c[l];s.push(p.feature)}}}();return o}(this._layers,e.viewport,n,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenRenderedFeatures(l)},o.prototype.querySourceFeatures=function(e,n){n&&n.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",n.filter);var r=this.sourceCaches[e];return r?function(t,e){for(var n=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),r=[],i={},o=0;o<n.length;o++){var a=n[o],s=a.tileID.canonical.key;i[s]||(i[s]=!0,a.querySourceFeatures(r,e))}return r}(r,n):[]},o.prototype.addSourceType=function(t,e,n){return o.getSourceType(t)?n(new Error('A source type called "'+t+'" already exists.')):(o.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},n):n(null,null))},o.prototype.getLight=function(){return this.light.getLight()},o.prototype.setLight=function(e){this._checkLoaded();var n=this.light.getLight(),r=!1;for(var i in e)if(!t.default$10(e[i],n[i])){r=!0;break}if(r){var o={now:yt.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e),this.light.updateTransitions(o)}},o.prototype._validate=function(e,n,r,i,o){return(!o||!1!==o.validate)&&wn(this,e.call(t.validateStyle,t.extend({key:n,style:this.serialize(),value:r,styleSpec:t.default$5},i)))},o.prototype._remove=function(){for(var e in t.evented.off("pluginAvailable",this._rtlTextPluginCallback),this.sourceCaches)this.sourceCaches[e].clearTiles();this.dispatcher.remove()},o.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},o.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},o.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},o.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},o.prototype._updatePlacement=function(t,e,n){for(var r=!1,i=!1,o={},a=0,s=this._order;a<s.length;a+=1){var u=s[a],l=this._layers[u];if("symbol"===l.type){if(!o[l.source]){var c=this.sourceCaches[l.source];o[l.source]=c.getRenderableIds().map(function(t){return c.getTileByID(t)}).sort(function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)})}var p=this.crossTileSymbolIndex.addLayer(l,o[l.source],t.center.lng);r=r||p}}this.crossTileSymbolIndex.pruneUnusedLayers(this._order);var f=this._layerOrderChanged;if((f||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(yt.now()))&&(this.pauseablePlacement=new yn(t,this._order,f,e,n),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,o),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(this.placement,yt.now()),i=!0),r&&this.pauseablePlacement.placement.setStale()),i||r)for(var h=0,d=this._order;h<d.length;h+=1){var m=d[h],y=this._layers[m];"symbol"===y.type&&this.placement.updateLayerOpacities(y,o[y.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(yt.now())},o.prototype.getImages=function(t,e,n){this.imageManager.getImages(e.icons,n)},o.prototype.getGlyphs=function(t,e,n){this.glyphManager.getGlyphs(e.stacks,n)},o}(t.Evented);Tn.getSourceType=function(t){return ae[t]},Tn.setSourceType=function(t,e){ae[t]=e},Tn.registerForPluginAvailability=t.registerForPluginAvailability;var Cn=t.createLayout([{name:"a_pos",type:"Int16",components:2}]),An={prelude:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n\n// Unpack a pair of values that have been packed into a single float.\n// The packed values are assumed to be 8-bit unsigned integers, and are\n// packed like so:\n// packedValue = floor(input[0]) * 256 + input[1],\nvec2 unpack_float(const float packedValue) {\n    int packedIntValue = int(packedValue);\n    int v0 = packedIntValue / 256;\n    return vec2(v0, packedIntValue - v0 * 256);\n}\n\nvec2 unpack_opacity(const float packedOpacity) {\n    int intOpacity = int(packedOpacity) / 2;\n    return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0));\n}\n\n// To minimize the number of attributes needed, we encode a 4-component\n// color into a pair of floats (i.e. a vec2) as follows:\n// [ floor(color.r * 255) * 256 + color.g * 255,\n//   floor(color.b * 255) * 256 + color.g * 255 ]\nvec4 decode_color(const vec2 encodedColor) {\n    return vec4(\n        unpack_float(encodedColor[0]) / 255.0,\n        unpack_float(encodedColor[1]) / 255.0\n    );\n}\n\n// Unpack a pair of paint values and interpolate between them.\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\n    return mix(packedValue[0], packedValue[1], t);\n}\n\n// Unpack a pair of paint values and interpolate between them.\nvec4 unpack_mix_vec4(const vec4 packedColors, const float t) {\n    vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\n    vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\n    return mix(minColor, maxColor, t);\n}\n\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\n// vec2 offset = mod(pixel_coord, size)\n//\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\n//\n// The pixel_coord is passed in as two 16 bit values:\n// pixel_coord_upper = floor(pixel_coord / 2^16)\n// pixel_coord_lower = mod(pixel_coord, 2^16)\n//\n// The offset is calculated in a series of steps that should preserve this precision:\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\n    const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\n\n    vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\n    return (tile_units_to_pixels * pos + offset) / pattern_size;\n}\n"},background:{fragmentSource:"uniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main() {\n    gl_FragColor = u_color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},backgroundPattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n}\n"},circle:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\nvarying vec3 v_data;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize mediump float radius\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize highp vec4 stroke_color\n    #pragma mapbox: initialize mediump float stroke_width\n    #pragma mapbox: initialize lowp float stroke_opacity\n\n    vec2 extrude = v_data.xy;\n    float extrude_length = length(extrude);\n\n    lowp float antialiasblur = v_data.z;\n    float antialiased_blur = -max(blur, antialiasblur);\n\n    float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\n\n    float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\n        antialiased_blur,\n        0.0,\n        extrude_length - radius / (radius + stroke_width)\n    );\n\n    gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform bool u_scale_with_map;\nuniform bool u_pitch_with_map;\nuniform vec2 u_extrude_scale;\nuniform highp float u_camera_to_center_distance;\n\nattribute vec2 a_pos;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\nvarying vec3 v_data;\n\nvoid main(void) {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize mediump float radius\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize highp vec4 stroke_color\n    #pragma mapbox: initialize mediump float stroke_width\n    #pragma mapbox: initialize lowp float stroke_opacity\n\n    // unencode the extrusion vector that we snuck into the a_pos vector\n    vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n    // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n    // in extrusion data\n    vec2 circle_center = floor(a_pos * 0.5);\n    if (u_pitch_with_map) {\n        vec2 corner_position = circle_center;\n        if (u_scale_with_map) {\n            corner_position += extrude * (radius + stroke_width) * u_extrude_scale;\n        } else {\n            // Pitching the circle with the map effectively scales it with the map\n            // To counteract the effect for pitch-scale: viewport, we rescale the\n            // whole circle based on the pitch scaling effect at its central point\n            vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);\n            corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);\n        }\n\n        gl_Position = u_matrix * vec4(corner_position, 0, 1);\n    } else {\n        gl_Position = u_matrix * vec4(circle_center, 0, 1);\n\n        if (u_scale_with_map) {\n            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;\n        } else {\n            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;\n        }\n    }\n\n    // This is a minimum blur distance that serves as a faux-antialiasing for\n    // the circle. since blur is a ratio of the circle's size and the intent is\n    // to keep the blur at roughly 1px, the two are inversely related.\n    lowp float antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);\n\n    v_data = vec3(extrude.x, extrude.y, antialiasblur);\n}\n"},clippingMask:{fragmentSource:"void main() {\n    gl_FragColor = vec4(1.0);\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},heatmap:{fragmentSource:"#pragma mapbox: define highp float weight\n\nuniform highp float u_intensity;\nvarying vec2 v_extrude;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main() {\n    #pragma mapbox: initialize highp float weight\n\n    // Kernel density estimation with a Gaussian kernel of size 5x5\n    float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);\n    float val = weight * u_intensity * GAUSS_COEF * exp(d);\n\n    gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\n\nuniform mat4 u_matrix;\nuniform float u_extrude_scale;\nuniform float u_opacity;\nuniform float u_intensity;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_extrude;\n\n// Effective \"0\" in the kernel density texture to adjust the kernel size to;\n// this empirically chosen number minimizes artifacts on overlapping kernels\n// for typical heatmap cases (assuming clustered source)\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main(void) {\n    #pragma mapbox: initialize highp float weight\n    #pragma mapbox: initialize mediump float radius\n\n    // unencode the extrusion vector that we snuck into the a_pos vector\n    vec2 unscaled_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n    // This 'extrude' comes in ranging from [-1, -1], to [1, 1].  We'll use\n    // it to produce the vertices of a square mesh framing the point feature\n    // we're adding to the kernel density texture.  We'll also pass it as\n    // a varying, so that the fragment shader can determine the distance of\n    // each fragment from the point feature.\n    // Before we do so, we need to scale it up sufficiently so that the\n    // kernel falls effectively to zero at the edge of the mesh.\n    // That is, we want to know S such that\n    // weight * u_intensity * GAUSS_COEF * exp(-0.5 * 3.0^2 * S^2) == ZERO\n    // Which solves to:\n    // S = sqrt(-2.0 * log(ZERO / (weight * u_intensity * GAUSS_COEF))) / 3.0\n    float S = sqrt(-2.0 * log(ZERO / weight / u_intensity / GAUSS_COEF)) / 3.0;\n\n    // Pass the varying in units of radius\n    v_extrude = S * unscaled_extrude;\n\n    // Scale by radius and the zoom-based scale factor to produce actual\n    // mesh position\n    vec2 extrude = v_extrude * radius * u_extrude_scale;\n\n    // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n    // in extrusion data\n    vec4 pos = vec4(floor(a_pos * 0.5) + extrude, 0, 1);\n\n    gl_Position = u_matrix * pos;\n}\n"},heatmapTexture:{fragmentSource:"uniform sampler2D u_image;\nuniform sampler2D u_color_ramp;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n    float t = texture2D(u_image, v_pos).r;\n    vec4 color = texture2D(u_color_ramp, vec2(t, 0.5));\n    gl_FragColor = color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(0.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n    v_pos.x = a_pos.x;\n    v_pos.y = 1.0 - a_pos.y;\n}\n"},collisionBox:{fragmentSource:"\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n\n    float alpha = 0.5;\n\n    // Red = collision, hide label\n    gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n    // Blue = no collision, label is showing\n    if (v_placed > 0.5) {\n        gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n    }\n\n    if (v_notUsed > 0.5) {\n        // This box not used, fade it out\n        gl_FragColor *= .1;\n    }\n}",vertexSource:"attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    highp float collision_perspective_ratio = clamp(\n        0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n        0.0, // Prevents oversized near-field boxes in pitched/overzoomed tiles\n        4.0);\n\n    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n    gl_Position.xy += a_extrude * u_extrude_scale * gl_Position.w * collision_perspective_ratio;\n\n    v_placed = a_placed.x;\n    v_notUsed = a_placed.y;\n}\n"},collisionCircle:{fragmentSource:"uniform float u_overscale_factor;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n    float alpha = 0.5;\n\n    // Red = collision, hide label\n    vec4 color = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n    // Blue = no collision, label is showing\n    if (v_placed > 0.5) {\n        color = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n    }\n\n    if (v_notUsed > 0.5) {\n        // This box not used, fade it out\n        color *= .2;\n    }\n\n    float extrude_scale_length = length(v_extrude_scale);\n    float extrude_length = length(v_extrude) * extrude_scale_length;\n    float stroke_width = 15.0 * extrude_scale_length / u_overscale_factor;\n    float radius = v_radius * extrude_scale_length;\n\n    float distance_to_edge = abs(extrude_length - radius);\n    float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge);\n\n    gl_FragColor = opacity_t * color;\n}\n",vertexSource:"attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\n\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    highp float collision_perspective_ratio = clamp(\n        0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n        0.0, // Prevents oversized near-field circles in pitched/overzoomed tiles\n        4.0);\n\n    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n\n    highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur\n    gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w * collision_perspective_ratio;\n\n    v_placed = a_placed.x;\n    v_notUsed = a_placed.y;\n    v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius\n\n    v_extrude = a_extrude * padding_factor;\n    v_extrude_scale = u_extrude_scale * u_camera_to_center_distance * collision_perspective_ratio;\n}\n"},debug:{fragmentSource:"uniform highp vec4 u_color;\n\nvoid main() {\n    gl_FragColor = u_color;\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},fill:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_FragColor = color * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},fillOutline:{fragmentSource:"#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_pos;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 outline_color\n    #pragma mapbox: initialize lowp float opacity\n\n    float dist = length(v_pos - gl_FragCoord.xy);\n    float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n    gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos;\n\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 outline_color\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},fillOutlinePattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    // find distance to outline for alpha interpolation\n\n    float dist = length(v_pos - gl_FragCoord.xy);\n    float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n\n\n    gl_FragColor = mix(color1, color2, u_mix) * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n\n    v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},fillPattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    gl_FragColor = mix(color1, color2, u_mix) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n}\n"},fillExtrusion:{fragmentSource:"varying vec4 v_color;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n    #pragma mapbox: initialize highp vec4 color\n\n    gl_FragColor = v_color;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec4 v_color;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n    #pragma mapbox: initialize highp vec4 color\n\n    vec3 normal = a_normal_ed.xyz;\n\n    base = max(0.0, base);\n    height = max(0.0, height);\n\n    float t = mod(normal.x, 2.0);\n\n    gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\n\n    // Relative luminance (how dark/bright is the surface color?)\n    float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\n\n    v_color = vec4(0.0, 0.0, 0.0, 1.0);\n\n    // Add slight ambient lighting so no extrusions are totally black\n    vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\n    color += ambientlight;\n\n    // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\n    float directional = clamp(dot(normal / 16384.0, u_lightpos), 0.0, 1.0);\n\n    // Adjust directional so that\n    // the range of values for highlight/shading is narrower\n    // with lower light intensity\n    // and with lighter/brighter surface colors\n    directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\n\n    // Add gradient along z axis of side surfaces\n    if (normal.y != 0.0) {\n        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\n    }\n\n    // Assign final color based on surface + ambient light color, diffuse light directional, and light color\n    // with lower bounds adjusted to hue of light\n    // so that shading is tinted with the complementary (opposite) color to the light color\n    v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\n    v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\n    v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\n}\n"},fillExtrusionPattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    vec4 mixedColor = mix(color1, color2, u_mix);\n\n    gl_FragColor = mixedColor * v_lighting;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\nuniform float u_height_factor;\n\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\nvarying float v_directional;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n\n    vec3 normal = a_normal_ed.xyz;\n    float edgedistance = a_normal_ed.w;\n\n    base = max(0.0, base);\n    height = max(0.0, height);\n\n    float t = mod(normal.x, 2.0);\n    float z = t > 0.0 ? height : base;\n\n    gl_Position = u_matrix * vec4(a_pos, z, 1);\n\n    vec2 pos = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0\n        ? a_pos // extrusion top\n        : vec2(edgedistance, z * u_height_factor); // extrusion side\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, pos);\n\n    v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\n    float directional = clamp(dot(normal / 16383.0, u_lightpos), 0.0, 1.0);\n    directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\n\n    if (normal.y != 0.0) {\n        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\n    }\n\n    v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\n}\n"},extrusionTexture:{fragmentSource:"uniform sampler2D u_image;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_FragColor = texture2D(u_image, v_pos) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(0.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n    v_pos.x = a_pos.x;\n    v_pos.y = 1.0 - a_pos.y;\n}\n"},hillshadePrepare:{fragmentSource:"#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D u_image;\nvarying vec2 v_pos;\nuniform vec2 u_dimension;\nuniform float u_zoom;\nuniform float u_maxzoom;\n\nfloat getElevation(vec2 coord, float bias) {\n    // Convert encoded elevation value to meters\n    vec4 data = texture2D(u_image, coord) * 255.0;\n    return (data.r + data.g * 256.0 + data.b * 256.0 * 256.0) / 4.0;\n}\n\nvoid main() {\n    vec2 epsilon = 1.0 / u_dimension;\n\n    // queried pixels:\n    // +-----------+\n    // |   |   |   |\n    // | a | b | c |\n    // |   |   |   |\n    // +-----------+\n    // |   |   |   |\n    // | d | e | f |\n    // |   |   |   |\n    // +-----------+\n    // |   |   |   |\n    // | g | h | i |\n    // |   |   |   |\n    // +-----------+\n\n    float a = getElevation(v_pos + vec2(-epsilon.x, -epsilon.y), 0.0);\n    float b = getElevation(v_pos + vec2(0, -epsilon.y), 0.0);\n    float c = getElevation(v_pos + vec2(epsilon.x, -epsilon.y), 0.0);\n    float d = getElevation(v_pos + vec2(-epsilon.x, 0), 0.0);\n    float e = getElevation(v_pos, 0.0);\n    float f = getElevation(v_pos + vec2(epsilon.x, 0), 0.0);\n    float g = getElevation(v_pos + vec2(-epsilon.x, epsilon.y), 0.0);\n    float h = getElevation(v_pos + vec2(0, epsilon.y), 0.0);\n    float i = getElevation(v_pos + vec2(epsilon.x, epsilon.y), 0.0);\n\n    // here we divide the x and y slopes by 8 * pixel size\n    // where pixel size (aka meters/pixel) is:\n    // circumference of the world / (pixels per tile * number of tiles)\n    // which is equivalent to: 8 * 40075016.6855785 / (512 * pow(2, u_zoom))\n    // which can be reduced to: pow(2, 19.25619978527 - u_zoom)\n    // we want to vertically exaggerate the hillshading though, because otherwise\n    // it is barely noticeable at low zooms. to do this, we multiply this by some\n    // scale factor pow(2, (u_zoom - u_maxzoom) * a) where a is an arbitrary value\n    // Here we use a=0.3 which works out to the expression below. see \n    // nickidlugash's awesome breakdown for more info\n    // https://github.com/mapbox/mapbox-gl-js/pull/5286#discussion_r148419556\n    float exaggeration = u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;\n\n    vec2 deriv = vec2(\n        (c + f + f + i) - (a + d + d + g),\n        (g + h + h + i) - (a + b + b + c)\n    ) /  pow(2.0, (u_zoom - u_maxzoom) * exaggeration + 19.2562 - u_zoom);\n\n    gl_FragColor = clamp(vec4(\n        deriv.x / 2.0 + 0.5,\n        deriv.y / 2.0 + 0.5,\n        1.0,\n        1.0), 0.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    v_pos = (a_texture_pos / 8192.0) / 2.0 + 0.25;\n}\n"},hillshade:{fragmentSource:"uniform sampler2D u_image;\nvarying vec2 v_pos;\n\nuniform vec2 u_latrange;\nuniform vec2 u_light;\nuniform vec4 u_shadow;\nuniform vec4 u_highlight;\nuniform vec4 u_accent;\n\n#define PI 3.141592653589793\n\nvoid main() {\n    vec4 pixel = texture2D(u_image, v_pos);\n\n    vec2 deriv = ((pixel.rg * 2.0) - 1.0);\n\n    // We divide the slope by a scale factor based on the cosin of the pixel's approximate latitude\n    // to account for mercator projection distortion. see #4807 for details\n    float scaleFactor = cos(radians((u_latrange[0] - u_latrange[1]) * (1.0 - v_pos.y) + u_latrange[1]));\n    // We also multiply the slope by an arbitrary z-factor of 1.25\n    float slope = atan(1.25 * length(deriv) / scaleFactor);\n    float aspect = deriv.x != 0.0 ? atan(deriv.y, -deriv.x) : PI / 2.0 * (deriv.y > 0.0 ? 1.0 : -1.0);\n\n    float intensity = u_light.x;\n    // We add PI to make this property match the global light object, which adds PI/2 to the light's azimuthal\n    // position property to account for 0deg corresponding to north/the top of the viewport in the style spec\n    // and the original shader was written to accept (-illuminationDirection - 90) as the azimuthal.\n    float azimuth = u_light.y + PI;\n\n    // We scale the slope exponentially based on intensity, using a calculation similar to\n    // the exponential interpolation function in the style spec:\n    // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/expression/definitions/interpolate.js#L217-L228\n    // so that higher intensity values create more opaque hillshading.\n    float base = 1.875 - intensity * 1.75;\n    float maxValue = 0.5 * PI;\n    float scaledSlope = intensity != 0.5 ? ((pow(base, slope) - 1.0) / (pow(base, maxValue) - 1.0)) * maxValue : slope;\n\n    // The accent color is calculated with the cosine of the slope while the shade color is calculated with the sine\n    // so that the accent color's rate of change eases in while the shade color's eases out.\n    float accent = cos(scaledSlope);\n    // We multiply both the accent and shade color by a clamped intensity value\n    // so that intensities >= 0.5 do not additionally affect the color values\n    // while intensity values < 0.5 make the overall color more transparent.\n    vec4 accent_color = (1.0 - accent) * u_accent * clamp(intensity * 2.0, 0.0, 1.0);\n    float shade = abs(mod((aspect + azimuth) / PI + 0.5, 2.0) - 1.0);\n    vec4 shade_color = mix(u_shadow, u_highlight, shade) * sin(scaledSlope) * clamp(intensity * 2.0, 0.0, 1.0);\n    gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    v_pos = a_texture_pos / 8192.0;\n}\n"},line:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\nvarying highp float v_linesofar;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float width\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n    v_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist = outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_width2 = vec2(outset, inset);\n}\n"},lineGradient:{fragmentSource:"\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nuniform sampler2D u_image;\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    // For gradient lines, v_lineprogress is the ratio along the entire line,\n    // scaled to [0, 2^15), and the gradient ramp is stored in a texture.\n    vec4 color = texture2D(u_image, vec2(v_lineprogress, 0.5));\n\n    gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"\n// the attribute conveying progress along a line is scaled to [0, 2^15)\n#define MAX_LINE_DISTANCE 32767.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float width\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n    v_lineprogress = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0 / MAX_LINE_DISTANCE;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist = outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_width2 = vec2(outset, inset);\n}\n"},linePattern:{fragmentSource:"uniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_fade;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\n    float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\n\n    // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge\n    // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0)\n    // to ensure we don't sample outside the designated symbol on the sprite sheet.\n    // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of\n    // the texture coordinate\n    float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_a.y + 2.0) / 2.0) / u_pattern_size_a.y);\n    float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_b.y + 2.0) / 2.0) / u_pattern_size_b.y);\n    vec2 pos_a = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, vec2(x_a, y_a));\n    vec2 pos_b = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, vec2(x_b, y_b));\n\n    vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n    gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize mediump float width\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n    float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist = outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_linesofar = a_linesofar;\n    v_width2 = vec2(outset, inset);\n}\n"},lineSDF:{fragmentSource:"\nuniform sampler2D u_image;\nuniform float u_sdfgamma;\nuniform float u_mix;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float width\n    #pragma mapbox: initialize lowp float floorwidth\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    float sdfdist_a = texture2D(u_image, v_tex_a).a;\n    float sdfdist_b = texture2D(u_image, v_tex_b).a;\n    float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n    alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\n\n    gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float width\n    #pragma mapbox: initialize lowp float floorwidth\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n    float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist =outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\n    v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n    v_width2 = vec2(outset, inset);\n}\n"},raster:{fragmentSource:"uniform float u_fade_t;\nuniform float u_opacity;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n    // read and cross-fade colors from the main and parent tiles\n    vec4 color0 = texture2D(u_image0, v_pos0);\n    vec4 color1 = texture2D(u_image1, v_pos1);\n    if (color0.a > 0.0) {\n        color0.rgb = color0.rgb / color0.a;\n    }\n    if (color1.a > 0.0) {\n        color1.rgb = color1.rgb / color1.a;\n    }\n    vec4 color = mix(color0, color1, u_fade_t);\n    color.a *= u_opacity;\n    vec3 rgb = color.rgb;\n\n    // spin\n    rgb = vec3(\n        dot(rgb, u_spin_weights.xyz),\n        dot(rgb, u_spin_weights.zxy),\n        dot(rgb, u_spin_weights.yzx));\n\n    // saturation\n    float average = (color.r + color.g + color.b) / 3.0;\n    rgb += (average - rgb) * u_saturation_factor;\n\n    // contrast\n    rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n    // brightness\n    vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n    vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n    gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    // We are using Int16 for texture position coordinates to give us enough precision for\n    // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n    // as an arbitrarily high number to preserve adequate precision when rendering.\n    // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n    // so math for modifying either is consistent.\n    v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\n    v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n"},symbolIcon:{fragmentSource:"uniform sampler2D u_texture;\n\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    lowp float alpha = opacity * v_fade_opacity;\n    gl_FragColor = texture2D(u_texture, v_tex) * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\nattribute float a_fade_opacity;\n\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform float u_fade_change;\n\n#pragma mapbox: define lowp float opacity\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    vec2 a_pos = a_pos_offset.xy;\n    vec2 a_offset = a_pos_offset.zw;\n\n    vec2 a_tex = a_data.xy;\n    vec2 a_size = a_data.zw;\n\n    highp float segment_angle = -a_projected_pos[2];\n\n    float size;\n    if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\n    } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n        size = a_size[0] / 10.0;\n    } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\n        size = u_size;\n    } else {\n        size = u_size;\n    }\n\n    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    // See comments in symbol_sdf.vertex\n    highp float distance_ratio = u_pitch_with_map ?\n        camera_to_anchor_distance / u_camera_to_center_distance :\n        u_camera_to_center_distance / camera_to_anchor_distance;\n    highp float perspective_ratio = clamp(\n            0.5 + 0.5 * distance_ratio,\n            0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n            4.0);\n\n    size *= perspective_ratio;\n\n    float fontScale = u_is_text ? size / 24.0 : size;\n\n    highp float symbol_rotation = 0.0;\n    if (u_rotate_symbol) {\n        // See comments in symbol_sdf.vertex\n        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n        vec2 a = projectedPoint.xy / projectedPoint.w;\n        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n    }\n\n    highp float angle_sin = sin(segment_angle + symbol_rotation);\n    highp float angle_cos = cos(segment_angle + symbol_rotation);\n    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\n\n    v_tex = a_tex / u_texsize;\n    vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n    float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n    v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n}\n"},symbolSDF:{fragmentSource:"#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\n\nuniform bool u_is_halo;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform sampler2D u_texture;\nuniform highp float u_gamma_scale;\nuniform bool u_is_text;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 fill_color\n    #pragma mapbox: initialize highp vec4 halo_color\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize lowp float halo_width\n    #pragma mapbox: initialize lowp float halo_blur\n\n    vec2 tex = v_data0.xy;\n    float gamma_scale = v_data1.x;\n    float size = v_data1.y;\n    float fade_opacity = v_data1[2];\n\n    float fontScale = u_is_text ? size / 24.0 : size;\n\n    lowp vec4 color = fill_color;\n    highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n    lowp float buff = (256.0 - 64.0) / 256.0;\n    if (u_is_halo) {\n        color = halo_color;\n        gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n        buff = (6.0 - halo_width / fontScale) / SDF_PX;\n    }\n\n    lowp float dist = texture2D(u_texture, tex).a;\n    highp float gamma_scaled = gamma * gamma_scale;\n    highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n    gl_FragColor = color * (alpha * opacity * fade_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\nattribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n//   text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 fill_color\n    #pragma mapbox: initialize highp vec4 halo_color\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize lowp float halo_width\n    #pragma mapbox: initialize lowp float halo_blur\n\n    vec2 a_pos = a_pos_offset.xy;\n    vec2 a_offset = a_pos_offset.zw;\n\n    vec2 a_tex = a_data.xy;\n    vec2 a_size = a_data.zw;\n\n    highp float segment_angle = -a_projected_pos[2];\n    float size;\n\n    if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\n    } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n        size = a_size[0] / 10.0;\n    } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\n        size = u_size;\n    } else {\n        size = u_size;\n    }\n\n    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    // If the label is pitched with the map, layout is done in pitched space,\n    // which makes labels in the distance smaller relative to viewport space.\n    // We counteract part of that effect by multiplying by the perspective ratio.\n    // If the label isn't pitched with the map, we do layout in viewport space,\n    // which makes labels in the distance larger relative to the features around\n    // them. We counteract part of that effect by dividing by the perspective ratio.\n    highp float distance_ratio = u_pitch_with_map ?\n        camera_to_anchor_distance / u_camera_to_center_distance :\n        u_camera_to_center_distance / camera_to_anchor_distance;\n    highp float perspective_ratio = clamp(\n        0.5 + 0.5 * distance_ratio,\n        0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n        4.0);\n\n    size *= perspective_ratio;\n\n    float fontScale = u_is_text ? size / 24.0 : size;\n\n    highp float symbol_rotation = 0.0;\n    if (u_rotate_symbol) {\n        // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n        // To figure out that angle in projected space, we draw a short horizontal line in tile\n        // space, project it, and measure its angle in projected space.\n        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n        vec2 a = projectedPoint.xy / projectedPoint.w;\n        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n    }\n\n    highp float angle_sin = sin(segment_angle + symbol_rotation);\n    highp float angle_cos = cos(segment_angle + symbol_rotation);\n    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\n    float gamma_scale = gl_Position.w;\n\n    vec2 tex = a_tex / u_texsize;\n    vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n    float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n    float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n    v_data0 = vec2(tex.x, tex.y);\n    v_data1 = vec3(gamma_scale, size, interpolated_fade_opacity);\n}\n"}},On=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g;for(var kn in An)!function(t){var e=An[t],n={};e.fragmentSource=e.fragmentSource.replace(On,function(t,e,r,i,o){return n[o]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+r+" "+i+" "+o+";\n#else\nuniform "+r+" "+i+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n    "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n"}),e.vertexSource=e.vertexSource.replace(On,function(t,e,r,i,o){var a="float"===i?"vec2":"vec4";return n[o]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\nvarying "+r+" "+i+" "+o+";\n#else\nuniform "+r+" "+i+" u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n    "+o+" = unpack_mix_"+a+"(a_"+o+", a_"+o+"_t);\n#else\n    "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\n#else\nuniform "+r+" "+i+" u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n    "+r+" "+i+" "+o+" = unpack_mix_"+a+"(a_"+o+", a_"+o+"_t);\n#else\n    "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n"})}(kn);var In=An,Pn=function(t,e,n,r){var i=t.gl;this.program=i.createProgram();var o=n.defines().concat("#define DEVICE_PIXEL_RATIO "+yt.devicePixelRatio.toFixed(1));r&&o.push("#define OVERDRAW_INSPECTOR;");var a=o.concat(In.prelude.fragmentSource,e.fragmentSource).join("\n"),s=o.concat(In.prelude.vertexSource,e.vertexSource).join("\n"),u=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(u,a),i.compileShader(u),i.attachShader(this.program,u);var l=i.createShader(i.VERTEX_SHADER);i.shaderSource(l,s),i.compileShader(l),i.attachShader(this.program,l);for(var c=n.layoutAttributes||[],p=0;p<c.length;p++)i.bindAttribLocation(this.program,p,c[p].name);i.linkProgram(this.program),this.numAttributes=i.getProgramParameter(this.program,i.ACTIVE_ATTRIBUTES),this.attributes={},this.uniforms={};for(var f=0;f<this.numAttributes;f++){var h=i.getActiveAttrib(this.program,f);h&&(this.attributes[h.name]=i.getAttribLocation(this.program,h.name))}for(var d=i.getProgramParameter(this.program,i.ACTIVE_UNIFORMS),m=0;m<d;m++){var y=i.getActiveUniform(this.program,m);y&&(this.uniforms[y.name]=i.getUniformLocation(this.program,y.name))}};Pn.prototype.draw=function(t,e,n,r,i,o,a,s,u){for(var l,c=t.gl,p=(l={},l[c.LINES]=2,l[c.TRIANGLES]=3,l)[e],f=0,h=o.get();f<h.length;f+=1){var d=h[f],m=d.vaos||(d.vaos={});(m[n]||(m[n]=new ne)).bind(t,this,r,a?a.getPaintVertexBuffers():[],i,d.vertexOffset,s,u),c.drawElements(e,d.primitiveLength*p,c.UNSIGNED_SHORT,d.primitiveOffset*p*2)}};var zn=t.mat4.identity(new Float32Array(16)),Rn=t.default$19.layout,Mn=function(t,e){if(!t)return!1;var n=e.imageManager.getPattern(t.from),r=e.imageManager.getPattern(t.to);return!n||!r},jn=function(t,e,n){var r=e.context,i=r.gl,o=e.imageManager.getPattern(t.from),a=e.imageManager.getPattern(t.to);i.uniform1i(n.uniforms.u_image,0),i.uniform2fv(n.uniforms.u_pattern_tl_a,o.tl),i.uniform2fv(n.uniforms.u_pattern_br_a,o.br),i.uniform2fv(n.uniforms.u_pattern_tl_b,a.tl),i.uniform2fv(n.uniforms.u_pattern_br_b,a.br);var s=e.imageManager.getPixelSize(),u=s.width,l=s.height;i.uniform2fv(n.uniforms.u_texsize,[u,l]),i.uniform1f(n.uniforms.u_mix,t.t),i.uniform2fv(n.uniforms.u_pattern_size_a,o.displaySize),i.uniform2fv(n.uniforms.u_pattern_size_b,a.displaySize),i.uniform1f(n.uniforms.u_scale_a,t.fromScale),i.uniform1f(n.uniforms.u_scale_b,t.toScale),r.activeTexture.set(i.TEXTURE0),e.imageManager.bind(e.context)},Dn=function(t,e,n){var r=e.context.gl;r.uniform1f(n.uniforms.u_tile_units_to_pixels,1/F(t,1,e.transform.tileZoom));var i=Math.pow(2,t.tileID.overscaledZ),o=t.tileSize*Math.pow(2,e.transform.tileZoom)/i,a=o*(t.tileID.canonical.x+t.tileID.wrap*i),s=o*t.tileID.canonical.y;r.uniform2f(n.uniforms.u_pixel_coord_upper,a>>16,s>>16),r.uniform2f(n.uniforms.u_pixel_coord_lower,65535&a,65535&s)},Ln=t.default$20.mat3,Fn=t.default$20.mat4,Bn=t.default$20.vec3,Nn={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},Vn={symbol:function(t,e,n,r){if("translucent"===t.renderPass){var i=t.context;i.setStencilMode($e.disabled),i.setColorMode(t.colorModeForRenderPass()),0!==n.paint.get("icon-opacity").constantOr(1)&&q(t,e,n,r,!1,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),n.layout.get("icon-rotation-alignment"),n.layout.get("icon-pitch-alignment"),n.layout.get("icon-keep-upright")),0!==n.paint.get("text-opacity").constantOr(1)&&q(t,e,n,r,!0,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),n.layout.get("text-keep-upright")),e.map.showCollisionBoxes&&function(t,e,n,r){U(t,e,n,r,!1),U(t,e,n,r,!0)}(t,e,n,r)}},circle:function(t,e,n,r){if("translucent"===t.renderPass){var i=n.paint.get("circle-opacity"),o=n.paint.get("circle-stroke-width"),a=n.paint.get("circle-stroke-opacity");if(0!==i.constantOr(1)||0!==o.constantOr(1)&&0!==a.constantOr(1)){var s=t.context,u=s.gl;s.setDepthMode(t.depthModeForSublayer(0,We.ReadOnly)),s.setStencilMode($e.disabled),s.setColorMode(t.colorModeForRenderPass());for(var l=!0,c=0;c<r.length;c++){var p=r[c],f=e.getTile(p),h=f.getBucket(n);if(h){var d=t.context.program.get(),m=h.programConfigurations.get(n.id),y=t.useProgram("circle",m);if((l||y.program!==d)&&(m.setUniforms(s,y,n.paint,{zoom:t.transform.zoom}),l=!1),u.uniform1f(y.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance),u.uniform1i(y.uniforms.u_scale_with_map,"map"===n.paint.get("circle-pitch-scale")?1:0),"map"===n.paint.get("circle-pitch-alignment")){u.uniform1i(y.uniforms.u_pitch_with_map,1);var v=F(f,1,t.transform.zoom);u.uniform2f(y.uniforms.u_extrude_scale,v,v)}else u.uniform1i(y.uniforms.u_pitch_with_map,0),u.uniform2fv(y.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits);u.uniformMatrix4fv(y.uniforms.u_matrix,!1,t.translatePosMatrix(p.posMatrix,f,n.paint.get("circle-translate"),n.paint.get("circle-translate-anchor"))),y.draw(s,u.TRIANGLES,n.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,m)}}}}},heatmap:function(e,n,r,i){if(0!==r.paint.get("heatmap-opacity"))if("offscreen"===e.renderPass){var o=e.context,a=o.gl;o.setDepthMode(e.depthModeForSublayer(0,We.ReadOnly)),o.setStencilMode($e.disabled),function(t,e,n){var r=t.gl;t.activeTexture.set(r.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var i=n.heatmapFbo;if(i)r.bindTexture(r.TEXTURE_2D,i.colorAttachment.get()),t.bindFramebuffer.set(i.framebuffer);else{var o=r.createTexture();r.bindTexture(r.TEXTURE_2D,o),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),i=n.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4),function t(e,n,r,i){var o=e.gl;o.texImage2D(o.TEXTURE_2D,0,o.RGBA,n.width/4,n.height/4,0,o.RGBA,e.extTextureHalfFloat?e.extTextureHalfFloat.HALF_FLOAT_OES:o.UNSIGNED_BYTE,null),i.colorAttachment.set(r),e.extTextureHalfFloat&&o.checkFramebufferStatus(o.FRAMEBUFFER)!==o.FRAMEBUFFER_COMPLETE&&(e.extTextureHalfFloat=null,i.colorAttachment.setDirty(),t(e,n,r,i))}(t,e,o,i)}}(o,e,r),o.clear({color:t.default$6.transparent}),o.setColorMode(new Ze([a.ONE,a.ONE],t.default$6.transparent,[!0,!0,!0,!0]));for(var s=!0,u=0;u<i.length;u++){var l=i[u];if(!n.hasRenderableParent(l)){var c=n.getTile(l),p=c.getBucket(r);if(p){var f=e.context.program.get(),h=p.programConfigurations.get(r.id),d=e.useProgram("heatmap",h),m=e.transform.zoom;(s||d.program!==f)&&(h.setUniforms(e.context,d,r.paint,{zoom:m}),s=!1),a.uniform1f(d.uniforms.u_extrude_scale,F(c,1,m)),a.uniform1f(d.uniforms.u_intensity,r.paint.get("heatmap-intensity")),a.uniformMatrix4fv(d.uniforms.u_matrix,!1,l.posMatrix),d.draw(o,a.TRIANGLES,r.id,p.layoutVertexBuffer,p.indexBuffer,p.segments,h)}}}o.viewport.set([0,0,e.width,e.height])}else"translucent"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,n){var r=e.context,i=r.gl,o=n.heatmapFbo;if(o){r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,o.colorAttachment.get()),r.activeTexture.set(i.TEXTURE1);var a=n.colorRampTexture;a||(a=n.colorRampTexture=new Ft(r,n.colorRamp,i.RGBA)),a.bind(i.LINEAR,i.CLAMP_TO_EDGE),r.setDepthMode(We.disabled);var s=e.useProgram("heatmapTexture"),u=n.paint.get("heatmap-opacity");i.uniform1f(s.uniforms.u_opacity,u),i.uniform1i(s.uniforms.u_image,0),i.uniform1i(s.uniforms.u_color_ramp,1);var l=t.mat4.create();t.mat4.ortho(l,0,e.width,e.height,0,0,1),i.uniformMatrix4fv(s.uniforms.u_matrix,!1,l),i.uniform2f(s.uniforms.u_world,i.drawingBufferWidth,i.drawingBufferHeight),e.viewportVAO.bind(e.context,s,e.viewportBuffer,[]),i.drawArrays(i.TRIANGLE_STRIP,0,4)}}(e,r))},line:function(t,e,n,r){if("translucent"===t.renderPass&&0!==n.paint.get("line-opacity").constantOr(1)){var i=t.context;i.setDepthMode(t.depthModeForSublayer(0,We.ReadOnly)),i.setColorMode(t.colorModeForRenderPass());for(var o,a=n.paint.get("line-dasharray")?"lineSDF":n.paint.get("line-pattern")?"linePattern":n.paint.get("line-gradient")?"lineGradient":"line",s=!0,u=0,l=r;u<l.length;u+=1){var c=l[u],p=e.getTile(c),f=p.getBucket(n);if(f){var h=f.programConfigurations.get(n.id),d=t.context.program.get(),m=t.useProgram(a,h),y=s||m.program!==d,v=o!==p.tileID.overscaledZ;y&&h.setUniforms(t.context,m,n.paint,{zoom:t.transform.zoom}),G(m,t,p,f,n,c,h,y,v),o=p.tileID.overscaledZ,s=!1}}}},fill:function(e,n,r,i){var o=r.paint.get("fill-color"),a=r.paint.get("fill-opacity");if(0!==a.constantOr(1)){var s=e.context;s.setColorMode(e.colorModeForRenderPass());var u=r.paint.get("fill-pattern")||1!==o.constantOr(t.default$6.transparent).a||1!==a.constantOr(0)?"translucent":"opaque";e.renderPass===u&&(s.setDepthMode(e.depthModeForSublayer(1,"opaque"===e.renderPass?We.ReadWrite:We.ReadOnly)),H(e,n,r,i,K)),"translucent"===e.renderPass&&r.paint.get("fill-antialias")&&(s.lineWidth.set(2),s.setDepthMode(e.depthModeForSublayer(r.getPaintProperty("fill-outline-color")?2:0,We.ReadOnly)),H(e,n,r,i,X))}},"fill-extrusion":function(e,n,r,i){if(0!==r.paint.get("fill-extrusion-opacity"))if("offscreen"===e.renderPass){!function(e,n){var r=e.context,i=r.gl,o=n.viewportFrame;if(e.depthRboNeedsClear&&e.setupOffscreenDepthRenderbuffer(),!o){var a=new Ft(r,{width:e.width,height:e.height,data:null},i.RGBA);a.bind(i.LINEAR,i.CLAMP_TO_EDGE),(o=n.viewportFrame=r.createFramebuffer(e.width,e.height)).colorAttachment.set(a.texture)}r.bindFramebuffer.set(o.framebuffer),o.depthAttachment.set(e.depthRbo),e.depthRboNeedsClear&&(r.clear({depth:1}),e.depthRboNeedsClear=!1),r.clear({color:t.default$6.transparent}),r.setStencilMode($e.disabled),r.setDepthMode(new We(i.LEQUAL,We.ReadWrite,[0,1])),r.setColorMode(e.colorModeForRenderPass())}(e,r);for(var o=!0,a=0,s=i;a<s.length;a+=1){var u=s[a],l=n.getTile(u),c=l.getBucket(r);c&&(J(e,0,r,l,u,c,o),o=!1)}}else"translucent"===e.renderPass&&function(t,e){var n=e.viewportFrame;if(n){var r=t.context,i=r.gl,o=t.useProgram("extrusionTexture");r.setStencilMode($e.disabled),r.setDepthMode(We.disabled),r.setColorMode(t.colorModeForRenderPass()),r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),i.uniform1f(o.uniforms.u_opacity,e.paint.get("fill-extrusion-opacity")),i.uniform1i(o.uniforms.u_image,0);var a=Fn.create();Fn.ortho(a,0,t.width,t.height,0,0,1),i.uniformMatrix4fv(o.uniforms.u_matrix,!1,a),i.uniform2f(o.uniforms.u_world,i.drawingBufferWidth,i.drawingBufferHeight),t.viewportVAO.bind(r,o,t.viewportBuffer,[]),i.drawArrays(i.TRIANGLE_STRIP,0,4)}}(e,r)},hillshade:function(t,e,n,r){if("offscreen"===t.renderPass||"translucent"===t.renderPass){var i=t.context,o=e.getSource().maxzoom;i.setDepthMode(t.depthModeForSublayer(0,We.ReadOnly)),i.setStencilMode($e.disabled),i.setColorMode(t.colorModeForRenderPass());for(var a=0,s=r;a<s.length;a+=1){var u=s[a],l=e.getTile(u);l.needsHillshadePrepare&&"offscreen"===t.renderPass?tt(t,l,o):"translucent"===t.renderPass&&Q(t,l,n)}i.viewport.set([0,0,t.width,t.height])}},raster:function(t,e,n,r){if("translucent"===t.renderPass&&0!==n.paint.get("raster-opacity")){var i,o,a=t.context,s=a.gl,u=e.getSource(),l=t.useProgram("raster");a.setStencilMode($e.disabled),a.setColorMode(t.colorModeForRenderPass()),s.uniform1f(l.uniforms.u_brightness_low,n.paint.get("raster-brightness-min")),s.uniform1f(l.uniforms.u_brightness_high,n.paint.get("raster-brightness-max")),s.uniform1f(l.uniforms.u_saturation_factor,(i=n.paint.get("raster-saturation"))>0?1-1/(1.001-i):-i),s.uniform1f(l.uniforms.u_contrast_factor,(o=n.paint.get("raster-contrast"))>0?1/(1-o):1+o),s.uniform3fv(l.uniforms.u_spin_weights,function(t){t*=Math.PI/180;var e=Math.sin(t),n=Math.cos(t);return[(2*n+1)/3,(-Math.sqrt(3)*e-n+1)/3,(Math.sqrt(3)*e-n+1)/3]}(n.paint.get("raster-hue-rotate"))),s.uniform1f(l.uniforms.u_buffer_scale,1),s.uniform1i(l.uniforms.u_image0,0),s.uniform1i(l.uniforms.u_image1,1);for(var c=r.length&&r[0].overscaledZ,p=0,f=r;p<f.length;p+=1){var h=f[p];a.setDepthMode(t.depthModeForSublayer(h.overscaledZ-c,1===n.paint.get("raster-opacity")?We.ReadWrite:We.ReadOnly,s.LESS));var d=e.getTile(h),m=t.transform.calculatePosMatrix(h.toUnwrapped(),!0);d.registerFadeDuration(n.paint.get("raster-fade-duration")),s.uniformMatrix4fv(l.uniforms.u_matrix,!1,m);var y=e.findLoadedParent(h,0,{}),v=et(d,y,e,n,t.transform),g=void 0,_=void 0;if(a.activeTexture.set(s.TEXTURE0),d.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),a.activeTexture.set(s.TEXTURE1),y?(y.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),g=Math.pow(2,y.tileID.overscaledZ-d.tileID.overscaledZ),_=[d.tileID.canonical.x*g%1,d.tileID.canonical.y*g%1]):d.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),s.uniform2fv(l.uniforms.u_tl_parent,_||[0,0]),s.uniform1f(l.uniforms.u_scale_parent,g||1),s.uniform1f(l.uniforms.u_fade_t,v.mix),s.uniform1f(l.uniforms.u_opacity,v.opacity*n.paint.get("raster-opacity")),u instanceof re){var b=u.boundsBuffer;u.boundsVAO.bind(a,l,b,[]),s.drawArrays(s.TRIANGLE_STRIP,0,b.length)}else if(d.maskedBoundsBuffer&&d.maskedIndexBuffer&&d.segments)l.draw(a,s.TRIANGLES,n.id,d.maskedBoundsBuffer,d.maskedIndexBuffer,d.segments);else{var x=t.rasterBoundsBuffer;t.rasterBoundsVAO.bind(a,l,x,[]),s.drawArrays(s.TRIANGLE_STRIP,0,x.length)}}}},background:function(t,e,n){var r=n.paint.get("background-color"),i=n.paint.get("background-opacity");if(0!==i){var o=t.context,a=o.gl,s=t.transform,u=s.tileSize,l=n.paint.get("background-pattern"),c=l||1!==r.a||1!==i?"translucent":"opaque";if(t.renderPass===c){var p;if(o.setStencilMode($e.disabled),o.setDepthMode(t.depthModeForSublayer(0,"opaque"===c?We.ReadWrite:We.ReadOnly)),o.setColorMode(t.colorModeForRenderPass()),l){if(Mn(l,t))return;p=t.useProgram("backgroundPattern"),jn(l,t,p),t.tileExtentPatternVAO.bind(o,p,t.tileExtentBuffer,[])}else p=t.useProgram("background"),a.uniform4fv(p.uniforms.u_color,[r.r,r.g,r.b,r.a]),t.tileExtentVAO.bind(o,p,t.tileExtentBuffer,[]);a.uniform1f(p.uniforms.u_opacity,i);for(var f=0,h=s.coveringTiles({tileSize:u});f<h.length;f+=1){var d=h[f];l&&Dn({tileID:d,tileSize:u},t,p),a.uniformMatrix4fv(p.uniforms.u_matrix,!1,t.transform.calculatePosMatrix(d.toUnwrapped())),a.drawArrays(a.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}}}},debug:function(t,e,n){for(var r=0;r<n.length;r++)nt(t,e,n[r])}},Un=function(e,n){this.context=new Ge(e),this.transform=n,this._tileTextures={},this.setup(),this.numSublayers=He.maxUnderzooming+He.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new t.default$24,this.crossTileSymbolIndex=new xn};Un.prototype.resize=function(t,e){var n=this.context.gl;if(this.width=t*yt.devicePixelRatio,this.height=e*yt.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var r=0,i=this.style._order;r<i.length;r+=1){var o=i[r];this.style._layers[o].resize()}this.depthRbo&&(n.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},Un.prototype.setup=function(){var e=this.context,n=new t.PosArray;n.emplaceBack(0,0),n.emplaceBack(t.default$8,0),n.emplaceBack(0,t.default$8),n.emplaceBack(t.default$8,t.default$8),this.tileExtentBuffer=e.createVertexBuffer(n,Cn.members),this.tileExtentVAO=new ne,this.tileExtentPatternVAO=new ne;var r=new t.PosArray;r.emplaceBack(0,0),r.emplaceBack(t.default$8,0),r.emplaceBack(t.default$8,t.default$8),r.emplaceBack(0,t.default$8),r.emplaceBack(0,0),this.debugBuffer=e.createVertexBuffer(r,Cn.members),this.debugVAO=new ne;var i=new t.RasterBoundsArray;i.emplaceBack(0,0,0,0),i.emplaceBack(t.default$8,0,t.default$8,0),i.emplaceBack(0,t.default$8,0,t.default$8),i.emplaceBack(t.default$8,t.default$8,t.default$8,t.default$8),this.rasterBoundsBuffer=e.createVertexBuffer(i,ee.members),this.rasterBoundsVAO=new ne;var o=new t.PosArray;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,Cn.members),this.viewportVAO=new ne},Un.prototype.clearStencil=function(){var e=this.context,n=e.gl;e.setColorMode(Ze.disabled),e.setDepthMode(We.disabled),e.setStencilMode(new $e({func:n.ALWAYS,mask:0},0,255,n.ZERO,n.ZERO,n.ZERO));var r=t.mat4.create();t.mat4.ortho(r,0,this.width,this.height,0,0,1),t.mat4.scale(r,r,[n.drawingBufferWidth,n.drawingBufferHeight,0]);var i=this.useProgram("clippingMask");n.uniformMatrix4fv(i.uniforms.u_matrix,!1,r),this.viewportVAO.bind(e,i,this.viewportBuffer,[]),n.drawArrays(n.TRIANGLE_STRIP,0,4)},Un.prototype._renderTileClippingMasks=function(t){var e=this.context,n=e.gl;e.setColorMode(Ze.disabled),e.setDepthMode(We.disabled);var r=1;this._tileClippingMaskIDs={};for(var i=0,o=t;i<o.length;i+=1){var a=o[i],s=this._tileClippingMaskIDs[a.key]=r++;e.setStencilMode(new $e({func:n.ALWAYS,mask:0},s,255,n.KEEP,n.KEEP,n.REPLACE));var u=this.useProgram("clippingMask");n.uniformMatrix4fv(u.uniforms.u_matrix,!1,a.posMatrix),this.tileExtentVAO.bind(this.context,u,this.tileExtentBuffer,[]),n.drawArrays(n.TRIANGLE_STRIP,0,this.tileExtentBuffer.length)}},Un.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new $e({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},Un.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new Ze([e.CONSTANT_COLOR,e.ONE],new t.default$6(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?Ze.unblended:Ze.alphaBlended},Un.prototype.depthModeForSublayer=function(t,e,n){var r=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon,i=r-1+this.depthRange;return new We(n||this.context.gl.LEQUAL,e,[i,r])},Un.prototype.render=function(e,n){var r=this;for(var i in this.style=e,this.options=n,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(yt.now()),e.sourceCaches){var o=r.style.sourceCaches[i];o.used&&o.prepare(r.context)}var a=this.style._order,s=t.filterObject(this.style.sourceCaches,function(t){return"raster"===t.getSource().type||"raster-dem"===t.getSource().type});for(var u in s)!function(e){var n=s[e];!function(e,n){for(var r=e.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),i=0;i<r.length;i++){var o={},a=r[i],s=r.slice(i+1);V(a.tileID.wrapped(),a.tileID,s,new t.OverscaledTileID(0,a.tileID.wrap+1,0,0,0),o),a.setMask(o,n)}}(n.getVisibleCoordinates().map(function(t){return n.getTile(t)}),r.context)}(u);this.renderPass="offscreen";var l,c=[];this.depthRboNeedsClear=!0;for(var p=0;p<a.length;p++){var f=r.style._layers[a[p]];f.hasOffscreenPass()&&!f.isHidden(r.transform.zoom)&&(f.source!==(l&&l.id)&&(c=[],(l=r.style.sourceCaches[f.source])&&(c=l.getVisibleCoordinates()).reverse()),c.length&&r.renderLayer(r,l,f,c))}this.context.bindFramebuffer.set(null),this.context.clear({color:n.showOverdrawInspector?t.default$6.black:t.default$6.transparent,depth:1}),this._showOverdrawInspector=n.showOverdrawInspector,this.depthRange=(e._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass="opaque";var h,d=[];for(this.currentLayer=a.length-1,this.currentLayer;this.currentLayer>=0;this.currentLayer--){var m=r.style._layers[a[r.currentLayer]];m.source!==(h&&h.id)&&(d=[],(h=r.style.sourceCaches[m.source])&&(r.clearStencil(),d=h.getVisibleCoordinates(),h.getSource().isTileClipped&&r._renderTileClippingMasks(d))),r.renderLayer(r,h,m,d)}this.renderPass="translucent";var y,v=[];for(this.currentLayer=0,this.currentLayer;this.currentLayer<a.length;this.currentLayer++){var g=r.style._layers[a[r.currentLayer]];g.source!==(y&&y.id)&&(v=[],(y=r.style.sourceCaches[g.source])&&(r.clearStencil(),v=y.getVisibleCoordinates(),y.getSource().isTileClipped&&r._renderTileClippingMasks(v)),v.reverse()),r.renderLayer(r,y,g,v)}if(this.options.showTileBoundaries){var _=this.style.sourceCaches[Object.keys(this.style.sourceCaches)[0]];_&&Vn.debug(this,_,_.getVisibleCoordinates())}},Un.prototype.setupOffscreenDepthRenderbuffer=function(){var t=this.context;this.depthRbo||(this.depthRbo=t.createRenderbuffer(t.gl.DEPTH_COMPONENT16,this.width,this.height))},Un.prototype.renderLayer=function(t,e,n,r){n.isHidden(this.transform.zoom)||("background"===n.type||r.length)&&(this.id=n.id,Vn[n.type](t,e,n,r))},Un.prototype.translatePosMatrix=function(e,n,r,i,o){if(!r[0]&&!r[1])return e;var a=o?"map"===i?this.transform.angle:0:"viewport"===i?-this.transform.angle:0;if(a){var s=Math.sin(a),u=Math.cos(a);r=[r[0]*u-r[1]*s,r[0]*s+r[1]*u]}var l=[o?r[0]:F(n,r[0],this.transform.zoom),o?r[1]:F(n,r[1],this.transform.zoom),0],c=new Float32Array(16);return t.mat4.translate(c,e,l),c},Un.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},Un.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},Un.prototype._createProgramCached=function(t,e){this.cache=this.cache||{};var n=""+t+(e.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new Pn(this.context,In[t],e,this._showOverdrawInspector)),this.cache[n]},Un.prototype.useProgram=function(t,e){var n=this._createProgramCached(t,e||this.emptyProgramConfiguration);return this.context.program.set(n.program),n};var qn=t.default$20.vec4,Wn=t.default$20.mat4,$n=t.default$20.mat2,Zn=function(t,e,n){this.tileSize=512,this._renderWorldCopies=void 0===n||n,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new Ht(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}},Gn={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},x:{configurable:!0},y:{configurable:!0},point:{configurable:!0}};Zn.prototype.clone=function(){var t=new Zn(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},Gn.minZoom.get=function(){return this._minZoom},Gn.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Gn.maxZoom.get=function(){return this._maxZoom},Gn.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Gn.renderWorldCopies.get=function(){return this._renderWorldCopies},Gn.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Gn.worldSize.get=function(){return this.tileSize*this.scale},Gn.centerPoint.get=function(){return this.size._div(2)},Gn.size.get=function(){return new t.default$1(this.width,this.height)},Gn.bearing.get=function(){return-this.angle/Math.PI*180},Gn.bearing.set=function(e){var n=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=$n.create(),$n.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Gn.pitch.get=function(){return this._pitch/Math.PI*180},Gn.pitch.set=function(e){var n=t.clamp(e,0,60)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())},Gn.fov.get=function(){return this._fov/Math.PI*180},Gn.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},Gn.zoom.get=function(){return this._zoom},Gn.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},Gn.center.get=function(){return this._center},Gn.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Zn.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},Zn.prototype.getVisibleUnwrappedCoordinates=function(e){var n=this.pointCoordinate(new t.default$1(0,0),0),r=this.pointCoordinate(new t.default$1(this.width,0),0),i=Math.floor(n.column),o=Math.floor(r.column),a=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var s=i;s<=o;s++)0!==s&&a.push(new t.UnwrappedTileID(s,e));return a},Zn.prototype.coveringTiles=function(e){var n=this.coveringZoomLevel(e),r=n;if(void 0!==e.minzoom&&n<e.minzoom)return[];void 0!==e.maxzoom&&n>e.maxzoom&&(n=e.maxzoom);var i=this.pointCoordinate(this.centerPoint,n),o=new t.default$1(i.column-.5,i.row-.5);return function(e,n,r,i){function o(n,o,u){var l,c,p,f;if(u>=0&&u<=a)for(l=n;l<o;l++)c=Math.floor(l/a),p=(l%a+a)%a,0!==c&&!0!==i||(f=new t.OverscaledTileID(r,c,e,p,u),s[f.key]=f)}void 0===i&&(i=!0);var a=1<<e,s={};return ot(n[0],n[1],n[2],0,a,o),ot(n[2],n[3],n[0],0,a,o),Object.keys(s).map(function(t){return s[t]})}(n,[this.pointCoordinate(new t.default$1(0,0),n),this.pointCoordinate(new t.default$1(this.width,0),n),this.pointCoordinate(new t.default$1(this.width,this.height),n),this.pointCoordinate(new t.default$1(0,this.height),n)],e.reparseOverscaled?r:n,this._renderWorldCopies).sort(function(t,e){return o.dist(t.canonical)-o.dist(e.canonical)})},Zn.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Gn.unmodified.get=function(){return this._unmodified},Zn.prototype.zoomScale=function(t){return Math.pow(2,t)},Zn.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Zn.prototype.project=function(e){return new t.default$1(this.lngX(e.lng),this.latY(e.lat))},Zn.prototype.unproject=function(t){return new Ht(this.xLng(t.x),this.yLat(t.y))},Gn.x.get=function(){return this.lngX(this.center.lng)},Gn.y.get=function(){return this.latY(this.center.lat)},Gn.point.get=function(){return new t.default$1(this.x,this.y)},Zn.prototype.lngX=function(t){return(180+t)*this.worldSize/360},Zn.prototype.latY=function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*this.worldSize/360},Zn.prototype.xLng=function(t){return 360*t/this.worldSize-180},Zn.prototype.yLat=function(t){var e=180-360*t/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90},Zn.prototype.setLocationAtPoint=function(t,e){var n=this.pointCoordinate(e)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(t)._sub(n)),this._renderWorldCopies&&(this.center=this.center.wrap())},Zn.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Zn.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Zn.prototype.locationCoordinate=function(e){return new t.default$17(this.lngX(e.lng)/this.tileSize,this.latY(e.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)},Zn.prototype.coordinateLocation=function(t){var e=t.zoomTo(this.zoom);return new Ht(this.xLng(e.column*this.tileSize),this.yLat(e.row*this.tileSize))},Zn.prototype.pointCoordinate=function(e,n){void 0===n&&(n=this.tileZoom);var r=[e.x,e.y,0,1],i=[e.x,e.y,1,1];qn.transformMat4(r,r,this.pixelMatrixInverse),qn.transformMat4(i,i,this.pixelMatrixInverse);var o=r[3],a=i[3],s=r[0]/o,u=i[0]/a,l=r[1]/o,c=i[1]/a,p=r[2]/o,f=i[2]/a,h=p===f?0:(0-p)/(f-p);return new t.default$17(t.number(s,u,h)/this.tileSize,t.number(l,c,h)/this.tileSize,this.zoom)._zoomTo(n)},Zn.prototype.coordinatePoint=function(e){var n=e.zoomTo(this.zoom),r=[n.column*this.tileSize,n.row*this.tileSize,0,1];return qn.transformMat4(r,r,this.pixelMatrix),new t.default$1(r[0]/r[3],r[1]/r[3])},Zn.prototype.calculatePosMatrix=function(e,n){void 0===n&&(n=!1);var r=e.key,i=n?this._alignedPosMatrixCache:this._posMatrixCache;if(i[r])return i[r];var o=e.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*e.wrap,u=Wn.identity(new Float64Array(16));return Wn.translate(u,u,[s*a,o.y*a,0]),Wn.scale(u,u,[a/t.default$8,a/t.default$8,1]),Wn.multiply(u,n?this.alignedProjMatrix:this.projMatrix,u),i[r]=new Float32Array(u),i[r]},Zn.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,n,r,i,o=-90,a=90,s=-180,u=180,l=this.size,c=this._unmodified;if(this.latRange){var p=this.latRange;o=this.latY(p[1]),e=(a=this.latY(p[0]))-o<l.y?l.y/(a-o):0}if(this.lngRange){var f=this.lngRange;s=this.lngX(f[0]),n=(u=this.lngX(f[1]))-s<l.x?l.x/(u-s):0}var h=Math.max(n||0,e||0);if(h)return this.center=this.unproject(new t.default$1(n?(u+s)/2:this.x,e?(a+o)/2:this.y)),this.zoom+=this.scaleZoom(h),this._unmodified=c,void(this._constraining=!1);if(this.latRange){var d=this.y,m=l.y/2;d-m<o&&(i=o+m),d+m>a&&(i=a-m)}if(this.lngRange){var y=this.x,v=l.x/2;y-v<s&&(r=s+v),y+v>u&&(r=u-v)}void 0===r&&void 0===i||(this.center=this.unproject(new t.default$1(void 0!==r?r:this.x,void 0!==i?i:this.y))),this._unmodified=c,this._constraining=!1}},Zn.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,e=Math.PI/2+this._pitch,n=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-e-t),r=this.x,i=this.y,o=1.01*(Math.cos(Math.PI/2-this._pitch)*n+this.cameraToCenterDistance),a=new Float64Array(16);Wn.perspective(a,this._fov,this.width/this.height,1,o),Wn.scale(a,a,[1,-1,1]),Wn.translate(a,a,[0,0,-this.cameraToCenterDistance]),Wn.rotateX(a,a,this._pitch),Wn.rotateZ(a,a,this.angle),Wn.translate(a,a,[-r,-i,0]);var s=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));Wn.scale(a,a,[1,1,s,1]),this.projMatrix=a;var u=this.width%2/2,l=this.height%2/2,c=Math.cos(this.angle),p=Math.sin(this.angle),f=r-Math.round(r)+c*u+p*l,h=i-Math.round(i)+c*l+p*u,d=new Float64Array(a);if(Wn.translate(d,d,[f>.5?f-1:f,h>.5?h-1:h,0]),this.alignedProjMatrix=d,a=Wn.create(),Wn.scale(a,a,[this.width/2,-this.height/2,1]),Wn.translate(a,a,[1,-1,0]),this.pixelMatrix=Wn.multiply(new Float64Array(16),a,this.projMatrix),!(a=Wn.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=a,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Zn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.default$1(0,0)).zoomTo(this.zoom),n=[e.column*this.tileSize,e.row*this.tileSize,0,1];return qn.transformMat4(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance},Object.defineProperties(Zn.prototype,Gn);var Hn=function(){var e,n,r,i,o;t.bindAll(["_onHashChange","_updateHash"],this),this._updateHash=(e=this._updateHashUnthrottled.bind(this),n=300,r=!1,i=0,o=function(){i=0,r&&(e(),i=setTimeout(o,n),r=!1)},function(){return r=!0,i||o(),i})};Hn.prototype.addTo=function(e){return this._map=e,t.default.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Hn.prototype.remove=function(){return t.default.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Hn.prototype.getHashString=function(t){var e=this._map.getCenter(),n=Math.round(100*this._map.getZoom())/100,r=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,r),o=Math.round(e.lng*i)/i,a=Math.round(e.lat*i)/i,s=this._map.getBearing(),u=this._map.getPitch(),l="";return l+=t?"#/"+o+"/"+a+"/"+n:"#"+n+"/"+a+"/"+o,(s||u)&&(l+="/"+Math.round(10*s)/10),u&&(l+="/"+Math.round(u)),l},Hn.prototype._onHashChange=function(){var e=t.default.location.hash.replace("#","").split("/");return e.length>=3&&(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},Hn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();t.default.history.replaceState(t.default.history.state,"",e)};var Kn=function(e){function n(n,r,i,o){void 0===o&&(o={});var a=_t.mousePos(r.getCanvasContainer(),i),s=r.unproject(a);e.call(this,n,t.extend({point:a,lngLat:s,originalEvent:i},o)),this._defaultPrevented=!1,this.target=r}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var r={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,r),n}(t.Event),Xn=function(e){function n(n,r,i){var o=_t.touchPos(r.getCanvasContainer(),i),a=o.map(function(t){return r.unproject(t)}),s=o.reduce(function(t,e,n,r){return t.add(e.div(r.length))},new t.default$1(0,0)),u=r.unproject(s);e.call(this,n,{points:o,point:s,lngLats:a,lngLat:u,originalEvent:i}),this._defaultPrevented=!1}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var r={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,r),n}(t.Event),Yn=function(t){function e(e,n,r){t.call(this,e,{originalEvent:r}),this._defaultPrevented=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,n),e}(t.Event),Jn=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};Jn.prototype.isEnabled=function(){return!!this._enabled},Jn.prototype.isActive=function(){return!!this._active},Jn.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},Jn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Jn.prototype.onWheel=function(e){if(this.isEnabled()){var n=e.deltaMode===t.default.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,r=yt.now(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==n&&n%4.000244140625==0?this._type="wheel":0!==n&&Math.abs(n)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),e.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=e,this._delta-=n,this.isActive()||this._start(e)),e.preventDefault()}},Jn.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this.isActive()||this._start(t)},Jn.prototype._start=function(e){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this._map.fire(new t.Event("movestart",{originalEvent:e})),this._map.fire(new t.Event("zoomstart",{originalEvent:e})),this._finishTimeout&&clearTimeout(this._finishTimeout);var n=_t.mousePos(this._el,e);this._around=Ht.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame))}},Jn.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var n=this._map.transform;if(0!==this._delta){var r="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?1/450:.01,i=2/(1+Math.exp(-Math.abs(this._delta*r)));this._delta<0&&0!==i&&(i=1/i);var o="number"==typeof this._targetZoom?n.zoomScale(this._targetZoom):n.scale;this._targetZoom=Math.min(n.maxZoom,Math.max(n.minZoom,n.scaleZoom(o*i))),"wheel"===this._type&&(this._startZoom=n.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a=!1;if("wheel"===this._type){var s=Math.min((yt.now()-this._lastWheelEventTime)/200,1),u=this._easing(s);n.zoom=t.number(this._startZoom,this._targetZoom,u),s<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):a=!0}else n.zoom=this._targetZoom,a=!0;n.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event("move",{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event("zoom",{originalEvent:this._lastWheelEvent})),a&&(this._active=!1,this._finishTimeout=setTimeout(function(){e._map.fire(new t.Event("zoomend",{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event("moveend",{originalEvent:e._lastWheelEvent})),delete e._targetZoom},200))}},Jn.prototype._smoothOutEasing=function(e){var n=t.ease;if(this._prevEase){var r=this._prevEase,i=(yt.now()-r.start)/r.duration,o=r.easing(i+.01)-r.easing(i),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);n=t.bezier(a,s,.25,1)}return this._prevEase={start:yt.now(),duration:e,easing:n},n};var Qn=function(e){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),t.bindAll(["_onMouseMove","_onMouseUp","_onKeyDown"],this)};Qn.prototype.isEnabled=function(){return!!this._enabled},Qn.prototype.isActive=function(){return!!this._active},Qn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Qn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Qn.prototype.onMouseDown=function(e){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.default.document.addEventListener("mousemove",this._onMouseMove,!1),t.default.document.addEventListener("keydown",this._onKeyDown,!1),t.default.document.addEventListener("mouseup",this._onMouseUp,!1),_t.disableDrag(),this._startPos=_t.mousePos(this._el,e),this._active=!0)},Qn.prototype._onMouseMove=function(t){var e=this._startPos,n=_t.mousePos(this._el,t);this._box||(this._box=_t.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var r=Math.min(e.x,n.x),i=Math.max(e.x,n.x),o=Math.min(e.y,n.y),a=Math.max(e.y,n.y);_t.setTransform(this._box,"translate("+r+"px,"+o+"px)"),this._box.style.width=i-r+"px",this._box.style.height=a-o+"px"},Qn.prototype._onMouseUp=function(e){if(0===e.button){var n=this._startPos,r=_t.mousePos(this._el,e),i=(new Kt).extend(this._map.unproject(n)).extend(this._map.unproject(r));this._finish(),_t.suppressClick(),n.x===r.x&&n.y===r.y?this._fireEvent("boxzoomcancel",e):this._map.fitBounds(i,{linear:!0}).fire(new t.Event("boxzoomend",{originalEvent:e,boxZoomBounds:i}))}},Qn.prototype._onKeyDown=function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},Qn.prototype._finish=function(){this._active=!1,t.default.document.removeEventListener("mousemove",this._onMouseMove,!1),t.default.document.removeEventListener("keydown",this._onKeyDown,!1),t.default.document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(_t.remove(this._box),this._box=null),_t.enableDrag()},Qn.prototype._fireEvent=function(e,n){return this._map.fire(new t.Event(e,{originalEvent:n}))};var tr=t.bezier(0,0,.25,1),er=function(e,n){this._map=e,this._el=n.element||e.getCanvasContainer(),this._state="disabled",this._button=n.button||"right",this._bearingSnap=n.bearingSnap||0,this._pitchWithRotate=!1!==n.pitchWithRotate,t.bindAll(["_onMouseMove","_onMouseUp","_onBlur","_onDragFrame"],this)};er.prototype.isEnabled=function(){return"disabled"!==this._state},er.prototype.isActive=function(){return"active"===this._state},er.prototype.enable=function(){this.isEnabled()||(this._state="enabled")},er.prototype.disable=function(){if(this.isEnabled())switch(this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("rotateend"),this._pitchWithRotate&&this._fireEvent("pitchend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},er.prototype.onMouseDown=function(e){if("enabled"===this._state){if("right"===this._button){if(this._eventButton=_t.mouseButton(e),this._eventButton!==(e.ctrlKey?0:2))return}else{if(e.ctrlKey||0!==_t.mouseButton(e))return;this._eventButton=0}_t.disableDrag(),t.default.document.addEventListener("mousemove",this._onMouseMove,{capture:!0}),t.default.document.addEventListener("mouseup",this._onMouseUp),t.default.addEventListener("blur",this._onBlur),this._state="pending",this._inertia=[[yt.now(),this._map.getBearing()]],this._previousPos=_t.mousePos(this._el,e),this._center=this._map.transform.centerPoint,e.preventDefault()}},er.prototype._onMouseMove=function(t){this._lastMoveEvent=t,this._pos=_t.mousePos(this._el,t),"pending"===this._state&&(this._state="active",this._fireEvent("rotatestart",t),this._fireEvent("movestart",t),this._pitchWithRotate&&this._fireEvent("pitchstart",t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame))},er.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform,n=this._previousPos,r=this._pos,i=.8*(n.x-r.x),o=-.5*(n.y-r.y),a=e.bearing-i,s=e.pitch-o,u=this._inertia,l=u[u.length-1];this._drainInertiaBuffer(),u.push([yt.now(),this._map._normalizeBearing(a,l[1])]),e.bearing=a,this._pitchWithRotate&&(this._fireEvent("pitch",t),e.pitch=s),this._fireEvent("rotate",t),this._fireEvent("move",t),delete this._lastMoveEvent,this._previousPos=this._pos}},er.prototype._onMouseUp=function(t){if(_t.mouseButton(t)===this._eventButton)switch(this._state){case"active":this._state="enabled",_t.suppressClick(),this._unbind(),this._deactivate(),this._inertialRotate(t);break;case"pending":this._state="enabled",this._unbind()}},er.prototype._onBlur=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._fireEvent("rotateend",t),this._pitchWithRotate&&this._fireEvent("pitchend",t),this._fireEvent("moveend",t);break;case"pending":this._state="enabled",this._unbind()}},er.prototype._unbind=function(){t.default.document.removeEventListener("mousemove",this._onMouseMove,{capture:!0}),t.default.document.removeEventListener("mouseup",this._onMouseUp),t.default.removeEventListener("blur",this._onBlur),_t.enableDrag()},er.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._previousPos},er.prototype._inertialRotate=function(t){var e=this;this._fireEvent("rotateend",t),this._drainInertiaBuffer();var n=this._map,r=n.getBearing(),i=this._inertia,o=function(){Math.abs(r)<e._bearingSnap?n.resetNorth({noMoveStart:!0},{originalEvent:t}):e._fireEvent("moveend",t),e._pitchWithRotate&&e._fireEvent("pitchend",t)};if(i.length<2)o();else{var a=i[0],s=i[i.length-1],u=i[i.length-2],l=n._normalizeBearing(r,u[1]),c=s[1]-a[1],p=c<0?-1:1,f=(s[0]-a[0])/1e3;if(0!==c&&0!==f){var h=Math.abs(c*(.25/f));h>180&&(h=180);var d=h/180;l+=p*h*(d/2),Math.abs(n._normalizeBearing(l,0))<this._bearingSnap&&(l=n._normalizeBearing(0,l)),n.rotateTo(l,{duration:1e3*d,easing:tr,noMoveStart:!0},{originalEvent:t})}else o()}},er.prototype._fireEvent=function(e,n){return this._map.fire(new t.Event(e,n?{originalEvent:n}:{}))},er.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=yt.now();t.length>0&&e-t[0][0]>160;)t.shift()};var nr=t.bezier(0,0,.3,1),rr=function(e){this._map=e,this._el=e.getCanvasContainer(),this._state="disabled",t.bindAll(["_onMove","_onMouseUp","_onTouchEnd","_onBlur","_onDragFrame"],this)};rr.prototype.isEnabled=function(){return"disabled"!==this._state},rr.prototype.isActive=function(){return"active"===this._state},rr.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._state="enabled")},rr.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("dragend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},rr.prototype.onMouseDown=function(e){"enabled"===this._state&&(e.ctrlKey||0!==_t.mouseButton(e)||(_t.addEventListener(t.default.document,"mousemove",this._onMove,{capture:!0}),_t.addEventListener(t.default.document,"mouseup",this._onMouseUp),this._start(e)))},rr.prototype.onTouchStart=function(e){"enabled"===this._state&&(e.touches.length>1||(_t.addEventListener(t.default.document,"touchmove",this._onMove,{capture:!0,passive:!1}),_t.addEventListener(t.default.document,"touchend",this._onTouchEnd),this._start(e)))},rr.prototype._start=function(e){t.default.addEventListener("blur",this._onBlur),this._state="pending",this._previousPos=_t.mousePos(this._el,e),this._inertia=[[yt.now(),this._previousPos]]},rr.prototype._onMove=function(t){this._lastMoveEvent=t,t.preventDefault(),this._pos=_t.mousePos(this._el,t),this._drainInertiaBuffer(),this._inertia.push([yt.now(),this._pos]),"pending"===this._state&&(this._state="active",this._fireEvent("dragstart",t),this._fireEvent("movestart",t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame))},rr.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform;e.setLocationAtPoint(e.pointLocation(this._previousPos),this._pos),this._fireEvent("drag",t),this._fireEvent("move",t),this._previousPos=this._pos,delete this._lastMoveEvent}},rr.prototype._onMouseUp=function(t){if(0===_t.mouseButton(t))switch(this._state){case"active":this._state="enabled",_t.suppressClick(),this._unbind(),this._deactivate(),this._inertialPan(t);break;case"pending":this._state="enabled",this._unbind()}},rr.prototype._onTouchEnd=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._inertialPan(t);break;case"pending":this._state="enabled",this._unbind()}},rr.prototype._onBlur=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._fireEvent("dragend",t),this._fireEvent("moveend",t);break;case"pending":this._state="enabled",this._unbind()}},rr.prototype._unbind=function(){_t.removeEventListener(t.default.document,"touchmove",this._onMove,{capture:!0,passive:!1}),_t.removeEventListener(t.default.document,"touchend",this._onTouchEnd),_t.removeEventListener(t.default.document,"mousemove",this._onMove,{capture:!0}),_t.removeEventListener(t.default.document,"mouseup",this._onMouseUp),_t.removeEventListener(t.default,"blur",this._onBlur)},rr.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._previousPos,delete this._pos},rr.prototype._inertialPan=function(t){this._fireEvent("dragend",t),this._drainInertiaBuffer();var e=this._inertia;if(e.length<2)this._fireEvent("moveend",t);else{var n=e[e.length-1],r=e[0],i=n[1].sub(r[1]),o=(n[0]-r[0])/1e3;if(0===o||n[1].equals(r[1]))this._fireEvent("moveend",t);else{var a=i.mult(.3/o),s=a.mag();s>1400&&(s=1400,a._unit()._mult(s));var u=s/750,l=a.mult(-u/2);this._map.panBy(l,{duration:1e3*u,easing:nr,noMoveStart:!0},{originalEvent:t})}}},rr.prototype._fireEvent=function(e,n){return this._map.fire(new t.Event(e,n?{originalEvent:n}:{}))},rr.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=yt.now();t.length>0&&e-t[0][0]>160;)t.shift()};var ir=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onKeyDown"],this)};ir.prototype.isEnabled=function(){return!!this._enabled},ir.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},ir.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},ir.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,n=0,r=0,i=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?n=-1:(t.preventDefault(),i=-1);break;case 39:t.shiftKey?n=1:(t.preventDefault(),i=1);break;case 38:t.shiftKey?r=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?r=-1:(o=1,t.preventDefault());break;default:return}var a=this._map,s=a.getZoom(),u={duration:300,delayEndEvents:500,easing:at,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:a.getBearing()+15*n,pitch:a.getPitch()+10*r,offset:[100*-i,100*-o],center:a.getCenter()};a.easeTo(u,{originalEvent:t})}};var or=function(e){this._map=e,t.bindAll(["_onDblClick","_onZoomEnd"],this)};or.prototype.isEnabled=function(){return!!this._enabled},or.prototype.isActive=function(){return!!this._active},or.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},or.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},or.prototype.onTouchStart=function(t){var e=this;this.isEnabled()&&(t.points.length>1||(this._tapped?(clearTimeout(this._tapped),this._tapped=null,this._zoom(t)):this._tapped=setTimeout(function(){e._tapped=null},300)))},or.prototype.onDblClick=function(t){this.isEnabled()&&(t.originalEvent.preventDefault(),this._zoom(t))},or.prototype._zoom=function(t){this._active=!0,this._map.on("zoomend",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},or.prototype._onZoomEnd=function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)};var ar=t.bezier(0,0,.15,1),sr=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onMove","_onEnd","_onTouchFrame"],this)};sr.prototype.isEnabled=function(){return!!this._enabled},sr.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around)},sr.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._enabled=!1)},sr.prototype.disableRotation=function(){this._rotationDisabled=!0},sr.prototype.enableRotation=function(){this._rotationDisabled=!1},sr.prototype.onStart=function(e){if(this.isEnabled()&&2===e.touches.length){var n=_t.mousePos(this._el,e.touches[0]),r=_t.mousePos(this._el,e.touches[1]);this._startVec=n.sub(r),this._gestureIntent=void 0,this._inertia=[],_t.addEventListener(t.default.document,"touchmove",this._onMove,{passive:!1}),_t.addEventListener(t.default.document,"touchend",this._onEnd)}},sr.prototype._getTouchEventData=function(t){var e=_t.mousePos(this._el,t.touches[0]),n=_t.mousePos(this._el,t.touches[1]),r=e.sub(n);return{vec:r,center:e.add(n).div(2),scale:r.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*r.angleWith(this._startVec)/Math.PI}},sr.prototype._onMove=function(e){if(2===e.touches.length){var n=this._getTouchEventData(e),r=n.vec,i=n.scale,o=n.bearing;if(!this._gestureIntent){var a=Math.abs(1-i)>.15;Math.abs(o)>10?this._gestureIntent="rotate":a&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._map.fire(new t.Event(this._gestureIntent+"start",{originalEvent:e})),this._map.fire(new t.Event("movestart",{originalEvent:e})),this._startVec=r)}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault()}},sr.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var n=this._map.transform;this._startScale||(this._startScale=n.scale,this._startBearing=n.bearing);var r=this._getTouchEventData(this._lastTouchEvent),i=r.center,o=r.bearing,a=r.scale,s=n.pointLocation(i),u=n.locationPoint(s);"rotate"===e&&(n.bearing=this._startBearing+o),n.zoom=n.scaleZoom(this._startScale*a),n.setLocationAtPoint(s,u),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event("move",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([yt.now(),a,i])}},sr.prototype._onEnd=function(e){_t.removeEventListener(t.default.document,"touchmove",this._onMove,{passive:!1}),_t.removeEventListener(t.default.document,"touchend",this._onEnd);var n=this._gestureIntent,r=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,n){this._map.fire(new t.Event(n+"end",{originalEvent:e})),this._drainInertiaBuffer();var i=this._inertia,o=this._map;if(i.length<2)o.snapToNorth({},{originalEvent:e});else{var a=i[i.length-1],s=i[0],u=o.transform.scaleZoom(r*a[1]),l=o.transform.scaleZoom(r*s[1]),c=u-l,p=(a[0]-s[0])/1e3,f=a[2];if(0!==p&&u!==l){var h=.15*c/p;Math.abs(h)>2.5&&(h=h>0?2.5:-2.5);var d=1e3*Math.abs(h/(12*.15)),m=u+h*d/2e3;m<0&&(m=0),o.easeTo({zoom:m,duration:d,easing:ar,around:this._aroundCenter?o.getCenter():o.unproject(f),noMoveStart:!0},{originalEvent:e})}else o.snapToNorth({},{originalEvent:e})}}},sr.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=yt.now();t.length>2&&e-t[0][0]>160;)t.shift()};var ur={scrollZoom:Jn,boxZoom:Qn,dragRotate:er,dragPan:rr,keyboard:ir,doubleClickZoom:or,touchZoomRotate:sr},lr=function(e){function n(n,r){e.call(this),this._moving=!1,this._zooming=!1,this.transform=n,this._bearingSnap=r.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.getCenter=function(){return this.transform.center},n.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},n.prototype.panBy=function(e,n,r){return e=t.default$1.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},n),r)},n.prototype.panTo=function(e,n,r){return this.easeTo(t.extend({center:e},n),r)},n.prototype.getZoom=function(){return this.transform.zoom},n.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},n.prototype.zoomTo=function(e,n,r){return this.easeTo(t.extend({zoom:e},n),r)},n.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},n.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},n.prototype.getBearing=function(){return this.transform.bearing},n.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},n.prototype.rotateTo=function(e,n,r){return this.easeTo(t.extend({bearing:e},n),r)},n.prototype.resetNorth=function(e,n){return this.rotateTo(0,t.extend({duration:1e3},e),n),this},n.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},n.prototype.getPitch=function(){return this.transform.pitch},n.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},n.prototype.fitBounds=function(e,n,r){if("number"==typeof(n=t.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},n)).padding){var i=n.padding;n.padding={top:i,bottom:i,right:i,left:i}}if(!t.default$10(Object.keys(n.padding).sort(function(t,e){return t<e?-1:t>e?1:0}),["bottom","left","right","top"]))return t.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'"),this;e=Kt.convert(e);var o=[(n.padding.left-n.padding.right)/2,(n.padding.top-n.padding.bottom)/2],a=Math.min(n.padding.right,n.padding.left),s=Math.min(n.padding.top,n.padding.bottom);n.offset=[n.offset[0]+o[0],n.offset[1]+o[1]];var u=t.default$1.convert(n.offset),l=this.transform,c=l.project(e.getNorthWest()),p=l.project(e.getSouthEast()),f=p.sub(c),h=(l.width-2*a-2*Math.abs(u.x))/f.x,d=(l.height-2*s-2*Math.abs(u.y))/f.y;return d<0||h<0?(t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset."),this):(n.center=l.unproject(c.add(p).div(2)),n.zoom=Math.min(l.scaleZoom(l.scale*Math.min(h,d)),n.maxZoom),n.bearing=0,n.linear?this.easeTo(n,r):this.flyTo(n,r))},n.prototype.jumpTo=function(e,n){this.stop();var r=this.transform,i=!1,o=!1,a=!1;return"zoom"in e&&r.zoom!==+e.zoom&&(i=!0,r.zoom=+e.zoom),void 0!==e.center&&(r.center=Ht.convert(e.center)),"bearing"in e&&r.bearing!==+e.bearing&&(o=!0,r.bearing=+e.bearing),"pitch"in e&&r.pitch!==+e.pitch&&(a=!0,r.pitch=+e.pitch),this.fire(new t.Event("movestart",n)).fire(new t.Event("move",n)),i&&this.fire(new t.Event("zoomstart",n)).fire(new t.Event("zoom",n)).fire(new t.Event("zoomend",n)),o&&this.fire(new t.Event("rotatestart",n)).fire(new t.Event("rotate",n)).fire(new t.Event("rotateend",n)),a&&this.fire(new t.Event("pitchstart",n)).fire(new t.Event("pitch",n)).fire(new t.Event("pitchend",n)),this.fire(new t.Event("moveend",n))},n.prototype.easeTo=function(e,n){var r=this;this.stop(),!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate&&(e.duration=0);var i=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),u="zoom"in e?+e.zoom:o,l="bearing"in e?this._normalizeBearing(e.bearing,a):a,c="pitch"in e?+e.pitch:s,p=i.centerPoint.add(t.default$1.convert(e.offset)),f=i.pointLocation(p),h=Ht.convert(e.center||f);this._normalizeCenter(h);var d,m,y=i.project(f),v=i.project(h).sub(y),g=i.zoomScale(u-o);return e.around&&(d=Ht.convert(e.around),m=i.locationPoint(d)),this._zooming=u!==o,this._rotating=a!==l,this._pitching=c!==s,this._prepareEase(n,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(r._zooming&&(i.zoom=t.number(o,u,e)),r._rotating&&(i.bearing=t.number(a,l,e)),r._pitching&&(i.pitch=t.number(s,c,e)),d)i.setLocationAtPoint(d,m);else{var f=i.zoomScale(i.zoom-o),h=u>o?Math.min(2,g):Math.max(.5,g),_=Math.pow(h,1-e),b=i.unproject(y.add(v.mult(e*_)).mult(f));i.setLocationAtPoint(i.renderWorldCopies?b.wrap():b,p)}r._fireMoveEvents(n)},function(){e.delayEndEvents?r._easeEndTimeoutID=setTimeout(function(){return r._afterEase(n)},e.delayEndEvents):r._afterEase(n)},e),this},n.prototype._prepareEase=function(e,n){this._moving=!0,n||this.fire(new t.Event("movestart",e)),this._zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&this.fire(new t.Event("pitchstart",e))},n.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},n.prototype._afterEase=function(e){var n=this._zooming,r=this._rotating,i=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,n&&this.fire(new t.Event("zoomend",e)),r&&this.fire(new t.Event("rotateend",e)),i&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))},n.prototype.flyTo=function(e,n){function r(t){var e=(w*w-x*x+(t?-1:1)*C*C*E*E)/(2*(t?w:x)*C*E);return Math.log(Math.sqrt(e*e+1)-e)}function i(t){return(Math.exp(t)-Math.exp(-t))/2}function o(t){return(Math.exp(t)+Math.exp(-t))/2}var a=this;this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var s=this.transform,u=this.getZoom(),l=this.getBearing(),c=this.getPitch(),p="zoom"in e?t.clamp(+e.zoom,s.minZoom,s.maxZoom):u,f="bearing"in e?this._normalizeBearing(e.bearing,l):l,h="pitch"in e?+e.pitch:c,d=s.zoomScale(p-u),m=s.centerPoint.add(t.default$1.convert(e.offset)),y=s.pointLocation(m),v=Ht.convert(e.center||y);this._normalizeCenter(v);var g=s.project(y),_=s.project(v).sub(g),b=e.curve,x=Math.max(s.width,s.height),w=x/d,E=_.mag();if("minZoom"in e){var S=t.clamp(Math.min(e.minZoom,u,p),s.minZoom,s.maxZoom),T=x/s.zoomScale(S-u);b=Math.sqrt(T/E*2)}var C=b*b,A=r(0),O=function(t){return o(A)/o(A+b*t)},k=function(t){return x*((o(A)*(i(e=A+b*t)/o(e))-i(A))/C)/E;var e},I=(r(1)-A)/b;if(Math.abs(E)<1e-6||!isFinite(I)){if(Math.abs(x-w)<1e-6)return this.easeTo(e,n);var P=w<x?-1:1;I=Math.abs(Math.log(w/x))/b,k=function(){return 0},O=function(t){return Math.exp(P*b*t)}}if("duration"in e)e.duration=+e.duration;else{var z="screenSpeed"in e?+e.screenSpeed/b:+e.speed;e.duration=1e3*I/z}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=l!==f,this._pitching=h!==c,this._prepareEase(n,!1),this._ease(function(e){var r=e*I,i=1/O(r);s.zoom=u+s.scaleZoom(i),a._rotating&&(s.bearing=t.number(l,f,e)),a._pitching&&(s.pitch=t.number(c,h,e));var o=s.unproject(g.add(_.mult(k(r))).mult(i));s.setLocationAtPoint(s.renderWorldCopies?o.wrap():o,m),a._fireMoveEvents(n)},function(){return a._afterEase(n)},e),this},n.prototype.isEasing=function(){return!!this._easeFrameId},n.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this)}return this},n.prototype._ease=function(t,e,n){!1===n.animate||0===n.duration?(t(1),e()):(this._easeStart=yt.now(),this._easeOptions=n,this._onEaseFrame=t,this._onEaseEnd=e,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},n.prototype._renderFrameCallback=function(){var t=Math.min((yt.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},n.prototype._normalizeBearing=function(e,n){e=t.wrap(e,-180,180);var r=Math.abs(e-n);return Math.abs(e-360-n)<r&&(e-=360),Math.abs(e+360-n)<r&&(e+=360),e},n.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var n=t.lng-e.center.lng;t.lng+=n>180?-360:n<-180?360:0}},n}(t.Evented),cr=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};cr.prototype.getDefaultPosition=function(){return"bottom-right"},cr.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=_t.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},cr.prototype.onRemove=function(){_t.remove(this._container),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0},cr.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));var e=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:Ct.ACCESS_TOKEN}];if(t){var n=e.reduce(function(t,n,r){return n.value&&(t+=n.key+"="+n.value+(r<e.length-1?"&":"")),t},"?");t.href="https://www.mapbox.com/feedback/"+n+(this._map._hash?this._map._hash.getHashString(!0):"")}},cr.prototype._updateData=function(t){t&&"metadata"===t.sourceDataType&&(this._updateAttributions(),this._updateEditLink())},cr.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var n=this._map.style.sourceCaches;for(var r in n){var i=n[r].getSource();i.attribution&&t.indexOf(i.attribution)<0&&t.push(i.attribution)}t.sort(function(t,e){return t.length-e.length}),(t=t.filter(function(e,n){for(var r=n+1;r<t.length;r++)if(t[r].indexOf(e)>=0)return!1;return!0})).length?(this._container.innerHTML=t.join(" | "),this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null}},cr.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var pr=function(){t.bindAll(["_updateLogo"],this)};pr.prototype.onAdd=function(t){this._map=t,this._container=_t.create("div","mapboxgl-ctrl");var e=_t.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.href="https://www.mapbox.com/",e.setAttribute("aria-label","Mapbox logo"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._container},pr.prototype.onRemove=function(){_t.remove(this._container),this._map.off("sourcedata",this._updateLogo)},pr.prototype.getDefaultPosition=function(){return"bottom-left"},pr.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},pr.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}};var fr=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};fr.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},fr.prototype.remove=function(t){for(var e=this._currentlyRunning,n=0,r=e?this._queue.concat(e):this._queue;n<r.length;n+=1){var i=r[n];if(i.id===t)return void(i.cancelled=!0)}},fr.prototype.run=function(){var t=this._currentlyRunning=this._queue;this._queue=[];for(var e=0,n=t;e<n.length;e+=1){var r=n[e];if(!r.cancelled&&(r.callback(),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},fr.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var hr=t.default.HTMLImageElement,dr=t.default.HTMLElement,mr={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,transformRequest:null,fadeDuration:300},yr=function(e){function n(n){if(null!=(n=t.extend({},mr,n)).minZoom&&null!=n.maxZoom&&n.minZoom>n.maxZoom)throw new Error("maxZoom must be greater than minZoom");var r=new Zn(n.minZoom,n.maxZoom,n.renderWorldCopies);e.call(this,r,n),this._interactive=n.interactive,this._maxTileCacheSize=n.maxTileCacheSize,this._failIfMajorPerformanceCaveat=n.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=n.preserveDrawingBuffer,this._trackResize=n.trackResize,this._bearingSnap=n.bearingSnap,this._refreshExpiredTiles=n.refreshExpiredTiles,this._fadeDuration=n.fadeDuration,this._crossFadingFactor=1,this._collectResourceTiming=n.collectResourceTiming,this._renderTaskQueue=new fr;var i=n.transformRequest;if(this._transformRequest=i?function(t,e){return i(t,e)||{url:t}}:function(t){return{url:t}},"string"==typeof n.container){var o=t.default.document.getElementById(n.container);if(!o)throw new Error("Container '"+n.container+"' not found.");this._container=o}else{if(!(n.container instanceof dr))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=n.container}n.maxBounds&&this.setMaxBounds(n.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored","_update","_render","_onData","_onDataLoading"],this),this._setupContainer(),this._setupPainter(),this.on("move",this._update.bind(this,!1)),this.on("zoom",this._update.bind(this,!0)),void 0!==t.default&&(t.default.addEventListener("online",this._onWindowOnline,!1),t.default.addEventListener("resize",this._onWindowResize,!1)),function(t,e){var n=t.getCanvasContainer(),r=null,i=!1;for(var o in ur)t[o]=new ur[o](t,e),e.interactive&&e[o]&&t[o].enable(e[o]);_t.addEventListener(n,"mouseout",function(e){t.fire(new Kn("mouseout",t,e))}),_t.addEventListener(n,"mousedown",function(n){i=!0;var r=new Kn("mousedown",t,n);t.fire(r),r.defaultPrevented||(e.interactive&&!t.doubleClickZoom.isActive()&&t.stop(),t.boxZoom.onMouseDown(n),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(n),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(n))}),_t.addEventListener(n,"mouseup",function(e){var n=t.dragRotate.isActive();r&&!n&&t.fire(new Kn("contextmenu",t,r)),r=null,i=!1,t.fire(new Kn("mouseup",t,e))}),_t.addEventListener(n,"mousemove",function(e){if(!t.dragPan.isActive()&&!t.dragRotate.isActive()){for(var r=e.toElement||e.target;r&&r!==n;)r=r.parentNode;r===n&&t.fire(new Kn("mousemove",t,e))}}),_t.addEventListener(n,"mouseover",function(e){for(var r=e.toElement||e.target;r&&r!==n;)r=r.parentNode;r===n&&t.fire(new Kn("mouseover",t,e))}),_t.addEventListener(n,"touchstart",function(n){var r=new Xn("touchstart",t,n);t.fire(r),r.defaultPrevented||(e.interactive&&t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(n),t.touchZoomRotate.onStart(n),t.doubleClickZoom.onTouchStart(r))},{passive:!1}),_t.addEventListener(n,"touchmove",function(e){t.fire(new Xn("touchmove",t,e))},{passive:!1}),_t.addEventListener(n,"touchend",function(e){t.fire(new Xn("touchend",t,e))}),_t.addEventListener(n,"touchcancel",function(e){t.fire(new Xn("touchcancel",t,e))}),_t.addEventListener(n,"click",function(e){t.fire(new Kn("click",t,e))}),_t.addEventListener(n,"dblclick",function(e){var n=new Kn("dblclick",t,e);t.fire(n),n.defaultPrevented||t.doubleClickZoom.onDblClick(n)}),_t.addEventListener(n,"contextmenu",function(e){var n=t.dragRotate.isActive();i||n?i&&(r=e):t.fire(new Kn("contextmenu",t,e)),e.preventDefault()}),_t.addEventListener(n,"wheel",function(e){var n=new Yn("wheel",t,e);t.fire(n),n.defaultPrevented||t.scrollZoom.onWheel(e)},{passive:!1})}(this,n),this._hash=n.hash&&(new Hn).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:n.center,zoom:n.zoom,bearing:n.bearing,pitch:n.pitch}),this.resize(),n.style&&this.setStyle(n.style,{localIdeographFontFamily:n.localIdeographFontFamily}),n.attributionControl&&this.addControl(new cr),this.addControl(new pr,n.logoPosition),this.on("style.load",function(){this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",this._onData),this.on("dataloading",this._onDataLoading)}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var r={showTileBoundaries:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0}};return n.prototype.addControl=function(t,e){void 0===e&&t.getDefaultPosition&&(e=t.getDefaultPosition()),void 0===e&&(e="top-right");var n=t.onAdd(this),r=this._controlPositions[e];return-1!==e.indexOf("bottom")?r.insertBefore(n,r.firstChild):r.appendChild(n),this},n.prototype.removeControl=function(t){return t.onRemove(this),this},n.prototype.resize=function(e){var n=this._containerDimensions(),r=n[0],i=n[1];return this._resizeCanvas(r,i),this.transform.resize(r,i),this.painter.resize(r,i),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e)).fire(new t.Event("resize",e)).fire(new t.Event("moveend",e))},n.prototype.getBounds=function(){var e=new Kt(this.transform.pointLocation(new t.default$1(0,this.transform.height)),this.transform.pointLocation(new t.default$1(this.transform.width,0)));return(this.transform.angle||this.transform.pitch)&&(e.extend(this.transform.pointLocation(new t.default$1(this.transform.size.x,0))),e.extend(this.transform.pointLocation(new t.default$1(0,this.transform.size.y)))),e},n.prototype.getMaxBounds=function(){return this.transform.latRange&&2===this.transform.latRange.length&&this.transform.lngRange&&2===this.transform.lngRange.length?new Kt([this.transform.lngRange[0],this.transform.latRange[0]],[this.transform.lngRange[1],this.transform.latRange[1]]):null},n.prototype.setMaxBounds=function(t){if(t){var e=Kt.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null==t&&(this.transform.lngRange=null,this.transform.latRange=null,this._update());return this},n.prototype.setMinZoom=function(t){if((t=null==t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error("minZoom must be between 0 and the current maxZoom, inclusive")},n.prototype.getMinZoom=function(){return this.transform.minZoom},n.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},n.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},n.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update(),this},n.prototype.getMaxZoom=function(){return this.transform.maxZoom},n.prototype.project=function(t){return this.transform.locationPoint(Ht.convert(t))},n.prototype.unproject=function(e){return this.transform.pointLocation(t.default$1.convert(e))},n.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},n.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isActive()},n.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},n.prototype.on=function(t,n,r){var i,o=this;if(void 0===r)return e.prototype.on.call(this,t,n);var a=function(){if("mouseenter"===t||"mouseover"===t){var e=!1;return{layer:n,listener:r,delegates:{mousemove:function(i){var a=o.getLayer(n)?o.queryRenderedFeatures(i.point,{layers:[n]}):[];a.length?e||(e=!0,r.call(o,new Kn(t,o,i.originalEvent,{features:a}))):e=!1},mouseout:function(){e=!1}}}}if("mouseleave"===t||"mouseout"===t){var a=!1;return{layer:n,listener:r,delegates:{mousemove:function(e){(o.getLayer(n)?o.queryRenderedFeatures(e.point,{layers:[n]}):[]).length?a=!0:a&&(a=!1,r.call(o,new Kn(t,o,e.originalEvent)))},mouseout:function(e){a&&(a=!1,r.call(o,new Kn(t,o,e.originalEvent)))}}}}return{layer:n,listener:r,delegates:(i={},i[t]=function(t){var e=o.getLayer(n)?o.queryRenderedFeatures(t.point,{layers:[n]}):[];e.length&&(t.features=e,r.call(o,t),delete t.features)},i)}}();for(var s in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(a),a.delegates)o.on(s,a.delegates[s]);return this},n.prototype.off=function(t,n,r){if(void 0===r)return e.prototype.off.call(this,t,n);if(this._delegatedListeners&&this._delegatedListeners[t])for(var i=this._delegatedListeners[t],o=0;o<i.length;o++){var a=i[o];if(a.layer===n&&a.listener===r){for(var s in a.delegates)this.off(s,a.delegates[s]);return i.splice(o,1),this}}return this},n.prototype.queryRenderedFeatures=function(e,n){var r;return 2===arguments.length?(e=arguments[0],n=arguments[1]):1===arguments.length&&((r=arguments[0])instanceof t.default$1||Array.isArray(r))?(e=arguments[0],n={}):1===arguments.length?(e=void 0,n=arguments[0]):(e=void 0,n={}),this.style?this.style.queryRenderedFeatures(this._makeQueryGeometry(e),n,this.transform):[]},n.prototype._makeQueryGeometry=function(e){var n,r=this;if(void 0===e&&(e=[t.default$1.convert([0,0]),t.default$1.convert([this.transform.width,this.transform.height])]),e instanceof t.default$1||"number"==typeof e[0])n=[t.default$1.convert(e)];else{var i=[t.default$1.convert(e[0]),t.default$1.convert(e[1])];n=[i[0],new t.default$1(i[1].x,i[0].y),i[1],new t.default$1(i[0].x,i[1].y),i[0]]}return{viewport:n,worldCoordinate:n.map(function(t){return r.transform.pointCoordinate(t)})}},n.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},n.prototype.setStyle=function(e,n){if((!n||!1!==n.diff&&!n.localIdeographFontFamily)&&this.style&&e&&"object"==typeof e)try{return this.style.setState(e)&&this._update(!0),this}catch(e){t.warnOnce("Unable to perform style diff: "+(e.message||e.error||e)+".  Rebuilding the style from scratch.")}return this.style&&(this.style.setEventedParent(null),this.style._remove()),e?(this.style=new Tn(this,n||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e):this.style.loadJSON(e),this):(delete this.style,this)},n.prototype.getStyle=function(){if(this.style)return this.style.serialize()},n.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce("There is no style added to the map.")},n.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0),this},n.prototype.isSourceLoaded=function(e){var n=this.style&&this.style.sourceCaches[e];if(void 0!==n)return n.loaded();this.fire(new t.ErrorEvent(new Error("There is no source with ID '"+e+"'")))},n.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var n=t[e]._tiles;for(var r in n){var i=n[r];if("loaded"!==i.state&&"errored"!==i.state)return!1}}return!0},n.prototype.addSourceType=function(t,e,n){return this.style.addSourceType(t,e,n)},n.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0),this},n.prototype.getSource=function(t){return this.style.getSource(t)},n.prototype.addImage=function(e,n,r){void 0===r&&(r={});var i=r.pixelRatio;void 0===i&&(i=1);var o=r.sdf;if(void 0===o&&(o=!1),n instanceof hr){var a=yt.getImageData(n),s=a.width,u=a.height,l=a.data;this.style.addImage(e,{data:new t.RGBAImage({width:s,height:u},l),pixelRatio:i,sdf:o})}else{if(void 0===n.width||void 0===n.height)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var c=n.width,p=n.height,f=n.data;this.style.addImage(e,{data:new t.RGBAImage({width:c,height:p},f.slice(0)),pixelRatio:i,sdf:o})}},n.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)},n.prototype.removeImage=function(t){this.style.removeImage(t)},n.prototype.loadImage=function(e,n){t.getImage(this._transformRequest(e,t.ResourceType.Image),n)},n.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0),this},n.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0),this},n.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0),this},n.prototype.getLayer=function(t){return this.style.getLayer(t)},n.prototype.setFilter=function(t,e){return this.style.setFilter(t,e),this._update(!0),this},n.prototype.setLayerZoomRange=function(t,e,n){return this.style.setLayerZoomRange(t,e,n),this._update(!0),this},n.prototype.getFilter=function(t){return this.style.getFilter(t)},n.prototype.setPaintProperty=function(t,e,n){return this.style.setPaintProperty(t,e,n),this._update(!0),this},n.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},n.prototype.setLayoutProperty=function(t,e,n){return this.style.setLayoutProperty(t,e,n),this._update(!0),this},n.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},n.prototype.setLight=function(t){return this.style.setLight(t),this._update(!0),this},n.prototype.getLight=function(){return this.style.getLight()},n.prototype.getContainer=function(){return this._container},n.prototype.getCanvasContainer=function(){return this._canvasContainer},n.prototype.getCanvas=function(){return this._canvas},n.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]},n.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSContainer=_t.create("div","mapboxgl-missing-css",t)).innerHTML="Missing Mapbox GL JS CSS";var e=this._canvasContainer=_t.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=_t.create("canvas","mapboxgl-canvas",e),this._canvas.style.position="absolute",this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var n=this._containerDimensions();this._resizeCanvas(n[0],n[1]);var r=this._controlContainer=_t.create("div","mapboxgl-control-container",t),i=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){i[t]=_t.create("div","mapboxgl-ctrl-"+t,r)})},n.prototype._resizeCanvas=function(e,n){var r=t.default.devicePixelRatio||1;this._canvas.width=r*e,this._canvas.height=r*n,this._canvas.style.width=e+"px",this._canvas.style.height=n+"px"},n.prototype._setupPainter=function(){var e=t.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},ft.webGLContextAttributes),n=this._canvas.getContext("webgl",e)||this._canvas.getContext("experimental-webgl",e);n?this.painter=new Un(n,this.transform):this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")))},n.prototype._contextLost=function(e){e.preventDefault(),this._frameId&&(yt.cancelFrame(this._frameId),this._frameId=null),this.fire(new t.Event("webglcontextlost",{originalEvent:e}))},n.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:e}))},n.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},n.prototype._update=function(t){this.style&&(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender())},n.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},n.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},n.prototype._render=function(){this._renderTaskQueue.run();var e=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var n=this.transform.zoom,r=yt.now();this.style.zoomHistory.update(n,r);var i=new t.default$16(n,{now:r,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),o=i.crossFadingFactor();1===o&&o===this._crossFadingFactor||(e=!0,this._crossFadingFactor=o),this.style.update(i)}return this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),fadeDuration:this._fadeDuration}),this.fire(new t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||e)&&(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty||this._placementDirty)&&this._rerender(),this},n.prototype.remove=function(){this._hash&&this._hash.remove(),yt.cancelFrame(this._frameId),this._renderTaskQueue.clear(),this._frameId=null,this.setStyle(null),void 0!==t.default&&(t.default.removeEventListener("resize",this._onWindowResize,!1),t.default.removeEventListener("online",this._onWindowOnline,!1));var e=this.painter.context.gl.getExtension("WEBGL_lose_context");e&&e.loseContext(),st(this._canvasContainer),st(this._controlContainer),st(this._missingCSSContainer),this._container.classList.remove("mapboxgl-map"),this.fire(new t.Event("remove"))},n.prototype._rerender=function(){var t=this;this.style&&!this._frameId&&(this._frameId=yt.frame(function(){t._frameId=null,t._render()}))},n.prototype._onWindowOnline=function(){this._update()},n.prototype._onWindowResize=function(){this._trackResize&&this.stop().resize()._update()},r.showTileBoundaries.get=function(){return!!this._showTileBoundaries},r.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},r.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},r.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},r.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},r.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},r.repaint.get=function(){return!!this._repaint},r.repaint.set=function(t){this._repaint=t,this._update()},r.vertices.get=function(){return!!this._vertices},r.vertices.set=function(t){this._vertices=t,this._update()},n.prototype._onData=function(e){this._update("style"===e.dataType),this.fire(new t.Event(e.dataType+"data",e))},n.prototype._onDataLoading=function(e){this.fire(new t.Event(e.dataType+"dataloading",e))},Object.defineProperties(n.prototype,r),n}(lr),vr={showCompass:!0,showZoom:!0},gr=function(e){var n=this;this.options=t.extend({},vr,e),this._container=_t.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this.options.showZoom&&(this._zoomInButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in","Zoom In",function(){return n._map.zoomIn()}),this._zoomOutButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out","Zoom Out",function(){return n._map.zoomOut()})),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-compass","Reset North",function(){return n._map.resetNorth()}),this._compassArrow=_t.create("span","mapboxgl-ctrl-compass-arrow",this._compass))};gr.prototype._rotateCompassArrow=function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t},gr.prototype.onAdd=function(t){return this._map=t,this.options.showCompass&&(this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new er(t,{button:"left",element:this._compass}),this._handler.enable()),this._container},gr.prototype.onRemove=function(){_t.remove(this._container),this.options.showCompass&&(this._map.off("rotate",this._rotateCompassArrow),this._handler.disable(),delete this._handler),delete this._map},gr.prototype._createButton=function(t,e,n){var r=_t.create("button",t,this._container);return r.type="button",r.setAttribute("aria-label",e),r.addEventListener("click",n),r};var _r={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"},br=function(e){if((arguments[0]instanceof t.default.HTMLElement||2===arguments.length)&&(e=t.extend({element:e},arguments[1])),t.bindAll(["_update","_onMapClick"],this),this._anchor=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",e&&e.element)this._element=e.element,this._offset=t.default$1.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=_t.create("div");var n=_t.createNS("http://www.w3.org/2000/svg","svg");n.setAttributeNS(null,"height","41px"),n.setAttributeNS(null,"width","27px"),n.setAttributeNS(null,"viewBox","0 0 27 41");var r=_t.createNS("http://www.w3.org/2000/svg","g");r.setAttributeNS(null,"stroke","none"),r.setAttributeNS(null,"stroke-width","1"),r.setAttributeNS(null,"fill","none"),r.setAttributeNS(null,"fill-rule","evenodd");var i=_t.createNS("http://www.w3.org/2000/svg","g");i.setAttributeNS(null,"fill-rule","nonzero");var o=_t.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"transform","translate(3.0, 29.0)"),o.setAttributeNS(null,"fill","#000000");for(var a=0,s=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];a<s.length;a+=1){var u=s[a],l=_t.createNS("http://www.w3.org/2000/svg","ellipse");l.setAttributeNS(null,"opacity","0.04"),l.setAttributeNS(null,"cx","10.5"),l.setAttributeNS(null,"cy","5.80029008"),l.setAttributeNS(null,"rx",u.rx),l.setAttributeNS(null,"ry",u.ry),o.appendChild(l)}var c=_t.createNS("http://www.w3.org/2000/svg","g");c.setAttributeNS(null,"fill",this._color);var p=_t.createNS("http://www.w3.org/2000/svg","path");p.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),c.appendChild(p);var f=_t.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"opacity","0.25"),f.setAttributeNS(null,"fill","#000000");var h=_t.createNS("http://www.w3.org/2000/svg","path");h.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),f.appendChild(h);var d=_t.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"transform","translate(6.0, 7.0)"),d.setAttributeNS(null,"fill","#FFFFFF");var m=_t.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"transform","translate(8.0, 8.0)");var y=_t.createNS("http://www.w3.org/2000/svg","circle");y.setAttributeNS(null,"fill","#000000"),y.setAttributeNS(null,"opacity","0.25"),y.setAttributeNS(null,"cx","5.5"),y.setAttributeNS(null,"cy","5.5"),y.setAttributeNS(null,"r","5.4999962");var v=_t.createNS("http://www.w3.org/2000/svg","circle");v.setAttributeNS(null,"fill","#FFFFFF"),v.setAttributeNS(null,"cx","5.5"),v.setAttributeNS(null,"cy","5.5"),v.setAttributeNS(null,"r","5.4999962"),m.appendChild(y),m.appendChild(v),i.appendChild(o),i.appendChild(c),i.appendChild(f),i.appendChild(d),i.appendChild(m),n.appendChild(i),this._element.appendChild(n),this._offset=t.default$1.convert(e&&e.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._popup=null};br.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this._update(),this._map.on("click",this._onMapClick),this},br.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),delete this._map),_t.remove(this._element),this._popup&&this._popup.remove(),this},br.prototype.getLngLat=function(){return this._lngLat},br.prototype.setLngLat=function(t){return this._lngLat=Ht.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},br.prototype.getElement=function(){return this._element},br.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null),t){if(!("offset"in t.options)){var e=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[e,-1*(24.6+e)],"bottom-right":[-e,-1*(24.6+e)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat)}return this},br.prototype._onMapClick=function(t){var e=t.originalEvent.target,n=this._element;this._popup&&(e===n||n.contains(e))&&this.togglePopup()},br.prototype.getPopup=function(){return this._popup},br.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},br.prototype._update=function(t){this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=ut(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),t&&"moveend"!==t.type||(this._pos=this._pos.round()),_t.setTransform(this._element,_r[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px)"),lt(this._element,this._anchor,"marker"))},br.prototype.getOffset=function(){return this._offset},br.prototype.setOffset=function(e){return this._offset=t.default$1.convert(e),this._update(),this};var xr,wr={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0},Er=function(e){function n(n){e.call(this),this.options=t.extend({},wr,n),t.bindAll(["_onSuccess","_onError","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.onAdd=function(e){var n;return this._map=e,this._container=_t.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),n=this._setupUI,void 0!==xr?n(xr):void 0!==t.default.navigator.permissions?t.default.navigator.permissions.query({name:"geolocation"}).then(function(t){xr="denied"!==t.state,n(xr)}):(xr=!!t.default.navigator.geolocation,n(xr)),this._container},n.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.default.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker.remove(),_t.remove(this._container),this._map=void 0},n.prototype._onSuccess=function(e){if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()},n.prototype._updateCamera=function(t){var e=new Ht(t.coords.longitude,t.coords.latitude),n=t.coords.accuracy;this._map.fitBounds(e.toBounds(n),this.options.fitBoundsOptions,{geolocateSource:!0})},n.prototype._updateMarker=function(t){t?this._userLocationDotMarker.setLngLat([t.coords.longitude,t.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()},n.prototype._onError=function(e){if(this.options.trackUserLocation)if(1===e.code)this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),void 0!==this._geolocationWatchID&&this._clearWatch();else switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(e){var n=this;!1!==e&&(this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._geolocateButton=_t.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.setAttribute("aria-label","Geolocate"),this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=_t.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new br(this._dotElement),this.options.trackUserLocation&&(this._watchState="OFF")),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(e){e.geolocateSource||"ACTIVE_LOCK"!==n._watchState||(n._watchState="BACKGROUND",n._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),n._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),n.fire(new t.Event("trackuserlocationend")))}))},n.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}"OFF"===this._watchState&&void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&&(this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._geolocationWatchID=t.default.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else t.default.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){t.default.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},n}(t.Evented),Sr={maxWidth:100,unit:"metric"},Tr=function(e){this.options=t.extend({},Sr,e),t.bindAll(["_onMove","setUnit"],this)};Tr.prototype.getDefaultPosition=function(){return"bottom-left"},Tr.prototype._onMove=function(){ct(this._map,this._container,this.options)},Tr.prototype.onAdd=function(t){return this._map=t,this._container=_t.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Tr.prototype.onRemove=function(){_t.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Tr.prototype.setUnit=function(t){this.options.unit=t,ct(this._map,this._container,this.options)};var Cr=function(){this._fullscreen=!1,t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.default.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.default.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.default.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.default.document&&(this._fullscreenchange="MSFullscreenChange"),this._className="mapboxgl-ctrl"};Cr.prototype.onAdd=function(e){return this._map=e,this._mapContainer=this._map.getContainer(),this._container=_t.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._container.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._container},Cr.prototype.onRemove=function(){_t.remove(this._container),this._map=null,t.default.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Cr.prototype._checkFullscreenSupport=function(){return!!(t.default.document.fullscreenEnabled||t.default.document.mozFullScreenEnabled||t.default.document.msFullscreenEnabled||t.default.document.webkitFullscreenEnabled)},Cr.prototype._setupUI=function(){var e=this._fullscreenButton=_t.create("button",this._className+"-icon "+this._className+"-fullscreen",this._container);e.setAttribute("aria-label","Toggle fullscreen"),e.type="button",this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.default.document.addEventListener(this._fullscreenchange,this._changeIcon)},Cr.prototype._isFullscreen=function(){return this._fullscreen},Cr.prototype._changeIcon=function(){(t.default.document.fullscreenElement||t.default.document.mozFullScreenElement||t.default.document.webkitFullscreenElement||t.default.document.msFullscreenElement)===this._mapContainer!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"))},Cr.prototype._onClickFullscreen=function(){this._isFullscreen()?t.default.document.exitFullscreen?t.default.document.exitFullscreen():t.default.document.mozCancelFullScreen?t.default.document.mozCancelFullScreen():t.default.document.msExitFullscreen?t.default.document.msExitFullscreen():t.default.document.webkitCancelFullScreen&&t.default.document.webkitCancelFullScreen():this._mapContainer.requestFullscreen?this._mapContainer.requestFullscreen():this._mapContainer.mozRequestFullScreen?this._mapContainer.mozRequestFullScreen():this._mapContainer.msRequestFullscreen?this._mapContainer.msRequestFullscreen():this._mapContainer.webkitRequestFullscreen&&this._mapContainer.webkitRequestFullscreen()};var Ar={closeButton:!0,closeOnClick:!0},Or=function(e){function n(n){e.call(this),this.options=t.extend(Object.create(Ar),n),t.bindAll(["_update","_onClickClose"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){return this._map=e,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this.fire(new t.Event("open")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&_t.remove(this._content),this._container&&(_t.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),delete this._map),this.fire(new t.Event("close")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(t){return this._lngLat=Ht.convert(t),this._pos=null,this._update(),this},n.prototype.setText=function(e){return this.setDOMContent(t.default.document.createTextNode(e))},n.prototype.setHTML=function(e){var n,r=t.default.document.createDocumentFragment(),i=t.default.document.createElement("body");for(i.innerHTML=e;n=i.firstChild;)r.appendChild(n);return this.setDOMContent(r)},n.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},n.prototype._createContent=function(){this._content&&_t.remove(this._content),this._content=_t.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=_t.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClickClose))},n.prototype._update=function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=_t.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=_t.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content)),this._map.transform.renderWorldCopies&&(this._lngLat=ut(this._lngLat,this._pos,this._map.transform));var e=this._pos=this._map.project(this._lngLat),n=this.options.anchor,r=function e(n){if(n){if("number"==typeof n){var r=Math.round(Math.sqrt(.5*Math.pow(n,2)));return{center:new t.default$1(0,0),top:new t.default$1(0,n),"top-left":new t.default$1(r,r),"top-right":new t.default$1(-r,r),bottom:new t.default$1(0,-n),"bottom-left":new t.default$1(r,-r),"bottom-right":new t.default$1(-r,-r),left:new t.default$1(n,0),right:new t.default$1(-n,0)}}if(n instanceof t.default$1||Array.isArray(n)){var i=t.default$1.convert(n);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:t.default$1.convert(n.center||[0,0]),top:t.default$1.convert(n.top||[0,0]),"top-left":t.default$1.convert(n["top-left"]||[0,0]),"top-right":t.default$1.convert(n["top-right"]||[0,0]),bottom:t.default$1.convert(n.bottom||[0,0]),"bottom-left":t.default$1.convert(n["bottom-left"]||[0,0]),"bottom-right":t.default$1.convert(n["bottom-right"]||[0,0]),left:t.default$1.convert(n.left||[0,0]),right:t.default$1.convert(n.right||[0,0])}}return e(new t.default$1(0,0))}(this.options.offset);if(!n){var i,o=this._container.offsetWidth,a=this._container.offsetHeight;i=e.y+r.bottom.y<a?["top"]:e.y>this._map.transform.height-a?["bottom"]:[],e.x<o/2?i.push("left"):e.x>this._map.transform.width-o/2&&i.push("right"),n=0===i.length?"bottom":i.join("-")}var s=e.add(r[n]).round();_t.setTransform(this._container,_r[n]+" translate("+s.x+"px,"+s.y+"px)"),lt(this._container,n,"popup")}},n.prototype._onClickClose=function(){this.remove()},n}(t.Evented),kr={version:"0.45.0",supported:ft,workerCount:Math.max(Math.floor(yt.hardwareConcurrency/2),1),setRTLTextPlugin:t.setRTLTextPlugin,Map:yr,NavigationControl:gr,GeolocateControl:Er,AttributionControl:cr,ScaleControl:Tr,FullscreenControl:Cr,Popup:Or,Marker:br,Style:Tn,LngLat:Ht,LngLatBounds:Kt,Point:t.default$1,Evented:t.Evented,config:Ct,get accessToken(){return Ct.ACCESS_TOKEN},set accessToken(t){Ct.ACCESS_TOKEN=t},workerUrl:""};return kr}),i})}).call(e,n(9))},function(t,e,n){"use strict";function r(t){var e=new a(t),n=o(a.prototype.request,e);return i.extend(n,a.prototype,e),i.extend(n,e),n}var i=n(4),o=n(102),a=n(326),s=n(53),u=r(s);u.Axios=a,u.create=function(t){return r(i.merge(s,t))},u.Cancel=n(107),u.CancelToken=n(340),u.isCancel=n(106),u.all=function(t){return Promise.all(t)},u.spread=n(341),t.exports=u,t.exports.default=u},function(t,e){function n(t){return!!t.constructor&&"function"===typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function r(t){return"function"===typeof t.readFloatLE&&"function"===typeof t.slice&&n(t.slice(0,0))}t.exports=function(t){return null!=t&&(n(t)||r(t)||!!t._isBuffer)}},function(t,e,n){"use strict";function r(t){this.defaults=t,this.interceptors={request:new a,response:new a}}var i=n(53),o=n(4),a=n(335),s=n(336);r.prototype.request=function(t){"string"===typeof t&&(t=o.merge({url:arguments[0]},arguments[1])),t=o.merge(i,{method:"get"},this.defaults,t),t.method=t.method.toLowerCase();var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},o.forEach(["delete","get","head","options"],function(t){r.prototype[t]=function(e,n){return this.request(o.merge(n||{},{method:t,url:e}))}}),o.forEach(["post","put","patch"],function(t){r.prototype[t]=function(e,n,r){return this.request(o.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=r},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(105);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t}},function(t,e,n){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i=n(4);t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(i.isURLSearchParams(e))o=e.toString();else{var a=[];i.forEach(e,function(t,e){null!==t&&"undefined"!==typeof t&&(i.isArray(t)?e+="[]":t=[t],i.forEach(t,function(t){i.isDate(t)?t=t.toISOString():i.isObject(t)&&(t=JSON.stringify(t)),a.push(r(e)+"="+r(t))}))}),o=a.join("&")}return o&&(t+=(-1===t.indexOf("?")?"?":"&")+o),t}},function(t,e,n){"use strict";var r=n(4),i=["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"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}}),a):a}},function(t,e,n){"use strict";var r=n(4);t.exports=r.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(i.setAttribute("href",e),e=i.href),i.setAttribute("href",e),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");return e=t(window.location.href),function(n){var i=r.isString(n)?t(n):n;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},function(t,e,n){"use strict";function r(){this.message="String contains an invalid character"}function i(t){for(var e,n,i=String(t),a="",s=0,u=o;i.charAt(0|s)||(u="=",s%1);a+=u.charAt(63&e>>8-s%1*8)){if((n=i.charCodeAt(s+=.75))>255)throw new r;e=e<<8|n}return a}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",t.exports=i},function(t,e,n){"use strict";var r=n(4);t.exports=r.isStandardBrowserEnv()?function(){return{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(t,e,n){"use strict";function r(){this.handlers=[]}var i=n(4);r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){i.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=r},function(t,e,n){"use strict";function r(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var i=n(4),o=n(337),a=n(106),s=n(53),u=n(338),l=n(339);t.exports=function(t){return r(t),t.baseURL&&!u(t.url)&&(t.url=l(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=i.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||s.adapter)(t).then(function(e){return r(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return a(e)||(r(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";function r(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new i(t),e(n.reason))})}var i=n(107);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t;return{token:new r(function(e){t=e}),cancel:t}},t.exports=r},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";function r(t){this._eventEmitter=new s,this.options=a({},this.options,t)}var i=n(343),o=n(347),a=n(108),s=n(348).EventEmitter,u=n(349),l=n(350);r.prototype={options:{placeholder:"Search",zoom:16,flyTo:!0,minLength:2,limit:5},onAdd:function(t){this._map=t,this.mapboxClient=new l(this.options.accessToken),this._onChange=this._onChange.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onQueryResult=this._onQueryResult.bind(this),this._clear=this._clear.bind(this);var e=this.container=document.createElement("div");e.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl";var n=document.createElement("span");n.className="geocoder-icon geocoder-icon-search",this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.placeholder=this.options.placeholder,this._inputEl.addEventListener("keydown",this._onKeyDown),this._inputEl.addEventListener("change",this._onChange);var r=document.createElement("div");return r.classList.add("geocoder-pin-right"),this._clearEl=document.createElement("button"),this._clearEl.className="geocoder-icon geocoder-icon-close",this._clearEl.setAttribute("aria-label","Clear"),this._clearEl.addEventListener("click",this._clear),this._loadingEl=document.createElement("span"),this._loadingEl.className="geocoder-icon geocoder-icon-loading",r.appendChild(this._clearEl),r.appendChild(this._loadingEl),e.appendChild(n),e.appendChild(this._inputEl),e.appendChild(r),this._typeahead=new i(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit}),this._typeahead.getItemValue=function(t){return t.place_name},e},onRemove:function(){return this.container.parentNode.removeChild(this.container),this._map=null,this},_onKeyDown:o(function(t){var e=t.target.shadowRoot?t.target.shadowRoot.activeElement:t.target;if(!e.value)return this._clearEl.style.display="none";t.metaKey||-1!==[9,27,37,39,13,38,40].indexOf(t.keyCode)||e.value.length>=this.options.minLength&&this._geocode(e.value)},200),_onChange:function(){this._inputEl.value&&(this._clearEl.style.display="block");var t=this._typeahead.selected;if(t){if(this.options.flyTo)if(!u[t.id]&&(t.bbox&&t.context&&t.context.length<=3||t.bbox&&!t.context)){var e=t.bbox;this._map.fitBounds([[e[0],e[1]],[e[2],e[3]]])}else u[t.id]?this._map.fitBounds(u[t.id].bbox):this._map.flyTo({center:t.center,zoom:this.options.zoom});this._eventEmitter.emit("result",{result:t})}},_geocode:function(t){this._loadingEl.style.display="block",this._eventEmitter.emit("loading",{query:t});var e=this.mapboxClient.geocodeForward(t,this.options),n=[];return this.options.localGeocoder&&((n=this.options.localGeocoder(t))||(n=[])),e.then(function(t){this._loadingEl.style.display="none";var e=t.entity;e.features=e.features?n.concat(e.features):n,this.options.filter&&e.features.length&&(e.features=e.features.filter(this.options.filter)),e.features.length?this._clearEl.style.display="block":(this._clearEl.style.display="none",this._typeahead.selected=null),this._eventEmitter.emit("results",e),this._typeahead.update(e.features)}.bind(this)),e.catch(function(t){this._loadingEl.style.display="none",n.length?this._clearEl.style.display="block":(this._clearEl.style.display="none",this._typeahead.selected=null),this._eventEmitter.emit("results",{features:n}),this._typeahead.update(n),this._eventEmitter.emit("error",{error:t})}.bind(this)),e},_clear:function(t){t&&t.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this._onChange(),this._inputEl.focus(),this._clearEl.style.display="none",this._eventEmitter.emit("clear")},_onQueryResult:function(t){var e=t.entity;if(e.features.length){var n=e.features[0];this._typeahead.selected=n,this._inputEl.value=n.place_name,this._onChange()}},query:function(t){return this._geocode(t).then(this._onQueryResult),this},setInput:function(t){return this._inputEl.value=t,this._typeahead.selected=null,this._typeahead.clear(),this._onChange(),this},setProximity:function(t){return this.options.proximity=t,this},getProximity:function(){return this.options.proximity},on:function(t,e){return this._eventEmitter.on(t,e),this},off:function(t,e){return this._eventEmitter.removeListener(t,e),this}},t.exports=r},function(t,e,n){"use strict";var r=n(344);window.Suggestions=t.exports=r},function(t,e,n){"use strict";var r=n(108),i=n(345),o=n(346),a=function(t,e,n){return n=n||{},this.options=r({minLength:2,limit:5,filter:!0},n),this.el=t,this.data=e||[],this.list=new o(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",function(t){this.handleKeyUp(t.keyCode)}.bind(this),!1),this.el.addEventListener("keydown",function(t){this.handleKeyDown(t)}.bind(this)),this.el.addEventListener("focus",function(){this.handleFocus()}.bind(this)),this.el.addEventListener("blur",function(){this.handleBlur()}.bind(this)),this.el.addEventListener("paste",function(t){this.handlePaste(t)}.bind(this)),this};a.prototype.handleKeyUp=function(t){40!==t&&38!==t&&27!==t&&13!==t&&9!==t&&this.handleInputChange(this.el.value)},a.prototype.handleKeyDown=function(t){switch(t.keyCode){case 13:case 9:t.preventDefault(),this.list.isEmpty()||(this.value(this.list.items[this.list.active].original),this.list.hide());break;case 27:this.list.isEmpty()||this.list.hide();break;case 38:this.list.previous();break;case 40:this.list.next()}},a.prototype.handleBlur=function(){this.list.selectingListItem||this.list.hide()},a.prototype.handlePaste=function(t){if(t.clipboardData)this.handleInputChange(t.clipboardData.getData("Text"));else{var e=this;setTimeout(function(){e.handleInputChange(t.target.value)},100)}},a.prototype.handleInputChange=function(t){if(this.query=this.normalize(t),this.list.clear(),this.query.length<this.options.minLength)return void this.list.draw();this.getCandidates(function(t){for(var e=0;e<t.length&&(this.list.add(t[e]),e!==this.options.limit-1);e++);this.list.draw()}.bind(this))},a.prototype.handleFocus=function(){this.list.isEmpty()||this.list.show(),this.list.selectingListItem=!1},a.prototype.update=function(t){this.data=t,this.handleKeyUp()},a.prototype.clear=function(){this.data=[],this.list.clear()},a.prototype.normalize=function(t){return t=t.toLowerCase()},a.prototype.match=function(t,e){return t.indexOf(e)>-1},a.prototype.value=function(t){if(this.selected=t,this.el.value=this.getItemValue(t),document.createEvent){var e=document.createEvent("HTMLEvents");e.initEvent("change",!0,!1),this.el.dispatchEvent(e)}else this.el.fireEvent("onchange")},a.prototype.getCandidates=function(t){var e={pre:"<strong>",post:"</strong>",extract:function(t){return this.getItemValue(t)}.bind(this)};t(this.options.filter?i.filter(this.query,this.data,e):this.data.map(function(t){for(var e=this.getItemValue(t),n=this.normalize(e),r=n.lastIndexOf(this.query);r>-1;){var i=r+this.query.length;e=e.slice(0,r)+"<strong>"+e.slice(r,i)+"</strong>"+e.slice(i),r=n.slice(0,r).lastIndexOf(this.query)}return{original:t,string:e}}.bind(this)))},a.prototype.getItemValue=function(t){return t},t.exports=a},function(t,e,n){!function(){var e={};t.exports=e,e.simpleFilter=function(t,n){return n.filter(function(n){return e.test(t,n)})},e.test=function(t,n){return null!==e.match(t,n)},e.match=function(t,e,n){n=n||{};var r,i=0,o=[],a=e.length,s=0,u=0,l=n.pre||"",c=n.post||"",p=n.caseSensitive&&e||e.toLowerCase();t=n.caseSensitive&&t||t.toLowerCase();for(var f=0;f<a;f++)r=e[f],p[f]===t[i]?(r=l+r+c,i+=1,u+=1+u):u=0,s+=u,o[o.length]=r;return i===t.length?(s=p===t?1/0:s,{rendered:o.join(""),score:s}):null},e.filter=function(t,n,r){return n&&0!==n.length?"string"!==typeof t?n:(r=r||{},n.reduce(function(n,i,o,a){var s=i;r.extract&&(s=r.extract(i));var u=e.match(t,s,r);return null!=u&&(n[n.length]={string:u.rendered,score:u.score,index:o,original:i}),n},[]).sort(function(t,e){var n=e.score-t.score;return n||t.index-e.index})):[]}}()},function(t,e){"Use strict";var n=function(t){return this.component=t,this.items=[],this.active=0,this.element=document.createElement("ul"),this.element.className="suggestions",this.selectingListItem=!1,t.el.parentNode.insertBefore(this.element,t.el.nextSibling),this};n.prototype.show=function(){this.element.style.display="block"},n.prototype.hide=function(){this.element.style.display="none"},n.prototype.add=function(t){this.items.push(t)},n.prototype.clear=function(){this.items=[],this.active=0},n.prototype.isEmpty=function(){return!this.items.length},n.prototype.draw=function(){if(this.element.innerHTML="",0===this.items.length)return void this.hide();for(var t=0;t<this.items.length;t++)this.drawItem(this.items[t],this.active===t);this.show()},n.prototype.drawItem=function(t,e){var n=document.createElement("li"),r=document.createElement("a");e&&(n.className+=" active"),r.innerHTML=t.string,n.appendChild(r),this.element.appendChild(n),n.addEventListener("mousedown",function(){this.selectingListItem=!0}.bind(this)),n.addEventListener("mouseup",function(){this.handleMouseUp.call(this,t)}.bind(this))},n.prototype.handleMouseUp=function(t){this.selectingListItem=!1,this.component.value(t.original),this.clear(),this.draw()},n.prototype.move=function(t){this.active=t,this.draw()},n.prototype.previous=function(){this.move(0===this.active?this.items.length-1:this.active-1)},n.prototype.next=function(){this.move(this.active===this.items.length-1?0:this.active+1)},t.exports=n},function(t,e,n){(function(e){function n(t,e,n){function i(e){var n=m,r=y;return m=y=void 0,S=e,g=t.apply(r,n)}function o(t){return S=t,_=setTimeout(c,e),T?i(t):g}function u(t){var n=t-E,r=t-S,i=e-n;return C?x(i,v-r):i}function l(t){var n=t-E,r=t-S;return void 0===E||n>=e||n<0||C&&r>=v}function c(){var t=w();if(l(t))return p(t);_=setTimeout(c,u(t))}function p(t){return _=void 0,A&&m?i(t):(m=y=void 0,g)}function f(){void 0!==_&&clearTimeout(_),S=0,m=E=y=_=void 0}function h(){return void 0===_?g:p(w())}function d(){var t=w(),n=l(t);if(m=arguments,y=this,E=t,n){if(void 0===_)return o(E);if(C)return _=setTimeout(c,e),i(E)}return void 0===_&&(_=setTimeout(c,e)),g}var m,y,v,g,_,E,S=0,T=!1,C=!1,A=!0;if("function"!=typeof t)throw new TypeError(s);return e=a(e)||0,r(n)&&(T=!!n.leading,C="maxWait"in n,v=C?b(a(n.maxWait)||0,e):v,A="trailing"in n?!!n.trailing:A),d.cancel=f,d.flush=h,d}function r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function i(t){return!!t&&"object"==typeof t}function o(t){return"symbol"==typeof t||i(t)&&_.call(t)==l}function a(t){if("number"==typeof t)return t;if(o(t))return u;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(c,"");var n=f.test(t);return n||h.test(t)?d(t.slice(2),n?2:8):p.test(t)?u:+t}var s="Expected a function",u=NaN,l="[object Symbol]",c=/^\s+|\s+$/g,p=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,h=/^0o[0-7]+$/i,d=parseInt,m="object"==typeof e&&e&&e.Object===Object&&e,y="object"==typeof self&&self&&self.Object===Object&&self,v=m||y||Function("return this")(),g=Object.prototype,_=g.toString,b=Math.max,x=Math.min,w=function(){return v.Date.now()};t.exports=n}).call(e,n(9))},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"===typeof t}function i(t){return"number"===typeof t}function o(t){return"object"===typeof t&&null!==t}function a(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,i,s,u,l;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(n=this._events[t],a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),l=n.slice(),i=l.length,u=0;u<i;u++)l[u].apply(this,s);return!0},n.prototype.addListener=function(t,e){var i;if(!r(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,r(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"===typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,i,a,s;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],a=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(s=a;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e){t.exports={"country.6646126669086080":{name:"France",bbox:[[-4.59235,41.380007],[9.560016,51.148506]]},"country.12862386939497690":{name:"United States",bbox:[[-171.791111,18.91619],[-66.96466,71.357764]]},"country.10299371396720960":{name:"Russia",bbox:[[19.66064,41.151416],[190.10042,81.2504]]},"country.15589894856372040":{name:"Canada",bbox:[[-140.99778,41.675105],[-52.648099,83.23324]]}}},function(t,e,n){"use strict";function r(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}var i=n(109),o=n(351),a=o("MapboxGeocoding");a.prototype.geocodeForward=function(t,e,n){if(void 0===n&&"function"===typeof e&&(n=e,e={}),Array.isArray(t)){if("mapbox.places-permanent"!==e.dataset)throw new Error("Batch geocoding is only available with the mapbox.places-permanent endpoint. See https://mapbox.com/api-documentation/#batch-requests for details");t=t.join(";")}i("string"===typeof t,"query must be a string"),i("object"===typeof e,"options must be an object");var o={query:t,dataset:"mapbox.places"},a=3;return e.precision&&(i("number"===typeof e.precision,"precision option must be number"),a=e.precision),e.proximity&&(i("number"===typeof e.proximity.latitude&&"number"===typeof e.proximity.longitude,"proximity must be an object with numeric latitude & longitude properties"),o.proximity=r(e.proximity.longitude,a)+","+r(e.proximity.latitude,a)),e.bbox&&(i("number"===typeof e.bbox[0]&&"number"===typeof e.bbox[1]&&"number"===typeof e.bbox[2]&&"number"===typeof e.bbox[3]&&4===e.bbox.length,"bbox must be an array with numeric values in the form [minX, minY, maxX, maxY]"),o.bbox=e.bbox[0]+","+e.bbox[1]+","+e.bbox[2]+","+e.bbox[3]),e.limit&&(i("number"===typeof e.limit,"limit must be a number"),o.limit=e.limit),e.dataset&&(i("string"===typeof e.dataset,"dataset option must be string"),o.dataset=e.dataset),e.country&&(i("string"===typeof e.country,"country option must be string"),o.country=e.country),e.language&&(i("string"===typeof e.language,"language option must be string"),o.language=e.language),e.types&&(i("string"===typeof e.types,"types option must be string"),o.types=e.types),"boolean"===typeof e.autocomplete&&(i("boolean"===typeof e.autocomplete,"autocomplete must be a boolean"),o.autocomplete=e.autocomplete),this.client({path:"/geocoding/v5/{dataset}/{query}.json{?access_token,proximity,country,types,bbox,limit,autocomplete,language}",params:o,callback:n})},a.prototype.geocodeReverse=function(t,e,n){void 0===n&&"function"===typeof e&&(n=e,e={}),i("object"===typeof t,"location must be an object"),i("object"===typeof e,"options must be an object"),i("number"===typeof t.latitude&&"number"===typeof t.longitude,"location must be an object with numeric latitude & longitude properties");var o={dataset:"mapbox.places"};e.dataset&&(i("string"===typeof e.dataset,"dataset option must be string"),o.dataset=e.dataset);var a=5;return e.precision&&(i("number"===typeof e.precision,"precision option must be number"),a=e.precision),e.language&&(i("string"===typeof e.language,"language option must be string"),o.language=e.language),e.types&&(i("string"===typeof e.types,"types option must be string"),o.types=e.types),e.limit&&(i("number"===typeof e.limit,"limit option must be a number"),i(1===e.types.split(",").length,"a single type must be specified to use the limit option"),o.limit=e.limit),o.longitude=r(t.longitude,a),o.latitude=r(t.latitude,a),this.client({path:"/geocoding/v5/{dataset}/{longitude},{latitude}.json{?access_token,types,limit,language}",params:o,callback:n})},t.exports=a},function(t,e,n){"use strict";function r(t){function e(e,n){this.name=t,i("string"===typeof e,"accessToken required to instantiate Mapbox client");var r=o.DEFAULT_ENDPOINT;void 0!==n&&(i("object"===typeof n,"options must be an object"),n.endpoint&&(i("string"===typeof n.endpoint,"endpoint must be a string"),r=n.endpoint),n.account&&(i("string"===typeof n.account,"account must be a string"),this.owner=n.account)),this.client=a({endpoint:r,accessToken:e}),this.accessToken=e,this.endpoint=r,this.owner=this.owner||s(e),i(!!this.owner,"could not determine account from provided accessToken")}return e}var i=n(109),o=n(352),a=n(353),s=n(379);t.exports=r},function(t,e){t.exports.DEFAULT_ENDPOINT="https://api.mapbox.com"},function(t,e,n){"use strict";n(54);var r=n(355);t.exports=function(t){return r.wrap(n(357)).wrap(n(113),{prefix:t.endpoint}).wrap(n(359),{mime:"application/json"}).wrap(n(116)).wrap(n(369),{params:{access_token:t.accessToken}}).wrap(n(370),{access_token:t.accessToken}).wrap(n(377)).wrap(n(378))}},function(t,e,n){(function(e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function r(t){return"function"===typeof t}function i(t){V=t}function o(t){U=t}function a(){return"undefined"!==typeof N?function(){N(u)}:s()}function s(){var t=setTimeout;return function(){return t(u,1)}}function u(){for(var t=0;t<B;t+=2){(0,H[t])(H[t+1]),H[t]=void 0,H[t+1]=void 0}B=0}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[X]&&k(r);var i=n._state;if(i){var o=arguments[i-1];U(function(){return C(i,r,o,n._result)})}else E(n,r,t,e);return r}function c(t){var e=this;if(t&&"object"===typeof t&&t.constructor===e)return t;var n=new e(p);return _(n,t),n}function p(){}function f(){return new TypeError("You cannot resolve a promise with itself")}function h(){return new TypeError("A promises callback cannot return that same promise.")}function d(t){try{return t.then}catch(t){return tt.error=t,tt}}function m(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}function y(t,e,n){U(function(t){var r=!1,i=m(n,e,function(n){r||(r=!0,e!==n?_(t,n):x(t,n))},function(e){r||(r=!0,w(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&i&&(r=!0,w(t,i))},t)}function v(t,e){e._state===J?x(t,e._result):e._state===Q?w(t,e._result):E(e,void 0,function(e){return _(t,e)},function(e){return w(t,e)})}function g(t,e,n){e.constructor===t.constructor&&n===l&&e.constructor.resolve===c?v(t,e):n===tt?(w(t,tt.error),tt.error=null):void 0===n?x(t,e):r(n)?y(t,e,n):x(t,e)}function _(e,n){e===n?w(e,f()):t(n)?g(e,n,d(n)):x(e,n)}function b(t){t._onerror&&t._onerror(t._result),S(t)}function x(t,e){t._state===Y&&(t._result=e,t._state=J,0!==t._subscribers.length&&U(S,t))}function w(t,e){t._state===Y&&(t._state=Q,t._result=e,U(b,t))}function E(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+J]=n,i[o+Q]=r,0===o&&t._state&&U(S,t)}function S(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,i=void 0,o=t._result,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?C(n,r,i,o):i(o);t._subscribers.length=0}}function T(t,e){try{return t(e)}catch(t){return tt.error=t,tt}}function C(t,e,n,i){var o=r(n),a=void 0,s=void 0,u=void 0,l=void 0;if(o){if(a=T(n,i),a===tt?(l=!0,s=a.error,a.error=null):u=!0,e===a)return void w(e,h())}else a=i,u=!0;e._state!==Y||(o&&u?_(e,a):l?w(e,s):t===J?x(e,a):t===Q&&w(e,a))}function A(t,e){try{e(function(e){_(t,e)},function(e){w(t,e)})}catch(e){w(t,e)}}function O(){return et++}function k(t){t[X]=et++,t._state=void 0,t._result=void 0,t._subscribers=[]}function I(){return new Error("Array Methods must be provided an Array")}function P(t){return new nt(this,t).promise}function z(t){var e=this;return new e(F(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function R(t){var e=this,n=new e(p);return w(n,t),n}function M(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function j(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function D(){var t=void 0;if("undefined"!==typeof n)t=n;else if("undefined"!==typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=rt}var L=void 0;L=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var F=L,B=0,N=void 0,V=void 0,U=function(t,e){H[B]=t,H[B+1]=e,2===(B+=2)&&(V?V(u):K())},q="undefined"!==typeof window?window:void 0,W=q||{},$=W.MutationObserver||W.WebKitMutationObserver,Z="undefined"===typeof self&&"undefined"!==typeof e&&"[object process]"==={}.toString.call(e),G="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel,H=new Array(1e3),K=void 0;K=Z?function(){return function(){return e.nextTick(u)}}():$?function(){var t=0,e=new $(u),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():G?function(){var t=new MessageChannel;return t.port1.onmessage=u,function(){return t.port2.postMessage(0)}}():void 0===q?function(){try{var t=Function("return this")().require("vertx");return N=t.runOnLoop||t.runOnContext,a()}catch(t){return s()}}():s();var X=Math.random().toString(36).substring(2),Y=void 0,J=1,Q=2,tt={error:null},et=0,nt=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[X]||k(this.promise),F(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?x(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&x(this.promise,this._result))):w(this.promise,I())}return t.prototype._enumerate=function(t){for(var e=0;this._state===Y&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===c){var i=d(t);if(i===l&&t._state!==Y)this._settledAt(t._state,e,t._result);else if("function"!==typeof i)this._remaining--,this._result[e]=t;else if(n===rt){var o=new n(p);g(o,t,i),this._willSettleAt(o,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===Y&&(this._remaining--,t===Q?w(r,n):this._result[e]=n),0===this._remaining&&x(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(J,e,t)},function(t){return n._settledAt(Q,e,t)})},t}(),rt=function(){function t(e){this[X]=O(),this._result=this._state=void 0,this._subscribers=[],p!==e&&("function"!==typeof e&&M(),this instanceof t?A(this,e):j())}return t.prototype.catch=function(t){return this.then(null,t)},t.prototype.finally=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return rt.prototype.then=l,rt.all=P,rt.race=z,rt.resolve=c,rt.reject=R,rt._setScheduler=i,rt._setAsap=o,rt._asap=U,rt.polyfill=D,rt.Promise=rt,rt})}).call(e,n(103),n(9))},function(t,e,n){"use strict";var r=n(111),i=n(356);r.setPlatformDefaultClient(i),t.exports=r},function(t,e,n){"use strict";function r(t){var e={};return t?(t.trim().split(u).forEach(function(t){var n,r,i;n=t.indexOf(":"),r=o(t.substring(0,n).trim()),i=t.substring(n+1).trim(),e[r]?Array.isArray(e[r])?e[r].push(i):e[r]=[e[r],i]:e[r]=i}),e):e}function i(t,e){return Object.keys(e||{}).forEach(function(n){if(e.hasOwnProperty(n)&&n in t)try{t[n]=e[n]}catch(t){}}),t}var o,a,s,u;o=n(112),a=n(56),s=n(55),u=/[\r|\n]+/,t.exports=s(function(t){return a.promise(function(e,n){var o,a,s,u,l,c,p,f;if(t="string"===typeof t?{path:t}:t||{},p={request:t},t.canceled)return p.error="precanceled",void n(p);if(!(f=t.engine||XMLHttpRequest))return void n({request:t,error:"xhr-not-available"});l=t.entity,t.method=t.method||(l?"POST":"GET"),a=t.method,s=p.url=t.path||"";try{o=p.raw=new f,i(o,t.mixin),o.open(a,s,!0),i(o,t.mixin),u=t.headers;for(c in u)"Content-Type"===c&&"multipart/form-data"===u[c]||o.setRequestHeader(c,u[c]);t.canceled=!1,t.cancel=function(){t.canceled=!0,o.abort(),n(p)},o.onreadystatechange=function(){t.canceled||o.readyState===(f.DONE||4)&&(p.status={code:o.status,text:o.statusText},p.headers=r(o.getAllResponseHeaders()),p.entity=o.responseText,1223===p.status.code&&(p.status.code=204),p.status.code>0?e(p):setTimeout(function(){e(p)},0))};try{o.onerror=function(){p.error="loaderror",n(p)}}catch(t){}o.send(l)}catch(t){p.error="loaderror",n(p)}})})},function(t,e,n){"use strict";var r;r=n(8),t.exports=r({init:function(t){return t.code=t.code||400,t},response:function(t,e){return t.status&&t.status.code>=e.code?Promise.reject(t):t}})},function(t,e,n){"use strict";function r(t,e){var n,r,i,o,a;if(n=t,i={},e){for(r in e)a=new RegExp("\\{"+r+"\\}"),a.test(n)?n=n.replace(a,encodeURIComponent(e[r]),"g"):i[r]=e[r];o=s.write(i),o&&(n+=-1===n.indexOf("?")?"?":"&",n+=o)}return n}function i(t,e){return 0===t.indexOf(e)}function o(t,e){if(!(this instanceof o))return new o(t,e);t instanceof o?(this._template=t.template,this._params=a({},this._params,e)):(this._template=(t||"").toString(),this._params=e||{})}var a,s,u,l,c,p;a=n(35),s=n(114),l=/([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?(\/[^?#]*)?(\?[^#]*)?(#\S*)?/i,c=/^([a-z][a-z0-9\-\+\.]*:\/\/|\/)/i,p=/([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?\//i,o.prototype={append:function(t,e){return new o(this._template+t,a({},this._params,e))},fullyQualify:function(){if("undefined"===typeof location)return this;if(this.isFullyQualified())return this;var t=this._template;return i(t,"//")?t=u.protocol+t:i(t,"/")?t=u.origin+t:this.isAbsolute()||(t=u.origin+u.pathname.substring(0,u.pathname.lastIndexOf("/")+1)),-1===t.indexOf("/",8)&&(t+="/"),new o(t,this._params)},isAbsolute:function(){return c.test(this.build())},isFullyQualified:function(){return p.test(this.build())},isCrossOrigin:function(){if(!u)return!0;var t=this.parts();return t.protocol!==u.protocol||t.hostname!==u.hostname||t.port!==u.port},parts:function(){var t,e;return t=this.fullyQualify().build().match(l),e={href:t[0],protocol:t[1],host:t[3]||"",hostname:t[4]||"",port:t[6],pathname:t[7]||"",search:t[8]||"",hash:t[9]||""},e.origin=e.protocol+"//"+e.host,e.port=e.port||("https:"===e.protocol?"443":"http:"===e.protocol?"80":""),e},build:function(t){return r(this._template,a({},this._params,t))},toString:function(){return this.build()}},u="undefined"!==typeof location?new o(location.href).parts():void 0,t.exports=o},function(t,e,n){"use strict";var r,i,o,a,s,u;r=n(8),i=n(115),o=n(360),u=n(117),a={read:function(t){return t},write:function(t){return t}},s={read:function(){throw"No read method found on converter"},write:function(){throw"No write method found on converter"}},t.exports=r({init:function(t){return t.registry=t.registry||o,t},request:function(t,e){var n,r;return r=t.headers||(t.headers={}),n=i.parse(r["Content-Type"]||e.mime||"text/plain"),r.Accept=r.Accept||e.accept||n.raw+", application/json;q=0.8, text/plain;q=0.5, */*;q=0.2","entity"in t?(r["Content-Type"]=n.raw,e.registry.lookup(n).catch(function(){if(e.permissive)return a;throw"mime-unknown"}).then(function(r){var i=e.client||t.originator,o=r.write||s.write;return u(o.bind(void 0,t.entity,{client:i,request:t,mime:n,registry:e.registry})).catch(function(){throw"mime-serialization"}).then(function(e){return t.entity=e,t})})):t},response:function(t,e){if(!(t.headers&&t.headers["Content-Type"]&&t.entity))return t;var n=i.parse(t.headers["Content-Type"]);return e.registry.lookup(n).catch(function(){return a}).then(function(r){var i=e.client||t.request&&t.request.originator,o=r.read||s.read;return u(o.bind(void 0,t.entity,{client:i,response:t,mime:n,registry:e.registry})).catch(function(e){throw t.error="mime-deserialization",t.cause=e,t}).then(function(e){return t.entity=e,t})})}})},function(t,e,n){"use strict";function r(t){this.lookup=function(e){var n;return n="string"===typeof e?i.parse(e):e,t[n.raw]?t[n.raw]:t[n.type+n.suffix]?t[n.type+n.suffix]:t[n.type]?t[n.type]:t[n.suffix]?t[n.suffix]:Promise.reject(new Error('Unable to locate converter for mime "'+n.raw+'"'))},this.delegate=function(t){return{read:function(){var e=arguments;return this.lookup(t).then(function(t){return t.read.apply(this,e)}.bind(this))}.bind(this),write:function(){var e=arguments;return this.lookup(t).then(function(t){return t.write.apply(this,e)}.bind(this))}.bind(this)}},this.register=function(e,n){return t[e]=Promise.resolve(n),t[e]},this.child=function(){return new r(Object.create(t))}}var i,o;i=n(115),o=new r({}),o.register("application/hal",n(361)),o.register("application/json",n(366)),o.register("application/x-www-form-urlencoded",n(114)),o.register("multipart/form-data",n(367)),o.register("text/plain",n(368)),o.register("+json",o.delegate("application/json")),t.exports=o},function(t,e,n){"use strict";function r(t,e,n){Object.defineProperty(t,e,{value:n,configurable:!0,enumerable:!1,writeable:!0})}var i,o,a,s,u;i=n(113),o=n(116),a=n(364),s=n(365),u=n(56),t.exports={read:function(t,e){function n(t,e){(e&&c&&c.warn||c.log)&&(c.warn||c.log).call(c,"Relationship '"+t+"' is deprecated, see "+e)}var l,c;return e=e||{},l=e.client,c=e.console||c,e.registry.lookup(e.mime.suffix).then(function(n){return n.read(t,e)}).then(function(t){return a.findProperties(t,"_embedded",function(t,e,n){Object.keys(t).forEach(function(n){if(!(n in e)){var i=u({entity:t[n]});r(e,n,i)}}),r(e,n,t)}),a.findProperties(t,"_links",function(t,e,a){Object.keys(t).forEach(function(i){var a=t[i];i in e||r(e,i,u.make(s(function(){return a.deprecation&&n(i,a.deprecation),!0===a.templated?o(l)({path:a.href}):l({path:a.href})})))}),r(e,a,t),r(e,"clientFor",function(e,r){var a=t[e];if(!a)throw new Error("Unknown relationship: "+e);return a.deprecation&&n(e,a.deprecation),!0===a.templated?o(r||l,{template:a.href}):i(r||l,{prefix:a.href})}),r(e,"requestFor",function(t,e,n){return this.clientFor(t,n)(e)})}),t})},write:function(t,e){return e.registry.lookup(e.mime.suffix).then(function(n){return n.write(t,e)})}}},function(t,e,n){"use strict";function r(t,e,n){return e.split(",").reduce(function(e,r){var i,o;if(i={},"*"===r.slice(-1)&&(r=r.slice(0,-1),i.explode=!0),u.test(r)){var s=u.exec(r);r=s[1],i.maxLength=parseInt(s[2])}return r=a.decode(r),void 0===(o=n[r])||null===o?e:(Array.isArray(o)?e=o.reduce(function(e,n){return e.length?(e+=i.explode?t.separator:",",t.named&&i.explode&&(e+=t.encoder(r),e+=n.length?"=":t.empty)):(e+=t.first,t.named&&(e+=t.encoder(r),e+=n.length?"=":t.empty)),e+=t.encoder(n)},e):"object"===typeof o?e=Object.keys(o).reduce(function(e,n){return e.length?e+=i.explode?t.separator:",":(e+=t.first,t.named&&!i.explode&&(e+=t.encoder(r),e+=o[n].length?"=":t.empty)),e+=t.encoder(n),e+=i.explode?"=":",",e+=t.encoder(o[n])},e):(o=String(o),i.maxLength&&(o=o.slice(0,i.maxLength)),e+=e.length?t.separator:t.first,t.named&&(e+=t.encoder(r),e+=o.length?"=":t.empty),e+=t.encoder(o)),e)},"")}function i(t,e){var n;if(n=s[t.slice(0,1)],n?t=t.slice(1):n=s[""],n.reserved)throw new Error("Reserved expression operations are not supported");return r(n,t,e)}function o(t,e){var n,r,o;for(o="",r=0;;){if(-1===(n=t.indexOf("{",r))){o+=t.slice(r);break}o+=t.slice(r,n),r=t.indexOf("}",n)+1,o+=i(t.slice(n+1,r-1),e)}return o}var a,s,u;a=n(363),u=/^([^:]*):([0-9]+)$/,s={"":{first:"",separator:",",named:!1,empty:"",encoder:a.encode},"+":{first:"",separator:",",named:!1,empty:"",encoder:a.encodeURL},"#":{first:"#",separator:",",named:!1,empty:"",encoder:a.encodeURL},".":{first:".",separator:".",named:!1,empty:"",encoder:a.encode},"/":{first:"/",separator:"/",named:!1,empty:"",encoder:a.encode},";":{first:";",separator:";",named:!0,empty:"",encoder:a.encode},"?":{first:"?",separator:"&",named:!0,empty:"=",encoder:a.encode},"&":{first:"&",separator:"&",named:!0,empty:"=",encoder:a.encode},"=":{reserved:!0},",":{reserved:!0},"!":{reserved:!0},"@":{reserved:!0},"|":{reserved:!0}},t.exports={expand:o}},function(t,e,n){"use strict";function r(t,e){if("string"!==typeof t)throw new Error("String required for URL encoding");return t.split("").map(function(t){if(e.hasOwnProperty(t))return t;var n=t.charCodeAt(0);if(n<=127){var r=n.toString(16).toUpperCase();return"%"+(r.length%2===1?"0":"")+r}return encodeURIComponent(t).toUpperCase()}).join("")}function i(t){return t=t||a.unreserved,function(e){return r(e,t)}}function o(t){return decodeURIComponent(t)}var a;a=function(){var t={alpha:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",digit:"0123456789"};return t.genDelims=":/?#[]@",t.subDelims="!$&'()*+,;=",t.reserved=t.genDelims+t.subDelims,t.unreserved=t.alpha+t.digit+"-._~",t.url=t.reserved+t.unreserved,t.scheme=t.alpha+t.digit+"+-.",t.userinfo=t.unreserved+t.subDelims+":",t.host=t.unreserved+t.subDelims,t.port=t.digit,t.pchar=t.unreserved+t.subDelims+":@",t.segment=t.pchar,t.path=t.segment+"/",t.query=t.pchar+"/?",t.fragment=t.pchar+"/?",Object.keys(t).reduce(function(e,n){return e[n]=t[n].split("").reduce(function(t,e){return t[e]=!0,t},{}),e},{})}(),t.exports={decode:o,encode:i(),encodeURL:i(a.url),encodeScheme:i(a.scheme),encodeUserInfo:i(a.userinfo),encodeHost:i(a.host),encodePort:i(a.port),encodePathSegment:i(a.segment),encodePath:i(a.path),encodeQuery:i(a.query),encodeFragment:i(a.fragment)}},function(t,e,n){"use strict";t.exports={findProperties:function t(e,n,r){"object"===typeof e&&null!==e&&(n in e&&r(e[n],e,n),Object.keys(e).forEach(function(i){t(e[i],n,r)}))}}},function(t,e,n){"use strict";function r(t){var e,n,r,o;return e=!1,r=new Promise(function(t,e){n={resolve:t,reject:e}}),o=r.then,r.then=function(){return e||(e=!0,i(t).then(n.resolve,n.reject)),o.apply(r,arguments)},r}var i=n(117);t.exports=r},function(t,e,n){"use strict";function r(t,e){return{read:function(e){return JSON.parse(e,t)},write:function(t){return JSON.stringify(t,e)},extend:r}}t.exports=r()},function(t,e,n){"use strict";function r(t){return t&&1===t.nodeType&&"FORM"===t.tagName}function i(t){var e,n=new FormData;for(var r in t)t.hasOwnProperty(r)&&(e=t[r],e instanceof File?n.append(r,e,e.name):e instanceof Blob?n.append(r,e):n.append(r,String(e)));return n}t.exports={write:function(t){if("undefined"===typeof FormData)throw new Error("The multipart/form-data mime serializer requires FormData support");if(t instanceof FormData)return t;if(r(t))return new FormData(t);if("object"===typeof t&&null!==t)return i(t);throw new Error("Unable to create FormData from object "+t)}}},function(t,e,n){"use strict";t.exports={read:function(t){return t},write:function(t){return t.toString()}}},function(t,e,n){"use strict";var r,i,o;r=n(8),i=n(35),o=function(){function t(t,e,n){(t in e||t in n)&&(e[t]=i({},n[t],e[t]))}function e(t,e,n){t in n&&!(t in e)&&(e[t]=n[t])}var n={method:e,path:e,params:t,headers:t,entity:e,mixin:t};return function(t,e){for(var r in n)n[r](r,t,e);return t}}(),t.exports=r({request:function(t,e){return o(t,e)}})},function(t,e,n){"use strict";n(54);var r=n(8),i=n(371),o=n(372),a=n(118),s=r({success:function(t,e){var n=t&&t.headers&&t.headers.Link,r=t&&t.request&&t.request.originator;if(n){var s=i.parse(n).filter(function(t){return"next"===t.rel})[0];s&&(t.nextPage=function(t){var n=o.parse(s.href),i=a.parse(n.query);return i.access_token=i.access_token||e.access_token,n.search=a.stringify(i),r({path:o.format(n),callback:t})})}return t}});t.exports=s},function(t,e){t.exports=function(){function t(t){return'"'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var e={parse:function(e,n){function r(t){C<O||(C>O&&(O=C,k=[]),k.push(t))}function i(){var t,n,i,a,s,u,l,c,p;for(u=C,l=C,t=[],c=C,p=C,n=o(),null!==n?(i=h(),null!==i?(44===e.charCodeAt(C)?(a=",",C++):(a=null,0===A&&r('","')),null!==a?(s=h(),null!==s?n=[n,i,a,s]:(n=null,C=p)):(n=null,C=p)):(n=null,C=p)):(n=null,C=p),null!==n&&(n=function(t,e){return e}(0,n[0])),null===n&&(C=c);null!==n;)t.push(n),c=C,p=C,n=o(),null!==n?(i=h(),null!==i?(44===e.charCodeAt(C)?(a=",",C++):(a=null,0===A&&r('","')),null!==a?(s=h(),null!==s?n=[n,i,a,s]:(n=null,C=p)):(n=null,C=p)):(n=null,C=p)):(n=null,C=p),null!==n&&(n=function(t,e){return e}(0,n[0])),null===n&&(C=c);return null!==t?(n=o(),null!==n?t=[t,n]:(t=null,C=l)):(t=null,C=l),null!==t&&(t=function(t,e,n){return e.concat([n])}(0,t[0],t[1])),null===t&&(C=u),t}function o(){var t,n,i,o,u,l,c,p;if(c=C,p=C,60===e.charCodeAt(C)?(t="<",C++):(t=null,0===A&&r('"<"')),null!==t)if(null!==(n=s()))if(62===e.charCodeAt(C)?(i=">",C++):(i=null,0===A&&r('">"')),null!==i)if(null!==(o=h())){for(u=[],l=a();null!==l;)u.push(l),l=a();null!==u?t=[t,n,i,o,u]:(t=null,C=p)}else t=null,C=p;else t=null,C=p;else t=null,C=p;else t=null,C=p;return null!==t&&(t=function(t,e,n){var r={};return n.forEach(function(t){r[t[0]]=t[1]}),r.href=e,r}(0,t[1],t[4])),null===t&&(C=c),t}function a(){var t,n,i,o,a,s;return a=C,s=C,59===e.charCodeAt(C)?(t=";",C++):(t=null,0===A&&r('";"')),null!==t?(n=h(),null!==n?(i=u(),null!==i?(o=h(),null!==o?t=[t,n,i,o]:(t=null,C=s)):(t=null,C=s)):(t=null,C=s)):(t=null,C=s),null!==t&&(t=function(t,e){return e}(0,t[2])),null===t&&(C=a),t}function s(){var t,n,i;if(i=C,/^[^>]/.test(e.charAt(C))?(n=e.charAt(C),C++):(n=null,0===A&&r("[^>]")),null!==n)for(t=[];null!==n;)t.push(n),/^[^>]/.test(e.charAt(C))?(n=e.charAt(C),C++):(n=null,0===A&&r("[^>]"));else t=null;return null!==t&&(t=function(t,e){return e.join("")}(0,t)),null===t&&(C=i),t}function u(){var t,e,n,r;return n=C,r=C,t=l(),null!==t?(e=c(),e=null!==e?e:"",null!==e?t=[t,e]:(t=null,C=r)):(t=null,C=r),null!==t&&(t=function(t,e,n){return[e,n]}(0,t[0],t[1])),null===t&&(C=n),t}function l(){var t,n,i;if(i=C,/^[a-z]/.test(e.charAt(C))?(n=e.charAt(C),C++):(n=null,0===A&&r("[a-z]")),null!==n)for(t=[];null!==n;)t.push(n),/^[a-z]/.test(e.charAt(C))?(n=e.charAt(C),C++):(n=null,0===A&&r("[a-z]"));else t=null;return null!==t&&(t=function(t,e){return e.join("")}(0,t)),null===t&&(C=i),t}function c(){var t,n,i,o;return i=C,o=C,61===e.charCodeAt(C)?(t="=",C++):(t=null,0===A&&r('"="')),null!==t?(n=p(),null===n&&(n=d()),null!==n?t=[t,n]:(t=null,C=o)):(t=null,C=o),null!==t&&(t=function(t,e){return e}(0,t[1])),null===t&&(C=i),t}function p(){var t,e,n;if(n=C,null!==(e=f()))for(t=[];null!==e;)t.push(e),e=f();else t=null;return null!==t&&(t=function(t,e){return e.join("")}(0,t)),null===t&&(C=n),t}function f(){var t;return 33===e.charCodeAt(C)?(t="!",C++):(t=null,0===A&&r('"!"')),null===t&&(35===e.charCodeAt(C)?(t="#",C++):(t=null,0===A&&r('"#"')),null===t&&(36===e.charCodeAt(C)?(t="$",C++):(t=null,0===A&&r('"$"')),null===t&&(37===e.charCodeAt(C)?(t="%",C++):(t=null,0===A&&r('"%"')),null===t&&(38===e.charCodeAt(C)?(t="&",C++):(t=null,0===A&&r('"&"')),null===t&&(39===e.charCodeAt(C)?(t="'",C++):(t=null,0===A&&r('"\'"')),null===t&&(40===e.charCodeAt(C)?(t="(",C++):(t=null,0===A&&r('"("')),null===t&&(41===e.charCodeAt(C)?(t=")",C++):(t=null,0===A&&r('")"')),null===t&&(42===e.charCodeAt(C)?(t="*",C++):(t=null,0===A&&r('"*"')),null===t&&(43===e.charCodeAt(C)?(t="+",C++):(t=null,0===A&&r('"+"')),null===t&&(45===e.charCodeAt(C)?(t="-",C++):(t=null,0===A&&r('"-"')),null===t&&(46===e.charCodeAt(C)?(t=".",C++):(t=null,0===A&&r('"."')),null===t&&(124===e.charCodeAt(C)?(t="|",C++):(t=null,0===A&&r('"|"')),null===t&&null===(t=b())&&(58===e.charCodeAt(C)?(t=":",C++):(t=null,0===A&&r('":"')),null===t&&(60===e.charCodeAt(C)?(t="<",C++):(t=null,0===A&&r('"<"')),null===t&&(61===e.charCodeAt(C)?(t="=",C++):(t=null,0===A&&r('"="')),null===t&&(62===e.charCodeAt(C)?(t=">",C++):(t=null,0===A&&r('">"')),null===t&&(63===e.charCodeAt(C)?(t="?",C++):(t=null,0===A&&r('"?"')),null===t&&(64===e.charCodeAt(C)?(t="@",C++):(t=null,0===A&&r('"@"')),null===t&&null===(t=_())&&(91===e.charCodeAt(C)?(t="[",C++):(t=null,0===A&&r('"["')),null===t&&(93===e.charCodeAt(C)?(t="]",C++):(t=null,0===A&&r('"]"')),null===t&&(94===e.charCodeAt(C)?(t="^",C++):(t=null,0===A&&r('"^"')),null===t&&(95===e.charCodeAt(C)?(t="_",C++):(t=null,0===A&&r('"_"')),null===t&&(96===e.charCodeAt(C)?(t="`",C++):(t=null,0===A&&r('"`"')),null===t&&(123===e.charCodeAt(C)?(t="{",C++):(t=null,0===A&&r('"{"')),null===t&&(/^[\/\/]/.test(e.charAt(C))?(t=e.charAt(C),C++):(t=null,0===A&&r("[\\/\\/]")),null===t&&(125===e.charCodeAt(C)?(t="}",C++):(t=null,0===A&&r('"}"')),null===t&&(126===e.charCodeAt(C)?(t="~",C++):(t=null,0===A&&r('"~"'))))))))))))))))))))))))))))),t}function h(){var t,e;for(t=[],e=x();null!==e;)t.push(e),e=x();return t}function d(){var t,e,n,r,i;return r=C,i=C,t=w(),null!==t?(e=m(),null!==e?(n=w(),null!==n?t=[t,e,n]:(t=null,C=i)):(t=null,C=i)):(t=null,C=i),null!==t&&(t=function(t,e){return e}(0,t[1])),null===t&&(C=r),t}function m(){var t,e,n;for(n=C,t=[],e=E(),null===e&&(e=S());null!==e;)t.push(e),null===(e=E())&&(e=S());return null!==t&&(t=function(t,e){return e.join("")}(0,t)),null===t&&(C=n),t}function y(){var t;return/^[\0-\x7f]/.test(e.charAt(C))?(t=e.charAt(C),C++):(t=null,0===A&&r("[\\0-\x7f]")),t}function v(){var t;return/^[A-Z]/.test(e.charAt(C))?(t=e.charAt(C),C++):(t=null,0===A&&r("[A-Z]")),t}function g(){var t;return/^[a-z]/.test(e.charAt(C))?(t=e.charAt(C),C++):(t=null,0===A&&r("[a-z]")),t}function _(){var t;return t=v(),null===t&&(t=g()),t}function b(){var t;return/^[0-9]/.test(e.charAt(C))?(t=e.charAt(C),C++):(t=null,0===A&&r("[0-9]")),t}function x(){var t;return/^[ ]/.test(e.charAt(C))?(t=e.charAt(C),C++):(t=null,0===A&&r("[ ]")),t}function w(){var t;return/^["]/.test(e.charAt(C))?(t=e.charAt(C),C++):(t=null,0===A&&r('["]')),t}function E(){var t;return/^[^"]/.test(e.charAt(C))?(t=e.charAt(C),C++):(t=null,0===A&&r('[^"]')),t}function S(){var t,n,i;return i=C,/^[\\]/.test(e.charAt(C))?(t=e.charAt(C),C++):(t=null,0===A&&r("[\\\\]")),null!==t?(n=y(),null!==n?t=[t,n]:(t=null,C=i)):(t=null,C=i),t}var T={start:i,LinkValue:o,LinkParams:a,URIReference:s,LinkParam:u,LinkParamName:l,LinkParamValue:c,PToken:p,PTokenChar:f,OptionalSP:h,QuotedString:d,QuotedStringInternal:m,Char:y,UpAlpha:v,LoAlpha:g,Alpha:_,Digit:b,SP:x,DQ:w,QDText:E,QuotedPair:S};if(void 0!==n){if(void 0===T[n])throw new Error("Invalid rule name: "+t(n)+".")}else n="start";var C=0,A=0,O=0,k=[],I=T[n]();if(null===I||C!==e.length){var P=Math.max(C,O),z=P<e.length?e.charAt(P):null,R=function(){for(var t=1,n=1,r=!1,i=0;i<Math.max(C,O);i++){var o=e.charAt(i);"\n"===o?(r||t++,n=1,r=!1):"\r"===o||"\u2028"===o||"\u2029"===o?(t++,n=1,r=!0):(n++,r=!1)}return{line:t,column:n}}();throw new this.SyntaxError(function(t){t.sort();for(var e=null,n=[],r=0;r<t.length;r++)t[r]!==e&&(n.push(t[r]),e=t[r]);return n}(k),z,P,R.line,R.column)}return I},toSource:function(){return this._source}};return e.SyntaxError=function(e,n,r,i,o){this.name="SyntaxError",this.expected=e,this.found=n,this.message=function(e,n){var r,i;switch(e.length){case 0:r="end of input";break;case 1:r=e[0];break;default:r=e.slice(0,e.length-1).join(", ")+" or "+e[e.length-1]}return i=n?t(n):"end of input","Expected "+r+" but "+i+" found."}(e,n),this.offset=r,this.line=i,this.column=o},e.SyntaxError.prototype=Error.prototype,e}()},function(t,e,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(t,e,n){if(t&&l.isObject(t)&&t instanceof r)return t;var i=new r;return i.parse(t,e,n),i}function o(t){return l.isString(t)&&(t=i(t)),t instanceof r?t.format():r.prototype.format.call(t)}function a(t,e){return i(t,!1,!0).resolve(e)}function s(t,e){return t?i(t,!1,!0).resolveObject(e):e}var u=n(373),l=n(374);e.parse=i,e.resolve=a,e.resolveObject=s,e.format=o,e.Url=r;var c=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,h=["<",">",'"',"`"," ","\r","\n","\t"],d=["{","}","|","\\","^","`"].concat(h),m=["'"].concat(d),y=["%","/","?",";","#"].concat(m),v=["/","?","#"],g=/^[+a-z0-9A-Z_-]{0,63}$/,_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},x={javascript:!0,"javascript:":!0},w={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=n(118);r.prototype.parse=function(t,e,n){if(!l.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t.indexOf("?"),i=-1!==r&&r<t.indexOf("#")?"?":"#",o=t.split(i),a=/\\/g;o[0]=o[0].replace(a,"/"),t=o.join(i);var s=t;if(s=s.trim(),!n&&1===t.split("#").length){var p=f.exec(s);if(p)return this.path=s,this.href=s,this.pathname=p[1],p[2]?(this.search=p[2],this.query=e?E.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var h=c.exec(s);if(h){h=h[0];var d=h.toLowerCase();this.protocol=d,s=s.substr(h.length)}if(n||h||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===s.substr(0,2);!S||h&&x[h]||(s=s.substr(2),this.slashes=!0)}if(!x[h]&&(S||h&&!w[h])){for(var T=-1,C=0;C<v.length;C++){var A=s.indexOf(v[C]);-1!==A&&(-1===T||A<T)&&(T=A)}var O,k;k=-1===T?s.lastIndexOf("@"):s.lastIndexOf("@",T),-1!==k&&(O=s.slice(0,k),s=s.slice(k+1),this.auth=decodeURIComponent(O)),T=-1;for(var C=0;C<y.length;C++){var A=s.indexOf(y[C]);-1!==A&&(-1===T||A<T)&&(T=A)}-1===T&&(T=s.length),this.host=s.slice(0,T),s=s.slice(T),this.parseHost(),this.hostname=this.hostname||"";var I="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!I)for(var P=this.hostname.split(/\./),C=0,z=P.length;C<z;C++){var R=P[C];if(R&&!R.match(g)){for(var M="",j=0,D=R.length;j<D;j++)R.charCodeAt(j)>127?M+="x":M+=R[j];if(!M.match(g)){var L=P.slice(0,C),F=P.slice(C+1),B=R.match(_);B&&(L.push(B[1]),F.unshift(B[2])),F.length&&(s="/"+F.join(".")+s),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=u.toASCII(this.hostname));var N=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+N,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!b[d])for(var C=0,z=m.length;C<z;C++){var U=m[C];if(-1!==s.indexOf(U)){var q=encodeURIComponent(U);q===U&&(q=escape(U)),s=s.split(U).join(q)}}var W=s.indexOf("#");-1!==W&&(this.hash=s.substr(W),s=s.slice(0,W));var $=s.indexOf("?");if(-1!==$?(this.search=s.substr($),this.query=s.substr($+1),e&&(this.query=E.parse(this.query)),s=s.slice(0,$)):e&&(this.search="",this.query={}),s&&(this.pathname=s),w[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var N=this.pathname||"",Z=this.search||"";this.path=N+Z}return this.href=this.format(),this},r.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&l.isObject(this.query)&&Object.keys(this.query).length&&(o=E.stringify(this.query));var a=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||w[e])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),a=a.replace("#","%23"),e+i+n+a+r},r.prototype.resolve=function(t){return this.resolveObject(i(t,!1,!0)).format()},r.prototype.resolveObject=function(t){if(l.isString(t)){var e=new r;e.parse(t,!1,!0),t=e}for(var n=new r,i=Object.keys(this),o=0;o<i.length;o++){var a=i[o];n[a]=this[a]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),u=0;u<s.length;u++){var c=s[u];"protocol"!==c&&(n[c]=t[c])}return w[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!w[t.protocol]){for(var p=Object.keys(t),f=0;f<p.length;f++){var h=p[f];n[h]=t[h]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||x[t.protocol])n.pathname=t.pathname;else{for(var d=(t.pathname||"").split("/");d.length&&!(t.host=d.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),n.pathname=d.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var m=n.pathname||"",y=n.search||"";n.path=m+y}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var v=n.pathname&&"/"===n.pathname.charAt(0),g=t.host||t.pathname&&"/"===t.pathname.charAt(0),_=g||v||n.host&&t.pathname,b=_,E=n.pathname&&n.pathname.split("/")||[],d=t.pathname&&t.pathname.split("/")||[],S=n.protocol&&!w[n.protocol];if(S&&(n.hostname="",n.port=null,n.host&&(""===E[0]?E[0]=n.host:E.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),_=_&&(""===d[0]||""===E[0])),g)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,E=d;else if(d.length)E||(E=[]),E.pop(),E=E.concat(d),n.search=t.search,n.query=t.query;else if(!l.isNullOrUndefined(t.search)){if(S){n.hostname=n.host=E.shift();var T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");T&&(n.auth=T.shift(),n.host=n.hostname=T.shift())}return n.search=t.search,n.query=t.query,l.isNull(n.pathname)&&l.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=E.slice(-1)[0],A=(n.host||t.host||E.length>1)&&("."===C||".."===C)||""===C,O=0,k=E.length;k>=0;k--)C=E[k],"."===C?E.splice(k,1):".."===C?(E.splice(k,1),O++):O&&(E.splice(k,1),O--);if(!_&&!b)for(;O--;O)E.unshift("..");!_||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),A&&"/"!==E.join("/").substr(-1)&&E.push("");var I=""===E[0]||E[0]&&"/"===E[0].charAt(0);if(S){n.hostname=n.host=I?"":E.length?E.shift():"";var T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");T&&(n.auth=T.shift(),n.host=n.hostname=T.shift())}return _=_||n.host&&E.length,_&&!I&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),l.isNull(n.pathname)&&l.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var t=this.host,e=p.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){(function(t,r){var i;!function(o){function a(t){throw new RangeError(z[t])}function s(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function u(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(P,"."),r+s(t.split("."),e).join(".")}function l(t){for(var e,n,r=[],i=0,o=t.length;i<o;)e=t.charCodeAt(i++),e>=55296&&e<=56319&&i<o?(n=t.charCodeAt(i++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--)):r.push(e);return r}function c(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=j(t>>>10&1023|55296),t=56320|1023&t),e+=j(t)}).join("")}function p(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:x}function f(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function h(t,e,n){var r=0;for(t=n?M(t/T):t>>1,t+=M(t/e);t>R*E>>1;r+=x)t=M(t/R);return M(r+(R+1)*t/(t+S))}function d(t){var e,n,r,i,o,s,u,l,f,d,m=[],y=t.length,v=0,g=A,_=C;for(n=t.lastIndexOf(O),n<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&a("not-basic"),m.push(t.charCodeAt(r));for(i=n>0?n+1:0;i<y;){for(o=v,s=1,u=x;i>=y&&a("invalid-input"),l=p(t.charCodeAt(i++)),(l>=x||l>M((b-v)/s))&&a("overflow"),v+=l*s,f=u<=_?w:u>=_+E?E:u-_,!(l<f);u+=x)d=x-f,s>M(b/d)&&a("overflow"),s*=d;e=m.length+1,_=h(v-o,e,0==o),M(v/e)>b-g&&a("overflow"),g+=M(v/e),v%=e,m.splice(v++,0,g)}return c(m)}function m(t){var e,n,r,i,o,s,u,c,p,d,m,y,v,g,_,S=[];for(t=l(t),y=t.length,e=A,n=0,o=C,s=0;s<y;++s)(m=t[s])<128&&S.push(j(m));for(r=i=S.length,i&&S.push(O);r<y;){for(u=b,s=0;s<y;++s)(m=t[s])>=e&&m<u&&(u=m);for(v=r+1,u-e>M((b-n)/v)&&a("overflow"),n+=(u-e)*v,e=u,s=0;s<y;++s)if(m=t[s],m<e&&++n>b&&a("overflow"),m==e){for(c=n,p=x;d=p<=o?w:p>=o+E?E:p-o,!(c<d);p+=x)_=c-d,g=x-d,S.push(j(f(d+_%g,0))),c=M(_/g);S.push(j(f(c,0))),o=h(n,v,r==i),n=0,++r}++n,++e}return S.join("")}function y(t){return u(t,function(t){return k.test(t)?d(t.slice(4).toLowerCase()):t})}function v(t){return u(t,function(t){return I.test(t)?"xn--"+m(t):t})}var g=("object"==typeof e&&e&&e.nodeType,"object"==typeof t&&t&&t.nodeType,"object"==typeof r&&r);var _,b=2147483647,x=36,w=1,E=26,S=38,T=700,C=72,A=128,O="-",k=/^xn--/,I=/[^\x20-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,z={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=x-w,M=Math.floor,j=String.fromCharCode;_={version:"1.4.1",ucs2:{decode:l,encode:c},decode:d,encode:m,toASCII:v,toUnicode:y},void 0!==(i=function(){return _}.call(e,n,e,t))&&(t.exports=i)}()}).call(e,n(110)(t),n(9))},function(t,e,n){"use strict";t.exports={isString:function(t){return"string"===typeof t},isObject:function(t){return"object"===typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,o){e=e||"&",n=n||"=";var a={};if("string"!==typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var u=1e3;o&&"number"===typeof o.maxKeys&&(u=o.maxKeys);var l=t.length;u>0&&l>u&&(l=u);for(var c=0;c<l;++c){var p,f,h,d,m=t[c].replace(s,"%20"),y=m.indexOf(n);y>=0?(p=m.substr(0,y),f=m.substr(y+1)):(p=m,f=""),h=decodeURIComponent(p),d=decodeURIComponent(f),r(a,h)?i(a[h])?a[h].push(d):a[h]=[a[h],d]:a[h]=d}return a};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";function r(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,s){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"===typeof t?r(a(t),function(a){var s=encodeURIComponent(i(a))+n;return o(t[a])?r(t[a],function(t){return s+encodeURIComponent(i(t))}).join(e):s+encodeURIComponent(i(t[a]))}).join(e):s?encodeURIComponent(i(s))+n+encodeURIComponent(i(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},a=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},function(t,e,n){function r(t){return{url:t.url,status:t.status&&t.status.code,headers:t.headers,entity:t.entity,error:t.error,callback:t.request&&t.request.callback,nextPage:t.nextPage}}var i=n(8),o=i({response:r});t.exports=o},function(t,e,n){"use strict";n(54);var r=n(8),i=r({success:function(t){var e=t&&t.callback;return"function"===typeof e&&e(null,t.entity,t),t},error:function(t){var e=t&&t.callback;if("function"===typeof e){var n=t.error||t.entity;"object"!==typeof n&&(n=new Error(n)),e(n)}return t}});t.exports=i},function(t,e,n){"use strict";function r(t){var e=t.split(".")[1];if(!e)return null;e=e.replace(/-/g,"+").replace(/_/g,"/");var n=e.length%4;if(2===n&&(e+="=="),3===n&&(e+="="),1===n||n>3)return null;try{return JSON.parse(i.decode(e)).u}catch(t){return null}}var i=n(380);t.exports=r},function(t,e,n){"use strict";function r(t){if(/([^\u0000-\u00ff])/.test(t))throw new Error("Can't base64 encode non-ASCII characters.");for(var e,n,r,i=0,a=[];i<t.length;){switch(e=t.charCodeAt(i),r=i%3){case 0:a.push(o.charAt(e>>2));break;case 1:a.push(o.charAt((3&n)<<4|e>>4));break;case 2:a.push(o.charAt((15&n)<<2|e>>6)),a.push(o.charAt(63&e))}n=e,i+=1}return 0===r?(a.push(o.charAt((3&n)<<4)),a.push("==")):1===r&&(a.push(o.charAt((15&n)<<2)),a.push("=")),a.join("")}function i(t){if(t=t.replace(/\s/g,""),!/^[a-z0-9\+\/\s]+\={0,2}$/i.test(t)||t.length%4>0)throw new Error("Not a base64-encoded string.");var e,n,r=0,i=[];for(t=t.replace(/\=/g,"");r<t.length;){switch(e=o.indexOf(t.charAt(r)),r%4){case 1:i.push(String.fromCharCode(n<<2|e>>4));break;case 2:i.push(String.fromCharCode((15&n)<<4|e>>2));break;case 3:i.push(String.fromCharCode((3&n)<<6|e))}n=e,r+=1}return i.join("")}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports={encode:r,decode:i}},function(t,e,n){"use strict";function r(t){var e=t.handleSubmit,n=t.heading,r=t.zoningAbbreviation,i=t.zoningDescription;return o.a.createElement("form",{onSubmit:e},o.a.createElement("h1",null,n),o.a.createElement("h2",null,"Your zoning code is ",r),o.a.createElement("h2",null,"which means ",i),o.a.createElement("button",null,"Submit"))}var i=n(1),o=n.n(i),a=n(11),s=n(3),u=function(t){return{zoningAbbreviation:t.map.zoningAbbreviation,zoningDescription:t.map.zoningDescription}},l=function(t){return{dispatch:t}},c=Object(s.b)(u,l)(r);e.a=Object(a.c)({form:"wizard",destroyOnUnmount:!1,forceUnregisterOnUnmount:!0})(c)},function(t,e,n){"use strict";function r(t){var e=t.handleSubmit,n=t.heading;return o.a.createElement("form",{onSubmit:e},o.a.createElement("h1",null,n),o.a.createElement("button",null,"Submit"))}var i=n(1),o=n.n(i),a=n(11),s=n(3),u=function(t){return{state:t}},l=function(t){return{dispatch:t}};Object(s.b)(u,l)(r);e.a=Object(a.c)({form:"wizard",destroyOnUnmount:!1,forceUnregisterOnUnmount:!0})(r)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(1),s=n.n(a),u=n(11),l=n(3),c=n(119),p=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.indexZoningTable=n.indexZoningTable.bind(n),n.indexPermitTable=n.indexPermitTable.bind(n),n}return o(e,t),p(e,[{key:"componentDidMount",value:function(){var t=this.props,e=t.fetchZoningTable,n=t.fetchPermitTable;e(),n()}},{key:"indexZoningTable",value:function(){var t=this.props,e=t.businessType;return t.zoningTable[e]}},{key:"indexPermitTable",value:function(t){var e=this.props,n=e.permitTable,r=e.zoningAbbreviation;return n[t][r]}},{key:"render",value:function(){var t=this.props,e=t.zoningTable,n=t.permitTable;if(!e||!n)return s.a.createElement("h1",null,"LOADING");var r=this.indexZoningTable();switch(this.indexPermitTable(r)){case null:return s.a.createElement("h1",null,"Sorry, your use is not allowed in this Zoning District");case"PD":return s.a.createElement("h1",null,"Since your site is in Planned Development Zoning (PD), you will need to visit the Planning Counter");case"C":return s.a.createElement("h1",null,"A SUP or CUP is required, you will need to visit the Planning Counter first");case"P":return s.a.createElement("h1",null,"Your use is allowed. Now I am going to ask a few more questions to figure out what permits you may need");default:return s.a.createElement("h1",null,"Sorry, your use is not allowed in this Zoning District")}}}]),e}(a.Component),h=function(t){return{zoningTable:t.lookup.zoningTable,permitTable:t.lookup.permitTable,businessType:t.form.wizard.values.businessType.toLowerCase(),zoningAbbreviation:t.map.zoningAbbreviation}},d=function(t){return{fetchZoningTable:function(){t(Object(c.d)())},fetchPermitTable:function(){t(Object(c.c)())}}},m=Object(l.b)(h,d)(f);e.a=Object(u.c)({form:"wizard",destroyOnUnmount:!1,forceUnregisterOnUnmount:!0})(m)},function(t,e,n){"use strict";function r(){if("serviceWorker"in navigator){if(new URL("/upfront-info",window.location).origin!==window.location.origin)return;window.addEventListener("load",function(){var t="/upfront-info/service-worker.js";a?(o(t),navigator.serviceWorker.ready.then(function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://goo.gl/SC7cgQ")})):i(t)})}}function i(t){navigator.serviceWorker.register(t).then(function(t){t.onupdatefound=function(){var e=t.installing;e.onstatechange=function(){"installed"===e.state&&(navigator.serviceWorker.controller?console.log("New content is available; please refresh."):console.log("Content is cached for offline use."))}}}).catch(function(t){console.error("Error during service worker registration:",t)})}function o(t){fetch(t).then(function(e){404===e.status||-1===e.headers.get("content-type").indexOf("javascript")?navigator.serviceWorker.ready.then(function(t){t.unregister().then(function(){window.location.reload()})}):i(t)}).catch(function(){console.log("No internet connection found. App is running in offline mode.")})}e.a=r;var a=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))},function(t,e){},function(t,e){},function(t,e,n){"use strict";function r(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(i){return"function"===typeof i?i(n,r,t):e(i)}}}}e.__esModule=!0;var i=r();i.withExtraArgument=r,e.default=i},function(t,e,n){"use strict";var r=n(11),i=n(14),o=n(389),a=n(390),s=n(391),u=n(392),l=Object(i.combineReducers)({form:r.b,position:o.a,graph:a.a,map:s.a,lookup:u.a});e.a=l},function(t,e,n){"use strict";var r=n(121),i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments[1];switch(e.type){case r.a:return e.payload;default:return t}};e.a=i},function(t,e,n){"use strict";var r=n(120),i={nodes:void 0},o=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,e=arguments[1];switch(e.type){case r.a:return e.payload;default:return t}};e.a=o},function(t,e,n){"use strict";var r=n(101),i={point:{x:0,y:0},zoningAbbreviation:"N/A",zoningDescription:"N/A",address:"",name:""},o=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,e=arguments[1],n=Object.assign({},t);switch(e.type){case r.a:return n.point=e.payload,n;case r.c:return n.zoningAbbreviation=e.payload,n;case r.d:return n.zoningDescription=e.payload,n;case r.b:return console.log("set address",e),n.address=e.payload.address,n.name=e.payload.name,n;default:return t}};e.a=o},function(t,e,n){"use strict";var r=n(34),i=(n.n(r),n(119)),o={zoningTable:void 0,permitTable:void 0},a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,e=arguments[1],n=Object.assign({},t);switch(e.type){case i.a:return n.permitTable=e.payload,n;case i.b:return n.zoningTable=e.payload,n;default:return n}};e.a=a},function(t,e,n){"use strict";var r=n(14).compose;e.__esModule=!0,e.composeWithDevTools="undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"===typeof arguments[0]?r:r.apply(null,arguments)},e.devToolsEnhancer="undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}}}]);
  //# sourceMappingURL=main.c71bb2e7.js.map